about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/coverage
diff options
context:
space:
mode:
authorAaron Hill <aa1ronham@gmail.com>2021-07-14 19:51:45 -0500
committerAaron Hill <aa1ronham@gmail.com>2021-07-19 17:49:28 -0500
commit070df9e676d8f32b424484cdabca612c8b392020 (patch)
treed91f0af2afb26c3a3f070e4fe608234591d565a4 /compiler/rustc_mir/src/transform/coverage
parent8df945c4717ffaf923b57bf30c473df6fc98bc85 (diff)
downloadrust-070df9e676d8f32b424484cdabca612c8b392020.tar.gz
rust-070df9e676d8f32b424484cdabca612c8b392020.zip
Warn on inert attributes used on bang macro invocation
These attributes are currently discarded.
This may change in the future (see #63221), but for now,
placing inert attributes on a macro invocation does nothing,
so we should warn users about it.

Technically, it's possible for there to be attribute macro
on the same macro invocation (or at a higher scope), which
inspects the inert attribute. For example:

```rust
#[look_for_inline_attr]
#[inline]
my_macro!()

#[look_for_nested_inline]
mod foo { #[inline] my_macro!() }
```

However, this would be a very strange thing to do.
Anyone running into this can manually suppress the warning.
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage')
0 files changed, 0 insertions, 0 deletions