Skip to content

Rollup of 6 pull requests #60844

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 51 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
11426a4
refactor some `FnType` stuff to `rustc::ty::layout`
saleemjaffer May 10, 2019
677161e
Remove unnecessary secondary recursion
oli-obk Mar 18, 2019
35cf77f
Ignore .vscode even if it is a symlink
oli-obk Mar 26, 2019
f223eec
Reuse the pretty printing architecture for printing of constants
oli-obk Mar 29, 2019
72087ec
There's a tcx in scope, don't use the tls one
oli-obk Apr 2, 2019
7e7cd92
Merge the string printing paths of ty::Const
oli-obk Apr 2, 2019
17c6c8d
Print const chars escaped with surrounding quotes
oli-obk Apr 2, 2019
04ad22c
Don't use `ty::Const` without immediately interning
oli-obk Apr 3, 2019
3a4f5ab
Add test showing how byte slices are printed in MIR
oli-obk Apr 11, 2019
f4f82ff
Refactor string constant printing to prep for byte string printing
oli-obk Apr 11, 2019
1468f20
Make `ConstValue::Slice` solely take `[u8]` and `str`
oli-obk Apr 11, 2019
d46c964
Render const byte slices in MIR
oli-obk Apr 11, 2019
46704bf
`u8` is printed as a number, not a character
oli-obk Apr 15, 2019
983f676
Render unresolved anon consts like closures
oli-obk Apr 17, 2019
b7c094b
Group common printing code during constant pretty printing
oli-obk Apr 17, 2019
f2d2250
Print generic args in function calls in MIR
oli-obk Apr 17, 2019
830ce73
Fix tidy
oli-obk Apr 24, 2019
bb6f156
Use `write_char` to skip the formatting infrastructure
oli-obk Apr 24, 2019
05d8b4c
Print unevaluted constants as `_` or as their source representation
oli-obk Apr 24, 2019
681680d
Update ui tests
oli-obk Apr 24, 2019
816f755
rustc: integrate ty::Const into ty::print as print_const.
eddyb Mar 18, 2019
ed68cbe
Break cycle during array length printing
oli-obk May 3, 2019
b4bbf95
Fix rebase fallout
oli-obk May 7, 2019
7902347
Print types for unevaluated constants
oli-obk May 11, 2019
15acc32
Update ui tests
oli-obk May 11, 2019
6a08e4e
Only print integers in symbol path's constants
oli-obk May 11, 2019
d29f0d2
Move token tree related lexer state to a separate struct
matklad May 12, 2019
b91e0a3
move span and token to tt reader
matklad May 13, 2019
e249f2e
move raw span to tt reader
matklad May 13, 2019
19a9109
Remove unused parameter from in(_opt)?_scope
matthewjasper Mar 30, 2019
63f47b7
Give match arms an HirId and a Span
matthewjasper Mar 30, 2019
7a53e03
Respect lint attributes on match arms
matthewjasper Mar 30, 2019
ca8db94
Handle the visibility/lint scope distinction better
matthewjasper Apr 2, 2019
531c2f8
Give match arms a drop/region scope
matthewjasper Apr 3, 2019
bd8ecc6
Remove MIR borrowck hack for old match scopes
matthewjasper Apr 3, 2019
decfc9b
Emit fake borrows for all tests
matthewjasper Apr 3, 2019
4a6ba51
Schedule storage-dead of temporaries sooner
matthewjasper Apr 3, 2019
47c4e8c
Add a test for match scopes
matthewjasper Apr 3, 2019
8094d6e
Comment style fixes
Centril Apr 22, 2019
5b5255d
Fix match ergonomics suggestion
matthewjasper May 5, 2019
ea93215
Bump measureme dependency to 0.3
wesleywiser May 14, 2019
3031705
some more refactor of FnType. Things build now
saleemjaffer May 14, 2019
e1b3c79
refactor complete
saleemjaffer May 14, 2019
44eb607
removes `AbiMethods`
saleemjaffer May 14, 2019
3646b3c
rustbuild/LLVM: Do not print installation messages for up-to-date files
petrochenkov May 14, 2019
e7dd3eb
Rollup merge of #59276 - oli-obk:cleanups, r=eddyb
Centril May 15, 2019
d4a5588
Rollup merge of #60174 - matthewjasper:add-match-arm-scopes, r=pnkfelix
Centril May 15, 2019
efe0b01
Rollup merge of #60693 - saleemjaffer:refactor_fntype_stuff, r=eddyb
Centril May 15, 2019
4de841d
Rollup merge of #60763 - matklad:tt-parser, r=petrochenkov
Centril May 15, 2019
c486fb6
Rollup merge of #60811 - wesleywiser:bump_measureme, r=varkor
Centril May 15, 2019
566f4a9
Rollup merge of #60832 - petrochenkov:CLazy, r=Mark-Simulacrum
Centril May 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove MIR borrowck hack for old match scopes
  • Loading branch information
matthewjasper committed May 13, 2019
commit bd8ecc6f5df1e3b54ca3e17da8360de4b07a1905
39 changes: 8 additions & 31 deletions src/librustc_mir/dataflow/impls/mod.rs
Original file line number Diff line number Diff line change
@@ -11,8 +11,7 @@ use super::MoveDataParamEnv;

use crate::util::elaborate_drops::DropFlagState;

use super::move_paths::{HasMoveData, MoveData, MovePathIndex, InitIndex};
use super::move_paths::{LookupResult, InitKind};
use super::move_paths::{HasMoveData, MoveData, MovePathIndex, InitIndex, InitKind};
use super::{BitDenotation, BlockSets, InitialFlow};

use super::drop_flag_effects_for_function_entry;
@@ -470,35 +469,13 @@ impl<'a, 'gcx, 'tcx> BitDenotation<'tcx> for EverInitializedPlaces<'a, 'gcx, 'tc
sets.gen_all(&init_loc_map[location]);

match stmt.kind {
mir::StatementKind::StorageDead(local) |
mir::StatementKind::StorageLive(local) => {
// End inits for StorageDead and StorageLive, so that an immutable
// variable can be reinitialized on the next iteration of the loop.
//
// FIXME(#46525): We *need* to do this for StorageLive as well as
// StorageDead, because lifetimes of match bindings with guards are
// weird - i.e., this code
//
// ```
// fn main() {
// match 0 {
// a | a
// if { println!("a={}", a); false } => {}
// _ => {}
// }
// }
// ```
//
// runs the guard twice, using the same binding for `a`, and only
// storagedeads after everything ends, so if we don't regard the
// storagelive as killing storage, we would have a multiple assignment
// to immutable data error.
if let LookupResult::Exact(mpi) =
rev_lookup.find(&mir::Place::Base(mir::PlaceBase::Local(local))) {
debug!("stmt {:?} at loc {:?} clears the ever initialized status of {:?}",
stmt, location, &init_path_map[mpi]);
sets.kill_all(&init_path_map[mpi]);
}
mir::StatementKind::StorageDead(local) => {
// End inits for StorageDead, so that an immutable variable can
// be reinitialized on the next iteration of the loop.
let move_path_index = rev_lookup.find_local(local);
debug!("stmt {:?} at loc {:?} clears the ever initialized status of {:?}",
stmt, location, &init_path_map[move_path_index]);
sets.kill_all(&init_path_map[move_path_index]);
}
_ => {}
}