mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Remove $DIR replacement in docs sampling stderr files
This commit is contained in:
parent
1d107ab2be
commit
740d89ee69
@ -82,7 +82,7 @@ The output looks something like this (from the example earlier):
|
|||||||
|
|
||||||
```text
|
```text
|
||||||
error: an inclusive range would be more readable
|
error: an inclusive range would be more readable
|
||||||
--> $DIR/range_plus_minus_one.rs:37:14
|
--> tests/ui/range_plus_minus_one.rs:37:14
|
||||||
|
|
|
|
||||||
LL | for _ in 1..1 + 1 {}
|
LL | for _ in 1..1 + 1 {}
|
||||||
| ^^^^^^^^ help: use: `1..=1`
|
| ^^^^^^^^ help: use: `1..=1`
|
||||||
@ -135,14 +135,14 @@ Examples:
|
|||||||
|
|
||||||
```text
|
```text
|
||||||
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
|
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
|
||||||
--> $DIR/drop_forget_ref.rs:10:5
|
--> tests/ui/drop_forget_ref.rs:10:5
|
||||||
|
|
|
|
||||||
10 | forget(&SomeStruct);
|
10 | forget(&SomeStruct);
|
||||||
| ^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= note: `-D clippy::forget-ref` implied by `-D warnings`
|
= note: `-D clippy::forget-ref` implied by `-D warnings`
|
||||||
note: argument has type &SomeStruct
|
note: argument has type &SomeStruct
|
||||||
--> $DIR/drop_forget_ref.rs:10:12
|
--> tests/ui/drop_forget_ref.rs:10:12
|
||||||
|
|
|
|
||||||
10 | forget(&SomeStruct);
|
10 | forget(&SomeStruct);
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
@ -158,7 +158,7 @@ Example:
|
|||||||
|
|
||||||
```text
|
```text
|
||||||
error: constant division of 0.0 with 0.0 will always result in NaN
|
error: constant division of 0.0 with 0.0 will always result in NaN
|
||||||
--> $DIR/zero_div_zero.rs:6:25
|
--> tests/ui/zero_div_zero.rs:6:25
|
||||||
|
|
|
|
||||||
6 | let other_f64_nan = 0.0f64 / 0.0;
|
6 | let other_f64_nan = 0.0f64 / 0.0;
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
@ -176,7 +176,7 @@ Example:
|
|||||||
|
|
||||||
```text
|
```text
|
||||||
error: This `.fold` can be more succinctly expressed as `.any`
|
error: This `.fold` can be more succinctly expressed as `.any`
|
||||||
--> $DIR/methods.rs:390:13
|
--> tests/ui/methods.rs:390:13
|
||||||
|
|
|
|
||||||
390 | let _ = (0..3).fold(false, |acc, x| acc || x > 2);
|
390 | let _ = (0..3).fold(false, |acc, x| acc || x > 2);
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.any(|x| x > 2)`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.any(|x| x > 2)`
|
||||||
|
@ -97,19 +97,19 @@ failures:
|
|||||||
---- compile_test stdout ----
|
---- compile_test stdout ----
|
||||||
normalized stderr:
|
normalized stderr:
|
||||||
error: function called "foo"
|
error: function called "foo"
|
||||||
--> $DIR/foo_functions.rs:6:12
|
--> tests/ui/foo_functions.rs:6:12
|
||||||
|
|
|
|
||||||
LL | pub fn foo(&self) {}
|
LL | pub fn foo(&self) {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
|
|
||||||
= note: `-D clippy::foo-functions` implied by `-D warnings`
|
= note: `-D clippy::foo-functions` implied by `-D warnings`
|
||||||
error: function called "foo"
|
error: function called "foo"
|
||||||
--> $DIR/foo_functions.rs:13:8
|
--> tests/ui/foo_functions.rs:13:8
|
||||||
|
|
|
|
||||||
LL | fn foo(&self) {}
|
LL | fn foo(&self) {}
|
||||||
| ^^^
|
| ^^^
|
||||||
error: function called "foo"
|
error: function called "foo"
|
||||||
--> $DIR/foo_functions.rs:19:4
|
--> tests/ui/foo_functions.rs:19:4
|
||||||
|
|
|
|
||||||
LL | fn foo() {}
|
LL | fn foo() {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
@ -40,7 +40,7 @@ fn docs_link(diag: &mut Diagnostic, lint: &'static Lint) {
|
|||||||
///
|
///
|
||||||
/// ```ignore
|
/// ```ignore
|
||||||
/// error: usage of mem::forget on Drop type
|
/// error: usage of mem::forget on Drop type
|
||||||
/// --> $DIR/mem_forget.rs:17:5
|
/// --> tests/ui/mem_forget.rs:17:5
|
||||||
/// |
|
/// |
|
||||||
/// 17 | std::mem::forget(seven);
|
/// 17 | std::mem::forget(seven);
|
||||||
/// | ^^^^^^^^^^^^^^^^^^^^^^^
|
/// | ^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@ -65,7 +65,7 @@ pub fn span_lint<T: LintContext>(cx: &T, lint: &'static Lint, sp: impl Into<Mult
|
|||||||
///
|
///
|
||||||
/// ```text
|
/// ```text
|
||||||
/// error: constant division of 0.0 with 0.0 will always result in NaN
|
/// error: constant division of 0.0 with 0.0 will always result in NaN
|
||||||
/// --> $DIR/zero_div_zero.rs:6:25
|
/// --> tests/ui/zero_div_zero.rs:6:25
|
||||||
/// |
|
/// |
|
||||||
/// 6 | let other_f64_nan = 0.0f64 / 0.0;
|
/// 6 | let other_f64_nan = 0.0f64 / 0.0;
|
||||||
/// | ^^^^^^^^^^^^
|
/// | ^^^^^^^^^^^^
|
||||||
@ -103,14 +103,14 @@ pub fn span_lint_and_help<T: LintContext>(
|
|||||||
///
|
///
|
||||||
/// ```text
|
/// ```text
|
||||||
/// error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
|
/// error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
|
||||||
/// --> $DIR/drop_forget_ref.rs:10:5
|
/// --> tests/ui/drop_forget_ref.rs:10:5
|
||||||
/// |
|
/// |
|
||||||
/// 10 | forget(&SomeStruct);
|
/// 10 | forget(&SomeStruct);
|
||||||
/// | ^^^^^^^^^^^^^^^^^^^
|
/// | ^^^^^^^^^^^^^^^^^^^
|
||||||
/// |
|
/// |
|
||||||
/// = note: `-D clippy::forget-ref` implied by `-D warnings`
|
/// = note: `-D clippy::forget-ref` implied by `-D warnings`
|
||||||
/// note: argument has type &SomeStruct
|
/// note: argument has type &SomeStruct
|
||||||
/// --> $DIR/drop_forget_ref.rs:10:12
|
/// --> tests/ui/drop_forget_ref.rs:10:12
|
||||||
/// |
|
/// |
|
||||||
/// 10 | forget(&SomeStruct);
|
/// 10 | forget(&SomeStruct);
|
||||||
/// | ^^^^^^^^^^^
|
/// | ^^^^^^^^^^^
|
||||||
@ -186,7 +186,7 @@ pub fn span_lint_hir_and_then(
|
|||||||
///
|
///
|
||||||
/// ```text
|
/// ```text
|
||||||
/// error: This `.fold` can be more succinctly expressed as `.any`
|
/// error: This `.fold` can be more succinctly expressed as `.any`
|
||||||
/// --> $DIR/methods.rs:390:13
|
/// --> tests/ui/methods.rs:390:13
|
||||||
/// |
|
/// |
|
||||||
/// 390 | let _ = (0..3).fold(false, |acc, x| acc || x > 2);
|
/// 390 | let _ = (0..3).fold(false, |acc, x| acc || x > 2);
|
||||||
/// | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.any(|x| x > 2)`
|
/// | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.any(|x| x > 2)`
|
||||||
|
Loading…
Reference in New Issue
Block a user