about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/generic_args.rs
AgeCommit message (Collapse)AuthorLines
2025-08-09rename `TraitRef::from_method` to `from_assoc`Deadbeef-0/+3
also add a note to `GenericArgs::truncate_to`
2025-08-08Rollup merge of #144192 - RalfJung:atomicrmw-ptr, r=nikicTrevor Gross-5/+12
atomicrmw on pointers: move integer-pointer cast hacks into backend Conceptually, we want to have atomic operations on pointers of the form `fn atomic_add(ptr: *mut T, offset: usize, ...)`. However, LLVM does not directly support such operations (https://github.com/llvm/llvm-project/issues/120837), so we have to cast the `offset` to a pointer somewhere. This PR moves that hack into the LLVM backend, so that the standard library, intrinsic, and Miri all work with the conceptual operation we actually want. Hopefully, one day LLVM will gain a way to represent these operations without integer-pointer casts, and then the hack will disappear entirely. Cc ```@nikic``` -- this is the best we can do right now, right? Fixes https://github.com/rust-lang/rust/issues/134617
2025-07-31Remove the witness type from coroutine argsMichael Goulet-19/+10
2025-07-23properly use caller-side panic location for some GenericArgs methodsRalf Jung-5/+12
2025-06-13Use more slicing and slice interning over iterable interningLeón Orell Valerian Liehr-1/+1
2025-05-27Fix some var namesMichael Goulet-1/+1
2025-05-27Rename unpack to kindMichael Goulet-15/+15
2025-04-26convert some `GenericArg` to `Term`lcnr-4/+13
2025-04-15Split TypeFolder and FallibleTypeFolderMichael Goulet-1/+46
2025-04-12Move FlagComputation, PatternKind, and TypeWalker to rustc_type_irjackh726-0/+15
2025-04-05formatAdam Kobzan-3/+3
2025-04-05Fix TypoAdam Kobzan-2/+2
2025-03-15Move codec module back into middleMichael Goulet-2/+2
2025-03-15Fold visit into tyMichael Goulet-3/+3
2025-03-15Squash fold into tyMichael Goulet-3/+3
2025-03-07compiler: Use size_of from the prelude instead of importedThalia Archibald-4/+3
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the prelude instead of importing or qualifying them. These functions were added to all preludes in Rust 1.80.
2025-02-25Teach structured errors to display short `Ty`Esteban Küber-2/+2
Make it so that every structured error annotated with `#[derive(Diagnostic)]` that has a field of type `Ty<'_>`, the printing of that value into a `String` will look at the thread-local storage `TyCtxt` in order to shorten to a length appropriate with the terminal width. When this happen, the resulting error will have a note with the file where the full type name was written to. ``` error[E0618]: expected function, found `((..., ..., ..., ...), ..., ..., ...)`` --> long.rs:7:5 | 6 | fn foo(x: D) { //~ `x` has type `(... | - `x` has type `((..., ..., ..., ...), ..., ..., ...)` 7 | x(); //~ ERROR expected function, found `(... | ^-- | | | call expression requires function | = note: the full name for the type has been written to 'long.long-type-14182675702747116984.txt' = note: consider using `--verbose` to print the full type name to the console ```
2025-02-22Greatly simplify lifetime captures in edition 2024Michael Goulet-6/+4
2025-02-19Make fewer crates depend on rustc_ast_irMichael Goulet-3/+1
2025-02-15HIR analysis: Remove unnecessary abstraction over list of clausesLeón Orell Valerian Liehr-1/+1
2024-11-12Delete the `cfg(not(parallel))` serial compilerNoratrieb-2/+0
Since it's inception a long time ago, the parallel compiler and its cfgs have been a maintenance burden. This was a necessary evil the allow iteration while not degrading performance because of synchronization overhead. But this time is over. Thanks to the amazing work by the parallel working group (and the dyn sync crimes), the parallel compiler has now been fast enough to be shipped by default in nightly for quite a while now. Stable and beta have still been on the serial compiler, because they can't use `-Zthreads` anyways. But this is quite suboptimal: - the maintenance burden still sucks - we're not testing the serial compiler in nightly Because of these reasons, it's time to end it. The serial compiler has served us well in the years since it was split from the parallel one, but it's over now. Let the knight slay one head of the two-headed dragon!
2024-10-26Effects cleanupDeadbeef-3/+0
- removed extra bits from predicates queries that are no longer needed in the new system - removed the need for `non_erasable_generics` to take in tcx and DefId, removed unused arguments in callers
2024-10-24Remove associated type based effects logicMichael Goulet-5/+4
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-13/+12
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-17lift_to_tcx -> lift_to_internerMichael Goulet-1/+1
2024-06-21Rename a bunch of thingsMichael Goulet-3/+3
2024-06-18Fix transmute goalMichael Goulet-0/+4
2024-06-18Uplift the new trait solverMichael Goulet-0/+14
2024-06-13Rework most of structural_traits to be Interner-agnosticMichael Goulet-0/+2
2024-06-05Basic removal of `Ty` from places (boring)Boxy-3/+3
2024-06-01Uplift TypeRelation and RelateMichael Goulet-5/+64
2024-05-26Uplift EarlyBinderMichael Goulet-502/+4
2024-05-26Give EarlyBinder a tcx parameterMichael Goulet-35/+45
We are gonna need it to uplift EarlyBinder
2024-05-23Remove `#[macro_use] extern crate tracing` from `rustc_middle`.Nicholas Nethercote-0/+1
2024-05-21Uplift binderMichael Goulet-0/+8
2024-05-20Uplift TermKindMichael Goulet-0/+1
2024-05-18Uplift GenericArgKind, CanonicalVarValues, QueryInputMichael Goulet-7/+12
and make NestedGoals generic
2024-05-10Lift `TraitRef` into `rustc_type_ir`Michael Goulet-0/+10
2024-05-10Lift `Lift`Michael Goulet-1/+1
2024-05-09Rename Generics::params to Generics::own_paramsMichael Goulet-2/+2
2024-04-29Remove `extern crate rustc_macros` from `rustc_middle`.Nicholas Nethercote-1/+3
2024-03-27Remove `Ord` from `Ty`, `Const`, and `Region`Oli Scherer-14/+1
2024-03-11Rename `IntoDiagnosticArg` as `IntoDiagArg`.Nicholas Nethercote-4/+4
Also rename `into_diagnostic_arg` as `into_diag_arg`, and `NotIntoDiagnosticArg` as `NotInotDiagArg`.
2024-03-05Convert `TypeVisitor` and `DefIdVisitor` to use `VisitorResult`Jason Newcomb-4/+7
2024-02-28Rename `DiagnosticArg{,Map,Name,Value}` as `DiagArg{,Map,Name,Value}`.Nicholas Nethercote-2/+2
2024-02-15Replace `NonZero::<_>::new` with `NonZero::new`.Markus Reiter-3/+2
2024-02-15Use generic `NonZero` internally.Markus Reiter-2/+2
2024-02-12Dejargnonize substShoyu Vanilla-13/+13
2024-02-06Add CoroutineClosure to TyKind, AggregateKind, UpvarArgsMichael Goulet-1/+9