Skip to content

Commit 1f5b201

Browse files
committed
Remove NOTE/HELP annotations from UI tests
1 parent d4e51a8 commit 1f5b201

File tree

462 files changed

+1756
-2814
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

462 files changed

+1756
-2814
lines changed

src/test/ui/arbitrary-self-types-not-object-safe.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,7 @@ impl Bar for usize {
3939
fn make_foo() {
4040
let x = Box::new(5usize) as Box<Foo>;
4141
//~^ ERROR E0038
42-
//~| NOTE method `foo` has a non-standard `self` type
43-
//~| NOTE the trait `Foo` cannot be made into an object
4442
//~| ERROR E0038
45-
//~| NOTE method `foo` has a non-standard `self` type
46-
//~| NOTE the trait `Foo` cannot be made into an object
47-
//~| NOTE requirements on the impl of `std::ops::CoerceUnsized<std::boxed::Box<Foo>>`
4843
}
4944

5045
fn make_bar() {

src/test/ui/asm-out-assign-imm.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ fn foo(x: isize) { println!("{}", x); }
2323
target_arch = "aarch64"))]
2424
pub fn main() {
2525
let x: isize;
26-
x = 1; //~ NOTE first assignment
26+
x = 1;
2727
foo(x);
2828
unsafe {
2929
asm!("mov $1, $0" : "=r"(x) : "r"(5));
3030
//~^ ERROR cannot assign twice to immutable variable `x`
31-
//~| NOTE cannot assign twice to immutable
3231
}
3332
foo(x);
3433
}

src/test/ui/asm-out-assign-imm.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0384]: cannot assign twice to immutable variable `x`
22
--> $DIR/asm-out-assign-imm.rs:29:9
33
|
4-
26 | x = 1; //~ NOTE first assignment
4+
26 | x = 1;
55
| ----- first assignment to `x`
66
...
77
29 | asm!("mov $1, $0" : "=r"(x) : "r"(5));

src/test/ui/associated-const-impl-wrong-lifetime.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,8 @@ trait Foo {
1515

1616

1717
impl<'a> Foo for &'a () {
18-
//~^ NOTE the lifetime 'a as defined
1918
const NAME: &'a str = "unit";
2019
//~^ ERROR mismatched types [E0308]
21-
//~| NOTE lifetime mismatch
22-
//~| NOTE expected type `&'static str`
23-
//~| NOTE ...does not necessarily outlive the static lifetime
2420
}
2521

2622
fn main() {}

src/test/ui/associated-const-impl-wrong-lifetime.stderr

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0308]: mismatched types
2-
--> $DIR/associated-const-impl-wrong-lifetime.rs:19:5
2+
--> $DIR/associated-const-impl-wrong-lifetime.rs:18:5
33
|
4-
19 | const NAME: &'a str = "unit";
4+
18 | const NAME: &'a str = "unit";
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
66
|
77
= note: expected type `&'static str`
@@ -10,12 +10,9 @@ note: the lifetime 'a as defined on the impl at 17:1...
1010
--> $DIR/associated-const-impl-wrong-lifetime.rs:17:1
1111
|
1212
17 | / impl<'a> Foo for &'a () {
13-
18 | | //~^ NOTE the lifetime 'a as defined
14-
19 | | const NAME: &'a str = "unit";
15-
20 | | //~^ ERROR mismatched types [E0308]
16-
... |
17-
23 | | //~| NOTE ...does not necessarily outlive the static lifetime
18-
24 | | }
13+
18 | | const NAME: &'a str = "unit";
14+
19 | | //~^ ERROR mismatched types [E0308]
15+
20 | | }
1916
| |_^
2017
= note: ...does not necessarily outlive the static lifetime
2118

src/test/ui/associated-const-impl-wrong-type.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@
1010

1111

1212
trait Foo {
13-
const BAR: u32; //~ NOTE type in trait
13+
const BAR: u32;
1414
}
1515

1616
struct SignedBar;
1717

1818
impl Foo for SignedBar {
1919
const BAR: i32 = -1;
2020
//~^ ERROR implemented const `BAR` has an incompatible type for trait [E0326]
21-
//~| NOTE expected u32, found i32
2221
}
2322

2423
fn main() {}

src/test/ui/associated-const-impl-wrong-type.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0326]: implemented const `BAR` has an incompatible type for trait
22
--> $DIR/associated-const-impl-wrong-type.rs:19:16
33
|
4-
13 | const BAR: u32; //~ NOTE type in trait
4+
13 | const BAR: u32;
55
| --- type in trait
66
...
77
19 | const BAR: i32 = -1;

src/test/ui/associated-type-projection-from-multiple-supertraits.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,12 @@
1313

1414
pub trait Vehicle {
1515
type Color;
16-
//~^ NOTE ambiguous `Color` from `Vehicle`
17-
//~| NOTE ambiguous `Color` from `Vehicle`
18-
//~| NOTE ambiguous `Color` from `Vehicle`
1916

2017
fn go(&self) { }
2118
}
2219

2320
pub trait Box {
2421
type Color;
25-
//~^ NOTE ambiguous `Color` from `Box`
26-
//~| NOTE ambiguous `Color` from `Box`
27-
//~| NOTE ambiguous `Color` from `Box`
2822
//
2923
fn mail(&self) { }
3024
}
@@ -34,19 +28,15 @@ pub trait BoxCar : Box + Vehicle {
3428

3529
fn dent<C:BoxCar>(c: C, color: C::Color) {
3630
//~^ ERROR ambiguous associated type `Color` in bounds of `C`
37-
//~| NOTE ambiguous associated type `Color`
3831
}
3932

4033
fn dent_object<COLOR>(c: BoxCar<Color=COLOR>) {
4134
//~^ ERROR ambiguous associated type
4235
//~| ERROR the value of the associated type `Color` (from the trait `Vehicle`) must be specified
43-
//~| NOTE ambiguous associated type `Color`
44-
//~| NOTE missing associated type `Color` value
4536
}
4637

4738
fn paint<C:BoxCar>(c: C, d: C::Color) {
4839
//~^ ERROR ambiguous associated type `Color` in bounds of `C`
49-
//~| NOTE ambiguous associated type `Color`
5040
}
5141

5242
pub fn main() { }

src/test/ui/associated-type-projection-from-multiple-supertraits.stderr

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
error[E0221]: ambiguous associated type `Color` in bounds of `C`
2-
--> $DIR/associated-type-projection-from-multiple-supertraits.rs:35:32
2+
--> $DIR/associated-type-projection-from-multiple-supertraits.rs:29:32
33
|
44
15 | type Color;
55
| ----------- ambiguous `Color` from `Vehicle`
66
...
7-
24 | type Color;
7+
21 | type Color;
88
| ----------- ambiguous `Color` from `Box`
99
...
10-
35 | fn dent<C:BoxCar>(c: C, color: C::Color) {
10+
29 | fn dent<C:BoxCar>(c: C, color: C::Color) {
1111
| ^^^^^^^^ ambiguous associated type `Color`
1212

1313
error[E0221]: ambiguous associated type `Color` in bounds of `BoxCar`
14-
--> $DIR/associated-type-projection-from-multiple-supertraits.rs:40:33
14+
--> $DIR/associated-type-projection-from-multiple-supertraits.rs:33:33
1515
|
1616
15 | type Color;
1717
| ----------- ambiguous `Color` from `Vehicle`
1818
...
19-
24 | type Color;
19+
21 | type Color;
2020
| ----------- ambiguous `Color` from `Box`
2121
...
22-
40 | fn dent_object<COLOR>(c: BoxCar<Color=COLOR>) {
22+
33 | fn dent_object<COLOR>(c: BoxCar<Color=COLOR>) {
2323
| ^^^^^^^^^^^ ambiguous associated type `Color`
2424

2525
error[E0191]: the value of the associated type `Color` (from the trait `Vehicle`) must be specified
26-
--> $DIR/associated-type-projection-from-multiple-supertraits.rs:40:26
26+
--> $DIR/associated-type-projection-from-multiple-supertraits.rs:33:26
2727
|
28-
40 | fn dent_object<COLOR>(c: BoxCar<Color=COLOR>) {
28+
33 | fn dent_object<COLOR>(c: BoxCar<Color=COLOR>) {
2929
| ^^^^^^^^^^^^^^^^^^^ missing associated type `Color` value
3030

3131
error[E0221]: ambiguous associated type `Color` in bounds of `C`
32-
--> $DIR/associated-type-projection-from-multiple-supertraits.rs:47:29
32+
--> $DIR/associated-type-projection-from-multiple-supertraits.rs:38:29
3333
|
3434
15 | type Color;
3535
| ----------- ambiguous `Color` from `Vehicle`
3636
...
37-
24 | type Color;
37+
21 | type Color;
3838
| ----------- ambiguous `Color` from `Box`
3939
...
40-
47 | fn paint<C:BoxCar>(c: C, d: C::Color) {
40+
38 | fn paint<C:BoxCar>(c: C, d: C::Color) {
4141
| ^^^^^^^^ ambiguous associated type `Color`
4242

4343
error: aborting due to 4 previous errors

src/test/ui/associated-types-ICE-when-projecting-out-of-err.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,4 @@ fn ice<A>(a: A) {
3232
let r = loop {};
3333
r = r + a;
3434
//~^ ERROR the trait bound `(): Add<A>` is not satisfied
35-
//~| NOTE the trait `Add<A>` is not implemented for `()`
3635
}

src/test/ui/associated-types-in-ambiguous-context.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,15 @@ trait Get {
1515

1616
fn get<T:Get,U:Get>(x: T, y: U) -> Get::Value {}
1717
//~^ ERROR ambiguous associated type
18-
//~| NOTE ambiguous associated type
19-
//~| NOTE specify the type using the syntax `<Type as Get>::Value`
2018

2119
trait Grab {
2220
type Value;
2321
fn grab(&self) -> Grab::Value;
2422
//~^ ERROR ambiguous associated type
25-
//~| NOTE ambiguous associated type
26-
//~| NOTE specify the type using the syntax `<Type as Grab>::Value`
2723
}
2824

2925
type X = std::ops::Deref::Target;
3026
//~^ ERROR ambiguous associated type
31-
//~| NOTE ambiguous associated type
32-
//~| NOTE specify the type using the syntax `<Type as std::ops::Deref>::Target`
3327

3428
fn main() {
3529
}

src/test/ui/associated-types-in-ambiguous-context.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ error[E0223]: ambiguous associated type
77
= note: specify the type using the syntax `<Type as Get>::Value`
88

99
error[E0223]: ambiguous associated type
10-
--> $DIR/associated-types-in-ambiguous-context.rs:29:10
10+
--> $DIR/associated-types-in-ambiguous-context.rs:25:10
1111
|
12-
29 | type X = std::ops::Deref::Target;
12+
25 | type X = std::ops::Deref::Target;
1313
| ^^^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type
1414
|
1515
= note: specify the type using the syntax `<Type as std::ops::Deref>::Target`
1616

1717
error[E0223]: ambiguous associated type
18-
--> $DIR/associated-types-in-ambiguous-context.rs:23:23
18+
--> $DIR/associated-types-in-ambiguous-context.rs:21:23
1919
|
20-
23 | fn grab(&self) -> Grab::Value;
20+
21 | fn grab(&self) -> Grab::Value;
2121
| ^^^^^^^^^^^ ambiguous associated type
2222
|
2323
= note: specify the type using the syntax `<Type as Grab>::Value`

src/test/ui/augmented-assignments.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ fn main() {
2222
let mut x = Int(1);
2323
x //~ error: use of moved value: `x`
2424
//~^ value used here after move
25-
//~| note: move occurs because `x` has type `Int`
2625
+=
2726
x; //~ value moved here
2827

src/test/ui/augmented-assignments.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
error[E0596]: cannot borrow immutable local variable `y` as mutable
2-
--> $DIR/augmented-assignments.rs:31:5
2+
--> $DIR/augmented-assignments.rs:30:5
33
|
4-
29 | let y = Int(2);
4+
28 | let y = Int(2);
55
| - consider changing this to `mut y`
6-
30 | //~^ consider changing this to `mut y`
7-
31 | y //~ error: cannot borrow immutable local variable `y` as mutable
6+
29 | //~^ consider changing this to `mut y`
7+
30 | y //~ error: cannot borrow immutable local variable `y` as mutable
88
| ^ cannot borrow mutably
99

1010
error[E0382]: use of moved value: `x`
@@ -13,7 +13,7 @@ error[E0382]: use of moved value: `x`
1313
23 | x //~ error: use of moved value: `x`
1414
| ^ value used here after move
1515
...
16-
27 | x; //~ value moved here
16+
26 | x; //~ value moved here
1717
| - value moved here
1818
|
1919
= note: move occurs because `x` has type `Int`, which does not implement the `Copy` trait

src/test/ui/binary-op-on-double-ref.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ fn main() {
1313
let vr = v.iter().filter(|x| {
1414
x % 2 == 0
1515
//~^ ERROR binary operation `%` cannot be applied to type `&&{integer}`
16-
//~| NOTE this is a reference to a type that `%` can be applied to
17-
//~| NOTE an implementation of `std::ops::Rem` might be missing for `&&{integer}`
1816
});
1917
println!("{:?}", vr);
2018
}

src/test/ui/blind-item-item-shadow.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
mod foo { pub mod foo { } } //~ NOTE previous definition of the module `foo` here
11+
mod foo { pub mod foo { } }
1212

1313
use foo::foo;
1414
//~^ ERROR the name `foo` is defined multiple times
1515
//~| `foo` reimported here
16-
//~| NOTE `foo` must be defined only once in the type namespace of this module
1716

1817
fn main() {}

src/test/ui/blind-item-item-shadow.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0255]: the name `foo` is defined multiple times
22
--> $DIR/blind-item-item-shadow.rs:13:5
33
|
4-
11 | mod foo { pub mod foo { } } //~ NOTE previous definition of the module `foo` here
4+
11 | mod foo { pub mod foo { } }
55
| ---------------------------- previous definition of the module `foo` here
66
12 |
77
13 | use foo::foo;

src/test/ui/block-result/consider-removing-last-semi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
fn f() -> String { //~ ERROR mismatched types
1212
0u8;
13-
"bla".to_string(); //~ HELP consider removing this semicolon
13+
"bla".to_string();
1414
}
1515

1616
fn g() -> String { //~ ERROR mismatched types
1717
"this won't work".to_string();
18-
"removeme".to_string(); //~ HELP consider removing this semicolon
18+
"removeme".to_string();
1919
}
2020

2121
fn main() {}

src/test/ui/block-result/consider-removing-last-semi.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
44
11 | fn f() -> String { //~ ERROR mismatched types
55
| __________________^
66
12 | | 0u8;
7-
13 | | "bla".to_string(); //~ HELP consider removing this semicolon
7+
13 | | "bla".to_string();
88
| | - help: consider removing this semicolon
99
14 | | }
1010
| |_^ expected struct `std::string::String`, found ()
@@ -18,7 +18,7 @@ error[E0308]: mismatched types
1818
16 | fn g() -> String { //~ ERROR mismatched types
1919
| __________________^
2020
17 | | "this won't work".to_string();
21-
18 | | "removeme".to_string(); //~ HELP consider removing this semicolon
21+
18 | | "removeme".to_string();
2222
| | - help: consider removing this semicolon
2323
19 | | }
2424
| |_^ expected struct `std::string::String`, found ()

src/test/ui/block-result/issue-11714.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
fn blah() -> i32 { //~ ERROR mismatched types
1212
1
1313

14-
; //~ HELP consider removing this semicolon
14+
;
1515
}
1616

1717
fn main() { }

src/test/ui/block-result/issue-11714.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ error[E0308]: mismatched types
55
| __________________^
66
12 | | 1
77
13 | |
8-
14 | | ; //~ HELP consider removing this semicolon
8+
14 | | ;
99
| | - help: consider removing this semicolon
1010
15 | | }
1111
| |_^ expected i32, found ()

src/test/ui/block-result/issue-13428.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ fn foo() -> String { //~ ERROR mismatched types
1515
"world")
1616
// Put the trailing semicolon on its own line to test that the
1717
// note message gets the offending semicolon exactly
18-
; //~ HELP consider removing this semicolon
18+
;
1919
}
2020

2121
fn bar() -> String { //~ ERROR mismatched types
2222
"foobar".to_string()
23-
; //~ HELP consider removing this semicolon
23+
;
2424
}
2525

2626
pub fn main() {}

src/test/ui/block-result/issue-13428.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ error[E0308]: mismatched types
77
15 | | "world")
88
16 | | // Put the trailing semicolon on its own line to test that the
99
17 | | // note message gets the offending semicolon exactly
10-
18 | | ; //~ HELP consider removing this semicolon
10+
18 | | ;
1111
| | - help: consider removing this semicolon
1212
19 | | }
1313
| |_^ expected struct `std::string::String`, found ()
@@ -21,7 +21,7 @@ error[E0308]: mismatched types
2121
21 | fn bar() -> String { //~ ERROR mismatched types
2222
| ____________________^
2323
22 | | "foobar".to_string()
24-
23 | | ; //~ HELP consider removing this semicolon
24+
23 | | ;
2525
| | - help: consider removing this semicolon
2626
24 | | }
2727
| |_^ expected struct `std::string::String`, found ()

0 commit comments

Comments
 (0)