forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#135841 - oli-obk:push-qxlnokwrkkym, r=compi…
…ler-errors Reject `?Trait` bounds in various places where we unconditionally warned since 1.0 fixes rust-lang#135730 fixes rust-lang#135809 Also a breaking change, so let's see what crater says. This has been an unconditional warning since *before* 1.0
- Loading branch information
Showing
21 changed files
with
87 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
tests/ui/diagnostic-flags/allow-non-lint-warnings.without_flag.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default | ||
--> $DIR/allow-non-lint-warnings.rs:26:13 | ||
warning: unexpected annotation used with `#[rustc_error(...)]`! | ||
--> $DIR/allow-non-lint-warnings.rs:25:1 | ||
| | ||
LL | pub fn f<T: ?Trait>() {} | ||
| ^^^^^^ | ||
LL | fn main() {} | ||
| ^^^^^^^^^ | ||
|
||
warning: 1 warning emitted | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//! Regression test for ICE https://github.com/rust-lang/rust/issues/135730 | ||
//! This used | ||
use std::future::Future; | ||
fn foo() -> impl ?Future<Output = impl Send> { | ||
//~^ ERROR: relaxing a default bound only does something for `?Sized` | ||
//~| ERROR: relaxing a default bound only does something for `?Sized` | ||
() | ||
} | ||
|
||
pub fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
error: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default | ||
--> $DIR/opt-out-bound-not-satisfied.rs:5:18 | ||
| | ||
LL | fn foo() -> impl ?Future<Output = impl Send> { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default | ||
--> $DIR/opt-out-bound-not-satisfied.rs:5:18 | ||
| | ||
LL | fn foo() -> impl ?Future<Output = impl Send> { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
|
||
error: aborting due to 2 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
struct Foo<T: ?Hash> {} | ||
//~^ ERROR expected trait, found derive macro `Hash` | ||
//~| WARN relaxing a default bound only does something for `?Sized` | ||
//~| ERROR relaxing a default bound only does something for `?Sized` | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default | ||
--> $DIR/maybe-polarity-pass.rs:14:20 | ||
error: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default | ||
--> $DIR/maybe-polarity-pass.rs:12:20 | ||
| | ||
LL | fn bar<T: ?Sized + ?Trait2 + ?Trait1 + ?Trait4>(_: &T) {} | ||
| ^^^^^^^ | ||
|
||
warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default | ||
--> $DIR/maybe-polarity-pass.rs:14:30 | ||
error: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default | ||
--> $DIR/maybe-polarity-pass.rs:12:30 | ||
| | ||
LL | fn bar<T: ?Sized + ?Trait2 + ?Trait1 + ?Trait4>(_: &T) {} | ||
| ^^^^^^^ | ||
|
||
warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default | ||
--> $DIR/maybe-polarity-pass.rs:14:40 | ||
error: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default | ||
--> $DIR/maybe-polarity-pass.rs:12:40 | ||
| | ||
LL | fn bar<T: ?Sized + ?Trait2 + ?Trait1 + ?Trait4>(_: &T) {} | ||
| ^^^^^^^ | ||
|
||
warning: 3 warnings emitted | ||
error: aborting due to 3 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters