Update rustfmt to 0.8.4; (#81)

This commit is contained in:
Benjamin Bouvier
2017-05-16 00:10:47 +02:00
committed by Jakob Stoklund Olesen
parent 232fb36d8f
commit 29dc723e25
20 changed files with 120 additions and 176 deletions

View File

@@ -316,37 +316,25 @@ impl DataFlowGraph {
/// Get the fixed value arguments on `inst` as a slice.
pub fn inst_fixed_args(&self, inst: Inst) -> &[Value] {
let fixed_args = self[inst]
.opcode()
.constraints()
.fixed_value_arguments();
let fixed_args = self[inst].opcode().constraints().fixed_value_arguments();
&self.inst_args(inst)[..fixed_args]
}
/// Get the fixed value arguments on `inst` as a mutable slice.
pub fn inst_fixed_args_mut(&mut self, inst: Inst) -> &mut [Value] {
let fixed_args = self[inst]
.opcode()
.constraints()
.fixed_value_arguments();
let fixed_args = self[inst].opcode().constraints().fixed_value_arguments();
&mut self.inst_args_mut(inst)[..fixed_args]
}
/// Get the variable value arguments on `inst` as a slice.
pub fn inst_variable_args(&self, inst: Inst) -> &[Value] {
let fixed_args = self[inst]
.opcode()
.constraints()
.fixed_value_arguments();
let fixed_args = self[inst].opcode().constraints().fixed_value_arguments();
&self.inst_args(inst)[fixed_args..]
}
/// Get the variable value arguments on `inst` as a mutable slice.
pub fn inst_variable_args_mut(&mut self, inst: Inst) -> &mut [Value] {
let fixed_args = self[inst]
.opcode()
.constraints()
.fixed_value_arguments();
let fixed_args = self[inst].opcode().constraints().fixed_value_arguments();
&mut self.inst_args_mut(inst)[fixed_args..]
}