-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not consider associated type bounds for super_predicates_that_defi…
…ne_assoc_type
- Loading branch information
1 parent
0bcfff4
commit 8ea71f2
Showing
5 changed files
with
94 additions
and
16 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
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,26 @@ | ||
// check-pass | ||
|
||
// Make sure that we don't look into associated type bounds when looking for | ||
// supertraits that define an associated type. Fixes #76593. | ||
|
||
#![feature(associated_type_bounds)] | ||
|
||
trait Load: Sized { | ||
type Blob; | ||
} | ||
|
||
trait Primitive: Load<Blob = Self> {} | ||
|
||
trait BlobPtr: Primitive {} | ||
|
||
trait CleanPtr: Load<Blob: BlobPtr> { | ||
fn to_blob(&self) -> Self::Blob; | ||
} | ||
|
||
impl Load for () { | ||
type Blob = Self; | ||
} | ||
impl Primitive for () {} | ||
impl BlobPtr for () {} | ||
|
||
fn main() {} |