| Age | Commit message (Collapse) | Author | Lines |
|
|
|
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.
|
|
Move `CrateConfig` from `Crate` to `ParseSess`
This is a syntax-[breaking-change]. Most breakage can be fixed by removing a `CrateConfig` argument.
r? @eddyb
|
|
|
|
|
|
tup} calls.
|
|
|
|
The main change is to stop using javascript to generate the URLs and use
rustdoc instead.
This also adds run buttons to the error index examples.
|
|
rustdoc: color the question mark operator
The idea of coloring `?` specially was proposed by @eddyb in: https://github.com/rust-lang/rust/issues/31436#issuecomment-247426582
|
|
librustdoc refactoring and cleanup.
|
|
stabilise ?, attributes on stmts, deprecate Reflect
r? @nikomatsakis
|
|
|
|
The idea was proposed by eddyb in: https://github.com/rust-lang/rust/issues/31436#issuecomment-247426582
|
|
cc [`?` tracking issue](https://github.com/rust-lang/rust/issues/31436)
|
|
rustdoc: print non-self arguments of bare functions and struct methods on their own line
This change alters the formatting rustdoc uses when it creates function and struct method documentation. For bare functions, each argument is printed on its own line. For struct methods, non-self arguments are printed on their own line. In both cases, no line breaks are introduced if there are no arguments, and for struct methods, no line breaks are introduced if there is only a single self argument. This should aid readability of long function signatures and allow for greater comprehension of these functions.
I've run rustdoc with these changes on my crate egg-mode and its set of dependencies and put the result [on my server](https://shiva.icesoldier.me/doc-custom/egg_mode/). Of note, here are a few shortcut links that highlight the changes:
* [Bare function with a long signature](https://shiva.icesoldier.me/doc-custom/egg_mode/place/fn.reverse_geocode.html)
* [Struct methods, with single self argument and with self and non-self arguments](https://shiva.icesoldier.me/doc-custom/egg_mode/tweet/struct.Timeline.html#method.reset)
* [Bare functions with no arguments](https://shiva.icesoldier.me/doc-custom/rand/fn.thread_rng.html) and [struct methods with no arguments](https://shiva.icesoldier.me/doc-custom/hyper/client/struct.Client.html#method.new) are left unchanged.
This PR consists of two commits: one for bare functions and one for struct methods.
|
|
|
|
|
|
|
|
|
|
Fixes run button appearing when it shouldn't
Fixes #36621.
r? @steveklabnik
|
|
|
|
std: Minor cleanup to libtest
* Don't spawn two threads for all tests, just one now that `catch_unwind` is
stable.
* Remove usage of the unstable `box` keyword
* Remove usage of the unstable `FnBox` trait
|
|
Remove underline when run button hovered
r? @steveklabnik
|
|
|
|
* Don't spawn two threads for all tests, just one now that `catch_unwind` is
stable.
* Remove usage of the unstable `box` keyword
* Remove usage of the unstable `FnBox` trait
|
|
rustdoc: Fix missing *mut T impl
`impl<T> *mut T` is currently missing from
https://doc.rust-lang.org/nightly/std/primitive.pointer.html and this adds
it back.
|
|
|
|
Address comments + Fix rebase
|
|
|
|
|
|
|
|
`impl<T> *mut T` is currently missing from
https://doc.rust-lang.org/nightly/std/primitive.pointer.html and this adds
it back.
|
|
Minor librustdoc cleanup and refactoring.
|
|
rustdoc: Fix documenting rustc-macro crates
This commit adds a "hack" to the session to track whether we're a rustdoc
session or not. If we're rustdoc then we skip the expansion to add the
rustc-macro infrastructure.
Closes #36820
|
|
|
|
https://github.com/rust-lang/rust/pull/36903#discussion_r81477884
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 6 pull requests
- Successful merges: #36865, #36872, #36873, #36877, #36880, #36882
- Failed merges:
|
|
jonas-schievink:whats-a-pirates-favorite-data-structure, r=pnkfelix
Contains a syntax-[breaking-change] as a separate commit (cc #31645).nnAlso renames slice patterns from `PatKind::Vec` to `PatKind::Slice`.
|
|
A couple refactorings in librustdoc.
None
|
|
|
|
Was previously cached and maintained in the `Context`, which to me seems
overkill.
|
|
|
|
This commit adds a "hack" to the session to track whether we're a rustdoc
session or not. If we're rustdoc then we skip the expansion to add the
rustc-macro infrastructure.
Closes #36820
|
|
|