Nicholas Nethercote
99472c7049
Remove Session
methods that duplicate DiagCtxt
methods.
...
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier
access.
2023-12-24 08:05:28 +11:00
Michael Goulet
2d187d54fd
Store feature stability un-split
2023-11-20 19:11:26 +00:00
Michael Goulet
86299a1247
Unify defined_lib_features and lib_features queries
2023-11-20 19:08:16 +00:00
David Tolnay
ac4fa3f245
Pre-intern a symbol for env!("CFG_RELEASE")
2023-10-26 02:02:22 -07:00
Michael Goulet
b2d2184ede
Format all the let chains in compiler
2023-10-13 08:59:36 +00:00
John Kåre Alsaker
fff20a703d
Move expansion of query macros in rustc_middle to rustc_middle::query
2023-05-15 08:49:13 +02:00
Vadim Petrochenkov
a9c8a5c025
ast: Optimize list and value extraction primitives for attributes
...
It's not necessary to convert the whole attribute into a meta item to extract something specific
2023-02-01 22:35:02 +04:00
Ezra Shaw
be1a6db9f8
fix: don't emit E0711
if staged_api
not enabled
2023-01-14 22:04:42 +13:00
Nathan Stocks
c457abee2e
migrate lib_features.rs to translateable diagnostics
2022-10-07 13:19:27 -06:00
est31
3a38d566bd
Also replace the placeholder for the stable_features lint
2022-09-14 03:28:54 +02:00
est31
0c4ec5df58
Also replace the version placeholder in rustc_attr
...
This fixes rustdoc not showing the current version as stabilization version
for recently stabilized lang features.
2022-09-02 01:47:01 +02:00
est31
7a5b1d7939
Expand the version placeholder to the current version in stability attribute parsing
...
That way, the current version is shown in rustdoc etc.
2022-08-27 17:08:52 +02:00
Maybe Waffle
9015a5110f
Collect features from #[rustc_default_body_unstable]
2022-07-26 15:38:10 +04:00
David Wood
e5872990d1
passes: check implied feature exists
...
Add a check confirming that features referenced in `implied_by` meta
items actually exist.
Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-20 15:50:59 +01:00
David Wood
6f0b8f1a4b
attr/passes: comment -> doc comment
...
Change some regular comments into documentation comments.
Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-20 11:29:56 +01:00
Nicholas Nethercote
c9e97251ad
Remove unused hir_id
arg from visit_attribute
.
2022-06-16 09:52:04 +10:00
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