about summary refs log tree commit diff
path: root/src/librustdoc/html/toc.rs
AgeCommit message (Collapse)AuthorLines
2024-08-20rustdoc: show code spans as `<code>` in TOCMichael Howell-4/+11
2024-08-20Add Top TOC support to rustdocMichael Howell-7/+8
This commit adds the headers for the top level documentation to rustdoc's existing table of contents, along with associated items. It only show two levels of headers. Going further would require the sidebar to be wider, and that seems unnecessary (the crates that have manually-built TOCs usually don't need deeply nested headers).
2022-05-24fix clippy perf lintsklensy-2/+5
2022-05-21Remove `crate` visibility modifier in libs, testsJacob Pratt-7/+7
2021-01-01clippy fixes for librustdocMatthias Krüger-1/+1
fixes clippy warnings of type: match_like_matches_macro or_fun_call op_ref needless_return let_and_return single_char_add_str useless_format unnecessary_sort_by match_ref_pats redundant_field_names
2020-11-15Make all rustdoc functions and structs crate-privateJoshua Nelson-6/+6
This gives warnings about dead code.
2020-05-02fix rustdoc warningsTshepang Lekhonkhobe-3/+3
2020-04-24Avoid unused Option::map resultsJosh Stone-2/+2
These are changes that would be needed if we add `#[must_use]` to `Option::map`, per #71484.
2019-12-22Format the worldMark Rousskov-9/+11
2019-09-13Move Toc printing from fmt::DisplayMark Rousskov-21/+16
2019-07-01Remove needless lifetimesJeremy Stucki-1/+1
2019-06-16Separate librustcdoc modulechansuke-82/+1
2019-02-23Transition librustdoc to 2018 editionHirokazu Hata-2/+2
2019-02-10rustc: doc commentsAlexander Regueiro-1/+1
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-6/+6
2018-07-27Prefer to_string() to format!()ljedrz-1/+1
2017-08-17Rollup merge of #43891 - Fourchaux:master, r=steveklabnikCorey Farwell-1/+1
Fix typos & us spellings Fixing some typos and non en-US spellings. (Update of PR https://github.com/rust-lang/rust/pull/42812 )
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-4/+4
Like #43008 (f668999), but _much more aggressive_.
2017-08-15Fix typos & us spellingsFourchaux-1/+1
2016-10-31Changed most vec! invocations to use square bracesiirelu-2/+2
Most of the Rust community agrees that the vec! macro is clearer when called using square brackets [] instead of regular brackets (). Most of these ocurrences are from before macros allowed using different types of brackets. There is one left unchanged in a pretty-print test, as the pretty printer still wants it to have regular brackets.
2016-03-22fix alignmentJorge Aparicio-4/+4
2016-03-22try! -> ?Jorge Aparicio-3/+3
Automated conversion using the untry tool [1] and the following command: ``` $ find -name '*.rs' -type f | xargs untry ``` at the root of the Rust repo. [1]: https://github.com/japaric/untry
2015-10-08typos: fix a grabbag of typos all over the placeCristi Cobzarenco-2/+2
2015-06-08Replace usage of String::from_str with String:fromSimon Sapin-1/+1
2015-04-24Change name of unit test sub-module to "tests".Johannes Oertel-1/+1
Changes the style guidelines regarding unit tests to recommend using a sub-module named "tests" instead of "test" for unit tests as "test" might clash with imports of libtest.
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-1/+1
Now that support has been removed, all lingering use cases are renamed.
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-4/+3
2015-02-02`for x in xs.iter()` -> `for x in &xs`Jorge Aparicio-1/+1
2015-01-29`for x in range(a, b)` -> `for x in a..b`Jorge Aparicio-1/+1
sed -i 's/in range(\([^,]*\), *\([^()]*\))/in \1\.\.\2/g' **/*.rs
2015-01-20std: Rename Show/String to Debug/DisplayAlex Crichton-3/+3
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-06More test fixesAlex Crichton-2/+0
2015-01-06core: split into fmt::Show and fmt::StringSean McArthur-0/+8
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-3/+3
2014-12-10Fix inappropriate ## headingsSteve Klabnik-0/+4
Fixes #15499.
2014-09-16Fallout from renamingAaron Turon-1/+1
2014-06-15Register new snapshotsAlex Crichton-1/+1
2014-06-10Fix more misspelled comments and strings.Joseph Crail-4/+4
2014-06-06Rename Iterator::len to countAaron Turon-1/+1
This commit carries out the request from issue #14678: > The method `Iterator::len()` is surprising, as all the other uses of > `len()` do not consume the value. `len()` would make more sense to be > called `count()`, but that would collide with the current > `Iterator::count(|T| -> bool) -> unit` method. That method, however, is > a bit redundant, and can be easily replaced with > `iter.filter(|x| x < 5).count()`. > After this change, we could then define the `len()` method > on `iter::ExactSize`. Closes #14678. [breaking-change]
2014-05-30std: Rename {Eq,Ord} to Partial{Eq,Ord}Alex Crichton-3/+3
This is part of the ongoing renaming of the equality traits. See #12517 for more details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord} or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}. cc #12517 [breaking-change]
2014-05-28std: Remove format_strbuf!()Alex Crichton-1/+1
This was only ever a transitionary macro.
2014-05-27std: Rename strbuf operations to stringRicho Healey-5/+5
[breaking-change]
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-7/+7
[breaking-change]
2014-05-15Updates with core::fmt changesAlex Crichton-3/+3
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-11/+15
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-2/+2
2014-04-10libstd: Implement `StrBuf`, a new string buffer type like `Vec`, andPatrick Walton-8/+9
port all code over to use it.
2014-03-31rustdoc: Switch field privacy as necessaryAlex Crichton-8/+8
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-1/+0
It's now in the prelude.
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-1/+1
Closes #12771