"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));
--> $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:
--> $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:
--> $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:
--> $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
--> $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:
--> $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:
--> $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:
--> $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:
| --------- 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
| ---------- 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:
| ------------------ 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`
--> $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
| ------------ 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:
| ------------ 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:
--> $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
| ----------- 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:
| ----------- 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:
--> $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:
--> $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:
--> $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:
| 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:
--> $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:
--> $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:
| ----------- 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:
--> $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:
--> $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:
--> $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:
--> $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:
--> $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:
--> $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:
--> $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:
| ----------- 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:
--> $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:
| -------- 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:
--> $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:
--> $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
| ----------- method `bar` not found for this
...
LL | Foo.bar();
- | ^^^
+ | ^^^ method not found in `Foo`
error: aborting due to 6 previous errors
--> $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:
--> $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
--> $DIR/issue-15207.rs:3:15
|
LL | break.push(1)
- | ^^^^
+ | ^^^^ method not found in `!`
error: aborting due to previous error
--> $DIR/issue-1871.rs:7:9
|
LL | f.honk()
- | ^^^^
+ | ^^^^ method not found in `{integer}`
error: aborting due to previous error
--> $DIR/issue-19521.rs:2:8
|
LL | "".homura()();
- | ^^^^^^
+ | ^^^^^^ method not found in `&'static str`
error: aborting due to previous error
| -------------- 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
--> $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:
--> $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
--> $DIR/issue-25385.rs:2:23
|
LL | ($e:expr) => { $e.foo() }
- | ^^^
+ | ^^^ method not found in `i32`
...
LL | foo!(a);
| -------- in this macro invocation
--> $DIR/issue-25385.rs:10:15
|
LL | foo!(1i32.foo());
- | ^^^
+ | ^^^ method not found in `i32`
error: aborting due to 2 previous errors
| -------- 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:
--> $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
--> $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
--> $DIR/issue-29181.rs:6:7
|
LL | 0.homura();
- | ^^^^^^
+ | ^^^^^^ method not found in `{integer}`
error: aborting due to previous error
--> $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`
--> $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
--> $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`
--> $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:
| ------------------------ 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
--> $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:
--> $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`
--> $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:
--> $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
--> $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
--> $DIR/macro-backtrace-invalid-internals.rs:5:13
|
LL | 1.fake()
- | ^^^^
+ | ^^^^ method not found in `{integer}`
...
LL | fake_method_stmt!();
| -------------------- in this macro invocation
--> $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
| --------------- 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`
--> $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`
--> $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`
--> $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
| ---------- 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:
--> $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:
--> $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:
--> $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
--> $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:
--> $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:
--> $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
| --- the method is available for `std::boxed::Box<A>` here
...
LL | A.foo();
- | ^^^
+ | ^^^ method not found in `A`
error: aborting due to previous error
| --------- 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:
--> $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:
| ---------------- 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`
--> $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:
--> $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:
--> $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:
--> $DIR/suggest-methods.rs:28:19
|
LL | let _ = 63u32.count_o();
- | ^^^^^^^
+ | ^^^^^^^ method not found in `u32`
error: aborting due to 4 previous errors
--> $DIR/trait-impl-1.rs:15:7
|
LL | x.foo();
- | ^^^
+ | ^^^ method not found in `&i32`
error: aborting due to previous error
| --------- 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:
| 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:
--> $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:
--> $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
--> $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:
| ----------- 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`
--> $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`
--> $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`