about summary refs log tree commit diff
path: root/src/librustdoc/html/layout.rs
AgeCommit message (Collapse)AuthorLines
2015-04-14Positive case of `len()` -> `is_empty()`Tamir Duberstein-3/+3
`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`
2015-03-04std: Deprecate std::old_io::fsAlex Crichton-4/+5
This commit deprecates the majority of std::old_io::fs in favor of std::fs and its new functionality. Some functions remain non-deprecated but are now behind a feature gate called `old_fs`. These functions will be deprecated once suitable replacements have been implemented. The compiler has been migrated to new `std::fs` and `std::path` APIs where appropriate as part of this change.
2015-01-26Fallout of io => old_ioAlex Crichton-4/+4
2015-01-20std: Rename Show/String to Debug/DisplayAlex Crichton-1/+1
This commit is an implementation of [RFC 565][rfc] which is a stabilization of the `std::fmt` module and the implementations of various formatting traits. Specifically, the following changes were performed: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0565-show-string-guidelines.md * The `Show` trait is now deprecated, it was renamed to `Debug` * The `String` trait is now deprecated, it was renamed to `Display` * Many `Debug` and `Display` implementations were audited in accordance with the RFC and audited implementations now have the `#[stable]` attribute * Integers and floats no longer print a suffix * Smart pointers no longer print details that they are a smart pointer * Paths with `Debug` are now quoted and escape characters * The `unwrap` methods on `Result` now require `Display` instead of `Debug` * The `Error` trait no longer has a `detail` method and now requires that `Display` must be implemented. With the loss of `String`, this has moved into libcore. * `impl<E: Error> FromError<E> for Box<Error>` now exists * `derive(Show)` has been renamed to `derive(Debug)`. This is not currently warned about due to warnings being emitted on stage1+ While backwards compatibility is attempted to be maintained with a blanket implementation of `Display` for the old `String` trait (and the same for `Show`/`Debug`) this is still a breaking change due to primitives no longer implementing `String` as well as modifications such as `unwrap` and the `Error` trait. Most code is fairly straightforward to update with a rename or tweaks of method calls. [breaking-change] Closes #21436
2015-01-06core: split into fmt::Show and fmt::StringSean McArthur-1/+1
fmt::Show is for debugging, and can and should be implemented for all public types. This trait is used with `{:?}` syntax. There still exists #[derive(Show)]. fmt::String is for types that faithfully be represented as a String. Because of this, there is no way to derive fmt::String, all implementations must be purposeful. It is used by the default format syntax, `{}`. This will break most instances of `{}`, since that now requires the type to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the correct fix. Types that were being printed specifically for users should receive a fmt::String implementation to fix this. Part of #20013 [breaking-change]
2015-01-03sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rsJorge Aparicio-1/+1
2014-12-04rustdoc: Preserve query/fragment in redirects whenever possible.Kang Seonghoon-0/+3
We heavily rely on queries and fragments in the URL structure, so it is desired to preserve them even in the redirects. The generated redirect pages try to preserve them with scripts, which take precedence over the original `Refresh` metadata. Non-scripting browsers would continue to work (with no queries and fragments).
2014-08-09removing 'str'='struct' search synonymAlexis Beingessner-1/+1
fixes #16384
2014-08-04rustdoc: Emit keywords for all crate pagesBrian Anderson-1/+4
cc #12466
2014-08-04rustdoc: Use more descriptive description metadata.Brian Anderson-1/+3
This text appears in and improves search results. cc #12466
2014-08-02rustdoc: Add rustdoc class to <body> tagTom Jakubowski-1/+1
This allows for easier application of user stylesheets to rustdocs no matter where they are hosted.
2014-08-02rustdoc: Add generator meta tag to API docsTom Jakubowski-0/+1
This is consistent with the meta tag in Markdown docs run through rustdoc.
2014-07-08webfonts: serve Source Code Pro locallyAdrien Tétar-2/+0
So that we have freestanding docs.
2014-06-30Allow external html in rustdoc for crates.zzmp-0/+11
Updated documentation to reflect md->html. Modularized external file loading.
2014-06-19(doc) Properly doc hotkeys in generated docs.Zach Pomerantz-3/+3
Updated search bar to match help text. Used correct, normalized hotkeys in search. Updated shortcut menu with working shortcuts (tabs). Changed height of search help.
2014-06-18(doc) Change search placeholder text.Zach Pomerantz-1/+1
Update placeholder text to make keyboard shortcuts more apparent.
2014-06-15Register new snapshotsAlex Crichton-1/+1
2014-06-11std: Remove i18n/l10n from format!Alex Crichton-11/+15
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-06rustdoc: Submit examples to play.rust-lang.orgAlex Crichton-2/+11
This grows a new option inside of rustdoc to add the ability to submit examples to an external website. If the `--markdown-playground-url` command line option or crate doc attribute `html_playground_url` is present, then examples will have a button on hover to submit the code to the playground specified. This commit enables submission of example code to play.rust-lang.org. The code submitted is that which is tested by rustdoc, not necessarily the exact code shown in the example. Closes #14654
2014-05-31rustdoc: Fix cross-crate links to reexported itemsAlex Crichton-0/+14
Cross crate links can target items which are not rendered in the documentation. If the item is reexported at a higher level, the destination of the link (a concatenation of the fully qualified name) may actually lead to nowhere. This fixes this problem by altering rustdoc to emit pages which redirect to the local copy of the reexported structure. cc #14515 Closes #14137
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-3/+3
[breaking-change]
2014-05-15Updates with core::fmt changesAlex Crichton-1/+1
1. Wherever the `buf` field of a `Formatter` was used, the `Formatter` is used instead. 2. The usage of `write_fmt` is minimized as much as possible, the `write!` macro is preferred wherever possible. 3. Usage of `fmt::write` is minimized, favoring the `write!` macro instead.
2014-05-12librustdoc: Remove all `~str` usage from librustdoc.Patrick Walton-5/+5
2014-04-25rustdoc: fixesAdrien Tétar-2/+2
2014-04-20doc: unifying with rustdocAdrien Tétar-7/+6
Conflicts: src/doc/rust.md
2014-04-12doc: design changes cleanupsAdrien Tétar-2/+4
Conflicts: src/librustdoc/html/layout.rs
2014-04-12Tweaked the design to be a lot cleaner.Daniel Fagnan-1/+1
Signed-off-by: Daniel Fagnan <dnfagnan@gmail.com>
2014-03-31rustdoc: Switch field privacy as necessaryAlex Crichton-6/+6
2014-03-25rustdoc: Display rust logo again. Closes #13148Brian Anderson-2/+2
2014-03-25rustdoc: html: use raw strings for great justiceCorey Richardson-29/+29
2014-03-18rustdoc: Implement cross-crate searchingAlex Crichton-8/+9
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-04rustdoc: tweak highlightingAdrien Tétar-1/+1
2014-02-13Replace `crate` usage with `krate`Flavio Percoco-7/+7
This patch replaces all `crate` usage with `krate` before introducing the new keyword. This ensures that after introducing the keyword, there won't be any compilation errors. krate might not be the most expressive substitution for crate but it's a very close abbreviation for it. `module` was already used in several places already.
2014-02-03rustdoc: Remove io_error usageAlex Crichton-1/+2
2014-02-02std: rename fmt::Default to `Show`.Huon Wilson-1/+1
This is a better name with which to have a #[deriving] mode. Decision in: https://github.com/mozilla/rust/wiki/Meeting-weekly-2014-01-28
2013-12-13auto merge of #10849 : adridu59/rust/patch-css, r=alexcrichtonbors-4/+6
rustdoc: - fix search-bar layout doc: CSS: - switch to native pandoc toc depth - rm some dead code - clamp width to be readable (we're not Wikipedia!) - don't background-color titles, it's bloating - make syntax-highlighting colors inline with rust-lang.org - space indents @alexcrichton
2013-12-11Make 'self lifetime illegal.Erik Price-4/+4
Also remove all instances of 'self within the codebase. This fixes #10889.
2013-12-08Remove dead codesKiet Tran-4/+0
2013-12-07rustdoc: fix the search-bar layoutAdrien Tétar-4/+6
Now with broader compatibility.
2013-12-01Add a type="search" to the search bar in the documentation.SiegeLord-1/+2
2013-12-01Add placeholder text to the search bar in the documentation.SiegeLord-1/+2
2013-11-11Move std::rt::io to std::ioAlex Crichton-1/+1
2013-10-21rustdoc: nitpicks & cleanupAdrien Tétar-6/+4
2013-09-27rustdoc: Include source files with documentationAlex Crichton-1/+1
All items have source links back to their actual code. Source files can be omitted with the doc(html_no_source) attribute on the crate. Currently there is no syntax highlighting, but that will come with syntax highlighting with all other snippets. Closes #2072
2013-09-27rustdoc: Fix search for something on the same pageAlex Crichton-1/+2
2013-09-22Place *all* rustdoc output in doc/{crate}Alex Crichton-4/+4
2013-09-22rustdoc: Out with the old, in with the newAlex Crichton-0/+130
Removes old rustdoc, moves rustdoc_ng into its place instead (plus drops the _ng suffix). Also shreds all reference to rustdoc_ng from the Makefile rules.