-
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
NLL ICE: unresolved type in dtorck #47022
Comments
I also get the same error with this code |
In particular, this line caused the ICE:
|
I get the same error, with a different snippet ‒ maybe it can help to cross-compare them and close on the cause. I didn't manage to get a backtrace from rustc :-( fn convert(objects: Vec<LoadedObject>) -> (Vec<Body>, Vec<Graphic>) {
objects
.into_iter()
.flat_map(|LoadedObject { bodies, color, .. }| {
bodies.into_iter()
.map(move |body| (body, Graphic { color: color.clone() }))
})
.unzip()
} Replacing the |
I've also observed this error =) This is a self-contained example (based on @vorner's snippet) the seems to reproduce the problem: #![feature(nll)]
struct LoadedObject {
bodies: Vec<Body>,
color: Color,
}
struct Body;
#[derive(Clone)]
struct Color;
struct Graphic {
color: Color,
}
fn convert(objects: Vec<LoadedObject>) -> (Vec<Body>, Vec<Graphic>) {
objects
.into_iter()
.flat_map(|LoadedObject { bodies, color, .. }| {
bodies.into_iter().map(move |body| {
(
body,
Graphic {
color: color.clone(),
},
)
})
})
.unzip()
}
fn main() {} |
Dang, I'm getting some non-local effects with this, or something. I had two branches which added different files and only really overlapped in main.rs and Cargo.toml (for adding deps). Both compiled fine, but merging them caused this error to appear. Getting rid of flat_maps seems to solve the problem though :/ |
@tbelaire I think this is due to incremental compilation. If you compile a project without NLL, and then add the NLL feature flag, it will compile just fine. It you |
Oh, that's interesting...
I'll have to play around with that once I'm home.
…On Thu, Jan 4, 2018 at 5:07 AM, Frank Denis ***@***.***> wrote:
@tbelaire <https://github.com/tbelaire> I think this is due to
incremental compilation. If you compile a project without NLL, and then add
the NLL feature flag, it will compile just fine. It you cargo clean and
rebuild it, it will fail.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#47022 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAaE57QzwQoClppKKj3WIJ1W--dfzu4Xks5tHKLegaJpZM4RM_FF>
.
|
I'm digging in. I'll leave some notes here as I go. Relevant part of the backtrace:
This is occurring in the liveness code. |
Fix pending in #47322 |
resolve type and region variables in "NLL dropck" Fixes rust-lang#47022. r? @pnkfelix
resolve type and region variables in "NLL dropck" Fixes rust-lang#47022. r? @pnkfelix
rustc version:
This is on macOS.
Enabling NLL triggers an ICE when trying to compile EdgeDNS (
nll
branch from https://github.com/jedisct1/edgedns):This happens at link time.
The text was updated successfully, but these errors were encountered: