From 2c5766f2d4b329f73d144a000c7cc5136f49cad0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Esteban=20K=C3=BCber?= Date: Wed, 8 Jan 2020 08:05:31 -0800 Subject: [PATCH] Unify output of "variant not found" errors --- src/librustc_typeck/astconv.rs | 8 +++- src/librustc_typeck/check/method/suggest.rs | 5 ++- .../associated-const-no-item.rs | 2 +- .../associated-item-enum.stderr | 6 +-- src/test/ui/auto-ref-slice-plus-ref.stderr | 8 ++-- src/test/ui/block-result/issue-3563.rs | 2 +- src/test/ui/block-result/issue-3563.stderr | 2 +- src/test/ui/bogus-tag.stderr | 2 +- src/test/ui/class-cast-to-trait.stderr | 2 +- .../ui/coherence/coherence_inherent.stderr | 2 +- .../ui/coherence/coherence_inherent_cc.stderr | 2 +- .../issue-18343.stderr | 2 +- .../issue-2392.stderr | 22 +++++------ .../issue-32128.stderr | 2 +- .../issue-33784.stderr | 6 +-- .../private-field.stderr | 2 +- .../invalid-const-arg-for-type-param.stderr | 2 +- .../ui/consts/too_generic_eval_ice.stderr | 2 +- src/test/ui/copy-a-resource.stderr | 2 +- .../derives/derive-assoc-type-not-impl.stderr | 2 +- src/test/ui/did_you_mean/bad-assoc-pat.rs | 12 +++--- src/test/ui/did_you_mean/bad-assoc-pat.stderr | 6 +-- src/test/ui/did_you_mean/issue-40006.rs | 2 +- src/test/ui/did_you_mean/issue-40006.stderr | 2 +- .../ui/dont-suggest-private-trait-method.rs | 2 +- .../dont-suggest-private-trait-method.stderr | 2 +- src/test/ui/empty/empty-struct-braces-expr.rs | 6 +-- .../ui/empty/empty-struct-braces-expr.stderr | 6 +-- src/test/ui/error-codes/E0599.stderr | 2 +- src/test/ui/error-festival.stderr | 2 +- .../ui/hygiene/no_implicit_prelude.stderr | 2 +- src/test/ui/hygiene/trait_items.rs | 2 +- src/test/ui/hygiene/trait_items.stderr | 2 +- src/test/ui/impl-trait/bindings-opaque.stderr | 6 +-- ...issue-21659-show-relevant-trait-impls-3.rs | 2 +- ...e-21659-show-relevant-trait-impls-3.stderr | 2 +- .../method-suggestion-no-duplication.stderr | 2 +- .../impl-trait/no-method-suggested-traits.rs | 2 +- .../no-method-suggested-traits.stderr | 38 +++++++++---------- .../ui/infinite/infinite-autoderef.stderr | 2 +- src/test/ui/issues/issue-10465.stderr | 2 +- src/test/ui/issues/issue-13853.stderr | 2 +- src/test/ui/issues/issue-19521.stderr | 2 +- src/test/ui/issues/issue-19692.stderr | 2 +- src/test/ui/issues/issue-21596.stderr | 2 +- src/test/ui/issues/issue-22933-2.rs | 2 +- src/test/ui/issues/issue-22933-2.stderr | 2 +- src/test/ui/issues/issue-22933-3.rs | 2 +- src/test/ui/issues/issue-23173.rs | 6 +-- src/test/ui/issues/issue-23173.stderr | 8 ++-- src/test/ui/issues/issue-23217.rs | 2 +- src/test/ui/issues/issue-23217.stderr | 2 +- src/test/ui/issues/issue-25385.rs | 4 +- src/test/ui/issues/issue-2823.stderr | 2 +- src/test/ui/issues/issue-28344.stderr | 4 +- src/test/ui/issues/issue-28586.rs | 2 +- src/test/ui/issues/issue-28971.rs | 2 +- src/test/ui/issues/issue-28971.stderr | 2 +- src/test/ui/issues/issue-29124.rs | 4 +- src/test/ui/issues/issue-29124.stderr | 4 +- src/test/ui/issues/issue-30123.rs | 2 +- src/test/ui/issues/issue-30123.stderr | 2 +- src/test/ui/issues/issue-31173.stderr | 2 +- src/test/ui/issues/issue-33575.rs | 2 +- src/test/ui/issues/issue-33575.stderr | 2 +- src/test/ui/issues/issue-34209.rs | 2 +- src/test/ui/issues/issue-34209.stderr | 3 +- src/test/ui/issues/issue-34334.rs | 2 +- src/test/ui/issues/issue-34334.stderr | 2 +- src/test/ui/issues/issue-35677.stderr | 2 +- src/test/ui/issues/issue-3707.rs | 2 +- src/test/ui/issues/issue-3707.stderr | 2 +- src/test/ui/issues/issue-38919.rs | 2 +- src/test/ui/issues/issue-38919.stderr | 2 +- src/test/ui/issues/issue-39175.stderr | 2 +- src/test/ui/issues/issue-39559.rs | 2 +- src/test/ui/issues/issue-39559.stderr | 2 +- src/test/ui/issues/issue-3973.rs | 2 +- src/test/ui/issues/issue-3973.stderr | 2 +- src/test/ui/issues/issue-41880.rs | 2 +- src/test/ui/issues/issue-41880.stderr | 2 +- src/test/ui/issues/issue-42880.stderr | 2 +- src/test/ui/issues/issue-43189.rs | 2 +- src/test/ui/issues/issue-43189.stderr | 2 +- .../option-as_deref.rs | 2 +- .../option-as_deref.stderr | 2 +- .../option-as_deref_mut.rs | 2 +- .../option-as_deref_mut.stderr | 2 +- .../result-as_deref.stderr | 2 +- .../result-as_deref_err.stderr | 2 +- .../result-as_deref_mut.stderr | 2 +- .../result-as_deref_mut_err.stderr | 2 +- .../result-as_deref_mut_ok.stderr | 2 +- .../result-as_deref_ok.stderr | 2 +- src/test/ui/issues/issue-5153.rs | 2 +- src/test/ui/issues/issue-5153.stderr | 2 +- src/test/ui/issues/issue-54062.stderr | 2 +- src/test/ui/issues/issue-57362-1.stderr | 2 +- src/test/ui/issues/issue-57362-2.stderr | 2 +- src/test/ui/issues/issue-58734.rs | 2 +- src/test/ui/issues/issue-58734.stderr | 2 +- src/test/ui/issues/issue-64430.stderr | 2 +- ...issue-65284-suggest-generic-trait-bound.rs | 2 +- ...e-65284-suggest-generic-trait-bound.stderr | 2 +- src/test/ui/issues/issue-7950.rs | 2 +- src/test/ui/issues/issue-7950.stderr | 2 +- src/test/ui/lexical-scopes.stderr | 2 +- src/test/ui/methods/method-call-err-msg.rs | 2 +- .../ui/methods/method-call-err-msg.stderr | 2 +- .../ui/mismatched_types/issue-36053-2.stderr | 2 +- .../method-help-unsatisfied-bound.rs | 2 +- .../method-help-unsatisfied-bound.stderr | 2 +- src/test/ui/never_type/issue-2149.rs | 2 +- src/test/ui/never_type/issue-2149.stderr | 2 +- src/test/ui/non-copyable-void.stderr | 2 +- src/test/ui/noncopyable-class.stderr | 2 +- src/test/ui/object-pointer-types.stderr | 6 +-- ...point-at-arbitrary-self-type-method.stderr | 2 +- ...at-arbitrary-self-type-trait-method.stderr | 2 +- src/test/ui/self/suggest-self-2.rs | 2 +- src/test/ui/self/suggest-self-2.stderr | 2 +- .../ui/shadowed/shadowed-trait-methods.stderr | 2 +- src/test/ui/span/issue-7575.rs | 6 +-- src/test/ui/span/issue-7575.stderr | 4 +- .../specialization-trait-not-implemented.rs | 2 +- ...pecialization-trait-not-implemented.stderr | 2 +- src/test/ui/suggestions/constrain-trait.fixed | 4 +- src/test/ui/suggestions/constrain-trait.rs | 4 +- .../ui/suggestions/constrain-trait.stderr | 4 +- ...it-with-missing-trait-bounds-in-arg.stderr | 2 +- src/test/ui/suggestions/issue-21673.stderr | 4 +- .../suggestions/mut-borrow-needed-by-trait.rs | 2 +- .../mut-borrow-needed-by-trait.stderr | 2 +- src/test/ui/suggestions/remove-as_str.rs | 8 ++-- src/test/ui/suggestions/remove-as_str.stderr | 8 ++-- ...oc-fn-call-with-turbofish-through-deref.rs | 2 +- ...n-call-with-turbofish-through-deref.stderr | 2 +- .../suggest-assoc-fn-call-with-turbofish.rs | 2 +- ...uggest-assoc-fn-call-with-turbofish.stderr | 2 +- .../ui/suggestions/suggest-methods.stderr | 4 +- src/test/ui/suggestions/suggest-variants.rs | 6 +-- .../ui/suggestions/suggest-variants.stderr | 12 +++--- src/test/ui/traits/trait-impl-1.rs | 2 +- src/test/ui/traits/trait-impl-1.stderr | 2 +- src/test/ui/traits/trait-item-privacy.rs | 12 +++--- src/test/ui/traits/trait-item-privacy.stderr | 12 +++--- src/test/ui/ufcs/ufcs-partially-resolved.rs | 4 +- .../ui/ufcs/ufcs-partially-resolved.stderr | 4 +- ...ed-closures-static-call-wrong-trait.stderr | 2 +- src/test/ui/underscore-imports/hygiene.stderr | 4 +- src/test/ui/underscore-imports/shadow.stderr | 2 +- src/test/ui/union/union-derive-clone.rs | 2 +- src/test/ui/union/union-derive-clone.stderr | 2 +- src/test/ui/unique-object-noncopyable.stderr | 2 +- src/test/ui/unique-pinned-nocopy.stderr | 2 +- .../ui/unspecified-self-in-trait-ref.stderr | 8 ++-- 156 files changed, 260 insertions(+), 254 deletions(-) diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs index 36d119bf769..4fe45ffa747 100644 --- a/src/librustc_typeck/astconv.rs +++ b/src/librustc_typeck/astconv.rs @@ -2114,9 +2114,13 @@ pub fn associated_path_to_ty( let msg = format!("expected type, found variant `{}`", assoc_ident); tcx.sess.span_err(span, &msg); } else if qself_ty.is_enum() { - let mut err = tcx.sess.struct_span_err( + let mut err = struct_span_err!( + tcx.sess, assoc_ident.span, - &format!("no variant `{}` in enum `{}`", assoc_ident, qself_ty), + E0599, + "no variant named `{}` found for enum `{}`", + assoc_ident, + qself_ty, ); let adt_def = qself_ty.ty_adt_def().expect("enum is not an ADT"); diff --git a/src/librustc_typeck/check/method/suggest.rs b/src/librustc_typeck/check/method/suggest.rs index 1cc1eb2c7b2..40edad36740 100644 --- a/src/librustc_typeck/check/method/suggest.rs +++ b/src/librustc_typeck/check/method/suggest.rs @@ -361,10 +361,11 @@ pub fn report_method_error<'b>( tcx.sess, span, E0599, - "no {} named `{}` found for type `{}` in the current scope", + "no {} named `{}` found for {} `{}` in the current scope", item_kind, item_name, - ty_str + actual.prefix_string(), + ty_str, ); if let Some(span) = tcx.sess.confused_type_with_std_module.borrow().get(&span) diff --git a/src/test/ui/associated-const/associated-const-no-item.rs b/src/test/ui/associated-const/associated-const-no-item.rs index 35fb662f63a..024d14e21b5 100644 --- a/src/test/ui/associated-const/associated-const-no-item.rs +++ b/src/test/ui/associated-const/associated-const-no-item.rs @@ -3,7 +3,7 @@ trait Foo { } const X: i32 = ::ID; -//~^ ERROR no associated item named `ID` found for type `i32` +//~^ ERROR no associated item named `ID` found fn main() { assert_eq!(1, X); diff --git a/src/test/ui/associated-item/associated-item-enum.stderr b/src/test/ui/associated-item/associated-item-enum.stderr index 5a62b9736de..6f89530eac9 100644 --- a/src/test/ui/associated-item/associated-item-enum.stderr +++ b/src/test/ui/associated-item/associated-item-enum.stderr @@ -1,4 +1,4 @@ -error[E0599]: no variant or associated item named `mispellable` found for type `Enum` in the current scope +error[E0599]: no variant or associated item named `mispellable` found for enum `Enum` in the current scope --> $DIR/associated-item-enum.rs:17:11 | LL | enum Enum { Variant } @@ -10,7 +10,7 @@ LL | Enum::mispellable(); | variant or associated item not found in `Enum` | help: there is a method with a similar name: `misspellable` -error[E0599]: no variant or associated item named `mispellable_trait` found for type `Enum` in the current scope +error[E0599]: no variant or associated item named `mispellable_trait` found for enum `Enum` in the current scope --> $DIR/associated-item-enum.rs:18:11 | LL | enum Enum { Variant } @@ -19,7 +19,7 @@ LL | enum Enum { Variant } LL | Enum::mispellable_trait(); | ^^^^^^^^^^^^^^^^^ variant or associated item not found in `Enum` -error[E0599]: no variant or associated item named `MISPELLABLE` found for type `Enum` in the current scope +error[E0599]: no variant or associated item named `MISPELLABLE` found for enum `Enum` in the current scope --> $DIR/associated-item-enum.rs:19:11 | LL | enum Enum { Variant } diff --git a/src/test/ui/auto-ref-slice-plus-ref.stderr b/src/test/ui/auto-ref-slice-plus-ref.stderr index 3e36f2402a9..a0739a7a90b 100644 --- a/src/test/ui/auto-ref-slice-plus-ref.stderr +++ b/src/test/ui/auto-ref-slice-plus-ref.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `test_mut` found for type `std::vec::Vec<{integer}>` in the current scope +error[E0599]: no method named `test_mut` found for struct `std::vec::Vec<{integer}>` in the current scope --> $DIR/auto-ref-slice-plus-ref.rs:7:7 | LL | a.test_mut(); @@ -8,7 +8,7 @@ LL | a.test_mut(); = note: the following trait defines an item `test_mut`, perhaps you need to implement it: candidate #1: `MyIter` -error[E0599]: no method named `test` found for type `std::vec::Vec<{integer}>` in the current scope +error[E0599]: no method named `test` found for struct `std::vec::Vec<{integer}>` in the current scope --> $DIR/auto-ref-slice-plus-ref.rs:8:7 | LL | a.test(); @@ -18,7 +18,7 @@ LL | a.test(); = note: the following trait defines an item `test`, perhaps you need to implement it: candidate #1: `MyIter` -error[E0599]: no method named `test` found for type `[{integer}; 1]` in the current scope +error[E0599]: no method named `test` found for array `[{integer}; 1]` in the current scope --> $DIR/auto-ref-slice-plus-ref.rs:10:11 | LL | ([1]).test(); @@ -28,7 +28,7 @@ LL | ([1]).test(); = note: the following trait defines an item `test`, perhaps you need to implement it: candidate #1: `MyIter` -error[E0599]: no method named `test` found for type `&[{integer}; 1]` in the current scope +error[E0599]: no method named `test` found for reference `&[{integer}; 1]` in the current scope --> $DIR/auto-ref-slice-plus-ref.rs:11:12 | LL | (&[1]).test(); diff --git a/src/test/ui/block-result/issue-3563.rs b/src/test/ui/block-result/issue-3563.rs index 9b313d3e9b2..0b652a1f54b 100644 --- a/src/test/ui/block-result/issue-3563.rs +++ b/src/test/ui/block-result/issue-3563.rs @@ -1,7 +1,7 @@ trait A { fn a(&self) { || self.b() - //~^ ERROR no method named `b` found for type `&Self` in the current scope + //~^ ERROR no method named `b` found } } fn main() {} diff --git a/src/test/ui/block-result/issue-3563.stderr b/src/test/ui/block-result/issue-3563.stderr index 237b8c54ce3..be551f6e889 100644 --- a/src/test/ui/block-result/issue-3563.stderr +++ b/src/test/ui/block-result/issue-3563.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `b` found for type `&Self` in the current scope +error[E0599]: no method named `b` found for reference `&Self` in the current scope --> $DIR/issue-3563.rs:3:17 | LL | || self.b() diff --git a/src/test/ui/bogus-tag.stderr b/src/test/ui/bogus-tag.stderr index 890f6800c22..cb3199e7c88 100644 --- a/src/test/ui/bogus-tag.stderr +++ b/src/test/ui/bogus-tag.stderr @@ -1,4 +1,4 @@ -error[E0599]: no variant or associated item named `Hsl` found for type `Color` in the current scope +error[E0599]: no variant or associated item named `Hsl` found for enum `Color` in the current scope --> $DIR/bogus-tag.rs:7:16 | LL | enum Color { Rgb(isize, isize, isize), Rgba(isize, isize, isize, isize), } diff --git a/src/test/ui/class-cast-to-trait.stderr b/src/test/ui/class-cast-to-trait.stderr index 4cab52e3e97..0f932cda07f 100644 --- a/src/test/ui/class-cast-to-trait.stderr +++ b/src/test/ui/class-cast-to-trait.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `eat` found for type `std::boxed::Box` in the current scope +error[E0599]: no method named `eat` found for struct `std::boxed::Box` in the current scope --> $DIR/class-cast-to-trait.rs:53:8 | LL | nyan.eat(); diff --git a/src/test/ui/coherence/coherence_inherent.stderr b/src/test/ui/coherence/coherence_inherent.stderr index e719d5254f6..3d37d8af31d 100644 --- a/src/test/ui/coherence/coherence_inherent.stderr +++ b/src/test/ui/coherence/coherence_inherent.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `the_fn` found for type `&Lib::TheStruct` in the current scope +error[E0599]: no method named `the_fn` found for reference `&Lib::TheStruct` in the current scope --> $DIR/coherence_inherent.rs:31:11 | LL | s.the_fn(); diff --git a/src/test/ui/coherence/coherence_inherent_cc.stderr b/src/test/ui/coherence/coherence_inherent_cc.stderr index c666c1a3d1b..d968c8b4680 100644 --- a/src/test/ui/coherence/coherence_inherent_cc.stderr +++ b/src/test/ui/coherence/coherence_inherent_cc.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `the_fn` found for type `&coherence_inherent_cc_lib::TheStruct` in the current scope +error[E0599]: no method named `the_fn` found for reference `&coherence_inherent_cc_lib::TheStruct` in the current scope --> $DIR/coherence_inherent_cc.rs:23:11 | LL | s.the_fn(); diff --git a/src/test/ui/confuse-field-and-method/issue-18343.stderr b/src/test/ui/confuse-field-and-method/issue-18343.stderr index 79ba93130a7..d6b399acb73 100644 --- a/src/test/ui/confuse-field-and-method/issue-18343.stderr +++ b/src/test/ui/confuse-field-and-method/issue-18343.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `closure` found for type `Obj<[closure@$DIR/issue-18343.rs:6:28: 6:33]>` in the current scope +error[E0599]: no method named `closure` found for struct `Obj<[closure@$DIR/issue-18343.rs:6:28: 6:33]>` in the current scope --> $DIR/issue-18343.rs:7:7 | LL | struct Obj where F: FnMut() -> u32 { diff --git a/src/test/ui/confuse-field-and-method/issue-2392.stderr b/src/test/ui/confuse-field-and-method/issue-2392.stderr index a44b9718415..f9dfdddad9d 100644 --- a/src/test/ui/confuse-field-and-method/issue-2392.stderr +++ b/src/test/ui/confuse-field-and-method/issue-2392.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `closure` found for type `Obj<[closure@$DIR/issue-2392.rs:35:36: 35:41]>` in the current scope +error[E0599]: no method named `closure` found for struct `Obj<[closure@$DIR/issue-2392.rs:35:36: 35:41]>` in the current scope --> $DIR/issue-2392.rs:36:15 | LL | struct Obj where F: FnOnce() -> u32 { @@ -12,7 +12,7 @@ help: to call the function stored in `closure`, surround the field access with p LL | (o_closure.closure)(); | ^ ^ -error[E0599]: no method named `not_closure` found for type `Obj<[closure@$DIR/issue-2392.rs:35:36: 35:41]>` in the current scope +error[E0599]: no method named `not_closure` found for struct `Obj<[closure@$DIR/issue-2392.rs:35:36: 35:41]>` in the current scope --> $DIR/issue-2392.rs:38:15 | LL | struct Obj where F: FnOnce() -> u32 { @@ -23,7 +23,7 @@ LL | o_closure.not_closure(); | | | field, not a method -error[E0599]: no method named `closure` found for type `Obj u32 {func}>` in the current scope +error[E0599]: no method named `closure` found for struct `Obj u32 {func}>` in the current scope --> $DIR/issue-2392.rs:42:12 | LL | struct Obj where F: FnOnce() -> u32 { @@ -37,7 +37,7 @@ help: to call the function stored in `closure`, surround the field access with p LL | (o_func.closure)(); | ^ ^ -error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the current scope +error[E0599]: no method named `boxed_closure` found for struct `BoxedObj` in the current scope --> $DIR/issue-2392.rs:45:14 | LL | struct BoxedObj { @@ -51,7 +51,7 @@ help: to call the function stored in `boxed_closure`, surround the field access LL | (boxed_fn.boxed_closure)(); | ^ ^ -error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the current scope +error[E0599]: no method named `boxed_closure` found for struct `BoxedObj` in the current scope --> $DIR/issue-2392.rs:48:19 | LL | struct BoxedObj { @@ -65,7 +65,7 @@ help: to call the function stored in `boxed_closure`, surround the field access LL | (boxed_closure.boxed_closure)(); | ^ ^ -error[E0599]: no method named `closure` found for type `Obj u32 {func}>` in the current scope +error[E0599]: no method named `closure` found for struct `Obj u32 {func}>` in the current scope --> $DIR/issue-2392.rs:53:12 | LL | struct Obj where F: FnOnce() -> u32 { @@ -79,7 +79,7 @@ help: to call the function stored in `closure`, surround the field access with p LL | (w.wrap.closure)(); | ^ ^ -error[E0599]: no method named `not_closure` found for type `Obj u32 {func}>` in the current scope +error[E0599]: no method named `not_closure` found for struct `Obj u32 {func}>` in the current scope --> $DIR/issue-2392.rs:55:12 | LL | struct Obj where F: FnOnce() -> u32 { @@ -90,7 +90,7 @@ LL | w.wrap.not_closure(); | | | field, not a method -error[E0599]: no method named `closure` found for type `Obj u32 + 'static)>>` in the current scope +error[E0599]: no method named `closure` found for struct `Obj u32 + 'static)>>` in the current scope --> $DIR/issue-2392.rs:58:24 | LL | struct Obj where F: FnOnce() -> u32 { @@ -104,7 +104,7 @@ help: to call the function stored in `closure`, surround the field access with p LL | (check_expression().closure)(); | ^ ^ -error[E0599]: no method named `f1` found for type `FuncContainer` in the current scope +error[E0599]: no method named `f1` found for struct `FuncContainer` in the current scope --> $DIR/issue-2392.rs:64:31 | LL | struct FuncContainer { @@ -118,7 +118,7 @@ help: to call the function stored in `f1`, surround the field access with parent LL | ((*self.container).f1)(1); | ^ ^ -error[E0599]: no method named `f2` found for type `FuncContainer` in the current scope +error[E0599]: no method named `f2` found for struct `FuncContainer` in the current scope --> $DIR/issue-2392.rs:65:31 | LL | struct FuncContainer { @@ -132,7 +132,7 @@ help: to call the function stored in `f2`, surround the field access with parent LL | ((*self.container).f2)(1); | ^ ^ -error[E0599]: no method named `f3` found for type `FuncContainer` in the current scope +error[E0599]: no method named `f3` found for struct `FuncContainer` in the current scope --> $DIR/issue-2392.rs:66:31 | LL | struct FuncContainer { diff --git a/src/test/ui/confuse-field-and-method/issue-32128.stderr b/src/test/ui/confuse-field-and-method/issue-32128.stderr index b2f7894ba05..a8d97bdfe2f 100644 --- a/src/test/ui/confuse-field-and-method/issue-32128.stderr +++ b/src/test/ui/confuse-field-and-method/issue-32128.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `example` found for type `Example` in the current scope +error[E0599]: no method named `example` found for struct `Example` in the current scope --> $DIR/issue-32128.rs:12:10 | LL | struct Example { diff --git a/src/test/ui/confuse-field-and-method/issue-33784.stderr b/src/test/ui/confuse-field-and-method/issue-33784.stderr index af29a9963e1..c109896e825 100644 --- a/src/test/ui/confuse-field-and-method/issue-33784.stderr +++ b/src/test/ui/confuse-field-and-method/issue-33784.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `closure` found for type `&Obj<[closure@$DIR/issue-33784.rs:25:43: 25:48]>` in the current scope +error[E0599]: no method named `closure` found for reference `&Obj<[closure@$DIR/issue-33784.rs:25:43: 25:48]>` in the current scope --> $DIR/issue-33784.rs:27:7 | LL | p.closure(); @@ -9,7 +9,7 @@ help: to call the function stored in `closure`, surround the field access with p LL | (p.closure)(); | ^ ^ -error[E0599]: no method named `fn_ptr` found for type `&&Obj<[closure@$DIR/issue-33784.rs:25:43: 25:48]>` in the current scope +error[E0599]: no method named `fn_ptr` found for reference `&&Obj<[closure@$DIR/issue-33784.rs:25:43: 25:48]>` in the current scope --> $DIR/issue-33784.rs:29:7 | LL | q.fn_ptr(); @@ -20,7 +20,7 @@ help: to call the function stored in `fn_ptr`, surround the field access with pa LL | (q.fn_ptr)(); | ^ ^ -error[E0599]: no method named `c_fn_ptr` found for type `&D` in the current scope +error[E0599]: no method named `c_fn_ptr` found for reference `&D` in the current scope --> $DIR/issue-33784.rs:32:7 | LL | s.c_fn_ptr(); diff --git a/src/test/ui/confuse-field-and-method/private-field.stderr b/src/test/ui/confuse-field-and-method/private-field.stderr index 97c949e32e3..82cb235d47a 100644 --- a/src/test/ui/confuse-field-and-method/private-field.stderr +++ b/src/test/ui/confuse-field-and-method/private-field.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `dog_age` found for type `animal::Dog` in the current scope +error[E0599]: no method named `dog_age` found for struct `animal::Dog` in the current scope --> $DIR/private-field.rs:16:23 | LL | pub struct Dog { diff --git a/src/test/ui/const-generics/invalid-const-arg-for-type-param.stderr b/src/test/ui/const-generics/invalid-const-arg-for-type-param.stderr index 47b090cb886..19e7d2036bf 100644 --- a/src/test/ui/const-generics/invalid-const-arg-for-type-param.stderr +++ b/src/test/ui/const-generics/invalid-const-arg-for-type-param.stderr @@ -4,7 +4,7 @@ error[E0107]: wrong number of const arguments: expected 0, found 1 LL | let _: u32 = 5i32.try_into::<32>().unwrap(); | ^^ unexpected const argument -error[E0599]: no method named `f` found for type `S` in the current scope +error[E0599]: no method named `f` found for struct `S` in the current scope --> $DIR/invalid-const-arg-for-type-param.rs:7:7 | LL | struct S; diff --git a/src/test/ui/consts/too_generic_eval_ice.stderr b/src/test/ui/consts/too_generic_eval_ice.stderr index 2fb9977f4d7..599d1d79e75 100644 --- a/src/test/ui/consts/too_generic_eval_ice.stderr +++ b/src/test/ui/consts/too_generic_eval_ice.stderr @@ -1,4 +1,4 @@ -error[E0599]: no associated item named `HOST_SIZE` found for type `Foo` in the current scope +error[E0599]: no associated item named `HOST_SIZE` found for struct `Foo` in the current scope --> $DIR/too_generic_eval_ice.rs:7:19 | LL | pub struct Foo(A, B); diff --git a/src/test/ui/copy-a-resource.stderr b/src/test/ui/copy-a-resource.stderr index 054bd0914d3..c95e8d239d2 100644 --- a/src/test/ui/copy-a-resource.stderr +++ b/src/test/ui/copy-a-resource.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `clone` found for type `Foo` in the current scope +error[E0599]: no method named `clone` found for struct `Foo` in the current scope --> $DIR/copy-a-resource.rs:18:16 | LL | struct Foo { diff --git a/src/test/ui/derives/derive-assoc-type-not-impl.stderr b/src/test/ui/derives/derive-assoc-type-not-impl.stderr index 038de80508a..2083a1d6522 100644 --- a/src/test/ui/derives/derive-assoc-type-not-impl.stderr +++ b/src/test/ui/derives/derive-assoc-type-not-impl.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `clone` found for type `Bar` in the current scope +error[E0599]: no method named `clone` found for struct `Bar` in the current scope --> $DIR/derive-assoc-type-not-impl.rs:18:30 | LL | struct Bar { diff --git a/src/test/ui/did_you_mean/bad-assoc-pat.rs b/src/test/ui/did_you_mean/bad-assoc-pat.rs index 7e7ba59dca8..3f912f7ffc6 100644 --- a/src/test/ui/did_you_mean/bad-assoc-pat.rs +++ b/src/test/ui/did_you_mean/bad-assoc-pat.rs @@ -2,25 +2,25 @@ fn main() { match 0u8 { [u8]::AssocItem => {} //~^ ERROR missing angle brackets in associated item path - //~| ERROR no associated item named `AssocItem` found for type `[u8]` in the current scope + //~| ERROR no associated item named `AssocItem` found (u8, u8)::AssocItem => {} //~^ ERROR missing angle brackets in associated item path - //~| ERROR no associated item named `AssocItem` found for type `(u8, u8)` in the current sco + //~| ERROR no associated item named `AssocItem` found _::AssocItem => {} //~^ ERROR missing angle brackets in associated item path - //~| ERROR no associated item named `AssocItem` found for type `_` in the current scope + //~| ERROR no associated item named `AssocItem` found } match &0u8 { &(u8,)::AssocItem => {} //~^ ERROR missing angle brackets in associated item path - //~| ERROR no associated item named `AssocItem` found for type `(u8,)` in the current scope + //~| ERROR no associated item named `AssocItem` found } } macro_rules! pat { ($ty: ty) => ($ty::AssocItem) //~^ ERROR missing angle brackets in associated item path - //~| ERROR no associated item named `AssocItem` found for type `u8` in the current scope + //~| ERROR no associated item named `AssocItem` found } macro_rules! ty { () => (u8) @@ -31,6 +31,6 @@ fn check_macros() { pat!(u8) => {} ty!()::AssocItem => {} //~^ ERROR missing angle brackets in associated item path - //~| ERROR no associated item named `AssocItem` found for type `u8` in the current scope + //~| ERROR no associated item named `AssocItem` found } } diff --git a/src/test/ui/did_you_mean/bad-assoc-pat.stderr b/src/test/ui/did_you_mean/bad-assoc-pat.stderr index 59b865437a2..3f1946b94f6 100644 --- a/src/test/ui/did_you_mean/bad-assoc-pat.stderr +++ b/src/test/ui/did_you_mean/bad-assoc-pat.stderr @@ -37,13 +37,13 @@ LL | ($ty: ty) => ($ty::AssocItem) LL | pat!(u8) => {} | -------- in this macro invocation -error[E0599]: no associated item named `AssocItem` found for type `[u8]` in the current scope +error[E0599]: no associated item named `AssocItem` found for slice `[u8]` in the current scope --> $DIR/bad-assoc-pat.rs:3:15 | LL | [u8]::AssocItem => {} | ^^^^^^^^^ associated item not found in `[u8]` -error[E0599]: no associated item named `AssocItem` found for type `(u8, u8)` in the current scope +error[E0599]: no associated item named `AssocItem` found for tuple `(u8, u8)` in the current scope --> $DIR/bad-assoc-pat.rs:6:19 | LL | (u8, u8)::AssocItem => {} @@ -55,7 +55,7 @@ error[E0599]: no associated item named `AssocItem` found for type `_` in the cur LL | _::AssocItem => {} | ^^^^^^^^^ associated item not found in `_` -error[E0599]: no associated item named `AssocItem` found for type `(u8,)` in the current scope +error[E0599]: no associated item named `AssocItem` found for tuple `(u8,)` in the current scope --> $DIR/bad-assoc-pat.rs:14:17 | LL | &(u8,)::AssocItem => {} diff --git a/src/test/ui/did_you_mean/issue-40006.rs b/src/test/ui/did_you_mean/issue-40006.rs index ea21592997b..60633c6930c 100644 --- a/src/test/ui/did_you_mean/issue-40006.rs +++ b/src/test/ui/did_you_mean/issue-40006.rs @@ -35,5 +35,5 @@ impl S { } fn main() { - S.hello_method(); //~ no method named `hello_method` found for type `S` in the current scope + S.hello_method(); //~ no method named `hello_method` found } diff --git a/src/test/ui/did_you_mean/issue-40006.stderr b/src/test/ui/did_you_mean/issue-40006.stderr index d1e995013cb..072e61f6a3c 100644 --- a/src/test/ui/did_you_mean/issue-40006.stderr +++ b/src/test/ui/did_you_mean/issue-40006.stderr @@ -56,7 +56,7 @@ error: missing `fn`, `type`, or `const` for associated-item declaration LL | pub hello_method(&self) { | ^ missing `fn`, `type`, or `const` -error[E0599]: no method named `hello_method` found for type `S` in the current scope +error[E0599]: no method named `hello_method` found for struct `S` in the current scope --> $DIR/issue-40006.rs:38:7 | LL | struct S; diff --git a/src/test/ui/dont-suggest-private-trait-method.rs b/src/test/ui/dont-suggest-private-trait-method.rs index ef0904c1a2d..6e2b1abd137 100644 --- a/src/test/ui/dont-suggest-private-trait-method.rs +++ b/src/test/ui/dont-suggest-private-trait-method.rs @@ -2,5 +2,5 @@ fn main() { T::new(); - //~^ ERROR no function or associated item named `new` found for type `T` in the current scope + //~^ ERROR no function or associated item named `new` found } diff --git a/src/test/ui/dont-suggest-private-trait-method.stderr b/src/test/ui/dont-suggest-private-trait-method.stderr index 5189ffa62d1..fd7fdb4f722 100644 --- a/src/test/ui/dont-suggest-private-trait-method.stderr +++ b/src/test/ui/dont-suggest-private-trait-method.stderr @@ -1,4 +1,4 @@ -error[E0599]: no function or associated item named `new` found for type `T` in the current scope +error[E0599]: no function or associated item named `new` found for struct `T` in the current scope --> $DIR/dont-suggest-private-trait-method.rs:4:8 | LL | struct T; diff --git a/src/test/ui/empty/empty-struct-braces-expr.rs b/src/test/ui/empty/empty-struct-braces-expr.rs index 1a38d3d7601..f4144277f16 100644 --- a/src/test/ui/empty/empty-struct-braces-expr.rs +++ b/src/test/ui/empty/empty-struct-braces-expr.rs @@ -22,8 +22,8 @@ fn main() { let xe1 = XEmpty1; //~ ERROR expected value, found struct `XEmpty1` let xe1 = XEmpty1(); //~^ ERROR expected function, tuple struct or tuple variant, found struct `XEmpty1` - let xe3 = XE::Empty3; //~ ERROR no variant or associated item named `Empty3` found for type - let xe3 = XE::Empty3(); //~ ERROR no variant or associated item named `Empty3` found for type + let xe3 = XE::Empty3; //~ ERROR no variant or associated item named `Empty3` found for enum + let xe3 = XE::Empty3(); //~ ERROR no variant or associated item named `Empty3` found for enum - XE::Empty1 {}; //~ ERROR no variant `Empty1` in enum `empty_struct::XE` + XE::Empty1 {}; //~ ERROR no variant named `Empty1` found for enum `empty_struct::XE` } diff --git a/src/test/ui/empty/empty-struct-braces-expr.stderr b/src/test/ui/empty/empty-struct-braces-expr.stderr index f427c1ba0ad..20f4c320e66 100644 --- a/src/test/ui/empty/empty-struct-braces-expr.stderr +++ b/src/test/ui/empty/empty-struct-braces-expr.stderr @@ -58,7 +58,7 @@ LL | let xe1 = XEmpty1(); | did you mean `XEmpty1 { /* fields */ }`? | help: a unit struct with a similar name exists: `XEmpty2` -error[E0599]: no variant or associated item named `Empty3` found for type `empty_struct::XE` in the current scope +error[E0599]: no variant or associated item named `Empty3` found for enum `empty_struct::XE` in the current scope --> $DIR/empty-struct-braces-expr.rs:25:19 | LL | let xe3 = XE::Empty3; @@ -67,7 +67,7 @@ LL | let xe3 = XE::Empty3; | variant or associated item not found in `empty_struct::XE` | help: there is a variant with a similar name: `XEmpty3` -error[E0599]: no variant or associated item named `Empty3` found for type `empty_struct::XE` in the current scope +error[E0599]: no variant or associated item named `Empty3` found for enum `empty_struct::XE` in the current scope --> $DIR/empty-struct-braces-expr.rs:26:19 | LL | let xe3 = XE::Empty3(); @@ -76,7 +76,7 @@ LL | let xe3 = XE::Empty3(); | variant or associated item not found in `empty_struct::XE` | help: there is a variant with a similar name: `XEmpty3` -error: no variant `Empty1` in enum `empty_struct::XE` +error[E0599]: no variant named `Empty1` found for enum `empty_struct::XE` --> $DIR/empty-struct-braces-expr.rs:28:9 | LL | XE::Empty1 {}; diff --git a/src/test/ui/error-codes/E0599.stderr b/src/test/ui/error-codes/E0599.stderr index 89bfccf2fbc..a78a003661d 100644 --- a/src/test/ui/error-codes/E0599.stderr +++ b/src/test/ui/error-codes/E0599.stderr @@ -1,4 +1,4 @@ -error[E0599]: no associated item named `NotEvenReal` found for type `Foo` in the current scope +error[E0599]: no associated item named `NotEvenReal` found for struct `Foo` in the current scope --> $DIR/E0599.rs:4:20 | LL | struct Foo; diff --git a/src/test/ui/error-festival.stderr b/src/test/ui/error-festival.stderr index 73571a375b5..6b80d99b3af 100644 --- a/src/test/ui/error-festival.stderr +++ b/src/test/ui/error-festival.stderr @@ -20,7 +20,7 @@ LL | x += 2; | = note: an implementation of `std::ops::AddAssign` might be missing for `&str` -error[E0599]: no method named `z` found for type `&str` in the current scope +error[E0599]: no method named `z` found for reference `&str` in the current scope --> $DIR/error-festival.rs:16:7 | LL | x.z(); diff --git a/src/test/ui/hygiene/no_implicit_prelude.stderr b/src/test/ui/hygiene/no_implicit_prelude.stderr index 736369dab83..5d75f5034bc 100644 --- a/src/test/ui/hygiene/no_implicit_prelude.stderr +++ b/src/test/ui/hygiene/no_implicit_prelude.stderr @@ -15,7 +15,7 @@ LL | fn f() { ::bar::m!(); } LL | Vec::new(); | ^^^ use of undeclared type or module `Vec` -error[E0599]: no method named `clone` found for type `()` in the current scope +error[E0599]: no method named `clone` found for unit type `()` in the current scope --> $DIR/no_implicit_prelude.rs:12:12 | LL | fn f() { ::bar::m!(); } diff --git a/src/test/ui/hygiene/trait_items.rs b/src/test/ui/hygiene/trait_items.rs index a116c5b38ce..15c4acbc939 100644 --- a/src/test/ui/hygiene/trait_items.rs +++ b/src/test/ui/hygiene/trait_items.rs @@ -14,7 +14,7 @@ mod bar { } mod baz { - pub macro m() { ().f() } //~ ERROR no method named `f` found for type `()` in the current scope + pub macro m() { ().f() } //~ ERROR no method named `f` found fn f() { ::bar::m!(); } } diff --git a/src/test/ui/hygiene/trait_items.stderr b/src/test/ui/hygiene/trait_items.stderr index c3ce484edf7..8e3609292a7 100644 --- a/src/test/ui/hygiene/trait_items.stderr +++ b/src/test/ui/hygiene/trait_items.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `f` found for type `()` in the current scope +error[E0599]: no method named `f` found for unit type `()` in the current scope --> $DIR/trait_items.rs:17:24 | LL | fn f() { ::baz::m!(); } diff --git a/src/test/ui/impl-trait/bindings-opaque.stderr b/src/test/ui/impl-trait/bindings-opaque.stderr index 644d26b3406..1605f3434cf 100644 --- a/src/test/ui/impl-trait/bindings-opaque.stderr +++ b/src/test/ui/impl-trait/bindings-opaque.stderr @@ -6,19 +6,19 @@ LL | #![feature(impl_trait_in_bindings)] | = note: `#[warn(incomplete_features)]` on by default -error[E0599]: no method named `count_ones` found for type `impl std::marker::Copy` in the current scope +error[E0599]: no method named `count_ones` found for opaque type `impl std::marker::Copy` in the current scope --> $DIR/bindings-opaque.rs:11:17 | LL | let _ = FOO.count_ones(); | ^^^^^^^^^^ method not found in `impl std::marker::Copy` -error[E0599]: no method named `count_ones` found for type `impl std::marker::Copy` in the current scope +error[E0599]: no method named `count_ones` found for opaque type `impl std::marker::Copy` in the current scope --> $DIR/bindings-opaque.rs:13:17 | LL | let _ = BAR.count_ones(); | ^^^^^^^^^^ method not found in `impl std::marker::Copy` -error[E0599]: no method named `count_ones` found for type `impl std::marker::Copy` in the current scope +error[E0599]: no method named `count_ones` found for opaque type `impl std::marker::Copy` in the current scope --> $DIR/bindings-opaque.rs:15:17 | LL | let _ = foo.count_ones(); diff --git a/src/test/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.rs b/src/test/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.rs index 2bff01be9b8..41f48cb5693 100644 --- a/src/test/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.rs +++ b/src/test/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.rs @@ -18,5 +18,5 @@ fn main() { let f1 = Bar; f1.foo(1usize); - //~^ error: method named `foo` found for type `Bar` in the current scope + //~^ error: method named `foo` found for struct `Bar` in the current scope } diff --git a/src/test/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr b/src/test/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr index 441191beaf5..57417975474 100644 --- a/src/test/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr +++ b/src/test/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `foo` found for type `Bar` in the current scope +error[E0599]: no method named `foo` found for struct `Bar` in the current scope --> $DIR/issue-21659-show-relevant-trait-impls-3.rs:20:8 | LL | struct Bar; diff --git a/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr b/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr index fb870d6c6f0..7f2eb0c21e6 100644 --- a/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr +++ b/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `is_empty` found for type `Foo` in the current scope +error[E0599]: no method named `is_empty` found for struct `Foo` in the current scope --> $DIR/method-suggestion-no-duplication.rs:7:15 | LL | struct Foo; diff --git a/src/test/ui/impl-trait/no-method-suggested-traits.rs b/src/test/ui/impl-trait/no-method-suggested-traits.rs index c912873a6c0..c8abc2d8f8e 100644 --- a/src/test/ui/impl-trait/no-method-suggested-traits.rs +++ b/src/test/ui/impl-trait/no-method-suggested-traits.rs @@ -25,7 +25,7 @@ fn main() { //~|items from traits can only be used if the trait is in scope std::rc::Rc::new(&mut Box::new(&1u32)).method(); //~^items from traits can only be used if the trait is in scope - //~| ERROR no method named `method` found for type + //~| ERROR no method named `method` found for struct 'a'.method(); //~^ ERROR no method named diff --git a/src/test/ui/impl-trait/no-method-suggested-traits.stderr b/src/test/ui/impl-trait/no-method-suggested-traits.stderr index f0a03e1be82..da25617e187 100644 --- a/src/test/ui/impl-trait/no-method-suggested-traits.stderr +++ b/src/test/ui/impl-trait/no-method-suggested-traits.stderr @@ -16,7 +16,7 @@ LL | use no_method_suggested_traits::qux::PrivPub; LL | use no_method_suggested_traits::Reexported; | -error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&u32>>` in the current scope +error[E0599]: no method named `method` found for struct `std::rc::Rc<&mut std::boxed::Box<&u32>>` in the current scope --> $DIR/no-method-suggested-traits.rs:26:44 | LL | std::rc::Rc::new(&mut Box::new(&1u32)).method(); @@ -46,7 +46,7 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f LL | use foo::Bar; | -error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&char>>` in the current scope +error[E0599]: no method named `method` found for struct `std::rc::Rc<&mut std::boxed::Box<&char>>` in the current scope --> $DIR/no-method-suggested-traits.rs:32:43 | LL | fn method(&self) {} @@ -78,7 +78,7 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f LL | use no_method_suggested_traits::foo::PubPub; | -error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&i32>>` in the current scope +error[E0599]: no method named `method` found for struct `std::rc::Rc<&mut std::boxed::Box<&i32>>` in the current scope --> $DIR/no-method-suggested-traits.rs:37:44 | LL | std::rc::Rc::new(&mut Box::new(&1i32)).method(); @@ -90,7 +90,7 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f LL | use no_method_suggested_traits::foo::PubPub; | -error[E0599]: no method named `method` found for type `Foo` in the current scope +error[E0599]: no method named `method` found for struct `Foo` in the current scope --> $DIR/no-method-suggested-traits.rs:40:9 | LL | struct Foo; @@ -106,7 +106,7 @@ LL | Foo.method(); candidate #3: `no_method_suggested_traits::qux::PrivPub` candidate #4: `no_method_suggested_traits::Reexported` -error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&Foo>>` in the current scope +error[E0599]: no method named `method` found for struct `std::rc::Rc<&mut std::boxed::Box<&Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:42:43 | LL | std::rc::Rc::new(&mut Box::new(&Foo)).method(); @@ -129,7 +129,7 @@ LL | 1u64.method2(); = note: the following trait defines an item `method2`, perhaps you need to implement it: candidate #1: `foo::Bar` -error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::boxed::Box<&u64>>` in the current scope +error[E0599]: no method named `method2` found for struct `std::rc::Rc<&mut std::boxed::Box<&u64>>` in the current scope --> $DIR/no-method-suggested-traits.rs:47:44 | LL | std::rc::Rc::new(&mut Box::new(&1u64)).method2(); @@ -139,7 +139,7 @@ LL | std::rc::Rc::new(&mut Box::new(&1u64)).method2(); = note: the following trait defines an item `method2`, perhaps you need to implement it: candidate #1: `foo::Bar` -error[E0599]: no method named `method2` found for type `no_method_suggested_traits::Foo` in the current scope +error[E0599]: no method named `method2` found for struct `no_method_suggested_traits::Foo` in the current scope --> $DIR/no-method-suggested-traits.rs:50:37 | LL | no_method_suggested_traits::Foo.method2(); @@ -149,7 +149,7 @@ LL | no_method_suggested_traits::Foo.method2(); = note: the following trait defines an item `method2`, perhaps you need to implement it: candidate #1: `foo::Bar` -error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope +error[E0599]: no method named `method2` found for struct `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:52:71 | LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2(); @@ -159,7 +159,7 @@ LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).metho = note: the following trait defines an item `method2`, perhaps you need to implement it: candidate #1: `foo::Bar` -error[E0599]: no method named `method2` found for type `no_method_suggested_traits::Bar` in the current scope +error[E0599]: no method named `method2` found for enum `no_method_suggested_traits::Bar` in the current scope --> $DIR/no-method-suggested-traits.rs:54:40 | LL | no_method_suggested_traits::Bar::X.method2(); @@ -169,7 +169,7 @@ LL | no_method_suggested_traits::Bar::X.method2(); = note: the following trait defines an item `method2`, perhaps you need to implement it: candidate #1: `foo::Bar` -error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope +error[E0599]: no method named `method2` found for struct `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope --> $DIR/no-method-suggested-traits.rs:56:74 | LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2(); @@ -179,7 +179,7 @@ LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).me = note: the following trait defines an item `method2`, perhaps you need to implement it: candidate #1: `foo::Bar` -error[E0599]: no method named `method3` found for type `Foo` in the current scope +error[E0599]: no method named `method3` found for struct `Foo` in the current scope --> $DIR/no-method-suggested-traits.rs:59:9 | LL | struct Foo; @@ -192,7 +192,7 @@ LL | Foo.method3(); = note: the following trait defines an item `method3`, perhaps you need to implement it: candidate #1: `no_method_suggested_traits::foo::PubPub` -error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&Foo>>` in the current scope +error[E0599]: no method named `method3` found for struct `std::rc::Rc<&mut std::boxed::Box<&Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:61:43 | LL | std::rc::Rc::new(&mut Box::new(&Foo)).method3(); @@ -202,7 +202,7 @@ LL | std::rc::Rc::new(&mut Box::new(&Foo)).method3(); = note: the following trait defines an item `method3`, perhaps you need to implement it: candidate #1: `no_method_suggested_traits::foo::PubPub` -error[E0599]: no method named `method3` found for type `Bar` in the current scope +error[E0599]: no method named `method3` found for enum `Bar` in the current scope --> $DIR/no-method-suggested-traits.rs:63:12 | LL | enum Bar { X } @@ -215,7 +215,7 @@ LL | Bar::X.method3(); = note: the following trait defines an item `method3`, perhaps you need to implement it: candidate #1: `no_method_suggested_traits::foo::PubPub` -error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&Bar>>` in the current scope +error[E0599]: no method named `method3` found for struct `std::rc::Rc<&mut std::boxed::Box<&Bar>>` in the current scope --> $DIR/no-method-suggested-traits.rs:65:46 | LL | std::rc::Rc::new(&mut Box::new(&Bar::X)).method3(); @@ -231,31 +231,31 @@ error[E0599]: no method named `method3` found for type `usize` in the current sc LL | 1_usize.method3(); | ^^^^^^^ method not found in `usize` -error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&usize>>` in the current scope +error[E0599]: no method named `method3` found for struct `std::rc::Rc<&mut std::boxed::Box<&usize>>` in the current scope --> $DIR/no-method-suggested-traits.rs:70:47 | LL | std::rc::Rc::new(&mut Box::new(&1_usize)).method3(); | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&usize>>` -error[E0599]: no method named `method3` found for type `no_method_suggested_traits::Foo` in the current scope +error[E0599]: no method named `method3` found for struct `no_method_suggested_traits::Foo` in the current scope --> $DIR/no-method-suggested-traits.rs:71:37 | LL | no_method_suggested_traits::Foo.method3(); | ^^^^^^^ method not found in `no_method_suggested_traits::Foo` -error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope +error[E0599]: no method named `method3` found for struct `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:72:71 | LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method3(); | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` -error[E0599]: no method named `method3` found for type `no_method_suggested_traits::Bar` in the current scope +error[E0599]: no method named `method3` found for enum `no_method_suggested_traits::Bar` in the current scope --> $DIR/no-method-suggested-traits.rs:74:40 | LL | no_method_suggested_traits::Bar::X.method3(); | ^^^^^^^ method not found in `no_method_suggested_traits::Bar` -error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope +error[E0599]: no method named `method3` found for struct `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope --> $DIR/no-method-suggested-traits.rs:75:74 | LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3(); diff --git a/src/test/ui/infinite/infinite-autoderef.stderr b/src/test/ui/infinite/infinite-autoderef.stderr index f4567554d0d..8c59fbd5301 100644 --- a/src/test/ui/infinite/infinite-autoderef.stderr +++ b/src/test/ui/infinite/infinite-autoderef.stderr @@ -37,7 +37,7 @@ LL | Foo.bar(); | = help: consider adding a `#![recursion_limit="256"]` attribute to your crate -error[E0599]: no method named `bar` found for type `Foo` in the current scope +error[E0599]: no method named `bar` found for struct `Foo` in the current scope --> $DIR/infinite-autoderef.rs:26:9 | LL | struct Foo; diff --git a/src/test/ui/issues/issue-10465.stderr b/src/test/ui/issues/issue-10465.stderr index 80ca051ceff..666fb6ab2bb 100644 --- a/src/test/ui/issues/issue-10465.stderr +++ b/src/test/ui/issues/issue-10465.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `foo` found for type `&b::B` in the current scope +error[E0599]: no method named `foo` found for reference `&b::B` in the current scope --> $DIR/issue-10465.rs:17:15 | LL | b.foo(); diff --git a/src/test/ui/issues/issue-13853.stderr b/src/test/ui/issues/issue-13853.stderr index cdb261a238e..2f31636f8ad 100644 --- a/src/test/ui/issues/issue-13853.stderr +++ b/src/test/ui/issues/issue-13853.stderr @@ -12,7 +12,7 @@ LL | self.iter() = 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 -error[E0599]: no method named `iter` found for type `&G` in the current scope +error[E0599]: no method named `iter` found for reference `&G` in the current scope --> $DIR/issue-13853.rs:27:23 | LL | for node in graph.iter() { diff --git a/src/test/ui/issues/issue-19521.stderr b/src/test/ui/issues/issue-19521.stderr index c15c5392fac..b6847cd755c 100644 --- a/src/test/ui/issues/issue-19521.stderr +++ b/src/test/ui/issues/issue-19521.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `homura` found for type `&'static str` in the current scope +error[E0599]: no method named `homura` found for reference `&'static str` in the current scope --> $DIR/issue-19521.rs:2:8 | LL | "".homura()(); diff --git a/src/test/ui/issues/issue-19692.stderr b/src/test/ui/issues/issue-19692.stderr index fe920c16939..b412d7bc704 100644 --- a/src/test/ui/issues/issue-19692.stderr +++ b/src/test/ui/issues/issue-19692.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `kaname` found for type `Homura` in the current scope +error[E0599]: no method named `kaname` found for struct `Homura` in the current scope --> $DIR/issue-19692.rs:4:40 | LL | struct Homura; diff --git a/src/test/ui/issues/issue-21596.stderr b/src/test/ui/issues/issue-21596.stderr index 4e5cace5257..efde16167b7 100644 --- a/src/test/ui/issues/issue-21596.stderr +++ b/src/test/ui/issues/issue-21596.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `to_string` found for type `*const u8` in the current scope +error[E0599]: no method named `to_string` found for raw pointer `*const u8` in the current scope --> $DIR/issue-21596.rs:4:22 | LL | println!("{}", z.to_string()); diff --git a/src/test/ui/issues/issue-22933-2.rs b/src/test/ui/issues/issue-22933-2.rs index 98a354b1bd0..dfd84b9a79d 100644 --- a/src/test/ui/issues/issue-22933-2.rs +++ b/src/test/ui/issues/issue-22933-2.rs @@ -2,7 +2,7 @@ enum Delicious { Pie = 0x1, Apple = 0x2, ApplePie = Delicious::Apple as isize | Delicious::PIE as isize, - //~^ ERROR no variant or associated item named `PIE` found for type `Delicious` + //~^ ERROR no variant or associated item named `PIE` found } fn main() {} diff --git a/src/test/ui/issues/issue-22933-2.stderr b/src/test/ui/issues/issue-22933-2.stderr index 72038ea20a3..584b05ec44d 100644 --- a/src/test/ui/issues/issue-22933-2.stderr +++ b/src/test/ui/issues/issue-22933-2.stderr @@ -1,4 +1,4 @@ -error[E0599]: no variant or associated item named `PIE` found for type `Delicious` in the current scope +error[E0599]: no variant or associated item named `PIE` found for enum `Delicious` in the current scope --> $DIR/issue-22933-2.rs:4:55 | LL | enum Delicious { diff --git a/src/test/ui/issues/issue-22933-3.rs b/src/test/ui/issues/issue-22933-3.rs index 8518ed34aee..fbcce4b8344 100644 --- a/src/test/ui/issues/issue-22933-3.rs +++ b/src/test/ui/issues/issue-22933-3.rs @@ -1,4 +1,4 @@ const FOO: [u32; u8::MIN as usize] = []; -//~^ ERROR no associated item named `MIN` found for type `u8` +//~^ ERROR no associated item named `MIN` found fn main() {} diff --git a/src/test/ui/issues/issue-23173.rs b/src/test/ui/issues/issue-23173.rs index 7c15598448d..92f4c546440 100644 --- a/src/test/ui/issues/issue-23173.rs +++ b/src/test/ui/issues/issue-23173.rs @@ -7,7 +7,7 @@ fn use_token(token: &Token) { unimplemented!() } fn main() { use_token(&Token::Homura); //~ ERROR no variant or associated item named `Homura` - Struct::method(); //~ ERROR no function or associated item named `method` found for type - Struct::method; //~ ERROR no function or associated item named `method` found for type - Struct::Assoc; //~ ERROR no associated item named `Assoc` found for type `Struct` in + Struct::method(); //~ ERROR no function or associated item named `method` found + Struct::method; //~ ERROR no function or associated item named `method` found + Struct::Assoc; //~ ERROR no associated item named `Assoc` found } diff --git a/src/test/ui/issues/issue-23173.stderr b/src/test/ui/issues/issue-23173.stderr index 699e41156fa..89f70fda786 100644 --- a/src/test/ui/issues/issue-23173.stderr +++ b/src/test/ui/issues/issue-23173.stderr @@ -1,4 +1,4 @@ -error[E0599]: no variant or associated item named `Homura` found for type `Token` in the current scope +error[E0599]: no variant or associated item named `Homura` found for enum `Token` in the current scope --> $DIR/issue-23173.rs:9:23 | LL | enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ } @@ -7,7 +7,7 @@ LL | enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ } LL | use_token(&Token::Homura); | ^^^^^^ variant or associated item not found in `Token` -error[E0599]: no function or associated item named `method` found for type `Struct` in the current scope +error[E0599]: no function or associated item named `method` found for struct `Struct` in the current scope --> $DIR/issue-23173.rs:10:13 | LL | struct Struct { @@ -16,7 +16,7 @@ LL | struct Struct { LL | Struct::method(); | ^^^^^^ function or associated item not found in `Struct` -error[E0599]: no function or associated item named `method` found for type `Struct` in the current scope +error[E0599]: no function or associated item named `method` found for struct `Struct` in the current scope --> $DIR/issue-23173.rs:11:13 | LL | struct Struct { @@ -25,7 +25,7 @@ LL | struct Struct { LL | Struct::method; | ^^^^^^ function or associated item not found in `Struct` -error[E0599]: no associated item named `Assoc` found for type `Struct` in the current scope +error[E0599]: no associated item named `Assoc` found for struct `Struct` in the current scope --> $DIR/issue-23173.rs:12:13 | LL | struct Struct { diff --git a/src/test/ui/issues/issue-23217.rs b/src/test/ui/issues/issue-23217.rs index 157f20d22d8..09f9ebccf25 100644 --- a/src/test/ui/issues/issue-23217.rs +++ b/src/test/ui/issues/issue-23217.rs @@ -1,5 +1,5 @@ pub enum SomeEnum { - B = SomeEnum::A, //~ ERROR no variant or associated item named `A` found for type `SomeEnum` + B = SomeEnum::A, //~ ERROR no variant or associated item named `A` found } fn main() {} diff --git a/src/test/ui/issues/issue-23217.stderr b/src/test/ui/issues/issue-23217.stderr index 97100ed3753..a81b459a34c 100644 --- a/src/test/ui/issues/issue-23217.stderr +++ b/src/test/ui/issues/issue-23217.stderr @@ -1,4 +1,4 @@ -error[E0599]: no variant or associated item named `A` found for type `SomeEnum` in the current scope +error[E0599]: no variant or associated item named `A` found for enum `SomeEnum` in the current scope --> $DIR/issue-23217.rs:2:19 | LL | pub enum SomeEnum { diff --git a/src/test/ui/issues/issue-25385.rs b/src/test/ui/issues/issue-25385.rs index adad6c35a3f..ea042a6c76b 100644 --- a/src/test/ui/issues/issue-25385.rs +++ b/src/test/ui/issues/issue-25385.rs @@ -1,6 +1,6 @@ macro_rules! foo { ($e:expr) => { $e.foo() } - //~^ ERROR no method named `foo` found for type `i32` in the current scope + //~^ ERROR no method named `foo` found } fn main() { @@ -8,5 +8,5 @@ fn main() { foo!(a); foo!(1i32.foo()); - //~^ ERROR no method named `foo` found for type `i32` in the current scope + //~^ ERROR no method named `foo` found } diff --git a/src/test/ui/issues/issue-2823.stderr b/src/test/ui/issues/issue-2823.stderr index c9ede030034..aa720fd4589 100644 --- a/src/test/ui/issues/issue-2823.stderr +++ b/src/test/ui/issues/issue-2823.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `clone` found for type `C` in the current scope +error[E0599]: no method named `clone` found for struct `C` in the current scope --> $DIR/issue-2823.rs:13:16 | LL | struct C { diff --git a/src/test/ui/issues/issue-28344.stderr b/src/test/ui/issues/issue-28344.stderr index e315317c98a..77bc8292094 100644 --- a/src/test/ui/issues/issue-28344.stderr +++ b/src/test/ui/issues/issue-28344.stderr @@ -4,7 +4,7 @@ error[E0191]: the value of the associated type `Output` (from trait `std::ops::B LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8); | ^^^^^^ help: specify the associated type: `BitXor` -error[E0599]: no function or associated item named `bitor` found for type `dyn std::ops::BitXor<_>` in the current scope +error[E0599]: no function or associated item named `bitor` found for trait object `dyn std::ops::BitXor<_>` in the current scope --> $DIR/issue-28344.rs:4:25 | LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8); @@ -19,7 +19,7 @@ error[E0191]: the value of the associated type `Output` (from trait `std::ops::B LL | let g = BitXor::bitor; | ^^^^^^ help: specify the associated type: `BitXor` -error[E0599]: no function or associated item named `bitor` found for type `dyn std::ops::BitXor<_>` in the current scope +error[E0599]: no function or associated item named `bitor` found for trait object `dyn std::ops::BitXor<_>` in the current scope --> $DIR/issue-28344.rs:8:21 | LL | let g = BitXor::bitor; diff --git a/src/test/ui/issues/issue-28586.rs b/src/test/ui/issues/issue-28586.rs index 4d286be1e33..c543ef9b0e3 100644 --- a/src/test/ui/issues/issue-28586.rs +++ b/src/test/ui/issues/issue-28586.rs @@ -2,6 +2,6 @@ pub trait Foo {} impl Foo for [u8; usize::BYTES] {} -//~^ ERROR no associated item named `BYTES` found for type `usize` +//~^ ERROR no associated item named `BYTES` found fn main() { } diff --git a/src/test/ui/issues/issue-28971.rs b/src/test/ui/issues/issue-28971.rs index 6493565d216..f0a1e2d0061 100644 --- a/src/test/ui/issues/issue-28971.rs +++ b/src/test/ui/issues/issue-28971.rs @@ -5,7 +5,7 @@ fn main(){ foo(|| { match Foo::Bar(1) { Foo::Baz(..) => (), - //~^ ERROR no variant or associated item named `Baz` found for type `Foo` + //~^ ERROR no variant or associated item named `Baz` found _ => (), } }); diff --git a/src/test/ui/issues/issue-28971.stderr b/src/test/ui/issues/issue-28971.stderr index 7411896443d..2736ee881d5 100644 --- a/src/test/ui/issues/issue-28971.stderr +++ b/src/test/ui/issues/issue-28971.stderr @@ -1,4 +1,4 @@ -error[E0599]: no variant or associated item named `Baz` found for type `Foo` in the current scope +error[E0599]: no variant or associated item named `Baz` found for enum `Foo` in the current scope --> $DIR/issue-28971.rs:7:18 | LL | enum Foo { diff --git a/src/test/ui/issues/issue-29124.rs b/src/test/ui/issues/issue-29124.rs index 1cd3f84f7a2..dd278484175 100644 --- a/src/test/ui/issues/issue-29124.rs +++ b/src/test/ui/issues/issue-29124.rs @@ -13,7 +13,7 @@ fn func() -> Ret { fn main() { Obj::func.x(); - //~^ ERROR no method named `x` found for type `fn() -> Ret {Obj::func}` in the current scope + //~^ ERROR no method named `x` found func.x(); - //~^ ERROR no method named `x` found for type `fn() -> Ret {func}` in the current scope + //~^ ERROR no method named `x` found } diff --git a/src/test/ui/issues/issue-29124.stderr b/src/test/ui/issues/issue-29124.stderr index c537c6118f3..fff20248b70 100644 --- a/src/test/ui/issues/issue-29124.stderr +++ b/src/test/ui/issues/issue-29124.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `x` found for type `fn() -> Ret {Obj::func}` in the current scope +error[E0599]: no method named `x` found for fn item `fn() -> Ret {Obj::func}` in the current scope --> $DIR/issue-29124.rs:15:15 | LL | Obj::func.x(); @@ -6,7 +6,7 @@ LL | Obj::func.x(); | = note: Obj::func is a function, perhaps you wish to call it -error[E0599]: no method named `x` found for type `fn() -> Ret {func}` in the current scope +error[E0599]: no method named `x` found for fn item `fn() -> Ret {func}` in the current scope --> $DIR/issue-29124.rs:17:10 | LL | func.x(); diff --git a/src/test/ui/issues/issue-30123.rs b/src/test/ui/issues/issue-30123.rs index 4fc32e0de8d..705355d91bf 100644 --- a/src/test/ui/issues/issue-30123.rs +++ b/src/test/ui/issues/issue-30123.rs @@ -5,5 +5,5 @@ fn main() { let ug = Graph::::new_undirected(); - //~^ ERROR no function or associated item named `new_undirected` found for type + //~^ ERROR no function or associated item named `new_undirected` found } diff --git a/src/test/ui/issues/issue-30123.stderr b/src/test/ui/issues/issue-30123.stderr index 32bbd4d03d6..bc6731601f0 100644 --- a/src/test/ui/issues/issue-30123.stderr +++ b/src/test/ui/issues/issue-30123.stderr @@ -1,4 +1,4 @@ -error[E0599]: no function or associated item named `new_undirected` found for type `issue_30123_aux::Graph` in the current scope +error[E0599]: no function or associated item named `new_undirected` found for struct `issue_30123_aux::Graph` in the current scope --> $DIR/issue-30123.rs:7:33 | LL | let ug = Graph::::new_undirected(); diff --git a/src/test/ui/issues/issue-31173.stderr b/src/test/ui/issues/issue-31173.stderr index 38cf3c4f930..a614b96ac14 100644 --- a/src/test/ui/issues/issue-31173.stderr +++ b/src/test/ui/issues/issue-31173.stderr @@ -7,7 +7,7 @@ LL | .cloned() = note: expected type `u8` found reference `&_` -error[E0599]: no method named `collect` found for type `std::iter::Cloned, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>` in the current scope +error[E0599]: no method named `collect` found for struct `std::iter::Cloned, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>` in the current scope --> $DIR/issue-31173.rs:14:10 | LL | .collect(); diff --git a/src/test/ui/issues/issue-33575.rs b/src/test/ui/issues/issue-33575.rs index 09c499452ad..de544afae73 100644 --- a/src/test/ui/issues/issue-33575.rs +++ b/src/test/ui/issues/issue-33575.rs @@ -1,4 +1,4 @@ fn main() { - let baz = ().foo(); //~ ERROR no method named `foo` found for type `()` in the current scope + let baz = ().foo(); //~ ERROR no method named `foo` found ::from_str(&baz); // No complaints about `str` being unsized } diff --git a/src/test/ui/issues/issue-33575.stderr b/src/test/ui/issues/issue-33575.stderr index e6b74d262c3..bbd8042d1cd 100644 --- a/src/test/ui/issues/issue-33575.stderr +++ b/src/test/ui/issues/issue-33575.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `foo` found for type `()` in the current scope +error[E0599]: no method named `foo` found for unit type `()` in the current scope --> $DIR/issue-33575.rs:2:18 | LL | let baz = ().foo(); diff --git a/src/test/ui/issues/issue-34209.rs b/src/test/ui/issues/issue-34209.rs index fc2c3679e13..632ddb91b36 100644 --- a/src/test/ui/issues/issue-34209.rs +++ b/src/test/ui/issues/issue-34209.rs @@ -4,7 +4,7 @@ enum S { fn bug(l: S) { match l { - S::B {} => {}, //~ ERROR no variant `B` in enum `S` + S::B {} => {}, //~ ERROR no variant named `B` found for enum `S` } } diff --git a/src/test/ui/issues/issue-34209.stderr b/src/test/ui/issues/issue-34209.stderr index 194bb2bfab8..f9a25b69ff6 100644 --- a/src/test/ui/issues/issue-34209.stderr +++ b/src/test/ui/issues/issue-34209.stderr @@ -1,4 +1,4 @@ -error: no variant `B` in enum `S` +error[E0599]: no variant named `B` found for enum `S` --> $DIR/issue-34209.rs:7:12 | LL | enum S { @@ -9,3 +9,4 @@ LL | S::B {} => {}, error: aborting due to previous error +For more information about this error, try `rustc --explain E0599`. diff --git a/src/test/ui/issues/issue-34334.rs b/src/test/ui/issues/issue-34334.rs index e34b5c9a0f4..afe4d42edd8 100644 --- a/src/test/ui/issues/issue-34334.rs +++ b/src/test/ui/issues/issue-34334.rs @@ -7,5 +7,5 @@ fn main () { //~| ERROR expected expression, found reserved identifier `_` //~| ERROR expected expression, found reserved identifier `_` let sr2: Vec<(u32, _, _)> = sr.iter().map(|(faction, th_sender, th_receiver)| {}).collect(); - //~^ ERROR no method named `iter` found for type `()` in the current scope + //~^ ERROR no method named `iter` found } diff --git a/src/test/ui/issues/issue-34334.stderr b/src/test/ui/issues/issue-34334.stderr index 3055e316a08..c52ea4ef9da 100644 --- a/src/test/ui/issues/issue-34334.stderr +++ b/src/test/ui/issues/issue-34334.stderr @@ -43,7 +43,7 @@ LL | let sr: Vec<(u32, _, _) = vec![]; | | | cannot assign to this expression -error[E0599]: no method named `iter` found for type `()` in the current scope +error[E0599]: no method named `iter` found for unit type `()` in the current scope --> $DIR/issue-34334.rs:9:36 | LL | let sr2: Vec<(u32, _, _)> = sr.iter().map(|(faction, th_sender, th_receiver)| {}).collect(); diff --git a/src/test/ui/issues/issue-35677.stderr b/src/test/ui/issues/issue-35677.stderr index b381203856e..a998f95d306 100644 --- a/src/test/ui/issues/issue-35677.stderr +++ b/src/test/ui/issues/issue-35677.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `is_subset` found for type `&std::collections::HashSet` in the current scope +error[E0599]: no method named `is_subset` found for reference `&std::collections::HashSet` in the current scope --> $DIR/issue-35677.rs:4:10 | LL | this.is_subset(other) diff --git a/src/test/ui/issues/issue-3707.rs b/src/test/ui/issues/issue-3707.rs index 844a2dc0069..0817c51ee4e 100644 --- a/src/test/ui/issues/issue-3707.rs +++ b/src/test/ui/issues/issue-3707.rs @@ -7,7 +7,7 @@ pub fn boom() -> bool { return 1+1 == 2 } pub fn chirp(&self) { - self.boom(); //~ ERROR no method named `boom` found for type `&Obj` in the current scope + self.boom(); //~ ERROR no method named `boom` found } } diff --git a/src/test/ui/issues/issue-3707.stderr b/src/test/ui/issues/issue-3707.stderr index b98bc572a39..6ca2deee377 100644 --- a/src/test/ui/issues/issue-3707.stderr +++ b/src/test/ui/issues/issue-3707.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `boom` found for type `&Obj` in the current scope +error[E0599]: no method named `boom` found for reference `&Obj` in the current scope --> $DIR/issue-3707.rs:10:14 | LL | self.boom(); diff --git a/src/test/ui/issues/issue-38919.rs b/src/test/ui/issues/issue-38919.rs index 60a8793b4e6..3d28f1936b4 100644 --- a/src/test/ui/issues/issue-38919.rs +++ b/src/test/ui/issues/issue-38919.rs @@ -1,5 +1,5 @@ fn foo() { - T::Item; //~ ERROR no associated item named `Item` found for type `T` in the current scope + T::Item; //~ ERROR no associated item named `Item` found } fn main() { } diff --git a/src/test/ui/issues/issue-38919.stderr b/src/test/ui/issues/issue-38919.stderr index 603d42ca35e..0022065a32c 100644 --- a/src/test/ui/issues/issue-38919.stderr +++ b/src/test/ui/issues/issue-38919.stderr @@ -1,4 +1,4 @@ -error[E0599]: no associated item named `Item` found for type `T` in the current scope +error[E0599]: no associated item named `Item` found for type parameter `T` in the current scope --> $DIR/issue-38919.rs:2:8 | LL | T::Item; diff --git a/src/test/ui/issues/issue-39175.stderr b/src/test/ui/issues/issue-39175.stderr index 8b173e1b50c..2f6e676538e 100644 --- a/src/test/ui/issues/issue-39175.stderr +++ b/src/test/ui/issues/issue-39175.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `exec` found for type `&mut std::process::Command` in the current scope +error[E0599]: no method named `exec` found for mutable reference `&mut std::process::Command` in the current scope --> $DIR/issue-39175.rs:15:39 | LL | Command::new("echo").arg("hello").exec(); diff --git a/src/test/ui/issues/issue-39559.rs b/src/test/ui/issues/issue-39559.rs index 5af48ca4c0d..3a75956af52 100644 --- a/src/test/ui/issues/issue-39559.rs +++ b/src/test/ui/issues/issue-39559.rs @@ -12,7 +12,7 @@ fn dim() -> usize { pub struct Vector { entries: [T; D::dim()], - //~^ ERROR no function or associated item named `dim` found for type `D` in the current scope + //~^ ERROR no function or associated item named `dim` found _dummy: D, } diff --git a/src/test/ui/issues/issue-39559.stderr b/src/test/ui/issues/issue-39559.stderr index b945b5e6654..0554b232c24 100644 --- a/src/test/ui/issues/issue-39559.stderr +++ b/src/test/ui/issues/issue-39559.stderr @@ -1,4 +1,4 @@ -error[E0599]: no function or associated item named `dim` found for type `D` in the current scope +error[E0599]: no function or associated item named `dim` found for type parameter `D` in the current scope --> $DIR/issue-39559.rs:14:21 | LL | entries: [T; D::dim()], diff --git a/src/test/ui/issues/issue-3973.rs b/src/test/ui/issues/issue-3973.rs index 4e00915683a..a5ed5b87051 100644 --- a/src/test/ui/issues/issue-3973.rs +++ b/src/test/ui/issues/issue-3973.rs @@ -20,6 +20,6 @@ fn to_string(&self) -> String { fn main() { let p = Point::new(0.0, 0.0); - //~^ ERROR no function or associated item named `new` found for type `Point` + //~^ ERROR no function or associated item named `new` found for struct `Point` println!("{}", p.to_string()); } diff --git a/src/test/ui/issues/issue-3973.stderr b/src/test/ui/issues/issue-3973.stderr index ee07a410a9c..63282e8d86d 100644 --- a/src/test/ui/issues/issue-3973.stderr +++ b/src/test/ui/issues/issue-3973.stderr @@ -7,7 +7,7 @@ LL | | Point { x: x, y: y } LL | | } | |_____^ not a member of trait `ToString_` -error[E0599]: no function or associated item named `new` found for type `Point` in the current scope +error[E0599]: no function or associated item named `new` found for struct `Point` in the current scope --> $DIR/issue-3973.rs:22:20 | LL | struct Point { diff --git a/src/test/ui/issues/issue-41880.rs b/src/test/ui/issues/issue-41880.rs index 16facc5a78f..10cde21abd7 100644 --- a/src/test/ui/issues/issue-41880.rs +++ b/src/test/ui/issues/issue-41880.rs @@ -25,5 +25,5 @@ fn size_hint(&self) -> (usize, Option) { (std::usize::MAX, None) } fn main() { let a = iterate(0, |x| x+1); println!("{:?}", a.iter().take(10).collect::>()); - //~^ ERROR no method named `iter` found for type `Iterate<{integer} + //~^ ERROR no method named `iter` found } diff --git a/src/test/ui/issues/issue-41880.stderr b/src/test/ui/issues/issue-41880.stderr index 0e1d55c339e..09d5594f73f 100644 --- a/src/test/ui/issues/issue-41880.stderr +++ b/src/test/ui/issues/issue-41880.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `iter` found for type `Iterate<{integer}, [closure@$DIR/issue-41880.rs:26:24: 26:31]>` in the current scope +error[E0599]: no method named `iter` found for struct `Iterate<{integer}, [closure@$DIR/issue-41880.rs:26:24: 26:31]>` in the current scope --> $DIR/issue-41880.rs:27:24 | LL | pub struct Iterate { diff --git a/src/test/ui/issues/issue-42880.stderr b/src/test/ui/issues/issue-42880.stderr index 763bb9ae0ea..82cdc20df2f 100644 --- a/src/test/ui/issues/issue-42880.stderr +++ b/src/test/ui/issues/issue-42880.stderr @@ -1,4 +1,4 @@ -error[E0599]: no associated item named `String` found for type `std::string::String` in the current scope +error[E0599]: no associated item named `String` found for struct `std::string::String` in the current scope --> $DIR/issue-42880.rs:4:22 | LL | let f = |&Value::String(_)| (); diff --git a/src/test/ui/issues/issue-43189.rs b/src/test/ui/issues/issue-43189.rs index f4f4dce7682..ce667a5006e 100644 --- a/src/test/ui/issues/issue-43189.rs +++ b/src/test/ui/issues/issue-43189.rs @@ -8,5 +8,5 @@ extern crate xcrate_issue_43189_b; fn main() { ().a(); - //~^ ERROR no method named `a` found for type `()` in the current scope [E0599] + //~^ ERROR no method named `a` found } diff --git a/src/test/ui/issues/issue-43189.stderr b/src/test/ui/issues/issue-43189.stderr index 4dae6c1cd15..3f63cb8e78f 100644 --- a/src/test/ui/issues/issue-43189.stderr +++ b/src/test/ui/issues/issue-43189.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `a` found for type `()` in the current scope +error[E0599]: no method named `a` found for unit type `()` in the current scope --> $DIR/issue-43189.rs:10:8 | LL | ().a(); diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.rs b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.rs index 24c61425b8e..5b6b8f8de18 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.rs +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.rs @@ -1,4 +1,4 @@ fn main() { let _result = &Some(42).as_deref(); -//~^ ERROR no method named `as_deref` found for type `std::option::Option<{integer}>` +//~^ ERROR no method named `as_deref` found for enum `std::option::Option<{integer}>` } diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr index 0eb7bf02475..f91f6e891ed 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `as_deref` found for type `std::option::Option<{integer}>` in the current scope +error[E0599]: no method named `as_deref` found for enum `std::option::Option<{integer}>` in the current scope --> $DIR/option-as_deref.rs:2:29 | LL | let _result = &Some(42).as_deref(); diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.rs b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.rs index 67ad73f5847..c5fe6ea82cb 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.rs +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.rs @@ -1,4 +1,4 @@ fn main() { let _result = &mut Some(42).as_deref_mut(); -//~^ ERROR no method named `as_deref_mut` found for type `std::option::Option<{integer}>` +//~^ ERROR no method named `as_deref_mut` found for enum `std::option::Option<{integer}>` } diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr index 845ddb52319..583236345ca 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `as_deref_mut` found for type `std::option::Option<{integer}>` in the current scope +error[E0599]: no method named `as_deref_mut` found for enum `std::option::Option<{integer}>` in the current scope --> $DIR/option-as_deref_mut.rs:2:33 | LL | let _result = &mut Some(42).as_deref_mut(); diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr index 5e016748770..fae11fe62b1 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `as_deref` found for type `std::result::Result<{integer}, _>` in the current scope +error[E0599]: no method named `as_deref` found for enum `std::result::Result<{integer}, _>` in the current scope --> $DIR/result-as_deref.rs:4:27 | LL | let _result = &Ok(42).as_deref(); diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_err.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_err.stderr index 6dc13da548b..48a662e98b5 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_err.stderr +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_err.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `as_deref_err` found for type `std::result::Result<_, {integer}>` in the current scope +error[E0599]: no method named `as_deref_err` found for enum `std::result::Result<_, {integer}>` in the current scope --> $DIR/result-as_deref_err.rs:4:28 | LL | let _result = &Err(41).as_deref_err(); diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr index f21e97388b6..2c6231fb3b5 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `as_deref_mut` found for type `std::result::Result<{integer}, _>` in the current scope +error[E0599]: no method named `as_deref_mut` found for enum `std::result::Result<{integer}, _>` in the current scope --> $DIR/result-as_deref_mut.rs:4:31 | LL | let _result = &mut Ok(42).as_deref_mut(); diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut_err.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut_err.stderr index 44c0c954eee..8a5c2f40060 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut_err.stderr +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut_err.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `as_deref_mut_err` found for type `std::result::Result<_, {integer}>` in the current scope +error[E0599]: no method named `as_deref_mut_err` found for enum `std::result::Result<_, {integer}>` in the current scope --> $DIR/result-as_deref_mut_err.rs:4:32 | LL | let _result = &mut Err(41).as_deref_mut_err(); diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut_ok.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut_ok.stderr index b8369c9b82e..af8d657999c 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut_ok.stderr +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut_ok.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `as_deref_mut_ok` found for type `std::result::Result<{integer}, _>` in the current scope +error[E0599]: no method named `as_deref_mut_ok` found for enum `std::result::Result<{integer}, _>` in the current scope --> $DIR/result-as_deref_mut_ok.rs:4:31 | LL | let _result = &mut Ok(42).as_deref_mut_ok(); diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_ok.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_ok.stderr index b26705a99e3..145e610d52c 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_ok.stderr +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_ok.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `as_deref_ok` found for type `std::result::Result<{integer}, _>` in the current scope +error[E0599]: no method named `as_deref_ok` found for enum `std::result::Result<{integer}, _>` in the current scope --> $DIR/result-as_deref_ok.rs:4:27 | LL | let _result = &Ok(42).as_deref_ok(); diff --git a/src/test/ui/issues/issue-5153.rs b/src/test/ui/issues/issue-5153.rs index e6737662088..5bf0579030a 100644 --- a/src/test/ui/issues/issue-5153.rs +++ b/src/test/ui/issues/issue-5153.rs @@ -8,5 +8,5 @@ fn foo(self: Box) { } fn main() { (&5isize as &dyn Foo).foo(); - //~^ ERROR: no method named `foo` found for type `&dyn Foo` in the current scope + //~^ ERROR: no method named `foo` found for reference `&dyn Foo` in the current scope } diff --git a/src/test/ui/issues/issue-5153.stderr b/src/test/ui/issues/issue-5153.stderr index 5034e6d538e..4680c8b131c 100644 --- a/src/test/ui/issues/issue-5153.stderr +++ b/src/test/ui/issues/issue-5153.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `foo` found for type `&dyn Foo` in the current scope +error[E0599]: no method named `foo` found for reference `&dyn Foo` in the current scope --> $DIR/issue-5153.rs:10:27 | LL | (&5isize as &dyn Foo).foo(); diff --git a/src/test/ui/issues/issue-54062.stderr b/src/test/ui/issues/issue-54062.stderr index 3830ad4b1e3..5222e3ee95d 100644 --- a/src/test/ui/issues/issue-54062.stderr +++ b/src/test/ui/issues/issue-54062.stderr @@ -4,7 +4,7 @@ error[E0616]: field `inner` of struct `std::sync::Mutex` is private LL | let _ = test.comps.inner.lock().unwrap(); | ^^^^^^^^^^^^^^^^ -error[E0599]: no method named `unwrap` found for type `std::sys_common::mutex::MutexGuard<'_>` in the current scope +error[E0599]: no method named `unwrap` found for struct `std::sys_common::mutex::MutexGuard<'_>` in the current scope --> $DIR/issue-54062.rs:10:37 | LL | let _ = test.comps.inner.lock().unwrap(); diff --git a/src/test/ui/issues/issue-57362-1.stderr b/src/test/ui/issues/issue-57362-1.stderr index c4000c8a9d4..e762b7bc0c8 100644 --- a/src/test/ui/issues/issue-57362-1.stderr +++ b/src/test/ui/issues/issue-57362-1.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `f` found for type `fn(&u8)` in the current scope +error[E0599]: no method named `f` found for fn pointer `fn(&u8)` in the current scope --> $DIR/issue-57362-1.rs:20:7 | LL | a.f(); diff --git a/src/test/ui/issues/issue-57362-2.stderr b/src/test/ui/issues/issue-57362-2.stderr index 2e713cc0ab5..3528084f6ce 100644 --- a/src/test/ui/issues/issue-57362-2.stderr +++ b/src/test/ui/issues/issue-57362-2.stderr @@ -1,4 +1,4 @@ -error[E0599]: no function or associated item named `make_g` found for type `for<'r> fn(&'r ())` in the current scope +error[E0599]: no function or associated item named `make_g` found for fn pointer `for<'r> fn(&'r ())` in the current scope --> $DIR/issue-57362-2.rs:22:25 | LL | let x = ::make_g(); diff --git a/src/test/ui/issues/issue-58734.rs b/src/test/ui/issues/issue-58734.rs index bbdfebe1577..b253c135b8c 100644 --- a/src/test/ui/issues/issue-58734.rs +++ b/src/test/ui/issues/issue-58734.rs @@ -18,5 +18,5 @@ fn main() { Trait::exists(()); // no object safety error Trait::nonexistent(()); - //~^ ERROR no function or associated item named `nonexistent` found for type `dyn Trait` + //~^ ERROR no function or associated item named `nonexistent` found } diff --git a/src/test/ui/issues/issue-58734.stderr b/src/test/ui/issues/issue-58734.stderr index 07f2a046b2d..5e98cfadf8a 100644 --- a/src/test/ui/issues/issue-58734.stderr +++ b/src/test/ui/issues/issue-58734.stderr @@ -1,4 +1,4 @@ -error[E0599]: no function or associated item named `nonexistent` found for type `dyn Trait` in the current scope +error[E0599]: no function or associated item named `nonexistent` found for trait object `dyn Trait` in the current scope --> $DIR/issue-58734.rs:20:12 | LL | Trait::nonexistent(()); diff --git a/src/test/ui/issues/issue-64430.stderr b/src/test/ui/issues/issue-64430.stderr index f1b2de8d8b3..e7a244e9df5 100644 --- a/src/test/ui/issues/issue-64430.stderr +++ b/src/test/ui/issues/issue-64430.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `bar` found for type `Foo` in the current scope +error[E0599]: no method named `bar` found for struct `Foo` in the current scope --> $DIR/issue-64430.rs:7:9 | LL | pub struct Foo; diff --git a/src/test/ui/issues/issue-65284-suggest-generic-trait-bound.rs b/src/test/ui/issues/issue-65284-suggest-generic-trait-bound.rs index e0eaafdfc2f..018ce0459fd 100644 --- a/src/test/ui/issues/issue-65284-suggest-generic-trait-bound.rs +++ b/src/test/ui/issues/issue-65284-suggest-generic-trait-bound.rs @@ -5,7 +5,7 @@ trait Foo { trait Bar {} fn do_stuff(t : T) { - t.foo() //~ ERROR no method named `foo` found for type `T` in the current scope + t.foo() //~ ERROR no method named `foo` found } fn main() {} diff --git a/src/test/ui/issues/issue-65284-suggest-generic-trait-bound.stderr b/src/test/ui/issues/issue-65284-suggest-generic-trait-bound.stderr index 24bf60abf6a..4807a0930e7 100644 --- a/src/test/ui/issues/issue-65284-suggest-generic-trait-bound.stderr +++ b/src/test/ui/issues/issue-65284-suggest-generic-trait-bound.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `foo` found for type `T` in the current scope +error[E0599]: no method named `foo` found for type parameter `T` in the current scope --> $DIR/issue-65284-suggest-generic-trait-bound.rs:8:7 | LL | t.foo() diff --git a/src/test/ui/issues/issue-7950.rs b/src/test/ui/issues/issue-7950.rs index 7add8afee43..d3dcb3380bb 100644 --- a/src/test/ui/issues/issue-7950.rs +++ b/src/test/ui/issues/issue-7950.rs @@ -4,5 +4,5 @@ fn main() { Foo::bar(); - //~^ ERROR no function or associated item named `bar` found for type `Foo` + //~^ ERROR no function or associated item named `bar` found for struct `Foo` } diff --git a/src/test/ui/issues/issue-7950.stderr b/src/test/ui/issues/issue-7950.stderr index bbeab405e29..73e13c65cf3 100644 --- a/src/test/ui/issues/issue-7950.stderr +++ b/src/test/ui/issues/issue-7950.stderr @@ -1,4 +1,4 @@ -error[E0599]: no function or associated item named `bar` found for type `Foo` in the current scope +error[E0599]: no function or associated item named `bar` found for struct `Foo` in the current scope --> $DIR/issue-7950.rs:6:10 | LL | struct Foo; diff --git a/src/test/ui/lexical-scopes.stderr b/src/test/ui/lexical-scopes.stderr index a7843a93011..6bb0877e9b9 100644 --- a/src/test/ui/lexical-scopes.stderr +++ b/src/test/ui/lexical-scopes.stderr @@ -9,7 +9,7 @@ help: possible better candidate is found in another module, you can import it in LL | use T; | -error[E0599]: no function or associated item named `f` found for type `Foo` in the current scope +error[E0599]: no function or associated item named `f` found for type parameter `Foo` in the current scope --> $DIR/lexical-scopes.rs:10:10 | LL | Foo::f(); diff --git a/src/test/ui/methods/method-call-err-msg.rs b/src/test/ui/methods/method-call-err-msg.rs index e0dec0a4a70..5ff4b412667 100644 --- a/src/test/ui/methods/method-call-err-msg.rs +++ b/src/test/ui/methods/method-call-err-msg.rs @@ -15,6 +15,6 @@ fn main() { let y = Foo; y.zero() - .take() //~ ERROR no method named `take` found for type `Foo` in the current scope + .take() //~ ERROR no method named `take` found .one(0); } diff --git a/src/test/ui/methods/method-call-err-msg.stderr b/src/test/ui/methods/method-call-err-msg.stderr index 94c27b7d178..7efdd91708a 100644 --- a/src/test/ui/methods/method-call-err-msg.stderr +++ b/src/test/ui/methods/method-call-err-msg.stderr @@ -25,7 +25,7 @@ LL | fn two(self, _: isize, _: isize) -> Foo { self } LL | .two(0); | ^^^ expected 2 parameters -error[E0599]: no method named `take` found for type `Foo` in the current scope +error[E0599]: no method named `take` found for struct `Foo` in the current scope --> $DIR/method-call-err-msg.rs:18:7 | LL | pub struct Foo; diff --git a/src/test/ui/mismatched_types/issue-36053-2.stderr b/src/test/ui/mismatched_types/issue-36053-2.stderr index da018aa8948..f8d677b99d6 100644 --- a/src/test/ui/mismatched_types/issue-36053-2.stderr +++ b/src/test/ui/mismatched_types/issue-36053-2.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `count` found for type `std::iter::Filter>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>` in the current scope +error[E0599]: no method named `count` found for struct `std::iter::Filter>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>` in the current scope --> $DIR/issue-36053-2.rs:7:55 | LL | once::<&str>("str").fuse().filter(|a: &str| true).count(); diff --git a/src/test/ui/mismatched_types/method-help-unsatisfied-bound.rs b/src/test/ui/mismatched_types/method-help-unsatisfied-bound.rs index 83cea168465..58ceaffc964 100644 --- a/src/test/ui/mismatched_types/method-help-unsatisfied-bound.rs +++ b/src/test/ui/mismatched_types/method-help-unsatisfied-bound.rs @@ -3,5 +3,5 @@ fn main() { let a: Result<(), Foo> = Ok(()); a.unwrap(); - //~^ ERROR no method named `unwrap` found for type `std::result::Result<(), Foo>` + //~^ ERROR no method named `unwrap` found } diff --git a/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr b/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr index 865092e4e9c..bbfb0005056 100644 --- a/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr +++ b/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `unwrap` found for type `std::result::Result<(), Foo>` in the current scope +error[E0599]: no method named `unwrap` found for enum `std::result::Result<(), Foo>` in the current scope --> $DIR/method-help-unsatisfied-bound.rs:5:7 | LL | a.unwrap(); diff --git a/src/test/ui/never_type/issue-2149.rs b/src/test/ui/never_type/issue-2149.rs index d46f0e61793..d6426d2cfab 100644 --- a/src/test/ui/never_type/issue-2149.rs +++ b/src/test/ui/never_type/issue-2149.rs @@ -11,5 +11,5 @@ fn bind(&self, mut f: F) where F: FnMut(A) -> Vec { } fn main() { ["hi"].bind(|x| [x] ); - //~^ ERROR no method named `bind` found for type `[&str; 1]` in the current scope + //~^ ERROR no method named `bind` found } diff --git a/src/test/ui/never_type/issue-2149.stderr b/src/test/ui/never_type/issue-2149.stderr index 8ce2ba03332..9645244751d 100644 --- a/src/test/ui/never_type/issue-2149.stderr +++ b/src/test/ui/never_type/issue-2149.stderr @@ -6,7 +6,7 @@ LL | for elt in self { r = r + f(*elt); } | = help: the trait `std::ops::Add>` is not implemented for `()` -error[E0599]: no method named `bind` found for type `[&str; 1]` in the current scope +error[E0599]: no method named `bind` found for array `[&str; 1]` in the current scope --> $DIR/issue-2149.rs:13:12 | LL | ["hi"].bind(|x| [x] ); diff --git a/src/test/ui/non-copyable-void.stderr b/src/test/ui/non-copyable-void.stderr index b05c29c0d40..074ed66a261 100644 --- a/src/test/ui/non-copyable-void.stderr +++ b/src/test/ui/non-copyable-void.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `clone` found for type `libc::c_void` in the current scope +error[E0599]: no method named `clone` found for enum `libc::c_void` in the current scope --> $DIR/non-copyable-void.rs:11:23 | LL | let _z = (*y).clone(); diff --git a/src/test/ui/noncopyable-class.stderr b/src/test/ui/noncopyable-class.stderr index c1c50211381..6c3c4a6ac98 100644 --- a/src/test/ui/noncopyable-class.stderr +++ b/src/test/ui/noncopyable-class.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `clone` found for type `Foo` in the current scope +error[E0599]: no method named `clone` found for struct `Foo` in the current scope --> $DIR/noncopyable-class.rs:34:16 | LL | struct Foo { diff --git a/src/test/ui/object-pointer-types.stderr b/src/test/ui/object-pointer-types.stderr index 2df628ecf8e..855894b4495 100644 --- a/src/test/ui/object-pointer-types.stderr +++ b/src/test/ui/object-pointer-types.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `owned` found for type `&dyn Foo` in the current scope +error[E0599]: no method named `owned` found for reference `&dyn Foo` in the current scope --> $DIR/object-pointer-types.rs:11:7 | LL | x.owned(); @@ -8,7 +8,7 @@ LL | x.owned(); = note: the following trait defines an item `owned`, perhaps you need to implement it: candidate #1: `Foo` -error[E0599]: no method named `owned` found for type `&mut dyn Foo` in the current scope +error[E0599]: no method named `owned` found for mutable reference `&mut dyn Foo` in the current scope --> $DIR/object-pointer-types.rs:17:7 | LL | x.owned(); @@ -18,7 +18,7 @@ LL | x.owned(); = note: the following trait defines an item `owned`, perhaps you need to implement it: candidate #1: `Foo` -error[E0599]: no method named `managed` found for type `std::boxed::Box<(dyn Foo + 'static)>` in the current scope +error[E0599]: no method named `managed` found for struct `std::boxed::Box<(dyn Foo + 'static)>` in the current scope --> $DIR/object-pointer-types.rs:23:7 | LL | x.managed(); diff --git a/src/test/ui/self/point-at-arbitrary-self-type-method.stderr b/src/test/ui/self/point-at-arbitrary-self-type-method.stderr index dec5809f153..96401cb71d9 100644 --- a/src/test/ui/self/point-at-arbitrary-self-type-method.stderr +++ b/src/test/ui/self/point-at-arbitrary-self-type-method.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `foo` found for type `A` in the current scope +error[E0599]: no method named `foo` found for struct `A` in the current scope --> $DIR/point-at-arbitrary-self-type-method.rs:8:7 | LL | struct A; diff --git a/src/test/ui/self/point-at-arbitrary-self-type-trait-method.stderr b/src/test/ui/self/point-at-arbitrary-self-type-trait-method.stderr index e93c4da9dfc..28a7b68a682 100644 --- a/src/test/ui/self/point-at-arbitrary-self-type-trait-method.stderr +++ b/src/test/ui/self/point-at-arbitrary-self-type-trait-method.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `foo` found for type `A` in the current scope +error[E0599]: no method named `foo` found for struct `A` in the current scope --> $DIR/point-at-arbitrary-self-type-trait-method.rs:9:7 | LL | trait B { fn foo(self: Box); } diff --git a/src/test/ui/self/suggest-self-2.rs b/src/test/ui/self/suggest-self-2.rs index d6bf5433527..1e001827e47 100644 --- a/src/test/ui/self/suggest-self-2.rs +++ b/src/test/ui/self/suggest-self-2.rs @@ -18,7 +18,7 @@ fn foo(&self) { //~^ ERROR cannot find function `bar` in this scope self.bar(); - //~^ ERROR no method named `bar` found for type + //~^ ERROR no method named `bar` found for reference } } diff --git a/src/test/ui/self/suggest-self-2.stderr b/src/test/ui/self/suggest-self-2.stderr index 452c3127515..4bd025ea076 100644 --- a/src/test/ui/self/suggest-self-2.stderr +++ b/src/test/ui/self/suggest-self-2.stderr @@ -28,7 +28,7 @@ error[E0425]: cannot find function `bar` in this scope LL | bar(); | ^^^ not found in this scope -error[E0599]: no method named `bar` found for type `&Foo` in the current scope +error[E0599]: no method named `bar` found for reference `&Foo` in the current scope --> $DIR/suggest-self-2.rs:20:14 | LL | self.bar(); diff --git a/src/test/ui/shadowed/shadowed-trait-methods.stderr b/src/test/ui/shadowed/shadowed-trait-methods.stderr index 3597cc53420..362907ecbd7 100644 --- a/src/test/ui/shadowed/shadowed-trait-methods.stderr +++ b/src/test/ui/shadowed/shadowed-trait-methods.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `f` found for type `()` in the current scope +error[E0599]: no method named `f` found for unit type `()` in the current scope --> $DIR/shadowed-trait-methods.rs:13:8 | LL | ().f() diff --git a/src/test/ui/span/issue-7575.rs b/src/test/ui/span/issue-7575.rs index ea0a66540b9..eddd158aef0 100644 --- a/src/test/ui/span/issue-7575.rs +++ b/src/test/ui/span/issue-7575.rs @@ -60,15 +60,15 @@ impl ManyImplTrait for Myisize {} fn no_param_bound(u: usize, m: Myisize) -> usize { u.f8(42) + u.f9(342) + m.fff(42) - //~^ ERROR no method named `f9` found for type `usize` in the current scope - //~| ERROR no method named `fff` found for type `Myisize` in the current scope + //~^ ERROR no method named `f9` found + //~| ERROR no method named `fff` found } fn param_bound(t: T) -> bool { t.is_str() - //~^ ERROR no method named `is_str` found for type `T` in the current scope + //~^ ERROR no method named `is_str` found } fn main() { diff --git a/src/test/ui/span/issue-7575.stderr b/src/test/ui/span/issue-7575.stderr index 53a6238422b..eb85be039ba 100644 --- a/src/test/ui/span/issue-7575.stderr +++ b/src/test/ui/span/issue-7575.stderr @@ -38,7 +38,7 @@ help: disambiguate the method call for candidate #3 LL | u.f8(42) + UnusedTrait::f9(u, 342) + m.fff(42) | ^^^^^^^^^^^^^^^^^^^^^^^ -error[E0599]: no method named `fff` found for type `Myisize` in the current scope +error[E0599]: no method named `fff` found for struct `Myisize` in the current scope --> $DIR/issue-7575.rs:62:30 | LL | struct Myisize(isize); @@ -57,7 +57,7 @@ note: the candidate is defined in an impl for the type `Myisize` LL | fn fff(i: isize) -> isize { | ^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0599]: no method named `is_str` found for type `T` in the current scope +error[E0599]: no method named `is_str` found for type parameter `T` in the current scope --> $DIR/issue-7575.rs:70:7 | LL | t.is_str() diff --git a/src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.rs b/src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.rs index 34a14168573..5c104449fe9 100644 --- a/src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.rs +++ b/src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.rs @@ -20,5 +20,5 @@ fn foo_one(&self) -> &'static str { fn main() { println!("{}", MyStruct.foo_one()); - //~^ ERROR no method named `foo_one` found for type `MyStruct` in the current scope + //~^ ERROR no method named `foo_one` found } diff --git a/src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr b/src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr index bbfe4c3d59d..19809778a5e 100644 --- a/src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr +++ b/src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `foo_one` found for type `MyStruct` in the current scope +error[E0599]: no method named `foo_one` found for struct `MyStruct` in the current scope --> $DIR/specialization-trait-not-implemented.rs:22:29 | LL | struct MyStruct; diff --git a/src/test/ui/suggestions/constrain-trait.fixed b/src/test/ui/suggestions/constrain-trait.fixed index dda9e931353..f292f27f0f3 100644 --- a/src/test/ui/suggestions/constrain-trait.fixed +++ b/src/test/ui/suggestions/constrain-trait.fixed @@ -12,13 +12,13 @@ trait GetString { trait UseString: std::fmt::Debug + GetString { fn use_string(&self) { - println!("{:?}", self.get_a()); //~ ERROR no method named `get_a` found for type `&Self` + println!("{:?}", self.get_a()); //~ ERROR no method named `get_a` found } } trait UseString2: GetString { fn use_string(&self) { - println!("{:?}", self.get_a()); //~ ERROR no method named `get_a` found for type `&Self` + println!("{:?}", self.get_a()); //~ ERROR no method named `get_a` found } } diff --git a/src/test/ui/suggestions/constrain-trait.rs b/src/test/ui/suggestions/constrain-trait.rs index 4ef0eff5bd7..99ccf7a7f3b 100644 --- a/src/test/ui/suggestions/constrain-trait.rs +++ b/src/test/ui/suggestions/constrain-trait.rs @@ -12,13 +12,13 @@ trait GetString { trait UseString: std::fmt::Debug { fn use_string(&self) { - println!("{:?}", self.get_a()); //~ ERROR no method named `get_a` found for type `&Self` + println!("{:?}", self.get_a()); //~ ERROR no method named `get_a` found } } trait UseString2 { fn use_string(&self) { - println!("{:?}", self.get_a()); //~ ERROR no method named `get_a` found for type `&Self` + println!("{:?}", self.get_a()); //~ ERROR no method named `get_a` found } } diff --git a/src/test/ui/suggestions/constrain-trait.stderr b/src/test/ui/suggestions/constrain-trait.stderr index 3cc351ac80a..f1c50e59a84 100644 --- a/src/test/ui/suggestions/constrain-trait.stderr +++ b/src/test/ui/suggestions/constrain-trait.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `get_a` found for type `&Self` in the current scope +error[E0599]: no method named `get_a` found for reference `&Self` in the current scope --> $DIR/constrain-trait.rs:15:31 | LL | println!("{:?}", self.get_a()); @@ -10,7 +10,7 @@ help: the following trait defines an item `get_a`, perhaps you need to add anoth LL | trait UseString: std::fmt::Debug + GetString { | ^^^^^^^^^^^ -error[E0599]: no method named `get_a` found for type `&Self` in the current scope +error[E0599]: no method named `get_a` found for reference `&Self` in the current scope --> $DIR/constrain-trait.rs:21:31 | LL | println!("{:?}", self.get_a()); diff --git a/src/test/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.stderr b/src/test/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.stderr index 4aec72006ee..db54d044d9e 100644 --- a/src/test/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.stderr +++ b/src/test/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `hello` found for type `impl Foo` in the current scope +error[E0599]: no method named `hello` found for type parameter `impl Foo` in the current scope --> $DIR/impl-trait-with-missing-trait-bounds-in-arg.rs:15:9 | LL | foo.hello(); diff --git a/src/test/ui/suggestions/issue-21673.stderr b/src/test/ui/suggestions/issue-21673.stderr index f2496f696d6..14c7b18ea51 100644 --- a/src/test/ui/suggestions/issue-21673.stderr +++ b/src/test/ui/suggestions/issue-21673.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `method` found for type `&T` in the current scope +error[E0599]: no method named `method` found for reference `&T` in the current scope --> $DIR/issue-21673.rs:6:7 | LL | x.method() @@ -10,7 +10,7 @@ help: the following trait defines an item `method`, perhaps you need to restrict LL | fn call_method(x: &T) { | ^^^^^^^^ -error[E0599]: no method named `method` found for type `T` in the current scope +error[E0599]: no method named `method` found for type parameter `T` in the current scope --> $DIR/issue-21673.rs:10:7 | LL | x.method() diff --git a/src/test/ui/suggestions/mut-borrow-needed-by-trait.rs b/src/test/ui/suggestions/mut-borrow-needed-by-trait.rs index dcef2ada63b..f8b86377187 100644 --- a/src/test/ui/suggestions/mut-borrow-needed-by-trait.rs +++ b/src/test/ui/suggestions/mut-borrow-needed-by-trait.rs @@ -19,5 +19,5 @@ fn main() { //~| ERROR the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied //~| ERROR the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied - writeln!(fp, "hello world").unwrap(); //~ ERROR no method named `write_fmt` found for type + writeln!(fp, "hello world").unwrap(); //~ ERROR no method named `write_fmt` found for struct } diff --git a/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr b/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr index daa8e1162d1..2c3c07c19e7 100644 --- a/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr +++ b/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr @@ -25,7 +25,7 @@ LL | let fp = BufWriter::new(fp); = note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write` = note: required by `std::io::BufWriter` -error[E0599]: no method named `write_fmt` found for type `std::io::BufWriter<&dyn std::io::Write>` in the current scope +error[E0599]: no method named `write_fmt` found for struct `std::io::BufWriter<&dyn std::io::Write>` in the current scope --> $DIR/mut-borrow-needed-by-trait.rs:22:5 | LL | writeln!(fp, "hello world").unwrap(); diff --git a/src/test/ui/suggestions/remove-as_str.rs b/src/test/ui/suggestions/remove-as_str.rs index d10300b48ba..289a784ba6a 100644 --- a/src/test/ui/suggestions/remove-as_str.rs +++ b/src/test/ui/suggestions/remove-as_str.rs @@ -1,21 +1,21 @@ fn foo1(s: &str) { s.as_str(); - //~^ ERROR no method named `as_str` found for type `&str` in the current scope + //~^ ERROR no method named `as_str` found } fn foo2<'a>(s: &'a str) { s.as_str(); - //~^ ERROR no method named `as_str` found for type `&'a str` in the current scope + //~^ ERROR no method named `as_str` found } fn foo3(s: &mut str) { s.as_str(); - //~^ ERROR no method named `as_str` found for type `&mut str` in the current scope + //~^ ERROR no method named `as_str` found } fn foo4(s: &&str) { s.as_str(); - //~^ ERROR no method named `as_str` found for type `&&str` in the current scope + //~^ ERROR no method named `as_str` found } fn main() {} diff --git a/src/test/ui/suggestions/remove-as_str.stderr b/src/test/ui/suggestions/remove-as_str.stderr index eae9cc07508..534c497780a 100644 --- a/src/test/ui/suggestions/remove-as_str.stderr +++ b/src/test/ui/suggestions/remove-as_str.stderr @@ -1,22 +1,22 @@ -error[E0599]: no method named `as_str` found for type `&str` in the current scope +error[E0599]: no method named `as_str` found for reference `&str` in the current scope --> $DIR/remove-as_str.rs:2:7 | LL | s.as_str(); | -^^^^^^-- help: remove this method call -error[E0599]: no method named `as_str` found for type `&'a str` in the current scope +error[E0599]: no method named `as_str` found for reference `&'a str` in the current scope --> $DIR/remove-as_str.rs:7:7 | LL | s.as_str(); | -^^^^^^-- help: remove this method call -error[E0599]: no method named `as_str` found for type `&mut str` in the current scope +error[E0599]: no method named `as_str` found for mutable reference `&mut str` in the current scope --> $DIR/remove-as_str.rs:12:7 | LL | s.as_str(); | -^^^^^^-- help: remove this method call -error[E0599]: no method named `as_str` found for type `&&str` in the current scope +error[E0599]: no method named `as_str` found for reference `&&str` in the current scope --> $DIR/remove-as_str.rs:17:7 | LL | s.as_str(); diff --git a/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.rs b/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.rs index 5480adb3101..f738a1f2119 100644 --- a/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.rs +++ b/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.rs @@ -9,5 +9,5 @@ fn main() { let shared_state = RefCell::new(HasAssocMethod); let state = shared_state.borrow_mut(); state.hello(); - //~^ ERROR no method named `hello` found for type `std::cell::RefMut<'_, HasAssocMethod>` + //~^ ERROR no method named `hello` found } diff --git a/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.stderr b/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.stderr index a1c0126146e..507f822e7b8 100644 --- a/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.stderr +++ b/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `hello` found for type `std::cell::RefMut<'_, HasAssocMethod>` in the current scope +error[E0599]: no method named `hello` found for struct `std::cell::RefMut<'_, HasAssocMethod>` in the current scope --> $DIR/suggest-assoc-fn-call-with-turbofish-through-deref.rs:11:11 | LL | state.hello(); diff --git a/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish.rs b/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish.rs index ef4b38de947..2a829db5383 100644 --- a/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish.rs +++ b/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish.rs @@ -7,5 +7,5 @@ fn default_hello() {} fn main() { let x = GenericAssocMethod(33i32); x.default_hello(); - //~^ ERROR no method named `default_hello` found for type `GenericAssocMethod` + //~^ ERROR no method named `default_hello` found } diff --git a/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish.stderr b/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish.stderr index 8cfa7de08bb..dfc1887d3af 100644 --- a/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish.stderr +++ b/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `default_hello` found for type `GenericAssocMethod` in the current scope +error[E0599]: no method named `default_hello` found for struct `GenericAssocMethod` in the current scope --> $DIR/suggest-assoc-fn-call-with-turbofish.rs:9:7 | LL | struct GenericAssocMethod(T); diff --git a/src/test/ui/suggestions/suggest-methods.stderr b/src/test/ui/suggestions/suggest-methods.stderr index 4678410eb48..a715c565946 100644 --- a/src/test/ui/suggestions/suggest-methods.stderr +++ b/src/test/ui/suggestions/suggest-methods.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `bat` found for type `Foo` in the current scope +error[E0599]: no method named `bat` found for struct `Foo` in the current scope --> $DIR/suggest-methods.rs:18:7 | LL | struct Foo; @@ -7,7 +7,7 @@ LL | struct Foo; LL | f.bat(1.0); | ^^^ help: there is a method with a similar name: `bar` -error[E0599]: no method named `is_emtpy` found for type `std::string::String` in the current scope +error[E0599]: no method named `is_emtpy` found for struct `std::string::String` in the current scope --> $DIR/suggest-methods.rs:21:15 | LL | let _ = s.is_emtpy(); diff --git a/src/test/ui/suggestions/suggest-variants.rs b/src/test/ui/suggestions/suggest-variants.rs index d418834432e..dd05d0f04ab 100644 --- a/src/test/ui/suggestions/suggest-variants.rs +++ b/src/test/ui/suggestions/suggest-variants.rs @@ -9,9 +9,9 @@ struct S { } fn main() { - println!("My shape is {:?}", Shape::Squareee { size: 5}); //~ ERROR no variant `Squareee` - println!("My shape is {:?}", Shape::Circl { size: 5}); //~ ERROR no variant `Circl` - println!("My shape is {:?}", Shape::Rombus{ size: 5}); //~ ERROR no variant `Rombus` + println!("My shape is {:?}", Shape::Squareee { size: 5}); //~ ERROR no variant named `Squareee` + println!("My shape is {:?}", Shape::Circl { size: 5}); //~ ERROR no variant named `Circl` + println!("My shape is {:?}", Shape::Rombus{ size: 5}); //~ ERROR no variant named `Rombus` Shape::Squareee; //~ ERROR no variant Shape::Circl; //~ ERROR no variant Shape::Rombus; //~ ERROR no variant diff --git a/src/test/ui/suggestions/suggest-variants.stderr b/src/test/ui/suggestions/suggest-variants.stderr index b4338e20554..9227baa3e1a 100644 --- a/src/test/ui/suggestions/suggest-variants.stderr +++ b/src/test/ui/suggestions/suggest-variants.stderr @@ -1,4 +1,4 @@ -error: no variant `Squareee` in enum `Shape` +error[E0599]: no variant named `Squareee` found for enum `Shape` --> $DIR/suggest-variants.rs:12:41 | LL | enum Shape { @@ -7,7 +7,7 @@ LL | enum Shape { LL | println!("My shape is {:?}", Shape::Squareee { size: 5}); | ^^^^^^^^ help: there is a variant with a similar name: `Square` -error: no variant `Circl` in enum `Shape` +error[E0599]: no variant named `Circl` found for enum `Shape` --> $DIR/suggest-variants.rs:13:41 | LL | enum Shape { @@ -16,7 +16,7 @@ LL | enum Shape { LL | println!("My shape is {:?}", Shape::Circl { size: 5}); | ^^^^^ help: there is a variant with a similar name: `Circle` -error: no variant `Rombus` in enum `Shape` +error[E0599]: no variant named `Rombus` found for enum `Shape` --> $DIR/suggest-variants.rs:14:41 | LL | enum Shape { @@ -25,7 +25,7 @@ LL | enum Shape { LL | println!("My shape is {:?}", Shape::Rombus{ size: 5}); | ^^^^^^ variant not found in `Shape` -error[E0599]: no variant or associated item named `Squareee` found for type `Shape` in the current scope +error[E0599]: no variant or associated item named `Squareee` found for enum `Shape` in the current scope --> $DIR/suggest-variants.rs:15:12 | LL | enum Shape { @@ -37,7 +37,7 @@ LL | Shape::Squareee; | variant or associated item not found in `Shape` | help: there is a variant with a similar name: `Square` -error[E0599]: no variant or associated item named `Circl` found for type `Shape` in the current scope +error[E0599]: no variant or associated item named `Circl` found for enum `Shape` in the current scope --> $DIR/suggest-variants.rs:16:12 | LL | enum Shape { @@ -49,7 +49,7 @@ LL | Shape::Circl; | variant or associated item not found in `Shape` | help: there is a variant with a similar name: `Circle` -error[E0599]: no variant or associated item named `Rombus` found for type `Shape` in the current scope +error[E0599]: no variant or associated item named `Rombus` found for enum `Shape` in the current scope --> $DIR/suggest-variants.rs:17:12 | LL | enum Shape { diff --git a/src/test/ui/traits/trait-impl-1.rs b/src/test/ui/traits/trait-impl-1.rs index 43b82221835..d22ac72d1cc 100644 --- a/src/test/ui/traits/trait-impl-1.rs +++ b/src/test/ui/traits/trait-impl-1.rs @@ -12,5 +12,5 @@ impl T for i32 {} fn main() { let x = &42i32; - x.foo(); //~ERROR: no method named `foo` found for type `&i32` in the current scope + x.foo(); //~ERROR: no method named `foo` found } diff --git a/src/test/ui/traits/trait-impl-1.stderr b/src/test/ui/traits/trait-impl-1.stderr index 0d61c3ed00d..da0936e8eeb 100644 --- a/src/test/ui/traits/trait-impl-1.stderr +++ b/src/test/ui/traits/trait-impl-1.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `foo` found for type `&i32` in the current scope +error[E0599]: no method named `foo` found for reference `&i32` in the current scope --> $DIR/trait-impl-1.rs:15:7 | LL | x.foo(); diff --git a/src/test/ui/traits/trait-item-privacy.rs b/src/test/ui/traits/trait-item-privacy.rs index d58bbef38c4..8507d8ef17e 100644 --- a/src/test/ui/traits/trait-item-privacy.rs +++ b/src/test/ui/traits/trait-item-privacy.rs @@ -64,8 +64,8 @@ fn check_method() { // Methods, method call // a, b, c are resolved as trait items, their traits need to be in scope - S.a(); //~ ERROR no method named `a` found for type `S` in the current scope - S.b(); //~ ERROR no method named `b` found for type `S` in the current scope + S.a(); //~ ERROR no method named `a` found + S.b(); //~ ERROR no method named `b` found S.c(); // OK // a, b, c are resolved as inherent items, their traits don't need to be in scope let c = &S as &dyn C; @@ -76,9 +76,9 @@ fn check_method() { // Methods, UFCS // a, b, c are resolved as trait items, their traits need to be in scope S::a(&S); - //~^ ERROR no function or associated item named `a` found for type `S` + //~^ ERROR no function or associated item named `a` found S::b(&S); - //~^ ERROR no function or associated item named `b` found for type `S` + //~^ ERROR no function or associated item named `b` found S::c(&S); // OK // a, b, c are resolved as inherent items, their traits don't need to be in scope C::a(&S); //~ ERROR method `a` is private @@ -94,8 +94,8 @@ fn check_assoc_const() { // Associated constants // A, B, C are resolved as trait items, their traits need to be in scope - S::A; //~ ERROR no associated item named `A` found for type `S` in the current scope - S::B; //~ ERROR no associated item named `B` found for type `S` in the current scope + S::A; //~ ERROR no associated item named `A` found + S::B; //~ ERROR no associated item named `B` found S::C; // OK // A, B, C are resolved as inherent items, their traits don't need to be in scope C::A; //~ ERROR associated constant `A` is private diff --git a/src/test/ui/traits/trait-item-privacy.stderr b/src/test/ui/traits/trait-item-privacy.stderr index 64a92c6b0b4..4df8845de27 100644 --- a/src/test/ui/traits/trait-item-privacy.stderr +++ b/src/test/ui/traits/trait-item-privacy.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `a` found for type `S` in the current scope +error[E0599]: no method named `a` found for struct `S` in the current scope --> $DIR/trait-item-privacy.rs:67:7 | LL | struct S; @@ -11,7 +11,7 @@ LL | S.a(); = note: the following trait defines an item `a`, perhaps you need to implement it: candidate #1: `method::A` -error[E0599]: no method named `b` found for type `S` in the current scope +error[E0599]: no method named `b` found for struct `S` in the current scope --> $DIR/trait-item-privacy.rs:68:7 | LL | struct S; @@ -39,7 +39,7 @@ error[E0624]: method `a` is private LL | c.a(); | ^ -error[E0599]: no function or associated item named `a` found for type `S` in the current scope +error[E0599]: no function or associated item named `a` found for struct `S` in the current scope --> $DIR/trait-item-privacy.rs:78:8 | LL | struct S; @@ -52,7 +52,7 @@ LL | S::a(&S); = note: the following trait defines an item `a`, perhaps you need to implement it: candidate #1: `method::A` -error[E0599]: no function or associated item named `b` found for type `S` in the current scope +error[E0599]: no function or associated item named `b` found for struct `S` in the current scope --> $DIR/trait-item-privacy.rs:80:8 | LL | struct S; @@ -73,7 +73,7 @@ error[E0624]: method `a` is private LL | C::a(&S); | ^^^^ -error[E0599]: no associated item named `A` found for type `S` in the current scope +error[E0599]: no associated item named `A` found for struct `S` in the current scope --> $DIR/trait-item-privacy.rs:97:8 | LL | struct S; @@ -86,7 +86,7 @@ LL | S::A; = note: the following trait defines an item `A`, perhaps you need to implement it: candidate #1: `assoc_const::A` -error[E0599]: no associated item named `B` found for type `S` in the current scope +error[E0599]: no associated item named `B` found for struct `S` in the current scope --> $DIR/trait-item-privacy.rs:98:8 | LL | struct S; diff --git a/src/test/ui/ufcs/ufcs-partially-resolved.rs b/src/test/ui/ufcs/ufcs-partially-resolved.rs index 82a593ff16c..66d4db3ebaf 100644 --- a/src/test/ui/ufcs/ufcs-partially-resolved.rs +++ b/src/test/ui/ufcs/ufcs-partially-resolved.rs @@ -35,7 +35,7 @@ fn main() { ::N::NN; //~ ERROR cannot find associated type `N` in `A` let _: ::Y::NN; //~ ERROR ambiguous associated type let _: ::Y::NN; //~ ERROR expected associated type, found variant `E::Y` - ::Y::NN; //~ ERROR no associated item named `NN` found for type `::Y` + ::Y::NN; //~ ERROR no associated item named `NN` found ::Y::NN; //~ ERROR expected associated type, found variant `E::Y` let _: ::NN; //~ ERROR cannot find associated type `NN` in `Tr::N` @@ -52,5 +52,5 @@ fn main() { let _: ::Z; //~ ERROR expected associated type, found method `Dr::Z` ::X; //~ ERROR expected method or associated constant, found associated type `Dr::X` let _: ::Z::N; //~ ERROR expected associated type, found method `Dr::Z` - ::X::N; //~ ERROR no associated item named `N` found for type `::X` + ::X::N; //~ ERROR no associated item named `N` found } diff --git a/src/test/ui/ufcs/ufcs-partially-resolved.stderr b/src/test/ui/ufcs/ufcs-partially-resolved.stderr index dbd41da6daf..60ebe8ee053 100644 --- a/src/test/ui/ufcs/ufcs-partially-resolved.stderr +++ b/src/test/ui/ufcs/ufcs-partially-resolved.stderr @@ -207,13 +207,13 @@ error[E0223]: ambiguous associated type LL | let _: ::Y::NN; | ^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<::Y as Trait>::NN` -error[E0599]: no associated item named `NN` found for type `::Y` in the current scope +error[E0599]: no associated item named `NN` found for associated type `::Y` in the current scope --> $DIR/ufcs-partially-resolved.rs:38:20 | LL | ::Y::NN; | ^^ associated item not found in `::Y` -error[E0599]: no associated item named `N` found for type `::X` in the current scope +error[E0599]: no associated item named `N` found for associated type `::X` in the current scope --> $DIR/ufcs-partially-resolved.rs:55:20 | LL | ::X::N; diff --git a/src/test/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr b/src/test/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr index 18276d5710c..2d058521e4e 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `call` found for type `[closure@$DIR/unboxed-closures-static-call-wrong-trait.rs:6:26: 6:31]` in the current scope +error[E0599]: no method named `call` found for closure `[closure@$DIR/unboxed-closures-static-call-wrong-trait.rs:6:26: 6:31]` in the current scope --> $DIR/unboxed-closures-static-call-wrong-trait.rs:7:10 | LL | mut_.call((0, )); diff --git a/src/test/ui/underscore-imports/hygiene.stderr b/src/test/ui/underscore-imports/hygiene.stderr index 44cfc5cc5d2..29836137860 100644 --- a/src/test/ui/underscore-imports/hygiene.stderr +++ b/src/test/ui/underscore-imports/hygiene.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `deref` found for type `&()` in the current scope +error[E0599]: no method named `deref` found for reference `&()` in the current scope --> $DIR/hygiene.rs:38:11 | LL | (&()).deref(); @@ -10,7 +10,7 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f LL | use std::ops::Deref; | -error[E0599]: no method named `deref_mut` found for type `&mut ()` in the current scope +error[E0599]: no method named `deref_mut` found for mutable reference `&mut ()` in the current scope --> $DIR/hygiene.rs:39:15 | LL | (&mut ()).deref_mut(); diff --git a/src/test/ui/underscore-imports/shadow.stderr b/src/test/ui/underscore-imports/shadow.stderr index 102c17f6f56..eb16fa9d566 100644 --- a/src/test/ui/underscore-imports/shadow.stderr +++ b/src/test/ui/underscore-imports/shadow.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `deref` found for type `&()` in the current scope +error[E0599]: no method named `deref` found for reference `&()` in the current scope --> $DIR/shadow.rs:19:11 | LL | x.deref(); diff --git a/src/test/ui/union/union-derive-clone.rs b/src/test/ui/union/union-derive-clone.rs index 60e280f53f5..4a106cc940a 100644 --- a/src/test/ui/union/union-derive-clone.rs +++ b/src/test/ui/union/union-derive-clone.rs @@ -34,5 +34,5 @@ union U5 { fn main() { let u = U5 { a: ManuallyDrop::new(CloneNoCopy) }; - let w = u.clone(); //~ ERROR no method named `clone` found for type `U5` + let w = u.clone(); //~ ERROR no method named `clone` found for union `U5` } diff --git a/src/test/ui/union/union-derive-clone.stderr b/src/test/ui/union/union-derive-clone.stderr index 6893f9176f2..0ef5753b590 100644 --- a/src/test/ui/union/union-derive-clone.stderr +++ b/src/test/ui/union/union-derive-clone.stderr @@ -6,7 +6,7 @@ LL | #[derive(Clone)] | = note: required by `std::clone::AssertParamIsCopy` -error[E0599]: no method named `clone` found for type `U5` in the current scope +error[E0599]: no method named `clone` found for union `U5` in the current scope --> $DIR/union-derive-clone.rs:37:15 | LL | union U5 { diff --git a/src/test/ui/unique-object-noncopyable.stderr b/src/test/ui/unique-object-noncopyable.stderr index cd46878c19b..92cda6482c0 100644 --- a/src/test/ui/unique-object-noncopyable.stderr +++ b/src/test/ui/unique-object-noncopyable.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `clone` found for type `std::boxed::Box` in the current scope +error[E0599]: no method named `clone` found for struct `std::boxed::Box` in the current scope --> $DIR/unique-object-noncopyable.rs:24:16 | LL | let _z = y.clone(); diff --git a/src/test/ui/unique-pinned-nocopy.stderr b/src/test/ui/unique-pinned-nocopy.stderr index 19ef2b21c26..e5c3eaccbd3 100644 --- a/src/test/ui/unique-pinned-nocopy.stderr +++ b/src/test/ui/unique-pinned-nocopy.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `clone` found for type `std::boxed::Box` in the current scope +error[E0599]: no method named `clone` found for struct `std::boxed::Box` in the current scope --> $DIR/unique-pinned-nocopy.rs:12:16 | LL | let _j = i.clone(); diff --git a/src/test/ui/unspecified-self-in-trait-ref.stderr b/src/test/ui/unspecified-self-in-trait-ref.stderr index b72d45ebdbf..e057a7842b2 100644 --- a/src/test/ui/unspecified-self-in-trait-ref.stderr +++ b/src/test/ui/unspecified-self-in-trait-ref.stderr @@ -1,22 +1,22 @@ -error[E0599]: no function or associated item named `lol` found for type `dyn Foo<_>` in the current scope +error[E0599]: no function or associated item named `lol` found for trait object `dyn Foo<_>` in the current scope --> $DIR/unspecified-self-in-trait-ref.rs:10:18 | LL | let a = Foo::lol(); | ^^^ function or associated item not found in `dyn Foo<_>` -error[E0599]: no function or associated item named `lol` found for type `dyn Foo<_>` in the current scope +error[E0599]: no function or associated item named `lol` found for trait object `dyn Foo<_>` in the current scope --> $DIR/unspecified-self-in-trait-ref.rs:12:23 | LL | let b = Foo::<_>::lol(); | ^^^ function or associated item not found in `dyn Foo<_>` -error[E0599]: no function or associated item named `lol` found for type `dyn Bar<_, _>` in the current scope +error[E0599]: no function or associated item named `lol` found for trait object `dyn Bar<_, _>` in the current scope --> $DIR/unspecified-self-in-trait-ref.rs:14:18 | LL | let c = Bar::lol(); | ^^^ function or associated item not found in `dyn Bar<_, _>` -error[E0599]: no function or associated item named `lol` found for type `dyn Bar` in the current scope +error[E0599]: no function or associated item named `lol` found for trait object `dyn Bar` in the current scope --> $DIR/unspecified-self-in-trait-ref.rs:16:30 | LL | let d = Bar::::lol(); -- 2.44.0