@@ -1723,16 +1723,16 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1723
1723
)
1724
1724
} else {
1725
1725
match decl. output {
1726
- FunctionRetTy :: Ty ( ref ty) => {
1726
+ FnRetTy :: Ty ( ref ty) => {
1727
1727
let context = match in_band_ty_params {
1728
1728
Some ( ( def_id, _) ) if impl_trait_return_allow => {
1729
1729
ImplTraitContext :: OpaqueTy ( Some ( def_id) , hir:: OpaqueTyOrigin :: FnReturn )
1730
1730
}
1731
1731
_ => ImplTraitContext :: disallowed ( ) ,
1732
1732
} ;
1733
- hir:: FunctionRetTy :: Return ( self . lower_ty ( ty, context) )
1733
+ hir:: FnRetTy :: Return ( self . lower_ty ( ty, context) )
1734
1734
}
1735
- FunctionRetTy :: Default ( span) => hir:: FunctionRetTy :: DefaultReturn ( span) ,
1735
+ FnRetTy :: Default ( span) => hir:: FnRetTy :: DefaultReturn ( span) ,
1736
1736
}
1737
1737
} ;
1738
1738
@@ -1779,10 +1779,10 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1779
1779
// `elided_lt_replacement`: replacement for elided lifetimes in the return type
1780
1780
fn lower_async_fn_ret_ty (
1781
1781
& mut self ,
1782
- output : & FunctionRetTy ,
1782
+ output : & FnRetTy ,
1783
1783
fn_def_id : DefId ,
1784
1784
opaque_ty_node_id : NodeId ,
1785
- ) -> hir:: FunctionRetTy < ' hir > {
1785
+ ) -> hir:: FnRetTy < ' hir > {
1786
1786
debug ! (
1787
1787
"lower_async_fn_ret_ty(\
1788
1788
output={:?}, \
@@ -1947,27 +1947,27 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1947
1947
// only the lifetime parameters that we must supply.
1948
1948
let opaque_ty_ref = hir:: TyKind :: Def ( hir:: ItemId { id : opaque_ty_id } , generic_args) ;
1949
1949
let opaque_ty = self . ty ( opaque_ty_span, opaque_ty_ref) ;
1950
- hir:: FunctionRetTy :: Return ( self . arena . alloc ( opaque_ty) )
1950
+ hir:: FnRetTy :: Return ( self . arena . alloc ( opaque_ty) )
1951
1951
}
1952
1952
1953
1953
/// Transforms `-> T` into `Future<Output = T>`
1954
1954
fn lower_async_fn_output_type_to_future_bound (
1955
1955
& mut self ,
1956
- output : & FunctionRetTy ,
1956
+ output : & FnRetTy ,
1957
1957
fn_def_id : DefId ,
1958
1958
span : Span ,
1959
1959
) -> hir:: GenericBound < ' hir > {
1960
1960
// Compute the `T` in `Future<Output = T>` from the return type.
1961
1961
let output_ty = match output {
1962
- FunctionRetTy :: Ty ( ty) => {
1962
+ FnRetTy :: Ty ( ty) => {
1963
1963
// Not `OpaqueTyOrigin::AsyncFn`: that's only used for the
1964
1964
// `impl Future` opaque type that `async fn` implicitly
1965
1965
// generates.
1966
1966
let context =
1967
1967
ImplTraitContext :: OpaqueTy ( Some ( fn_def_id) , hir:: OpaqueTyOrigin :: FnReturn ) ;
1968
1968
self . lower_ty ( ty, context)
1969
1969
}
1970
- FunctionRetTy :: Default ( ret_ty_span) => self . arena . alloc ( self . ty_tup ( * ret_ty_span, & [ ] ) ) ,
1970
+ FnRetTy :: Default ( ret_ty_span) => self . arena . alloc ( self . ty_tup ( * ret_ty_span, & [ ] ) ) ,
1971
1971
} ;
1972
1972
1973
1973
// "<Output = T>"
0 commit comments