From 5cbe6aa6ca1612344b1ac19ec473b585e00ad022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Mon, 30 Sep 2019 13:35:26 -0700 Subject: [PATCH 1/2] Reword E0392 slightly Make it clearer that a type or lifetime argument not being used can be fixed by referencing it in a struct's fields, not just using `PhathomData`. --- src/librustc_typeck/check/wfcheck.rs | 15 ++++++++++----- .../const-param-type-depends-on-type-param.stderr | 2 +- src/test/ui/error-codes/E0392.stderr | 2 +- src/test/ui/inner-static-type-parameter.stderr | 2 +- src/test/ui/issues/issue-17904-2.stderr | 2 +- src/test/ui/issues/issue-20413.stderr | 2 +- src/test/ui/issues/issue-36299.stderr | 4 ++-- src/test/ui/issues/issue-36638.stderr | 2 +- src/test/ui/issues/issue-37534.stderr | 2 +- ...n-bounds-on-objects-and-type-parameters.stderr | 2 +- src/test/ui/self/self_type_keyword.stderr | 2 +- .../variance-regions-unused-direct.stderr | 4 ++-- .../variance-regions-unused-indirect.stderr | 4 ++-- .../variance/variance-unused-region-param.stderr | 4 ++-- .../ui/variance/variance-unused-type-param.stderr | 6 +++--- 15 files changed, 30 insertions(+), 25 deletions(-) diff --git a/src/librustc_typeck/check/wfcheck.rs b/src/librustc_typeck/check/wfcheck.rs index 20c517d779b42..4dc5c6ca3074d 100644 --- a/src/librustc_typeck/check/wfcheck.rs +++ b/src/librustc_typeck/check/wfcheck.rs @@ -999,11 +999,16 @@ fn report_bivariance(tcx: TyCtxt<'_>, span: Span, param_name: ast::Name) { let suggested_marker_id = tcx.lang_items().phantom_data(); // Help is available only in presence of lang items. - if let Some(def_id) = suggested_marker_id { - err.help(&format!("consider removing `{}` or using a marker such as `{}`", - param_name, - tcx.def_path_str(def_id))); - } + let msg = if let Some(def_id) = suggested_marker_id { + format!( + "consider removing `{}`, refering to it in a field or using a marker such as `{}`", + param_name, + tcx.def_path_str(def_id), + ) + } else { + format!( "consider removing `{}` or refering to it in a field", param_name) + }; + err.help(&msg); err.emit(); } diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr b/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr index 142efe45ac2d7..b72c68036d701 100644 --- a/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr +++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr @@ -18,7 +18,7 @@ error[E0392]: parameter `T` is never used LL | pub struct Dependent([(); X]); | ^ unused parameter | - = help: consider removing `T` or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, refering to it in a field or using a marker such as `std::marker::PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0392.stderr b/src/test/ui/error-codes/E0392.stderr index d0b808df184c4..d036cb5a07f3d 100644 --- a/src/test/ui/error-codes/E0392.stderr +++ b/src/test/ui/error-codes/E0392.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `T` is never used LL | enum Foo { Bar } | ^ unused parameter | - = help: consider removing `T` or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, refering to it in a field or using a marker such as `std::marker::PhantomData` error: aborting due to previous error diff --git a/src/test/ui/inner-static-type-parameter.stderr b/src/test/ui/inner-static-type-parameter.stderr index 083b4b67eb459..f945dbda7d78a 100644 --- a/src/test/ui/inner-static-type-parameter.stderr +++ b/src/test/ui/inner-static-type-parameter.stderr @@ -14,7 +14,7 @@ error[E0392]: parameter `T` is never used LL | enum Bar { What } | ^ unused parameter | - = help: consider removing `T` or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, refering to it in a field or using a marker such as `std::marker::PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-17904-2.stderr b/src/test/ui/issues/issue-17904-2.stderr index 930409cc63727..b84922a4d8f6a 100644 --- a/src/test/ui/issues/issue-17904-2.stderr +++ b/src/test/ui/issues/issue-17904-2.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `T` is never used LL | struct Foo where T: Copy; | ^ unused parameter | - = help: consider removing `T` or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, refering to it in a field or using a marker such as `std::marker::PhantomData` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-20413.stderr b/src/test/ui/issues/issue-20413.stderr index 72a8fe4283b56..1c3ff16a2071a 100644 --- a/src/test/ui/issues/issue-20413.stderr +++ b/src/test/ui/issues/issue-20413.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `T` is never used LL | struct NoData; | ^ unused parameter | - = help: consider removing `T` or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, refering to it in a field or using a marker such as `std::marker::PhantomData` error[E0275]: overflow evaluating the requirement `NoData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Foo` --> $DIR/issue-20413.rs:8:1 diff --git a/src/test/ui/issues/issue-36299.stderr b/src/test/ui/issues/issue-36299.stderr index edbe790a0c9f6..2a9e01421c06d 100644 --- a/src/test/ui/issues/issue-36299.stderr +++ b/src/test/ui/issues/issue-36299.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `'a` is never used LL | struct Foo<'a, A> {} | ^^ unused parameter | - = help: consider removing `'a` or using a marker such as `std::marker::PhantomData` + = help: consider removing `'a`, refering to it in a field or using a marker such as `std::marker::PhantomData` error[E0392]: parameter `A` is never used --> $DIR/issue-36299.rs:1:16 @@ -12,7 +12,7 @@ error[E0392]: parameter `A` is never used LL | struct Foo<'a, A> {} | ^ unused parameter | - = help: consider removing `A` or using a marker such as `std::marker::PhantomData` + = help: consider removing `A`, refering to it in a field or using a marker such as `std::marker::PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-36638.stderr b/src/test/ui/issues/issue-36638.stderr index f3f94198465d8..68354b569ff51 100644 --- a/src/test/ui/issues/issue-36638.stderr +++ b/src/test/ui/issues/issue-36638.stderr @@ -16,7 +16,7 @@ error[E0392]: parameter `Self` is never used LL | struct Foo(Self); | ^^^^ unused parameter | - = help: consider removing `Self` or using a marker such as `std::marker::PhantomData` + = help: consider removing `Self`, refering to it in a field or using a marker such as `std::marker::PhantomData` error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-37534.stderr b/src/test/ui/issues/issue-37534.stderr index 3a0ab32dcc66b..baf75771b1367 100644 --- a/src/test/ui/issues/issue-37534.stderr +++ b/src/test/ui/issues/issue-37534.stderr @@ -20,7 +20,7 @@ error[E0392]: parameter `T` is never used LL | struct Foo { } | ^ unused parameter | - = help: consider removing `T` or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, refering to it in a field or using a marker such as `std::marker::PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr b/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr index 003dd0699d381..5c0df850cba0b 100644 --- a/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr +++ b/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr @@ -27,7 +27,7 @@ error[E0392]: parameter `'c` is never used LL | struct Foo<'a,'b,'c> { | ^^ unused parameter | - = help: consider removing `'c` or using a marker such as `std::marker::PhantomData` + = help: consider removing `'c`, refering to it in a field or using a marker such as `std::marker::PhantomData` error: aborting due to 3 previous errors diff --git a/src/test/ui/self/self_type_keyword.stderr b/src/test/ui/self/self_type_keyword.stderr index 6534d8c36e343..ee82d9da6229c 100644 --- a/src/test/ui/self/self_type_keyword.stderr +++ b/src/test/ui/self/self_type_keyword.stderr @@ -76,7 +76,7 @@ error[E0392]: parameter `'Self` is never used LL | struct Bar<'Self>; | ^^^^^ unused parameter | - = help: consider removing `'Self` or using a marker such as `std::marker::PhantomData` + = help: consider removing `'Self`, refering to it in a field or using a marker such as `std::marker::PhantomData` error: aborting due to 12 previous errors diff --git a/src/test/ui/variance/variance-regions-unused-direct.stderr b/src/test/ui/variance/variance-regions-unused-direct.stderr index 21ff475663c6c..3d1158d4f799f 100644 --- a/src/test/ui/variance/variance-regions-unused-direct.stderr +++ b/src/test/ui/variance/variance-regions-unused-direct.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `'a` is never used LL | struct Bivariant<'a>; | ^^ unused parameter | - = help: consider removing `'a` or using a marker such as `std::marker::PhantomData` + = help: consider removing `'a`, refering to it in a field or using a marker such as `std::marker::PhantomData` error[E0392]: parameter `'d` is never used --> $DIR/variance-regions-unused-direct.rs:7:19 @@ -12,7 +12,7 @@ error[E0392]: parameter `'d` is never used LL | struct Struct<'a, 'd> { | ^^ unused parameter | - = help: consider removing `'d` or using a marker such as `std::marker::PhantomData` + = help: consider removing `'d`, refering to it in a field or using a marker such as `std::marker::PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/variance/variance-regions-unused-indirect.stderr b/src/test/ui/variance/variance-regions-unused-indirect.stderr index fd66217f692f1..ccb2213f80b77 100644 --- a/src/test/ui/variance/variance-regions-unused-indirect.stderr +++ b/src/test/ui/variance/variance-regions-unused-indirect.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `'a` is never used LL | enum Foo<'a> { | ^^ unused parameter | - = help: consider removing `'a` or using a marker such as `std::marker::PhantomData` + = help: consider removing `'a`, refering to it in a field or using a marker such as `std::marker::PhantomData` error[E0392]: parameter `'a` is never used --> $DIR/variance-regions-unused-indirect.rs:7:10 @@ -12,7 +12,7 @@ error[E0392]: parameter `'a` is never used LL | enum Bar<'a> { | ^^ unused parameter | - = help: consider removing `'a` or using a marker such as `std::marker::PhantomData` + = help: consider removing `'a`, refering to it in a field or using a marker such as `std::marker::PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/variance/variance-unused-region-param.stderr b/src/test/ui/variance/variance-unused-region-param.stderr index a96b2338bf428..228fe7483f6ff 100644 --- a/src/test/ui/variance/variance-unused-region-param.stderr +++ b/src/test/ui/variance/variance-unused-region-param.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `'a` is never used LL | struct SomeStruct<'a> { x: u32 } | ^^ unused parameter | - = help: consider removing `'a` or using a marker such as `std::marker::PhantomData` + = help: consider removing `'a`, refering to it in a field or using a marker such as `std::marker::PhantomData` error[E0392]: parameter `'a` is never used --> $DIR/variance-unused-region-param.rs:4:15 @@ -12,7 +12,7 @@ error[E0392]: parameter `'a` is never used LL | enum SomeEnum<'a> { Nothing } | ^^ unused parameter | - = help: consider removing `'a` or using a marker such as `std::marker::PhantomData` + = help: consider removing `'a`, refering to it in a field or using a marker such as `std::marker::PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/variance/variance-unused-type-param.stderr b/src/test/ui/variance/variance-unused-type-param.stderr index 883db46298624..5acf8adfe8791 100644 --- a/src/test/ui/variance/variance-unused-type-param.stderr +++ b/src/test/ui/variance/variance-unused-type-param.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `A` is never used LL | struct SomeStruct { x: u32 } | ^ unused parameter | - = help: consider removing `A` or using a marker such as `std::marker::PhantomData` + = help: consider removing `A`, refering to it in a field or using a marker such as `std::marker::PhantomData` error[E0392]: parameter `A` is never used --> $DIR/variance-unused-type-param.rs:9:15 @@ -12,7 +12,7 @@ error[E0392]: parameter `A` is never used LL | enum SomeEnum { Nothing } | ^ unused parameter | - = help: consider removing `A` or using a marker such as `std::marker::PhantomData` + = help: consider removing `A`, refering to it in a field or using a marker such as `std::marker::PhantomData` error[E0392]: parameter `T` is never used --> $DIR/variance-unused-type-param.rs:13:15 @@ -20,7 +20,7 @@ error[E0392]: parameter `T` is never used LL | enum ListCell { | ^ unused parameter | - = help: consider removing `T` or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, refering to it in a field or using a marker such as `std::marker::PhantomData` error: aborting due to 3 previous errors From a180294f8bb5653c844c9ca4a457a7e4bc47e162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Wed, 2 Oct 2019 12:26:49 -0700 Subject: [PATCH 2/2] review comment --- src/librustc_typeck/check/wfcheck.rs | 2 +- .../const-param-type-depends-on-type-param.stderr | 2 +- src/test/ui/error-codes/E0392.stderr | 2 +- src/test/ui/inner-static-type-parameter.stderr | 2 +- src/test/ui/issues/issue-17904-2.stderr | 2 +- src/test/ui/issues/issue-20413.stderr | 2 +- src/test/ui/issues/issue-36299.stderr | 4 ++-- src/test/ui/issues/issue-36638.stderr | 2 +- src/test/ui/issues/issue-37534.stderr | 2 +- .../region-bounds-on-objects-and-type-parameters.stderr | 2 +- src/test/ui/self/self_type_keyword.stderr | 2 +- src/test/ui/variance/variance-regions-unused-direct.stderr | 4 ++-- .../ui/variance/variance-regions-unused-indirect.stderr | 4 ++-- src/test/ui/variance/variance-unused-region-param.stderr | 4 ++-- src/test/ui/variance/variance-unused-type-param.stderr | 6 +++--- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/librustc_typeck/check/wfcheck.rs b/src/librustc_typeck/check/wfcheck.rs index 4dc5c6ca3074d..de1cc12aea37c 100644 --- a/src/librustc_typeck/check/wfcheck.rs +++ b/src/librustc_typeck/check/wfcheck.rs @@ -1001,7 +1001,7 @@ fn report_bivariance(tcx: TyCtxt<'_>, span: Span, param_name: ast::Name) { // Help is available only in presence of lang items. let msg = if let Some(def_id) = suggested_marker_id { format!( - "consider removing `{}`, refering to it in a field or using a marker such as `{}`", + "consider removing `{}`, refering to it in a field, or using a marker such as `{}`", param_name, tcx.def_path_str(def_id), ) diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr b/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr index b72c68036d701..b50605ce0fe1a 100644 --- a/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr +++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr @@ -18,7 +18,7 @@ error[E0392]: parameter `T` is never used LL | pub struct Dependent([(); X]); | ^ unused parameter | - = help: consider removing `T`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0392.stderr b/src/test/ui/error-codes/E0392.stderr index d036cb5a07f3d..25cd9984052fa 100644 --- a/src/test/ui/error-codes/E0392.stderr +++ b/src/test/ui/error-codes/E0392.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `T` is never used LL | enum Foo { Bar } | ^ unused parameter | - = help: consider removing `T`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error: aborting due to previous error diff --git a/src/test/ui/inner-static-type-parameter.stderr b/src/test/ui/inner-static-type-parameter.stderr index f945dbda7d78a..e8281b916f6fa 100644 --- a/src/test/ui/inner-static-type-parameter.stderr +++ b/src/test/ui/inner-static-type-parameter.stderr @@ -14,7 +14,7 @@ error[E0392]: parameter `T` is never used LL | enum Bar { What } | ^ unused parameter | - = help: consider removing `T`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-17904-2.stderr b/src/test/ui/issues/issue-17904-2.stderr index b84922a4d8f6a..9d1d769158687 100644 --- a/src/test/ui/issues/issue-17904-2.stderr +++ b/src/test/ui/issues/issue-17904-2.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `T` is never used LL | struct Foo where T: Copy; | ^ unused parameter | - = help: consider removing `T`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-20413.stderr b/src/test/ui/issues/issue-20413.stderr index 1c3ff16a2071a..675b47a68ad2e 100644 --- a/src/test/ui/issues/issue-20413.stderr +++ b/src/test/ui/issues/issue-20413.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `T` is never used LL | struct NoData; | ^ unused parameter | - = help: consider removing `T`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error[E0275]: overflow evaluating the requirement `NoData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Foo` --> $DIR/issue-20413.rs:8:1 diff --git a/src/test/ui/issues/issue-36299.stderr b/src/test/ui/issues/issue-36299.stderr index 2a9e01421c06d..a092bab0e81f8 100644 --- a/src/test/ui/issues/issue-36299.stderr +++ b/src/test/ui/issues/issue-36299.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `'a` is never used LL | struct Foo<'a, A> {} | ^^ unused parameter | - = help: consider removing `'a`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `'a`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error[E0392]: parameter `A` is never used --> $DIR/issue-36299.rs:1:16 @@ -12,7 +12,7 @@ error[E0392]: parameter `A` is never used LL | struct Foo<'a, A> {} | ^ unused parameter | - = help: consider removing `A`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `A`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-36638.stderr b/src/test/ui/issues/issue-36638.stderr index 68354b569ff51..699dba0e3f832 100644 --- a/src/test/ui/issues/issue-36638.stderr +++ b/src/test/ui/issues/issue-36638.stderr @@ -16,7 +16,7 @@ error[E0392]: parameter `Self` is never used LL | struct Foo(Self); | ^^^^ unused parameter | - = help: consider removing `Self`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `Self`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-37534.stderr b/src/test/ui/issues/issue-37534.stderr index baf75771b1367..a17fd623c1edd 100644 --- a/src/test/ui/issues/issue-37534.stderr +++ b/src/test/ui/issues/issue-37534.stderr @@ -20,7 +20,7 @@ error[E0392]: parameter `T` is never used LL | struct Foo { } | ^ unused parameter | - = help: consider removing `T`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr b/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr index 5c0df850cba0b..57a987f703851 100644 --- a/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr +++ b/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr @@ -27,7 +27,7 @@ error[E0392]: parameter `'c` is never used LL | struct Foo<'a,'b,'c> { | ^^ unused parameter | - = help: consider removing `'c`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `'c`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error: aborting due to 3 previous errors diff --git a/src/test/ui/self/self_type_keyword.stderr b/src/test/ui/self/self_type_keyword.stderr index ee82d9da6229c..456077b65b83e 100644 --- a/src/test/ui/self/self_type_keyword.stderr +++ b/src/test/ui/self/self_type_keyword.stderr @@ -76,7 +76,7 @@ error[E0392]: parameter `'Self` is never used LL | struct Bar<'Self>; | ^^^^^ unused parameter | - = help: consider removing `'Self`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `'Self`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error: aborting due to 12 previous errors diff --git a/src/test/ui/variance/variance-regions-unused-direct.stderr b/src/test/ui/variance/variance-regions-unused-direct.stderr index 3d1158d4f799f..95fa841a75888 100644 --- a/src/test/ui/variance/variance-regions-unused-direct.stderr +++ b/src/test/ui/variance/variance-regions-unused-direct.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `'a` is never used LL | struct Bivariant<'a>; | ^^ unused parameter | - = help: consider removing `'a`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `'a`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error[E0392]: parameter `'d` is never used --> $DIR/variance-regions-unused-direct.rs:7:19 @@ -12,7 +12,7 @@ error[E0392]: parameter `'d` is never used LL | struct Struct<'a, 'd> { | ^^ unused parameter | - = help: consider removing `'d`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `'d`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/variance/variance-regions-unused-indirect.stderr b/src/test/ui/variance/variance-regions-unused-indirect.stderr index ccb2213f80b77..c90bad8edd478 100644 --- a/src/test/ui/variance/variance-regions-unused-indirect.stderr +++ b/src/test/ui/variance/variance-regions-unused-indirect.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `'a` is never used LL | enum Foo<'a> { | ^^ unused parameter | - = help: consider removing `'a`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `'a`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error[E0392]: parameter `'a` is never used --> $DIR/variance-regions-unused-indirect.rs:7:10 @@ -12,7 +12,7 @@ error[E0392]: parameter `'a` is never used LL | enum Bar<'a> { | ^^ unused parameter | - = help: consider removing `'a`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `'a`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/variance/variance-unused-region-param.stderr b/src/test/ui/variance/variance-unused-region-param.stderr index 228fe7483f6ff..bba301cdbfbcd 100644 --- a/src/test/ui/variance/variance-unused-region-param.stderr +++ b/src/test/ui/variance/variance-unused-region-param.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `'a` is never used LL | struct SomeStruct<'a> { x: u32 } | ^^ unused parameter | - = help: consider removing `'a`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `'a`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error[E0392]: parameter `'a` is never used --> $DIR/variance-unused-region-param.rs:4:15 @@ -12,7 +12,7 @@ error[E0392]: parameter `'a` is never used LL | enum SomeEnum<'a> { Nothing } | ^^ unused parameter | - = help: consider removing `'a`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `'a`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/variance/variance-unused-type-param.stderr b/src/test/ui/variance/variance-unused-type-param.stderr index 5acf8adfe8791..d2891015eb7f5 100644 --- a/src/test/ui/variance/variance-unused-type-param.stderr +++ b/src/test/ui/variance/variance-unused-type-param.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `A` is never used LL | struct SomeStruct { x: u32 } | ^ unused parameter | - = help: consider removing `A`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `A`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error[E0392]: parameter `A` is never used --> $DIR/variance-unused-type-param.rs:9:15 @@ -12,7 +12,7 @@ error[E0392]: parameter `A` is never used LL | enum SomeEnum { Nothing } | ^ unused parameter | - = help: consider removing `A`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `A`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error[E0392]: parameter `T` is never used --> $DIR/variance-unused-type-param.rs:13:15 @@ -20,7 +20,7 @@ error[E0392]: parameter `T` is never used LL | enum ListCell { | ^ unused parameter | - = help: consider removing `T`, refering to it in a field or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, refering to it in a field, or using a marker such as `std::marker::PhantomData` error: aborting due to 3 previous errors