rust/src/test/ui/conditional-compilation
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
..
auxiliary Remove licenses 2018-12-25 21:08:33 -07:00
cfg-arg-invalid-1.rs
cfg-arg-invalid-1.stderr fix tests 2019-04-14 10:01:32 +02:00
cfg-arg-invalid-2.rs
cfg-arg-invalid-2.stderr fix tests 2019-04-14 10:01:32 +02:00
cfg-arg-invalid-3.rs
cfg-arg-invalid-3.stderr fix tests 2019-04-14 10:01:32 +02:00
cfg-arg-invalid-4.rs
cfg-arg-invalid-4.stderr fix tests 2019-04-14 10:01:32 +02:00
cfg-arg-invalid-5.rs
cfg-arg-invalid-5.stderr fix tests 2019-04-14 10:01:32 +02:00
cfg-arg-invalid-6.rs Hide diagnostics emitted during --cfg parsing 2019-09-15 17:39:38 -04:00
cfg-arg-invalid-6.stderr Hide diagnostics emitted during --cfg parsing 2019-09-15 17:39:38 -04:00
cfg-attr-cfg-2.rs Remove licenses 2018-12-25 21:08:33 -07:00
cfg-attr-cfg-2.stderr Provide a span if main function is not present in crate 2019-09-14 11:27:45 -04:00
cfg-attr-crate-2.rs --bless some tests due to message format change. 2019-08-23 01:42:05 +02:00
cfg-attr-crate-2.stderr --bless --compare-mode=nll 2020-02-09 20:43:49 +01:00
cfg-attr-empty-is-unused.rs Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00
cfg-attr-empty-is-unused.stderr Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00
cfg-attr-invalid-predicate.rs Do not abort compilation if expansion produces errors 2018-12-27 15:51:36 +03:00
cfg-attr-invalid-predicate.stderr Update tests 2019-03-11 23:10:26 +03:00
cfg-attr-multi-false.rs Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
cfg-attr-multi-invalid-1.rs --bless some tests due to message format change. 2019-08-23 01:42:05 +02:00
cfg-attr-multi-invalid-1.stderr --bless --compare-mode=nll 2020-02-09 20:43:49 +01:00
cfg-attr-multi-invalid-2.rs --bless some tests due to message format change. 2019-08-23 01:42:05 +02:00
cfg-attr-multi-invalid-2.stderr --bless --compare-mode=nll 2020-02-09 20:43:49 +01:00
cfg-attr-multi-true.rs report kind of deprecated item in message 2020-07-26 13:58:31 -04:00
cfg-attr-multi-true.stderr More precise spans for HIR paths 2021-03-15 22:13:45 +03:00
cfg-attr-parse.rs cfg_attr: avoid .outer_tokens 2019-12-06 20:37:59 +01:00
cfg-attr-parse.stderr Modify structured suggestion output 2021-08-11 09:46:24 +00:00
cfg-attr-syntax-validation.rs Expand NtExpr tokens only in key-value attributes 2020-11-03 00:53:43 +03:00
cfg-attr-syntax-validation.stderr Show macro name in 'this error originates in macro' message 2021-05-12 19:03:06 -04:00
cfg-attr-unknown-attribute-macro-expansion.rs resolve: Tweak "cannot find" wording for attributes 2019-09-15 13:10:12 +03:00
cfg-attr-unknown-attribute-macro-expansion.stderr Show macro name in 'this error originates in macro' message 2021-05-12 19:03:06 -04:00
cfg-empty-codemap.rs Remove licenses 2018-12-25 21:08:33 -07:00
cfg-empty-codemap.stderr fix tests 2019-04-14 10:01:32 +02:00
cfg-generic-params.rs resolve: Tweak "cannot find" wording for attributes 2019-09-15 13:10:12 +03:00
cfg-generic-params.stderr resolve: Do not put macros into module.unexpanded_invocations unless necessary 2020-11-22 14:42:29 +03:00
cfg-in-crate-1.rs Remove licenses 2018-12-25 21:08:33 -07:00
cfg-in-crate-1.stderr Provide a span if main function is not present in crate 2019-09-14 11:27:45 -04:00
cfg-non-opt-expr.rs Remove licenses 2018-12-25 21:08:33 -07:00
cfg-non-opt-expr.stderr Remove licenses 2018-12-25 21:08:33 -07:00
cfg_accessible-input-validation.rs builtin_macros: Add attribute macro #[cfg_accessible(path)] 2020-03-10 01:02:13 +03:00
cfg_accessible-input-validation.stderr builtin_macros: Add attribute macro #[cfg_accessible(path)] 2020-03-10 01:02:13 +03:00
cfg_accessible-stuck.rs expand: Tell built-in macros whether we are currently in forced expansion mode 2020-11-19 19:25:20 +03:00
cfg_accessible-stuck.stderr expand: Tell built-in macros whether we are currently in forced expansion mode 2020-11-19 19:25:20 +03:00
cfg_accessible-unstable.rs builtin_macros: Add attribute macro #[cfg_accessible(path)] 2020-03-10 01:02:13 +03:00
cfg_accessible-unstable.stderr builtin_macros: Add attribute macro #[cfg_accessible(path)] 2020-03-10 01:02:13 +03:00
cfg_accessible.rs builtin_macros: Add attribute macro #[cfg_accessible(path)] 2020-03-10 01:02:13 +03:00
cfg_accessible.stderr builtin_macros: Add attribute macro #[cfg_accessible(path)] 2020-03-10 01:02:13 +03:00
cfg_attr_path.rs compiletest: Remove skip-codegen 2019-06-16 12:23:22 +03:00
inner-cfg-non-inline-mod.rs expand: Resolve and expand inner attributes on out-of-line modules 2021-03-14 18:10:29 +03:00
module_with_cfg.rs expand: Resolve and expand inner attributes on out-of-line modules 2021-03-14 18:10:29 +03:00
test-cfg.rs Move some UI tests to more suitable subdirs 2021-06-30 06:41:10 +09:00
test-cfg.stderr Move some UI tests to more suitable subdirs 2021-06-30 06:41:10 +09:00