diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-08-05 19:44:21 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-09-17 16:38:57 -0700 |
| commit | 78a841810eb36e486ba68e6b9fa80e45d805cc4f (patch) | |
| tree | b1c7c6d9c49f84e03b374b5b70cb0c9d0b60a7de /src/libsyntax/config.rs | |
| parent | 8067f4425d245a210c732a0333245fbe83190e89 (diff) | |
| download | rust-78a841810eb36e486ba68e6b9fa80e45d805cc4f.tar.gz rust-78a841810eb36e486ba68e6b9fa80e45d805cc4f.zip | |
librustc: Implement associated types behind a feature gate.
The implementation essentially desugars during type collection and AST type conversion time into the parameter scheme we have now. Only fully qualified names--e.g. `<T as Foo>::Bar`--are supported.
Diffstat (limited to 'src/libsyntax/config.rs')
| -rw-r--r-- | src/libsyntax/config.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsyntax/config.rs b/src/libsyntax/config.rs index cb96cd911b5..3b250de8701 100644 --- a/src/libsyntax/config.rs +++ b/src/libsyntax/config.rs @@ -235,13 +235,15 @@ fn view_item_in_cfg(cx: &mut Context, item: &ast::ViewItem) -> bool { fn trait_method_in_cfg(cx: &mut Context, meth: &ast::TraitItem) -> bool { match *meth { ast::RequiredMethod(ref meth) => (cx.in_cfg)(meth.attrs.as_slice()), - ast::ProvidedMethod(ref meth) => (cx.in_cfg)(meth.attrs.as_slice()) + ast::ProvidedMethod(ref meth) => (cx.in_cfg)(meth.attrs.as_slice()), + ast::TypeTraitItem(ref typ) => (cx.in_cfg)(typ.attrs.as_slice()), } } fn impl_item_in_cfg(cx: &mut Context, impl_item: &ast::ImplItem) -> bool { match *impl_item { ast::MethodImplItem(ref meth) => (cx.in_cfg)(meth.attrs.as_slice()), + ast::TypeImplItem(ref typ) => (cx.in_cfg)(typ.attrs.as_slice()), } } |
