]> git.lizzy.rs Git - rust.git/commitdiff
Unify output of "variant not found" errors
authorEsteban Küber <esteban@kuber.com.ar>
Wed, 8 Jan 2020 16:05:31 +0000 (08:05 -0800)
committerEsteban Küber <esteban@kuber.com.ar>
Wed, 8 Jan 2020 16:05:31 +0000 (08:05 -0800)
156 files changed:
src/librustc_typeck/astconv.rs
src/librustc_typeck/check/method/suggest.rs
src/test/ui/associated-const/associated-const-no-item.rs
src/test/ui/associated-item/associated-item-enum.stderr
src/test/ui/auto-ref-slice-plus-ref.stderr
src/test/ui/block-result/issue-3563.rs
src/test/ui/block-result/issue-3563.stderr
src/test/ui/bogus-tag.stderr
src/test/ui/class-cast-to-trait.stderr
src/test/ui/coherence/coherence_inherent.stderr
src/test/ui/coherence/coherence_inherent_cc.stderr
src/test/ui/confuse-field-and-method/issue-18343.stderr
src/test/ui/confuse-field-and-method/issue-2392.stderr
src/test/ui/confuse-field-and-method/issue-32128.stderr
src/test/ui/confuse-field-and-method/issue-33784.stderr
src/test/ui/confuse-field-and-method/private-field.stderr
src/test/ui/const-generics/invalid-const-arg-for-type-param.stderr
src/test/ui/consts/too_generic_eval_ice.stderr
src/test/ui/copy-a-resource.stderr
src/test/ui/derives/derive-assoc-type-not-impl.stderr
src/test/ui/did_you_mean/bad-assoc-pat.rs
src/test/ui/did_you_mean/bad-assoc-pat.stderr
src/test/ui/did_you_mean/issue-40006.rs
src/test/ui/did_you_mean/issue-40006.stderr
src/test/ui/dont-suggest-private-trait-method.rs
src/test/ui/dont-suggest-private-trait-method.stderr
src/test/ui/empty/empty-struct-braces-expr.rs
src/test/ui/empty/empty-struct-braces-expr.stderr
src/test/ui/error-codes/E0599.stderr
src/test/ui/error-festival.stderr
src/test/ui/hygiene/no_implicit_prelude.stderr
src/test/ui/hygiene/trait_items.rs
src/test/ui/hygiene/trait_items.stderr
src/test/ui/impl-trait/bindings-opaque.stderr
src/test/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.rs
src/test/ui/impl-trait/issues/issue-21659-show-relevant-trait-impls-3.stderr
src/test/ui/impl-trait/method-suggestion-no-duplication.stderr
src/test/ui/impl-trait/no-method-suggested-traits.rs
src/test/ui/impl-trait/no-method-suggested-traits.stderr
src/test/ui/infinite/infinite-autoderef.stderr
src/test/ui/issues/issue-10465.stderr
src/test/ui/issues/issue-13853.stderr
src/test/ui/issues/issue-19521.stderr
src/test/ui/issues/issue-19692.stderr
src/test/ui/issues/issue-21596.stderr
src/test/ui/issues/issue-22933-2.rs
src/test/ui/issues/issue-22933-2.stderr
src/test/ui/issues/issue-22933-3.rs
src/test/ui/issues/issue-23173.rs
src/test/ui/issues/issue-23173.stderr
src/test/ui/issues/issue-23217.rs
src/test/ui/issues/issue-23217.stderr
src/test/ui/issues/issue-25385.rs
src/test/ui/issues/issue-2823.stderr
src/test/ui/issues/issue-28344.stderr
src/test/ui/issues/issue-28586.rs
src/test/ui/issues/issue-28971.rs
src/test/ui/issues/issue-28971.stderr
src/test/ui/issues/issue-29124.rs
src/test/ui/issues/issue-29124.stderr
src/test/ui/issues/issue-30123.rs
src/test/ui/issues/issue-30123.stderr
src/test/ui/issues/issue-31173.stderr
src/test/ui/issues/issue-33575.rs
src/test/ui/issues/issue-33575.stderr
src/test/ui/issues/issue-34209.rs
src/test/ui/issues/issue-34209.stderr
src/test/ui/issues/issue-34334.rs
src/test/ui/issues/issue-34334.stderr
src/test/ui/issues/issue-35677.stderr
src/test/ui/issues/issue-3707.rs
src/test/ui/issues/issue-3707.stderr
src/test/ui/issues/issue-38919.rs
src/test/ui/issues/issue-38919.stderr
src/test/ui/issues/issue-39175.stderr
src/test/ui/issues/issue-39559.rs
src/test/ui/issues/issue-39559.stderr
src/test/ui/issues/issue-3973.rs
src/test/ui/issues/issue-3973.stderr
src/test/ui/issues/issue-41880.rs
src/test/ui/issues/issue-41880.stderr
src/test/ui/issues/issue-42880.stderr
src/test/ui/issues/issue-43189.rs
src/test/ui/issues/issue-43189.stderr
src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.rs
src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr
src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.rs
src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr
src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr
src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_err.stderr
src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr
src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut_err.stderr
src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut_ok.stderr
src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_ok.stderr
src/test/ui/issues/issue-5153.rs
src/test/ui/issues/issue-5153.stderr
src/test/ui/issues/issue-54062.stderr
src/test/ui/issues/issue-57362-1.stderr
src/test/ui/issues/issue-57362-2.stderr
src/test/ui/issues/issue-58734.rs
src/test/ui/issues/issue-58734.stderr
src/test/ui/issues/issue-64430.stderr
src/test/ui/issues/issue-65284-suggest-generic-trait-bound.rs
src/test/ui/issues/issue-65284-suggest-generic-trait-bound.stderr
src/test/ui/issues/issue-7950.rs
src/test/ui/issues/issue-7950.stderr
src/test/ui/lexical-scopes.stderr
src/test/ui/methods/method-call-err-msg.rs
src/test/ui/methods/method-call-err-msg.stderr
src/test/ui/mismatched_types/issue-36053-2.stderr
src/test/ui/mismatched_types/method-help-unsatisfied-bound.rs
src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr
src/test/ui/never_type/issue-2149.rs
src/test/ui/never_type/issue-2149.stderr
src/test/ui/non-copyable-void.stderr
src/test/ui/noncopyable-class.stderr
src/test/ui/object-pointer-types.stderr
src/test/ui/self/point-at-arbitrary-self-type-method.stderr
src/test/ui/self/point-at-arbitrary-self-type-trait-method.stderr
src/test/ui/self/suggest-self-2.rs
src/test/ui/self/suggest-self-2.stderr
src/test/ui/shadowed/shadowed-trait-methods.stderr
src/test/ui/span/issue-7575.rs
src/test/ui/span/issue-7575.stderr
src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.rs
src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr
src/test/ui/suggestions/constrain-trait.fixed
src/test/ui/suggestions/constrain-trait.rs
src/test/ui/suggestions/constrain-trait.stderr
src/test/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.stderr
src/test/ui/suggestions/issue-21673.stderr
src/test/ui/suggestions/mut-borrow-needed-by-trait.rs
src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr
src/test/ui/suggestions/remove-as_str.rs
src/test/ui/suggestions/remove-as_str.stderr
src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.rs
src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.stderr
src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish.rs
src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish.stderr
src/test/ui/suggestions/suggest-methods.stderr
src/test/ui/suggestions/suggest-variants.rs
src/test/ui/suggestions/suggest-variants.stderr
src/test/ui/traits/trait-impl-1.rs
src/test/ui/traits/trait-impl-1.stderr
src/test/ui/traits/trait-item-privacy.rs
src/test/ui/traits/trait-item-privacy.stderr
src/test/ui/ufcs/ufcs-partially-resolved.rs
src/test/ui/ufcs/ufcs-partially-resolved.stderr
src/test/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr
src/test/ui/underscore-imports/hygiene.stderr
src/test/ui/underscore-imports/shadow.stderr
src/test/ui/union/union-derive-clone.rs
src/test/ui/union/union-derive-clone.stderr
src/test/ui/unique-object-noncopyable.stderr
src/test/ui/unique-pinned-nocopy.stderr
src/test/ui/unspecified-self-in-trait-ref.stderr

index 36d119bf7698f47cf8fde2f78a4d40fc8a307cd1..4fe45ffa74763345ae94e3604bc16f599ee441cf 100644 (file)
@@ -2114,9 +2114,13 @@ pub fn associated_path_to_ty(
                     let msg = format!("expected type, found variant `{}`", assoc_ident);
                     tcx.sess.span_err(span, &msg);
                 } else if qself_ty.is_enum() {
-                    let mut err = tcx.sess.struct_span_err(
+                    let mut err = struct_span_err!(
+                        tcx.sess,
                         assoc_ident.span,
-                        &format!("no variant `{}` in enum `{}`", assoc_ident, qself_ty),
+                        E0599,
+                        "no variant named `{}` found for enum `{}`",
+                        assoc_ident,
+                        qself_ty,
                     );
 
                     let adt_def = qself_ty.ty_adt_def().expect("enum is not an ADT");
index 1cc1eb2c7b2df287e31a4c50ef1f3055fbe6d6d6..40edad36740939e02f0b7f4a2cf1f5316e2afc58 100644 (file)
@@ -361,10 +361,11 @@ pub fn report_method_error<'b>(
                             tcx.sess,
                             span,
                             E0599,
-                            "no {} named `{}` found for type `{}` in the current scope",
+                            "no {} named `{}` found for {} `{}` in the current scope",
                             item_kind,
                             item_name,
-                            ty_str
+                            actual.prefix_string(),
+                            ty_str,
                         );
                         if let Some(span) =
                             tcx.sess.confused_type_with_std_module.borrow().get(&span)
index 35fb662f63aeecb18d6e5b28d65f820340c99aaf..024d14e21b5fd2efe9185d3b67b162e76d720dce 100644 (file)
@@ -3,7 +3,7 @@ trait Foo {
 }
 
 const X: i32 = <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);
index 5a62b9736dedda5e145ba823f43c3d5da016e912..6f89530eac93306b3fe065ffc49999b061c296ba 100644 (file)
@@ -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 }
index 3e36f2402a99080af536df5b6006906af7d8abab..a0739a7a90b0a2f6b13b1f9574f7f94ad71fe4d5 100644 (file)
@@ -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();
index 9b313d3e9b2787a4d9547a5b589b93f98e4980f9..0b652a1f54bf2635d87e0f4278fe1d14b19d2842 100644 (file)
@@ -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() {}
index 237b8c54ce301dffb03a4631f0da665182cae777..be551f6e889fc63964d44af2f699d84027a373ab 100644 (file)
@@ -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()
index 890f6800c22af7bb03f08829f369060c6f5ecd73..cb3199e7c886ecb1ce15fb963a7274894975c0fa 100644 (file)
@@ -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), }
index 4cab52e3e974ca40075bbd727de647df0454ee29..0f932cda07fc36bdf732077c813f45e19385fb9f 100644 (file)
@@ -1,4 +1,4 @@
-error[E0599]: no method named `eat` found for type `std::boxed::Box<dyn Noisy>` in the current scope
+error[E0599]: no method named `eat` found for struct `std::boxed::Box<dyn Noisy>` in the current scope
   --> $DIR/class-cast-to-trait.rs:53:8
    |
 LL |   nyan.eat();
index e719d5254f639a2862588c1e0cfa60255df9876b..3d37d8af31df3485b661525f8ec9451ac079e897 100644 (file)
@@ -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();
index c666c1a3d1b3f9de395e07ec56f09628cf1b55bb..d968c8b4680dff77343162df2d910c3d152c6541 100644 (file)
@@ -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();
index 79ba93130a73aa003ccc79c92ccbbdb09baca41c..d6b399acb733097ecfdf9658622d638c857ec697 100644 (file)
@@ -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<F> where F: FnMut() -> u32 {
index a44b97184153832988234b9070c5e25e5035ad5f..f9dfdddad9d469060b340ee17fb85481a2619dde 100644 (file)
@@ -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<F> 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<F> 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<fn() -> u32 {func}>` in the current scope
+error[E0599]: no method named `closure` found for struct `Obj<fn() -> u32 {func}>` in the current scope
   --> $DIR/issue-2392.rs:42:12
    |
 LL | struct Obj<F> 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<fn() -> u32 {func}>` in the current scope
+error[E0599]: no method named `closure` found for struct `Obj<fn() -> u32 {func}>` in the current scope
   --> $DIR/issue-2392.rs:53:12
    |
 LL | struct Obj<F> 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<fn() -> u32 {func}>` in the current scope
+error[E0599]: no method named `not_closure` found for struct `Obj<fn() -> u32 {func}>` in the current scope
   --> $DIR/issue-2392.rs:55:12
    |
 LL | struct Obj<F> 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<std::boxed::Box<(dyn std::ops::FnOnce() -> u32 + 'static)>>` in the current scope
+error[E0599]: no method named `closure` found for struct `Obj<std::boxed::Box<(dyn std::ops::FnOnce() -> u32 + 'static)>>` in the current scope
   --> $DIR/issue-2392.rs:58:24
    |
 LL | struct Obj<F> 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 {
index b2f7894ba0560927ea1e3f7d172fb539b42f021f..a8d97bdfe2fb564ee95296e3f9aa9e2336f694ef 100644 (file)
@@ -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 {
index af29a9963e1f2eae25a8df363f5a0b429bd2f7f8..c109896e825be2ff9eb78806f0382676dc8c40fa 100644 (file)
@@ -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();
index 97c949e32e341f43d3d63ae2a21dc0fa80a6dcfc..82cb235d47a7d8c06e34f416e19191ea9b3866ac 100644 (file)
@@ -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 {
index 47b090cb886783da762f369c8d999d49b9357e6c..19e7d2036bfc88ece09d605e7e1063452ca33dd3 100644 (file)
@@ -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;
index 2fb9977f4d700a87d0fed2afab0fbc2ec5fc5f06..599d1d79e7555fcd9ac6958b364c8ff296ccf8d5 100644 (file)
@@ -1,4 +1,4 @@
-error[E0599]: no associated item named `HOST_SIZE` found for type `Foo<A, B>` in the current scope
+error[E0599]: no associated item named `HOST_SIZE` found for struct `Foo<A, B>` in the current scope
   --> $DIR/too_generic_eval_ice.rs:7:19
    |
 LL | pub struct Foo<A, B>(A, B);
index 054bd0914d31c300fb5e638f8455d4ab47913d39..c95e8d239d2b9d211e97105ad4501099ef816808 100644 (file)
@@ -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 {
index 038de80508ac23962fb97fdb7238994603160320..2083a1d65220f75d47aea86cff24fcbae9368106 100644 (file)
@@ -1,4 +1,4 @@
-error[E0599]: no method named `clone` found for type `Bar<NotClone>` in the current scope
+error[E0599]: no method named `clone` found for struct `Bar<NotClone>` in the current scope
   --> $DIR/derive-assoc-type-not-impl.rs:18:30
    |
 LL | struct Bar<T: Foo> {
index 7e7ba59dca8169f73af3637f5467bb2c94bd53ca..3f912f7ffc63e5630e6e0ffb214a692006f47dde 100644 (file)
@@ -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
     }
 }
index 59b865437a2e0f724c7b3505e009d71b225c40dc..3f1946b94f64b5c6f7b33ae789fd06c2fefbf226 100644 (file)
@@ -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 => {}
index ea21592997bfeed95d67a69a5ac36ac2ebc4a481..60633c6930cdfb8dd7a615a21bc3944f809c4560 100644 (file)
@@ -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
 }
index d1e995013cb93708fdf345f1c18a5c08fe6f458a..072e61f6a3cd179e85979f045ccbfeb2dca5ff23 100644 (file)
@@ -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;
index ef0904c1a2dbfe4a6af2dc8ea4144967ddfbed10..6e2b1abd1370f462735dc29e3250614323874323 100644 (file)
@@ -2,5 +2,5 @@
 
 fn main() {
     T::new();
-    //~^ ERROR no function or associated item named `new` found for type `T` in the current scope
+    //~^ ERROR no function or associated item named `new` found
 }
index 5189ffa62d1ba23446eb46c849f4fa2af97a3699..fd7fdb4f7226c6eb0c4afbc42d29d17f7d443e65 100644 (file)
@@ -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;
index 1a38d3d7601b815ce68d028b46263928c97d1d4e..f4144277f16bee48d3b60925152847308c0ccf11 100644 (file)
@@ -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`
 }
index f427c1ba0adfb3636c6bac161187192d30a384c7..20f4c320e669aaf531b1d67b7cd9095727bb095e 100644 (file)
@@ -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 {};
index 89bfccf2fbc56f1cdd5d798b57f16adc904c61c1..a78a003661d6f96e507aa640793eb264f6c3862a 100644 (file)
@@ -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;
index 73571a375b5f64fad49e6d84ba553cbb452f74f4..6b80d99b3afe9a534c7f133dd20dfaed5fbe645c 100644 (file)
@@ -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();
index 736369dab83549237717f2561db9d710ce96256a..5d75f5034bc65d078f9956fb9107d61f8927ae2c 100644 (file)
@@ -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!(); }
index a116c5b38ce97a00b42e5a4d1234e2ce47fd88e4..15c4acbc939bc8f2527c61837df55c1cc6efd6bc 100644 (file)
@@ -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!(); }
 }
 
index c3ce484edf7a95a13c719eeb0f8c02c1e92135e9..8e3609292a7f9c2a1230992581aec8b54d1cdb87 100644 (file)
@@ -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!(); }
index 644d26b34060c94e7c9384ff43b5ef43b83d9d92..1605f3434cf5ade5269a9a656a17971492c0cb48 100644 (file)
@@ -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();
index 2bff01be9b813a4e515297abd07d9cd9a14747f8..41f48cb56933e3f7434b03741061859d09ad29ec 100644 (file)
@@ -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
 }
index 441191beaf588002d2def67298bb35f718a6c292..57417975474f7fe718b76bc15f7f081ccbcb48e1 100644 (file)
@@ -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;
index fb870d6c6f0764fa739c8fccce82ec7c2c5f024e..7f2eb0c21e61df5f5961d2989a1616c65ed200e5 100644 (file)
@@ -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;
index c912873a6c05c5193ec48ff98ddcb27f6c27a538..c8abc2d8f8ee05d359b9f7a09fdc2e1f78fd6a1d 100644 (file)
@@ -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
index f0a03e1be82ac5e7c48d16725fc9e7fd8e5cf927..da25617e18759c08da121adaa650cc6b6ca3b605 100644 (file)
@@ -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();
index f4567554d0dbbe160d701dd2834f56019d877257..8c59fbd530129d5e4bbd04927a6f8b09b03963d5 100644 (file)
@@ -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;
index 80ca051ceff0df2f2529b89dd6d013e2b854dac6..666fb6ab2bbb1580cd06ad2cde864711531a5e65 100644 (file)
@@ -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();
index cdb261a238e5654a1caf812a44d0dfe5c24a4b07..2f31636f8adf9ba3404a678d240c3e7fafa59ef0 100644 (file)
@@ -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() {
index c15c5392fac2590147df668ed903a6f1ec23f5d5..b6847cd755c3fb7de03da89b275a43193598383d 100644 (file)
@@ -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()();
index fe920c1693982649a7af5a46ec2265bf0ed09f32..b412d7bc70436ea150aaf295aac3e70e2216ee72 100644 (file)
@@ -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;
index 4e5cace525787e41ab27914af6c6ae3954c7c0fc..efde16167b71b9f85e3f8ed1a8240fb81e296441 100644 (file)
@@ -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());
index 98a354b1bd0fc5f5f7b337c5ed034d777de63725..dfd84b9a79d404e701c79d068ddfb13c8efbbf9b 100644 (file)
@@ -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() {}
index 72038ea20a3fae86b269f5060ca868f2c359cc93..584b05ec44d3fed5b1ce957a7c45a44b87090245 100644 (file)
@@ -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 {
index 8518ed34aee9f7e3aebddbf5099db47000f87543..fbcce4b8344670a0039973a2dad54e32d9f710e8 100644 (file)
@@ -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() {}
index 7c15598448d7fe6ccd01a16ff1f81cd874918934..92f4c546440ab7f053ac3e73a19dc2de676ad419 100644 (file)
@@ -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
 }
index 699e41156fa808e463690e04cbbc941895f3fa63..89f70fda786eabdb80dbc420857c617da0bbabbe 100644 (file)
@@ -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 {
index 157f20d22d8ae85d00b7b8306c2c054989d6993d..09f9ebccf250547fdff98f8e22ec2e9979bf8408 100644 (file)
@@ -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() {}
index 97100ed375374b70c5bbdec22d18c6366291aa92..a81b459a34cbeb08ada5c259507044bc96e2a666 100644 (file)
@@ -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 {
index adad6c35a3f67e5bd75780dacc32edd76e669821..ea042a6c76bb474905870f161133726a778b1475 100644 (file)
@@ -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
 }
index c9ede03003434a3f490c2fd5cd42a7f6454112cf..aa720fd45895a88f2096a059ce49dcce141bb64a 100644 (file)
@@ -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 {
index e315317c98a6c7fb646be3d80a527b9796a31fd4..77bc829209440b40bf68151c9e369fdeef41cc86 100644 (file)
@@ -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<Output = Type>`
 
-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<Output = Type>`
 
-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;
index 4d286be1e3302ae0e8bb3db6efd4bd123fb5897c..c543ef9b0e3d8466b024cab48a009f1e62ca1001 100644 (file)
@@ -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() { }
index 6493565d2164719b9b51cf36c6cf35c469b78b0e..f0a1e2d006179e0949b4e5abedc2dc8345b4aa97 100644 (file)
@@ -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
             _ => (),
         }
     });
index 7411896443dfe80d153807fd8a884ef8a3409ea9..2736ee881d564869dd981245ff54acf5aaf96246 100644 (file)
@@ -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 {
index 1cd3f84f7a2270ec54df1c7817df02dbfa64707d..dd2784841758cfcbec14d49636bdcd8f723b10ac 100644 (file)
@@ -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
 }
index c537c6118f3a8cbb609c9fa5b7768d5fc6004e48..fff20248b70d5638dbcf1d2298149adfcd9ffe30 100644 (file)
@@ -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();
index 4fc32e0de8d57d43687753537ecc67e729ff1210..705355d91bf3cfb68d63922c63493c862406acb3 100644 (file)
@@ -5,5 +5,5 @@
 
 fn main() {
     let ug = Graph::<i32, i32>::new_undirected();
-    //~^ ERROR no function or associated item named `new_undirected` found for type
+    //~^ ERROR no function or associated item named `new_undirected` found
 }
index 32bbd4d03d6d7558037430a0e45371abb527d482..bc6731601f095644e8ee8088d939dd641efd58ae 100644 (file)
@@ -1,4 +1,4 @@
-error[E0599]: no function or associated item named `new_undirected` found for type `issue_30123_aux::Graph<i32, i32>` in the current scope
+error[E0599]: no function or associated item named `new_undirected` found for struct `issue_30123_aux::Graph<i32, i32>` in the current scope
   --> $DIR/issue-30123.rs:7:33
    |
 LL |     let ug = Graph::<i32, i32>::new_undirected();
index 38cf3c4f930e8a84a5c1d8c0701aae0623e12dab..a614b96ac1439cc853144cff4bffaeab4f905364 100644 (file)
@@ -7,7 +7,7 @@ LL |         .cloned()
    = note:   expected type `u8`
            found reference `&_`
 
-error[E0599]: no method named `collect` found for type `std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [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<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>` in the current scope
   --> $DIR/issue-31173.rs:14:10
    |
 LL |         .collect();
index 09c499452adb687b737843c63ed5c2d4bc8c33e8..de544afae73b2bc3fc6a188e9da2068b04b8e57d 100644 (file)
@@ -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
     <i32 as std::str::FromStr>::from_str(&baz); // No complaints about `str` being unsized
 }
index e6b74d262c340d4f04985e24d1206579378e8296..bbd8042d1cd6b4eb7f23b8e4e130d76b74cae43f 100644 (file)
@@ -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();
index fc2c3679e13b8c3ef67d9db03b9d36592f73a4bc..632ddb91b36fda42dfb848f21a4daf6b3d97efa5 100644 (file)
@@ -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`
     }
 }
 
index 194bb2bfab8ae29d532aff3f1a62515cfa96639c..f9a25b69ff6210120212f96d52df10a2982e6ef5 100644 (file)
@@ -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`.
index e34b5c9a0f47e3a7b84a3902ce756769ce4808d1..afe4d42edd8c8da6ec5b6931f4eb6aee65417c48 100644 (file)
@@ -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
 }
index 3055e316a082a381197317e563b7dc2601956aca..c52ea4ef9daa9c744782e74094b946aaa68438fb 100644 (file)
@@ -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();
index b381203856e925a6ead03990b06868d2840345a0..a998f95d306cb05d8fbd946b55072704fcde30c1 100644 (file)
@@ -1,4 +1,4 @@
-error[E0599]: no method named `is_subset` found for type `&std::collections::HashSet<T>` in the current scope
+error[E0599]: no method named `is_subset` found for reference `&std::collections::HashSet<T>` in the current scope
   --> $DIR/issue-35677.rs:4:10
    |
 LL |     this.is_subset(other)
index 844a2dc00698efa7043eda3566e1a7999843e9ea..0817c51ee4eabccd1fd7666e077590c66654c67f 100644 (file)
@@ -7,7 +7,7 @@ pub fn boom() -> bool {
         return 1+1 == 2
     }
     pub fn chirp(&self) {
-        self.boom(); //~ ERROR no method named `boom` found for type `&Obj` in the current scope
+        self.boom(); //~ ERROR no method named `boom` found
     }
 }
 
index b98bc572a397c6c87cbf8b6ed148beb919fe5b1f..6ca2deee377a3690e52c01f34cd0006172143543 100644 (file)
@@ -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();
index 60a8793b4e6be0811e2f6e473865a3ac054c88b7..3d28f1936b47fd4d1de50df3d256b7cfab873641 100644 (file)
@@ -1,5 +1,5 @@
 fn foo<T: Iterator>() {
-    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() { }
index 603d42ca35e0b2598b1d52bf26096d0b4a7271b1..0022065a32c3d98a762f227926e139b62158b73e 100644 (file)
@@ -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;
index 8b173e1b50c1e9ebcc4e2046c8ccf70fbe875542..2f6e676538e963a8e24af9c793a3ceb341976322 100644 (file)
@@ -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();
index 5af48ca4c0dbc9f1a598ebdd9f789b8dc249612f..3a75956af528012fdc8a16fb3db0b5d5925f6dd1 100644 (file)
@@ -12,7 +12,7 @@ fn dim() -> usize {
 
 pub struct Vector<T, D: Dim> {
     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,
 }
 
index b945b5e665459fd626e4d8fe6a9230a27c756a4e..0554b232c248b7f1189d4584c77cd0bc72db0c61 100644 (file)
@@ -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()],
index 4e00915683a2d5eccdd1c8cc5de8370e7c02720e..a5ed5b87051e798ad5d8185d3a2efc4ab7524eee 100644 (file)
@@ -20,6 +20,6 @@ fn to_string(&self) -> String {
 
 fn main() {
     let p = Point::new(0.0, 0.0);
-    //~^ ERROR no function or associated item named `new` found for type `Point`
+    //~^ ERROR no function or associated item named `new` found for struct `Point`
     println!("{}", p.to_string());
 }
index ee07a410a9c863ced5729c2b79480fd4fa26ef99..63282e8d86d7b32ebf60ca25bec48bcca8ffacca 100644 (file)
@@ -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 {
index 16facc5a78f8d8ccab8081387a913a4b084c9f4a..10cde21abd7660db8e95f0b8de36815084ab6aaf 100644 (file)
@@ -25,5 +25,5 @@ fn size_hint(&self) -> (usize, Option<usize>) { (std::usize::MAX, None) }
 fn main() {
     let a = iterate(0, |x| x+1);
     println!("{:?}", a.iter().take(10).collect::<Vec<usize>>());
-    //~^ ERROR no method named `iter` found for type `Iterate<{integer}
+    //~^ ERROR no method named `iter` found
 }
index 0e1d55c339eb4437b7eee548e883727c1be7d7d4..09d5594f73f06bd360f1eea195d23d3317cc1794 100644 (file)
@@ -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<T, F> {
index 763bb9ae0ea9c8853677538c72fba0d98f8541e4..82cdc20df2fbdd08ec6fff8bffb95998f98fa9fc 100644 (file)
@@ -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(_)| ();
index f4f4dce7682fa51913b417046260be5ce18f4f2f..ce667a5006e6f31aebdf9bdc0e50b6132c29871f 100644 (file)
@@ -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
 }
index 4dae6c1cd158e49a94dd47c7df5359c67cb68ad4..3f63cb8e78fbaf5cc8935c6be1a96411260f5604 100644 (file)
@@ -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();
index 24c61425b8e29e2b7cce1e00efff8fd10eb616b1..5b6b8f8de18e23a057605d4229bd27291ba956cf 100644 (file)
@@ -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}>`
 }
index 0eb7bf0247565d5a4bfd61ff34811520d40e904e..f91f6e891ed90ceb5cd5f1b835aaef4b210dbe59 100644 (file)
@@ -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();
index 67ad73f58477396e6801f47bf01f1860c6fa3e8f..c5fe6ea82cb0e6e8a423f16db13ac9eb417602af 100644 (file)
@@ -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}>`
 }
index 845ddb52319c722a043faa2f54e6e862ca0b3e15..583236345cac17f5cdefa2be8bd90bbfe7d5c7c2 100644 (file)
@@ -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();
index 5e016748770dc98ebade3318b8134c9759e31dc4..fae11fe62b16c35c782a502f5f596f7eb73f79d4 100644 (file)
@@ -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();
index 6dc13da548b1246a81e3597ea23b3e6cb9225f48..48a662e98b54744949b11572627c390a6e5625f8 100644 (file)
@@ -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();
index f21e97388b6f4084b2453c4db26ac83d64fc8510..2c6231fb3b5890c98afca37f57edd41c9f55e05a 100644 (file)
@@ -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();
index 44c0c954eeeca414dd1a5f1d6bbde25f707d5853..8a5c2f4006051378e5f32bb4de0d4d5864b7eaf2 100644 (file)
@@ -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();
index b8369c9b82e1a6d267e510da1a7362aeec4c876c..af8d657999cb0d8c0c97ae2751657733e1a1f828 100644 (file)
@@ -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();
index b26705a99e3bcee38fb3e0aca0e4223dc32f7ec6..145e610d52c7c527a03f2f73ad1430563426abaa 100644 (file)
@@ -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();
index e6737662088f2081e569a6f595aaa16886cc4186..5bf0579030ad01a341ba7e1596741e2600ec2679 100644 (file)
@@ -8,5 +8,5 @@ fn foo(self: Box<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
 }
index 5034e6d538e3e307e66031b772b34cd9ad65575e..4680c8b131c50a77e4e46b373b2f6835e60de580 100644 (file)
@@ -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();
index 3830ad4b1e3ae317348558a4527e0f133c86acaf..5222e3ee95d5945bd52330be98219e17896356ec 100644 (file)
@@ -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();
index c4000c8a9d41ef72c86342e7599e8862d0aae512..e762b7bc0c89953489b640cdd48a06facc32562b 100644 (file)
@@ -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();
index 2e713cc0ab508cacc862c7caa4c700a3698f95e1..3528084f6ceb4fc02d88faa5914c0bd1e046ef55 100644 (file)
@@ -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 = <fn (&())>::make_g();
index bbdfebe1577c7e65c7f2d7171b2fa6f26589b254..b253c135b8c529fa4c883b8956c142d81af5c464 100644 (file)
@@ -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
 }
index 07f2a046b2dbbbcab2639babcc243fca79a0779f..5e98cfadf8ae7500b8730fa6f8a95c3250eca9ae 100644 (file)
@@ -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(());
index f1b2de8d8b36f21525c215c166aacb68e840251c..e7a244e9df576619b61c7f964ce2cedad4d07931 100644 (file)
@@ -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;
index e0eaafdfc2f2213e3bb1da7166d2ce0615b99eaf..018ce0459fd6f21794251af2a8bf3aab56bf31f4 100644 (file)
@@ -5,7 +5,7 @@ trait Foo {
 trait Bar {}
 
 fn do_stuff<T : Bar>(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() {}
index 24bf60abf6a7828adc4bc4b650e18638ce7efa50..4807a0930e7d02e733b79d148bdbedde68410939 100644 (file)
@@ -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()
index 7add8afee437f54c956ffa91038e9c61e94af5f9..d3dcb3380bbccbf89baa5f640e1cf2a75ee572c7 100644 (file)
@@ -4,5 +4,5 @@
 
 fn main() {
     Foo::bar();
-    //~^ ERROR no function or associated item named `bar` found for type `Foo`
+    //~^ ERROR no function or associated item named `bar` found for struct `Foo`
 }
index bbeab405e293502d17a567c5514c3c8ca86de98e..73e13c65cf37f23e51b388d8d87eb752fcce38cb 100644 (file)
@@ -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;
index a7843a930119a222f6968f014171060903218a1e..6bb0877e9b9bafe463240d81eebbe565591808bb 100644 (file)
@@ -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();
index e0dec0a4a705f52256d60a7e8ecdad2422165786..5ff4b412667c23ad249784d6d757cc6e7907d0b7 100644 (file)
@@ -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);
 }
index 94c27b7d17865abee9dc5e8cff7fb8bb5cc993c1..7efdd91708a80618bd0b206e233b4a613db76f7c 100644 (file)
@@ -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;
index da018aa89482c58cdf9a4318973389713ee0e213..f8d677b99d6934a2462c8380e5b5048bf6d6534c 100644 (file)
@@ -1,4 +1,4 @@
-error[E0599]: no method named `count` found for type `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [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<std::iter::Fuse<std::iter::Once<&str>>, [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();
index 83cea168465154d54b6b8ca6a582b444939c4e0b..58ceaffc96400f2dcce4292a9100f626fdbb1214 100644 (file)
@@ -3,5 +3,5 @@
 fn main() {
     let a: Result<(), Foo> = Ok(());
     a.unwrap();
-    //~^ ERROR no method named `unwrap` found for type `std::result::Result<(), Foo>`
+    //~^ ERROR no method named `unwrap` found
 }
index 865092e4e9ccccc385d99dbc30934e5f9c9d0cb5..bbfb00050566a4d289f27743ea1837c591eaa954 100644 (file)
@@ -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();
index d46f0e61793f35ce713c8d9246d0587cebdbcabb..d6426d2cfabfda31785f8dbccf1f5f8696b3daba 100644 (file)
@@ -11,5 +11,5 @@ fn bind<B, F>(&self, mut f: F) where F: FnMut(A) -> Vec<B> {
 }
 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
 }
index 8ce2ba033321e2e28caec3836bea032654484492..9645244751dabe6e8c23c2800517ae74a7c33e6f 100644 (file)
@@ -6,7 +6,7 @@ LL |         for elt in self { r = r + f(*elt); }
    |
    = help: the trait `std::ops::Add<std::vec::Vec<B>>` 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] );
index b05c29c0d40360ccbf8db0f8d8c7df036660f302..074ed66a261836c4e986e348dbdee4356849dd62 100644 (file)
@@ -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();
index c1c50211381899c53909aafd76cce0f20e3311e0..6c3c4a6ac98884b7552ba53d1b08e51a3a765669 100644 (file)
@@ -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 {
index 2df628ecf8e500434226e3d1a6e9a871495b1f60..855894b4495c6baba701a7bece186aeb28e1ebc0 100644 (file)
@@ -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();
index dec5809f1539bd8be297cdb7f2bbc38bf3f7a891..96401cb71d961efd64be50a3ad5db3d5059650f1 100644 (file)
@@ -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;
index e93c4da9dfc85145735429a4aa9c5da0ecab9efd..28a7b68a6821f9c4a5f390bf2db1037b09305a3f 100644 (file)
@@ -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<Self>); }
index d6bf543352701befc89fd10daca01e6bf4eb9281..1e001827e475feda512e1bdc6607132519610389 100644 (file)
@@ -18,7 +18,7 @@ fn foo(&self) {
         //~^ ERROR cannot find function `bar` in this scope
 
         self.bar();
-        //~^ ERROR no method named `bar` found for type
+        //~^ ERROR no method named `bar` found for reference
     }
 }
 
index 452c31275153a88a4fe6a62bc0a0c4f005fb0ea7..4bd025ea0763091d5cdb91d7a60512c6f7c48731 100644 (file)
@@ -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();
index 3597cc53420aa82e5bf63d18fb44e5a79876a7c4..362907ecbd7efeed96f65fef82aace80c04b7c0f 100644 (file)
@@ -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()
index ea0a66540b93125888be4906a7f0d4c5b12fa7a4..eddd158aef0817d800679f6443fd4e11d14f7544 100644 (file)
@@ -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: ManyImplTrait>(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() {
index 53a6238422b571217f1b1a854f438540d0e6b031..eb85be039ba04a44b4d7ad005c0c1ddfff17efda 100644 (file)
@@ -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()
index 34a141685739cfffa6607165c8e0405d66b2e407..5c104449fe9c0b4ce69b3a4c7515010f54c3bff9 100644 (file)
@@ -20,5 +20,5 @@ fn foo_one(&self) -> &'static str {
 
 fn main() {
     println!("{}", MyStruct.foo_one());
-    //~^ ERROR no method named `foo_one` found for type `MyStruct` in the current scope
+    //~^ ERROR no method named `foo_one` found
 }
index bbfe4c3d59dcf15e4e5cb4f372e1e8dfc9c257b4..19809778a5e360dac1f8cabe0b8c8bb51d5f6387 100644 (file)
@@ -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;
index dda9e931353b21be902616f225b67f3c112c7bfa..f292f27f0f342b312a73681fb5ec6049c5009d43 100644 (file)
@@ -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
     }
 }
 
index 4ef0eff5bd7699b1417319c8b4c72ce203759043..99ccf7a7f3bdf712cf43b19f7c3576ed493318ad 100644 (file)
@@ -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
     }
 }
 
index 3cc351ac80aed245af906e9420278697274feeb1..f1c50e59a845eaacd7e633765c0d2c320cacec4f 100644 (file)
@@ -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());
index 4aec72006eef03c36312150841e369bb60ff1350..db54d044d9e9264721834ad6f6a7dfd467b5ec55 100644 (file)
@@ -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();
index f2496f696d698294614be3a36aafc4620e714eb7..14c7b18ea51d36569afceba86ddff3ffb33d27d7 100644 (file)
@@ -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<T: Foo + std::fmt::Debug>(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()
index dcef2ada63beac30a15d76f58ef2f085acf908b2..f8b86377187c589077d3ac33468f0cdae6ce5ce8 100644 (file)
@@ -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
 }
index daa8e1162d197a54187ab4c548351cff66f93928..2c3c07c19e7bd87d5ceeab9d79d5d2943b7692dc 100644 (file)
@@ -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();
index d10300b48ba1e8c81810ef01dfffe2cdf9f8c4ac..289a784ba6af35129a3a2450838a087bb68ee23e 100644 (file)
@@ -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() {}
index eae9cc075084a683c6b87d208b181bf2a9d3dab8..534c497780a95e959982113289f50a128fcc8629 100644 (file)
@@ -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();
index 5480adb31015a360e0b26cd35b8434a1105360f5..f738a1f2119811885144198c617f9e2defd8145a 100644 (file)
@@ -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
 }
index a1c0126146e73278a2f3942db88d02ef1a1cde84..507f822e7b8048a11227bad4ec664f0e1d8c3ef2 100644 (file)
@@ -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();
index ef4b38de9473272d78c489e6349319622673832e..2a829db538390e6178c170477bf08b498018b022 100644 (file)
@@ -7,5 +7,5 @@ fn default_hello() {}
 fn main() {
     let x = GenericAssocMethod(33i32);
     x.default_hello();
-    //~^ ERROR no method named `default_hello` found for type `GenericAssocMethod<i32>`
+    //~^ ERROR no method named `default_hello` found
 }
index 8cfa7de08bb38f163ecc4c47a1e86280b2aa6fa4..dfc1887d3af90d4796c4168507684f4d6d171bde 100644 (file)
@@ -1,4 +1,4 @@
-error[E0599]: no method named `default_hello` found for type `GenericAssocMethod<i32>` in the current scope
+error[E0599]: no method named `default_hello` found for struct `GenericAssocMethod<i32>` in the current scope
   --> $DIR/suggest-assoc-fn-call-with-turbofish.rs:9:7
    |
 LL | struct GenericAssocMethod<T>(T);
index 4678410eb48599b33ea3c4e8b266de11e4db9569..a715c565946e041ca5ff7926b0180415f498f51e 100644 (file)
@@ -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();
index d418834432e0844e15183c03703d97b8877b0538..dd05d0f04abe3c0ffe2e1e6e2848592574c62c05 100644 (file)
@@ -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
index b4338e2055431f74c9a3370704e9b067c9b9196b..9227baa3e1a5c2d689f991dcb804485c05a69519 100644 (file)
@@ -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 {
index 43b822218354fafa4def2fff1cf7d350c18ecb1a..d22ac72d1cc4d48ad6f165cb045394b58f4e7323 100644 (file)
@@ -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
 }
index 0d61c3ed00d909e3ddd1788b91d741c83133ea48..da0936e8eebdc55268630907bdf05c97f8a75c43 100644 (file)
@@ -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();
index d58bbef38c492ba238c8b94c751ca919d5a1a44c..8507d8ef17e3649c9204b442b9d7a253b0440c07 100644 (file)
@@ -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
index 64a92c6b0b47860536d6d30ad45ad0a761d59a69..4df8845de279ae2042639aeede55455783ab14fa 100644 (file)
@@ -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;
index 82a593ff16cfa165f87018dcf7dc2174b72a8eb4..66d4db3ebaf0a6df2feb64d0c437f7ad9b019553 100644 (file)
@@ -35,7 +35,7 @@ fn main() {
     <u8 as A>::N::NN; //~ ERROR cannot find associated type `N` in `A`
     let _: <u8 as Tr>::Y::NN; //~ ERROR ambiguous associated type
     let _: <u8 as E>::Y::NN; //~ ERROR expected associated type, found variant `E::Y`
-    <u8 as Tr>::Y::NN; //~ ERROR no associated item named `NN` found for type `<u8 as Tr>::Y`
+    <u8 as Tr>::Y::NN; //~ ERROR no associated item named `NN` found
     <u8 as E>::Y::NN; //~ ERROR expected associated type, found variant `E::Y`
 
     let _: <u8 as Tr::N>::NN; //~ ERROR cannot find associated type `NN` in `Tr::N`
@@ -52,5 +52,5 @@ fn main() {
     let _: <u8 as Dr>::Z; //~ ERROR expected associated type, found method `Dr::Z`
     <u8 as Dr>::X; //~ ERROR expected method or associated constant, found associated type `Dr::X`
     let _: <u8 as Dr>::Z::N; //~ ERROR expected associated type, found method `Dr::Z`
-    <u8 as Dr>::X::N; //~ ERROR no associated item named `N` found for type `<u8 as Dr>::X`
+    <u8 as Dr>::X::N; //~ ERROR no associated item named `N` found
 }
index dbd41da6daf0b9a59f49bc0bd3180b961324dd05..60ebe8ee053a6a3af905c060d307959a20ec8a29 100644 (file)
@@ -207,13 +207,13 @@ error[E0223]: ambiguous associated type
 LL |     let _: <u8 as Tr>::Y::NN;
    |            ^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<<u8 as Tr>::Y as Trait>::NN`
 
-error[E0599]: no associated item named `NN` found for type `<u8 as Tr>::Y` in the current scope
+error[E0599]: no associated item named `NN` found for associated type `<u8 as Tr>::Y` in the current scope
   --> $DIR/ufcs-partially-resolved.rs:38:20
    |
 LL |     <u8 as Tr>::Y::NN;
    |                    ^^ associated item not found in `<u8 as Tr>::Y`
 
-error[E0599]: no associated item named `N` found for type `<u8 as Dr>::X` in the current scope
+error[E0599]: no associated item named `N` found for associated type `<u8 as Dr>::X` in the current scope
   --> $DIR/ufcs-partially-resolved.rs:55:20
    |
 LL |     <u8 as Dr>::X::N;
index 18276d5710cf8950f2230dd756ded993b156f366..2d058521e4ef609f84b01d701907043116ac0f49 100644 (file)
@@ -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, ));
index 44cfc5cc5d22e21cbb17df7860b34e732f38c667..2983613786038ec12c506d3085c3e29d4392ac3b 100644 (file)
@@ -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();
index 102c17f6f5618017da5299e4d963617c54fdd3c3..eb16fa9d5660b49fa5c90344a539ef42afa061e2 100644 (file)
@@ -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();
index 60e280f53f52c8dc0caabf6f4aad068a4c312c73..4a106cc940a18a35a8f668bca0ced845eb2b3a17 100644 (file)
@@ -34,5 +34,5 @@ union U5<T> {
 
 fn main() {
     let u = U5 { a: ManuallyDrop::new(CloneNoCopy) };
-    let w = u.clone(); //~ ERROR no method named `clone` found for type `U5<CloneNoCopy>`
+    let w = u.clone(); //~ ERROR no method named `clone` found for union `U5<CloneNoCopy>`
 }
index 6893f9176f2db7778bd846d090c0707a2f9dcacc..0ef5753b5907d847e1e8e5afc7e87c5d8a4d0ab9 100644 (file)
@@ -6,7 +6,7 @@ LL | #[derive(Clone)]
    |
    = note: required by `std::clone::AssertParamIsCopy`
 
-error[E0599]: no method named `clone` found for type `U5<CloneNoCopy>` in the current scope
+error[E0599]: no method named `clone` found for union `U5<CloneNoCopy>` in the current scope
   --> $DIR/union-derive-clone.rs:37:15
    |
 LL | union U5<T> {
index cd46878c19be4972473a49ed57466a77fbc0c036..92cda6482c0d90c896bdfd7d2756f65948f5cbfd 100644 (file)
@@ -1,4 +1,4 @@
-error[E0599]: no method named `clone` found for type `std::boxed::Box<dyn Foo>` in the current scope
+error[E0599]: no method named `clone` found for struct `std::boxed::Box<dyn Foo>` in the current scope
   --> $DIR/unique-object-noncopyable.rs:24:16
    |
 LL |     let _z = y.clone();
index 19ef2b21c26854b1b853ca54782ac829b26b5199..e5c3eaccbd3ecf73ea90e9edfe48e97b1b3f8eb2 100644 (file)
@@ -1,4 +1,4 @@
-error[E0599]: no method named `clone` found for type `std::boxed::Box<R>` in the current scope
+error[E0599]: no method named `clone` found for struct `std::boxed::Box<R>` in the current scope
   --> $DIR/unique-pinned-nocopy.rs:12:16
    |
 LL |     let _j = i.clone();
index b72d45ebdbfbc0e47d5643153de8a106716cf37a..e057a7842b2aaa386f1561ef94282a53a4279fad 100644 (file)
@@ -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<usize, _>` in the current scope
+error[E0599]: no function or associated item named `lol` found for trait object `dyn Bar<usize, _>` in the current scope
   --> $DIR/unspecified-self-in-trait-ref.rs:16:30
    |
 LL |     let d = Bar::<usize, _>::lol();