mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
21 lines
395 B
Rust
21 lines
395 B
Rust
// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
|
|
// revisions: current next
|
|
|
|
#![feature(return_position_impl_trait_in_trait)]
|
|
#![allow(incomplete_features)]
|
|
|
|
struct Wrapper<T>(T);
|
|
|
|
trait Foo {
|
|
fn bar() -> Wrapper<impl Sized>;
|
|
}
|
|
|
|
impl Foo for () {
|
|
fn bar() -> i32 {
|
|
//~^ ERROR method `bar` has an incompatible return type for trait
|
|
0
|
|
}
|
|
}
|
|
|
|
fn main() {}
|