summary refs log tree commit diff
path: root/compiler/rustc_privacy/src
AgeCommit message (Collapse)AuthorLines
2022-12-04drive-by: move field_index to typeck resultsMichael Goulet-5/+5
2022-11-25Auto merge of #99798 - JulianKnodt:ac1, r=BoxyUwUbors-13/+2
Add `ConstKind::Expr` Starting to implement `ty::ConstKind::Abstract`, most of the match cases are stubbed out, some I was unsure what to add, others I didn't want to add until a more complete implementation was ready. r? `@lcnr`
2022-11-25Make `expand_abstract_consts` infallibleBoxy-7/+1
2022-11-25fmtBoxy-2/+3
2022-11-25Add expand_abstract_constkadmin-6/+2
Adds the ability to directly expand a const to an expr without having to deal with intermediate steps.
2022-11-25Add empty ConstKind::Abstractkadmin-11/+9
Initial pass at expr/abstract const/s Address comments Switch to using a list instead of &[ty::Const], rm `AbstractConst` Remove try_unify_abstract_consts Update comments Add edits Recurse more More edits Prevent equating associated consts Move failing test to ui Changes this test from incremental to ui, and mark it as failing and a known bug. Does not cause the compiler to ICE, so should be ok.
2022-11-25Introduce PredicateKind::ClauseSantiago Pastorino-7/+11
2022-11-13Store a LocalDefId in hir::Variant & hir::Field.Camille GILLOT-45/+26
2022-11-05privacy: Check effective visibility invariantsVadim Petrochenkov-0/+2
2022-11-05privacy: Print effective visibilities of constructorsVadim Petrochenkov-0/+8
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