Skip to content

Commit

Permalink
make pub_use_of_private_extern_crate show up in future breakage reports
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jul 18, 2024
1 parent b286722 commit d40f8de
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ declare_lint! {
Deny,
"detect public re-exports of private extern crates",
@future_incompatible = FutureIncompatibleInfo {
reason: FutureIncompatibilityReason::FutureReleaseErrorDontReportInDeps,
reason: FutureIncompatibilityReason::FutureReleaseErrorReportInDeps,
reference: "issue #34537 <https://github.com/rust-lang/rust/issues/34537>",
};
}
Expand Down
15 changes: 15 additions & 0 deletions tests/ui/pub/pub-reexport-priv-extern-crate.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,18 @@ error: aborting due to 3 previous errors

Some errors have detailed explanations: E0365, E0603.
For more information about an error, try `rustc --explain E0365`.
Future incompatibility report: Future breakage diagnostic:
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;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= 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;
| +++

0 comments on commit d40f8de

Please sign in to comment.