blob: 98c9615035af86fabdb3ec985c718201ffc67a6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// Crate that exports an opaque `impl Trait` type. Used for testing cross-crate.
#![crate_type = "rlib"]
#![feature(impl_trait_in_assoc_type)]
pub trait View {
type Tmp: Iterator<Item = u32>;
fn test(&self) -> Self::Tmp;
}
pub struct X;
impl View for X {
type Tmp = impl Iterator<Item = u32>;
fn test(&self) -> Self::Tmp {
vec![1, 2, 3].into_iter()
}
}
|