Remove redundant [..]s
This commit is contained in:
@@ -530,6 +530,6 @@ impl CodegenUnitNameBuilder<'tcx> {
|
||||
write!(cgu_name, ".{}", special_suffix).unwrap();
|
||||
}
|
||||
|
||||
Symbol::intern(&cgu_name[..])
|
||||
Symbol::intern(&cgu_name)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ impl<'tcx> TerminatorKind<'tcx> {
|
||||
| InlineAsm { destination: Some(ref t), cleanup: Some(ref u), .. } => {
|
||||
Some(t).into_iter().chain(slice::from_ref(u))
|
||||
}
|
||||
SwitchInt { ref targets, .. } => None.into_iter().chain(&targets.targets[..]),
|
||||
SwitchInt { ref targets, .. } => None.into_iter().chain(&targets.targets),
|
||||
FalseEdge { ref real_target, ref imaginary_target } => {
|
||||
Some(real_target).into_iter().chain(slice::from_ref(imaginary_target))
|
||||
}
|
||||
@@ -380,7 +380,7 @@ impl<'tcx> TerminatorKind<'tcx> {
|
||||
| InlineAsm { destination: Some(ref mut t), cleanup: Some(ref mut u), .. } => {
|
||||
Some(t).into_iter().chain(slice::from_mut(u))
|
||||
}
|
||||
SwitchInt { ref mut targets, .. } => None.into_iter().chain(&mut targets.targets[..]),
|
||||
SwitchInt { ref mut targets, .. } => None.into_iter().chain(&mut targets.targets),
|
||||
FalseEdge { ref mut real_target, ref mut imaginary_target } => {
|
||||
Some(real_target).into_iter().chain(slice::from_mut(imaginary_target))
|
||||
}
|
||||
|
||||
@@ -587,18 +587,18 @@ impl<'tcx, N> ImplSource<'tcx, N> {
|
||||
pub fn borrow_nested_obligations(&self) -> &[N] {
|
||||
match &self {
|
||||
ImplSource::UserDefined(i) => &i.nested[..],
|
||||
ImplSource::Param(n, _) => &n[..],
|
||||
ImplSource::Builtin(i) => &i.nested[..],
|
||||
ImplSource::AutoImpl(d) => &d.nested[..],
|
||||
ImplSource::Closure(c) => &c.nested[..],
|
||||
ImplSource::Generator(c) => &c.nested[..],
|
||||
ImplSource::Object(d) => &d.nested[..],
|
||||
ImplSource::FnPointer(d) => &d.nested[..],
|
||||
ImplSource::Param(n, _) => &n,
|
||||
ImplSource::Builtin(i) => &i.nested,
|
||||
ImplSource::AutoImpl(d) => &d.nested,
|
||||
ImplSource::Closure(c) => &c.nested,
|
||||
ImplSource::Generator(c) => &c.nested,
|
||||
ImplSource::Object(d) => &d.nested,
|
||||
ImplSource::FnPointer(d) => &d.nested,
|
||||
ImplSource::DiscriminantKind(ImplSourceDiscriminantKindData)
|
||||
| ImplSource::Pointee(ImplSourcePointeeData)
|
||||
| ImplSource::ConstDrop(ImplSourceConstDropData) => &[],
|
||||
ImplSource::TraitAlias(d) => &d.nested[..],
|
||||
ImplSource::TraitUpcasting(d) => &d.nested[..],
|
||||
ImplSource::TraitAlias(d) => &d.nested,
|
||||
ImplSource::TraitUpcasting(d) => &d.nested,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user