Commit Graph

12 Commits

Author SHA1 Message Date
David Tolnay
5d30180634
Handle rustc_const_stable attribute in library feature collector 2022-03-31 12:34:46 -07:00
Cameron Steffen
45db716902 Replace NestedVisitorMap with NestedFilter 2022-01-16 16:02:36 -06:00
Jakub Beránek
047275a682
Add Attribute::meta_kind 2021-12-26 16:56:34 +01:00
Peter Jaszkowiak
c4bafafac1 Remove in_band_lifetimes for rustc_passes 2021-12-15 20:12:53 -07:00
Camille GILLOT
877b2d79d9 Remove eval_always for lib_features. 2021-11-28 21:13:36 +01:00
Camille GILLOT
7ec973d9ce Stop using walk_crate. 2021-09-02 19:08:58 +02:00
inquisitivecrystal
8c62fa0575 Treat macros as HIR items 2021-08-28 00:16:34 -07:00
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
Camille GILLOT
437a46ddfa Use () for lang items. 2021-05-12 13:58:45 +02:00
Camille GILLOT
27ef0eeaa4 Track HirId when visiting attributes. 2021-03-09 19:27:59 +01:00
Esteban Küber
4cb089bb54 Inherit #[stable(..)] annotations in enum variants and fields from its item 2021-02-10 19:10:14 -08:00
mark
9e5f7d5631 mv compiler to compiler/ 2020-08-30 18:45:07 +03:00