Skip to content
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 11 pull requests #135181

Closed
wants to merge 25 commits into from
Closed

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Jan 7, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

malezjaa and others added 25 commits December 29, 2024 23:12
Gated behind an unstable `-Z emscripten-wasm-eh` flag
inline_threshold mark deprecated

no-stack-check

print deprecation message for -Car too

inline_threshold deprecated and do nothing: make in untracked

make OptionDesc struct from tuple
I'm also removing myself from the MIR syntax changes notifications.
Previously, the main content used "Aliased Type", while the sidebar said
"Aliased type". Now, they both say "Aliased Type", which is the more common
capitalization in Rustdoc.

See the following link for an example.
https://doc.rust-lang.org/1.83.0/std/io/type.Result.html
…kingjubilee

Add support for wasm exception handling to Emscripten target

This is a draft because we need some additional setting for the Emscripten target to select between the old exception handling and the new exception handling. I don't know how to add a setting like that, would appreciate advice from Rust folks. We could maybe choose to use the new exception handling if `Ctarget-feature=+exception-handling` is passed? I tried this but I get errors from llvm so I'm not doing it right.
Improve diagnostics for `HostEffectPredicate` in the new solver

Adds derived cause for host effect predicates. Some diagnostics regress, but that's connected to the fact that our predicate visitor doesn't play well with aliases just yet.
Release notes for 1.84.0

cc `@rust-lang/release` r? `@Mark-Simulacrum`
…ues, r=jieyouxu

Display valid crate types in error message for --crate-type flag

This PR improves the error message for the --crate-type flag. When an invalid crate type is provided, the compiler will now show a list of valid options.

### Before
![image](https://github.com/user-attachments/assets/4922e4e5-eeca-40cd-ac1c-1c6319a81aee)

### After
![image](https://github.com/user-attachments/assets/67ea1f35-aa41-4e4f-8691-47c273d0cff9)

I based the implementation on `OutputType::shorthands_display`

Closes rust-lang#70183
…r=lcnr

Don't ice on bad transmute in typeck in new solver

Old trait solver ends up getting its infcx tainted because we try to normalize the type, but the new trait solver doesn't. This means we try to compute the stalled transmute obligations, which tries to normalize a type an ICEs. Let's make this a delayed bug.

r? lcnr
…-solver, r=lcnr

Implement `const Destruct` in old solver

Self-explanatory. Not totally settled that this is the best structure for built-in trait impls for effect goals in the new solver, but it's almost certainly the simplest.

r? lcnr or re-roll
…-projection, r=lqd,jieyouxu

Suggest to replace tuple constructor through projection

See the code example. when `Self::Assoc` normalizes to a struct that has a tuple constructor, you cannot construct the type via `Self::Assoc(field, field)`. Instead, suggest to replace it with the correct named struct.

Fixes rust-lang#120871
rustdoc: Fix mismatched capitalization in sidebar

Previously, the main content used "Aliased Type", while the sidebar said "Aliased type". Now, they both say "Aliased Type", which is the more common capitalization in Rustdoc.

See the following link for an example.
https://doc.rust-lang.org/1.83.0/std/io/type.Result.html
…r=jieyouxu

mark deprecated option as deprecated in rustc_session to remove copypasta and small refactor

This marks deprecated options as deprecated via flag in options table in rustc_session, which removes copypasted deprecation text from rustc_driver_impl.

This also adds warning for deprecated `-C ar` option, which didn't emitted any warnings before.
Makes `inline_threshold` `[UNTRACKED]`, as it do nothing.
Adds few tests.

See individual commits.
[generic_assert] Constify methods used by the formatting system

cc rust-lang#44838

Starts the "constification" of all the elements required to allow the execution of the formatting system in constant environments.

```rust
const _: () = { panic!("{:?}", 1i32); };
```

Further stuff is blocked by rust-lang#133999.
…eyouxu

Update triagebot.toml: celinval vacation is over

I'm also removing myself from the MIR syntax changes notifications.
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue. labels Jan 7, 2025
@rustbot rustbot added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Jan 7, 2025
@jhpratt
Copy link
Member Author

jhpratt commented Jan 7, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jan 7, 2025

📌 Commit 8c1f55a has been approved by jhpratt

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 7, 2025
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-18 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#22 exporting to docker image format
#22 sending tarball 28.0s done
#22 DONE 33.8s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-18]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---

failures:

---- [ui] tests/ui/invalid-compile-flags/crate-type-flag.rs#empty_crate_type stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/invalid-compile-flags/crate-type-flag.empty_crate_type/crate-type-flag.empty_crate_type.stderr"

- error: unknown crate type: ``
- error: unknown crate type: ``
+ error: unknown crate type: ``, expected one of: lib, rlib, staticlib, dylib, cdylib, bin, proc-macro
3 


The actual stderr differed from the expected stderr.
The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args invalid-compile-flags/crate-type-flag.rs`

error in revision `empty_crate_type`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/invalid-compile-flags/crate-type-flag.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "empty_crate_type" "--check-cfg" "cfg(test,FALSE,lib,rlib,staticlib,dylib,cdylib,bin,proc_dash_macro,multivalue,multivalue_combined,proc_underscore_macro,empty_crate_type,unknown)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/invalid-compile-flags/crate-type-flag.empty_crate_type" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--crate-type="
--- stderr -------------------------------
--- stderr -------------------------------
error: unknown crate type: ``, expected one of: lib, rlib, staticlib, dylib, cdylib, bin, proc-macro


---- [ui] tests/ui/invalid-compile-flags/crate-type-flag.rs#proc_underscore_macro stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/invalid-compile-flags/crate-type-flag.proc_underscore_macro/crate-type-flag.proc_underscore_macro.stderr"
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/invalid-compile-flags/crate-type-flag.proc_underscore_macro/crate-type-flag.proc_underscore_macro.stderr"
diff of stderr:

- error: unknown crate type: `proc_macro`
+ error: unknown crate type: `proc_macro`, expected one of: lib, rlib, staticlib, dylib, cdylib, bin, proc-macro
3 


The actual stderr differed from the expected stderr.
The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args invalid-compile-flags/crate-type-flag.rs`

error in revision `proc_underscore_macro`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/invalid-compile-flags/crate-type-flag.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "proc_underscore_macro" "--check-cfg" "cfg(test,FALSE,lib,rlib,staticlib,dylib,cdylib,bin,proc_dash_macro,multivalue,multivalue_combined,proc_underscore_macro,empty_crate_type,unknown)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/invalid-compile-flags/crate-type-flag.proc_underscore_macro" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--crate-type=proc_macro"
--- stderr -------------------------------
--- stderr -------------------------------
error: unknown crate type: `proc_macro`, expected one of: lib, rlib, staticlib, dylib, cdylib, bin, proc-macro


---- [ui] tests/ui/invalid-compile-flags/crate-type-flag.rs#unknown stdout ----
---- [ui] tests/ui/invalid-compile-flags/crate-type-flag.rs#unknown stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/invalid-compile-flags/crate-type-flag.unknown/crate-type-flag.unknown.stderr"

- error: unknown crate type: `🤡`
- error: unknown crate type: `🤡`
+ error: unknown crate type: `🤡`, expected one of: lib, rlib, staticlib, dylib, cdylib, bin, proc-macro
3 


The actual stderr differed from the expected stderr.
The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args invalid-compile-flags/crate-type-flag.rs`

error in revision `unknown`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/invalid-compile-flags/crate-type-flag.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "unknown" "--check-cfg" "cfg(test,FALSE,lib,rlib,staticlib,dylib,cdylib,bin,proc_dash_macro,multivalue,multivalue_combined,proc_underscore_macro,empty_crate_type,unknown)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/invalid-compile-flags/crate-type-flag.unknown" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--crate-type=\xf0\x9f\xa4\xa1"
--- stderr -------------------------------
--- stderr -------------------------------
error: unknown crate type: `🤡`, expected one of: lib, rlib, staticlib, dylib, cdylib, bin, proc-macro


---- [ui] tests/ui/traits/const-traits/const-drop-fail-2.rs#stock stdout ----
---- [ui] tests/ui/traits/const-traits/const-drop-fail-2.rs#stock stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/const-traits/const-drop-fail-2.stock/const-drop-fail-2.stock.stderr"


4 LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
6    |
6    |
+ note: required for `ConstDropImplWithBounds<NonTrivialDrop>` to implement `const Drop`
+    |
+    |
+ LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
+    |         |
+    |         unsatisfied trait bound introduced here
7 note: required by a bound in `check`
8   --> $DIR/const-drop-fail-2.rs:21:19
8   --> $DIR/const-drop-fail-2.rs:21:19
9    |

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/traits/const-traits/const-drop-fail-2.rs:25:25
+ note: required for `ConstDropImplWithBounds<NonTrivialDrop>` to implement `const Drop`
+    |
+    |
+ LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
+    |         |
+    |         unsatisfied trait bound introduced here



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args traits/const-traits/const-drop-fail-2.rs`

error in revision `stock`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/traits/const-traits/const-drop-fail-2.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "stock" "--check-cfg" "cfg(test,FALSE,stock,precise)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/const-traits/const-drop-fail-2.stock" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `NonTrivialDrop: const A` is not satisfied
   |
   |
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
   |
   |
note: required for `ConstDropImplWithBounds<NonTrivialDrop>` to implement `const Drop`
   |
   |
LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
   |         |
   |         unsatisfied trait bound introduced here
note: required by a bound in `check`
  --> /checkout/tests/ui/traits/const-traits/const-drop-fail-2.rs:21:19
  --> /checkout/tests/ui/traits/const-traits/const-drop-fail-2.rs:21:19
   |
LL | const fn check<T: ~const Destruct>(_: T) {}

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
For more information about this error, try `rustc --explain E0277`.
------------------------------------------


---- [ui] tests/ui/traits/const-traits/const-drop-fail-2.rs#precise stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/const-traits/const-drop-fail-2.precise/const-drop-fail-2.precise.stderr"


4 LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
6    |
6    |
+ note: required for `ConstDropImplWithBounds<NonTrivialDrop>` to implement `const Drop`
+    |
+    |
+ LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
+    |         |
+    |         unsatisfied trait bound introduced here
7 note: required by a bound in `check`
8   --> $DIR/const-drop-fail-2.rs:21:19
8   --> $DIR/const-drop-fail-2.rs:21:19
9    |

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/traits/const-traits/const-drop-fail-2.rs:25:25
+ note: required for `ConstDropImplWithBounds<NonTrivialDrop>` to implement `const Drop`
+    |
+    |
+ LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
+    |         |
+    |         unsatisfied trait bound introduced here



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args traits/const-traits/const-drop-fail-2.rs`

error in revision `precise`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/traits/const-traits/const-drop-fail-2.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "precise" "--check-cfg" "cfg(test,FALSE,stock,precise)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/const-traits/const-drop-fail-2.precise" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0277]: the trait bound `NonTrivialDrop: const A` is not satisfied
   |
   |
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
   |
   |
note: required for `ConstDropImplWithBounds<NonTrivialDrop>` to implement `const Drop`
   |
   |
LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
   |         |
   |         unsatisfied trait bound introduced here
note: required by a bound in `check`
  --> /checkout/tests/ui/traits/const-traits/const-drop-fail-2.rs:21:19
  --> /checkout/tests/ui/traits/const-traits/const-drop-fail-2.rs:21:19
   |
LL | const fn check<T: ~const Destruct>(_: T) {}

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.