Add emitting_lints
link to Writing tests
and remove that FIXME
This commit is contained in:
parent
3cf1087dcd
commit
92d47dbb29
@ -94,7 +94,6 @@ As our `foo_functions` lint is tested, the output would look something like this
|
|||||||
|
|
||||||
```
|
```
|
||||||
failures:
|
failures:
|
||||||
|
|
||||||
---- compile_test stdout ----
|
---- compile_test stdout ----
|
||||||
normalized stderr:
|
normalized stderr:
|
||||||
error: function called "foo"
|
error: function called "foo"
|
||||||
@ -104,19 +103,16 @@ 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
|
--> $DIR/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
|
--> $DIR/foo_functions.rs:19:4
|
||||||
|
|
|
|
||||||
LL | fn foo() {}
|
LL | fn foo() {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
error: aborting due to 3 previous errors
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -202,8 +198,7 @@ Should `span_lint_and_sugg` be used to generate a suggestion, but not all
|
|||||||
suggestions lead to valid code, you can use the `//@no-rustfix` comment on top
|
suggestions lead to valid code, you can use the `//@no-rustfix` comment on top
|
||||||
of the test file, to not run `rustfix` on that file.
|
of the test file, to not run `rustfix` on that file.
|
||||||
|
|
||||||
We'll talk about suggestions more in depth in a later chapter.
|
We'll talk about suggestions more in depth in a [later chapter](emitting_lints.md).
|
||||||
<!-- FIXME: (blyxyas) Link to "Emitting lints" when that gets merged -->
|
|
||||||
|
|
||||||
Use `cargo bless` to automatically generate the `.fixed` file after running
|
Use `cargo bless` to automatically generate the `.fixed` file after running
|
||||||
the tests.
|
the tests.
|
||||||
|
Loading…
Reference in New Issue
Block a user