diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2022-12-10 18:40:04 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2022-12-13 10:39:44 -0800 |
| commit | 7d1e47aeb0bb1ad2ccf27cb62c25f4ba09d679e4 (patch) | |
| tree | 9c34c96d5df32f7dd18a68abd35c49d690ee33d2 /src | |
| parent | 3e25bcb02093bad56beb1dff6be7dd0d80115fb1 (diff) | |
| download | rust-7d1e47aeb0bb1ad2ccf27cb62c25f4ba09d679e4.tar.gz rust-7d1e47aeb0bb1ad2ccf27cb62c25f4ba09d679e4.zip | |
Suggest `: Type` instead of `: _`
Diffstat (limited to 'src')
18 files changed, 69 insertions, 69 deletions
diff --git a/src/test/ui/array-slice-vec/infer_array_len.stderr b/src/test/ui/array-slice-vec/infer_array_len.stderr index bd757be126c..11a07164e8c 100644 --- a/src/test/ui/array-slice-vec/infer_array_len.stderr +++ b/src/test/ui/array-slice-vec/infer_array_len.stderr @@ -4,10 +4,10 @@ error[E0282]: type annotations needed LL | let [_, _] = a.into(); | ^^^^^^ | -help: consider giving this pattern a type, where the placeholders `_` are specified +help: consider giving this pattern a type, where the placeholder `Type` is specified | -LL | let [_, _]: _ = a.into(); - | +++ +LL | let [_, _]: Type = a.into(); + | ++++++ error: aborting due to previous error diff --git a/src/test/ui/closure-expected-type/expect-two-infer-vars-supply-ty-with-bound-region.stderr b/src/test/ui/closure-expected-type/expect-two-infer-vars-supply-ty-with-bound-region.stderr index d5432755cfe..9e5705ba00b 100644 --- a/src/test/ui/closure-expected-type/expect-two-infer-vars-supply-ty-with-bound-region.stderr +++ b/src/test/ui/closure-expected-type/expect-two-infer-vars-supply-ty-with-bound-region.stderr @@ -4,10 +4,10 @@ error[E0282]: type annotations needed LL | with_closure(|x: u32, y| {}); | ^ | -help: consider giving this closure parameter an explicit type +help: consider giving this closure parameter an explicit type, where the placeholder `Type` is specified | -LL | with_closure(|x: u32, y: _| {}); - | +++ +LL | with_closure(|x: u32, y: Type| {}); + | ++++++ error: aborting due to previous error diff --git a/src/test/ui/closures/issue-52437.stderr b/src/test/ui/closures/issue-52437.stderr index f7d34890a79..c635e743293 100644 --- a/src/test/ui/closures/issue-52437.stderr +++ b/src/test/ui/closures/issue-52437.stderr @@ -10,10 +10,10 @@ error[E0282]: type annotations needed LL | [(); &(&'static: loop { |x| {}; }) as *const _ as usize] | ^ | -help: consider giving this closure parameter an explicit type, where the placeholders `_` are specified +help: consider giving this closure parameter an explicit type, where the placeholder `Type` is specified | -LL | [(); &(&'static: loop { |x: _| {}; }) as *const _ as usize] - | +++ +LL | [(); &(&'static: loop { |x: Type| {}; }) as *const _ as usize] + | ++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/const-generics/issues/issue-83249.stderr b/src/test/ui/const-generics/issues/issue-83249.stderr index 362b8554b2f..f148cb7699e 100644 --- a/src/test/ui/const-generics/issues/issue-83249.stderr +++ b/src/test/ui/const-generics/issues/issue-83249.stderr @@ -4,10 +4,10 @@ error[E0282]: type annotations needed LL | let _ = foo([0; 1]); | ^ | -help: consider giving this pattern a type +help: consider giving this pattern a type, where the placeholder `Type` is specified | -LL | let _: _ = foo([0; 1]); - | +++ +LL | let _: Type = foo([0; 1]); + | ++++++ error: aborting due to previous error diff --git a/src/test/ui/impl-trait/issues/issue-86719.stderr b/src/test/ui/impl-trait/issues/issue-86719.stderr index da184c26bfe..30bad841d15 100644 --- a/src/test/ui/impl-trait/issues/issue-86719.stderr +++ b/src/test/ui/impl-trait/issues/issue-86719.stderr @@ -18,10 +18,10 @@ error[E0282]: type annotations needed LL | |_| true | ^ | -help: consider giving this closure parameter an explicit type, where the placeholders `_` are specified +help: consider giving this closure parameter an explicit type, where the placeholder `Type` is specified | -LL | |_: _| true - | +++ +LL | |_: Type| true + | ++++++ error: aborting due to 3 previous errors diff --git a/src/test/ui/inference/issue-72690.stderr b/src/test/ui/inference/issue-72690.stderr index e59bcea9512..37daeb6441f 100644 --- a/src/test/ui/inference/issue-72690.stderr +++ b/src/test/ui/inference/issue-72690.stderr @@ -30,10 +30,10 @@ error[E0282]: type annotations needed LL | |x| String::from("x".as_ref()); | ^ | -help: consider giving this closure parameter an explicit type, where the placeholders `_` are specified +help: consider giving this closure parameter an explicit type, where the placeholder `Type` is specified | -LL | |x: _| String::from("x".as_ref()); - | +++ +LL | |x: Type| String::from("x".as_ref()); + | ++++++ error[E0283]: type annotations needed --> $DIR/issue-72690.rs:12:26 diff --git a/src/test/ui/issues/issue-18159.stderr b/src/test/ui/issues/issue-18159.stderr index bedfeda2ea0..1cfb0e41504 100644 --- a/src/test/ui/issues/issue-18159.stderr +++ b/src/test/ui/issues/issue-18159.stderr @@ -4,10 +4,10 @@ error[E0282]: type annotations needed LL | let x; | ^ | -help: consider giving `x` an explicit type, where the placeholders `_` are specified +help: consider giving `x` an explicit type, where the placeholder `Type` is specified | -LL | let x: _; - | +++ +LL | let x: Type; + | ++++++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-2151.stderr b/src/test/ui/issues/issue-2151.stderr index 411fdc48344..f689afd4ea7 100644 --- a/src/test/ui/issues/issue-2151.stderr +++ b/src/test/ui/issues/issue-2151.stderr @@ -6,10 +6,10 @@ LL | let x = panic!(); LL | x.clone(); | - type must be known at this point | -help: consider giving `x` an explicit type, where the placeholders `_` are specified +help: consider giving `x` an explicit type, where the placeholder `Type` is specified | -LL | let x: _ = panic!(); - | +++ +LL | let x: Type = panic!(); + | ++++++ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-24036.stderr b/src/test/ui/issues/issue-24036.stderr index fcfce56bcb1..2413db2cada 100644 --- a/src/test/ui/issues/issue-24036.stderr +++ b/src/test/ui/issues/issue-24036.stderr @@ -17,10 +17,10 @@ error[E0282]: type annotations needed LL | 1 => |c| c + 1, | ^ | -help: consider giving this closure parameter an explicit type, where the placeholders `_` are specified +help: consider giving this closure parameter an explicit type, where the placeholder `Type` is specified | -LL | 1 => |c: _| c + 1, - | +++ +LL | 1 => |c: Type| c + 1, + | ++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/lazy-type-alias-impl-trait/branches3.stderr b/src/test/ui/lazy-type-alias-impl-trait/branches3.stderr index 9d56d96c8c1..d14cad4d71c 100644 --- a/src/test/ui/lazy-type-alias-impl-trait/branches3.stderr +++ b/src/test/ui/lazy-type-alias-impl-trait/branches3.stderr @@ -4,10 +4,10 @@ error[E0282]: type annotations needed LL | |s| s.len() | ^ - type must be known at this point | -help: consider giving this closure parameter an explicit type, where the placeholders `_` are specified +help: consider giving this closure parameter an explicit type, where the placeholder `Type` is specified | -LL | |s: _| s.len() - | +++ +LL | |s: Type| s.len() + | ++++++ error[E0282]: type annotations needed --> $DIR/branches3.rs:15:10 @@ -15,10 +15,10 @@ error[E0282]: type annotations needed LL | |s| s.len() | ^ - type must be known at this point | -help: consider giving this closure parameter an explicit type, where the placeholders `_` are specified +help: consider giving this closure parameter an explicit type, where the placeholder `Type` is specified | -LL | |s: _| s.len() - | +++ +LL | |s: Type| s.len() + | ++++++ error[E0282]: type annotations needed --> $DIR/branches3.rs:23:10 @@ -26,10 +26,10 @@ error[E0282]: type annotations needed LL | |s| s.len() | ^ - type must be known at this point | -help: consider giving this closure parameter an explicit type, where the placeholders `_` are specified +help: consider giving this closure parameter an explicit type, where the placeholder `Type` is specified | -LL | |s: _| s.len() - | +++ +LL | |s: Type| s.len() + | ++++++ error[E0282]: type annotations needed --> $DIR/branches3.rs:30:10 @@ -37,10 +37,10 @@ error[E0282]: type annotations needed LL | |s| s.len() | ^ - type must be known at this point | -help: consider giving this closure parameter an explicit type, where the placeholders `_` are specified +help: consider giving this closure parameter an explicit type, where the placeholder `Type` is specified | -LL | |s: _| s.len() - | +++ +LL | |s: Type| s.len() + | ++++++ error: aborting due to 4 previous errors diff --git a/src/test/ui/match/match-unresolved-one-arm.stderr b/src/test/ui/match/match-unresolved-one-arm.stderr index db5db38391e..0ebd56cb064 100644 --- a/src/test/ui/match/match-unresolved-one-arm.stderr +++ b/src/test/ui/match/match-unresolved-one-arm.stderr @@ -4,10 +4,10 @@ error[E0282]: type annotations needed LL | let x = match () { | ^ | -help: consider giving `x` an explicit type, where the placeholders `_` are specified +help: consider giving `x` an explicit type, where the placeholder `Type` is specified | -LL | let x: _ = match () { - | +++ +LL | let x: Type = match () { + | ++++++ error: aborting due to previous error diff --git a/src/test/ui/pattern/pat-tuple-bad-type.stderr b/src/test/ui/pattern/pat-tuple-bad-type.stderr index 86fd1e0c196..ff45e9fb7a3 100644 --- a/src/test/ui/pattern/pat-tuple-bad-type.stderr +++ b/src/test/ui/pattern/pat-tuple-bad-type.stderr @@ -7,10 +7,10 @@ LL | let x; LL | (..) => {} | ---- type must be known at this point | -help: consider giving `x` an explicit type, where the placeholders `_` are specified +help: consider giving `x` an explicit type, where the placeholder `Type` is specified | -LL | let x: _; - | +++ +LL | let x: Type; + | ++++++ error[E0308]: mismatched types --> $DIR/pat-tuple-bad-type.rs:10:9 diff --git a/src/test/ui/pattern/rest-pat-semantic-disallowed.stderr b/src/test/ui/pattern/rest-pat-semantic-disallowed.stderr index 5bf168a5711..df0aa942fed 100644 --- a/src/test/ui/pattern/rest-pat-semantic-disallowed.stderr +++ b/src/test/ui/pattern/rest-pat-semantic-disallowed.stderr @@ -191,10 +191,10 @@ error[E0282]: type annotations needed LL | let x @ ..; | ^^^^^^ | -help: consider giving this pattern a type, where the placeholders `_` are specified +help: consider giving this pattern a type, where the placeholder `Type` is specified | -LL | let x @ ..: _; - | +++ +LL | let x @ ..: Type; + | ++++++ error: aborting due to 23 previous errors diff --git a/src/test/ui/resolve/issue-85348.stderr b/src/test/ui/resolve/issue-85348.stderr index cc9cd3fe68b..2cbc109055f 100644 --- a/src/test/ui/resolve/issue-85348.stderr +++ b/src/test/ui/resolve/issue-85348.stderr @@ -19,10 +19,10 @@ error[E0282]: type annotations needed LL | let mut N; | ^^^^^ | -help: consider giving `N` an explicit type, where the placeholders `_` are specified +help: consider giving `N` an explicit type, where the placeholder `Type` is specified | -LL | let mut N: _; - | +++ +LL | let mut N: Type; + | ++++++ error: aborting due to 3 previous errors diff --git a/src/test/ui/span/method-and-field-eager-resolution.stderr b/src/test/ui/span/method-and-field-eager-resolution.stderr index 85205464626..554a2580c94 100644 --- a/src/test/ui/span/method-and-field-eager-resolution.stderr +++ b/src/test/ui/span/method-and-field-eager-resolution.stderr @@ -7,10 +7,10 @@ LL | LL | x.0; | - type must be known at this point | -help: consider giving `x` an explicit type, where the placeholders `_` are specified +help: consider giving `x` an explicit type, where the placeholder `Type` is specified | -LL | let mut x: _ = Default::default(); - | +++ +LL | let mut x: Type = Default::default(); + | ++++++ error[E0282]: type annotations needed --> $DIR/method-and-field-eager-resolution.rs:11:9 @@ -21,10 +21,10 @@ LL | LL | x[0]; | - type must be known at this point | -help: consider giving `x` an explicit type, where the placeholders `_` are specified +help: consider giving `x` an explicit type, where the placeholder `Type` is specified | -LL | let mut x: _ = Default::default(); - | +++ +LL | let mut x: Type = Default::default(); + | ++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/type-alias-impl-trait/closures_in_branches.stderr b/src/test/ui/type-alias-impl-trait/closures_in_branches.stderr index 6f8b5cc4cc5..0d7341bfb91 100644 --- a/src/test/ui/type-alias-impl-trait/closures_in_branches.stderr +++ b/src/test/ui/type-alias-impl-trait/closures_in_branches.stderr @@ -4,10 +4,10 @@ error[E0282]: type annotations needed LL | |x| x.len() | ^ - type must be known at this point | -help: consider giving this closure parameter an explicit type, where the placeholders `_` are specified +help: consider giving this closure parameter an explicit type, where the placeholder `Type` is specified | -LL | |x: _| x.len() - | +++ +LL | |x: Type| x.len() + | ++++++ error[E0282]: type annotations needed --> $DIR/closures_in_branches.rs:21:10 @@ -15,10 +15,10 @@ error[E0282]: type annotations needed LL | |x| x.len() | ^ - type must be known at this point | -help: consider giving this closure parameter an explicit type, where the placeholders `_` are specified +help: consider giving this closure parameter an explicit type, where the placeholder `Type` is specified | -LL | |x: _| x.len() - | +++ +LL | |x: Type| x.len() + | ++++++ error: aborting due to 2 previous errors diff --git a/src/test/ui/type/type-check/unknown_type_for_closure.stderr b/src/test/ui/type/type-check/unknown_type_for_closure.stderr index 2ba5f07a8f4..01e053ccd51 100644 --- a/src/test/ui/type/type-check/unknown_type_for_closure.stderr +++ b/src/test/ui/type/type-check/unknown_type_for_closure.stderr @@ -10,10 +10,10 @@ error[E0282]: type annotations needed LL | let x = |_| {}; | ^ | -help: consider giving this closure parameter an explicit type, where the placeholders `_` are specified +help: consider giving this closure parameter an explicit type, where the placeholder `Type` is specified | -LL | let x = |_: _| {}; - | +++ +LL | let x = |_: Type| {}; + | ++++++ error[E0282]: type annotations needed --> $DIR/unknown_type_for_closure.rs:10:14 diff --git a/src/test/ui/type/type-path-err-node-types.stderr b/src/test/ui/type/type-path-err-node-types.stderr index 24cc4a2a761..51077dedbbe 100644 --- a/src/test/ui/type/type-path-err-node-types.stderr +++ b/src/test/ui/type/type-path-err-node-types.stderr @@ -28,10 +28,10 @@ error[E0282]: type annotations needed LL | let _ = |a, b: _| -> _ { 0 }; | ^ | -help: consider giving this closure parameter an explicit type, where the placeholders `_` are specified +help: consider giving this closure parameter an explicit type, where the placeholder `Type` is specified | -LL | let _ = |a: _, b: _| -> _ { 0 }; - | +++ +LL | let _ = |a: Type, b: _| -> _ { 0 }; + | ++++++ error: aborting due to 5 previous errors |
