Skip to content
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 with self region #5936

Closed
Kimundi opened this issue Apr 18, 2013 · 8 comments
Closed

ICE with self region #5936

Kimundi opened this issue Apr 18, 2013 · 8 comments
Labels
A-lifetimes Area: lifetime related I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@Kimundi
Copy link
Member

Kimundi commented Apr 18, 2013

pub trait AsciiCast<'self, T>{
    fn to_ascii(&'self self) -> T;
    fn is_ascii(&'self self) -> bool;
}

only output:

error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
@nikomatsakis
Copy link
Contributor

This is probably a bug in the region inference code.

@nikomatsakis
Copy link
Contributor

sorry, the region parameterization inference.

@jbclements
Copy link
Contributor

FWIW, I reproduced this (though I had to add a 'main' to get that far). Here's the result with backtrace:

jclements-09740:~/rust/build clements> RUST_LOG=rustc=1,::rt::backtrace !!
RUST_LOG=rustc=1,::rt::backtrace rustc /tmp/foo4.rs
Running /Users/clements/rust/build/x86_64-apple-darwin/stage2/bin/rustc:
rust: task failed at 'assertion failed: self.variance.is_some()', /Users/clements/rust/src/librustc/middle/typeck/rscope.rs:181
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /Users/clements/rust/src/librustc/rustc.rc:368
rust: domain main @0x7ff95c019210 root task failed

@msullivan
Copy link
Contributor

Still ICEs.

@pnkfelix
Copy link
Member

pnkfelix commented Oct 9, 2013

possible dupe of #6157.

@erickt
Copy link
Contributor

erickt commented Oct 13, 2013

Probably a subbug of #4846.

@eminence
Copy link
Contributor

Testing on the latest master (dc48adc)

After changing 'self to 'a, the original code compiles cleanly with no ICE.

@flaper87
Copy link
Contributor

The code in the example now outputs.

test.rs:1:22: 1:26 error: invalid lifetime name: 'self is no longer a special lifetime
test.rs:1 pub trait AsciiCast<'self, T>{
rustc 0.10-pre (1d80a9a 2014-01-29 01:06:41 -0800)
host: x86_64-unknown-linux-gnu

closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lifetimes Area: lifetime related I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

8 participants