Skip to content

Commit

Permalink
Bump future release warning mode
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Nov 20, 2023
1 parent 63b34cf commit e6ca8e1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_lint/src/deref_into_dyn_supertrait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ declare_lint! {
Warn,
"`Deref` implementation usage with a supertrait trait object for output might be shadowed in the future",
@future_incompatible = FutureIncompatibleInfo {
reason: FutureIncompatibilityReason::FutureReleaseErrorDontReportInDeps,
reason: FutureIncompatibilityReason::FutureReleaseSemanticsChange,
reference: "issue #89460 <https://github.com/rust-lang/rust/issues/89460>",
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ trait Foo<'a>: Bar<'a> {}

impl<'a> Deref for dyn Foo<'a> {
//~^ ERROR dyn Foo<'_>` implements `Deref` with supertrait `Bar<'_>` as target
//~| WARN this was previously accepted by the compiler
//~| WARN this will change its meaning in a future release!
type Target = dyn Bar<'a>;

fn deref(&self) -> &Self::Target {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LL | impl<'a> Deref for dyn Foo<'a> {
LL | type Target = dyn Bar<'a>;
| -------------------------- target type is set here
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= warning: this will change its meaning in a future release!
= note: for more information, see issue #89460 <https://github.com/rust-lang/rust/issues/89460>
note: the lint level is defined here
--> $DIR/migrate-lint-deny-regions.rs:1:9
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/traits/trait-upcasting/migrate-lint-deny.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ trait B: A {}

impl<'a> Deref for dyn 'a + B {
//~^ ERROR `dyn B` implements `Deref` with supertrait `A` as target
//~| WARN this was previously accepted by the compiler but is being phased out;
//~| WARN this will change its meaning in a future release!

type Target = dyn A;
fn deref(&self) -> &Self::Target {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/traits/trait-upcasting/migrate-lint-deny.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LL | impl<'a> Deref for dyn 'a + B {
LL | type Target = dyn A;
| -------------------- target type is set here
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= warning: this will change its meaning in a future release!
= note: for more information, see issue #89460 <https://github.com/rust-lang/rust/issues/89460>
note: the lint level is defined here
--> $DIR/migrate-lint-deny.rs:1:9
Expand Down

0 comments on commit e6ca8e1

Please sign in to comment.