e78d78868a
Forbid cannot be overriden. When someome tries to do this anyways, it results in a hard error. That makes sense. Except it doesn't, because macros. Macros may reasonably use `#[deny]` in their expansion to assert that their expanded code follows the lint. This is doesn't work when the output gets expanded into a `forbid()` context. This is pretty silly, since both the macros and the code agree on the lint! Therefore, we allow `#[deny(..)]`ing a lint that's already forbidden, keeping the level at forbid.
8 lines
117 B
Rust
8 lines
117 B
Rust
#[macro_export]
|
|
macro_rules! emit_deny {
|
|
() => {
|
|
#[deny(unsafe_code)]
|
|
let _so_safe = 0;
|
|
};
|
|
}
|