-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add projection obligations when comparing impl too
- Loading branch information
Showing
2 changed files
with
40 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
32 changes: 32 additions & 0 deletions
32
tests/ui/implied-bounds/implied_bounds_entailment_alias_var.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,32 @@ | ||
// check-pass | ||
|
||
trait Data { | ||
type Elem; | ||
} | ||
|
||
impl<F, S: Data<Elem = F>> Data for ArrayBase<S> { | ||
type Elem = F; | ||
} | ||
|
||
struct DatasetIter<'a, R: Data> { | ||
data: &'a R::Elem, | ||
} | ||
|
||
pub struct ArrayBase<S> { | ||
data: S, | ||
} | ||
|
||
trait Trait { | ||
type Item; | ||
fn next() -> Option<Self::Item>; | ||
} | ||
|
||
impl<'a, D: Data> Trait for DatasetIter<'a, ArrayBase<D>> { | ||
type Item = (); | ||
|
||
fn next() -> Option<Self::Item> { | ||
None | ||
} | ||
} | ||
|
||
fn main() {} |