Make more informative error on outer attr after inner

This commit is contained in:
Evgenii P 2019-07-27 16:45:45 +07:00
parent 09e3989758
commit 8b3f28cf0f
2 changed files with 37 additions and 17 deletions

View file

@ -1,8 +1,11 @@
error: an inner attribute is not permitted following an outer attribute
--> $DIR/inner-attr.rs:3:3
--> $DIR/inner-attr.rs:3:1
|
LL | #[feature(lang_items)]
| ---------------------- previous outer attribute
LL |
LL | #![recursion_limit="100"]
| ^
| ^^^^^^^^^^^^^^^^^^^^^^^^^ not permitted following an outer attibute
|
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.