1
Fork 0

Unify output of "variant not found" errors

This commit is contained in:
Esteban Küber 2020-01-08 08:05:31 -08:00
parent 56446fef49
commit 2c5766f2d4
156 changed files with 260 additions and 254 deletions

View file

@ -2114,9 +2114,13 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
let msg = format!("expected type, found variant `{}`", assoc_ident); let msg = format!("expected type, found variant `{}`", assoc_ident);
tcx.sess.span_err(span, &msg); tcx.sess.span_err(span, &msg);
} else if qself_ty.is_enum() { } 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, 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"); let adt_def = qself_ty.ty_adt_def().expect("enum is not an ADT");

View file

@ -361,10 +361,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
tcx.sess, tcx.sess,
span, span,
E0599, E0599,
"no {} named `{}` found for type `{}` in the current scope", "no {} named `{}` found for {} `{}` in the current scope",
item_kind, item_kind,
item_name, item_name,
ty_str actual.prefix_string(),
ty_str,
); );
if let Some(span) = if let Some(span) =
tcx.sess.confused_type_with_std_module.borrow().get(&span) tcx.sess.confused_type_with_std_module.borrow().get(&span)

View file

@ -3,7 +3,7 @@ trait Foo {
} }
const X: i32 = <i32>::ID; const X: i32 = <i32>::ID;
//~^ ERROR no associated item named `ID` found for type `i32` //~^ ERROR no associated item named `ID` found
fn main() { fn main() {
assert_eq!(1, X); assert_eq!(1, X);

View file

@ -1,4 +1,4 @@
error[E0599]: no variant or associated item named `mispellable` found for type `Enum` in the current scope error[E0599]: no variant or associated item named `mispellable` found for enum `Enum` in the current scope
--> $DIR/associated-item-enum.rs:17:11 --> $DIR/associated-item-enum.rs:17:11
| |
LL | enum Enum { Variant } LL | enum Enum { Variant }
@ -10,7 +10,7 @@ LL | Enum::mispellable();
| variant or associated item not found in `Enum` | variant or associated item not found in `Enum`
| help: there is a method with a similar name: `misspellable` | 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 --> $DIR/associated-item-enum.rs:18:11
| |
LL | enum Enum { Variant } LL | enum Enum { Variant }
@ -19,7 +19,7 @@ LL | enum Enum { Variant }
LL | Enum::mispellable_trait(); LL | Enum::mispellable_trait();
| ^^^^^^^^^^^^^^^^^ variant or associated item not found in `Enum` | ^^^^^^^^^^^^^^^^^ 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 --> $DIR/associated-item-enum.rs:19:11
| |
LL | enum Enum { Variant } LL | enum Enum { Variant }

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `test_mut` found for type `std::vec::Vec<{integer}>` in the current scope error[E0599]: no method named `test_mut` found for struct `std::vec::Vec<{integer}>` in the current scope
--> $DIR/auto-ref-slice-plus-ref.rs:7:7 --> $DIR/auto-ref-slice-plus-ref.rs:7:7
| |
LL | a.test_mut(); LL | a.test_mut();
@ -8,7 +8,7 @@ LL | a.test_mut();
= note: the following trait defines an item `test_mut`, perhaps you need to implement it: = note: the following trait defines an item `test_mut`, perhaps you need to implement it:
candidate #1: `MyIter` 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 --> $DIR/auto-ref-slice-plus-ref.rs:8:7
| |
LL | a.test(); LL | a.test();
@ -18,7 +18,7 @@ LL | a.test();
= note: the following trait defines an item `test`, perhaps you need to implement it: = note: the following trait defines an item `test`, perhaps you need to implement it:
candidate #1: `MyIter` 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 --> $DIR/auto-ref-slice-plus-ref.rs:10:11
| |
LL | ([1]).test(); LL | ([1]).test();
@ -28,7 +28,7 @@ LL | ([1]).test();
= note: the following trait defines an item `test`, perhaps you need to implement it: = note: the following trait defines an item `test`, perhaps you need to implement it:
candidate #1: `MyIter` 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 --> $DIR/auto-ref-slice-plus-ref.rs:11:12
| |
LL | (&[1]).test(); LL | (&[1]).test();

View file

@ -1,7 +1,7 @@
trait A { trait A {
fn a(&self) { fn a(&self) {
|| self.b() || self.b()
//~^ ERROR no method named `b` found for type `&Self` in the current scope //~^ ERROR no method named `b` found
} }
} }
fn main() {} fn main() {}

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `b` found for type `&Self` in the current scope error[E0599]: no method named `b` found for reference `&Self` in the current scope
--> $DIR/issue-3563.rs:3:17 --> $DIR/issue-3563.rs:3:17
| |
LL | || self.b() LL | || self.b()

View file

@ -1,4 +1,4 @@
error[E0599]: no variant or associated item named `Hsl` found for type `Color` in the current scope error[E0599]: no variant or associated item named `Hsl` found for enum `Color` in the current scope
--> $DIR/bogus-tag.rs:7:16 --> $DIR/bogus-tag.rs:7:16
| |
LL | enum Color { Rgb(isize, isize, isize), Rgba(isize, isize, isize, isize), } LL | enum Color { Rgb(isize, isize, isize), Rgba(isize, isize, isize, isize), }

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `eat` found for type `std::boxed::Box<dyn Noisy>` in the current scope error[E0599]: no method named `eat` found for struct `std::boxed::Box<dyn Noisy>` in the current scope
--> $DIR/class-cast-to-trait.rs:53:8 --> $DIR/class-cast-to-trait.rs:53:8
| |
LL | nyan.eat(); LL | nyan.eat();

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `the_fn` found for type `&Lib::TheStruct` in the current scope error[E0599]: no method named `the_fn` found for reference `&Lib::TheStruct` in the current scope
--> $DIR/coherence_inherent.rs:31:11 --> $DIR/coherence_inherent.rs:31:11
| |
LL | s.the_fn(); LL | s.the_fn();

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `the_fn` found for type `&coherence_inherent_cc_lib::TheStruct` in the current scope error[E0599]: no method named `the_fn` found for reference `&coherence_inherent_cc_lib::TheStruct` in the current scope
--> $DIR/coherence_inherent_cc.rs:23:11 --> $DIR/coherence_inherent_cc.rs:23:11
| |
LL | s.the_fn(); LL | s.the_fn();

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `closure` found for type `Obj<[closure@$DIR/issue-18343.rs:6:28: 6:33]>` in the current scope error[E0599]: no method named `closure` found for struct `Obj<[closure@$DIR/issue-18343.rs:6:28: 6:33]>` in the current scope
--> $DIR/issue-18343.rs:7:7 --> $DIR/issue-18343.rs:7:7
| |
LL | struct Obj<F> where F: FnMut() -> u32 { LL | struct Obj<F> where F: FnMut() -> u32 {

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `closure` found for type `Obj<[closure@$DIR/issue-2392.rs:35:36: 35:41]>` in the current scope error[E0599]: no method named `closure` found for struct `Obj<[closure@$DIR/issue-2392.rs:35:36: 35:41]>` in the current scope
--> $DIR/issue-2392.rs:36:15 --> $DIR/issue-2392.rs:36:15
| |
LL | struct Obj<F> where F: FnOnce() -> u32 { LL | struct Obj<F> where F: FnOnce() -> u32 {
@ -12,7 +12,7 @@ help: to call the function stored in `closure`, surround the field access with p
LL | (o_closure.closure)(); 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 --> $DIR/issue-2392.rs:38:15
| |
LL | struct Obj<F> where F: FnOnce() -> u32 { LL | struct Obj<F> where F: FnOnce() -> u32 {
@ -23,7 +23,7 @@ LL | o_closure.not_closure();
| | | |
| field, not a method | 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 --> $DIR/issue-2392.rs:42:12
| |
LL | struct Obj<F> where F: FnOnce() -> u32 { LL | struct Obj<F> where F: FnOnce() -> u32 {
@ -37,7 +37,7 @@ help: to call the function stored in `closure`, surround the field access with p
LL | (o_func.closure)(); 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 --> $DIR/issue-2392.rs:45:14
| |
LL | struct BoxedObj { LL | struct BoxedObj {
@ -51,7 +51,7 @@ help: to call the function stored in `boxed_closure`, surround the field access
LL | (boxed_fn.boxed_closure)(); 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 --> $DIR/issue-2392.rs:48:19
| |
LL | struct BoxedObj { LL | struct BoxedObj {
@ -65,7 +65,7 @@ help: to call the function stored in `boxed_closure`, surround the field access
LL | (boxed_closure.boxed_closure)(); 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 --> $DIR/issue-2392.rs:53:12
| |
LL | struct Obj<F> where F: FnOnce() -> u32 { LL | struct Obj<F> where F: FnOnce() -> u32 {
@ -79,7 +79,7 @@ help: to call the function stored in `closure`, surround the field access with p
LL | (w.wrap.closure)(); 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 --> $DIR/issue-2392.rs:55:12
| |
LL | struct Obj<F> where F: FnOnce() -> u32 { LL | struct Obj<F> where F: FnOnce() -> u32 {
@ -90,7 +90,7 @@ LL | w.wrap.not_closure();
| | | |
| field, not a method | 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 --> $DIR/issue-2392.rs:58:24
| |
LL | struct Obj<F> where F: FnOnce() -> u32 { LL | struct Obj<F> where F: FnOnce() -> u32 {
@ -104,7 +104,7 @@ help: to call the function stored in `closure`, surround the field access with p
LL | (check_expression().closure)(); 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 --> $DIR/issue-2392.rs:64:31
| |
LL | struct FuncContainer { LL | struct FuncContainer {
@ -118,7 +118,7 @@ help: to call the function stored in `f1`, surround the field access with parent
LL | ((*self.container).f1)(1); 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 --> $DIR/issue-2392.rs:65:31
| |
LL | struct FuncContainer { LL | struct FuncContainer {
@ -132,7 +132,7 @@ help: to call the function stored in `f2`, surround the field access with parent
LL | ((*self.container).f2)(1); 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 --> $DIR/issue-2392.rs:66:31
| |
LL | struct FuncContainer { LL | struct FuncContainer {

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `example` found for type `Example` in the current scope error[E0599]: no method named `example` found for struct `Example` in the current scope
--> $DIR/issue-32128.rs:12:10 --> $DIR/issue-32128.rs:12:10
| |
LL | struct Example { LL | struct Example {

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `closure` found for type `&Obj<[closure@$DIR/issue-33784.rs:25:43: 25:48]>` in the current scope error[E0599]: no method named `closure` found for reference `&Obj<[closure@$DIR/issue-33784.rs:25:43: 25:48]>` in the current scope
--> $DIR/issue-33784.rs:27:7 --> $DIR/issue-33784.rs:27:7
| |
LL | p.closure(); LL | p.closure();
@ -9,7 +9,7 @@ help: to call the function stored in `closure`, surround the field access with p
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 --> $DIR/issue-33784.rs:29:7
| |
LL | q.fn_ptr(); LL | q.fn_ptr();
@ -20,7 +20,7 @@ help: to call the function stored in `fn_ptr`, surround the field access with pa
LL | (q.fn_ptr)(); 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 --> $DIR/issue-33784.rs:32:7
| |
LL | s.c_fn_ptr(); LL | s.c_fn_ptr();

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `dog_age` found for type `animal::Dog` in the current scope error[E0599]: no method named `dog_age` found for struct `animal::Dog` in the current scope
--> $DIR/private-field.rs:16:23 --> $DIR/private-field.rs:16:23
| |
LL | pub struct Dog { LL | pub struct Dog {

View file

@ -4,7 +4,7 @@ error[E0107]: wrong number of const arguments: expected 0, found 1
LL | let _: u32 = 5i32.try_into::<32>().unwrap(); LL | let _: u32 = 5i32.try_into::<32>().unwrap();
| ^^ unexpected const argument | ^^ 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 --> $DIR/invalid-const-arg-for-type-param.rs:7:7
| |
LL | struct S; LL | struct S;

View file

@ -1,4 +1,4 @@
error[E0599]: no associated item named `HOST_SIZE` found for type `Foo<A, B>` in the current scope error[E0599]: no associated item named `HOST_SIZE` found for struct `Foo<A, B>` in the current scope
--> $DIR/too_generic_eval_ice.rs:7:19 --> $DIR/too_generic_eval_ice.rs:7:19
| |
LL | pub struct Foo<A, B>(A, B); LL | pub struct Foo<A, B>(A, B);

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `clone` found for type `Foo` in the current scope error[E0599]: no method named `clone` found for struct `Foo` in the current scope
--> $DIR/copy-a-resource.rs:18:16 --> $DIR/copy-a-resource.rs:18:16
| |
LL | struct Foo { LL | struct Foo {

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `clone` found for type `Bar<NotClone>` in the current scope error[E0599]: no method named `clone` found for struct `Bar<NotClone>` in the current scope
--> $DIR/derive-assoc-type-not-impl.rs:18:30 --> $DIR/derive-assoc-type-not-impl.rs:18:30
| |
LL | struct Bar<T: Foo> { LL | struct Bar<T: Foo> {

View file

@ -2,25 +2,25 @@ fn main() {
match 0u8 { match 0u8 {
[u8]::AssocItem => {} [u8]::AssocItem => {}
//~^ ERROR missing angle brackets in associated item path //~^ 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 => {} (u8, u8)::AssocItem => {}
//~^ ERROR missing angle brackets in associated item path //~^ 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 => {} _::AssocItem => {}
//~^ ERROR missing angle brackets in associated item path //~^ 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 { match &0u8 {
&(u8,)::AssocItem => {} &(u8,)::AssocItem => {}
//~^ ERROR missing angle brackets in associated item path //~^ 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 { macro_rules! pat {
($ty: ty) => ($ty::AssocItem) ($ty: ty) => ($ty::AssocItem)
//~^ ERROR missing angle brackets in associated item path //~^ 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 { macro_rules! ty {
() => (u8) () => (u8)
@ -31,6 +31,6 @@ fn check_macros() {
pat!(u8) => {} pat!(u8) => {}
ty!()::AssocItem => {} ty!()::AssocItem => {}
//~^ ERROR missing angle brackets in associated item path //~^ 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
} }
} }

View file

@ -37,13 +37,13 @@ LL | ($ty: ty) => ($ty::AssocItem)
LL | pat!(u8) => {} LL | pat!(u8) => {}
| -------- in this macro invocation | -------- 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 --> $DIR/bad-assoc-pat.rs:3:15
| |
LL | [u8]::AssocItem => {} LL | [u8]::AssocItem => {}
| ^^^^^^^^^ associated item not found in `[u8]` | ^^^^^^^^^ 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 --> $DIR/bad-assoc-pat.rs:6:19
| |
LL | (u8, u8)::AssocItem => {} LL | (u8, u8)::AssocItem => {}
@ -55,7 +55,7 @@ error[E0599]: no associated item named `AssocItem` found for type `_` in the cur
LL | _::AssocItem => {} LL | _::AssocItem => {}
| ^^^^^^^^^ associated item not found in `_` | ^^^^^^^^^ 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 --> $DIR/bad-assoc-pat.rs:14:17
| |
LL | &(u8,)::AssocItem => {} LL | &(u8,)::AssocItem => {}

View file

@ -35,5 +35,5 @@ impl S {
} }
fn main() { 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
} }

View file

@ -56,7 +56,7 @@ error: missing `fn`, `type`, or `const` for associated-item declaration
LL | pub hello_method(&self) { LL | pub hello_method(&self) {
| ^ missing `fn`, `type`, or `const` | ^ 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 --> $DIR/issue-40006.rs:38:7
| |
LL | struct S; LL | struct S;

View file

@ -2,5 +2,5 @@ struct T;
fn main() { fn main() {
T::new(); 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
} }

View file

@ -1,4 +1,4 @@
error[E0599]: no function or associated item named `new` found for type `T` in the current scope error[E0599]: no function or associated item named `new` found for struct `T` in the current scope
--> $DIR/dont-suggest-private-trait-method.rs:4:8 --> $DIR/dont-suggest-private-trait-method.rs:4:8
| |
LL | struct T; LL | struct T;

View file

@ -22,8 +22,8 @@ fn main() {
let xe1 = XEmpty1; //~ ERROR expected value, found struct `XEmpty1` let xe1 = XEmpty1; //~ ERROR expected value, found struct `XEmpty1`
let xe1 = XEmpty1(); let xe1 = XEmpty1();
//~^ ERROR expected function, tuple struct or tuple variant, found struct `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 enum
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
XE::Empty1 {}; //~ ERROR no variant `Empty1` in enum `empty_struct::XE` XE::Empty1 {}; //~ ERROR no variant named `Empty1` found for enum `empty_struct::XE`
} }

View file

@ -58,7 +58,7 @@ LL | let xe1 = XEmpty1();
| did you mean `XEmpty1 { /* fields */ }`? | did you mean `XEmpty1 { /* fields */ }`?
| help: a unit struct with a similar name exists: `XEmpty2` | 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 --> $DIR/empty-struct-braces-expr.rs:25:19
| |
LL | let xe3 = XE::Empty3; LL | let xe3 = XE::Empty3;
@ -67,7 +67,7 @@ LL | let xe3 = XE::Empty3;
| variant or associated item not found in `empty_struct::XE` | variant or associated item not found in `empty_struct::XE`
| help: there is a variant with a similar name: `XEmpty3` | 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 --> $DIR/empty-struct-braces-expr.rs:26:19
| |
LL | let xe3 = XE::Empty3(); LL | let xe3 = XE::Empty3();
@ -76,7 +76,7 @@ LL | let xe3 = XE::Empty3();
| variant or associated item not found in `empty_struct::XE` | variant or associated item not found in `empty_struct::XE`
| help: there is a variant with a similar name: `XEmpty3` | 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 --> $DIR/empty-struct-braces-expr.rs:28:9
| |
LL | XE::Empty1 {}; LL | XE::Empty1 {};

View file

@ -1,4 +1,4 @@
error[E0599]: no associated item named `NotEvenReal` found for type `Foo` in the current scope error[E0599]: no associated item named `NotEvenReal` found for struct `Foo` in the current scope
--> $DIR/E0599.rs:4:20 --> $DIR/E0599.rs:4:20
| |
LL | struct Foo; LL | struct Foo;

View file

@ -20,7 +20,7 @@ LL | x += 2;
| |
= note: an implementation of `std::ops::AddAssign` might be missing for `&str` = 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 --> $DIR/error-festival.rs:16:7
| |
LL | x.z(); LL | x.z();

View file

@ -15,7 +15,7 @@ LL | fn f() { ::bar::m!(); }
LL | Vec::new(); LL | Vec::new();
| ^^^ use of undeclared type or module `Vec` | ^^^ 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 --> $DIR/no_implicit_prelude.rs:12:12
| |
LL | fn f() { ::bar::m!(); } LL | fn f() { ::bar::m!(); }

View file

@ -14,7 +14,7 @@ mod bar {
} }
mod baz { 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!(); } fn f() { ::bar::m!(); }
} }

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `f` found for type `()` in the current scope error[E0599]: no method named `f` found for unit type `()` in the current scope
--> $DIR/trait_items.rs:17:24 --> $DIR/trait_items.rs:17:24
| |
LL | fn f() { ::baz::m!(); } LL | fn f() { ::baz::m!(); }

View file

@ -6,19 +6,19 @@ LL | #![feature(impl_trait_in_bindings)]
| |
= note: `#[warn(incomplete_features)]` on by default = 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 --> $DIR/bindings-opaque.rs:11:17
| |
LL | let _ = FOO.count_ones(); LL | let _ = FOO.count_ones();
| ^^^^^^^^^^ method not found in `impl std::marker::Copy` | ^^^^^^^^^^ 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 --> $DIR/bindings-opaque.rs:13:17
| |
LL | let _ = BAR.count_ones(); LL | let _ = BAR.count_ones();
| ^^^^^^^^^^ method not found in `impl std::marker::Copy` | ^^^^^^^^^^ 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 --> $DIR/bindings-opaque.rs:15:17
| |
LL | let _ = foo.count_ones(); LL | let _ = foo.count_ones();

View file

@ -18,5 +18,5 @@ fn main() {
let f1 = Bar; let f1 = Bar;
f1.foo(1usize); 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
} }

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `foo` found for type `Bar` in the current scope error[E0599]: no method named `foo` found for struct `Bar` in the current scope
--> $DIR/issue-21659-show-relevant-trait-impls-3.rs:20:8 --> $DIR/issue-21659-show-relevant-trait-impls-3.rs:20:8
| |
LL | struct Bar; LL | struct Bar;

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `is_empty` found for type `Foo` in the current scope error[E0599]: no method named `is_empty` found for struct `Foo` in the current scope
--> $DIR/method-suggestion-no-duplication.rs:7:15 --> $DIR/method-suggestion-no-duplication.rs:7:15
| |
LL | struct Foo; LL | struct Foo;

View file

@ -25,7 +25,7 @@ fn main() {
//~|items from traits can only be used if the trait is in scope //~|items from traits can only be used if the trait is in scope
std::rc::Rc::new(&mut Box::new(&1u32)).method(); std::rc::Rc::new(&mut Box::new(&1u32)).method();
//~^items from traits can only be used if the trait is in scope //~^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(); 'a'.method();
//~^ ERROR no method named //~^ ERROR no method named

View file

@ -16,7 +16,7 @@ LL | use no_method_suggested_traits::qux::PrivPub;
LL | use no_method_suggested_traits::Reexported; 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 --> $DIR/no-method-suggested-traits.rs:26:44
| |
LL | std::rc::Rc::new(&mut Box::new(&1u32)).method(); LL | std::rc::Rc::new(&mut Box::new(&1u32)).method();
@ -46,7 +46,7 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f
LL | use foo::Bar; 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 --> $DIR/no-method-suggested-traits.rs:32:43
| |
LL | fn method(&self) {} LL | fn method(&self) {}
@ -78,7 +78,7 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f
LL | use no_method_suggested_traits::foo::PubPub; 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 --> $DIR/no-method-suggested-traits.rs:37:44
| |
LL | std::rc::Rc::new(&mut Box::new(&1i32)).method(); LL | std::rc::Rc::new(&mut Box::new(&1i32)).method();
@ -90,7 +90,7 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f
LL | use no_method_suggested_traits::foo::PubPub; 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 --> $DIR/no-method-suggested-traits.rs:40:9
| |
LL | struct Foo; LL | struct Foo;
@ -106,7 +106,7 @@ LL | Foo.method();
candidate #3: `no_method_suggested_traits::qux::PrivPub` candidate #3: `no_method_suggested_traits::qux::PrivPub`
candidate #4: `no_method_suggested_traits::Reexported` 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 --> $DIR/no-method-suggested-traits.rs:42:43
| |
LL | std::rc::Rc::new(&mut Box::new(&Foo)).method(); LL | std::rc::Rc::new(&mut Box::new(&Foo)).method();
@ -129,7 +129,7 @@ LL | 1u64.method2();
= note: the following trait defines an item `method2`, perhaps you need to implement it: = note: the following trait defines an item `method2`, perhaps you need to implement it:
candidate #1: `foo::Bar` 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 --> $DIR/no-method-suggested-traits.rs:47:44
| |
LL | std::rc::Rc::new(&mut Box::new(&1u64)).method2(); LL | std::rc::Rc::new(&mut Box::new(&1u64)).method2();
@ -139,7 +139,7 @@ LL | std::rc::Rc::new(&mut Box::new(&1u64)).method2();
= note: the following trait defines an item `method2`, perhaps you need to implement it: = note: the following trait defines an item `method2`, perhaps you need to implement it:
candidate #1: `foo::Bar` 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 --> $DIR/no-method-suggested-traits.rs:50:37
| |
LL | no_method_suggested_traits::Foo.method2(); LL | no_method_suggested_traits::Foo.method2();
@ -149,7 +149,7 @@ LL | no_method_suggested_traits::Foo.method2();
= note: the following trait defines an item `method2`, perhaps you need to implement it: = note: the following trait defines an item `method2`, perhaps you need to implement it:
candidate #1: `foo::Bar` 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 --> $DIR/no-method-suggested-traits.rs:52:71
| |
LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2(); LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2();
@ -159,7 +159,7 @@ LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).metho
= note: the following trait defines an item `method2`, perhaps you need to implement it: = note: the following trait defines an item `method2`, perhaps you need to implement it:
candidate #1: `foo::Bar` 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 --> $DIR/no-method-suggested-traits.rs:54:40
| |
LL | no_method_suggested_traits::Bar::X.method2(); LL | no_method_suggested_traits::Bar::X.method2();
@ -169,7 +169,7 @@ LL | no_method_suggested_traits::Bar::X.method2();
= note: the following trait defines an item `method2`, perhaps you need to implement it: = note: the following trait defines an item `method2`, perhaps you need to implement it:
candidate #1: `foo::Bar` 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 --> $DIR/no-method-suggested-traits.rs:56:74
| |
LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2(); LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2();
@ -179,7 +179,7 @@ LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).me
= note: the following trait defines an item `method2`, perhaps you need to implement it: = note: the following trait defines an item `method2`, perhaps you need to implement it:
candidate #1: `foo::Bar` 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 --> $DIR/no-method-suggested-traits.rs:59:9
| |
LL | struct Foo; LL | struct Foo;
@ -192,7 +192,7 @@ LL | Foo.method3();
= note: the following trait defines an item `method3`, perhaps you need to implement it: = note: the following trait defines an item `method3`, perhaps you need to implement it:
candidate #1: `no_method_suggested_traits::foo::PubPub` 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 --> $DIR/no-method-suggested-traits.rs:61:43
| |
LL | std::rc::Rc::new(&mut Box::new(&Foo)).method3(); LL | std::rc::Rc::new(&mut Box::new(&Foo)).method3();
@ -202,7 +202,7 @@ LL | std::rc::Rc::new(&mut Box::new(&Foo)).method3();
= note: the following trait defines an item `method3`, perhaps you need to implement it: = note: the following trait defines an item `method3`, perhaps you need to implement it:
candidate #1: `no_method_suggested_traits::foo::PubPub` 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 --> $DIR/no-method-suggested-traits.rs:63:12
| |
LL | enum Bar { X } LL | enum Bar { X }
@ -215,7 +215,7 @@ LL | Bar::X.method3();
= note: the following trait defines an item `method3`, perhaps you need to implement it: = note: the following trait defines an item `method3`, perhaps you need to implement it:
candidate #1: `no_method_suggested_traits::foo::PubPub` 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 --> $DIR/no-method-suggested-traits.rs:65:46
| |
LL | std::rc::Rc::new(&mut Box::new(&Bar::X)).method3(); LL | std::rc::Rc::new(&mut Box::new(&Bar::X)).method3();
@ -231,31 +231,31 @@ error[E0599]: no method named `method3` found for type `usize` in the current sc
LL | 1_usize.method3(); LL | 1_usize.method3();
| ^^^^^^^ method not found in `usize` | ^^^^^^^ 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 --> $DIR/no-method-suggested-traits.rs:70:47
| |
LL | std::rc::Rc::new(&mut Box::new(&1_usize)).method3(); LL | std::rc::Rc::new(&mut Box::new(&1_usize)).method3();
| ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&usize>>` | ^^^^^^^ 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 --> $DIR/no-method-suggested-traits.rs:71:37
| |
LL | no_method_suggested_traits::Foo.method3(); LL | no_method_suggested_traits::Foo.method3();
| ^^^^^^^ method not found in `no_method_suggested_traits::Foo` | ^^^^^^^ 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 --> $DIR/no-method-suggested-traits.rs:72:71
| |
LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method3(); 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>>` | ^^^^^^^ 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 --> $DIR/no-method-suggested-traits.rs:74:40
| |
LL | no_method_suggested_traits::Bar::X.method3(); LL | no_method_suggested_traits::Bar::X.method3();
| ^^^^^^^ method not found in `no_method_suggested_traits::Bar` | ^^^^^^^ 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 --> $DIR/no-method-suggested-traits.rs:75:74
| |
LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3(); LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3();

View file

@ -37,7 +37,7 @@ LL | Foo.bar();
| |
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate = 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 --> $DIR/infinite-autoderef.rs:26:9
| |
LL | struct Foo; LL | struct Foo;

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `foo` found for type `&b::B` in the current scope error[E0599]: no method named `foo` found for reference `&b::B` in the current scope
--> $DIR/issue-10465.rs:17:15 --> $DIR/issue-10465.rs:17:15
| |
LL | b.foo(); LL | b.foo();

View file

@ -12,7 +12,7 @@ LL | self.iter()
= help: type parameters must be constrained to match other types = 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 = 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 --> $DIR/issue-13853.rs:27:23
| |
LL | for node in graph.iter() { LL | for node in graph.iter() {

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `homura` found for type `&'static str` in the current scope error[E0599]: no method named `homura` found for reference `&'static str` in the current scope
--> $DIR/issue-19521.rs:2:8 --> $DIR/issue-19521.rs:2:8
| |
LL | "".homura()(); LL | "".homura()();

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `kaname` found for type `Homura` in the current scope error[E0599]: no method named `kaname` found for struct `Homura` in the current scope
--> $DIR/issue-19692.rs:4:40 --> $DIR/issue-19692.rs:4:40
| |
LL | struct Homura; LL | struct Homura;

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `to_string` found for type `*const u8` in the current scope error[E0599]: no method named `to_string` found for raw pointer `*const u8` in the current scope
--> $DIR/issue-21596.rs:4:22 --> $DIR/issue-21596.rs:4:22
| |
LL | println!("{}", z.to_string()); LL | println!("{}", z.to_string());

View file

@ -2,7 +2,7 @@ enum Delicious {
Pie = 0x1, Pie = 0x1,
Apple = 0x2, Apple = 0x2,
ApplePie = Delicious::Apple as isize | Delicious::PIE as isize, 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() {} fn main() {}

View file

@ -1,4 +1,4 @@
error[E0599]: no variant or associated item named `PIE` found for type `Delicious` in the current scope error[E0599]: no variant or associated item named `PIE` found for enum `Delicious` in the current scope
--> $DIR/issue-22933-2.rs:4:55 --> $DIR/issue-22933-2.rs:4:55
| |
LL | enum Delicious { LL | enum Delicious {

View file

@ -1,4 +1,4 @@
const FOO: [u32; u8::MIN as usize] = []; 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() {}

View file

@ -7,7 +7,7 @@ fn use_token(token: &Token) { unimplemented!() }
fn main() { fn main() {
use_token(&Token::Homura); //~ ERROR no variant or associated item named `Homura` 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
Struct::method; //~ ERROR no function or associated item named `method` found for type Struct::method; //~ ERROR no function or associated item named `method` found
Struct::Assoc; //~ ERROR no associated item named `Assoc` found for type `Struct` in Struct::Assoc; //~ ERROR no associated item named `Assoc` found
} }

View file

@ -1,4 +1,4 @@
error[E0599]: no variant or associated item named `Homura` found for type `Token` in the current scope error[E0599]: no variant or associated item named `Homura` found for enum `Token` in the current scope
--> $DIR/issue-23173.rs:9:23 --> $DIR/issue-23173.rs:9:23
| |
LL | enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ } LL | enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ }
@ -7,7 +7,7 @@ LL | enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ }
LL | use_token(&Token::Homura); LL | use_token(&Token::Homura);
| ^^^^^^ variant or associated item not found in `Token` | ^^^^^^ 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 --> $DIR/issue-23173.rs:10:13
| |
LL | struct Struct { LL | struct Struct {
@ -16,7 +16,7 @@ LL | struct Struct {
LL | Struct::method(); LL | Struct::method();
| ^^^^^^ function or associated item not found in `Struct` | ^^^^^^ 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 --> $DIR/issue-23173.rs:11:13
| |
LL | struct Struct { LL | struct Struct {
@ -25,7 +25,7 @@ LL | struct Struct {
LL | Struct::method; LL | Struct::method;
| ^^^^^^ function or associated item not found in `Struct` | ^^^^^^ 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 --> $DIR/issue-23173.rs:12:13
| |
LL | struct Struct { LL | struct Struct {

View file

@ -1,5 +1,5 @@
pub enum SomeEnum { 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() {} fn main() {}

View file

@ -1,4 +1,4 @@
error[E0599]: no variant or associated item named `A` found for type `SomeEnum` in the current scope error[E0599]: no variant or associated item named `A` found for enum `SomeEnum` in the current scope
--> $DIR/issue-23217.rs:2:19 --> $DIR/issue-23217.rs:2:19
| |
LL | pub enum SomeEnum { LL | pub enum SomeEnum {

View file

@ -1,6 +1,6 @@
macro_rules! foo { macro_rules! foo {
($e:expr) => { $e.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() { fn main() {
@ -8,5 +8,5 @@ fn main() {
foo!(a); foo!(a);
foo!(1i32.foo()); foo!(1i32.foo());
//~^ ERROR no method named `foo` found for type `i32` in the current scope //~^ ERROR no method named `foo` found
} }

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `clone` found for type `C` in the current scope error[E0599]: no method named `clone` found for struct `C` in the current scope
--> $DIR/issue-2823.rs:13:16 --> $DIR/issue-2823.rs:13:16
| |
LL | struct C { LL | struct C {

View file

@ -4,7 +4,7 @@ error[E0191]: the value of the associated type `Output` (from trait `std::ops::B
LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8); LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8);
| ^^^^^^ help: specify the associated type: `BitXor<Output = Type>` | ^^^^^^ 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 --> $DIR/issue-28344.rs:4:25
| |
LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8); LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8);
@ -19,7 +19,7 @@ error[E0191]: the value of the associated type `Output` (from trait `std::ops::B
LL | let g = BitXor::bitor; LL | let g = BitXor::bitor;
| ^^^^^^ help: specify the associated type: `BitXor<Output = Type>` | ^^^^^^ 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 --> $DIR/issue-28344.rs:8:21
| |
LL | let g = BitXor::bitor; LL | let g = BitXor::bitor;

View file

@ -2,6 +2,6 @@
pub trait Foo {} pub trait Foo {}
impl Foo for [u8; usize::BYTES] {} 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() { } fn main() { }

View file

@ -5,7 +5,7 @@ fn main(){
foo(|| { foo(|| {
match Foo::Bar(1) { match Foo::Bar(1) {
Foo::Baz(..) => (), Foo::Baz(..) => (),
//~^ ERROR no variant or associated item named `Baz` found for type `Foo` //~^ ERROR no variant or associated item named `Baz` found
_ => (), _ => (),
} }
}); });

View file

@ -1,4 +1,4 @@
error[E0599]: no variant or associated item named `Baz` found for type `Foo` in the current scope error[E0599]: no variant or associated item named `Baz` found for enum `Foo` in the current scope
--> $DIR/issue-28971.rs:7:18 --> $DIR/issue-28971.rs:7:18
| |
LL | enum Foo { LL | enum Foo {

View file

@ -13,7 +13,7 @@ fn func() -> Ret {
fn main() { fn main() {
Obj::func.x(); 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(); func.x();
//~^ ERROR no method named `x` found for type `fn() -> Ret {func}` in the current scope //~^ ERROR no method named `x` found
} }

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `x` found for type `fn() -> Ret {Obj::func}` in the current scope error[E0599]: no method named `x` found for fn item `fn() -> Ret {Obj::func}` in the current scope
--> $DIR/issue-29124.rs:15:15 --> $DIR/issue-29124.rs:15:15
| |
LL | Obj::func.x(); LL | Obj::func.x();
@ -6,7 +6,7 @@ LL | Obj::func.x();
| |
= note: Obj::func is a function, perhaps you wish to call it = 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 --> $DIR/issue-29124.rs:17:10
| |
LL | func.x(); LL | func.x();

View file

@ -5,5 +5,5 @@ use issue_30123_aux::*;
fn main() { fn main() {
let ug = Graph::<i32, i32>::new_undirected(); 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
} }

View file

@ -1,4 +1,4 @@
error[E0599]: no function or associated item named `new_undirected` found for type `issue_30123_aux::Graph<i32, i32>` in the current scope error[E0599]: no function or associated item named `new_undirected` found for struct `issue_30123_aux::Graph<i32, i32>` in the current scope
--> $DIR/issue-30123.rs:7:33 --> $DIR/issue-30123.rs:7:33
| |
LL | let ug = Graph::<i32, i32>::new_undirected(); LL | let ug = Graph::<i32, i32>::new_undirected();

View file

@ -7,7 +7,7 @@ LL | .cloned()
= note: expected type `u8` = note: expected type `u8`
found reference `&_` 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 --> $DIR/issue-31173.rs:14:10
| |
LL | .collect(); LL | .collect();

View file

@ -1,4 +1,4 @@
fn main() { 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 <i32 as std::str::FromStr>::from_str(&baz); // No complaints about `str` being unsized
} }

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `foo` found for type `()` in the current scope error[E0599]: no method named `foo` found for unit type `()` in the current scope
--> $DIR/issue-33575.rs:2:18 --> $DIR/issue-33575.rs:2:18
| |
LL | let baz = ().foo(); LL | let baz = ().foo();

View file

@ -4,7 +4,7 @@ enum S {
fn bug(l: S) { fn bug(l: S) {
match l { match l {
S::B {} => {}, //~ ERROR no variant `B` in enum `S` S::B {} => {}, //~ ERROR no variant named `B` found for enum `S`
} }
} }

View file

@ -1,4 +1,4 @@
error: no variant `B` in enum `S` error[E0599]: no variant named `B` found for enum `S`
--> $DIR/issue-34209.rs:7:12 --> $DIR/issue-34209.rs:7:12
| |
LL | enum S { LL | enum S {
@ -9,3 +9,4 @@ LL | S::B {} => {},
error: aborting due to previous error error: aborting due to previous error
For more information about this error, try `rustc --explain E0599`.

View file

@ -7,5 +7,5 @@ fn main () {
//~| ERROR expected expression, found reserved identifier `_` //~| ERROR expected expression, found reserved identifier `_`
//~| 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(); 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
} }

View file

@ -43,7 +43,7 @@ LL | let sr: Vec<(u32, _, _) = vec![];
| | | |
| cannot assign to this expression | 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 --> $DIR/issue-34334.rs:9:36
| |
LL | let sr2: Vec<(u32, _, _)> = sr.iter().map(|(faction, th_sender, th_receiver)| {}).collect(); LL | let sr2: Vec<(u32, _, _)> = sr.iter().map(|(faction, th_sender, th_receiver)| {}).collect();

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `is_subset` found for type `&std::collections::HashSet<T>` in the current scope error[E0599]: no method named `is_subset` found for reference `&std::collections::HashSet<T>` in the current scope
--> $DIR/issue-35677.rs:4:10 --> $DIR/issue-35677.rs:4:10
| |
LL | this.is_subset(other) LL | this.is_subset(other)

View file

@ -7,7 +7,7 @@ impl Obj {
return 1+1 == 2 return 1+1 == 2
} }
pub fn chirp(&self) { 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
} }
} }

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `boom` found for type `&Obj` in the current scope error[E0599]: no method named `boom` found for reference `&Obj` in the current scope
--> $DIR/issue-3707.rs:10:14 --> $DIR/issue-3707.rs:10:14
| |
LL | self.boom(); LL | self.boom();

View file

@ -1,5 +1,5 @@
fn foo<T: Iterator>() { 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() { } fn main() { }

View file

@ -1,4 +1,4 @@
error[E0599]: no associated item named `Item` found for type `T` in the current scope error[E0599]: no associated item named `Item` found for type parameter `T` in the current scope
--> $DIR/issue-38919.rs:2:8 --> $DIR/issue-38919.rs:2:8
| |
LL | T::Item; LL | T::Item;

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `exec` found for type `&mut std::process::Command` in the current scope error[E0599]: no method named `exec` found for mutable reference `&mut std::process::Command` in the current scope
--> $DIR/issue-39175.rs:15:39 --> $DIR/issue-39175.rs:15:39
| |
LL | Command::new("echo").arg("hello").exec(); LL | Command::new("echo").arg("hello").exec();

View file

@ -12,7 +12,7 @@ impl Dim for Dim3 {
pub struct Vector<T, D: Dim> { pub struct Vector<T, D: Dim> {
entries: [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, _dummy: D,
} }

View file

@ -1,4 +1,4 @@
error[E0599]: no function or associated item named `dim` found for type `D` in the current scope error[E0599]: no function or associated item named `dim` found for type parameter `D` in the current scope
--> $DIR/issue-39559.rs:14:21 --> $DIR/issue-39559.rs:14:21
| |
LL | entries: [T; D::dim()], LL | entries: [T; D::dim()],

View file

@ -20,6 +20,6 @@ impl ToString_ for Point {
fn main() { fn main() {
let p = Point::new(0.0, 0.0); 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()); println!("{}", p.to_string());
} }

View file

@ -7,7 +7,7 @@ LL | | Point { x: x, y: y }
LL | | } LL | | }
| |_____^ not a member of trait `ToString_` | |_____^ 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 --> $DIR/issue-3973.rs:22:20
| |
LL | struct Point { LL | struct Point {

View file

@ -25,5 +25,5 @@ impl<T: Clone, F> Iterator for Iterate<T, F> where F: Fn(&T) -> T {
fn main() { fn main() {
let a = iterate(0, |x| x+1); let a = iterate(0, |x| x+1);
println!("{:?}", a.iter().take(10).collect::<Vec<usize>>()); println!("{:?}", a.iter().take(10).collect::<Vec<usize>>());
//~^ ERROR no method named `iter` found for type `Iterate<{integer} //~^ ERROR no method named `iter` found
} }

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `iter` found for type `Iterate<{integer}, [closure@$DIR/issue-41880.rs:26:24: 26:31]>` in the current scope error[E0599]: no method named `iter` found for struct `Iterate<{integer}, [closure@$DIR/issue-41880.rs:26:24: 26:31]>` in the current scope
--> $DIR/issue-41880.rs:27:24 --> $DIR/issue-41880.rs:27:24
| |
LL | pub struct Iterate<T, F> { LL | pub struct Iterate<T, F> {

View file

@ -1,4 +1,4 @@
error[E0599]: no associated item named `String` found for type `std::string::String` in the current scope error[E0599]: no associated item named `String` found for struct `std::string::String` in the current scope
--> $DIR/issue-42880.rs:4:22 --> $DIR/issue-42880.rs:4:22
| |
LL | let f = |&Value::String(_)| (); LL | let f = |&Value::String(_)| ();

View file

@ -8,5 +8,5 @@
extern crate xcrate_issue_43189_b; extern crate xcrate_issue_43189_b;
fn main() { fn main() {
().a(); ().a();
//~^ ERROR no method named `a` found for type `()` in the current scope [E0599] //~^ ERROR no method named `a` found
} }

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `a` found for type `()` in the current scope error[E0599]: no method named `a` found for unit type `()` in the current scope
--> $DIR/issue-43189.rs:10:8 --> $DIR/issue-43189.rs:10:8
| |
LL | ().a(); LL | ().a();

View file

@ -1,4 +1,4 @@
fn main() { fn main() {
let _result = &Some(42).as_deref(); 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}>`
} }

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `as_deref` found for type `std::option::Option<{integer}>` in the current scope error[E0599]: no method named `as_deref` found for enum `std::option::Option<{integer}>` in the current scope
--> $DIR/option-as_deref.rs:2:29 --> $DIR/option-as_deref.rs:2:29
| |
LL | let _result = &Some(42).as_deref(); LL | let _result = &Some(42).as_deref();

View file

@ -1,4 +1,4 @@
fn main() { fn main() {
let _result = &mut Some(42).as_deref_mut(); 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}>`
} }

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `as_deref_mut` found for type `std::option::Option<{integer}>` in the current scope error[E0599]: no method named `as_deref_mut` found for enum `std::option::Option<{integer}>` in the current scope
--> $DIR/option-as_deref_mut.rs:2:33 --> $DIR/option-as_deref_mut.rs:2:33
| |
LL | let _result = &mut Some(42).as_deref_mut(); LL | let _result = &mut Some(42).as_deref_mut();

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `as_deref` found for type `std::result::Result<{integer}, _>` in the current scope error[E0599]: no method named `as_deref` found for enum `std::result::Result<{integer}, _>` in the current scope
--> $DIR/result-as_deref.rs:4:27 --> $DIR/result-as_deref.rs:4:27
| |
LL | let _result = &Ok(42).as_deref(); LL | let _result = &Ok(42).as_deref();

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `as_deref_err` found for type `std::result::Result<_, {integer}>` in the current scope error[E0599]: no method named `as_deref_err` found for enum `std::result::Result<_, {integer}>` in the current scope
--> $DIR/result-as_deref_err.rs:4:28 --> $DIR/result-as_deref_err.rs:4:28
| |
LL | let _result = &Err(41).as_deref_err(); LL | let _result = &Err(41).as_deref_err();

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `as_deref_mut` found for type `std::result::Result<{integer}, _>` in the current scope error[E0599]: no method named `as_deref_mut` found for enum `std::result::Result<{integer}, _>` in the current scope
--> $DIR/result-as_deref_mut.rs:4:31 --> $DIR/result-as_deref_mut.rs:4:31
| |
LL | let _result = &mut Ok(42).as_deref_mut(); LL | let _result = &mut Ok(42).as_deref_mut();

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `as_deref_mut_err` found for type `std::result::Result<_, {integer}>` in the current scope error[E0599]: no method named `as_deref_mut_err` found for enum `std::result::Result<_, {integer}>` in the current scope
--> $DIR/result-as_deref_mut_err.rs:4:32 --> $DIR/result-as_deref_mut_err.rs:4:32
| |
LL | let _result = &mut Err(41).as_deref_mut_err(); LL | let _result = &mut Err(41).as_deref_mut_err();

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `as_deref_mut_ok` found for type `std::result::Result<{integer}, _>` in the current scope error[E0599]: no method named `as_deref_mut_ok` found for enum `std::result::Result<{integer}, _>` in the current scope
--> $DIR/result-as_deref_mut_ok.rs:4:31 --> $DIR/result-as_deref_mut_ok.rs:4:31
| |
LL | let _result = &mut Ok(42).as_deref_mut_ok(); LL | let _result = &mut Ok(42).as_deref_mut_ok();

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `as_deref_ok` found for type `std::result::Result<{integer}, _>` in the current scope error[E0599]: no method named `as_deref_ok` found for enum `std::result::Result<{integer}, _>` in the current scope
--> $DIR/result-as_deref_ok.rs:4:27 --> $DIR/result-as_deref_ok.rs:4:27
| |
LL | let _result = &Ok(42).as_deref_ok(); LL | let _result = &Ok(42).as_deref_ok();

View file

@ -8,5 +8,5 @@ impl Foo for isize {
fn main() { fn main() {
(&5isize as &dyn Foo).foo(); (&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
} }

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `foo` found for type `&dyn Foo` in the current scope error[E0599]: no method named `foo` found for reference `&dyn Foo` in the current scope
--> $DIR/issue-5153.rs:10:27 --> $DIR/issue-5153.rs:10:27
| |
LL | (&5isize as &dyn Foo).foo(); LL | (&5isize as &dyn Foo).foo();

View file

@ -4,7 +4,7 @@ error[E0616]: field `inner` of struct `std::sync::Mutex` is private
LL | let _ = test.comps.inner.lock().unwrap(); 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 --> $DIR/issue-54062.rs:10:37
| |
LL | let _ = test.comps.inner.lock().unwrap(); LL | let _ = test.comps.inner.lock().unwrap();

View file

@ -1,4 +1,4 @@
error[E0599]: no method named `f` found for type `fn(&u8)` in the current scope error[E0599]: no method named `f` found for fn pointer `fn(&u8)` in the current scope
--> $DIR/issue-57362-1.rs:20:7 --> $DIR/issue-57362-1.rs:20:7
| |
LL | a.f(); LL | a.f();

View file

@ -1,4 +1,4 @@
error[E0599]: no function or associated item named `make_g` found for type `for<'r> fn(&'r ())` in the current scope error[E0599]: no function or associated item named `make_g` found for fn pointer `for<'r> fn(&'r ())` in the current scope
--> $DIR/issue-57362-2.rs:22:25 --> $DIR/issue-57362-2.rs:22:25
| |
LL | let x = <fn (&())>::make_g(); LL | let x = <fn (&())>::make_g();

View file

@ -18,5 +18,5 @@ fn main() {
Trait::exists(()); Trait::exists(());
// no object safety error // no object safety error
Trait::nonexistent(()); Trait::nonexistent(());
//~^ ERROR no function or associated item named `nonexistent` found for type `dyn Trait` //~^ ERROR no function or associated item named `nonexistent` found
} }

Some files were not shown because too many files have changed in this diff Show more