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/librustdoc/html | |
| 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/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/item_type.rs | 3 | ||||
| -rw-r--r-- | src/librustdoc/html/render.rs | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/librustdoc/html/item_type.rs b/src/librustdoc/html/item_type.rs index 6e240b0d8d4..e18ab0bd14f 100644 --- a/src/librustdoc/html/item_type.rs +++ b/src/librustdoc/html/item_type.rs @@ -38,6 +38,7 @@ pub enum ItemType { ForeignStatic = 14, Macro = 15, Primitive = 16, + AssociatedType = 17, } impl ItemType { @@ -60,6 +61,7 @@ impl ItemType { ForeignStatic => "ffs", Macro => "macro", Primitive => "primitive", + AssociatedType => "associatedtype", } } } @@ -95,6 +97,7 @@ pub fn shortty(item: &clean::Item) -> ItemType { clean::ForeignStaticItem(..) => ForeignStatic, clean::MacroItem(..) => Macro, clean::PrimitiveItem(..) => Primitive, + clean::AssociatedTypeItem => AssociatedType, } } diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index a0c4283711e..2107854c52b 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -1512,6 +1512,7 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context, clean::ForeignStaticItem(..) => ("ffi-statics", "Foreign Statics"), clean::MacroItem(..) => ("macros", "Macros"), clean::PrimitiveItem(..) => ("primitives", "Primitive Types"), + clean::AssociatedTypeItem(..) => ("associated-types", "Associated Types"), }; try!(write!(w, "<h2 id='{id}' class='section-header'>\ |
