| Age | Commit message (Collapse) | Author | Lines |
|
Fixes #47311.
r? @nrc
|
|
hedgehog1024:hedgehog1024-stabilize-entry_and_modify, r=alexcrichton
Stabilize 'entry_and_modify' feature
Stabilize `entry_and_modify` feature introduced by #44734.
Closes #44733
|
|
Remove experimental -Zremap-path-prefix-from/to, and replace it with
the stabilized --remap-path-prefix=from=to variant.
This is an implementation for issue of #41555.
|
|
This updates the book repository, but mostly to include
https://github.com/rust-lang/book/pull/1180
TL;DR: the second edition is close enough to done that we should
universally recommend it over the first edition.
|
|
|
|
|
|
|
|
Implement `?` macro repetition
See rust-lang/rfcs#2298 (with disposition merge)
|
|
|
|
r=petrochenkov
Stabilize use_nested_groups
As requested in #44494. Documentation PRs already sent.
|
|
Update book
This PR does two things:
1. update the book to include https://github.com/rust-lang/book/pull/1088
2. update to mdbook 0.1
Both of these things are big changes, so I want to land them now, well before the next branch, so we can kick the tires.
------------------------------
Locally, I'm seeing some weirdness around the reference and this:

Putting this PR up so others can try and build and see if it reproduces for them.
|
|
|
|
|
|
Includes https://github.com/rust-lang/book/pull/1088 and
https://github.com/rust-lang/book/commit/62210e326c27697e94ce429c1683dcea4e4887e4
|
|
r=petrochenkov
Stabilize feature(match_beginning_vert)
With this feature stabilized, match expressions can optionally have a `|` at the beginning of each arm.
Reference PR: rust-lang-nursery/reference#231
Closes #44101
|
|
The `exchange_free` lang item is gone in favour of `box_free` [1].
Some warnings are also fixed by this commit.
[1]: https://github.com/rust-lang/rust/commit/ca115dd083a1fe1d2b4892c5e50e49eb83ff1f3
|
|
|
|
|
|
Punctuation and clarity fixes.
|
|
|
|
Implement repr(transparent)
r? @eddyb for the functional changes. The bulk of the PR is error messages and docs, might be good to have a doc person look over those.
cc #43036
cc @nox
|
|
add Rust By Example to the bookshelf
cc #46194
With #46196 freshly merged, we should add a link to the main docs distribution so people can find it! We discussed this at the docs team meeting today and decided to go ahead with adding it to the bookshelf.
|
|
|
|
|
|
|
|
|
|
|
|
Enforce dashes in the unstable book file names
Also rename the existing underscore using files to use dashes.
Fixes #47394.
|
|
|
|
Also rename the existing underscore using files to use dashes.
Fixes #47394.
|
|
r=QuietMisdreavus
Fix error index display
Fixes #47284.
r? @QuietMisdreavus
|
|
|
|
into the unstable book
|
|
[unstable book] remove duplicate entries
if a unstable feature is a language feature, it shouldn't also have a library feature stub generated
|
|
Allow lifetimes in macros
This is a resurrection of PR #41927 which was a resurrection of #33135, which is intended to fix #34303.
In short, this allows macros_rules! to use :lifetime as a matcher to match 'lifetimes.
Still to do:
- [x] Feature gate
|
|
|
|
|
|
|
|
This is meant to resolve #25689.
|
|
|
|
This commit adds support for nested groups inside `use` declarations,
such as `use foo::{bar, sub::{baz::Foo, *}};`.
|
|
Stabilize spin_loop_hint
Stabilize `spin_loop_hint` in release `1.23.0`.
I've also renamed feature `hint_core_should_pause` to `spin_loop_hint`.
cc #41196
|
|
|
|
rustdoc: include external files in documentation (RFC 1990)
Part of https://github.com/rust-lang/rfcs/pull/1990 (needs work on the error reporting, which i'm deferring to after this initial PR)
cc #44732
Also fixes #42760, because the prep work for the error reporting made it easy to fix that at the same time.
|
|
|
|
Partial implementation of https://github.com/rust-lang/rfcs/pull/1990
(needs error reporting work)
cc #44732
|
|
|
|
r=GuillaumeGomez,QuietMisdreavus
show in docs whether the return type of a function impls Iterator/Read/Write
Closes #25928
This PR makes it so that when rustdoc documents a function, it checks the return type to see whether it implements a handful of specific traits. If so, it will print the impl and any associated types. Rather than doing this via a whitelist within rustdoc, i chose to do this by a new `#[doc]` attribute parameter, so things like `Future` could tap into this if desired.
### Known shortcomings
~~The printing of impls currently uses the `where` class over the whole thing to shrink the font size relative to the function definition itself. Naturally, when the impl has a where clause of its own, it gets shrunken even further:~~ (This is no longer a problem because the design changed and rendered this concern moot.)
The lookup currently just looks at the top-level type, not looking inside things like Result or Option, which renders the spotlights on Read/Write a little less useful:
<details><summary>`File::{open, create}` don't have spotlight info (pic of old design)</summary>

</details>
All three of the initially spotlighted traits are generically implemented on `&mut` references. Rustdoc currently treats a `&mut T` reference-to-a-generic as an impl on the reference primitive itself. `&mut Self` counts as a generic in the eyes of rustdoc. All this combines to create this lovely scene on `Iterator::by_ref`:
<details><summary>`Iterator::by_ref` spotlights Iterator, Read, and Write (pic of old design)</summary>

</details>
|
|
Also includes a fix in std::ops
|
|
rustdoc book: talk about #![doc(test(no_crate_inject))] and #![doc(test(attr(...)))]
While investigating https://github.com/rust-lang/rust/issues/45750 i noticed that `#![doc(test(attr(...)))]` wasn't documented at all. Since this is useful for making your examples follow the same coding guidelines as your code, i wanted to add it to the Rustdoc Book. I also added `#![doc(test(no_crate_inject))]` since it's used in the same place and might be useful for macro-heavy crates. I added mentions for these to "The `doc` attribute" as well as "Documentation tests" since it's useful information in both places.
Technically the step reordering in the second commit is gated on https://github.com/rust-lang/rust/pull/45764, since before that lands attributes from the doctest come before the ones from `#![doc(test(attr(...)))]`.
|