]> git.proxmox.com Git - rustc.git/blame - src/test/ui/parser/issues/issue-30318.fixed
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / parser / issues / issue-30318.fixed
CommitLineData
c295e0f8
XL
1// run-rustfix
2#![allow(unused)]
3fn foo() { }
4
5/// Misplaced comment...
6//~^ ERROR expected outer doc comment
7fn bar() { } //~ NOTE the inner doc comment doesn't annotate this function
8
9#[test] //~ ERROR an inner attribute is not permitted in this context
10fn baz() { } //~ NOTE the inner attribute doesn't annotate this function
11//~^^ NOTE inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually
12
13/** Misplaced comment... */
14//~^ ERROR expected outer doc comment
15fn bat() { } //~ NOTE the inner doc comment doesn't annotate this function
16
17fn main() { }
18
19// Misplaced comment...
20//~^ ERROR expected outer doc comment
21//~| NOTE inner doc comments like this (starting with `//!` or `/*!`) can only appear before items
22//~| NOTE other attributes here
23/* Misplaced comment... */
24//~^ ERROR expected outer doc comment
25//~| NOTE this doc comment doesn't document anything
26//~| ERROR expected item after doc comment
27//~| NOTE inner doc comments like this (starting with `//!` or `/*!`) can only appear before items