-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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: expected type .. but found Lifetime..
#120792
Labels
-Zpolymorphize
Unstable option: Polymorphization.
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-nightly
This issue requires a nightly compiler in some way.
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
auto-reduced (treereduce-rust): impl Trait<()> for () {
fn foo<'a, K>(self, _: (), _: K) {
todo!();
}
}
trait Foo<T> {}
impl<F, T> Foo<T> for F {
fn main() {
().foo((), ());
}
}
trait Trait<T> {
fn foo<'a, K>(self, _: T, _: K)
where
T: 'a,
K: 'a;
}
original: trait Bar<T> {
fn foo<'a, K>(self, _: T, _: K) where K: 'a, K: 'main;
}
impl Trait<()> for () {
fn foo<'a, K>(self, _: (), _: K) where { //~ ERROR E0195
todo!();
}
}
struct State;
trait Foo<T> {
fn foo<'a>(&self, state: &'a State) -> &'a T
where
T: 'a;
}
impl<F, T> Foo<T> for F
where
F: Fn(&State) -> &T,
{
fn main() {
().foo((), ());
}
}
trait Trait<T> {
fn foo<'a, K>(self, _: T, _: K) where T: 'a, K: 'a;
}
impl Bar for () {
fn foo<'a: 'a>(&'a self) {} //~ ERROR E0195
}
fn main() {
self(state);
} Version information
Command: Program output
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
-Zpolymorphize
Unstable option: Polymorphization.
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-nightly
This issue requires a nightly compiler in some way.
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.
auto-reduced (treereduce-rust):
original code
original:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zpolymorphize=on -Zinline-mir=yes
Program output
The text was updated successfully, but these errors were encountered: