@@ -122,62 +122,68 @@ LL | std::rc::Rc::new(&mut Box::new(&Foo)).method();
122122error[E0599]: no method named `method2` found for type `u64` in the current scope
123123 --> $DIR/no-method-suggested-traits.rs:45:10
124124 |
125+ LL | pub trait Bar {
126+ | ------------- this trait defines an item `method2`
127+ ...
125128LL | 1u64.method2();
126129 | ^^^^^^^ method not found in `u64`
127130 |
128131 = help: items from traits can only be used if the trait is implemented and in scope
129- = note: the following trait defines an item `method2`, perhaps you need to implement it:
130- candidate #1: `foo::Bar`
131132
132133error[E0599]: no method named `method2` found for struct `std::rc::Rc<&mut std::boxed::Box<&u64>>` in the current scope
133134 --> $DIR/no-method-suggested-traits.rs:47:44
134135 |
136+ LL | pub trait Bar {
137+ | ------------- this trait defines an item `method2`
138+ ...
135139LL | std::rc::Rc::new(&mut Box::new(&1u64)).method2();
136140 | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&u64>>`
137141 |
138142 = help: items from traits can only be used if the trait is implemented and in scope
139- = note: the following trait defines an item `method2`, perhaps you need to implement it:
140- candidate #1: `foo::Bar`
141143
142144error[E0599]: no method named `method2` found for struct `no_method_suggested_traits::Foo` in the current scope
143145 --> $DIR/no-method-suggested-traits.rs:50:37
144146 |
147+ LL | pub trait Bar {
148+ | ------------- this trait defines an item `method2`
149+ ...
145150LL | no_method_suggested_traits::Foo.method2();
146151 | ^^^^^^^ method not found in `no_method_suggested_traits::Foo`
147152 |
148153 = help: items from traits can only be used if the trait is implemented and in scope
149- = note: the following trait defines an item `method2`, perhaps you need to implement it:
150- candidate #1: `foo::Bar`
151154
152155error[E0599]: no method named `method2` found for struct `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope
153156 --> $DIR/no-method-suggested-traits.rs:52:71
154157 |
158+ LL | pub trait Bar {
159+ | ------------- this trait defines an item `method2`
160+ ...
155161LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2();
156162 | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>`
157163 |
158164 = help: items from traits can only be used if the trait is implemented and in scope
159- = note: the following trait defines an item `method2`, perhaps you need to implement it:
160- candidate #1: `foo::Bar`
161165
162166error[E0599]: no method named `method2` found for enum `no_method_suggested_traits::Bar` in the current scope
163167 --> $DIR/no-method-suggested-traits.rs:54:40
164168 |
169+ LL | pub trait Bar {
170+ | ------------- this trait defines an item `method2`
171+ ...
165172LL | no_method_suggested_traits::Bar::X.method2();
166173 | ^^^^^^^ method not found in `no_method_suggested_traits::Bar`
167174 |
168175 = help: items from traits can only be used if the trait is implemented and in scope
169- = note: the following trait defines an item `method2`, perhaps you need to implement it:
170- candidate #1: `foo::Bar`
171176
172177error[E0599]: no method named `method2` found for struct `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope
173178 --> $DIR/no-method-suggested-traits.rs:56:74
174179 |
180+ LL | pub trait Bar {
181+ | ------------- this trait defines an item `method2`
182+ ...
175183LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2();
176184 | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>`
177185 |
178186 = help: items from traits can only be used if the trait is implemented and in scope
179- = note: the following trait defines an item `method2`, perhaps you need to implement it:
180- candidate #1: `foo::Bar`
181187
182188error[E0599]: no method named `method3` found for struct `Foo` in the current scope
183189 --> $DIR/no-method-suggested-traits.rs:59:9
0 commit comments