summary refs log tree commit diff
path: root/compiler/rustc_passes/src/stability.rs
AgeCommit message (Collapse)AuthorLines
2023-08-15Rollup merge of #114772 - fee1-dead-contrib:typed-did, r=b-naberGuillaume Gomez-2/+2
Add `{Local}ModDefId` to more strongly type DefIds` Based on #110862 by `@Nilstrieb`
2023-08-14Use `{Local}ModDefId` in many queriesNilstrieb-2/+2
2023-08-11rustc: Move `features` from `Session` to `GlobalCtxt`Vadim Petrochenkov-1/+1
Removes two pieces of mutable state. Follow up to #114622.
2023-08-06lower impl const to bind to host effect paramDeadbeef-8/+2
2023-07-12Re-format let-else per rustfmt updateMark Rousskov-1/+3
2023-05-24Use `is_some_and`/`is_ok_and` in less obvious spotsMaybe Waffle-9/+6
2023-05-24Use `Option::is_some_and` and `Result::is_ok_and` in the compilerMaybe Waffle-5/+3
2023-05-15Move expansion of query macros in rustc_middle to rustc_middle::queryJohn Kåre Alsaker-1/+2
2023-04-26Migrate `rustc_passes` to translatable diagnosticsclubby789-27/+15
2023-04-09Migrate `sess.opts.tests` uses to `sess.is_test_crate()`blyxyas-1/+1
2023-03-23Separate find_*_stability.Camille GILLOT-3/+5
2023-03-21Use local key in providersMichael Goulet-8/+4
2023-03-06Rollup merge of #107801 - davidtwco:stability-implies-const, r=NilstriebMatthias Krüger-0/+9
const_eval: `implies_by` in `rustc_const_unstable` Fixes #107605. Extend support for `implies_by` (from `#[stable]` and `#[unstable]`) to `#[rustc_const_stable]` and `#[rustc_const_unstable]`. cc ``@steffahn``
2023-02-26Rollup merge of #108449 - fee1-dead-contrib:do_not_lint_unresolved, ↵Matthias Krüger-1/+4
r=compiler-errors Do not lint ineffective unstable trait impl for unresolved trait
2023-02-25Do not lint unresolved trait for ineffective unstable trait implDeadbeef-1/+4
2023-02-22diagnostics: if AssocFn has self argument, describe as methodMichael Howell-2/+2
Discussed in https://rust-lang.zulipchat.com/#narrow/stream/147480-t-compiler.2Fwg-diagnostics/topic/.22associated.20function.22.20vs.20.22method.22/near/329265515 This commit also changes the tooltips on rustdoc intra-doc links targeting methods.
2023-02-19Auto merge of #108128 - clubby789:builtin-derived-attr, r=jackh726bors-1/+1
Properly check for builtin derived code Fixes #108122
2023-02-16Properly check for builtin derivesclubby789-1/+1
2023-02-16Replace some `then`s with some `then_some`sMaybe Waffle-1/+1
2023-02-16`if $c:expr { Some($r:expr) } else { None }` =>> `$c.then(|| $r)`Maybe Waffle-1/+1
2023-02-08const_eval: `implies_by` in `rustc_const_unstable`David Wood-0/+9
Extend support for `implies_by` (from `#[stable]` and `#[unstable]`) to `#[rustc_const_stable]` and `#[rustc_const_unstable]`. Signed-off-by: David Wood <david.wood@huawei.com>
2023-02-05rustc_passes: remove huge error importsest31-24/+21
2023-01-30Replace some `_ == _ || _ == _`s with `matches!(_, _ | _)`sMaybe Waffle-1/+1
2023-01-28Remove `HirId -> LocalDefId` map from HIR.Camille GILLOT-1/+2
2023-01-17Remove double spaces after dots in commentsMaybe Waffle-1/+1
2022-12-20rustc: Remove needless lifetimesJeremy Stucki-1/+1
2022-12-01rustc_hir: Relax lifetime requirements on `Visitor::visit_path`Vadim Petrochenkov-2/+2
2022-11-17Auto merge of #104170 - cjgillot:hir-def-id, r=fee1-deadbors-11/+11
Record `LocalDefId` in HIR nodes instead of a side table This is part of an attempt to remove the `HirId -> LocalDefId` table from HIR. This attempt is a prerequisite to creation of `LocalDefId` after HIR lowering (https://github.com/rust-lang/rust/pull/96840), by controlling how `def_id` information is accessed. This first part adds the information to HIR nodes themselves instead of a table. The second part is https://github.com/rust-lang/rust/pull/103902 The third part will be to make `hir::Visitor::visit_fn` take a `LocalDefId` as last parameter. The fourth part will be to completely remove the side table.
2022-11-13Store a LocalDefId in hir::Variant & hir::Field.Camille GILLOT-10/+10
2022-11-13Store a LocalDefId in hir::GenericParam.Camille GILLOT-1/+1
2022-11-12Use `derive_const` and rm manual StructuralEq implDeadbeef-0/+8
2022-10-29Rename some `OwnerId` fields.Nicholas Nethercote-12/+12
spastorino noticed some silly expressions like `item_id.def_id.def_id`. This commit renames several `def_id: OwnerId` fields as `owner_id`, so those expressions become `item_id.owner_id.def_id`. `item_id.owner_id.local_def_id` would be even clearer, but the use of `def_id` for values of type `LocalDefId` is *very* widespread, so I left that alone.
2022-10-26privacy: Rename "accessibility levels" to "effective visibilities"Vadim Petrochenkov-6/+9
And a couple of other naming tweaks Related to https://github.com/rust-lang/rust/issues/48054
2022-10-19Allow #[unstable] impl for fn() -> UnstableType.Mara Bos-7/+19
(But not fn() -> !, which is stable.)
2022-10-19Allow #[unstable] impls for fn() with unstable abi.Mara Bos-3/+8
2022-10-07migrate stability.rs to translateable diagnosticsNathan Stocks-84/+46
2022-10-01Refactor rustc lint APIMaybe Waffle-15/+14
2022-09-24separate definitions and `HIR` ownersTakayuki Maeda-12/+12
fix a ui test use `into` fix clippy ui test fix a run-make-fulldeps test implement `IntoQueryParam<DefId>` for `OwnerId` use `OwnerId` for more queries change the type of `ParentOwnerIterator::Item` to `(OwnerId, OwnerNode)`
2022-09-14Migrated the rustc_passes lint for annotations without effect to the new ↵Diego de Oliveira-10/+7
diagnostic infrastructure
2022-09-14Also replace the placeholder for the stable_features lintest31-2/+11
2022-09-05Make `hir::PathSegment::res` non-optional.Nicholas Nethercote-1/+1
2022-08-13Rollup merge of #100431 - compiler-errors:enum-ctor-variant-stab, r=estebankMichael Goulet-1/+4
Enum variant ctor inherits the stability of the enum variant Fixes #100399 Fixes #100420 Context #71481 for why enum variants don't need stability
2022-08-12Check ctor for missing stabilityMichael Goulet-0/+3
2022-08-12enum variant ctor inherits stability of variantMichael Goulet-1/+1
2022-08-12Auto merge of #100328 - davidtwco:perf-implications, r=nnethercotebors-36/+91
passes: load `defined_lib_features` query less Hopefully addresses the perf regressions from #99212 (see #99905). Re-structure the stability checks for library features to avoid calling `defined_lib_features` for any more crates than necessary for each of the implications or local feature attributes that need validation. r? `@ghost` (just checking perf at first)
2022-08-11Rollup merge of #100392 - nnethercote:simplify-visitors, r=cjgillotMatthias Krüger-5/+5
Simplify visitors By removing some unused arguments. r? `@cjgillot`
2022-08-11Simplify `rustc_hir::intravisit::Visitor::visit_variant_data`.Nicholas Nethercote-5/+5
It has four arguments that are never used. This avoids lots of argument passing in functions that feed into `visit_variant_data`.
2022-08-09passes: load `defined_lib_features` query lessDavid Wood-36/+91
Re-structure the stability checks for library features to avoid calling `defined_lib_features` for any more crates than necessary for each of the implications or local feature attributes that need validation.
2022-07-31Don't track parent body stability (it wasn't used anyway)Maybe Waffle-18/+3
2022-07-26Implement `#[rustc_default_body_unstable]`Maybe Waffle-4/+32
This attribute allows to mark default body of a trait function as unstable. This means that implementing the trait without implementing the function will require enabling unstable feature. This is useful in conjunction with `#[rustc_must_implement_one_of]`, we may want to relax requirements for a trait, for example allowing implementing either of `PartialEq::{eq, ne}`, but do so in a safe way -- making implementation of only `PartialEq::ne` unstable.