forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
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
ba64ba8
commit cfa6a93
Showing
3 changed files
with
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use std::fmt::Display; | ||
|
||
fn foo(x: &(dyn Display + Send)) {} | ||
|
||
fn main() { | ||
foo(); | ||
//~^ ERROR this function takes 1 argument but 0 arguments were supplied | ||
} |
19 changes: 19 additions & 0 deletions
19
src/test/ui/argument-suggestions/display-is-suggestable.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[E0061]: this function takes 1 argument but 0 arguments were supplied | ||
--> $DIR/display-is-suggestable.rs:6:5 | ||
| | ||
LL | foo(); | ||
| ^^^-- an argument of type `&dyn std::fmt::Display + Send` is missing | ||
| | ||
note: function defined here | ||
--> $DIR/display-is-suggestable.rs:3:4 | ||
| | ||
LL | fn foo(x: &(dyn Display + Send)) {} | ||
| ^^^ ------------------------ | ||
help: provide the argument | ||
| | ||
LL | foo(/* &dyn std::fmt::Display + Send */); | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0061`. |