From 2c5766f2d4b329f73d144a000c7cc5136f49cad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?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 36d119bf7698f..4fe45ffa74763 100644 --- a/src/librustc_typeck/astconv.rs +++ b/src/librustc_typeck/astconv.rs @@ -2114,9 +2114,13 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { 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 1cc1eb2c7b2df..40edad3674093 100644 --- a/src/librustc_typeck/check/method/suggest.rs +++ b/src/librustc_typeck/check/method/suggest.rs @@ -361,10 +361,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { 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 35fb662f63aee..024d14e21b5fd 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 5a62b9736dedd..6f89530eac933 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 3e36f2402a990..a0739a7a90b0a 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 9b313d3e9b278..0b652a1f54bf2 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 237b8c54ce301..be551f6e889fc 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 890f6800c22af..cb3199e7c886e 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 4cab52e3e974c..0f932cda07fc3 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 e719d5254f639..3d37d8af31df3 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 c666c1a3d1b3f..d968c8b4680df 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 79ba93130a73a..d6b399acb7330 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 a44b971841538..f9dfdddad9d46 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 b2f7894ba0560..a8d97bdfe2fb5 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 af29a9963e1f2..c109896e825be 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 97c949e32e341..82cb235d47a7d 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 47b090cb88678..19e7d2036bfc8 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 2fb9977f4d700..599d1d79e7555 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 054bd0914d31c..c95e8d239d2b9 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 038de80508ac2..2083a1d65220f 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 7e7ba59dca816..3f912f7ffc63e 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 59b865437a2e0..3f1946b94f64b 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 ea21592997bfe..60633c6930cdf 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 d1e995013cb93..072e61f6a3cd1 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 ef0904c1a2dbf..6e2b1abd1370f 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 @@ struct T; 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 5189ffa62d1ba..fd7fdb4f7226c 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 1a38d3d7601b8..f4144277f16be 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 f427c1ba0adfb..20f4c320e669a 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 89bfccf2fbc56..a78a003661d6f 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 73571a375b5f6..6b80d99b3afe9 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 736369dab8354..5d75f5034bc65 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 a116c5b38ce97..15c4acbc939bc 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 c3ce484edf7a9..8e3609292a7f9 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 644d26b34060c..1605f3434cf5a 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 2bff01be9b813..41f48cb56933e 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 441191beaf588..57417975474f7 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 fb870d6c6f076..7f2eb0c21e61d 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 c912873a6c05c..c8abc2d8f8ee0 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 f0a03e1be82ac..da25617e18759 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 f4567554d0dbb..8c59fbd530129 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 80ca051ceff0d..666fb6ab2bbb1 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 cdb261a238e56..2f31636f8adf9 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 c15c5392fac25..b6847cd755c3f 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 fe920c1693982..b412d7bc70436 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 4e5cace525787..efde16167b71b 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 98a354b1bd0fc..dfd84b9a79d40 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 72038ea20a3fa..584b05ec44d3f 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 8518ed34aee9f..fbcce4b834467 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 7c15598448d7f..92f4c546440ab 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 699e41156fa80..89f70fda786ea 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 157f20d22d8ae..09f9ebccf2505 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 97100ed375374..a81b459a34cbe 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 adad6c35a3f67..ea042a6c76bb4 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 c9ede03003434..aa720fd45895a 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 e315317c98a6c..77bc829209440 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 4d286be1e3302..c543ef9b0e3d8 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 6493565d21647..f0a1e2d006179 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 7411896443dfe..2736ee881d564 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 1cd3f84f7a227..dd2784841758c 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 c537c6118f3a8..fff20248b70d5 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 4fc32e0de8d57..705355d91bf3c 100644 --- a/src/test/ui/issues/issue-30123.rs +++ b/src/test/ui/issues/issue-30123.rs @@ -5,5 +5,5 @@ use issue_30123_aux::*; 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 32bbd4d03d6d7..bc6731601f095 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 38cf3c4f930e8..a614b96ac1439 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 09c499452adb6..de544afae73b2 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 e6b74d262c340..bbd8042d1cd6b 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 fc2c3679e13b8..632ddb91b36fd 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 194bb2bfab8ae..f9a25b69ff621 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 e34b5c9a0f47e..afe4d42edd8c8 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 3055e316a082a..c52ea4ef9daa9 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 b381203856e92..a998f95d306cb 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 844a2dc00698e..0817c51ee4eab 100644 --- a/src/test/ui/issues/issue-3707.rs +++ b/src/test/ui/issues/issue-3707.rs @@ -7,7 +7,7 @@ impl Obj { 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 b98bc572a397c..6ca2deee377a3 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 60a8793b4e6be..3d28f1936b47f 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 603d42ca35e0b..0022065a32c3d 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 8b173e1b50c1e..2f6e676538e96 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 5af48ca4c0dbc..3a75956af5280 100644 --- a/src/test/ui/issues/issue-39559.rs +++ b/src/test/ui/issues/issue-39559.rs @@ -12,7 +12,7 @@ impl Dim for Dim3 { 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 b945b5e665459..0554b232c248b 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 4e00915683a2d..a5ed5b87051e7 100644 --- a/src/test/ui/issues/issue-3973.rs +++ b/src/test/ui/issues/issue-3973.rs @@ -20,6 +20,6 @@ impl ToString_ for Point { 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 ee07a410a9c86..63282e8d86d7b 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 16facc5a78f8d..10cde21abd766 100644 --- a/src/test/ui/issues/issue-41880.rs +++ b/src/test/ui/issues/issue-41880.rs @@ -25,5 +25,5 @@ impl Iterator for Iterate where F: Fn(&T) -> T { 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 0e1d55c339eb4..09d5594f73f06 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 763bb9ae0ea9c..82cdc20df2fbd 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 f4f4dce7682fa..ce667a5006e6f 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 4dae6c1cd158e..3f63cb8e78fba 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 24c61425b8e29..5b6b8f8de18e2 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 0eb7bf0247565..f91f6e891ed90 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 67ad73f584773..c5fe6ea82cb0e 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 845ddb52319c7..583236345cac1 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 5e016748770dc..fae11fe62b16c 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 6dc13da548b12..48a662e98b547 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 f21e97388b6f4..2c6231fb3b589 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 44c0c954eeeca..8a5c2f4006051 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 b8369c9b82e1a..af8d657999cb0 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 b26705a99e3bc..145e610d52c7c 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 e6737662088f2..5bf0579030ad0 100644 --- a/src/test/ui/issues/issue-5153.rs +++ b/src/test/ui/issues/issue-5153.rs @@ -8,5 +8,5 @@ impl Foo for isize { 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 5034e6d538e3e..4680c8b131c50 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 3830ad4b1e3ae..5222e3ee95d59 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 c4000c8a9d41e..e762b7bc0c899 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 2e713cc0ab508..3528084f6ceb4 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 bbdfebe1577c7..b253c135b8c52 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 07f2a046b2dbb..5e98cfadf8ae7 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 f1b2de8d8b36f..e7a244e9df576 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 e0eaafdfc2f22..018ce0459fd6f 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 24bf60abf6a78..4807a0930e7d0 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 7add8afee437f..d3dcb3380bbcc 100644 --- a/src/test/ui/issues/issue-7950.rs +++ b/src/test/ui/issues/issue-7950.rs @@ -4,5 +4,5 @@ struct Foo; 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 bbeab405e2935..73e13c65cf37f 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 a7843a930119a..6bb0877e9b9ba 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 e0dec0a4a705f..5ff4b412667c2 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 94c27b7d17865..7efdd91708a80 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 da018aa89482c..f8d677b99d693 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 83cea16846515..58ceaffc96400 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 @@ struct Foo; 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 865092e4e9ccc..bbfb00050566a 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 d46f0e61793f3..d6426d2cfabfd 100644 --- a/src/test/ui/never_type/issue-2149.rs +++ b/src/test/ui/never_type/issue-2149.rs @@ -11,5 +11,5 @@ impl VecMonad for 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 8ce2ba033321e..9645244751dab 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 b05c29c0d4036..074ed66a26183 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 c1c5021138189..6c3c4a6ac9888 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 2df628ecf8e50..855894b4495c6 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 dec5809f1539b..96401cb71d961 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 e93c4da9dfc85..28a7b68a6821f 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 d6bf543352701..1e001827e475f 100644 --- a/src/test/ui/self/suggest-self-2.rs +++ b/src/test/ui/self/suggest-self-2.rs @@ -18,7 +18,7 @@ impl Foo { //~^ 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 452c31275153a..4bd025ea07630 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 3597cc53420aa..362907ecbd7ef 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 ea0a66540b931..eddd158aef081 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 53a6238422b57..eb85be039ba04 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 34a141685739c..5c104449fe9c0 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 @@ default impl Foo for T { 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 bbfe4c3d59dcf..19809778a5e36 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 dda9e931353b2..f292f27f0f342 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 4ef0eff5bd769..99ccf7a7f3bdf 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 3cc351ac80aed..f1c50e59a845e 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 4aec72006eef0..db54d044d9e92 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 f2496f696d698..14c7b18ea51d3 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 dcef2ada63bea..f8b86377187c5 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 daa8e1162d197..2c3c07c19e7bd 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 d10300b48ba1e..289a784ba6af3 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 eae9cc075084a..534c497780a95 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 5480adb31015a..f738a1f211981 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 a1c0126146e73..507f822e7b804 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 ef4b38de94732..2a829db538390 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 @@ impl GenericAssocMethod { 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 8cfa7de08bb38..dfc1887d3af90 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 4678410eb4859..a715c565946e0 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 d418834432e08..dd05d0f04abe3 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 b4338e2055431..9227baa3e1a5c 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 43b822218354f..d22ac72d1cc4d 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 0d61c3ed00d90..da0936e8eebdc 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 d58bbef38c492..8507d8ef17e36 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 64a92c6b0b478..4df8845de279a 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 82a593ff16cfa..66d4db3ebaf0a 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 dbd41da6daf0b..60ebe8ee053a6 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 18276d5710cf8..2d058521e4ef6 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 44cfc5cc5d22e..2983613786038 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 102c17f6f5618..eb16fa9d5660b 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 60e280f53f52c..4a106cc940a18 100644 --- a/src/test/ui/union/union-derive-clone.rs +++ b/src/test/ui/union/union-derive-clone.rs @@ -34,5 +34,5 @@ struct CloneNoCopy; 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 6893f9176f2db..0ef5753b5907d 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 cd46878c19be4..92cda6482c0d9 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 19ef2b21c2685..e5c3eaccbd3ec 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 b72d45ebdbfbc..e057a7842b2aa 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();