diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2014-09-11 17:07:49 +1200 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2014-09-19 15:11:00 +1200 |
| commit | ce0907e46e8e1aa23ee39f69e4f628f68bfbb0d7 (patch) | |
| tree | 9ea529bfee7d62b85288d37b0e2bbcdd1c866e0d /src/librustdoc/html | |
| parent | af3889f6979647b9bd2dc5f5132d80e3e5b405a5 (diff) | |
| download | rust-ce0907e46e8e1aa23ee39f69e4f628f68bfbb0d7.tar.gz rust-ce0907e46e8e1aa23ee39f69e4f628f68bfbb0d7.zip | |
Add enum variants to the type namespace
Change to resolve and update compiler and libs for uses. [breaking-change] Enum variants are now in both the value and type namespaces. This means that if you have a variant with the same name as a type in scope in a module, you will get a name clash and thus an error. The solution is to either rename the type or the variant.
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/format.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/html/render.rs | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index e526286ef46..c807c180e64 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -277,7 +277,7 @@ fn path(w: &mut fmt::Formatter, path: &clean::Path, print_all: bool, } fn primitive_link(f: &mut fmt::Formatter, - prim: clean::Primitive, + prim: clean::PrimitiveType, name: &str) -> fmt::Result { let m = cache_key.get().unwrap(); let mut needs_termination = false; diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 2107854c52b..cf625d4ddfc 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -177,7 +177,7 @@ pub struct Cache { pub extern_locations: HashMap<ast::CrateNum, ExternalLocation>, /// Cache of where documentation for primitives can be found. - pub primitive_locations: HashMap<clean::Primitive, ast::CrateNum>, + pub primitive_locations: HashMap<clean::PrimitiveType, ast::CrateNum>, /// Set of definitions which have been inlined from external crates. pub inlined: HashSet<ast::DefId>, @@ -1637,7 +1637,7 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item, _ => false, } }) - .collect::<Vec<&clean::TraitItem>>(); + .collect::<Vec<&clean::TraitMethod>>(); let provided = t.items.iter() .filter(|m| { match **m { @@ -1645,7 +1645,7 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item, _ => false, } }) - .collect::<Vec<&clean::TraitItem>>(); + .collect::<Vec<&clean::TraitMethod>>(); if t.items.len() == 0 { try!(write!(w, "{{ }}")); @@ -1671,7 +1671,7 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item, // Trait documentation try!(document(w, it)); - fn trait_item(w: &mut fmt::Formatter, m: &clean::TraitItem) + fn trait_item(w: &mut fmt::Formatter, m: &clean::TraitMethod) -> fmt::Result { try!(write!(w, "<h3 id='{}.{}' class='method'>{}<code>", shortty(m.item()), @@ -2180,7 +2180,7 @@ fn item_macro(w: &mut fmt::Formatter, it: &clean::Item, fn item_primitive(w: &mut fmt::Formatter, it: &clean::Item, - _p: &clean::Primitive) -> fmt::Result { + _p: &clean::PrimitiveType) -> fmt::Result { try!(document(w, it)); render_methods(w, it) } |
