Automated pull from upstream master#84
Merged
bors-ferrocene[bot] merged 250 commits intomainfrom Nov 6, 2023
Merged
Conversation
Co-authored-by: Samuel Tardieu <sam@rfc1149.net>
Co-authored-by: Samuel Tardieu <sam@rfc1149.net> Co-authored-by: Catherine Flores <catherine.3.flores@gmail.com>
For runtime dependencies we have a much stricter license check. Combining the license check code with that for regular tools makes it harder to follow.
Rather than just for rustc_driver. rustc-main also depends on rustc_smir which may get unique dependencies in the future.
This removes a dependency on fuchsia-cprng which doesn't have any license info.
Otherwise the results may be outdated compared to a build at a later time. Also disable checking for the backtrace workspace until Cargo.lock is committed.
When using *Command Line Tools for Xcode* version 15.0, clang will warn about `argument unused during compilation: '-stdlib=libc++'` if this flag is present when compiling C files only (i.e. no C++ files). To avoid this warning, we can add the flag only to CXXFLAGS and not to CFLAGS.
[`map_identity`]: recognize tuple identity function Fixes #7189 This lint now recognizes `.map(|(a, b)| (a, b))` as a useless `map` call. changelog: [`map_identity`]: recognize tuple identity function
Don't pass `-stdlib=libc++` when building C files on macOS When using *Command Line Tools for Xcode* version 15.0, clang will warn about `argument unused during compilation: '-stdlib=libc++'` if this flag is present when compiling C files only (i.e. no C++ files). To avoid this warning, we can add the flag only to CXXFLAGS and not to CFLAGS. --- [Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/clang.20warning.3A.20argument.20unused.20during.20compilation.20.28libc.2B.2B.29)
…k-Simulacrum bootstrap/setup: create hooks directory if non-existing When running `./x setup` on a local repository I chose to install a `pre-push` git hook, but this happened: ```shell Would you like to install the git hook?: [y/N] y error: could not create hook .git/hooks/pre-push: do you already have the git hook installed? No such file or directory (os error 2) thread 'main' panicked at src/core/build_steps/setup.rs:462:9: install_git_hook_maybe(&config) failed with No such file or directory (os error 2) ``` This was caused because the `.git/hooks` directory did not exist in my local repository. Creating it manually and re-running the command works fine. This PR tests for the above directory and if it does not exist then it _tries_ to create it before hard linking the pre-push hook - we use `fs::create_dir()` and disregard the result (ie. it could fail if the directory was created in the meantime) and proceed to call `fs::hard_link()` all the same.
Remove unused LoadResult::DecodeIncrCache variant
Add diagnostic items for a few of core's builtin macros Specifically, `env`, `option_env`, and `include`. There are a number of reasons why people might want to look at these in lints (For example, to ensure that things behave consistently, detect things that might make builds less reproducible, etc). Concretely, in PL/Rust (well, `plrustc`) we have lints that forbid these (which I'd like to [add to clippy as restriction lints](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Landing.20a.20flotilla.20of.20lints.3F) eventually), and `dylint` also has [lints that look for `env!`/`option_env!`](https://github.com/trailofbits/dylint/blob/109a07e9f27a9651ef33b6677ccaddd21466e97a/examples/general/env_cargo_path/src/lib.rs) (although perhaps not `include`), which would benefit from this. My experience is that it's pretty annoying to (robustly) check uses of builtin macros without these IME, although that's perhaps just my own fault (e.g. I could be doing it wrong). At `@Nilstrieb's` suggestion, I've added a comment that explains why these are here, even though they are not used in the compiler. This is mostly to discourage removal, although it's not a big deal if it happens (I'm certainly not suggesting the presence of these be in any way stable). --- In theory this is a library PR (in that it's in library/core), but I'm going to roll compiler because the existence of this or not is much more likely something they care about rather than libs. Hopefully nobody objects to this. r? compiler
Rollup of 4 pull requests Successful merges: - #116017 (Don't pass `-stdlib=libc++` when building C files on macOS) - #117524 (bootstrap/setup: create hooks directory if non-existing) - #117588 (Remove unused LoadResult::DecodeIncrCache variant) - #117596 (Add diagnostic items for a few of core's builtin macros) r? `@ghost` `@rustbot` modify labels: rollup
Feature gate enums in offset_of As requested at rust-lang/rust#106655 (comment), put enums in offset_of behind their own feature gate. `@rustbot` label F-offset_of
Signed-off-by: onur-ozkan <work@onurozkan.dev>
…-Simulacrum improve compiler&tool documenting and re-enable cranelift on CI First commit addresses the linking issue with compiler crates. Second one ensures that compiler crates are linked correctly (with later commits we added this check for tools as well), allowing us to detect these hard-to-catch bugs on CI. Following three commits cherry-picked from #117328 to re-enable the Cranelift backend on CI. More info: rust-lang/rust#117430 cc `@bjorn3` `@RalfJung`
…l, r=Mark-Simulacrum Avoid unnecessary comparison in partition_equal The branchy Hoare partition `partition_equal` as part of `slice::sort_unstable` has a bug that makes it perform a comparison of the last element twice. Measuring inputs with a Zipfian distribution with characterizing exponent s == 1.0, yields a ~0.05% reduction in the total number of comparisons performed.
generate beta manifests as pre-requisit to rust-lang/rustup#1329 <rust-lang/rustup#1329 (comment)> mentioned (a while ago) this would be the next step
Override `Waker::clone_from` to avoid cloning `Waker`s unnecessarily This would be very useful for futures — I think it’s pretty much always what they want to do instead of `*waker = cx.waker().clone()`. Tracking issue: rust-lang/rust#98287 r? rust-lang/libs-api `@rustbot` label +T-libs-api -T-libs
Fix excessive initialization and reads beyond EOF in `io::copy(_, Vec<u8>)` specialization fixes #117545 and bczhc/bzip3-rs#8
Add the `Span` of the `move` keyword to the HIR. This is required to implement a lint like the one described here: rust-lang/rust-clippy#11721
This commit is generated by `ferrocene/tools/pull-upstream/pull.sh`. The list of excluded files is defined in `.gitattributes`.
Contributor
|
👎 Rejected by PR status |
Dajamante
approved these changes
Nov 6, 2023
Contributor
|
bors merge |
Contributor
|
🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set. |
Contributor
|
🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set. |
Contributor
|
Stopped waiting for PR status (Github check) without running due to duplicate requests to run. You may check Bors to see that this PR is included in a batch by one of the other requests. |
Contributor
|
Build succeeded:
|
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
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.
This PR pulls the following changes from the upstream repository:
Spanof themovekeyword to the HIR. rust-lang/rust#117585io::copy(_, Vec<u8>)specialization rust-lang/rust#117576Waker::clone_fromto avoid cloningWakers unnecessarily rust-lang/rust#96979-stdlib=libc++when building C files on macOS rust-lang/rust#116017const_maybe_uninit_zeroedandconst_mem_zeroedrust-lang/rust#116218'tcxlifetime onPlaceholderConstrust-lang/rust#117583construct_generic_bound_failurerust-lang/rust#117570charhas the same size and alignment asu32rust-lang/rust#116894non_exhaustive_omitted_patternslint level on a match arm rust-lang/rust#117094i1constant values rust-lang/rust#117554filter_mapintry_par_for_each_inrust-lang/rust#117550rustc_mir_build/../check_match.rsrust-lang/rust#117343rustc_spancleanups rust-lang/rust#117507<Box<E> as Error>::provideto<E as Error>::providerust-lang/rust#117434Fntraits inrustc_on_unimplementedrust-lang/rust#116439FxIndexSetin the symbol interner. rust-lang/rust#117508