-
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 9 pull requests #64115
Rollup of 9 pull requests #64115
Conversation
An initial refactoring before working on rust-lang#61809. This moves the whole block into a method so that it can be reused in the annotate-snippet output. It's already used in the new emitter, but there's no UI tests with suggestions included in this PR. A first look at some UI tests with suggestions showed that there's some more work to do in [annotate-snippet-rs][annotate-snippet-rs] before the new output is closer to the current one.
This avoids needlessly creating and threading the buffers through when we only use them once.
This means that callers can pass in a closure like `|buf| some_function(..., &mut buf)` and pass in arbitrary arguments to that function without complicating the trait definition. We also keep the impl for str and String, since it's useful to be able to just pass in "" or format!("{}"...) results in some cases. This changes Print's definition to take self, instead of &self, because otherwise FnOnce cannot be called directly. We could instead take FnMut or even Fn, but that seems like it'd merely complicate matters -- most of the time, the FnOnce does not constrain us at all anyway. If it does, a custom Print impl for &'_ SomeStruct is not all that painful.
Fix `window.hashchange is not a function` Closes rust-lang#63707.
…GuillaumeGomez Rustdoc: formatting to buffers This should be reviewed commit-by-commit. I've not attempted to fully flesh out what the end state of this PR could look like yet as I wanted to get it up for some early feedback (I already think this has some wins, too, so we could land it as-is). The primary idea with `Buffer` is that it internally tracks whether we're printing to HTML or text, and the goal is that eventually instead of branch on `fmt.alternate()` anywhere, we'd call a helper like `buf.nbsp()` which would either return ` ` or ` ` depending on the target we're printing to. Obviously, that's not included in this PR, in part because it was already getting quite big.
Emit a single error on if expr with expectation and no else clause Fix rust-lang#60254. r? @Centril
…ntril Account for arbitrary self types in E0599 Fix rust-lang#62373
…bank librustc_errors: Extract sugg/subst handling into method An initial refactoring before working on rust-lang#61809. This moves the whole block into a method so that it can be reused in the annotate-snippet emitter. The method is already used in the new emitter, but there's no UI tests with suggestions included in this PR. A first look at some UI tests with suggestions showed that there's some more work to do in [annotate-snippet-rs][annotate-snippet-rs] before the new output is closer to the current one, so I opted to do that in a second step. r? @estebank [annotate-snippet-rs]: https://github.com/rust-lang/annotate-snippets-rs
Fix const_err with `-(-0.0)` Fixes rust-lang#64059 r? @oli-obk
use just one name when parameters and fields are the same
…ark-Simulacrum Fix regex replacement in theme detection Fixes rust-lang#64061. This is sadly a lot of bad luck: after making the changes and re-build the docs, I just forgot to force reload the page. Hence having the old (working) version with two replacements instead of the failing regex. Sorry again about that... cc @fenhl r? @Mark-Simulacrum
…e, r=estebank Emit error on intrinsic to fn ptr casts I'm not sure if a type error is the best way of doing this but it seemed like a relatively correct place to do it, and I expect this is a pretty rare case to hit anyway. Fixes rust-lang#15694
@bors r+ rollup=never p=9 |
📌 Commit 0de3668 has been approved by |
⌛ Testing commit 0de3668 with merge 96d1481e3cc5ff24f1f7d92536dee15a6f0a305b... |
💔 Test failed - checks-azure |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Successful merges:
window.hashchange is not a function
#63774 (Fixwindow.hashchange is not a function
)-(-0.0)
#64063 (Fix const_err with-(-0.0)
)Failed merges:
r? @ghost