Skip to content

Commit f668999

Browse files
committedJul 6, 2017
use field init shorthand in src/librustc
The field init shorthand syntax was stabilized in 1.17.0 (aebd94f); we are now free to use it in the compiler.
1 parent 8cab2c7 commit f668999

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+374
-374
lines changed
 

‎src/librustc/cfg/construct.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,20 @@ pub fn construct<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
5858
let tables = tcx.typeck_tables_of(owner_def_id);
5959

6060
let mut cfg_builder = CFGBuilder {
61-
tcx: tcx,
61+
tcx,
6262
owner_def_id,
63-
tables: tables,
64-
graph: graph,
65-
fn_exit: fn_exit,
63+
tables,
64+
graph,
65+
fn_exit,
6666
loop_scopes: Vec::new(),
6767
breakable_block_scopes: Vec::new(),
6868
};
6969
body_exit = cfg_builder.expr(&body.value, entry);
7070
cfg_builder.add_contained_edge(body_exit, fn_exit);
7171
let CFGBuilder { graph, .. } = cfg_builder;
7272
CFG {
73-
graph: graph,
74-
entry: entry,
73+
graph,
74+
entry,
7575
exit: fn_exit,
7676
}
7777
}

‎src/librustc/dep_graph/dep_tracking_map.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl<M: DepTrackingMapConfig> DepTrackingMap<M> {
3636
pub fn new(graph: DepGraph) -> DepTrackingMap<M> {
3737
DepTrackingMap {
3838
phantom: PhantomData,
39-
graph: graph,
39+
graph,
4040
map: FxHashMap(),
4141
}
4242
}

0 commit comments

Comments
 (0)
Please sign in to comment.