-
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 4 pull requests #124916
Rollup of 4 pull requests #124916
Conversation
Previously, `break` inside `gen` blocks and functions were incorrectly identified to be enclosed by a closure. This PR fixes it by displaying an appropriate error message for async blocks, async closures, async functions, gen blocks, gen closures, gen functions, async gen blocks, async gen closures and async gen functions. Note: gen closure and async gen closure are not supported by the compiler yet but I have added an error message here assuming that they might be implemented in the future. Also, fixes grammar in a few places by replacing `inside of a $coroutine` with `inside a $coroutine`.
…tify-gen-block, r=compiler-errors Fix Error Messages for `break` Inside Coroutines Fixes rust-lang#124495 Previously, `break` inside `gen` blocks and functions were incorrectly identified to be enclosed by a closure. This PR fixes it by displaying an appropriate error message for async blocks, async closures, async functions, gen blocks, gen closures, gen functions, async gen blocks, async gen closures and async gen functions. Note: gen closure and async gen closure are not supported by the compiler yet but I have added an error message here assuming that they might be implemented in the future. ~~Also, fixes grammar in a few places by replacing `inside of a $coroutine` with `inside a $coroutine`.~~
…-file, r=jieyouxu Migrate `run-make/rustdoc-map-file` to rmake Part of rust-lang#121876. r? `@jieyouxu`
…ces, r=estebank Fix more ICEs in `diagnostic::on_unimplemented` There were 8 other calls to `expect_local` left in `on_unimplemented.rs` -- all of which (afaict) could be turned into ICEs. I would really like to see validation of `on_unimplemented` separated from parsing, so we only emit errors here: https://github.com/rust-lang/rust/blob/a60f077c38fe66d05449919842d3d73e3299bbab/compiler/rustc_hir_analysis/src/check/check.rs#L836-L839 ...And gracefully fail instead when emitting trait predicate failures, not *ever* even trying to emit an error or a lint. But that's left for a separate PR. r? `@estebank`
…projection, r=fee1-dead Handle field projections like slice indexing in invalid_reference_casting r? `@Urgau` I saw the implementation in rust-lang#124761, and I was wondering if we also need to handle field access. We do. Without this PR, we get this errant diagnostic: ``` error: casting references to a bigger memory layout than the backing allocation is undefined behavior, even if the reference is unused --> /home/ben/rust/tests/ui/lint/reference_casting.rs:262:18 | LL | let r = &mut v.0; | --- backing allocation comes from here LL | let ptr = r as *mut i32 as *mut Vec3<i32>; | ------------------------------- casting happend here LL | unsafe { *ptr = Vec3(0, 0, 0) } | ^^^^^^^^^^^^^^^^^^^^ | = note: casting from `i32` (4 bytes) to `Vec3<i32>` (12 bytes) ```
@bors r+ rollup=never p=4 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 37dc766378 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (5f8c17d): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
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. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 676.526s -> 676.422s (-0.02%) |
Successful merges:
break
Inside Coroutines #124777 (Fix Error Messages forbreak
Inside Coroutines)run-make/rustdoc-map-file
to rmake #124837 (Migraterun-make/rustdoc-map-file
to rmake)diagnostic::on_unimplemented
#124875 (Fix more ICEs indiagnostic::on_unimplemented
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup