Skip to content

Commit

Permalink
Auto merge of rust-lang#11449 - blyxyas:book-write_tests, r=flip1995
Browse files Browse the repository at this point in the history
Should be final writing_tests commit

Fixes that book `FIXME`.

r? `@flip1995`
changelog: none
  • Loading branch information
bors committed Sep 3, 2023
2 parents 3de0f19 + 92d47db commit 60a18b7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions book/src/development/writing_tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ As our `foo_functions` lint is tested, the output would look something like this

```
failures:
---- compile_test stdout ----
normalized stderr:
error: function called "foo"
Expand All @@ -104,19 +103,16 @@ LL | pub fn foo(&self) {}
| ^^^
|
= note: `-D clippy::foo-functions` implied by `-D warnings`
error: function called "foo"
--> $DIR/foo_functions.rs:13:8
|
LL | fn foo(&self) {}
| ^^^
error: function called "foo"
--> $DIR/foo_functions.rs:19:4
|
LL | fn foo() {}
| ^^^
error: aborting due to 3 previous errors
```

Expand Down Expand Up @@ -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
of the test file, to not run `rustfix` on that file.

We'll talk about suggestions more in depth in a later chapter.
<!-- FIXME: (blyxyas) Link to "Emitting lints" when that gets merged -->
We'll talk about suggestions more in depth in a [later chapter](emitting_lints.md).

Use `cargo bless` to automatically generate the `.fixed` file after running
the tests.
Expand Down

0 comments on commit 60a18b7

Please sign in to comment.