about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize/src/polymorphize.rs
AgeCommit message (Collapse)AuthorLines
2024-12-06Remove polymorphizationBen Kimock-334/+0
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-08-29Add `warn(unreachable_pub)` to `rustc_monomorphize`.Nicholas Nethercote-1/+1
2024-08-26Stop using a special inner body for the coroutine by-move body for async ↵Michael Goulet-1/+1
closures
2024-07-29Reformat `use` declarations.Nicholas Nethercote-11/+7
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-06-16Rename InstanceDef -> InstanceKindMichael Goulet-4/+4
2024-06-13MIR visitor: constant -> const_operandRalf Jung-1/+1
2024-06-05Add `Ty` to `mir::Const::Ty`Boxy-1/+1
2024-05-23Remove `#[macro_use] extern crate tracing` from `rustc_monomorphize`.Nicholas Nethercote-0/+1
2024-05-19Add and use generics.is_empty() and generics.is_own_empty, rather than using ↵Santiago Pastorino-1/+1
generics' attributes
2024-05-09Rename Generics::params to Generics::own_paramsMichael Goulet-3/+3
2024-03-12Change `DefKind::Static` to a struct variantOli Scherer-1/+1
2024-03-05Convert `TypeVisitor` and `DefIdVisitor` to use `VisitorResult`Jason Newcomb-10/+5
2024-02-12Dejargnonize substShoyu Vanilla-1/+1
2023-12-24Remove `Session` methods that duplicate `DiagCtxt` methods.Nicholas Nethercote-1/+1
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
2023-11-26merge `DefKind::Coroutine` into `DefKind::Closure`bohan-2/+2
2023-10-20s/generator/coroutine/Oli Scherer-4/+4
2023-10-20s/Generator/Coroutine/Oli Scherer-3/+3
2023-09-26Don't store lazyness in DefKindMichael Goulet-1/+1
2023-09-21rename mir::Constant -> mir::ConstOperand, mir::ConstKind -> mir::ConstRalf Jung-8/+8
2023-08-07Store the laziness of type aliases in the DefKindLeón Orell Valerian Liehr-1/+1
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-13/+12
2023-07-08Replace RPITIT current impl with new strategy that lowers as a GATSantiago Pastorino-1/+0
2023-05-15Move expansion of query macros in rustc_middle to rustc_middle::queryJohn Kåre Alsaker-1/+1
2023-04-20Remove WithOptconstParam.Camille GILLOT-5/+5
2023-03-14Use `unused_generic_params` from crate metadataMichael Goulet-7/+2
2023-02-22Remove type-traversal trait aliasesAlan Egerton-1/+1
2023-02-14Add `of_trait` to DefKind::Impl.Camille GILLOT-1/+1
2023-02-13Make visiting traits generic over the InternerAlan Egerton-1/+1
2023-02-13Alias folding/visiting traits instead of re-exportAlan Egerton-1/+1
2023-01-17Stop using `BREAK` & `CONTINUE` in compilerScott McMurray-7/+7
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-09Delete unused polymorphization codeNilstrieb-46/+1
2023-01-09Use newtype for unused generic parametersNilstrieb-19/+17
2022-12-10compiler: remove unnecessary imports and qualified pathsKaDiWa-1/+0
2022-10-17mir constants: type traversing bye byelcnr-26/+14
2022-10-04It's not about types or consts, but the lack of regionsOli Scherer-5/+5
2022-09-23rename Unevaluated to UnevaluatedConstb-naber-2/+2
2022-09-22introduce mir::Unevaluatedb-naber-4/+3
2022-09-14address review againb-naber-4/+1
2022-09-13remove visit_const from mir visitorsb-naber-3/+10
2022-09-13fixes/working versionb-naber-1/+1
2022-09-13use ty::Unevaluated<'tcx, ()> in type systemb-naber-8/+26
2022-09-09RPITIT placeholder itemsMichael Goulet-0/+1
2022-09-01tracing::instrument cleanupOli Scherer-1/+0
2022-08-26remove unnecessary commentNathan Stocks-5/+0
2022-08-25rebased: convert rustc_monomorphize errors to SessionDiagnosticNathan Stocks-4/+12
2022-07-13Rename `debugging_opts` to `unstable_opts`Joshua Nelson-1/+1
This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`). Rename it to be more clear.
2022-07-06Update TypeVisitor pathsAlan Egerton-1/+1
2022-06-14Rename the `ConstS::val` field as `kind`.Nicholas Nethercote-2/+2
And likewise for the `Const::val` method. Because its type is called `ConstKind`. Also `val` is a confusing name because `ConstKind` is an enum with seven variants, one of which is called `Value`. Also, this gives consistency with `TyS` and `PredicateS` which have `kind` fields. The commit also renames a few `Const` variables from `val` to `c`, to avoid confusion with the `ConstKind::Value` variant.
2022-06-08Folding revamp.Nicholas Nethercote-1/+1
This commit makes type folding more like the way chalk does it. Currently, `TypeFoldable` has `fold_with` and `super_fold_with` methods. - `fold_with` is the standard entry point, and defaults to calling `super_fold_with`. - `super_fold_with` does the actual work of traversing a type. - For a few types of interest (`Ty`, `Region`, etc.) `fold_with` instead calls into a `TypeFolder`, which can then call back into `super_fold_with`. With the new approach, `TypeFoldable` has `fold_with` and `TypeSuperFoldable` has `super_fold_with`. - `fold_with` is still the standard entry point, *and* it does the actual work of traversing a type, for all types except types of interest. - `super_fold_with` is only implemented for the types of interest. Benefits of the new model. - I find it easier to understand. The distinction between types of interest and other types is clearer, and `super_fold_with` doesn't exist for most types. - With the current model is easy to get confused and implement a `super_fold_with` method that should be left defaulted. (Some of the precursor commits fixed such cases.) - With the current model it's easy to call `super_fold_with` within `TypeFolder` impls where `fold_with` should be called. The new approach makes this mistake impossible, and this commit fixes a number of such cases. - It's potentially faster, because it avoids the `fold_with` -> `super_fold_with` call in all cases except types of interest. A lot of the time the compile would inline those away, but not necessarily always.