-
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 #104809
Rollup of 9 pull requests #104809
Conversation
Previously, when triggering a method extraction from within a trait impl block, then this would always create a new impl block for the struct, even if there already is one. Now, it'll put the extracted method in the matching existing block if it exists.
…kril internal: Use a process group for flycheck Should fix rust-lang/rust-analyzer#13348
internal: Optimize `apply_document_changes` a bit cc rust-lang/rust-analyzer#13538
minor: Fix typos
…it-into-impl-root, r=Veykril Feat: extracted method from trait impl is placed in existing impl **Before** https://user-images.githubusercontent.com/1759192/183872883-3b0eafd2-d1dc-440e-9e66-38e3372f8b64.mp4 **After** https://user-images.githubusercontent.com/1759192/183875769-87f34c7d-52f0-4dfc-9766-f591ee738ebb.mp4 Previously, when triggering a method extraction from within an impl trait block, then this would always create a new impl block for the struct, even if there already is one. Now, if there is already an existing trait-less impl block, then it'll put the extracted method in there. **Caveats**: - It currently requires the target impl block to be non-empty. This limitation is because the current architecture takes a `node_to_insert_after` as reference for where to insert the extracted function. An empty impl block doesn't have such a reference node, since it's empty. It seems that supporting this requires a much larger and more complex change. - This is my first contribution in rust, so apologies for any beginner mistakes.
The length of byte strings containing escaped newlines is displayed two bytes longer when the first escaped character is a newline. This is due to a small bug in handling the first escaped newline in string literals. Closes rust-lang#13567
Update sysroot crates
Thanks to Lukas Wirth for a suggestion.
Bump Cargo rust-version fields to latest stable We already depend on `let ... else` now anyways Closes rust-lang/rust-analyzer#13562
Generalize reborrow hints as adjustment hints Like reborrow hints, these are still mainly useful for teaching/learning ![image](https://user-images.githubusercontent.com/3757771/200073606-b5cd3b95-a9ad-454d-a3c4-d4d89bf45928.png)
minor: Remove code duplication
…escaped-newlines, r=Veykril Fix the length displayed for byte string literals with escaped newlines This is a fix for the problem I reported earlier: "the length of byte strings containing escaped newlines is displayed two bytes longer when the first escaped character is a newline". I would appreciate it if you could review the fix. Many thanks. Closes rust-lang#13567
…holk,estebank Properly handle `Pin<&mut dyn* Trait>` receiver in codegen This ensures we can actually await a `dyn* Future`, which seems important for async fn in dyn trait. Also, disable `dyn*` trait upcasting. It's not exactly complete right now, and can cause strange ICEs for no reason -- nobody's using it either. I thought it was cute to implement when I did it, but I didn't think about how it interacts structurally with `CoerceUnsized` correctly. Fixes rust-lang#104794, presumably removing `dyn*` upcasting and its `CoerceUnsized` issues does the trick.
…, r=compiler-errors Make `deref_into_dyn_supertrait` lint the impl and not the usage Proposed by ``@compiler-errors`` in rust-lang#89460 (comment) r? ``@crlf0710``
…ice, r=oli-obk Pass `InferCtxt` to `DropRangeVisitor` so we can resolve vars The types that we encounter in the `TypeckResults` that we pass to the `DropRangeVisitor` are not yet fully resolved, since that only happens in writeback after type checking is complete. Instead, pass down the whole `InferCtxt` so that we can resolve any inference vars that have been constrained since they were written into the results. This is similar to how the `MemCategorizationContext` in the `ExprUseVisitor` also needs to pass down both typeck results _and_ the inference context. Fixes an ICE mentioned in this comment: rust-lang#104382 (comment)
…, r=davidtwco Add regression test for issue rust-lang#99938 That issue was a dupe of rust-lang#99852, and it got fixed since, but it's always better to have multiple regression tests rather than one. closes rust-lang#99938
…-improvement, r=notriddle Small accessibility improvements From this [reddit post](https://www.reddit.com/r/rust/comments/z1gyz7/accessible_documentation/), I started to check a bit how to improve accessibility and how we could add test for it. So these two fixes come from the use of the [pa11y tool](https://github.com/pa11y/pa11y). To make it work, I had to update its puppeteer version to the last one but otherwise it seems to be quite nice. I didn't fix all the errors it reported because they were about colors. To get the same result as mine, you can use this config: ```json { "ignore": [ "WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail", "WCAG2AA.Principle3.Guideline3_2.3_2_2.H32.2" ] } ``` I think trying to improve accessibility is something we should definitely aim for. I'll try to integrate a tool to enforce this check (very likely `pa11y`) directly into the CI. cc ``@jsha`` r? ``@notriddle``
…malize, r=lcnr Use ObligationCtxt::normalize r? ```@lcnr```
…r=lnicola ⬆️ rust-analyzer r? ```@ghost```
@bors r+ rollup=never p=9 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: 341d8b8a2c In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (1dda298): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
Successful merges:
.clone()
orref binding
on E0382 #103908 (Suggest.clone()
orref binding
on E0382)Pin<&mut dyn* Trait>
receiver in codegen #104594 (Properly handlePin<&mut dyn* Trait>
receiver in codegen)deref_into_dyn_supertrait
lint the impl and not the usage #104742 (Makederef_into_dyn_supertrait
lint the impl and not the usage)InferCtxt
toDropRangeVisitor
so we can resolve vars #104753 (PassInferCtxt
toDropRangeVisitor
so we can resolve vars)if let chain
#99938)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup