summary refs log tree commit diff
path: root/compiler/rustc_middle/src/mir/syntax.rs
AgeCommit message (Collapse)AuthorLines
2023-01-16Add cycle checking to cleanup control flow validationJakob Degen-4/+7
2023-01-16Document wf constraints on control flow in cleanup blocksJakob Degen-0/+7
Also fixes a bug in dominator computation
2022-12-22Auto merge of #103957 - JakobDegen:drop-retag, r=RalfJungbors-8/+7
Retag as FnEntry on `drop_in_place` This commit changes the mir drop shim to always retag its argument as if it were a `&mut`. cc rust-lang/unsafe-code-guidelines#373
2022-12-21Don't run `Drop` terminators on types that do not have drop glue in const evalJakob Degen-8/+7
2022-12-21Forbid `RetagKind::TwoPhase` as wellJakob Degen-2/+1
2022-12-21Clarify that raw retags are not permitted in MirJakob Degen-2/+5
2022-12-19Revert "Auto merge of #103880 - b-naber:field-ty-mir, r=lcnr"Rémy Rakic-35/+4
This reverts commit 03770f0e2b60c02db8fcf52fed5fb36aac70cedc, reversing changes made to 01ef4b21dc5251b58bd9c6fd6face2ae95d56da1.
2022-12-16Auto merge of #103880 - b-naber:field-ty-mir, r=lcnrbors-4/+35
Use non-ascribed type as field's type in mir Fixes https://github.com/rust-lang/rust/issues/96514 r? `@lcnr`
2022-12-14address reviewb-naber-1/+8
2022-12-09Remove unneeded field from `SwitchTargets`Jakob Degen-6/+0
2022-12-09Rollup merge of #105455 - lcnr:correct-reveal-in-validate, r=jackh726Matthias Krüger-0/+8
use the correct `Reveal` during validation supersedes #105454. Deals with https://github.com/rust-lang/rust/issues/105009#issuecomment-1342395333, not closing #105009 as the ICE may leak into beta The issue was the following: - we optimize the mir, using `Reveal::All` - some optimization relies on the hidden type of an opaque type - we then validate using `Reveal::UserFacing` again which is not able to observe the hidden type r? `@jackh726`
2022-12-08validate: use the correct reveal during optslcnr-0/+8
2022-12-06make retagging work even with 'unstable' placesRalf Jung-1/+1
2022-12-01Don't go through the formatting infrastructure just to get the name of a phaseOli Scherer-0/+13
2022-11-25Add empty ConstKind::Abstractkadmin-2/+4
Initial pass at expr/abstract const/s Address comments Switch to using a list instead of &[ty::Const], rm `AbstractConst` Remove try_unify_abstract_consts Update comments Add edits Recurse more More edits Prevent equating associated consts Move failing test to ui Changes this test from incremental to ui, and mark it as failing and a known bug. Does not cause the compiler to ICE, so should be ok.
2022-11-23use no type in ProjectionElem::Field for PlaceBuilder::UpVarb-naber-4/+28
2022-11-13fix some typos in commentscui fliter-1/+1
Signed-off-by: cui fliter <imcusg@gmail.com>
2022-10-12Use `tidy-alphabetical` in the compilerNilstrieb-1/+2
2022-10-06Remove `mir::CastKind::Misc`ouz-a-2/+6
2022-09-26remove cfg(bootstrap)Pietro Albini-1/+0
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-18clarify that linting is not a semantic changeRalf Jung-3/+4
2022-09-16Revert "Revert "Rollup merge of #98582 - oli-obk:unconstrained_opaque_type, ↵Oli Scherer-0/+7
r=estebank"" This reverts commit 4a742a691e7dd2522bad68b86fe2fd5a199d5561.
2022-09-15derive TypeVisitable and TypeFoldable for mir typesOli Scherer-5/+6
2022-09-15Derive TypeFoldable and TypeVisitable for mir::PlaceElementOli Scherer-1/+1
2022-09-12dyn* through more typechecking and MIREric Holk-0/+2
2022-09-08Rollup merge of #101545 - TaKO8Ki:remove-unnecessary-partialord-ord, r=oli-obkDylan DPC-1/+1
Remove unnecessary `PartialOrd` and `Ord`
2022-09-08remove unnecessary `PartialOrd` and `Ord`Takayuki Maeda-1/+1
2022-09-07Use niche-filling optimization even when multiple variants have data.Michael Benfield-1/+2
Fixes #46213
2022-09-06Update docsOli Scherer-2/+2
2022-09-06Generalize the Assume intrinsic statement to a general Intrinsic statementOli Scherer-11/+39
2022-09-06Lower the assume intrinsic to a MIR statementOli Scherer-0/+8
2022-08-31Fix a bunch of typoDezhi Wu-2/+2
This PR will fix some typos detected by [typos]. I only picked the ones I was sure were spelling errors to fix, mostly in the comments. [typos]: https://github.com/crate-ci/typos
2022-08-30Refactor MIR phasesJakob Degen-54/+89
2022-08-01Rollup merge of #100003 - nnethercote:improve-size-assertions, r=lqdMatthias Krüger-17/+12
Improve size assertions. - For any file with four or more size assertions, move them into a separate module (as is already done for `hir.rs`). - Add some more for AST nodes and THIR nodes. - Put the `hir.rs` ones in alphabetical order. r? `@lqd`
2022-08-01Improve size assertions.Nicholas Nethercote-17/+12
- For any file with four or more size assertions, move them into a separate module (as is already done for `hir.rs`). - Add some more for AST nodes and THIR nodes. - Put the `hir.rs` ones in alphabetical order.
2022-07-30Use LocalDefId for closures moreCameron Steffen-5/+11
2022-07-20Revert "Rollup merge of #98582 - oli-obk:unconstrained_opaque_type, r=estebank"Oli Scherer-7/+0
This reverts commit 6f8fb911ad504b77549cf3256a09465621beab9d, reversing changes made to 7210e46dc69a4b197a313d093fe145722c248b7d.
2022-07-15Introduce opaque type to hidden type projectionOli Scherer-0/+7
2022-07-12add new rval, pull deref earlyouz-a-3/+13
2022-07-08Clarify MIR semantics of storage statementsJakob Degen-13/+13
2022-07-06Rollup merge of #98984 - pierwill:patch-4, r=RalfJungGuillaume Gomez-1/+1
Remove erroneous doc comment Fixes the formatting issue shown here: <img width="803" alt="Screen Shot 2022-07-06 at 12 50 56 PM" src="https://user-images.githubusercontent.com/19642016/177612734-2d881c6a-2850-4c1b-8f1a-08339ad5bfbc.png">
2022-07-06Remove erroneous doc commentpierwill-1/+1
2022-07-06docs: Add overview of `rustc_middle::mir::TerminatorKind`pierwill-0/+2
2022-07-06Auto merge of #98206 - eggyal:align-to-chalk-folding-api, r=jackh726bors-4/+8
Split TypeVisitable from TypeFoldable Impl of rust-lang/compiler-team#520 following MCP approval. r? `@ghost`
2022-07-05Add #[derive(TypeVisitable)]Alan Egerton-4/+8
2022-07-05always check overflow in CheckedBinOp in CTFERalf Jung-2/+3
2022-07-04Rollup merge of #98878 - lcnr:more-rustc_pass_by_value, r=oli-obkMatthias Krüger-0/+1
add more `rustc_pass_by_value` r? ```@oli-obk``` cc #98766
2022-07-04more `rustc_pass_by_value`lcnr-0/+1
2022-06-30Clarify MIR semantics of checked binary operationsTomasz Miąsko-4/+12