-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 #100688 - compiler-errors:issue-100684, r=wesleywiser
`ty::Error` does not match other types for region constraints Fixes #100684
- Loading branch information
Showing
3 changed files
with
36 additions
and
1 deletion.
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,16 @@ | ||
trait HandlerFamily { | ||
type Target; | ||
} | ||
|
||
struct HandlerWrapper<H: HandlerFamily>(H); | ||
|
||
impl<H: HandlerFamily> HandlerWrapper<H> { | ||
pub fn set_handler(&self, handler: &H::Target) | ||
where | ||
T: Send + Sync + 'static, | ||
//~^ ERROR cannot find type `T` 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,12 @@ | ||
error[E0412]: cannot find type `T` in this scope | ||
--> $DIR/outlives-with-missing.rs:10:9 | ||
| | ||
LL | impl<H: HandlerFamily> HandlerWrapper<H> { | ||
| - similarly named type parameter `H` defined here | ||
... | ||
LL | T: Send + Sync + 'static, | ||
| ^ help: a type parameter with a similar name exists: `H` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0412`. |