diff options
| author | Santiago Pastorino <spastorino@gmail.com> | 2023-03-03 12:42:11 -0300 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2023-03-06 14:49:50 -0300 |
| commit | 5daa01e4a62e7ba1ff58ed233983dfa3af3e44b5 (patch) | |
| tree | c788cbc994bcc4fc2217ffb3134fef2671ead560 /tests | |
| parent | b1efed4b6486c28e661a5020b736b5b3cd671e2b (diff) | |
| download | rust-5daa01e4a62e7ba1ff58ed233983dfa3af3e44b5.tar.gz rust-5daa01e4a62e7ba1ff58ed233983dfa3af3e44b5.zip | |
Add simple impl trait test for RPITIT
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/impl-trait/in-trait/new-lowering-strategy/simple-impl-trait.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/in-trait/new-lowering-strategy/simple-impl-trait.rs b/tests/ui/impl-trait/in-trait/new-lowering-strategy/simple-impl-trait.rs new file mode 100644 index 00000000000..ae09d20f6f5 --- /dev/null +++ b/tests/ui/impl-trait/in-trait/new-lowering-strategy/simple-impl-trait.rs @@ -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() {} |
