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.
Rollup merge of rust-lang#61438 - estebank:generics-span, r=varkor
Point at individual type args on arg count mismatch - Point at individual type arguments on arg count mismatch - Make generics always have a valid span, even when there are no args - Explain that `impl Trait` introduces an implicit type argument Fix rust-lang#55991.
- Loading branch information
Showing
10 changed files
with
120 additions
and
49 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
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,12 +1,23 @@ | ||
error[E0049]: method `foo` has 0 type parameters but its trait declaration has 1 type parameter | ||
--> $DIR/E0049.rs:8:5 | ||
--> $DIR/E0049.rs:8:11 | ||
| | ||
LL | fn foo<T: Default>(x: T) -> Self; | ||
| --------------------------------- expected 1 type parameter | ||
| - expected 1 type parameter | ||
... | ||
LL | fn foo(x: bool) -> Self { Bar } | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ found 0 type parameters | ||
| ^ found 0 type parameters | ||
|
||
error: aborting due to previous error | ||
error[E0049]: method `fuzz` has 0 type parameters but its trait declaration has 2 type parameters | ||
--> $DIR/E0049.rs:18:12 | ||
| | ||
LL | fn fuzz<A: Default, B>(x: A, y: B) -> Self; | ||
| - - | ||
| | | ||
| expected 2 type parameters | ||
... | ||
LL | fn fuzz(x: bool, y: bool) -> Self { Baz } | ||
| ^ found 0 type parameters | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0049`. |
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
9 changes: 6 additions & 3 deletions
9
src/test/ui/issues/type-arg-mismatch-due-to-impl-trait.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