diff options
| author | bors <bors@rust-lang.org> | 2020-02-17 20:49:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-02-17 20:49:21 +0000 |
| commit | 0da4dd009ec28fb0e48bd10613dfb0ed5912d488 (patch) | |
| tree | 20811565f257fa7581069d6e7b4073c19981b49f | |
| parent | db2fbb127aca51233fb24188ecf66e1ac1953be8 (diff) | |
| parent | e2fc801ad5a858109e1f4586692f9496881b7842 (diff) | |
| download | rust-0da4dd009ec28fb0e48bd10613dfb0ed5912d488.tar.gz rust-0da4dd009ec28fb0e48bd10613dfb0ed5912d488.zip | |
Auto merge of #5189 - jonhoo:async-fn-main-not-needless, r=llogiq
needless_doctest_main: False positive for async fn Fixes #5188. --- changelog: none
| -rw-r--r-- | clippy_lints/src/doc.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/doc.rs b/clippy_lints/src/doc.rs index 4a7d2a8b640..2968daa54b4 100644 --- a/clippy_lints/src/doc.rs +++ b/clippy_lints/src/doc.rs @@ -424,7 +424,7 @@ fn check_doc<'a, Events: Iterator<Item = (pulldown_cmark::Event<'a>, Range<usize headers } -static LEAVE_MAIN_PATTERNS: &[&str] = &["static", "fn main() {}", "extern crate"]; +static LEAVE_MAIN_PATTERNS: &[&str] = &["static", "fn main() {}", "extern crate", "async fn main() {"]; fn check_code(cx: &LateContext<'_, '_>, text: &str, span: Span) { if text.contains("fn main() {") && !LEAVE_MAIN_PATTERNS.iter().any(|p| text.contains(p)) { |
