diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-01-25 16:57:39 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-01-29 10:42:45 -0800 |
| commit | eb4d39e1fef918242a5dba2a09d7b9faa437b911 (patch) | |
| tree | 92d923119a6d8f1b16d83c2214e8acf9d0dd25e6 /src/librustdoc/markdown_index_pass.rs | |
| parent | f1e78c6dd7dc41a9937c466a7af5d0efc779909f (diff) | |
| download | rust-eb4d39e1fef918242a5dba2a09d7b9faa437b911.tar.gz rust-eb4d39e1fef918242a5dba2a09d7b9faa437b911.zip | |
libstd: Remove "dual impls" from the language and enforce coherence rules. r=brson
"Dual impls" are impls that are both type implementations and trait implementations. They can lead to ambiguity and so this patch removes them from the language. This also enforces coherence rules. Without this patch, records can implement traits not defined in the current crate. This patch fixes this, and updates all of rustc to adhere to the new enforcement. Most of this patch is fixing rustc to obey the coherence rules, which involves converting a bunch of records to structs.
Diffstat (limited to 'src/librustdoc/markdown_index_pass.rs')
| -rw-r--r-- | src/librustdoc/markdown_index_pass.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/librustdoc/markdown_index_pass.rs b/src/librustdoc/markdown_index_pass.rs index 1f4e1be62fc..b0b4278a91e 100644 --- a/src/librustdoc/markdown_index_pass.rs +++ b/src/librustdoc/markdown_index_pass.rs @@ -54,7 +54,7 @@ fn fold_mod( let doc = fold::default_any_fold_mod(fold, doc); - doc::ModDoc_({ + doc::ModDoc_(doc::ModDoc_ { index: Some(build_mod_index(doc, fold.ctxt)), .. *doc }) @@ -67,7 +67,7 @@ fn fold_nmod( let doc = fold::default_any_fold_nmod(fold, doc); - { + doc::NmodDoc { index: Some(build_nmod_index(doc, fold.ctxt)), .. doc } @@ -77,7 +77,7 @@ fn build_mod_index( +doc: doc::ModDoc, +config: config::Config ) -> doc::Index { - { + doc::Index { entries: par::map(doc.items, |doc| { item_to_entry(*doc, config) }) @@ -88,7 +88,7 @@ fn build_nmod_index( +doc: doc::NmodDoc, +config: config::Config ) -> doc::Index { - { + doc::Index { entries: par::map(doc.fns, |doc| { item_to_entry(doc::FnTag(*doc), config) }) @@ -109,7 +109,7 @@ fn item_to_entry( } }; - { + doc::IndexEntry { kind: markdown_pass::header_kind(doc), name: markdown_pass::header_name(doc), brief: doc.brief(), |
