-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Rust ICE when using for all binder (panics in MIR) on stable 1.34.0 and nightly 1.35.0 #60274
Labels
A-NLL
Area: Non-lexical lifetimes (NLL)
C-bug
Category: This is a bug.
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.
Comments
|
@jonas-schievink thanks for putting the stack-trace, I forgot about that This also works Vec::<u32>::from_generator(Iter(indicies.iter().cloned())); |
Small repro: pub trait Outlives<'this> {}
impl<'this, T> Outlives<'this> for T where T: 'this {}
fn assert_static_via_hrtb<G>(_: G) where for<'a> G: Outlives<'a> {}
fn main() {
let local = 0;
assert_static_via_hrtb(&local);
} I'll try to have a PR up for this next week. |
Another repro from #60314: trait Trait {
type AssociatedType;
}
impl<'a, T : 'a> Trait for &'a T {
type AssociatedType = &'a ();
}
/// Calling this with some T when we don't have `T : 'static` leads to an ICE
fn foo<T> (_: &'_ T)
where
for<'a> &'a T : Trait<AssociatedType = &'a ()>,
{}
/// proof
fn main ()
{
use ::core::convert::identity as force_local;
match force_local(()) { ref not_static => {
foo(¬_static);
}}
} |
Centril
added a commit
to Centril/rust
that referenced
this issue
May 1, 2019
…-lbl, r=nikomatsakis Search for incompatible universes in borrow errors If we have a borrow that has to live for `'static` we need to check for any regions in incompatible universes when trying to find the cause. closes rust-lang#60274
Centril
added a commit
to Centril/rust
that referenced
this issue
May 1, 2019
…-lbl, r=nikomatsakis Search for incompatible universes in borrow errors If we have a borrow that has to live for `'static` we need to check for any regions in incompatible universes when trying to find the cause. closes rust-lang#60274
Centril
added a commit
to Centril/rust
that referenced
this issue
May 1, 2019
…-lbl, r=nikomatsakis Search for incompatible universes in borrow errors If we have a borrow that has to live for `'static` we need to check for any regions in incompatible universes when trying to find the cause. closes rust-lang#60274
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-NLL
Area: Non-lexical lifetimes (NLL)
C-bug
Category: This is a bug.
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.
While I was trying to make a general
Generator
impl, I came across this ICE. Note that inliningindicies
makes this ICE go away.The text was updated successfully, but these errors were encountered: