-
Notifications
You must be signed in to change notification settings - Fork 565
Rustc pull update #2717
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
Merged
Merged
Rustc pull update #2717
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: d2f887349fe3ea079a4f89b020ce6df1993e1e06 Filtered ref: 9d58c60713ff95a4300515c3da1b009cd1e3fa90 Upstream diff: rust-lang/rust@69d4d5f...d2f8873 This merge was created using https://github.com/rust-lang/josh-sync.
Automatic Rustup
refactor TreeVisitor
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: e22dab387f6b4f6a87dfc54ac2f6013dddb41e68 Filtered ref: d63b85126401b9789d5391061bdcf6fd8b7e6371 Upstream diff: rust-lang/rust@d2f8873...e22dab3 This merge was created using https://github.com/rust-lang/josh-sync.
Implement `posix_fallocate` with `set_len()` functionality
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: d3e1ccdf40ae7b7a6dc81edc073d80dad7b66f75 Filtered ref: 6b5af2ac5727faaeb5f843668d4b0befce2ab986 Upstream diff: rust-lang/rust@e22dab3...d3e1ccd This merge was created using https://github.com/rust-lang/josh-sync.
Add libc direct tests for (get/set/unset)env functions
Automatic Rustup
re-enable caching on macos runners
refactor: clean up unused LLVM SIMD
…re-refactor preliminary refactor for wildcard reborrows
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 88bd39beb342e2ae7ded1eb7d58697416686d679 Filtered ref: 7c1fca92d3f0e2336a4dc7665fe2bade6c7ec2eb Upstream diff: rust-lang/rust@c871d09...88bd39b This merge was created using https://github.com/rust-lang/josh-sync.
Support retagging of wildcard references in tree borrows
Remove `[no-mentions]` handler in the triagebot config
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: f5209000832c9d3bc29c91f4daef4ca9f28dc797 Filtered ref: 7d63be37076f39216080a677b88ad18621850d0c Upstream diff: rust-lang/rust@36b2369...f520900 This merge was created using https://github.com/rust-lang/josh-sync.
Automatic Rustup
gitconfig is not a toml file
add avx512 pshufb
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 686f9cefc37c5bdec069a75357f0277b390657ca Filtered ref: 6797ffd06586bf79776bae0cf8967a6fd406c10a Upstream diff: rust-lang/rust@0208ee0...686f9ce This merge was created using https://github.com/rust-lang/josh-sync.
Automatic Rustup
Implement FlushFileBuffers
Tree Borrows: multiple invalid exposed nodes on main subtree
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 8796b3b8b4ac6f38a80bf80ce89dd7bd7f92edd7 Filtered ref: 642abedf8ad3d5b0e12c0d38ec35e365a34df07b Upstream diff: rust-lang/rust@a0c97e3...8796b3b This merge was created using https://github.com/rust-lang/josh-sync.
Automatic Rustup
…se-child-skipping Tree Borrows: improve protector end access child skipping
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 38ed7700e7ba3adb7af96e3dcb2ba6dfa3a0c951 Filtered ref: 581f85c88ad421564634a8e45c53aed1f078099d Upstream diff: rust-lang/rust@8796b3b...38ed770 This merge was created using https://github.com/rust-lang/josh-sync.
Automatic Rustup
show a warning when combing native-lib mode and many-seeds
Implement flatten for `Option<&Option<T>>` and `Option<&mut Option<T>>` Adds `.flatten_ref()` to get a immutable reference of a nested option and `.flatten_mut()` for mutable references. ACP: rust-lang/libs-team#186 Tracking Issue: rust-lang/rust#149221
Offload: Build offload as a single Step r? `@Kobzol` Since it looks like we'll postpone enabling offload in CI for a bit, I factored out these improvements which we want independently. I locally tested both build options successfully, the in-tree-clang build, as well as the build where we provide a path to an external clang.
slice iter cleanup: replace checked_sub with saturating_sub Continuation of rust-lang/rust#146436 r? `@joboet`
add has_offload/needs-offload to the test infra unblocks: rust-lang/rust#150426 Mostly copied from rust-lang/rust#131044 lmk if some of these changes should land separately? r? jieyouxu
fix running stdlib doctests in Miri in CI r? `@bjorn3`
Fix enum variant suggestion consuming trailing parenthesis - Closes rust-lang/rust#150459 Previously the logic incorrectly assumed the variant itself was the function being called when the parent node was a function all. This change adds a check to ensure the replacement span is only expanded if the path expression is actually the callee of the parent expression.
Fix new bors config I added the root config under `[labels]` by accident, so it failed to be deserialized by bors.
Rollup of 6 pull requests Successful merges: - rust-lang/rust#150108 (Offload: Build offload as a single Step) - rust-lang/rust#150262 (slice iter cleanup: replace checked_sub with saturating_sub) - rust-lang/rust#150427 (add has_offload/needs-offload to the test infra) - rust-lang/rust#150458 (fix running stdlib doctests in Miri in CI) - rust-lang/rust#150477 (Fix enum variant suggestion consuming trailing parenthesis) - rust-lang/rust#150478 (Fix new bors config) r? `@ghost` `@rustbot` modify labels: rollup
bootstrap: Use cargo's `build.warnings=deny` rather than -Dwarnings
This has two major advantages. First, it makes us less dependent on the rustc shim, which is nice but not super important. More importantly, it gives us much nicer caching properties.
Previously, `x build --warnings warn && x build --warnings deny` would rebuild all of bootstrap, and if there were any warnings emitted on the last build of the compiler, they would *not* fail the build, because cargo would cache the output rather than rerunning the shim.
After this change, bootstrap rebuilds instantly, and cargo knows that it should fail the build but *without* invalidating the cache.
<details><summary>An example of rebuilding bootstrap after a switch from warn->deny:</summary>
```
INFO: Downloading and building bootstrap before processing --help command.
See src/bootstrap/README.md for help with common commands.
Building bootstrap
Compiling bootstrap v0.0.0 (/Users/jyn/src/ferrocene3/src/bootstrap)
warning: unused variable: `x`
--> src/bootstrap/src/core/builder/mod.rs:1792:13
|
1792 | let x: ();
| ^
|
= note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
help: if this is intentional, prefix it with an underscore
|
1792 | let _x: ();
| +
help: you might have meant to pattern match on the similarly named constant `_`
|
1792 - let x: ();
1792 + let utils::render_tests::_: ();
|
warning: `bootstrap` (lib) generated 1 warning (run `cargo fix --lib -p bootstrap` to apply 1 suggestion)
Finished `dev` profile [unoptimized] target(s) in 5.14s
error: warnings are denied by `build.warnings` configuration
failed to run: /Users/jyn/src/ferrocene3/build/aarch64-apple-darwin/stage0/bin/cargo build --jobs=default --manifest-path /Users/jyn/src/ferrocene3/src/bootstrap/Cargo.toml -Zroot-dir=/Users/jyn/src/ferrocene3 -Zwarnings
```
</details>
building the compiler from scratch with `deny`: https://gist.github.com/jyn514/493ed26c2aa6f61bf47c21e75efa2175
<details><summary>and rebuilding the compiler after switching from deny->warn (note that it reuses the whole cache, there are no invalidations):</summary>
```
$ x c compiler
Building bootstrap
Finished `dev` profile [unoptimized] target(s) in 0.15s
Checking stage1 compiler artifacts{rustc-main, rustc_abi, rustc_arena, rustc_ast, rustc_ast_ir, rustc_ast_lowering, rustc_ast_passes, rustc_ast_pretty, rustc_attr_parsing, rustc_baked_icu_data, rustc_borrowck, rustc_builtin_macros, rustc_codegen_llvm, rustc_codegen_ssa, rustc_const_eval, rustc_data_structures, rustc_driver, rustc_driver_impl, rustc_error_codes, rustc_error_messages, rustc_errors, rustc_expand, rustc_feature, rustc_fluent_macro, rustc_fs_util, rustc_graphviz, rustc_hashes, rustc_hir, rustc_hir_analysis, rustc_hir_id, rustc_hir_pretty, rustc_hir_typeck, rustc_incremental, rustc_index, rustc_index_macros, rustc_infer, rustc_interface, rustc_lexer, rustc_lint, rustc_lint_defs, rustc_llvm, rustc_log, rustc_macros, rustc_metadata, rustc_middle, rustc_mir_build, rustc_mir_dataflow, rustc_mir_transform, rustc_monomorphize, rustc_next_trait_solver, rustc_parse, rustc_parse_format, rustc_passes, rustc_pattern_analysis, rustc_privacy, rustc_proc_macro, rustc_public, rustc_public_bridge, rustc_query_impl, rustc_query_system, rustc_resolve, rustc_sanitizers, rustc_serialize, rustc_session, rustc_span, rustc_symbol_mangling, rustc_target, rustc_thread_pool, rustc_trait_selection, rustc_traits, rustc_transmute, rustc_ty_utils, rustc_type_ir, rustc_type_ir_macros, rustc_windows_rc} (stage0 -> stage1, aarch64-apple-darwin)
warning: function `foo` is never used
--> compiler/rustc_hashes/src/lib.rs:16:4
|
16 | fn foo() {}
| ^^^
|
= note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
warning: `rustc_hashes` (lib) generated 1 warning
Finished `release` profile [optimized + debuginfo] target(s) in 0.53s
Build completed successfully in 0:00:08
```
</details>
thanks to `@epage` for the help finding this!
r? bootstrap
…r=Mark-Simulacrum alloc: specialize String::extend for slices of str Here's a small optimization via specialization that can potentially eliminate a fair few reallocations when building strings using specific patterns, unsure if this justifies the use of unsafe, but I had the code implemented from rust-lang/rust#148604, so I thought it was worth submitting to see.
Remove the explicit branch hint from const_panic This was asked for in PR review for equivalence with `assert!`, but we don't need likely/unlikely intrinsics here (and indeed they are a bit of an antipattern), because codegen knows about the pattern that `assert!` produces where only one target of a SwitchInt leads to a block terminated by a `#[cold]` call. All our panic entrypoints are `#[cold]`. `assert!` does not use the likely/unlikely intrinsics, maybe it did in the past. So the intrinsic call in `const_assert!` should be completely unnecessary. But currently it isn't, because `const_panic!` stamps out a runtime wrapper for its entrypoint which is not given `#[inline]`, citing compile times. It's not obvious to me why not using `#[inline]` would even be good in this case. I think the runtime wrapper should have `#[inline]` or `#[cold]`, so I'm going to do 3 perf experiments here. Just changing `const_assert!`: https://perf.rust-lang.org/compare.html?start=fabece9e9491d0a3c3655dba488881968b7c5f7a&end=f6b082cfcf880ad80b33523d5047c11654d907a8&stat=instructions:u Also adding `#[inline]` to `const_panic!`'s runtime wrapper: https://perf.rust-lang.org/compare.html?start=fabece9e9491d0a3c3655dba488881968b7c5f7a&end=f467cc7e49b74b47da0e2cde49fc1a3140e00ff6&stat=instructions:u Also adding `#[cold]` to `const_panic!`'s runtime wrapper: https://perf.rust-lang.org/compare.html?start=2e854a9344154564259de51385e9ec9506c0f3b7&end=fd8e098558ff08ac002b05ff78e9f91ffa6f3738&stat=instructions:u The previous comment indicated perf would be worse with `#[inline]` on the runtime branch, but the results in this PR show that it is more mixed, and net positive. And in fact, the only regression in serde seems to be because we created a very tiny additional amount of codegen, but pushed the size of the second CGU just high enough that we no longer merge all CGUs together. So now serde (in debug with incremental disabled) has 2 CGUs instead of 1. If we just so happened to be still below the threshold where the CGUs don't merge, adding `#[inline]` would have been nearly all improvements.
fix(bootstrap/dist)!: change dist path for `rustc-docs` to avoid clashing Closes rust-lang/rust#75833, part of rust-lang/rustup#3717: > I'd like to know if we can assign another folder name to `rustc-docs`? > [...] > [`@ThePuzzlemaker](https://github.com/ThePuzzlemaker)'s` `share/doc/rust/html/nightly-rustc` does look a bit weird to me (`nightly-rustc` has nothing to do with the current `rustc`, i.e. the Rustc Book, but they somehow appear similar just looking at the names). > > I personally would like to see something like `share/doc/rust/html/rustc-docs` or `share/doc/rust/html/rustc-api` for this component. _rust-lang/rust#75833 (comment) The TLDR is that currently the "rustc book"'s path clashes with "rustc APIs" (i.e. `rustc-docs`), so we change the path of the latter to make it distributable via rustup. I'm new to `bootstrap` so please feel free to point out any inconsistencies or any extra work I'll need to do to fully land this somewhat breaking change.
miri subtree update Subtree update of `miri` to rust-lang/miri@cb3bfe8. Created using https://github.com/rust-lang/josh-sync. r? `@ghost`
tests/codegen-llvm/some-non-zero-from-atomic-optimization.rs: New test Closes rust-lang/rust#60044 which has one 👍 and one ❤️ vote and just **E-needs-test**.
…lacrum mapping an error from cmd.spawn() in npm::install If the tool (yarn) has a problem, spawn in the install() raises an error, but the error message is hard to understand which/how application/file/directory has a problem. This commit enhances the error to explain why it fails. For example, when I ran `./x test tidy --extra-checks=js`: ```bash ... tidy check tidy [extra_checks]: IO error: No such file or directory (os error 2) tidy [extra_checks]: FAIL tidy: The following check failed: extra_checks ``` .. It doesn't explain yarn has a problem (in that case, my env didn't have yarn). After this PR, the same command prints: ```bash tidy check can not run yarn install tidy [extra_checks]: IO error: unable to run yarn: entity not found tidy [extra_checks]: FAIL tidy: The following check failed: extra_checks ```
Expose kernel launch options as offload intrinsic args Allows modifying the workgroup and thread grid dimensions directly from the intrinsic call. ```rust core::intrinsics::offload(_kernel_1, [256, 1, 1], [32, 1, 1], (x,)) ``` r? `@ZuseZ4`
Correct hexagon "unwinder_private_data_size" Discovered while porting libstd to hexagon-unknown-qurt: the unwinder data size refers to the count of pointers in _Unwind_Exception but when I put the value "35" intiially for hexagon linux, I incorrectly considered the size of the exception context hexagon_thread_state_t data structure. Correct the value for hexagon linux and expand it to cover all hexagon architecture instead.
Fix a typo in the docs of AsMut for #149609 This PR fixes the documentation of the trait `AsMut`, where in the sentence "[ ... ] interface which work with any type [ ... ]", "work" should be replaced by "works". This also changes the later "[ ... ] into a byte slice ([u8]) or byte vector (Vec<u8>) [ ... ]" to be "[ ... ] into a byte slice ([u8]) or a byte vector (Vec<u8>) [ ... ]" to maintain consistency between "a byte slice" and "a byte vector". Issue: rust-lang/rust#149609
mir_build: Separate match lowering for string-equality and scalar-equality - Follow-up to rust-lang/rust#150238 --- This PR takes some match-lowering code that is responsible for equality tests, and splits it into distinct code paths for string-equality and scalar-equality. The split results in more lines of code overall, but makes the separated code paths easier to understand individually. r? Nadrieril
Fix typo in the docs of `CString::from_vec_with_nul` This PR fixes the sentence "Attempts to converts a Vec<u8> to a CString." in the documentation of the method `CString::from_vec_with_nul` (line 639). This is because "converts" in that sentence should form a to-infinitive form, and therefore should be in its base form.
…uwer Rollup of 6 pull requests Successful merges: - rust-lang/rust#150425 (mapping an error from cmd.spawn() in npm::install) - rust-lang/rust#150444 (Expose kernel launch options as offload intrinsic args) - rust-lang/rust#150495 (Correct hexagon "unwinder_private_data_size") - rust-lang/rust#150578 (Fix a typo in the docs of AsMut for rust-lang/rust#149609) - rust-lang/rust#150581 (mir_build: Separate match lowering for string-equality and scalar-equality) - rust-lang/rust#150594 (Fix typo in the docs of `CString::from_vec_with_nul`) r? `@ghost` `@rustbot` modify labels: rollup
This updates the rust-version file to 85c8ff69cb3efd950395cc444a54bbbdad668865.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 85c8ff69cb3efd950395cc444a54bbbdad668865 Filtered ref: 7940f95 Upstream diff: rust-lang/rust@7fefa09...85c8ff6 This merge was created using https://github.com/rust-lang/josh-sync.
Collaborator
|
Thanks for the PR. If you have write access, feel free to merge this PR if it does not need reviews. You can request a review using |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Latest update from rustc.