Skip to content

Commit 5457140

Browse files
Bump IMPLIED_BOUNDS_ENTAILMENT to Deny + ReportNow
1 parent 1bc3683 commit 5457140

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

compiler/rustc_lint_defs/src/builtin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4033,10 +4033,10 @@ declare_lint! {
40334033
///
40344034
/// This can be used to implement an unsound API if used incorrectly.
40354035
pub IMPLIED_BOUNDS_ENTAILMENT,
4036-
Warn,
4036+
Deny,
40374037
"impl method assumes more implied bounds than its corresponding trait method",
40384038
@future_incompatible = FutureIncompatibleInfo {
40394039
reference: "issue #105572 <https://github.com/rust-lang/rust/issues/105572>",
4040-
reason: FutureIncompatibilityReason::FutureReleaseError,
4040+
reason: FutureIncompatibilityReason::FutureReleaseErrorReportNow,
40414041
};
40424042
}

tests/ui/implied-bounds/impl-implied-bounds-compatibility-unnormalized.stderr

+15
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,18 @@ LL | #![deny(implied_bounds_entailment)]
1414

1515
error: aborting due to previous error
1616

17+
Future incompatibility report: Future breakage diagnostic:
18+
error: impl method assumes more implied bounds than the corresponding trait method
19+
--> $DIR/impl-implied-bounds-compatibility-unnormalized.rs:13:5
20+
|
21+
LL | fn get<'s>(s: &'s str, _: <&'static &'s () as Project>::Ty) -> &'static str {
22+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23+
|
24+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
25+
= note: for more information, see issue #105572 <https://github.com/rust-lang/rust/issues/105572>
26+
note: the lint level is defined here
27+
--> $DIR/impl-implied-bounds-compatibility-unnormalized.rs:1:9
28+
|
29+
LL | #![deny(implied_bounds_entailment)]
30+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
31+

tests/ui/implied-bounds/impl-implied-bounds-compatibility.stderr

+15
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,18 @@ LL | #![deny(implied_bounds_entailment)]
1414

1515
error: aborting due to previous error
1616

17+
Future incompatibility report: Future breakage diagnostic:
18+
error: impl method assumes more implied bounds than the corresponding trait method
19+
--> $DIR/impl-implied-bounds-compatibility.rs:14:5
20+
|
21+
LL | fn listeners<'b>(&'b self) -> &'a MessageListeners<'b> {
22+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23+
|
24+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
25+
= note: for more information, see issue #105572 <https://github.com/rust-lang/rust/issues/105572>
26+
note: the lint level is defined here
27+
--> $DIR/impl-implied-bounds-compatibility.rs:1:9
28+
|
29+
LL | #![deny(implied_bounds_entailment)]
30+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
31+

0 commit comments

Comments
 (0)