@@ -55,6 +55,74 @@ error: expected one of `(`, `::`, `=>`, or `=`, found `!`
5555LL | cfg!() => {}
5656 | ^ expected one of `(`, `::`, `=>`, or `=`
5757
58+ error: doc comments are not allowed on `cfg_select` branches
59+ --> $DIR/cfg_select.rs:208:5
60+ |
61+ LL | /// doc comment
62+ | ^^^^^^^^^^^^^^^
63+
64+ error: doc comments are not allowed on `cfg_select` branches
65+ --> $DIR/cfg_select.rs:211:5
66+ |
67+ LL | /// doc comment
68+ | ^^^^^^^^^^^^^^^
69+
70+ error: attributes are not allowed on `cfg_select` branches
71+ --> $DIR/cfg_select.rs:217:5
72+ |
73+ LL | #[cfg(false)]
74+ | ^^^^^^^^^^^^^
75+
76+ error: an inner attribute is not permitted in this context
77+ --> $DIR/cfg_select.rs:224:5
78+ |
79+ LL | #![cfg(false)]
80+ | ^^^^^^^^^^^^^^
81+ |
82+ = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
83+ = note: outer attributes, like `#[test]`, annotate the item following them
84+
85+ error[E0753]: expected outer doc comment
86+ --> $DIR/cfg_select.rs:231:5
87+ |
88+ LL | //! inner doc comment
89+ | ^^^^^^^^^^^^^^^^^^^^^
90+ |
91+ = note: inner doc comments like this (starting with `//!` or `/*!`) can only appear before items
92+ help: you might have meant to write a regular comment
93+ |
94+ LL - //! inner doc comment
95+ LL + // inner doc comment
96+ |
97+
98+ error: doc comments are not allowed on `cfg_select` branches
99+ --> $DIR/cfg_select.rs:239:5
100+ |
101+ LL | /// line1
102+ | ^^^^^^^^^
103+ ...
104+ LL | /// line3
105+ | ^^^^^^^^^
106+
107+ error[E0753]: expected outer doc comment
108+ --> $DIR/cfg_select.rs:249:5
109+ |
110+ LL | //! inner doc comment
111+ | ^^^^^^^^^^^^^^^^^^^^^
112+ |
113+ = note: inner doc comments like this (starting with `//!` or `/*!`) can only appear before items
114+ help: you might have meant to write a regular comment
115+ |
116+ LL - //! inner doc comment
117+ LL + // inner doc comment
118+ |
119+
120+ error: doc comments are not allowed on `cfg_select` branches
121+ --> $DIR/cfg_select.rs:247:5
122+ |
123+ LL | /// outer doc comment
124+ | ^^^^^^^^^^^^^^^^^^^^^
125+
58126warning: unreachable configuration predicate
59127 --> $DIR/cfg_select.rs:136:5
60128 |
@@ -115,7 +183,7 @@ LL | cfg!() => {}
115183 = help: to expect this configuration use `--check-cfg=cfg(cfg)`
116184 = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
117185
118- error: aborting due to 9 previous errors; 7 warnings emitted
186+ error: aborting due to 17 previous errors; 7 warnings emitted
119187
120- Some errors have detailed explanations: E0537, E0539.
188+ Some errors have detailed explanations: E0537, E0539, E0753 .
121189For more information about an error, try `rustc --explain E0537`.
0 commit comments