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

error: internal compiler error #10412

Closed
jeff-davis opened this issue Nov 11, 2013 · 1 comment · Fixed by #11012
Closed

error: internal compiler error #10412

jeff-davis opened this issue Nov 11, 2013 · 1 comment · Fixed by #11012
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.

Comments

@jeff-davis
Copy link

The following error appears:

error: internal compiler error: ty::Region#subst(): Reference to self region when given substs with no self region: substs(regions=[], self_ty=Some(BUG[1u]), tps=[T])
This message reflects a bug in the Rust compiler. 
We would appreciate a bug report: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
task 'rustc' failed at 'explicit failure', /build/buildd/rust-nightly-201311090805~d14a647~saucy/src/libsyntax/diagnostic.rs:101
task '<main>' failed at 'explicit failure', /build/buildd/rust-nightly-201311090805~d14a647~saucy/src/librustc/lib.rs:397

When compiling the following program:

trait Serializable<'self, T> {
   fn serialize(val : &'self T) -> ~[u8];
   fn deserialize(repr : &[u8]) -> &'self T;
}

impl<'self> Serializable<str> for &'self str {
   fn serialize(val : &'self str) -> ~[u8] {
      ~[1]
   }
   fn deserialize(repr: &[u8]) -> &'self str {
      "hi"
   }
}

fn main() {
   println("hello");
   let x = ~"foo";
   let y = x;
   println(y);
}
$ rustc --version
rustc 0.9-pre
host: x86_64-unknown-linux-gnu
$ dpkg --status rust-nightly
Package: rust-nightly
Status: install ok installed
Priority: extra
Section: devel
Installed-Size: 113880
Maintainer: Hans Jørgen Hoel <[email protected]>
Architecture: amd64
Version: 201311090805~d14a647~saucy
Depends: libc6 (>= 2.17), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.6)
Description: Rust compiler and tools
 Compiler, libraries and tools for the Rust programming language.
Homepage: http://rust-lang.org
@alexcrichton
Copy link
Member

This gets a much nicer error message after #10153, flagging as needstest.

There's a few problems in this code, but I recommend updating to rust master, lots of stuff has been fixed!

bors added a commit that referenced this issue Dec 18, 2013
alexcrichton added a commit that referenced this issue Dec 19, 2013
Closes #5806
Closes #5950
Closes #7178
Closes #8259
Closes #8578
Closes #8851
Closes #9129
Closes #10412
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants