about summary refs log tree commit diff
path: root/tests/ui/attributes/crate-only-as-outer.stderr
blob: 270f02af9873677eadbc4acc355feb87314b0d21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
error: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_name]`
  --> $DIR/crate-only-as-outer.rs:2:1
   |
LL | #[crate_name = "owo"]
   | ^^^^^^^^^^^^^^^^^^^^^
   |
note: This attribute does not have an `!`, which means it is applied to this function
  --> $DIR/crate-only-as-outer.rs:5:1
   |
LL | fn main() {}
   | ^^^^^^^^^^^^
note: the lint level is defined here
  --> $DIR/crate-only-as-outer.rs:1:9
   |
LL | #![deny(unused)]
   |         ^^^^^^
   = note: `#[deny(unused_attributes)]` implied by `#[deny(unused)]`

error: the `#![crate_name]` attribute can only be used at the crate root
  --> $DIR/crate-only-as-outer.rs:8:5
   |
LL |     #![crate_name = "iwi"]
   |     ^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors