]> git.lizzy.rs Git - rust.git/commitdiff
remove unnecessary change
authorlcnr <rust@lcnr.de>
Fri, 27 May 2022 06:25:50 +0000 (08:25 +0200)
committerlcnr <rust@lcnr.de>
Thu, 2 Jun 2022 08:19:15 +0000 (10:19 +0200)
src/test/ui/span/issue-42234-unknown-receiver-type.full.stderr
src/test/ui/span/issue-42234-unknown-receiver-type.generic_arg.stderr
src/test/ui/span/issue-42234-unknown-receiver-type.rs

index 98e45ff9d07580697f82bb68d3fc05f55d49d914..cd3ffdc6f9d60c0ea1012c9a04e576c918170782 100644 (file)
@@ -1,14 +1,14 @@
 error[E0282]: type annotations needed
   --> $DIR/issue-42234-unknown-receiver-type.rs:9:24
    |
-LL |     let x: Option<_> = None::<_>;
-   |                        ^^^^^^^^^ cannot infer type of the type parameter `T` declared on the enum `Option`
+LL |     let x: Option<_> = None;
+   |                        ^^^^ cannot infer type of the type parameter `T` declared on the enum `Option`
    |
    = note: type must be known at this point
 help: consider specifying the generic argument
    |
-LL |     let x: Option<_> = None::<_>;
-   |                            ~~~~~
+LL |     let x: Option<_> = None::<T>;
+   |                            +++++
 
 error[E0282]: type annotations needed
   --> $DIR/issue-42234-unknown-receiver-type.rs:15:10
index 0902ffa26217f5214363de27390536c4cba3693a..b6a3f07f5715f0a243beb7d3d2d37d3270039392 100644 (file)
@@ -1,14 +1,14 @@
 error[E0282]: type annotations needed
   --> $DIR/issue-42234-unknown-receiver-type.rs:9:24
    |
-LL |     let x: Option<_> = None::<_>;
-   |                        ^^^^^^^^^ cannot infer type of the type parameter `T` declared on the enum `Option`
+LL |     let x: Option<_> = None;
+   |                        ^^^^ cannot infer type of the type parameter `T` declared on the enum `Option`
    |
    = note: type must be known at this point
 help: consider specifying the generic argument
    |
 LL |     let x: Option<_> = None::<T>;
-   |                            ~~~~~
+   |                            +++++
 
 error[E0282]: type annotations needed
   --> $DIR/issue-42234-unknown-receiver-type.rs:15:10
index 93c66eb1301576d6215cfbf86cd51cee708af027..fd53121204c78733598db7153501766b6456b178 100644 (file)
@@ -6,7 +6,7 @@
 // the fix of which this tests).
 
 fn shines_a_beacon_through_the_darkness() {
-    let x: Option<_> = None::<_>; //~ ERROR type annotations needed
+    let x: Option<_> = None; //~ ERROR type annotations needed
     x.unwrap().method_that_could_exist_on_some_type();
 }