diff options
Diffstat (limited to 'tests/ui/impl-trait/where-allowed.rs')
| -rw-r--r-- | tests/ui/impl-trait/where-allowed.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/ui/impl-trait/where-allowed.rs b/tests/ui/impl-trait/where-allowed.rs index d3fab326e74..158dc5ab974 100644 --- a/tests/ui/impl-trait/where-allowed.rs +++ b/tests/ui/impl-trait/where-allowed.rs @@ -104,10 +104,9 @@ trait InTraitDefnParameters { fn in_parameters(_: impl Debug); } -// Disallowed +// Allowed trait InTraitDefnReturn { fn in_return() -> impl Debug; - //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types } // Allowed and disallowed in trait impls @@ -124,7 +123,7 @@ impl DummyTrait for () { // Allowed fn in_trait_impl_return() -> impl Debug { () } - //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types + // Allowed } // Allowed |
