Open
Description
Issue by dwrensha
Sunday Nov 09, 2014 at 14:25 GMT
For earlier discussion, see rust-lang/rust#18810
This issue was labelled with: in the Rust repository
// 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.