-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure that the method resolution matches in note_source_of_type_m…
…ismatch_constraint
- Loading branch information
1 parent
aa31bad
commit 483f13c
Showing
4 changed files
with
46 additions
and
35 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 was deleted.
Oops, something went wrong.
5 changes: 2 additions & 3 deletions
5
tests/crashes/118185-2.rs → ...hod-lookup-returns-sig-with-fewer-args.rs
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
tests/ui/mismatched_types/diagnostic-method-lookup-returns-sig-with-fewer-args.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[E0308]: mismatched types | ||
--> $DIR/diagnostic-method-lookup-returns-sig-with-fewer-args.rs:4:16 | ||
| | ||
LL | target.get(10.0); // (used to crash here) | ||
| --- ^^^^ expected `i32`, found floating-point number | ||
| | | ||
| arguments to this method are incorrect | ||
| | ||
note: method defined here | ||
--> $DIR/diagnostic-method-lookup-returns-sig-with-fewer-args.rs:22:12 | ||
| | ||
LL | pub fn get(&self, data: i32) { | ||
| ^^^ --------- | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |