mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
40d5609548
This makes `Bind` almost always be empty, so we can start forwarding it to queries, allowing us to remove `Bubble` entirely
27 lines
461 B
Rust
27 lines
461 B
Rust
//! Test that we don't follow through projections to find
|
|
//! opaque types.
|
|
|
|
#![feature(type_alias_impl_trait)]
|
|
#![allow(private_interfaces)]
|
|
|
|
pub type Successors<'a> = impl Iterator<Item = &'a ()>;
|
|
|
|
pub fn f<'a>() -> Successors<'a> {
|
|
None.into_iter()
|
|
}
|
|
|
|
trait Tr {
|
|
type Item;
|
|
}
|
|
|
|
impl<'a> Tr for &'a () {
|
|
type Item = Successors<'a>;
|
|
}
|
|
|
|
pub fn ohno<'a>() -> <&'a () as Tr>::Item {
|
|
None.into_iter()
|
|
//~^ ERROR mismatched types
|
|
}
|
|
|
|
fn main() {}
|