-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Complaint about trait not being implemented #61935
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
Comments
Checking this example again gives me an ICE similar to #62879. |
ICE has been downgraded to an error since: #62879 (comment) |
The error is now:
|
@Dylan-DPC yeah also see the comment above yours as well as eddyb's reply in that thread. |
@est31 i'm aware was just updating so it is easier to check with later |
Due to this reddit post I tested it again and now the compile error is gone. Good job guys and girls! |
Let's make sure we add a regression test. |
Now there's a different error:
|
This error is expected fallout of #70107 We also already have a regression test for some reason 😅 |
@lcnr is there an issue that tracks the fallout of that PR? I'd like the code I posted to work so I'm curious. |
Not really, it might be a good idea to open an issue for this though 🤔 #![feature(const_generics)]
fn foo<const B: bool>() {}
fn bar<const N: usize>() {
foo::<{ N == 0 }>();
} I am not really sure how much design + implementation is still needed here, so |
Filed an issue: #73899 |
remove duplicate test for rust-lang#61935 Apparently I somehow messed up the issue number in rust-lang#67890 which caused us to add this test twice, both as https://github.com/rust-lang/rust/blob/master/src/test/ui/const-generics/issues/issue-61935.rs and https://github.com/rust-lang/rust/blob/master/src/test/ui/const-generics/lazy-normalization/issue-71922.rs rust-lang#61935 is the actually fixed issue while rust-lang#71922 is still not working, as it depends on lazy norm of repeat expressions
remove duplicate test for rust-lang#61935 Apparently I somehow messed up the issue number in rust-lang#67890 which caused us to add this test twice, both as https://github.com/rust-lang/rust/blob/master/src/test/ui/const-generics/issues/issue-61935.rs and https://github.com/rust-lang/rust/blob/master/src/test/ui/const-generics/lazy-normalization/issue-71922.rs rust-lang#61935 is the actually fixed issue while rust-lang#71922 is still not working, as it depends on lazy norm of repeat expressions
remove duplicate test for rust-lang#61935 Apparently I somehow messed up the issue number in rust-lang#67890 which caused us to add this test twice, both as https://github.com/rust-lang/rust/blob/master/src/test/ui/const-generics/issues/issue-61935.rs and https://github.com/rust-lang/rust/blob/master/src/test/ui/const-generics/lazy-normalization/issue-71922.rs rust-lang#61935 is the actually fixed issue while rust-lang#71922 is still not working, as it depends on lazy norm of repeat expressions
remove duplicate test for rust-lang#61935 Apparently I somehow messed up the issue number in rust-lang#67890 which caused us to add this test twice, both as https://github.com/rust-lang/rust/blob/master/src/test/ui/const-generics/issues/issue-61935.rs and https://github.com/rust-lang/rust/blob/master/src/test/ui/const-generics/lazy-normalization/issue-71922.rs rust-lang#61935 is the actually fixed issue while rust-lang#71922 is still not working, as it depends on lazy norm of repeat expressions
remove duplicate test for rust-lang#61935 Apparently I somehow messed up the issue number in rust-lang#67890 which caused us to add this test twice, both as https://github.com/rust-lang/rust/blob/master/src/test/ui/const-generics/issues/issue-61935.rs and https://github.com/rust-lang/rust/blob/master/src/test/ui/const-generics/lazy-normalization/issue-71922.rs rust-lang#61935 is the actually fixed issue while rust-lang#71922 is still not working, as it depends on lazy norm of repeat expressions
…arth Rollup of 16 pull requests Successful merges: - rust-lang#72569 (Remove legacy InnoSetup GUI installer) - rust-lang#73306 (Don't implement Fn* traits for #[target_feature] functions) - rust-lang#73345 (expand: Stop using nonterminals for passing tokens to attribute and derive macros) - rust-lang#73449 (Provide more information on duplicate lang item error.) - rust-lang#73569 (Handle `macro_rules!` tokens consistently across crates) - rust-lang#73803 (Recover extra trailing angle brackets in struct definition) - rust-lang#73839 (Split and expand nonstandard-style lints unicode unit test.) - rust-lang#73841 (Remove defunct `-Z print-region-graph`) - rust-lang#73848 (Fix markdown rendering in librustc_lexer docs) - rust-lang#73865 (Fix Zulip topic format) - rust-lang#73892 (Clean up E0712 explanation) - rust-lang#73898 (remove duplicate test for rust-lang#61935) - rust-lang#73906 (Add missing backtick in `ty_error_with_message`) - rust-lang#73909 (`#[deny(unsafe_op_in_unsafe_fn)]` in libstd/fs.rs) - rust-lang#73910 (Rewrite a few manual index loops with while-let) - rust-lang#73929 (Fix comment typo) Failed merges: r? @ghost
Uh oh!
There was an error while loading. Please reload this page.
Rustc complains about the trait not being implemented for
[(); _]
, but actually it's given a[(); 1]
literal and for that one, the trait is implemented. Turbofishingfoo::<[(); 0]>([])
doesn't help.cc @varkor @rodrimati1992
see also #61383
Code ↓
Error ↓
The text was updated successfully, but these errors were encountered: