Ungate associated types.
They work pretty well now, and the stdlib is using them everywhere so they're impossible to avoid anyway.
This commit is contained in:
parent
ed22606c83
commit
82a96a11ab
@ -67,7 +67,7 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
|
||||
("import_shadowing", Active),
|
||||
("advanced_slice_patterns", Active),
|
||||
("tuple_indexing", Accepted),
|
||||
("associated_types", Active),
|
||||
("associated_types", Accepted),
|
||||
("visible_private_types", Active),
|
||||
("slicing_syntax", Active),
|
||||
|
||||
@ -313,18 +313,6 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
|
||||
many unsafe patterns and may be \
|
||||
removed in the future");
|
||||
}
|
||||
|
||||
for item in items.iter() {
|
||||
match *item {
|
||||
ast::MethodImplItem(_) => {}
|
||||
ast::TypeImplItem(ref typedef) => {
|
||||
self.gate_feature("associated_types",
|
||||
typedef.span,
|
||||
"associated types are \
|
||||
experimental")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_ => {}
|
||||
@ -333,17 +321,6 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
|
||||
visit::walk_item(self, i);
|
||||
}
|
||||
|
||||
fn visit_trait_item(&mut self, trait_item: &ast::TraitItem) {
|
||||
match *trait_item {
|
||||
ast::RequiredMethod(_) | ast::ProvidedMethod(_) => {}
|
||||
ast::TypeTraitItem(ref ti) => {
|
||||
self.gate_feature("associated_types",
|
||||
ti.ty_param.span,
|
||||
"associated types are experimental")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn visit_foreign_item(&mut self, i: &ast::ForeignItem) {
|
||||
if attr::contains_name(i.attrs[], "linkage") {
|
||||
self.gate_feature("linkage", i.span,
|
||||
|
Loading…
x
Reference in New Issue
Block a user