-
Notifications
You must be signed in to change notification settings - Fork 13k
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: "Forcing query with already existing 'DepNode' #79847
Comments
Assigning |
It appears to be a regression at nightly-2020-01-13. My (unverified) guess is that it arose in 59c1db0. |
For what it's worth is simpler and produces a similar panic: #[derive(PartialEq, Eq)]
pub struct StaticString {
string: &'static str,
}
const DUMMY1: StaticString = StaticString {
string: "DUMMY",
};
const DUMMY2: StaticString = StaticString {
string: "DUMMY",
};
fn main() {
let bar = DUMMY1;
let name = match bar {
DUMMY1 => "1",
DUMMY2 => "2",
_ => "Foo",
};
} |
Issue: rust-lang/rust#79847
Also encountered this error (rust-lang/rust-clippy#7373), while using Clippy (on nightly only), reduced it to the following:
// lib.rs
use std::collections::HashMap;
type Map<'a> = HashMap<&'a str, &'a str>;
fn a(_: &()) -> Map {
todo!()
}
fn b<'a>(_: &'a Map) {
todo!()
} Backtrace
|
Closing as duplicate of #83085 which is tracked by glacier. |
I think the error has to do with the fact that I have the same static str "DUMMY". If I change the strings to be nonidentical the panic no longer occurs. This was slimmed down from a much bigger example. I know the code may still not compile even once the panic is fixed, but it still should not panic.
Code
Meta
rustc --version --verbose
:Also occurs on
Error output
Backtrace
The text was updated successfully, but these errors were encountered: