-
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.
iat selection: erase regions in self type
- Loading branch information
Showing
5 changed files
with
101 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#![feature(inherent_associated_types, non_lifetime_binders, type_alias_impl_trait)] | ||
#![allow(incomplete_features)] | ||
|
||
struct Lexer<T>(T); | ||
|
||
impl Lexer<i32> { | ||
type Cursor = (); | ||
} | ||
|
||
type X = impl for<T> Fn() -> Lexer<T>::Cursor; //~ ERROR associated type `Cursor` not found for `Lexer<T>` in the current 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,15 @@ | ||
error[E0220]: associated type `Cursor` not found for `Lexer<T>` in the current scope | ||
--> $DIR/issue-109299-1.rs:10:40 | ||
| | ||
LL | struct Lexer<T>(T); | ||
| --------------- associated item `Cursor` not found for this struct | ||
... | ||
LL | type X = impl for<T> Fn() -> Lexer<T>::Cursor; | ||
| ^^^^^^ associated item not found in `Lexer<T>` | ||
| | ||
= note: the associated type was found for | ||
- `Lexer<i32>` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0220`. |
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 @@ | ||
#![feature(inherent_associated_types)] | ||
#![allow(incomplete_features)] | ||
|
||
struct Lexer<'d>(&'d ()); | ||
|
||
impl Lexer<'d> { //~ ERROR use of undeclared lifetime name `'d` | ||
type Cursor = (); | ||
} | ||
|
||
fn test(_: Lexer::Cursor) {} | ||
|
||
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,11 @@ | ||
error[E0261]: use of undeclared lifetime name `'d` | ||
--> $DIR/issue-109299.rs:6:12 | ||
| | ||
LL | impl Lexer<'d> { | ||
| - ^^ undeclared lifetime | ||
| | | ||
| help: consider introducing lifetime `'d` here: `<'d>` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0261`. |