@@ -385,10 +385,6 @@ declare_features! (
385
385
// Future-proofing enums/structs with #[non_exhaustive] attribute (RFC 2008)
386
386
( active, non_exhaustive, "1.22.0" , Some ( 44109 ) , None ) ,
387
387
388
- // Copy/Clone closures (RFC 2132)
389
- ( active, clone_closures, "1.22.0" , Some ( 44490 ) , None ) ,
390
- ( active, copy_closures, "1.22.0" , Some ( 44490 ) , None ) ,
391
-
392
388
// allow `'_` placeholder lifetimes
393
389
( active, underscore_lifetimes, "1.22.0" , Some ( 44524 ) , None ) ,
394
390
@@ -565,6 +561,9 @@ declare_features! (
565
561
( accepted, universal_impl_trait, "1.26.0" , Some ( 34511 ) , None ) ,
566
562
// Allows `impl Trait` in function return types.
567
563
( accepted, conservative_impl_trait, "1.26.0" , Some ( 34511 ) , None ) ,
564
+ // Copy/Clone closures (RFC 2132)
565
+ ( accepted, clone_closures, "1.26.0" , Some ( 44490 ) , None ) ,
566
+ ( accepted, copy_closures, "1.26.0" , Some ( 44490 ) , None ) ,
568
567
) ;
569
568
570
569
// If you change this, please modify src/doc/unstable-book as well. You must
@@ -1885,8 +1884,6 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute],
1885
1884
struct FeatureChecker {
1886
1885
proc_macro : Option < Span > ,
1887
1886
custom_attribute : Option < Span > ,
1888
- copy_closures : Option < Span > ,
1889
- clone_closures : Option < Span > ,
1890
1887
}
1891
1888
1892
1889
impl FeatureChecker {
@@ -1902,14 +1899,6 @@ impl FeatureChecker {
1902
1899
if features. custom_attribute {
1903
1900
self . custom_attribute = self . custom_attribute . or ( Some ( span) ) ;
1904
1901
}
1905
-
1906
- if features. copy_closures {
1907
- self . copy_closures = self . copy_closures . or ( Some ( span) ) ;
1908
- }
1909
-
1910
- if features. clone_closures {
1911
- self . clone_closures = self . clone_closures . or ( Some ( span) ) ;
1912
- }
1913
1902
}
1914
1903
1915
1904
fn check ( self , handler : & Handler ) {
@@ -1921,15 +1910,6 @@ impl FeatureChecker {
1921
1910
1922
1911
FatalError . raise ( ) ;
1923
1912
}
1924
-
1925
- if let ( Some ( span) , None ) = ( self . copy_closures , self . clone_closures ) {
1926
- handler. struct_span_err ( span, "`#![feature(copy_closures)]` can only be used with \
1927
- `#![feature(clone_closures)]`")
1928
- . span_note ( span, "`#![feature(copy_closures)]` declared here" )
1929
- . emit ( ) ;
1930
-
1931
- FatalError . raise ( ) ;
1932
- }
1933
1913
}
1934
1914
}
1935
1915
0 commit comments