about summary refs log tree commit diff
path: root/src/librustc/cfg
AgeCommit message (Collapse)AuthorLines
2019-04-25Introduce hir::ExprKind::Use and employ in for loop desugaring.Mazdak Farrokhzad-0/+1
Here, ExprKind::Use(P<Expr>) tweaks the drop order to act the same way as '{ let _tmp = expr; _tmp }' does.
2019-03-07hir: replace NodeId with HirId in Destinationljedrz-4/+4
2019-02-24hir: remove NodeId from Exprljedrz-1/+1
2019-02-18Fix style nitsDan Robertson-3/+5
Fix style nits discovered in reading code.
2019-02-05move librustc to 2018Mark Mansi-11/+11
2019-02-03cleanup: don't use node_to_hir_id where unneededljedrz-2/+1
2019-01-17Remove `hir::StmtKind::Decl`.Nicholas Nethercote-19/+10
It's a level of indirection that hurts far more than it helps. The code is simpler without it. (This commit cuts more than 120 lines of code.) In particular, this commit removes some unnecessary `Span`s within `DeclKind` that were always identical to those in the enclosing `Stmt`, and some unnecessary allocations via `P`.
2019-01-17Make `hir::Stmt` a separate struct.Nicholas Nethercote-4/+4
Benefits: - It lets us move the `NodeId` field out of every `hir::StmtKind` variant `NodeId` to a more sensible spot. - It eliminates sadness in `Stmt::fmt`. - It makes `hir::Stmt` match `ast::Stmt`.
2018-12-27AST/HIR: Introduce `ExprKind::Err` for better error recovery in the front-endVadim Petrochenkov-1/+2
2018-12-25Remove licensesMark Rousskov-30/+0
2018-12-11Update testsvarkor-1/+1
2018-12-11Consider privacy in more locationsvarkor-1/+2
2018-12-11Make uninhabitedness checking more intelligentvarkor-1/+1
2018-12-11Check for uninhabitedness instead of nevervarkor-2/+1
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-12-06Use a function to access the Hir map to be able to turn it into a query laterJohn Kåre Alsaker-9/+9
2018-11-13A few tweaks to iterations/collectingljedrz-2/+1
2018-10-05Remove graphviz::IntoCowljedrz-8/+7
2018-09-15Make rustc::middle::region::Scope's fields publicMarshall Bowers-5/+14
2018-08-30introduce Guard enumF001-2/+3
2018-07-29Replace push loops with collect() and extend() where possibleljedrz-5/+5
2018-07-16ExprKindcsmoe-34/+34
2018-07-16DeclKindcsmoe-2/+2
2018-07-16StmtKindcsmoe-3/+3
2018-07-12rename `control_flow_graph` to `graph`Niko Matsakis-2/+2
2018-07-12rename `graph` to `control_flow_graph::implementation`Niko Matsakis-3/+3
2018-06-23Rename ExprAgain to ExprContinuevarkor-1/+1
2018-05-17Rename trans to codegen everywhere.Irina Popa-3/+3
2018-05-16label-break-value: Parsing and AST/HIR changesest31-1/+1
2018-05-15Remove LoopIdResultest31-2/+2
It's redundant as Result already implements Encodable as well as Decodable.
2018-05-15Remove hir::ScopeTargetest31-9/+5
When we want to implement label-break-value, we can't really decide whether to emit ScopeTarget::Loop or ScopeTarget::Block in the code that is supposed to create it. So we get rid of it and reconstruct the information when needed.
2018-04-12AST/HIR: Merge field access expressions for named and numeric fieldsVadim Petrochenkov-1/+0
2018-03-28Remove adjacent all-const match arm hack.Felix S. Klock II-34/+8
An old fix for moves-in-guards had a hack for adjacent all-const match arms. The hack was explained in a comment, which you can see here: https://github.com/rust-lang/rust/pull/22580/files#diff-402a0fa4b3c6755c5650027c6d4cf1efR497 But hack was incomplete (and thus unsound), as pointed out here: https://github.com/rust-lang/rust/issues/47295#issuecomment-357108458 Plus, it is likely to be at least tricky to reimplement this hack in the new NLL borrowck. So rather than try to preserve the hack, we want to try to just remove it outright. (At least to see the results of a crater run.) [breaking-change] This is a breaking-change, but our hope is that no one is actually relying on such an extreme special case. (We hypothesize the hack was originally added to accommodate a file in our own test suite, not code in the wild.)
2017-09-01rustc: rename CodeExtent to Scope and RegionMaps to ScopeTree.Eduard-Mihai Burtescu-8/+8
2017-09-01rustc: use hir::ItemLocalId instead of ast::NodeId in CodeExtent.Eduard-Mihai Burtescu-5/+8
2017-09-01rustc: use hir::ItemLocalId instead of ast::NodeId in CFG.Eduard-Mihai Burtescu-81/+84
2017-07-28Remove support for `gen arg`Alex Crichton-1/+0
2017-07-28Rename suspend to yieldJohn Kåre Alsaker-1/+1
2017-07-28Generator literal supportJohn Kåre Alsaker-0/+2
2017-07-05use field init shorthand in src/librustcZack M. Davis-6/+6
The field init shorthand syntax was stabilized in 1.17.0 (aebd94f); we are now free to use it in the compiler.
2017-06-01rustc: replace method_map with Def::Method and node_substs entries.Eduard-Mihai Burtescu-2/+2
2017-06-01rustc: avoid using MethodCallee's signature where possible.Eduard-Mihai Burtescu-6/+1
2017-06-01rustc: keep overloaded autoderef MethodCallee's in Adjust.Eduard-Mihai Burtescu-2/+1
2017-05-13rustc: stop interning CodeExtent, it's small enough.Eduard-Mihai Burtescu-2/+3
2017-04-30introduce per-fn RegionMapsTaylor Cramer-1/+5
Instead of requesting the region maps for the entire crate, request for a given item etc. Several bits of code were modified to take `&RegionMaps` as input (e.g., the `resolve_regions_and_report_errors()` function). I am not totally happy with this setup -- I *think* I'd rather have the region maps be part of typeck tables -- but at least the `RegionMaps` works in a "parallel" way to `FreeRegionMap`, so it's not too bad. Given that I expect a lot of this code to go away with NLL, I didn't want to invest *too* much energy tweaking it.
2017-04-30intern CodeExtentsNiko Matsakis-3/+3
Make a `CodeExtent<'tcx>` be something allocated in an arena instead of an index into the `RegionMaps`.
2017-04-30On-demandify region mappingTaylor Cramer-4/+4
2017-04-24rustc: rename some of the queries to match tcx methods.Eduard-Mihai Burtescu-1/+1
2017-03-30refactor the `targeted_by_break` fieldNiko Matsakis-2/+2
In master, this field was an arbitrary node-id (in fact, an id for something that doesn't even exist in the HIR -- the `catch` node). Breaks targeting this block used that id. In the newer system, this field is a boolean, and any breaks targeted this block will use the id of the block.
2017-03-30refactor if so that the "then type" is an expressionNiko Matsakis-2/+2