summary refs log tree commit diff
path: root/compiler/rustc_passes/src/stability.rs
AgeCommit message (Collapse)AuthorLines
2022-03-30Addressed comments by @compiler-errors and @bjorn3Yuri Astrakhan-1/+1
2022-03-30Spellchecking compiler commentsYuri Astrakhan-3/+3
This PR cleans up the rest of the spelling mistakes in the compiler comments. This PR does not change any literal or code spelling issues.
2022-03-16rustc_error: make ErrorReported impossible to constructmark-3/+3
There are a few places were we have to construct it, though, and a few places that are more invasive to change. To do this, we create a constructor with a long obvious name.
2022-03-09Permit `#[deprecated]` in stdlibJacob Pratt-1/+1
2022-03-03Make unknown feature error deterministic.Camille GILLOT-3/+3
2022-03-03Gate stability attrs with other attributes.Camille GILLOT-56/+9
2022-03-03Move query providers.Camille GILLOT-1/+10
2022-03-03Remove useless map.Camille GILLOT-9/+5
2022-03-03Move the set of features to the `features` query.Camille GILLOT-11/+0
2022-02-24Auto merge of #94129 - cjgillot:rmeta-table, r=petrochenkovbors-10/+8
Back more metadata using per-query tables r? `@ghost`
2022-02-19Adopt let else in more placesest31-7/+3
2022-02-19Stop interning stability.Camille GILLOT-10/+8
2022-02-03Require const stability on all stable const itemsJacob Pratt-18/+18
This was supposed to be the case previously, but a missed method call meant that trait impls were not checked.
2022-01-16Replace NestedVisitorMap with NestedFilterCameron Steffen-17/+11
2022-01-15Return a LocalDefId in get_parent_item.Camille GILLOT-1/+1
2022-01-07Add `trait_item_def_id` to `AssocItem`Matthew Jasper-13/+6
This allows avoiding some lookups by name
2021-12-15Remove `in_band_lifetimes` for `rustc_passes`Peter Jaszkowiak-3/+3
2021-11-28Remove eval_always for lib_features.Camille GILLOT-1/+1
2021-09-29Avoid more invocations of hir_crate query.Camille GILLOT-2/+1
2021-09-16delay error for enabling unstable lib featuresVishad Goyal-0/+10
If #![feature] is used outside the nightly channel for only lib features, the check will be delayed to the stability pass after parsing. This is done so that appropriate help messages can be shown if the #![feature] has been used needlessly
2021-09-02Rename walk_crate.Camille GILLOT-2/+2
2021-09-02Stop using walk_crate.Camille GILLOT-5/+5
2021-08-28Treat macros as HIR itemsinquisitivecrystal-18/+0
2021-08-21Remove `Session.used_attrs` and move logic to `CheckAttrVisitor`Aaron Hill-2/+1
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-07-31rustc: Replace `HirId`s with `LocalDefId`s in `AccessLevels` tablesVadim Petrochenkov-47/+45
and passes using them - primarily privacy checking, stability checking and dead code checking. WIP
2021-07-25Introduce OwnerNode::Crate.Camille GILLOT-2/+2
2021-07-12Auto merge of #86320 - hi-rustin:rustin-patch-fix-span, r=estebankbors-1/+2
shrinking the deprecated span ref: https://github.com/rust-lang/rust/pull/85617#issuecomment-854947988 part of #85403 r? `@estebank` The reason is that if we use method_span directly, it will cause the in_derive_expansion judgment to fail.
2021-07-08fn must be const if marked with stability attributLamb-1/+60
remove trailing newline fix: test with attribute but missing const Update compiler/rustc_passes/src/stability.rs Co-authored-by: Léo Lanteri Thauvin <leseulartichaut@gmail.com> Add test for extern functions fix: using span_help instead of span_suggestion add test for some ABIs + fmt fix Update compiler/rustc_passes/src/stability.rs Co-authored-by: Léo Lanteri Thauvin <leseulartichaut@gmail.com> Refractor and add test for `impl const` Add test to make sure no output + cleanup condition ----------------------------- remove stdcall test, failing CI test C abi is already tested in this, so it is not that useful to test another one. The tested code is blind to which specific ABI for now, as long as it's not an intrinsic one
2021-07-01Rename all_crate_nums query to crates and remove useless wrapperbjorn3-1/+1
2021-06-15Use last segmenthi-rustin-4/+1
2021-06-15shrinking the deprecated method spanhi-rustin-1/+5
2021-06-14Use the now available implementation of `IntoIterator` for arraysLeSeulArtichaut-1/+1
2021-06-04Revert "shrinking the deprecated method span"Rich Kadel-5/+1
2021-06-02Address commenthi-rustin-4/+3
2021-05-25Address commenthi-rustin-4/+1
2021-05-24shrinking the deprecated method spanhi-rustin-1/+9
2021-05-12Use () for lang items.Camille GILLOT-6/+2
2021-05-12Use () for privacy.Camille GILLOT-1/+1
2021-05-07shrinking the deprecated method spanhi-rustin-3/+3
2021-03-30Remove hir::CrateItem.Camille GILLOT-2/+2
2021-03-26Use iter::zip in compiler/Josh Stone-1/+2
2021-03-23Some refactoringvarkor-4/+3
2021-03-16ast/hir: Rename field-related structuresVadim Petrochenkov-5/+5
StructField -> FieldDef ("field definition") Field -> ExprField ("expression field", not "field expression") FieldPat -> PatField ("pattern field", not "field pattern") Also rename visiting and other methods working on them.
2021-03-09Remove hir::Item::attrs.Camille GILLOT-1/+2
2021-03-09Access attrs directly from HirId in rustc_passes::stability.Camille GILLOT-12/+1
2021-03-05Auto merge of #71481 - estebank:inherit-stability, r=nikomatsakisbors-24/+52
Inherit `#[stable(..)]` annotations in enum variants and fields from its item Lint changes for #65515. The stdlib will have to be updated once this lands in beta and that version is promoted in master.
2021-02-15Only store a LocalDefId in hir::MacroDef.Camille GILLOT-2/+2
2021-02-15Only store a LocalDefId in hir::ForeignItem.Camille GILLOT-2/+2
2021-02-15Only store a LocalDefId in hir::ImplItem.Camille GILLOT-3/+3
2021-02-15Only store a LocalDefId in hir::TraitItem.Camille GILLOT-2/+2