-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
ICE: unexpected ambiguity #105299
Comments
@rustbot label +E-needs-mcve |
Also you could try to see if this repros on the latest stable 1.65. If possible you can also try the latest nightly 1.67. |
Possibly the same bug or a closely related one can be triggered with the following MCVE on both current stable and nightly. If this is a different bug, I can open a new issue or comment on another issue. pub trait Foo: Clone {}
pub struct Bar<'a, T: Clone> {
pub cow: std::borrow::Cow<'a, [T]>,
pub THIS_CAUSES_ICE: (), // #1
}
impl<T> Bar<'_, T>
where
T: Clone,
[T]: Foo,
{
pub fn MOVES_SELF(self) {} // #2
} results in
Full compiler output
The critical lines are marked as EDITSeems this is related to the fact that a DST can be the last field, but only the last field, of a struct. Moving
|
@rustbot label -E-needs-mcve |
Takes crash tests from rust-lang#135039, rust-lang#103899, rust-lang#91985 and rust-lang#105299 and turns them into ui tests
Takes crash tests from rust-lang#135039, rust-lang#103899, rust-lang#91985 and rust-lang#105299 and turns them into ui tests
Takes crash tests from rust-lang#135039, rust-lang#103899, rust-lang#91985 and rust-lang#105299 and turns them into ui tests
Today I encountered a compiler panic with rustc 1.64.0.
Code
Unfortunately I cannot provide the code at this point, as it's not released, yet. The project makes heavy use of (const) generics. There were some errors in the code which probably lead to the compiler panic. After fixing some errors, the panic went away, too.
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: