Skip to content

Commit 32e48fc

Browse files
committed
use different revisions for testing colors on windows
this is kinda jank because it means people need both machines to bless the tests
1 parent 96b027f commit 32e48fc

6 files changed

+81
-6
lines changed

tests/ui/error-emitter/highlighting.stderr renamed to tests/ui/error-emitter/highlighting.not-windows.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
 --> $DIR/highlighting.rs:22:11
2+
 --> $DIR/highlighting.rs:26:11
33
 |
44
LL |  query(wrapped_fn);
55
 |  ----- ^^^^^^^^^^ one type is more general than the other
@@ -9,7 +9,7 @@
99
 = note: expected fn pointer `for<'a> fn(Box<(dyn Any + Send + 'a)>) -> Pin<_>`
1010
 found fn item `fn(Box<(dyn Any + Send + 'static)>) -> Pin<_> {wrapped_fn}`
1111
note: function defined here
12-
 --> $DIR/highlighting.rs:11:4
12+
 --> $DIR/highlighting.rs:15:4
1313
 |
1414
LL | fn query(_: fn(Box<(dyn Any + Send + '_)>) -> Pin<Box<(
1515
 |  ____^^^^^_-

tests/ui/error-emitter/highlighting.rs

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
// error-pattern:for<'a> 
55
// edition:2018
66

7+
// revisions: windows not-windows
8+
// [windows]only-windows
9+
// [not-windows]ignore-windows
10+
711
use core::pin::Pin;
812
use core::future::Future;
913
use core::any::Any;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
error[E0308]: mismatched types
2+
 --> $DIR/highlighting.rs:26:11
3+
 |
4+
LL |  query(wrapped_fn);
5+
 |  ----- ^^^^^^^^^^ one type is more general than the other
6+
 |  |
7+
 |  arguments to this function are incorrect
8+
 |
9+
 = note: expected fn pointer `for<'a> fn(Box<(dyn Any + Send + 'a)>) -> Pin<_>`
10+
 found fn item `fn(Box<(dyn Any + Send + 'static)>) -> Pin<_> {wrapped_fn}`
11+
note: function defined here
12+
 --> $DIR/highlighting.rs:15:4
13+
 |
14+
LL | fn query(_: fn(Box<(dyn Any + Send + '_)>) -> Pin<Box<(
15+
 |  ____^^^^^_-
16+
LL | |  dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static
17+
LL | | )>>) {}
18+
 | |___-
19+
20+
error: aborting due to 1 previous error
21+
22+
For more information about this error, try `rustc --explain E0308`.

tests/ui/error-emitter/multiline-multipart-suggestion.stderr renamed to tests/ui/error-emitter/multiline-multipart-suggestion.not-windows.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0106]: missing lifetime specifier
2-
 --> $DIR/multiline-multipart-suggestion.rs:5:34
2+
 --> $DIR/multiline-multipart-suggestion.rs:8:34
33
 |
44
LL | fn short(foo_bar: &Vec<&i32>) -> &i32 {
55
 |  ---------- ^ expected named lifetime parameter
@@ -11,7 +11,7 @@
1111
 | ++++ ++ ++ ++
1212

1313
error[E0106]: missing lifetime specifier
14-
 --> $DIR/multiline-multipart-suggestion.rs:12:6
14+
 --> $DIR/multiline-multipart-suggestion.rs:15:6
1515
 |
1616
LL |  foo_bar: &Vec<&i32>,
1717
 |  ----------
@@ -29,7 +29,7 @@
2929
 |
3030

3131
error[E0106]: missing lifetime specifier
32-
 --> $DIR/multiline-multipart-suggestion.rs:17:29
32+
 --> $DIR/multiline-multipart-suggestion.rs:20:29
3333
 |
3434
LL |  foo_bar: &Vec<&i32>) -> &i32 {
3535
 |  ---------- ^ expected named lifetime parameter

tests/ui/error-emitter/multiline-multipart-suggestion.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// compile-flags: --error-format=human --color=always
22
// error-pattern: missing lifetime specifier
3-
// ignore-windows
3+
4+
// revisions: windows not-windows
5+
// [windows]only-windows
6+
// [not-windows]ignore-windows
47

58
fn short(foo_bar: &Vec<&i32>) -> &i32 {
69
&12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
error[E0106]: missing lifetime specifier
2+
 --> $DIR/multiline-multipart-suggestion.rs:8:34
3+
 |
4+
LL | fn short(foo_bar: &Vec<&i32>) -> &i32 {
5+
 |  ---------- ^ expected named lifetime parameter
6+
 |
7+
 = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from
8+
help: consider introducing a named lifetime parameter
9+
 |
10+
LL | fn short<'a>(foo_bar: &'a Vec<&'a i32>) -> &'a i32 {
11+
 | ++++ ++ ++ ++
12+
13+
error[E0106]: missing lifetime specifier
14+
 --> $DIR/multiline-multipart-suggestion.rs:15:6
15+
 |
16+
LL |  foo_bar: &Vec<&i32>,
17+
 |  ----------
18+
LL |  something_very_long_so_that_the_line_will_wrap_around__________: i32,
19+
LL | ) -> &i32 {
20+
 |  ^ expected named lifetime parameter
21+
 |
22+
 = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from
23+
help: consider introducing a named lifetime parameter
24+
 |
25+
LL ~ fn long<'a>(
26+
LL ~  foo_bar: &'a Vec<&'a i32>,
27+
LL |  something_very_long_so_that_the_line_will_wrap_around__________: i32,
28+
LL ~ ) -> &'a i32 {
29+
 |
30+
31+
error[E0106]: missing lifetime specifier
32+
 --> $DIR/multiline-multipart-suggestion.rs:20:29
33+
 |
34+
LL |  foo_bar: &Vec<&i32>) -> &i32 {
35+
 |  ---------- ^ expected named lifetime parameter
36+
 |
37+
 = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from
38+
help: consider introducing a named lifetime parameter
39+
 |
40+
LL ~ fn long2<'a>(
41+
LL ~  foo_bar: &'a Vec<&'a i32>) -> &'a i32 {
42+
 |
43+
44+
error: aborting due to 3 previous errors
45+
46+
For more information about this error, try `rustc --explain E0106`.

0 commit comments

Comments
 (0)