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 9 pull requests #134430

Closed
wants to merge 36 commits into from
Closed

Conversation

jieyouxu
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

compiler-errors and others added 30 commits December 5, 2024 16:43
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
…usl.md

Co-authored-by: famfo <famfo@famfo.xyz>
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
- remove dependency on `TypeChecker`
- move to legacy fact generation module
- remove dependency on `TypeChecker`
- move to legacy fact generation module
- remove polonius module from liveness
- remove dependency on `TypeChecker`
- move to legacy fact generation module
- group facts emitted during typeck together
- integrate it within existing fact generation instead of being called
  in typeck
- simplify access fact extraction
- also remove single use fact emit functions in root fact generation
- integrate into `emit_facts` and remove from typeck
- use a consistent name for `TypeChecker`, which is usually referred to as `typeck`
- remove an incorrect doc comment
- remove a single-use local
- fix names
- fix ordering of arguments
since drain-on-drop behavior was removed those bounds
no longer serve a purpose
The checks in `is_eligible_for_coverage` include `is_fn_like`, but will also
exclude various function-like things that cannot possibly have coverage
instrumentation.
This patch dismantles what was left of `FunctionCoverage` in `map_data.rs`,
replaces `function_coverage_map` with a set, and overhauls how we prepare
covfun records for unused functions.
I wanted to move some ui tests around, which broke `test_valid` since it
was referencing a non-specific-purpose ui test.
Pass FnAbi to find_mir_or_eval_fn

 rust-lang/miri#4013 needs information from ``FnAbi``, hence it is passed to ``find_mir_or_eval_fn``.

r? `@RalfJung`
Add a range argument to vec.extract_if

tracking issue: rust-lang#43244

This adds the range argument requested in rust-lang#43244 (comment)
…x-musl-tier-2, r=jieyouxu,Urgau,Kobzol

Promote powerpc64le-unknown-linux-musl to tier 2 with host tools

MCP: rust-lang/compiler-team#803

I'm using crosstool-ng for building a toolchain because GCC 9 from `musl-toolchain.sh` has float ABI issues (?) and can't compile LLVM, and writing a crosstool-ng config for a target feels less hacky than yet another target specific shell script. I also defined a kernel version, since there wasn't one specified before. If a lower version is desired, just let me know. I also tried to match the rust configure args with the loongarch64 musl tier 2 target.

The resulting compiler works fine, built with `DEPLOY=1 ./src/ci/docker/run.sh dist-powerpc64le-linux` and tested on Alpine Linux in a VM and on a bare metal POWER8 machine:
```
qemu-ppc64le:/tmp/rust-nightly-powerpc64le-unknown-linux-musl$ ash install.sh
install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'rust-std-powerpc64le-unknown-linux-musl'
install: installing component 'cargo'
install: installing component 'rustfmt-preview'
install: installing component 'rls-preview'
install: installing component 'rust-analyzer-preview'
install: installing component 'llvm-tools-preview'
install: installing component 'clippy-preview'
install: installing component 'miri-preview'
install: installing component 'rust-analysis-powerpc64le-unknown-linux-musl'
install: installing component 'llvm-bitcode-linker-preview'
install: WARNING: failed to run ldconfig. this may happen when not installing as root. run with --verbose to see the error

    rust installed.

qemu-ppc64le:~$ echo 'fn main() { println!("hello world"); }' > test.rs
qemu-ppc64le:~$ rustc test.rs
qemu-ppc64le:~$ ./test
hello world
qemu-ppc64le:~$ file test
test: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, OpenPOWER ELF V2 ABI, version 1 (SYSV), statically linked, BuildID[sha1]=596ee6abf9add487ebc54fb71c2076fb6faea013, with debug_info, not stripped
```

try-job: dist-powerpc64le-linux
…r=lcnr

Fix const conditions for RPITITs

Fixes rust-lang#133918

r? lcnr
…youxu

coverage: Dismantle `map_data.rs` by moving its responsibilities elsewhere

This is a series of incremental changes that combine to let us get rid of `coverageinfo/map_data.rs`, by moving all of its responsibilities into more appropriate places.

Some of the notable consequences are:

- We once again build the per-CGU file table on the fly while preparing individual covfun records, instead of building the whole table up-front. The up-front approach was introduced by rust-lang#117042 to work around various other problems in generating the covmap/covfun records, but subsequent cleanups have made that approach no longer necessary.
- Expression conversion and mapping-region conversion are now performed directly in `mapgen::covfun`, which should make future changes easier.
- We no longer insert unused function instances into the same map that is also used to track used function instances. This helps to decouple the handling of used vs unused functions.

---

There should be no meaningful change to compiler output. The file table is no longer sorted, because reordering it would invalidate the file indices stored in individual covfun records, but the table order should still be deterministic (albeit arbitrary).

There are some subsequent cleanups that I intend to investigate, but this is enough change for one PR.
…kh726

An octuple of polonius fact generation cleanups

This PR is extracted from rust-lang#134268 for easier review and contains its first 8 commits. They have already been reviewed by ``@jackh726`` over there.

r? ``@jackh726``
…=compiler-errors

Regression test for RPIT inheriting lifetime from projection

Regression test to close rust-lang#51525
…nur-ozkan

bootstrap: use specific-purpose ui test path for `test_valid` self-test

I wanted to move some ui tests around in rust-lang#134418, which broke `test_valid` since it was referencing two non-specific-purpose ui tests. This PR instead adds two dummy tests under `tests/ui/bootstrap/self-test/`, for that purpose specifically.

r? bootstrap
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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. rollup A PR which is a rollup labels Dec 17, 2024
@jieyouxu
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Dec 17, 2024

📌 Commit b247178 has been approved by jieyouxu

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 Dec 17, 2024
@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)
#20 exporting to docker image format
#20 sending tarball 27.8s done
#20 DONE 30.9s
##[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
---
diff of stderr:

8   --> $DIR/const-impl-trait.rs:11:23
9    |
10 LL | const fn cmp(a: &impl ~const PartialEq) -> bool {
+    |                       ^^^^^^ can't be applied to `PartialEq`
+    |
+    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
12 
13 error: `~const` can only be applied to `#[const_trait]` traits

15    |
15    |
16 LL | const fn cmp(a: &impl ~const PartialEq) -> bool {
+    |                       ^^^^^^ can't be applied to `PartialEq`
18    |
18    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
19    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
20 
21 error: `~const` can only be applied to `#[const_trait]` traits
22   --> $DIR/const-impl-trait.rs:16:13
23    |
23    |
24 LL |     x: impl ~const PartialEq + ~const Destruct,
+    |             ^^^^^^ can't be applied to `PartialEq`
+    |
+    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
26 
27 error: `~const` can only be applied to `#[const_trait]` traits

29    |
29    |
30 LL | ) -> impl ~const PartialEq + ~const Destruct {
+    |           ^^^^^^ can't be applied to `PartialEq`
+    |
+    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
32 
33 error: `~const` can only be applied to `#[const_trait]` traits

35    |
35    |
36 LL | ) -> impl ~const PartialEq + ~const Destruct {
+    |           ^^^^^^ can't be applied to `PartialEq`
38    |
38    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
39    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
40 
41 error: `~const` can only be applied to `#[const_trait]` traits
42   --> $DIR/const-impl-trait.rs:17:11
43    |
43    |
44 LL | ) -> impl ~const PartialEq + ~const Destruct {
+    |           ^^^^^^ can't be applied to `PartialEq`
46    |
46    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
47    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
48 
49 error: `~const` can only be applied to `#[const_trait]` traits
50   --> $DIR/const-impl-trait.rs:16:13
51    |
51    |
52 LL |     x: impl ~const PartialEq + ~const Destruct,
+    |             ^^^^^^ can't be applied to `PartialEq`
54    |
54    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
55    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
56 
57 error: `~const` can only be applied to `#[const_trait]` traits
58   --> $DIR/const-impl-trait.rs:23:22
59    |
59    |
60 LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
+    |                      ^^^^^^ can't be applied to `PartialEq`
+    |
+    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
62 
63 error: `~const` can only be applied to `#[const_trait]` traits

65    |
65    |
66 LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
+    |                      ^^^^^^ can't be applied to `PartialEq`
+    |
+    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
68 
69 error: `~const` can only be applied to `#[const_trait]` traits

71    |
71    |
72 LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
+    |                      ^^^^^^ can't be applied to `PartialEq`
74    |
74    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
75    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
76 
77 error: `~const` can only be applied to `#[const_trait]` traits
78   --> $DIR/const-impl-trait.rs:23:22
79    |
79    |
80 LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
+    |                      ^^^^^^ can't be applied to `PartialEq`
82    |
82    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
83    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
84 
85 error: `~const` can only be applied to `#[const_trait]` traits
86   --> $DIR/const-impl-trait.rs:23:22
87    |
87    |
88 LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
+    |                      ^^^^^^ can't be applied to `PartialEq`
90    |
90    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
91    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
92 
93 error: `~const` can only be applied to `#[const_trait]` traits
94   --> $DIR/const-impl-trait.rs:27:22
95    |
95    |
96 LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
+    |                      ^^^^^^ can't be applied to `PartialEq`
98    |
98    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
99    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
100 
101 error: `~const` can only be applied to `#[const_trait]` traits
102   --> $DIR/const-impl-trait.rs:23:22
103    |
103    |
104 LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
+    |                      ^^^^^^ can't be applied to `PartialEq`
106    |
106    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
107    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
108 
109 error: `~const` can only be applied to `#[const_trait]` traits
110   --> $DIR/const-impl-trait.rs:23:22
111    |
111    |
112 LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
+    |                      ^^^^^^ can't be applied to `PartialEq`
114    |
114    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
115    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
117 error[E0015]: cannot call non-const operator in constants

Note: some mismatched output was normalized before being compared
-   --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:248:1
---
-   --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:248:1
-   --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:248:1
+    |                       ^^^^^^ can't be applied to `PartialEq`
+    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
+    |                       ^^^^^^ can't be applied to `PartialEq`
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
+    |
+    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
+    |
+    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
+    |           ^^^^^^ can't be applied to `PartialEq`
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
+    |           ^^^^^^ can't be applied to `PartialEq`
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
+    |             ^^^^^^ can't be applied to `PartialEq`
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
+    |
+    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
+    |
+    |
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
+    |                      ^^^^^^ can't be applied to `PartialEq`
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
+    |                      ^^^^^^ can't be applied to `PartialEq`
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
+    |                      ^^^^^^ can't be applied to `PartialEq`
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
+    |                      ^^^^^^ can't be applied to `PartialEq`
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
+    |                      ^^^^^^ can't be applied to `PartialEq`
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL
+    |                      ^^^^^^ can't be applied to `PartialEq`
+ note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
+   --> $SRC_DIR/core/src/cmp.rs:LL:COL

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-impl-trait.rs`
To only update this specific test, also pass `--test-args traits/const-traits/const-impl-trait.rs`

error: 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-impl-trait.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" "--check-cfg" "cfg(FALSE)" "--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-impl-trait" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
--- stderr -------------------------------
error[E0635]: unknown feature `const_cmp`
##[error]  --> /checkout/tests/ui/traits/const-traits/const-impl-trait.rs:7:30
   |
   |
LL | #![feature(const_trait_impl, const_cmp, const_destruct)]
   |                              ^^^^^^^^^

error: `~const` can only be applied to `#[const_trait]` traits
   |
   |
LL | const fn cmp(a: &impl ~const PartialEq) -> bool {
   |
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`


error: `~const` can only be applied to `#[const_trait]` traits
   |
   |
LL | const fn cmp(a: &impl ~const PartialEq) -> bool {
   |
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:248:1
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `~const` can only be applied to `#[const_trait]` traits
   |
   |
LL |     x: impl ~const PartialEq + ~const Destruct,
   |
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`


error: `~const` can only be applied to `#[const_trait]` traits
   |
   |
LL | ) -> impl ~const PartialEq + ~const Destruct {
   |
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`


error: `~const` can only be applied to `#[const_trait]` traits
   |
   |
LL | ) -> impl ~const PartialEq + ~const Destruct {
   |
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:248:1
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `~const` can only be applied to `#[const_trait]` traits
   |
   |
LL | ) -> impl ~const PartialEq + ~const Destruct {
   |
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:248:1
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `~const` can only be applied to `#[const_trait]` traits
   |
   |
LL |     x: impl ~const PartialEq + ~const Destruct,
   |
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:248:1
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `~const` can only be applied to `#[const_trait]` traits
   |
   |
LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
   |
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`


error: `~const` can only be applied to `#[const_trait]` traits
   |
   |
LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
   |
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`


error: `~const` can only be applied to `#[const_trait]` traits
   |
   |
LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
   |
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:248:1
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `~const` can only be applied to `#[const_trait]` traits
   |
   |
LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
   |
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:248:1
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `~const` can only be applied to `#[const_trait]` traits
   |
   |
LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
   |
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:248:1
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `~const` can only be applied to `#[const_trait]` traits
   |
   |
LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
   |
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:248:1
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `~const` can only be applied to `#[const_trait]` traits
   |
   |
LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
   |
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:248:1
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `~const` can only be applied to `#[const_trait]` traits
   |
   |
LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
   |
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> /rustc/FAKE_PREFIX/library/core/src/cmp.rs:248:1
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0015]: cannot call non-const operator in constants
##[error]  --> /checkout/tests/ui/traits/const-traits/const-impl-trait.rs:35:13
   |
   |
LL |     assert!(wrap(123) == wrap(123));
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants

error[E0015]: cannot call non-const operator in constants
error[E0015]: cannot call non-const operator in constants
##[error]  --> /checkout/tests/ui/traits/const-traits/const-impl-trait.rs:36:13
   |
LL |     assert!(wrap(123) != wrap(456));
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants

error[E0015]: cannot call non-const operator in constants
error[E0015]: cannot call non-const operator in constants
##[error]  --> /checkout/tests/ui/traits/const-traits/const-impl-trait.rs:38:13
   |
LL |     assert!(x == x);
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants

error[E0015]: cannot call non-const operator in constant functions

@jieyouxu
Copy link
Member Author

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 17, 2024
@jieyouxu jieyouxu closed this Dec 17, 2024
@jieyouxu jieyouxu deleted the rollup-iavg8tv branch December 17, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.