about summary refs log tree commit diff
path: root/compiler/rustc_privacy/src
AgeCommit message (Collapse)AuthorLines
2023-01-26fix up subst_identity vs skip_binder; add some FIXMEs as identified in reviewKyle Matsuda-0/+1
2023-01-26change fn_sig query to use EarlyBinder; remove bound_fn_sig query; add ↵Kyle Matsuda-1/+1
EarlyBinder to fn_sig in metadata
2023-01-26replace usages of fn_sig query with bound_fn_sigKyle Matsuda-1/+1
2023-01-18Also remove `#![feature(control_flow_enum)]` where possibleScott McMurray-1/+0
2023-01-17Stop using `BREAK` & `CONTINUE` in compilerScott McMurray-12/+16
Switching them to `Break(())` and `Continue(())` instead. libs-api would like to remove these constants, so stop using them in compiler to make the removal PR later smaller.
2023-01-14change impl_trait_ref query to return EarlyBinder; remove ↵Kyle Matsuda-2/+2
bound_impl_trait_ref query; add EarlyBinder to impl_trait_ref in metadata
2023-01-14change usages of impl_trait_ref to bound_impl_trait_refKyle Matsuda-4/+4
2023-01-14change const_param_default query to return EarlyBinder; remove ↵Kyle Matsuda-3/+1
bound_const_param_default query; add EarlyBinder to const_param_default in metadata
2023-01-14change usages of const_param_default query to bound_const_param_defaultKyle Matsuda-1/+3
2023-01-11Change `src/test` to `tests` in source files, fix tidy and testsAlbert Larsan-1/+1
2023-01-08Auto merge of #106235 - compiler-errors:rework-bounds-collection, r=davidtwcobors-13/+16
Rework `Bounds` collection I think it's weird for the `Bounds` struct in astconv to store its predicates *almost* converted into real predicates... so we do this eagerly, instead of lazily.
2023-01-05Fix `uninlined_format_args` for some compiler cratesnils-1/+1
Convert all the crates that have had their diagnostic migration completed (except save_analysis because that will be deleted soon and apfloat because of the licensing problem).
2023-01-04rename get_parent_node to parent_idMichael Goulet-1/+1
2022-12-28Rework hir Bounds collectionMichael Goulet-13/+16
2022-12-14Prevent the creation of `TraitRef` without dedicated methodsOli Scherer-14/+13
2022-12-14Ensure no one constructs `AliasTy`s themselvesOli Scherer-1/+1
2022-12-14Auto merge of #104986 - compiler-errors:opaques, r=oli-obkbors-12/+6
Combine `ty::Projection` and `ty::Opaque` into `ty::Alias` Implements https://github.com/rust-lang/types-team/issues/79. This PR consolidates `ty::Projection` and `ty::Opaque` into a single `ty::Alias`, with an `AliasKind` and `AliasTy` type (renamed from `ty::ProjectionTy`, which is the inner data of `ty::Projection`) defined as so: ``` enum AliasKind { Projection, Opaque, } struct AliasTy<'tcx> { def_id: DefId, substs: SubstsRef<'tcx>, } ``` Since we don't have access to `TyCtxt` in type flags computation, and because repeatedly calling `DefKind` on the def-id is expensive, these two types are distinguished with `ty::AliasKind`, conveniently glob-imported into `ty::{Projection, Opaque}`. For example: ```diff match ty.kind() { - ty::Opaque(..) => + ty::Alias(ty::Opaque, ..) => {} _ => {} } ``` This PR also consolidates match arms that treated `ty::Opaque` and `ty::Projection` identically. r? `@ghost`
2022-12-13Combine projection and opaque into aliasMichael Goulet-2/+2
2022-12-13squash OpaqueTy and ProjectionTy into AliasTyMichael Goulet-9/+3
2022-12-13ProjectionTy.item_def_id -> ProjectionTy.def_idMichael Goulet-2/+2
2022-12-13Use ty::OpaqueTy everywhereMichael Goulet-1/+1
2022-12-13Make some diagnostics not depend on the source of what they reference being ↵Oli Scherer-5/+5
available
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