rust/src/test/ui/invalid
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
..
invalid-crate-type.rs Remove licenses 2018-12-25 21:08:33 -07:00
invalid-crate-type.stderr normalize use of backticks in compiler messages for librustc/lint 2019-07-17 22:49:48 +02:00
invalid-inline.rs Remove licenses 2018-12-25 21:08:33 -07:00
invalid-inline.stderr hide --explain hint if error has no extended info 2019-04-18 13:29:28 -04:00
invalid-llvm-passes.rs Support -C passes in NewPM 2021-05-08 10:58:08 +02:00
invalid-llvm-passes.stderr Support -C passes in NewPM 2021-05-08 10:58:08 +02:00
invalid-macro-matcher.rs Remove licenses 2018-12-25 21:08:33 -07:00
invalid-macro-matcher.stderr Update tests 2019-03-11 23:10:26 +03:00
invalid-no-sanitize.rs Selectively disable sanitizer instrumentation 2020-02-05 23:30:38 +01:00
invalid-no-sanitize.stderr HWASan support 2021-02-07 23:48:58 -08:00
invalid-path-in-const.rs Remove licenses 2018-12-25 21:08:33 -07:00
invalid-path-in-const.stderr Tweak spans for E0599 2019-03-23 13:05:29 -07:00
invalid-plugin-attr.rs Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00
invalid-plugin-attr.stderr Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00
invalid-rustc_legacy_const_generics-arguments.rs Improve checking for attribute 2021-02-25 09:04:43 +00:00
invalid-rustc_legacy_const_generics-arguments.stderr Improve checking for attribute 2021-02-25 09:04:43 +00:00
invalid_rustc_layout_scalar_valid_range.rs Use delay_span_bug instead of panic in layout_scalar_valid_range 2021-03-16 00:00:00 +00:00
invalid_rustc_layout_scalar_valid_range.stderr Use delay_span_bug instead of panic in layout_scalar_valid_range 2021-03-16 00:00:00 +00:00