-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 10 pull requests #127244
Rollup of 10 pull requests #127244
Conversation
…to begin ICEing during codegen
This should prevent the default fallback if we add more float types in the future.
The `load` and `store` instructions in LLVM access the aligned size.
Parenthesize break values containing leading label The AST pretty printer previously produced invalid syntax in the case of `break` expressions with a value that begins with a loop or block label. ```rust macro_rules! expr { ($e:expr) => { $e }; } fn main() { loop { break expr!('a: loop { break 'a 1; } + 1); }; } ``` `rustc -Zunpretty=expanded main.rs `: ```console #![feature(prelude_import)] #![no_std] #[prelude_import] use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; macro_rules! expr { ($e:expr) => { $e }; } fn main() { loop { break 'a: loop { break 'a 1; } + 1; }; } ``` The expanded code is not valid Rust syntax. Printing invalid syntax is bad because it blocks `cargo expand` from being able to format the output as Rust syntax using rustfmt. ```console error: parentheses are required around this expression to avoid confusion with a labeled break expression --> <anon>:9:26 | 9 | fn main() { loop { break 'a: loop { break 'a 1; } + 1; }; } | ^^^^^^^^^^^^^^^^^^^^^^^^ | help: wrap the expression in parentheses | 9 | fn main() { loop { break ('a: loop { break 'a 1; }) + 1; }; } | + + ``` This PR updates the AST pretty-printer to insert parentheses around the value of a `break` expression as required to avoid this edge case.
…env-shim, r=oli-obk Fix `FnMut::call_mut`/`Fn::call` shim for async closures that capture references I adjusted async closures to be able to implement `Fn` and `FnMut` *even if* they capture references, as long as those references did not need to borrow data from the closure captures themselves. See rust-lang#125259. However, when I did this, I didn't actually relax an assertion in the `build_construct_coroutine_by_move_shim` shim code, which builds the `Fn`/`FnMut`/`FnOnce` implementations for async closures. Therefore, if we actually tried to *call* `FnMut`/`Fn` on async closures, it would ICE. This PR adjusts this assertion to ensure that we only capture immutable references in closures if they implement `Fn`/`FnMut`. It also adds a bunch of tests and makes more of the async-closure tests into `build-pass` since we often care about these tests actually generating the right closure shims and stuff. I think it might be excessive to *always* use build-pass here, but 🤷 it's not that big of a deal. Fixes rust-lang#127019 Fixes rust-lang#127012 r? oli-obk
Uplift fast rejection to new solver Self explanatory. r? lcnr
Bootstrap: Try renaming the file if removing fails Second attempt at working around rust-lang#127126 If we can't remove the file, then try renaming it. This will leave the destination path free to use. try-job: x86_64-msvc-ext
Use the aligned size for alloca at args/ret when the pass mode is cast Fixes rust-lang#75839. Fixes rust-lang#121028. The `load` and `store` instructions in LLVM access the aligned size. For example, `load { i64, i32 }` accesses 16 bytes on x86_64: https://alive2.llvm.org/ce/z/n8CHAp. BTW, this example is expected to be optimized to immediate UB by Alive2: https://rust.godbolt.org/z/b7xK7hv1c and https://alive2.llvm.org/ce/z/vZDtZH. r? compiler
…t, r=Nadrieril Fix import suggestion error when path segment failed not from starting Fixes rust-lang#120074
Update books ## rust-lang/book 2 commits in 45c1a6d69edfd1fc91fb7504cb73958dbd09441e..f1e49bf7a8ea6c31ce016a52b8a4f6e1ffcfbc64 2024-06-25 21:12:15 UTC to 2024-06-20 16:10:32 UTC - Update ch10-00-generics.md (rust-lang/book#3963) - infra: ignore Nova configuration directory (rust-lang/book#3962) ## rust-lang/edition-guide 3 commits in cb58c430b4e8054c2cb81d2d4434092c482a93d8..941db8b3df45fd46cd87b50a5c86714b91dcde9c 2024-06-30 19:26:27 UTC to 2024-06-20 18:43:18 UTC - Add a section for the never type change in e2024 (rust-lang/edition-guide#310) - Add 2024 unsafe attributes. (rust-lang/edition-guide#308) - Add 2024 unsafe extern blocks. (rust-lang/edition-guide#309) ## rust-lang/reference 7 commits in 0b805c65804019b0ac8f2fe3117afad82a6069b8..1ae3deebc3ac16e276b6558e01420f8e605def08 2024-06-29 16:59:51 UTC to 2024-06-18 22:16:37 UTC - Provide an example of `target_family` being multi-valued (rust-lang/reference#1518) - Remove stubs needed for the link checker. (rust-lang/reference#1517) - Document new `#[expect]` attribute and `reasons` parameter (RFC 2383) (rust-lang/reference#1237) - Update recognized tool attributes (rust-lang/reference#1498) - Add example of 1-ary tuple type (rust-lang/reference#1514) - underscore-expr: add more examples (rust-lang/reference#1478) - Remove outdated info about impl Trait in parameters and generics in the same function (rust-lang/reference#1495) ## rust-lang/rust-by-example 4 commits in b1d97bd6113aba732b2091ce093c76f2d05bb8a0..658c6c27cb975b92227936024816986c2d3716fb 2024-06-30 11:58:29 UTC to 2024-06-30 11:52:38 UTC - Remove awkward match in if_let (rust-lang/rust-by-example#1725) - Edit grammatical mistake (rust-lang/rust-by-example#1830) - Update paragraph in src/fn/diverging.md (rust-lang/rust-by-example#1853) - Fix minor typo in from_into.md (rust-lang/rust-by-example#1854) ## rust-lang/rustc-dev-guide 11 commits in aec82168dd3121289a194b381f56076fc789a4d2..d6e3a32a557db5902e714604def8015d6bb7e0f7 2024-07-01 10:51:26 UTC to 2024-06-18 18:24:17 UTC - Update new target check-cfg instructions (rust-lang/rustc-dev-guide#2006) - Add Rust for Linux integration tests documentation (rust-lang/rustc-dev-guide#2004) - Add docs for building Fuchsia locally and in CI (rust-lang/rustc-dev-guide#1989) - provide `libstdc++.so.6` through `LD_LIBRARY_PATH` (rust-lang/rustc-dev-guide#1999) - Document how to run `run-make` tests on Windows (rust-lang/rustc-dev-guide#2002) - Document `needs-symlink` directive (rust-lang/rustc-dev-guide#2001) - Rename `wasm32-wasi` to `wasm32-wasip1` (rust-lang/rustc-dev-guide#1678) - Document inert vs active attributes (rust-lang/rustc-dev-guide#1110) - Document hard-resetting submodules (rust-lang/rustc-dev-guide#2000) - Fix note about compiletest header `rustfix-only-machine-applicable` (rust-lang/rustc-dev-guide#1998) - Mention `RUSTC_ICE=0` to suppress ICE file (rust-lang/rustc-dev-guide#1997)
…r=RalfJung Make `FloatTy` checks exhaustive in pretty print This should prevent the default fallback if we add more float types in the future.
chore: remove duplicate words remove duplicate words in comments to improve readability.
…_test, r=compiler-errors Add test for adt_const_params Fixes rust-lang#84238 r? `@compiler-errors`
@bors r+ rollup=never p=15 |
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#126883 (Parenthesize break values containing leading label) - rust-lang#127136 (Fix `FnMut::call_mut`/`Fn::call` shim for async closures that capture references) - rust-lang#127146 (Uplift fast rejection to new solver) - rust-lang#127152 (Bootstrap: Try renaming the file if removing fails) - rust-lang#127168 (Use the aligned size for alloca at args/ret when the pass mode is cast) - rust-lang#127203 (Fix import suggestion error when path segment failed not from starting) - rust-lang#127212 (Update books) - rust-lang#127224 (Make `FloatTy` checks exhaustive in pretty print) - rust-lang#127230 (chore: remove duplicate words) - rust-lang#127243 (Add test for adt_const_params) r? `@ghost` `@rustbot` modify labels: rollup
💔 Test failed - checks-actions |
A job failed! Check out the build log: (web) (plain) Click to see the possible cause of the failure (guessed by this bot)
|
@bors retry p=10 |
☀️ Test successful - checks-actions |
Finished benchmarking commit (6292b2a): 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)This benchmark run did not return any relevant results for this metric. 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: 695.727s -> 696.719s (0.14%) |
Successful merges:
FnMut::call_mut
/Fn::call
shim for async closures that capture references #127136 (FixFnMut::call_mut
/Fn::call
shim for async closures that capture references)FloatTy
checks exhaustive in pretty print #127224 (MakeFloatTy
checks exhaustive in pretty print)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup