-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rollup of 40 pull requests #140573
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 40 pull requests #140573
Conversation
Co-authored-by: David Wood <[email protected]>
Signed-off-by: pudongair <[email protected]>
When rust provides LLVM bitcode files to lld and the bitcode contains function summaries as used for thin lto, lld defaults to using thin lto. This prevents some optimizations that are only applied for fat lto. We solve this by not creating function summaries when fat lto is enabled. The bitcode for the module is just directly written out. An alternative solution would be to set the `ThinLTO=0` module flag to signal lld to do fat lto. The code in clang that sets this flag is here: https://github.com/llvm/llvm-project/blob/560149b5e3c891c64899e9912e29467a69dc3a4c/clang/lib/CodeGen/BackendUtil.cpp#L1150 The code in LLVM that queries the flag and defaults to thin lto if not set is here: https://github.com/llvm/llvm-project/blob/e258bca9505f35e0a22cb213a305eea9b76d11ea/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp#L4441-L4446
…_exit` Getting the address of `errno` should be just as cheap as `pthread_self()` and avoids having to use the expensive `Mutex` logic because it always results in a pointer.
`ptr_eq` was recently enhanced to lint on more cases of raw pointers comparison: - lint on all raw pointer comparison, by proposing to use `[core|std]::ptr::eq(lhs, rhs)` instead of `lhs == rhs`; - removing one symetric `as usize` on each size if needed - peeling any level of `as *[const|mut] _` if the remaining expression can still be coerced into the original one (i.e., is a ref or raw pointer to the same type as before) The current change restricts the lint to the cases where at least one level of symetric `as usize`, or any conversion to a raw pointer, could be removed. For example, a direct comparaison of two raw pointers will not trigger the lint anymore.
If you want to logically split an iterator after `n` items, you might first discover `take`. Before this change, you'd find that `take` consumes the iterator, and you'd probably be stuck. The answer involves `by_ref`, but that's hard to discover, especially since `by_ref` is a bit abstract and `Iterator` has many methods. After this change, you'd see the example showing `take` along with `by_ref`, which allows you to continue using the rest of the iterator. `by_ref` had a good example involving `take` already, so this change just duplicates that existing example under `take`.
* "while until either" could also be changed to "for a while until either", but I just deleted "while". * fixed sentence with incorrect "at" and "has/have". * linked [*currently allocated*] similar to other methods.
…rrently written into Signed-off-by: xizheyin <[email protected]>
`ptr_eq` was recently enhanced to lint on more cases of raw pointers comparison: - lint on all raw pointer comparison, by proposing to use `[core|std]::ptr::eq(lhs, rhs)` instead of `lhs == rhs`; - removing one symetric `as usize` on each size if needed - peeling any level of `as *[const|mut] _` if the remaining expression can still be coerced into the original one (i.e., is a ref or raw pointer to the same type as before) The current change restricts the lint to the cases where at least one level of symetric `as usize`, or any conversion to a raw pointer, could be removed. For example, a direct comparaison of two raw pointers will not trigger the lint anymore. changelog: [`ptr_eq`]: do not lint when comparing two raw pointers directly with no casts involved Fixes rust-lang/rust-clippy#14525
it was added back in 6035e05, at which time there were some files matching it, e.g. https://github.com/rust-lang/rust-clippy/blob/6035e050e83cc991f94797eef4d720c0b61d8955/clippy_lints/src/lib.deprecated.rs
it was added back in 6035e05, at which time there were some files matching it, e.g. https://github.com/rust-lang/rust-clippy/blob/6035e050e83cc991f94797eef4d720c0b61d8955/clippy_lints/src/lib.deprecated.rs fixes rust-lang/rust-clippy#14670 changelog: none
PassWrapper: adapt for llvm/llvm-project@f137c3d592e96330e450a8fd63ef… …7e8877fc1908 In LLVM 21 PR llvm/llvm-project#130940 `TargetRegistry::createTargetMachine` was changed to take a `const Triple&` and has deprecated the old `StringRef` method. `@rustbot` label llvm-main
Update hashbrown dependency to unblock ExtractIf improvements Release notes: https://github.com/rust-lang/hashbrown/releases/tag/v0.15.3 Relevant to me, this release includes rust-lang/hashbrown#616 which unblocks rust-lang#139764.
rustc-dev-guide subtree update r? `@ghost`
…Manishearth Clippy subtree update r? `@Manishearth`
… r=fee1-dead Clean up "const" situation in format_args!(). This cleans up the "const" situation in the format_args!() expansion/lowering. Rather than marking the Argument::new_display etc. functions as non-const, this marks the Arguments::new_v1 functions as non-const. Example expansion/lowering of format_args!() in const: ```rust // Error: cannot call non-const formatting macro in constant functions const { fmt::Arguments::new_v1( // Now the error is produced here. &["Hello, ", "!\n"], &[ fmt::Argument::new_display(&world) // The error used to be produced here. ], ) } ```
Remove backtrace dep from anyhow in features status dump tool According to `anyhow`'s Cargo.toml: > On compilers older than 1.65, features=["backtrace"] may be used to enable > backtraces via the `backtrace` crate. This feature has no effect on 1.65+ > besides bringing in an unused dependency, as `std::backtrace` is always > preferred. So this is just bringing in an unused dependency.
…ation, r=compiler-errors Emit user type annotations for free consts in pattern position This previously wasnt done because free consts couldn't have any generic parameters that need to be preserved for borrowck. This is no longer the case with `feature(generic_const_items)` r? fmease
Set groundwork for proper const normalization r? lcnr Updates a lot of our normalization/alias infrastructure to be setup to handle mgca aliases and normalization once const items are represented more like aliases than bodies. Inherent associated consts are still super busted, I didn't update the assertions that IACs the right arg setup because that winds up being somewhat involved to do *before* proper support for normalizing const aliases is implemented. I dont *intend* for this to have any effect on stable. We continue normalizing via ctfe on stable and the codepaths in `project` for consts should only be reachable with mgca or ace.
…able, r=workingjubilee Stabilize `select_unpredictable` FCP completed in tracking issue rust-lang#133962.
…d_internal_symbol, r=bjorn3 allow `#[rustc_std_internal_symbol]` in combination with `#[naked]` The need for this came up in rust-lang/compiler-builtins#897, but in general this seems useful and valid to allow. Based on a quick scan, I don't think changes to the generated assembly are needed. cc `@bjorn3`
…-tool-error-output, r=clubby789 Improve error output in case `nodejs` or `npm` is not installed for rustdoc-gui test suite Fixes rust-lang#138134. It now looks like this:  cc `@kpreid`
…ieyouxu extend the list of registered dylibs on `test::prepare_cargo_test` self-explanatory Fixes rust-lang#140299
…in-std-io-pipe-docs, r=tgross35 Use present indicative tense in std::io::pipe() API docs The inline documentation for all other free functions in the `std::io` module use the phrase "creates a" instead of "create a", except for the currently nightly-only `std::io::pipe()` function. This commit updates the text to align with the predominant wording in the `std::io` module. I recognize this PR is quite a minuscule nitpick, so feel free to ignore and close if you disagree and/or there are bigger fish to fry. Thanks in advance! :smile: Relates to rust-lang#127154.
…uillaumeGomez Rollup of 12 pull requests Successful merges: - rust-lang#138703 (chore: remove redundant words in comment) - rust-lang#139186 (Refactor `diy_float`) - rust-lang#139780 (docs: Add example to `Iterator::take` with `by_ref`) - rust-lang#139802 (Fix some grammar errors and hyperlinks in doc for `trait Allocator`) - rust-lang#140034 (simd_select_bitmask: the 'padding' bits in the mask are just ignored) - rust-lang#140062 (std: mention `remove_dir_all` can emit `DirectoryNotEmpty` when concurrently written into) - rust-lang#140420 (rustdoc: Fix doctest heuristic for main fn wrapping) - rust-lang#140460 (Fix handling of LoongArch target features not supported by LLVM 19) - rust-lang#140538 (rustc-dev-guide subtree update) - rust-lang#140544 (Clean up "const" situation in format_args!(). ) - rust-lang#140552 (allow `#[rustc_std_internal_symbol]` in combination with `#[naked]`) - rust-lang#140556 (Improve error output in case `nodejs` or `npm` is not installed for rustdoc-gui test suite) r? `@ghost` `@rustbot` modify labels: rollup
why did it allow me to do this |
If someone important checks this: |
This is well-known. The new bors impl might fix that but in any case, it's not a big deal since you can't approve/merge the rollup anyway, so it's basically as if you were opening dummy PRs/issues manually. And if you were starting to spam these, we'd simply report you to GH and get you banned, so it's not a big issue. |
Successful merges:
Zfinx
is incompatible with{ILP32,LP64}[FD]
ABIs #138872 (rustc_target: RISC-VZfinx
is incompatible with{ILP32,LP64}[FD]
ABIs)Lifetime::suggestion
#139046 (ImproveLifetime::suggestion
)diy_float
#139186 (Refactordiy_float
)errno
to identify threads inunique_thread_exit
#139206 (std: use the address oferrno
to identify threads inunique_thread_exit
)async
block behaviour #139608 (Clarifyasync
block behaviour)Iterator::take
withby_ref
#139780 (docs: Add example toIterator::take
withby_ref
)trait Allocator
#139802 (Fix some grammar errors and hyperlinks in doc fortrait Allocator
)remove_dir_all
can emitDirectoryNotEmpty
when concurrently written into #140062 (std: mentionremove_dir_all
can emitDirectoryNotEmpty
when concurrently written into)avx512dq
andavx512vl
implication foravx512fp16
#140389 (Removeavx512dq
andavx512vl
implication foravx512fp16
)#[rustc_no_implicit_autorefs]
in autoref lint #140406 (perf: delay checking of#[rustc_no_implicit_autorefs]
in autoref lint)report_projection_error
#140519 (Use select in projection lookup inreport_projection_error
)select_unpredictable
#140550 (Stabilizeselect_unpredictable
)#[rustc_std_internal_symbol]
in combination with#[naked]
#140552 (allow#[rustc_std_internal_symbol]
in combination with#[naked]
)nodejs
ornpm
is not installed for rustdoc-gui test suite #140556 (Improve error output in casenodejs
ornpm
is not installed for rustdoc-gui test suite)test::prepare_cargo_test
#140563 (extend the list of registered dylibs ontest::prepare_cargo_test
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup