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

internal compiler error: no def for path when using associated consts #27078

Closed
retep998 opened this issue Jul 17, 2015 · 2 comments
Closed

internal compiler error: no def for path when using associated consts #27078

retep998 opened this issue Jul 17, 2015 · 2 comments
Labels
A-associated-items Area: Associated items (types, constants & functions) A-const-fn Area: const fn foo(..) {..}. Pure functions which can be applied at compile time. C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@retep998
Copy link
Member

#![feature(associated_consts)]
trait Foo { const BAR: i32; fn foo(self) -> &'static i32 { &<Self>::BAR }}
fn main() {}
<anon>:3:61: 3:72 error: internal compiler error: no def for path 17
<anon>:3 trait Foo { const BAR: i32; fn foo(self) -> &'static i32 { &<Self>::BAR }}
                                                                     ^~~~~~~~~~~
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/libsyntax/diagnostic.rs:176
@eddyb eddyb added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jul 17, 2015
@retep998 retep998 changed the title internal compiler error: no def for path internal compiler error: no def for path when using associated consts Jul 17, 2015
@nagisa nagisa added the A-associated-items Area: Associated items (types, constants & functions) label May 16, 2016
@michaelwu
Copy link
Contributor

I don't see a panic now. There is a borrow checker error in its place now.

@Mark-Simulacrum
Copy link
Member

E-needstest, [still] fixed today.

@Mark-Simulacrum Mark-Simulacrum added E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. A-const-fn Area: const fn foo(..) {..}. Pure functions which can be applied at compile time. labels May 20, 2017
@Mark-Simulacrum Mark-Simulacrum added C-bug Category: This is a bug. and removed C-bug Category: This is a bug. labels Jul 22, 2017
topecongiro added a commit to topecongiro/rust that referenced this issue Dec 26, 2017
bors added a commit that referenced this issue Dec 27, 2017
Add tests to fixed ICEs

Closes #27078. Closes #27985. Closes #39848. Closes #42164.
Closes #42479. Closes #45662. Closes #45965. Closes #46152.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-associated-items Area: Associated items (types, constants & functions) A-const-fn Area: const fn foo(..) {..}. Pure functions which can be applied at compile time. C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

5 participants