Update UI tests
This commit is contained in:
parent
1358569c53
commit
cca89952a2
6 changed files with 27 additions and 25 deletions
|
|
@ -133,7 +133,7 @@ struct Stop {
|
|||
impl Stop {
|
||||
fn convert_to_inner(&self) -> (Span, String) {
|
||||
let inner = match self.kind {
|
||||
// #|[...]
|
||||
// #![...]
|
||||
StopKind::Attr => InnerSpan::new(1, 1),
|
||||
// /// or /**
|
||||
// ^ ^
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ LL | / /// for the crate
|
|||
LL | |
|
||||
| |_^
|
||||
LL | fn first_in_crate() {}
|
||||
| ------------------- the comment documents this function
|
||||
| ----------------- the comment documents this function
|
||||
|
|
||||
= note: `-D clippy::empty-line-after-doc-comments` implied by `-D warnings`
|
||||
= help: to override `-D warnings` add `#[allow(clippy::empty_line_after_doc_comments)]`
|
||||
|
|
@ -24,7 +24,7 @@ LL | / /// for the module
|
|||
LL | |
|
||||
| |_^
|
||||
LL | fn first_in_module() {}
|
||||
| -------------------- the comment documents this function
|
||||
| ------------------ the comment documents this function
|
||||
|
|
||||
= help: if the empty line is unintentional remove it
|
||||
help: if the comment should document the parent module use an inner doc comment
|
||||
|
|
@ -42,7 +42,7 @@ LL | |
|
|||
| |_^
|
||||
LL | /// Blank line
|
||||
LL | fn indented() {}
|
||||
| ------------- the comment documents this function
|
||||
| ----------- the comment documents this function
|
||||
|
|
||||
= help: if the empty line is unintentional remove it
|
||||
help: if the documentation should include the empty line include it in the comment
|
||||
|
|
@ -57,7 +57,7 @@ LL | / /// This should produce a warning
|
|||
LL | |
|
||||
| |_^
|
||||
LL | fn with_doc_and_newline() {}
|
||||
| ------------------------- the comment documents this function
|
||||
| ----------------------- the comment documents this function
|
||||
|
|
||||
= help: if the empty line is unintentional remove it
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ LL | |
|
|||
| |_^
|
||||
...
|
||||
LL | fn three_attributes() {}
|
||||
| --------------------- the comment documents this function
|
||||
| ------------------- the comment documents this function
|
||||
|
|
||||
= help: if the empty lines are unintentional remove them
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ LL | | // fn old_code() {}
|
|||
LL | |
|
||||
| |_^
|
||||
LL | fn new_code() {}
|
||||
| ------------- the comment documents this function
|
||||
| ----------- the comment documents this function
|
||||
|
|
||||
= help: if the empty line is unintentional remove it
|
||||
help: if the doc comment should not document `new_code` comment it out
|
||||
|
|
@ -126,7 +126,7 @@ LL | | */
|
|||
LL | |
|
||||
| |_^
|
||||
LL | fn first_in_module() {}
|
||||
| -------------------- the comment documents this function
|
||||
| ------------------ the comment documents this function
|
||||
|
|
||||
= help: if the empty line is unintentional remove it
|
||||
help: if the comment should document the parent module use an inner doc comment
|
||||
|
|
@ -145,7 +145,7 @@ LL | |
|
|||
| |_^
|
||||
...
|
||||
LL | fn new_code() {}
|
||||
| ------------- the comment documents this function
|
||||
| ----------- the comment documents this function
|
||||
|
|
||||
= help: if the empty line is unintentional remove it
|
||||
help: if the doc comment should not document `new_code` comment it out
|
||||
|
|
@ -163,7 +163,7 @@ LL | |
|
|||
| |_^
|
||||
LL | /// Docs for `new_code2`
|
||||
LL | fn new_code2() {}
|
||||
| -------------- the comment documents this function
|
||||
| ------------ the comment documents this function
|
||||
|
|
||||
= help: if the empty line is unintentional remove it
|
||||
help: if the doc comment should not document `new_code2` comment it out
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ LL | / #[crate_type = "lib"]
|
|||
LL | |
|
||||
| |_^
|
||||
LL | fn first_in_crate() {}
|
||||
| ------------------- the attribute applies to this function
|
||||
| ----------------- the attribute applies to this function
|
||||
|
|
||||
= note: `-D clippy::empty-line-after-outer-attr` implied by `-D warnings`
|
||||
= help: to override `-D warnings` add `#[allow(clippy::empty_line_after_outer_attr)]`
|
||||
|
|
@ -23,7 +23,7 @@ LL | |
|
|||
| |_^
|
||||
LL | /// some comment
|
||||
LL | fn with_one_newline_and_comment() {}
|
||||
| --------------------------------- the attribute applies to this function
|
||||
| ------------------------------- the attribute applies to this function
|
||||
|
|
||||
= help: if the empty line is unintentional remove it
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ LL | / #[inline]
|
|||
LL | |
|
||||
| |_^
|
||||
LL | fn with_one_newline() {}
|
||||
| --------------------- the attribute applies to this function
|
||||
| ------------------- the attribute applies to this function
|
||||
|
|
||||
= help: if the empty line is unintentional remove it
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ LL | |
|
|||
LL | |
|
||||
| |_^
|
||||
LL | fn with_two_newlines() {}
|
||||
| ---------------------- the attribute applies to this function
|
||||
| -------------------- the attribute applies to this function
|
||||
|
|
||||
= help: if the empty lines are unintentional remove them
|
||||
help: if the attribute should apply to the parent module use an inner attribute
|
||||
|
|
@ -95,7 +95,7 @@ LL | | // Still lint cases where the empty line does not immediately follow the
|
|||
LL | |
|
||||
| |_^
|
||||
LL | fn comment_before_empty_line() {}
|
||||
| ------------------------------ the attribute applies to this function
|
||||
| ---------------------------- the attribute applies to this function
|
||||
|
|
||||
= help: if the empty line is unintentional remove it
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ LL | / #[allow(unused)]
|
|||
LL | |
|
||||
| |_^
|
||||
LL | pub fn isolated_comment() {}
|
||||
| ------------------------- the attribute applies to this function
|
||||
| ----------------------- the attribute applies to this function
|
||||
|
|
||||
= help: if the empty lines are unintentional remove them
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#![allow(unused)]
|
||||
#![warn(clippy::suspicious_doc_comments)]
|
||||
#![allow(clippy::empty_line_after_doc_comments)]
|
||||
|
||||
//! Real module documentation.
|
||||
//! Fake module documentation.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#![allow(unused)]
|
||||
#![warn(clippy::suspicious_doc_comments)]
|
||||
#![allow(clippy::empty_line_after_doc_comments)]
|
||||
|
||||
//! Real module documentation.
|
||||
///! Fake module documentation.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error: this is an outer doc comment and does not apply to the parent module or crate
|
||||
--> tests/ui/suspicious_doc_comments.rs:5:1
|
||||
--> tests/ui/suspicious_doc_comments.rs:6:1
|
||||
|
|
||||
LL | ///! Fake module documentation.
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
@ -12,7 +12,7 @@ LL | //! Fake module documentation.
|
|||
|
|
||||
|
||||
error: this is an outer doc comment and does not apply to the parent module or crate
|
||||
--> tests/ui/suspicious_doc_comments.rs:9:5
|
||||
--> tests/ui/suspicious_doc_comments.rs:10:5
|
||||
|
|
||||
LL | ///! This module contains useful functions.
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
@ -23,7 +23,7 @@ LL | //! This module contains useful functions.
|
|||
|
|
||||
|
||||
error: this is an outer doc comment and does not apply to the parent module or crate
|
||||
--> tests/ui/suspicious_doc_comments.rs:21:5
|
||||
--> tests/ui/suspicious_doc_comments.rs:22:5
|
||||
|
|
||||
LL | / /**! This module contains useful functions.
|
||||
LL | | */
|
||||
|
|
@ -36,7 +36,7 @@ LL + */
|
|||
|
|
||||
|
||||
error: this is an outer doc comment and does not apply to the parent module or crate
|
||||
--> tests/ui/suspicious_doc_comments.rs:35:5
|
||||
--> tests/ui/suspicious_doc_comments.rs:36:5
|
||||
|
|
||||
LL | / ///! This module
|
||||
LL | | ///! contains
|
||||
|
|
@ -51,7 +51,7 @@ LL ~ //! useful functions.
|
|||
|
|
||||
|
||||
error: this is an outer doc comment and does not apply to the parent module or crate
|
||||
--> tests/ui/suspicious_doc_comments.rs:43:5
|
||||
--> tests/ui/suspicious_doc_comments.rs:44:5
|
||||
|
|
||||
LL | / ///! a
|
||||
LL | | ///! b
|
||||
|
|
@ -64,7 +64,7 @@ LL ~ //! b
|
|||
|
|
||||
|
||||
error: this is an outer doc comment and does not apply to the parent module or crate
|
||||
--> tests/ui/suspicious_doc_comments.rs:51:5
|
||||
--> tests/ui/suspicious_doc_comments.rs:52:5
|
||||
|
|
||||
LL | ///! a
|
||||
| ^^^^^^
|
||||
|
|
@ -75,7 +75,7 @@ LL | //! a
|
|||
|
|
||||
|
||||
error: this is an outer doc comment and does not apply to the parent module or crate
|
||||
--> tests/ui/suspicious_doc_comments.rs:57:5
|
||||
--> tests/ui/suspicious_doc_comments.rs:58:5
|
||||
|
|
||||
LL | / ///! a
|
||||
LL | |
|
||||
|
|
@ -90,7 +90,7 @@ LL ~ //! b
|
|||
|
|
||||
|
||||
error: this is an outer doc comment and does not apply to the parent module or crate
|
||||
--> tests/ui/suspicious_doc_comments.rs:69:5
|
||||
--> tests/ui/suspicious_doc_comments.rs:70:5
|
||||
|
|
||||
LL | ///! Very cool macro
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
@ -101,7 +101,7 @@ LL | //! Very cool macro
|
|||
|
|
||||
|
||||
error: this is an outer doc comment and does not apply to the parent module or crate
|
||||
--> tests/ui/suspicious_doc_comments.rs:76:5
|
||||
--> tests/ui/suspicious_doc_comments.rs:77:5
|
||||
|
|
||||
LL | ///! Huh.
|
||||
| ^^^^^^^^^
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue