Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e4b7c45

Browse files
authoredFeb 8, 2025
Rollup merge of rust-lang#136657 - jdonszelmann:empty-line-after, r=y21,flip1995,WaffleLapkin
Make empty-line-after an early clippy lint r? `@y21` 95% a refiling of rust-lang/rust-clippy#13658 but for correctness it needed 2 extra methods in `rust_lint` which made it much easier to apply on `rust-lang/rust` than `rust-lang/rust-clippy`. Commits have been thoroughly reviewed on `rust-lang/clippy already`. The last two review comments there (about using `Option` and popping for assoc items have been applied here.
2 parents 6ee5f05 + cd52a95 commit e4b7c45

17 files changed

+621
-472
lines changed
 

‎compiler/rustc_lint/src/early.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,14 @@ impl<'ast, 'ecx, 'tcx, T: EarlyLintPass> ast_visit::Visitor<'ast>
246246
}
247247
}
248248
ast_visit::walk_assoc_item(cx, item, ctxt);
249+
match ctxt {
250+
ast_visit::AssocCtxt::Trait => {
251+
lint_callback!(cx, check_trait_item_post, item);
252+
}
253+
ast_visit::AssocCtxt::Impl => {
254+
lint_callback!(cx, check_impl_item_post, item);
255+
}
256+
}
249257
});
250258
}
251259

‎compiler/rustc_lint/src/passes.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ macro_rules! early_lint_methods {
162162
c: rustc_span::Span,
163163
d_: rustc_ast::NodeId);
164164
fn check_trait_item(a: &rustc_ast::AssocItem);
165+
fn check_trait_item_post(a: &rustc_ast::AssocItem);
165166
fn check_impl_item(a: &rustc_ast::AssocItem);
167+
fn check_impl_item_post(a: &rustc_ast::AssocItem);
166168
fn check_variant(a: &rustc_ast::Variant);
167169
fn check_attribute(a: &rustc_ast::Attribute);
168170
fn check_attributes(a: &[rustc_ast::Attribute]);

‎src/tools/clippy/clippy_lints/src/declared_lints.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,6 @@ pub static LINTS: &[&crate::LintInfo] = &[
144144
crate::doc::DOC_NESTED_REFDEFS_INFO,
145145
crate::doc::DOC_OVERINDENTED_LIST_ITEMS_INFO,
146146
crate::doc::EMPTY_DOCS_INFO,
147-
crate::doc::EMPTY_LINE_AFTER_DOC_COMMENTS_INFO,
148-
crate::doc::EMPTY_LINE_AFTER_OUTER_ATTR_INFO,
149147
crate::doc::MISSING_ERRORS_DOC_INFO,
150148
crate::doc::MISSING_PANICS_DOC_INFO,
151149
crate::doc::MISSING_SAFETY_DOC_INFO,
@@ -162,6 +160,8 @@ pub static LINTS: &[&crate::LintInfo] = &[
162160
crate::else_if_without_else::ELSE_IF_WITHOUT_ELSE_INFO,
163161
crate::empty_drop::EMPTY_DROP_INFO,
164162
crate::empty_enum::EMPTY_ENUM_INFO,
163+
crate::empty_line_after::EMPTY_LINE_AFTER_DOC_COMMENTS_INFO,
164+
crate::empty_line_after::EMPTY_LINE_AFTER_OUTER_ATTR_INFO,
165165
crate::empty_with_brackets::EMPTY_ENUM_VARIANTS_WITH_BRACKETS_INFO,
166166
crate::empty_with_brackets::EMPTY_STRUCTS_WITH_BRACKETS_INFO,
167167
crate::endian_bytes::BIG_ENDIAN_BYTES_INFO,

‎src/tools/clippy/clippy_lints/src/doc/empty_line_after.rs

Lines changed: 0 additions & 345 deletions
This file was deleted.

‎src/tools/clippy/clippy_lints/src/doc/mod.rs

Lines changed: 1 addition & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ use rustc_span::{Span, sym};
3333
use std::ops::Range;
3434
use url::Url;
3535

36-
mod empty_line_after;
3736
mod include_in_doc_without_cfg;
3837
mod link_with_quotes;
3938
mod markdown;
@@ -491,82 +490,6 @@ declare_clippy_lint! {
491490
"ensure the first documentation paragraph is short"
492491
}
493492

494-
declare_clippy_lint! {
495-
/// ### What it does
496-
/// Checks for empty lines after outer attributes
497-
///
498-
/// ### Why is this bad?
499-
/// The attribute may have meant to be an inner attribute (`#![attr]`). If
500-
/// it was meant to be an outer attribute (`#[attr]`) then the empty line
501-
/// should be removed
502-
///
503-
/// ### Example
504-
/// ```no_run
505-
/// #[allow(dead_code)]
506-
///
507-
/// fn not_quite_good_code() {}
508-
/// ```
509-
///
510-
/// Use instead:
511-
/// ```no_run
512-
/// // Good (as inner attribute)
513-
/// #![allow(dead_code)]
514-
///
515-
/// fn this_is_fine() {}
516-
///
517-
/// // or
518-
///
519-
/// // Good (as outer attribute)
520-
/// #[allow(dead_code)]
521-
/// fn this_is_fine_too() {}
522-
/// ```
523-
#[clippy::version = "pre 1.29.0"]
524-
pub EMPTY_LINE_AFTER_OUTER_ATTR,
525-
suspicious,
526-
"empty line after outer attribute"
527-
}
528-
529-
declare_clippy_lint! {
530-
/// ### What it does
531-
/// Checks for empty lines after doc comments.
532-
///
533-
/// ### Why is this bad?
534-
/// The doc comment may have meant to be an inner doc comment, regular
535-
/// comment or applied to some old code that is now commented out. If it was
536-
/// intended to be a doc comment, then the empty line should be removed.
537-
///
538-
/// ### Example
539-
/// ```no_run
540-
/// /// Some doc comment with a blank line after it.
541-
///
542-
/// fn f() {}
543-
///
544-
/// /// Docs for `old_code`
545-
/// // fn old_code() {}
546-
///
547-
/// fn new_code() {}
548-
/// ```
549-
///
550-
/// Use instead:
551-
/// ```no_run
552-
/// //! Convert it to an inner doc comment
553-
///
554-
/// // Or a regular comment
555-
///
556-
/// /// Or remove the empty line
557-
/// fn f() {}
558-
///
559-
/// // /// Docs for `old_code`
560-
/// // fn old_code() {}
561-
///
562-
/// fn new_code() {}
563-
/// ```
564-
#[clippy::version = "1.70.0"]
565-
pub EMPTY_LINE_AFTER_DOC_COMMENTS,
566-
suspicious,
567-
"empty line after doc comments"
568-
}
569-
570493
declare_clippy_lint! {
571494
/// ### What it does
572495
/// Checks if included files in doc comments are included only for `cfg(doc)`.
@@ -650,8 +573,6 @@ impl_lint_pass!(Documentation => [
650573
EMPTY_DOCS,
651574
DOC_LAZY_CONTINUATION,
652575
DOC_OVERINDENTED_LIST_ITEMS,
653-
EMPTY_LINE_AFTER_OUTER_ATTR,
654-
EMPTY_LINE_AFTER_DOC_COMMENTS,
655576
TOO_LONG_FIRST_DOC_PARAGRAPH,
656577
DOC_INCLUDE_WITHOUT_CFG,
657578
]);
@@ -784,7 +705,7 @@ fn check_attrs(cx: &LateContext<'_>, valid_idents: &FxHashSet<String>, attrs: &[
784705
}
785706

786707
include_in_doc_without_cfg::check(cx, attrs);
787-
if suspicious_doc_comments::check(cx, attrs) || empty_line_after::check(cx, attrs) || is_doc_hidden(attrs) {
708+
if suspicious_doc_comments::check(cx, attrs) || is_doc_hidden(attrs) {
788709
return None;
789710
}
790711

‎src/tools/clippy/clippy_lints/src/empty_line_after.rs

Lines changed: 492 additions & 0 deletions
Large diffs are not rendered by default.

‎src/tools/clippy/clippy_lints/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ mod duplicate_mod;
126126
mod else_if_without_else;
127127
mod empty_drop;
128128
mod empty_enum;
129+
mod empty_line_after;
129130
mod empty_with_brackets;
130131
mod endian_bytes;
131132
mod entry;
@@ -973,6 +974,7 @@ pub fn register_lints(store: &mut rustc_lint::LintStore, conf: &'static Conf) {
973974
store.register_late_pass(move |_| Box::new(unused_trait_names::UnusedTraitNames::new(conf)));
974975
store.register_late_pass(|_| Box::new(manual_ignore_case_cmp::ManualIgnoreCaseCmp));
975976
store.register_late_pass(|_| Box::new(unnecessary_literal_bound::UnnecessaryLiteralBound));
977+
store.register_early_pass(|| Box::new(empty_line_after::EmptyLineAfter::new()));
976978
store.register_late_pass(move |_| Box::new(arbitrary_source_item_ordering::ArbitrarySourceItemOrdering::new(conf)));
977979
store.register_late_pass(|_| Box::new(unneeded_struct_pattern::UnneededStructPattern));
978980
store.register_late_pass(|_| Box::<unnecessary_semicolon::UnnecessarySemicolon>::default());

‎src/tools/clippy/tests/ui/doc/unbalanced_ticks.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,19 @@ fn escape_3() {}
6666

6767
/// Backslashes ` \` within code blocks don't count.
6868
fn escape_4() {}
69+
70+
trait Foo {
71+
fn bar();
72+
}
73+
74+
struct Bar;
75+
impl Foo for Bar {
76+
// NOTE: false positive
77+
/// Returns an `Option<Month>` from a i64, assuming a 1-index, January = 1.
78+
///
79+
/// `Month::from_i64(n: i64)`: | `1` | `2` | ... | `12`
80+
/// ---------------------------| -------------------- | --------------------- | ... | -----
81+
/// ``: | Some(Month::January) | Some(Month::February) | ... |
82+
/// Some(Month::December)
83+
fn bar() {}
84+
}

‎src/tools/clippy/tests/ui/doc/unbalanced_ticks.stderr

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,17 @@ LL | /// Escaped \` ` backticks don't count, but unescaped backticks do.
9494
|
9595
= help: a backtick may be missing a pair
9696

97-
error: aborting due to 10 previous errors
97+
error: backticks are unbalanced
98+
--> tests/ui/doc/unbalanced_ticks.rs:79:9
99+
|
100+
LL | /// `Month::from_i64(n: i64)`: | `1` | `2` | ... | `12`
101+
| _________^
102+
LL | | /// ---------------------------| -------------------- | --------------------- | ... | -----
103+
LL | | /// ``: | Some(Month::January) | Some(Month::February) | ... |
104+
LL | | /// Some(Month::December)
105+
| |_____________________________^
106+
|
107+
= help: a backtick may be missing a pair
108+
109+
error: aborting due to 11 previous errors
98110

‎src/tools/clippy/tests/ui/empty_line_after/doc_comments.1.fixed

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,13 @@ pub struct BlockComment;
132132
))]
133133
fn empty_line_in_cfg_attr() {}
134134

135+
trait Foo {
136+
fn bar();
137+
}
138+
139+
impl Foo for LineComment {
140+
/// comment on assoc item
141+
fn bar() {}
142+
}
143+
135144
fn main() {}

‎src/tools/clippy/tests/ui/empty_line_after/doc_comments.2.fixed

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,13 @@ pub struct BlockComment;
141141
))]
142142
fn empty_line_in_cfg_attr() {}
143143

144+
trait Foo {
145+
fn bar();
146+
}
147+
148+
impl Foo for LineComment {
149+
/// comment on assoc item
150+
fn bar() {}
151+
}
152+
144153
fn main() {}

‎src/tools/clippy/tests/ui/empty_line_after/doc_comments.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,4 +144,14 @@ pub struct BlockComment;
144144
))]
145145
fn empty_line_in_cfg_attr() {}
146146

147+
trait Foo {
148+
fn bar();
149+
}
150+
151+
impl Foo for LineComment {
152+
/// comment on assoc item
153+
154+
fn bar() {}
155+
}
156+
147157
fn main() {}

‎src/tools/clippy/tests/ui/empty_line_after/doc_comments.stderr

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ LL | / /// for the crate
55
LL | |
66
| |_^
77
LL | fn first_in_crate() {}
8-
| ------------------- the comment documents this function
8+
| ----------------- the comment documents this function
99
|
1010
= note: `-D clippy::empty-line-after-doc-comments` implied by `-D warnings`
1111
= help: to override `-D warnings` add `#[allow(clippy::empty_line_after_doc_comments)]`
12-
= help: if the empty line is unintentional remove it
12+
= help: if the empty line is unintentional, remove it
1313
help: if the comment should document the crate use an inner doc comment
1414
|
1515
LL ~ //! Meant to be an
@@ -24,9 +24,9 @@ LL | / /// for the module
2424
LL | |
2525
| |_^
2626
LL | fn first_in_module() {}
27-
| -------------------- the comment documents this function
27+
| ------------------ the comment documents this function
2828
|
29-
= help: if the empty line is unintentional remove it
29+
= help: if the empty line is unintentional, remove it
3030
help: if the comment should document the parent module use an inner doc comment
3131
|
3232
LL ~ //! Meant to be an
@@ -42,9 +42,9 @@ LL | |
4242
| |_^
4343
LL | /// Blank line
4444
LL | fn indented() {}
45-
| ------------- the comment documents this function
45+
| ----------- the comment documents this function
4646
|
47-
= help: if the empty line is unintentional remove it
47+
= help: if the empty line is unintentional, remove it
4848
help: if the documentation should include the empty line include it in the comment
4949
|
5050
LL | ///
@@ -57,9 +57,9 @@ LL | / /// This should produce a warning
5757
LL | |
5858
| |_^
5959
LL | fn with_doc_and_newline() {}
60-
| ------------------------- the comment documents this function
60+
| ----------------------- the comment documents this function
6161
|
62-
= help: if the empty line is unintentional remove it
62+
= help: if the empty line is unintentional, remove it
6363

6464
error: empty lines after doc comment
6565
--> tests/ui/empty_line_after/doc_comments.rs:44:1
@@ -72,9 +72,9 @@ LL | |
7272
| |_^
7373
...
7474
LL | fn three_attributes() {}
75-
| --------------------- the comment documents this function
75+
| ------------------- the comment documents this function
7676
|
77-
= help: if the empty lines are unintentional remove them
77+
= help: if the empty lines are unintentional, remove them
7878

7979
error: empty line after doc comment
8080
--> tests/ui/empty_line_after/doc_comments.rs:56:5
@@ -84,9 +84,9 @@ LL | | // fn old_code() {}
8484
LL | |
8585
| |_^
8686
LL | fn new_code() {}
87-
| ------------- the comment documents this function
87+
| ----------- the comment documents this function
8888
|
89-
= help: if the empty line is unintentional remove it
89+
= help: if the empty line is unintentional, remove it
9090
help: if the doc comment should not document `new_code` comment it out
9191
|
9292
LL | // /// docs for `old_code`
@@ -106,7 +106,7 @@ LL | |
106106
LL | struct Multiple;
107107
| --------------- the comment documents this struct
108108
|
109-
= help: if the empty lines are unintentional remove them
109+
= help: if the empty lines are unintentional, remove them
110110
help: if the doc comment should not document `Multiple` comment it out
111111
|
112112
LL ~ // /// Docs
@@ -126,9 +126,9 @@ LL | | */
126126
LL | |
127127
| |_^
128128
LL | fn first_in_module() {}
129-
| -------------------- the comment documents this function
129+
| ------------------ the comment documents this function
130130
|
131-
= help: if the empty line is unintentional remove it
131+
= help: if the empty line is unintentional, remove it
132132
help: if the comment should document the parent module use an inner doc comment
133133
|
134134
LL | /*!
@@ -145,9 +145,9 @@ LL | |
145145
| |_^
146146
...
147147
LL | fn new_code() {}
148-
| ------------- the comment documents this function
148+
| ----------- the comment documents this function
149149
|
150-
= help: if the empty line is unintentional remove it
150+
= help: if the empty line is unintentional, remove it
151151
help: if the doc comment should not document `new_code` comment it out
152152
|
153153
LL - /**
@@ -163,13 +163,24 @@ LL | |
163163
| |_^
164164
LL | /// Docs for `new_code2`
165165
LL | fn new_code2() {}
166-
| -------------- the comment documents this function
166+
| ------------ the comment documents this function
167167
|
168-
= help: if the empty line is unintentional remove it
168+
= help: if the empty line is unintentional, remove it
169169
help: if the doc comment should not document `new_code2` comment it out
170170
|
171171
LL | // /// Docs for `old_code2`
172172
| ++
173173

174-
error: aborting due to 10 previous errors
174+
error: empty line after doc comment
175+
--> tests/ui/empty_line_after/doc_comments.rs:152:5
176+
|
177+
LL | / /// comment on assoc item
178+
LL | |
179+
| |_^
180+
LL | fn bar() {}
181+
| ------ the comment documents this function
182+
|
183+
= help: if the empty line is unintentional, remove it
184+
185+
error: aborting due to 11 previous errors
175186

‎src/tools/clippy/tests/ui/empty_line_after/outer_attribute.stderr

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ LL | / #[crate_type = "lib"]
55
LL | |
66
| |_^
77
LL | fn first_in_crate() {}
8-
| ------------------- the attribute applies to this function
8+
| ----------------- the attribute applies to this function
99
|
1010
= note: `-D clippy::empty-line-after-outer-attr` implied by `-D warnings`
1111
= help: to override `-D warnings` add `#[allow(clippy::empty_line_after_outer_attr)]`
12-
= help: if the empty line is unintentional remove it
12+
= help: if the empty line is unintentional, remove it
1313
help: if the attribute should apply to the crate use an inner attribute
1414
|
1515
LL | #![crate_type = "lib"]
@@ -23,9 +23,9 @@ LL | |
2323
| |_^
2424
LL | /// some comment
2525
LL | fn with_one_newline_and_comment() {}
26-
| --------------------------------- the attribute applies to this function
26+
| ------------------------------- the attribute applies to this function
2727
|
28-
= help: if the empty line is unintentional remove it
28+
= help: if the empty line is unintentional, remove it
2929

3030
error: empty line after outer attribute
3131
--> tests/ui/empty_line_after/outer_attribute.rs:23:1
@@ -34,9 +34,9 @@ LL | / #[inline]
3434
LL | |
3535
| |_^
3636
LL | fn with_one_newline() {}
37-
| --------------------- the attribute applies to this function
37+
| ------------------- the attribute applies to this function
3838
|
39-
= help: if the empty line is unintentional remove it
39+
= help: if the empty line is unintentional, remove it
4040

4141
error: empty lines after outer attribute
4242
--> tests/ui/empty_line_after/outer_attribute.rs:30:5
@@ -46,9 +46,9 @@ LL | |
4646
LL | |
4747
| |_^
4848
LL | fn with_two_newlines() {}
49-
| ---------------------- the attribute applies to this function
49+
| -------------------- the attribute applies to this function
5050
|
51-
= help: if the empty lines are unintentional remove them
51+
= help: if the empty lines are unintentional, remove them
5252
help: if the attribute should apply to the parent module use an inner attribute
5353
|
5454
LL | #![crate_type = "lib"]
@@ -63,7 +63,7 @@ LL | |
6363
LL | enum Baz {
6464
| -------- the attribute applies to this enum
6565
|
66-
= help: if the empty line is unintentional remove it
66+
= help: if the empty line is unintentional, remove it
6767

6868
error: empty line after outer attribute
6969
--> tests/ui/empty_line_after/outer_attribute.rs:45:1
@@ -74,7 +74,7 @@ LL | |
7474
LL | struct Foo {
7575
| ---------- the attribute applies to this struct
7676
|
77-
= help: if the empty line is unintentional remove it
77+
= help: if the empty line is unintentional, remove it
7878

7979
error: empty line after outer attribute
8080
--> tests/ui/empty_line_after/outer_attribute.rs:53:1
@@ -85,7 +85,7 @@ LL | |
8585
LL | mod foo {}
8686
| ------- the attribute applies to this module
8787
|
88-
= help: if the empty line is unintentional remove it
88+
= help: if the empty line is unintentional, remove it
8989

9090
error: empty line after outer attribute
9191
--> tests/ui/empty_line_after/outer_attribute.rs:58:1
@@ -95,9 +95,9 @@ LL | | // Still lint cases where the empty line does not immediately follow the
9595
LL | |
9696
| |_^
9797
LL | fn comment_before_empty_line() {}
98-
| ------------------------------ the attribute applies to this function
98+
| ---------------------------- the attribute applies to this function
9999
|
100-
= help: if the empty line is unintentional remove it
100+
= help: if the empty line is unintentional, remove it
101101

102102
error: empty lines after outer attribute
103103
--> tests/ui/empty_line_after/outer_attribute.rs:64:1
@@ -107,9 +107,9 @@ LL | / #[allow(unused)]
107107
LL | |
108108
| |_^
109109
LL | pub fn isolated_comment() {}
110-
| ------------------------- the attribute applies to this function
110+
| ----------------------- the attribute applies to this function
111111
|
112-
= help: if the empty lines are unintentional remove them
112+
= help: if the empty lines are unintentional, remove them
113113

114114
error: aborting due to 9 previous errors
115115

‎src/tools/clippy/tests/ui/suspicious_doc_comments.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![allow(unused)]
22
#![warn(clippy::suspicious_doc_comments)]
3+
#![allow(clippy::empty_line_after_doc_comments)]
34

45
//! Real module documentation.
56
//! Fake module documentation.

‎src/tools/clippy/tests/ui/suspicious_doc_comments.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![allow(unused)]
22
#![warn(clippy::suspicious_doc_comments)]
3+
#![allow(clippy::empty_line_after_doc_comments)]
34

45
//! Real module documentation.
56
///! Fake module documentation.

‎src/tools/clippy/tests/ui/suspicious_doc_comments.stderr

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: this is an outer doc comment and does not apply to the parent module or crate
2-
--> tests/ui/suspicious_doc_comments.rs:5:1
2+
--> tests/ui/suspicious_doc_comments.rs:6:1
33
|
44
LL | ///! Fake module documentation.
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -12,7 +12,7 @@ LL | //! Fake module documentation.
1212
|
1313

1414
error: this is an outer doc comment and does not apply to the parent module or crate
15-
--> tests/ui/suspicious_doc_comments.rs:9:5
15+
--> tests/ui/suspicious_doc_comments.rs:10:5
1616
|
1717
LL | ///! This module contains useful functions.
1818
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ LL | //! This module contains useful functions.
2323
|
2424

2525
error: this is an outer doc comment and does not apply to the parent module or crate
26-
--> tests/ui/suspicious_doc_comments.rs:21:5
26+
--> tests/ui/suspicious_doc_comments.rs:22:5
2727
|
2828
LL | / /**! This module contains useful functions.
2929
LL | | */
@@ -36,7 +36,7 @@ LL + */
3636
|
3737

3838
error: this is an outer doc comment and does not apply to the parent module or crate
39-
--> tests/ui/suspicious_doc_comments.rs:35:5
39+
--> tests/ui/suspicious_doc_comments.rs:36:5
4040
|
4141
LL | / ///! This module
4242
LL | | ///! contains
@@ -51,7 +51,7 @@ LL ~ //! useful functions.
5151
|
5252

5353
error: this is an outer doc comment and does not apply to the parent module or crate
54-
--> tests/ui/suspicious_doc_comments.rs:43:5
54+
--> tests/ui/suspicious_doc_comments.rs:44:5
5555
|
5656
LL | / ///! a
5757
LL | | ///! b
@@ -64,7 +64,7 @@ LL ~ //! b
6464
|
6565

6666
error: this is an outer doc comment and does not apply to the parent module or crate
67-
--> tests/ui/suspicious_doc_comments.rs:51:5
67+
--> tests/ui/suspicious_doc_comments.rs:52:5
6868
|
6969
LL | ///! a
7070
| ^^^^^^
@@ -75,7 +75,7 @@ LL | //! a
7575
|
7676

7777
error: this is an outer doc comment and does not apply to the parent module or crate
78-
--> tests/ui/suspicious_doc_comments.rs:57:5
78+
--> tests/ui/suspicious_doc_comments.rs:58:5
7979
|
8080
LL | / ///! a
8181
LL | |
@@ -90,7 +90,7 @@ LL ~ //! b
9090
|
9191

9292
error: this is an outer doc comment and does not apply to the parent module or crate
93-
--> tests/ui/suspicious_doc_comments.rs:69:5
93+
--> tests/ui/suspicious_doc_comments.rs:70:5
9494
|
9595
LL | ///! Very cool macro
9696
| ^^^^^^^^^^^^^^^^^^^^
@@ -101,7 +101,7 @@ LL | //! Very cool macro
101101
|
102102

103103
error: this is an outer doc comment and does not apply to the parent module or crate
104-
--> tests/ui/suspicious_doc_comments.rs:76:5
104+
--> tests/ui/suspicious_doc_comments.rs:77:5
105105
|
106106
LL | ///! Huh.
107107
| ^^^^^^^^^

0 commit comments

Comments
 (0)
This repository has been archived.