@@ -36,7 +36,7 @@ use std::ascii::AsciiExt;
3636
3737// if you change this list without updating src/doc/reference.md, @cmr will be sad
3838static KNOWN_FEATURES : & ' static [ ( & ' static str , Status ) ] = & [
39- ( "globs" , Active ) ,
39+ ( "globs" , Accepted ) ,
4040 ( "macro_rules" , Active ) ,
4141 ( "struct_variant" , Accepted ) ,
4242 ( "asm" , Active ) ,
@@ -54,7 +54,7 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
5454 ( "lang_items" , Active ) ,
5555
5656 ( "simd" , Active ) ,
57- ( "default_type_params" , Active ) ,
57+ ( "default_type_params" , Accepted ) ,
5858 ( "quote" , Active ) ,
5959 ( "link_llvm_intrinsics" , Active ) ,
6060 ( "linkage" , Active ) ,
@@ -67,7 +67,7 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
6767 ( "import_shadowing" , Active ) ,
6868 ( "advanced_slice_patterns" , Active ) ,
6969 ( "tuple_indexing" , Accepted ) ,
70- ( "associated_types" , Active ) ,
70+ ( "associated_types" , Accepted ) ,
7171 ( "visible_private_types" , Active ) ,
7272 ( "slicing_syntax" , Active ) ,
7373
@@ -112,7 +112,6 @@ enum Status {
112112/// A set of features to be used by later passes.
113113#[ derive( Copy ) ]
114114pub struct Features {
115- pub default_type_params : bool ,
116115 pub unboxed_closures : bool ,
117116 pub rustc_diagnostic_macros : bool ,
118117 pub import_shadowing : bool ,
@@ -125,7 +124,6 @@ pub struct Features {
125124impl Features {
126125 pub fn new ( ) -> Features {
127126 Features {
128- default_type_params : false ,
129127 unboxed_closures : false ,
130128 rustc_diagnostic_macros : false ,
131129 import_shadowing : false ,
@@ -232,13 +230,7 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
232230
233231 fn visit_view_item ( & mut self , i : & ast:: ViewItem ) {
234232 match i. node {
235- ast:: ViewItemUse ( ref path) => {
236- if let ast:: ViewPathGlob ( ..) = path. node {
237- self . gate_feature ( "globs" , path. span ,
238- "glob import statements are \
239- experimental and possibly buggy") ;
240- }
241- }
233+ ast:: ViewItemUse ( ..) => { }
242234 ast:: ViewItemExternCrate ( ..) => {
243235 for attr in i. attrs . iter ( ) {
244236 if attr. name ( ) . get ( ) == "phase" {
@@ -313,18 +305,6 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
313305 many unsafe patterns and may be \
314306 removed in the future") ;
315307 }
316-
317- for item in items. iter ( ) {
318- match * item {
319- ast:: MethodImplItem ( _) => { }
320- ast:: TypeImplItem ( ref typedef) => {
321- self . gate_feature ( "associated_types" ,
322- typedef. span ,
323- "associated types are \
324- experimental")
325- }
326- }
327- }
328308 }
329309
330310 _ => { }
@@ -333,17 +313,6 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
333313 visit:: walk_item ( self , i) ;
334314 }
335315
336- fn visit_trait_item ( & mut self , trait_item : & ast:: TraitItem ) {
337- match * trait_item {
338- ast:: RequiredMethod ( _) | ast:: ProvidedMethod ( _) => { }
339- ast:: TypeTraitItem ( ref ti) => {
340- self . gate_feature ( "associated_types" ,
341- ti. ty_param . span ,
342- "associated types are experimental" )
343- }
344- }
345- }
346-
347316 fn visit_foreign_item ( & mut self , i : & ast:: ForeignItem ) {
348317 if attr:: contains_name ( i. attrs [ ] , "linkage" ) {
349318 self . gate_feature ( "linkage" , i. span ,
@@ -379,20 +348,6 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
379348 visit:: walk_expr ( self , e) ;
380349 }
381350
382- fn visit_generics ( & mut self , generics : & ast:: Generics ) {
383- for type_parameter in generics. ty_params . iter ( ) {
384- match type_parameter. default {
385- Some ( ref ty) => {
386- self . gate_feature ( "default_type_params" , ty. span ,
387- "default type parameters are \
388- experimental and possibly buggy") ;
389- }
390- None => { }
391- }
392- }
393- visit:: walk_generics ( self , generics) ;
394- }
395-
396351 fn visit_attribute ( & mut self , attr : & ast:: Attribute ) {
397352 if attr:: contains_name ( slice:: ref_slice ( attr) , "lang" ) {
398353 self . gate_feature ( "lang_items" ,
@@ -498,7 +453,6 @@ fn check_crate_inner<F>(cm: &CodeMap, span_handler: &SpanHandler, krate: &ast::C
498453 check ( & mut cx, krate) ;
499454
500455 ( Features {
501- default_type_params : cx. has_feature ( "default_type_params" ) ,
502456 unboxed_closures : cx. has_feature ( "unboxed_closures" ) ,
503457 rustc_diagnostic_macros : cx. has_feature ( "rustc_diagnostic_macros" ) ,
504458 import_shadowing : cx. has_feature ( "import_shadowing" ) ,
0 commit comments