-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Cross-crate regions in statics ICE #8259
Comments
Also a similar, but different error: // test.rs
extern mod other;
static a: other::Bar<'static> = other::C(&other::A);
fn main() {}
// other.rs
pub enum Foo<'self> {
A,
B(&'self str),
}
pub enum Bar<'self> {
C(&'self Foo<'self>),
}
|
I've also confirmed that if everything is defined in the same crate, it all compiles just fine. |
This may be related to #7634, although it's a different error message so I'm not sure of it. |
This is not related to #7634 |
I just ran into this myself. One interesting thing I found is that the error happens due to the empty variant. This compiles fine for me:
|
Appears to be fixed now, flagging as needstest. |
Fix `deref_addrof` fixes rust-lang#8247 This would supersede rust-lang#8259 changelog: Don't lint `deref_addrof` when the dereference and the borrow occur in different contexts
This code:
Causes the ICE
cc @nikomatsakis
The text was updated successfully, but these errors were encountered: