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

Crash "../src/librustc_typeck/collect.rs:1925: Self should not be the name of a regular parameter" #36688

Closed
alopatindev opened this issue Sep 24, 2016 · 2 comments

Comments

@alopatindev
Copy link
Contributor

Nightly crashes with the following code:

impl<Self> A {}

Doesn't reproduce on 1.11.0.

$ rustc --version --verbose
rustc 1.13.0-nightly (4f9812a59 2016-09-21)
binary: rustc
commit-hash: 4f9812a59ab7247f0f52b01ca89b0793a2d289c3
commit-date: 2016-09-21
host: x86_64-unknown-linux-gnu
release: 1.13.0-nightly

$ RUST_BACKTRACE=1 rustc 1.rs
error: expected identifier, found keyword `Self`
 --> 1.rs:1:6
  |
1 | impl<Self> A {}
  |      ^^^^

error[E0412]: type name `A` is undefined or not in scope
 --> 1.rs:1:12
  |
1 | impl<Self> A {}
  |            ^ undefined or not in scope
  |
  = help: no candidates by the name of `A` found in your project; maybe you misspelled the name or forgot to import an external crate?

error: main function not found

error: internal compiler error: ../src/librustc_typeck/collect.rs:1925: `Self` should not be the name of a regular parameter
 --> 1.rs:1:6
  |
1 | impl<Self> A {}
  |      ^^^^

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'Box<Any>', ../src/librustc_errors/lib.rs:601
stack backtrace:
   1:     0x7fd351ce6612 - <unknown>
   2:     0x7fd351cf742d - <unknown>
   3:     0x7fd351cf487e - <unknown>
   4:     0x7fd351cf4f68 - std::panicking::rust_panic_with_hook::hb1322e5f2588b4db
   5:     0x7fd3500123b8 - <unknown>
   6:     0x7fd35013cac5 - <unknown>
   7:     0x7fd3500556f8 - <unknown>
   8:     0x7fd35006f83b - <unknown>
   9:     0x7fd35011c903 - <unknown>
  10:     0x7fd350116553 - <unknown>
  11:     0x7fd35011135b - rustc_typeck::collect::collect_item_types::ha4bc6b2aaead1c12
  12:     0x7fd350133e29 - rustc_typeck::check_crate::h56444fcd0efce52e
  13:     0x7fd3520a4941 - <unknown>
  14:     0x7fd35207199e - <unknown>
  15:     0x7fd35206340a - rustc_driver::driver::compile_input::hc0edbed7edb3eb18
  16:     0x7fd352090d41 - rustc_driver::run_compiler::h22d678d32fb7c300
  17:     0x7fd351fca763 - <unknown>
  18:     0x7fd351cff326 - __rust_maybe_catch_panic
  19:     0x7fd351fe97b9 - <unknown>
  20:     0x7fd351cf32d0 - <unknown>
  21:     0x7fd349f36493 - <unknown>
  22:     0x7fd3519c391c - __clone
  23:                0x0 - <unknown>
@TimNN
Copy link
Contributor

TimNN commented Sep 24, 2016

Duplicate of #36638 and should be fixed in the next nightly (by #36649).

@Aatch
Copy link
Contributor

Aatch commented Sep 24, 2016

Closing as duplicate

@Aatch Aatch closed this as completed Sep 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants