-
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
ICE: inference variables in normalized parameter environment: unconstrained type
#120033
Labels
C-bug
Category: This is a bug.
F-non_lifetime_binders
`#![feature(non_lifetime_binders)]`
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
matthiaskrgr
added
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
C-bug
Category: This is a bug.
F-non_lifetime_binders
`#![feature(non_lifetime_binders)]`
labels
Jan 16, 2024
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Jan 16, 2024
jieyouxu
removed
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Feb 15, 2024
matthiaskrgr
added
the
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
label
Apr 19, 2024
probably related, does not require non-lifetime-binders: auto-reduced (treereduce-rust): trait Archive {
type Archived;
}
type Archived<T> = <T as Archive>::Archived;
trait Deserialize<T: Archive, T: Archive> {}
impl<T, const N: usize> Archive for [T; B]
where
T: Archive,
{
type Archived = [T::Archived; N];
}
pub const MYSIZE: usize = 10;
impl<T> Archive for Sad<T>
where
T: Archive,
Archived<[T; MYSIZE]>: Deserialize<[T; MYSIZE], D>,
T::Archived:,
{
}
original code
original: // Traits and base impls:
trait Archive {
type Archived;
}
type Archived<T> = <T as Archive>::Archived;
trait Deserialize<T: Archive, T: Archive> {}
impl<T, const N: usize> Archive for [T; B]
where
T: Archive,
{
type Archived = [T::Archived; N];
}
impl<T: Archive, D: ?Sized, const N: usize> Deserialize<[T; N], D> for [T::Archived; N]
where
T: Archive,
T::Archived: Deserialize<T, D>,
{
}
// A happy struct + impls that works perfectly fine:
pub enum Happy<T> {
A([T; 10]),
B([T; 10]),
}
impl<T> Archive for Happy<T>
where
T: Archive,
[T; 10]: Archive,
[T; 10]: Archive,
{
type Archived = Happy<Archived<T>>;
}
impl<D: ?Sized, T> Deserialize<Happy<T>, D> for Archived<Happy<T>>
where
T: Archive,
[T; 10]: Archive,
Archived<[T; 10]>: Deserialize<[T; 10], D>,
[T; 10]: Archive,
Archived<[T; 10]>: Deserialize<[T; 10], D>,
{
}
// A sad struct + impls that causes a compiler error:
pub const MYSIZE: usize = 10;
pub enum Sad<T> {
A([T; MYSIZE]),
B([T; MYSIZE]),
}
impl<T> Archive for Sad<T>
where
T: Archive,
Archived<[T; MYSIZE]>: Deserialize<[T; MYSIZE], D>,
T::Archived: Deserialize<T, D>,
{
type Archived = Sad<Archived<T>>;
}
impl<D: ?Sized, T> Deserialize<Sad<T>, D> for Archived<Sad<T>>
where
T: Archive,
Archived<[T; 10]>: Deserialize<[T; 10], D>,
Archived<[T; MYSIZE]>: Deserialize<[T; MYSIZE], D>,
[T; MYSIZE]: Archive, // 💣
Archived<[T; MYSIZE]>: Deserialize<[T; MYSIZE], D>, // 💣
{
} Version information
Command: Program output
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
F-non_lifetime_binders
`#![feature(non_lifetime_binders)]`
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
snippet:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
The text was updated successfully, but these errors were encountered: