Skip to content

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

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
varkor opened this issue Oct 13, 2019 · 0 comments · Fixed by #65579
Closed

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

varkor opened this issue Oct 13, 2019 · 0 comments · Fixed by #65579
Labels
A-const-generics Area: const generics (parameters and arguments) A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug. F-const_generics `#![feature(const_generics)]` requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@varkor
Copy link
Member

varkor commented Oct 13, 2019

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.

@varkor varkor added A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug. A-const-generics Area: const generics (parameters and arguments) requires-nightly This issue requires a nightly compiler in some way. labels Oct 13, 2019
@Centril Centril added the F-const_generics `#![feature(const_generics)]` label Oct 13, 2019
@jonas-schievink jonas-schievink added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 13, 2019
JohnTitor added a commit to JohnTitor/rust that referenced this issue Oct 20, 2019
Changed `resolve_type_vars_with_obligations` to also resolve const inference variables

Fixes rust-lang#65380
r? @varkor
@bors bors closed this as completed in 3e8acaf Oct 20, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-const-generics Area: const generics (parameters and arguments) A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug. F-const_generics `#![feature(const_generics)]` requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
3 participants