summary refs log tree commit diff
path: root/compiler/rustc_privacy/src
AgeCommit message (Collapse)AuthorLines
2022-10-29Rename some `OwnerId` fields.Nicholas Nethercote-53/+62
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-66/+66
And a couple of other naming tweaks Related to https://github.com/rust-lang/rust/issues/48054
2022-10-25Perf improvements for effective visibility calculatingBryanskiy-3/+5
2022-10-23Migrate all diagnosticsNilstrieb-12/+12
2022-10-19manually inline and rm `visit_abstract_const_expr`lcnr-16/+9
2022-10-18change `ConstEvaluatable` to use `ty::Const`lcnr-9/+1
2022-10-16Auto merge of #102026 - Bryanskiy:resolve_update, r=petrochenkovbors-22/+25
Populate effective visibilities in 'rustc_resolve' Next part of RFC https://github.com/rust-lang/rust/issues/48054. previous: https://github.com/rust-lang/rust/pull/101713 `@rustbot` author r? `@petrochenkov`
2022-10-16Populate effective visibilities in 'rustc_resolve'Bryanskiy-22/+25
2022-10-12Auto merge of #101679 - compiler-errors:rpitit-default-body, r=nikomatsakisbors-2/+14
Support default-body trait functions with return-position `impl Trait` in traits Introduce a new `Trait` candidate kind for the `ImplTraitInTrait` projection candidate, which just projects an RPITIT down to its opaque type form. This is a hack until we lower RPITITs to regular associated types, after which we will need to rework how these default bodies are type-checked, so comments are left in a few places for us to clean up later. Fixes #101665
2022-10-09ImplItemKind::TyAlias => ImplItemKind::TypeMichael Goulet-3/+3
2022-10-05Fix test for default body with implMichael Goulet-2/+14
2022-09-29Shrink `hir::def::Res`.Nicholas Nethercote-1/+3
`Res::SelfTy` currently has two `Option`s. When the second one is `Some` the first one is never consulted. So we can split it into two variants, `Res::SelfTyParam` and `Res::SelfTyAlias`, reducing the size of `Res` from 24 bytes to 12. This then shrinks `hir::Path` and `hir::PathSegment`, which are the HIR types that take up the most space.
2022-09-27rustc_typeck to rustc_hir_analysislcnr-2/+2
2022-09-26remove cfg(bootstrap)Pietro Albini-1/+0
2022-09-24separate definitions and `HIR` ownersTakayuki Maeda-54/+63
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-21UPDATE - rename SessionSubdiagnostic macro to SubdiagnosticJhonny Bill Mena-2/+2
Also renames: - sym::AddSubdiagnostic to sym:: Subdiagnostic - rustc_diagnostic_item = "AddSubdiagnostic" to rustc_diagnostic_item = "Subdiagnostic"
2022-09-21UPDATE - rename DiagnosticHandler macro to DiagnosticJhonny Bill Mena-6/+6
2022-09-21UPDATE - rename DiagnosticHandler trait to IntoDiagnosticJhonny Bill Mena-7/+7
2022-09-17Rollup merge of #101713 - Bryanskiy:AccessLevels, r=petrochenkovMatthias Krüger-10/+31
change AccessLevels representation Part of RFC (https://github.com/rust-lang/rust/issues/48054). This patch implements effective visibility table with basic methods and change AccessLevels table representation according to it. r? ``@petrochenkov``
2022-09-15Only enable the let_else feature on bootstrapest31-1/+1
On later stages, the feature is already stable. Result of running: rg -l "feature.let_else" compiler/ src/librustdoc/ library/ | xargs sed -s -i "s#\\[feature.let_else#\\[cfg_attr\\(bootstrap, feature\\(let_else\\)#"
2022-09-14change AccessLevels representationBryanskiy-10/+31
2022-09-14Auto merge of #101709 - nnethercote:simplify-visitors-more, r=cjgillotbors-1/+1
Simplify visitors more A successor to #100392. r? `@cjgillot`
2022-09-12Remove `path_span` argument to the `visit_path_segment` methods.Nicholas Nethercote-1/+1
The `visit_path_segment` method of both the AST and HIR visitors has a `path_span` argument that isn't necessary. This commit removes it. There are two very small and inconsequential functional changes. - One call to `NodeCollector::insert` now is passed a path segment identifier span instead of a full path span. This span is only used in a panic message printed in the case of an internal compiler bug. - Likewise, one call to `LifetimeCollectVisitor::record_elided_anchor` now uses a path segment identifier span instead of a full path span. This span is used to make some `'_` lifetimes.
2022-09-10rustc_error, rustc_private, rustc_ast: Switch to stable hash containersNiklas Jonsson-1/+0
2022-09-09Handle generic parameters.Camille GILLOT-8/+3
2022-09-09Implement projection for ImplTraitPlaceholderMichael Goulet-1/+3
2022-09-09RPITIT placeholder itemsMichael Goulet-0/+5
2022-09-07rustc: Parameterize `ty::Visibility` over used IDVadim Petrochenkov-39/+37
It allows using `LocalDefId` instead of `DefId` when possible, and also encode cheaper `Visibility<DefIndex>` into metadata.
2022-09-02Rollup merge of #100147 - Bryanskiy:private-in-public, r=petrochenkovGuillaume Gomez-2/+68
optimization of access level table construction Refactoring which was mentioned in #87487
2022-09-01Always import all tracing macros for the entire crate instead of piecemeal ↵Oli Scherer-1/+4
by module
2022-08-31add TestReachabilityVisitorBryanskiy-2/+68
2022-08-27rustc_middle: Remove `Visibility::Invisible`Vadim Petrochenkov-1/+0
2022-08-21Replace #[lint/warning/error] with #[diag]Xiretza-7/+7
2022-08-12Adjust cfgsMark Rousskov-2/+2
2022-08-11Simplify `rustc_hir::intravisit::Visitor::visit_variant_data`.Nicholas Nethercote-7/+2
It has four arguments that are never used. This avoids lots of argument passing in functions that feed into `visit_variant_data`.
2022-08-05move DiagnosticArgFromDisplay into rustc_errorsMichael Goulet-29/+14
2022-08-05Delay formatting trimmed path until lint/error is emittedMichael Goulet-14/+27
2022-08-01Remove DefId from AssocItemContainer.Camille GILLOT-1/+1
2022-08-01Store associated item defaultness in impl_defaultness.Camille GILLOT-5/+3
2022-07-28Remove guess_head_span.Camille GILLOT-2/+1
2022-07-20clippy::perf fixesMatthias Krüger-1/+0
2022-07-15errors: lint on `LintDiagnosticBuilder::build`David Wood-24/+29
Apply the `#[rustc_lint_diagnostics]` attribute to `LintDiagnosticBuilder::build` so that diagnostic migration lints will trigger for it. Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-15Remove some more usages of guess_head_spanMichael Goulet-2/+1
2022-07-12Move abstract const to rustc_middle::tykadmin-3/+2
2022-07-06Rollup merge of #98881 - cjgillot:q-def-kind, r=fee1-deadDylan DPC-1/+1
Only compute DefKind through the query.
2022-07-06Update TypeVisitor pathsAlan Egerton-3/+1
2022-07-05Relax constrained generics to TypeVisitableAlan Egerton-2/+4
2022-07-04Only compute DefKind through the query.Camille GILLOT-1/+1
2022-06-29Auto merge of #98542 - jackh726:coinductive-wf, r=oli-obkbors-0/+1
Make empty bounds lower to `WellFormed` and make `WellFormed` coinductive r? rust-lang/types
2022-06-28Make empty bounds lower to WellFormed and make WellFormed coinductiveJack Huey-0/+1