Upgrade to Rust 1.17.

- Remove some uses of 'static in const and static globals that are no
  longer needed.
- Use the new struct initialization shorthand.
This commit is contained in:
Jakob Stoklund Olesen
2017-04-27 12:28:18 -07:00
parent eaf1ed09fc
commit ee5f035e31
31 changed files with 118 additions and 153 deletions

View File

@@ -56,7 +56,7 @@ impl<'c, 'fc, 'fd> InsertBuilder<'c, 'fc, 'fd> {
pub fn new(dfg: &'fd mut DataFlowGraph,
pos: &'c mut Cursor<'fc>)
-> InsertBuilder<'c, 'fc, 'fd> {
InsertBuilder { dfg: dfg, pos: pos }
InsertBuilder { dfg, pos }
}
/// Reuse result values in `reuse`.
@@ -72,7 +72,7 @@ impl<'c, 'fc, 'fd> InsertBuilder<'c, 'fc, 'fd> {
InsertReuseBuilder {
dfg: self.dfg,
pos: self.pos,
reuse: reuse,
reuse,
}
}
@@ -154,10 +154,7 @@ pub struct ReplaceBuilder<'f> {
impl<'f> ReplaceBuilder<'f> {
/// Create a `ReplaceBuilder` that will overwrite `inst`.
pub fn new(dfg: &'f mut DataFlowGraph, inst: Inst) -> ReplaceBuilder {
ReplaceBuilder {
dfg: dfg,
inst: inst,
}
ReplaceBuilder { dfg, inst }
}
}