Skip to content

Commit 168f65c

Browse files
committed
Replace error-pattern with //~ when it is applied to compile-time tests
1 parent 3c95364 commit 168f65c

7 files changed

+17
-18
lines changed

tests/ui/errors/remap-path-prefix-reverse.local-self.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0423]: expected value, found struct `remapped_dep::SomeStruct`
2-
--> $DIR/remap-path-prefix-reverse.rs:16:13
2+
--> $DIR/remap-path-prefix-reverse.rs:15:13
33
|
44
LL | let _ = remapped_dep::SomeStruct;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `remapped_dep::SomeStruct {}`

tests/ui/errors/remap-path-prefix-reverse.remapped-self.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0423]: expected value, found struct `remapped_dep::SomeStruct`
2-
--> $DIR/remap-path-prefix-reverse.rs:16:13
2+
--> $DIR/remap-path-prefix-reverse.rs:15:13
33
|
44
LL | let _ = remapped_dep::SomeStruct;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `remapped_dep::SomeStruct {}`

tests/ui/errors/remap-path-prefix-reverse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//@ [remapped-self] remap-src-base
77

88
// Verify that the expected source code is shown.
9-
//@ error-pattern: pub struct SomeStruct {} // This line should be show
109

1110
extern crate remapped_dep;
1211

@@ -15,4 +14,5 @@ fn main() {
1514
// a snippet of the dependency's source.
1615
let _ = remapped_dep::SomeStruct;
1716
//~^ ERROR expected value, found struct `remapped_dep::SomeStruct`
17+
//~? RAW pub struct SomeStruct {}
1818
}

tests/ui/generic-associated-types/static-lifetime-tip-with-default-type.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
//@ error-pattern: r#T: 'static
2-
//@ error-pattern: r#K: 'static
3-
//@ error-pattern: T: 'static=
4-
51
// https://github.com/rust-lang/rust/issues/124785
62

73
struct Foo<T, K = i32>(&'static T, &'static K);
@@ -10,14 +6,18 @@ struct Foo<T, K = i32>(&'static T, &'static K);
106

117
struct Bar<r#T, r#K = i32>(&'static r#T, &'static r#K);
128
//~^ ERROR: the parameter type `T` may not live long enough
9+
//~| HELP: r#T: 'static
1310
//~| ERROR: the parameter type `K` may not live long enough
11+
//~| HELP: r#K: 'static
1412

1513
struct Boo<T= i32>(&'static T);
1614
//~^ ERROR: the parameter type `T` may not live long enough
15+
//~| HELP: T: 'static=
1716

1817
struct Far<T
1918
= i32>(&'static T);
2019
//~^ ERROR: the parameter type `T` may not live long enough
20+
//~| HELP: T: 'static=
2121

2222
struct S<'a, K: 'a = i32>(&'static K);
2323
//~^ ERROR: lifetime parameter `'a` is never used

tests/ui/generic-associated-types/static-lifetime-tip-with-default-type.stderr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0310]: the parameter type `T` may not live long enough
2-
--> $DIR/static-lifetime-tip-with-default-type.rs:7:24
2+
--> $DIR/static-lifetime-tip-with-default-type.rs:3:24
33
|
44
LL | struct Foo<T, K = i32>(&'static T, &'static K);
55
| ^^^^^^^^^^
@@ -13,7 +13,7 @@ LL | struct Foo<T: 'static, K = i32>(&'static T, &'static K);
1313
| +++++++++
1414

1515
error[E0310]: the parameter type `K` may not live long enough
16-
--> $DIR/static-lifetime-tip-with-default-type.rs:7:36
16+
--> $DIR/static-lifetime-tip-with-default-type.rs:3:36
1717
|
1818
LL | struct Foo<T, K = i32>(&'static T, &'static K);
1919
| ^^^^^^^^^^
@@ -27,7 +27,7 @@ LL | struct Foo<T, K: 'static = i32>(&'static T, &'static K);
2727
| +++++++++
2828

2929
error[E0310]: the parameter type `T` may not live long enough
30-
--> $DIR/static-lifetime-tip-with-default-type.rs:11:28
30+
--> $DIR/static-lifetime-tip-with-default-type.rs:7:28
3131
|
3232
LL | struct Bar<r#T, r#K = i32>(&'static r#T, &'static r#K);
3333
| ^^^^^^^^^^^^
@@ -41,7 +41,7 @@ LL | struct Bar<r#T: 'static, r#K = i32>(&'static r#T, &'static r#K);
4141
| +++++++++
4242

4343
error[E0310]: the parameter type `K` may not live long enough
44-
--> $DIR/static-lifetime-tip-with-default-type.rs:11:42
44+
--> $DIR/static-lifetime-tip-with-default-type.rs:7:42
4545
|
4646
LL | struct Bar<r#T, r#K = i32>(&'static r#T, &'static r#K);
4747
| ^^^^^^^^^^^^
@@ -55,7 +55,7 @@ LL | struct Bar<r#T, r#K: 'static = i32>(&'static r#T, &'static r#K);
5555
| +++++++++
5656

5757
error[E0310]: the parameter type `T` may not live long enough
58-
--> $DIR/static-lifetime-tip-with-default-type.rs:15:20
58+
--> $DIR/static-lifetime-tip-with-default-type.rs:11:20
5959
|
6060
LL | struct Boo<T= i32>(&'static T);
6161
| ^^^^^^^^^^
@@ -69,7 +69,7 @@ LL | struct Boo<T: 'static= i32>(&'static T);
6969
| +++++++++
7070

7171
error[E0310]: the parameter type `T` may not live long enough
72-
--> $DIR/static-lifetime-tip-with-default-type.rs:19:8
72+
--> $DIR/static-lifetime-tip-with-default-type.rs:15:8
7373
|
7474
LL | = i32>(&'static T);
7575
| ^^^^^^^^^^
@@ -83,15 +83,15 @@ LL | struct Far<T: 'static
8383
| +++++++++
8484

8585
error[E0392]: lifetime parameter `'a` is never used
86-
--> $DIR/static-lifetime-tip-with-default-type.rs:22:10
86+
--> $DIR/static-lifetime-tip-with-default-type.rs:18:10
8787
|
8888
LL | struct S<'a, K: 'a = i32>(&'static K);
8989
| ^^ unused lifetime parameter
9090
|
9191
= help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData`
9292

9393
error[E0310]: the parameter type `K` may not live long enough
94-
--> $DIR/static-lifetime-tip-with-default-type.rs:22:27
94+
--> $DIR/static-lifetime-tip-with-default-type.rs:18:27
9595
|
9696
LL | struct S<'a, K: 'a = i32>(&'static K);
9797
| ^^^^^^^^^^
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
//@ aux-build: borrowck-error-in-macro.rs
2-
//@ error-pattern: a call in this macro requires a mutable binding due to mutable borrow of `d`
3-
//FIXME: remove error-pattern (see #141896)
42

53
extern crate borrowck_error_in_macro as a;
64

75
a::ice! {}
86
//~^ ERROR cannot borrow value as mutable, as it is not declared as mutable
7+
//~? ERROR a call in this macro requires a mutable binding due to mutable borrow of `d`

tests/ui/macros/borrowck-error-in-macro.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0596]: cannot borrow value as mutable, as it is not declared as mutable
2-
--> $DIR/borrowck-error-in-macro.rs:7:1
2+
--> $DIR/borrowck-error-in-macro.rs:5:1
33
|
44
LL | a::ice! {}
55
| ^^^^^^^^^^

0 commit comments

Comments
 (0)