-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Generic Constants Nightly breaks with Rust 1.68 #107265
Comments
searched nightlies: from nightly-2022-12-01 to nightly-2023-01-26 bisected with cargo-bisect-rustc v0.6.5Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --start 2022-12-1 --end 2023-01-26 @rustbot label -E-needs-bisection |
I would note that this may have accidentally been permitted to compile. I reran the example with I am of the personal belief that this should compile, since it seems like the error is continually pointing at the same variable for a cyclic type, but I'm not sure whether that is actually something that Rust would want to support. Independent of whether it should compile or not, the error messages also expose a lot of internal details of the compiler, which is fine for now since |
I'm seeing a similar (but not identical regression) which I also bisected to #105292. My impl block begins: impl<'a, T: Type> Copied<'a, Pointer<T>>
where
[(); <NonNullPointer<T>>::SIZE]:,
[(); <Pointer<T>>::SIZE]:,
[(); T::SIZE]:,
{ and the compiler errors are
Note that at the very least the suggested remediation is not helpful - the compiler is suggesting to add the same code that is already present. /cc @tamird |
./x.py test --stage 1 tests/ui/const-generics/generic_const_exprs rust-lang#107265
./x.py test --stage 1 tests/ui/const-generics/generic_const_exprs rust-lang#107265
The following code compiles on Rust 1.67 (nightly) but not on Rust 1.68 (nightly)
Code
Version it worked on
It most recently worked on: 1.67
Version with regression
rustc --version --verbose
:Backtrace
Backtrace
The text was updated successfully, but these errors were encountered: