diff options
Diffstat (limited to 'tests/ui/suggestions/impl-trait-return-trailing-semicolon.rs')
-rw-r--r-- | tests/ui/suggestions/impl-trait-return-trailing-semicolon.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/suggestions/impl-trait-return-trailing-semicolon.rs b/tests/ui/suggestions/impl-trait-return-trailing-semicolon.rs new file mode 100644 index 000000000..cd3741356 --- /dev/null +++ b/tests/ui/suggestions/impl-trait-return-trailing-semicolon.rs @@ -0,0 +1,21 @@ +trait Bar {} + +impl Bar for i32 {} + +struct Qux; + +impl Bar for Qux {} + +fn foo() -> impl Bar { + //~^ ERROR the trait bound `(): Bar` is not satisfied + 5; + //~^ HELP remove this semicolon +} + +fn bar() -> impl Bar { + //~^ ERROR the trait bound `(): Bar` is not satisfied + //~| HELP the following other types implement trait `Bar`: + ""; +} + +fn main() {} |