about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-02-17 20:49:21 +0000
committerbors <bors@rust-lang.org>2020-02-17 20:49:21 +0000
commit0da4dd009ec28fb0e48bd10613dfb0ed5912d488 (patch)
tree20811565f257fa7581069d6e7b4073c19981b49f
parentdb2fbb127aca51233fb24188ecf66e1ac1953be8 (diff)
parente2fc801ad5a858109e1f4586692f9496881b7842 (diff)
downloadrust-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.rs2
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)) {