File tree Expand file tree Collapse file tree 3 files changed +42
-1
lines changed
compiler/rustc_errors/src Expand file tree Collapse file tree 3 files changed +42
-1
lines changed Original file line number Diff line number Diff line change @@ -1529,7 +1529,7 @@ impl DiagCtxtInner {
15291529 // Future breakages aren't emitted if they're `Level::Allow` or
15301530 // `Level::Expect`, but they still need to be constructed and
15311531 // stashed below, so they'll trigger the must_produce_diag check.
1532- assert_matches ! ( diagnostic. level, Error | Warning | Allow | Expect ) ;
1532+ assert_matches ! ( diagnostic. level, Error | ForceWarning | Warning | Allow | Expect ) ;
15331533 self . future_breakage_diagnostics . push ( diagnostic. clone ( ) ) ;
15341534 }
15351535
Original file line number Diff line number Diff line change 1+ //@ compile-flags: --force-warn pub_use_of_private_extern_crate
2+ //@ check-pass
3+
4+ extern crate core;
5+ pub use core as reexported_core;
6+ //~^ warning: extern crate `core` is private
7+ //~| warning: this was previously accepted by the compiler
8+
9+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ warning[E0365]: extern crate `core` is private and cannot be re-exported
2+ --> $DIR/ice-free.rs:5:9
3+ |
4+ LL | pub use core as reexported_core;
5+ | ^^^^^^^^^^^^^^^^^^^^^^^
6+ |
7+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8+ = note: for more information, see issue #127909 <https://github.com/rust-lang/rust/issues/127909>
9+ = note: requested on the command line with `--force-warn pub-use-of-private-extern-crate`
10+ help: consider making the `extern crate` item publicly accessible
11+ |
12+ LL | pub extern crate core;
13+ | +++
14+
15+ warning: 1 warning emitted
16+
17+ For more information about this error, try `rustc --explain E0365`.
18+ Future incompatibility report: Future breakage diagnostic:
19+ warning[E0365]: extern crate `core` is private and cannot be re-exported
20+ --> $DIR/ice-free.rs:5:9
21+ |
22+ LL | pub use core as reexported_core;
23+ | ^^^^^^^^^^^^^^^^^^^^^^^
24+ |
25+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
26+ = note: for more information, see issue #127909 <https://github.com/rust-lang/rust/issues/127909>
27+ = note: requested on the command line with `--force-warn pub-use-of-private-extern-crate`
28+ help: consider making the `extern crate` item publicly accessible
29+ |
30+ LL | pub extern crate core;
31+ | +++
32+
You can’t perform that action at this time.
0 commit comments