File tree 1 file changed +1
-6
lines changed
library/core/src/iter/sources
1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -22,17 +22,12 @@ pub const fn empty<T>() -> Empty<T> {
22
22
Empty ( marker:: PhantomData )
23
23
}
24
24
25
- // Newtype for use in `PhantomData` to avoid
26
- // > error: const-stable function cannot use `#[feature(const_fn_fn_ptr_basics)]`
27
- // in `const fn empty<T>()` above.
28
- struct FnReturning < T > ( fn ( ) -> T ) ;
29
-
30
25
/// An iterator that yields nothing.
31
26
///
32
27
/// This `struct` is created by the [`empty()`] function. See its documentation for more.
33
28
#[ must_use = "iterators are lazy and do nothing unless consumed" ]
34
29
#[ stable( feature = "iter_empty" , since = "1.2.0" ) ]
35
- pub struct Empty < T > ( marker:: PhantomData < FnReturning < T > > ) ;
30
+ pub struct Empty < T > ( marker:: PhantomData < fn ( ) -> T > ) ;
36
31
37
32
#[ stable( feature = "core_impl_debug" , since = "1.9.0" ) ]
38
33
impl < T > fmt:: Debug for Empty < T > {
You can’t perform that action at this time.
0 commit comments