-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Display name of crate requiring rustc_private in error messages. #62819
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
Changes from 6 commits
bf7b981
f3a3141
91f0d58
d6a7017
9822496
f061267
6a26b80
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,5 @@ use rustc_macros::HashStable; | |
|
||
#[derive(HashStable)] | ||
//~^ use of unstable library feature 'rustc_private' | ||
//~| use of unstable library feature 'rustc_private' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is there a reason for this duplicate line? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Those directives match the start of an error message. Both error messages start the same, but then contain a different crate being loaded from the sysroot: |
||
struct Test; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
fn main() { | ||
extern crate libc; //~ ERROR use of unstable | ||
use libc::*; //~ ERROR unresolved import | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
error[E0432]: unresolved import `libc` | ||
--> $DIR/feature-gate-rustc_private-libc.rs:3:9 | ||
| | ||
LL | use libc::*; | ||
| ^^^^ maybe a missing `extern crate libc;`? | ||
|
||
error[E0658]: use of unstable library feature 'rustc_private': crate "libc" is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? | ||
--> $DIR/feature-gate-rustc_private-libc.rs:2:5 | ||
| | ||
LL | extern crate libc; | ||
| ^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: for more information, see https://github.com/rust-lang/rust/issues/27812 | ||
= help: add `#![feature(rustc_private)]` to the crate attributes to enable | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0432, E0658. | ||
For more information about an error, try `rustc --explain E0432`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
fn main() { | ||
extern crate test; //~ ERROR use of unstable | ||
use test::*; //~ ERROR unresolved import | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
error[E0432]: unresolved import `test` | ||
--> $DIR/feature-gate-test.rs:3:9 | ||
| | ||
LL | use test::*; | ||
| ^^^^ maybe a missing `extern crate test;`? | ||
|
||
error[E0658]: use of unstable library feature 'test' | ||
--> $DIR/feature-gate-test.rs:2:5 | ||
| | ||
LL | extern crate test; | ||
| ^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: for more information, see https://github.com/rust-lang/rust/issues/27812 | ||
= help: add `#![feature(test)]` to the crate attributes to enable | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0432, E0658. | ||
For more information about an error, try `rustc --explain E0432`. |
Uh oh!
There was an error while loading. Please reload this page.