summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2014-03-28auto merge of #13170 : eddyb/rust/syntax-cleanup, r=alexcrichtonbors-2/+2
Removes all Cell's/RefCell's from lexer::Reader implementations and a couple @.
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-1/+1
Closes #2569
2014-03-28Used inherited mutability in lexer::Reader.Eduard Burtescu-2/+2
2014-03-25rustdoc: Display rust logo again. Closes #13148Brian Anderson-2/+2
2014-03-25auto merge of #12961 : cmr/rust/rustdoc-impls, r=alexcrichtonbors-31/+45
Rendered form available at http://docs.octayn.net/doc/ This moves derived impls to the bottom of the list, separate from the rest, and collapses default methods that aren't overridden into an expandible accordion.
2014-03-25rustdoc: render derived impls separatelyCorey Richardson-2/+16
2014-03-25rustdoc: html: use raw strings for great justiceCorey Richardson-29/+29
2014-03-24test: Update all tests with the sync changesAlex Crichton-8/+8
2014-03-23iter: remove `to_owned_vec`Daniel Micay-7/+7
This needs to be removed as part of removing `~[T]`. Partial type hints are now allowed, and will remove the need to add a version of this method for `Vec<T>`. For now, this involves a few workarounds for partial type hints not completely working.
2014-03-22doc: Remove Freeze / NoFreeze from docsFlavio Percoco-2/+2
2014-03-21test: Make manual changes to deal with the fallout from removal ofPatrick Walton-35/+47
`~[T]` in test, libgetopts, compiletest, librustdoc, and libnum.
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-2/+0
It's now in the prelude.
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-2/+2
Closes #12771
2014-03-20rename std::vec -> std::sliceDaniel Micay-9/+9
Closes #12702
2014-03-18rustdoc: Implement cross-crate searchingAlex Crichton-156/+190
A major discoverability issue with rustdoc is that all crates have their documentation built in isolation, so it's difficult when looking at the documentation for libstd to learn that there's a libcollections crate with a HashMap in it. This commit moves rustdoc a little closer to improving the multiple crate experience. This unifies all search indexes for all crates into one file so all pages share the same search index. This allows searching to work across crates in the same documentation directory (as the standard distribution is currently built). This strategy involves updating a shared file amongst many rustdoc processes, so I implemented a simple file locking API for handling synchronization for updates to the shared files. cc #12554
2014-03-18libsyntax: librustdoc: ignore utf-8 BOM in .rs filesLiigo Zhuang-1/+8
Closes #12974
2014-03-17Fix rustdoc and tests.Eduard Burtescu-6/+3
2014-03-17De-@ ParseSess uses.Eduard Burtescu-3/+3
2014-03-12auto merge of #12756 : pongad/rust/remove_owned_str_pat, r=alexcrichtonbors-7/+8
match-drop-strs-issue-4541.rs deleted as it's the same with issue-4541.rs
2014-03-12rustc: Remove matching on ~str from the languageMichael Darakananda-7/+8
The `~str` type is not long for this world as it will be superseded by the soon-to-come DST changes for the language. The new type will be `~Str`, and matching over the allocation will no longer be supported. Matching on `&str` will continue to work, in both a pre and post DST world.
2014-03-12rustdoc: whitelist the headers that get a § on hover.Huon Wilson-13/+10
Previously the :hover rules were making the links to the traits/types in something like impl<K: Hash + Eq, V> ... { ... } be displayed with a trailing `§` when hovered over. This commit restricts that behaviour to specific headers, i.e. those that are known to be section headers (like those rendered in markdown doc-comments, and the "Modules", "Functions" etc. headings).
2014-03-09doc: CSS fixesAdrien Tétar-10/+7
- fixup and refactor highlighting code - have a proper print stylesheet
2014-03-09rustdoc: hardcode each header as a link.Huon Wilson-14/+17
This avoids having to include JS in the guide/tutorial/manual pages just to get the headers being links. The on-hover behaviour showing the little section marker § is preserved, because that gives a useful hint that the heading is a link.
2014-03-09rustdoc: add table-of-contents recording & rendering, use it with plainHuon Wilson-10/+309
markdown files. This means that # Foo ## Bar # Baz ### Qux ## Quz Gets a TOC like 1 Foo 1.1 Bar 2 Baz 2.0.1 Qux 2.1 Quz This functionality is only used when rendering a single markdown file, never on an individual module, although it could very feasibly be extended to allow modules to opt-in to a table of contents (std::fmt comes to mind).
2014-03-09rustdoc: run on plain Markdown files.Huon Wilson-3/+15
This theoretically gives rustdoc the ability to render our guides, tutorial and manual (not in practice, since the files themselves need to be adjusted slightly to use Sundown-compatible functionality). Fixes #11392.
2014-03-08Add an option to not run rustdoc blocksSteven Fackler-5/+6
This is useful for code that would be expensive to run or has some kind of external dependency (e.g. a database or server).
2014-03-08Index cross-mod type definition and implementation properly in rustdocEdward Wang-10/+51
A structure's definition and implementation may be cross-module. If the implementing module is parsed before defining module, the fully qualified name of the structure won't be present for the implementation to use when being indexed. So caches such 'orphan' implementation and indexes it at the end of crate parsing. Closes #10284.
2014-03-07rename ast::ViewItemExternMod to ast::ViewItemExternCrate, and ↵Liigo Zhuang-3/+3
clean::ExternMod to clean::ExternCrate
2014-03-06rustc: Move to FNV hashing for node/def idsAlex Crichton-2/+3
This leverages the new hashing framework and hashmap implementation to provide a much speedier hashing algorithm for node ids and def ids. The hash algorithm used is currentl FNV hashing, but it's quite easy to swap out. I originally implemented hashing as the identity function, but this actually ended up in slowing down rustc compiling libstd from 8s to 13s. I would suspect that this is a result of a large number of collisions. With FNV hashing, we get these timings (compiling with --no-trans, in seconds): | | before | after | |-----------|---------:|--------:| | libstd | 8.324 | 6.703 | | stdtest | 47.674 | 46.857 | | libsyntax | 9.918 | 8.400 |
2014-03-06rustdoc: Don't escape contents of headersAlex Crichton-2/+1
Turns out sundown has already escaped this content for us, so there's no need for us to escape it again. Closes #12736
2014-03-05rustdoc: Add anchors to section headersAlex Crichton-24/+105
This commit adds a appear-on-over link to all section headers to generated documentation. Each header also receives an id now, even those generated through markdown. The purpose of this is to provide easy to link to sections. This modifies the default header markdown generation because the default id added looks like "toc_NN" which is difficult to reconcile among all sections (by default each section gets a "toc_0" id), and it's also not very descriptive of where you're going. This chooses to adopt the github-style anchors by taking the contents of the title and hyphen-separating them (after lower casing). Closes #12681
2014-03-04rustdoc: tweak highlightingAdrien Tétar-17/+17
2014-03-02rustdoc: syntax highlight macro definitions, colour $... substitutions.Huon Wilson-10/+22
Macro definitions are just their raw source code, and so should be highlighted where possible. Also, $ident non-terminal substitutions are special, and so are worth of a little special treatment.
2014-03-01auto merge of #12627 : alexcrichton/rust/issue-12623, r=brsonbors-1/+1
This helps prevent the unfortunate interleavings found in #12623.
2014-02-28rustdoc: Capture all output from rustc by defaultAlex Crichton-1/+1
This helps prevent interleaving of error messages when running rustdoc tests. This has an interesting bit of shuffling with I/O handles, but other than that this is just using the APIs laid out in the previous commit. Closes #12623
2014-02-28auto merge of #12632 : fhahn/rust/issue-12507-rustdoc-std-module, r=alexcrichtonbors-1/+5
This PR for #12507 marks the top level `Module` in rustdoc as a crate and does render the header accordingly.
2014-03-01Publicise types/add #[allow(visible_private_types)] to a variety of places.Huon Wilson-1/+1
There's a lot of these types in the compiler libraries, and a few of the older or private stdlib ones. Some types are obviously meant to be public, others not so much.
2014-02-26Mark top level module as a crate in rustdoc, closes #12507Florian Hahn-1/+5
2014-02-24Move extra::json to libserializeAlex Crichton-1/+1
This also inverts the dependency between libserialize and libcollections. cc #8784
2014-02-23auto merge of #12484 : TheHydroImpulse/rust/fix_js, r=huonwbors-1/+1
2014-02-23auto merge of #12416 : alexcrichton/rust/highlight, r=huonwbors-11/+223
This adds simple syntax highlighting based off libsyntax's lexer to be sure to stay up to date with rust's grammar. Some of the highlighting is a bit ad-hoc, but it definitely seems to get the job done! This currently doesn't highlight rustdoc-rendered function signatures and structs that are emitted to each page because the colors already signify what's clickable and I think we'd have to figure out a different scheme before colorizing them. This does, however, colorize all code examples and source code. Closes #11393
2014-02-23auto merge of #12311 : brson/rust/unstable, r=alexcrichtonbors-1/+1
With the stability attributes we can put public-but unstable modules next to others, so this moves `intrinsics` and `raw` out of the `unstable` module (and marks both as `#[experimental]`).
2014-02-23std: Move intrinsics to std::intrinsics.Brian Anderson-1/+1
Issue #1457
2014-02-23Move std::{trie, hashmap} to libcollectionsAlex Crichton-1/+1
These two containers are indeed collections, so their place is in libcollections, not in libstd. There will always be a hash map as part of the standard distribution of Rust, but by moving it out of the standard library it makes libstd that much more portable to more platforms and environments. This conveniently also removes the stuttering of 'std::hashmap::HashMap', although 'collections::HashMap' is only one character shorter.
2014-02-23rustdoc: Add syntax highlightingAlex Crichton-11/+223
This adds simple syntax highlighting based off libsyntax's lexer to be sure to stay up to date with rust's grammar. Some of the highlighting is a bit ad-hoc, but it definitely seems to get the job done! This currently doesn't highlight rustdoc-rendered function signatures and structs that are emitted to each page because the colors already signify what's clickable and I think we'd have to figure out a different scheme before colorizing them. This does, however, colorize all code examples and source code. Closes #11393
2014-02-22Fixed invalid JavaScriptDaniel Fagnan-1/+1
Signed-off-by: Daniel Fagnan <dnfagnan@gmail.com>
2014-02-22auto merge of #12439 : cmr/rust/rustdoc-reset, r=thestingerbors-4/+13
rustdoc: web: don't reset the search bar
2014-02-21rustdoc: web: don't reset the search barCorey Richardson-4/+13
2014-02-21Changed NonCamelCaseTypes lint to warn by defaultmr.Shu-0/+2
Added allow(non_camel_case_types) to librustc where necesary Tried to fix problems with non_camel_case_types outside rustc fixed failing tests Docs updated Moved #[allow(non_camel_case_types)] a level higher. markdown.rs reverted Fixed timer that was failing tests Fixed another timer
2014-02-20Mass rename if_ok! to try!Alex Crichton-209/+209
This "bubble up an error" macro was originally named if_ok! in order to get it landed, but after the fact it was discovered that this name is not exactly desirable. The name `if_ok!` isn't immediately clear that is has much to do with error handling, and it doesn't look fantastic in all contexts (if if_ok!(...) {}). In general, the agreed opinion about `if_ok!` is that is came in as subpar. The name `try!` is more invocative of error handling, it's shorter by 2 letters, and it looks fitting in almost all circumstances. One concern about the word `try!` is that it's too invocative of exceptions, but the belief is that this will be overcome with documentation and examples. Close #12037