@@ -177,9 +177,7 @@ enum ImplTraitContext {
177177 /// Treat `impl Trait` as shorthand for a new universal generic parameter.
178178 /// Example: `fn foo(x: impl Debug)`, where `impl Debug` is conceptually
179179 /// equivalent to a fresh universal parameter like `fn foo<T: Debug>(x: T)`.
180- ///
181- /// We store a DefId here so we can look up necessary information later
182- Universal ( DefId ) ,
180+ Universal ,
183181
184182 /// Treat `impl Trait` as shorthand for a new universal existential parameter.
185183 /// Example: `fn foo() -> impl Debug`, where `impl Debug` is conceptually
@@ -803,7 +801,7 @@ impl<'a> LoweringContext<'a> {
803801 let ( in_band_defs, ( mut lowered_generics, res) ) = self . with_in_scope_lifetime_defs (
804802 & generics. params ,
805803 |this| {
806- let itctx = ImplTraitContext :: Universal ( parent_id ) ;
804+ let itctx = ImplTraitContext :: Universal ;
807805 this. collect_in_band_defs ( parent_id, anonymous_lifetime_mode, |this| {
808806 ( this. lower_generics ( generics, itctx) , f ( this) )
809807 } )
@@ -1169,7 +1167,7 @@ impl<'a> LoweringContext<'a> {
11691167 |this| this. lower_param_bounds ( bounds, itctx) ,
11701168 )
11711169 }
1172- ImplTraitContext :: Universal ( _def_id ) => {
1170+ ImplTraitContext :: Universal => {
11731171 self . lower_node_id ( def_node_id) ;
11741172 // Add a definition for the in-band TyParam
11751173 let def_index = self
@@ -1875,8 +1873,8 @@ impl<'a> LoweringContext<'a> {
18751873 let inputs = decl. inputs
18761874 . iter ( )
18771875 . map ( |arg| {
1878- if let Some ( def_id ) = fn_def_id {
1879- self . lower_ty_direct ( & arg. ty , ImplTraitContext :: Universal ( def_id ) )
1876+ if fn_def_id . is_some ( ) {
1877+ self . lower_ty_direct ( & arg. ty , ImplTraitContext :: Universal )
18801878 } else {
18811879 self . lower_ty_direct ( & arg. ty , ImplTraitContext :: Disallowed )
18821880 }
@@ -2527,9 +2525,9 @@ impl<'a> LoweringContext<'a> {
25272525 body : & Block ,
25282526 ) -> hir:: BodyId {
25292527 self . lower_body ( Some ( decl) , |this| {
2530- if let IsAsync :: Async ( async_node_id ) = asyncness {
2528+ if let IsAsync :: Async { closure_id , .. } = asyncness {
25312529 let async_expr = this. make_async_expr (
2532- CaptureBy :: Value , async_node_id , None ,
2530+ CaptureBy :: Value , closure_id , None ,
25332531 |this| {
25342532 let body = this. lower_block ( body, false ) ;
25352533 this. expr_block ( body, ThinVec :: new ( ) )
0 commit comments