Skip to content

Commit 0871175

Browse files
committed
make pub_use_of_private_extern_crate show up in future breakage reports
1 parent b286722 commit 0871175

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

compiler/rustc_lint_defs/src/builtin.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1203,16 +1203,16 @@ declare_lint! {
12031203
/// This was historically allowed, but is not the intended behavior
12041204
/// according to the visibility rules. This is a [future-incompatible]
12051205
/// lint to transition this to a hard error in the future. See [issue
1206-
/// #34537] for more details.
1206+
/// #127909] for more details.
12071207
///
1208-
/// [issue #34537]: https://github.com/rust-lang/rust/issues/34537
1208+
/// [issue #127909]: https://github.com/rust-lang/rust/issues/127909
12091209
/// [future-incompatible]: ../index.md#future-incompatible-lints
12101210
pub PUB_USE_OF_PRIVATE_EXTERN_CRATE,
12111211
Deny,
12121212
"detect public re-exports of private extern crates",
12131213
@future_incompatible = FutureIncompatibleInfo {
1214-
reason: FutureIncompatibilityReason::FutureReleaseErrorDontReportInDeps,
1215-
reference: "issue #34537 <https://github.com/rust-lang/rust/issues/34537>",
1214+
reason: FutureIncompatibilityReason::FutureReleaseErrorReportInDeps,
1215+
reference: "issue #127909 <https://github.com/rust-lang/rust/issues/127909>",
12161216
};
12171217
}
12181218

tests/ui/pub/pub-reexport-priv-extern-crate.stderr

+16-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ LL | pub use core as reexported_core;
2929
| ^^^^^^^^^^^^^^^^^^^^^^^
3030
|
3131
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
32-
= note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
32+
= note: for more information, see issue #127909 <https://github.com/rust-lang/rust/issues/127909>
3333
= note: `#[deny(pub_use_of_private_extern_crate)]` on by default
3434
help: consider making the `extern crate` item publicly accessible
3535
|
@@ -40,3 +40,18 @@ error: aborting due to 3 previous errors
4040

4141
Some errors have detailed explanations: E0365, E0603.
4242
For more information about an error, try `rustc --explain E0365`.
43+
Future incompatibility report: Future breakage diagnostic:
44+
error[E0365]: extern crate `core` is private and cannot be re-exported
45+
--> $DIR/pub-reexport-priv-extern-crate.rs:2:9
46+
|
47+
LL | pub use core as reexported_core;
48+
| ^^^^^^^^^^^^^^^^^^^^^^^
49+
|
50+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
51+
= note: for more information, see issue #127909 <https://github.com/rust-lang/rust/issues/127909>
52+
= note: `#[deny(pub_use_of_private_extern_crate)]` on by default
53+
help: consider making the `extern crate` item publicly accessible
54+
|
55+
LL | pub extern crate core;
56+
| +++
57+

0 commit comments

Comments
 (0)