about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/mir
AgeCommit message (Collapse)AuthorLines
2022-10-23Split phase change from `MirPass`Jakob Degen-5/+34
2022-10-22Auto merge of #103227 - lcnr:bye-bye-unevaluated-const, r=oli-obkbors-1/+25
stop using `ty::UnevaluatedConst` directly best reviewed commit by commit. simplifies #99798 because we now don't have to expand `ty::UnevaluatedConst` to `ty::Const`. I also remember some other places where using `ty::UnevaluatedConst` directly was annoying and caused issues, though I don't quite remember what they were rn '^^ r? `@oli-obk` cc `@JulianKnodt`
2022-10-21fix some typosRageking8-1/+1
2022-10-19Make ClosureOutlivesRequirement not rely on an unresolved typeMichael Goulet-7/+11
2022-10-18`const_evaluatable_unchecked` to const evallcnr-1/+25
2022-10-17add inline to `TrivialTypeTraversalImpls`lcnr-12/+6
2022-10-17mir constants: type traversing bye byelcnr-72/+10
2022-10-15Auto merge of #101832 - compiler-errors:dyn-star-plus, r=eholkbors-2/+2
Make `dyn*` casts into a coercion, allow `dyn*` upcasting I know that `dyn*` is likely not going to be a feature exposed to surface Rust, but this makes it slightly more ergonomic to write tests for these types anyways. ... and this was just fun to implement anyways. 1. Make `dyn*` into a coercion instead of a cast 2. Enable `dyn*` upcasting since we basically get it for free 3. Simplify some of the cast checking code since we're using the coercion path now r? `@eholk` but feel free to reassign cc `@nikomatsakis` and `@tmandry` who might care about making `dyn*` casts into a coercion
2022-10-14more dupe word typosRageking8-1/+1
2022-10-14Make dyn* cast into a coercionMichael Goulet-2/+2
2022-10-12Use `tidy-alphabetical` in the compilerNilstrieb-2/+4
2022-10-08Rollup merge of #102675 - ouz-a:mir-technical-debt, r=oli-obkMatthias Krüger-3/+14
Remove `mir::CastKind::Misc` As discussed in #97649 `mir::CastKind::Misc` is not clear, this PR addresses that by creating a new enum variant for every valid cast. r? ````@oli-obk````
2022-10-07make const_err a hard errorRalf Jung-18/+1
2022-10-06Remove `mir::CastKind::Misc`ouz-a-3/+14
2022-10-04It's not about types or consts, but the lack of regionsOli Scherer-6/+6
2022-09-26remove cfg(bootstrap)Pietro Albini-1/+0
2022-09-24separate definitions and `HIR` ownersTakayuki Maeda-2/+2
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-23rename Unevaluated to UnevaluatedConstb-naber-19/+22
2022-09-22address reviewb-naber-5/+5
2022-09-22introduce mir::Unevaluatedb-naber-10/+70
2022-09-20Rollup merge of #102021 - lcnr:tyConst-fun, r=b-naber,BoxyUwUMichael Howell-9/+2
some post-valtree cleanup r? project-const-generics cc ```@b-naber```
2022-09-20Rollup merge of #101976 - RalfJung:mir-semantic-phases, r=oli-obkMichael Howell-3/+4
MirPhase: clarify that linting is not a semantic change r? ```@JakobDegen```
2022-09-20Auto merge of #99806 - oli-obk:unconstrained_opaque_type, r=estebankbors-3/+23
Allow patterns to constrain the hidden type of opaque types fixes #96572 reverts a revert as original PR was a perf regression that was fixed by reverting it: https://github.com/rust-lang/rust/pull/99368#issuecomment-1186587864) TODO: * check if https://github.com/rust-lang/rust/issues/99685 is avoided
2022-09-19`DestructuredConst` split mir and tylcnr-9/+2
2022-09-19remove the `Subst` trait, always use `EarlyBinder`lcnr-2/+1
2022-09-19Auto merge of #101924 - jackh726:revert-static-hrtb-error, r=compiler-errorsbors-2/+2
Re-add HRTB implied static bug note r? `@compiler-errors` since you reviewed it previously I deleted a `normalize` call and forgot about it. Whoops.
2022-09-18clarify that linting is not a semantic changeRalf Jung-3/+4
2022-09-17Auto merge of #98588 - b-naber:valtrees-cleanup, r=lcnrbors-46/+89
Use only ty::Unevaluated<'tcx, ()> in type system r? `@lcnr`
2022-09-16Make QueryOutlivesConstraint contain a ConstraintCategoryJack Huey-2/+2
2022-09-16Revert "Better errors for implied static bound"Jack Huey-2/+2
This reverts commit c75817b0a75d4b6b01ee10900ba5d01d4915e6a8.
2022-09-16Revert "Revert "Rollup merge of #98582 - oli-obk:unconstrained_opaque_type, ↵Oli Scherer-3/+23
r=estebank"" This reverts commit 4a742a691e7dd2522bad68b86fe2fd5a199d5561.
2022-09-15nitsb-naber-0/+1
2022-09-15Merge all `TypeVisitable for &List<T>` impls into one generic oneOli Scherer-6/+0
2022-09-15Replace more manual TypeFoldable and TypeVisitable impls with derivesOli Scherer-1/+1
2022-09-15derive TypeVisitable and TypeFoldable for mir typesOli Scherer-312/+25
2022-09-15Derive TypeFoldable and TypeVisitable for mir::PlaceElementOli Scherer-32/+1
2022-09-15derive various Lift impl instead of hand rolling themOli Scherer-30/+2
2022-09-14Auto merge of #101212 - eholk:dyn-star, r=compiler-errorsbors-0/+3
Initial implementation of dyn* This PR adds extremely basic and incomplete support for [dyn*](https://smallcultfollowing.com/babysteps//blog/2022/03/29/dyn-can-we-make-dyn-sized/). The goal is to get something in tree behind a flag to make collaboration easier, and also to make sure the implementation so far is not unreasonable. This PR does quite a few things: * Introduce `dyn_star` feature flag * Adds parsing for `dyn* Trait` types * Defines `dyn* Trait` as a sized type * Adds support for explicit casts, like `42usize as dyn* Debug` * Including const evaluation of such casts * Adds codegen for drop glue so things are cleaned up properly when a `dyn* Trait` object goes out of scope * Adds codegen for method calls, at least for methods that take `&self` Quite a bit is still missing, but this gives us a starting point. Note that this is never intended to become stable surface syntax for Rust, but rather `dyn*` is planned to be used as an implementation detail for async functions in dyn traits. Joint work with `@nikomatsakis` and `@compiler-errors.` r? `@bjorn3`
2022-09-14address review againb-naber-14/+5
2022-09-13Better errors for implied static boundJack Huey-2/+2
2022-09-13Only keep one version of ImplicitSelfKind.Camille GILLOT-17/+1
2022-09-13address reviewb-naber-11/+3
2022-09-13remove visit_const from mir visitorsb-naber-17/+13
2022-09-13fixes/working versionb-naber-1/+5
2022-09-13use ty::Unevaluated<'tcx, ()> in type systemb-naber-21/+80
2022-09-12dyn* through more typechecking and MIREric Holk-0/+3
2022-09-12Rollup merge of #100767 - kadiwa4:escape_ascii, r=jackh726Dylan DPC-9/+1
Remove manual <[u8]>::escape_ascii `@rustbot` label: +C-cleanup
2022-09-08Rollup merge of #101545 - TaKO8Ki:remove-unnecessary-partialord-ord, r=oli-obkDylan DPC-2/+2
Remove unnecessary `PartialOrd` and `Ord`
2022-09-08remove unnecessary `PartialOrd` and `Ord`Takayuki Maeda-2/+2
2022-09-07Use niche-filling optimization even when multiple variants have data.Michael Benfield-1/+2
Fixes #46213