rust/compiler/rustc_interface/src
Aaron Hill af46699f81
Remove Session.used_attrs and move logic to CheckAttrVisitor
Instead of updating global state to mark attributes as used,
we now explicitly emit a warning when an attribute is used in
an unsupported position. As a side effect, we are to emit more
detailed warning messages (instead of just a generic "unused" message).

`Session.check_name` is removed, since its only purpose was to mark
the attribute as used. All of the callers are modified to use
`Attribute.has_name`

Additionally, `AttributeType::AssumedUsed` is removed - an 'assumed
used' attribute is implemented by simply not performing any checks
in `CheckAttrVisitor` for a particular attribute.

We no longer emit unused attribute warnings for the `#[rustc_dummy]`
attribute - it's an internal attribute used for tests, so it doesn't
mark sense to treat it as 'unused'.

With this commit, a large source of global untracked state is removed.
2021-08-21 13:27:27 -05:00
..
callbacks.rs Fix outdated crate names in rustc_interface::callbacks 2021-04-07 11:45:27 -05:00
interface.rs Move OnDiskCache to rustc_query_impl. 2021-07-18 11:14:07 +02:00
lib.rs Don't use a generator for BoxedResolver 2021-06-08 19:24:17 +02:00
passes.rs Replace #[plugin_registrar] with exporting __rustc_plugin_registrar 2021-08-10 14:20:48 +02:00
proc_macro_decls.rs Use () for proc_macro_decls_static. 2021-05-12 13:58:43 +02:00
queries.rs Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00
tests.rs Add back -Zno-profiler-runtime 2021-08-04 10:47:59 +01:00
util.rs Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00