rust/compiler/rustc_middle/src/middle
bors f66e825f73 Auto merge of #87739 - Aaron1011:remove-used-attrs, r=wesleywiser
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-24 03:58:22 +00:00
..
codegen_fn_attrs.rs rustc: Fill out remaining parts of C-unwind ABI 2021-08-03 07:06:19 -07:00
cstore.rs Rollup merge of #87092 - ricobbe:fix-raw-dylib-multiple-definitions, r=petrochenkov 2021-07-18 14:21:56 +09:00
dependency_format.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
exported_symbols.rs Revert "Revert "Merge CrateDisambiguator into StableCrateId"" 2021-07-06 11:28:04 +02:00
lang_items.rs don't take TyCtxt by reference 2020-09-18 20:49:25 +02:00
limits.rs Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00
mod.rs Query-ify global limit attribute handling 2021-07-04 12:33:14 -05:00
privacy.rs rustc: Replace HirIds with LocalDefIds in AccessLevels tables 2021-07-31 19:31:29 +03:00
region.rs Rollup merge of #88230 - steffahn:a_an, r=oli-obk 2021-08-23 20:45:49 +02:00
resolve_lifetime.rs improve diagnosts for GATs 2021-05-11 14:09:46 +02:00
stability.rs rustc: Replace HirIds with LocalDefIds in AccessLevels tables 2021-07-31 19:31:29 +03:00