Skip to content

Commit 2b25738

Browse files
committed
wip: use different revisions for testing colors on windows
this just uses the same file for windows and linux right now lol
1 parent 96b027f commit 2b25738

8 files changed

+138
-69
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
error[E0308]: mismatched types
2+
 --> $DIR/highlighting.rs:23: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:12: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/highlighting.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Make sure "highlighted" code is colored purple
22

33
// compile-flags: --error-format=human --color=always
4+
// revisions: windows not-windows
45
// error-pattern:for<'a> 
56
// edition:2018
67

tests/ui/error-emitter/highlighting.stderr

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
error[E0308]: mismatched types
2+
 --> $DIR/highlighting.rs:23: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:12: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`.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
error[E0106]: missing lifetime specifier
2+
 --> $DIR/multiline-multipart-suggestion.rs:5: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:12: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:17: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`.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// compile-flags: --error-format=human --color=always
22
// error-pattern: missing lifetime specifier
3-
// ignore-windows
3+
// revisions: windows not-windows
44

55
fn short(foo_bar: &Vec<&i32>) -> &i32 {
66
&12

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

Lines changed: 0 additions & 46 deletions
This file was deleted.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
error[E0106]: missing lifetime specifier
2+
 --> $DIR/multiline-multipart-suggestion.rs:5: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:12: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:17: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)