Elide elidable lifetime parameters.

This commit is contained in:
Dan Gohman
2017-11-06 11:09:56 -08:00
parent 8501cb798e
commit d9743290ea
2 changed files with 4 additions and 4 deletions

View File

@@ -660,14 +660,14 @@ impl DataFlowGraph {
impl Index<Inst> for DataFlowGraph { impl Index<Inst> for DataFlowGraph {
type Output = InstructionData; type Output = InstructionData;
fn index<'a>(&'a self, inst: Inst) -> &'a InstructionData { fn index(&self, inst: Inst) -> &InstructionData {
&self.insts[inst] &self.insts[inst]
} }
} }
/// Allow mutable access to instructions via indexing. /// Allow mutable access to instructions via indexing.
impl IndexMut<Inst> for DataFlowGraph { impl IndexMut<Inst> for DataFlowGraph {
fn index_mut<'a>(&'a mut self, inst: Inst) -> &'a mut InstructionData { fn index_mut(&mut self, inst: Inst) -> &mut InstructionData {
&mut self.insts[inst] &mut self.insts[inst]
} }
} }

View File

@@ -289,13 +289,13 @@ impl VariableArgs {
impl Deref for VariableArgs { impl Deref for VariableArgs {
type Target = [Value]; type Target = [Value];
fn deref<'a>(&'a self) -> &'a [Value] { fn deref(&self) -> &[Value] {
&self.0 &self.0
} }
} }
impl DerefMut for VariableArgs { impl DerefMut for VariableArgs {
fn deref_mut<'a>(&'a mut self) -> &'a mut [Value] { fn deref_mut(&mut self) -> &mut [Value] {
&mut self.0 &mut self.0
} }
} }