]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/async-await/in-trait/fn-not-async-err2.rs
Auto merge of #104334 - compiler-errors:ufcs-sugg-wrong-def-id, r=estebank
[rust.git] / src / test / ui / async-await / in-trait / fn-not-async-err2.rs
index 594baa91ad8ba61c21eb6914ae4c0b24e5fedd0b..2c4ed5535801e95db3c17300b6784db11b3fbeb4 100644 (file)
@@ -12,9 +12,7 @@ trait MyTrait {
 impl MyTrait for i32 {
     fn foo(&self) -> impl Future<Output = i32> {
         //~^ ERROR `impl Trait` only allowed in function and inherent method return types, not in `impl` method return [E0562]
-        async {
-            *self
-        }
+        async { *self }
     }
 }