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

rustc crash when trying to reference static export from another crate #24843

Closed
ghost opened this issue Apr 26, 2015 · 4 comments · Fixed by #71182
Closed

rustc crash when trying to reference static export from another crate #24843

ghost opened this issue Apr 26, 2015 · 4 comments · Fixed by #71182
Labels
C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. 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) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@ghost
Copy link

ghost commented Apr 26, 2015

https://gist.github.com/Eljay/24d13b4a27c4f6735b05

rustc just crashes with no useful errors. I guess you're not supposed to be able to do this anyway and it works if either are const instead of static but it shouldn't crash.

Tested with latest nightly and 1.0.0-beta.2 on windows 64-bit.

@jdm jdm added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Apr 26, 2015
@thomas-huet
Copy link

No longer crashes:

error[E0394]: cannot refer to other statics by value, use the address-of operator or a constant instead
 --> src/main.rs:3:35
  |
3 | static TEST_STR_2: &'static str = &test::TEST_STR;
  |                                   ^^^^^^^^^^^^^^^ referring to another static by value
  |
  = note: use the address-of operator or a constant instead

@Mark-Simulacrum
Copy link
Member

E-needstest.

@Mark-Simulacrum Mark-Simulacrum added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label May 18, 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
@steveklabnik
Copy link
Member

Triage: not aware of any tests being added.

@Centril Centril added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 25, 2019
@mbrobbel
Copy link

It seems that the E0394 error was removed in #51110 and the tests were moved from compile-fail and ui/error-codes to run-pass.

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Apr 16, 2020
…Simulacrum

Add some regression tests

Closes rust-lang#24843
Closes rust-lang#28575
Closes rust-lang#54067
Closes rust-lang#67893
Closes rust-lang#68813

I'm not sure who's the best person to ask to review since Centril is taking a break now.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Apr 16, 2020
…Simulacrum

Add some regression tests

Closes rust-lang#24843
Closes rust-lang#28575
Closes rust-lang#54067
Closes rust-lang#67893
Closes rust-lang#68813

I'm not sure who's the best person to ask to review since Centril is taking a break now.
@bors bors closed this as completed in b347097 Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. 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) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants