]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_typeck/src/astconv/generics.rs
New upstream version 1.65.0+dfsg1
[rustc.git] / compiler / rustc_typeck / src / astconv / generics.rs
index 40aa27a29e957ce0955a64a020cce48281cd7ce0..afac75de2d96d8e831fab717695e89e896938bd7 100644 (file)
@@ -298,9 +298,8 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
                                     // show that order to the user as a possible order for the parameters
                                     let mut param_types_present = defs
                                         .params
-                                        .clone()
-                                        .into_iter()
-                                        .map(|param| (param.kind.to_ord(), param))
+                                        .iter()
+                                        .map(|param| (param.kind.to_ord(), param.clone()))
                                         .collect::<Vec<(ParamKindOrd, GenericParamDef)>>();
                                     param_types_present.sort_by_key(|(ord, _)| *ord);
                                     let (mut param_types_present, ordered_params): (
@@ -648,7 +647,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
                 multispan.push_span_label(span_late, note);
                 tcx.struct_span_lint_hir(
                     LATE_BOUND_LIFETIME_ARGUMENTS,
-                    args.args[0].id(),
+                    args.args[0].hir_id(),
                     multispan,
                     |lint| {
                         lint.build(msg).emit();