-
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 6 pull requests #129202
Rollup of 6 pull requests #129202
Commits on Aug 16, 2024
-
mir/pretty: use
Option
instead ofEither<Once, Empty>
`Either` is wasteful for a one-or-none iterator, especially since `Once` is already an `option::IntoIter` internally. We don't really need any of the iterator mechanisms in this case, just a single conditional insert.
Configuration menu - View commit details
-
Copy full SHA for 29017e4 - Browse repository at this point
Copy the full SHA 29017e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for ed6315b - Browse repository at this point
Copy the full SHA ed6315bView commit details
Commits on Aug 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3c8dad1 - Browse repository at this point
Copy the full SHA 3c8dad1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 321d40f - Browse repository at this point
Copy the full SHA 321d40fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7bde314 - Browse repository at this point
Copy the full SHA 7bde314View commit details -
Remove a useless ref/id/ref round-trip from
pattern_from_hir
This re-lookup of `&hir::Pat` by its ID appears to be an artifact of earlier complexity that has since been removed from the compiler.
Configuration menu - View commit details
-
Copy full SHA for 194ade1 - Browse repository at this point
Copy the full SHA 194ade1View commit details -
Rollup merge of rust-lang#128989 - s7tya:check-linkage-attribute-pos,…
… r=petrochenkov Emit an error for invalid use of the linkage attribute fixes rust-lang#128486 Currently, the use of the linkage attribute for Mod, Impl,... is incorrectly permitted. This PR will correct this issue by generating errors, and I've also added some UI test cases for it. Related: rust-lang#128552.
Configuration menu - View commit details
-
Copy full SHA for cfeded4 - Browse repository at this point
Copy the full SHA cfeded4View commit details -
Rollup merge of rust-lang#129167 - cuviper:either-once-empty, r=Nadri…
…eril mir/pretty: use `Option` instead of `Either<Once, Empty>` `Either` is wasteful for a one-or-none iterator, especially since `Once` is already an `option::IntoIter` internally. We don't really need any of the iterator mechanisms in this case, just a single conditional insert.
Configuration menu - View commit details
-
Copy full SHA for 9c910ae - Browse repository at this point
Copy the full SHA 9c910aeView commit details -
Rollup merge of rust-lang#129168 - BoxyUwU:mismatched_ty_correct_id, …
…r=compiler-errors Return correct HirId when finding body owner in diagnostics Fixes rust-lang#129145 Fixes rust-lang#128810 r? ```@compiler-errors``` ```rust fn generic<const N: u32>() {} trait Collate<const A: u32> { type Pass; fn collate(self) -> Self::Pass; } impl<const B: u32> Collate<B> for i32 { type Pass = (); fn collate(self) -> Self::Pass { generic::<{ true }>() //~^ ERROR: mismatched types } } ``` When type checking the `{ true }` anon const we would error with a type mismatch. This then results in diagnostics code attempting to check whether its due to a type mismatch with the return type. That logic was implemented by walking up the hir until we reached the body owner, except instead of using the `enclosing_body_owner` function it special cased various hir nodes incorrectly resulting in us walking out of the anon const and stopping at `fn collate` instead. This then resulted in diagnostics logic inside of the anon consts `ParamEnv` attempting to do trait solving involving the `<i32 as Collate<B>>::Pass` type which ICEs because it is in the wrong environment. I have rewritten this function to just walk up until it hits the `enclosing_body_owner` and made some other changes since I found this pretty hard to read/understand. Hopefully it's easier to understand now, it also makes it more obvious that this is not implemented in a very principled way and is definitely missing cases :)
Configuration menu - View commit details
-
Copy full SHA for ddbbda4 - Browse repository at this point
Copy the full SHA ddbbda4View commit details -
Rollup merge of rust-lang#129191 - aDotInTheVoid:rdj-serial-cleanup, …
…r=GuillaumeGomez rustdoc-json: Clean up serialization and printing. Somewhat a followup to rust-lang#128963, but makes sense regardless. - Renames `out_path` to `out_dir` because it's not the path to the JSON, but the directory - Also adds a comment explaining `None` - Renames `write` to `serialize_and_write` because it does both. - Also renames the self-profile activity name to be clear this measures both IO cost and serialization CPU cost - Expands the timer to cover flushing - Renames `output` to `output_crate`, to emphasize it's the contents, not the `--output` flag. r? `@GuillaumeGomez`
Configuration menu - View commit details
-
Copy full SHA for 1a95a5f - Browse repository at this point
Copy the full SHA 1a95a5fView commit details -
Rollup merge of rust-lang#129192 - GuillaumeGomez:rm-useless-merged-d…
…octest-attrs, r=notriddle Remove useless attributes in merged doctest generated code I took another look at the generated code for merged doctests and it seems like those attributes are only useful when running `rustc --test`, which isn't the case for merged doctests. Less code generated. \o/ r? `@notriddle`
Configuration menu - View commit details
-
Copy full SHA for 8a023b3 - Browse repository at this point
Copy the full SHA 8a023b3View commit details -
Rollup merge of rust-lang#129196 - Zalathar:ref-id-ref, r=compiler-er…
…rors Remove a useless ref/id/ref round-trip from `pattern_from_hir` This re-lookup of `&hir::Pat` by its ID appears to be an artifact of earlier complexity that has since been removed from the compiler. Merely deleting the let/match results in borrow errors, but sprinkling `'tcx` in the signature allows it to work again, so I suspect that this code's current function is simply to compensate for overly loose lifetimes in the signature. Perhaps it made more sense at a time when HIR lifetimes were not tied to `'tcx`. I spotted this while working on some more experimental changes, which is why I've extracted it into its own PR.
Configuration menu - View commit details
-
Copy full SHA for 4e6147d - Browse repository at this point
Copy the full SHA 4e6147dView commit details