-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Compiler panic related cause by NLLs #47153
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
Comments
Can you give any sort of link to code that reproduces the problem? |
I tried fixing the project to determine what exactly caused the issue, but couldn't find exactly what code was doing this. If no similar issue is encountered, I can try rolling back my old code and see if I can make it crash again. |
I don't recall seeing any similar ICEs. |
Ran into this bug here: https://github.com/mtanski/dbkit/tree/nll-build-crash Regular build ( Could not slim down the test case. Attempts at it make the bug go away. Version
Crash
|
#![feature(nll)]
trait Foo {
const B: bool = true;
}
fn main() { } Another example: #![feature(nll)]
struct Foo<T> { x: T }
impl<T> Foo<T> {
const B: bool = true;
}
fn main() { } |
The problem is this assertion is firing:
My assumption in writing that code was that constant values were never generic. But that was simply not true, as these examples show. I suspect we can just remove the assertion, actually, though I'm trying to see if this was important for some other reason. |
Thanks @nikomatsakis for helping in breaking down the bug, I will take care of this. |
@Pulkit07 too late ;) |
@nikomatsakis hehe, no worries |
When compiling a project with
#[feature(nll)]
enabled,rustc
panics because of a failed assertion.My project has many errors so I can't determine exactly what code is causing a problem; I'll update when I'll know more.
Backtrace
Version
The text was updated successfully, but these errors were encountered: