@@ -391,10 +391,6 @@ declare_features! (
391
391
// Future-proofing enums/structs with #[non_exhaustive] attribute (RFC 2008)
392
392
( active, non_exhaustive, "1.22.0" , Some ( 44109 ) , None ) ,
393
393
394
- // Copy/Clone closures (RFC 2132)
395
- ( active, clone_closures, "1.22.0" , Some ( 44490 ) , None ) ,
396
- ( active, copy_closures, "1.22.0" , Some ( 44490 ) , None ) ,
397
-
398
394
// allow `'_` placeholder lifetimes
399
395
( active, underscore_lifetimes, "1.22.0" , Some ( 44524 ) , None ) ,
400
396
@@ -567,6 +563,9 @@ declare_features! (
567
563
( accepted, dotdoteq_in_patterns, "1.26.0" , Some ( 28237 ) , None ) ,
568
564
// Termination trait in main (RFC 1937)
569
565
( accepted, termination_trait, "1.26.0" , Some ( 43301 ) , None ) ,
566
+ // Copy/Clone closures (RFC 2132)
567
+ ( accepted, clone_closures, "1.26.0" , Some ( 44490 ) , None ) ,
568
+ ( accepted, copy_closures, "1.26.0" , Some ( 44490 ) , None ) ,
570
569
) ;
571
570
572
571
// If you change this, please modify src/doc/unstable-book as well. You must
@@ -1887,8 +1886,6 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute],
1887
1886
struct FeatureChecker {
1888
1887
proc_macro : Option < Span > ,
1889
1888
custom_attribute : Option < Span > ,
1890
- copy_closures : Option < Span > ,
1891
- clone_closures : Option < Span > ,
1892
1889
}
1893
1890
1894
1891
impl FeatureChecker {
@@ -1904,14 +1901,6 @@ impl FeatureChecker {
1904
1901
if features. custom_attribute {
1905
1902
self . custom_attribute = self . custom_attribute . or ( Some ( span) ) ;
1906
1903
}
1907
-
1908
- if features. copy_closures {
1909
- self . copy_closures = self . copy_closures . or ( Some ( span) ) ;
1910
- }
1911
-
1912
- if features. clone_closures {
1913
- self . clone_closures = self . clone_closures . or ( Some ( span) ) ;
1914
- }
1915
1904
}
1916
1905
1917
1906
fn check ( self , handler : & Handler ) {
@@ -1923,15 +1912,6 @@ impl FeatureChecker {
1923
1912
1924
1913
FatalError . raise ( ) ;
1925
1914
}
1926
-
1927
- if let ( Some ( span) , None ) = ( self . copy_closures , self . clone_closures ) {
1928
- handler. struct_span_err ( span, "`#![feature(copy_closures)]` can only be used with \
1929
- `#![feature(clone_closures)]`")
1930
- . span_note ( span, "`#![feature(copy_closures)]` declared here" )
1931
- . emit ( ) ;
1932
-
1933
- FatalError . raise ( ) ;
1934
- }
1935
1915
}
1936
1916
}
1937
1917
0 commit comments