-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ice: effects: assertion failed: constant / lifetime #117244
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
#117171 cc @fee1-dead ^^ |
Would be nice if you uplifted the |
@compiler-errors flags are added now, at the bottom though as to not shift all the lines around which would get the mvce/error output out of sync and might cause other problems I suspect (iirc specifying a flag multiple times via file AND cmdline arg still breaks things) |
I don't see any flags added so I've added them myself. |
Further reduced: #![feature(effects)]
#![feature(const_trait_impl)]
trait Foo {}
const fn check<T: ~const Foo>() {}
fn main() {} |
#![feature(derive_const)]
#![feature(const_trait_impl, effects)]
#[derive_const(PartialEq, Eq)]
pub struct Reverse<T>(T);
const fn foo(a: Reverse<i32>, b: Reverse<i32>) -> bool {
a == b
}
fn main() {} |
…=compiler-errors Clean up `check_consts` and misc fixes 1. Remove most of the logic around erroring with trait methods. I have kept the part resolving it to a concrete impl, as that is used for const stability checks. 2. Turning on `effects` causes ICE with generic args, due to `~const Tr` when `Tr` is not `#[const_trait]` tripping up expectation in code that handles generic args, more specifically here: https://github.com/rust-lang/rust/blob/8681e077b8afa99d60acf8f8470a012a3ce709a5/compiler/rustc_hir_analysis/src/astconv/generics.rs#L377 We set `arg_count.correct` to `Err` to correctly signal that an error has already been reported. 3. UI test blesses. Edit(fmease): Fixes rust-lang#117244 (UI test is in rust-lang#119099 for now). r? compiler-errors
auto-reduced (treereduce-rust):
original:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zcrate-attr=feature(effects)
Program output
The text was updated successfully, but these errors were encountered: