diff options
| author | iirelu <anna@bawk.space> | 2016-10-29 22:54:04 +0100 | 
|---|---|---|
| committer | iirelu <anna@bawk.space> | 2016-10-31 22:51:40 +0000 | 
| commit | e593c3b89343a98bdcc76ce9f5869ff18882dfff (patch) | |
| tree | 86cc097322145fde8ec27dca59fa70787e5cddc3 /src/librustc/cfg/construct.rs | |
| parent | f26eedb571c8e3f55385f3933be256689deed277 (diff) | |
| download | rust-e593c3b89343a98bdcc76ce9f5869ff18882dfff.tar.gz rust-e593c3b89343a98bdcc76ce9f5869ff18882dfff.zip | |
Changed most vec! invocations to use square braces
Most of the Rust community agrees that the vec! macro is clearer when called using square brackets [] instead of regular brackets (). Most of these ocurrences are from before macros allowed using different types of brackets. There is one left unchanged in a pretty-print test, as the pretty printer still wants it to have regular brackets.
Diffstat (limited to 'src/librustc/cfg/construct.rs')
| -rw-r--r-- | src/librustc/cfg/construct.rs | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/src/librustc/cfg/construct.rs b/src/librustc/cfg/construct.rs index 50d4cbc982e..1b2976b7435 100644 --- a/src/librustc/cfg/construct.rs +++ b/src/librustc/cfg/construct.rs @@ -536,7 +536,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> { fn add_contained_edge(&mut self, source: CFGIndex, target: CFGIndex) { - let data = CFGEdgeData {exiting_scopes: vec!() }; + let data = CFGEdgeData {exiting_scopes: vec![] }; self.graph.add_edge(source, target, data); } @@ -545,7 +545,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> { from_index: CFGIndex, to_loop: LoopScope, to_index: CFGIndex) { - let mut data = CFGEdgeData {exiting_scopes: vec!() }; + let mut data = CFGEdgeData {exiting_scopes: vec![] }; let mut scope = self.tcx.region_maps.node_extent(from_expr.id); let target_scope = self.tcx.region_maps.node_extent(to_loop.loop_id); while scope != target_scope { @@ -559,7 +559,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> { _from_expr: &hir::Expr, from_index: CFGIndex) { let mut data = CFGEdgeData { - exiting_scopes: vec!(), + exiting_scopes: vec![], }; for &LoopScope { loop_id: id, .. } in self.loop_scopes.iter().rev() { data.exiting_scopes.push(id); | 
