Skip to content

Commit

Permalink
wip: use different revisions for testing colors on windows
Browse files Browse the repository at this point in the history
this just uses the same file for windows and linux right now lol
  • Loading branch information
jyn514 committed Dec 9, 2023
1 parent 96b027f commit 2b25738
Show file tree
Hide file tree
Showing 8 changed files with 138 additions and 69 deletions.
22 changes: 22 additions & 0 deletions tests/ui/error-emitter/highlighting.not-windows.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
error[E0308]: mismatched types
 --> $DIR/highlighting.rs:23:11
 |
LL |  query(wrapped_fn);
 |  ----- ^^^^^^^^^^ one type is more general than the other
 |  |
 |  arguments to this function are incorrect
 |
 = note: expected fn pointer `for<'a> fn(Box<(dyn Any + Send + 'a)>) -> Pin<_>`
 found fn item `fn(Box<(dyn Any + Send + 'static)>) -> Pin<_> {wrapped_fn}`
note: function defined here
 --> $DIR/highlighting.rs:12:4
 |
LL | fn query(_: fn(Box<(dyn Any + Send + '_)>) -> Pin<Box<(
 |  ____^^^^^_-
LL | |  dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static
LL | | )>>) {}
 | |___-

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0308`.
1 change: 1 addition & 0 deletions tests/ui/error-emitter/highlighting.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Make sure "highlighted" code is colored purple

// compile-flags: --error-format=human --color=always
// revisions: windows not-windows
// error-pattern:for<'a> 
// edition:2018

Expand Down
22 changes: 0 additions & 22 deletions tests/ui/error-emitter/highlighting.stderr

This file was deleted.

22 changes: 22 additions & 0 deletions tests/ui/error-emitter/highlighting.windows.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
error[E0308]: mismatched types
 --> $DIR/highlighting.rs:23:11
 |
LL |  query(wrapped_fn);
 |  ----- ^^^^^^^^^^ one type is more general than the other
 |  |
 |  arguments to this function are incorrect
 |
 = note: expected fn pointer `for<'a> fn(Box<(dyn Any + Send + 'a)>) -> Pin<_>`
 found fn item `fn(Box<(dyn Any + Send + 'static)>) -> Pin<_> {wrapped_fn}`
note: function defined here
 --> $DIR/highlighting.rs:12:4
 |
LL | fn query(_: fn(Box<(dyn Any + Send + '_)>) -> Pin<Box<(
 |  ____^^^^^_-
LL | |  dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static
LL | | )>>) {}
 | |___-

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0308`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
error[E0106]: missing lifetime specifier
 --> $DIR/multiline-multipart-suggestion.rs:5:34
 |
LL | fn short(foo_bar: &Vec<&i32>) -> &i32 {
 |  ---------- ^ expected named lifetime parameter
 |
 = 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
help: consider introducing a named lifetime parameter
 |
LL | fn short<'a>(foo_bar: &'a Vec<&'a i32>) -> &'a i32 {
 | ++++ ++ ++ ++

error[E0106]: missing lifetime specifier
 --> $DIR/multiline-multipart-suggestion.rs:12:6
 |
LL |  foo_bar: &Vec<&i32>,
 |  ----------
LL |  something_very_long_so_that_the_line_will_wrap_around__________: i32,
LL | ) -> &i32 {
 |  ^ expected named lifetime parameter
 |
 = 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
help: consider introducing a named lifetime parameter
 |
LL ~ fn long<'a>(
LL ~  foo_bar: &'a Vec<&'a i32>,
LL |  something_very_long_so_that_the_line_will_wrap_around__________: i32,
LL ~ ) -> &'a i32 {
 |

error[E0106]: missing lifetime specifier
 --> $DIR/multiline-multipart-suggestion.rs:17:29
 |
LL |  foo_bar: &Vec<&i32>) -> &i32 {
 |  ---------- ^ expected named lifetime parameter
 |
 = 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
help: consider introducing a named lifetime parameter
 |
LL ~ fn long2<'a>(
LL ~  foo_bar: &'a Vec<&'a i32>) -> &'a i32 {
 |

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0106`.
2 changes: 1 addition & 1 deletion tests/ui/error-emitter/multiline-multipart-suggestion.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// compile-flags: --error-format=human --color=always
// error-pattern: missing lifetime specifier
// ignore-windows
// revisions: windows not-windows

fn short(foo_bar: &Vec<&i32>) -> &i32 {
&12
Expand Down
46 changes: 0 additions & 46 deletions tests/ui/error-emitter/multiline-multipart-suggestion.stderr

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
error[E0106]: missing lifetime specifier
 --> $DIR/multiline-multipart-suggestion.rs:5:34
 |
LL | fn short(foo_bar: &Vec<&i32>) -> &i32 {
 |  ---------- ^ expected named lifetime parameter
 |
 = 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
help: consider introducing a named lifetime parameter
 |
LL | fn short<'a>(foo_bar: &'a Vec<&'a i32>) -> &'a i32 {
 | ++++ ++ ++ ++

error[E0106]: missing lifetime specifier
 --> $DIR/multiline-multipart-suggestion.rs:12:6
 |
LL |  foo_bar: &Vec<&i32>,
 |  ----------
LL |  something_very_long_so_that_the_line_will_wrap_around__________: i32,
LL | ) -> &i32 {
 |  ^ expected named lifetime parameter
 |
 = 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
help: consider introducing a named lifetime parameter
 |
LL ~ fn long<'a>(
LL ~  foo_bar: &'a Vec<&'a i32>,
LL |  something_very_long_so_that_the_line_will_wrap_around__________: i32,
LL ~ ) -> &'a i32 {
 |

error[E0106]: missing lifetime specifier
 --> $DIR/multiline-multipart-suggestion.rs:17:29
 |
LL |  foo_bar: &Vec<&i32>) -> &i32 {
 |  ---------- ^ expected named lifetime parameter
 |
 = 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
help: consider introducing a named lifetime parameter
 |
LL ~ fn long2<'a>(
LL ~  foo_bar: &'a Vec<&'a i32>) -> &'a i32 {
 |

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0106`.

0 comments on commit 2b25738

Please sign in to comment.