about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src/assoc.rs
AgeCommit message (Collapse)AuthorLines
2025-01-23Split hir `TyKind` and `ConstArgKind` in two and update `hir::Visitor`Boxy-2/+2
2024-12-18Re-export more `rustc_span::symbol` things from `rustc_span`.Nicholas Nethercote-1/+1
`rustc_span::symbol` defines some things that are re-exported from `rustc_span`, such as `Symbol` and `sym`. But it doesn't re-export some closely related things such as `Ident` and `kw`. So you can do `use rustc_span::{Symbol, sym}` but you have to do `use rustc_span::symbol::{Ident, kw}`, which is inconsistent for no good reason. This commit re-exports `Ident`, `kw`, and `MacroRulesNormalizedIdent`, and changes many `rustc_span::symbol::` qualifiers in `compiler/` to `rustc_span::`. This is a 200+ net line of code reduction, mostly because many files with two `use rustc_span` items can be reduced to one.
2024-11-04ty::KContainer -> ty::AssocItemContainer::KMichael Goulet-4/+4
2024-10-31Auto merge of #131186 - compiler-errors:precise-capturing-borrowck, r=estebankbors-3/+1
Try to point out when edition 2024 lifetime capture rules cause borrowck issues Lifetime capture rules in 2024 are modified to capture more lifetimes, which sometimes lead to some non-local borrowck errors. This PR attempts to link these back together with a useful note pointing out the capture rule changes. This is not a blocking concern, but I'd appreciate feedback (though, again, I'd like to stress that I don't want to block this PR on this): I'm worried about this note drowning in the sea of other diagnostics that borrowck emits. I was tempted to change the level of the note to `.span_warn` just so it would show up in a different color. Thoughts? Fixes #130545 Opening as a draft first since it's stacked on #131183. r? `@ghost`
2024-10-31Encode cross-crate opaque type originMichael Goulet-3/+1
2024-10-31Auto merge of #132377 - matthiaskrgr:rollup-3p1c6hs, r=matthiaskrgrbors-4/+0
Rollup of 3 pull requests Successful merges: - #132368 (Remove `do_not_const_check` from `Iterator` methods) - #132373 (Make sure `type_param_predicates` resolves correctly for RPITIT) - #132374 (Remove dead code stemming from the old effects desugaring) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-30Remove dead code stemming from the old effects desugaringLeón Orell Valerian Liehr-4/+0
2024-10-30Remap impl-trait lifetimes on HIR instead of AST lowering.Camille GILLOT-1/+1
2024-10-24Remove associated type based effects logicMichael Goulet-136/+3
2024-10-23nightly feature tracking: get rid of the per-feature bool fieldsRalf Jung-1/+1
2024-10-04rm `ItemKind::OpaqueTy`Noah Lev-9/+6
This introduce an additional collection of opaques on HIR, as they can no longer be listed using the free item list.
2024-10-02Move in_trait into OpaqueTyOriginMichael Goulet-2/+2
2024-10-02Use named fields for OpaqueTyOriginMichael Goulet-1/+2
2024-10-02Remove redundant in_trait from hir::TyKind::OpaqueDefMichael Goulet-1/+1
2024-06-28address review commentsDeadbeef-65/+34
2024-06-28general fixups and turn `TODO`s into `FIXME`sDeadbeef-2/+2
2024-06-28temporarily disable effects on specialization testsDeadbeef-1/+6
2024-06-28implement new effects desugaringDeadbeef-3/+165
2024-05-13Remove `extern crate rustc_middle` from `rustc_ty_utils`.Nicholas Nethercote-0/+1
2024-05-09Rename Generics::params to Generics::own_paramsMichael Goulet-5/+5
2024-03-19Ensure nested statics have a HIR node to prevent various queries from ICEingOli Scherer-25/+4
2024-03-19The AssocOpaqueTy HIR node is not actually needed to differentiate from ↵Oli Scherer-5/+3
other hir nodes that were fed
2024-03-15Rollup merge of #122513 - petrochenkov:somehir4, r=fmeaseGuillaume Gomez-5/+1
hir: Remove `opt_local_def_id_to_hir_id` and `opt_hir_node_by_def_id` Also replace a few `hir_node()` calls with `hir_node_by_def_id()`. Follow up to https://github.com/rust-lang/rust/pull/120943.
2024-03-14Fill in HIR hash for associated opaque typesVadim Petrochenkov-3/+9
2024-03-14hir: Remove `opt_local_def_id_to_hir_id` and `opt_hir_node_by_def_id`Vadim Petrochenkov-5/+1
Also replace a few `hir_node()` calls with `hir_node_by_def_id()`
2024-03-13Create some minimal HIR for associated opaque typesVadim Petrochenkov-8/+21
2024-03-05Uplift some feeding out of associated_type_for_impl_trait_in_impl and into ↵Michael Goulet-43/+4
queries
2023-12-12Move some methods from `tcx.hir()` to `tcx`zetanumbers-2/+1
Renamings: - find -> opt_hir_node - get -> hir_node - find_by_def_id -> opt_hir_node_by_def_id - get_by_def_id -> hir_node_by_def_id Fix rebase changes using removed methods Use `tcx.hir_node_by_def_id()` whenever possible in compiler Fix clippy errors Fix compiler Apply suggestions from code review Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com> Add FIXME for `tcx.hir()` returned type about its removal Simplify with with `tcx.hir_node_by_def_id`
2023-12-03rustc: Harmonize `DefKind` and `DefPathData`Vadim Petrochenkov-5/+2
`DefPathData::(ClosureExpr,ImplTrait)` are renamed to match `DefKind::(Closure,OpaqueTy)`. `DefPathData::ImplTraitAssocTy` is replaced with `DefPathData::TypeNS(kw::Empty)` because both correspond to `DefKind::AssocTy`. It's possible that introducing `(DefKind,DefPathData)::AssocOpaqueTy` could be a better solution, but that would be a much more invasive change. Const generic parameters introduced for effects are moved from `DefPathData::TypeNS` to `DefPathData::ValueNS`, because constants are values. `DefPathData` is no longer passed to `create_def` functions to avoid redundancy.
2023-11-28resolve: Feed the `def_kind` query immediately on `DefId` creationVadim Petrochenkov-6/+4
2023-11-26rustc: `hir().local_def_id_to_hir_id()` -> `tcx.local_def_id_to_hir_id()` ↵Vadim Petrochenkov-1/+1
cleanup
2023-11-25rustc: Make `def_kind` mandatory for all `DefId`sVadim Petrochenkov-2/+2
2023-11-21Fix `clippy::needless_borrow` in the compilerNilstrieb-4/+4
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now.
2023-11-20Reduce exposure of some items.Nicholas Nethercote-1/+1
2023-11-03compiler: use `copied` instead of manual `map`DaniPopes-2/+2
2023-10-13Format all the let chains in compilerMichael Goulet-1/+2
2023-07-27tighten span slightly for synthetic itemMichael Goulet-2/+10
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-2/+2
2023-07-12Re-format let-else per rustfmt updateMark Rousskov-1/+3
2023-07-08Replace RPITIT current impl with new strategy that lowers as a GATSantiago Pastorino-62/+46
2023-07-05Move `TyCtxt::mk_x` to `Ty::new_x` where applicableBoxy-2/+3
2023-07-04include `host_effect_index` in `Generics`Deadbeef-0/+2
2023-06-29Add bidirectional where clauses on RPITIT synthesized GATsSantiago Pastorino-12/+0
2023-06-22Move `opaque_type_origin_unchecked` onto `TyCtxt` and re-use it where it was ↵Oli Scherer-1/+1
open coded
2023-06-01Rename `impl_defaultness` to `defaultness`Deadbeef-4/+4
2023-05-29EarlyBinder::new -> EarlyBinder::bindlcnr-1/+1
2023-05-28Replace EarlyBinder(x) with EarlyBinder::new(x)Kyle Matsuda-1/+1
2023-05-15Move expansion of query macros in rustc_middle to rustc_middle::queryJohn Kåre Alsaker-2/+3
2023-05-05Make generics_of has_self on RPITITs delegate to the opaqueSantiago Pastorino-1/+1
2023-03-29Walk return-position impl trait in trait deeply in associated_item_def_idsMichael Goulet-16/+19