summary refs log tree commit diff
path: root/src/test/ui/impl-trait
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2017-12-10 23:29:24 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2017-12-14 23:26:39 +0300
commit1f5b201affc48dcf0b637caa9596c11d83e1db94 (patch)
treeeb7044df493bdd2882ee0051003e796202e6f5b0 /src/test/ui/impl-trait
parentd4e51a8fb286444a8c276a05a1c3ba6ba8ca6576 (diff)
downloadrust-1f5b201affc48dcf0b637caa9596c11d83e1db94.tar.gz
rust-1f5b201affc48dcf0b637caa9596c11d83e1db94.zip
Remove NOTE/HELP annotations from UI tests
Diffstat (limited to 'src/test/ui/impl-trait')
-rw-r--r--src/test/ui/impl-trait/auto-trait-leak.rs13
-rw-r--r--src/test/ui/impl-trait/auto-trait-leak.stderr26
-rw-r--r--src/test/ui/impl-trait/issue-21659-show-relevant-trait-impls-3.rs1
-rw-r--r--src/test/ui/impl-trait/method-suggestion-no-duplication.rs1
-rw-r--r--src/test/ui/impl-trait/no-method-suggested-traits.rs23
-rw-r--r--src/test/ui/impl-trait/no-method-suggested-traits.stderr126
6 files changed, 77 insertions, 113 deletions
diff --git a/src/test/ui/impl-trait/auto-trait-leak.rs b/src/test/ui/impl-trait/auto-trait-leak.rs
index 8a5033e7647..705390e3b96 100644
--- a/src/test/ui/impl-trait/auto-trait-leak.rs
+++ b/src/test/ui/impl-trait/auto-trait-leak.rs
@@ -26,17 +26,9 @@ fn send<T: Send>(_: T) {}
 fn main() {
     send(before());
     //~^ ERROR the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied
-    //~| NOTE `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
-    //~| NOTE required because it appears within the type `[closure
-    //~| NOTE required because it appears within the type `impl std::ops::Fn<(i32,)>`
-    //~| NOTE required by `send`
 
     send(after());
     //~^ ERROR the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied
-    //~| NOTE `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
-    //~| NOTE required because it appears within the type `[closure
-    //~| NOTE required because it appears within the type `impl std::ops::Fn<(i32,)>`
-    //~| NOTE required by `send`
 }
 
 // Deferred path, main has to wait until typeck finishes,
@@ -52,17 +44,12 @@ fn after() -> impl Fn(i32) {
 fn cycle1() -> impl Clone {
     //~^ ERROR unsupported cyclic reference between types/traits detected
     //~| cyclic reference
-    //~| NOTE the cycle begins when processing `cycle1`...
-    //~| NOTE ...which then requires processing `cycle1::{{impl-Trait}}`...
-    //~| NOTE ...which then again requires processing `cycle1`, completing the cycle.
     send(cycle2().clone());
 
     Rc::new(Cell::new(5))
 }
 
 fn cycle2() -> impl Clone {
-    //~^ NOTE ...which then requires processing `cycle2::{{impl-Trait}}`...
-    //~| NOTE ...which then requires processing `cycle2`...
     send(cycle1().clone());
 
     Rc::new(String::from("foo"))
diff --git a/src/test/ui/impl-trait/auto-trait-leak.stderr b/src/test/ui/impl-trait/auto-trait-leak.stderr
index 1c03e9d8526..ffd6a3fe4ff 100644
--- a/src/test/ui/impl-trait/auto-trait-leak.stderr
+++ b/src/test/ui/impl-trait/auto-trait-leak.stderr
@@ -10,41 +10,41 @@ error[E0277]: the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::S
    = note: required by `send`
 
 error[E0277]: the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>`
-  --> $DIR/auto-trait-leak.rs:34:5
+  --> $DIR/auto-trait-leak.rs:30:5
    |
-34 |     send(after());
+30 |     send(after());
    |     ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
    |
    = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`
-   = note: required because it appears within the type `[closure@$DIR/auto-trait-leak.rs:46:5: 46:22 p:std::rc::Rc<std::cell::Cell<i32>>]`
+   = note: required because it appears within the type `[closure@$DIR/auto-trait-leak.rs:38:5: 38:22 p:std::rc::Rc<std::cell::Cell<i32>>]`
    = note: required because it appears within the type `impl std::ops::Fn<(i32,)>`
    = note: required by `send`
 
 error[E0391]: unsupported cyclic reference between types/traits detected
-  --> $DIR/auto-trait-leak.rs:52:1
+  --> $DIR/auto-trait-leak.rs:44:1
    |
-52 | fn cycle1() -> impl Clone {
+44 | fn cycle1() -> impl Clone {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic reference
    |
 note: the cycle begins when processing `cycle1`...
-  --> $DIR/auto-trait-leak.rs:52:1
+  --> $DIR/auto-trait-leak.rs:44:1
    |
-52 | fn cycle1() -> impl Clone {
+44 | fn cycle1() -> impl Clone {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 note: ...which then requires processing `cycle2::{{impl-Trait}}`...
-  --> $DIR/auto-trait-leak.rs:63:16
+  --> $DIR/auto-trait-leak.rs:52:16
    |
-63 | fn cycle2() -> impl Clone {
+52 | fn cycle2() -> impl Clone {
    |                ^^^^^^^^^^
 note: ...which then requires processing `cycle2`...
-  --> $DIR/auto-trait-leak.rs:63:1
+  --> $DIR/auto-trait-leak.rs:52:1
    |
-63 | fn cycle2() -> impl Clone {
+52 | fn cycle2() -> impl Clone {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 note: ...which then requires processing `cycle1::{{impl-Trait}}`...
-  --> $DIR/auto-trait-leak.rs:52:16
+  --> $DIR/auto-trait-leak.rs:44:16
    |
-52 | fn cycle1() -> impl Clone {
+44 | fn cycle1() -> impl Clone {
    |                ^^^^^^^^^^
    = note: ...which then again requires processing `cycle1`, completing the cycle.
 
diff --git a/src/test/ui/impl-trait/issue-21659-show-relevant-trait-impls-3.rs b/src/test/ui/impl-trait/issue-21659-show-relevant-trait-impls-3.rs
index 9120cdab598..79d487493e8 100644
--- a/src/test/ui/impl-trait/issue-21659-show-relevant-trait-impls-3.rs
+++ b/src/test/ui/impl-trait/issue-21659-show-relevant-trait-impls-3.rs
@@ -29,5 +29,4 @@ fn main() {
 
     f1.foo(1usize);
     //~^ error: method named `foo` found for type `Bar` in the current scope
-    //~| help: items from traits can only be used if the trait is implemented and in scope
 }
diff --git a/src/test/ui/impl-trait/method-suggestion-no-duplication.rs b/src/test/ui/impl-trait/method-suggestion-no-duplication.rs
index 15ddadf4c51..28028922e32 100644
--- a/src/test/ui/impl-trait/method-suggestion-no-duplication.rs
+++ b/src/test/ui/impl-trait/method-suggestion-no-duplication.rs
@@ -18,5 +18,4 @@ fn foo<F>(f: F) where F: FnMut(Foo) {}
 fn main() {
     foo(|s| s.is_empty());
     //~^ ERROR no method named `is_empty` found
-    //~| HELP items from traits can only be used if the trait is implemented and in scope
 }
diff --git a/src/test/ui/impl-trait/no-method-suggested-traits.rs b/src/test/ui/impl-trait/no-method-suggested-traits.rs
index d9866772bdd..07c0e6f529f 100644
--- a/src/test/ui/impl-trait/no-method-suggested-traits.rs
+++ b/src/test/ui/impl-trait/no-method-suggested-traits.rs
@@ -11,12 +11,7 @@
 // aux-build:no_method_suggested_traits.rs
 extern crate no_method_suggested_traits;
 
-struct Foo; //~ HELP perhaps add a `use` for it
-//~^ HELP perhaps add a `use` for it
-//~| HELP perhaps add a `use` for it
-//~| HELP perhaps add a `use` for it
-//~| HELP perhaps add a `use` for one of them
-//~| HELP perhaps add a `use` for one of them
+struct Foo;
 enum Bar { X }
 
 mod foo {
@@ -44,57 +39,41 @@ fn main() {
 
     'a'.method();
     //~^ ERROR no method named
-    //~| HELP items from traits can only be used if the trait is in scope
     std::rc::Rc::new(&mut Box::new(&'a')).method();
     //~^ ERROR no method named
-    //~| HELP items from traits can only be used if the trait is in scope
 
     1i32.method();
     //~^ ERROR no method named
-    //~| HELP items from traits can only be used if the trait is in scope
     std::rc::Rc::new(&mut Box::new(&1i32)).method();
     //~^ ERROR no method named
-    //~| HELP items from traits can only be used if the trait is in scope
 
     Foo.method();
     //~^ ERROR no method named
-    //~| HELP items from traits can only be used if the trait is implemented and in scope
     std::rc::Rc::new(&mut Box::new(&Foo)).method();
     //~^ ERROR no method named
-    //~| HELP items from traits can only be used if the trait is implemented and in scope
 
     1u64.method2();
     //~^ ERROR no method named
-    //~| HELP items from traits can only be used if the trait is implemented and in scope
     std::rc::Rc::new(&mut Box::new(&1u64)).method2();
     //~^ ERROR no method named
-    //~| HELP items from traits can only be used if the trait is implemented and in scope
 
     no_method_suggested_traits::Foo.method2();
     //~^ ERROR no method named
-    //~| HELP items from traits can only be used if the trait is implemented and in scope
     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2();
     //~^ ERROR no method named
-    //~| HELP items from traits can only be used if the trait is implemented and in scope
     no_method_suggested_traits::Bar::X.method2();
     //~^ ERROR no method named
-    //~| HELP items from traits can only be used if the trait is implemented and in scope
     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2();
     //~^ ERROR no method named
-    //~| HELP items from traits can only be used if the trait is implemented and in scope
 
     Foo.method3();
     //~^ ERROR no method named
-    //~| HELP items from traits can only be used if the trait is implemented and in scope
     std::rc::Rc::new(&mut Box::new(&Foo)).method3();
     //~^ ERROR no method named
-    //~| HELP items from traits can only be used if the trait is implemented and in scope
     Bar::X.method3();
     //~^ ERROR no method named
-    //~| HELP items from traits can only be used if the trait is implemented and in scope
     std::rc::Rc::new(&mut Box::new(&Bar::X)).method3();
     //~^ ERROR no method named
-    //~| HELP items from traits can only be used if the trait is implemented and in scope
 
     // should have no help:
     1_usize.method3(); //~ ERROR no method named
diff --git a/src/test/ui/impl-trait/no-method-suggested-traits.stderr b/src/test/ui/impl-trait/no-method-suggested-traits.stderr
index 2d519c11b94..4517f09d07c 100644
--- a/src/test/ui/impl-trait/no-method-suggested-traits.stderr
+++ b/src/test/ui/impl-trait/no-method-suggested-traits.stderr
@@ -1,7 +1,7 @@
 error[E0599]: no method named `method` found for type `u32` in the current scope
-  --> $DIR/no-method-suggested-traits.rs:38:10
+  --> $DIR/no-method-suggested-traits.rs:33:10
    |
-38 |     1u32.method();
+33 |     1u32.method();
    |          ^^^^^^
    |
    = help: items from traits can only be used if the trait is in scope
@@ -17,9 +17,9 @@ help: the following traits are implemented but not in scope, perhaps add a `use`
    |
 
 error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&u32>>` in the current scope
-  --> $DIR/no-method-suggested-traits.rs:41:44
+  --> $DIR/no-method-suggested-traits.rs:36:44
    |
-41 |     std::rc::Rc::new(&mut Box::new(&1u32)).method();
+36 |     std::rc::Rc::new(&mut Box::new(&1u32)).method();
    |                                            ^^^^^^
    |
    = help: items from traits can only be used if the trait is in scope
@@ -35,9 +35,9 @@ help: the following traits are implemented but not in scope, perhaps add a `use`
    |
 
 error[E0599]: no method named `method` found for type `char` in the current scope
-  --> $DIR/no-method-suggested-traits.rs:45:9
+  --> $DIR/no-method-suggested-traits.rs:40:9
    |
-45 |     'a'.method();
+40 |     'a'.method();
    |         ^^^^^^
    |
    = help: items from traits can only be used if the trait is in scope
@@ -47,9 +47,9 @@ help: the following trait is implemented but not in scope, perhaps add a `use` f
    |
 
 error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&char>>` in the current scope
-  --> $DIR/no-method-suggested-traits.rs:48:43
+  --> $DIR/no-method-suggested-traits.rs:42:43
    |
-48 |     std::rc::Rc::new(&mut Box::new(&'a')).method();
+42 |     std::rc::Rc::new(&mut Box::new(&'a')).method();
    |                                           ^^^^^^
    |
    = help: items from traits can only be used if the trait is in scope
@@ -59,9 +59,9 @@ help: the following trait is implemented but not in scope, perhaps add a `use` f
    |
 
 error[E0599]: no method named `method` found for type `i32` in the current scope
-  --> $DIR/no-method-suggested-traits.rs:52:10
+  --> $DIR/no-method-suggested-traits.rs:45:10
    |
-52 |     1i32.method();
+45 |     1i32.method();
    |          ^^^^^^
    |
    = help: items from traits can only be used if the trait is in scope
@@ -71,9 +71,9 @@ help: the following trait is implemented but not in scope, perhaps add a `use` f
    |
 
 error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&i32>>` in the current scope
-  --> $DIR/no-method-suggested-traits.rs:55:44
+  --> $DIR/no-method-suggested-traits.rs:47:44
    |
-55 |     std::rc::Rc::new(&mut Box::new(&1i32)).method();
+47 |     std::rc::Rc::new(&mut Box::new(&1i32)).method();
    |                                            ^^^^^^
    |
    = help: items from traits can only be used if the trait is in scope
@@ -83,12 +83,12 @@ help: the following trait is implemented but not in scope, perhaps add a `use` f
    |
 
 error[E0599]: no method named `method` found for type `Foo` in the current scope
-  --> $DIR/no-method-suggested-traits.rs:59:9
+  --> $DIR/no-method-suggested-traits.rs:50:9
    |
-14 | struct Foo; //~ HELP perhaps add a `use` for it
+14 | struct Foo;
    | ----------- method `method` not found for this
 ...
-59 |     Foo.method();
+50 |     Foo.method();
    |         ^^^^^^
    |
    = help: items from traits can only be used if the trait is implemented and in scope
@@ -101,9 +101,9 @@ error[E0599]: no method named `method` found for type `Foo` in the current scope
            candidate #6: `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
-  --> $DIR/no-method-suggested-traits.rs:62:43
+  --> $DIR/no-method-suggested-traits.rs:52:43
    |
-62 |     std::rc::Rc::new(&mut Box::new(&Foo)).method();
+52 |     std::rc::Rc::new(&mut Box::new(&Foo)).method();
    |                                           ^^^^^^
    |
    = help: items from traits can only be used if the trait is implemented and in scope
@@ -116,9 +116,9 @@ error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::box
            candidate #6: `no_method_suggested_traits::Reexported`
 
 error[E0599]: no method named `method2` found for type `u64` in the current scope
-  --> $DIR/no-method-suggested-traits.rs:66:10
+  --> $DIR/no-method-suggested-traits.rs:55:10
    |
-66 |     1u64.method2();
+55 |     1u64.method2();
    |          ^^^^^^^
    |
    = help: items from traits can only be used if the trait is implemented and in scope
@@ -126,9 +126,9 @@ error[E0599]: no method named `method2` found for type `u64` in the current scop
            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
-  --> $DIR/no-method-suggested-traits.rs:69:44
+  --> $DIR/no-method-suggested-traits.rs:57:44
    |
-69 |     std::rc::Rc::new(&mut Box::new(&1u64)).method2();
+57 |     std::rc::Rc::new(&mut Box::new(&1u64)).method2();
    |                                            ^^^^^^^
    |
    = help: items from traits can only be used if the trait is implemented and in scope
@@ -136,9 +136,9 @@ error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::bo
            candidate #1: `foo::Bar`
 
 error[E0599]: no method named `method2` found for type `no_method_suggested_traits::Foo` in the current scope
-  --> $DIR/no-method-suggested-traits.rs:73:37
+  --> $DIR/no-method-suggested-traits.rs:60:37
    |
-73 |     no_method_suggested_traits::Foo.method2();
+60 |     no_method_suggested_traits::Foo.method2();
    |                                     ^^^^^^^
    |
    = help: items from traits can only be used if the trait is implemented and in scope
@@ -146,9 +146,9 @@ error[E0599]: no method named `method2` found for type `no_method_suggested_trai
            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
-  --> $DIR/no-method-suggested-traits.rs:76:71
+  --> $DIR/no-method-suggested-traits.rs:62:71
    |
-76 |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2();
+62 |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2();
    |                                                                       ^^^^^^^
    |
    = help: items from traits can only be used if the trait is implemented and in scope
@@ -156,9 +156,9 @@ error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::bo
            candidate #1: `foo::Bar`
 
 error[E0599]: no method named `method2` found for type `no_method_suggested_traits::Bar` in the current scope
-  --> $DIR/no-method-suggested-traits.rs:79:40
+  --> $DIR/no-method-suggested-traits.rs:64:40
    |
-79 |     no_method_suggested_traits::Bar::X.method2();
+64 |     no_method_suggested_traits::Bar::X.method2();
    |                                        ^^^^^^^
    |
    = help: items from traits can only be used if the trait is implemented and in scope
@@ -166,9 +166,9 @@ error[E0599]: no method named `method2` found for type `no_method_suggested_trai
            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
-  --> $DIR/no-method-suggested-traits.rs:82:74
+  --> $DIR/no-method-suggested-traits.rs:66:74
    |
-82 |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2();
+66 |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2();
    |                                                                          ^^^^^^^
    |
    = help: items from traits can only be used if the trait is implemented and in scope
@@ -176,12 +176,12 @@ error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::bo
            candidate #1: `foo::Bar`
 
 error[E0599]: no method named `method3` found for type `Foo` in the current scope
-  --> $DIR/no-method-suggested-traits.rs:86:9
+  --> $DIR/no-method-suggested-traits.rs:69:9
    |
-14 | struct Foo; //~ HELP perhaps add a `use` for it
+14 | struct Foo;
    | ----------- method `method3` not found for this
 ...
-86 |     Foo.method3();
+69 |     Foo.method3();
    |         ^^^^^^^
    |
    = help: items from traits can only be used if the trait is implemented and in scope
@@ -189,9 +189,9 @@ error[E0599]: no method named `method3` found for type `Foo` in the current scop
            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
-  --> $DIR/no-method-suggested-traits.rs:89:43
+  --> $DIR/no-method-suggested-traits.rs:71:43
    |
-89 |     std::rc::Rc::new(&mut Box::new(&Foo)).method3();
+71 |     std::rc::Rc::new(&mut Box::new(&Foo)).method3();
    |                                           ^^^^^^^
    |
    = help: items from traits can only be used if the trait is implemented and in scope
@@ -199,12 +199,12 @@ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::bo
            candidate #1: `no_method_suggested_traits::foo::PubPub`
 
 error[E0599]: no method named `method3` found for type `Bar` in the current scope
-  --> $DIR/no-method-suggested-traits.rs:92:12
+  --> $DIR/no-method-suggested-traits.rs:73:12
    |
-20 | enum Bar { X }
+15 | enum Bar { X }
    | -------- method `method3` not found for this
 ...
-92 |     Bar::X.method3();
+73 |     Bar::X.method3();
    |            ^^^^^^^
    |
    = help: items from traits can only be used if the trait is implemented and in scope
@@ -212,9 +212,9 @@ error[E0599]: no method named `method3` found for type `Bar` in the current scop
            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
-  --> $DIR/no-method-suggested-traits.rs:95:46
+  --> $DIR/no-method-suggested-traits.rs:75:46
    |
-95 |     std::rc::Rc::new(&mut Box::new(&Bar::X)).method3();
+75 |     std::rc::Rc::new(&mut Box::new(&Bar::X)).method3();
    |                                              ^^^^^^^
    |
    = help: items from traits can only be used if the trait is implemented and in scope
@@ -222,40 +222,40 @@ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::bo
            candidate #1: `no_method_suggested_traits::foo::PubPub`
 
 error[E0599]: no method named `method3` found for type `usize` in the current scope
-   --> $DIR/no-method-suggested-traits.rs:100:13
-    |
-100 |     1_usize.method3(); //~ ERROR no method named
-    |             ^^^^^^^
+  --> $DIR/no-method-suggested-traits.rs:79:13
+   |
+79 |     1_usize.method3(); //~ ERROR no method named
+   |             ^^^^^^^
 
 error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&usize>>` in the current scope
-   --> $DIR/no-method-suggested-traits.rs:101:47
-    |
-101 |     std::rc::Rc::new(&mut Box::new(&1_usize)).method3(); //~ ERROR no method named
-    |                                               ^^^^^^^
+  --> $DIR/no-method-suggested-traits.rs:80:47
+   |
+80 |     std::rc::Rc::new(&mut Box::new(&1_usize)).method3(); //~ ERROR no method named
+   |                                               ^^^^^^^
 
 error[E0599]: no method named `method3` found for type `no_method_suggested_traits::Foo` in the current scope
-   --> $DIR/no-method-suggested-traits.rs:102:37
-    |
-102 |     no_method_suggested_traits::Foo.method3();  //~ ERROR no method named
-    |                                     ^^^^^^^
+  --> $DIR/no-method-suggested-traits.rs:81:37
+   |
+81 |     no_method_suggested_traits::Foo.method3();  //~ ERROR no method named
+   |                                     ^^^^^^^
 
 error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope
-   --> $DIR/no-method-suggested-traits.rs:103:71
-    |
-103 |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method3();
-    |                                                                       ^^^^^^^
+  --> $DIR/no-method-suggested-traits.rs:82:71
+   |
+82 |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method3();
+   |                                                                       ^^^^^^^
 
 error[E0599]: no method named `method3` found for type `no_method_suggested_traits::Bar` in the current scope
-   --> $DIR/no-method-suggested-traits.rs:105:40
-    |
-105 |     no_method_suggested_traits::Bar::X.method3();  //~ ERROR no method named
-    |                                        ^^^^^^^
+  --> $DIR/no-method-suggested-traits.rs:84:40
+   |
+84 |     no_method_suggested_traits::Bar::X.method3();  //~ ERROR no method named
+   |                                        ^^^^^^^
 
 error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope
-   --> $DIR/no-method-suggested-traits.rs:106:74
-    |
-106 |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3();
-    |                                                                          ^^^^^^^
+  --> $DIR/no-method-suggested-traits.rs:85:74
+   |
+85 |     std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3();
+   |                                                                          ^^^^^^^
 
 error: aborting due to 24 previous errors