Skip to content

Commit 1d107ab

Browse files
committed
Remove $DIR replacement in test output
1 parent 5471e06 commit 1d107ab

File tree

929 files changed

+9157
-9158
lines changed

Some content is hidden

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

929 files changed

+9157
-9158
lines changed

.github/driver.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ test "$sysroot" = $desired_sysroot
3232
)
3333

3434
# Check that the --sysroot argument is only passed once via arg_file.txt (SYSROOT is ignored)
35-
(
35+
(
3636
echo "fn main() {}" > target/driver_test.rs
3737
echo "--sysroot="$(./target/debug/clippy-driver --print sysroot)"" > arg_file.txt
3838
echo "--verbose" >> arg_file.txt
@@ -45,7 +45,7 @@ unset CARGO_MANIFEST_DIR
4545
# Run a lint and make sure it produces the expected output. It's also expected to exit with code 1
4646
# FIXME: How to match the clippy invocation in compile-test.rs?
4747
./target/debug/clippy-driver -Dwarnings -Aunused -Zui-testing --emit metadata --crate-type bin tests/ui/double_neg.rs 2>double_neg.stderr && exit 1
48-
sed -e "s,tests/ui,\$DIR," -e "/= help: for/d" double_neg.stderr > normalized.stderr
48+
sed -e "/= help: for/d" double_neg.stderr > normalized.stderr
4949
diff -u normalized.stderr tests/ui/double_neg.stderr
5050

5151
# make sure "clippy-driver --rustc --arg" and "rustc --arg" behave the same

tests/compile-test.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ fn base_config(test_dir: &str) -> (Config, Args) {
126126
}))
127127
.into();
128128
config.comment_defaults.base().diagnostic_code_prefix = Some(Spanned::dummy("clippy::".into())).into();
129-
config.filter(&format!("tests/{test_dir}"), "$$DIR");
130129
config.with_args(&args);
131130
let current_exe_path = env::current_exe().unwrap();
132131
let deps_path = current_exe_path.parent().unwrap();
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
warning: using config file `$DIR/$DIR/multiple_config_files/warn/.clippy.toml`, `$DIR/$DIR/multiple_config_files/warn/clippy.toml` will be ignored
1+
warning: using config file `$DIR/tests/ui-cargo/multiple_config_files/warn/.clippy.toml`, `$DIR/tests/ui-cargo/multiple_config_files/warn/clippy.toml` will be ignored
22

tests/ui-internal/check_clippy_version_attribute.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: this item has an invalid `clippy::version` attribute
2-
--> $DIR/check_clippy_version_attribute.rs:40:1
2+
--> tests/ui-internal/check_clippy_version_attribute.rs:40:1
33
|
44
LL | / declare_tool_lint! {
55
LL | | #[clippy::version = "1.2.3.4.5.6"]
@@ -12,15 +12,15 @@ LL | | }
1212
|
1313
= help: please use a valid semantic version, see `doc/adding_lints.md`
1414
note: the lint level is defined here
15-
--> $DIR/check_clippy_version_attribute.rs:1:9
15+
--> tests/ui-internal/check_clippy_version_attribute.rs:1:9
1616
|
1717
LL | #![deny(clippy::internal)]
1818
| ^^^^^^^^^^^^^^^^
1919
= note: `#[deny(clippy::invalid_clippy_version_attribute)]` implied by `#[deny(clippy::internal)]`
2020
= note: this error originates in the macro `$crate::declare_tool_lint` which comes from the expansion of the macro `declare_tool_lint` (in Nightly builds, run with -Z macro-backtrace for more info)
2121

2222
error: this item has an invalid `clippy::version` attribute
23-
--> $DIR/check_clippy_version_attribute.rs:48:1
23+
--> tests/ui-internal/check_clippy_version_attribute.rs:48:1
2424
|
2525
LL | / declare_tool_lint! {
2626
LL | | #[clippy::version = "I'm a string"]
@@ -35,7 +35,7 @@ LL | | }
3535
= note: this error originates in the macro `$crate::declare_tool_lint` which comes from the expansion of the macro `declare_tool_lint` (in Nightly builds, run with -Z macro-backtrace for more info)
3636

3737
error: this lint is missing the `clippy::version` attribute or version value
38-
--> $DIR/check_clippy_version_attribute.rs:59:1
38+
--> tests/ui-internal/check_clippy_version_attribute.rs:59:1
3939
|
4040
LL | / declare_tool_lint! {
4141
LL | | #[clippy::version]
@@ -51,7 +51,7 @@ LL | | }
5151
= note: this error originates in the macro `$crate::declare_tool_lint` which comes from the expansion of the macro `declare_tool_lint` (in Nightly builds, run with -Z macro-backtrace for more info)
5252

5353
error: this lint is missing the `clippy::version` attribute or version value
54-
--> $DIR/check_clippy_version_attribute.rs:67:1
54+
--> tests/ui-internal/check_clippy_version_attribute.rs:67:1
5555
|
5656
LL | / declare_tool_lint! {
5757
LL | | pub clippy::MISSING_ATTRIBUTE_TWO,

tests/ui-internal/check_formulation.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: non-standard lint formulation
2-
--> $DIR/check_formulation.rs:23:5
2+
--> tests/ui-internal/check_formulation.rs:23:5
33
|
44
LL | /// Check for lint formulations that are correct
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -9,7 +9,7 @@ LL | /// Check for lint formulations that are correct
99
= help: to override `-D warnings` add `#[allow(clippy::almost_standard_lint_formulation)]`
1010

1111
error: non-standard lint formulation
12-
--> $DIR/check_formulation.rs:33:5
12+
--> tests/ui-internal/check_formulation.rs:33:5
1313
|
1414
LL | /// Detects uses of incorrect formulations
1515
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui-internal/collapsible_span_lint_calls.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
error: this call is collapsible
2-
--> $DIR/collapsible_span_lint_calls.rs:35:9
2+
--> tests/ui-internal/collapsible_span_lint_calls.rs:35:9
33
|
44
LL | / span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| {
55
LL | | db.span_suggestion(expr.span, help_msg, sugg.to_string(), Applicability::MachineApplicable);
66
LL | | });
77
| |__________^ help: collapse into: `span_lint_and_sugg(cx, TEST_LINT, expr.span, lint_msg, help_msg, sugg.to_string(), Applicability::MachineApplicable)`
88
|
99
note: the lint level is defined here
10-
--> $DIR/collapsible_span_lint_calls.rs:1:9
10+
--> tests/ui-internal/collapsible_span_lint_calls.rs:1:9
1111
|
1212
LL | #![deny(clippy::internal)]
1313
| ^^^^^^^^^^^^^^^^
1414
= note: `#[deny(clippy::collapsible_span_lint_calls)]` implied by `#[deny(clippy::internal)]`
1515

1616
error: this call is collapsible
17-
--> $DIR/collapsible_span_lint_calls.rs:38:9
17+
--> tests/ui-internal/collapsible_span_lint_calls.rs:38:9
1818
|
1919
LL | / span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| {
2020
LL | | db.span_help(expr.span, help_msg);
2121
LL | | });
2222
| |__________^ help: collapse into: `span_lint_and_help(cx, TEST_LINT, expr.span, lint_msg, Some(expr.span), help_msg)`
2323

2424
error: this call is collapsible
25-
--> $DIR/collapsible_span_lint_calls.rs:41:9
25+
--> tests/ui-internal/collapsible_span_lint_calls.rs:41:9
2626
|
2727
LL | / span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| {
2828
LL | | db.help(help_msg);
2929
LL | | });
3030
| |__________^ help: collapse into: `span_lint_and_help(cx, TEST_LINT, expr.span, lint_msg, None, help_msg)`
3131

3232
error: this call is collapsible
33-
--> $DIR/collapsible_span_lint_calls.rs:44:9
33+
--> tests/ui-internal/collapsible_span_lint_calls.rs:44:9
3434
|
3535
LL | / span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| {
3636
LL | | db.span_note(expr.span, note_msg);
3737
LL | | });
3838
| |__________^ help: collapse into: `span_lint_and_note(cx, TEST_LINT, expr.span, lint_msg, Some(expr.span), note_msg)`
3939

4040
error: this call is collapsible
41-
--> $DIR/collapsible_span_lint_calls.rs:47:9
41+
--> tests/ui-internal/collapsible_span_lint_calls.rs:47:9
4242
|
4343
LL | / span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| {
4444
LL | | db.note(note_msg);

tests/ui-internal/default_deprecation_reason.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: the lint `COOL_LINT_DEFAULT` has the default deprecation reason
2-
--> $DIR/default_deprecation_reason.rs:8:1
2+
--> tests/ui-internal/default_deprecation_reason.rs:8:1
33
|
44
LL | / declare_deprecated_lint! {
55
LL | | /// ### What it does
@@ -11,7 +11,7 @@ LL | | }
1111
| |_^
1212
|
1313
note: the lint level is defined here
14-
--> $DIR/default_deprecation_reason.rs:1:9
14+
--> tests/ui-internal/default_deprecation_reason.rs:1:9
1515
|
1616
LL | #![deny(clippy::internal)]
1717
| ^^^^^^^^^^^^^^^^

tests/ui-internal/default_lint.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: the lint `TEST_LINT_DEFAULT` has the default lint description
2-
--> $DIR/default_lint.rs:18:1
2+
--> tests/ui-internal/default_lint.rs:18:1
33
|
44
LL | / declare_tool_lint! {
55
LL | | pub clippy::TEST_LINT_DEFAULT,
@@ -10,7 +10,7 @@ LL | | }
1010
| |_^
1111
|
1212
note: the lint level is defined here
13-
--> $DIR/default_lint.rs:1:9
13+
--> tests/ui-internal/default_lint.rs:1:9
1414
|
1515
LL | #![deny(clippy::internal)]
1616
| ^^^^^^^^^^^^^^^^

tests/ui-internal/disallow_span_lint.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: use of a disallowed method `rustc_lint::context::LintContext::span_lint`
2-
--> $DIR/disallow_span_lint.rs:14:5
2+
--> tests/ui-internal/disallow_span_lint.rs:14:5
33
|
44
LL | cx.span_lint(lint, span, msg, |_| {});
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | cx.span_lint(lint, span, msg, |_| {});
88
= help: to override `-D warnings` add `#[allow(clippy::disallowed_methods)]`
99

1010
error: use of a disallowed method `rustc_middle::ty::context::TyCtxt::node_span_lint`
11-
--> $DIR/disallow_span_lint.rs:24:5
11+
--> tests/ui-internal/disallow_span_lint.rs:24:5
1212
|
1313
LL | tcx.node_span_lint(lint, hir_id, span, msg, |_| {});
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui-internal/interning_defined_symbol.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
error: interning a defined symbol
2-
--> $DIR/interning_defined_symbol.rs:17:13
2+
--> tests/ui-internal/interning_defined_symbol.rs:17:13
33
|
44
LL | let _ = Symbol::intern("f32");
55
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `rustc_span::sym::f32`
66
|
77
note: the lint level is defined here
8-
--> $DIR/interning_defined_symbol.rs:1:9
8+
--> tests/ui-internal/interning_defined_symbol.rs:1:9
99
|
1010
LL | #![deny(clippy::internal)]
1111
| ^^^^^^^^^^^^^^^^
1212
= note: `#[deny(clippy::interning_defined_symbol)]` implied by `#[deny(clippy::internal)]`
1313

1414
error: interning a defined symbol
15-
--> $DIR/interning_defined_symbol.rs:20:13
15+
--> tests/ui-internal/interning_defined_symbol.rs:20:13
1616
|
1717
LL | let _ = sym!(f32);
1818
| ^^^^^^^^^ help: try: `rustc_span::sym::f32`
1919

2020
error: interning a defined symbol
21-
--> $DIR/interning_defined_symbol.rs:23:13
21+
--> tests/ui-internal/interning_defined_symbol.rs:23:13
2222
|
2323
LL | let _ = Symbol::intern("proc-macro");
2424
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `rustc_span::sym::proc_dash_macro`
2525

2626
error: interning a defined symbol
27-
--> $DIR/interning_defined_symbol.rs:26:13
27+
--> tests/ui-internal/interning_defined_symbol.rs:26:13
2828
|
2929
LL | let _ = Symbol::intern("self");
3030
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rustc_span::symbol::kw::SelfLower`

tests/ui-internal/invalid_msrv_attr_impl.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: `extract_msrv_attr!` macro missing from `LateLintPass` implementation
2-
--> $DIR/invalid_msrv_attr_impl.rs:28:1
2+
--> tests/ui-internal/invalid_msrv_attr_impl.rs:28:1
33
|
44
LL | impl LateLintPass<'_> for Pass {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
note: the lint level is defined here
8-
--> $DIR/invalid_msrv_attr_impl.rs:1:9
8+
--> tests/ui-internal/invalid_msrv_attr_impl.rs:1:9
99
|
1010
LL | #![deny(clippy::internal)]
1111
| ^^^^^^^^^^^^^^^^
@@ -17,7 +17,7 @@ LL + extract_msrv_attr!(LateContext);
1717
|
1818

1919
error: `extract_msrv_attr!` macro missing from `EarlyLintPass` implementation
20-
--> $DIR/invalid_msrv_attr_impl.rs:32:1
20+
--> tests/ui-internal/invalid_msrv_attr_impl.rs:32:1
2121
|
2222
LL | impl EarlyLintPass for Pass {
2323
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui-internal/invalid_paths.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: invalid path
2-
--> $DIR/invalid_paths.rs:15:5
2+
--> tests/ui-internal/invalid_paths.rs:15:5
33
|
44
LL | pub const TRANSMUTE: [&str; 4] = ["core", "intrinsics", "", "transmute"];
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -8,13 +8,13 @@ LL | pub const TRANSMUTE: [&str; 4] = ["core", "intrinsics", "", "transmute"
88
= help: to override `-D warnings` add `#[allow(clippy::invalid_paths)]`
99

1010
error: invalid path
11-
--> $DIR/invalid_paths.rs:18:5
11+
--> tests/ui-internal/invalid_paths.rs:18:5
1212
|
1313
LL | pub const BAD_CRATE_PATH: [&str; 2] = ["bad", "path"];
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1515

1616
error: invalid path
17-
--> $DIR/invalid_paths.rs:21:5
17+
--> tests/ui-internal/invalid_paths.rs:21:5
1818
|
1919
LL | pub const BAD_MOD_PATH: [&str; 2] = ["std", "xxx"];
2020
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui-internal/lint_without_lint_pass.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: the lint `TEST_LINT` is not added to any `LintPass`
2-
--> $DIR/lint_without_lint_pass.rs:12:1
2+
--> tests/ui-internal/lint_without_lint_pass.rs:12:1
33
|
44
LL | / declare_tool_lint! {
55
LL | | pub clippy::TEST_LINT,
@@ -10,7 +10,7 @@ LL | | }
1010
| |_^
1111
|
1212
note: the lint level is defined here
13-
--> $DIR/lint_without_lint_pass.rs:1:9
13+
--> tests/ui-internal/lint_without_lint_pass.rs:1:9
1414
|
1515
LL | #![deny(clippy::internal)]
1616
| ^^^^^^^^^^^^^^^^

tests/ui-internal/outer_expn_data.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: usage of `outer_expn().expn_data()`
2-
--> $DIR/outer_expn_data.rs:23:34
2+
--> tests/ui-internal/outer_expn_data.rs:23:34
33
|
44
LL | let _ = expr.span.ctxt().outer_expn().expn_data();
55
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `outer_expn_data()`
66
|
77
note: the lint level is defined here
8-
--> $DIR/outer_expn_data.rs:1:9
8+
--> tests/ui-internal/outer_expn_data.rs:1:9
99
|
1010
LL | #![deny(clippy::internal)]
1111
| ^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)