Closed
Description
// test.rs
pub mod included {
include!("test_included.rs")
}
fn main() {}
// test_included.rs
#![allow(dead_code)]
pub fn foo() {}
$ rustc test.rs
test_included.rs:3:3: 3:4 error: an inner attribute is not permitted in this context
test_included.rs:3 #![allow(dead_code)]
^
error: aborting due to previous error
I at first thought that the problem was due to the implicit insert of the prelude in the included
module. However, adding a #[no_implicit_prelude]
attribute does not help.
Metadata
Metadata
Assignees
Labels
No labels