diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2024-06-03 07:17:19 +0200 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2024-06-03 07:25:32 +0200 |
| commit | b2949ff9118715ce26af3c0b023921ca855ca772 (patch) | |
| tree | 51993910ecab4d65a9f052785d8c1942afbcb872 /tests/ui/pub | |
| parent | 9f2d0b3490729ed65da73f64b28d8d1f197af113 (diff) | |
| download | rust-b2949ff9118715ce26af3c0b023921ca855ca772.tar.gz rust-b2949ff9118715ce26af3c0b023921ca855ca772.zip | |
Spruce up the diagnostics of some early lints
Diffstat (limited to 'tests/ui/pub')
| -rw-r--r-- | tests/ui/pub/pub-reexport-priv-extern-crate.rs | 2 | ||||
| -rw-r--r-- | tests/ui/pub/pub-reexport-priv-extern-crate.stderr | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/ui/pub/pub-reexport-priv-extern-crate.rs b/tests/ui/pub/pub-reexport-priv-extern-crate.rs index dd5cd420fa5..fb495be4001 100644 --- a/tests/ui/pub/pub-reexport-priv-extern-crate.rs +++ b/tests/ui/pub/pub-reexport-priv-extern-crate.rs @@ -1,5 +1,5 @@ extern crate core; -pub use core as reexported_core; //~ ERROR `core` is private, and cannot be re-exported +pub use core as reexported_core; //~ ERROR `core` is private and cannot be re-exported //~^ WARN this was previously accepted mod foo1 { diff --git a/tests/ui/pub/pub-reexport-priv-extern-crate.stderr b/tests/ui/pub/pub-reexport-priv-extern-crate.stderr index 3fa5b0f9aef..915d07fd08a 100644 --- a/tests/ui/pub/pub-reexport-priv-extern-crate.stderr +++ b/tests/ui/pub/pub-reexport-priv-extern-crate.stderr @@ -22,7 +22,7 @@ note: the crate import `core` is defined here LL | extern crate core; | ^^^^^^^^^^^^^^^^^^ -error[E0365]: extern crate `core` is private, and cannot be re-exported, consider declaring with `pub` +error[E0365]: extern crate `core` is private and cannot be re-exported --> $DIR/pub-reexport-priv-extern-crate.rs:2:9 | LL | pub use core as reexported_core; @@ -31,6 +31,10 @@ LL | pub use core as reexported_core; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537> = note: `#[deny(pub_use_of_private_extern_crate)]` on by default +help: consider making the `extern crate` item publicly accessible + | +LL | pub extern crate core; + | +++ error: aborting due to 3 previous errors |
