You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting the following error when attempting to use an inner attribute in a file that gets called by include!.
error: an inner attribute is not permitted in this context
--> test.rs:1:3
|
1 | #![cfg_attr(rustfmt, rustfmt_skip)]
| ^
|
= 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.
Duplicate of #18810, which was closed in favour of rust-lang/rfcs#752. In some situation you can work around this by having a #[path="test.rs"] mod foo;` (if I remember the syntax correctly).
Getting the following error when attempting to use an inner attribute in a file that gets called by
include!
.Example
test.rs
main.rs
The text was updated successfully, but these errors were encountered: