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");
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)
}
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);
-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 }
| 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 }
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 }
-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();
= 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();
= 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();
= 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();
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() {}
-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()
-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), }
-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();
-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();
-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();
-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 {
-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 {
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 {
| |
| 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 {
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 {
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 {
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 {
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 {
| |
| 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 {
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 {
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 {
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 {
-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 {
-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();
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();
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();
-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 {
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;
-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);
-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 {
-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> {
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)
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
}
}
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 => {}
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 => {}
}
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
}
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;
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
}
-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;
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`
}
| 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;
| 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();
| 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 {};
-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;
|
= 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();
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!(); }
}
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!(); }
}
-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!(); }
|
= 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();
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
}
-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;
-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;
//~|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
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();
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) {}
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();
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;
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();
= 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();
= 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();
= 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();
= 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();
= 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();
= 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;
= 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();
= 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 }
= 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();
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();
|
= 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;
-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();
= 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() {
-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()();
-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;
-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());
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() {}
-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 {
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() {}
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
}
-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 */ }
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 {
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 {
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 {
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() {}
-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 {
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() {
foo!(a);
foo!(1i32.foo());
- //~^ ERROR no method named `foo` found for type `i32` in the current scope
+ //~^ ERROR no method named `foo` found
}
-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 {
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);
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;
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() { }
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
_ => (),
}
});
-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 {
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
}
-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();
|
= 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();
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
}
-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();
= 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();
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
}
-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();
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`
}
}
-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 {
error: aborting due to previous error
+For more information about this error, try `rustc --explain E0599`.
//~| 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
}
| |
| 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();
-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)
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
}
}
-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();
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() { }
-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;
-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();
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,
}
-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()],
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());
}
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 {
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
}
-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> {
-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(_)| ();
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
}
-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();
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}>`
}
-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();
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}>`
}
-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();
-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();
-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();
-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();
-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();
-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();
-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();
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
}
-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();
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();
-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();
-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();
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
}
-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(());
-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;
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() {}
-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()
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`
}
-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;
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();
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);
}
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;
-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();
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
}
-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();
}
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
}
|
= 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] );
-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();
-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 {
-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();
= 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();
= 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();
-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;
-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>); }
//~^ 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
}
}
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();
-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()
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() {
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);
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()
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
}
-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;
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
}
}
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
}
}
-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());
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());
-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();
-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()
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()
//~| 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
}
= 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();
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() {}
-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();
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
}
-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();
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
}
-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);
-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;
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();
}
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
-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 {
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 {
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 {
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 {
| 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 {
| 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 {
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
}
-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();
// 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;
// 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
// 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
-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;
= 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;
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;
= 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;
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;
= 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;
<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`
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
}
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;
-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, ));
-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();
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();
-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();
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>`
}
|
= 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> {
-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();
-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();
-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();