Skip to content

Commit 1013617

Browse files
committed
Auto merge of rust-lang#12363 - oli-obk:bump_ui_test, r=flip1995
lower `bstr` version requirement to `1.6.0` test changes are due to oli-obk/ui_test#201 (cc `@Jarcho)` changelog: none
2 parents e33cba5 + 592fe89 commit 1013617

10 files changed

+27
-22
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ color-print = "0.3.4"
3030
anstream = "0.6.0"
3131

3232
[dev-dependencies]
33-
ui_test = "0.22.1"
33+
ui_test = "0.22.2"
3434
tester = "0.9"
3535
regex = "1.5"
3636
toml = "0.7.3"

tests/ui/crashes/ice-6255.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
macro_rules! define_other_core {
55
( ) => {
66
extern crate std as core;
7+
//~^ ERROR: macro-expanded `extern crate` items cannot shadow names passed with `--extern`
78
};
89
}
910

@@ -12,4 +13,3 @@ fn main() {
1213
}
1314

1415
define_other_core!();
15-
//~^ ERROR: macro-expanded `extern crate` items cannot shadow names passed with `--extern`

tests/ui/declare_interior_mutable_const/others.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ const ATOMIC_TUPLE: ([AtomicUsize; 1], Vec<AtomicUsize>, u8) = ([ATOMIC], Vec::n
1414
macro_rules! declare_const {
1515
($name:ident: $ty:ty = $e:expr) => {
1616
const $name: $ty = $e;
17+
//~^ ERROR: interior mutable
1718
};
1819
}
19-
declare_const!(_ONCE: Once = Once::new()); //~ ERROR: interior mutable
20+
declare_const!(_ONCE: Once = Once::new());
2021

2122
// const ATOMIC_REF: &AtomicUsize = &AtomicUsize::new(7); // This will simply trigger E0492.
2223

@@ -49,7 +50,7 @@ mod issue_8493 {
4950
};
5051
}
5152

52-
issue_8493!(); //~ ERROR: interior mutable
53+
issue_8493!();
5354
}
5455

5556
fn main() {}

tests/ui/declare_interior_mutable_const/others.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ LL | declare_const!(_ONCE: Once = Once::new());
3737
= note: this error originates in the macro `declare_const` (in Nightly builds, run with -Z macro-backtrace for more info)
3838

3939
error: a `const` item should never be interior mutable
40-
--> tests/ui/declare_interior_mutable_const/others.rs:43:13
40+
--> tests/ui/declare_interior_mutable_const/others.rs:44:13
4141
|
4242
LL | const _BAZ: Cell<usize> = Cell::new(0);
4343
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui/declare_interior_mutable_const/traits.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use std::sync::atomic::AtomicUsize;
77
macro_rules! declare_const {
88
($name:ident: $ty:ty = $e:expr) => {
99
const $name: $ty = $e;
10+
//~^ ERROR: interior mutable
1011
};
1112
}
1213

@@ -15,7 +16,7 @@ trait ConcreteTypes {
1516
const ATOMIC: AtomicUsize; //~ ERROR: interior mutable
1617
const INTEGER: u64;
1718
const STRING: String;
18-
declare_const!(ANOTHER_ATOMIC: AtomicUsize = Self::ATOMIC); //~ ERROR: interior mutable
19+
declare_const!(ANOTHER_ATOMIC: AtomicUsize = Self::ATOMIC);
1920
}
2021

2122
impl ConcreteTypes for u64 {

tests/ui/declare_interior_mutable_const/traits.stderr

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: a `const` item should never be interior mutable
2-
--> tests/ui/declare_interior_mutable_const/traits.rs:15:5
2+
--> tests/ui/declare_interior_mutable_const/traits.rs:16:5
33
|
44
LL | const ATOMIC: AtomicUsize;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -19,55 +19,55 @@ LL | declare_const!(ANOTHER_ATOMIC: AtomicUsize = Self::ATOMIC);
1919
= note: this error originates in the macro `declare_const` (in Nightly builds, run with -Z macro-backtrace for more info)
2020

2121
error: a `const` item should never be interior mutable
22-
--> tests/ui/declare_interior_mutable_const/traits.rs:43:5
22+
--> tests/ui/declare_interior_mutable_const/traits.rs:44:5
2323
|
2424
LL | const TO_BE_CONCRETE: AtomicUsize = AtomicUsize::new(11);
2525
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2626

2727
error: a `const` item should never be interior mutable
28-
--> tests/ui/declare_interior_mutable_const/traits.rs:68:5
28+
--> tests/ui/declare_interior_mutable_const/traits.rs:69:5
2929
|
3030
LL | const TO_BE_UNFROZEN: Self::ToBeUnfrozen = AtomicUsize::new(13);
3131
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3232

3333
error: a `const` item should never be interior mutable
34-
--> tests/ui/declare_interior_mutable_const/traits.rs:69:5
34+
--> tests/ui/declare_interior_mutable_const/traits.rs:70:5
3535
|
3636
LL | const WRAPPED_TO_BE_UNFROZEN: Wrapper<Self::ToBeUnfrozen> = Wrapper(AtomicUsize::new(14));
3737
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3838

3939
error: a `const` item should never be interior mutable
40-
--> tests/ui/declare_interior_mutable_const/traits.rs:88:5
40+
--> tests/ui/declare_interior_mutable_const/traits.rs:89:5
4141
|
4242
LL | const BOUNDED: T::ToBeBounded;
4343
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4444

4545
error: a `const` item should never be interior mutable
46-
--> tests/ui/declare_interior_mutable_const/traits.rs:116:5
46+
--> tests/ui/declare_interior_mutable_const/traits.rs:117:5
4747
|
4848
LL | const SELF: Self = AtomicUsize::new(17);
4949
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5050

5151
error: a `const` item should never be interior mutable
52-
--> tests/ui/declare_interior_mutable_const/traits.rs:117:5
52+
--> tests/ui/declare_interior_mutable_const/traits.rs:118:5
5353
|
5454
LL | const WRAPPED_SELF: Option<Self> = Some(AtomicUsize::new(21));
5555
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5656

5757
error: a `const` item should never be interior mutable
58-
--> tests/ui/declare_interior_mutable_const/traits.rs:125:5
58+
--> tests/ui/declare_interior_mutable_const/traits.rs:126:5
5959
|
6060
LL | const INDIRECT: Cell<*const T>;
6161
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6262

6363
error: a `const` item should never be interior mutable
64-
--> tests/ui/declare_interior_mutable_const/traits.rs:141:5
64+
--> tests/ui/declare_interior_mutable_const/traits.rs:142:5
6565
|
6666
LL | const ATOMIC: AtomicUsize = AtomicUsize::new(18);
6767
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6868

6969
error: a `const` item should never be interior mutable
70-
--> tests/ui/declare_interior_mutable_const/traits.rs:147:5
70+
--> tests/ui/declare_interior_mutable_const/traits.rs:148:5
7171
|
7272
LL | const BOUNDED_ASSOC_TYPE: T::ToBeBounded = AtomicUsize::new(19);
7373
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui/struct_fields.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -224,39 +224,39 @@ mod macro_tests {
224224
macro_rules! mk_struct {
225225
() => {
226226
struct MacroStruct {
227+
//~^ ERROR: all fields have the same prefix: `some`
227228
some_a: i32,
228229
some_b: i32,
229230
some_c: i32,
230231
}
231232
};
232233
}
233234
mk_struct!();
234-
//~^ ERROR: all fields have the same prefix: `some`
235235

236236
macro_rules! mk_struct2 {
237237
() => {
238238
struct Macrobaz {
239239
macrobaz_a: i32,
240+
//~^ ERROR: field name starts with the struct's name
240241
some_b: i32,
241242
some_c: i32,
242243
}
243244
};
244245
}
245246
mk_struct2!();
246-
//~^ ERROR: field name starts with the struct's name
247247

248248
macro_rules! mk_struct_with_names {
249249
($struct_name:ident, $field:ident) => {
250250
struct $struct_name {
251251
$field: i32,
252+
//~^ ERROR: field name starts with the struct's name
252253
other_something: i32,
253254
other_field: i32,
254255
}
255256
};
256257
}
257258
// expands to `struct Foo { foo: i32, ... }`
258259
mk_struct_with_names!(Foo, foo);
259-
//~^ ERROR: field name starts with the struct's name
260260

261261
// expands to a struct with all fields starting with `other` but should not
262262
// be linted because some fields come from the macro definition and the other from the input
@@ -289,14 +289,14 @@ mod macro_tests {
289289
macro_rules! mk_struct_full_def {
290290
($struct_name:ident, $field1:ident, $field2:ident, $field3:ident) => {
291291
struct $struct_name {
292+
//~^ ERROR: all fields have the same prefix: `some`
292293
$field1: i32,
293294
$field2: i32,
294295
$field3: i32,
295296
}
296297
};
297298
}
298299
mk_struct_full_def!(PrefixData, some_data, some_meta, some_other);
299-
//~^ ERROR: all fields have the same prefix: `some`
300300
}
301301

302302
// should not lint on external code

tests/ui/struct_fields.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ error: all fields have the same prefix: `some`
211211
--> tests/ui/struct_fields.rs:226:13
212212
|
213213
LL | / struct MacroStruct {
214+
LL | |
214215
LL | | some_a: i32,
215216
LL | | some_b: i32,
216217
LL | | some_c: i32,
@@ -249,6 +250,7 @@ error: all fields have the same prefix: `some`
249250
--> tests/ui/struct_fields.rs:291:13
250251
|
251252
LL | / struct $struct_name {
253+
LL | |
252254
LL | | $field1: i32,
253255
LL | | $field2: i32,
254256
LL | | $field3: i32,

tests/ui/unconditional_recursion.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ macro_rules! impl_partial_eq {
147147
($ty:ident) => {
148148
impl PartialEq for $ty {
149149
fn eq(&self, other: &Self) -> bool {
150+
//~^ ERROR: function cannot return without recursing
150151
self == other
151152
}
152153
}
@@ -156,7 +157,6 @@ macro_rules! impl_partial_eq {
156157
struct S5;
157158

158159
impl_partial_eq!(S5);
159-
//~^ ERROR: function cannot return without recursing
160160

161161
struct S6 {
162162
field: String,

tests/ui/unconditional_recursion.stderr

+2-1
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ error: function cannot return without recursing
291291
--> tests/ui/unconditional_recursion.rs:149:13
292292
|
293293
LL | / fn eq(&self, other: &Self) -> bool {
294+
LL | |
294295
LL | | self == other
295296
LL | | }
296297
| |_____________^
@@ -299,7 +300,7 @@ LL | impl_partial_eq!(S5);
299300
| -------------------- in this macro invocation
300301
|
301302
note: recursive call site
302-
--> tests/ui/unconditional_recursion.rs:150:17
303+
--> tests/ui/unconditional_recursion.rs:151:17
303304
|
304305
LL | self == other
305306
| ^^^^^^^^^^^^^

0 commit comments

Comments
 (0)