mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-18 00:53:31 +00:00
Account for multiple multiline spans with empty padding
Instead of ``` LL | fn oom( | __^ | | _| | || LL | || ) { | ||_- LL | | } | |__^ ``` emit ``` LL | // fn oom( LL | || ) { | ||_- LL | | } | |__^ ```
This commit is contained in:
parent
24444945ec
commit
315bb10405
2 changed files with 3 additions and 8 deletions
|
@ -3,8 +3,7 @@ error: an async construct yields a type which is itself awaitable
|
||||||
|
|
|
|
||||||
LL | let _h = async {
|
LL | let _h = async {
|
||||||
| _____________________-
|
| _____________________-
|
||||||
LL | | async {
|
LL | |/ async {
|
||||||
| | _________^
|
|
||||||
LL | || 3
|
LL | || 3
|
||||||
LL | || }
|
LL | || }
|
||||||
| ||_________^ awaitable value not awaited
|
| ||_________^ awaitable value not awaited
|
||||||
|
@ -37,8 +36,7 @@ error: an async construct yields a type which is itself awaitable
|
||||||
|
|
|
|
||||||
LL | let _j = async || {
|
LL | let _j = async || {
|
||||||
| ________________________-
|
| ________________________-
|
||||||
LL | | async {
|
LL | |/ async {
|
||||||
| | _________^
|
|
||||||
LL | || 3
|
LL | || 3
|
||||||
LL | || }
|
LL | || }
|
||||||
| ||_________^ awaitable value not awaited
|
| ||_________^ awaitable value not awaited
|
||||||
|
|
|
@ -19,10 +19,7 @@ LL | x.field.map(|value| if value > 0 { do_nothing(value); do_nothing(value)
|
||||||
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
|
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
|
||||||
--> $DIR/result_map_unit_fn_unfixable.rs:29:5
|
--> $DIR/result_map_unit_fn_unfixable.rs:29:5
|
||||||
|
|
|
|
||||||
LL | x.field.map(|value| {
|
LL | // x.field.map(|value| {
|
||||||
| ______^
|
|
||||||
| | _____|
|
|
||||||
| ||
|
|
||||||
LL | || do_nothing(value);
|
LL | || do_nothing(value);
|
||||||
LL | || do_nothing(value)
|
LL | || do_nothing(value)
|
||||||
LL | || });
|
LL | || });
|
||||||
|
|
Loading…
Reference in a new issue