@@ -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
@@ -556,6 +552,9 @@ declare_features! (
556
552
( accepted, inclusive_range_syntax, "1.26.0" , Some ( 28237 ) , None ) ,
557
553
// allow `..=` in patterns (RFC 1192)
558
554
( accepted, dotdoteq_in_patterns, "1.26.0" , Some ( 28237 ) , None ) ,
555
+ // Copy/Clone closures (RFC 2132)
556
+ ( accepted, clone_closures, "1.26.0" , Some ( 44490 ) , None ) ,
557
+ ( accepted, copy_closures, "1.26.0" , Some ( 44490 ) , None ) ,
559
558
) ;
560
559
561
560
// If you change this, please modify src/doc/unstable-book as well. You must
@@ -1867,8 +1866,6 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute],
1867
1866
struct FeatureChecker {
1868
1867
proc_macro : Option < Span > ,
1869
1868
custom_attribute : Option < Span > ,
1870
- copy_closures : Option < Span > ,
1871
- clone_closures : Option < Span > ,
1872
1869
}
1873
1870
1874
1871
impl FeatureChecker {
@@ -1884,14 +1881,6 @@ impl FeatureChecker {
1884
1881
if features. custom_attribute {
1885
1882
self . custom_attribute = self . custom_attribute . or ( Some ( span) ) ;
1886
1883
}
1887
-
1888
- if features. copy_closures {
1889
- self . copy_closures = self . copy_closures . or ( Some ( span) ) ;
1890
- }
1891
-
1892
- if features. clone_closures {
1893
- self . clone_closures = self . clone_closures . or ( Some ( span) ) ;
1894
- }
1895
1884
}
1896
1885
1897
1886
fn check ( self , handler : & Handler ) {
@@ -1903,15 +1892,6 @@ impl FeatureChecker {
1903
1892
1904
1893
FatalError . raise ( ) ;
1905
1894
}
1906
-
1907
- if let ( Some ( span) , None ) = ( self . copy_closures , self . clone_closures ) {
1908
- handler. struct_span_err ( span, "`#![feature(copy_closures)]` can only be used with \
1909
- `#![feature(clone_closures)]`")
1910
- . span_note ( span, "`#![feature(copy_closures)]` declared here" )
1911
- . emit ( ) ;
1912
-
1913
- FatalError . raise ( ) ;
1914
- }
1915
1895
}
1916
1896
}
1917
1897
0 commit comments