-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong error about the size of a parameter not being known at compiletime #78834
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() {}
|
fmease
added
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
and removed
C-bug
Category: This is a bug.
needs-triage-legacy
labels
Sep 7, 2023
|
estebank
added
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
and removed
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
labels
Nov 21, 2024
@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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in 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: