forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
078e3fd
commit c4c5fc8
Showing
11 changed files
with
95 additions
and
23 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/test/ui/coercion/coerce-issue-49593-box-never.nofallback.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
error[E0277]: the trait bound `(): std::error::Error` is not satisfied | ||
--> $DIR/coerce-issue-49593-box-never.rs:17:53 | ||
| | ||
LL | /* *mut $0 is coerced to Box<dyn Error> here */ Box::<_ /* ! */>::new(x) | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::error::Error` is not implemented for `()` | ||
| | ||
= note: required for the cast to the object type `dyn std::error::Error` | ||
|
||
error[E0277]: the trait bound `(): std::error::Error` is not satisfied | ||
--> $DIR/coerce-issue-49593-box-never.rs:22:49 | ||
| | ||
LL | /* *mut $0 is coerced to *mut Error here */ raw_ptr_box::<_ /* ! */>(x) | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::error::Error` is not implemented for `()` | ||
| | ||
= note: required for the cast to the object type `(dyn std::error::Error + 'static)` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
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
17 changes: 17 additions & 0 deletions
17
src/test/ui/never_type/fallback-closure-wrap.fallback.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
error[E0271]: type mismatch resolving `<[closure@$DIR/fallback-closure-wrap.rs:18:40: 21:6] as FnOnce<()>>::Output == ()` | ||
--> $DIR/fallback-closure-wrap.rs:18:31 | ||
| | ||
LL | let error = Closure::wrap(Box::new(move || { | ||
| _______________________________^ | ||
LL | | | ||
LL | | panic!("Can't connect to server."); | ||
LL | | }) as Box<dyn FnMut()>); | ||
| |______^ expected `()`, found `!` | ||
| | ||
= note: expected unit type `()` | ||
found type `!` | ||
= note: required for the cast to the object type `dyn FnMut()` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0271`. |
17 changes: 17 additions & 0 deletions
17
src/test/ui/never_type/never-value-fallback-issue-66757.nofallback.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
error[E0277]: the trait bound `E: From<()>` is not satisfied | ||
--> $DIR/never-value-fallback-issue-66757.rs:27:5 | ||
| | ||
LL | <E as From<_>>::from(never); | ||
| ^^^^^^^^^^^^^^^^^^^^ the trait `From<()>` is not implemented for `E` | ||
| | ||
= help: the following implementations were found: | ||
<E as From<!>> | ||
note: required by `from` | ||
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL | ||
| | ||
LL | fn from(_: T) -> Self; | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
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