diff options
| author | Oli Scherer <github35764891676564198441@oli-obk.de> | 2021-03-26 16:33:14 +0000 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2021-04-20 09:30:28 -0400 |
| commit | a46bc5664a88f7a4ffdd74e5a45c5e2c2e31826e (patch) | |
| tree | 3ae4699370885f173c7f8e1a7b4ccb579eb077de | |
| parent | a2f217902675d8ad29ecb79a8c153b485d85cb7b (diff) | |
| download | rust-a46bc5664a88f7a4ffdd74e5a45c5e2c2e31826e.tar.gz rust-a46bc5664a88f7a4ffdd74e5a45c5e2c2e31826e.zip | |
Tidy
| -rw-r--r-- | compiler/rustc_middle/src/mir/mod.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_mir/src/transform/const_prop.rs | 6 | ||||
| -rw-r--r-- | src/test/ui/async-await/large_moves.rs | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs index 1ebb3dbe7c6..e22c0b40d5a 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -1952,7 +1952,10 @@ impl SourceScope { /// Finds the original HirId this MIR item came from. /// This is necessary after MIR optimizations, as otherwise we get a HirId /// from the function that was inlined instead of the function call site. - pub fn lint_root(self, source_scopes: &IndexVec<SourceScope, SourceScopeData<'tcx>>) -> Option<HirId> { + pub fn lint_root( + self, + source_scopes: &IndexVec<SourceScope, SourceScopeData<'tcx>>, + ) -> Option<HirId> { let mut data = &source_scopes[self]; // FIXME(oli-obk): we should be able to just walk the `inlined_parent_scope`, but it // does not work as I thought it would. Needs more investigation and documentation. diff --git a/compiler/rustc_mir/src/transform/const_prop.rs b/compiler/rustc_mir/src/transform/const_prop.rs index 0d48ff6530e..5968bbbfca7 100644 --- a/compiler/rustc_mir/src/transform/const_prop.rs +++ b/compiler/rustc_mir/src/transform/const_prop.rs @@ -13,9 +13,9 @@ use rustc_middle::mir::visit::{ MutVisitor, MutatingUseContext, NonMutatingUseContext, PlaceContext, Visitor, }; use rustc_middle::mir::{ - AssertKind, BasicBlock, BinOp, Body, Constant, ConstantKind, Local, LocalDecl, - LocalKind, Location, Operand, Place, Rvalue, SourceInfo, SourceScope, SourceScopeData, - Statement, StatementKind, Terminator, TerminatorKind, UnOp, RETURN_PLACE, + AssertKind, BasicBlock, BinOp, Body, Constant, ConstantKind, Local, LocalDecl, LocalKind, + Location, Operand, Place, Rvalue, SourceInfo, SourceScope, SourceScopeData, Statement, + StatementKind, Terminator, TerminatorKind, UnOp, RETURN_PLACE, }; use rustc_middle::ty::layout::{HasTyCtxt, LayoutError, TyAndLayout}; use rustc_middle::ty::subst::{InternalSubsts, Subst}; diff --git a/src/test/ui/async-await/large_moves.rs b/src/test/ui/async-await/large_moves.rs index fff23db3351..612433f2678 100644 --- a/src/test/ui/async-await/large_moves.rs +++ b/src/test/ui/async-await/large_moves.rs @@ -20,4 +20,4 @@ fn main() { async fn thing(y: &[u8]) { dbg!(y); -} \ No newline at end of file +} |
