Skip to content

[crater] Only consider predicate non-global if binder vars are in PREDICATE binder #140209

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

compiler-errors
Copy link
Member

r? lcnr

@compiler-errors
Copy link
Member Author

@bors try

@rustbot rustbot added 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. labels Apr 23, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 23, 2025
…der, r=<try>

[crater] Only consider predicate non-global if binder vars are in PREDICATE binder

r? lcnr
@bors
Copy link
Collaborator

bors commented Apr 23, 2025

⌛ Trying commit 5a39c67 with merge b381e17...

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Apr 23, 2025

💔 Test failed - checks-actions

@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-review Status: Awaiting review from the assignee but also interested parties. labels Apr 23, 2025
@compiler-errors
Copy link
Member Author

@bors try

@compiler-errors compiler-errors force-pushed the global-outermost-binder branch from 5a39c67 to 23c2dc3 Compare April 23, 2025 17:57
@compiler-errors
Copy link
Member Author

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 23, 2025
…der, r=<try>

[crater] Only consider predicate non-global if binder vars are in PREDICATE binder

r? lcnr
@bors
Copy link
Collaborator

bors commented Apr 23, 2025

⌛ Trying commit 23c2dc3 with merge 2e44cd3...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Apr 23, 2025

☀️ Try build successful - checks-actions
Build commit: 2e44cd3 (2e44cd30f069f55ed6bcd49427ce8c7c0933cde5)

@compiler-errors
Copy link
Member Author

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-140209 created and queued.
🤖 Automatically detected try build 2e44cd3
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 23, 2025
@craterbot
Copy link
Collaborator

🚧 Experiment pr-140209 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🎉 Experiment pr-140209 is completed!
📊 16 regressed and 7 fixed (619632 total)
📰 Open the full report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Apr 25, 2025
@compiler-errors compiler-errors force-pushed the global-outermost-binder branch from 23c2dc3 to 42a8b5f Compare April 28, 2025 17:01
@compiler-errors
Copy link
Member Author

@bors try

@bors
Copy link
Collaborator

bors commented Apr 28, 2025

⌛ Trying commit 42a8b5f with merge cd420d8...

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 28, 2025
…der, r=<try>

[crater] Only consider predicate non-global if binder vars are in PREDICATE binder

r? lcnr
@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 29, 2025
@compiler-errors
Copy link
Member Author

@rustbot cancel

@craterbot
Copy link
Collaborator

🚧 Experiment pr-140209-1 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@compiler-errors
Copy link
Member Author

@craterbot cancel

@craterbot
Copy link
Collaborator

🗑️ Experiment pr-140209-1 deleted!

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Apr 29, 2025
@compiler-errors
Copy link
Member Author

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-140209-1 created and queued.
🤖 Automatically detected try build cd420d8
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 29, 2025
@craterbot
Copy link
Collaborator

🚧 Experiment pr-140209-1 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🎉 Experiment pr-140209-1 is completed!
📊 16 regressed and 7 fixed (622257 total)
📰 Open the full report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Apr 30, 2025
@compiler-errors compiler-errors force-pushed the global-outermost-binder branch from 42a8b5f to ec03381 Compare May 15, 2025 22:22
@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 15, 2025
@bors
Copy link
Collaborator

bors commented May 15, 2025

⌛ Trying commit ec03381 with merge 3b0e1784719f76bcaf7c05960fb83dd66f5ccd8c...

bors added a commit to rust-lang-ci/rust that referenced this pull request May 15, 2025
…der, r=<try>

[crater] Only consider predicate non-global if binder vars are in PREDICATE binder

r? lcnr
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
#18 exporting to docker image format
#18 sending tarball 20.0s done
#18 DONE 27.4s
##[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-19]
[CI_JOB_NAME=x86_64-gnu-llvm-19]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Listening on address 127.0.0.1:4226
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-19', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'build.print-step-timings', '--enable-verbose-tests', '--set', 'build.metrics', '--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', '--set', 'gcc.download-ci-gcc=true', '--enable-new-symbol-mangling']
configure: build.build          := x86_64-unknown-linux-gnu
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-19/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
---- [ui] tests/ui/consts/issue-67696-const-prop-ice.rs stdout ----

error: test compilation failed although it shouldn't!
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/consts/issue-67696-const-prop-ice.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(test,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/consts/issue-67696-const-prop-ice" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--emit=mir,link" "-Zmir-opt-level=4"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `[for<'a> fn(&'a ())]: Copy` is not satisfied
##[error]  --> /checkout/tests/ui/consts/issue-67696-const-prop-ice.rs:13:33
   |
LL |     fn foo(&self) -> Self where Self: Copy { *(&[] as &[_]) }
   |                                 ^^^^^^^^^^ the trait `Copy` is not implemented for `[for<'a> fn(&'a ())]`
   |
   = help: the trait `Copy` is implemented for `[T; N]`
   = help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   |
---
---- [ui] tests/ui/feature-gates/feature-gate-trivial_bounds.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/feature-gates/feature-gate-trivial_bounds/feature-gate-trivial_bounds.stderr`
diff of stderr:

145 LL + #![feature(trivial_bounds)]
146    |
147 
- error: aborting due to 11 previous errors
+ error[E0277]: the trait bound `for<'a> fn(&'a ()): Foo` is not satisfied
+   --> $DIR/feature-gate-trivial_bounds.rs:65:32
+    |
+ LL | fn global_hr(x: fn(&())) where fn(&()): Foo { // OK
+    |                                ^^^^^^^^^^^^ the trait `Foo` is not implemented for `for<'a> fn(&'a ())`
+    |
+    = help: the trait `Foo` is implemented for `()`
+    = help: see issue #48214
+ help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
+    |
+ LL + #![feature(trivial_bounds)]
+    |
+ 
+ error: aborting due to 12 previous errors
149 
150 For more information about this error, try `rustc --explain E0277`.
151 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/feature-gates/feature-gate-trivial_bounds.rs:65:32
+ error[E0277]: the trait bound `for<'a> fn(&'a ()): Foo` is not satisfied
+   --> $DIR/feature-gate-trivial_bounds.rs:65:32
+    |
+ LL | fn global_hr(x: fn(&())) where fn(&()): Foo { // OK
+    |                                ^^^^^^^^^^^^ the trait `Foo` is not implemented for `for<'a> fn(&'a ())`
+    |
+    = help: the trait `Foo` is implemented for `()`
+    = help: see issue #48214
+ help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
+    |
+ LL + #![feature(trivial_bounds)]
+    |
+ 
+ error: aborting due to 12 previous errors


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 feature-gates/feature-gate-trivial_bounds.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/feature-gates/feature-gate-trivial_bounds.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(test,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/feature-gates/feature-gate-trivial_bounds" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `i32: Foo` is not satisfied
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-trivial_bounds.rs:10:14
   |
LL | enum E where i32: Foo { V } //~ ERROR
   |              ^^^^^^^^ the trait `Foo` is not implemented for `i32`
   |
   = help: the trait `Foo` is implemented for `()`
   = help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   |
LL + #![feature(trivial_bounds)]
   |

error[E0277]: the trait bound `i32: Foo` is not satisfied
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-trivial_bounds.rs:12:16
   |
LL | struct S where i32: Foo; //~ ERROR
   |                ^^^^^^^^ the trait `Foo` is not implemented for `i32`
   |
   = help: the trait `Foo` is implemented for `()`
   = help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   |
LL + #![feature(trivial_bounds)]
   |

error[E0277]: the trait bound `i32: Foo` is not satisfied
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-trivial_bounds.rs:14:15
   |
LL | trait T where i32: Foo {} //~ ERROR
   |               ^^^^^^^^ the trait `Foo` is not implemented for `i32`
   |
   = help: the trait `Foo` is implemented for `()`
   = help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   |
LL + #![feature(trivial_bounds)]
   |

error[E0277]: the trait bound `i32: Foo` is not satisfied
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-trivial_bounds.rs:16:15
   |
LL | union U where i32: Foo { f: i32 } //~ ERROR
   |               ^^^^^^^^ the trait `Foo` is not implemented for `i32`
   |
   = help: the trait `Foo` is implemented for `()`
   = help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   |
LL + #![feature(trivial_bounds)]
   |

error[E0277]: the trait bound `i32: Foo` is not satisfied
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-trivial_bounds.rs:20:23
   |
LL | impl Foo for () where i32: Foo { //~ ERROR
   |                       ^^^^^^^^ the trait `Foo` is not implemented for `i32`
   |
   = help: the trait `Foo` is implemented for `()`
   = help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   |
LL + #![feature(trivial_bounds)]
   |

error[E0277]: the trait bound `i32: Foo` is not satisfied
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-trivial_bounds.rs:28:14
   |
LL | fn f() where i32: Foo //~ ERROR
   |              ^^^^^^^^ the trait `Foo` is not implemented for `i32`
   |
   = help: the trait `Foo` is implemented for `()`
   = help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   |
LL + #![feature(trivial_bounds)]
   |

error[E0277]: the trait bound `String: Neg` is not satisfied
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-trivial_bounds.rs:36:38
   |
LL | fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> { //~ ERROR
   |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Neg` is not implemented for `String`
   |
   = help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   |
LL + #![feature(trivial_bounds)]
   |

error[E0277]: `i32` is not an iterator
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-trivial_bounds.rs:40:20
   |
LL | fn use_for() where i32: Iterator { //~ ERROR
   |                    ^^^^^^^^^^^^^ `i32` is not an iterator
   |
   = help: the trait `Iterator` is not implemented for `i32`
   = help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   |
LL + #![feature(trivial_bounds)]
   |

error[E0277]: the size for values of type `str` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-trivial_bounds.rs:52:32
   |
LL | struct TwoStrs(str, str) where str: Sized; //~ ERROR
   |                                ^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `str`
   = help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   |
LL + #![feature(trivial_bounds)]
   |

error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-trivial_bounds.rs:55:26
   |
LL | fn unsized_local() where Dst<dyn A>: Sized { //~ ERROR
   |                          ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `Dst<(dyn A + 'static)>`, the trait `Sized` is not implemented for `(dyn A + 'static)`
note: required because it appears within the type `Dst<(dyn A + 'static)>`
  --> /checkout/tests/ui/feature-gates/feature-gate-trivial_bounds.rs:48:8
   |
LL | struct Dst<X: ?Sized> {
   |        ^^^
   = help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   |
LL + #![feature(trivial_bounds)]
   |

error[E0277]: the size for values of type `str` cannot be known at compilation time
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-trivial_bounds.rs:59:30
   |
LL | fn return_str() -> str where str: Sized { //~ ERROR
   |                              ^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `str`
   = help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   |
LL + #![feature(trivial_bounds)]
   |

error[E0277]: the trait bound `for<'a> fn(&'a ()): Foo` is not satisfied
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-trivial_bounds.rs:65:32
   |
LL | fn global_hr(x: fn(&())) where fn(&()): Foo { // OK
   |                                ^^^^^^^^^^^^ the trait `Foo` is not implemented for `for<'a> fn(&'a ())`
   |
   = help: the trait `Foo` is implemented for `()`
   = help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   |
---
------------------------------------------


---- [ui] tests/ui/where-clauses/higher-ranked-fn-type.rs#quiet stdout ----
Saved the actual stderr to `/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/where-clauses/higher-ranked-fn-type.quiet/higher-ranked-fn-type.quiet.stderr`
diff of stderr:

+ error[E0277]: the trait bound `for<'a> fn(&'a ()): Foo` is not satisfied
+   --> $DIR/higher-ranked-fn-type.rs:18:5
+    |
+ LL |     (for<'a> fn(&'a ())): Foo,
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `for<'a> fn(&'a ())`
+    |
+ help: this trait has no implementations, consider adding one
+   --> $DIR/higher-ranked-fn-type.rs:6:1
+    |
+ LL | trait Foo {
+    | ^^^^^^^^^
+    = help: see issue #48214
+ help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
+    |
+ LL + #![feature(trivial_bounds)]
+    |
+ 
1 error[E0277]: the trait bound `for<'b> fn(&'b ()): Foo` is not satisfied
2   --> $DIR/higher-ranked-fn-type.rs:20:5
3    |

18 LL |     for<'b> fn(&'b ()): Foo,
19    |                         ^^^ required by this bound in `called`
20 
- error: aborting due to 1 previous error
+ error: aborting due to 2 previous errors
22 
23 For more information about this error, try `rustc --explain E0277`.
---
-   --> /checkout/tests/ui/where-clauses/higher-ranked-fn-type.rs:6:1
+ error[E0277]: the trait bound `for<'a> fn(&'a ()): Foo` is not satisfied
+   --> $DIR/higher-ranked-fn-type.rs:18:5
+    |
+ LL |     (for<'a> fn(&'a ())): Foo,
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `for<'a> fn(&'a ())`
+    |
+ help: this trait has no implementations, consider adding one
+   --> $DIR/higher-ranked-fn-type.rs:6:1
+    |
+ LL | trait Foo {
+    | ^^^^^^^^^
+    = help: see issue #48214
+ help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
+    |
+ LL + #![feature(trivial_bounds)]
+    |
+ 
+ error: aborting due to 2 previous errors


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 where-clauses/higher-ranked-fn-type.rs`

error in revision `quiet`: 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/where-clauses/higher-ranked-fn-type.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" "quiet" "--check-cfg" "cfg(test,FALSE,quiet,verbose)" "--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/where-clauses/higher-ranked-fn-type.quiet" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `for<'a> fn(&'a ()): Foo` is not satisfied
##[error]  --> /checkout/tests/ui/where-clauses/higher-ranked-fn-type.rs:18:5
   |
LL |     (for<'a> fn(&'a ())): Foo,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `for<'a> fn(&'a ())`
   |
help: this trait has no implementations, consider adding one
  --> /checkout/tests/ui/where-clauses/higher-ranked-fn-type.rs:6:1
   |
LL | trait Foo {
   | ^^^^^^^^^
   = help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   |
LL + #![feature(trivial_bounds)]
   |

error[E0277]: the trait bound `for<'b> fn(&'b ()): Foo` is not satisfied
##[error]  --> /checkout/tests/ui/where-clauses/higher-ranked-fn-type.rs:20:5
   |
LL |     called()
   |     ^^^^^^^^ the trait `for<'b> Foo` is not implemented for `fn(&'b ())`
   |
help: this trait has no implementations, consider adding one
  --> /checkout/tests/ui/where-clauses/higher-ranked-fn-type.rs:6:1
   |
LL | trait Foo {
   | ^^^^^^^^^
note: required by a bound in `called`
  --> /checkout/tests/ui/where-clauses/higher-ranked-fn-type.rs:12:25
   |
LL | fn called()
   |    ------ required by a bound in this function
LL | where
LL |     for<'b> fn(&'b ()): Foo,
   |                         ^^^ required by this bound in `called`

error: aborting due to 2 previous errors

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


---- [ui] tests/ui/where-clauses/higher-ranked-fn-type.rs#verbose stdout ----
Saved the actual stderr to `/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/where-clauses/higher-ranked-fn-type.verbose/higher-ranked-fn-type.verbose.stderr`
diff of stderr:

+ error[E0277]: the trait bound `for<Region(BrNamed(DefId(0:8 ~ higher_ranked_fn_type[9e51]::caller::'a), 'a))> fn(&'^0.Named(DefId(0:8 ~ higher_ranked_fn_type[9e51]::caller::'a), "'a") ()): Foo` is not satisfied
+   --> $DIR/higher-ranked-fn-type.rs:18:5
+    |
+ LL |     (for<'a> fn(&'a ())): Foo,
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
+    |
+    = help: the trait `Foo` is not implemented for `for<Region(BrNamed(DefId(0:8 ~ higher_ranked_fn_type[9e51]::caller::'a), 'a))> fn(&'^0.Named(DefId(0:8 ~ higher_ranked_fn_type[9e51]::caller::'a), "'a") ())`
+ help: this trait has no implementations, consider adding one
+   --> $DIR/higher-ranked-fn-type.rs:6:1
+    |
+ LL | trait Foo {
+    | ^^^^^^^^^
+    = help: see issue #48214
+ help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
+    |
+ LL + #![feature(trivial_bounds)]
+    |
+ 
1 error[E0277]: the trait bound `for<Region(BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b))> fn(&'^1_0.Named(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), "'b") ()): Foo` is not satisfied
2   --> $DIR/higher-ranked-fn-type.rs:20:5
3    |

19 LL |     for<'b> fn(&'b ()): Foo,
20    |                         ^^^ required by this bound in `called`
21 
- error: aborting due to 1 previous error
+ error: aborting due to 2 previous errors
23 
24 For more information about this error, try `rustc --explain E0277`.
25 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/where-clauses/higher-ranked-fn-type.rs:18:5
-   --> /checkout/tests/ui/where-clauses/higher-ranked-fn-type.rs:6:1
+ error[E0277]: the trait bound `for<Region(BrNamed(DefId(0:8 ~ higher_ranked_fn_type[9e51]::caller::'a), 'a))> fn(&'^0.Named(DefId(0:8 ~ higher_ranked_fn_type[9e51]::caller::'a), "'a") ()): Foo` is not satisfied
+   --> $DIR/higher-ranked-fn-type.rs:18:5
+    |
+ LL |     (for<'a> fn(&'a ())): Foo,
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
+    |
+    = help: the trait `Foo` is not implemented for `for<Region(BrNamed(DefId(0:8 ~ higher_ranked_fn_type[9e51]::caller::'a), 'a))> fn(&'^0.Named(DefId(0:8 ~ higher_ranked_fn_type[9e51]::caller::'a), "'a") ())`
+ help: this trait has no implementations, consider adding one
+   --> $DIR/higher-ranked-fn-type.rs:6:1
+    |
+ LL | trait Foo {
+    | ^^^^^^^^^
+    = help: see issue #48214
+ help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
+    |
+ LL + #![feature(trivial_bounds)]
+    |
+ 
+ error: aborting due to 2 previous errors


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 where-clauses/higher-ranked-fn-type.rs`

error in revision `verbose`: 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/where-clauses/higher-ranked-fn-type.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" "verbose" "--check-cfg" "cfg(test,FALSE,quiet,verbose)" "--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/where-clauses/higher-ranked-fn-type.verbose" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zverbose-internals"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `for<Region(BrNamed(DefId(0:8 ~ higher_ranked_fn_type[9e51]::caller::'a), 'a))> fn(&'^0.Named(DefId(0:8 ~ higher_ranked_fn_type[9e51]::caller::'a), "'a") ()): Foo` is not satisfied
##[error]  --> /checkout/tests/ui/where-clauses/higher-ranked-fn-type.rs:18:5
   |
LL |     (for<'a> fn(&'a ())): Foo,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
   |
   = help: the trait `Foo` is not implemented for `for<Region(BrNamed(DefId(0:8 ~ higher_ranked_fn_type[9e51]::caller::'a), 'a))> fn(&'^0.Named(DefId(0:8 ~ higher_ranked_fn_type[9e51]::caller::'a), "'a") ())`
help: this trait has no implementations, consider adding one
  --> /checkout/tests/ui/where-clauses/higher-ranked-fn-type.rs:6:1
   |
LL | trait Foo {
   | ^^^^^^^^^
   = help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   |
LL + #![feature(trivial_bounds)]
   |

error[E0277]: the trait bound `for<Region(BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b))> fn(&'^1_0.Named(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), "'b") ()): Foo` is not satisfied
##[error]  --> /checkout/tests/ui/where-clauses/higher-ranked-fn-type.rs:20:5
   |
LL |     called()
   |     ^^^^^^^^ unsatisfied trait bound
   |
   = help: the trait `for<Region(BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b))> Foo` is not implemented for `fn(&'^1_0.Named(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), "'b") ())`
help: this trait has no implementations, consider adding one
  --> /checkout/tests/ui/where-clauses/higher-ranked-fn-type.rs:6:1
   |
LL | trait Foo {
   | ^^^^^^^^^
note: required by a bound in `called`
  --> /checkout/tests/ui/where-clauses/higher-ranked-fn-type.rs:12:25
   |
LL | fn called()
   |    ------ required by a bound in this function
LL | where
LL |     for<'b> fn(&'b ()): Foo,
   |                         ^^^ required by this bound in `called`

error: aborting due to 2 previous errors

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

@bors
Copy link
Collaborator

bors commented May 16, 2025

☀️ Try build successful - checks-actions
Build commit: 3b0e178 (3b0e1784719f76bcaf7c05960fb83dd66f5ccd8c)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3b0e178): comparison URL.

Overall result: ❌ regressions - please read the text below

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
1.1% [1.1%, 1.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.1% [1.1%, 1.1%] 1

Max RSS (memory usage)

Results (primary -2.9%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.9% [-2.9%, -2.9%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.9% [-2.9%, -2.9%] 1

Cycles

Results (secondary -5.6%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.6% [-5.6%, -5.6%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 773.554s -> 774.459s (0.12%)
Artifact size: 365.48 MiB -> 365.35 MiB (-0.04%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf-regression Performance regression. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants