Skip to content

Conversation

compiler-errors
Copy link
Member

Bumped the toolchain from rust-lang/rust@8337ba918 2024-06-12 to rust-lang/rust@6b0f4b5ec 2024-06-24.

Pulled in some interesting commits, notably:

Otherwise a pretty minor subtree sync :^)

compiler-errors and others added 13 commits June 17, 2024 22:35
This paves the way for tracking more state (e.g. error tainting) in the diagnostic context handle
Merge `PatParam`/`PatWithOr`, and `Expr`/`Expr2021`, for a few reasons. - It's conceptually nice, because the two pattern kinds and the two expression kinds are very similar. - With expressions in particular, there are several places where both expression kinds get the same treatment. - It removes one unreachable match arm. - Most importantly, for #124141 I will need to introduce a new type `MetaVarKind` that is very similar to `NonterminalKind`, but records a couple of extra fields for expression metavars. It's nicer to have a single `MetaVarKind::Expr` expression variant to hold those extra fields instead of duplicating them across two variants `MetaVarKind::{Expr,Expr2021}`. And then it makes sense for patterns to be treated the same way, and for `NonterminalKind` to also be treated the same way. I also clarified the comments, because I have long found them a little hard to understand.
…r-errors Rework pattern and expression nonterminal kinds. Some tweaks to `NonterminalKind` that will assist with #124141. Details in the individual commits. r? compiler-errors cc ```@eholk```
Implement `use<>` formatting in rustfmt This PR implements formatting for precise-capturing `use<>` syntax as proposed in rust-lang/rust#126753. The syntax is implemented as-if the `use<>` bound were a trait bound but with the `use` keyword as its path segment identifier. I opted to develop this in the rust-lang/rust tree since I'm not certain when the next rustfmt subtree sync is going to be, and I'd rather not block landing nightly support for `use<>` on something I have no control over. If ``@rust-lang/rustfmt`` would rather I move this PR over to that repository, then I would at least like to know when the next rustfmt->rust subtree sync is going to be, since stabilizing `precise_capturing` without formatting will be disruptive. This implementation is otherwise rather straightforward. Tracking: - rust-lang/rust#123432
Remove stray println from rustfmt's `rewrite_static` r? `@calebcartwright` `@ytmimi` -- though anyone should probably r+ this so it gets into nightly sooner than later, since it's obviously wrong. This can just be fixed in-tree, since I don't think we want to wait until the next sync to fix this. Fix rust-lang#6210 Fix rust-lang/rust#126887
@ytmimi
Copy link
Contributor

ytmimi commented Jun 25, 2024

weird, I see that 514fe39 pulled in the commit that removed the stray println!, but when I look at all the changed files in the GitHub UI I'm not seeing the change.

Maybe there was an issue with the merge?

@compiler-errors
Copy link
Member Author

Oh yea, what the heck? The merge commit added it back.

@ytmimi
Copy link
Contributor

ytmimi commented Jun 25, 2024

Really strange behavior. Maybe you could reset to 514fe39 and then try the merge again?

@compiler-errors
Copy link
Member Author

Yep -- I did that. I think this is just what git thinks is right when merging origin/master into sync-from-rust-2024-06-24.

@compiler-errors
Copy link
Member Author

I believe this is relevant:

With the strategies that use 3-way merge (including the default, ort), if a change is made on both branches, but later reverted on one of the branches, that change will be present in the merged result; some people find this behavior confusing. It occurs because only the heads and the merge base are considered when performing a merge, not the individual commits. The merge algorithm therefore considers the reverted change as no change at all, and substitutes the changed version instead.

@compiler-errors
Copy link
Member Author

I'll push a commit on top to revert the bad merge tomorrow. Git is so weird.

@calebcartwright
Copy link
Member

Git is so weird.

it really can be. it's times like these that make me feel like I need to review every line of diffs on the pushes, even the "successfully" staged ones

@compiler-errors
Copy link
Member Author

@calebcartwright: I believe it's probably most effective to add as a "step" to your runbook (in your brain or otherwise) to review the diff of the merge commit itself, rather than reviewing every line which can be a lot of work.

You can view the diff of the merge commit if you ask git to show it:

There are no new changes to show, but you can still view the diff.

I would've probably caught that if I knew that this was something git could do.

@calebcartwright calebcartwright merged commit 6093d48 into rust-lang:master Jul 1, 2024
CalebLItalien pushed a commit to CalebLItalien/rustfmt that referenced this pull request Jul 3, 2024
…-2024-06-24 subtree-push 2024-06-24 Merge commit from master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

7 participants