-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Wrong error about the size of a parameter not being known at compiletime #78834
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
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Current output:
|
If you opt out of struct B<
A: ?Sized = [(); {
let x = [0u8; !0usize];
1
}],
> {
a: A,
}
fn main() {}
|
|
@rustbot claim |
jhpratt
added a commit
to jhpratt/rust
that referenced
this issue
Dec 3, 2024
Add const evaluation error UI test. This closes rust-lang#78834
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Dec 3, 2024
Rollup merge of rust-lang#133785 - HypheX:add-ui-test, r=compiler-errors Add const evaluation error UI test. This closes rust-lang#78834
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: This code should compile, as
A
is a generic type with the default type being[(); 1]
. When I remove thelet x = [0u8; !0usize]
line, everything compiles fine.Instead, this happened: I got an error message,
error[E0277]
Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: