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.
Don't Create
ParamCandidate
When Obligation Contains Errors
Fixes rust-lang#121941
- Loading branch information
1 parent
4a0cc88
commit 96b8225
Showing
3 changed files
with
21 additions
and
0 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
5 changes: 5 additions & 0 deletions
5
tests/ui/traits/dont-match-error-ty-with-calller-supplied-obligation-issue-121941.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
fn function<T: PartialEq>() { | ||
foo == 2; //~ ERROR cannot find value `foo` in this scope [E0425] | ||
} | ||
|
||
fn main() {} |
9 changes: 9 additions & 0 deletions
9
tests/ui/traits/dont-match-error-ty-with-calller-supplied-obligation-issue-121941.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,9 @@ | ||
error[E0425]: cannot find value `foo` in this scope | ||
--> $DIR/dont-match-error-ty-with-calller-supplied-obligation-issue-121941.rs:2:5 | ||
| | ||
LL | foo == 2; | ||
| ^^^ not found in this scope | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0425`. |