-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 10 pull requests #92996
Rollup of 10 pull requests #92996
Conversation
This makes it easy, when you are scrolled far down in a page, to jump back to the top.
Link sidebar "location" heading to top of page This makes it easy, when you are scrolled far down in a page, to jump back to the top. Demo: https://rustdoc.crud.net/jsha/link-to-top/std/string/struct.String.html r? ``@GuillaumeGomez``
…ron1011 Remove some unnecessary uses of `FieldDef::ident` Followup from rust-lang#92533. cc ``@Aaron1011`` ``@petrochenkov``
…nd-field-in-variant, r=davidtwco Fix `try wrapping expression in variant` suggestion with struct field shorthand Fixes a broken suggestion: [playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=83fe2dbfe1485f8cfca1aef2a6582e77) before: ``` error[E0308]: mismatched types --> src/main.rs:7:19 | 7 | let x = Foo { bar }; | ^^^ expected enum `Option`, found integer | = note: expected enum `Option<i32>` found type `{integer}` help: try wrapping the expression in `Some` | 7 | let x = Foo { Some(bar) }; | +++++ + ``` after: ``` error[E0308]: mismatched types --> src/main.rs:7:19 | 7 | let x = Foo { bar }; | ^^^ expected enum `Option`, found integer | = note: expected enum `Option<i32>` found type `{integer}` help: try wrapping the expression in `Some` | 7 | let x = Foo { bar: Some(bar) }; | ~~~~~~~~~~~~~~ ``` r? ``@m-ou-se`` since you touched the code last in rust-lang#91080
rustdoc: remove hand-rolled isatty This PR replaces bindings to the platform-specific isatty APIs with the `isatty` crate, as done elsewhere in the repository.
…ime-suggestion, r=nagisa Fix suggesting turbofish with lifetime arguments Now we suggest turbofish correctly given exprs like `foo<'_>`. Also fix suggestion when we have `let x = foo<bar, baz>;` which was broken.
Rename Printer constructor from mk_printer() to Printer::new() The original naming is left over from 2011 which was before impl blocks and associated functions existed. https://github.com/rust-lang/rust/blob/21313d623a505086b2973f30c19db4f1d6ec8f61/src/comp/pretty/pp.rs
rustdoc: Add missing dot separator Fixes rust-lang#92901. ![Screenshot from 2022-01-15 17-47-18](https://user-images.githubusercontent.com/3050060/149631249-e2c0c3a4-9ed8-48e2-92cc-79a5bb347b35.png) r? ``@jsha``
…lnay Copy an example to PartialOrd as well In rust-lang#88202 I added an example for deriving PartialOrd on enums, but only later did I realize that I actually put the example on Ord. This copies the example to PartialOrd as well, which is where I intended for it to be. We could also delete the example on Ord, but I see there's already some highly similar examples shared between Ord and PartialOrd, so I figured we could leave it. I also changed some type annotations in an example from `x : T` to the more common style (in Rust) of `x: T`.
Docs: recommend VecDeque instead of Vec::remove(0) Suggestion based on a [discussion](https://internals.rust-lang.org/t/should-vec-have-a-try-remove-mut-self-usize-option-t-function/15964/9?u=kornel) where user needlessly struggled with `remove(0)` and accidentally created a quadratic cost.
…tolnay fix const_ptr_offset_from tracking issue The old tracking issue rust-lang#41079 was for exposing those functions at all, and got closed when they were stabilized. We had nothing tracking their `const`ness so I opened a new tracking issue: rust-lang#92980.
@bors r+ rollup=never p=10 |
📌 Commit 9612038 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (128417f): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Successful merges:
FieldDef::ident
#92799 (Remove some unnecessary uses ofFieldDef::ident
)try wrapping expression in variant
suggestion with struct field shorthand #92808 (Fixtry wrapping expression in variant
suggestion with struct field shorthand)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup