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.
Don't cancel stashed
TraitMissingMethod
errors.
This gives one extra error message on two tests, but is necessary to fix bigger problems caused by the cancellation of stashed errors. (Note: why not just avoid stashing altogether? Because that resulted in additional output changes.)
- Loading branch information
1 parent
f9c1ceb
commit 99a4015
Showing
5 changed files
with
38 additions
and
13 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
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,5 +1,7 @@ | ||
//@ edition: 2021 | ||
|
||
fn main() { | ||
std::any::Any::create(); //~ ERROR | ||
std::any::Any::create(); | ||
//~^ ERROR trait objects must include the `dyn` keyword | ||
//~| ERROR no function or associated item named `create` found for trait `Any` | ||
} |
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,9 +1,21 @@ | ||
error[E0782]: trait objects must include the `dyn` keyword | ||
--> $DIR/issue-111727.rs:4:5 | ||
| | ||
LL | std::any::Any::create(); | ||
| ^^^^^^^^^^^^^ | ||
| | ||
help: add `dyn` keyword before this trait | ||
| | ||
LL | <dyn std::any::Any>::create(); | ||
| ++++ + | ||
|
||
error[E0599]: no function or associated item named `create` found for trait `Any` | ||
--> $DIR/issue-111727.rs:4:20 | ||
| | ||
LL | std::any::Any::create(); | ||
| ^^^^^^ function or associated item not found in `Any` | ||
|
||
error: aborting due to 1 previous error | ||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0599`. | ||
Some errors have detailed explanations: E0599, E0782. | ||
For more information about an error, try `rustc --explain E0599`. |