forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
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#112322 - compiler-errors:no-IMPLIED_BOUNDS_…
…ENTAILMENT-if-errs, r=eholk Don't mention `IMPLIED_BOUNDS_ENTAILMENT` if signatures reference error Fixes rust-lang#112321
- Loading branch information
Showing
3 changed files
with
32 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,22 @@ | ||
trait Identity { | ||
type Identity; | ||
} | ||
impl<T> Identity for T { | ||
type Identity = T; | ||
} | ||
|
||
trait Trait { | ||
type Assoc: Identity; | ||
fn tokenize(&self) -> <Self::Assoc as Identity>::Identity; | ||
} | ||
|
||
impl Trait for () { | ||
type Assoc = DoesNotExist; | ||
//~^ ERROR cannot find type `DoesNotExist` in this scope | ||
|
||
fn tokenize(&self) -> <Self::Assoc as Identity>::Identity { | ||
unimplemented!() | ||
} | ||
} | ||
|
||
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 `DoesNotExist` in this scope | ||
--> $DIR/references-err.rs:14:18 | ||
| | ||
LL | type Assoc = DoesNotExist; | ||
| ^^^^^^^^^^^^ not found in this scope | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0412`. |