Skip to content

Commit 82a96a1

Browse files
committed
Ungate associated types.
They work pretty well now, and the stdlib is using them everywhere so they're impossible to avoid anyway.
1 parent ed22606 commit 82a96a1

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

src/libsyntax/feature_gate.rs

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -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

@@ -313,18 +313,6 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
313313
many unsafe patterns and may be \
314314
removed in the future");
315315
}
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-
}
328316
}
329317

330318
_ => {}
@@ -333,17 +321,6 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
333321
visit::walk_item(self, i);
334322
}
335323

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-
347324
fn visit_foreign_item(&mut self, i: &ast::ForeignItem) {
348325
if attr::contains_name(i.attrs[], "linkage") {
349326
self.gate_feature("linkage", i.span,

0 commit comments

Comments
 (0)