rust/src/test/ui/impl-trait/no-method-suggested-traits.stderr

277 lines
13 KiB
Plaintext
Raw Normal View History

error[E0599]: no method named `method` found for type `u32` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:23:10
|
2018-02-23 00:42:32 +00:00
LL | 1u32.method();
| ^^^^^^ method not found in `u32`
|
= help: items from traits can only be used if the trait is in scope
help: the following traits are implemented but not in scope; perhaps add a `use` for one of them:
|
2018-02-24 23:01:39 +00:00
LL | use foo::Bar;
|
2018-02-24 23:01:39 +00:00
LL | use no_method_suggested_traits::foo::PubPub;
|
2018-02-24 23:01:39 +00:00
LL | use no_method_suggested_traits::qux::PrivPub;
|
2018-02-24 23:01:39 +00:00
LL | use no_method_suggested_traits::Reexported;
|
error[E0599]: no method named `method` found for struct `std::rc::Rc<&mut std::boxed::Box<&u32>>` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:26:44
|
2018-02-23 00:42:32 +00:00
LL | std::rc::Rc::new(&mut Box::new(&1u32)).method();
| ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&u32>>`
|
= help: items from traits can only be used if the trait is in scope
help: the following traits are implemented but not in scope; perhaps add a `use` for one of them:
|
2018-02-24 23:01:39 +00:00
LL | use foo::Bar;
|
2018-02-24 23:01:39 +00:00
LL | use no_method_suggested_traits::foo::PubPub;
|
2018-02-24 23:01:39 +00:00
LL | use no_method_suggested_traits::qux::PrivPub;
|
2018-02-24 23:01:39 +00:00
LL | use no_method_suggested_traits::Reexported;
|
error[E0599]: no method named `method` found for type `char` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:30:9
|
2018-02-23 00:42:32 +00:00
LL | 'a'.method();
| ^^^^^^ method not found in `char`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
2018-02-24 23:01:39 +00:00
LL | use foo::Bar;
|
error[E0599]: no method named `method` found for struct `std::rc::Rc<&mut std::boxed::Box<&char>>` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:32:43
|
2018-02-23 00:42:32 +00:00
LL | std::rc::Rc::new(&mut Box::new(&'a')).method();
| ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&char>>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
2018-02-24 23:01:39 +00:00
LL | use foo::Bar;
|
error[E0599]: no method named `method` found for type `i32` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:35:10
|
2018-02-23 00:42:32 +00:00
LL | 1i32.method();
| ^^^^^^ method not found in `i32`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
2018-02-24 23:01:39 +00:00
LL | use no_method_suggested_traits::foo::PubPub;
|
error[E0599]: no method named `method` found for struct `std::rc::Rc<&mut std::boxed::Box<&i32>>` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:37:44
|
2018-02-23 00:42:32 +00:00
LL | std::rc::Rc::new(&mut Box::new(&1i32)).method();
| ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&i32>>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
2018-02-24 23:01:39 +00:00
LL | use no_method_suggested_traits::foo::PubPub;
|
error[E0599]: no method named `method` found for struct `Foo` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:40:9
|
2018-02-23 00:42:32 +00:00
LL | struct Foo;
| ----------- method `method` not found for this
...
2018-02-23 00:42:32 +00:00
LL | Foo.method();
| ^^^^^^ method not found in `Foo`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following traits define an item `method`, perhaps you need to implement one of them:
candidate #1: `foo::Bar`
candidate #2: `no_method_suggested_traits::foo::PubPub`
candidate #3: `no_method_suggested_traits::qux::PrivPub`
candidate #4: `no_method_suggested_traits::Reexported`
error[E0599]: no method named `method` found for struct `std::rc::Rc<&mut std::boxed::Box<&Foo>>` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:42:43
|
2018-02-23 00:42:32 +00:00
LL | std::rc::Rc::new(&mut Box::new(&Foo)).method();
| ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&Foo>>`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following traits define an item `method`, perhaps you need to implement one of them:
candidate #1: `foo::Bar`
candidate #2: `no_method_suggested_traits::foo::PubPub`
candidate #3: `no_method_suggested_traits::qux::PrivPub`
candidate #4: `no_method_suggested_traits::Reexported`
error[E0599]: no method named `method2` found for type `u64` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:45:10
|
2018-02-23 00:42:32 +00:00
LL | 1u64.method2();
| ^^^^^^^ method not found in `u64`
|
= help: items from traits can only be used if the trait is implemented and in scope
2020-02-25 02:55:51 +00:00
note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
--> $DIR/no-method-suggested-traits.rs:8:5
|
LL | pub trait Bar {
| ^^^^^^^^^^^^^
error[E0599]: no method named `method2` found for struct `std::rc::Rc<&mut std::boxed::Box<&u64>>` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:47:44
|
2018-02-23 00:42:32 +00:00
LL | std::rc::Rc::new(&mut Box::new(&1u64)).method2();
| ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&u64>>`
|
= help: items from traits can only be used if the trait is implemented and in scope
2020-02-25 02:55:51 +00:00
note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
--> $DIR/no-method-suggested-traits.rs:8:5
|
LL | pub trait Bar {
| ^^^^^^^^^^^^^
error[E0599]: no method named `method2` found for struct `no_method_suggested_traits::Foo` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:50:37
|
2018-02-23 00:42:32 +00:00
LL | no_method_suggested_traits::Foo.method2();
| ^^^^^^^ method not found in `no_method_suggested_traits::Foo`
|
= help: items from traits can only be used if the trait is implemented and in scope
2020-02-25 02:55:51 +00:00
note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
--> $DIR/no-method-suggested-traits.rs:8:5
|
LL | pub trait Bar {
| ^^^^^^^^^^^^^
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
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:52:71
|
2018-02-23 00:42:32 +00:00
LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2();
| ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>`
|
= help: items from traits can only be used if the trait is implemented and in scope
2020-02-25 02:55:51 +00:00
note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
--> $DIR/no-method-suggested-traits.rs:8:5
|
LL | pub trait Bar {
| ^^^^^^^^^^^^^
error[E0599]: no method named `method2` found for enum `no_method_suggested_traits::Bar` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:54:40
|
2018-02-23 00:42:32 +00:00
LL | no_method_suggested_traits::Bar::X.method2();
| ^^^^^^^ method not found in `no_method_suggested_traits::Bar`
|
= help: items from traits can only be used if the trait is implemented and in scope
2020-02-25 02:55:51 +00:00
note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
--> $DIR/no-method-suggested-traits.rs:8:5
|
LL | pub trait Bar {
| ^^^^^^^^^^^^^
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
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:56:74
2017-11-20 12:13:27 +00:00
|
2018-02-23 00:42:32 +00:00
LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2();
| ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>`
2017-11-20 12:13:27 +00:00
|
= help: items from traits can only be used if the trait is implemented and in scope
2020-02-25 02:55:51 +00:00
note: `foo::Bar` defines an item `method2`, perhaps you need to implement it
--> $DIR/no-method-suggested-traits.rs:8:5
|
LL | pub trait Bar {
| ^^^^^^^^^^^^^
error[E0599]: no method named `method3` found for struct `Foo` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:59:9
2017-11-20 12:13:27 +00:00
|
2018-02-23 00:42:32 +00:00
LL | struct Foo;
2017-11-20 12:13:27 +00:00
| ----------- method `method3` not found for this
...
2018-02-23 00:42:32 +00:00
LL | Foo.method3();
| ^^^^^^^ method not found in `Foo`
2017-11-20 12:13:27 +00:00
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `method3`, perhaps you need to implement it:
candidate #1: `no_method_suggested_traits::foo::PubPub`
error[E0599]: no method named `method3` found for struct `std::rc::Rc<&mut std::boxed::Box<&Foo>>` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:61:43
2017-11-20 12:13:27 +00:00
|
2018-02-23 00:42:32 +00:00
LL | std::rc::Rc::new(&mut Box::new(&Foo)).method3();
| ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&Foo>>`
2017-11-20 12:13:27 +00:00
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `method3`, perhaps you need to implement it:
candidate #1: `no_method_suggested_traits::foo::PubPub`
error[E0599]: no method named `method3` found for enum `Bar` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:63:12
2017-11-20 12:13:27 +00:00
|
2018-02-23 00:42:32 +00:00
LL | enum Bar { X }
2017-11-20 12:13:27 +00:00
| -------- method `method3` not found for this
...
2018-02-23 00:42:32 +00:00
LL | Bar::X.method3();
| ^^^^^^^ method not found in `Bar`
2017-11-20 12:13:27 +00:00
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `method3`, perhaps you need to implement it:
candidate #1: `no_method_suggested_traits::foo::PubPub`
error[E0599]: no method named `method3` found for struct `std::rc::Rc<&mut std::boxed::Box<&Bar>>` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:65:46
2017-11-20 12:13:27 +00:00
|
2018-02-23 00:42:32 +00:00
LL | std::rc::Rc::new(&mut Box::new(&Bar::X)).method3();
| ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&Bar>>`
2017-11-20 12:13:27 +00:00
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `method3`, perhaps you need to implement it:
candidate #1: `no_method_suggested_traits::foo::PubPub`
error[E0599]: no method named `method3` found for type `usize` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:69:13
|
2019-03-09 12:03:44 +00:00
LL | 1_usize.method3();
| ^^^^^^^ method not found in `usize`
error[E0599]: no method named `method3` found for struct `std::rc::Rc<&mut std::boxed::Box<&usize>>` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:70:47
|
2019-03-09 12:03:44 +00:00
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 struct `no_method_suggested_traits::Foo` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:71:37
|
2019-03-09 12:03:44 +00:00
LL | no_method_suggested_traits::Foo.method3();
| ^^^^^^^ method not found in `no_method_suggested_traits::Foo`
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
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:72:71
|
2018-02-23 00:42:32 +00:00
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 enum `no_method_suggested_traits::Bar` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:74:40
|
2019-03-09 12:03:44 +00:00
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 struct `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/no-method-suggested-traits.rs:75:74
|
2018-02-23 00:42:32 +00:00
LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3();
| ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>`
error: aborting due to 24 previous errors
2018-03-03 14:59:40 +00:00
For more information about this error, try `rustc --explain E0599`.