Revert global fmt config and use rustfmt::skip

This commit is contained in:
uHOOCCOOHu 2019-07-20 00:50:18 +08:00
parent 2cc373ac54
commit b70b3b14aa
No known key found for this signature in database
GPG key ID: CED392DE0C483D00
3 changed files with 40 additions and 36 deletions

View file

@ -2,5 +2,5 @@ max_width = 120
comment_width = 100
match_block_trailing_comma = true
wrap_comments = true
edition = "2018"
error_on_line_overflow = true

View file

@ -2,6 +2,9 @@
#![feature(async_await)]
#![allow(dead_code)]
// No edition 2018
#[rustfmt::skip]
mod m {
async fn sink1<'a>(_: &'a str) {} // lint
async fn sink1_elided(_: &str) {} // ok
@ -34,5 +37,6 @@ impl Foo {
async fn print(s: &str) {
println!("{}", s);
}
}
fn main() {}

View file

@ -1,5 +1,5 @@
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> $DIR/issue_4266.rs:5:1
--> $DIR/issue_4266.rs:8:5
|
LL | async fn sink1<'a>(_: &'a str) {} // lint
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -7,12 +7,12 @@ LL | async fn sink1<'a>(_: &'a str) {} // lint
= note: `-D clippy::needless-lifetimes` implied by `-D warnings`
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> $DIR/issue_4266.rs:9:1
--> $DIR/issue_4266.rs:12:5
|
LL | / async fn one_to_one<'a>(s: &'a str) -> &'a str {
LL | | s
LL | | }
| |_^
| |_____^
error: aborting due to 2 previous errors