Skip to content

Commit 93bee07

Browse files
committed
UI tests: migrate remaining compile time error-patterns to line annotations
when possible.
1 parent 092a284 commit 93bee07

File tree

66 files changed

+321
-293
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+321
-293
lines changed

tests/incremental/const-generic-type-cycle.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
//
44
//@ compile-flags: -Zincremental-ignore-spans
55
//@ revisions: cpass cfail
6-
//@ error-pattern: cycle detected when computing type of `Bar::N`
76

87
#![feature(trait_alias)]
98
#![crate_type="lib"]
@@ -13,5 +12,9 @@ trait Bar<const N: usize> {}
1312

1413
#[cfg(cfail)]
1514
trait Bar<const N: dyn BB> {}
15+
//[cfail]~^ ERROR cycle detected when computing type of `Bar::N`
16+
//[cfail]~| ERROR cycle detected when computing type of `Bar::N`
17+
//[cfail]~| ERROR cycle detected when computing type of `Bar::N`
18+
//[cfail]~| ERROR `(dyn Bar<{ 2 + 1 }> + 'static)` is forbidden as the type of a const generic parameter
1619

1720
trait BB = Bar<{ 2 + 1 }>;

tests/incremental/delayed_span_bug.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
//@ revisions: cfail1 cfail2
22
//@ should-ice
3-
//@ error-pattern: delayed bug triggered by #[rustc_delayed_bug_from_inside_query]
43

54
#![feature(rustc_attrs)]
65

76
#[rustc_delayed_bug_from_inside_query]
8-
fn main() {}
7+
fn main() {} //~ ERROR delayed bug triggered by #[rustc_delayed_bug_from_inside_query]

tests/incremental/link_order/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ aux-build:my_lib.rs
2-
//@ error-pattern: error: linking with
32
//@ revisions:cfail1 cfail2
43
//@ compile-flags:-Z query-dep-graph
54

@@ -10,3 +9,5 @@
109
extern crate my_lib;
1110

1211
fn main() {}
12+
13+
//~? ERROR linking with

tests/rustdoc-ui/deprecated-attrs.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ compile-flags: --passes unknown-pass
2-
//@ error-pattern: the `passes` flag no longer functions
32

43
#![doc(no_default_passes)]
54
//~^ ERROR unknown `doc` attribute `no_default_passes`

tests/rustdoc-ui/deprecated-attrs.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: the `passes` flag no longer functions
44
= help: you may want to use --document-private-items
55

66
error: unknown `doc` attribute `no_default_passes`
7-
--> $DIR/deprecated-attrs.rs:4:8
7+
--> $DIR/deprecated-attrs.rs:3:8
88
|
99
LL | #![doc(no_default_passes)]
1010
| ^^^^^^^^^^^^^^^^^ no longer functions
@@ -15,7 +15,7 @@ LL | #![doc(no_default_passes)]
1515
= note: `#[deny(invalid_doc_attributes)]` on by default
1616

1717
error: unknown `doc` attribute `passes`
18-
--> $DIR/deprecated-attrs.rs:11:8
18+
--> $DIR/deprecated-attrs.rs:10:8
1919
|
2020
LL | #![doc(passes = "collapse-docs unindent-comments")]
2121
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no longer functions
@@ -25,7 +25,7 @@ LL | #![doc(passes = "collapse-docs unindent-comments")]
2525
= note: `doc(passes)` is now a no-op
2626

2727
error: unknown `doc` attribute `plugins`
28-
--> $DIR/deprecated-attrs.rs:17:8
28+
--> $DIR/deprecated-attrs.rs:16:8
2929
|
3030
LL | #![doc(plugins = "xxx")]
3131
| ^^^^^^^^^^^^^^^ no longer functions
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
//@ compile-flags:--theme {{src-base}}/invalid-theme-name.rs
2-
//@ error-pattern: must have a .css extension
32

43
//~? ERROR invalid argument: "$DIR/invalid-theme-name.rs"
4+
//~? HELP must have a .css extension
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
// Test that we get the following hint when trying to use a compiler crate without rustc_driver.
2-
//@ error-pattern: try adding `extern crate rustc_driver;` at the top level of this crate
3-
//@ compile-flags: --emit link --error-format=human
2+
//@ compile-flags: --emit link
43
//@ normalize-stderr: ".*crate .* required.*\n\n" -> ""
54
//@ normalize-stderr: "aborting due to [0-9]+" -> "aborting due to NUMBER"
5+
//@ dont-require-annotations: ERROR
66

77
#![feature(rustc_private)]
88

99
extern crate rustc_serialize;
1010

1111
fn main() {}
12+
13+
//~? HELP try adding `extern crate rustc_driver;` at the top level of this crate
14+
//~? HELP try adding `extern crate rustc_driver;` at the top level of this crate
15+
//~? HELP try adding `extern crate rustc_driver;` at the top level of this crate

tests/ui/abi/fixed_x18.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Behavior on aarch64 is tested by tests/codegen/fixed-x18.rs.
33
//
44
//@ revisions: x64 i686 arm riscv32 riscv64
5-
//@ error-pattern: the `-Zfixed-x18` flag is not supported
65
//@ dont-check-compiler-stderr
76
//
87
//@ compile-flags: -Zfixed-x18
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//@ error-pattern: aborting due to 1 previous error
2-
31
fn main() {
42
2 + +2; //~ ERROR leading `+` is not supported
53
}

tests/ui/associated-types/issue-36499.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: leading `+` is not supported
2-
--> $DIR/issue-36499.rs:4:9
2+
--> $DIR/issue-36499.rs:2:9
33
|
44
LL | 2 + +2;
55
| ^ unexpected `+`

0 commit comments

Comments
 (0)