diff --git a/src/librustc/infer/error_reporting/mod.rs b/src/librustc/infer/error_reporting/mod.rs index d0f6a8a434d6..caf9f7288b99 100644 --- a/src/librustc/infer/error_reporting/mod.rs +++ b/src/librustc/infer/error_reporting/mod.rs @@ -1197,18 +1197,25 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { }; if let Some((expected, found)) = expected_found { + let expected_label = exp_found.map(|ef| ef.expected.prefix_string()) + .unwrap_or("type".into()); + let found_label = exp_found.map(|ef| ef.found.prefix_string()) + .unwrap_or("type".into()); match (terr, is_simple_error, expected == found) { - (&TypeError::Sorts(ref values), false, true) => { - let sort_string = | a_type: Ty<'tcx> | - if let ty::Opaque(def_id, _) = a_type.kind { - format!(" (opaque type at {})", self.tcx.sess.source_map() - .mk_substr_filename(self.tcx.def_span(def_id))) - } else { - format!(" ({})", a_type.sort_string(self.tcx)) - }; + (&TypeError::Sorts(ref values), false, extra) => { + let sort_string = |ty: Ty<'tcx>| match (extra, &ty.kind) { + (true, ty::Opaque(def_id, _)) => format!( + " (opaque type at {})", + self.tcx.sess.source_map() + .mk_substr_filename(self.tcx.def_span(*def_id)), + ), + (true, _) => format!(" ({})", ty.sort_string(self.tcx)), + (false, _) => "".to_string(), + }; diag.note_expected_found_extra( - &"type", + &expected_label, expected, + &found_label, found, &sort_string(values.expected), &sort_string(values.found), @@ -1222,15 +1229,14 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { "note_type_err: exp_found={:?}, expected={:?} found={:?}", exp_found, expected, found ); - if let Some(exp_found) = exp_found { - self.suggest_as_ref_where_appropriate(span, &exp_found, diag); - } - - diag.note_expected_found(&"type", expected, found); + diag.note_expected_found(&expected_label, expected, &found_label, found); } _ => (), } } + if let Some(exp_found) = exp_found { + self.suggest_as_ref_where_appropriate(span, &exp_found, diag); + } // In some (most?) cases cause.body_id points to actual body, but in some cases // it's a actual definition. According to the comments (e.g. in diff --git a/src/librustc/ty/error.rs b/src/librustc/ty/error.rs index febea68ddbb5..8babd0584b33 100644 --- a/src/librustc/ty/error.rs +++ b/src/librustc/ty/error.rs @@ -246,6 +246,37 @@ impl<'tcx> ty::TyS<'tcx> { ty::Error => "type error".into(), } } + + pub fn prefix_string(&self) -> Cow<'static, str> { + debug!("prefix_string {:?} {} {:?}", self, self, self.kind); + match self.kind { + ty::Infer(_) | ty::Error | ty::Bool | ty::Char | ty::Int(_) | + ty::Uint(_) | ty::Float(_) | ty::Str | ty::Never => "type".into(), + ty::Tuple(ref tys) if tys.is_empty() => "type".into(), + ty::Adt(def, _) => def.descr().into(), + ty::Foreign(_) => "extern type".into(), + ty::Array(..) => "array".into(), + ty::Slice(_) => "slice".into(), + ty::RawPtr(_) => "raw pointer".into(), + ty::Ref(.., mutbl) => match mutbl { + hir::Mutability::Mutable => "mutable reference", + _ => "reference" + }.into(), + ty::FnDef(..) => "fn item".into(), + ty::FnPtr(_) => "fn pointer".into(), + ty::Dynamic(..) => "trait".into(), + ty::Closure(..) => "closure".into(), + ty::Generator(..) => "generator".into(), + ty::GeneratorWitness(..) => "generator witness".into(), + ty::Tuple(..) => "tuple".into(), + ty::Placeholder(..) => "placeholder type".into(), + ty::Bound(..) => "bound type".into(), + ty::Projection(_) => "associated type".into(), + ty::UnnormalizedProjection(_) => "associated type".into(), + ty::Param(_) => "type parameter".into(), + ty::Opaque(..) => "opaque type".into(), + } + } } impl<'tcx> TyCtxt<'tcx> { diff --git a/src/librustc_errors/diagnostic.rs b/src/librustc_errors/diagnostic.rs index 5a09898f18fb..35da2d29da8d 100644 --- a/src/librustc_errors/diagnostic.rs +++ b/src/librustc_errors/diagnostic.rs @@ -143,20 +143,21 @@ impl Diagnostic { self } - pub fn note_expected_found(&mut self, - label: &dyn fmt::Display, - expected: DiagnosticStyledString, - found: DiagnosticStyledString) - -> &mut Self - { - self.note_expected_found_extra(label, expected, found, &"", &"") + pub fn note_expected_found( + &mut self, + expected_label: &dyn fmt::Display, + expected: DiagnosticStyledString, + found_label: &dyn fmt::Display, + found: DiagnosticStyledString, + ) -> &mut Self { + self.note_expected_found_extra(expected_label, expected, found_label, found, &"", &"") } - pub fn note_unsuccessfull_coercion(&mut self, - expected: DiagnosticStyledString, - found: DiagnosticStyledString) - -> &mut Self - { + pub fn note_unsuccessfull_coercion( + &mut self, + expected: DiagnosticStyledString, + found: DiagnosticStyledString, + ) -> &mut Self { let mut msg: Vec<_> = vec![(format!("required when trying to coerce from type `"), Style::NoStyle)]; @@ -178,27 +179,38 @@ impl Diagnostic { self } - pub fn note_expected_found_extra(&mut self, - label: &dyn fmt::Display, - expected: DiagnosticStyledString, - found: DiagnosticStyledString, - expected_extra: &dyn fmt::Display, - found_extra: &dyn fmt::Display) - -> &mut Self - { - let mut msg: Vec<_> = vec![(format!("expected {} `", label), Style::NoStyle)]; + pub fn note_expected_found_extra( + &mut self, + expected_label: &dyn fmt::Display, + expected: DiagnosticStyledString, + found_label: &dyn fmt::Display, + found: DiagnosticStyledString, + expected_extra: &dyn fmt::Display, + found_extra: &dyn fmt::Display, + ) -> &mut Self { + let expected_label = format!("expected {}", expected_label); + let found_label = format!("found {}", found_label); + let (found_padding, expected_padding) = if expected_label.len() > found_label.len() { + (expected_label.len() - found_label.len(), 0) + } else { + (0, found_label.len() - expected_label.len()) + }; + let mut msg: Vec<_> = vec![( + format!("{}{} `", " ".repeat(expected_padding), expected_label), + Style::NoStyle, + )]; msg.extend(expected.0.iter() - .map(|x| match *x { - StringPart::Normal(ref s) => (s.to_owned(), Style::NoStyle), - StringPart::Highlighted(ref s) => (s.to_owned(), Style::Highlight), - })); + .map(|x| match *x { + StringPart::Normal(ref s) => (s.to_owned(), Style::NoStyle), + StringPart::Highlighted(ref s) => (s.to_owned(), Style::Highlight), + })); msg.push((format!("`{}\n", expected_extra), Style::NoStyle)); - msg.push((format!(" found {} `", label), Style::NoStyle)); + msg.push((format!("{}{} `", " ".repeat(found_padding), found_label), Style::NoStyle)); msg.extend(found.0.iter() - .map(|x| match *x { - StringPart::Normal(ref s) => (s.to_owned(), Style::NoStyle), - StringPart::Highlighted(ref s) => (s.to_owned(), Style::Highlight), - })); + .map(|x| match *x { + StringPart::Normal(ref s) => (s.to_owned(), Style::NoStyle), + StringPart::Highlighted(ref s) => (s.to_owned(), Style::Highlight), + })); msg.push((format!("`{}", found_extra), Style::NoStyle)); // For now, just attach these as notes diff --git a/src/librustc_errors/diagnostic_builder.rs b/src/librustc_errors/diagnostic_builder.rs index 40642dd14b8f..a95c29f8c272 100644 --- a/src/librustc_errors/diagnostic_builder.rs +++ b/src/librustc_errors/diagnostic_builder.rs @@ -195,37 +195,44 @@ impl<'a> DiagnosticBuilder<'a> { self } - forward!(pub fn note_expected_found(&mut self, - label: &dyn fmt::Display, - expected: DiagnosticStyledString, - found: DiagnosticStyledString, - ) -> &mut Self); + forward!(pub fn note_expected_found( + &mut self, + expected_label: &dyn fmt::Display, + expected: DiagnosticStyledString, + found_label: &dyn fmt::Display, + found: DiagnosticStyledString, + ) -> &mut Self); - forward!(pub fn note_expected_found_extra(&mut self, - label: &dyn fmt::Display, - expected: DiagnosticStyledString, - found: DiagnosticStyledString, - expected_extra: &dyn fmt::Display, - found_extra: &dyn fmt::Display, - ) -> &mut Self); + forward!(pub fn note_expected_found_extra( + &mut self, + expected_label: &dyn fmt::Display, + expected: DiagnosticStyledString, + found_label: &dyn fmt::Display, + found: DiagnosticStyledString, + expected_extra: &dyn fmt::Display, + found_extra: &dyn fmt::Display, + ) -> &mut Self); - forward!(pub fn note_unsuccessfull_coercion(&mut self, - expected: DiagnosticStyledString, - found: DiagnosticStyledString, - ) -> &mut Self); + forward!(pub fn note_unsuccessfull_coercion( + &mut self, + expected: DiagnosticStyledString, + found: DiagnosticStyledString, + ) -> &mut Self); forward!(pub fn note(&mut self, msg: &str) -> &mut Self); - forward!(pub fn span_note>(&mut self, - sp: S, - msg: &str, - ) -> &mut Self); + forward!(pub fn span_note>( + &mut self, + sp: S, + msg: &str, + ) -> &mut Self); forward!(pub fn warn(&mut self, msg: &str) -> &mut Self); forward!(pub fn span_warn>(&mut self, sp: S, msg: &str) -> &mut Self); forward!(pub fn help(&mut self, msg: &str) -> &mut Self); - forward!(pub fn span_help>(&mut self, - sp: S, - msg: &str, - ) -> &mut Self); + forward!(pub fn span_help>( + &mut self, + sp: S, + msg: &str, + ) -> &mut Self); pub fn multipart_suggestion( &mut self, diff --git a/src/test/ui/array-break-length.stderr b/src/test/ui/array-break-length.stderr index 45f529bafe72..1fbbb0e79bbf 100644 --- a/src/test/ui/array-break-length.stderr +++ b/src/test/ui/array-break-length.stderr @@ -17,7 +17,7 @@ LL | |_: [_; break]| {} | ^^^^^^^^^^^^^^^^^^ expected (), found closure | = note: expected type `()` - found type `[closure@$DIR/array-break-length.rs:3:9: 3:27]` + found closure `[closure@$DIR/array-break-length.rs:3:9: 3:27]` error[E0308]: mismatched types --> $DIR/array-break-length.rs:8:9 @@ -26,7 +26,7 @@ LL | |_: [_; continue]| {} | ^^^^^^^^^^^^^^^^^^^^^ expected (), found closure | = note: expected type `()` - found type `[closure@$DIR/array-break-length.rs:8:9: 8:30]` + found closure `[closure@$DIR/array-break-length.rs:8:9: 8:30]` error: aborting due to 4 previous errors diff --git a/src/test/ui/array-not-vector.rs b/src/test/ui/array-not-vector.rs index 80b40ef25c3e..838951c7c1d4 100644 --- a/src/test/ui/array-not-vector.rs +++ b/src/test/ui/array-not-vector.rs @@ -2,13 +2,13 @@ fn main() { let _x: i32 = [1, 2, 3]; //~^ ERROR mismatched types //~| expected type `i32` - //~| found type `[{integer}; 3]` + //~| found array `[{integer}; 3]` //~| expected i32, found array of 3 elements let x: &[i32] = &[1, 2, 3]; let _y: &i32 = x; //~^ ERROR mismatched types - //~| expected type `&i32` - //~| found type `&[i32]` + //~| expected reference `&i32` + //~| found reference `&[i32]` //~| expected i32, found slice } diff --git a/src/test/ui/array-not-vector.stderr b/src/test/ui/array-not-vector.stderr index b5a5389db093..2a2fbe6660a3 100644 --- a/src/test/ui/array-not-vector.stderr +++ b/src/test/ui/array-not-vector.stderr @@ -5,7 +5,7 @@ LL | let _x: i32 = [1, 2, 3]; | ^^^^^^^^^ expected i32, found array of 3 elements | = note: expected type `i32` - found type `[{integer}; 3]` + found array `[{integer}; 3]` error[E0308]: mismatched types --> $DIR/array-not-vector.rs:9:20 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | let _y: &i32 = x; | ^ expected i32, found slice | - = note: expected type `&i32` - found type `&[i32]` + = note: expected reference `&i32` + found reference `&[i32]` error: aborting due to 2 previous errors diff --git a/src/test/ui/associated-const/associated-const-generic-obligations.stderr b/src/test/ui/associated-const/associated-const-generic-obligations.stderr index ca6118cb3ba9..6a48bbabe107 100644 --- a/src/test/ui/associated-const/associated-const-generic-obligations.stderr +++ b/src/test/ui/associated-const/associated-const-generic-obligations.stderr @@ -7,8 +7,8 @@ LL | const FROM: Self::Out; LL | const FROM: &'static str = "foo"; | ^^^^^^^^^^^^ expected associated type, found reference | - = note: expected type `::Out` - found type `&'static str` + = note: expected associated type `::Out` + found reference `&'static str` = note: consider constraining the associated type `::Out` to `&'static str` or calling a method that returns `::Out` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html diff --git a/src/test/ui/associated-const/associated-const-impl-wrong-lifetime.stderr b/src/test/ui/associated-const/associated-const-impl-wrong-lifetime.stderr index 2ceab394e955..0cce10b54a4a 100644 --- a/src/test/ui/associated-const/associated-const-impl-wrong-lifetime.stderr +++ b/src/test/ui/associated-const/associated-const-impl-wrong-lifetime.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | const NAME: &'a str = "unit"; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | - = note: expected type `&'static str` - found type `&'a str` + = note: expected reference `&'static str` + found reference `&'a str` note: the lifetime `'a` as defined on the impl at 6:6... --> $DIR/associated-const-impl-wrong-lifetime.rs:6:6 | diff --git a/src/test/ui/associated-type/associated-type-projection-from-supertrait.stderr b/src/test/ui/associated-type/associated-type-projection-from-supertrait.stderr index 4ba4925ef1b3..483c7e7707e4 100644 --- a/src/test/ui/associated-type/associated-type-projection-from-supertrait.stderr +++ b/src/test/ui/associated-type/associated-type-projection-from-supertrait.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | fn b() { dent(ModelT, Blue); } | ^^^^ expected struct `Black`, found struct `Blue` | - = note: expected type `Black` - found type `Blue` + = note: expected struct `Black` + found struct `Blue` error[E0308]: mismatched types --> $DIR/associated-type-projection-from-supertrait.rs:28:23 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | fn c() { dent(ModelU, Black); } | ^^^^^ expected struct `Blue`, found struct `Black` | - = note: expected type `Blue` - found type `Black` + = note: expected struct `Blue` + found struct `Black` error[E0308]: mismatched types --> $DIR/associated-type-projection-from-supertrait.rs:32:28 @@ -22,8 +22,8 @@ error[E0308]: mismatched types LL | fn f() { ModelT.chip_paint(Blue); } | ^^^^ expected struct `Black`, found struct `Blue` | - = note: expected type `Black` - found type `Blue` + = note: expected struct `Black` + found struct `Blue` error[E0308]: mismatched types --> $DIR/associated-type-projection-from-supertrait.rs:33:28 @@ -31,8 +31,8 @@ error[E0308]: mismatched types LL | fn g() { ModelU.chip_paint(Black); } | ^^^^^ expected struct `Blue`, found struct `Black` | - = note: expected type `Blue` - found type `Black` + = note: expected struct `Blue` + found struct `Black` error: aborting due to 4 previous errors diff --git a/src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr b/src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr index 800b762911a6..6443de587818 100644 --- a/src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr +++ b/src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr @@ -7,8 +7,8 @@ LL | fn blue_car>(c: C) { LL | fn b() { blue_car(ModelT); } | ^^^^^^^^ expected struct `Blue`, found struct `Black` | - = note: expected type `Blue` - found type `Black` + = note: expected struct `Blue` + found struct `Black` error[E0271]: type mismatch resolving `::Color == Black` --> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:32:10 @@ -19,8 +19,8 @@ LL | fn black_car>(c: C) { LL | fn c() { black_car(ModelU); } | ^^^^^^^^^ expected struct `Black`, found struct `Blue` | - = note: expected type `Black` - found type `Blue` + = note: expected struct `Black` + found struct `Blue` error: aborting due to 2 previous errors diff --git a/src/test/ui/associated-types/associated-types-eq-3.rs b/src/test/ui/associated-types/associated-types-eq-3.rs index 22e04a8f15ca..2bc302914a5b 100644 --- a/src/test/ui/associated-types/associated-types-eq-3.rs +++ b/src/test/ui/associated-types/associated-types-eq-3.rs @@ -22,9 +22,9 @@ fn foo1>(x: I) { fn foo2(x: I) { let _: Bar = x.boo(); //~^ ERROR mismatched types - //~| expected type `Bar` - //~| found type `::A` + //~| found associated type `::A` //~| expected struct `Bar`, found associated type + //~| expected struct `Bar` } diff --git a/src/test/ui/associated-types/associated-types-eq-3.stderr b/src/test/ui/associated-types/associated-types-eq-3.stderr index 0f2bc84aa1c5..88910f6de2a3 100644 --- a/src/test/ui/associated-types/associated-types-eq-3.stderr +++ b/src/test/ui/associated-types/associated-types-eq-3.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let _: Bar = x.boo(); | ^^^^^^^ expected struct `Bar`, found associated type | - = note: expected type `Bar` - found type `::A` + = note: expected struct `Bar` + found associated type `::A` = note: consider constraining the associated type `::A` to `Bar` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html @@ -18,8 +18,8 @@ LL | fn foo1>(x: I) { LL | foo1(a); | ^^^^ expected struct `Bar`, found usize | - = note: expected type `Bar` - found type `usize` + = note: expected struct `Bar` + found type `usize` error[E0271]: type mismatch resolving `::A == Bar` --> $DIR/associated-types-eq-3.rs:41:9 @@ -27,8 +27,8 @@ error[E0271]: type mismatch resolving `::A == Bar` LL | baz(&a); | ^^ expected struct `Bar`, found usize | - = note: expected type `Bar` - found type `usize` + = note: expected struct `Bar` + found type `usize` = note: required for the cast to the object type `dyn Foo` error: aborting due to 3 previous errors diff --git a/src/test/ui/associated-types/associated-types-eq-hr.stderr b/src/test/ui/associated-types/associated-types-eq-hr.stderr index a8c239389e97..6ed91b9ff473 100644 --- a/src/test/ui/associated-types/associated-types-eq-hr.stderr +++ b/src/test/ui/associated-types/associated-types-eq-hr.stderr @@ -9,8 +9,8 @@ LL | where T : for<'x> TheTrait<&'x isize, A = &'x isize> LL | foo::(); | ^^^^^^^^^^^^^^^^^ expected isize, found usize | - = note: expected type `&isize` - found type `&usize` + = note: expected reference `&isize` + found reference `&usize` error[E0271]: type mismatch resolving `for<'x> >::A == &'x usize` --> $DIR/associated-types-eq-hr.rs:86:5 @@ -23,8 +23,8 @@ LL | where T : for<'x> TheTrait<&'x isize, A = &'x usize> LL | bar::(); | ^^^^^^^^^^^^^^^^ expected usize, found isize | - = note: expected type `&usize` - found type `&isize` + = note: expected reference `&usize` + found reference `&isize` error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize)>` is not satisfied --> $DIR/associated-types-eq-hr.rs:91:17 diff --git a/src/test/ui/associated-types/associated-types-issue-20346.stderr b/src/test/ui/associated-types/associated-types-issue-20346.stderr index f5053f6a1c0c..cebcae44fd00 100644 --- a/src/test/ui/associated-types/associated-types-issue-20346.stderr +++ b/src/test/ui/associated-types/associated-types-issue-20346.stderr @@ -10,7 +10,7 @@ LL | fn test_adapter>>(it: I) { LL | is_iterator_of::, _>(&adapter); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::option::Option`, found type parameter `T` | - = note: expected type `std::option::Option` + = note: expected enum `std::option::Option` found type `T` = help: type parameters must be constrained to match other types = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters diff --git a/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr b/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr index e3a2b5edf3f1..69596fa4b903 100644 --- a/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr +++ b/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr @@ -7,8 +7,8 @@ LL | want_y(t); LL | fn want_y>(t: &T) { } | ------ ----- required by this bound in `want_y` | - = note: expected type `i32` - found type `::Y` + = note: expected type `i32` + found associated type `::Y` = note: consider constraining the associated type `::Y` to `i32` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html @@ -21,8 +21,8 @@ LL | want_x(t); LL | fn want_x>(t: &T) { } | ------ ----- required by this bound in `want_x` | - = note: expected type `u32` - found type `::X` + = note: expected type `u32` + found associated type `::X` = note: consider constraining the associated type `::X` to `u32` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html diff --git a/src/test/ui/associated-types/issue-44153.stderr b/src/test/ui/associated-types/issue-44153.stderr index b62a866a20be..556fd0766c2e 100644 --- a/src/test/ui/associated-types/issue-44153.stderr +++ b/src/test/ui/associated-types/issue-44153.stderr @@ -7,8 +7,8 @@ LL | fn visit() {} LL | <() as Visit>::visit(); | ^^^^^^^^^^^^^^^^^^^^ expected (), found &() | - = note: expected type `()` - found type `&()` + = note: expected type `()` + found reference `&()` = note: required because of the requirements on the impl of `Visit` for `()` error: aborting due to previous error diff --git a/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr b/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr index 6bef9dca265e..bdfa0443f8cc 100644 --- a/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr +++ b/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr @@ -73,7 +73,7 @@ LL | fn rethrow_targets_async_block_not_fn() -> Result { | | | implicitly returns `()` as its body has no tail or `return` expression | - = note: expected type `std::result::Result` + = note: expected enum `std::result::Result` found type `()` error[E0308]: mismatched types @@ -84,7 +84,7 @@ LL | fn rethrow_targets_async_block_not_async_fn() -> Result { | | | implicitly returns `()` as its body has no tail or `return` expression | - = note: expected type `std::result::Result` + = note: expected enum `std::result::Result` found type `()` error: aborting due to 8 previous errors diff --git a/src/test/ui/async-await/dont-suggest-missing-await.stderr b/src/test/ui/async-await/dont-suggest-missing-await.stderr index c87e0bc221de..6f3d10d08686 100644 --- a/src/test/ui/async-await/dont-suggest-missing-await.stderr +++ b/src/test/ui/async-await/dont-suggest-missing-await.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | take_u32(x) | ^ expected u32, found opaque type | - = note: expected type `u32` - found type `impl std::future::Future` + = note: expected type `u32` + found opaque type `impl std::future::Future` error: aborting due to previous error diff --git a/src/test/ui/async-await/suggest-missing-await-closure.stderr b/src/test/ui/async-await/suggest-missing-await-closure.stderr index 487ca6c0fc57..56d268263663 100644 --- a/src/test/ui/async-await/suggest-missing-await-closure.stderr +++ b/src/test/ui/async-await/suggest-missing-await-closure.stderr @@ -7,8 +7,8 @@ LL | take_u32(x) | expected u32, found opaque type | help: consider using `.await` here: `x.await` | - = note: expected type `u32` - found type `impl std::future::Future` + = note: expected type `u32` + found opaque type `impl std::future::Future` error: aborting due to previous error diff --git a/src/test/ui/async-await/suggest-missing-await.stderr b/src/test/ui/async-await/suggest-missing-await.stderr index ccca97ec204b..e44438bfa58d 100644 --- a/src/test/ui/async-await/suggest-missing-await.stderr +++ b/src/test/ui/async-await/suggest-missing-await.stderr @@ -7,8 +7,8 @@ LL | take_u32(x) | expected u32, found opaque type | help: consider using `.await` here: `x.await` | - = note: expected type `u32` - found type `impl std::future::Future` + = note: expected type `u32` + found opaque type `impl std::future::Future` error: aborting due to previous error diff --git a/src/test/ui/bad/bad-const-type.rs b/src/test/ui/bad/bad-const-type.rs index 8121929e0967..aacc796e2a84 100644 --- a/src/test/ui/bad/bad-const-type.rs +++ b/src/test/ui/bad/bad-const-type.rs @@ -1,6 +1,6 @@ static i: String = 10; //~^ ERROR mismatched types -//~| expected type `std::string::String` -//~| found type `{integer}` //~| expected struct `std::string::String`, found integer +//~| expected struct `std::string::String` +//~| found type `{integer}` fn main() { println!("{}", i); } diff --git a/src/test/ui/bad/bad-const-type.stderr b/src/test/ui/bad/bad-const-type.stderr index 677dc72652e9..d3da6bd77189 100644 --- a/src/test/ui/bad/bad-const-type.stderr +++ b/src/test/ui/bad/bad-const-type.stderr @@ -7,8 +7,8 @@ LL | static i: String = 10; | expected struct `std::string::String`, found integer | help: try using a conversion method: `10.to_string()` | - = note: expected type `std::string::String` - found type `{integer}` + = note: expected struct `std::string::String` + found type `{integer}` error: aborting due to previous error diff --git a/src/test/ui/bad/bad-expr-path.stderr b/src/test/ui/bad/bad-expr-path.stderr index 15ac7f2b86f5..faba9911f866 100644 --- a/src/test/ui/bad/bad-expr-path.stderr +++ b/src/test/ui/bad/bad-expr-path.stderr @@ -22,8 +22,8 @@ error[E0580]: main function has wrong type LL | fn main(arguments: Vec) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters | - = note: expected type `fn()` - found type `fn(std::vec::Vec)` + = note: expected fn pointer `fn()` + found fn pointer `fn(std::vec::Vec)` error: aborting due to 4 previous errors diff --git a/src/test/ui/bad/bad-expr-path2.stderr b/src/test/ui/bad/bad-expr-path2.stderr index 45723168f197..53b6d35e8f3a 100644 --- a/src/test/ui/bad/bad-expr-path2.stderr +++ b/src/test/ui/bad/bad-expr-path2.stderr @@ -22,8 +22,8 @@ error[E0580]: main function has wrong type LL | fn main(arguments: Vec) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters | - = note: expected type `fn()` - found type `fn(std::vec::Vec)` + = note: expected fn pointer `fn()` + found fn pointer `fn(std::vec::Vec)` error: aborting due to 4 previous errors diff --git a/src/test/ui/bad/bad-main.stderr b/src/test/ui/bad/bad-main.stderr index c7f15e7a4fa5..1e57c2488e9e 100644 --- a/src/test/ui/bad/bad-main.stderr +++ b/src/test/ui/bad/bad-main.stderr @@ -4,8 +4,8 @@ error[E0580]: main function has wrong type LL | fn main(x: isize) { } | ^^^^^^^^^^^^^^^^^ incorrect number of function parameters | - = note: expected type `fn()` - found type `fn(isize)` + = note: expected fn pointer `fn()` + found fn pointer `fn(isize)` error: aborting due to previous error diff --git a/src/test/ui/blind/blind-item-block-middle.stderr b/src/test/ui/blind/blind-item-block-middle.stderr index 389b63c0adf9..8e6e754df5b2 100644 --- a/src/test/ui/blind/blind-item-block-middle.stderr +++ b/src/test/ui/blind/blind-item-block-middle.stderr @@ -5,7 +5,7 @@ LL | let bar = 5; | ^^^ expected integer, found struct `foo::bar` | = note: expected type `{integer}` - found type `foo::bar` + found struct `foo::bar` error: aborting due to previous error diff --git a/src/test/ui/block-result/consider-removing-last-semi.stderr b/src/test/ui/block-result/consider-removing-last-semi.stderr index f4984ca44630..b028bfd52032 100644 --- a/src/test/ui/block-result/consider-removing-last-semi.stderr +++ b/src/test/ui/block-result/consider-removing-last-semi.stderr @@ -9,8 +9,8 @@ LL | 0u8; LL | "bla".to_string(); | - help: consider removing this semicolon | - = note: expected type `std::string::String` - found type `()` + = note: expected struct `std::string::String` + found type `()` error[E0308]: mismatched types --> $DIR/consider-removing-last-semi.rs:6:11 @@ -23,8 +23,8 @@ LL | "this won't work".to_string(); LL | "removeme".to_string(); | - help: consider removing this semicolon | - = note: expected type `std::string::String` - found type `()` + = note: expected struct `std::string::String` + found type `()` error: aborting due to 2 previous errors diff --git a/src/test/ui/block-result/issue-13428.stderr b/src/test/ui/block-result/issue-13428.stderr index f7cafab3d773..f7b24ddbf55b 100644 --- a/src/test/ui/block-result/issue-13428.stderr +++ b/src/test/ui/block-result/issue-13428.stderr @@ -9,8 +9,8 @@ LL | fn foo() -> String { LL | ; | - help: consider removing this semicolon | - = note: expected type `std::string::String` - found type `()` + = note: expected struct `std::string::String` + found type `()` error[E0308]: mismatched types --> $DIR/issue-13428.rs:11:13 @@ -23,8 +23,8 @@ LL | "foobar".to_string() LL | ; | - help: consider removing this semicolon | - = note: expected type `std::string::String` - found type `()` + = note: expected struct `std::string::String` + found type `()` error: aborting due to 2 previous errors diff --git a/src/test/ui/block-result/issue-13624.rs b/src/test/ui/block-result/issue-13624.rs index 7b6a0775e162..0eeaa7716311 100644 --- a/src/test/ui/block-result/issue-13624.rs +++ b/src/test/ui/block-result/issue-13624.rs @@ -6,9 +6,9 @@ mod a { pub fn get_enum_struct_variant() -> () { Enum::EnumStructVariant { x: 1, y: 2, z: 3 } //~^ ERROR mismatched types - //~| expected type `()` - //~| found type `a::Enum` //~| expected (), found enum `a::Enum` + //~| expected type `()` + //~| found enum `a::Enum` } } @@ -21,9 +21,9 @@ mod b { match enum_struct_variant { a::Enum::EnumStructVariant { x, y, z } => { //~^ ERROR mismatched types - //~| expected type `()` - //~| found type `a::Enum` //~| expected (), found enum `a::Enum` + //~| expected type `()` + //~| found enum `a::Enum` } } } diff --git a/src/test/ui/block-result/issue-13624.stderr b/src/test/ui/block-result/issue-13624.stderr index 417667a5354f..81daff5b5ccc 100644 --- a/src/test/ui/block-result/issue-13624.stderr +++ b/src/test/ui/block-result/issue-13624.stderr @@ -7,7 +7,7 @@ LL | Enum::EnumStructVariant { x: 1, y: 2, z: 3 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found enum `a::Enum` | = note: expected type `()` - found type `a::Enum` + found enum `a::Enum` error[E0308]: mismatched types --> $DIR/issue-13624.rs:22:9 @@ -18,7 +18,7 @@ LL | a::Enum::EnumStructVariant { x, y, z } => { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found enum `a::Enum` | = note: expected type `()` - found type `a::Enum` + found enum `a::Enum` error: aborting due to 2 previous errors diff --git a/src/test/ui/block-result/issue-20862.stderr b/src/test/ui/block-result/issue-20862.stderr index 6dc17815facd..bcbc9b711adf 100644 --- a/src/test/ui/block-result/issue-20862.stderr +++ b/src/test/ui/block-result/issue-20862.stderr @@ -7,7 +7,7 @@ LL | |y| x + y | ^^^^^^^^^ expected (), found closure | = note: expected type `()` - found type `[closure@$DIR/issue-20862.rs:2:5: 2:14 x:_]` + found closure `[closure@$DIR/issue-20862.rs:2:5: 2:14 x:_]` error[E0618]: expected function, found `()` --> $DIR/issue-20862.rs:7:13 diff --git a/src/test/ui/block-result/issue-22645.stderr b/src/test/ui/block-result/issue-22645.stderr index d2ec0dc06bd8..379553b9e0d9 100644 --- a/src/test/ui/block-result/issue-22645.stderr +++ b/src/test/ui/block-result/issue-22645.stderr @@ -18,7 +18,7 @@ LL | b + 3 | ^^^^^ expected (), found struct `Bob` | = note: expected type `()` - found type `Bob` + found struct `Bob` error: aborting due to 2 previous errors diff --git a/src/test/ui/block-result/issue-5500.rs b/src/test/ui/block-result/issue-5500.rs index 5a549bb07ea3..0df7533e38da 100644 --- a/src/test/ui/block-result/issue-5500.rs +++ b/src/test/ui/block-result/issue-5500.rs @@ -2,6 +2,6 @@ fn main() { &panic!() //~^ ERROR mismatched types //~| expected type `()` - //~| found type `&_` + //~| found reference `&_` //~| expected (), found reference } diff --git a/src/test/ui/block-result/issue-5500.stderr b/src/test/ui/block-result/issue-5500.stderr index 6a13b31fe932..27e492837248 100644 --- a/src/test/ui/block-result/issue-5500.stderr +++ b/src/test/ui/block-result/issue-5500.stderr @@ -9,8 +9,8 @@ LL | &panic!() | expected (), found reference | help: consider removing the borrow: `panic!()` | - = note: expected type `()` - found type `&_` + = note: expected type `()` + found reference `&_` error: aborting due to previous error diff --git a/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr b/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr index 52d43eae658a..421c57fc74a0 100644 --- a/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr +++ b/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr @@ -22,8 +22,8 @@ error[E0308]: method not compatible with trait LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | - = note: expected type `fn(&'a isize, Inv<'c>, Inv<'c>, Inv<'d>)` - found type `fn(&'a isize, Inv<'_>, Inv<'c>, Inv<'d>)` + = note: expected fn pointer `fn(&'a isize, Inv<'c>, Inv<'c>, Inv<'d>)` + found fn pointer `fn(&'a isize, Inv<'_>, Inv<'c>, Inv<'d>)` note: the lifetime `'c` as defined on the method body at 27:24... --> $DIR/regions-bound-missing-bound-in-impl.rs:27:24 | diff --git a/src/test/ui/c-variadic/variadic-ffi-1.stderr b/src/test/ui/c-variadic/variadic-ffi-1.stderr index 73f72a177bca..3d1710648daa 100644 --- a/src/test/ui/c-variadic/variadic-ffi-1.stderr +++ b/src/test/ui/c-variadic/variadic-ffi-1.stderr @@ -28,8 +28,8 @@ error[E0308]: mismatched types LL | let x: unsafe extern "C" fn(f: isize, x: u8) = foo; | ^^^ expected non-variadic fn, found variadic function | - = note: expected type `unsafe extern "C" fn(isize, u8)` - found type `unsafe extern "C" fn(isize, u8, ...) {foo}` + = note: expected fn pointer `unsafe extern "C" fn(isize, u8)` + found fn item `unsafe extern "C" fn(isize, u8, ...) {foo}` error[E0308]: mismatched types --> $DIR/variadic-ffi-1.rs:20:54 @@ -37,8 +37,8 @@ error[E0308]: mismatched types LL | let y: extern "C" fn(f: isize, x: u8, ...) = bar; | ^^^ expected variadic fn, found non-variadic function | - = note: expected type `extern "C" fn(isize, u8, ...)` - found type `extern "C" fn(isize, u8) {bar}` + = note: expected fn pointer `extern "C" fn(isize, u8, ...)` + found fn item `extern "C" fn(isize, u8) {bar}` error[E0617]: can't pass `f32` to variadic function --> $DIR/variadic-ffi-1.rs:22:19 diff --git a/src/test/ui/c-variadic/variadic-ffi-4.stderr b/src/test/ui/c-variadic/variadic-ffi-4.stderr index 05535659161b..c80ed5ebf5ce 100644 --- a/src/test/ui/c-variadic/variadic-ffi-4.stderr +++ b/src/test/ui/c-variadic/variadic-ffi-4.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | ap | ^^ lifetime mismatch | - = note: expected type `core::ffi::VaListImpl<'f>` - found type `core::ffi::VaListImpl<'_>` + = note: expected struct `core::ffi::VaListImpl<'f>` + found struct `core::ffi::VaListImpl<'_>` note: the scope of call-site for function at 7:78... --> $DIR/variadic-ffi-4.rs:7:78 | @@ -26,8 +26,8 @@ error[E0308]: mismatched types LL | ap | ^^ lifetime mismatch | - = note: expected type `core::ffi::VaListImpl<'static>` - found type `core::ffi::VaListImpl<'_>` + = note: expected struct `core::ffi::VaListImpl<'static>` + found struct `core::ffi::VaListImpl<'_>` note: the scope of call-site for function at 11:79... --> $DIR/variadic-ffi-4.rs:11:79 | @@ -69,8 +69,8 @@ error[E0308]: mismatched types LL | *ap0 = ap1; | ^^^ lifetime mismatch | - = note: expected type `core::ffi::VaListImpl<'_>` - found type `core::ffi::VaListImpl<'_>` + = note: expected struct `core::ffi::VaListImpl<'_>` + found struct `core::ffi::VaListImpl<'_>` note: the scope of call-site for function at 19:87... --> $DIR/variadic-ffi-4.rs:19:87 | @@ -121,8 +121,8 @@ error[E0308]: mismatched types LL | ap0 = &mut ap1; | ^^^^^^^^ lifetime mismatch | - = note: expected type `&mut core::ffi::VaListImpl<'_>` - found type `&mut core::ffi::VaListImpl<'_>` + = note: expected mutable reference `&mut core::ffi::VaListImpl<'_>` + found mutable reference `&mut core::ffi::VaListImpl<'_>` note: the scope of call-site for function at 23:83... --> $DIR/variadic-ffi-4.rs:23:83 | @@ -189,8 +189,8 @@ error[E0308]: mismatched types LL | *ap0 = ap1.clone(); | ^^^^^^^^^^^ lifetime mismatch | - = note: expected type `core::ffi::VaListImpl<'_>` - found type `core::ffi::VaListImpl<'_>` + = note: expected struct `core::ffi::VaListImpl<'_>` + found struct `core::ffi::VaListImpl<'_>` note: the scope of call-site for function at 30:87... --> $DIR/variadic-ffi-4.rs:30:87 | diff --git a/src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr b/src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr index 8af7f882cc29..a15444207f5c 100644 --- a/src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr +++ b/src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | with_closure_expecting_fn_with_free_region(|x: fn(&'x u32), y| {}); | ^^^^^^^^^^^ lifetime mismatch | - = note: expected type `fn(&u32)` - found type `fn(&'x u32)` + = note: expected fn pointer `fn(&u32)` + found fn pointer `fn(&'x u32)` note: the anonymous lifetime #2 defined on the body at 14:48... --> $DIR/expect-fn-supply-fn.rs:14:48 | @@ -23,8 +23,8 @@ error[E0308]: mismatched types LL | with_closure_expecting_fn_with_free_region(|x: fn(&'x u32), y| {}); | ^^^^^^^^^^^ lifetime mismatch | - = note: expected type `fn(&u32)` - found type `fn(&'x u32)` + = note: expected fn pointer `fn(&u32)` + found fn pointer `fn(&'x u32)` note: the lifetime `'x` as defined on the function body at 11:36... --> $DIR/expect-fn-supply-fn.rs:11:36 | diff --git a/src/test/ui/closures/closure-array-break-length.stderr b/src/test/ui/closures/closure-array-break-length.stderr index 18da4a94e6f0..44c9ee335756 100644 --- a/src/test/ui/closures/closure-array-break-length.stderr +++ b/src/test/ui/closures/closure-array-break-length.stderr @@ -23,7 +23,7 @@ LL | while |_: [_; continue]| {} {} | ^^^^^^^^^^^^^^^^^^^^^ expected bool, found closure | = note: expected type `bool` - found type `[closure@$DIR/closure-array-break-length.rs:4:11: 4:32]` + found closure `[closure@$DIR/closure-array-break-length.rs:4:11: 4:32]` error[E0308]: mismatched types --> $DIR/closure-array-break-length.rs:7:11 @@ -32,7 +32,7 @@ LL | while |_: [_; break]| {} {} | ^^^^^^^^^^^^^^^^^^ expected bool, found closure | = note: expected type `bool` - found type `[closure@$DIR/closure-array-break-length.rs:7:11: 7:29]` + found closure `[closure@$DIR/closure-array-break-length.rs:7:11: 7:29]` error: aborting due to 5 previous errors diff --git a/src/test/ui/closures/closure-expected-type/expect-region-supply-region.stderr b/src/test/ui/closures/closure-expected-type/expect-region-supply-region.stderr index 9f74738315a0..eb860f9aef24 100644 --- a/src/test/ui/closures/closure-expected-type/expect-region-supply-region.stderr +++ b/src/test/ui/closures/closure-expected-type/expect-region-supply-region.stderr @@ -24,8 +24,8 @@ error[E0308]: mismatched types LL | closure_expecting_bound(|x: &'x u32| { | ^^^^^^^ lifetime mismatch | - = note: expected type `&u32` - found type `&'x u32` + = note: expected reference `&u32` + found reference `&'x u32` note: the anonymous lifetime #2 defined on the body at 37:29... --> $DIR/expect-region-supply-region.rs:37:29 | @@ -50,8 +50,8 @@ error[E0308]: mismatched types LL | closure_expecting_bound(|x: &'x u32| { | ^^^^^^^ lifetime mismatch | - = note: expected type `&u32` - found type `&'x u32` + = note: expected reference `&u32` + found reference `&'x u32` note: the lifetime `'x` as defined on the function body at 32:30... --> $DIR/expect-region-supply-region.rs:32:30 | diff --git a/src/test/ui/closures/closure-no-fn-1.stderr b/src/test/ui/closures/closure-no-fn-1.stderr index 6d07c6b035ee..9945530a5a7f 100644 --- a/src/test/ui/closures/closure-no-fn-1.stderr +++ b/src/test/ui/closures/closure-no-fn-1.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let foo: fn(u8) -> u8 = |v: u8| { a += v; a }; | ^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found closure | - = note: expected type `fn(u8) -> u8` - found type `[closure@$DIR/closure-no-fn-1.rs:6:29: 6:50 a:_]` + = note: expected fn pointer `fn(u8) -> u8` + found closure `[closure@$DIR/closure-no-fn-1.rs:6:29: 6:50 a:_]` error: aborting due to previous error diff --git a/src/test/ui/closures/closure-no-fn-2.stderr b/src/test/ui/closures/closure-no-fn-2.stderr index 5adcdf6058b7..f3b0d155dd9f 100644 --- a/src/test/ui/closures/closure-no-fn-2.stderr +++ b/src/test/ui/closures/closure-no-fn-2.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let bar: fn() -> u8 = || { b }; | ^^^^^^^^ expected fn pointer, found closure | - = note: expected type `fn() -> u8` - found type `[closure@$DIR/closure-no-fn-2.rs:6:27: 6:35 b:_]` + = note: expected fn pointer `fn() -> u8` + found closure `[closure@$DIR/closure-no-fn-2.rs:6:27: 6:35 b:_]` error: aborting due to previous error diff --git a/src/test/ui/closures/closure-reform-bad.stderr b/src/test/ui/closures/closure-reform-bad.stderr index 5c5480912be4..63236cf54246 100644 --- a/src/test/ui/closures/closure-reform-bad.stderr +++ b/src/test/ui/closures/closure-reform-bad.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | call_bare(f) | ^ expected fn pointer, found closure | - = note: expected type `for<'r> fn(&'r str)` - found type `[closure@$DIR/closure-reform-bad.rs:10:13: 10:50 string:_]` + = note: expected fn pointer `for<'r> fn(&'r str)` + found closure `[closure@$DIR/closure-reform-bad.rs:10:13: 10:50 string:_]` error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/tab.stderr b/src/test/ui/codemap_tests/tab.stderr index 7b3f959c1cb3..d2d52e282daa 100644 --- a/src/test/ui/codemap_tests/tab.stderr +++ b/src/test/ui/codemap_tests/tab.stderr @@ -12,8 +12,8 @@ LL | fn foo() { LL | "bar boo" | ^^^^^^^^^^^^^^^^^^^^ expected (), found reference | - = note: expected type `()` - found type `&'static str` + = note: expected type `()` + found reference `&'static str` error: aborting due to 2 previous errors diff --git a/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr b/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr index 3b81610a06e0..acbc8339b191 100644 --- a/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr +++ b/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let _ = box { [1, 2, 3] }: Box<[i32]>; | ^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements | - = note: expected type `std::boxed::Box<[i32]>` - found type `std::boxed::Box<[i32; 3]>` + = note: expected struct `std::boxed::Box<[i32]>` + found struct `std::boxed::Box<[i32; 3]>` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:10:13 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | let _ = box if true { [1, 2, 3] } else { [1, 3, 4] }: Box<[i32]>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements | - = note: expected type `std::boxed::Box<[i32]>` - found type `std::boxed::Box<[i32; 3]>` + = note: expected struct `std::boxed::Box<[i32]>` + found struct `std::boxed::Box<[i32; 3]>` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:11:13 @@ -22,8 +22,8 @@ error[E0308]: mismatched types LL | let _ = box match true { true => [1, 2, 3], false => [1, 3, 4] }: Box<[i32]>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements | - = note: expected type `std::boxed::Box<[i32]>` - found type `std::boxed::Box<[i32; 3]>` + = note: expected struct `std::boxed::Box<[i32]>` + found struct `std::boxed::Box<[i32; 3]>` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:13:13 @@ -31,8 +31,8 @@ error[E0308]: mismatched types LL | let _ = box { |x| (x as u8) }: Box _>; | ^^^^^^^^^^^^^^^^^^^^^ expected trait std::ops::Fn, found closure | - = note: expected type `std::boxed::Box u8>` - found type `std::boxed::Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:13:19: 13:32]>` + = note: expected struct `std::boxed::Box u8>` + found struct `std::boxed::Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:13:19: 13:32]>` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:14:13 @@ -40,8 +40,8 @@ error[E0308]: mismatched types LL | let _ = box if true { false } else { true }: Box; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found bool | - = note: expected type `std::boxed::Box` - found type `std::boxed::Box` + = note: expected struct `std::boxed::Box` + found struct `std::boxed::Box` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:15:13 @@ -49,8 +49,8 @@ error[E0308]: mismatched types LL | let _ = box match true { true => 'a', false => 'b' }: Box; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found char | - = note: expected type `std::boxed::Box` - found type `std::boxed::Box` + = note: expected struct `std::boxed::Box` + found struct `std::boxed::Box` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:17:13 @@ -58,8 +58,8 @@ error[E0308]: mismatched types LL | let _ = &{ [1, 2, 3] }: &[i32]; | ^^^^^^^^^^^^^^ expected slice, found array of 3 elements | - = note: expected type `&[i32]` - found type `&[i32; 3]` + = note: expected reference `&[i32]` + found reference `&[i32; 3]` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:18:13 @@ -67,8 +67,8 @@ error[E0308]: mismatched types LL | let _ = &if true { [1, 2, 3] } else { [1, 3, 4] }: &[i32]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements | - = note: expected type `&[i32]` - found type `&[i32; 3]` + = note: expected reference `&[i32]` + found reference `&[i32; 3]` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:19:13 @@ -76,8 +76,8 @@ error[E0308]: mismatched types LL | let _ = &match true { true => [1, 2, 3], false => [1, 3, 4] }: &[i32]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements | - = note: expected type `&[i32]` - found type `&[i32; 3]` + = note: expected reference `&[i32]` + found reference `&[i32; 3]` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:21:13 @@ -85,8 +85,8 @@ error[E0308]: mismatched types LL | let _ = &{ |x| (x as u8) }: &dyn Fn(i32) -> _; | ^^^^^^^^^^^^^^^^^^ expected trait std::ops::Fn, found closure | - = note: expected type `&dyn std::ops::Fn(i32) -> u8` - found type `&[closure@$DIR/coerce-expect-unsized-ascribed.rs:21:16: 21:29]` + = note: expected reference `&dyn std::ops::Fn(i32) -> u8` + found reference `&[closure@$DIR/coerce-expect-unsized-ascribed.rs:21:16: 21:29]` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:22:13 @@ -94,8 +94,8 @@ error[E0308]: mismatched types LL | let _ = &if true { false } else { true }: &dyn Debug; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found bool | - = note: expected type `&dyn std::fmt::Debug` - found type `&bool` + = note: expected reference `&dyn std::fmt::Debug` + found reference `&bool` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:23:13 @@ -103,8 +103,8 @@ error[E0308]: mismatched types LL | let _ = &match true { true => 'a', false => 'b' }: &dyn Debug; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found char | - = note: expected type `&dyn std::fmt::Debug` - found type `&char` + = note: expected reference `&dyn std::fmt::Debug` + found reference `&char` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:25:13 @@ -112,8 +112,8 @@ error[E0308]: mismatched types LL | let _ = Box::new([1, 2, 3]): Box<[i32]>; | ^^^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements | - = note: expected type `std::boxed::Box<[i32]>` - found type `std::boxed::Box<[i32; 3]>` + = note: expected struct `std::boxed::Box<[i32]>` + found struct `std::boxed::Box<[i32; 3]>` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:26:13 @@ -121,8 +121,8 @@ error[E0308]: mismatched types LL | let _ = Box::new(|x| (x as u8)): Box _>; | ^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::ops::Fn, found closure | - = note: expected type `std::boxed::Box _>` - found type `std::boxed::Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:26:22: 26:35]>` + = note: expected struct `std::boxed::Box _>` + found struct `std::boxed::Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:26:22: 26:35]>` error: aborting due to 14 previous errors diff --git a/src/test/ui/coercion/coerce-mut.rs b/src/test/ui/coercion/coerce-mut.rs index 409fb8e86beb..43f0b55856d3 100644 --- a/src/test/ui/coercion/coerce-mut.rs +++ b/src/test/ui/coercion/coerce-mut.rs @@ -4,7 +4,7 @@ fn main() { let x = 0; f(&x); //~^ ERROR mismatched types - //~| expected type `&mut i32` - //~| found type `&{integer}` + //~| expected mutable reference `&mut i32` + //~| found reference `&{integer}` //~| types differ in mutability } diff --git a/src/test/ui/coercion/coerce-mut.stderr b/src/test/ui/coercion/coerce-mut.stderr index f8e3d6e60d65..2601ca5e91e5 100644 --- a/src/test/ui/coercion/coerce-mut.stderr +++ b/src/test/ui/coercion/coerce-mut.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | f(&x); | ^^ types differ in mutability | - = note: expected type `&mut i32` - found type `&{integer}` + = note: expected mutable reference `&mut i32` + found reference `&{integer}` error: aborting due to previous error diff --git a/src/test/ui/coercion/coerce-to-bang.stderr b/src/test/ui/coercion/coerce-to-bang.stderr index a46e97da8159..284c20b6e288 100644 --- a/src/test/ui/coercion/coerce-to-bang.stderr +++ b/src/test/ui/coercion/coerce-to-bang.stderr @@ -49,8 +49,8 @@ error[E0308]: mismatched types LL | let x: [!; 2] = [return, 22]; | ^^^^^^^^^^^^ expected !, found integer | - = note: expected type `[!; 2]` - found type `[{integer}; 2]` + = note: expected array `[!; 2]` + found array `[{integer}; 2]` error[E0308]: mismatched types --> $DIR/coerce-to-bang.rs:55:22 diff --git a/src/test/ui/coercion/coercion-missing-tail-expected-type.stderr b/src/test/ui/coercion/coercion-missing-tail-expected-type.stderr index 955793e8586e..3c44fdb19545 100644 --- a/src/test/ui/coercion/coercion-missing-tail-expected-type.stderr +++ b/src/test/ui/coercion/coercion-missing-tail-expected-type.stderr @@ -21,7 +21,7 @@ LL | fn foo() -> Result { LL | Ok(1); | - help: consider removing this semicolon | - = note: expected type `std::result::Result` + = note: expected enum `std::result::Result` found type `()` error: aborting due to 2 previous errors diff --git a/src/test/ui/coercion/coercion-slice.rs b/src/test/ui/coercion/coercion-slice.rs index b69edcf26063..fbfe1984b9f4 100644 --- a/src/test/ui/coercion/coercion-slice.rs +++ b/src/test/ui/coercion/coercion-slice.rs @@ -3,6 +3,6 @@ fn main() { let _: &[i32] = [0]; //~^ ERROR mismatched types - //~| expected type `&[i32]` + //~| expected reference `&[i32]` //~| expected &[i32], found array of 1 element } diff --git a/src/test/ui/coercion/coercion-slice.stderr b/src/test/ui/coercion/coercion-slice.stderr index ccd776e98793..55523933f547 100644 --- a/src/test/ui/coercion/coercion-slice.stderr +++ b/src/test/ui/coercion/coercion-slice.stderr @@ -7,8 +7,8 @@ LL | let _: &[i32] = [0]; | expected &[i32], found array of 1 element | help: consider borrowing here: `&[0]` | - = note: expected type `&[i32]` - found type `[{integer}; 1]` + = note: expected reference `&[i32]` + found array `[{integer}; 1]` error: aborting due to previous error diff --git a/src/test/ui/compare-method/reordered-type-param.stderr b/src/test/ui/compare-method/reordered-type-param.stderr index 326b84470d62..f1f8a663f212 100644 --- a/src/test/ui/compare-method/reordered-type-param.stderr +++ b/src/test/ui/compare-method/reordered-type-param.stderr @@ -10,8 +10,8 @@ LL | fn b(&self, _x: G) -> G { panic!() } | | found type parameter | expected type parameter | - = note: expected type `fn(&E, F) -> F` - found type `fn(&E, G) -> G` + = note: expected fn pointer `fn(&E, F) -> F` + found fn pointer `fn(&E, G) -> G` = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters diff --git a/src/test/ui/const-generics/const-argument-cross-crate-mismatch.stderr b/src/test/ui/const-generics/const-argument-cross-crate-mismatch.stderr index 7090cb880fd4..8461755dbfe5 100644 --- a/src/test/ui/const-generics/const-argument-cross-crate-mismatch.stderr +++ b/src/test/ui/const-generics/const-argument-cross-crate-mismatch.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let _ = const_generic_lib::function(const_generic_lib::Struct([0u8, 1u8])); | ^^^^^^^^^^ expected an array with a fixed size of 3 elements, found one with 2 elements | - = note: expected type `[u8; 3]` - found type `[u8; 2]` + = note: expected array `[u8; 3]` + found array `[u8; 2]` error[E0308]: mismatched types --> $DIR/const-argument-cross-crate-mismatch.rs:8:65 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | let _: const_generic_lib::Alias = const_generic_lib::Struct([0u8, 1u8, 2u8]); | ^^^^^^^^^^^^^^^ expected an array with a fixed size of 2 elements, found one with 3 elements | - = note: expected type `[u8; 2]` - found type `[u8; 3]` + = note: expected array `[u8; 2]` + found array `[u8; 3]` error: aborting due to 2 previous errors diff --git a/src/test/ui/const-generics/fn-const-param-infer.stderr b/src/test/ui/const-generics/fn-const-param-infer.stderr index de0916b26bfe..d62383e1224c 100644 --- a/src/test/ui/const-generics/fn-const-param-infer.stderr +++ b/src/test/ui/const-generics/fn-const-param-infer.stderr @@ -12,8 +12,8 @@ error[E0308]: mismatched types LL | let _: Checked<{not_one}> = Checked::<{not_two}>; | ^^^^^^^^^^^^^^^^^^^^ expected `not_one`, found `not_two` | - = note: expected type `Checked` - found type `Checked` + = note: expected struct `Checked` + found struct `Checked` error[E0308]: mismatched types --> $DIR/fn-const-param-infer.rs:20:24 @@ -21,8 +21,8 @@ error[E0308]: mismatched types LL | let _ = Checked::<{generic_arg::}>; | ^^^^^^^^^^^^^^^^^^ expected usize, found u32 | - = note: expected type `fn(usize) -> bool` - found type `fn(u32) -> bool {generic_arg::}` + = note: expected fn pointer `fn(usize) -> bool` + found fn item `fn(u32) -> bool {generic_arg::}` error[E0282]: type annotations needed --> $DIR/fn-const-param-infer.rs:22:24 @@ -36,8 +36,8 @@ error[E0308]: mismatched types LL | let _: Checked<{generic::}> = Checked::<{generic::}>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `generic::`, found `generic::` | - = note: expected type `Checked>` - found type `Checked>` + = note: expected struct `Checked>` + found struct `Checked>` error: aborting due to 4 previous errors diff --git a/src/test/ui/const-generics/raw-ptr-const-param.stderr b/src/test/ui/const-generics/raw-ptr-const-param.stderr index 75b4c0a0a3de..ff5c59fa375f 100644 --- a/src/test/ui/const-generics/raw-ptr-const-param.stderr +++ b/src/test/ui/const-generics/raw-ptr-const-param.stderr @@ -12,8 +12,8 @@ error[E0308]: mismatched types LL | let _: Const<{15 as *const _}> = Const::<{10 as *const _}>; | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{pointer}`, found `{pointer}` | - = note: expected type `Const<{pointer}>` - found type `Const<{pointer}>` + = note: expected struct `Const<{pointer}>` + found struct `Const<{pointer}>` error: aborting due to previous error diff --git a/src/test/ui/const-generics/slice-const-param-mismatch.stderr b/src/test/ui/const-generics/slice-const-param-mismatch.stderr index 380a70d664e0..9d11da133158 100644 --- a/src/test/ui/const-generics/slice-const-param-mismatch.stderr +++ b/src/test/ui/const-generics/slice-const-param-mismatch.stderr @@ -12,8 +12,8 @@ error[E0308]: mismatched types LL | let _: ConstString<"Hello"> = ConstString::<"World">; | ^^^^^^^^^^^^^^^^^^^^^^ expected `"Hello"`, found `"World"` | - = note: expected type `ConstString<"Hello">` - found type `ConstString<"World">` + = note: expected struct `ConstString<"Hello">` + found struct `ConstString<"World">` error[E0308]: mismatched types --> $DIR/slice-const-param-mismatch.rs:11:33 @@ -21,8 +21,8 @@ error[E0308]: mismatched types LL | let _: ConstString<"ℇ㇈↦"> = ConstString::<"ℇ㇈↥">; | ^^^^^^^^^^^^^^^^^^^^^ expected `"ℇ㇈↦"`, found `"ℇ㇈↥"` | - = note: expected type `ConstString<"ℇ㇈↦">` - found type `ConstString<"ℇ㇈↥">` + = note: expected struct `ConstString<"ℇ㇈↦">` + found struct `ConstString<"ℇ㇈↥">` error[E0308]: mismatched types --> $DIR/slice-const-param-mismatch.rs:13:33 @@ -30,8 +30,8 @@ error[E0308]: mismatched types LL | let _: ConstBytes = ConstBytes::; | ^^^^^^^^^^^^^^^^^^^^ expected `b"AAA"`, found `b"BBB"` | - = note: expected type `ConstBytes` - found type `ConstBytes` + = note: expected struct `ConstBytes` + found struct `ConstBytes` error: aborting due to 3 previous errors diff --git a/src/test/ui/const-generics/types-mismatch-const-args.stderr b/src/test/ui/const-generics/types-mismatch-const-args.stderr index 805a3067d3b6..c912d9d0abf0 100644 --- a/src/test/ui/const-generics/types-mismatch-const-args.stderr +++ b/src/test/ui/const-generics/types-mismatch-const-args.stderr @@ -12,8 +12,8 @@ error[E0308]: mismatched types LL | let _: A<'a, u32, {2u32}, {3u32}> = A::<'a, u32, {4u32}, {3u32}> { data: PhantomData }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `2u32`, found `4u32` | - = note: expected type `A<'_, _, 2u32, _>` - found type `A<'_, _, 4u32, _>` + = note: expected struct `A<'_, _, 2u32, _>` + found struct `A<'_, _, 4u32, _>` error[E0308]: mismatched types --> $DIR/types-mismatch-const-args.rs:15:41 @@ -21,8 +21,8 @@ error[E0308]: mismatched types LL | let _: A<'a, u16, {2u32}, {3u32}> = A::<'b, u32, {2u32}, {3u32}> { data: PhantomData }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u16, found u32 | - = note: expected type `A<'a, u16, _, _>` - found type `A<'b, u32, _, _>` + = note: expected struct `A<'a, u16, _, _>` + found struct `A<'b, u32, _, _>` error: aborting due to 2 previous errors diff --git a/src/test/ui/consts/const-array-oob-arith.stderr b/src/test/ui/consts/const-array-oob-arith.stderr index 987e7ddf4d91..f4a4c091e78a 100644 --- a/src/test/ui/consts/const-array-oob-arith.stderr +++ b/src/test/ui/consts/const-array-oob-arith.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | const BLUB: [i32; (ARR[0] - 40) as usize] = [5]; | ^^^ expected an array with a fixed size of 2 elements, found one with 1 element | - = note: expected type `[i32; 2]` - found type `[i32; 1]` + = note: expected array `[i32; 2]` + found array `[i32; 1]` error[E0308]: mismatched types --> $DIR/const-array-oob-arith.rs:10:44 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | const BOO: [i32; (ARR[0] - 41) as usize] = [5, 99]; | ^^^^^^^ expected an array with a fixed size of 1 element, found one with 2 elements | - = note: expected type `[i32; 1]` - found type `[i32; 2]` + = note: expected array `[i32; 1]` + found array `[i32; 2]` error: aborting due to 2 previous errors diff --git a/src/test/ui/consts/const-eval/const-eval-span.rs b/src/test/ui/consts/const-eval/const-eval-span.rs index 59f4b138249b..279fe7fb7fed 100644 --- a/src/test/ui/consts/const-eval/const-eval-span.rs +++ b/src/test/ui/consts/const-eval/const-eval-span.rs @@ -9,7 +9,7 @@ enum E { V = CONSTANT, //~^ ERROR mismatched types //~| expected isize, found struct `S` - //~| found type `S` + //~| found struct `S` } fn main() {} diff --git a/src/test/ui/consts/const-eval/const-eval-span.stderr b/src/test/ui/consts/const-eval/const-eval-span.stderr index 8ff9bfe54c7b..5b046e266a2d 100644 --- a/src/test/ui/consts/const-eval/const-eval-span.stderr +++ b/src/test/ui/consts/const-eval/const-eval-span.stderr @@ -5,7 +5,7 @@ LL | V = CONSTANT, | ^^^^^^^^ expected isize, found struct `S` | = note: expected type `isize` - found type `S` + found struct `S` error: aborting due to previous error diff --git a/src/test/ui/consts/const-tup-index-span.stderr b/src/test/ui/consts/const-tup-index-span.stderr index 2c4e27300450..1d280026a019 100644 --- a/src/test/ui/consts/const-tup-index-span.stderr +++ b/src/test/ui/consts/const-tup-index-span.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | const TUP: (usize,) = 5usize << 64; | ^^^^^^^^^^^^ expected tuple, found usize | - = note: expected type `(usize,)` - found type `usize` + = note: expected tuple `(usize,)` + found type `usize` error[E0080]: evaluation of constant value failed --> $DIR/const-tup-index-span.rs:6:18 diff --git a/src/test/ui/conversion-methods.stderr b/src/test/ui/conversion-methods.stderr index 5c666afb89a3..11384d92cb8a 100644 --- a/src/test/ui/conversion-methods.stderr +++ b/src/test/ui/conversion-methods.stderr @@ -7,8 +7,8 @@ LL | let _tis_an_instants_play: String = "'Tis a fond Ambush—"; | expected struct `std::string::String`, found reference | help: try using a conversion method: `"'Tis a fond Ambush—".to_string()` | - = note: expected type `std::string::String` - found type `&'static str` + = note: expected struct `std::string::String` + found reference `&'static str` error[E0308]: mismatched types --> $DIR/conversion-methods.rs:6:40 @@ -19,8 +19,8 @@ LL | let _just_to_make_bliss: PathBuf = Path::new("/ern/her/own/surprise"); | expected struct `std::path::PathBuf`, found reference | help: try using a conversion method: `Path::new("/ern/her/own/surprise").to_path_buf()` | - = note: expected type `std::path::PathBuf` - found type `&std::path::Path` + = note: expected struct `std::path::PathBuf` + found reference `&std::path::Path` error[E0308]: mismatched types --> $DIR/conversion-methods.rs:9:40 @@ -31,8 +31,8 @@ LL | let _but_should_the_play: String = 2; // Perhaps surprisingly, we sugge | expected struct `std::string::String`, found integer | help: try using a conversion method: `2.to_string()` | - = note: expected type `std::string::String` - found type `{integer}` + = note: expected struct `std::string::String` + found type `{integer}` error[E0308]: mismatched types --> $DIR/conversion-methods.rs:12:47 @@ -43,8 +43,8 @@ LL | let _prove_piercing_earnest: Vec = &[1, 2, 3]; | expected struct `std::vec::Vec`, found reference | help: try using a conversion method: `(&[1, 2, 3]).to_vec()` | - = note: expected type `std::vec::Vec` - found type `&[{integer}; 3]` + = note: expected struct `std::vec::Vec` + found reference `&[{integer}; 3]` error: aborting due to 4 previous errors diff --git a/src/test/ui/cross/cross-borrow-trait.rs b/src/test/ui/cross/cross-borrow-trait.rs index 274cdad75ec2..ce42b696ddf8 100644 --- a/src/test/ui/cross/cross-borrow-trait.rs +++ b/src/test/ui/cross/cross-borrow-trait.rs @@ -8,6 +8,6 @@ impl Trait for Foo {} pub fn main() { let x: Box = Box::new(Foo); let _y: &dyn Trait = x; //~ ERROR E0308 - //~| expected type `&dyn Trait` - //~| found type `std::boxed::Box` + //~| expected reference `&dyn Trait` + //~| found struct `std::boxed::Box` } diff --git a/src/test/ui/cross/cross-borrow-trait.stderr b/src/test/ui/cross/cross-borrow-trait.stderr index ada1c0204eb0..282912e076eb 100644 --- a/src/test/ui/cross/cross-borrow-trait.stderr +++ b/src/test/ui/cross/cross-borrow-trait.stderr @@ -7,8 +7,8 @@ LL | let _y: &dyn Trait = x; | expected &dyn Trait, found struct `std::boxed::Box` | help: consider borrowing here: `&x` | - = note: expected type `&dyn Trait` - found type `std::boxed::Box` + = note: expected reference `&dyn Trait` + found struct `std::boxed::Box` error: aborting due to previous error diff --git a/src/test/ui/deref-suggestion.stderr b/src/test/ui/deref-suggestion.stderr index 9c49f541c930..53bc3212a7fb 100644 --- a/src/test/ui/deref-suggestion.stderr +++ b/src/test/ui/deref-suggestion.stderr @@ -7,8 +7,8 @@ LL | foo(s); | expected struct `std::string::String`, found reference | help: try using a conversion method: `s.to_string()` | - = note: expected type `std::string::String` - found type `&std::string::String` + = note: expected struct `std::string::String` + found reference `&std::string::String` error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:14:10 @@ -19,8 +19,8 @@ LL | foo3(u); | expected u32, found &u32 | help: consider dereferencing the borrow: `*u` | - = note: expected type `u32` - found type `&u32` + = note: expected type `u32` + found reference `&u32` error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:30:9 @@ -31,8 +31,8 @@ LL | foo(&"aaa".to_owned()); | expected struct `std::string::String`, found reference | help: consider removing the borrow: `"aaa".to_owned()` | - = note: expected type `std::string::String` - found type `&std::string::String` + = note: expected struct `std::string::String` + found reference `&std::string::String` error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:32:9 @@ -43,8 +43,8 @@ LL | foo(&mut "aaa".to_owned()); | expected struct `std::string::String`, found mutable reference | help: consider removing the borrow: `"aaa".to_owned()` | - = note: expected type `std::string::String` - found type `&mut std::string::String` + = note: expected struct `std::string::String` + found mutable reference `&mut std::string::String` error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:2:20 @@ -55,8 +55,8 @@ LL | ($x:expr) => { &$x } LL | foo3(borrow!(0)); | ---------- in this macro invocation | - = note: expected type `u32` - found type `&{integer}` + = note: expected type `u32` + found reference `&{integer}` error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:36:5 @@ -64,8 +64,8 @@ error[E0308]: mismatched types LL | assert_eq!(3i32, &3i32); | ^^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found &i32 | - = note: expected type `i32` - found type `&i32` + = note: expected type `i32` + found reference `&i32` = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error[E0308]: mismatched types @@ -77,8 +77,8 @@ LL | let s = S { u }; | expected &u32, found integer | help: consider borrowing here: `u: &u` | - = note: expected type `&u32` - found type `{integer}` + = note: expected reference `&u32` + found type `{integer}` error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:41:20 @@ -89,8 +89,8 @@ LL | let s = S { u: u }; | expected &u32, found integer | help: consider borrowing here: `&u` | - = note: expected type `&u32` - found type `{integer}` + = note: expected reference `&u32` + found type `{integer}` error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:44:17 @@ -101,8 +101,8 @@ LL | let r = R { i }; | expected u32, found &{integer} | help: consider dereferencing the borrow: `i: *i` | - = note: expected type `u32` - found type `&{integer}` + = note: expected type `u32` + found reference `&{integer}` error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:46:20 @@ -113,8 +113,8 @@ LL | let r = R { i: i }; | expected u32, found &{integer} | help: consider dereferencing the borrow: `*i` | - = note: expected type `u32` - found type `&{integer}` + = note: expected type `u32` + found reference `&{integer}` error: aborting due to 10 previous errors diff --git a/src/test/ui/destructure-trait-ref.rs b/src/test/ui/destructure-trait-ref.rs index 71cf37ca8495..1c7928263996 100644 --- a/src/test/ui/destructure-trait-ref.rs +++ b/src/test/ui/destructure-trait-ref.rs @@ -31,16 +31,16 @@ fn main() { // n > m let &&x = &1isize as &dyn T; //~^ ERROR mismatched types - //~| expected type `dyn T` - //~| found type `&_` + //~| expected trait `dyn T` + //~| found reference `&_` //~| expected trait T, found reference let &&&x = &(&1isize as &dyn T); //~^ ERROR mismatched types - //~| expected type `dyn T` - //~| found type `&_` + //~| expected trait `dyn T` + //~| found reference `&_` //~| expected trait T, found reference let box box x = box 1isize as Box; //~^ ERROR mismatched types - //~| expected type `dyn T` - //~| found type `std::boxed::Box<_>` + //~| expected trait `dyn T` + //~| found struct `std::boxed::Box<_>` } diff --git a/src/test/ui/destructure-trait-ref.stderr b/src/test/ui/destructure-trait-ref.stderr index d3ad21eb24ff..05545a7098c9 100644 --- a/src/test/ui/destructure-trait-ref.stderr +++ b/src/test/ui/destructure-trait-ref.stderr @@ -25,8 +25,8 @@ LL | let &&x = &1isize as &dyn T; | expected trait T, found reference | help: you can probably remove the explicit borrow: `x` | - = note: expected type `dyn T` - found type `&_` + = note: expected trait `dyn T` + found reference `&_` error[E0308]: mismatched types --> $DIR/destructure-trait-ref.rs:37:11 @@ -37,8 +37,8 @@ LL | let &&&x = &(&1isize as &dyn T); | expected trait T, found reference | help: you can probably remove the explicit borrow: `x` | - = note: expected type `dyn T` - found type `&_` + = note: expected trait `dyn T` + found reference `&_` error[E0308]: mismatched types --> $DIR/destructure-trait-ref.rs:42:13 @@ -46,8 +46,8 @@ error[E0308]: mismatched types LL | let box box x = box 1isize as Box; | ^^^^^ expected trait T, found struct `std::boxed::Box` | - = note: expected type `dyn T` - found type `std::boxed::Box<_>` + = note: expected trait `dyn T` + found struct `std::boxed::Box<_>` error: aborting due to 6 previous errors diff --git a/src/test/ui/did_you_mean/issue-42764.stderr b/src/test/ui/did_you_mean/issue-42764.stderr index 0b3e44446aec..bd913649dd07 100644 --- a/src/test/ui/did_you_mean/issue-42764.stderr +++ b/src/test/ui/did_you_mean/issue-42764.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | this_function_expects_a_double_option(n); | ^ expected enum `DoubleOption`, found usize | - = note: expected type `DoubleOption<_>` + = note: expected enum `DoubleOption<_>` found type `usize` help: try using a variant of the expected enum | @@ -19,8 +19,8 @@ error[E0308]: mismatched types LL | let _c = Context { wrapper: Payload{} }; | ^^^^^^^^^ expected struct `Wrapper`, found struct `Payload` | - = note: expected type `Wrapper` - found type `Payload` + = note: expected struct `Wrapper` + found struct `Payload` error: aborting due to 2 previous errors diff --git a/src/test/ui/did_you_mean/recursion_limit_deref.stderr b/src/test/ui/did_you_mean/recursion_limit_deref.stderr index c76efb1d0092..233474e5fe68 100644 --- a/src/test/ui/did_you_mean/recursion_limit_deref.stderr +++ b/src/test/ui/did_you_mean/recursion_limit_deref.stderr @@ -12,8 +12,8 @@ error[E0308]: mismatched types LL | let x: &Bottom = &t; | ^^ expected struct `Bottom`, found struct `Top` | - = note: expected type `&Bottom` - found type `&Top` + = note: expected reference `&Bottom` + found reference `&Top` error: aborting due to 2 previous errors diff --git a/src/test/ui/diverging-fn-tail-35849.stderr b/src/test/ui/diverging-fn-tail-35849.stderr index 383a7009e859..ebca760e2354 100644 --- a/src/test/ui/diverging-fn-tail-35849.stderr +++ b/src/test/ui/diverging-fn-tail-35849.stderr @@ -8,7 +8,7 @@ LL | ::std::mem::transmute::(panic!()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected !, found array of 8 elements | = note: expected type `!` - found type `[u8; 8]` + found array `[u8; 8]` error: aborting due to previous error diff --git a/src/test/ui/diverging-tuple-parts-39485.stderr b/src/test/ui/diverging-tuple-parts-39485.stderr index 70eefeb329db..72cdfad6f777 100644 --- a/src/test/ui/diverging-tuple-parts-39485.stderr +++ b/src/test/ui/diverging-tuple-parts-39485.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | &panic!() | ^^^^^^^^^ expected (), found reference | - = note: expected type `()` - found type `&_` + = note: expected type `()` + found reference `&_` help: try adding a return type | LL | fn g() -> &_ { @@ -24,7 +24,7 @@ LL | (return 1, return 2) | ^^^^^^^^^^^^^^^^^^^^ expected isize, found tuple | = note: expected type `isize` - found type `(!, !)` + found tuple `(!, !)` error: aborting due to 2 previous errors diff --git a/src/test/ui/dst/dst-bad-assign-3.rs b/src/test/ui/dst/dst-bad-assign-3.rs index 691909a23174..8f0748f0a69b 100644 --- a/src/test/ui/dst/dst-bad-assign-3.rs +++ b/src/test/ui/dst/dst-bad-assign-3.rs @@ -32,8 +32,8 @@ pub fn main() { let z: Box = Box::new(Bar1 {f: 36}); f5.2 = Bar1 {f: 36}; //~^ ERROR mismatched types - //~| expected type `dyn ToBar` - //~| found type `Bar1` //~| expected trait ToBar, found struct `Bar1` + //~| expected trait `dyn ToBar` + //~| found struct `Bar1` //~| ERROR the size for values of type } diff --git a/src/test/ui/dst/dst-bad-assign-3.stderr b/src/test/ui/dst/dst-bad-assign-3.stderr index 8c80ec7aac1d..773837e7994c 100644 --- a/src/test/ui/dst/dst-bad-assign-3.stderr +++ b/src/test/ui/dst/dst-bad-assign-3.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | f5.2 = Bar1 {f: 36}; | ^^^^^^^^^^^^ expected trait ToBar, found struct `Bar1` | - = note: expected type `dyn ToBar` - found type `Bar1` + = note: expected trait `dyn ToBar` + found struct `Bar1` error[E0277]: the size for values of type `dyn ToBar` cannot be known at compilation time --> $DIR/dst-bad-assign-3.rs:33:5 diff --git a/src/test/ui/dst/dst-bad-assign.rs b/src/test/ui/dst/dst-bad-assign.rs index 4f2648653f05..c84c61ecb0ec 100644 --- a/src/test/ui/dst/dst-bad-assign.rs +++ b/src/test/ui/dst/dst-bad-assign.rs @@ -34,8 +34,8 @@ pub fn main() { let z: Box = Box::new(Bar1 {f: 36}); f5.ptr = Bar1 {f: 36}; //~^ ERROR mismatched types - //~| expected type `dyn ToBar` - //~| found type `Bar1` //~| expected trait ToBar, found struct `Bar1` + //~| expected trait `dyn ToBar` + //~| found struct `Bar1` //~| ERROR the size for values of type } diff --git a/src/test/ui/dst/dst-bad-assign.stderr b/src/test/ui/dst/dst-bad-assign.stderr index 849b1a62a46f..d01cbf7a3e98 100644 --- a/src/test/ui/dst/dst-bad-assign.stderr +++ b/src/test/ui/dst/dst-bad-assign.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | f5.ptr = Bar1 {f: 36}; | ^^^^^^^^^^^^ expected trait ToBar, found struct `Bar1` | - = note: expected type `dyn ToBar` - found type `Bar1` + = note: expected trait `dyn ToBar` + found struct `Bar1` error[E0277]: the size for values of type `dyn ToBar` cannot be known at compilation time --> $DIR/dst-bad-assign.rs:35:5 diff --git a/src/test/ui/dst/dst-bad-coerce1.stderr b/src/test/ui/dst/dst-bad-coerce1.stderr index a48f37b20be9..7e9d127a9af6 100644 --- a/src/test/ui/dst/dst-bad-coerce1.stderr +++ b/src/test/ui/dst/dst-bad-coerce1.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let f3: &Fat<[usize]> = f2; | ^^ expected slice, found array of 3 elements | - = note: expected type `&Fat<[usize]>` - found type `&Fat<[isize; 3]>` + = note: expected reference `&Fat<[usize]>` + found reference `&Fat<[isize; 3]>` error[E0277]: the trait bound `Foo: Bar` is not satisfied --> $DIR/dst-bad-coerce1.rs:22:29 @@ -21,8 +21,8 @@ error[E0308]: mismatched types LL | let f3: &([usize],) = f2; | ^^ expected slice, found array of 3 elements | - = note: expected type `&([usize],)` - found type `&([isize; 3],)` + = note: expected reference `&([usize],)` + found reference `&([isize; 3],)` error[E0277]: the trait bound `Foo: Bar` is not satisfied --> $DIR/dst-bad-coerce1.rs:34:27 diff --git a/src/test/ui/dst/dst-bad-coerce2.stderr b/src/test/ui/dst/dst-bad-coerce2.stderr index d1da9b6ca074..e76fcb5f72d5 100644 --- a/src/test/ui/dst/dst-bad-coerce2.stderr +++ b/src/test/ui/dst/dst-bad-coerce2.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let f3: &mut Fat<[isize]> = f2; | ^^ types differ in mutability | - = note: expected type `&mut Fat<[isize]>` - found type `&Fat<[isize; 3]>` + = note: expected mutable reference `&mut Fat<[isize]>` + found reference `&Fat<[isize; 3]>` error[E0308]: mismatched types --> $DIR/dst-bad-coerce2.rs:20:33 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | let f3: &mut Fat = f2; | ^^ types differ in mutability | - = note: expected type `&mut Fat` - found type `&Fat` + = note: expected mutable reference `&mut Fat` + found reference `&Fat` error[E0308]: mismatched types --> $DIR/dst-bad-coerce2.rs:25:31 @@ -22,8 +22,8 @@ error[E0308]: mismatched types LL | let f3: &mut ([isize],) = f2; | ^^ types differ in mutability | - = note: expected type `&mut ([isize],)` - found type `&([isize; 3],)` + = note: expected mutable reference `&mut ([isize],)` + found reference `&([isize; 3],)` error[E0308]: mismatched types --> $DIR/dst-bad-coerce2.rs:30:31 @@ -31,8 +31,8 @@ error[E0308]: mismatched types LL | let f3: &mut (dyn Bar,) = f2; | ^^ types differ in mutability | - = note: expected type `&mut (dyn Bar,)` - found type `&(Foo,)` + = note: expected mutable reference `&mut (dyn Bar,)` + found reference `&(Foo,)` error: aborting due to 4 previous errors diff --git a/src/test/ui/dst/dst-bad-coerce4.rs b/src/test/ui/dst/dst-bad-coerce4.rs index 9635e1e3380d..d1c590347eda 100644 --- a/src/test/ui/dst/dst-bad-coerce4.rs +++ b/src/test/ui/dst/dst-bad-coerce4.rs @@ -11,15 +11,15 @@ pub fn main() { let f1: &Fat<[isize]> = &Fat { ptr: [1, 2, 3] }; let f2: &Fat<[isize; 3]> = f1; //~^ ERROR mismatched types - //~| expected type `&Fat<[isize; 3]>` - //~| found type `&Fat<[isize]>` + //~| expected reference `&Fat<[isize; 3]>` + //~| found reference `&Fat<[isize]>` //~| expected array of 3 elements, found slice // Tuple with a vec of isizes. let f1: &([isize],) = &([1, 2, 3],); let f2: &([isize; 3],) = f1; //~^ ERROR mismatched types - //~| expected type `&([isize; 3],)` - //~| found type `&([isize],)` + //~| expected reference `&([isize; 3],)` + //~| found reference `&([isize],)` //~| expected array of 3 elements, found slice } diff --git a/src/test/ui/dst/dst-bad-coerce4.stderr b/src/test/ui/dst/dst-bad-coerce4.stderr index fbf59ae5c660..fad34633da5c 100644 --- a/src/test/ui/dst/dst-bad-coerce4.stderr +++ b/src/test/ui/dst/dst-bad-coerce4.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let f2: &Fat<[isize; 3]> = f1; | ^^ expected array of 3 elements, found slice | - = note: expected type `&Fat<[isize; 3]>` - found type `&Fat<[isize]>` + = note: expected reference `&Fat<[isize; 3]>` + found reference `&Fat<[isize]>` error[E0308]: mismatched types --> $DIR/dst-bad-coerce4.rs:20:30 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | let f2: &([isize; 3],) = f1; | ^^ expected array of 3 elements, found slice | - = note: expected type `&([isize; 3],)` - found type `&([isize],)` + = note: expected reference `&([isize; 3],)` + found reference `&([isize],)` error: aborting due to 2 previous errors diff --git a/src/test/ui/dst/dst-bad-coercions.stderr b/src/test/ui/dst/dst-bad-coercions.stderr index e4bc6ee0010a..3c6111a345bb 100644 --- a/src/test/ui/dst/dst-bad-coercions.stderr +++ b/src/test/ui/dst/dst-bad-coercions.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let y: &S = x; | ^ expected &S, found *-ptr | - = note: expected type `&S` - found type `*const S` + = note: expected reference `&S` + found raw pointer `*const S` error[E0308]: mismatched types --> $DIR/dst-bad-coercions.rs:15:21 @@ -16,8 +16,8 @@ LL | let y: &dyn T = x; | expected &dyn T, found *-ptr | help: consider borrowing here: `&x` | - = note: expected type `&dyn T` - found type `*const S` + = note: expected reference `&dyn T` + found raw pointer `*const S` error[E0308]: mismatched types --> $DIR/dst-bad-coercions.rs:19:17 @@ -25,8 +25,8 @@ error[E0308]: mismatched types LL | let y: &S = x; | ^ expected &S, found *-ptr | - = note: expected type `&S` - found type `*mut S` + = note: expected reference `&S` + found raw pointer `*mut S` error[E0308]: mismatched types --> $DIR/dst-bad-coercions.rs:20:21 @@ -37,8 +37,8 @@ LL | let y: &dyn T = x; | expected &dyn T, found *-ptr | help: consider borrowing here: `&x` | - = note: expected type `&dyn T` - found type `*mut S` + = note: expected reference `&dyn T` + found raw pointer `*mut S` error[E0308]: mismatched types --> $DIR/dst-bad-coercions.rs:23:25 @@ -46,8 +46,8 @@ error[E0308]: mismatched types LL | let x: &mut dyn T = &S; | ^^ types differ in mutability | - = note: expected type `&mut dyn T` - found type `&S` + = note: expected mutable reference `&mut dyn T` + found reference `&S` error[E0308]: mismatched types --> $DIR/dst-bad-coercions.rs:24:25 @@ -55,8 +55,8 @@ error[E0308]: mismatched types LL | let x: *mut dyn T = &S; | ^^ types differ in mutability | - = note: expected type `*mut dyn T` - found type `&S` + = note: expected raw pointer `*mut dyn T` + found reference `&S` error[E0308]: mismatched types --> $DIR/dst-bad-coercions.rs:25:21 @@ -64,8 +64,8 @@ error[E0308]: mismatched types LL | let x: *mut S = &S; | ^^ types differ in mutability | - = note: expected type `*mut S` - found type `&S` + = note: expected raw pointer `*mut S` + found reference `&S` error: aborting due to 7 previous errors diff --git a/src/test/ui/elide-errors-on-mismatched-tuple.stderr b/src/test/ui/elide-errors-on-mismatched-tuple.stderr index 1ef9d7ae9826..122c71bebc48 100644 --- a/src/test/ui/elide-errors-on-mismatched-tuple.stderr +++ b/src/test/ui/elide-errors-on-mismatched-tuple.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let (a, b, c) = (A::new(), A::new()); // This tuple is 2 elements, should be three | ^^^^^^^^^ expected a tuple with 2 elements, found one with 3 elements | - = note: expected type `(A, A)` - found type `(_, _, _)` + = note: expected tuple `(A, A)` + found tuple `(_, _, _)` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0271.stderr b/src/test/ui/error-codes/E0271.stderr index 378e5e363064..2f9191b43269 100644 --- a/src/test/ui/error-codes/E0271.stderr +++ b/src/test/ui/error-codes/E0271.stderr @@ -7,8 +7,8 @@ LL | fn foo(t: T) where T: Trait { LL | foo(3_i8); | ^^^ expected u32, found reference | - = note: expected type `u32` - found type `&'static str` + = note: expected type `u32` + found reference `&'static str` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0308.stderr b/src/test/ui/error-codes/E0308.stderr index bd9834ceb9fe..0251c3bee6a8 100644 --- a/src/test/ui/error-codes/E0308.stderr +++ b/src/test/ui/error-codes/E0308.stderr @@ -4,8 +4,8 @@ error[E0308]: intrinsic has wrong type LL | fn size_of(); | ^^^^^^^^^^^^^^^^ expected (), found usize | - = note: expected type `extern "rust-intrinsic" fn()` - found type `extern "rust-intrinsic" fn() -> usize` + = note: expected fn pointer `extern "rust-intrinsic" fn()` + found fn pointer `extern "rust-intrinsic" fn() -> usize` error: aborting due to previous error diff --git a/src/test/ui/estr-subtyping.stderr b/src/test/ui/estr-subtyping.stderr index 29f210803dd1..810c52a57066 100644 --- a/src/test/ui/estr-subtyping.stderr +++ b/src/test/ui/estr-subtyping.stderr @@ -7,8 +7,8 @@ LL | wants_uniq(x); | expected struct `std::string::String`, found &str | help: try using a conversion method: `x.to_string()` | - = note: expected type `std::string::String` - found type `&str` + = note: expected struct `std::string::String` + found reference `&str` error: aborting due to previous error diff --git a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr index 4ecd8515ee16..2029cfaf75df 100644 --- a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr +++ b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr @@ -12,8 +12,8 @@ LL | match [5..4, 99..105, 43..44] { LL | [_, 99.., _] => {}, | ^^^^ expected struct `std::ops::Range`, found integer | - = note: expected type `std::ops::Range<{integer}>` - found type `{integer}` + = note: expected struct `std::ops::Range<{integer}>` + found type `{integer}` error: aborting due to 2 previous errors diff --git a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr index 922d26923158..6a88d05837a8 100644 --- a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr +++ b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr @@ -18,8 +18,8 @@ LL | match [5..4, 99..105, 43..44] { LL | [_, 99..] => {}, | ^^^^ expected struct `std::ops::Range`, found integer | - = note: expected type `std::ops::Range<{integer}>` - found type `{integer}` + = note: expected struct `std::ops::Range<{integer}>` + found type `{integer}` error: aborting due to 3 previous errors diff --git a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr index 8907b875f8e1..5c49fbe4c5c9 100644 --- a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr +++ b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr @@ -12,8 +12,8 @@ LL | match [5..4, 99..105, 43..44] { LL | [..9, 99..100, _] => {}, | ^^^ expected struct `std::ops::Range`, found integer | - = note: expected type `std::ops::Range<{integer}>` - found type `{integer}` + = note: expected struct `std::ops::Range<{integer}>` + found type `{integer}` error[E0308]: mismatched types --> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:15 @@ -23,8 +23,8 @@ LL | match [5..4, 99..105, 43..44] { LL | [..9, 99..100, _] => {}, | ^^^^^^^ expected struct `std::ops::Range`, found integer | - = note: expected type `std::ops::Range<{integer}>` - found type `{integer}` + = note: expected struct `std::ops::Range<{integer}>` + found type `{integer}` error: aborting due to 3 previous errors diff --git a/src/test/ui/explicit/explicit-self-lifetime-mismatch.rs b/src/test/ui/explicit/explicit-self-lifetime-mismatch.rs index 9ab8e13893bc..a9a6f50fb8ea 100644 --- a/src/test/ui/explicit/explicit-self-lifetime-mismatch.rs +++ b/src/test/ui/explicit/explicit-self-lifetime-mismatch.rs @@ -7,12 +7,12 @@ impl<'a,'b> Foo<'a,'b> { fn bar(self: Foo<'b,'a> //~^ ERROR mismatched `self` parameter type - //~| expected type `Foo<'a, 'b>` - //~| found type `Foo<'b, 'a>` + //~| expected struct `Foo<'a, 'b>` + //~| found struct `Foo<'b, 'a>` //~| lifetime mismatch //~| ERROR mismatched `self` parameter type - //~| expected type `Foo<'a, 'b>` - //~| found type `Foo<'b, 'a>` + //~| expected struct `Foo<'a, 'b>` + //~| found struct `Foo<'b, 'a>` //~| lifetime mismatch ) {} } diff --git a/src/test/ui/explicit/explicit-self-lifetime-mismatch.stderr b/src/test/ui/explicit/explicit-self-lifetime-mismatch.stderr index cbd6422e5df7..5c976098ae3b 100644 --- a/src/test/ui/explicit/explicit-self-lifetime-mismatch.stderr +++ b/src/test/ui/explicit/explicit-self-lifetime-mismatch.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched `self` parameter type LL | Foo<'b,'a> | ^^^^^^^^^^ lifetime mismatch | - = note: expected type `Foo<'a, 'b>` - found type `Foo<'b, 'a>` + = note: expected struct `Foo<'a, 'b>` + found struct `Foo<'b, 'a>` note: the lifetime `'b` as defined on the impl at 6:9... --> $DIR/explicit-self-lifetime-mismatch.rs:6:9 | @@ -23,8 +23,8 @@ error[E0308]: mismatched `self` parameter type LL | Foo<'b,'a> | ^^^^^^^^^^ lifetime mismatch | - = note: expected type `Foo<'a, 'b>` - found type `Foo<'b, 'a>` + = note: expected struct `Foo<'a, 'b>` + found struct `Foo<'b, 'a>` note: the lifetime `'a` as defined on the impl at 6:6... --> $DIR/explicit-self-lifetime-mismatch.rs:6:6 | diff --git a/src/test/ui/extern/extern-main-fn.stderr b/src/test/ui/extern/extern-main-fn.stderr index 14f064060a62..6f6983d42832 100644 --- a/src/test/ui/extern/extern-main-fn.stderr +++ b/src/test/ui/extern/extern-main-fn.stderr @@ -4,8 +4,8 @@ error[E0580]: main function has wrong type LL | extern fn main() {} | ^^^^^^^^^^^^^^^^ expected "Rust" fn, found "C" fn | - = note: expected type `fn()` - found type `extern "C" fn()` + = note: expected fn pointer `fn()` + found fn pointer `extern "C" fn()` error: aborting due to previous error diff --git a/src/test/ui/extern/extern-types-distinct-types.stderr b/src/test/ui/extern/extern-types-distinct-types.stderr index eb632ee395f2..2e258d687d38 100644 --- a/src/test/ui/extern/extern-types-distinct-types.stderr +++ b/src/test/ui/extern/extern-types-distinct-types.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | r | ^ expected extern type `B`, found extern type `A` | - = note: expected type `&B` - found type `&A` + = note: expected reference `&B` + found reference `&A` error: aborting due to previous error diff --git a/src/test/ui/fn/fn-compare-mismatch.stderr b/src/test/ui/fn/fn-compare-mismatch.stderr index 8915b747b73d..fa74d027f1ea 100644 --- a/src/test/ui/fn/fn-compare-mismatch.stderr +++ b/src/test/ui/fn/fn-compare-mismatch.stderr @@ -21,8 +21,8 @@ error[E0308]: mismatched types LL | let x = f == g; | ^ expected fn item, found a different fn item | - = note: expected type `fn() {main::f}` - found type `fn() {main::g}` + = note: expected fn item `fn() {main::f}` + found fn item `fn() {main::g}` error: aborting due to 2 previous errors diff --git a/src/test/ui/fn/fn-item-type.rs b/src/test/ui/fn/fn-item-type.rs index e71172d72298..3ab4e8f92153 100644 --- a/src/test/ui/fn/fn-item-type.rs +++ b/src/test/ui/fn/fn-item-type.rs @@ -12,8 +12,8 @@ impl Foo for T { /* `foo` is still default here */ } fn main() { eq(foo::, bar::); //~^ ERROR mismatched types - //~| expected type `fn(isize) -> isize {foo::}` - //~| found type `fn(isize) -> isize {bar::}` + //~| expected fn item `fn(isize) -> isize {foo::}` + //~| found fn item `fn(isize) -> isize {bar::}` //~| expected fn item, found a different fn item eq(foo::, foo::); @@ -22,8 +22,8 @@ fn main() { eq(bar::, bar::>); //~^ ERROR mismatched types - //~| expected type `fn(isize) -> isize {bar::}` - //~| found type `fn(isize) -> isize {bar::>}` + //~| expected fn item `fn(isize) -> isize {bar::}` + //~| found fn item `fn(isize) -> isize {bar::>}` //~| expected struct `std::string::String`, found struct `std::vec::Vec` // Make sure we distinguish between trait methods correctly. diff --git a/src/test/ui/fn/fn-item-type.stderr b/src/test/ui/fn/fn-item-type.stderr index d52646c0c4b4..f6c4f735939c 100644 --- a/src/test/ui/fn/fn-item-type.stderr +++ b/src/test/ui/fn/fn-item-type.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | eq(foo::, bar::); | ^^^^^^^^^ expected fn item, found a different fn item | - = note: expected type `fn(isize) -> isize {foo::}` - found type `fn(isize) -> isize {bar::}` + = note: expected fn item `fn(isize) -> isize {foo::}` + found fn item `fn(isize) -> isize {bar::}` error[E0308]: mismatched types --> $DIR/fn-item-type.rs:19:19 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | eq(foo::, foo::); | ^^^^^^^^^ expected u8, found i8 | - = note: expected type `fn(isize) -> isize {foo::}` - found type `fn(isize) -> isize {foo::}` + = note: expected fn item `fn(isize) -> isize {foo::}` + found fn item `fn(isize) -> isize {foo::}` error[E0308]: mismatched types --> $DIR/fn-item-type.rs:23:23 @@ -22,8 +22,8 @@ error[E0308]: mismatched types LL | eq(bar::, bar::>); | ^^^^^^^^^^^^^^ expected struct `std::string::String`, found struct `std::vec::Vec` | - = note: expected type `fn(isize) -> isize {bar::}` - found type `fn(isize) -> isize {bar::>}` + = note: expected fn item `fn(isize) -> isize {bar::}` + found fn item `fn(isize) -> isize {bar::>}` error[E0308]: mismatched types --> $DIR/fn-item-type.rs:30:26 @@ -31,8 +31,8 @@ error[E0308]: mismatched types LL | eq(::foo, ::foo); | ^^^^^^^^^^^^^^^^^ expected u8, found u16 | - = note: expected type `fn() {::foo}` - found type `fn() {::foo}` + = note: expected fn item `fn() {::foo}` + found fn item `fn() {::foo}` error: aborting due to 4 previous errors diff --git a/src/test/ui/fn/fn-trait-formatting.rs b/src/test/ui/fn/fn-trait-formatting.rs index 5c16c1a7e88b..c74b79e3a622 100644 --- a/src/test/ui/fn/fn-trait-formatting.rs +++ b/src/test/ui/fn/fn-trait-formatting.rs @@ -6,15 +6,15 @@ fn main() { let _: () = (box |_: isize| {}) as Box; //~^ ERROR mismatched types //~| expected type `()` - //~| found type `std::boxed::Box` + //~| found struct `std::boxed::Box` let _: () = (box |_: isize, isize| {}) as Box; //~^ ERROR mismatched types //~| expected type `()` - //~| found type `std::boxed::Box` + //~| found struct `std::boxed::Box` let _: () = (box || -> isize { unimplemented!() }) as Box isize>; //~^ ERROR mismatched types //~| expected type `()` - //~| found type `std::boxed::Box isize>` + //~| found struct `std::boxed::Box isize>` needs_fn(1); //~^ ERROR expected a `std::ops::Fn<(isize,)>` closure, found `{integer}` diff --git a/src/test/ui/fn/fn-trait-formatting.stderr b/src/test/ui/fn/fn-trait-formatting.stderr index f891b9c6439b..962a310b875d 100644 --- a/src/test/ui/fn/fn-trait-formatting.stderr +++ b/src/test/ui/fn/fn-trait-formatting.stderr @@ -5,7 +5,7 @@ LL | let _: () = (box |_: isize| {}) as Box; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box` | = note: expected type `()` - found type `std::boxed::Box` + found struct `std::boxed::Box` error[E0308]: mismatched types --> $DIR/fn-trait-formatting.rs:10:17 @@ -14,7 +14,7 @@ LL | let _: () = (box |_: isize, isize| {}) as Box; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box` | = note: expected type `()` - found type `std::boxed::Box` + found struct `std::boxed::Box` error[E0308]: mismatched types --> $DIR/fn-trait-formatting.rs:14:17 @@ -23,7 +23,7 @@ LL | let _: () = (box || -> isize { unimplemented!() }) as Box isize>` + found struct `std::boxed::Box isize>` error[E0277]: expected a `std::ops::Fn<(isize,)>` closure, found `{integer}` --> $DIR/fn-trait-formatting.rs:19:14 diff --git a/src/test/ui/fully-qualified-type/fully-qualified-type-name1.rs b/src/test/ui/fully-qualified-type/fully-qualified-type-name1.rs index 7e5b884103ed..b4f9a38ff350 100644 --- a/src/test/ui/fully-qualified-type/fully-qualified-type-name1.rs +++ b/src/test/ui/fully-qualified-type/fully-qualified-type-name1.rs @@ -4,7 +4,7 @@ fn main() { let x: Option; x = 5; //~^ ERROR mismatched types - //~| expected type `std::option::Option` + //~| expected enum `std::option::Option` //~| found type `{integer}` //~| expected enum `std::option::Option`, found integer } diff --git a/src/test/ui/fully-qualified-type/fully-qualified-type-name1.stderr b/src/test/ui/fully-qualified-type/fully-qualified-type-name1.stderr index e488b1f6b0cb..6a550b93be29 100644 --- a/src/test/ui/fully-qualified-type/fully-qualified-type-name1.stderr +++ b/src/test/ui/fully-qualified-type/fully-qualified-type-name1.stderr @@ -7,7 +7,7 @@ LL | x = 5; | expected enum `std::option::Option`, found integer | help: try using a variant of the expected enum: `Some(5)` | - = note: expected type `std::option::Option` + = note: expected enum `std::option::Option` found type `{integer}` error: aborting due to previous error diff --git a/src/test/ui/fully-qualified-type/fully-qualified-type-name2.rs b/src/test/ui/fully-qualified-type/fully-qualified-type-name2.rs index 21eda1a9012e..af4a633090b0 100644 --- a/src/test/ui/fully-qualified-type/fully-qualified-type-name2.rs +++ b/src/test/ui/fully-qualified-type/fully-qualified-type-name2.rs @@ -11,9 +11,9 @@ mod y { fn bar(x: x::Foo) -> y::Foo { return x; //~^ ERROR mismatched types - //~| expected type `y::Foo` - //~| found type `x::Foo` //~| expected enum `y::Foo`, found enum `x::Foo` + //~| expected enum `y::Foo` + //~| found enum `x::Foo` } fn main() { diff --git a/src/test/ui/fully-qualified-type/fully-qualified-type-name2.stderr b/src/test/ui/fully-qualified-type/fully-qualified-type-name2.stderr index 47bb5e475b47..fe4579f49b91 100644 --- a/src/test/ui/fully-qualified-type/fully-qualified-type-name2.stderr +++ b/src/test/ui/fully-qualified-type/fully-qualified-type-name2.stderr @@ -6,8 +6,8 @@ LL | fn bar(x: x::Foo) -> y::Foo { LL | return x; | ^ expected enum `y::Foo`, found enum `x::Foo` | - = note: expected type `y::Foo` - found type `x::Foo` + = note: expected enum `y::Foo` + found enum `x::Foo` error: aborting due to previous error diff --git a/src/test/ui/fully-qualified-type/fully-qualified-type-name4.rs b/src/test/ui/fully-qualified-type/fully-qualified-type-name4.rs index 88910a7bb20f..c41e6c4c9f03 100644 --- a/src/test/ui/fully-qualified-type/fully-qualified-type-name4.rs +++ b/src/test/ui/fully-qualified-type/fully-qualified-type-name4.rs @@ -5,7 +5,7 @@ use std::option::Option; fn bar(x: usize) -> Option { return x; //~^ ERROR mismatched types - //~| expected type `std::option::Option` + //~| expected enum `std::option::Option` //~| found type `usize` //~| expected enum `std::option::Option`, found usize } diff --git a/src/test/ui/fully-qualified-type/fully-qualified-type-name4.stderr b/src/test/ui/fully-qualified-type/fully-qualified-type-name4.stderr index b341879ab919..26389f467186 100644 --- a/src/test/ui/fully-qualified-type/fully-qualified-type-name4.stderr +++ b/src/test/ui/fully-qualified-type/fully-qualified-type-name4.stderr @@ -6,7 +6,7 @@ LL | fn bar(x: usize) -> Option { LL | return x; | ^ expected enum `std::option::Option`, found usize | - = note: expected type `std::option::Option` + = note: expected enum `std::option::Option` found type `usize` error: aborting due to previous error diff --git a/src/test/ui/generator/type-mismatch-signature-deduction.stderr b/src/test/ui/generator/type-mismatch-signature-deduction.stderr index 35d3f95c3e9e..7cae50f42f9e 100644 --- a/src/test/ui/generator/type-mismatch-signature-deduction.stderr +++ b/src/test/ui/generator/type-mismatch-signature-deduction.stderr @@ -5,7 +5,7 @@ LL | return Ok(6); | ^^^^^ expected i32, found enum `std::result::Result` | = note: expected type `i32` - found type `std::result::Result<{integer}, _>` + found enum `std::result::Result<{integer}, _>` error: aborting due to previous error diff --git a/src/test/ui/generic/generic-arg-mismatch-recover.stderr b/src/test/ui/generic/generic-arg-mismatch-recover.stderr index fe36e807c777..e544cd1bb3a4 100644 --- a/src/test/ui/generic/generic-arg-mismatch-recover.stderr +++ b/src/test/ui/generic/generic-arg-mismatch-recover.stderr @@ -10,8 +10,8 @@ error[E0308]: mismatched types LL | Foo::<'static, 'static, ()>(&0); | ^^ expected (), found integer | - = note: expected type `&'static ()` - found type `&{integer}` + = note: expected reference `&'static ()` + found reference `&{integer}` error[E0107]: wrong number of lifetime arguments: expected 1, found 2 --> $DIR/generic-arg-mismatch-recover.rs:9:20 diff --git a/src/test/ui/generic/generic-type-params-name-repr.rs b/src/test/ui/generic/generic-type-params-name-repr.rs index 7e074aa2a6bd..65d409a98377 100644 --- a/src/test/ui/generic/generic-type-params-name-repr.rs +++ b/src/test/ui/generic/generic-type-params-name-repr.rs @@ -12,40 +12,40 @@ fn main() { // Ensure that the printed type doesn't include the default type params... let _: Foo = (); //~^ ERROR mismatched types - //~| expected type `Foo` - //~| found type `()` //~| expected struct `Foo`, found () + //~| expected struct `Foo` + //~| found type `()` // ...even when they're present, but the same types as the defaults. let _: Foo = (); //~^ ERROR mismatched types - //~| expected type `Foo` - //~| found type `()` //~| expected struct `Foo`, found () + //~| expected struct `Foo` + //~| found type `()` // Including cases where the default is using previous type params. let _: HashMap = (); //~^ ERROR mismatched types - //~| expected type `HashMap` - //~| found type `()` //~| expected struct `HashMap`, found () + //~| expected struct `HashMap` + //~| found type `()` let _: HashMap> = (); //~^ ERROR mismatched types - //~| expected type `HashMap` - //~| found type `()` //~| expected struct `HashMap`, found () + //~| expected struct `HashMap` + //~| found type `()` // But not when there's a different type in between. let _: Foo = (); //~^ ERROR mismatched types - //~| expected type `Foo` - //~| found type `()` //~| expected struct `Foo`, found () + //~| expected struct `Foo` + //~| found type `()` // And don't print <> at all when there's just defaults. let _: Foo = (); //~^ ERROR mismatched types - //~| expected type `Foo` - //~| found type `()` //~| expected struct `Foo`, found () + //~| expected struct `Foo` + //~| found type `()` } diff --git a/src/test/ui/generic/generic-type-params-name-repr.stderr b/src/test/ui/generic/generic-type-params-name-repr.stderr index 2aa9cafb8bf0..86146f7e9bf7 100644 --- a/src/test/ui/generic/generic-type-params-name-repr.stderr +++ b/src/test/ui/generic/generic-type-params-name-repr.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let _: Foo = (); | ^^ expected struct `Foo`, found () | - = note: expected type `Foo` - found type `()` + = note: expected struct `Foo` + found type `()` error[E0308]: mismatched types --> $DIR/generic-type-params-name-repr.rs:20:31 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | let _: Foo = (); | ^^ expected struct `Foo`, found () | - = note: expected type `Foo` - found type `()` + = note: expected struct `Foo` + found type `()` error[E0308]: mismatched types --> $DIR/generic-type-params-name-repr.rs:27:37 @@ -22,8 +22,8 @@ error[E0308]: mismatched types LL | let _: HashMap = (); | ^^ expected struct `HashMap`, found () | - = note: expected type `HashMap` - found type `()` + = note: expected struct `HashMap` + found type `()` error[E0308]: mismatched types --> $DIR/generic-type-params-name-repr.rs:32:51 @@ -31,8 +31,8 @@ error[E0308]: mismatched types LL | let _: HashMap> = (); | ^^ expected struct `HashMap`, found () | - = note: expected type `HashMap` - found type `()` + = note: expected struct `HashMap` + found type `()` error[E0308]: mismatched types --> $DIR/generic-type-params-name-repr.rs:39:31 @@ -40,8 +40,8 @@ error[E0308]: mismatched types LL | let _: Foo = (); | ^^ expected struct `Foo`, found () | - = note: expected type `Foo` - found type `()` + = note: expected struct `Foo` + found type `()` error[E0308]: mismatched types --> $DIR/generic-type-params-name-repr.rs:46:27 @@ -49,8 +49,8 @@ error[E0308]: mismatched types LL | let _: Foo = (); | ^^ expected struct `Foo`, found () | - = note: expected type `Foo` - found type `()` + = note: expected struct `Foo` + found type `()` error: aborting due to 6 previous errors diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr index 8e2b0b8c6004..c8521a54e6c7 100644 --- a/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr @@ -8,8 +8,8 @@ LL | / check! { bound_a_b_ret_a_vs_bound_a_ret_a: (for<'a,'b> fn(&'a u32, &'b u3 LL | | for<'a> fn(&'a u32, &'a u32) -> &'a u32) } | |_________________________________________________________________________________________- in this macro invocation | - = note: expected type `std::option::Option fn(&'a u32, &'b u32) -> &'a u32>` - found type `std::option::Option fn(&'a u32, &'a u32) -> &'a u32>` + = note: expected enum `std::option::Option fn(&'a u32, &'b u32) -> &'a u32>` + found enum `std::option::Option fn(&'a u32, &'a u32) -> &'a u32>` error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr index dbb501813907..3ad802c5450b 100644 --- a/src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr @@ -8,8 +8,8 @@ LL | / check! { bound_a_b_vs_bound_a: (for<'a,'b> fn(&'a u32, &'b u32), LL | | for<'a> fn(&'a u32, &'a u32)) } | |__________________________________________________________________- in this macro invocation | - = note: expected type `std::option::Option fn(&'a u32, &'b u32)>` - found type `std::option::Option fn(&'a u32, &'a u32)>` + = note: expected enum `std::option::Option fn(&'a u32, &'b u32)>` + found enum `std::option::Option fn(&'a u32, &'a u32)>` error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr index db9892b48a6f..3d09633367cd 100644 --- a/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr @@ -8,8 +8,8 @@ LL | / check! { bound_a_vs_free_x: (for<'a> fn(&'a u32), LL | | fn(&'x u32)) } | |___________________________________________- in this macro invocation | - = note: expected type `std::option::Option fn(&'a u32)>` - found type `std::option::Option` + = note: expected enum `std::option::Option fn(&'a u32)>` + found enum `std::option::Option` error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr index e9fb73411bd3..8b623a4c0bea 100644 --- a/src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr @@ -8,8 +8,8 @@ LL | / check! { bound_co_a_b_vs_bound_co_a: (for<'a,'b> fn(Co<'a>, Co<'b>), LL | | for<'a> fn(Co<'a>, Co<'a>)) } | |______________________________________________________________________- in this macro invocation | - = note: expected type `std::option::Option fn(Co<'a>, Co<'b>)>` - found type `std::option::Option fn(Co<'a>, Co<'a>)>` + = note: expected enum `std::option::Option fn(Co<'a>, Co<'b>)>` + found enum `std::option::Option fn(Co<'a>, Co<'a>)>` error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr index d0e80faa68e8..f12bff696913 100644 --- a/src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr @@ -8,8 +8,8 @@ LL | / check! { bound_co_a_co_b_ret_contra_a: (for<'a,'b> fn(Co<'a>, Co<'b>) -> LL | | for<'a> fn(Co<'a>, Co<'a>) -> Contra<'a>) } | |______________________________________________________________________________________- in this macro invocation | - = note: expected type `std::option::Option fn(Co<'a>, Co<'b>) -> Contra<'a>>` - found type `std::option::Option fn(Co<'a>, Co<'a>) -> Contra<'a>>` + = note: expected enum `std::option::Option fn(Co<'a>, Co<'b>) -> Contra<'a>>` + found enum `std::option::Option fn(Co<'a>, Co<'a>) -> Contra<'a>>` error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr index 3605ecf4f866..37ba44cf2e9b 100644 --- a/src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr @@ -8,8 +8,8 @@ LL | / check! { bound_contra_a_contra_b_ret_co_a: (for<'a,'b> fn(Contra<'a>, Con LL | | for<'a> fn(Contra<'a>, Contra<'a>) -> Co<'a>) } | |______________________________________________________________________________________________- in this macro invocation | - = note: expected type `std::option::Option fn(Contra<'a>, Contra<'b>) -> Co<'a>>` - found type `std::option::Option fn(Contra<'a>, Contra<'a>) -> Co<'a>>` + = note: expected enum `std::option::Option fn(Contra<'a>, Contra<'b>) -> Co<'a>>` + found enum `std::option::Option fn(Contra<'a>, Contra<'a>) -> Co<'a>>` error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr index fae6e9b5c89c..a00bbea6d181 100644 --- a/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr @@ -8,8 +8,8 @@ LL | / check! { bound_inv_a_b_vs_bound_inv_a: (for<'a,'b> fn(Inv<'a>, Inv<'b>), LL | | for<'a> fn(Inv<'a>, Inv<'a>)) } | |__________________________________________________________________________- in this macro invocation | - = note: expected type `std::option::Option fn(Inv<'a>, Inv<'b>)>` - found type `std::option::Option fn(Inv<'a>, Inv<'a>)>` + = note: expected enum `std::option::Option fn(Inv<'a>, Inv<'b>)>` + found enum `std::option::Option fn(Inv<'a>, Inv<'a>)>` error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.stderr b/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.stderr index 76d97dd2f585..561f35191767 100644 --- a/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.stderr @@ -8,8 +8,8 @@ LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>), LL | | fn(Inv<'y>)) } | |__________________________________________________- in this macro invocation | - = note: expected type `std::option::Option)>` - found type `std::option::Option)>` + = note: expected enum `std::option::Option)>` + found enum `std::option::Option)>` note: the lifetime `'x` as defined on the function body at 32:20... --> $DIR/hr-subtype.rs:32:20 | @@ -39,8 +39,8 @@ LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>), LL | | fn(Inv<'y>)) } | |__________________________________________________- in this macro invocation | - = note: expected type `std::option::Option)>` - found type `std::option::Option)>` + = note: expected enum `std::option::Option)>` + found enum `std::option::Option)>` note: the lifetime `'x` as defined on the function body at 38:22... --> $DIR/hr-subtype.rs:38:22 | diff --git a/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.stderr b/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.stderr index 74f4212b2468..082627050b35 100644 --- a/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.stderr @@ -8,8 +8,8 @@ LL | / check! { free_x_vs_free_y: (fn(&'x u32), LL | | fn(&'y u32)) } | |__________________________________________- in this macro invocation | - = note: expected type `std::option::Option` - found type `std::option::Option` + = note: expected enum `std::option::Option` + found enum `std::option::Option` note: the lifetime `'x` as defined on the function body at 38:22... --> $DIR/hr-subtype.rs:38:22 | diff --git a/src/test/ui/hrtb/hrtb-exists-forall-fn.stderr b/src/test/ui/hrtb/hrtb-exists-forall-fn.stderr index d893cd606f1e..8534ee99c1fa 100644 --- a/src/test/ui/hrtb/hrtb-exists-forall-fn.stderr +++ b/src/test/ui/hrtb/hrtb-exists-forall-fn.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let _: for<'b> fn(&'b u32) = foo(); | ^^^^^ expected concrete lifetime, found bound lifetime parameter 'b | - = note: expected type `for<'b> fn(&'b u32)` - found type `fn(&u32)` + = note: expected fn pointer `for<'b> fn(&'b u32)` + found fn pointer `fn(&u32)` error: aborting due to previous error diff --git a/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr b/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr index fd6fce938b2c..16847727aef3 100644 --- a/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr +++ b/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr @@ -4,8 +4,8 @@ error[E0271]: type mismatch resolving `for<'r> >::V` + = note: expected struct `Unit4` + found associated type `<_ as Ty<'_>>::V` = note: consider constraining the associated type `<_ as Ty<'_>>::V` to `Unit4` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html @@ -15,8 +15,8 @@ error[E0271]: type mismatch resolving `<[closure@$DIR/issue-62203-hrtb-ice.rs:42 LL | let v = Unit2.m( | ^ expected struct `Unit4`, found struct `Unit3` | - = note: expected type `Unit4` - found type `Unit3` + = note: expected struct `Unit4` + found struct `Unit3` = note: required because of the requirements on the impl of `for<'r> T0<'r, (>::V,)>` for `L<[closure@$DIR/issue-62203-hrtb-ice.rs:42:17: 42:39]>` error: aborting due to 2 previous errors diff --git a/src/test/ui/if/if-no-match-bindings.stderr b/src/test/ui/if/if-no-match-bindings.stderr index 0936f3b9e38e..215e236f6b01 100644 --- a/src/test/ui/if/if-no-match-bindings.stderr +++ b/src/test/ui/if/if-no-match-bindings.stderr @@ -7,8 +7,8 @@ LL | if b_ref() {} | expected bool, found &bool | help: consider dereferencing the borrow: `*b_ref()` | - = note: expected type `bool` - found type `&bool` + = note: expected type `bool` + found reference `&bool` error[E0308]: mismatched types --> $DIR/if-no-match-bindings.rs:19:8 @@ -19,8 +19,8 @@ LL | if b_mut_ref() {} | expected bool, found &mut bool | help: consider dereferencing the borrow: `*b_mut_ref()` | - = note: expected type `bool` - found type `&mut bool` + = note: expected type `bool` + found mutable reference `&mut bool` error[E0308]: mismatched types --> $DIR/if-no-match-bindings.rs:20:8 @@ -31,8 +31,8 @@ LL | if &true {} | expected bool, found &bool | help: consider removing the borrow: `true` | - = note: expected type `bool` - found type `&bool` + = note: expected type `bool` + found reference `&bool` error[E0308]: mismatched types --> $DIR/if-no-match-bindings.rs:21:8 @@ -43,8 +43,8 @@ LL | if &mut true {} | expected bool, found &mut bool | help: consider removing the borrow: `true` | - = note: expected type `bool` - found type `&mut bool` + = note: expected type `bool` + found mutable reference `&mut bool` error[E0308]: mismatched types --> $DIR/if-no-match-bindings.rs:24:11 @@ -55,8 +55,8 @@ LL | while b_ref() {} | expected bool, found &bool | help: consider dereferencing the borrow: `*b_ref()` | - = note: expected type `bool` - found type `&bool` + = note: expected type `bool` + found reference `&bool` error[E0308]: mismatched types --> $DIR/if-no-match-bindings.rs:25:11 @@ -67,8 +67,8 @@ LL | while b_mut_ref() {} | expected bool, found &mut bool | help: consider dereferencing the borrow: `*b_mut_ref()` | - = note: expected type `bool` - found type `&mut bool` + = note: expected type `bool` + found mutable reference `&mut bool` error[E0308]: mismatched types --> $DIR/if-no-match-bindings.rs:26:11 @@ -79,8 +79,8 @@ LL | while &true {} | expected bool, found &bool | help: consider removing the borrow: `true` | - = note: expected type `bool` - found type `&bool` + = note: expected type `bool` + found reference `&bool` error[E0308]: mismatched types --> $DIR/if-no-match-bindings.rs:27:11 @@ -91,8 +91,8 @@ LL | while &mut true {} | expected bool, found &mut bool | help: consider removing the borrow: `true` | - = note: expected type `bool` - found type `&mut bool` + = note: expected type `bool` + found mutable reference `&mut bool` error: aborting due to 8 previous errors diff --git a/src/test/ui/if/if-typeck.stderr b/src/test/ui/if/if-typeck.stderr index 714d3ebcdb01..2bddcc707c6e 100644 --- a/src/test/ui/if/if-typeck.stderr +++ b/src/test/ui/if/if-typeck.stderr @@ -5,7 +5,7 @@ LL | if f { } | ^ expected bool, found fn item | = note: expected type `bool` - found type `fn() {f}` + found fn item `fn() {f}` error: aborting due to previous error diff --git a/src/test/ui/if/ifmt-bad-arg.stderr b/src/test/ui/if/ifmt-bad-arg.stderr index d65ffd850603..2f81c3938efa 100644 --- a/src/test/ui/if/ifmt-bad-arg.stderr +++ b/src/test/ui/if/ifmt-bad-arg.stderr @@ -302,8 +302,8 @@ error[E0308]: mismatched types LL | println!("{} {:.*} {}", 1, 3.2, 4); | ^^^ expected usize, found floating-point number | - = note: expected type `&usize` - found type `&{float}` + = note: expected reference `&usize` + found reference `&{float}` error[E0308]: mismatched types --> $DIR/ifmt-bad-arg.rs:81:35 @@ -311,8 +311,8 @@ error[E0308]: mismatched types LL | println!("{} {:07$.*} {}", 1, 3.2, 4); | ^^^ expected usize, found floating-point number | - = note: expected type `&usize` - found type `&{float}` + = note: expected reference `&usize` + found reference `&{float}` error: aborting due to 36 previous errors diff --git a/src/test/ui/impl-trait/bound-normalization-fail.stderr b/src/test/ui/impl-trait/bound-normalization-fail.stderr index 99c6a8cdd6da..0074ac314178 100644 --- a/src/test/ui/impl-trait/bound-normalization-fail.stderr +++ b/src/test/ui/impl-trait/bound-normalization-fail.stderr @@ -12,8 +12,8 @@ error[E0271]: type mismatch resolving ` as FooLike>::Output == () -> impl FooLike { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found associated type | - = note: expected type `()` - found type `::Assoc` + = note: expected type `()` + found associated type `::Assoc` = note: consider constraining the associated type `::Assoc` to `()` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html = note: the return type of a function must have a statically known size @@ -30,8 +30,8 @@ error[E0271]: type mismatch resolving ` as FooLike>::Output == >() -> impl FooLike { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found associated type | - = note: expected type `()` - found type `>::Assoc` + = note: expected type `()` + found associated type `>::Assoc` = note: consider constraining the associated type `>::Assoc` to `()` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html = note: the return type of a function must have a statically known size diff --git a/src/test/ui/impl-trait/equality2.rs b/src/test/ui/impl-trait/equality2.rs index a01779e8fcd8..29cd67a806d5 100644 --- a/src/test/ui/impl-trait/equality2.rs +++ b/src/test/ui/impl-trait/equality2.rs @@ -25,13 +25,13 @@ fn main() { let _: u32 = hide(0_u32); //~^ ERROR mismatched types //~| expected type `u32` - //~| found type `impl Foo` + //~| found opaque type `impl Foo` //~| expected u32, found opaque type let _: i32 = Leak::leak(hide(0_i32)); //~^ ERROR mismatched types //~| expected type `i32` - //~| found type `::T` + //~| found associated type `::T` //~| expected i32, found associated type let mut x = (hide(0_u32), hide(0_i32)); diff --git a/src/test/ui/impl-trait/equality2.stderr b/src/test/ui/impl-trait/equality2.stderr index e30e2626e9f3..de85f5f6eec9 100644 --- a/src/test/ui/impl-trait/equality2.stderr +++ b/src/test/ui/impl-trait/equality2.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let _: u32 = hide(0_u32); | ^^^^^^^^^^^ expected u32, found opaque type | - = note: expected type `u32` - found type `impl Foo` + = note: expected type `u32` + found opaque type `impl Foo` error[E0308]: mismatched types --> $DIR/equality2.rs:31:18 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | let _: i32 = Leak::leak(hide(0_i32)); | ^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found associated type | - = note: expected type `i32` - found type `::T` + = note: expected type `i32` + found associated type `::T` = note: consider constraining the associated type `::T` to `i32` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html @@ -24,8 +24,8 @@ error[E0308]: mismatched types LL | x = (x.1, | ^^^ expected u32, found i32 | - = note: expected type `impl Foo` (u32) - found type `impl Foo` (i32) + = note: expected opaque type `impl Foo` (u32) + found opaque type `impl Foo` (i32) error[E0308]: mismatched types --> $DIR/equality2.rs:41:10 @@ -33,8 +33,8 @@ error[E0308]: mismatched types LL | x.0); | ^^^ expected i32, found u32 | - = note: expected type `impl Foo` (i32) - found type `impl Foo` (u32) + = note: expected opaque type `impl Foo` (i32) + found opaque type `impl Foo` (u32) error: aborting due to 4 previous errors diff --git a/src/test/ui/impl-trait/impl-generic-mismatch-ab.stderr b/src/test/ui/impl-trait/impl-generic-mismatch-ab.stderr index 7cb4677a2b19..638a0093fb21 100644 --- a/src/test/ui/impl-trait/impl-generic-mismatch-ab.stderr +++ b/src/test/ui/impl-trait/impl-generic-mismatch-ab.stderr @@ -9,8 +9,8 @@ LL | fn foo(&self, a: &impl Debug, b: &B) { } | | | expected type parameter | - = note: expected type `fn(&(), &B, &impl Debug)` - found type `fn(&(), &impl Debug, &B)` + = note: expected fn pointer `fn(&(), &B, &impl Debug)` + found fn pointer `fn(&(), &impl Debug, &B)` = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters diff --git a/src/test/ui/impl-trait/trait_type.stderr b/src/test/ui/impl-trait/trait_type.stderr index 151dc6816215..d95b62e469e8 100644 --- a/src/test/ui/impl-trait/trait_type.stderr +++ b/src/test/ui/impl-trait/trait_type.stderr @@ -4,8 +4,8 @@ error[E0053]: method `fmt` has an incompatible type for trait LL | fn fmt(&self, x: &str) -> () { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ in mutability | - = note: expected type `fn(&MyType, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` - found type `fn(&MyType, &str)` + = note: expected fn pointer `fn(&MyType, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` + found fn pointer `fn(&MyType, &str)` error[E0050]: method `fmt` has 1 parameter but the declaration in trait `std::fmt::Display::fmt` has 2 --> $DIR/trait_type.rs:12:11 diff --git a/src/test/ui/impl-trait/universal-mismatched-type.stderr b/src/test/ui/impl-trait/universal-mismatched-type.stderr index ae20a5aa8838..3ffa2b55712e 100644 --- a/src/test/ui/impl-trait/universal-mismatched-type.stderr +++ b/src/test/ui/impl-trait/universal-mismatched-type.stderr @@ -8,8 +8,8 @@ LL | fn foo(x: impl Debug) -> String { LL | x | ^ expected struct `std::string::String`, found type parameter `impl Debug` | - = note: expected type `std::string::String` - found type `impl Debug` + = note: expected struct `std::string::String` + found type parameter `impl Debug` = help: type parameters must be constrained to match other types = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters diff --git a/src/test/ui/impl-trait/universal-two-impl-traits.stderr b/src/test/ui/impl-trait/universal-two-impl-traits.stderr index f540d319a279..7c120235fd17 100644 --- a/src/test/ui/impl-trait/universal-two-impl-traits.stderr +++ b/src/test/ui/impl-trait/universal-two-impl-traits.stderr @@ -9,8 +9,8 @@ LL | let mut a = x; LL | a = y; | ^ expected type parameter `impl Debug`, found a different type parameter `impl Debug` | - = note: expected type `impl Debug` (type parameter `impl Debug`) - found type `impl Debug` (type parameter `impl Debug`) + = note: expected type parameter `impl Debug` (type parameter `impl Debug`) + found type parameter `impl Debug` (type parameter `impl Debug`) = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters diff --git a/src/test/ui/include-macros/mismatched-types.stderr b/src/test/ui/include-macros/mismatched-types.stderr index 33204f1cfce9..79f12356a6de 100644 --- a/src/test/ui/include-macros/mismatched-types.stderr +++ b/src/test/ui/include-macros/mismatched-types.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let b: &[u8] = include_str!("file.txt"); | ^^^^^^^^^^^^^^^^^^^^^^^^ expected slice, found str | - = note: expected type `&[u8]` - found type `&'static str` + = note: expected reference `&[u8]` + found reference `&'static str` error[E0308]: mismatched types --> $DIR/mismatched-types.rs:3:19 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | let s: &str = include_bytes!("file.txt"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected str, found array of 0 elements | - = note: expected type `&str` - found type `&'static [u8; 0]` + = note: expected reference `&str` + found reference `&'static [u8; 0]` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-10176.rs b/src/test/ui/issues/issue-10176.rs index ff0619b489d7..9f42214a5051 100644 --- a/src/test/ui/issues/issue-10176.rs +++ b/src/test/ui/issues/issue-10176.rs @@ -2,7 +2,7 @@ fn f() -> isize { (return 1, return 2) //~^ ERROR mismatched types //~| expected type `isize` -//~| found type `(!, !)` +//~| found tuple `(!, !)` //~| expected isize, found tuple } diff --git a/src/test/ui/issues/issue-10176.stderr b/src/test/ui/issues/issue-10176.stderr index 45482447ebe2..7cab5a1f7c3a 100644 --- a/src/test/ui/issues/issue-10176.stderr +++ b/src/test/ui/issues/issue-10176.stderr @@ -7,7 +7,7 @@ LL | (return 1, return 2) | ^^^^^^^^^^^^^^^^^^^^ expected isize, found tuple | = note: expected type `isize` - found type `(!, !)` + found tuple `(!, !)` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-10764.stderr b/src/test/ui/issues/issue-10764.stderr index c5f1887b7965..b0bafc9942ee 100644 --- a/src/test/ui/issues/issue-10764.stderr +++ b/src/test/ui/issues/issue-10764.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | fn main() { f(bar) } | ^^^ expected "Rust" fn, found "C" fn | - = note: expected type `fn()` - found type `extern "C" fn() {bar}` + = note: expected fn pointer `fn()` + found fn item `extern "C" fn() {bar}` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-11374.stderr b/src/test/ui/issues/issue-11374.stderr index 8d7e6c81f4fc..a5b9de0a0a31 100644 --- a/src/test/ui/issues/issue-11374.stderr +++ b/src/test/ui/issues/issue-11374.stderr @@ -7,8 +7,8 @@ LL | c.read_to(v); | expected &mut [u8], found struct `std::vec::Vec` | help: consider mutably borrowing here: `&mut v` | - = note: expected type `&mut [u8]` - found type `std::vec::Vec<_>` + = note: expected mutable reference `&mut [u8]` + found struct `std::vec::Vec<_>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-11515.stderr b/src/test/ui/issues/issue-11515.stderr index 0ab0c7dba0b7..b53563d7b653 100644 --- a/src/test/ui/issues/issue-11515.stderr +++ b/src/test/ui/issues/issue-11515.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let test = box Test { func: closure }; | ^^^^^^^ expected trait `std::ops::FnMut`, found trait `std::ops::Fn` | - = note: expected type `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>` - found type `std::boxed::Box<(dyn std::ops::Fn() + 'static)>` + = note: expected struct `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>` + found struct `std::boxed::Box<(dyn std::ops::Fn() + 'static)>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-11844.stderr b/src/test/ui/issues/issue-11844.stderr index 1c4321f1b4ab..1b22d6f45cf2 100644 --- a/src/test/ui/issues/issue-11844.stderr +++ b/src/test/ui/issues/issue-11844.stderr @@ -6,8 +6,8 @@ LL | match a { LL | Ok(a) => | ^^^^^ expected enum `std::option::Option`, found enum `std::result::Result` | - = note: expected type `std::option::Option>` - found type `std::result::Result<_, _>` + = note: expected enum `std::option::Option>` + found enum `std::result::Result<_, _>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-12552.stderr b/src/test/ui/issues/issue-12552.stderr index 6eaac1b35776..ecafef259d3c 100644 --- a/src/test/ui/issues/issue-12552.stderr +++ b/src/test/ui/issues/issue-12552.stderr @@ -6,8 +6,8 @@ LL | match t { LL | Some(k) => match k { | ^^^^^^^ expected enum `std::result::Result`, found enum `std::option::Option` | - = note: expected type `std::result::Result<_, {integer}>` - found type `std::option::Option<_>` + = note: expected enum `std::result::Result<_, {integer}>` + found enum `std::option::Option<_>` error[E0308]: mismatched types --> $DIR/issue-12552.rs:9:5 @@ -15,8 +15,8 @@ error[E0308]: mismatched types LL | None => () | ^^^^ expected enum `std::result::Result`, found enum `std::option::Option` | - = note: expected type `std::result::Result<_, {integer}>` - found type `std::option::Option<_>` + = note: expected enum `std::result::Result<_, {integer}>` + found enum `std::option::Option<_>` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-12997-2.stderr b/src/test/ui/issues/issue-12997-2.stderr index df8c936b8242..bac69075c83b 100644 --- a/src/test/ui/issues/issue-12997-2.stderr +++ b/src/test/ui/issues/issue-12997-2.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | fn bar(x: isize) { } | ^^^^^^^^^^^^^^^^^^^^ expected isize, found mutable reference | - = note: expected type `isize` - found type `&mut test::Bencher` + = note: expected type `isize` + found mutable reference `&mut test::Bencher` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-13033.rs b/src/test/ui/issues/issue-13033.rs index e5274eb823d4..7631831a81a5 100644 --- a/src/test/ui/issues/issue-13033.rs +++ b/src/test/ui/issues/issue-13033.rs @@ -7,8 +7,8 @@ struct Baz; impl Foo for Baz { fn bar(&mut self, other: &dyn Foo) {} //~^ ERROR method `bar` has an incompatible type for trait - //~| expected type `fn(&mut Baz, &mut dyn Foo)` - //~| found type `fn(&mut Baz, &dyn Foo)` + //~| expected fn pointer `fn(&mut Baz, &mut dyn Foo)` + //~| found fn pointer `fn(&mut Baz, &dyn Foo)` } fn main() {} diff --git a/src/test/ui/issues/issue-13033.stderr b/src/test/ui/issues/issue-13033.stderr index 195d0c39b298..a8473c8a5241 100644 --- a/src/test/ui/issues/issue-13033.stderr +++ b/src/test/ui/issues/issue-13033.stderr @@ -7,8 +7,8 @@ LL | fn bar(&mut self, other: &mut dyn Foo); LL | fn bar(&mut self, other: &dyn Foo) {} | ^^^^^^^^ types differ in mutability | - = note: expected type `fn(&mut Baz, &mut dyn Foo)` - found type `fn(&mut Baz, &dyn Foo)` + = note: expected fn pointer `fn(&mut Baz, &mut dyn Foo)` + found fn pointer `fn(&mut Baz, &dyn Foo)` help: consider change the type to match the mutability in trait | LL | fn bar(&mut self, other: &mut dyn Foo) {} diff --git a/src/test/ui/issues/issue-13407.stderr b/src/test/ui/issues/issue-13407.stderr index ddd99e6a3c9a..4c3e481564f2 100644 --- a/src/test/ui/issues/issue-13407.stderr +++ b/src/test/ui/issues/issue-13407.stderr @@ -10,8 +10,8 @@ error[E0308]: mismatched types LL | A::C = 1; | ^ expected struct `A::C`, found integer | - = note: expected type `A::C` - found type `{integer}` + = note: expected struct `A::C` + found type `{integer}` error[E0070]: invalid left-hand side expression --> $DIR/issue-13407.rs:6:5 diff --git a/src/test/ui/issues/issue-13446.stderr b/src/test/ui/issues/issue-13446.stderr index a27bfeda64c2..80a32cd276a9 100644 --- a/src/test/ui/issues/issue-13446.stderr +++ b/src/test/ui/issues/issue-13446.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | static VEC: [u32; 256] = vec![]; | ^^^^^^ expected array of 256 elements, found struct `std::vec::Vec` | - = note: expected type `[u32; 256]` - found type `std::vec::Vec<_>` + = note: expected array `[u32; 256]` + found struct `std::vec::Vec<_>` = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-13466.rs b/src/test/ui/issues/issue-13466.rs index c285bfa107d4..411e7cbeebd7 100644 --- a/src/test/ui/issues/issue-13466.rs +++ b/src/test/ui/issues/issue-13466.rs @@ -7,14 +7,14 @@ pub fn main() { let _x: usize = match Some(1) { Ok(u) => u, //~^ ERROR mismatched types - //~| expected type `std::option::Option<{integer}>` - //~| found type `std::result::Result<_, _>` + //~| expected enum `std::option::Option<{integer}>` + //~| found enum `std::result::Result<_, _>` //~| expected enum `std::option::Option`, found enum `std::result::Result` Err(e) => panic!(e) //~^ ERROR mismatched types - //~| expected type `std::option::Option<{integer}>` - //~| found type `std::result::Result<_, _>` + //~| expected enum `std::option::Option<{integer}>` + //~| found enum `std::result::Result<_, _>` //~| expected enum `std::option::Option`, found enum `std::result::Result` }; } diff --git a/src/test/ui/issues/issue-13466.stderr b/src/test/ui/issues/issue-13466.stderr index 66255891f469..fc20615757aa 100644 --- a/src/test/ui/issues/issue-13466.stderr +++ b/src/test/ui/issues/issue-13466.stderr @@ -6,8 +6,8 @@ LL | let _x: usize = match Some(1) { LL | Ok(u) => u, | ^^^^^ expected enum `std::option::Option`, found enum `std::result::Result` | - = note: expected type `std::option::Option<{integer}>` - found type `std::result::Result<_, _>` + = note: expected enum `std::option::Option<{integer}>` + found enum `std::result::Result<_, _>` error[E0308]: mismatched types --> $DIR/issue-13466.rs:14:9 @@ -18,8 +18,8 @@ LL | let _x: usize = match Some(1) { LL | Err(e) => panic!(e) | ^^^^^^ expected enum `std::option::Option`, found enum `std::result::Result` | - = note: expected type `std::option::Option<{integer}>` - found type `std::result::Result<_, _>` + = note: expected enum `std::option::Option<{integer}>` + found enum `std::result::Result<_, _>` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-13853.stderr b/src/test/ui/issues/issue-13853.stderr index 67721356208c..cdb261a238e5 100644 --- a/src/test/ui/issues/issue-13853.stderr +++ b/src/test/ui/issues/issue-13853.stderr @@ -7,8 +7,8 @@ LL | fn nodes<'a, I: Iterator>(&self) -> I LL | self.iter() | ^^^^^^^^^^^ expected type parameter `I`, found struct `std::slice::Iter` | - = note: expected type `I` - found type `std::slice::Iter<'_, N>` + = note: expected type parameter `I` + found struct `std::slice::Iter<'_, N>` = help: type parameters must be constrained to match other types = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters @@ -27,8 +27,8 @@ LL | iterate(graph); | expected reference, found struct `std::vec::Vec` | help: consider borrowing here: `&graph` | - = note: expected type `&_` - found type `std::vec::Vec` + = note: expected reference `&_` + found struct `std::vec::Vec` error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-14541.rs b/src/test/ui/issues/issue-14541.rs index 705c3d326c65..e8d44a4a9f88 100644 --- a/src/test/ui/issues/issue-14541.rs +++ b/src/test/ui/issues/issue-14541.rs @@ -4,9 +4,9 @@ struct Vec3 { y: f32, z: f32 } fn make(v: Vec2) { let Vec3 { y: _, z: _ } = v; //~^ ERROR mismatched types - //~| expected type `Vec2` - //~| found type `Vec3` //~| expected struct `Vec2`, found struct `Vec3` + //~| expected struct `Vec2` + //~| found struct `Vec3` } fn main() { } diff --git a/src/test/ui/issues/issue-14541.stderr b/src/test/ui/issues/issue-14541.stderr index aa0ae5ce4434..e7cae883d6bf 100644 --- a/src/test/ui/issues/issue-14541.stderr +++ b/src/test/ui/issues/issue-14541.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let Vec3 { y: _, z: _ } = v; | ^^^^^^^^^^^^^^^^^^^ expected struct `Vec2`, found struct `Vec3` | - = note: expected type `Vec2` - found type `Vec3` + = note: expected struct `Vec2` + found struct `Vec3` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-15094.rs b/src/test/ui/issues/issue-15094.rs index dea85df5efe0..71b75a6e7e00 100644 --- a/src/test/ui/issues/issue-15094.rs +++ b/src/test/ui/issues/issue-15094.rs @@ -10,8 +10,8 @@ impl ops::FnOnce<(),> for Debuger { type Output = (); fn call_once(self, _args: ()) { //~^ ERROR `call_once` has an incompatible type for trait - //~| expected type `extern "rust-call" fn - //~| found type `fn + //~| expected fn pointer `extern "rust-call" fn + //~| found fn pointer `fn println!("{:?}", self.x); } } diff --git a/src/test/ui/issues/issue-15094.stderr b/src/test/ui/issues/issue-15094.stderr index 07e147132f7d..7b392fe1ac71 100644 --- a/src/test/ui/issues/issue-15094.stderr +++ b/src/test/ui/issues/issue-15094.stderr @@ -4,8 +4,8 @@ error[E0053]: method `call_once` has an incompatible type for trait LL | fn call_once(self, _args: ()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected "rust-call" fn, found "Rust" fn | - = note: expected type `extern "rust-call" fn(Debuger, ())` - found type `fn(Debuger, ())` + = note: expected fn pointer `extern "rust-call" fn(Debuger, ())` + found fn pointer `fn(Debuger, ())` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-15783.rs b/src/test/ui/issues/issue-15783.rs index 5189f550cfbd..61cb0093b1c4 100644 --- a/src/test/ui/issues/issue-15783.rs +++ b/src/test/ui/issues/issue-15783.rs @@ -7,8 +7,8 @@ fn main() { let x = Some(&[name]); let msg = foo(x); //~^ ERROR mismatched types - //~| expected type `std::option::Option<&[&str]>` - //~| found type `std::option::Option<&[&str; 1]>` + //~| expected enum `std::option::Option<&[&str]>` + //~| found enum `std::option::Option<&[&str; 1]>` //~| expected slice, found array of 1 element assert_eq!(msg, 3); } diff --git a/src/test/ui/issues/issue-15783.stderr b/src/test/ui/issues/issue-15783.stderr index 1d54b2830d6c..f60655b7a34d 100644 --- a/src/test/ui/issues/issue-15783.stderr +++ b/src/test/ui/issues/issue-15783.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let msg = foo(x); | ^ expected slice, found array of 1 element | - = note: expected type `std::option::Option<&[&str]>` - found type `std::option::Option<&[&str; 1]>` + = note: expected enum `std::option::Option<&[&str]>` + found enum `std::option::Option<&[&str; 1]>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-15896.rs b/src/test/ui/issues/issue-15896.rs index 3054af7b9309..1a0a7b4b8e6d 100644 --- a/src/test/ui/issues/issue-15896.rs +++ b/src/test/ui/issues/issue-15896.rs @@ -10,9 +10,9 @@ fn main() { E::B( Tau{t: x}, //~^ ERROR mismatched types - //~| expected type `main::R` - //~| found type `main::Tau` //~| expected enum `main::R`, found struct `main::Tau` + //~| expected enum `main::R` + //~| found struct `main::Tau` _) => x, }; } diff --git a/src/test/ui/issues/issue-15896.stderr b/src/test/ui/issues/issue-15896.stderr index de9757d5d32e..a8227bb19c23 100644 --- a/src/test/ui/issues/issue-15896.stderr +++ b/src/test/ui/issues/issue-15896.stderr @@ -7,8 +7,8 @@ LL | E::B( LL | Tau{t: x}, | ^^^^^^^^^ expected enum `main::R`, found struct `main::Tau` | - = note: expected type `main::R` - found type `main::Tau` + = note: expected enum `main::R` + found struct `main::Tau` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-16338.rs b/src/test/ui/issues/issue-16338.rs index 7567740f28b0..321b3576cd61 100644 --- a/src/test/ui/issues/issue-16338.rs +++ b/src/test/ui/issues/issue-16338.rs @@ -6,5 +6,5 @@ struct Slice { fn main() { let Slice { data: data, len: len } = "foo"; //~^ ERROR mismatched types - //~| found type `Slice<_>` + //~| found struct `Slice<_>` } diff --git a/src/test/ui/issues/issue-16338.stderr b/src/test/ui/issues/issue-16338.stderr index af8c39d24ec0..cae09c215190 100644 --- a/src/test/ui/issues/issue-16338.stderr +++ b/src/test/ui/issues/issue-16338.stderr @@ -5,7 +5,7 @@ LL | let Slice { data: data, len: len } = "foo"; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected str, found struct `Slice` | = note: expected type `str` - found type `Slice<_>` + found struct `Slice<_>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-16401.rs b/src/test/ui/issues/issue-16401.rs index 7135b7d82efa..9ed730ba2113 100644 --- a/src/test/ui/issues/issue-16401.rs +++ b/src/test/ui/issues/issue-16401.rs @@ -8,7 +8,7 @@ fn main() { Slice { data: data, len: len } => (), //~^ ERROR mismatched types //~| expected type `()` - //~| found type `Slice<_>` + //~| found struct `Slice<_>` //~| expected (), found struct `Slice` _ => unreachable!() } diff --git a/src/test/ui/issues/issue-16401.stderr b/src/test/ui/issues/issue-16401.stderr index 1779d0befd87..e5bacc36de5e 100644 --- a/src/test/ui/issues/issue-16401.stderr +++ b/src/test/ui/issues/issue-16401.stderr @@ -7,7 +7,7 @@ LL | Slice { data: data, len: len } => (), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `Slice` | = note: expected type `()` - found type `Slice<_>` + found struct `Slice<_>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17033.rs b/src/test/ui/issues/issue-17033.rs index d39b5683fee9..be80dce13715 100644 --- a/src/test/ui/issues/issue-17033.rs +++ b/src/test/ui/issues/issue-17033.rs @@ -1,6 +1,6 @@ fn f<'r>(p: &'r mut fn(p: &mut ())) { (*p)(()) //~ ERROR mismatched types - //~| expected type `&mut ()` + //~| expected mutable reference `&mut ()` //~| found type `()` //~| expected &mut (), found () } diff --git a/src/test/ui/issues/issue-17033.stderr b/src/test/ui/issues/issue-17033.stderr index ba78aa2bc6a5..c84b30d721f0 100644 --- a/src/test/ui/issues/issue-17033.stderr +++ b/src/test/ui/issues/issue-17033.stderr @@ -7,8 +7,8 @@ LL | (*p)(()) | expected &mut (), found () | help: consider mutably borrowing here: `&mut ()` | - = note: expected type `&mut ()` - found type `()` + = note: expected mutable reference `&mut ()` + found type `()` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17728.stderr b/src/test/ui/issues/issue-17728.stderr index 945dfc26b206..527168dbe6cc 100644 --- a/src/test/ui/issues/issue-17728.stderr +++ b/src/test/ui/issues/issue-17728.stderr @@ -24,8 +24,8 @@ LL | | _ => None LL | | } | |_____- `match` arms have incompatible types | - = note: expected type `RoomDirection` - found type `std::option::Option<_>` + = note: expected enum `RoomDirection` + found enum `std::option::Option<_>` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-17740.rs b/src/test/ui/issues/issue-17740.rs index b47568400c3b..3b868555fc52 100644 --- a/src/test/ui/issues/issue-17740.rs +++ b/src/test/ui/issues/issue-17740.rs @@ -5,12 +5,12 @@ struct Foo<'a> { impl <'a> Foo<'a>{ fn bar(self: &mut Foo) { //~^ mismatched `self` parameter type - //~| expected type `Foo<'a>` - //~| found type `Foo<'_>` + //~| expected struct `Foo<'a>` + //~| found struct `Foo<'_>` //~| lifetime mismatch //~| mismatched `self` parameter type - //~| expected type `Foo<'a>` - //~| found type `Foo<'_>` + //~| expected struct `Foo<'a>` + //~| found struct `Foo<'_>` //~| lifetime mismatch } } diff --git a/src/test/ui/issues/issue-17740.stderr b/src/test/ui/issues/issue-17740.stderr index d392ea3c1b86..cd1d7f821c70 100644 --- a/src/test/ui/issues/issue-17740.stderr +++ b/src/test/ui/issues/issue-17740.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched `self` parameter type LL | fn bar(self: &mut Foo) { | ^^^^^^^^ lifetime mismatch | - = note: expected type `Foo<'a>` - found type `Foo<'_>` + = note: expected struct `Foo<'a>` + found struct `Foo<'_>` note: the anonymous lifetime #2 defined on the method body at 6:5... --> $DIR/issue-17740.rs:6:5 | @@ -29,8 +29,8 @@ error[E0308]: mismatched `self` parameter type LL | fn bar(self: &mut Foo) { | ^^^^^^^^ lifetime mismatch | - = note: expected type `Foo<'a>` - found type `Foo<'_>` + = note: expected struct `Foo<'a>` + found struct `Foo<'_>` note: the lifetime `'a` as defined on the impl at 5:7... --> $DIR/issue-17740.rs:5:7 | diff --git a/src/test/ui/issues/issue-17905-2.stderr b/src/test/ui/issues/issue-17905-2.stderr index 04be62dc661b..f347c26f066e 100644 --- a/src/test/ui/issues/issue-17905-2.stderr +++ b/src/test/ui/issues/issue-17905-2.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched `self` parameter type LL | fn say(self: &Pair<&str, isize>) { | ^^^^^^^^^^^^^^^^^^ lifetime mismatch | - = note: expected type `Pair<&str, _>` - found type `Pair<&str, _>` + = note: expected struct `Pair<&str, _>` + found struct `Pair<&str, _>` note: the anonymous lifetime #2 defined on the method body at 8:5... --> $DIR/issue-17905-2.rs:8:5 | @@ -27,8 +27,8 @@ error[E0308]: mismatched `self` parameter type LL | fn say(self: &Pair<&str, isize>) { | ^^^^^^^^^^^^^^^^^^ lifetime mismatch | - = note: expected type `Pair<&str, _>` - found type `Pair<&str, _>` + = note: expected struct `Pair<&str, _>` + found struct `Pair<&str, _>` note: the lifetime `'_` as defined on the impl at 5:5... --> $DIR/issue-17905-2.rs:5:5 | diff --git a/src/test/ui/issues/issue-20225.stderr b/src/test/ui/issues/issue-20225.stderr index 40093b13edfe..63b0451e01a1 100644 --- a/src/test/ui/issues/issue-20225.stderr +++ b/src/test/ui/issues/issue-20225.stderr @@ -6,8 +6,8 @@ LL | impl<'a, T> Fn<(&'a T,)> for Foo { LL | extern "rust-call" fn call(&self, (_,): (T,)) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter `T` | - = note: expected type `extern "rust-call" fn(&Foo, (&'a T,))` - found type `extern "rust-call" fn(&Foo, (T,))` + = note: expected fn pointer `extern "rust-call" fn(&Foo, (&'a T,))` + found fn pointer `extern "rust-call" fn(&Foo, (T,))` = help: type parameters must be constrained to match other types = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters @@ -19,8 +19,8 @@ LL | impl<'a, T> FnMut<(&'a T,)> for Foo { LL | extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter `T` | - = note: expected type `extern "rust-call" fn(&mut Foo, (&'a T,))` - found type `extern "rust-call" fn(&mut Foo, (T,))` + = note: expected fn pointer `extern "rust-call" fn(&mut Foo, (&'a T,))` + found fn pointer `extern "rust-call" fn(&mut Foo, (T,))` = help: type parameters must be constrained to match other types = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters @@ -33,8 +33,8 @@ LL | impl<'a, T> FnOnce<(&'a T,)> for Foo { LL | extern "rust-call" fn call_once(self, (_,): (T,)) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter `T` | - = note: expected type `extern "rust-call" fn(Foo, (&'a T,))` - found type `extern "rust-call" fn(Foo, (T,))` + = note: expected fn pointer `extern "rust-call" fn(Foo, (&'a T,))` + found fn pointer `extern "rust-call" fn(Foo, (T,))` = help: type parameters must be constrained to match other types = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters diff --git a/src/test/ui/issues/issue-21332.stderr b/src/test/ui/issues/issue-21332.stderr index 693b2be6c009..ace3e014647c 100644 --- a/src/test/ui/issues/issue-21332.stderr +++ b/src/test/ui/issues/issue-21332.stderr @@ -4,8 +4,8 @@ error[E0053]: method `next` has an incompatible type for trait LL | fn next(&mut self) -> Result { Ok(7) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::option::Option`, found enum `std::result::Result` | - = note: expected type `fn(&mut S) -> std::option::Option` - found type `fn(&mut S) -> std::result::Result` + = note: expected fn pointer `fn(&mut S) -> std::option::Option` + found fn pointer `fn(&mut S) -> std::result::Result` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-23589.stderr b/src/test/ui/issues/issue-23589.stderr index c3b419fe939c..8d58095ceff3 100644 --- a/src/test/ui/issues/issue-23589.stderr +++ b/src/test/ui/issues/issue-23589.stderr @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | let v: Vec(&str) = vec!['1', '2']; | ^^^ expected &str, found char | - = note: expected type `&str` - found type `char` + = note: expected reference `&str` + found type `char` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-24036.stderr b/src/test/ui/issues/issue-24036.stderr index fa9935fcf619..04817f2596ab 100644 --- a/src/test/ui/issues/issue-24036.stderr +++ b/src/test/ui/issues/issue-24036.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | x = |c| c + 1; | ^^^^^^^^^ expected closure, found a different closure | - = note: expected type `[closure@$DIR/issue-24036.rs:2:17: 2:26]` - found type `[closure@$DIR/issue-24036.rs:3:9: 3:18]` + = note: expected closure `[closure@$DIR/issue-24036.rs:2:17: 2:26]` + found closure `[closure@$DIR/issue-24036.rs:3:9: 3:18]` = note: no two closures, even if identical, have the same type = help: consider boxing your closure and/or using it as a trait object @@ -23,7 +23,7 @@ LL | | }; | |_____- `match` arms have incompatible types | = note: expected type `[closure@$DIR/issue-24036.rs:9:14: 9:23]` - found type `[closure@$DIR/issue-24036.rs:10:14: 10:23]` + found closure `[closure@$DIR/issue-24036.rs:10:14: 10:23]` = note: no two closures, even if identical, have the same type = help: consider boxing your closure and/or using it as a trait object diff --git a/src/test/ui/issues/issue-24204.stderr b/src/test/ui/issues/issue-24204.stderr index ace5b5f72fc6..3eb1f1b4f6e8 100644 --- a/src/test/ui/issues/issue-24204.stderr +++ b/src/test/ui/issues/issue-24204.stderr @@ -7,8 +7,8 @@ LL | trait Trait: Sized { LL | fn test>(b: i32) -> T where T::A: MultiDispatch { T::new(b) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type parameter `T`, found associated type | - = note: expected type `T` - found type `<::A as MultiDispatch>::O` + = note: expected type parameter `T` + found associated type `<::A as MultiDispatch>::O` = note: you might be missing a type parameter or trait bound error: aborting due to previous error diff --git a/src/test/ui/issues/issue-24322.stderr b/src/test/ui/issues/issue-24322.stderr index def373cf2c0a..fb0c7a0d8090 100644 --- a/src/test/ui/issues/issue-24322.stderr +++ b/src/test/ui/issues/issue-24322.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let x: &fn(&B) -> u32 = &B::func; | ^^^^^^^^ expected fn pointer, found fn item | - = note: expected type `&for<'r> fn(&'r B) -> u32` - found type `&for<'r> fn(&'r B) -> u32 {B::func}` + = note: expected reference `&for<'r> fn(&'r B) -> u32` + found reference `&for<'r> fn(&'r B) -> u32 {B::func}` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-24819.stderr b/src/test/ui/issues/issue-24819.stderr index 5f1cd0a255ff..1166a887f869 100644 --- a/src/test/ui/issues/issue-24819.stderr +++ b/src/test/ui/issues/issue-24819.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | foo(&mut v); | ^^^^^^ expected struct `std::collections::HashSet`, found struct `std::vec::Vec` | - = note: expected type `&mut std::collections::HashSet` - found type `&mut std::vec::Vec<_>` + = note: expected mutable reference `&mut std::collections::HashSet` + found mutable reference `&mut std::vec::Vec<_>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-27008.rs b/src/test/ui/issues/issue-27008.rs index b37ea6f01ba4..3b271a2a35bd 100644 --- a/src/test/ui/issues/issue-27008.rs +++ b/src/test/ui/issues/issue-27008.rs @@ -3,7 +3,7 @@ struct S; fn main() { let b = [0; S]; //~^ ERROR mismatched types - //~| expected type `usize` - //~| found type `S` //~| expected usize, found struct `S` + //~| expected type `usize` + //~| found struct `S` } diff --git a/src/test/ui/issues/issue-27008.stderr b/src/test/ui/issues/issue-27008.stderr index c45d757ff0a3..598ee741a5c8 100644 --- a/src/test/ui/issues/issue-27008.stderr +++ b/src/test/ui/issues/issue-27008.stderr @@ -5,7 +5,7 @@ LL | let b = [0; S]; | ^ expected usize, found struct `S` | = note: expected type `usize` - found type `S` + found struct `S` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-29084.rs b/src/test/ui/issues/issue-29084.rs index 86b348d82859..4710a594b310 100644 --- a/src/test/ui/issues/issue-29084.rs +++ b/src/test/ui/issues/issue-29084.rs @@ -5,7 +5,7 @@ macro_rules! foo { //~^ ERROR mismatched types //~| expected u8, found &mut u8 //~| expected type `u8` - //~| found type `&mut u8` + //~| found mutable reference `&mut u8` }} } diff --git a/src/test/ui/issues/issue-29084.stderr b/src/test/ui/issues/issue-29084.stderr index cb4bf6a08ef8..0a238761fc60 100644 --- a/src/test/ui/issues/issue-29084.stderr +++ b/src/test/ui/issues/issue-29084.stderr @@ -7,8 +7,8 @@ LL | bar(&mut $d); LL | foo!(0u8); | ---------- in this macro invocation | - = note: expected type `u8` - found type `&mut u8` + = note: expected type `u8` + found mutable reference `&mut u8` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-2951.rs b/src/test/ui/issues/issue-2951.rs index cc52dab02459..1798e3e75192 100644 --- a/src/test/ui/issues/issue-2951.rs +++ b/src/test/ui/issues/issue-2951.rs @@ -2,9 +2,9 @@ fn foo(x: T, y: U) { let mut xx = x; xx = y; //~^ ERROR mismatched types - //~| expected type `T` - //~| found type `U` //~| expected type parameter `T`, found type parameter `U` + //~| expected type parameter `T` + //~| found type parameter `U` } fn main() { diff --git a/src/test/ui/issues/issue-2951.stderr b/src/test/ui/issues/issue-2951.stderr index 414571752904..b966b3393891 100644 --- a/src/test/ui/issues/issue-2951.stderr +++ b/src/test/ui/issues/issue-2951.stderr @@ -9,8 +9,8 @@ LL | let mut xx = x; LL | xx = y; | ^ expected type parameter `T`, found type parameter `U` | - = note: expected type `T` - found type `U` + = note: expected type parameter `T` + found type parameter `U` = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters diff --git a/src/test/ui/issues/issue-30225.stderr b/src/test/ui/issues/issue-30225.stderr index 64a56e3237dc..27a567548ba2 100644 --- a/src/test/ui/issues/issue-30225.stderr +++ b/src/test/ui/issues/issue-30225.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | u = v; // mark $0 and $1 in a subtype relationship | ^ expected struct `A`, found struct `B` | - = note: expected type `A` - found type `B` + = note: expected struct `A` + found struct `B` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-31173.rs b/src/test/ui/issues/issue-31173.rs index 6df80664575f..26195318380d 100644 --- a/src/test/ui/issues/issue-31173.rs +++ b/src/test/ui/issues/issue-31173.rs @@ -10,7 +10,7 @@ pub fn get_tok(it: &mut IntoIter) { .cloned() //~^ ERROR type mismatch resolving //~| expected type `u8` - //~| found type `&_` + //~| found reference `&_` .collect(); //~ ERROR no method named `collect` } diff --git a/src/test/ui/issues/issue-31173.stderr b/src/test/ui/issues/issue-31173.stderr index 6d03b7810939..0cc64d2f9c1a 100644 --- a/src/test/ui/issues/issue-31173.stderr +++ b/src/test/ui/issues/issue-31173.stderr @@ -4,8 +4,8 @@ error[E0271]: type mismatch resolving `, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>` in the current scope --> $DIR/issue-31173.rs:14:10 diff --git a/src/test/ui/issues/issue-32323.stderr b/src/test/ui/issues/issue-32323.stderr index 9c11a02923c8..e7ad46a4aeff 100644 --- a/src/test/ui/issues/issue-32323.stderr +++ b/src/test/ui/issues/issue-32323.stderr @@ -6,8 +6,8 @@ LL | pub fn f<'a, T: Tr<'a>>() -> >::Out {} | | | implicitly returns `()` as its body has no tail or `return` expression | - = note: expected type `>::Out` - found type `()` + = note: expected associated type `>::Out` + found type `()` = note: consider constraining the associated type `>::Out` to `()` or calling a method that returns `>::Out` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html diff --git a/src/test/ui/issues/issue-33504.stderr b/src/test/ui/issues/issue-33504.stderr index 7af555eaa2ce..758f86d3db85 100644 --- a/src/test/ui/issues/issue-33504.stderr +++ b/src/test/ui/issues/issue-33504.stderr @@ -5,7 +5,7 @@ LL | let Test = 1; | ^^^^ expected integer, found struct `Test` | = note: expected type `{integer}` - found type `Test` + found struct `Test` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-33941.stderr b/src/test/ui/issues/issue-33941.stderr index 596921e526d9..734ae78f362d 100644 --- a/src/test/ui/issues/issue-33941.stderr +++ b/src/test/ui/issues/issue-33941.stderr @@ -4,8 +4,8 @@ error[E0271]: type mismatch resolving ` as std::iter::Iterator>::Item == &_` --> $DIR/issue-33941.rs:4:14 @@ -13,8 +13,8 @@ error[E0271]: type mismatch resolving `>` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-34334.stderr b/src/test/ui/issues/issue-34334.stderr index a3749487ac92..c68056a8bd71 100644 --- a/src/test/ui/issues/issue-34334.stderr +++ b/src/test/ui/issues/issue-34334.stderr @@ -32,7 +32,7 @@ LL | let sr: Vec<(u32, _, _) = vec![]; | ^^^^^^ expected bool, found struct `std::vec::Vec` | = note: expected type `bool` - found type `std::vec::Vec<_>` + found struct `std::vec::Vec<_>` = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error[E0070]: invalid left-hand side expression diff --git a/src/test/ui/issues/issue-35241.stderr b/src/test/ui/issues/issue-35241.stderr index 586146cbaa4e..4a52a292ef30 100644 --- a/src/test/ui/issues/issue-35241.stderr +++ b/src/test/ui/issues/issue-35241.stderr @@ -11,8 +11,8 @@ LL | fn test() -> Foo { Foo } | | help: use parentheses to instantiate this tuple struct: `Foo(_)` | expected `Foo` because of return type | - = note: expected type `Foo` - found type `fn(u32) -> Foo {Foo}` + = note: expected struct `Foo` + found fn item `fn(u32) -> Foo {Foo}` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-35869.stderr b/src/test/ui/issues/issue-35869.stderr index 4ef840d019f1..f70a9c8818a4 100644 --- a/src/test/ui/issues/issue-35869.stderr +++ b/src/test/ui/issues/issue-35869.stderr @@ -7,8 +7,8 @@ LL | fn foo(_: fn(u8) -> ()); LL | fn foo(_: fn(u16) -> ()) {} | ^^^^^^^^^^^^^ expected u8, found u16 | - = note: expected type `fn(fn(u8))` - found type `fn(fn(u16))` + = note: expected fn pointer `fn(fn(u8))` + found fn pointer `fn(fn(u16))` error[E0053]: method `bar` has an incompatible type for trait --> $DIR/issue-35869.rs:13:15 @@ -19,8 +19,8 @@ LL | fn bar(_: Option); LL | fn bar(_: Option) {} | ^^^^^^^^^^^ expected u8, found u16 | - = note: expected type `fn(std::option::Option)` - found type `fn(std::option::Option)` + = note: expected fn pointer `fn(std::option::Option)` + found fn pointer `fn(std::option::Option)` error[E0053]: method `baz` has an incompatible type for trait --> $DIR/issue-35869.rs:15:15 @@ -31,8 +31,8 @@ LL | fn baz(_: (u8, u16)); LL | fn baz(_: (u16, u16)) {} | ^^^^^^^^^^ expected u8, found u16 | - = note: expected type `fn((u8, u16))` - found type `fn((u16, u16))` + = note: expected fn pointer `fn((u8, u16))` + found fn pointer `fn((u16, u16))` error[E0053]: method `qux` has an incompatible type for trait --> $DIR/issue-35869.rs:17:17 @@ -43,8 +43,8 @@ LL | fn qux() -> u8; LL | fn qux() -> u16 { 5u16 } | ^^^ expected u8, found u16 | - = note: expected type `fn() -> u8` - found type `fn() -> u16` + = note: expected fn pointer `fn() -> u8` + found fn pointer `fn() -> u16` error: aborting due to 4 previous errors diff --git a/src/test/ui/issues/issue-3680.rs b/src/test/ui/issues/issue-3680.rs index 3604203082d8..64050c72f2ca 100644 --- a/src/test/ui/issues/issue-3680.rs +++ b/src/test/ui/issues/issue-3680.rs @@ -2,8 +2,8 @@ fn main() { match None { Err(_) => () //~^ ERROR mismatched types - //~| expected type `std::option::Option<_>` - //~| found type `std::result::Result<_, _>` + //~| expected enum `std::option::Option<_>` + //~| found enum `std::result::Result<_, _>` //~| expected enum `std::option::Option`, found enum `std::result::Result` } } diff --git a/src/test/ui/issues/issue-3680.stderr b/src/test/ui/issues/issue-3680.stderr index 51903cfadab1..8856f0e3a484 100644 --- a/src/test/ui/issues/issue-3680.stderr +++ b/src/test/ui/issues/issue-3680.stderr @@ -6,8 +6,8 @@ LL | match None { LL | Err(_) => () | ^^^^^^ expected enum `std::option::Option`, found enum `std::result::Result` | - = note: expected type `std::option::Option<_>` - found type `std::result::Result<_, _>` + = note: expected enum `std::option::Option<_>` + found enum `std::result::Result<_, _>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-37026.stderr b/src/test/ui/issues/issue-37026.stderr index 1f81264ffdb4..239f0a181908 100644 --- a/src/test/ui/issues/issue-37026.stderr +++ b/src/test/ui/issues/issue-37026.stderr @@ -5,7 +5,7 @@ LL | let empty_struct::XEmpty2 = (); | ^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `empty_struct::XEmpty2` | = note: expected type `()` - found type `empty_struct::XEmpty2` + found struct `empty_struct::XEmpty2` error[E0308]: mismatched types --> $DIR/issue-37026.rs:7:9 @@ -14,7 +14,7 @@ LL | let empty_struct::XEmpty6(..) = (); | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `empty_struct::XEmpty6` | = note: expected type `()` - found type `empty_struct::XEmpty6` + found struct `empty_struct::XEmpty6` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-37884.stderr b/src/test/ui/issues/issue-37884.stderr index 8e75d7be066a..61cb3d7c58f3 100644 --- a/src/test/ui/issues/issue-37884.stderr +++ b/src/test/ui/issues/issue-37884.stderr @@ -9,8 +9,8 @@ LL | | Some(&mut self.0) LL | | } | |_____^ lifetime mismatch | - = note: expected type `fn(&mut RepeatMut<'a, T>) -> std::option::Option<&mut T>` - found type `fn(&'a mut RepeatMut<'a, T>) -> std::option::Option<&mut T>` + = note: expected fn pointer `fn(&mut RepeatMut<'a, T>) -> std::option::Option<&mut T>` + found fn pointer `fn(&'a mut RepeatMut<'a, T>) -> std::option::Option<&mut T>` note: the anonymous lifetime #1 defined on the method body at 6:5... --> $DIR/issue-37884.rs:6:5 | diff --git a/src/test/ui/issues/issue-38940.stderr b/src/test/ui/issues/issue-38940.stderr index 4851c01a347b..707fcc7e919c 100644 --- a/src/test/ui/issues/issue-38940.stderr +++ b/src/test/ui/issues/issue-38940.stderr @@ -12,8 +12,8 @@ error[E0308]: mismatched types LL | let x: &Bottom = &t; | ^^ expected struct `Bottom`, found struct `Top` | - = note: expected type `&Bottom` - found type `&Top` + = note: expected reference `&Bottom` + found reference `&Top` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-39970.stderr b/src/test/ui/issues/issue-39970.stderr index f15f771fa9f6..8bc62dd1b84b 100644 --- a/src/test/ui/issues/issue-39970.stderr +++ b/src/test/ui/issues/issue-39970.stderr @@ -7,8 +7,8 @@ LL | fn visit() {} LL | <() as Visit>::visit(); | ^^^^^^^^^^^^^^^^^^^^ expected &(), found () | - = note: expected type `&()` - found type `()` + = note: expected reference `&()` + found type `()` = note: required because of the requirements on the impl of `Visit` for `()` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-40000.stderr b/src/test/ui/issues/issue-40000.stderr index c48fb24ea17d..983fdb13083a 100644 --- a/src/test/ui/issues/issue-40000.stderr +++ b/src/test/ui/issues/issue-40000.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | foo(bar); | ^^^ expected concrete lifetime, found bound lifetime parameter | - = note: expected type `std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r i32) + 'static)>` - found type `std::boxed::Box` + = note: expected struct `std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r i32) + 'static)>` + found struct `std::boxed::Box` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-40749.rs b/src/test/ui/issues/issue-40749.rs index 14908c3653e2..87ff5a650feb 100644 --- a/src/test/ui/issues/issue-40749.rs +++ b/src/test/ui/issues/issue-40749.rs @@ -2,5 +2,5 @@ fn main() { [0; ..10]; //~^ ERROR mismatched types //~| expected type `usize` - //~| found type `std::ops::RangeTo<{integer}>` + //~| found struct `std::ops::RangeTo<{integer}>` } diff --git a/src/test/ui/issues/issue-40749.stderr b/src/test/ui/issues/issue-40749.stderr index be050d4470c0..67d5d6be640b 100644 --- a/src/test/ui/issues/issue-40749.stderr +++ b/src/test/ui/issues/issue-40749.stderr @@ -5,7 +5,7 @@ LL | [0; ..10]; | ^^^^ expected usize, found struct `std::ops::RangeTo` | = note: expected type `usize` - found type `std::ops::RangeTo<{integer}>` + found struct `std::ops::RangeTo<{integer}>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-41742.stderr b/src/test/ui/issues/issue-41742.stderr index f205abf55768..a1dae867ae6f 100644 --- a/src/test/ui/issues/issue-41742.stderr +++ b/src/test/ui/issues/issue-41742.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | H["?"].f(); | ^^^ expected u32, found reference | - = note: expected type `u32` - found type `&'static str` + = note: expected type `u32` + found reference `&'static str` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-43420-no-over-suggest.stderr b/src/test/ui/issues/issue-43420-no-over-suggest.stderr index 7a3722e4bd72..4d61788c347d 100644 --- a/src/test/ui/issues/issue-43420-no-over-suggest.stderr +++ b/src/test/ui/issues/issue-43420-no-over-suggest.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | foo(&a); | ^^ expected slice, found struct `std::vec::Vec` | - = note: expected type `&[u16]` - found type `&std::vec::Vec` + = note: expected reference `&[u16]` + found reference `&std::vec::Vec` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-4517.rs b/src/test/ui/issues/issue-4517.rs index bbe81f3fc782..569fdc1662a7 100644 --- a/src/test/ui/issues/issue-4517.rs +++ b/src/test/ui/issues/issue-4517.rs @@ -5,6 +5,6 @@ fn main() { bar(foo); //~^ ERROR mismatched types //~| expected type `usize` - //~| found type `[u8; 4]` + //~| found array `[u8; 4]` //~| expected usize, found array of 4 elements } diff --git a/src/test/ui/issues/issue-4517.stderr b/src/test/ui/issues/issue-4517.stderr index 7d88e5504409..0f45e91d6f56 100644 --- a/src/test/ui/issues/issue-4517.stderr +++ b/src/test/ui/issues/issue-4517.stderr @@ -5,7 +5,7 @@ LL | bar(foo); | ^^^ expected usize, found array of 4 elements | = note: expected type `usize` - found type `[u8; 4]` + found array `[u8; 4]` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-46112.stderr b/src/test/ui/issues/issue-46112.stderr index 07e90c567480..30ec6a966ceb 100644 --- a/src/test/ui/issues/issue-46112.stderr +++ b/src/test/ui/issues/issue-46112.stderr @@ -7,7 +7,7 @@ LL | fn main() { test(Ok(())); } | expected enum `std::option::Option`, found () | help: try using a variant of the expected enum: `Some(())` | - = note: expected type `std::option::Option<()>` + = note: expected enum `std::option::Option<()>` found type `()` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-46302.stderr b/src/test/ui/issues/issue-46302.stderr index 8eb3a4dda34e..221d4b6d67f7 100644 --- a/src/test/ui/issues/issue-46302.stderr +++ b/src/test/ui/issues/issue-46302.stderr @@ -7,8 +7,8 @@ LL | let u: &str = if true { s[..2] } else { s }; | expected &str, found str | help: consider borrowing here: `&s[..2]` | - = note: expected type `&str` - found type `str` + = note: expected reference `&str` + found type `str` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.stderr b/src/test/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.stderr index 1eeca3e75b00..dd6bef5c102c 100644 --- a/src/test/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.stderr +++ b/src/test/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.stderr @@ -7,8 +7,8 @@ LL | light_flows_our_war_of_mocking_words(behold as usize); | expected &usize, found usize | help: consider borrowing here: `&(behold as usize)` | - = note: expected type `&usize` - found type `usize` + = note: expected reference `&usize` + found type `usize` error[E0308]: mismatched types --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:14:42 @@ -19,8 +19,8 @@ LL | light_flows_our_war_of_mocking_words(with_tears + 4); | expected &usize, found usize | help: consider borrowing here: `&(with_tears + 4)` | - = note: expected type `&usize` - found type `usize` + = note: expected reference `&usize` + found type `usize` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-48364.stderr b/src/test/ui/issues/issue-48364.stderr index 7a1ba5bb1936..4e4e0e7ed94a 100644 --- a/src/test/ui/issues/issue-48364.stderr +++ b/src/test/ui/issues/issue-48364.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | b"".starts_with(stringify!(foo)) | ^^^^^^^^^^^^^^^ expected slice, found str | - = note: expected type `&[u8]` - found type `&'static str` + = note: expected reference `&[u8]` + found reference `&'static str` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-48838.stderr b/src/test/ui/issues/issue-48838.stderr index 3007d67336b5..684e518c36f9 100644 --- a/src/test/ui/issues/issue-48838.stderr +++ b/src/test/ui/issues/issue-48838.stderr @@ -5,7 +5,7 @@ LL | Square = |x| x, | ^^^^^ expected isize, found closure | = note: expected type `isize` - found type `[closure@$DIR/issue-48838.rs:2:14: 2:19]` + found closure `[closure@$DIR/issue-48838.rs:2:14: 2:19]` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-4968.rs b/src/test/ui/issues/issue-4968.rs index 383b9ecd466f..634bd698d770 100644 --- a/src/test/ui/issues/issue-4968.rs +++ b/src/test/ui/issues/issue-4968.rs @@ -5,6 +5,6 @@ fn main() { match 42 { A => () } //~^ ERROR mismatched types //~| expected type `{integer}` - //~| found type `(isize, isize)` + //~| found tuple `(isize, isize)` //~| expected integer, found tuple } diff --git a/src/test/ui/issues/issue-4968.stderr b/src/test/ui/issues/issue-4968.stderr index a925783723b4..35435d0e6181 100644 --- a/src/test/ui/issues/issue-4968.stderr +++ b/src/test/ui/issues/issue-4968.stderr @@ -5,7 +5,7 @@ LL | match 42 { A => () } | ^ expected integer, found tuple | = note: expected type `{integer}` - found type `(isize, isize)` + found tuple `(isize, isize)` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-50600.stderr b/src/test/ui/issues/issue-50600.stderr index 2d97c2781c2d..8278b0af9f28 100644 --- a/src/test/ui/issues/issue-50600.stderr +++ b/src/test/ui/issues/issue-50600.stderr @@ -5,7 +5,7 @@ LL | fn([u8; |x: u8| {}]), | ^^^^^^^^^^ expected usize, found closure | = note: expected type `usize` - found type `[closure@$DIR/issue-50600.rs:2:13: 2:23]` + found closure `[closure@$DIR/issue-50600.rs:2:13: 2:23]` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-50688.stderr b/src/test/ui/issues/issue-50688.stderr index 13eec8361ba8..bb69744803d2 100644 --- a/src/test/ui/issues/issue-50688.stderr +++ b/src/test/ui/issues/issue-50688.stderr @@ -5,7 +5,7 @@ LL | [1; || {}]; | ^^^^^ expected usize, found closure | = note: expected type `usize` - found type `[closure@$DIR/issue-50688.rs:2:9: 2:14]` + found closure `[closure@$DIR/issue-50688.rs:2:9: 2:14]` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-5100.rs b/src/test/ui/issues/issue-5100.rs index 505dfbb27de1..8f6928bf3798 100644 --- a/src/test/ui/issues/issue-5100.rs +++ b/src/test/ui/issues/issue-5100.rs @@ -7,41 +7,41 @@ fn main() { match (true, false) { A::B => (), //~^ ERROR mismatched types -//~| expected type `(bool, bool)` -//~| found type `A` //~| expected tuple, found enum `A` +//~| expected tuple `(bool, bool)` +//~| found enum `A` _ => () } match (true, false) { (true, false, false) => () //~^ ERROR mismatched types -//~| expected type `(bool, bool)` -//~| found type `(_, _, _)` //~| expected a tuple with 2 elements, found one with 3 elements +//~| expected tuple `(bool, bool)` +//~| found tuple `(_, _, _)` } match (true, false) { (true, false, false) => () //~^ ERROR mismatched types -//~| expected type `(bool, bool)` -//~| found type `(_, _, _)` //~| expected a tuple with 2 elements, found one with 3 elements +//~| expected tuple `(bool, bool)` +//~| found tuple `(_, _, _)` } match (true, false) { box (true, false) => () //~^ ERROR mismatched types -//~| expected type `(bool, bool)` -//~| found type `std::boxed::Box<_>` +//~| expected tuple `(bool, bool)` +//~| found struct `std::boxed::Box<_>` } match (true, false) { &(true, false) => () //~^ ERROR mismatched types -//~| expected type `(bool, bool)` -//~| found type `&_` //~| expected tuple, found reference +//~| expected tuple `(bool, bool)` +//~| found reference `&_` } diff --git a/src/test/ui/issues/issue-5100.stderr b/src/test/ui/issues/issue-5100.stderr index b50d24671a85..60d94478b3b8 100644 --- a/src/test/ui/issues/issue-5100.stderr +++ b/src/test/ui/issues/issue-5100.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | A::B => (), | ^^^^ expected tuple, found enum `A` | - = note: expected type `(bool, bool)` - found type `A` + = note: expected tuple `(bool, bool)` + found enum `A` error[E0308]: mismatched types --> $DIR/issue-5100.rs:17:9 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | (true, false, false) => () | ^^^^^^^^^^^^^^^^^^^^ expected a tuple with 2 elements, found one with 3 elements | - = note: expected type `(bool, bool)` - found type `(_, _, _)` + = note: expected tuple `(bool, bool)` + found tuple `(_, _, _)` error[E0308]: mismatched types --> $DIR/issue-5100.rs:25:9 @@ -22,8 +22,8 @@ error[E0308]: mismatched types LL | (true, false, false) => () | ^^^^^^^^^^^^^^^^^^^^ expected a tuple with 2 elements, found one with 3 elements | - = note: expected type `(bool, bool)` - found type `(_, _, _)` + = note: expected tuple `(bool, bool)` + found tuple `(_, _, _)` error[E0308]: mismatched types --> $DIR/issue-5100.rs:33:9 @@ -33,8 +33,8 @@ LL | match (true, false) { LL | box (true, false) => () | ^^^^^^^^^^^^^^^^^ expected tuple, found struct `std::boxed::Box` | - = note: expected type `(bool, bool)` - found type `std::boxed::Box<_>` + = note: expected tuple `(bool, bool)` + found struct `std::boxed::Box<_>` error[E0308]: mismatched types --> $DIR/issue-5100.rs:40:9 @@ -42,8 +42,8 @@ error[E0308]: mismatched types LL | &(true, false) => () | ^^^^^^^^^^^^^^ expected tuple, found reference | - = note: expected type `(bool, bool)` - found type `&_` + = note: expected tuple `(bool, bool)` + found reference `&_` error[E0618]: expected function, found `(char, char)` --> $DIR/issue-5100.rs:48:14 diff --git a/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr b/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr index bf4535714791..94178d512109 100644 --- a/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr +++ b/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr @@ -7,7 +7,7 @@ LL | missing_discourses()? | | help: try removing this `?` | expected enum `std::result::Result`, found isize | - = note: expected type `std::result::Result` + = note: expected enum `std::result::Result` found type `isize` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-5216.stderr b/src/test/ui/issues/issue-5216.stderr index ccfe7e04a2cf..21d9333735cc 100644 --- a/src/test/ui/issues/issue-5216.stderr +++ b/src/test/ui/issues/issue-5216.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | pub static C: S = S(f); | ^ expected struct `std::boxed::Box`, found fn item | - = note: expected type `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>` - found type `fn() {f}` + = note: expected struct `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>` + found fn item `fn() {f}` error[E0308]: mismatched types --> $DIR/issue-5216.rs:8:19 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | pub static D: T = g; | ^ expected struct `std::boxed::Box`, found fn item | - = note: expected type `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>` - found type `fn() {g}` + = note: expected struct `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>` + found fn item `fn() {g}` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-52533-1.stderr b/src/test/ui/issues/issue-52533-1.stderr index c719c00ef223..dd37d3e55938 100644 --- a/src/test/ui/issues/issue-52533-1.stderr +++ b/src/test/ui/issues/issue-52533-1.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | gimme(|x, y| y) | ^ lifetime mismatch | - = note: expected type `&Foo<'_, '_, u32>` - found type `&Foo<'_, '_, u32>` + = note: expected reference `&Foo<'_, '_, u32>` + found reference `&Foo<'_, '_, u32>` note: the anonymous lifetime #4 defined on the body at 9:11... --> $DIR/issue-52533-1.rs:9:11 | diff --git a/src/test/ui/issues/issue-53348.rs b/src/test/ui/issues/issue-53348.rs index 733413f0e171..83e5ddc48261 100644 --- a/src/test/ui/issues/issue-53348.rs +++ b/src/test/ui/issues/issue-53348.rs @@ -10,7 +10,7 @@ fn main() { a = *i.to_string(); //~^ ERROR mismatched types //~| NOTE expected struct `std::string::String`, found str - //~| NOTE expected type + //~| NOTE expected struct v2.push(a); } } diff --git a/src/test/ui/issues/issue-53348.stderr b/src/test/ui/issues/issue-53348.stderr index ca07b1de4359..949d9a2f47d3 100644 --- a/src/test/ui/issues/issue-53348.stderr +++ b/src/test/ui/issues/issue-53348.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | a = *i.to_string(); | ^^^^^^^^^^^^^^ expected struct `std::string::String`, found str | - = note: expected type `std::string::String` - found type `str` + = note: expected struct `std::string::String` + found type `str` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-5358-1.rs b/src/test/ui/issues/issue-5358-1.rs index 6b23be2030de..f5e32e78d879 100644 --- a/src/test/ui/issues/issue-5358-1.rs +++ b/src/test/ui/issues/issue-5358-1.rs @@ -5,9 +5,9 @@ fn main() { match S(Either::Left(5)) { Either::Right(_) => {} //~^ ERROR mismatched types - //~| expected type `S` - //~| found type `Either<_, _>` //~| expected struct `S`, found enum `Either` + //~| expected struct `S` + //~| found enum `Either<_, _>` _ => {} } } diff --git a/src/test/ui/issues/issue-5358-1.stderr b/src/test/ui/issues/issue-5358-1.stderr index 649a0c1581a6..ec79d874d033 100644 --- a/src/test/ui/issues/issue-5358-1.stderr +++ b/src/test/ui/issues/issue-5358-1.stderr @@ -6,8 +6,8 @@ LL | match S(Either::Left(5)) { LL | Either::Right(_) => {} | ^^^^^^^^^^^^^^^^ expected struct `S`, found enum `Either` | - = note: expected type `S` - found type `Either<_, _>` + = note: expected struct `S` + found enum `Either<_, _>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-53692.stderr b/src/test/ui/issues/issue-53692.stderr index 2928d4461c5e..e3f2cb8c4101 100644 --- a/src/test/ui/issues/issue-53692.stderr +++ b/src/test/ui/issues/issue-53692.stderr @@ -7,8 +7,8 @@ LL | let items_clone: Vec = ref_items.clone(); | expected struct `std::vec::Vec`, found &[i32] | help: try using a conversion method: `ref_items.to_vec()` | - = note: expected type `std::vec::Vec` - found type `&[i32]` + = note: expected struct `std::vec::Vec` + found reference `&[i32]` error[E0308]: mismatched types --> $DIR/issue-53692.rs:11:30 @@ -19,8 +19,8 @@ LL | let string: String = s.clone(); | expected struct `std::string::String`, found &str | help: try using a conversion method: `s.to_string()` | - = note: expected type `std::string::String` - found type `&str` + = note: expected struct `std::string::String` + found reference `&str` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-56943.stderr b/src/test/ui/issues/issue-56943.stderr index 27202051524c..fc6370b2d31c 100644 --- a/src/test/ui/issues/issue-56943.stderr +++ b/src/test/ui/issues/issue-56943.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let _: issue_56943::S = issue_56943::S2; | ^^^^^^^^^^^^^^^ expected struct `issue_56943::S`, found struct `issue_56943::S2` | - = note: expected type `issue_56943::S` - found type `issue_56943::S2` + = note: expected struct `issue_56943::S` + found struct `issue_56943::S2` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-57741-1.stderr b/src/test/ui/issues/issue-57741-1.stderr index d36424b83b4e..db6fa9db8ff4 100644 --- a/src/test/ui/issues/issue-57741-1.stderr +++ b/src/test/ui/issues/issue-57741-1.stderr @@ -6,8 +6,8 @@ LL | let y = match x { LL | S::A { a } | S::B { b: a } => a, | ^^^^^^^^^^ expected struct `std::boxed::Box`, found enum `S` | - = note: expected type `std::boxed::Box` - found type `S` + = note: expected struct `std::boxed::Box` + found enum `S` error[E0308]: mismatched types --> $DIR/issue-57741-1.rs:14:22 @@ -17,8 +17,8 @@ LL | let y = match x { LL | S::A { a } | S::B { b: a } => a, | ^^^^^^^^^^^^^ expected struct `std::boxed::Box`, found enum `S` | - = note: expected type `std::boxed::Box` - found type `S` + = note: expected struct `std::boxed::Box` + found enum `S` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-57741.stderr b/src/test/ui/issues/issue-57741.stderr index a26b1d20ca3c..c36dea7bf554 100644 --- a/src/test/ui/issues/issue-57741.stderr +++ b/src/test/ui/issues/issue-57741.stderr @@ -9,8 +9,8 @@ LL | let y = match x { LL | T::A(a) | T::B(a) => a, | ^^^^^^^ expected struct `std::boxed::Box`, found enum `T` | - = note: expected type `std::boxed::Box` - found type `T` + = note: expected struct `std::boxed::Box` + found enum `T` error[E0308]: mismatched types --> $DIR/issue-57741.rs:20:19 @@ -23,8 +23,8 @@ LL | let y = match x { LL | T::A(a) | T::B(a) => a, | ^^^^^^^ expected struct `std::boxed::Box`, found enum `T` | - = note: expected type `std::boxed::Box` - found type `T` + = note: expected struct `std::boxed::Box` + found enum `T` error[E0308]: mismatched types --> $DIR/issue-57741.rs:27:9 @@ -37,8 +37,8 @@ LL | let y = match x { LL | S::A { a } | S::B { b: a } => a, | ^^^^^^^^^^ expected struct `std::boxed::Box`, found enum `S` | - = note: expected type `std::boxed::Box` - found type `S` + = note: expected struct `std::boxed::Box` + found enum `S` error[E0308]: mismatched types --> $DIR/issue-57741.rs:27:22 @@ -51,8 +51,8 @@ LL | let y = match x { LL | S::A { a } | S::B { b: a } => a, | ^^^^^^^^^^^^^ expected struct `std::boxed::Box`, found enum `S` | - = note: expected type `std::boxed::Box` - found type `S` + = note: expected struct `std::boxed::Box` + found enum `S` error: aborting due to 4 previous errors diff --git a/src/test/ui/issues/issue-59488.stderr b/src/test/ui/issues/issue-59488.stderr index 2397d583488e..35ada71a1f12 100644 --- a/src/test/ui/issues/issue-59488.stderr +++ b/src/test/ui/issues/issue-59488.stderr @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | foo > 12; | ^^ expected fn item, found integer | - = note: expected type `fn() -> i32 {foo}` - found type `i32` + = note: expected fn item `fn() -> i32 {foo}` + found type `i32` error[E0369]: binary operation `>` cannot be applied to type `fn(i64) -> i64 {bar}` --> $DIR/issue-59488.rs:18:9 @@ -31,8 +31,8 @@ error[E0308]: mismatched types LL | bar > 13; | ^^ expected fn item, found integer | - = note: expected type `fn(i64) -> i64 {bar}` - found type `i64` + = note: expected fn item `fn(i64) -> i64 {bar}` + found type `i64` error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}` --> $DIR/issue-59488.rs:22:9 @@ -67,8 +67,8 @@ error[E0308]: mismatched types LL | foo > bar; | ^^^ expected fn item, found a different fn item | - = note: expected type `fn() -> i32 {foo}` - found type `fn(i64) -> i64 {bar}` + = note: expected fn item `fn() -> i32 {foo}` + found fn item `fn(i64) -> i64 {bar}` error[E0369]: binary operation `==` cannot be applied to type `fn(usize) -> Foo {Foo::Bar}` --> $DIR/issue-59488.rs:30:5 diff --git a/src/test/ui/issues/issue-59756.stderr b/src/test/ui/issues/issue-59756.stderr index d46232874fd2..150916c03668 100644 --- a/src/test/ui/issues/issue-59756.stderr +++ b/src/test/ui/issues/issue-59756.stderr @@ -7,8 +7,8 @@ LL | foo()? | | help: try removing this `?` | expected enum `std::result::Result`, found struct `A` | - = note: expected type `std::result::Result` - found type `A` + = note: expected enum `std::result::Result` + found struct `A` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-61106.stderr b/src/test/ui/issues/issue-61106.stderr index ca67d5149284..8690ff4731fe 100644 --- a/src/test/ui/issues/issue-61106.stderr +++ b/src/test/ui/issues/issue-61106.stderr @@ -7,8 +7,8 @@ LL | foo(x.clone()); | expected &str, found struct `std::string::String` | help: consider borrowing here: `&x` | - = note: expected type `&str` - found type `std::string::String` + = note: expected reference `&str` + found struct `std::string::String` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-61882.stderr b/src/test/ui/issues/issue-61882.stderr index a14e1a4dd4d4..dbdb14d7160e 100644 --- a/src/test/ui/issues/issue-61882.stderr +++ b/src/test/ui/issues/issue-61882.stderr @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | const B: A = Self(0); | ^^^^^^^ expected u8, found bool | - = note: expected type `A` - found type `A` + = note: expected struct `A` + found struct `A` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-6458-4.stderr b/src/test/ui/issues/issue-6458-4.stderr index ecf729e1032b..246b53189c80 100644 --- a/src/test/ui/issues/issue-6458-4.stderr +++ b/src/test/ui/issues/issue-6458-4.stderr @@ -8,7 +8,7 @@ LL | fn foo(b: bool) -> Result { LL | Err("bar".to_string()); | - help: consider removing this semicolon | - = note: expected type `std::result::Result` + = note: expected enum `std::result::Result` found type `()` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-7061.rs b/src/test/ui/issues/issue-7061.rs index 66ae90034e7f..ef61eac7baa8 100644 --- a/src/test/ui/issues/issue-7061.rs +++ b/src/test/ui/issues/issue-7061.rs @@ -3,8 +3,8 @@ struct BarStruct; impl<'a> BarStruct { fn foo(&'a mut self) -> Box { self } //~^ ERROR mismatched types - //~| expected type `std::boxed::Box` - //~| found type `&'a mut BarStruct` + //~| expected struct `std::boxed::Box` + //~| found mutable reference `&'a mut BarStruct` } fn main() {} diff --git a/src/test/ui/issues/issue-7061.stderr b/src/test/ui/issues/issue-7061.stderr index 96c539f629ed..223cc48c7dd6 100644 --- a/src/test/ui/issues/issue-7061.stderr +++ b/src/test/ui/issues/issue-7061.stderr @@ -6,8 +6,8 @@ LL | fn foo(&'a mut self) -> Box { self } | | | expected `std::boxed::Box` because of return type | - = note: expected type `std::boxed::Box` - found type `&'a mut BarStruct` + = note: expected struct `std::boxed::Box` + found mutable reference `&'a mut BarStruct` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-7092.rs b/src/test/ui/issues/issue-7092.rs index b49a262f896c..09fa6c525082 100644 --- a/src/test/ui/issues/issue-7092.rs +++ b/src/test/ui/issues/issue-7092.rs @@ -5,9 +5,9 @@ fn foo(x: Whatever) { match x { Some(field) => //~^ ERROR mismatched types -//~| expected type `Whatever` -//~| found type `std::option::Option<_>` //~| expected enum `Whatever`, found enum `std::option::Option` +//~| expected enum `Whatever` +//~| found enum `std::option::Option<_>` field.access(), } } diff --git a/src/test/ui/issues/issue-7092.stderr b/src/test/ui/issues/issue-7092.stderr index 7bb682028748..05c00da16b1b 100644 --- a/src/test/ui/issues/issue-7092.stderr +++ b/src/test/ui/issues/issue-7092.stderr @@ -6,8 +6,8 @@ LL | match x { LL | Some(field) => | ^^^^^^^^^^^ expected enum `Whatever`, found enum `std::option::Option` | - = note: expected type `Whatever` - found type `std::option::Option<_>` + = note: expected enum `Whatever` + found enum `std::option::Option<_>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-7867.rs b/src/test/ui/issues/issue-7867.rs index a1997fbf19aa..3074052f14f2 100644 --- a/src/test/ui/issues/issue-7867.rs +++ b/src/test/ui/issues/issue-7867.rs @@ -6,9 +6,9 @@ fn main() { match (true, false) { A::B => (), //~^ ERROR mismatched types - //~| expected type `(bool, bool)` - //~| found type `A` //~| expected tuple, found enum `A` + //~| expected tuple `(bool, bool)` + //~| found enum `A` _ => () } } diff --git a/src/test/ui/issues/issue-7867.stderr b/src/test/ui/issues/issue-7867.stderr index 1d3a0ff06591..58e82facf802 100644 --- a/src/test/ui/issues/issue-7867.stderr +++ b/src/test/ui/issues/issue-7867.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | A::B => (), | ^^^^ expected tuple, found enum `A` | - = note: expected type `(bool, bool)` - found type `A` + = note: expected tuple `(bool, bool)` + found enum `A` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-9575.stderr b/src/test/ui/issues/issue-9575.stderr index 1483e427a6a3..6203c2fa84ef 100644 --- a/src/test/ui/issues/issue-9575.stderr +++ b/src/test/ui/issues/issue-9575.stderr @@ -4,8 +4,8 @@ error[E0308]: start function has wrong type LL | fn start(argc: isize, argv: *const *const u8, crate_map: *const u8) -> isize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters | - = note: expected type `fn(isize, *const *const u8) -> isize` - found type `fn(isize, *const *const u8, *const u8) -> isize` + = note: expected fn pointer `fn(isize, *const *const u8) -> isize` + found fn pointer `fn(isize, *const *const u8, *const u8) -> isize` error: aborting due to previous error diff --git a/src/test/ui/json-bom-plus-crlf-multifile.stderr b/src/test/ui/json-bom-plus-crlf-multifile.stderr index 39f6b69bbeca..53c9682acfee 100644 --- a/src/test/ui/json-bom-plus-crlf-multifile.stderr +++ b/src/test/ui/json-bom-plus-crlf-multifile.stderr @@ -15,8 +15,8 @@ let x: i32 = \"I am not a number!\"; // | // type `i32` assigned to variable `x` ``` -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `std::string::String` - found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:17:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected struct `std::string::String` + found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:17:22: error[E0308]: mismatched types "} {"message":"mismatched types","code":{"code":"E0308","explanation":"This error occurs when the compiler was unable to infer the concrete type of a variable. It can occur for several cases, the most common of which is a @@ -35,8 +35,8 @@ let x: i32 = \"I am not a number!\"; // | // type `i32` assigned to variable `x` ``` -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `std::string::String` - found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:19:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected struct `std::string::String` + found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:19:22: error[E0308]: mismatched types "} {"message":"mismatched types","code":{"code":"E0308","explanation":"This error occurs when the compiler was unable to infer the concrete type of a variable. It can occur for several cases, the most common of which is a @@ -55,8 +55,8 @@ let x: i32 = \"I am not a number!\"; // | // type `i32` assigned to variable `x` ``` -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `std::string::String` - found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:23:1: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected struct `std::string::String` + found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:23:1: error[E0308]: mismatched types "} {"message":"mismatched types","code":{"code":"E0308","explanation":"This error occurs when the compiler was unable to infer the concrete type of a variable. It can occur for several cases, the most common of which is a @@ -75,8 +75,8 @@ let x: i32 = \"I am not a number!\"; // | // type `i32` assigned to variable `x` ``` -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":801,"byte_end":809,"line_start":25,"line_end":26,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected struct `std::string::String`, found ()","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `std::string::String` - found type `()`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:25:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":801,"byte_end":809,"line_start":25,"line_end":26,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected struct `std::string::String`, found ()","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected struct `std::string::String` + found type `()`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:25:22: error[E0308]: mismatched types "} {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors "} diff --git a/src/test/ui/json-bom-plus-crlf.stderr b/src/test/ui/json-bom-plus-crlf.stderr index d62140e4de76..6f2d1d0f234f 100644 --- a/src/test/ui/json-bom-plus-crlf.stderr +++ b/src/test/ui/json-bom-plus-crlf.stderr @@ -15,8 +15,8 @@ let x: i32 = \"I am not a number!\"; // | // type `i32` assigned to variable `x` ``` -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `std::string::String` - found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:17:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected struct `std::string::String` + found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:17:22: error[E0308]: mismatched types "} {"message":"mismatched types","code":{"code":"E0308","explanation":"This error occurs when the compiler was unable to infer the concrete type of a variable. It can occur for several cases, the most common of which is a @@ -35,8 +35,8 @@ let x: i32 = \"I am not a number!\"; // | // type `i32` assigned to variable `x` ``` -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `std::string::String` - found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:19:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected struct `std::string::String` + found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:19:22: error[E0308]: mismatched types "} {"message":"mismatched types","code":{"code":"E0308","explanation":"This error occurs when the compiler was unable to infer the concrete type of a variable. It can occur for several cases, the most common of which is a @@ -55,8 +55,8 @@ let x: i32 = \"I am not a number!\"; // | // type `i32` assigned to variable `x` ``` -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `std::string::String` - found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:23:1: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected struct `std::string::String` + found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:23:1: error[E0308]: mismatched types "} {"message":"mismatched types","code":{"code":"E0308","explanation":"This error occurs when the compiler was unable to infer the concrete type of a variable. It can occur for several cases, the most common of which is a @@ -75,8 +75,8 @@ let x: i32 = \"I am not a number!\"; // | // type `i32` assigned to variable `x` ``` -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":801,"byte_end":809,"line_start":25,"line_end":26,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected struct `std::string::String`, found ()","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `std::string::String` - found type `()`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:25:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":801,"byte_end":809,"line_start":25,"line_end":26,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected struct `std::string::String`, found ()","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected struct `std::string::String` + found type `()`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:25:22: error[E0308]: mismatched types "} {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors "} diff --git a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr index b4011990b68e..93160a1c5e51 100644 --- a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr +++ b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | ref_obj(x) | ^ lifetime mismatch | - = note: expected type `&std::boxed::Box<(dyn std::ops::Fn() + 'static)>` - found type `&std::boxed::Box<(dyn std::ops::Fn() + 'a)>` + = note: expected reference `&std::boxed::Box<(dyn std::ops::Fn() + 'static)>` + found reference `&std::boxed::Box<(dyn std::ops::Fn() + 'a)>` note: the lifetime `'a` as defined on the function body at 32:10... --> $DIR/lifetime-bound-will-change-warning.rs:32:10 | @@ -19,8 +19,8 @@ error[E0308]: mismatched types LL | lib::ref_obj(x) | ^ lifetime mismatch | - = note: expected type `&std::boxed::Box<(dyn std::ops::Fn() + 'static)>` - found type `&std::boxed::Box<(dyn std::ops::Fn() + 'a)>` + = note: expected reference `&std::boxed::Box<(dyn std::ops::Fn() + 'static)>` + found reference `&std::boxed::Box<(dyn std::ops::Fn() + 'a)>` note: the lifetime `'a` as defined on the function body at 37:12... --> $DIR/lifetime-bound-will-change-warning.rs:37:12 | diff --git a/src/test/ui/loops/loop-break-value.stderr b/src/test/ui/loops/loop-break-value.stderr index b2e3ebc53ad8..6fbede9778d4 100644 --- a/src/test/ui/loops/loop-break-value.stderr +++ b/src/test/ui/loops/loop-break-value.stderr @@ -118,8 +118,8 @@ error[E0308]: mismatched types LL | break "asdf"; | ^^^^^^ expected i32, found reference | - = note: expected type `i32` - found type `&'static str` + = note: expected type `i32` + found reference `&'static str` error[E0308]: mismatched types --> $DIR/loop-break-value.rs:21:31 @@ -127,8 +127,8 @@ error[E0308]: mismatched types LL | break 'outer_loop "nope"; | ^^^^^^ expected i32, found reference | - = note: expected type `i32` - found type `&'static str` + = note: expected type `i32` + found reference `&'static str` error[E0308]: mismatched types --> $DIR/loop-break-value.rs:73:26 @@ -146,7 +146,7 @@ LL | break (break, break); | ^^^^^^^^^^^^^^ expected (), found tuple | = note: expected type `()` - found type `(!, !)` + found tuple `(!, !)` error[E0308]: mismatched types --> $DIR/loop-break-value.rs:85:15 diff --git a/src/test/ui/lub-glb/old-lub-glb-hr.stderr b/src/test/ui/lub-glb/old-lub-glb-hr.stderr index 475c1801ca12..1dce9df96df3 100644 --- a/src/test/ui/lub-glb/old-lub-glb-hr.stderr +++ b/src/test/ui/lub-glb/old-lub-glb-hr.stderr @@ -10,8 +10,8 @@ LL | | _ => y, LL | | }; | |_____- `match` arms have incompatible types | - = note: expected type `for<'r, 's> fn(&'r u8, &'s u8)` - found type `for<'a> fn(&'a u8, &'a u8)` + = note: expected type `for<'r, 's> fn(&'r u8, &'s u8)` + found fn pointer `for<'a> fn(&'a u8, &'a u8)` error: aborting due to previous error diff --git a/src/test/ui/lub-glb/old-lub-glb-object.stderr b/src/test/ui/lub-glb/old-lub-glb-object.stderr index e02ede399e6a..18de7a40ee17 100644 --- a/src/test/ui/lub-glb/old-lub-glb-object.stderr +++ b/src/test/ui/lub-glb/old-lub-glb-object.stderr @@ -10,8 +10,8 @@ LL | | _ => y, LL | | }; | |_____- `match` arms have incompatible types | - = note: expected type `&dyn for<'a, 'b> Foo<&'a u8, &'b u8>` - found type `&dyn for<'a> Foo<&'a u8, &'a u8>` + = note: expected type `&dyn for<'a, 'b> Foo<&'a u8, &'b u8>` + found reference `&dyn for<'a> Foo<&'a u8, &'a u8>` error: aborting due to previous error diff --git a/src/test/ui/main-wrong-type.stderr b/src/test/ui/main-wrong-type.stderr index c00c67af572b..e75d4d7acfd5 100644 --- a/src/test/ui/main-wrong-type.stderr +++ b/src/test/ui/main-wrong-type.stderr @@ -4,8 +4,8 @@ error[E0580]: main function has wrong type LL | fn main(foo: S) { | ^^^^^^^^^^^^^^^ incorrect number of function parameters | - = note: expected type `fn()` - found type `fn(S)` + = note: expected fn pointer `fn()` + found fn pointer `fn(S)` error: aborting due to previous error diff --git a/src/test/ui/match/match-arm-resolving-to-never.stderr b/src/test/ui/match/match-arm-resolving-to-never.stderr index 24ce97f86e76..f717cf4ea75c 100644 --- a/src/test/ui/match/match-arm-resolving-to-never.stderr +++ b/src/test/ui/match/match-arm-resolving-to-never.stderr @@ -13,8 +13,8 @@ LL | | E::F => "", LL | | }; | |_____- `match` arms have incompatible types | - = note: expected type `{integer}` - found type `&'static str` + = note: expected type `{integer}` + found reference `&'static str` = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/match/match-ref-mut-invariance.stderr b/src/test/ui/match/match-ref-mut-invariance.stderr index 0a020989d6f3..3e9f729dc09f 100644 --- a/src/test/ui/match/match-ref-mut-invariance.stderr +++ b/src/test/ui/match/match-ref-mut-invariance.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | match self.0 { ref mut x => x } | ^ lifetime mismatch | - = note: expected type `&'a mut &'a i32` - found type `&'a mut &'b i32` + = note: expected mutable reference `&'a mut &'a i32` + found mutable reference `&'a mut &'b i32` note: the lifetime `'a` as defined on the method body at 9:12... --> $DIR/match-ref-mut-invariance.rs:9:12 | diff --git a/src/test/ui/match/match-ref-mut-let-invariance.stderr b/src/test/ui/match/match-ref-mut-let-invariance.stderr index 1bea9bce11e4..303aba3422ce 100644 --- a/src/test/ui/match/match-ref-mut-let-invariance.stderr +++ b/src/test/ui/match/match-ref-mut-let-invariance.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | x | ^ lifetime mismatch | - = note: expected type `&'a mut &'a i32` - found type `&'a mut &'b i32` + = note: expected mutable reference `&'a mut &'a i32` + found mutable reference `&'a mut &'b i32` note: the lifetime `'a` as defined on the method body at 9:12... --> $DIR/match-ref-mut-let-invariance.rs:9:12 | diff --git a/src/test/ui/match/match-struct.rs b/src/test/ui/match/match-struct.rs index 5961e09a200a..e82d9581b2d1 100644 --- a/src/test/ui/match/match-struct.rs +++ b/src/test/ui/match/match-struct.rs @@ -5,9 +5,9 @@ fn main() { match (S { a: 1 }) { E::C(_) => (), //~^ ERROR mismatched types - //~| expected type `S` - //~| found type `E` //~| expected struct `S`, found enum `E` + //~| expected struct `S` + //~| found enum `E` _ => () } } diff --git a/src/test/ui/match/match-struct.stderr b/src/test/ui/match/match-struct.stderr index 2a24a293e983..3d4a19a93170 100644 --- a/src/test/ui/match/match-struct.stderr +++ b/src/test/ui/match/match-struct.stderr @@ -6,8 +6,8 @@ LL | match (S { a: 1 }) { LL | E::C(_) => (), | ^^^^^^^ expected struct `S`, found enum `E` | - = note: expected type `S` - found type `E` + = note: expected struct `S` + found enum `E` error: aborting due to previous error diff --git a/src/test/ui/match/match-tag-nullary.stderr b/src/test/ui/match/match-tag-nullary.stderr index 902ccc94dde2..5dd7b564d9dc 100644 --- a/src/test/ui/match/match-tag-nullary.stderr +++ b/src/test/ui/match/match-tag-nullary.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | fn main() { let x: A = A::A; match x { B::B => { } } } | ^^^^ expected enum `A`, found enum `B` | - = note: expected type `A` - found type `B` + = note: expected enum `A` + found enum `B` error: aborting due to previous error diff --git a/src/test/ui/match/match-tag-unary.stderr b/src/test/ui/match/match-tag-unary.stderr index da599c374074..833d8838e57a 100644 --- a/src/test/ui/match/match-tag-unary.stderr +++ b/src/test/ui/match/match-tag-unary.stderr @@ -6,8 +6,8 @@ LL | fn main() { let x: A = A::A(0); match x { B::B(y) => { } } } | | | this match expression has type `A` | - = note: expected type `A` - found type `B` + = note: expected enum `A` + found enum `B` error: aborting due to previous error diff --git a/src/test/ui/methods/method-self-arg-1.rs b/src/test/ui/methods/method-self-arg-1.rs index 4a78ad780c41..169c14c0f535 100644 --- a/src/test/ui/methods/method-self-arg-1.rs +++ b/src/test/ui/methods/method-self-arg-1.rs @@ -9,11 +9,11 @@ impl Foo { fn main() { let x = Foo; Foo::bar(x); //~ ERROR mismatched types - //~| expected type `&Foo` - //~| found type `Foo` //~| expected &Foo, found struct `Foo` + //~| expected reference `&Foo` + //~| found struct `Foo` Foo::bar(&42); //~ ERROR mismatched types - //~| expected type `&Foo` - //~| found type `&{integer}` //~| expected struct `Foo`, found integer + //~| expected reference `&Foo` + //~| found reference `&{integer}` } diff --git a/src/test/ui/methods/method-self-arg-1.stderr b/src/test/ui/methods/method-self-arg-1.stderr index 8485a5403ff8..e0cb0915fe10 100644 --- a/src/test/ui/methods/method-self-arg-1.stderr +++ b/src/test/ui/methods/method-self-arg-1.stderr @@ -7,8 +7,8 @@ LL | Foo::bar(x); | expected &Foo, found struct `Foo` | help: consider borrowing here: `&x` | - = note: expected type `&Foo` - found type `Foo` + = note: expected reference `&Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/method-self-arg-1.rs:15:14 @@ -16,8 +16,8 @@ error[E0308]: mismatched types LL | Foo::bar(&42); | ^^^ expected struct `Foo`, found integer | - = note: expected type `&Foo` - found type `&{integer}` + = note: expected reference `&Foo` + found reference `&{integer}` error: aborting due to 2 previous errors diff --git a/src/test/ui/mismatched_types/E0053.stderr b/src/test/ui/mismatched_types/E0053.stderr index 582772d6fb36..4e6af20db1b9 100644 --- a/src/test/ui/mismatched_types/E0053.stderr +++ b/src/test/ui/mismatched_types/E0053.stderr @@ -7,8 +7,8 @@ LL | fn foo(x: u16); LL | fn foo(x: i16) { } | ^^^ expected u16, found i16 | - = note: expected type `fn(u16)` - found type `fn(i16)` + = note: expected fn pointer `fn(u16)` + found fn pointer `fn(i16)` error[E0053]: method `bar` has an incompatible type for trait --> $DIR/E0053.rs:11:12 @@ -19,8 +19,8 @@ LL | fn bar(&self); LL | fn bar(&mut self) { } | ^^^^^^^^^ types differ in mutability | - = note: expected type `fn(&Bar)` - found type `fn(&mut Bar)` + = note: expected fn pointer `fn(&Bar)` + found fn pointer `fn(&mut Bar)` help: consider change the type to match the mutability in trait | LL | fn bar(&self) { } diff --git a/src/test/ui/mismatched_types/abridged.stderr b/src/test/ui/mismatched_types/abridged.stderr index ded12d89c099..81cc8e29e49c 100644 --- a/src/test/ui/mismatched_types/abridged.stderr +++ b/src/test/ui/mismatched_types/abridged.stderr @@ -6,8 +6,8 @@ LL | fn a() -> Foo { LL | Some(Foo { bar: 1 }) | ^^^^^^^^^^^^^^^^^^^^ expected struct `Foo`, found enum `std::option::Option` | - = note: expected type `Foo` - found type `std::option::Option` + = note: expected struct `Foo` + found enum `std::option::Option` error[E0308]: mismatched types --> $DIR/abridged.rs:20:5 @@ -17,8 +17,8 @@ LL | fn a2() -> Foo { LL | Ok(Foo { bar: 1}) | ^^^^^^^^^^^^^^^^^ expected struct `Foo`, found enum `std::result::Result` | - = note: expected type `Foo` - found type `std::result::Result` + = note: expected struct `Foo` + found enum `std::result::Result` error[E0308]: mismatched types --> $DIR/abridged.rs:24:5 @@ -28,8 +28,8 @@ LL | fn b() -> Option { LL | Foo { bar: 1 } | ^^^^^^^^^^^^^^ expected enum `std::option::Option`, found struct `Foo` | - = note: expected type `std::option::Option` - found type `Foo` + = note: expected enum `std::option::Option` + found struct `Foo` error[E0308]: mismatched types --> $DIR/abridged.rs:28:5 @@ -39,8 +39,8 @@ LL | fn c() -> Result { LL | Foo { bar: 1 } | ^^^^^^^^^^^^^^ expected enum `std::result::Result`, found struct `Foo` | - = note: expected type `std::result::Result` - found type `Foo` + = note: expected enum `std::result::Result` + found struct `Foo` error[E0308]: mismatched types --> $DIR/abridged.rs:39:5 @@ -51,8 +51,8 @@ LL | fn d() -> X, String> { LL | x | ^ expected struct `std::string::String`, found integer | - = note: expected type `X, std::string::String>` - found type `X, {integer}>` + = note: expected struct `X, std::string::String>` + found struct `X, {integer}>` error[E0308]: mismatched types --> $DIR/abridged.rs:50:5 @@ -63,8 +63,8 @@ LL | fn e() -> X, String> { LL | x | ^ expected struct `std::string::String`, found integer | - = note: expected type `X, _>` - found type `X, _>` + = note: expected struct `X, _>` + found struct `X, _>` error[E0308]: mismatched types --> $DIR/abridged.rs:54:5 @@ -77,8 +77,8 @@ LL | 1+2 | expected struct `std::string::String`, found integer | help: try using a conversion method: `(1+2).to_string()` | - = note: expected type `std::string::String` - found type `{integer}` + = note: expected struct `std::string::String` + found type `{integer}` error[E0308]: mismatched types --> $DIR/abridged.rs:59:5 @@ -91,8 +91,8 @@ LL | -2 | expected struct `std::string::String`, found integer | help: try using a conversion method: `(-2).to_string()` | - = note: expected type `std::string::String` - found type `{integer}` + = note: expected struct `std::string::String` + found type `{integer}` error: aborting due to 8 previous errors diff --git a/src/test/ui/mismatched_types/issue-19109.stderr b/src/test/ui/mismatched_types/issue-19109.stderr index b826ca66c683..350dd69a1fd7 100644 --- a/src/test/ui/mismatched_types/issue-19109.stderr +++ b/src/test/ui/mismatched_types/issue-19109.stderr @@ -6,8 +6,8 @@ LL | fn function(t: &mut dyn Trait) { LL | t as *mut dyn Trait | ^^^^^^^^^^^^^^^^^^^ expected (), found *-ptr | - = note: expected type `()` - found type `*mut dyn Trait` + = note: expected type `()` + found raw pointer `*mut dyn Trait` error: aborting due to previous error diff --git a/src/test/ui/mismatched_types/issue-35030.stderr b/src/test/ui/mismatched_types/issue-35030.stderr index 39eca93f88d1..c01f5d3ca4b9 100644 --- a/src/test/ui/mismatched_types/issue-35030.stderr +++ b/src/test/ui/mismatched_types/issue-35030.stderr @@ -7,8 +7,8 @@ LL | fn parse(text: &str) -> Option { LL | Some(true) | ^^^^ expected type parameter `bool`, found bool | - = note: expected type `bool` (type parameter `bool`) - found type `bool` (bool) + = note: expected type parameter `bool` (type parameter `bool`) + found type `bool` (bool) = help: type parameters must be constrained to match other types = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters diff --git a/src/test/ui/mismatched_types/issue-38371.stderr b/src/test/ui/mismatched_types/issue-38371.stderr index 79a0807c3372..48a123fd28a1 100644 --- a/src/test/ui/mismatched_types/issue-38371.stderr +++ b/src/test/ui/mismatched_types/issue-38371.stderr @@ -7,8 +7,8 @@ LL | fn foo(&foo: Foo) { | expected struct `Foo`, found reference | help: did you mean `foo`: `&Foo` | - = note: expected type `Foo` - found type `&_` + = note: expected struct `Foo` + found reference `&_` error[E0308]: mismatched types --> $DIR/issue-38371.rs:18:9 @@ -19,8 +19,8 @@ LL | fn agh(&&bar: &u32) { | expected u32, found reference | help: you can probably remove the explicit borrow: `bar` | - = note: expected type `u32` - found type `&_` + = note: expected type `u32` + found reference `&_` error[E0308]: mismatched types --> $DIR/issue-38371.rs:21:8 @@ -28,8 +28,8 @@ error[E0308]: mismatched types LL | fn bgh(&&bar: u32) { | ^^^^^ expected u32, found reference | - = note: expected type `u32` - found type `&_` + = note: expected type `u32` + found reference `&_` error[E0529]: expected an array or slice, found `u32` --> $DIR/issue-38371.rs:24:9 diff --git a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr index bcb316e2bfb3..b5daf195ef78 100644 --- a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr +++ b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let ans = s("what"); | ^^^^^^ expected isize, found reference | - = note: expected type `isize` - found type `&'static str` + = note: expected type `isize` + found reference `&'static str` error[E0057]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/overloaded-calls-bad.rs:29:15 diff --git a/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr b/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr index 6475cce5aa62..d9dd186624fb 100644 --- a/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr +++ b/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | a(x); | ^ expected trait `Foo + std::marker::Send`, found trait `Foo` | - = note: expected type `std::boxed::Box<(dyn Foo + std::marker::Send + 'static)>` - found type `std::boxed::Box<(dyn Foo + 'static)>` + = note: expected struct `std::boxed::Box<(dyn Foo + std::marker::Send + 'static)>` + found struct `std::boxed::Box<(dyn Foo + 'static)>` error: aborting due to previous error diff --git a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr b/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr index 8ea3567b948c..050bb326130d 100644 --- a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr +++ b/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr @@ -7,8 +7,8 @@ LL | fn foo(x: u16); LL | fn foo(x: i16) { } | ^^^ expected u16, found i16 | - = note: expected type `fn(u16)` - found type `fn(i16)` + = note: expected fn pointer `fn(u16)` + found fn pointer `fn(i16)` error[E0053]: method `bar` has an incompatible type for trait --> $DIR/trait-impl-fn-incompatibility.rs:12:28 @@ -19,8 +19,8 @@ LL | fn bar(&mut self, bar: &mut Bar); LL | fn bar(&mut self, bar: &Bar) { } | ^^^^ types differ in mutability | - = note: expected type `fn(&mut Bar, &mut Bar)` - found type `fn(&mut Bar, &Bar)` + = note: expected fn pointer `fn(&mut Bar, &mut Bar)` + found fn pointer `fn(&mut Bar, &Bar)` help: consider change the type to match the mutability in trait | LL | fn bar(&mut self, bar: &mut Bar) { } diff --git a/src/test/ui/mut/mut-cross-borrowing.stderr b/src/test/ui/mut/mut-cross-borrowing.stderr index e2eea195dafb..d79d230ca960 100644 --- a/src/test/ui/mut/mut-cross-borrowing.stderr +++ b/src/test/ui/mut/mut-cross-borrowing.stderr @@ -7,8 +7,8 @@ LL | f(x) | expected &mut isize, found struct `std::boxed::Box` | help: consider mutably borrowing here: `&mut x` | - = note: expected type `&mut isize` - found type `std::boxed::Box<{integer}>` + = note: expected mutable reference `&mut isize` + found struct `std::boxed::Box<{integer}>` error: aborting due to previous error diff --git a/src/test/ui/mut/mut-pattern-mismatched.rs b/src/test/ui/mut/mut-pattern-mismatched.rs index 17bf75419b7a..700261fe40b6 100644 --- a/src/test/ui/mut/mut-pattern-mismatched.rs +++ b/src/test/ui/mut/mut-pattern-mismatched.rs @@ -4,8 +4,8 @@ fn main() { // (separate lines to ensure the spans are accurate) let &_ //~ ERROR mismatched types - //~| expected type `&mut {integer}` - //~| found type `&_` + //~| expected mutable reference `&mut {integer}` + //~| found reference `&_` //~| types differ in mutability = foo; let &mut _ = foo; @@ -13,8 +13,8 @@ fn main() { let bar = &1; let &_ = bar; let &mut _ //~ ERROR mismatched types - //~| expected type `&{integer}` - //~| found type `&mut _` + //~| expected reference `&{integer}` + //~| found mutable reference `&mut _` //~| types differ in mutability = bar; } diff --git a/src/test/ui/mut/mut-pattern-mismatched.stderr b/src/test/ui/mut/mut-pattern-mismatched.stderr index d1adc9915196..ccc8ac1278c6 100644 --- a/src/test/ui/mut/mut-pattern-mismatched.stderr +++ b/src/test/ui/mut/mut-pattern-mismatched.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let &_ | ^^ types differ in mutability | - = note: expected type `&mut {integer}` - found type `&_` + = note: expected mutable reference `&mut {integer}` + found reference `&_` error[E0308]: mismatched types --> $DIR/mut-pattern-mismatched.rs:15:9 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | let &mut _ | ^^^^^^ types differ in mutability | - = note: expected type `&{integer}` - found type `&mut _` + = note: expected reference `&{integer}` + found mutable reference `&mut _` error: aborting due to 2 previous errors diff --git a/src/test/ui/never_type/call-fn-never-arg-wrong-type.stderr b/src/test/ui/never_type/call-fn-never-arg-wrong-type.stderr index 7a50fd367d2d..cf3952bca11d 100644 --- a/src/test/ui/never_type/call-fn-never-arg-wrong-type.stderr +++ b/src/test/ui/never_type/call-fn-never-arg-wrong-type.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | foo("wow"); | ^^^^^ expected !, found reference | - = note: expected type `!` - found type `&'static str` + = note: expected type `!` + found reference `&'static str` error: aborting due to previous error diff --git a/src/test/ui/never_type/never-assign-wrong-type.stderr b/src/test/ui/never_type/never-assign-wrong-type.stderr index da2e77d023d1..fcdb9ef6c921 100644 --- a/src/test/ui/never_type/never-assign-wrong-type.stderr +++ b/src/test/ui/never_type/never-assign-wrong-type.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let x: ! = "hello"; | ^^^^^^^ expected !, found reference | - = note: expected type `!` - found type `&'static str` + = note: expected type `!` + found reference `&'static str` error: aborting due to previous error diff --git a/src/test/ui/nll/trait-associated-constant.stderr b/src/test/ui/nll/trait-associated-constant.stderr index ecf9748af9ea..5158420c7378 100644 --- a/src/test/ui/nll/trait-associated-constant.stderr +++ b/src/test/ui/nll/trait-associated-constant.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | const AC: Option<&'c str> = None; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | - = note: expected type `std::option::Option<&'b str>` - found type `std::option::Option<&'c str>` + = note: expected enum `std::option::Option<&'b str>` + found enum `std::option::Option<&'c str>` note: the lifetime `'c` as defined on the impl at 20:18... --> $DIR/trait-associated-constant.rs:20:18 | diff --git a/src/test/ui/noexporttypeexe.rs b/src/test/ui/noexporttypeexe.rs index 651c92830ed8..d3c04fc562fd 100644 --- a/src/test/ui/noexporttypeexe.rs +++ b/src/test/ui/noexporttypeexe.rs @@ -10,6 +10,6 @@ fn main() { let x: isize = noexporttypelib::foo(); //~^ ERROR mismatched types //~| expected type `isize` - //~| found type `std::option::Option` + //~| found enum `std::option::Option` //~| expected isize, found enum `std::option::Option` } diff --git a/src/test/ui/noexporttypeexe.stderr b/src/test/ui/noexporttypeexe.stderr index 329787fe7444..3def891110d9 100644 --- a/src/test/ui/noexporttypeexe.stderr +++ b/src/test/ui/noexporttypeexe.stderr @@ -5,7 +5,7 @@ LL | let x: isize = noexporttypelib::foo(); | ^^^^^^^^^^^^^^^^^^^^^^ expected isize, found enum `std::option::Option` | = note: expected type `isize` - found type `std::option::Option` + found enum `std::option::Option` error: aborting due to previous error diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr index 99f0ce0602b1..86ec58d3f068 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | ss.t = t; | ^ lifetime mismatch | - = note: expected type `&'a std::boxed::Box<(dyn Test + 'static)>` - found type `&'a std::boxed::Box<(dyn Test + 'a)>` + = note: expected reference `&'a std::boxed::Box<(dyn Test + 'static)>` + found reference `&'a std::boxed::Box<(dyn Test + 'a)>` note: the lifetime `'a` as defined on the function body at 14:6... --> $DIR/object-lifetime-default-from-rptr-box-error.rs:14:6 | diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr index 07d4d8c8ed40..65f8a32f06dd 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | ss.t = t; | ^ lifetime mismatch | - = note: expected type `&'a MyBox<(dyn Test + 'static)>` - found type `&'a MyBox<(dyn Test + 'a)>` + = note: expected reference `&'a MyBox<(dyn Test + 'static)>` + found reference `&'a MyBox<(dyn Test + 'a)>` note: the lifetime `'a` as defined on the function body at 20:6... --> $DIR/object-lifetime-default-from-rptr-struct-error.rs:20:6 | diff --git a/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr b/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr index 89579fb1df3d..404717ff55e5 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr @@ -16,8 +16,8 @@ error[E0308]: mismatched types LL | load0(ss) | ^^ lifetime mismatch | - = note: expected type `&MyBox<(dyn SomeTrait + 'static)>` - found type `&MyBox<(dyn SomeTrait + 'a)>` + = note: expected reference `&MyBox<(dyn SomeTrait + 'static)>` + found reference `&MyBox<(dyn SomeTrait + 'a)>` note: the lifetime `'a` as defined on the function body at 30:10... --> $DIR/object-lifetime-default-mybox.rs:30:10 | diff --git a/src/test/ui/or-patterns/or-patterns-syntactic-fail.stderr b/src/test/ui/or-patterns/or-patterns-syntactic-fail.stderr index 6d08b47c058e..5985b2aecfc2 100644 --- a/src/test/ui/or-patterns/or-patterns-syntactic-fail.stderr +++ b/src/test/ui/or-patterns/or-patterns-syntactic-fail.stderr @@ -123,8 +123,8 @@ LL | let recovery_witness: String = 0; | expected struct `std::string::String`, found integer | help: try using a conversion method: `0.to_string()` | - = note: expected type `std::string::String` - found type `{integer}` + = note: expected struct `std::string::String` + found type `{integer}` error: aborting due to 16 previous errors diff --git a/src/test/ui/parser/fn-arg-doc-comment.stderr b/src/test/ui/parser/fn-arg-doc-comment.stderr index 669785af45f9..9554cf42ee38 100644 --- a/src/test/ui/parser/fn-arg-doc-comment.stderr +++ b/src/test/ui/parser/fn-arg-doc-comment.stderr @@ -22,8 +22,8 @@ error[E0308]: mismatched types LL | f("", ""); | ^^ expected u8, found reference | - = note: expected type `u8` - found type `&'static str` + = note: expected type `u8` + found reference `&'static str` error[E0308]: mismatched types --> $DIR/fn-arg-doc-comment.rs:18:11 @@ -31,8 +31,8 @@ error[E0308]: mismatched types LL | f("", ""); | ^^ expected u8, found reference | - = note: expected type `u8` - found type `&'static str` + = note: expected type `u8` + found reference `&'static str` error[E0308]: mismatched types --> $DIR/fn-arg-doc-comment.rs:25:9 @@ -40,8 +40,8 @@ error[E0308]: mismatched types LL | bar(""); | ^^ expected i32, found reference | - = note: expected type `i32` - found type `&'static str` + = note: expected type `i32` + found reference `&'static str` error: aborting due to 6 previous errors diff --git a/src/test/ui/parser/lex-bad-char-literals-6.stderr b/src/test/ui/parser/lex-bad-char-literals-6.stderr index 662cf2657e7b..fbd1fc28dd6e 100644 --- a/src/test/ui/parser/lex-bad-char-literals-6.stderr +++ b/src/test/ui/parser/lex-bad-char-literals-6.stderr @@ -45,8 +45,8 @@ error[E0308]: mismatched types LL | let a: usize = ""; | ^^ expected usize, found reference | - = note: expected type `usize` - found type `&'static str` + = note: expected type `usize` + found reference `&'static str` error[E0277]: can't compare `&str` with `char` --> $DIR/lex-bad-char-literals-6.rs:12:10 diff --git a/src/test/ui/parser/numeric-lifetime.stderr b/src/test/ui/parser/numeric-lifetime.stderr index 4018b24aac17..4a7a28825ffc 100644 --- a/src/test/ui/parser/numeric-lifetime.stderr +++ b/src/test/ui/parser/numeric-lifetime.stderr @@ -16,8 +16,8 @@ error[E0308]: mismatched types LL | let x: usize = ""; | ^^ expected usize, found reference | - = note: expected type `usize` - found type `&'static str` + = note: expected type `usize` + found reference `&'static str` error: aborting due to 3 previous errors diff --git a/src/test/ui/parser/pat-tuple-5.stderr b/src/test/ui/parser/pat-tuple-5.stderr index 09ebdc29a216..3513b516ea81 100644 --- a/src/test/ui/parser/pat-tuple-5.stderr +++ b/src/test/ui/parser/pat-tuple-5.stderr @@ -21,8 +21,8 @@ LL | match (0, 1) { LL | (PAT ..) => {} | ^^^^^^ expected tuple, found u8 | - = note: expected type `({integer}, {integer})` - found type `u8` + = note: expected tuple `({integer}, {integer})` + found type `u8` error: aborting due to 3 previous errors diff --git a/src/test/ui/parser/recover-tuple.stderr b/src/test/ui/parser/recover-tuple.stderr index 4252fc1fd1e1..70eefd8a1701 100644 --- a/src/test/ui/parser/recover-tuple.stderr +++ b/src/test/ui/parser/recover-tuple.stderr @@ -10,8 +10,8 @@ error[E0308]: mismatched types LL | let y: usize = ""; | ^^ expected usize, found reference | - = note: expected type `usize` - found type `&'static str` + = note: expected type `usize` + found reference `&'static str` error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr b/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr index 38f4a986e12d..5f70588c0b20 100644 --- a/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr +++ b/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr @@ -24,7 +24,7 @@ LL | | }.hi() { | |__________^ expected bool, found closure | = note: expected type `bool` - found type `[closure@$DIR/struct-literal-restrictions-in-lamda.rs:12:11: 14:11]` + found closure `[closure@$DIR/struct-literal-restrictions-in-lamda.rs:12:11: 14:11]` error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/unclosed-delimiter-in-dep.stderr b/src/test/ui/parser/unclosed-delimiter-in-dep.stderr index 818f61b4d222..c4a9251b1b1d 100644 --- a/src/test/ui/parser/unclosed-delimiter-in-dep.stderr +++ b/src/test/ui/parser/unclosed-delimiter-in-dep.stderr @@ -16,7 +16,7 @@ LL | let _: usize = unclosed_delim_mod::new(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected usize, found enum `std::result::Result` | = note: expected type `usize` - found type `std::result::Result` + found enum `std::result::Result` error: aborting due to 2 previous errors diff --git a/src/test/ui/pattern/pat-tuple-overfield.stderr b/src/test/ui/pattern/pat-tuple-overfield.stderr index e64b6efb08da..25d02b8627cb 100644 --- a/src/test/ui/pattern/pat-tuple-overfield.stderr +++ b/src/test/ui/pattern/pat-tuple-overfield.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | (1, 2, 3, 4) => {} | ^^^^^^^^^^^^ expected a tuple with 3 elements, found one with 4 elements | - = note: expected type `({integer}, {integer}, {integer})` - found type `(_, _, _, _)` + = note: expected tuple `({integer}, {integer}, {integer})` + found tuple `(_, _, _, _)` error[E0308]: mismatched types --> $DIR/pat-tuple-overfield.rs:6:9 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | (1, 2, .., 3, 4) => {} | ^^^^^^^^^^^^^^^^ expected a tuple with 3 elements, found one with 4 elements | - = note: expected type `({integer}, {integer}, {integer})` - found type `(_, _, _, _)` + = note: expected tuple `({integer}, {integer}, {integer})` + found tuple `(_, _, _, _)` error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields --> $DIR/pat-tuple-overfield.rs:10:9 diff --git a/src/test/ui/pattern/pattern-error-continue.rs b/src/test/ui/pattern/pattern-error-continue.rs index 79cc4b552a71..f21da3b55dc3 100644 --- a/src/test/ui/pattern/pattern-error-continue.rs +++ b/src/test/ui/pattern/pattern-error-continue.rs @@ -21,9 +21,9 @@ fn main() { match 'c' { S { .. } => (), //~^ ERROR mismatched types - //~| expected type `char` - //~| found type `S` //~| expected char, found struct `S` + //~| expected type `char` + //~| found struct `S` _ => () } diff --git a/src/test/ui/pattern/pattern-error-continue.stderr b/src/test/ui/pattern/pattern-error-continue.stderr index 5a7dab30d83b..c8d80043fdbe 100644 --- a/src/test/ui/pattern/pattern-error-continue.stderr +++ b/src/test/ui/pattern/pattern-error-continue.stderr @@ -33,7 +33,7 @@ LL | S { .. } => (), | ^^^^^^^^ expected char, found struct `S` | = note: expected type `char` - found type `S` + found struct `S` error[E0308]: mismatched types --> $DIR/pattern-error-continue.rs:30:7 diff --git a/src/test/ui/pattern/pattern-ident-path-generics.stderr b/src/test/ui/pattern/pattern-ident-path-generics.stderr index bfc10c5f8665..4805b0f2d57a 100644 --- a/src/test/ui/pattern/pattern-ident-path-generics.stderr +++ b/src/test/ui/pattern/pattern-ident-path-generics.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | None:: => {} | ^^^^^^^^^^^^^ expected &str, found isize | - = note: expected type `std::option::Option<&str>` - found type `std::option::Option` + = note: expected enum `std::option::Option<&str>` + found enum `std::option::Option` error: aborting due to previous error diff --git a/src/test/ui/pattern/pattern-tyvar.stderr b/src/test/ui/pattern/pattern-tyvar.stderr index 548347034671..54e0e5b53a43 100644 --- a/src/test/ui/pattern/pattern-tyvar.stderr +++ b/src/test/ui/pattern/pattern-tyvar.stderr @@ -6,8 +6,8 @@ LL | match t { LL | Bar::T1(_, Some::(x)) => { | ^^^^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found isize | - = note: expected type `std::option::Option>` - found type `std::option::Option` + = note: expected enum `std::option::Option>` + found enum `std::option::Option` error: aborting due to previous error diff --git a/src/test/ui/point-to-type-err-cause-on-impl-trait-return-2.stderr b/src/test/ui/point-to-type-err-cause-on-impl-trait-return-2.stderr index edaa60e5b8d8..c61f9a7039b2 100644 --- a/src/test/ui/point-to-type-err-cause-on-impl-trait-return-2.stderr +++ b/src/test/ui/point-to-type-err-cause-on-impl-trait-return-2.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let value: &bool = unsafe { &42 }; | ^^^ expected bool, found integer | - = note: expected type `&bool` - found type `&{integer}` + = note: expected reference `&bool` + found reference `&{integer}` error: aborting due to previous error diff --git a/src/test/ui/proc-macro/attribute-spans-preserved.stderr b/src/test/ui/proc-macro/attribute-spans-preserved.stderr index 6c571dbdb476..e8e3b488209e 100644 --- a/src/test/ui/proc-macro/attribute-spans-preserved.stderr +++ b/src/test/ui/proc-macro/attribute-spans-preserved.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | #[ foo ( let y: u32 = "z"; ) ] | ^^^ expected u32, found reference | - = note: expected type `u32` - found type `&'static str` + = note: expected type `u32` + found reference `&'static str` error[E0308]: mismatched types --> $DIR/attribute-spans-preserved.rs:8:23 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | #[ bar { let x: u32 = "y"; } ] | ^^^ expected u32, found reference | - = note: expected type `u32` - found type `&'static str` + = note: expected type `u32` + found reference `&'static str` error: aborting due to 2 previous errors diff --git a/src/test/ui/proc-macro/attribute-with-error.stderr b/src/test/ui/proc-macro/attribute-with-error.stderr index 937d47ff0897..73d0e2ef66e7 100644 --- a/src/test/ui/proc-macro/attribute-with-error.stderr +++ b/src/test/ui/proc-macro/attribute-with-error.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let a: i32 = "foo"; | ^^^^^ expected i32, found reference | - = note: expected type `i32` - found type `&'static str` + = note: expected type `i32` + found reference `&'static str` error[E0308]: mismatched types --> $DIR/attribute-with-error.rs:12:18 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | let b: i32 = "f'oo"; | ^^^^^^ expected i32, found reference | - = note: expected type `i32` - found type `&'static str` + = note: expected type `i32` + found reference `&'static str` error[E0308]: mismatched types --> $DIR/attribute-with-error.rs:25:22 @@ -22,8 +22,8 @@ error[E0308]: mismatched types LL | let a: i32 = "foo"; | ^^^^^ expected i32, found reference | - = note: expected type `i32` - found type `&'static str` + = note: expected type `i32` + found reference `&'static str` error[E0308]: mismatched types --> $DIR/attribute-with-error.rs:35:22 @@ -31,8 +31,8 @@ error[E0308]: mismatched types LL | let a: i32 = "foo"; | ^^^^^ expected i32, found reference | - = note: expected type `i32` - found type `&'static str` + = note: expected type `i32` + found reference `&'static str` error: aborting due to 4 previous errors diff --git a/src/test/ui/proc-macro/issue-37788.stderr b/src/test/ui/proc-macro/issue-37788.stderr index 0727e8c8ed16..6a75f229a0df 100644 --- a/src/test/ui/proc-macro/issue-37788.stderr +++ b/src/test/ui/proc-macro/issue-37788.stderr @@ -10,7 +10,7 @@ LL | std::cell::Cell::new(0) | expected (), found struct `std::cell::Cell` | = note: expected type `()` - found type `std::cell::Cell<{integer}>` + found struct `std::cell::Cell<{integer}>` error: aborting due to previous error diff --git a/src/test/ui/proc-macro/nested-item-spans.stderr b/src/test/ui/proc-macro/nested-item-spans.stderr index bef80311f38e..b8776c29057c 100644 --- a/src/test/ui/proc-macro/nested-item-spans.stderr +++ b/src/test/ui/proc-macro/nested-item-spans.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let x: u32 = "x"; | ^^^ expected u32, found reference | - = note: expected type `u32` - found type `&'static str` + = note: expected type `u32` + found reference `&'static str` error[E0308]: mismatched types --> $DIR/nested-item-spans.rs:18:22 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | let x: u32 = "x"; | ^^^ expected u32, found reference | - = note: expected type `u32` - found type `&'static str` + = note: expected type `u32` + found reference `&'static str` error: aborting due to 2 previous errors diff --git a/src/test/ui/proc-macro/signature.stderr b/src/test/ui/proc-macro/signature.stderr index 4743e3031a34..6ebc99601c41 100644 --- a/src/test/ui/proc-macro/signature.stderr +++ b/src/test/ui/proc-macro/signature.stderr @@ -7,8 +7,8 @@ LL | | loop {} LL | | } | |_^ expected normal fn, found unsafe fn | - = note: expected type `fn(proc_macro::TokenStream) -> proc_macro::TokenStream` - found type `unsafe extern "C" fn(i32, u32) -> u32 {foo}` + = note: expected fn pointer `fn(proc_macro::TokenStream) -> proc_macro::TokenStream` + found fn item `unsafe extern "C" fn(i32, u32) -> u32 {foo}` error: aborting due to previous error diff --git a/src/test/ui/proc-macro/span-preservation.stderr b/src/test/ui/proc-macro/span-preservation.stderr index 545c2fa5f40e..f3b4f2bcd3d3 100644 --- a/src/test/ui/proc-macro/span-preservation.stderr +++ b/src/test/ui/proc-macro/span-preservation.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let x: usize = "hello"; | ^^^^^^^ expected usize, found reference | - = note: expected type `usize` - found type `&'static str` + = note: expected type `usize` + found reference `&'static str` error[E0308]: mismatched types --> $DIR/span-preservation.rs:17:29 diff --git a/src/test/ui/ptr-coercion.rs b/src/test/ui/ptr-coercion.rs index d1ef88b50e30..193899034c7b 100644 --- a/src/test/ui/ptr-coercion.rs +++ b/src/test/ui/ptr-coercion.rs @@ -5,19 +5,19 @@ pub fn main() { // *const -> *mut let x: *const isize = &42; let x: *mut isize = x; //~ ERROR mismatched types - //~| expected type `*mut isize` - //~| found type `*const isize` + //~| expected raw pointer `*mut isize` + //~| found raw pointer `*const isize` //~| types differ in mutability // & -> *mut let x: *mut isize = &42; //~ ERROR mismatched types - //~| expected type `*mut isize` - //~| found type `&isize` + //~| expected raw pointer `*mut isize` + //~| found reference `&isize` //~| types differ in mutability let x: *const isize = &42; let x: *mut isize = x; //~ ERROR mismatched types - //~| expected type `*mut isize` - //~| found type `*const isize` + //~| expected raw pointer `*mut isize` + //~| found raw pointer `*const isize` //~| types differ in mutability } diff --git a/src/test/ui/ptr-coercion.stderr b/src/test/ui/ptr-coercion.stderr index 019241d6874a..49dc4b36268c 100644 --- a/src/test/ui/ptr-coercion.stderr +++ b/src/test/ui/ptr-coercion.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let x: *mut isize = x; | ^ types differ in mutability | - = note: expected type `*mut isize` - found type `*const isize` + = note: expected raw pointer `*mut isize` + found raw pointer `*const isize` error[E0308]: mismatched types --> $DIR/ptr-coercion.rs:13:25 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | let x: *mut isize = &42; | ^^^ types differ in mutability | - = note: expected type `*mut isize` - found type `&isize` + = note: expected raw pointer `*mut isize` + found reference `&isize` error[E0308]: mismatched types --> $DIR/ptr-coercion.rs:19:25 @@ -22,8 +22,8 @@ error[E0308]: mismatched types LL | let x: *mut isize = x; | ^ types differ in mutability | - = note: expected type `*mut isize` - found type `*const isize` + = note: expected raw pointer `*mut isize` + found raw pointer `*const isize` error: aborting due to 3 previous errors diff --git a/src/test/ui/range/issue-54505-no-literals.stderr b/src/test/ui/range/issue-54505-no-literals.stderr index b8811c98d21b..c49093343c0c 100644 --- a/src/test/ui/range/issue-54505-no-literals.stderr +++ b/src/test/ui/range/issue-54505-no-literals.stderr @@ -7,8 +7,8 @@ LL | take_range(std::ops::Range { start: 0, end: 1 }); | expected reference, found struct `std::ops::Range` | help: consider borrowing here: `&std::ops::Range { start: 0, end: 1 }` | - = note: expected type `&_` - found type `std::ops::Range<{integer}>` + = note: expected reference `&_` + found struct `std::ops::Range<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:21:16 @@ -19,8 +19,8 @@ LL | take_range(::std::ops::Range { start: 0, end: 1 }); | expected reference, found struct `std::ops::Range` | help: consider borrowing here: `&::std::ops::Range { start: 0, end: 1 }` | - = note: expected type `&_` - found type `std::ops::Range<{integer}>` + = note: expected reference `&_` + found struct `std::ops::Range<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:26:16 @@ -31,8 +31,8 @@ LL | take_range(std::ops::RangeFrom { start: 1 }); | expected reference, found struct `std::ops::RangeFrom` | help: consider borrowing here: `&std::ops::RangeFrom { start: 1 }` | - = note: expected type `&_` - found type `std::ops::RangeFrom<{integer}>` + = note: expected reference `&_` + found struct `std::ops::RangeFrom<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:31:16 @@ -43,8 +43,8 @@ LL | take_range(::std::ops::RangeFrom { start: 1 }); | expected reference, found struct `std::ops::RangeFrom` | help: consider borrowing here: `&::std::ops::RangeFrom { start: 1 }` | - = note: expected type `&_` - found type `std::ops::RangeFrom<{integer}>` + = note: expected reference `&_` + found struct `std::ops::RangeFrom<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:36:16 @@ -55,8 +55,8 @@ LL | take_range(std::ops::RangeFull {}); | expected reference, found struct `std::ops::RangeFull` | help: consider borrowing here: `&std::ops::RangeFull {}` | - = note: expected type `&_` - found type `std::ops::RangeFull` + = note: expected reference `&_` + found struct `std::ops::RangeFull` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:41:16 @@ -67,8 +67,8 @@ LL | take_range(::std::ops::RangeFull {}); | expected reference, found struct `std::ops::RangeFull` | help: consider borrowing here: `&::std::ops::RangeFull {}` | - = note: expected type `&_` - found type `std::ops::RangeFull` + = note: expected reference `&_` + found struct `std::ops::RangeFull` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:46:16 @@ -79,8 +79,8 @@ LL | take_range(std::ops::RangeInclusive::new(0, 1)); | expected reference, found struct `std::ops::RangeInclusive` | help: consider borrowing here: `&std::ops::RangeInclusive::new(0, 1)` | - = note: expected type `&_` - found type `std::ops::RangeInclusive<{integer}>` + = note: expected reference `&_` + found struct `std::ops::RangeInclusive<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:51:16 @@ -91,8 +91,8 @@ LL | take_range(::std::ops::RangeInclusive::new(0, 1)); | expected reference, found struct `std::ops::RangeInclusive` | help: consider borrowing here: `&::std::ops::RangeInclusive::new(0, 1)` | - = note: expected type `&_` - found type `std::ops::RangeInclusive<{integer}>` + = note: expected reference `&_` + found struct `std::ops::RangeInclusive<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:56:16 @@ -103,8 +103,8 @@ LL | take_range(std::ops::RangeTo { end: 5 }); | expected reference, found struct `std::ops::RangeTo` | help: consider borrowing here: `&std::ops::RangeTo { end: 5 }` | - = note: expected type `&_` - found type `std::ops::RangeTo<{integer}>` + = note: expected reference `&_` + found struct `std::ops::RangeTo<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:61:16 @@ -115,8 +115,8 @@ LL | take_range(::std::ops::RangeTo { end: 5 }); | expected reference, found struct `std::ops::RangeTo` | help: consider borrowing here: `&::std::ops::RangeTo { end: 5 }` | - = note: expected type `&_` - found type `std::ops::RangeTo<{integer}>` + = note: expected reference `&_` + found struct `std::ops::RangeTo<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:66:16 @@ -127,8 +127,8 @@ LL | take_range(std::ops::RangeToInclusive { end: 5 }); | expected reference, found struct `std::ops::RangeToInclusive` | help: consider borrowing here: `&std::ops::RangeToInclusive { end: 5 }` | - = note: expected type `&_` - found type `std::ops::RangeToInclusive<{integer}>` + = note: expected reference `&_` + found struct `std::ops::RangeToInclusive<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:71:16 @@ -139,8 +139,8 @@ LL | take_range(::std::ops::RangeToInclusive { end: 5 }); | expected reference, found struct `std::ops::RangeToInclusive` | help: consider borrowing here: `&::std::ops::RangeToInclusive { end: 5 }` | - = note: expected type `&_` - found type `std::ops::RangeToInclusive<{integer}>` + = note: expected reference `&_` + found struct `std::ops::RangeToInclusive<{integer}>` error: aborting due to 12 previous errors diff --git a/src/test/ui/range/issue-54505-no-std.stderr b/src/test/ui/range/issue-54505-no-std.stderr index 4922e59953c9..aead80fa500a 100644 --- a/src/test/ui/range/issue-54505-no-std.stderr +++ b/src/test/ui/range/issue-54505-no-std.stderr @@ -9,8 +9,8 @@ LL | take_range(0..1); | expected reference, found struct `core::ops::Range` | help: consider borrowing here: `&(0..1)` | - = note: expected type `&_` - found type `core::ops::Range<{integer}>` + = note: expected reference `&_` + found struct `core::ops::Range<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-std.rs:33:16 @@ -21,8 +21,8 @@ LL | take_range(1..); | expected reference, found struct `core::ops::RangeFrom` | help: consider borrowing here: `&(1..)` | - = note: expected type `&_` - found type `core::ops::RangeFrom<{integer}>` + = note: expected reference `&_` + found struct `core::ops::RangeFrom<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-std.rs:38:16 @@ -33,8 +33,8 @@ LL | take_range(..); | expected reference, found struct `core::ops::RangeFull` | help: consider borrowing here: `&(..)` | - = note: expected type `&_` - found type `core::ops::RangeFull` + = note: expected reference `&_` + found struct `core::ops::RangeFull` error[E0308]: mismatched types --> $DIR/issue-54505-no-std.rs:43:16 @@ -45,8 +45,8 @@ LL | take_range(0..=1); | expected reference, found struct `core::ops::RangeInclusive` | help: consider borrowing here: `&(0..=1)` | - = note: expected type `&_` - found type `core::ops::RangeInclusive<{integer}>` + = note: expected reference `&_` + found struct `core::ops::RangeInclusive<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-std.rs:48:16 @@ -57,8 +57,8 @@ LL | take_range(..5); | expected reference, found struct `core::ops::RangeTo` | help: consider borrowing here: `&(..5)` | - = note: expected type `&_` - found type `core::ops::RangeTo<{integer}>` + = note: expected reference `&_` + found struct `core::ops::RangeTo<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-std.rs:53:16 @@ -69,8 +69,8 @@ LL | take_range(..=42); | expected reference, found struct `core::ops::RangeToInclusive` | help: consider borrowing here: `&(..=42)` | - = note: expected type `&_` - found type `core::ops::RangeToInclusive<{integer}>` + = note: expected reference `&_` + found struct `core::ops::RangeToInclusive<{integer}>` error: aborting due to 7 previous errors diff --git a/src/test/ui/range/issue-54505.stderr b/src/test/ui/range/issue-54505.stderr index d6e1fb0cef23..9949ff85671c 100644 --- a/src/test/ui/range/issue-54505.stderr +++ b/src/test/ui/range/issue-54505.stderr @@ -7,8 +7,8 @@ LL | take_range(0..1); | expected reference, found struct `std::ops::Range` | help: consider borrowing here: `&(0..1)` | - = note: expected type `&_` - found type `std::ops::Range<{integer}>` + = note: expected reference `&_` + found struct `std::ops::Range<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505.rs:19:16 @@ -19,8 +19,8 @@ LL | take_range(1..); | expected reference, found struct `std::ops::RangeFrom` | help: consider borrowing here: `&(1..)` | - = note: expected type `&_` - found type `std::ops::RangeFrom<{integer}>` + = note: expected reference `&_` + found struct `std::ops::RangeFrom<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505.rs:24:16 @@ -31,8 +31,8 @@ LL | take_range(..); | expected reference, found struct `std::ops::RangeFull` | help: consider borrowing here: `&(..)` | - = note: expected type `&_` - found type `std::ops::RangeFull` + = note: expected reference `&_` + found struct `std::ops::RangeFull` error[E0308]: mismatched types --> $DIR/issue-54505.rs:29:16 @@ -43,8 +43,8 @@ LL | take_range(0..=1); | expected reference, found struct `std::ops::RangeInclusive` | help: consider borrowing here: `&(0..=1)` | - = note: expected type `&_` - found type `std::ops::RangeInclusive<{integer}>` + = note: expected reference `&_` + found struct `std::ops::RangeInclusive<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505.rs:34:16 @@ -55,8 +55,8 @@ LL | take_range(..5); | expected reference, found struct `std::ops::RangeTo` | help: consider borrowing here: `&(..5)` | - = note: expected type `&_` - found type `std::ops::RangeTo<{integer}>` + = note: expected reference `&_` + found struct `std::ops::RangeTo<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505.rs:39:16 @@ -67,8 +67,8 @@ LL | take_range(..=42); | expected reference, found struct `std::ops::RangeToInclusive` | help: consider borrowing here: `&(..=42)` | - = note: expected type `&_` - found type `std::ops::RangeToInclusive<{integer}>` + = note: expected reference `&_` + found struct `std::ops::RangeToInclusive<{integer}>` error: aborting due to 6 previous errors diff --git a/src/test/ui/regions-fn-subtyping-return-static-fail.stderr b/src/test/ui/regions-fn-subtyping-return-static-fail.stderr index 35478a7db860..27704b3e0a8c 100644 --- a/src/test/ui/regions-fn-subtyping-return-static-fail.stderr +++ b/src/test/ui/regions-fn-subtyping-return-static-fail.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | want_F(bar); | ^^^ expected concrete lifetime, found bound lifetime parameter 'cx | - = note: expected type `for<'cx> fn(&'cx S) -> &'cx S` - found type `for<'a> fn(&'a S) -> &S {bar::<'_>}` + = note: expected fn pointer `for<'cx> fn(&'cx S) -> &'cx S` + found fn item `for<'a> fn(&'a S) -> &S {bar::<'_>}` error[E0308]: mismatched types --> $DIR/regions-fn-subtyping-return-static-fail.rs:48:12 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | want_G(baz); | ^^^ expected concrete lifetime, found bound lifetime parameter 'cx | - = note: expected type `for<'cx> fn(&'cx S) -> &'static S` - found type `for<'r> fn(&'r S) -> &'r S {baz}` + = note: expected fn pointer `for<'cx> fn(&'cx S) -> &'static S` + found fn item `for<'r> fn(&'r S) -> &'r S {baz}` error: aborting due to 2 previous errors diff --git a/src/test/ui/regions/region-invariant-static-error-reporting.stderr b/src/test/ui/regions/region-invariant-static-error-reporting.stderr index 8358a7988c80..381bad4210f8 100644 --- a/src/test/ui/regions/region-invariant-static-error-reporting.stderr +++ b/src/test/ui/regions/region-invariant-static-error-reporting.stderr @@ -11,8 +11,8 @@ LL | | mk_static() LL | | }; | |_____- if and else have incompatible types | - = note: expected type `Invariant<'a>` - found type `Invariant<'static>` + = note: expected struct `Invariant<'a>` + found struct `Invariant<'static>` note: the lifetime `'a` as defined on the function body at 13:10... --> $DIR/region-invariant-static-error-reporting.rs:13:10 | diff --git a/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr b/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr index 36c66451cfaf..d2608e09ac55 100644 --- a/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr +++ b/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr @@ -22,8 +22,8 @@ error[E0308]: mismatched types LL | let _: fn(&mut &isize, &mut &isize) = a; | ^ expected concrete lifetime, found bound lifetime parameter | - = note: expected type `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)` - found type `for<'r, 's> fn(&'r mut &isize, &'s mut &isize) {a::<'_, '_>}` + = note: expected fn pointer `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)` + found fn item `for<'r, 's> fn(&'r mut &isize, &'s mut &isize) {a::<'_, '_>}` error: aborting due to 3 previous errors diff --git a/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr b/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr index a366bd2e5c2d..fa39d800b0ec 100644 --- a/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr +++ b/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr @@ -33,8 +33,8 @@ error[E0308]: mismatched types LL | let _: fn(&mut &isize, &mut &isize, &mut &isize) = a; | ^ expected concrete lifetime, found bound lifetime parameter | - = note: expected type `for<'r, 's, 't0, 't1, 't2, 't3> fn(&'r mut &'s isize, &'t0 mut &'t1 isize, &'t2 mut &'t3 isize)` - found type `for<'r, 's, 't0> fn(&'r mut &isize, &'s mut &isize, &'t0 mut &isize) {a::<'_, '_, '_>}` + = note: expected fn pointer `for<'r, 's, 't0, 't1, 't2, 't3> fn(&'r mut &'s isize, &'t0 mut &'t1 isize, &'t2 mut &'t3 isize)` + found fn item `for<'r, 's, 't0> fn(&'r mut &isize, &'s mut &isize, &'t0 mut &isize) {a::<'_, '_, '_>}` error: aborting due to 4 previous errors diff --git a/src/test/ui/regions/regions-bounds.stderr b/src/test/ui/regions/regions-bounds.stderr index a15710b86c06..a4eebab38639 100644 --- a/src/test/ui/regions/regions-bounds.stderr +++ b/src/test/ui/regions/regions-bounds.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | return e; | ^ lifetime mismatch | - = note: expected type `TupleStruct<'b>` - found type `TupleStruct<'a>` + = note: expected struct `TupleStruct<'b>` + found struct `TupleStruct<'a>` note: the lifetime `'a` as defined on the function body at 8:10... --> $DIR/regions-bounds.rs:8:10 | @@ -23,8 +23,8 @@ error[E0308]: mismatched types LL | return e; | ^ lifetime mismatch | - = note: expected type `Struct<'b>` - found type `Struct<'a>` + = note: expected struct `Struct<'b>` + found struct `Struct<'a>` note: the lifetime `'a` as defined on the function body at 12:10... --> $DIR/regions-bounds.rs:12:10 | diff --git a/src/test/ui/regions/regions-fn-subtyping-return-static.stderr b/src/test/ui/regions/regions-fn-subtyping-return-static.stderr index cda5ce273bd9..a8a7e97e6acf 100644 --- a/src/test/ui/regions/regions-fn-subtyping-return-static.stderr +++ b/src/test/ui/regions/regions-fn-subtyping-return-static.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | want_F(bar); | ^^^ expected concrete lifetime, found bound lifetime parameter 'cx | - = note: expected type `for<'cx> fn(&'cx S) -> &'cx S` - found type `for<'a> fn(&'a S) -> &S {bar::<'_>}` + = note: expected fn pointer `for<'cx> fn(&'cx S) -> &'cx S` + found fn item `for<'a> fn(&'a S) -> &S {bar::<'_>}` error: aborting due to previous error diff --git a/src/test/ui/regions/regions-infer-invariance-due-to-decl.stderr b/src/test/ui/regions/regions-infer-invariance-due-to-decl.stderr index f4e223bbf6f9..4de380ad03b5 100644 --- a/src/test/ui/regions/regions-infer-invariance-due-to-decl.stderr +++ b/src/test/ui/regions/regions-infer-invariance-due-to-decl.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | b_isize | ^^^^^^^ lifetime mismatch | - = note: expected type `Invariant<'static>` - found type `Invariant<'r>` + = note: expected struct `Invariant<'static>` + found struct `Invariant<'r>` note: the lifetime `'r` as defined on the function body at 11:23... --> $DIR/regions-infer-invariance-due-to-decl.rs:11:23 | diff --git a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr index 6322244fcf93..a98d2f0222e6 100644 --- a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr +++ b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | b_isize | ^^^^^^^ lifetime mismatch | - = note: expected type `Invariant<'static>` - found type `Invariant<'r>` + = note: expected struct `Invariant<'static>` + found struct `Invariant<'r>` note: the lifetime `'r` as defined on the function body at 9:23... --> $DIR/regions-infer-invariance-due-to-mutability-3.rs:9:23 | diff --git a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr index 7baae69945f9..deb08ff862cc 100644 --- a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr +++ b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | b_isize | ^^^^^^^ lifetime mismatch | - = note: expected type `Invariant<'static>` - found type `Invariant<'r>` + = note: expected struct `Invariant<'static>` + found struct `Invariant<'r>` note: the lifetime `'r` as defined on the function body at 9:23... --> $DIR/regions-infer-invariance-due-to-mutability-4.rs:9:23 | diff --git a/src/test/ui/regions/regions-infer-not-param.rs b/src/test/ui/regions/regions-infer-not-param.rs index d1744f8a51ee..7643be64d5b2 100644 --- a/src/test/ui/regions/regions-infer-not-param.rs +++ b/src/test/ui/regions/regions-infer-not-param.rs @@ -17,10 +17,10 @@ fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p } //~ ERROR mismatched ty fn take_indirect1(p: Indirect1) -> Indirect1 { p } fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } //~ ERROR mismatched types -//~| expected type `Indirect2<'b>` -//~| found type `Indirect2<'a>` +//~| expected struct `Indirect2<'b>` +//~| found struct `Indirect2<'a>` //~| ERROR mismatched types -//~| expected type `Indirect2<'b>` -//~| found type `Indirect2<'a>` +//~| expected struct `Indirect2<'b>` +//~| found struct `Indirect2<'a>` fn main() {} diff --git a/src/test/ui/regions/regions-infer-not-param.stderr b/src/test/ui/regions/regions-infer-not-param.stderr index 6365769430f3..a6e2047559cc 100644 --- a/src/test/ui/regions/regions-infer-not-param.stderr +++ b/src/test/ui/regions/regions-infer-not-param.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p } | ^ lifetime mismatch | - = note: expected type `Direct<'b>` - found type `Direct<'a>` + = note: expected struct `Direct<'b>` + found struct `Direct<'a>` note: the lifetime `'a` as defined on the function body at 15:16... --> $DIR/regions-infer-not-param.rs:15:16 | @@ -23,8 +23,8 @@ error[E0308]: mismatched types LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } | ^ lifetime mismatch | - = note: expected type `Indirect2<'b>` - found type `Indirect2<'a>` + = note: expected struct `Indirect2<'b>` + found struct `Indirect2<'a>` note: the lifetime `'a` as defined on the function body at 19:19... --> $DIR/regions-infer-not-param.rs:19:19 | @@ -42,8 +42,8 @@ error[E0308]: mismatched types LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } | ^ lifetime mismatch | - = note: expected type `Indirect2<'b>` - found type `Indirect2<'a>` + = note: expected struct `Indirect2<'b>` + found struct `Indirect2<'a>` note: the lifetime `'b` as defined on the function body at 19:22... --> $DIR/regions-infer-not-param.rs:19:22 | diff --git a/src/test/ui/regions/regions-infer-paramd-indirect.rs b/src/test/ui/regions/regions-infer-paramd-indirect.rs index 0fb1824aa5d7..beb88e81bc1d 100644 --- a/src/test/ui/regions/regions-infer-paramd-indirect.rs +++ b/src/test/ui/regions/regions-infer-paramd-indirect.rs @@ -21,8 +21,8 @@ impl<'a> SetF<'a> for C<'a> { fn set_f_bad(&mut self, b: Box) { self.f = b; //~^ ERROR mismatched types - //~| expected type `std::boxed::Box>` - //~| found type `std::boxed::Box>` + //~| expected struct `std::boxed::Box>` + //~| found struct `std::boxed::Box>` //~| lifetime mismatch } } diff --git a/src/test/ui/regions/regions-infer-paramd-indirect.stderr b/src/test/ui/regions/regions-infer-paramd-indirect.stderr index b1fd337b8d04..1497c3ed9256 100644 --- a/src/test/ui/regions/regions-infer-paramd-indirect.stderr +++ b/src/test/ui/regions/regions-infer-paramd-indirect.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | self.f = b; | ^ lifetime mismatch | - = note: expected type `std::boxed::Box>` - found type `std::boxed::Box>` + = note: expected struct `std::boxed::Box>` + found struct `std::boxed::Box>` note: the anonymous lifetime #2 defined on the method body at 21:5... --> $DIR/regions-infer-paramd-indirect.rs:21:5 | diff --git a/src/test/ui/regions/regions-lifetime-bounds-on-fns.stderr b/src/test/ui/regions/regions-lifetime-bounds-on-fns.stderr index e260fccf8488..a251bb7eb1af 100644 --- a/src/test/ui/regions/regions-lifetime-bounds-on-fns.stderr +++ b/src/test/ui/regions/regions-lifetime-bounds-on-fns.stderr @@ -22,8 +22,8 @@ error[E0308]: mismatched types LL | let _: fn(&mut &isize, &mut &isize) = a; | ^ expected concrete lifetime, found bound lifetime parameter | - = note: expected type `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)` - found type `for<'r, 's> fn(&'r mut &isize, &'s mut &isize) {a::<'_, '_>}` + = note: expected fn pointer `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)` + found fn item `for<'r, 's> fn(&'r mut &isize, &'s mut &isize) {a::<'_, '_>}` error: aborting due to 3 previous errors diff --git a/src/test/ui/regions/regions-trait-1.stderr b/src/test/ui/regions/regions-trait-1.stderr index f835c005ff96..60ac7c09f041 100644 --- a/src/test/ui/regions/regions-trait-1.stderr +++ b/src/test/ui/regions/regions-trait-1.stderr @@ -4,8 +4,8 @@ error[E0308]: method not compatible with trait LL | fn get_ctxt(&self) -> &'a Ctxt { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | - = note: expected type `fn(&HasCtxt<'a>) -> &Ctxt` - found type `fn(&HasCtxt<'a>) -> &'a Ctxt` + = note: expected fn pointer `fn(&HasCtxt<'a>) -> &Ctxt` + found fn pointer `fn(&HasCtxt<'a>) -> &'a Ctxt` note: the lifetime `'a` as defined on the impl at 12:6... --> $DIR/regions-trait-1.rs:12:6 | diff --git a/src/test/ui/regions/regions-trait-object-subtyping.stderr b/src/test/ui/regions/regions-trait-object-subtyping.stderr index b7c7f93149dc..ef69f2535dc1 100644 --- a/src/test/ui/regions/regions-trait-object-subtyping.stderr +++ b/src/test/ui/regions/regions-trait-object-subtyping.stderr @@ -46,8 +46,8 @@ error[E0308]: mismatched types LL | x | ^ lifetime mismatch | - = note: expected type `Wrapper<&'b mut (dyn Dummy + 'b)>` - found type `Wrapper<&'a mut (dyn Dummy + 'a)>` + = note: expected struct `Wrapper<&'b mut (dyn Dummy + 'b)>` + found struct `Wrapper<&'a mut (dyn Dummy + 'a)>` note: the lifetime `'b` as defined on the function body at 20:15... --> $DIR/regions-trait-object-subtyping.rs:20:15 | diff --git a/src/test/ui/regions/regions-variance-invariant-use-covariant.stderr b/src/test/ui/regions/regions-variance-invariant-use-covariant.stderr index aae519c5df2e..e7a5db671bf6 100644 --- a/src/test/ui/regions/regions-variance-invariant-use-covariant.stderr +++ b/src/test/ui/regions/regions-variance-invariant-use-covariant.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let _: Invariant<'static> = c; | ^ lifetime mismatch | - = note: expected type `Invariant<'static>` - found type `Invariant<'b>` + = note: expected struct `Invariant<'static>` + found struct `Invariant<'b>` note: the lifetime `'b` as defined on the function body at 11:9... --> $DIR/regions-variance-invariant-use-covariant.rs:11:9 | diff --git a/src/test/ui/reify-intrinsic.stderr b/src/test/ui/reify-intrinsic.stderr index 4a1bd77cf7ee..da4332789753 100644 --- a/src/test/ui/reify-intrinsic.stderr +++ b/src/test/ui/reify-intrinsic.stderr @@ -7,8 +7,8 @@ LL | let _: unsafe extern "rust-intrinsic" fn(isize) -> usize = std::mem::tr | cannot coerce intrinsics to function pointers | help: use parentheses to call this function: `std::mem::transmute(...)` | - = note: expected type `unsafe extern "rust-intrinsic" fn(isize) -> usize` - found type `unsafe extern "rust-intrinsic" fn(_) -> _ {std::intrinsics::transmute::<_, _>}` + = note: expected fn pointer `unsafe extern "rust-intrinsic" fn(isize) -> usize` + found fn item `unsafe extern "rust-intrinsic" fn(_) -> _ {std::intrinsics::transmute::<_, _>}` error[E0606]: casting `unsafe extern "rust-intrinsic" fn(_) -> _ {std::intrinsics::transmute::<_, _>}` as `unsafe extern "rust-intrinsic" fn(isize) -> usize` is invalid --> $DIR/reify-intrinsic.rs:11:13 diff --git a/src/test/ui/reject-specialized-drops-8142.rs b/src/test/ui/reject-specialized-drops-8142.rs index b3cb83f94e05..655b42f5f8fb 100644 --- a/src/test/ui/reject-specialized-drops-8142.rs +++ b/src/test/ui/reject-specialized-drops-8142.rs @@ -28,8 +28,8 @@ impl<'ml> Drop for M<'ml> { fn drop(&mut self) { } } // AC impl Drop for N<'static> { fn drop(&mut self) { } } // REJECT //~^ ERROR mismatched types -//~| expected type `N<'n>` -//~| found type `N<'static>` +//~| expected struct `N<'n>` +//~| found struct `N<'static>` impl Drop for O { fn drop(&mut self) { } } // ACCEPT diff --git a/src/test/ui/reject-specialized-drops-8142.stderr b/src/test/ui/reject-specialized-drops-8142.stderr index 609a40163a30..e55f0232ff94 100644 --- a/src/test/ui/reject-specialized-drops-8142.stderr +++ b/src/test/ui/reject-specialized-drops-8142.stderr @@ -32,8 +32,8 @@ error[E0308]: mismatched types LL | impl Drop for N<'static> { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | - = note: expected type `N<'n>` - found type `N<'static>` + = note: expected struct `N<'n>` + found struct `N<'static>` note: the lifetime `'n` as defined on the struct at 8:10... --> $DIR/reject-specialized-drops-8142.rs:8:10 | diff --git a/src/test/ui/repeat_count.rs b/src/test/ui/repeat_count.rs index c42dc8c99719..fd9c49510152 100644 --- a/src/test/ui/repeat_count.rs +++ b/src/test/ui/repeat_count.rs @@ -6,22 +6,22 @@ fn main() { //~^ ERROR attempt to use a non-constant value in a constant [E0435] let b = [0; ()]; //~^ ERROR mismatched types + //~| expected usize, found () //~| expected type `usize` //~| found type `()` - //~| expected usize, found () let c = [0; true]; //~^ ERROR mismatched types //~| expected usize, found bool let d = [0; 0.5]; //~^ ERROR mismatched types + //~| expected usize, found floating-point number //~| expected type `usize` //~| found type `{float}` - //~| expected usize, found floating-point number let e = [0; "foo"]; //~^ ERROR mismatched types - //~| expected type `usize` - //~| found type `&'static str` //~| expected usize, found reference + //~| expected type `usize` + //~| found reference `&'static str` let f = [0; -4_isize]; //~^ ERROR mismatched types //~| expected usize, found isize @@ -33,7 +33,7 @@ fn main() { } let g = [0; G { g: () }]; //~^ ERROR mismatched types - //~| expected type `usize` - //~| found type `main::G` //~| expected usize, found struct `main::G` + //~| expected type `usize` + //~| found struct `main::G` } diff --git a/src/test/ui/repeat_count.stderr b/src/test/ui/repeat_count.stderr index aae79dfbb3fa..ff79a711ae1e 100644 --- a/src/test/ui/repeat_count.stderr +++ b/src/test/ui/repeat_count.stderr @@ -34,8 +34,8 @@ error[E0308]: mismatched types LL | let e = [0; "foo"]; | ^^^^^ expected usize, found reference | - = note: expected type `usize` - found type `&'static str` + = note: expected type `usize` + found reference `&'static str` error[E0308]: mismatched types --> $DIR/repeat_count.rs:25:17 @@ -66,7 +66,7 @@ LL | let g = [0; G { g: () }]; | ^^^^^^^^^^^ expected usize, found struct `main::G` | = note: expected type `usize` - found type `main::G` + found struct `main::G` error: aborting due to 8 previous errors diff --git a/src/test/ui/resolve/name-clash-nullary.stderr b/src/test/ui/resolve/name-clash-nullary.stderr index 51793f426d6d..7977d7cd20f9 100644 --- a/src/test/ui/resolve/name-clash-nullary.stderr +++ b/src/test/ui/resolve/name-clash-nullary.stderr @@ -5,7 +5,7 @@ LL | let None: isize = 42; | ^^^^ expected isize, found enum `std::option::Option` | = note: expected type `isize` - found type `std::option::Option<_>` + found enum `std::option::Option<_>` error: aborting due to previous error diff --git a/src/test/ui/resolve/privacy-enum-ctor.stderr b/src/test/ui/resolve/privacy-enum-ctor.stderr index 8a450ab85e92..12270e426448 100644 --- a/src/test/ui/resolve/privacy-enum-ctor.stderr +++ b/src/test/ui/resolve/privacy-enum-ctor.stderr @@ -285,8 +285,8 @@ LL | let _: Z = Z::Fn; | expected enum `m::n::Z`, found fn item | help: use parentheses to instantiate this tuple variant: `Z::Fn(_)` | - = note: expected type `m::n::Z` - found type `fn(u8) -> m::n::Z {m::n::Z::Fn}` + = note: expected enum `m::n::Z` + found fn item `fn(u8) -> m::n::Z {m::n::Z::Fn}` error[E0618]: expected function, found enum variant `Z::Unit` --> $DIR/privacy-enum-ctor.rs:31:17 @@ -316,8 +316,8 @@ LL | let _: E = m::E::Fn; | expected enum `m::E`, found fn item | help: use parentheses to instantiate this tuple variant: `m::E::Fn(_)` | - = note: expected type `m::E` - found type `fn(u8) -> m::E {m::E::Fn}` + = note: expected enum `m::E` + found fn item `fn(u8) -> m::E {m::E::Fn}` error[E0618]: expected function, found enum variant `m::E::Unit` --> $DIR/privacy-enum-ctor.rs:47:16 @@ -347,8 +347,8 @@ LL | let _: E = E::Fn; | expected enum `m::E`, found fn item | help: use parentheses to instantiate this tuple variant: `E::Fn(_)` | - = note: expected type `m::E` - found type `fn(u8) -> m::E {m::E::Fn}` + = note: expected enum `m::E` + found fn item `fn(u8) -> m::E {m::E::Fn}` error[E0618]: expected function, found enum variant `E::Unit` --> $DIR/privacy-enum-ctor.rs:55:16 diff --git a/src/test/ui/retslot-cast.stderr b/src/test/ui/retslot-cast.stderr index a1169910ae7e..cdef304cdc85 100644 --- a/src/test/ui/retslot-cast.stderr +++ b/src/test/ui/retslot-cast.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | inner(x) | ^^^^^^^^ expected trait `std::iter::Iterator`, found trait `std::iter::Iterator + std::marker::Send` | - = note: expected type `std::option::Option<&dyn std::iter::Iterator>` - found type `std::option::Option<&dyn std::iter::Iterator + std::marker::Send>` + = note: expected enum `std::option::Option<&dyn std::iter::Iterator>` + found enum `std::option::Option<&dyn std::iter::Iterator + std::marker::Send>` error: aborting due to previous error diff --git a/src/test/ui/return/return-from-diverging.stderr b/src/test/ui/return/return-from-diverging.stderr index 3dd029c14c0f..31f86bdf15de 100644 --- a/src/test/ui/return/return-from-diverging.stderr +++ b/src/test/ui/return/return-from-diverging.stderr @@ -6,8 +6,8 @@ LL | fn fail() -> ! { LL | return "wow"; | ^^^^^ expected !, found reference | - = note: expected type `!` - found type `&'static str` + = note: expected type `!` + found reference `&'static str` error: aborting due to previous error diff --git a/src/test/ui/return/return-type.stderr b/src/test/ui/return/return-type.stderr index 6eeec41b94c5..feb8a95d3c8b 100644 --- a/src/test/ui/return/return-type.stderr +++ b/src/test/ui/return/return-type.stderr @@ -5,7 +5,7 @@ LL | foo(4 as usize) | ^^^^^^^^^^^^^^^ expected (), found struct `S` | = note: expected type `()` - found type `S` + found struct `S` help: try adding a semicolon | LL | foo(4 as usize); diff --git a/src/test/ui/rfc-2005-default-binding-mode/const.stderr b/src/test/ui/rfc-2005-default-binding-mode/const.stderr index 210b4f6be63d..e536ed50de15 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/const.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/const.stderr @@ -5,7 +5,7 @@ LL | FOO => {}, | ^^^ expected &Foo, found struct `Foo` | = note: expected type `&Foo` - found type `Foo` + found struct `Foo` error: aborting due to previous error diff --git a/src/test/ui/rfc-2005-default-binding-mode/lit.stderr b/src/test/ui/rfc-2005-default-binding-mode/lit.stderr index 9be1876b7145..f8df0b4ada08 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/lit.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/lit.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | "abc" => true, | ^^^^^ expected &str, found str | - = note: expected type `&&str` - found type `&'static str` + = note: expected type `&&str` + found reference `&'static str` error[E0308]: mismatched types --> $DIR/lit.rs:16:9 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | b"abc" => true, | ^^^^^^ expected &[u8], found array of 3 elements | - = note: expected type `&&[u8]` - found type `&'static [u8; 3]` + = note: expected type `&&[u8]` + found reference `&'static [u8; 3]` error: aborting due to 2 previous errors diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr index d05ee1d39ec3..0a597eaa1ffc 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr @@ -6,8 +6,8 @@ LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A { LL | x | ^ expected struct `A`, found enum `uninhabited::UninhabitedEnum` | - = note: expected type `A` - found type `uninhabited::UninhabitedEnum` + = note: expected struct `A` + found enum `uninhabited::UninhabitedEnum` error[E0308]: mismatched types --> $DIR/coercions.rs:27:5 @@ -17,8 +17,8 @@ LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) LL | x | ^ expected struct `A`, found struct `uninhabited::UninhabitedTupleStruct` | - = note: expected type `A` - found type `uninhabited::UninhabitedTupleStruct` + = note: expected struct `A` + found struct `uninhabited::UninhabitedTupleStruct` error[E0308]: mismatched types --> $DIR/coercions.rs:31:5 @@ -28,8 +28,8 @@ LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A { LL | x | ^ expected struct `A`, found struct `uninhabited::UninhabitedStruct` | - = note: expected type `A` - found type `uninhabited::UninhabitedStruct` + = note: expected struct `A` + found struct `uninhabited::UninhabitedStruct` error[E0308]: mismatched types --> $DIR/coercions.rs:35:5 @@ -39,8 +39,8 @@ LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariant LL | x | ^ expected struct `A`, found enum `uninhabited::UninhabitedVariants` | - = note: expected type `A` - found type `uninhabited::UninhabitedVariants` + = note: expected struct `A` + found enum `uninhabited::UninhabitedVariants` error: aborting due to 4 previous errors diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.stderr index a07473dade22..6d7383b38960 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.stderr @@ -6,8 +6,8 @@ LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A { LL | x | ^ expected struct `A`, found enum `UninhabitedEnum` | - = note: expected type `A` - found type `UninhabitedEnum` + = note: expected struct `A` + found enum `UninhabitedEnum` error[E0308]: mismatched types --> $DIR/coercions_same_crate.rs:34:5 @@ -17,8 +17,8 @@ LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) LL | x | ^ expected struct `A`, found struct `UninhabitedTupleStruct` | - = note: expected type `A` - found type `UninhabitedTupleStruct` + = note: expected struct `A` + found struct `UninhabitedTupleStruct` error[E0308]: mismatched types --> $DIR/coercions_same_crate.rs:38:5 @@ -28,8 +28,8 @@ LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A { LL | x | ^ expected struct `A`, found struct `UninhabitedStruct` | - = note: expected type `A` - found type `UninhabitedStruct` + = note: expected struct `A` + found struct `UninhabitedStruct` error[E0308]: mismatched types --> $DIR/coercions_same_crate.rs:42:5 @@ -39,8 +39,8 @@ LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariant LL | x | ^ expected struct `A`, found enum `UninhabitedVariants` | - = note: expected type `A` - found type `UninhabitedVariants` + = note: expected struct `A` + found enum `UninhabitedVariants` error: aborting due to 4 previous errors diff --git a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr index aa7c342819e8..41f0ca2ed5a6 100644 --- a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr +++ b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr @@ -540,8 +540,8 @@ LL | if &let 0 = 0 {} | expected bool, found &bool | help: consider removing the borrow: `let 0 = 0` | - = note: expected type `bool` - found type `&bool` + = note: expected type `bool` + found reference `&bool` error[E0614]: type `bool` cannot be dereferenced --> $DIR/disallowed-positions.rs:36:8 @@ -594,7 +594,7 @@ LL | if true..(let 0 = 0) {} | ^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range` | = note: expected type `bool` - found type `std::ops::Range` + found struct `std::ops::Range` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:61:8 @@ -603,7 +603,7 @@ LL | if ..(let 0 = 0) {} | ^^^^^^^^^^^^^ expected bool, found struct `std::ops::RangeTo` | = note: expected type `bool` - found type `std::ops::RangeTo` + found struct `std::ops::RangeTo` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:63:8 @@ -612,7 +612,7 @@ LL | if (let 0 = 0).. {} | ^^^^^^^^^^^^^ expected bool, found struct `std::ops::RangeFrom` | = note: expected type `bool` - found type `std::ops::RangeFrom` + found struct `std::ops::RangeFrom` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:67:12 @@ -623,7 +623,7 @@ LL | if let Range { start: _, end: _ } = true..true && false {} | expected bool, found struct `std::ops::Range` | = note: expected type `bool` - found type `std::ops::Range<_>` + found struct `std::ops::Range<_>` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:67:8 @@ -632,7 +632,7 @@ LL | if let Range { start: _, end: _ } = true..true && false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range` | = note: expected type `bool` - found type `std::ops::Range` + found struct `std::ops::Range` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:71:12 @@ -643,7 +643,7 @@ LL | if let Range { start: _, end: _ } = true..true || false {} | expected bool, found struct `std::ops::Range` | = note: expected type `bool` - found type `std::ops::Range<_>` + found struct `std::ops::Range<_>` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:71:8 @@ -652,7 +652,7 @@ LL | if let Range { start: _, end: _ } = true..true || false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range` | = note: expected type `bool` - found type `std::ops::Range` + found struct `std::ops::Range` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:78:12 @@ -660,8 +660,8 @@ error[E0308]: mismatched types LL | if let Range { start: F, end } = F..|| true {} | ^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found struct `std::ops::Range` | - = note: expected type `fn() -> bool` - found type `std::ops::Range<_>` + = note: expected fn pointer `fn() -> bool` + found struct `std::ops::Range<_>` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:78:41 @@ -670,7 +670,7 @@ LL | if let Range { start: F, end } = F..|| true {} | ^^^^^^^ expected bool, found closure | = note: expected type `bool` - found type `[closure@$DIR/disallowed-positions.rs:78:41: 78:48]` + found closure `[closure@$DIR/disallowed-positions.rs:78:41: 78:48]` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:78:8 @@ -679,7 +679,7 @@ LL | if let Range { start: F, end } = F..|| true {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range` | = note: expected type `bool` - found type `std::ops::Range` + found struct `std::ops::Range` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:86:12 @@ -690,7 +690,7 @@ LL | if let Range { start: true, end } = t..&&false {} | expected bool, found struct `std::ops::Range` | = note: expected type `bool` - found type `std::ops::Range<_>` + found struct `std::ops::Range<_>` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:86:44 @@ -698,8 +698,8 @@ error[E0308]: mismatched types LL | if let Range { start: true, end } = t..&&false {} | ^^^^^^^ expected bool, found &&bool | - = note: expected type `bool` - found type `&&bool` + = note: expected type `bool` + found reference `&&bool` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:86:8 @@ -708,7 +708,7 @@ LL | if let Range { start: true, end } = t..&&false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range` | = note: expected type `bool` - found type `std::ops::Range` + found struct `std::ops::Range` error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` --> $DIR/disallowed-positions.rs:42:20 @@ -728,8 +728,8 @@ LL | while &let 0 = 0 {} | expected bool, found &bool | help: consider removing the borrow: `let 0 = 0` | - = note: expected type `bool` - found type `&bool` + = note: expected type `bool` + found reference `&bool` error[E0614]: type `bool` cannot be dereferenced --> $DIR/disallowed-positions.rs:100:11 @@ -782,7 +782,7 @@ LL | while true..(let 0 = 0) {} | ^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range` | = note: expected type `bool` - found type `std::ops::Range` + found struct `std::ops::Range` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:125:11 @@ -791,7 +791,7 @@ LL | while ..(let 0 = 0) {} | ^^^^^^^^^^^^^ expected bool, found struct `std::ops::RangeTo` | = note: expected type `bool` - found type `std::ops::RangeTo` + found struct `std::ops::RangeTo` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:127:11 @@ -800,7 +800,7 @@ LL | while (let 0 = 0).. {} | ^^^^^^^^^^^^^ expected bool, found struct `std::ops::RangeFrom` | = note: expected type `bool` - found type `std::ops::RangeFrom` + found struct `std::ops::RangeFrom` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:131:15 @@ -811,7 +811,7 @@ LL | while let Range { start: _, end: _ } = true..true && false {} | expected bool, found struct `std::ops::Range` | = note: expected type `bool` - found type `std::ops::Range<_>` + found struct `std::ops::Range<_>` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:131:11 @@ -820,7 +820,7 @@ LL | while let Range { start: _, end: _ } = true..true && false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range` | = note: expected type `bool` - found type `std::ops::Range` + found struct `std::ops::Range` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:135:15 @@ -831,7 +831,7 @@ LL | while let Range { start: _, end: _ } = true..true || false {} | expected bool, found struct `std::ops::Range` | = note: expected type `bool` - found type `std::ops::Range<_>` + found struct `std::ops::Range<_>` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:135:11 @@ -840,7 +840,7 @@ LL | while let Range { start: _, end: _ } = true..true || false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range` | = note: expected type `bool` - found type `std::ops::Range` + found struct `std::ops::Range` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:142:15 @@ -848,8 +848,8 @@ error[E0308]: mismatched types LL | while let Range { start: F, end } = F..|| true {} | ^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found struct `std::ops::Range` | - = note: expected type `fn() -> bool` - found type `std::ops::Range<_>` + = note: expected fn pointer `fn() -> bool` + found struct `std::ops::Range<_>` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:142:44 @@ -858,7 +858,7 @@ LL | while let Range { start: F, end } = F..|| true {} | ^^^^^^^ expected bool, found closure | = note: expected type `bool` - found type `[closure@$DIR/disallowed-positions.rs:142:44: 142:51]` + found closure `[closure@$DIR/disallowed-positions.rs:142:44: 142:51]` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:142:11 @@ -867,7 +867,7 @@ LL | while let Range { start: F, end } = F..|| true {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range` | = note: expected type `bool` - found type `std::ops::Range` + found struct `std::ops::Range` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:150:15 @@ -878,7 +878,7 @@ LL | while let Range { start: true, end } = t..&&false {} | expected bool, found struct `std::ops::Range` | = note: expected type `bool` - found type `std::ops::Range<_>` + found struct `std::ops::Range<_>` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:150:47 @@ -886,8 +886,8 @@ error[E0308]: mismatched types LL | while let Range { start: true, end } = t..&&false {} | ^^^^^^^ expected bool, found &&bool | - = note: expected type `bool` - found type `&&bool` + = note: expected type `bool` + found reference `&&bool` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:150:11 @@ -896,7 +896,7 @@ LL | while let Range { start: true, end } = t..&&false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range` | = note: expected type `bool` - found type `std::ops::Range` + found struct `std::ops::Range` error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` --> $DIR/disallowed-positions.rs:106:23 @@ -948,7 +948,7 @@ LL | (let Range { start: _, end: _ } = true..true || false); | expected bool, found struct `std::ops::Range` | = note: expected type `bool` - found type `std::ops::Range<_>` + found struct `std::ops::Range<_>` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:207:5 @@ -959,8 +959,8 @@ LL | fn outside_if_and_while_expr() { LL | &let 0 = 0 | ^^^^^^^^^^ expected (), found &bool | - = note: expected type `()` - found type `&bool` + = note: expected type `()` + found reference `&bool` error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` --> $DIR/disallowed-positions.rs:179:17 diff --git a/src/test/ui/slice-mut.rs b/src/test/ui/slice-mut.rs index dc5ef58eb33c..e9989f0f4813 100644 --- a/src/test/ui/slice-mut.rs +++ b/src/test/ui/slice-mut.rs @@ -6,7 +6,7 @@ fn main() { let y: &mut[_] = &x[2..4]; //~^ ERROR mismatched types - //~| expected type `&mut [_]` - //~| found type `&[isize]` + //~| expected mutable reference `&mut [_]` + //~| found reference `&[isize]` //~| types differ in mutability } diff --git a/src/test/ui/slice-mut.stderr b/src/test/ui/slice-mut.stderr index e99d83d0fed3..c1c5f316e958 100644 --- a/src/test/ui/slice-mut.stderr +++ b/src/test/ui/slice-mut.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let y: &mut[_] = &x[2..4]; | ^^^^^^^^ types differ in mutability | - = note: expected type `&mut [_]` - found type `&[isize]` + = note: expected mutable reference `&mut [_]` + found reference `&[isize]` error: aborting due to previous error diff --git a/src/test/ui/slightly-nice-generic-literal-messages.rs b/src/test/ui/slightly-nice-generic-literal-messages.rs index cd0ee174af52..a48598ce8d5a 100644 --- a/src/test/ui/slightly-nice-generic-literal-messages.rs +++ b/src/test/ui/slightly-nice-generic-literal-messages.rs @@ -6,7 +6,7 @@ fn main() { match Foo(1.1, marker::PhantomData) { 1 => {} //~^ ERROR mismatched types - //~| expected type `Foo<{float}, _>` + //~| expected struct `Foo<{float}, _>` //~| found type `{integer}` //~| expected struct `Foo`, found integer } diff --git a/src/test/ui/slightly-nice-generic-literal-messages.stderr b/src/test/ui/slightly-nice-generic-literal-messages.stderr index 76ebc007df34..61eabed95042 100644 --- a/src/test/ui/slightly-nice-generic-literal-messages.stderr +++ b/src/test/ui/slightly-nice-generic-literal-messages.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | 1 => {} | ^ expected struct `Foo`, found integer | - = note: expected type `Foo<{float}, _>` - found type `{integer}` + = note: expected struct `Foo<{float}, _>` + found type `{integer}` error: aborting due to previous error diff --git a/src/test/ui/span/coerce-suggestions.stderr b/src/test/ui/span/coerce-suggestions.stderr index 0d15a2a753ed..84b92a7c04ad 100644 --- a/src/test/ui/span/coerce-suggestions.stderr +++ b/src/test/ui/span/coerce-suggestions.stderr @@ -5,7 +5,7 @@ LL | let x: usize = String::new(); | ^^^^^^^^^^^^^ expected usize, found struct `std::string::String` | = note: expected type `usize` - found type `std::string::String` + found struct `std::string::String` error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:9:19 @@ -16,8 +16,8 @@ LL | let x: &str = String::new(); | expected &str, found struct `std::string::String` | help: consider borrowing here: `&String::new()` | - = note: expected type `&str` - found type `std::string::String` + = note: expected reference `&str` + found struct `std::string::String` error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:12:10 @@ -25,8 +25,8 @@ error[E0308]: mismatched types LL | test(&y); | ^^ types differ in mutability | - = note: expected type `&mut std::string::String` - found type `&std::string::String` + = note: expected mutable reference `&mut std::string::String` + found reference `&std::string::String` error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:14:11 @@ -34,8 +34,8 @@ error[E0308]: mismatched types LL | test2(&y); | ^^ types differ in mutability | - = note: expected type `&mut i32` - found type `&std::string::String` + = note: expected mutable reference `&mut i32` + found reference `&std::string::String` error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:17:9 @@ -52,8 +52,8 @@ error[E0308]: mismatched types LL | s = format!("foo"); | ^^^^^^^^^^^^^^ expected mutable reference, found struct `std::string::String` | - = note: expected type `&mut std::string::String` - found type `std::string::String` + = note: expected mutable reference `&mut std::string::String` + found struct `std::string::String` = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: aborting due to 6 previous errors diff --git a/src/test/ui/span/issue-33884.stderr b/src/test/ui/span/issue-33884.stderr index e59440b363f5..4cb2fc24a054 100644 --- a/src/test/ui/span/issue-33884.stderr +++ b/src/test/ui/span/issue-33884.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | stream.write_fmt(format!("message received")) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::fmt::Arguments`, found struct `std::string::String` | - = note: expected type `std::fmt::Arguments<'_>` - found type `std::string::String` + = note: expected struct `std::fmt::Arguments<'_>` + found struct `std::string::String` = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/span/issue-34264.stderr b/src/test/ui/span/issue-34264.stderr index 26d686f6f505..a9cf323c9905 100644 --- a/src/test/ui/span/issue-34264.stderr +++ b/src/test/ui/span/issue-34264.stderr @@ -57,8 +57,8 @@ error[E0308]: mismatched types LL | bar("", ""); | ^^ expected usize, found reference | - = note: expected type `usize` - found type `&'static str` + = note: expected type `usize` + found reference `&'static str` error[E0061]: this function takes 2 parameters but 3 parameters were supplied --> $DIR/issue-34264.rs:10:5 diff --git a/src/test/ui/span/issue-39018.stderr b/src/test/ui/span/issue-39018.stderr index 2ce5b0c11712..8ce1dfb11bca 100644 --- a/src/test/ui/span/issue-39018.stderr +++ b/src/test/ui/span/issue-39018.stderr @@ -73,8 +73,8 @@ LL | let _ = a + b; | expected &str, found struct `std::string::String` | help: consider borrowing here: `&b` | - = note: expected type `&str` - found type `std::string::String` + = note: expected reference `&str` + found struct `std::string::String` error[E0369]: binary operation `+` cannot be applied to type `&std::string::String` --> $DIR/issue-39018.rs:30:15 diff --git a/src/test/ui/span/move-closure.stderr b/src/test/ui/span/move-closure.stderr index e2226b197aeb..e628428436d5 100644 --- a/src/test/ui/span/move-closure.stderr +++ b/src/test/ui/span/move-closure.stderr @@ -5,7 +5,7 @@ LL | let x: () = move || (); | ^^^^^^^^^^ expected (), found closure | = note: expected type `()` - found type `[closure@$DIR/move-closure.rs:5:17: 5:27]` + found closure `[closure@$DIR/move-closure.rs:5:17: 5:27]` error: aborting due to previous error diff --git a/src/test/ui/specialization/specialization-default-projection.stderr b/src/test/ui/specialization/specialization-default-projection.stderr index 43cebd7f9c24..6ee634d4d1cb 100644 --- a/src/test/ui/specialization/specialization-default-projection.stderr +++ b/src/test/ui/specialization/specialization-default-projection.stderr @@ -7,8 +7,8 @@ LL | fn generic() -> ::Assoc { LL | () | ^^ expected associated type, found () | - = note: expected type `::Assoc` - found type `()` + = note: expected associated type `::Assoc` + found type `()` = note: consider constraining the associated type `::Assoc` to `()` or calling a method that returns `::Assoc` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html @@ -23,8 +23,8 @@ LL | generic::<()>() | | | expected (), found associated type | - = note: expected type `()` - found type `<() as Foo>::Assoc` + = note: expected type `()` + found associated type `<() as Foo>::Assoc` = note: consider constraining the associated type `<() as Foo>::Assoc` to `()` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html diff --git a/src/test/ui/specialization/specialization-default-types.stderr b/src/test/ui/specialization/specialization-default-types.stderr index 932087421fbc..257c114252cf 100644 --- a/src/test/ui/specialization/specialization-default-types.stderr +++ b/src/test/ui/specialization/specialization-default-types.stderr @@ -6,8 +6,8 @@ LL | default fn generate(self) -> Self::Output { LL | Box::new(self) | ^^^^^^^^^^^^^^ expected associated type, found struct `std::boxed::Box` | - = note: expected type `::Output` - found type `std::boxed::Box` + = note: expected associated type `::Output` + found struct `std::boxed::Box` = note: consider constraining the associated type `::Output` to `std::boxed::Box` or calling a method that returns `::Output` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html @@ -19,8 +19,8 @@ LL | fn trouble(t: T) -> Box { LL | Example::generate(t) | ^^^^^^^^^^^^^^^^^^^^ expected struct `std::boxed::Box`, found associated type | - = note: expected type `std::boxed::Box` - found type `::Output` + = note: expected struct `std::boxed::Box` + found associated type `::Output` = note: consider constraining the associated type `::Output` to `std::boxed::Box` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html diff --git a/src/test/ui/static/static-reference-to-fn-1.stderr b/src/test/ui/static/static-reference-to-fn-1.stderr index f6d2385ac69a..77ab62c321ca 100644 --- a/src/test/ui/static/static-reference-to-fn-1.stderr +++ b/src/test/ui/static/static-reference-to-fn-1.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | func: &foo, | ^^^^ expected fn pointer, found fn item | - = note: expected type `&fn() -> std::option::Option` - found type `&fn() -> std::option::Option {foo}` + = note: expected reference `&fn() -> std::option::Option` + found reference `&fn() -> std::option::Option {foo}` error: aborting due to previous error diff --git a/src/test/ui/str/str-array-assignment.stderr b/src/test/ui/str/str-array-assignment.stderr index ecd5fb441296..9f790d336593 100644 --- a/src/test/ui/str/str-array-assignment.stderr +++ b/src/test/ui/str/str-array-assignment.stderr @@ -6,8 +6,8 @@ LL | let t = if true { s[..2] } else { s }; | | | expected because of this | - = note: expected type `str` - found type `&str` + = note: expected type `str` + found reference `&str` error[E0308]: mismatched types --> $DIR/str-array-assignment.rs:5:27 @@ -18,8 +18,8 @@ LL | let u: &str = if true { s[..2] } else { s }; | expected &str, found str | help: consider borrowing here: `&s[..2]` | - = note: expected type `&str` - found type `str` + = note: expected reference `&str` + found type `str` error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/str-array-assignment.rs:7:7 @@ -43,8 +43,8 @@ LL | let w: &str = s[..2]; | expected &str, found str | help: consider borrowing here: `&s[..2]` | - = note: expected type `&str` - found type `str` + = note: expected reference `&str` + found type `str` error: aborting due to 4 previous errors diff --git a/src/test/ui/str/str-lit-type-mismatch.stderr b/src/test/ui/str/str-lit-type-mismatch.stderr index ef40faa8e26e..e328bb33c837 100644 --- a/src/test/ui/str/str-lit-type-mismatch.stderr +++ b/src/test/ui/str/str-lit-type-mismatch.stderr @@ -7,8 +7,8 @@ LL | let x: &[u8] = "foo"; | expected slice, found str | help: consider adding a leading `b`: `b"foo"` | - = note: expected type `&[u8]` - found type `&'static str` + = note: expected reference `&[u8]` + found reference `&'static str` error[E0308]: mismatched types --> $DIR/str-lit-type-mismatch.rs:3:23 @@ -19,8 +19,8 @@ LL | let y: &[u8; 4] = "baaa"; | expected array of 4 elements, found str | help: consider adding a leading `b`: `b"baaa"` | - = note: expected type `&[u8; 4]` - found type `&'static str` + = note: expected reference `&[u8; 4]` + found reference `&'static str` error[E0308]: mismatched types --> $DIR/str-lit-type-mismatch.rs:4:19 @@ -31,8 +31,8 @@ LL | let z: &str = b"foo"; | expected str, found array of 3 elements | help: consider removing the leading `b`: `"foo"` | - = note: expected type `&str` - found type `&'static [u8; 3]` + = note: expected reference `&str` + found reference `&'static [u8; 3]` error: aborting due to 3 previous errors diff --git a/src/test/ui/structs/struct-base-wrong-type.stderr b/src/test/ui/structs/struct-base-wrong-type.stderr index a0216305f311..c0bd9bda4518 100644 --- a/src/test/ui/structs/struct-base-wrong-type.stderr +++ b/src/test/ui/structs/struct-base-wrong-type.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | static foo: Foo = Foo { a: 2, ..bar }; | ^^^ expected struct `Foo`, found struct `Bar` | - = note: expected type `Foo` - found type `Bar` + = note: expected struct `Foo` + found struct `Bar` error[E0308]: mismatched types --> $DIR/struct-base-wrong-type.rs:8:35 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | static foo_i: Foo = Foo { a: 2, ..4 }; | ^ expected struct `Foo`, found integer | - = note: expected type `Foo` - found type `{integer}` + = note: expected struct `Foo` + found type `{integer}` error[E0308]: mismatched types --> $DIR/struct-base-wrong-type.rs:12:27 @@ -22,8 +22,8 @@ error[E0308]: mismatched types LL | let f = Foo { a: 2, ..b }; | ^ expected struct `Foo`, found struct `Bar` | - = note: expected type `Foo` - found type `Bar` + = note: expected struct `Foo` + found struct `Bar` error[E0308]: mismatched types --> $DIR/struct-base-wrong-type.rs:13:34 @@ -31,8 +31,8 @@ error[E0308]: mismatched types LL | let f__isize = Foo { a: 2, ..4 }; | ^ expected struct `Foo`, found integer | - = note: expected type `Foo` - found type `{integer}` + = note: expected struct `Foo` + found type `{integer}` error: aborting due to 4 previous errors diff --git a/src/test/ui/structs/struct-path-self-type-mismatch.stderr b/src/test/ui/structs/struct-path-self-type-mismatch.stderr index 687d610baf8c..63232a249f43 100644 --- a/src/test/ui/structs/struct-path-self-type-mismatch.stderr +++ b/src/test/ui/structs/struct-path-self-type-mismatch.stderr @@ -15,8 +15,8 @@ LL | fn new(u: U) -> Foo { LL | inner: u | ^ expected type parameter `T`, found type parameter `U` | - = note: expected type `T` - found type `U` + = note: expected type parameter `T` + found type parameter `U` = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters @@ -36,8 +36,8 @@ LL | | LL | | } | |_________^ expected type parameter `U`, found type parameter `T` | - = note: expected type `Foo` - found type `Foo` + = note: expected struct `Foo` + found struct `Foo` = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters diff --git a/src/test/ui/structs/structure-constructor-type-mismatch.stderr b/src/test/ui/structs/structure-constructor-type-mismatch.stderr index 62d872bb3e4d..4a78fa3896ff 100644 --- a/src/test/ui/structs/structure-constructor-type-mismatch.stderr +++ b/src/test/ui/structs/structure-constructor-type-mismatch.stderr @@ -114,8 +114,8 @@ LL | match (Point { x: 1, y: 2 }) { LL | PointF:: { .. } => {} | ^^^^^^^^^^^^^^^^^^^^ expected integer, found f32 | - = note: expected type `Point<{integer}>` - found type `Point` + = note: expected struct `Point<{integer}>` + found struct `Point` error[E0308]: mismatched types --> $DIR/structure-constructor-type-mismatch.rs:59:9 @@ -125,8 +125,8 @@ LL | match (Point { x: 1, y: 2 }) { LL | PointF { .. } => {} | ^^^^^^^^^^^^^ expected integer, found f32 | - = note: expected type `Point<{integer}>` - found type `Point` + = note: expected struct `Point<{integer}>` + found struct `Point` error[E0308]: mismatched types --> $DIR/structure-constructor-type-mismatch.rs:67:9 @@ -136,8 +136,8 @@ LL | match (Pair { x: 1, y: 2 }) { LL | PairF:: { .. } => {} | ^^^^^^^^^^^^^^^^^^^ expected integer, found f32 | - = note: expected type `Pair<{integer}, {integer}>` - found type `Pair` + = note: expected struct `Pair<{integer}, {integer}>` + found struct `Pair` error: aborting due to 13 previous errors diff --git a/src/test/ui/substs-ppaux.normal.stderr b/src/test/ui/substs-ppaux.normal.stderr index cb55203c88e3..6c732ddceefe 100644 --- a/src/test/ui/substs-ppaux.normal.stderr +++ b/src/test/ui/substs-ppaux.normal.stderr @@ -11,7 +11,7 @@ LL | let x: () = >::bar::<'static, char>; | help: use parentheses to call this function: `>::bar::<'static, char>()` | = note: expected type `()` - found type `fn() {>::bar::<'static, char>}` + found fn item `fn() {>::bar::<'static, char>}` error[E0308]: mismatched types --> $DIR/substs-ppaux.rs:25:17 @@ -26,7 +26,7 @@ LL | let x: () = >::bar::<'static, char>; | help: use parentheses to call this function: `>::bar::<'static, char>()` | = note: expected type `()` - found type `fn() {>::bar::<'static, char>}` + found fn item `fn() {>::bar::<'static, char>}` error[E0308]: mismatched types --> $DIR/substs-ppaux.rs:33:17 @@ -41,7 +41,7 @@ LL | let x: () = >::baz; | help: use parentheses to call this function: `>::baz()` | = note: expected type `()` - found type `fn() {>::baz}` + found fn item `fn() {>::baz}` error[E0308]: mismatched types --> $DIR/substs-ppaux.rs:41:17 @@ -56,7 +56,7 @@ LL | let x: () = foo::<'static>; | help: use parentheses to call this function: `foo::<'static>()` | = note: expected type `()` - found type `fn() {foo::<'static>}` + found fn item `fn() {foo::<'static>}` error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/substs-ppaux.rs:49:5 diff --git a/src/test/ui/substs-ppaux.rs b/src/test/ui/substs-ppaux.rs index 129ebd43594c..b5b4740603a4 100644 --- a/src/test/ui/substs-ppaux.rs +++ b/src/test/ui/substs-ppaux.rs @@ -16,35 +16,35 @@ fn foo<'z>() where &'z (): Sized { let x: () = >::bar::<'static, char>; //[verbose]~^ ERROR mismatched types //[verbose]~| expected type `()` - //[verbose]~| found type `fn() {>::bar::}` + //[verbose]~| found fn item `fn() {>::bar::}` //[normal]~^^^^ ERROR mismatched types //[normal]~| expected type `()` - //[normal]~| found type `fn() {>::bar::<'static, char>}` + //[normal]~| found fn item `fn() {>::bar::<'static, char>}` let x: () = >::bar::<'static, char>; //[verbose]~^ ERROR mismatched types //[verbose]~| expected type `()` - //[verbose]~| found type `fn() {>::bar::}` + //[verbose]~| found fn item `fn() {>::bar::}` //[normal]~^^^^ ERROR mismatched types //[normal]~| expected type `()` - //[normal]~| found type `fn() {>::bar::<'static, char>}` + //[normal]~| found fn item `fn() {>::bar::<'static, char>}` let x: () = >::baz; //[verbose]~^ ERROR mismatched types //[verbose]~| expected type `()` - //[verbose]~| found type `fn() {>::baz}` + //[verbose]~| found fn item `fn() {>::baz}` //[normal]~^^^^ ERROR mismatched types //[normal]~| expected type `()` - //[normal]~| found type `fn() {>::baz}` + //[normal]~| found fn item `fn() {>::baz}` let x: () = foo::<'static>; //[verbose]~^ ERROR mismatched types //[verbose]~| expected type `()` - //[verbose]~| found type `fn() {foo::}` + //[verbose]~| found fn item `fn() {foo::}` //[normal]~^^^^ ERROR mismatched types //[normal]~| expected type `()` - //[normal]~| found type `fn() {foo::<'static>}` + //[normal]~| found fn item `fn() {foo::<'static>}` >::bar; //[verbose]~^ ERROR the size for values of type diff --git a/src/test/ui/substs-ppaux.verbose.stderr b/src/test/ui/substs-ppaux.verbose.stderr index cafcba97b92c..b2f647cac24b 100644 --- a/src/test/ui/substs-ppaux.verbose.stderr +++ b/src/test/ui/substs-ppaux.verbose.stderr @@ -11,7 +11,7 @@ LL | let x: () = >::bar::<'static, char>; | help: use parentheses to call this function: `>::bar::<'static, char>()` | = note: expected type `()` - found type `fn() {>::bar::}` + found fn item `fn() {>::bar::}` error[E0308]: mismatched types --> $DIR/substs-ppaux.rs:25:17 @@ -26,7 +26,7 @@ LL | let x: () = >::bar::<'static, char>; | help: use parentheses to call this function: `>::bar::<'static, char>()` | = note: expected type `()` - found type `fn() {>::bar::}` + found fn item `fn() {>::bar::}` error[E0308]: mismatched types --> $DIR/substs-ppaux.rs:33:17 @@ -41,7 +41,7 @@ LL | let x: () = >::baz; | help: use parentheses to call this function: `>::baz()` | = note: expected type `()` - found type `fn() {>::baz}` + found fn item `fn() {>::baz}` error[E0308]: mismatched types --> $DIR/substs-ppaux.rs:41:17 @@ -56,7 +56,7 @@ LL | let x: () = foo::<'static>; | help: use parentheses to call this function: `foo::<'static>()` | = note: expected type `()` - found type `fn() {foo::}` + found fn item `fn() {foo::}` error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/substs-ppaux.rs:49:5 diff --git a/src/test/ui/suggestions/as-ref.stderr b/src/test/ui/suggestions/as-ref.stderr index 8143acc957b4..d01c37351951 100644 --- a/src/test/ui/suggestions/as-ref.stderr +++ b/src/test/ui/suggestions/as-ref.stderr @@ -6,8 +6,8 @@ LL | opt.map(|arg| takes_ref(arg)); | | | help: consider using `as_ref` instead: `as_ref().map` | - = note: expected type `&Foo` - found type `Foo` + = note: expected reference `&Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/as-ref.rs:8:37 @@ -17,8 +17,8 @@ LL | opt.and_then(|arg| Some(takes_ref(arg))); | | | help: consider using `as_ref` instead: `as_ref().and_then` | - = note: expected type `&Foo` - found type `Foo` + = note: expected reference `&Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/as-ref.rs:11:27 @@ -28,8 +28,8 @@ LL | opt.map(|arg| takes_ref(arg)); | | | help: consider using `as_ref` instead: `as_ref().map` | - = note: expected type `&Foo` - found type `Foo` + = note: expected reference `&Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/as-ref.rs:13:35 @@ -39,8 +39,8 @@ LL | opt.and_then(|arg| Ok(takes_ref(arg))); | | | help: consider using `as_ref` instead: `as_ref().and_then` | - = note: expected type `&Foo` - found type `Foo` + = note: expected reference `&Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/as-ref.rs:16:27 @@ -51,8 +51,8 @@ LL | let y: Option<&usize> = x; | expected enum `std::option::Option`, found reference | help: you can convert from `&Option` to `Option<&T>` using `.as_ref()`: `x.as_ref()` | - = note: expected type `std::option::Option<&usize>` - found type `&std::option::Option` + = note: expected enum `std::option::Option<&usize>` + found reference `&std::option::Option` error[E0308]: mismatched types --> $DIR/as-ref.rs:19:35 @@ -60,8 +60,8 @@ error[E0308]: mismatched types LL | let y: Result<&usize, &usize> = x; | ^ expected enum `std::result::Result`, found reference | - = note: expected type `std::result::Result<&usize, &usize>` - found type `&std::result::Result` + = note: expected enum `std::result::Result<&usize, &usize>` + found reference `&std::result::Result` help: you can convert from `&Result` to `Result<&T, &E>` using `.as_ref()` | LL | let y: Result<&usize, &usize> = x.as_ref(); @@ -73,8 +73,8 @@ error[E0308]: mismatched types LL | let y: Result<&usize, usize> = x; | ^ expected enum `std::result::Result`, found reference | - = note: expected type `std::result::Result<&usize, usize>` - found type `&std::result::Result` + = note: expected enum `std::result::Result<&usize, usize>` + found reference `&std::result::Result` error: aborting due to 7 previous errors diff --git a/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr b/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr index bc7a7247a128..66f6bf91cc28 100644 --- a/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr +++ b/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr @@ -9,8 +9,8 @@ LL | | }; | |______expected &str, found struct `std::string::String` | in this macro invocation | - = note: expected type `&str` - found type `std::string::String` + = note: expected reference `&str` + found struct `std::string::String` = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/suggestions/fn-or-tuple-struct-without-args.stderr b/src/test/ui/suggestions/fn-or-tuple-struct-without-args.stderr index 56810a491586..18e5c63ff48c 100644 --- a/src/test/ui/suggestions/fn-or-tuple-struct-without-args.stderr +++ b/src/test/ui/suggestions/fn-or-tuple-struct-without-args.stderr @@ -25,7 +25,7 @@ LL | let _: usize = foo; | help: use parentheses to call this function: `foo(a, b)` | = note: expected type `usize` - found type `fn(usize, usize) -> usize {foo}` + found fn item `fn(usize, usize) -> usize {foo}` error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:30:16 @@ -39,8 +39,8 @@ LL | let _: S = S; | expected struct `S`, found fn item | help: use parentheses to instantiate this tuple struct: `S(_, _)` | - = note: expected type `S` - found type `fn(usize, usize) -> S {S}` + = note: expected struct `S` + found fn item `fn(usize, usize) -> S {S}` error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:31:20 @@ -55,7 +55,7 @@ LL | let _: usize = bar; | help: use parentheses to call this function: `bar()` | = note: expected type `usize` - found type `fn() -> usize {bar}` + found fn item `fn() -> usize {bar}` error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:32:16 @@ -69,8 +69,8 @@ LL | let _: V = V; | expected struct `V`, found fn item | help: use parentheses to instantiate this tuple struct: `V()` | - = note: expected type `V` - found type `fn() -> V {V}` + = note: expected struct `V` + found fn item `fn() -> V {V}` error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:33:20 @@ -85,7 +85,7 @@ LL | let _: usize = T::baz; | help: use parentheses to call this function: `T::baz(x, y)` | = note: expected type `usize` - found type `fn(usize, usize) -> usize {<_ as T>::baz}` + found fn item `fn(usize, usize) -> usize {<_ as T>::baz}` error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:34:20 @@ -100,7 +100,7 @@ LL | let _: usize = T::bat; | help: use parentheses to call this function: `T::bat(x)` | = note: expected type `usize` - found type `fn(usize) -> usize {<_ as T>::bat}` + found fn item `fn(usize) -> usize {<_ as T>::bat}` error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:35:16 @@ -114,8 +114,8 @@ LL | let _: E = E::A; | expected enum `E`, found fn item | help: use parentheses to instantiate this tuple variant: `E::A(_)` | - = note: expected type `E` - found type `fn(usize) -> E {E::A}` + = note: expected enum `E` + found fn item `fn(usize) -> E {E::A}` error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:37:20 @@ -130,7 +130,7 @@ LL | let _: usize = X::baz; | help: use parentheses to call this function: `X::baz(x, y)` | = note: expected type `usize` - found type `fn(usize, usize) -> usize {::baz}` + found fn item `fn(usize, usize) -> usize {::baz}` error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:38:20 @@ -145,7 +145,7 @@ LL | let _: usize = X::bat; | help: use parentheses to call this function: `X::bat(x)` | = note: expected type `usize` - found type `fn(usize) -> usize {::bat}` + found fn item `fn(usize) -> usize {::bat}` error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:39:20 @@ -160,7 +160,7 @@ LL | let _: usize = X::bax; | help: use parentheses to call this function: `X::bax(x)` | = note: expected type `usize` - found type `fn(usize) -> usize {::bax}` + found fn item `fn(usize) -> usize {::bax}` error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:40:20 @@ -175,7 +175,7 @@ LL | let _: usize = X::bach; | help: use parentheses to call this function: `X::bach(x)` | = note: expected type `usize` - found type `fn(usize) -> usize {::bach}` + found fn item `fn(usize) -> usize {::bach}` error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:41:20 @@ -190,7 +190,7 @@ LL | let _: usize = X::ban; | help: use parentheses to call this function: `X::ban(_)` | = note: expected type `usize` - found type `for<'r> fn(&'r X) -> usize {::ban}` + found fn item `for<'r> fn(&'r X) -> usize {::ban}` error[E0308]: mismatched types --> $DIR/fn-or-tuple-struct-without-args.rs:42:20 @@ -205,7 +205,7 @@ LL | let _: usize = X::bal; | help: use parentheses to call this function: `X::bal(_)` | = note: expected type `usize` - found type `for<'r> fn(&'r X) -> usize {::bal}` + found fn item `for<'r> fn(&'r X) -> usize {::bal}` error[E0615]: attempted to take value of method `ban` on type `X` --> $DIR/fn-or-tuple-struct-without-args.rs:43:22 @@ -231,7 +231,7 @@ LL | let _: usize = closure; | help: use parentheses to call this closure: `closure()` | = note: expected type `usize` - found type `[closure@$DIR/fn-or-tuple-struct-without-args.rs:45:19: 45:24]` + found closure `[closure@$DIR/fn-or-tuple-struct-without-args.rs:45:19: 45:24]` error: aborting due to 17 previous errors diff --git a/src/test/ui/suggestions/format-borrow.stderr b/src/test/ui/suggestions/format-borrow.stderr index 44bb11faa7f3..7f1cec2d2188 100644 --- a/src/test/ui/suggestions/format-borrow.stderr +++ b/src/test/ui/suggestions/format-borrow.stderr @@ -7,8 +7,8 @@ LL | let a: String = &String::from("a"); | expected struct `std::string::String`, found reference | help: consider removing the borrow: `String::from("a")` | - = note: expected type `std::string::String` - found type `&std::string::String` + = note: expected struct `std::string::String` + found reference `&std::string::String` error[E0308]: mismatched types --> $DIR/format-borrow.rs:4:21 @@ -19,8 +19,8 @@ LL | let b: String = &format!("b"); | expected struct `std::string::String`, found reference | help: consider removing the borrow: `format!("b")` | - = note: expected type `std::string::String` - found type `&std::string::String` + = note: expected struct `std::string::String` + found reference `&std::string::String` error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/issue-52820.stderr b/src/test/ui/suggestions/issue-52820.stderr index fb568aca250e..0b064d196750 100644 --- a/src/test/ui/suggestions/issue-52820.stderr +++ b/src/test/ui/suggestions/issue-52820.stderr @@ -7,8 +7,8 @@ LL | guts, | expected struct `std::string::String`, found &str | help: try using a conversion method: `guts: guts.to_string()` | - = note: expected type `std::string::String` - found type `&str` + = note: expected struct `std::string::String` + found reference `&str` error[E0308]: mismatched types --> $DIR/issue-52820.rs:10:17 @@ -19,8 +19,8 @@ LL | brains: guts.clone(), | expected struct `std::string::String`, found &str | help: try using a conversion method: `guts.to_string()` | - = note: expected type `std::string::String` - found type `&str` + = note: expected struct `std::string::String` + found reference `&str` error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/issue-59819.stderr b/src/test/ui/suggestions/issue-59819.stderr index 66898115cbd6..b04ab374f0f0 100644 --- a/src/test/ui/suggestions/issue-59819.stderr +++ b/src/test/ui/suggestions/issue-59819.stderr @@ -8,7 +8,7 @@ LL | let y: i32 = x; | help: consider dereferencing the type: `*x` | = note: expected type `i32` - found type `Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/issue-59819.rs:30:18 @@ -19,8 +19,8 @@ LL | let b: i32 = a; | expected i32, found &{integer} | help: consider dereferencing the borrow: `*a` | - = note: expected type `i32` - found type `&{integer}` + = note: expected type `i32` + found reference `&{integer}` error[E0308]: mismatched types --> $DIR/issue-59819.rs:34:21 @@ -31,8 +31,8 @@ LL | let g: String = f; | expected struct `std::string::String`, found struct `Bar` | help: try using a conversion method: `f.to_string()` | - = note: expected type `std::string::String` - found type `Bar` + = note: expected struct `std::string::String` + found struct `Bar` error: aborting due to 3 previous errors diff --git a/src/test/ui/suggestions/match-ergonomics.stderr b/src/test/ui/suggestions/match-ergonomics.stderr index b7497be6ceb3..54aebb3bba26 100644 --- a/src/test/ui/suggestions/match-ergonomics.stderr +++ b/src/test/ui/suggestions/match-ergonomics.stderr @@ -7,8 +7,8 @@ LL | [&v] => {}, | expected i32, found reference | help: you can probably remove the explicit borrow: `v` | - = note: expected type `i32` - found type `&_` + = note: expected type `i32` + found reference `&_` error[E0529]: expected an array or slice, found `std::vec::Vec` --> $DIR/match-ergonomics.rs:8:9 @@ -31,8 +31,8 @@ LL | &v => {}, | expected i32, found reference | help: you can probably remove the explicit borrow: `v` | - = note: expected type `i32` - found type `&_` + = note: expected type `i32` + found reference `&_` error[E0308]: mismatched types --> $DIR/match-ergonomics.rs:40:13 @@ -43,8 +43,8 @@ LL | if let [&v] = &x[..] {} | expected i32, found reference | help: you can probably remove the explicit borrow: `v` | - = note: expected type `i32` - found type `&_` + = note: expected type `i32` + found reference `&_` error: aborting due to 5 previous errors diff --git a/src/test/ui/suggestions/mut-ref-reassignment.stderr b/src/test/ui/suggestions/mut-ref-reassignment.stderr index 66b78a1b1401..e7748008494c 100644 --- a/src/test/ui/suggestions/mut-ref-reassignment.stderr +++ b/src/test/ui/suggestions/mut-ref-reassignment.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | opt = None; | ^^^^ expected mutable reference, found enum `std::option::Option` | - = note: expected type `&mut std::option::Option` - found type `std::option::Option<_>` + = note: expected mutable reference `&mut std::option::Option` + found enum `std::option::Option<_>` help: consider dereferencing here to assign to the mutable borrowed piece of memory | LL | *opt = None; @@ -17,8 +17,8 @@ error[E0308]: mismatched types LL | opt = None | ^^^^ expected mutable reference, found enum `std::option::Option` | - = note: expected type `&mut std::result::Result` - found type `std::option::Option<_>` + = note: expected mutable reference `&mut std::result::Result` + found enum `std::option::Option<_>` error[E0308]: mismatched types --> $DIR/mut-ref-reassignment.rs:10:11 @@ -26,8 +26,8 @@ error[E0308]: mismatched types LL | opt = Some(String::new()) | ^^^^^^^^^^^^^^^^^^^ expected mutable reference, found enum `std::option::Option` | - = note: expected type `&mut std::option::Option` - found type `std::option::Option` + = note: expected mutable reference `&mut std::option::Option` + found enum `std::option::Option` help: consider dereferencing here to assign to the mutable borrowed piece of memory | LL | *opt = Some(String::new()) @@ -39,8 +39,8 @@ error[E0308]: mismatched types LL | opt = Some(42) | ^^^^^^^^ expected mutable reference, found enum `std::option::Option` | - = note: expected type `&mut std::option::Option` - found type `std::option::Option<{integer}>` + = note: expected mutable reference `&mut std::option::Option` + found enum `std::option::Option<{integer}>` error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/opaque-type-error.stderr b/src/test/ui/suggestions/opaque-type-error.stderr index 450cbd4799fd..e7bf84a41137 100644 --- a/src/test/ui/suggestions/opaque-type-error.stderr +++ b/src/test/ui/suggestions/opaque-type-error.stderr @@ -10,8 +10,8 @@ LL | | thing_two() LL | | }.await | |_____- if and else have incompatible types | - = note: expected type `impl std::future::Future` (opaque type at <$DIR/opaque-type-error.rs:8:19>) - found type `impl std::future::Future` (opaque type at <$DIR/opaque-type-error.rs:12:19>) + = note: expected type `impl std::future::Future` (opaque type at <$DIR/opaque-type-error.rs:8:19>) + found opaque type `impl std::future::Future` (opaque type at <$DIR/opaque-type-error.rs:12:19>) = note: distinct uses of `impl Trait` result in different opaque types = help: if both `Future`s have the same `Output` type, consider `.await`ing on both of them diff --git a/src/test/ui/suggestions/recover-from-semicolon-trailing-item.stderr b/src/test/ui/suggestions/recover-from-semicolon-trailing-item.stderr index 9a47a1efb752..36548a3dfcbf 100644 --- a/src/test/ui/suggestions/recover-from-semicolon-trailing-item.stderr +++ b/src/test/ui/suggestions/recover-from-semicolon-trailing-item.stderr @@ -25,7 +25,7 @@ LL | let _: usize = S {}; | ^^^^ expected usize, found struct `S` | = note: expected type `usize` - found type `S` + found struct `S` error[E0308]: mismatched types --> $DIR/recover-from-semicolon-trailing-item.rs:12:20 @@ -34,7 +34,7 @@ LL | let _: usize = X {}; | ^^^^ expected usize, found struct `main::X` | = note: expected type `usize` - found type `main::X` + found struct `main::X` error[E0308]: mismatched types --> $DIR/recover-from-semicolon-trailing-item.rs:14:9 @@ -42,8 +42,8 @@ error[E0308]: mismatched types LL | foo(""); | ^^ expected usize, found reference | - = note: expected type `usize` - found type `&'static str` + = note: expected type `usize` + found reference `&'static str` error: aborting due to 6 previous errors diff --git a/src/test/ui/suggestions/suggest-box.stderr b/src/test/ui/suggestions/suggest-box.stderr index 50c106d63a02..cda6d5254e7a 100644 --- a/src/test/ui/suggestions/suggest-box.stderr +++ b/src/test/ui/suggestions/suggest-box.stderr @@ -8,8 +8,8 @@ LL | | Ok(()) LL | | }; | |_____^ expected struct `std::boxed::Box`, found closure | - = note: expected type `std::boxed::Box std::result::Result<(), ()>>` - found type `[closure@$DIR/suggest-box.rs:4:47: 7:6]` + = note: expected struct `std::boxed::Box std::result::Result<(), ()>>` + found closure `[closure@$DIR/suggest-box.rs:4:47: 7:6]` = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html help: store this in the heap by calling `Box::new` | diff --git a/src/test/ui/suppressed-error.rs b/src/test/ui/suppressed-error.rs index cf3dce8e224c..7bb704367f30 100644 --- a/src/test/ui/suppressed-error.rs +++ b/src/test/ui/suppressed-error.rs @@ -2,7 +2,7 @@ fn main() { let (x, y) = (); //~^ ERROR mismatched types //~| expected type `()` -//~| found type `(_, _)` +//~| found tuple `(_, _)` //~| expected (), found tuple return x; } diff --git a/src/test/ui/suppressed-error.stderr b/src/test/ui/suppressed-error.stderr index 85e1deb3cde0..0d0ca4d5f73a 100644 --- a/src/test/ui/suppressed-error.stderr +++ b/src/test/ui/suppressed-error.stderr @@ -5,7 +5,7 @@ LL | let (x, y) = (); | ^^^^^^ expected (), found tuple | = note: expected type `()` - found type `(_, _)` + found tuple `(_, _)` error: aborting due to previous error diff --git a/src/test/ui/switched-expectations.stderr b/src/test/ui/switched-expectations.stderr index 043d130051d7..b38c0d930998 100644 --- a/src/test/ui/switched-expectations.stderr +++ b/src/test/ui/switched-expectations.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let ref string: String = var; | ^^^ expected struct `std::string::String`, found i32 | - = note: expected type `std::string::String` - found type `i32` + = note: expected struct `std::string::String` + found type `i32` error: aborting due to previous error diff --git a/src/test/ui/tag-that-dare-not-speak-its-name.rs b/src/test/ui/tag-that-dare-not-speak-its-name.rs index 9f47b2e9b9f4..ebe81c314a89 100644 --- a/src/test/ui/tag-that-dare-not-speak-its-name.rs +++ b/src/test/ui/tag-that-dare-not-speak-its-name.rs @@ -11,6 +11,6 @@ fn main() { let x : char = last(y); //~^ ERROR mismatched types //~| expected type `char` - //~| found type `std::option::Option<_>` + //~| found enum `std::option::Option<_>` //~| expected char, found enum `std::option::Option` } diff --git a/src/test/ui/tag-that-dare-not-speak-its-name.stderr b/src/test/ui/tag-that-dare-not-speak-its-name.stderr index 23e3d6652621..c71474ab2663 100644 --- a/src/test/ui/tag-that-dare-not-speak-its-name.stderr +++ b/src/test/ui/tag-that-dare-not-speak-its-name.stderr @@ -5,7 +5,7 @@ LL | let x : char = last(y); | ^^^^^^^ expected char, found enum `std::option::Option` | = note: expected type `char` - found type `std::option::Option<_>` + found enum `std::option::Option<_>` error: aborting due to previous error diff --git a/src/test/ui/terr-in-field.rs b/src/test/ui/terr-in-field.rs index 388c13d28ccf..80834985471d 100644 --- a/src/test/ui/terr-in-field.rs +++ b/src/test/ui/terr-in-field.rs @@ -11,9 +11,9 @@ struct Bar { fn want_foo(f: Foo) {} fn have_bar(b: Bar) { want_foo(b); //~ ERROR mismatched types - //~| expected type `Foo` - //~| found type `Bar` //~| expected struct `Foo`, found struct `Bar` + //~| expected struct `Foo` + //~| found struct `Bar` } fn main() {} diff --git a/src/test/ui/terr-in-field.stderr b/src/test/ui/terr-in-field.stderr index 91c3b3014a20..ef6412a633ba 100644 --- a/src/test/ui/terr-in-field.stderr +++ b/src/test/ui/terr-in-field.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | want_foo(b); | ^ expected struct `Foo`, found struct `Bar` | - = note: expected type `Foo` - found type `Bar` + = note: expected struct `Foo` + found struct `Bar` error: aborting due to previous error diff --git a/src/test/ui/terr-sorts.rs b/src/test/ui/terr-sorts.rs index 4bec5614e499..f91185fd7c67 100644 --- a/src/test/ui/terr-sorts.rs +++ b/src/test/ui/terr-sorts.rs @@ -8,8 +8,8 @@ type Bar = Box; fn want_foo(f: Foo) {} fn have_bar(b: Bar) { want_foo(b); //~ ERROR mismatched types - //~| expected type `Foo` - //~| found type `std::boxed::Box` + //~| expected struct `Foo` + //~| found struct `std::boxed::Box` } fn main() {} diff --git a/src/test/ui/terr-sorts.stderr b/src/test/ui/terr-sorts.stderr index 05b9fb43fe1b..2f7cc66f1050 100644 --- a/src/test/ui/terr-sorts.stderr +++ b/src/test/ui/terr-sorts.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | want_foo(b); | ^ expected struct `Foo`, found struct `std::boxed::Box` | - = note: expected type `Foo` - found type `std::boxed::Box` + = note: expected struct `Foo` + found struct `std::boxed::Box` error: aborting due to previous error diff --git a/src/test/ui/traits/trait-bounds-sugar.stderr b/src/test/ui/traits/trait-bounds-sugar.stderr index 2aa025cb7a68..5ee8be51dd5c 100644 --- a/src/test/ui/traits/trait-bounds-sugar.stderr +++ b/src/test/ui/traits/trait-bounds-sugar.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | a(x); | ^ expected trait `Foo + std::marker::Send`, found trait `Foo + std::marker::Sync` | - = note: expected type `std::boxed::Box<(dyn Foo + std::marker::Send + 'static)>` - found type `std::boxed::Box<(dyn Foo + std::marker::Sync + 'static)>` + = note: expected struct `std::boxed::Box<(dyn Foo + std::marker::Send + 'static)>` + found struct `std::boxed::Box<(dyn Foo + std::marker::Sync + 'static)>` error: aborting due to previous error diff --git a/src/test/ui/traits/trait-impl-method-mismatch.rs b/src/test/ui/traits/trait-impl-method-mismatch.rs index 886e92604a0b..683b1c1aa43e 100644 --- a/src/test/ui/traits/trait-impl-method-mismatch.rs +++ b/src/test/ui/traits/trait-impl-method-mismatch.rs @@ -6,8 +6,8 @@ impl Mumbo for usize { // Cannot have a larger effect than the trait: unsafe fn jumbo(&self, x: &usize) { *self + *x; } //~^ ERROR method `jumbo` has an incompatible type for trait - //~| expected type `fn - //~| found type `unsafe fn + //~| expected fn pointer `fn + //~| found fn pointer `unsafe fn } fn main() {} diff --git a/src/test/ui/traits/trait-impl-method-mismatch.stderr b/src/test/ui/traits/trait-impl-method-mismatch.stderr index 3e86c97f5c12..52e491862416 100644 --- a/src/test/ui/traits/trait-impl-method-mismatch.stderr +++ b/src/test/ui/traits/trait-impl-method-mismatch.stderr @@ -7,8 +7,8 @@ LL | fn jumbo(&self, x: &usize) -> usize; LL | unsafe fn jumbo(&self, x: &usize) { *self + *x; } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected normal fn, found unsafe fn | - = note: expected type `fn(&usize, &usize) -> usize` - found type `unsafe fn(&usize, &usize)` + = note: expected fn pointer `fn(&usize, &usize) -> usize` + found fn pointer `unsafe fn(&usize, &usize)` error: aborting due to previous error diff --git a/src/test/ui/traits/trait-matching-lifetimes.stderr b/src/test/ui/traits/trait-matching-lifetimes.stderr index e1ccde3c9d14..17ebdb7c8259 100644 --- a/src/test/ui/traits/trait-matching-lifetimes.stderr +++ b/src/test/ui/traits/trait-matching-lifetimes.stderr @@ -4,8 +4,8 @@ error[E0308]: method not compatible with trait LL | fn foo(x: Foo<'b,'a>) { | ^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | - = note: expected type `fn(Foo<'a, 'b>)` - found type `fn(Foo<'b, 'a>)` + = note: expected fn pointer `fn(Foo<'a, 'b>)` + found fn pointer `fn(Foo<'b, 'a>)` note: the lifetime `'b` as defined on the impl at 13:9... --> $DIR/trait-matching-lifetimes.rs:13:9 | @@ -23,8 +23,8 @@ error[E0308]: method not compatible with trait LL | fn foo(x: Foo<'b,'a>) { | ^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | - = note: expected type `fn(Foo<'a, 'b>)` - found type `fn(Foo<'b, 'a>)` + = note: expected fn pointer `fn(Foo<'a, 'b>)` + found fn pointer `fn(Foo<'b, 'a>)` note: the lifetime `'a` as defined on the impl at 13:6... --> $DIR/trait-matching-lifetimes.rs:13:6 | diff --git a/src/test/ui/try-block/try-block-bad-type.stderr b/src/test/ui/try-block/try-block-bad-type.stderr index e1c2c6b675e9..ecef3b5353f4 100644 --- a/src/test/ui/try-block/try-block-bad-type.stderr +++ b/src/test/ui/try-block/try-block-bad-type.stderr @@ -19,8 +19,8 @@ error[E0271]: type mismatch resolving ` as std::op LL | "" | ^^ expected i32, found &str | - = note: expected type `i32` - found type `&str` + = note: expected type `i32` + found reference `&str` error[E0271]: type mismatch resolving ` as std::ops::Try>::Ok == ()` --> $DIR/try-block-bad-type.rs:15:39 diff --git a/src/test/ui/tuple/tuple-arity-mismatch.rs b/src/test/ui/tuple/tuple-arity-mismatch.rs index 4f505c05a6a2..f1e525c93e17 100644 --- a/src/test/ui/tuple/tuple-arity-mismatch.rs +++ b/src/test/ui/tuple/tuple-arity-mismatch.rs @@ -5,13 +5,13 @@ fn first((value, _): (isize, f64)) -> isize { value } fn main() { let y = first ((1,2.0,3)); //~^ ERROR mismatched types - //~| expected type `(isize, f64)` - //~| found type `(isize, f64, {integer})` + //~| expected tuple `(isize, f64)` + //~| found tuple `(isize, f64, {integer})` //~| expected a tuple with 2 elements, found one with 3 elements let y = first ((1,)); //~^ ERROR mismatched types - //~| expected type `(isize, f64)` - //~| found type `(isize,)` + //~| expected tuple `(isize, f64)` + //~| found tuple `(isize,)` //~| expected a tuple with 2 elements, found one with 1 element } diff --git a/src/test/ui/tuple/tuple-arity-mismatch.stderr b/src/test/ui/tuple/tuple-arity-mismatch.stderr index 6946a60c59af..10bcedaf4aa9 100644 --- a/src/test/ui/tuple/tuple-arity-mismatch.stderr +++ b/src/test/ui/tuple/tuple-arity-mismatch.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let y = first ((1,2.0,3)); | ^^^^^^^^^ expected a tuple with 2 elements, found one with 3 elements | - = note: expected type `(isize, f64)` - found type `(isize, f64, {integer})` + = note: expected tuple `(isize, f64)` + found tuple `(isize, f64, {integer})` error[E0308]: mismatched types --> $DIR/tuple-arity-mismatch.rs:12:20 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | let y = first ((1,)); | ^^^^ expected a tuple with 2 elements, found one with 1 element | - = note: expected type `(isize, f64)` - found type `(isize,)` + = note: expected tuple `(isize, f64)` + found tuple `(isize,)` error: aborting due to 2 previous errors diff --git a/src/test/ui/type-alias-enum-variants/enum-variant-generic-args.stderr b/src/test/ui/type-alias-enum-variants/enum-variant-generic-args.stderr index 9e44e208f0ee..e158224d89a0 100644 --- a/src/test/ui/type-alias-enum-variants/enum-variant-generic-args.stderr +++ b/src/test/ui/type-alias-enum-variants/enum-variant-generic-args.stderr @@ -7,8 +7,8 @@ LL | fn ts_variant() { LL | Self::TSVariant(()); | ^^ expected type parameter `T`, found () | - = note: expected type `T` - found type `()` + = note: expected type parameter `T` + found type `()` = help: type parameters must be constrained to match other types = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters @@ -33,8 +33,8 @@ LL | impl Enum { LL | Self::<()>::TSVariant(()); | ^^ expected type parameter `T`, found () | - = note: expected type `T` - found type `()` + = note: expected type parameter `T` + found type `()` = help: type parameters must be constrained to match other types = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters @@ -59,8 +59,8 @@ LL | impl Enum { LL | Self::SVariant { v: () }; | ^^ expected type parameter `T`, found () | - = note: expected type `T` - found type `()` + = note: expected type parameter `T` + found type `()` = help: type parameters must be constrained to match other types = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters @@ -79,8 +79,8 @@ LL | impl Enum { LL | Self::SVariant::<()> { v: () }; | ^^ expected type parameter `T`, found () | - = note: expected type `T` - found type `()` + = note: expected type parameter `T` + found type `()` = help: type parameters must be constrained to match other types = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters @@ -99,8 +99,8 @@ LL | impl Enum { LL | Self::<()>::SVariant { v: () }; | ^^ expected type parameter `T`, found () | - = note: expected type `T` - found type `()` + = note: expected type parameter `T` + found type `()` = help: type parameters must be constrained to match other types = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters @@ -125,8 +125,8 @@ LL | impl Enum { LL | Self::<()>::SVariant::<()> { v: () }; | ^^ expected type parameter `T`, found () | - = note: expected type `T` - found type `()` + = note: expected type parameter `T` + found type `()` = help: type parameters must be constrained to match other types = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters diff --git a/src/test/ui/type-alias-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr b/src/test/ui/type-alias-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr index 0394ddab46cd..e6e82f496923 100644 --- a/src/test/ui/type-alias-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr +++ b/src/test/ui/type-alias-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr @@ -14,7 +14,7 @@ LL | let _: u8 = ::V; | ^^^^^^^ expected u8, found enum `E2` | = note: expected type `u8` - found type `E2` + found enum `E2` error: aborting due to 2 previous errors diff --git a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.stderr b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.stderr index d9600f1d1d6b..c1237e7e6df7 100644 --- a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.stderr @@ -10,8 +10,8 @@ error[E0308]: mismatched types LL | let z: i32 = x; | ^ expected i32, found opaque type | - = note: expected type `i32` - found type `WrongGeneric::<&{integer}>` + = note: expected type `i32` + found opaque type `WrongGeneric::<&{integer}>` error[E0310]: the parameter type `T` may not live long enough --> $DIR/generic_type_does_not_live_long_enough.rs:9:1 diff --git a/src/test/ui/type-alias-impl-trait/issue-63279.stderr b/src/test/ui/type-alias-impl-trait/issue-63279.stderr index a5065241fc74..7232bae93d24 100644 --- a/src/test/ui/type-alias-impl-trait/issue-63279.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-63279.stderr @@ -4,8 +4,8 @@ error[E0271]: type mismatch resolving `<[closure@$DIR/issue-63279.rs:6:5: 6:28] LL | type Closure = impl FnOnce(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected opaque type, found () | - = note: expected type `Closure` - found type `()` + = note: expected opaque type `Closure` + found type `()` = note: the return type of a function must have a statically known size error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.stderr b/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.stderr index 7c195f1fad00..0a6d454a67f4 100644 --- a/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.stderr +++ b/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let _: &'static str = x; | ^ expected reference, found opaque type | - = note: expected type `&'static str` - found type `NoReveal` + = note: expected reference `&'static str` + found opaque type `NoReveal` error[E0605]: non-primitive cast: `NoReveal` as `&'static str` --> $DIR/never_reveal_concrete_type.rs:14:13 diff --git a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.stderr b/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.stderr index 5e5826978fc7..366d6bad37a5 100644 --- a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.stderr +++ b/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let _: &str = bomp(); | ^^^^^^ expected &str, found opaque type | - = note: expected type `&str` - found type `Boo` + = note: expected reference `&str` + found opaque type `Boo` error[E0308]: mismatched types --> $DIR/no_revealing_outside_defining_module.rs:19:5 @@ -15,8 +15,8 @@ LL | fn bomp() -> boo::Boo { LL | "" | ^^ expected opaque type, found reference | - = note: expected type `Boo` - found type `&'static str` + = note: expected opaque type `Boo` + found reference `&'static str` error: aborting due to 2 previous errors diff --git a/src/test/ui/type/type-ascription-precedence.stderr b/src/test/ui/type/type-ascription-precedence.stderr index aecb0f873878..ebb9c4199dc7 100644 --- a/src/test/ui/type/type-ascription-precedence.stderr +++ b/src/test/ui/type/type-ascription-precedence.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | &(S: &S); | ^ expected &S, found struct `S` | - = note: expected type `&S` - found type `S` + = note: expected reference `&S` + found struct `S` error[E0308]: mismatched types --> $DIR/type-ascription-precedence.rs:35:7 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | *(S: Z); | ^ expected struct `Z`, found struct `S` | - = note: expected type `Z` - found type `S` + = note: expected struct `Z` + found struct `S` error[E0614]: type `Z` cannot be dereferenced --> $DIR/type-ascription-precedence.rs:35:5 @@ -28,8 +28,8 @@ error[E0308]: mismatched types LL | -(S: Z); | ^ expected struct `Z`, found struct `S` | - = note: expected type `Z` - found type `S` + = note: expected struct `Z` + found struct `S` error[E0600]: cannot apply unary operator `-` to type `Z` --> $DIR/type-ascription-precedence.rs:40:5 @@ -45,8 +45,8 @@ error[E0308]: mismatched types LL | (S + Z): Z; | ^^^^^^^ expected struct `Z`, found struct `S` | - = note: expected type `Z` - found type `S` + = note: expected struct `Z` + found struct `S` error[E0308]: mismatched types --> $DIR/type-ascription-precedence.rs:49:5 @@ -54,8 +54,8 @@ error[E0308]: mismatched types LL | (S * Z): Z; | ^^^^^^^ expected struct `Z`, found struct `S` | - = note: expected type `Z` - found type `S` + = note: expected struct `Z` + found struct `S` error[E0308]: mismatched types --> $DIR/type-ascription-precedence.rs:53:5 @@ -63,8 +63,8 @@ error[E0308]: mismatched types LL | (S .. S): S; | ^^^^^^^^ expected struct `S`, found struct `std::ops::Range` | - = note: expected type `S` - found type `std::ops::Range` + = note: expected struct `S` + found struct `std::ops::Range` error: aborting due to 8 previous errors diff --git a/src/test/ui/type/type-ascription-soundness.stderr b/src/test/ui/type/type-ascription-soundness.stderr index 150e19020fea..d8803cad0113 100644 --- a/src/test/ui/type/type-ascription-soundness.stderr +++ b/src/test/ui/type/type-ascription-soundness.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let ref x = arr: &[u8]; | ^^^ expected slice, found array of 3 elements | - = note: expected type `&[u8]` - found type `&[u8; 3]` + = note: expected reference `&[u8]` + found reference `&[u8; 3]` error[E0308]: mismatched types --> $DIR/type-ascription-soundness.rs:8:21 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | let ref mut x = arr: &[u8]; | ^^^ expected slice, found array of 3 elements | - = note: expected type `&[u8]` - found type `&[u8; 3]` + = note: expected reference `&[u8]` + found reference `&[u8; 3]` error[E0308]: mismatched types --> $DIR/type-ascription-soundness.rs:9:11 @@ -22,8 +22,8 @@ error[E0308]: mismatched types LL | match arr: &[u8] { | ^^^ expected slice, found array of 3 elements | - = note: expected type `&[u8]` - found type `&[u8; 3]` + = note: expected reference `&[u8]` + found reference `&[u8; 3]` error[E0308]: mismatched types --> $DIR/type-ascription-soundness.rs:12:17 @@ -31,8 +31,8 @@ error[E0308]: mismatched types LL | let _len = (arr: &[u8]).len(); | ^^^ expected slice, found array of 3 elements | - = note: expected type `&[u8]` - found type `&[u8; 3]` + = note: expected reference `&[u8]` + found reference `&[u8; 3]` error: aborting due to 4 previous errors diff --git a/src/test/ui/type/type-mismatch-same-crate-name.rs b/src/test/ui/type/type-mismatch-same-crate-name.rs index 61e6bd219209..88daffde504a 100644 --- a/src/test/ui/type/type-mismatch-same-crate-name.rs +++ b/src/test/ui/type/type-mismatch-same-crate-name.rs @@ -17,13 +17,13 @@ fn main() { //~^ ERROR mismatched types //~| Perhaps two different versions of crate `crate_a1` //~| expected struct `main::a::Foo` - //~| expected type `main::a::Foo` - //~| found type `main::a::Foo` + //~| expected struct `main::a::Foo` + //~| found struct `main::a::Foo` a::try_bar(bar2); //~^ ERROR mismatched types //~| Perhaps two different versions of crate `crate_a1` //~| expected trait `main::a::Bar` - //~| expected type `std::boxed::Box<(dyn main::a::Bar + 'static)>` - //~| found type `std::boxed::Box` + //~| expected struct `std::boxed::Box<(dyn main::a::Bar + 'static)>` + //~| found struct `std::boxed::Box` } } diff --git a/src/test/ui/type/type-mismatch-same-crate-name.stderr b/src/test/ui/type/type-mismatch-same-crate-name.stderr index ed07b602e3e3..db53344a07e7 100644 --- a/src/test/ui/type/type-mismatch-same-crate-name.stderr +++ b/src/test/ui/type/type-mismatch-same-crate-name.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | a::try_foo(foo2); | ^^^^ expected struct `main::a::Foo`, found a different struct `main::a::Foo` | - = note: expected type `main::a::Foo` (struct `main::a::Foo`) - found type `main::a::Foo` (struct `main::a::Foo`) + = note: expected struct `main::a::Foo` (struct `main::a::Foo`) + found struct `main::a::Foo` (struct `main::a::Foo`) note: Perhaps two different versions of crate `crate_a1` are being used? --> $DIR/type-mismatch-same-crate-name.rs:16:20 | @@ -18,8 +18,8 @@ error[E0308]: mismatched types LL | a::try_bar(bar2); | ^^^^ expected trait `main::a::Bar`, found a different trait `main::a::Bar` | - = note: expected type `std::boxed::Box<(dyn main::a::Bar + 'static)>` - found type `std::boxed::Box` + = note: expected struct `std::boxed::Box<(dyn main::a::Bar + 'static)>` + found struct `std::boxed::Box` note: Perhaps two different versions of crate `crate_a1` are being used? --> $DIR/type-mismatch-same-crate-name.rs:22:20 | diff --git a/src/test/ui/type/type-mismatch.stderr b/src/test/ui/type/type-mismatch.stderr index 7aea9db6167a..2d9481e5a410 100644 --- a/src/test/ui/type/type-mismatch.stderr +++ b/src/test/ui/type/type-mismatch.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | want::(f); | ^ expected struct `foo`, found usize | - = note: expected type `foo` - found type `usize` + = note: expected struct `foo` + found type `usize` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:18:17 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | want::(f); | ^ expected struct `bar`, found usize | - = note: expected type `bar` - found type `usize` + = note: expected struct `bar` + found type `usize` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:19:24 @@ -22,8 +22,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `Foo`, found usize | - = note: expected type `Foo` - found type `usize` + = note: expected struct `Foo` + found type `usize` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:20:27 @@ -31,8 +31,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `Foo`, found usize | - = note: expected type `Foo` - found type `usize` + = note: expected struct `Foo` + found type `usize` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:21:22 @@ -40,8 +40,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `Foo`, found usize | - = note: expected type `Foo` - found type `usize` + = note: expected struct `Foo` + found type `usize` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:22:25 @@ -49,8 +49,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `Foo`, found usize | - = note: expected type `Foo` - found type `usize` + = note: expected struct `Foo` + found type `usize` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:23:22 @@ -58,8 +58,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `Foo`, found usize | - = note: expected type `Foo` - found type `usize` + = note: expected struct `Foo` + found type `usize` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:24:25 @@ -67,8 +67,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `Foo`, found usize | - = note: expected type `Foo` - found type `usize` + = note: expected struct `Foo` + found type `usize` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:28:19 @@ -77,7 +77,7 @@ LL | want::(f); | ^ expected usize, found struct `foo` | = note: expected type `usize` - found type `foo` + found struct `foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:29:17 @@ -85,8 +85,8 @@ error[E0308]: mismatched types LL | want::(f); | ^ expected struct `bar`, found struct `foo` | - = note: expected type `bar` - found type `foo` + = note: expected struct `bar` + found struct `foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:30:24 @@ -94,8 +94,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `Foo`, found struct `foo` | - = note: expected type `Foo` - found type `foo` + = note: expected struct `Foo` + found struct `foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:31:27 @@ -103,8 +103,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `Foo`, found struct `foo` | - = note: expected type `Foo` - found type `foo` + = note: expected struct `Foo` + found struct `foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:32:22 @@ -112,8 +112,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `Foo`, found struct `foo` | - = note: expected type `Foo` - found type `foo` + = note: expected struct `Foo` + found struct `foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:33:25 @@ -121,8 +121,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `Foo`, found struct `foo` | - = note: expected type `Foo` - found type `foo` + = note: expected struct `Foo` + found struct `foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:34:22 @@ -130,8 +130,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `Foo`, found struct `foo` | - = note: expected type `Foo` - found type `foo` + = note: expected struct `Foo` + found struct `foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:35:25 @@ -139,8 +139,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `Foo`, found struct `foo` | - = note: expected type `Foo` - found type `foo` + = note: expected struct `Foo` + found struct `foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:39:19 @@ -149,7 +149,7 @@ LL | want::(f); | ^ expected usize, found struct `Foo` | = note: expected type `usize` - found type `Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:40:17 @@ -157,8 +157,8 @@ error[E0308]: mismatched types LL | want::(f); | ^ expected struct `foo`, found struct `Foo` | - = note: expected type `foo` - found type `Foo` + = note: expected struct `foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:41:17 @@ -166,8 +166,8 @@ error[E0308]: mismatched types LL | want::(f); | ^ expected struct `bar`, found struct `Foo` | - = note: expected type `bar` - found type `Foo` + = note: expected struct `bar` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:42:24 @@ -175,8 +175,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected usize, found struct `foo` | - = note: expected type `Foo` - found type `Foo` + = note: expected struct `Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:43:27 @@ -184,8 +184,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected usize, found struct `foo` | - = note: expected type `Foo` - found type `Foo` + = note: expected struct `Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:44:25 @@ -193,8 +193,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `B`, found struct `A` | - = note: expected type `Foo<_, B>` - found type `Foo<_, A>` + = note: expected struct `Foo<_, B>` + found struct `Foo<_, A>` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:45:22 @@ -202,8 +202,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `bar`, found struct `foo` | - = note: expected type `Foo` - found type `Foo` + = note: expected struct `Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:46:25 @@ -211,8 +211,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `bar`, found struct `foo` | - = note: expected type `Foo` - found type `Foo` + = note: expected struct `Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:47:23 @@ -223,8 +223,8 @@ LL | want::<&Foo>(f); | expected &Foo, found struct `Foo` | help: consider borrowing here: `&f` | - = note: expected type `&Foo` - found type `Foo` + = note: expected reference `&Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:48:26 @@ -232,8 +232,8 @@ error[E0308]: mismatched types LL | want::<&Foo>(f); | ^ expected reference, found struct `Foo` | - = note: expected type `&Foo` - found type `Foo` + = note: expected reference `&Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:52:19 @@ -242,7 +242,7 @@ LL | want::(f); | ^ expected usize, found struct `Foo` | = note: expected type `usize` - found type `Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:53:17 @@ -250,8 +250,8 @@ error[E0308]: mismatched types LL | want::(f); | ^ expected struct `foo`, found struct `Foo` | - = note: expected type `foo` - found type `Foo` + = note: expected struct `foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:54:17 @@ -259,8 +259,8 @@ error[E0308]: mismatched types LL | want::(f); | ^ expected struct `bar`, found struct `Foo` | - = note: expected type `bar` - found type `Foo` + = note: expected struct `bar` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:55:24 @@ -268,8 +268,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected usize, found struct `foo` | - = note: expected type `Foo` - found type `Foo` + = note: expected struct `Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:56:27 @@ -277,8 +277,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected usize, found struct `foo` | - = note: expected type `Foo` - found type `Foo` + = note: expected struct `Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:57:22 @@ -286,8 +286,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `A`, found struct `B` | - = note: expected type `Foo<_, A>` - found type `Foo<_, B>` + = note: expected struct `Foo<_, A>` + found struct `Foo<_, B>` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:58:22 @@ -295,8 +295,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `bar`, found struct `foo` | - = note: expected type `Foo` - found type `Foo` + = note: expected struct `Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:59:25 @@ -304,8 +304,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `bar`, found struct `foo` | - = note: expected type `Foo` - found type `Foo` + = note: expected struct `Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:60:23 @@ -313,8 +313,8 @@ error[E0308]: mismatched types LL | want::<&Foo>(f); | ^ expected &Foo, found struct `Foo` | - = note: expected type `&Foo` - found type `Foo` + = note: expected reference `&Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:61:26 @@ -325,8 +325,8 @@ LL | want::<&Foo>(f); | expected reference, found struct `Foo` | help: consider borrowing here: `&f` | - = note: expected type `&Foo` - found type `Foo` + = note: expected reference `&Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:65:19 @@ -335,7 +335,7 @@ LL | want::(f); | ^ expected usize, found struct `Foo` | = note: expected type `usize` - found type `Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:66:17 @@ -343,8 +343,8 @@ error[E0308]: mismatched types LL | want::(f); | ^ expected struct `foo`, found struct `Foo` | - = note: expected type `foo` - found type `Foo` + = note: expected struct `foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:67:17 @@ -352,8 +352,8 @@ error[E0308]: mismatched types LL | want::(f); | ^ expected struct `bar`, found struct `Foo` | - = note: expected type `bar` - found type `Foo` + = note: expected struct `bar` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:68:24 @@ -361,8 +361,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected usize, found struct `foo` | - = note: expected type `Foo` - found type `Foo` + = note: expected struct `Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:69:27 @@ -370,8 +370,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected usize, found struct `foo` | - = note: expected type `Foo` - found type `Foo` + = note: expected struct `Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:70:22 @@ -379,8 +379,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `A`, found struct `B` | - = note: expected type `Foo<_, A, B>` - found type `Foo<_, B, A>` + = note: expected struct `Foo<_, A, B>` + found struct `Foo<_, B, A>` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:71:25 @@ -388,8 +388,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `B`, found struct `A` | - = note: expected type `Foo<_, _, B>` - found type `Foo<_, _, A>` + = note: expected struct `Foo<_, _, B>` + found struct `Foo<_, _, A>` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:72:22 @@ -397,8 +397,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `bar`, found struct `foo` | - = note: expected type `Foo` - found type `Foo` + = note: expected struct `Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:73:25 @@ -406,8 +406,8 @@ error[E0308]: mismatched types LL | want::>(f); | ^ expected struct `bar`, found struct `foo` | - = note: expected type `Foo` - found type `Foo` + = note: expected struct `Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:74:23 @@ -415,8 +415,8 @@ error[E0308]: mismatched types LL | want::<&Foo>(f); | ^ expected &Foo, found struct `Foo` | - = note: expected type `&Foo` - found type `Foo` + = note: expected reference `&Foo` + found struct `Foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:75:26 @@ -424,8 +424,8 @@ error[E0308]: mismatched types LL | want::<&Foo>(f); | ^ expected reference, found struct `Foo` | - = note: expected type `&Foo` - found type `Foo` + = note: expected reference `&Foo` + found struct `Foo` error: aborting due to 47 previous errors diff --git a/src/test/ui/type/type-parameter-names.rs b/src/test/ui/type/type-parameter-names.rs index 825766463453..b54a3fae0c1a 100644 --- a/src/test/ui/type/type-parameter-names.rs +++ b/src/test/ui/type/type-parameter-names.rs @@ -4,9 +4,9 @@ fn foo(x: Foo) -> Bar { x //~^ ERROR mismatched types -//~| expected type `Bar` -//~| found type `Foo` //~| expected type parameter `Bar`, found type parameter `Foo` +//~| expected type parameter `Bar` +//~| found type parameter `Foo` } fn main() {} diff --git a/src/test/ui/type/type-parameter-names.stderr b/src/test/ui/type/type-parameter-names.stderr index 78d6989a3363..f0ca8afca4e7 100644 --- a/src/test/ui/type/type-parameter-names.stderr +++ b/src/test/ui/type/type-parameter-names.stderr @@ -9,8 +9,8 @@ LL | fn foo(x: Foo) -> Bar { LL | x | ^ expected type parameter `Bar`, found type parameter `Foo` | - = note: expected type `Bar` - found type `Foo` + = note: expected type parameter `Bar` + found type parameter `Foo` = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters diff --git a/src/test/ui/type/type-params-in-different-spaces-1.rs b/src/test/ui/type/type-params-in-different-spaces-1.rs index d2dce7006b76..6efd14d37853 100644 --- a/src/test/ui/type/type-params-in-different-spaces-1.rs +++ b/src/test/ui/type/type-params-in-different-spaces-1.rs @@ -3,9 +3,9 @@ use std::ops::Add; trait BrokenAdd: Copy + Add { fn broken_add(&self, rhs: T) -> Self { *self + rhs //~ ERROR mismatched types - //~| expected type `Self` - //~| found type `T` //~| expected type parameter `Self`, found type parameter `T` + //~| expected type parameter `Self` + //~| found type parameter `T` } } diff --git a/src/test/ui/type/type-params-in-different-spaces-1.stderr b/src/test/ui/type/type-params-in-different-spaces-1.stderr index d2c6b7304ff3..eeb09a9f02ea 100644 --- a/src/test/ui/type/type-params-in-different-spaces-1.stderr +++ b/src/test/ui/type/type-params-in-different-spaces-1.stderr @@ -12,8 +12,8 @@ LL | | } LL | | } | |_- expected type parameter | - = note: expected type `Self` - found type `T` + = note: expected type parameter `Self` + found type parameter `T` = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters diff --git a/src/test/ui/type/type-params-in-different-spaces-3.stderr b/src/test/ui/type/type-params-in-different-spaces-3.stderr index ec5d6372792b..880c138d2876 100644 --- a/src/test/ui/type/type-params-in-different-spaces-3.stderr +++ b/src/test/ui/type/type-params-in-different-spaces-3.stderr @@ -12,8 +12,8 @@ LL | | } LL | | } | |_- expected type parameter | - = note: expected type `Self` - found type `X` + = note: expected type parameter `Self` + found type parameter `X` = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters diff --git a/src/test/ui/type/type-shadow.stderr b/src/test/ui/type/type-shadow.stderr index f15bdc16d514..56185e048a32 100644 --- a/src/test/ui/type/type-shadow.stderr +++ b/src/test/ui/type/type-shadow.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let y: Y = "hello"; | ^^^^^^^ expected isize, found reference | - = note: expected type `isize` - found type `&'static str` + = note: expected type `isize` + found reference `&'static str` error: aborting due to previous error diff --git a/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr b/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr index d41086186f8d..d155744836ea 100644 --- a/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr +++ b/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr @@ -7,7 +7,7 @@ LL | *x | ^^ expected (), found trait std::iter::Iterator | = note: expected type `()` - found type `(dyn std::iter::Iterator + 'static)` + found trait `(dyn std::iter::Iterator + 'static)` error: aborting due to previous error diff --git a/src/test/ui/typeck/typeck_type_placeholder_mismatch.rs b/src/test/ui/typeck/typeck_type_placeholder_mismatch.rs index ec978e45b825..2f9cfcf8dbb5 100644 --- a/src/test/ui/typeck/typeck_type_placeholder_mismatch.rs +++ b/src/test/ui/typeck/typeck_type_placeholder_mismatch.rs @@ -12,8 +12,8 @@ pub fn main() { fn test1() { let x: Foo<_> = Bar::(PhantomData); //~^ ERROR mismatched types - //~| expected type `Foo<_>` - //~| found type `Bar` + //~| expected struct `Foo<_>` + //~| found struct `Bar` //~| expected struct `Foo`, found struct `Bar` let y: Foo = x; } @@ -21,7 +21,7 @@ fn test1() { fn test2() { let x: Foo<_> = Bar::(PhantomData); //~^ ERROR mismatched types - //~| expected type `Foo<_>` - //~| found type `Bar` + //~| expected struct `Foo<_>` + //~| found struct `Bar` //~| expected struct `Foo`, found struct `Bar` } diff --git a/src/test/ui/typeck/typeck_type_placeholder_mismatch.stderr b/src/test/ui/typeck/typeck_type_placeholder_mismatch.stderr index 89114874824d..1f6f89a6eb1c 100644 --- a/src/test/ui/typeck/typeck_type_placeholder_mismatch.stderr +++ b/src/test/ui/typeck/typeck_type_placeholder_mismatch.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let x: Foo<_> = Bar::(PhantomData); | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Foo`, found struct `Bar` | - = note: expected type `Foo<_>` - found type `Bar` + = note: expected struct `Foo<_>` + found struct `Bar` error[E0308]: mismatched types --> $DIR/typeck_type_placeholder_mismatch.rs:22:21 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | let x: Foo<_> = Bar::(PhantomData); | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Foo`, found struct `Bar` | - = note: expected type `Foo<_>` - found type `Bar` + = note: expected struct `Foo<_>` + found struct `Bar` error: aborting due to 2 previous errors diff --git a/src/test/ui/ufcs/ufcs-explicit-self-bad.rs b/src/test/ui/ufcs/ufcs-explicit-self-bad.rs index bdb8e197fbe4..e836d33976a9 100644 --- a/src/test/ui/ufcs/ufcs-explicit-self-bad.rs +++ b/src/test/ui/ufcs/ufcs-explicit-self-bad.rs @@ -38,12 +38,12 @@ impl<'a, T> SomeTrait for &'a Bar { //~^ ERROR mismatched `self` parameter type fn dummy3(self: &&Bar) {} //~^ ERROR mismatched `self` parameter type - //~| expected type `&'a Bar` - //~| found type `&Bar` + //~| expected reference `&'a Bar` + //~| found reference `&Bar` //~| lifetime mismatch //~| ERROR mismatched `self` parameter type - //~| expected type `&'a Bar` - //~| found type `&Bar` + //~| expected reference `&'a Bar` + //~| found reference `&Bar` //~| lifetime mismatch } diff --git a/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr b/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr index de3a997a19ed..d1232ad3f320 100644 --- a/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr +++ b/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr @@ -31,8 +31,8 @@ error[E0308]: mismatched `self` parameter type LL | fn dummy2(self: &Bar) {} | ^^^^^^^ lifetime mismatch | - = note: expected type `&'a Bar` - found type `&Bar` + = note: expected reference `&'a Bar` + found reference `&Bar` note: the anonymous lifetime #1 defined on the method body at 37:5... --> $DIR/ufcs-explicit-self-bad.rs:37:5 | @@ -50,8 +50,8 @@ error[E0308]: mismatched `self` parameter type LL | fn dummy2(self: &Bar) {} | ^^^^^^^ lifetime mismatch | - = note: expected type `&'a Bar` - found type `&Bar` + = note: expected reference `&'a Bar` + found reference `&Bar` note: the lifetime `'a` as defined on the impl at 35:6... --> $DIR/ufcs-explicit-self-bad.rs:35:6 | @@ -69,8 +69,8 @@ error[E0308]: mismatched `self` parameter type LL | fn dummy3(self: &&Bar) {} | ^^^^^^^^ lifetime mismatch | - = note: expected type `&'a Bar` - found type `&Bar` + = note: expected reference `&'a Bar` + found reference `&Bar` note: the anonymous lifetime #2 defined on the method body at 39:5... --> $DIR/ufcs-explicit-self-bad.rs:39:5 | @@ -88,8 +88,8 @@ error[E0308]: mismatched `self` parameter type LL | fn dummy3(self: &&Bar) {} | ^^^^^^^^ lifetime mismatch | - = note: expected type `&'a Bar` - found type `&Bar` + = note: expected reference `&'a Bar` + found reference `&Bar` note: the lifetime `'a` as defined on the impl at 35:6... --> $DIR/ufcs-explicit-self-bad.rs:35:6 | diff --git a/src/test/ui/unboxed-closures/issue-30904.stderr b/src/test/ui/unboxed-closures/issue-30904.stderr new file mode 100644 index 000000000000..aa0e05e94203 --- /dev/null +++ b/src/test/ui/unboxed-closures/issue-30904.stderr @@ -0,0 +1,24 @@ +error[E0308]: mismatched types + --> $DIR/issue-30904.rs:20:45 + | +LL | let _: for<'a> fn(&'a str) -> Str<'a> = Str; + | ^^^ expected concrete lifetime, found bound lifetime parameter 'a + | + = note: expected fn pointer `for<'a> fn(&'a str) -> Str<'a>` + found fn item `fn(&str) -> Str<'_> {Str::<'_>}` + +error[E0631]: type mismatch in function arguments + --> $DIR/issue-30904.rs:26:10 + | +LL | fn test FnOnce<(&'x str,)>>(_: F) {} + | ---- -------------------------- required by this bound in `test` +... +LL | struct Str<'a>(&'a str); + | ------------------------ found signature of `fn(&str) -> _` +... +LL | test(Str); + | ^^^ expected signature of `for<'x> fn(&'x str) -> _` + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/unsafe/unsafe-subtyping.stderr b/src/test/ui/unsafe/unsafe-subtyping.stderr index cac5ee07089e..b3e789cc0d91 100644 --- a/src/test/ui/unsafe/unsafe-subtyping.stderr +++ b/src/test/ui/unsafe/unsafe-subtyping.stderr @@ -6,8 +6,8 @@ LL | fn foo(x: Option) -> Option { LL | x | ^ expected unsafe fn, found normal fn | - = note: expected type `std::option::Option` - found type `std::option::Option` + = note: expected enum `std::option::Option` + found enum `std::option::Option` error: aborting due to previous error diff --git a/src/test/ui/unsafe/unsafe-trait-impl.rs b/src/test/ui/unsafe/unsafe-trait-impl.rs index 7b76e006907a..97ee97cb5c0d 100644 --- a/src/test/ui/unsafe/unsafe-trait-impl.rs +++ b/src/test/ui/unsafe/unsafe-trait-impl.rs @@ -7,8 +7,8 @@ trait Foo { impl Foo for u32 { fn len(&self) -> u32 { *self } //~^ ERROR method `len` has an incompatible type for trait - //~| expected type `unsafe fn(&u32) -> u32` - //~| found type `fn(&u32) -> u32` + //~| expected fn pointer `unsafe fn(&u32) -> u32` + //~| found fn pointer `fn(&u32) -> u32` } fn main() { } diff --git a/src/test/ui/unsafe/unsafe-trait-impl.stderr b/src/test/ui/unsafe/unsafe-trait-impl.stderr index 4e93d235757e..567be27555cf 100644 --- a/src/test/ui/unsafe/unsafe-trait-impl.stderr +++ b/src/test/ui/unsafe/unsafe-trait-impl.stderr @@ -7,8 +7,8 @@ LL | unsafe fn len(&self) -> u32; LL | fn len(&self) -> u32 { *self } | ^^^^^^^^^^^^^^^^^^^^ expected unsafe fn, found normal fn | - = note: expected type `unsafe fn(&u32) -> u32` - found type `fn(&u32) -> u32` + = note: expected fn pointer `unsafe fn(&u32) -> u32` + found fn pointer `fn(&u32) -> u32` error: aborting due to previous error diff --git a/src/test/ui/variance/variance-btree-invariant-types.stderr b/src/test/ui/variance/variance-btree-invariant-types.stderr index 0f93927683ea..8172a019b65e 100644 --- a/src/test/ui/variance/variance-btree-invariant-types.stderr +++ b/src/test/ui/variance/variance-btree-invariant-types.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `std::collections::btree_map::IterMut<'_, &'new (), _>` - found type `std::collections::btree_map::IterMut<'_, &'static (), _>` + = note: expected struct `std::collections::btree_map::IterMut<'_, &'new (), _>` + found struct `std::collections::btree_map::IterMut<'_, &'static (), _>` note: the lifetime `'new` as defined on the function body at 3:21... --> $DIR/variance-btree-invariant-types.rs:3:21 | @@ -19,8 +19,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `std::collections::btree_map::IterMut<'_, _, &'new ()>` - found type `std::collections::btree_map::IterMut<'_, _, &'static ()>` + = note: expected struct `std::collections::btree_map::IterMut<'_, _, &'new ()>` + found struct `std::collections::btree_map::IterMut<'_, _, &'static ()>` note: the lifetime `'new` as defined on the function body at 6:21... --> $DIR/variance-btree-invariant-types.rs:6:21 | @@ -34,8 +34,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `std::collections::btree_map::IterMut<'_, &'static (), _>` - found type `std::collections::btree_map::IterMut<'_, &'new (), _>` + = note: expected struct `std::collections::btree_map::IterMut<'_, &'static (), _>` + found struct `std::collections::btree_map::IterMut<'_, &'new (), _>` note: the lifetime `'new` as defined on the function body at 9:24... --> $DIR/variance-btree-invariant-types.rs:9:24 | @@ -49,8 +49,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `std::collections::btree_map::IterMut<'_, _, &'static ()>` - found type `std::collections::btree_map::IterMut<'_, _, &'new ()>` + = note: expected struct `std::collections::btree_map::IterMut<'_, _, &'static ()>` + found struct `std::collections::btree_map::IterMut<'_, _, &'new ()>` note: the lifetime `'new` as defined on the function body at 12:24... --> $DIR/variance-btree-invariant-types.rs:12:24 | @@ -64,8 +64,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `std::collections::btree_map::OccupiedEntry<'_, &'new (), _>` - found type `std::collections::btree_map::OccupiedEntry<'_, &'static (), _>` + = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, &'new (), _>` + found struct `std::collections::btree_map::OccupiedEntry<'_, &'static (), _>` note: the lifetime `'new` as defined on the function body at 16:20... --> $DIR/variance-btree-invariant-types.rs:16:20 | @@ -79,8 +79,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `std::collections::btree_map::OccupiedEntry<'_, _, &'new ()>` - found type `std::collections::btree_map::OccupiedEntry<'_, _, &'static ()>` + = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, _, &'new ()>` + found struct `std::collections::btree_map::OccupiedEntry<'_, _, &'static ()>` note: the lifetime `'new` as defined on the function body at 20:20... --> $DIR/variance-btree-invariant-types.rs:20:20 | @@ -94,8 +94,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `std::collections::btree_map::OccupiedEntry<'_, &'static (), _>` - found type `std::collections::btree_map::OccupiedEntry<'_, &'new (), _>` + = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, &'static (), _>` + found struct `std::collections::btree_map::OccupiedEntry<'_, &'new (), _>` note: the lifetime `'new` as defined on the function body at 24:23... --> $DIR/variance-btree-invariant-types.rs:24:23 | @@ -109,8 +109,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `std::collections::btree_map::OccupiedEntry<'_, _, &'static ()>` - found type `std::collections::btree_map::OccupiedEntry<'_, _, &'new ()>` + = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, _, &'static ()>` + found struct `std::collections::btree_map::OccupiedEntry<'_, _, &'new ()>` note: the lifetime `'new` as defined on the function body at 28:23... --> $DIR/variance-btree-invariant-types.rs:28:23 | @@ -124,8 +124,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `std::collections::btree_map::VacantEntry<'_, &'new (), _>` - found type `std::collections::btree_map::VacantEntry<'_, &'static (), _>` + = note: expected struct `std::collections::btree_map::VacantEntry<'_, &'new (), _>` + found struct `std::collections::btree_map::VacantEntry<'_, &'static (), _>` note: the lifetime `'new` as defined on the function body at 33:20... --> $DIR/variance-btree-invariant-types.rs:33:20 | @@ -139,8 +139,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `std::collections::btree_map::VacantEntry<'_, _, &'new ()>` - found type `std::collections::btree_map::VacantEntry<'_, _, &'static ()>` + = note: expected struct `std::collections::btree_map::VacantEntry<'_, _, &'new ()>` + found struct `std::collections::btree_map::VacantEntry<'_, _, &'static ()>` note: the lifetime `'new` as defined on the function body at 37:20... --> $DIR/variance-btree-invariant-types.rs:37:20 | @@ -154,8 +154,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `std::collections::btree_map::VacantEntry<'_, &'static (), _>` - found type `std::collections::btree_map::VacantEntry<'_, &'new (), _>` + = note: expected struct `std::collections::btree_map::VacantEntry<'_, &'static (), _>` + found struct `std::collections::btree_map::VacantEntry<'_, &'new (), _>` note: the lifetime `'new` as defined on the function body at 41:23... --> $DIR/variance-btree-invariant-types.rs:41:23 | @@ -169,8 +169,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `std::collections::btree_map::VacantEntry<'_, _, &'static ()>` - found type `std::collections::btree_map::VacantEntry<'_, _, &'new ()>` + = note: expected struct `std::collections::btree_map::VacantEntry<'_, _, &'static ()>` + found struct `std::collections::btree_map::VacantEntry<'_, _, &'new ()>` note: the lifetime `'new` as defined on the function body at 45:23... --> $DIR/variance-btree-invariant-types.rs:45:23 | diff --git a/src/test/ui/variance/variance-contravariant-arg-object.stderr b/src/test/ui/variance/variance-contravariant-arg-object.stderr index 27017e5dc47d..67ce9bc13467 100644 --- a/src/test/ui/variance/variance-contravariant-arg-object.stderr +++ b/src/test/ui/variance/variance-contravariant-arg-object.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `dyn Get<&'min i32>` - found type `dyn Get<&'max i32>` + = note: expected trait `dyn Get<&'min i32>` + found trait `dyn Get<&'max i32>` note: the lifetime `'min` as defined on the function body at 10:21... --> $DIR/variance-contravariant-arg-object.rs:10:21 | @@ -23,8 +23,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `dyn Get<&'max i32>` - found type `dyn Get<&'min i32>` + = note: expected trait `dyn Get<&'max i32>` + found trait `dyn Get<&'min i32>` note: the lifetime `'min` as defined on the function body at 17:21... --> $DIR/variance-contravariant-arg-object.rs:17:21 | diff --git a/src/test/ui/variance/variance-covariant-arg-object.stderr b/src/test/ui/variance/variance-covariant-arg-object.stderr index b986edb809f6..f66c0f20ba15 100644 --- a/src/test/ui/variance/variance-covariant-arg-object.stderr +++ b/src/test/ui/variance/variance-covariant-arg-object.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `dyn Get<&'min i32>` - found type `dyn Get<&'max i32>` + = note: expected trait `dyn Get<&'min i32>` + found trait `dyn Get<&'max i32>` note: the lifetime `'min` as defined on the function body at 10:21... --> $DIR/variance-covariant-arg-object.rs:10:21 | @@ -23,8 +23,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `dyn Get<&'max i32>` - found type `dyn Get<&'min i32>` + = note: expected trait `dyn Get<&'max i32>` + found trait `dyn Get<&'min i32>` note: the lifetime `'min` as defined on the function body at 18:21... --> $DIR/variance-covariant-arg-object.rs:18:21 | diff --git a/src/test/ui/variance/variance-invariant-arg-object.stderr b/src/test/ui/variance/variance-invariant-arg-object.stderr index 8ff1e23e8add..8ae7240b2827 100644 --- a/src/test/ui/variance/variance-invariant-arg-object.stderr +++ b/src/test/ui/variance/variance-invariant-arg-object.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `dyn Get<&'min i32>` - found type `dyn Get<&'max i32>` + = note: expected trait `dyn Get<&'min i32>` + found trait `dyn Get<&'max i32>` note: the lifetime `'min` as defined on the function body at 7:21... --> $DIR/variance-invariant-arg-object.rs:7:21 | @@ -23,8 +23,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `dyn Get<&'max i32>` - found type `dyn Get<&'min i32>` + = note: expected trait `dyn Get<&'max i32>` + found trait `dyn Get<&'min i32>` note: the lifetime `'min` as defined on the function body at 14:21... --> $DIR/variance-invariant-arg-object.rs:14:21 | diff --git a/src/test/ui/variance/variance-use-contravariant-struct-1.stderr b/src/test/ui/variance/variance-use-contravariant-struct-1.stderr index 618f56da512d..423c9a601f45 100644 --- a/src/test/ui/variance/variance-use-contravariant-struct-1.stderr +++ b/src/test/ui/variance/variance-use-contravariant-struct-1.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `SomeStruct<&'min ()>` - found type `SomeStruct<&'max ()>` + = note: expected struct `SomeStruct<&'min ()>` + found struct `SomeStruct<&'max ()>` note: the lifetime `'min` as defined on the function body at 8:8... --> $DIR/variance-use-contravariant-struct-1.rs:8:8 | diff --git a/src/test/ui/variance/variance-use-covariant-struct-1.stderr b/src/test/ui/variance/variance-use-covariant-struct-1.stderr index 0b3a8dcfc86f..3f9224804bdd 100644 --- a/src/test/ui/variance/variance-use-covariant-struct-1.stderr +++ b/src/test/ui/variance/variance-use-covariant-struct-1.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `SomeStruct<&'max ()>` - found type `SomeStruct<&'min ()>` + = note: expected struct `SomeStruct<&'max ()>` + found struct `SomeStruct<&'min ()>` note: the lifetime `'min` as defined on the function body at 6:8... --> $DIR/variance-use-covariant-struct-1.rs:6:8 | diff --git a/src/test/ui/variance/variance-use-invariant-struct-1.stderr b/src/test/ui/variance/variance-use-invariant-struct-1.stderr index 31deefb535e9..7063f1c9c8f9 100644 --- a/src/test/ui/variance/variance-use-invariant-struct-1.stderr +++ b/src/test/ui/variance/variance-use-invariant-struct-1.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `SomeStruct<&'min ()>` - found type `SomeStruct<&'max ()>` + = note: expected struct `SomeStruct<&'min ()>` + found struct `SomeStruct<&'max ()>` note: the lifetime `'min` as defined on the function body at 8:8... --> $DIR/variance-use-invariant-struct-1.rs:8:8 | @@ -23,8 +23,8 @@ error[E0308]: mismatched types LL | v | ^ lifetime mismatch | - = note: expected type `SomeStruct<&'max ()>` - found type `SomeStruct<&'min ()>` + = note: expected struct `SomeStruct<&'max ()>` + found struct `SomeStruct<&'min ()>` note: the lifetime `'min` as defined on the function body at 15:8... --> $DIR/variance-use-invariant-struct-1.rs:15:8 | diff --git a/src/test/ui/wf/wf-unsafe-trait-obj-match.stderr b/src/test/ui/wf/wf-unsafe-trait-obj-match.stderr index 185b1e6c36b5..d5799ccc8348 100644 --- a/src/test/ui/wf/wf-unsafe-trait-obj-match.stderr +++ b/src/test/ui/wf/wf-unsafe-trait-obj-match.stderr @@ -9,8 +9,8 @@ LL | | None => &R, LL | | } | |_____- `match` arms have incompatible types | - = note: expected type `&S` - found type `&R` + = note: expected type `&S` + found reference `&R` error[E0038]: the trait `Trait` cannot be made into an object --> $DIR/wf-unsafe-trait-obj-match.rs:26:21 diff --git a/src/test/ui/while-type-error.stderr b/src/test/ui/while-type-error.stderr index 15169673fe92..850fcedf39ff 100644 --- a/src/test/ui/while-type-error.stderr +++ b/src/test/ui/while-type-error.stderr @@ -5,7 +5,7 @@ LL | fn main() { while main { } } | ^^^^ expected bool, found fn item | = note: expected type `bool` - found type `fn() {main}` + found fn item `fn() {main}` error: aborting due to previous error diff --git a/src/test/ui/wrong-mul-method-signature.stderr b/src/test/ui/wrong-mul-method-signature.stderr index 2317bf8e8293..61c976b773af 100644 --- a/src/test/ui/wrong-mul-method-signature.stderr +++ b/src/test/ui/wrong-mul-method-signature.stderr @@ -4,8 +4,8 @@ error[E0053]: method `mul` has an incompatible type for trait LL | fn mul(self, s: &f64) -> Vec1 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected f64, found &f64 | - = note: expected type `fn(Vec1, f64) -> Vec1` - found type `fn(Vec1, &f64) -> Vec1` + = note: expected fn pointer `fn(Vec1, f64) -> Vec1` + found fn pointer `fn(Vec1, &f64) -> Vec1` error[E0053]: method `mul` has an incompatible type for trait --> $DIR/wrong-mul-method-signature.rs:33:5 @@ -13,8 +13,8 @@ error[E0053]: method `mul` has an incompatible type for trait LL | fn mul(self, s: f64) -> Vec2 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Vec2`, found f64 | - = note: expected type `fn(Vec2, Vec2) -> f64` - found type `fn(Vec2, f64) -> Vec2` + = note: expected fn pointer `fn(Vec2, Vec2) -> f64` + found fn pointer `fn(Vec2, f64) -> Vec2` error[E0053]: method `mul` has an incompatible type for trait --> $DIR/wrong-mul-method-signature.rs:52:5 @@ -22,8 +22,8 @@ error[E0053]: method `mul` has an incompatible type for trait LL | fn mul(self, s: f64) -> f64 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found f64 | - = note: expected type `fn(Vec3, f64) -> i32` - found type `fn(Vec3, f64) -> f64` + = note: expected fn pointer `fn(Vec3, f64) -> i32` + found fn pointer `fn(Vec3, f64) -> f64` error[E0308]: mismatched types --> $DIR/wrong-mul-method-signature.rs:63:45 @@ -31,8 +31,8 @@ error[E0308]: mismatched types LL | let x: Vec2 = Vec2 { x: 1.0, y: 2.0 } * 2.0; // trait had reversed order | ^^^ expected struct `Vec2`, found floating-point number | - = note: expected type `Vec2` - found type `{float}` + = note: expected struct `Vec2` + found type `{float}` error[E0308]: mismatched types --> $DIR/wrong-mul-method-signature.rs:63:19 @@ -40,8 +40,8 @@ error[E0308]: mismatched types LL | let x: Vec2 = Vec2 { x: 1.0, y: 2.0 } * 2.0; // trait had reversed order | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Vec2`, found f64 | - = note: expected type `Vec2` - found type `f64` + = note: expected struct `Vec2` + found type `f64` error: aborting due to 5 previous errors