-
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.
Auto merge of #64108 - estebank:issue-36836, r=Centril
Do not complain about unconstrained params when Self is Ty Error Fix #36836.
- Loading branch information
Showing
4 changed files
with
42 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Previously, in addition to the real cause of the problem as seen below, | ||
// the compiler would tell the user: | ||
// | ||
// ``` | ||
// error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or | ||
// predicates | ||
// ``` | ||
// | ||
// With this test, we check that only the relevant error is emitted. | ||
|
||
trait Foo {} | ||
|
||
impl<T> Foo for Bar<T> {} //~ ERROR cannot find type `Bar` in this scope | ||
|
||
fn main() {} |
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,9 @@ | ||
error[E0412]: cannot find type `Bar` in this scope | ||
--> $DIR/issue-36836.rs:13:17 | ||
| | ||
LL | impl<T> Foo for Bar<T> {} | ||
| ^^^ not found in this scope | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0412`. |