Add simple impl trait test for RPITIT
This commit is contained in:
parent
b1efed4b64
commit
5daa01e4a6
1 changed files with 17 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
// check-pass
|
||||
// compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
|
||||
|
||||
#![feature(return_position_impl_trait_in_trait)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Foo {
|
||||
fn foo() -> impl Sized;
|
||||
}
|
||||
|
||||
impl Foo for String {
|
||||
fn foo() -> i32 {
|
||||
22
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue