]> git.lizzy.rs Git - rust.git/commitdiff
Give method not found a primary span label
authorEsteban Küber <esteban@kuber.com.ar>
Fri, 6 Sep 2019 19:00:07 +0000 (12:00 -0700)
committerEsteban Küber <esteban@kuber.com.ar>
Mon, 9 Sep 2019 01:27:02 +0000 (18:27 -0700)
63 files changed:
src/librustc_typeck/check/method/suggest.rs
src/test/ui/auto-ref-slice-plus-ref.stderr
src/test/ui/class-cast-to-trait.stderr
src/test/ui/coherence/coherence_inherent.old.stderr
src/test/ui/coherence/coherence_inherent.re.stderr
src/test/ui/coherence/coherence_inherent_cc.old.stderr
src/test/ui/coherence/coherence_inherent_cc.re.stderr
src/test/ui/const-generics/invalid-const-arg-for-type-param.stderr
src/test/ui/copy-a-resource.stderr
src/test/ui/derives/derive-assoc-type-not-impl.stderr
src/test/ui/error-festival.stderr
src/test/ui/hygiene/no_implicit_prelude.stderr
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.stderr
src/test/ui/impl-trait/method-suggestion-no-duplication.stderr
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-15207.stderr
src/test/ui/issues/issue-1871.stderr
src/test/ui/issues/issue-19521.stderr
src/test/ui/issues/issue-19692.stderr
src/test/ui/issues/issue-2149.stderr
src/test/ui/issues/issue-21596.stderr
src/test/ui/issues/issue-25385.stderr
src/test/ui/issues/issue-2823.stderr
src/test/ui/issues/issue-29124.stderr
src/test/ui/issues/issue-29181.stderr
src/test/ui/issues/issue-31173.stderr
src/test/ui/issues/issue-34334.stderr
src/test/ui/issues/issue-35677.stderr
src/test/ui/issues/issue-39175.stderr
src/test/ui/issues/issue-41880.stderr
src/test/ui/issues/issue-43189.stderr
src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr
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/macros/macro-backtrace-invalid-internals.stderr
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.stderr
src/test/ui/non-copyable-void.stderr
src/test/ui/noncopyable-class.stderr
src/test/ui/object-pointer-types.stderr
src/test/ui/rust-2018/trait-import-suggestions.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/shadowed/shadowed-trait-methods.stderr
src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.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/suggest-methods.stderr
src/test/ui/traits/trait-impl-1.stderr
src/test/ui/traits/trait-item-privacy.stderr
src/test/ui/trivial-bounds/trivial-bounds-leak.stderr
src/test/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr
src/test/ui/underscore-imports/shadow.stderr
src/test/ui/union/union-derive-clone.stderr
src/test/ui/unique-object-noncopyable.stderr
src/test/ui/unique-pinned-nocopy.stderr

index 72e6f5971596092ab92b2fa39819ee86265089eb..3e45b1e98d4ec52e64e920c378b99d51b9516699 100644 (file)
@@ -425,6 +425,9 @@ pub fn report_method_error<'b>(
                             "private field"
                         };
                         err.span_label(item_name.span, format!("{}, not a method", field_kind));
+                    } else if lev_candidate.is_none() && static_sources.is_empty() {
+                        err.span_label(span, format!("{} not found in `{}`", item_kind, ty_str));
+                        self.tcx.sess.trait_methods_not_found.borrow_mut().insert(orig_span);
                     }
                 } else {
                     err.span_label(span, format!("{} not found in `{}`", item_kind, ty_str));
index f2e0d379d1b3084416f4805c882922847f2d8e4b..3e36f2402a99080af536df5b6006906af7d8abab 100644 (file)
@@ -12,7 +12,7 @@ error[E0599]: no method named `test` found for type `std::vec::Vec<{integer}>` i
   --> $DIR/auto-ref-slice-plus-ref.rs:8:7
    |
 LL |     a.test();
-   |       ^^^^
+   |       ^^^^ method not found in `std::vec::Vec<{integer}>`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `test`, perhaps you need to implement it:
@@ -22,7 +22,7 @@ error[E0599]: no method named `test` found for type `[{integer}; 1]` in the curr
   --> $DIR/auto-ref-slice-plus-ref.rs:10:11
    |
 LL |     ([1]).test();
-   |           ^^^^
+   |           ^^^^ method not found in `[{integer}; 1]`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `test`, perhaps you need to implement it:
@@ -32,7 +32,7 @@ error[E0599]: no method named `test` found for type `&[{integer}; 1]` in the cur
   --> $DIR/auto-ref-slice-plus-ref.rs:11:12
    |
 LL |     (&[1]).test();
-   |            ^^^^
+   |            ^^^^ method not found in `&[{integer}; 1]`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `test`, perhaps you need to implement it:
index 39f308cdfd490a59c8c64b4d17e57cf74a2187a2..4cab52e3e974ca40075bbd727de647df0454ee29 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `eat` found for type `std::boxed::Box<dyn Noisy>`
   --> $DIR/class-cast-to-trait.rs:53:8
    |
 LL |   nyan.eat();
-   |        ^^^
+   |        ^^^ method not found in `std::boxed::Box<dyn Noisy>`
 
 error: aborting due to previous error
 
index fa564459b21334faf795a35ce3dfd7a5ad0592da..750d243480638ff5827a0735685eb719633c1b4d 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `the_fn` found for type `&Lib::TheStruct` in the c
   --> $DIR/coherence_inherent.rs:35:11
    |
 LL |         s.the_fn();
-   |           ^^^^^^
+   |           ^^^^^^ method not found in `&Lib::TheStruct`
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
index fa564459b21334faf795a35ce3dfd7a5ad0592da..750d243480638ff5827a0735685eb719633c1b4d 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `the_fn` found for type `&Lib::TheStruct` in the c
   --> $DIR/coherence_inherent.rs:35:11
    |
 LL |         s.the_fn();
-   |           ^^^^^^
+   |           ^^^^^^ method not found in `&Lib::TheStruct`
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
index 4d93e699031f37896c917b8e2f132ae680a389cc..59166a46094069b99e665f07e7274b7252a64173 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `the_fn` found for type `&coherence_inherent_cc_li
   --> $DIR/coherence_inherent_cc.rs:26:11
    |
 LL |         s.the_fn();
-   |           ^^^^^^
+   |           ^^^^^^ method not found in `&coherence_inherent_cc_lib::TheStruct`
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
index 4d93e699031f37896c917b8e2f132ae680a389cc..59166a46094069b99e665f07e7274b7252a64173 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `the_fn` found for type `&coherence_inherent_cc_li
   --> $DIR/coherence_inherent_cc.rs:26:11
    |
 LL |         s.the_fn();
-   |           ^^^^^^
+   |           ^^^^^^ method not found in `&coherence_inherent_cc_lib::TheStruct`
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
index 8f3f91651edfb351ad700fc128c6a3bb7db01c2f..47b090cb886783da762f369c8d999d49b9357e6c 100644 (file)
@@ -11,7 +11,7 @@ LL | struct S;
    | --------- method `f` not found for this
 ...
 LL |     S.f::<0>();
-   |       ^
+   |       ^ method not found in `S`
 
 error[E0107]: wrong number of const arguments: expected 0, found 1
   --> $DIR/invalid-const-arg-for-type-param.rs:8:9
index cceb9e328b676cae0bcad4de809f119951446cd9..054bd0914d31c300fb5e638f8455d4ab47913d39 100644 (file)
@@ -5,7 +5,7 @@ LL | struct Foo {
    | ---------- method `clone` not found for this
 ...
 LL |     let _y = x.clone();
-   |                ^^^^^
+   |                ^^^^^ method not found in `Foo`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `clone`, perhaps you need to implement it:
index b9e175e43d1cf5c63feba45469ea604ce31ff3d5..038de80508ac23962fb97fdb7238994603160320 100644 (file)
@@ -5,7 +5,7 @@ LL | struct Bar<T: Foo> {
    | ------------------ method `clone` not found for this
 ...
 LL |     Bar::<NotClone> { x: 1 }.clone();
-   |                              ^^^^^
+   |                              ^^^^^ method not found in `Bar<NotClone>`
    |
    = note: the method `clone` exists but the following trait bounds were not satisfied:
            `Bar<NotClone> : std::clone::Clone`
index 8808e95d81b184e63931a82c4b970045857104ba..73571a375b5f64fad49e6d84ba553cbb452f74f4 100644 (file)
@@ -24,7 +24,7 @@ error[E0599]: no method named `z` found for type `&str` in the current scope
   --> $DIR/error-festival.rs:16:7
    |
 LL |     x.z();
-   |       ^
+   |       ^ method not found in `&str`
 
 error[E0600]: cannot apply unary operator `!` to type `Question`
   --> $DIR/error-festival.rs:19:5
index 643f803f62049b1695bd14e3289ab8eb160e2fd9..8fa55d05bddcb02f9631345cda886b4c0621d9ce 100644 (file)
@@ -22,7 +22,7 @@ LL |     fn f() { ::bar::m!(); }
    |              ------------ in this macro invocation
 ...
 LL |         ().clone()
-   |            ^^^^^
+   |            ^^^^^ method not found in `()`
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
index 4192b97e750690641087bf1bc52521583c41e73f..39e32522c7a761295111a30ca686c2d0ef09f8b9 100644 (file)
@@ -5,7 +5,7 @@ LL |     fn f() { ::baz::m!(); }
    |              ------------ in this macro invocation
 ...
 LL |     pub macro m() { ().f() }
-   |                        ^
+   |                        ^ method not found in `()`
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
index ad108173a7a1e79e558c125226cead8efbfc1fb1..644d26b34060c94e7c9384ff43b5ef43b83d9d92 100644 (file)
@@ -10,19 +10,19 @@ error[E0599]: no method named `count_ones` found for type `impl std::marker::Cop
   --> $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
   --> $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
   --> $DIR/bindings-opaque.rs:15:17
    |
 LL |     let _ = foo.count_ones();
-   |                 ^^^^^^^^^^
+   |                 ^^^^^^^^^^ method not found in `impl std::marker::Copy`
 
 error: aborting due to 3 previous errors
 
index 666418f6ee2c15f9945764dd4425108be480dc49..441191beaf588002d2def67298bb35f718a6c292 100644 (file)
@@ -5,7 +5,7 @@ LL | struct Bar;
    | ----------- method `foo` not found for this
 ...
 LL |     f1.foo(1usize);
-   |        ^^^
+   |        ^^^ method not found in `Bar`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `foo`, perhaps you need to implement it:
index afb3376638a96f9373570e19af0718c7bc82ebd4..fb870d6c6f0764fa739c8fccce82ec7c2c5f024e 100644 (file)
@@ -5,7 +5,7 @@ LL | struct Foo;
    | ----------- method `is_empty` not found for this
 ...
 LL |     foo(|s| s.is_empty());
-   |               ^^^^^^^^
+   |               ^^^^^^^^ method not found in `Foo`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `is_empty`, perhaps you need to implement it:
index 002b60f9f258dd41ee32f038363a4bb9efbe0db5..be8f3ab1b72e88b6c168fbff2d7de52b382bdc2b 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `method` found for type `u32` in the current scope
   --> $DIR/no-method-suggested-traits.rs:23:10
    |
 LL |     1u32.method();
-   |          ^^^^^^
+   |          ^^^^^^ method not found in `u32`
    |
    = help: items from traits can only be used if the trait is in scope
 help: the following traits are implemented but not in scope, perhaps add a `use` for one of them:
@@ -20,7 +20,7 @@ error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::box
   --> $DIR/no-method-suggested-traits.rs:26:44
    |
 LL |     std::rc::Rc::new(&mut Box::new(&1u32)).method();
-   |                                            ^^^^^^
+   |                                            ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&u32>>`
    |
    = help: items from traits can only be used if the trait is in scope
 help: the following traits are implemented but not in scope, perhaps add a `use` for one of them:
@@ -38,7 +38,7 @@ error[E0599]: no method named `method` found for type `char` in the current scop
   --> $DIR/no-method-suggested-traits.rs:30:9
    |
 LL |     'a'.method();
-   |         ^^^^^^
+   |         ^^^^^^ method not found in `char`
    |
    = help: items from traits can only be used if the trait is in scope
 help: the following trait is implemented but not in scope, perhaps add a `use` for it:
@@ -58,7 +58,7 @@ LL |         fn method(&self) {}
    |            the method is available for `std::rc::Rc<std::rc::Rc<&mut std::boxed::Box<&char>>>` here
 ...
 LL |     std::rc::Rc::new(&mut Box::new(&'a')).method();
-   |                                           ^^^^^^
+   |                                           ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&char>>`
    |
    = help: items from traits can only be used if the trait is in scope
 help: the following trait is implemented but not in scope, perhaps add a `use` for it:
@@ -70,7 +70,7 @@ error[E0599]: no method named `method` found for type `i32` in the current scope
   --> $DIR/no-method-suggested-traits.rs:35:10
    |
 LL |     1i32.method();
-   |          ^^^^^^
+   |          ^^^^^^ method not found in `i32`
    |
    = help: items from traits can only be used if the trait is in scope
 help: the following trait is implemented but not in scope, perhaps add a `use` for it:
@@ -82,7 +82,7 @@ error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::box
   --> $DIR/no-method-suggested-traits.rs:37:44
    |
 LL |     std::rc::Rc::new(&mut Box::new(&1i32)).method();
-   |                                            ^^^^^^
+   |                                            ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&i32>>`
    |
    = help: items from traits can only be used if the trait is in scope
 help: the following trait is implemented but not in scope, perhaps add a `use` for it:
@@ -97,7 +97,7 @@ LL | struct Foo;
    | ----------- method `method` not found for this
 ...
 LL |     Foo.method();
-   |         ^^^^^^
+   |         ^^^^^^ method not found in `Foo`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `method`, perhaps you need to implement one of them:
@@ -110,7 +110,7 @@ error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::box
   --> $DIR/no-method-suggested-traits.rs:42:43
    |
 LL |     std::rc::Rc::new(&mut Box::new(&Foo)).method();
-   |                                           ^^^^^^
+   |                                           ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&Foo>>`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `method`, perhaps you need to implement one of them:
@@ -123,7 +123,7 @@ error[E0599]: no method named `method2` found for type `u64` in the current scop
   --> $DIR/no-method-suggested-traits.rs:45:10
    |
 LL |     1u64.method2();
-   |          ^^^^^^^
+   |          ^^^^^^^ method not found in `u64`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `method2`, perhaps you need to implement it:
@@ -133,7 +133,7 @@ error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::bo
   --> $DIR/no-method-suggested-traits.rs:47:44
    |
 LL |     std::rc::Rc::new(&mut Box::new(&1u64)).method2();
-   |                                            ^^^^^^^
+   |                                            ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&u64>>`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `method2`, perhaps you need to implement it:
@@ -143,7 +143,7 @@ error[E0599]: no method named `method2` found for type `no_method_suggested_trai
   --> $DIR/no-method-suggested-traits.rs:50:37
    |
 LL |     no_method_suggested_traits::Foo.method2();
-   |                                     ^^^^^^^
+   |                                     ^^^^^^^ method not found in `no_method_suggested_traits::Foo`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `method2`, perhaps you need to implement it:
@@ -153,7 +153,7 @@ error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::bo
   --> $DIR/no-method-suggested-traits.rs:52:71
    |
 LL |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2();
-   |                                                                       ^^^^^^^
+   |                                                                       ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `method2`, perhaps you need to implement it:
@@ -163,7 +163,7 @@ error[E0599]: no method named `method2` found for type `no_method_suggested_trai
   --> $DIR/no-method-suggested-traits.rs:54:40
    |
 LL |     no_method_suggested_traits::Bar::X.method2();
-   |                                        ^^^^^^^
+   |                                        ^^^^^^^ method not found in `no_method_suggested_traits::Bar`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `method2`, perhaps you need to implement it:
@@ -173,7 +173,7 @@ error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::bo
   --> $DIR/no-method-suggested-traits.rs:56:74
    |
 LL |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2();
-   |                                                                          ^^^^^^^
+   |                                                                          ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `method2`, perhaps you need to implement it:
@@ -186,7 +186,7 @@ LL | struct Foo;
    | ----------- method `method3` not found for this
 ...
 LL |     Foo.method3();
-   |         ^^^^^^^
+   |         ^^^^^^^ method not found in `Foo`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `method3`, perhaps you need to implement it:
@@ -196,7 +196,7 @@ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::bo
   --> $DIR/no-method-suggested-traits.rs:61:43
    |
 LL |     std::rc::Rc::new(&mut Box::new(&Foo)).method3();
-   |                                           ^^^^^^^
+   |                                           ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&Foo>>`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `method3`, perhaps you need to implement it:
@@ -209,7 +209,7 @@ LL | enum Bar { X }
    | -------- method `method3` not found for this
 ...
 LL |     Bar::X.method3();
-   |            ^^^^^^^
+   |            ^^^^^^^ method not found in `Bar`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `method3`, perhaps you need to implement it:
@@ -219,7 +219,7 @@ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::bo
   --> $DIR/no-method-suggested-traits.rs:65:46
    |
 LL |     std::rc::Rc::new(&mut Box::new(&Bar::X)).method3();
-   |                                              ^^^^^^^
+   |                                              ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&Bar>>`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `method3`, perhaps you need to implement it:
@@ -229,37 +229,37 @@ error[E0599]: no method named `method3` found for type `usize` in the current sc
   --> $DIR/no-method-suggested-traits.rs:69:13
    |
 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
   --> $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
   --> $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
   --> $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
   --> $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
   --> $DIR/no-method-suggested-traits.rs:75:74
    |
 LL |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3();
-   |                                                                          ^^^^^^^
+   |                                                                          ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>`
 
 error: aborting due to 24 previous errors
 
index 3159a4b67dae5c696391334f11867b894b8f644a..a2ad58a7e46fc8a3f36293cd5d5afee54e73f2ed 100644 (file)
@@ -44,7 +44,7 @@ LL | struct Foo;
    | ----------- method `bar` not found for this
 ...
 LL |     Foo.bar();
-   |         ^^^
+   |         ^^^ method not found in `Foo`
 
 error: aborting due to 6 previous errors
 
index 6efbd8e40ef643af2dce6b33d8ae8a40b11cbb2c..413daa6db6787ccc87f41256631dd8208a743ab7 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `foo` found for type `&b::B` in the current scope
   --> $DIR/issue-10465.rs:17:15
    |
 LL |             b.foo();
-   |               ^^^
+   |               ^^^ method not found in `&b::B`
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
index 9026845b4ed86586bf209b8f8bfa2573526ad8d8..c57ca3e25d99f2c1486fb52f8efdada97c53c04e 100644 (file)
@@ -14,7 +14,7 @@ error[E0599]: no method named `iter` found for type `&G` in the current scope
   --> $DIR/issue-13853.rs:27:23
    |
 LL |     for node in graph.iter() {
-   |                       ^^^^
+   |                       ^^^^ method not found in `&G`
 
 error[E0308]: mismatched types
   --> $DIR/issue-13853.rs:37:13
index 2d90eb80fc54cc7cf378d9964ddd81fea7807e40..25ce7cb5cc069e8608c75318dbfc4242a8a83e23 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `push` found for type `!` in the current scope
   --> $DIR/issue-15207.rs:3:15
    |
 LL |         break.push(1)
-   |               ^^^^
+   |               ^^^^ method not found in `!`
 
 error: aborting due to previous error
 
index fecd689251b328c17bf1ab606ae39c91b265f379..b774ca22dd72a153a5c3410682dfe63e8d1ac503 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `honk` found for type `{integer}` in the current s
   --> $DIR/issue-1871.rs:7:9
    |
 LL |       f.honk()
-   |         ^^^^
+   |         ^^^^ method not found in `{integer}`
 
 error: aborting due to previous error
 
index a43368be58339fe189613d14cea515f256807826..c15c5392fac2590147df668ed903a6f1ec23f5d5 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `homura` found for type `&'static str` in the curr
   --> $DIR/issue-19521.rs:2:8
    |
 LL |     "".homura()();
-   |        ^^^^^^
+   |        ^^^^^^ method not found in `&'static str`
 
 error: aborting due to previous error
 
index 5e576f11583eb96af36fbb5f512abcb4c0c771ff..fe920c1693982649a7af5a46ec2265bf0ed09f32 100644 (file)
@@ -5,7 +5,7 @@ LL | struct Homura;
    | -------------- method `kaname` not found for this
 ...
 LL |     let Some(ref madoka) = Some(homura.kaname());
-   |                                        ^^^^^^
+   |                                        ^^^^^^ method not found in `Homura`
 
 error: aborting due to previous error
 
index 1df32aafa79c89ecd013f2e38029e685de334724..8ce2ba033321e2e28caec3836bea032654484492 100644 (file)
@@ -10,7 +10,7 @@ error[E0599]: no method named `bind` found for type `[&str; 1]` in the current s
   --> $DIR/issue-2149.rs:13:12
    |
 LL |     ["hi"].bind(|x| [x] );
-   |            ^^^^
+   |            ^^^^ method not found in `[&str; 1]`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `bind`, perhaps you need to implement it:
index 8e4e09b13a9bd26ffa19931334228e627d7db101..4e5cace525787e41ab27914af6c6ae3954c7c0fc 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `to_string` found for type `*const u8` in the curr
   --> $DIR/issue-21596.rs:4:22
    |
 LL |     println!("{}", z.to_string());
-   |                      ^^^^^^^^^
+   |                      ^^^^^^^^^ method not found in `*const u8`
    |
    = note: try using `<*const T>::as_ref()` to get a reference to the type behind the pointer: https://doc.rust-lang.org/std/primitive.pointer.html#method.as_ref
    = note: using `<*const T>::as_ref()` on a pointer which is unaligned or points to invalid or uninitialized memory is undefined behavior
index e170a9d383b0ea22e3071eb204c6d6af9cd7722f..ab4db7e42a4b95757a370ed29fc73cd9e9069d4d 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `foo` found for type `i32` in the current scope
   --> $DIR/issue-25385.rs:2:23
    |
 LL |     ($e:expr) => { $e.foo() }
-   |                       ^^^
+   |                       ^^^ method not found in `i32`
 ...
 LL |     foo!(a);
    |     -------- in this macro invocation
@@ -11,7 +11,7 @@ error[E0599]: no method named `foo` found for type `i32` in the current scope
   --> $DIR/issue-25385.rs:10:15
    |
 LL |     foo!(1i32.foo());
-   |               ^^^
+   |               ^^^ method not found in `i32`
 
 error: aborting due to 2 previous errors
 
index 4c1dfb8501a91800f2f31cabf79a4a0743c8b13a..c9ede03003434a3f490c2fd5cd42a7f6454112cf 100644 (file)
@@ -5,7 +5,7 @@ LL | struct C {
    | -------- method `clone` not found for this
 ...
 LL |     let _d = c.clone();
-   |                ^^^^^
+   |                ^^^^^ method not found in `C`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `clone`, perhaps you need to implement it:
index 3beb728978884e36f08a84cc81d9fa327502edb5..c537c6118f3a8cbb609c9fa5b7768d5fc6004e48 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `x` found for type `fn() -> Ret {Obj::func}` in th
   --> $DIR/issue-29124.rs:15:15
    |
 LL |     Obj::func.x();
-   |               ^
+   |               ^ method not found in `fn() -> Ret {Obj::func}`
    |
    = note: Obj::func is a function, perhaps you wish to call it
 
@@ -10,7 +10,7 @@ error[E0599]: no method named `x` found for type `fn() -> Ret {func}` in the cur
   --> $DIR/issue-29124.rs:17:10
    |
 LL |     func.x();
-   |          ^
+   |          ^ method not found in `fn() -> Ret {func}`
    |
    = note: func is a function, perhaps you wish to call it
 
index 092014281546f6d0d85e07155ac42761014394ea..250b158ab8e33e8bd8c0bc463660e0fee500828b 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `homura` found for type `{integer}` in the current
   --> $DIR/issue-29181.rs:6:7
    |
 LL |     0.homura();
-   |       ^^^^^^
+   |       ^^^^^^ method not found in `{integer}`
 
 error: aborting due to previous error
 
index 3ca833888268170b0fa3334f2dae0044fd4c6fd9..6d03b7810939a5df47e37eec57b401c164d40081 100644 (file)
@@ -11,7 +11,7 @@ error[E0599]: no method named `collect` found for type `std::iter::Cloned<std::i
   --> $DIR/issue-31173.rs:14:10
    |
 LL |         .collect();
-   |          ^^^^^^^
+   |          ^^^^^^^ method not found in `std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>`
    |
    = note: the method `collect` exists but the following trait bounds were not satisfied:
            `&mut std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>> : std::iter::Iterator`
index 7f89caf92abe14a0ed945dbe611a50b7c7435328..8d52e08374ac724924332d0fba462ea30dc6be7b 100644 (file)
@@ -45,7 +45,7 @@ error[E0599]: no method named `iter` found for 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();
-   |                                    ^^^^
+   |                                    ^^^^ method not found in `()`
 
 error: aborting due to 7 previous errors
 
index 99d99db93f3e3f3db027c0f4b4dfa8e86c33608b..b381203856e925a6ead03990b06868d2840345a0 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `is_subset` found for type `&std::collections::Has
   --> $DIR/issue-35677.rs:4:10
    |
 LL |     this.is_subset(other)
-   |          ^^^^^^^^^
+   |          ^^^^^^^^^ method not found in `&std::collections::HashSet<T>`
    |
    = note: the method `is_subset` exists but the following trait bounds were not satisfied:
            `T : std::cmp::Eq`
index 108c969cdaddedfb445b22efd4179943e6039805..66680b9936e688187159d1188ec6ede0b47d8a3f 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `exec` found for type `&mut std::process::Command`
   --> $DIR/issue-39175.rs:15:39
    |
 LL |     Command::new("echo").arg("hello").exec();
-   |                                       ^^^^
+   |                                       ^^^^ method not found in `&mut std::process::Command`
    |
    = help: items from traits can only be used if the trait is in scope
 help: the following trait is implemented but not in scope, perhaps add a `use` for it:
index 359a2340240a7330a65a82ddea483a345452c895..0e1d55c339eb4437b7eee548e883727c1be7d7d4 100644 (file)
@@ -5,7 +5,7 @@ LL | pub struct Iterate<T, F> {
    | ------------------------ method `iter` not found for this
 ...
 LL |     println!("{:?}", a.iter().take(10).collect::<Vec<usize>>());
-   |                        ^^^^
+   |                        ^^^^ method not found in `Iterate<{integer}, [closure@$DIR/issue-41880.rs:26:24: 26:31]>`
 
 error: aborting due to previous error
 
index e364650da40a195042f83af0af63cb3a11974a76..33c3f18650a805cb3b48fc1c946b1803cfdb0c14 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `a` found for type `()` in the current scope
   --> $DIR/issue-43189.rs:10:8
    |
 LL |     ().a();
-   |        ^
+   |        ^ method not found in `()`
    |
    = help: items from traits can only be used if the trait is in scope
 help: the following trait is implemented but not in scope, perhaps add a `use` for it:
index 2c3a18be67c8f5d51f722d6b0ce2326218e9587f..29fd15fb396e99143e6340240ca81669035de956 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `as_deref_mut` found for type `std::option::Option
   --> $DIR/option-as_deref_mut.rs:4:33
    |
 LL |     let _result = &mut Some(42).as_deref_mut();
-   |                                 ^^^^^^^^^^^^
+   |                                 ^^^^^^^^^^^^ method not found in `std::option::Option<{integer}>`
    |
    = note: the method `as_deref_mut` exists but the following trait bounds were not satisfied:
            `{integer} : std::ops::DerefMut`
index 97214fbdc52d404b82c958b6ece9700e5902fe71..5034e6d538e3e307e66031b772b34cd9ad65575e 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `foo` found for type `&dyn Foo` in the current sco
   --> $DIR/issue-5153.rs:10:27
    |
 LL |     (&5isize as &dyn Foo).foo();
-   |                           ^^^
+   |                           ^^^ method not found in `&dyn Foo`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `foo`, perhaps you need to implement it:
index 082ac91edb1c44c487c0fd064149513bfbb5706c..3830ad4b1e3ae317348558a4527e0f133c86acaf 100644 (file)
@@ -8,7 +8,7 @@ error[E0599]: no method named `unwrap` found for type `std::sys_common::mutex::M
   --> $DIR/issue-54062.rs:10:37
    |
 LL |     let _ = test.comps.inner.lock().unwrap();
-   |                                     ^^^^^^
+   |                                     ^^^^^^ method not found in `std::sys_common::mutex::MutexGuard<'_>`
 
 error: aborting due to 2 previous errors
 
index 1d2ff7669c093ac3369184fb54264af9bff06235..c4000c8a9d41ef72c86342e7599e8862d0aae512 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `f` found for type `fn(&u8)` in the current scope
   --> $DIR/issue-57362-1.rs:20:7
    |
 LL |     a.f();
-   |       ^
+   |       ^ method not found in `fn(&u8)`
    |
    = note: a is a function, perhaps you wish to call it
    = help: items from traits can only be used if the trait is implemented and in scope
index 015e05ed9bf61e31cc85db7f6a572a5b9572709d..96054de801c1f9e11d7f71f85f9475dd089a0944 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `fake` found for type `{integer}` in the current s
   --> $DIR/macro-backtrace-invalid-internals.rs:5:13
    |
 LL |           1.fake()
-   |             ^^^^
+   |             ^^^^ method not found in `{integer}`
 ...
 LL |     fake_method_stmt!();
    |     -------------------- in this macro invocation
@@ -42,7 +42,7 @@ error[E0599]: no method named `fake` found for type `{integer}` in the current s
   --> $DIR/macro-backtrace-invalid-internals.rs:23:13
    |
 LL |           1.fake()
-   |             ^^^^
+   |             ^^^^ method not found in `{integer}`
 ...
 LL |     let _ = fake_method_expr!();
    |             ------------------- in this macro invocation
index b8ae4c34dc155f479f2fa9040b7acbf22bd19bcc..94c27b7d17865abee9dc5e8cff7fb8bb5cc993c1 100644 (file)
@@ -32,7 +32,7 @@ LL | pub struct Foo;
    | --------------- method `take` not found for this
 ...
 LL |      .take()
-   |       ^^^^
+   |       ^^^^ method not found in `Foo`
    |
    = note: the method `take` exists but the following trait bounds were not satisfied:
            `&mut Foo : std::iter::Iterator`
index 3f87ef74b8ea396614b849e605af231ee9576db0..89c7b0981158add1d4322cb96c96a54ca9812fe7 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `count` found for type `std::iter::Filter<std::ite
   --> $DIR/issue-36053-2.rs:7:55
    |
 LL |     once::<&str>("str").fuse().filter(|a: &str| true).count();
-   |                                                       ^^^^^
+   |                                                       ^^^^^ method not found in `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>`
    |
    = note: the method `count` exists but the following trait bounds were not satisfied:
            `&mut std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]> : std::iter::Iterator`
index 9721dc8ba4e6ced63bdf631c2740b78bf8e8ce9e..865092e4e9ccccc385d99dbc30934e5f9c9d0cb5 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `unwrap` found for type `std::result::Result<(), F
   --> $DIR/method-help-unsatisfied-bound.rs:5:7
    |
 LL |     a.unwrap();
-   |       ^^^^^^
+   |       ^^^^^^ method not found in `std::result::Result<(), Foo>`
    |
    = note: the method `unwrap` exists but the following trait bounds were not satisfied:
            `Foo : std::fmt::Debug`
index 4041e1935dcb77b655cb3458f5861430801a539d..b05c29c0d40360ccbf8db0f8d8c7df036660f302 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `clone` found for type `libc::c_void` in the curre
   --> $DIR/non-copyable-void.rs:11:23
    |
 LL |         let _z = (*y).clone();
-   |                       ^^^^^
+   |                       ^^^^^ method not found in `libc::c_void`
 
 error: aborting due to previous error
 
index eb47a33a7292bda0bdce0fbec90ab57c59997732..c1c50211381899c53909aafd76cce0f20e3311e0 100644 (file)
@@ -5,7 +5,7 @@ LL | struct Foo {
    | ---------- method `clone` not found for this
 ...
 LL |     let _y = x.clone();
-   |                ^^^^^
+   |                ^^^^^ method not found in `Foo`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `clone`, perhaps you need to implement it:
index 0c7e4e991a51de97a478e77bed57a4cfb7d0289f..2df628ecf8e500434226e3d1a6e9a871495b1f60 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `owned` found for type `&dyn Foo` in the current s
   --> $DIR/object-pointer-types.rs:11:7
    |
 LL |     x.owned();
-   |       ^^^^^
+   |       ^^^^^ method not found in `&dyn Foo`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `owned`, perhaps you need to implement it:
@@ -12,7 +12,7 @@ error[E0599]: no method named `owned` found for type `&mut dyn Foo` in the curre
   --> $DIR/object-pointer-types.rs:17:7
    |
 LL |     x.owned();
-   |       ^^^^^
+   |       ^^^^^ method not found in `&mut dyn Foo`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `owned`, perhaps you need to implement it:
@@ -22,7 +22,7 @@ error[E0599]: no method named `managed` found for type `std::boxed::Box<(dyn Foo
   --> $DIR/object-pointer-types.rs:23:7
    |
 LL |     x.managed();
-   |       ^^^^^^^
+   |       ^^^^^^^ method not found in `std::boxed::Box<(dyn Foo + 'static)>`
 
 error: aborting due to 3 previous errors
 
index a81181228dfdaf88b934abb300d3dbc15a08ae24..19f758fd8da7779a063424224d7739de2a9bb3d4 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `foobar` found for type `u32` in the current scope
   --> $DIR/trait-import-suggestions.rs:22:11
    |
 LL |         x.foobar();
-   |           ^^^^^^
+   |           ^^^^^^ method not found in `u32`
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
@@ -12,7 +12,7 @@ error[E0599]: no method named `bar` found for type `u32` in the current scope
   --> $DIR/trait-import-suggestions.rs:28:7
    |
 LL |     x.bar();
-   |       ^^^
+   |       ^^^ method not found in `u32`
    |
    = help: items from traits can only be used if the trait is in scope
 help: the following trait is implemented but not in scope, perhaps add a `use` for it:
@@ -24,7 +24,7 @@ error[E0599]: no method named `baz` found for type `u32` in the current scope
   --> $DIR/trait-import-suggestions.rs:29:7
    |
 LL |     x.baz();
-   |       ^^^
+   |       ^^^ method not found in `u32`
 
 error[E0599]: no function or associated item named `from_str` found for type `u32` in the current scope
   --> $DIR/trait-import-suggestions.rs:30:18
index 06dad7caa6735eb99a9bf19f1e578ae2f0008dcb..dec5809f1539bd8be297cdb7f2bbc38bf3f7a891 100644 (file)
@@ -8,7 +8,7 @@ LL |     fn foo(self: Box<Self>) {}
    |        --- the method is available for `std::boxed::Box<A>` here
 ...
 LL |     A.foo();
-   |       ^^^
+   |       ^^^ method not found in `A`
 
 error: aborting due to previous error
 
index 90cd3b807458014d8acc1d724c1d92775e439f09..e93c4da9dfc85145735429a4aa9c5da0ecab9efd 100644 (file)
@@ -7,7 +7,7 @@ LL | struct A;
    | --------- method `foo` not found for this
 ...
 LL |     A.foo()
-   |       ^^^
+   |       ^^^ method not found in `A`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `foo`, perhaps you need to implement it:
index e05da17983f83064c62637df704cf32a9fc2a8c1..190159ec7b88d4db98b6ddc7d7e21e87551587ea 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `f` found for type `()` in the current scope
   --> $DIR/shadowed-trait-methods.rs:13:8
    |
 LL |     ().f()
-   |        ^
+   |        ^ method not found in `()`
    |
    = help: items from traits can only be used if the trait is in scope
 help: the following trait is implemented but not in scope, perhaps add a `use` for it:
index c14fc04f631fce3c6b8c3c4e961d5fdf4f674318..bbfe4c3d59dcf15e4e5cb4f372e1e8dfc9c257b4 100644 (file)
@@ -5,7 +5,7 @@ LL | struct MyStruct;
    | ---------------- method `foo_one` not found for this
 ...
 LL |     println!("{}", MyStruct.foo_one());
-   |                             ^^^^^^^
+   |                             ^^^^^^^ method not found in `MyStruct`
    |
    = note: the method `foo_one` exists but the following trait bounds were not satisfied:
            `MyStruct : Foo`
index 48c2503e8eb326e4b0aac109bc329b01631fc2c2..4aec72006eef03c36312150841e369bb60ff1350 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `hello` found for type `impl Foo` in the current s
   --> $DIR/impl-trait-with-missing-trait-bounds-in-arg.rs:15:9
    |
 LL |     foo.hello();
-   |         ^^^^^
+   |         ^^^^^ method not found in `impl Foo`
    |
    = help: items from traits can only be used if the type parameter is bounded by the trait
 help: the following trait defines an item `hello`, perhaps you need to restrict type parameter `impl Foo` with it:
index 6cf71c8b7c53b7e13af1ae8eb07de5d32991ceac..f2496f696d698294614be3a36aafc4620e714eb7 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `method` found for type `&T` in the current scope
   --> $DIR/issue-21673.rs:6:7
    |
 LL |     x.method()
-   |       ^^^^^^
+   |       ^^^^^^ method not found in `&T`
    |
    = help: items from traits can only be used if the type parameter is bounded by the trait
 help: the following trait defines an item `method`, perhaps you need to restrict type parameter `T` with it:
@@ -14,7 +14,7 @@ error[E0599]: no method named `method` found for type `T` in the current scope
   --> $DIR/issue-21673.rs:10:7
    |
 LL |     x.method()
-   |       ^^^^^^
+   |       ^^^^^^ method not found in `T`
    |
    = help: items from traits can only be used if the type parameter is bounded by the trait
 help: the following trait defines an item `method`, perhaps you need to restrict type parameter `T` with it:
index ad4a4deb5a8863f60f10653b4cf21410e37ec6e4..4678410eb48599b33ea3c4e8b266de11e4db9569 100644 (file)
@@ -23,7 +23,7 @@ error[E0599]: no method named `count_o` found for type `u32` in the current scop
   --> $DIR/suggest-methods.rs:28:19
    |
 LL |     let _ = 63u32.count_o();
-   |                   ^^^^^^^
+   |                   ^^^^^^^ method not found in `u32`
 
 error: aborting due to 4 previous errors
 
index 71d5cc26bf14109913e30af3912f7821bb8ddb65..0d61c3ed00d909e3ddd1788b91d741c83133ea48 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `foo` found for type `&i32` in the current scope
   --> $DIR/trait-impl-1.rs:15:7
    |
 LL |     x.foo();
-   |       ^^^
+   |       ^^^ method not found in `&i32`
 
 error: aborting due to previous error
 
index 16ea7bdb0807d19bd48c85f85d4bfee1d8f97f60..39cc66d275c24aa2d98e70b1185e07155e68036b 100644 (file)
@@ -5,7 +5,7 @@ LL | struct S;
    | --------- method `a` not found for this
 ...
 LL |     S.a();
-   |       ^
+   |       ^ method not found in `S`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `a`, perhaps you need to implement it:
@@ -25,7 +25,7 @@ LL |         fn b(&self) { }
    |            the method is available for `std::rc::Rc<S>` here
 ...
 LL |     S.b();
-   |       ^
+   |       ^ method not found in `S`
    |
    = help: items from traits can only be used if the trait is in scope
 help: the following trait is implemented but not in scope, perhaps add a `use` for it:
index f0f048159ec73aeb6cb5eb5d047da7b1acf86bc3..d172d5ecc4b70bd1fd9d573caca6c25ce7afafd0 100644 (file)
@@ -12,7 +12,7 @@ error[E0599]: no method named `test` found for type `i32` in the current scope
   --> $DIR/trivial-bounds-leak.rs:24:10
    |
 LL |     3i32.test();
-   |          ^^^^
+   |          ^^^^ method not found in `i32`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `test`, perhaps you need to implement it:
index 2e1845888a2f76d893cb8c66dc052f0980a170d9..18276d5710cf8950f2230dd756ded993b156f366 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `call` found for type `[closure@$DIR/unboxed-closu
   --> $DIR/unboxed-closures-static-call-wrong-trait.rs:7:10
    |
 LL |     mut_.call((0, ));
-   |          ^^^^
+   |          ^^^^ method not found in `[closure@$DIR/unboxed-closures-static-call-wrong-trait.rs:6:26: 6:31]`
    |
    = note: mut_ is a function, perhaps you wish to call it
 
index 92adca2c70490e598eadf664670aa7ec91726c76..63262d0dc326d088932742050bf563dc3770919b 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `deref` found for type `&()` in the current scope
   --> $DIR/shadow.rs:19:11
    |
 LL |         x.deref();
-   |           ^^^^^
+   |           ^^^^^ method not found in `&()`
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
index 37a0093784048cbee8f6b49c0c13f28c979e2262..4f4c779b12bb326334274cad2758dbcbe01af607 100644 (file)
@@ -13,7 +13,7 @@ LL | union U4<T> {
    | ----------- method `clone` not found for this
 ...
 LL |     let w = u.clone();
-   |               ^^^^^
+   |               ^^^^^ method not found in `U4<CloneNoCopy>`
    |
    = note: the method `clone` exists but the following trait bounds were not satisfied:
            `U4<CloneNoCopy> : std::clone::Clone`
index 407905f52e750b1db52f8b68833887bd8fb0c217..cd46878c19be4972473a49ed57466a77fbc0c036 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `clone` found for type `std::boxed::Box<dyn Foo>`
   --> $DIR/unique-object-noncopyable.rs:24:16
    |
 LL |     let _z = y.clone();
-   |                ^^^^^
+   |                ^^^^^ method not found in `std::boxed::Box<dyn Foo>`
    |
    = note: the method `clone` exists but the following trait bounds were not satisfied:
            `std::boxed::Box<dyn Foo> : std::clone::Clone`
index 0f6ba90afacf4105923a52614958d3f13e672ad6..19ef2b21c26854b1b853ca54782ac829b26b5199 100644 (file)
@@ -2,7 +2,7 @@ error[E0599]: no method named `clone` found for type `std::boxed::Box<R>` in the
   --> $DIR/unique-pinned-nocopy.rs:12:16
    |
 LL |     let _j = i.clone();
-   |                ^^^^^
+   |                ^^^^^ method not found in `std::boxed::Box<R>`
    |
    = note: the method `clone` exists but the following trait bounds were not satisfied:
            `std::boxed::Box<R> : std::clone::Clone`