about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty
AgeCommit message (Collapse)AuthorLines
2024-06-18Uplift PredefinedOpaquesDataMichael Goulet-2/+2
2024-06-18Make SearchGraph fully genericMichael Goulet-0/+21
2024-06-18Apply suggestions from oli-obk's reviewDaria Sukhonina-24/+11
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
2024-06-18Make async drop code more consistent with regular drop codeDaria Sukhonina-3/+25
Fixes #126573
2024-06-17Rollup merge of #126567 - compiler-errors:instance-kind, r=oli-obk,lcnrMatthias Krüger-121/+121
Rename `InstanceDef` -> `InstanceKind` Renames `InstanceDef` to `InstanceKind`. The `Def` here is confusing, and makes it hard to distinguish `Instance` and `InstanceDef`. `InstanceKind` makes this more obvious, since it's really just describing what *kind* of instance we have. Not sure if this is large enough to warrant a types team MCP -- it's only 53 files. I don't personally think it does, but happy to write one if anyone disagrees. cc ``@rust-lang/types`` r? types
2024-06-16Rename InstanceDef -> InstanceKindMichael Goulet-121/+121
2024-06-16Uplift OpaqueTypeKey too, use it in responseMichael Goulet-39/+3
2024-06-16Uplift ExternalConstraintDataMichael Goulet-2/+3
2024-06-15Rollup merge of #126354 - compiler-errors:variance, r=lcnrMatthias Krüger-1/+0
Use `Variance` glob imported variants everywhere Fully commit to using the globbed variance. Could be convinced the other way, and change this PR to not use the globbed variants anywhere, but I'd rather we do one or the other. r? lcnr
2024-06-14Use is_lang_item more aggressivelyMichael Goulet-15/+15
2024-06-13Address nitsMichael Goulet-4/+8
- Remove the ValuePairs glob import - Make DummyPairs -> ValuePairs::Dummy and make it bug more - Fix WC - Make interner return `impl IntoIterator`s
2024-06-13Fix some TODOsMichael Goulet-0/+8
2024-06-13Finish uplifting all of structural_traitsMichael Goulet-2/+30
2024-06-13Rework most of structural_traits to be Interner-agnosticMichael Goulet-3/+75
2024-06-12Stop passing traitref/traitpredicate by refMichael Goulet-1/+1
2024-06-12Use Variance glob import everywhereMichael Goulet-1/+0
2024-06-11Remove DebugWithInfcxMichael Goulet-98/+16
2024-06-11interpret: ensure we check bool/char for validity when they are used in a castRalf Jung-10/+5
2024-06-10ScalarInt: size mismatches are a bug, do not delay the panicRalf Jung-130/+111
2024-06-08offset_of: allow (unstably) taking the offset of slice tail fieldsRalf Jung-0/+34
2024-06-07Auto merge of #125918 - oli-obk:const_block_ice, r=compiler-errorsbors-6/+0
Revert: create const block bodies in typeck via query feeding as per the discussion in https://github.com/rust-lang/rust/pull/125806#discussion_r1622563948 It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile. reverts the const-block-specific parts of https://github.com/rust-lang/rust/pull/124650 `@bors` rollup=never had a small perf impact previously fixes https://github.com/rust-lang/rust/issues/125846 r? `@compiler-errors`
2024-06-07Revert "Create const block DefIds in typeck instead of ast lowering"Oli Scherer-5/+0
This reverts commit ddc5f9b6c1f21da5d4596bf7980185a00984ac42.
2024-06-07Revert "Cache whether a body has inline consts"Oli Scherer-1/+0
This reverts commit eae5031ecbda434e92966099e0dc93917de03eff.
2024-06-06Rollup merge of #125724 - compiler-errors:uplift-relate, r=lcnrJubilee-1027/+287
Uplift `Relate`/`TypeRelation` into `rustc_next_trait_solver` For use in the new solver. This doesn't yet uplift `ObligationEmittingRelation`. r? lcnr
2024-06-06Uplift TypeRelation and RelateMichael Goulet-864/+247
2024-06-06Uplift TypeErrorMichael Goulet-163/+40
2024-06-06Revert "Rollup merge of #124976 - petrochenkov:usedcrates, r=oli-obk"Rémy Rakic-4/+4
This reverts commit eda4a35f365535af72118118a3597edf5a13c12d, reversing changes made to eb6b35b5bcb3c2a594cb29cd478aeb2893f49d30.
2024-06-05ty::Expr reviewsBoxy-6/+10
2024-06-05Misc fixes (pattern type lowering, cfi, pretty printing)Boxy-18/+1
2024-06-05Fully implement `ConstArgHasType`Boxy-0/+46
2024-06-05Add `Ty` to `ConstKind::Value`Boxy-43/+50
2024-06-05Basic removal of `Ty` from places (boring)Boxy-201/+114
2024-06-04Auto merge of #123536 - compiler-errors:simplify-int-float, r=lcnrbors-21/+1
Simplify `IntVarValue`/`FloatVarValue` r? `@ghost`
2024-06-04Rollup merge of #125968 - BoxyUwU:shrink_ty_expr, r=oli-obkMichael Goulet-155/+208
Store the types of `ty::Expr` arguments in the `ty::Expr` Part of #125958 In attempting to remove the `ty` field on `Const` it will become necessary to store the `Ty<'tcx>` inside of `Expr<'tcx>`. In order to do this without blowing up the size of `ConstKind`, we start storing the type/const args as `GenericArgs` r? `@oli-obk`
2024-06-04Downsize `ty::Expr`Boxy-155/+208
2024-06-03Align Term methods with GenericArg methodsMichael Goulet-5/+13
2024-06-03Auto merge of #125778 - estebank:issue-67100, r=compiler-errorsbors-1/+1
Use parenthetical notation for `Fn` traits Always use the `Fn(T) -> R` format when printing closure traits instead of `Fn<(T,), Output = R>`. Address #67100: ``` error[E0277]: expected a `Fn()` closure, found `F` --> file.rs:6:13 | 6 | call_fn(f) | ------- ^ expected an `Fn()` closure, found `F` | | | required by a bound introduced by this call | = note: wrap the `F` in a closure with no arguments: `|| { /* code */ }` note: required by a bound in `call_fn` --> file.rs:1:15 | 1 | fn call_fn<F: Fn() -> ()>(f: &F) { | ^^^^^^^^^^ required by this bound in `call_fn` help: consider further restricting this bound | 5 | fn call_any<F: std::any::Any + Fn()>(f: &F) { | ++++++ ```
2024-06-01Auto merge of #125775 - compiler-errors:uplift-closure-args, r=lcnrbors-729/+125
Uplift `{Closure,Coroutine,CoroutineClosure}Args` and friends to `rustc_type_ir` Part of converting the new solver's `structural_traits.rs` to be interner-agnostic. I decided against aliasing `ClosureArgs<TyCtxt<'tcx>>` to `ClosureArgs<'tcx>` because it seemed so rare. I could do so if desired, though. r? lcnr
2024-06-01Uplift TypeRelation and RelateMichael Goulet-716/+125
2024-06-01Yeet PolyFnSig from InternerMichael Goulet-13/+0
2024-06-01Simplify IntVarValue/FloatVarValueMichael Goulet-21/+1
2024-06-01Deduplicate supertrait_def_ids codeMark Rousskov-12/+10
2024-06-01Increase vtable layout sizeMark Rousskov-18/+71
This improves LLVM's codegen by allowing vtable loads to be hoisted out of loops (as just one example).
2024-05-30transmute size check: properly account for alignmentRalf Jung-8/+17
2024-05-29Use parenthetical notation for `Fn` traitsEsteban Küber-1/+1
Always use the `Fn(T) -> R` format when printing closure traits instead of `Fn<(T,), Output = R>`. Fix #67100: ``` error[E0277]: expected a `Fn()` closure, found `F` --> file.rs:6:13 | 6 | call_fn(f) | ------- ^ expected an `Fn()` closure, found `F` | | | required by a bound introduced by this call | = note: wrap the `F` in a closure with no arguments: `|| { /* code */ }` note: required by a bound in `call_fn` --> file.rs:1:15 | 1 | fn call_fn<F: Fn() -> ()>(f: &F) { | ^^^^^^^^^^ required by this bound in `call_fn` help: consider further restricting this bound | 5 | fn call_any<F: std::any::Any + Fn()>(f: &F) { | ++++++ ```
2024-05-29fix non-existing ToPredicate trait errorDaria Sukhonina-2/+2
2024-05-29Optimize async drop glue for some old typesDaria Sukhonina-79/+112
2024-05-29Start implementing needs_async_drop and relatedDaria Sukhonina-82/+159
2024-05-29Rollup merge of #124251 - scottmcm:unop-ptr-metadata, r=oli-obk许杰友 Jieyou Xu (Joe)-0/+2
Add an intrinsic for `ptr::metadata` The follow-up to #123840, so we can remove `PtrComponents` and `PtrRepr` from libcore entirely (well, after a bootstrap update). As discussed in <https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/.60ptr_metadata.60.20in.20MIR/near/435637808>, this introduces `UnOp::PtrMetadata` taking a raw pointer and returning the associated metadata value. By no longer going through a `union`, this should also help future PRs better optimize pointer operations. r? ``@oli-obk``
2024-05-28Auto merge of #125665 - matthiaskrgr:rollup-srkx0v1, r=matthiaskrgrbors-0/+7
Rollup of 5 pull requests Successful merges: - #117671 (NVPTX: Avoid PassMode::Direct for args in C abi) - #125573 (Migrate `run-make/allow-warnings-cmdline-stability` to `rmake.rs`) - #125590 (Add a "Setup Python" action for github-hosted runners and remove unnecessary `CUSTOM_MINGW` environment variable) - #125598 (Make `ProofTreeBuilder` actually generic over `Interner`) - #125637 (rustfmt fixes) r? `@ghost` `@rustbot` modify labels: rollup