about summary refs log tree commit diff
path: root/compiler/rustc_passes/src/region.rs
AgeCommit message (Collapse)AuthorLines
2022-05-22factor out the rvalue lifetime ruleDing Xiang Fei-855/+0
remove region_scope_tree from RegionCtxt Apply suggestions from code review Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
2022-03-31Rollup merge of #95497 - nyurik:compiler-spell-comments, r=compiler-errorsDylan DPC-1/+1
Spellchecking compiler comments This PR cleans up the rest of the spelling mistakes in the compiler comments. This PR does not change any literal or code spelling issues.
2022-03-30Spellchecking compiler commentsYuri Astrakhan-1/+1
This PR cleans up the rest of the spelling mistakes in the compiler comments. This PR does not change any literal or code spelling issues.
2022-03-29Remember mutability in `DefKind::Static`.Camille GILLOT-1/+1
This allows to compute the `BodyOwnerKind` from `DefKind` only, and removes a direct dependency of some MIR queries onto HIR. As a side effect, it also simplifies metadata, since we don't need 4 flavours of `EntryKind::*Static` any more.
2022-01-18More comments and small cleanupsEric Holk-0/+1
2022-01-18Track drops across multiple yieldsEric Holk-2/+9
2022-01-18Track drop points in generator_interiorEric Holk-1/+0
This change adds the basic infrastructure for tracking drop ranges in generator interior analysis, which allows us to exclude dropped types from the generator type. Not yet complete, but many of the async/await and generator tests pass. The main missing piece is tracking branching control flow (e.g. around an `if` expression). The patch does include support, however, for multiple yields in th e same block. Issue #57478
2022-01-16Replace NestedVisitorMap with NestedFilterCameron Steffen-7/+1
2021-12-13Fix rebase and clippy testsEsteban Kuber-4/+7
2021-11-28Remove unused root_parent.Camille GILLOT-13/+1
2021-11-07Rename functions reflect that inline const is also "typeck_child"Gary Guo-3/+3
2021-11-07Implement type inference for inline constsGary Guo-2/+3
In most cases it is handled in the same way as closures.
2021-09-11don't convert types into identical typesMatthias Krüger-1/+1
example: let x: String = String::new().into();
2021-09-01Fix drop handling for `if let` expressionsMatthew Jasper-5/+6
MIR lowering for `if let` expressions is now more complicated now that `if let` exists in HIR. This PR adds a scope for the variables bound in an `if let` expression and then uses an approach similar to how we handle loops to ensure that we reliably drop the correct variables.
2021-08-15Use correct drop scopes for if expressionsMatthew Jasper-4/+20
2021-05-11Split span_to_string into span_to_diagnostic/embeddable_stringAndy Wang-1/+1
2021-04-19Remove closure_treeCameron Steffen-14/+1
2021-02-09Rename HIR UnOp variantsÖmer Sinan Ağacan-1/+1
This renames the variants in HIR UnOp from enum UnOp { UnDeref, UnNot, UnNeg, } to enum UnOp { Deref, Not, Neg, } Motivations: - This is more consistent with the rest of the code base where most enum variants don't have a prefix. - These variants are never used without the `UnOp` prefix so the extra `Un` prefix doesn't help with readability. E.g. we don't have any `UnDeref`s in the code, we only have `UnOp::UnDeref`. - MIR `UnOp` type variants don't have a prefix so this is more consistent with MIR types. - "un" prefix reads like "inverse" or "reverse", so as a beginner in rustc code base when I see "UnDeref" what comes to my mind is something like "&*" instead of just "*".
2021-01-21Add loop head span to hirEsteban Küber-1/+1
2021-01-07Reintroduce hir::ExprKind::IfCaio-0/+11
2020-08-30mv compiler to compiler/mark-0/+847