Skip to content

Commit 659ba09

Browse files
committed
Remove useless vector accumulation in type_vars_for_defs
1 parent 7366034 commit 659ba09

File tree

1 file changed

+0
-3
lines changed
  • src/librustc/middle/infer

1 file changed

+0
-3
lines changed

src/librustc/middle/infer/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,8 +1025,6 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
10251025
substs: &mut Substs<'tcx>,
10261026
defs: &[ty::TypeParameterDef<'tcx>]) {
10271027

1028-
let mut vars = Vec::with_capacity(defs.len());
1029-
10301028
for def in defs.iter() {
10311029
let default = def.default.map(|default| {
10321030
type_variable::Default {
@@ -1038,7 +1036,6 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
10381036

10391037
let ty_var = self.next_ty_var_with_default(default);
10401038
substs.types.push(space, ty_var);
1041-
vars.push(ty_var)
10421039
}
10431040
}
10441041

0 commit comments

Comments
 (0)