diff options
Diffstat (limited to 'tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-impl-trait.rs')
-rw-r--r-- | tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-impl-trait.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-impl-trait.rs b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-impl-trait.rs new file mode 100644 index 000000000..3b60cbc57 --- /dev/null +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-impl-trait.rs @@ -0,0 +1,3 @@ +// Tests that an `impl Trait` that is not `impl Termination` will not work. +fn main() -> impl Copy { } +//~^ ERROR `main` has invalid return type `impl Copy` |