Rollup of 21 pull requests#159292
Closed
JonathanBrouwer wants to merge 92 commits into
Closed
Conversation
Add autodiff support for x86_64 apple darwin
Add install notes for older rustup versions
Corrected a typo in the explanation of inferred arguments in ambig AST positions.
Fix typo in ambig AST positions description
Because that's what it is: any type with tokens must also have attrs. This simplifies some trait bounds.
…ctions When a const function drops a value whose type is a type parameter, suggest adding a `[const] Destruct` bound so the destructor can be evaluated at compile-time.
The suggested bound requires the unstable `const_destruct` feature, so it is not actionable on a stable compiler. Add a run-make test that verifies the suggestion is only emitted on nightly.
This way codegen backends don't have to check for a magic symbol name prefix to detect LLVM intrinsic calls and thus can more easily handle them separately as necessary.
This optimisation is currently broken on s390x[^1]. It looks like a big-endian issue in general. but as we only know about the test fails on s390x we only disable it there. Should be reenabled when the problem is fixed and llvm backend is updated. [^1]: llvm/llvm-project#208712
…RalfJung,folkertdev Introduce InstanceKind::LlvmIntrinsic This way codegen backends don't have to check for a magic symbol name prefix to detect LLVM intrinsic calls and thus can more easily handle them separately as necessary.
Bump rustc-perf submodule To merge in rust-lang/rustc-perf#2500, which is needed to unblock rust-lang#159091.
Suggest the `[const] Destruct` bound for type parameters in const functions when missing When a const function drops a value whose type is a type parameter without a `[const] Destruct` bound, suggest adding it so that the destructor can be evaluated at compile-time. Closes rust-lang#103270. Example: ```rust const fn f(_x: impl std::fmt::Debug) {} ``` Before: ``` error[E0493]: destructor of `impl std::fmt::Debug` cannot be evaluated at compile-time --> $DIR/min_const_fn.rs:1:11 | LL | const fn f(_x: impl std::fmt::Debug) {} | ^^ - value is dropped here | | | the destructor for this type cannot be evaluated in constant functions ``` After: ``` error[E0493]: destructor of `impl std::fmt::Debug` cannot be evaluated at compile-time --> $DIR/min_const_fn.rs:1:11 | LL | const fn f(_x: impl std::fmt::Debug) {} | ^^ - value is dropped here | | | the destructor for this type cannot be evaluated in constant functions | help: consider restricting opaque type `impl std::fmt::Debug` with unstable trait `Destruct` | LL | const fn f(_x: impl std::fmt::Debug + [const] Destruct) {} | ++++++++++++++++++ ``` No new tests as the existing ones had their results updated with the new suggestion.
unstable book: Document `diagnostic_on_unknown` feature Rendered: https://github.com/mejrs/rust/blob/9476366e0b027db32ff1edfad52312b4cdf4ef07/src/doc/unstable-book/src/language-features/diagnostic-on-unknown.md cc @weiznich
…, r=oli-obk Add regression test for rust-lang#95719 The `Send` bound of a GAT `impl Future` associated type was lost when the future was wrapped in a second `async fn`, giving "the parameter type `G` may not live long enough". The reproducer from the issue compiles cleanly now, so add it as a `check-pass` test to pin the behavior. Closes rust-lang#95719
inline Once wait and wait_force I expected `OnceLock::wait` to generate an inline state check and a conditional call to `sys::Once::wait`, but a call to `Once::wait_force` is generated instead. This is because these methods are missing the `#[inline]` attribute.
… r=Kivooeo Replace shortened type with `_` instead of `...` as placeholder r? @mejrs
…t, r=Kivooeo Add regression test for rust-lang#144033 The reproducer from rust-lang#144033 used to ICE with "cannot relate bound region". On current master it emits normal errors instead, with and without `-Znext-solver`, so add it as a UI test with blessed output to pin that. Fixes rust-lang#144033
…-rustfmt, r=Kobzol bootstrap: skip intrinsic-test when rustfmt is unavailable This PR skips `intrinsic-test` when rustfmt is unavailable. The PR updates the `IntrinsicTest` step to check for `rustfmt`. If it is missing, the build system will now print a warning and skip the test entirely instead of failing the build. r? @Kobzol
…tdev disable range-len-try-from.rs on s390x This optimisation is currently broken on s390x[^1]. It looks like a big-endian issue in general. but as we only know about the test fails on s390x we only disable it there. Should be reenabled when the problem is fixed and llvm backend is updated. [^1]: llvm/llvm-project#208712
…-unchecked, r=jhpratt slice: make swap delegate to swap_unchecked It had duplicate unsafe code that already existed in swap_unchecked. So I just made swap call swap_unchecked instead of copying the same logic twice.
…jieyouxu bootstrap: Rename `std_crates_for_run_make` to `std_crates_for_make_run` This function's name is referring to `Step::make_run`, and has nothing to do with run-make tests. (I was getting jump-scared every time I saw it!) r? jieyouxu (or bootstrap)
remove obsolete comment This was a reminder to make the lint translatable, but the code to make lints translatable has since been removed
…nszelmann Construct `tokens` for attrs made by `mk_attr_word` and other variants Fixes rust-lang#159261 `tokens` won't be constructed for generated built-in attrs before, so that after rust-lang#158854, `#[rustc_test_entrypoint_marker]` without `tokens` would be added when expanding `#[test]`. Then later expansions would cause the ICE when they wanna get the attr's `tokens`. This PR makes `tokens` constructed for such attrs, although this specific ICE only need editing `mk_attr_word`, but I think it would be good to also edit `mk_attr_nested_word` and `mk_attr_name_value_str`.
…ion-verbose, r=mejrs Remove obsolete verbose flag from deref/ref suggestions
rustc-dev-guide subtree update Subtree update of `rustc-dev-guide` to rust-lang/rustc-dev-guide@a425132. Created using https://github.com/rust-lang/josh-sync. r? @ghost
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.
Successful merges:
DefIdinstead ofEiiDeclinEiiImplResolution::Known#158235 (StoreDefIdinstead ofEiiDeclinEiiImplResolution::Known)HasTokensa sub-trait ofHasAttrs. #159160 (MakeHasTokensa sub-trait ofHasAttrs.)[const] Destructbound for type parameters in const functions when missing #155013 (Suggest the[const] Destructbound for type parameters in const functions when missing)diagnostic_on_unknownfeature #159155 (unstable book: Documentdiagnostic_on_unknownfeature)_instead of...as placeholder #159255 (Replace shortened type with_instead of...as placeholder)cannot relate bound region#144033)std_crates_for_run_maketostd_crates_for_make_run#159274 (bootstrap: Renamestd_crates_for_run_maketostd_crates_for_make_run)tokensfor attrs made bymk_attr_wordand other variants #159277 (Constructtokensfor attrs made bymk_attr_wordand other variants)r? @ghost
Create a similar rollup