]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_ast_lowering/src/path.rs
Rollup merge of #101425 - compiler-errors:point-at-ty-param, r=spastorino
[rust.git] / compiler / rustc_ast_lowering / src / path.rs
index 5874d08a94fe06bac55a516e8abef538f386aa58..de1467b1b07d6bee2031d423ca2b7d847e585ec5 100644 (file)
@@ -13,7 +13,6 @@
 use rustc_span::{BytePos, Span, DUMMY_SP};
 
 use smallvec::smallvec;
-use tracing::debug;
 
 impl<'a, 'hir> LoweringContext<'a, 'hir> {
     #[instrument(level = "trace", skip(self))]
@@ -251,16 +250,16 @@ pub(crate) fn lower_path_segment(
         }
 
         let res = self.expect_full_res(segment.id);
-        let id = self.lower_node_id(segment.id);
+        let hir_id = self.lower_node_id(segment.id);
         debug!(
             "lower_path_segment: ident={:?} original-id={:?} new-id={:?}",
-            segment.ident, segment.id, id,
+            segment.ident, segment.id, hir_id,
         );
 
         hir::PathSegment {
             ident: self.lower_ident(segment.ident),
-            hir_id: Some(id),
-            res: Some(self.lower_res(res)),
+            hir_id,
+            res: self.lower_res(res),
             infer_args,
             args: if generic_args.is_empty() && generic_args.span.is_empty() {
                 None
@@ -359,7 +358,7 @@ fn lower_parenthesized_parameter_data(
             }
             FnRetTy::Default(_) => self.arena.alloc(self.ty_tup(*span, &[])),
         };
-        let args = smallvec![GenericArg::Type(self.ty_tup(*inputs_span, inputs))];
+        let args = smallvec![GenericArg::Type(self.arena.alloc(self.ty_tup(*inputs_span, inputs)))];
         let binding = self.output_ty_binding(output_ty.span, output_ty);
         (
             GenericArgsCtor {