Unsafe code in submodules

How I can disallow unsafe keywords in submodules?

1 Like

https://play.rust-lang.org/?gist=2fd117d57fceec72bf5c4dc97347d59f&version=stable&mode=debug&edition=2015

1 Like

I need a deny placed outside the submodule, and that this deny can not be overridden inside the module in any way. Is it possible?

it should work like this.

In your code, import your submodule like this:

#[forbid(unsafe_code)]
mod foo;
1 Like

Thank you very much)
I work on my own super safe kernel, and this feature very needed

One more question. Is it possible to prohibit the use of “extern crate” in the submodule?