Skip to content

Constants are printed as _, even when their value is known #65380

Closed
@varkor

Description

@varkor
error[E0308]: mismatched types
  --> $DIR/const-argument-cross-crate-mismatch.rs:8:39
   |
LL |     let _: const_generic_lib::Alias = const_generic_lib::Struct([0u8, 1u8, 2u8]);
   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `2usize`, found `3usize`
   |
   = note: expected type `const_generic_lib::Struct<2usize>`
              found type `const_generic_lib::Struct<_: usize>`

Seen in https://github.com/rust-lang/rust/pull/65365/files#diff-5f3259ccaa0ac2f4805ec7379527c987.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-genericsArea: const generics (parameters and arguments)A-diagnosticsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.F-const_generics`#![feature(const_generics)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions