Skip to content

Commit 0fc6be7

Browse files
committed
Adjust tests/ui/attr-bad-crate-attr.rs
- Move `tests/ui/attr-bad-crate-attr.rs` to `tests/ui/attributes/`. - Briefly document test intent add link to relevant Reference docs.
1 parent 4ca2d9f commit 0fc6be7

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Diff for: tests/ui/attr-bad-crate-attr.rs

-4
This file was deleted.

Diff for: tests/ui/attributes/attr-bad-crate-attr.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//! Check that we permit a crate-level inner attribute but reject a dangling outer attribute which
2+
//! does not have a following thing that it can target.
3+
//!
4+
//! See <https://doc.rust-lang.org/reference/attributes.html>.
5+
6+
//@ error-pattern: expected item
7+
8+
#![attr = "val"]
9+
#[attr = "val"] // Unterminated

Diff for: tests/ui/attr-bad-crate-attr.stderr renamed to tests/ui/attributes/attr-bad-crate-attr.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: expected item after attributes
2-
--> $DIR/attr-bad-crate-attr.rs:4:1
2+
--> $DIR/attr-bad-crate-attr.rs:9:1
33
|
44
LL | #[attr = "val"] // Unterminated
55
| ^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)