Skip to content

Rollup of 10 pull requests#154951

Closed
JonathanBrouwer wants to merge 30 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-feqrNw3
Closed

Rollup of 10 pull requests#154951
JonathanBrouwer wants to merge 30 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-feqrNw3

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@JonathanBrouwer JonathanBrouwer commented Apr 7, 2026

Successful merges:

r? @ghost

Create a similar rollup

ZuseZ4 and others added 30 commits April 4, 2026 19:20
Since a1feab1 ("Use libm for acosh and asinh"), the standard
library may link these functions to get a more accurate approximation;
however, some targets do not have the needed symbols available. Add them
to the compiler-builtins export list to make sure the fallback is
usable.
Split a long sentence to improve readability.
…50921, r=notriddle,GuillaumeGomez

Fix no results when searching for == in doc

Fixes rust-lang#150921

r? @GuillaumeGomez
Fix pin docs

Split a long sentence to improve readability.

The original sentence required multiple readings for me to understand as a non-native speaker. The revised version is clearer and more readable, and likely easier for others as well.
…yukang

Revert performing basic const checks in typeck on stable

Revert rust-lang#149375, it caused a (desirable, but unintended) change where we now emit errors about constants in dead code. This was due to mir never seeing dead code, so no const checks being run on it. But typeck sees all written code and will check it.

We'll land this again, with a proper types FCP and everything

fixes rust-lang#153765

see [#t-types/nominated > rust-lang#153765: 1.95 beta regression: trait method calls in dead c…](https://rust-lang.zulipchat.com/#narrow/channel/326866-t-types.2Fnominated/topic/.23153765.3A.201.2E95.20beta.20regression.3A.20trait.20method.20calls.20in.20dead.20c.E2.80.A6/with/580203072) for discussions
…h-ice, r=petrochenkov

delegation: generate more verbose error delegation

After this PR we generate more verbose error delegation including path lowering, as there can be other code in generic args as in rust-lang#154820. Now we access information for delegation lowering through ty-level queries and they require that the code should be lowered, even if it is in unresolved delegation.

Fixes rust-lang#154820, part of rust-lang#118212.

r? @petrochenkov
Enable `#[diagnostic::on_const]` for local impls

Previously this attribute only did something if it was on a foreign impl.
…i-obk

Add more info about where autodiff can be applied

It's taken quite a few years, but we finally have a PR open to distribute Enzyme: rust-lang#154754
I therefore went over the docs once more and noticed we don't explain a lot of the most basic features, which we added over the years and have since taken for granted.

@Sa4dUs, do you think there are more interesting cases that we are missing?

Generally, there's still a lot of complexity in it, especially for people who haven't used Enzyme before.
To some extent, that's just a result of my general design goal to expose all performance-relevant features of Enzyme, and let users explore nice abstractions on top if it, via crates. Since we don't have those nightly users yet, users haven't had time to build nicer abstractions on top of it.

I also feel like a more guided book would be a better first introduction to Enzyme, but for now I just focused on the list of features.

r? @oli-obk
…onszelmann

Post-attribute ports cleanup pt. 1

r? @jdonszelmann

This cleans up some checks I could find were for non-parsed attributes, and works towards removing BUILTIN_ATTRIBUTES

All commits do one thing and every commit passes tests, so best reviewed commit by commit
…RalfJung

c-b: Export inverse hyperbolic trigonometric functions

Since a1feab1 ("Use libm for acosh and asinh"), the standard library may link these functions to get a more accurate approximation; however, some targets do not have the needed symbols available. Add them to the compiler-builtins export list to make sure the fallback is usable.

Closes: rust-lang#154919
…, r=petrochenkov

delegation(small cleanup): remove not needed PhantomData

r? @petrochenkov
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Apr 7, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-search Area: Rustdoc's search feature 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Apr 7, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 7, 2026

📌 Commit 79aa68b has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors bot 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 Apr 7, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 7, 2026

⌛ Trying commit 79aa68b with merge 978a0ad

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/24082544901

rust-bors bot pushed a commit that referenced this pull request Apr 7, 2026
Rollup of 10 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
To only update this specific test, also pass `--test-args diagnostic_namespace/on_const/it_works_local.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/stage1/bin/rustc" "/checkout/tests/ui/diagnostic_namespace/on_const/it_works_local.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/stage1" "--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/diagnostic_namespace/on_const/it_works_local" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0015]: cannot call non-const operator in constants
##[error]  --> /checkout/tests/ui/diagnostic_namespace/on_const/it_works_local.rs:20:5
   |
---

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

---- [ui] tests/ui/diagnostic_namespace/on_const/it_works_local.rs stdout end ----
---- [ui] tests/ui/diagnostic_namespace/on_const/it_works_foreign.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/diagnostic_namespace/on_const/it_works_foreign/it_works_foreign.stderr`
diff of stderr:

- error[E0277]: their message
+ error[E0015]: cannot call non-const operator in constants
2   --> $DIR/it_works_foreign.rs:10:5
---
To only update this specific test, also pass `--test-args diagnostic_namespace/on_const/it_works_foreign.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/stage1/bin/rustc" "/checkout/tests/ui/diagnostic_namespace/on_const/it_works_foreign.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/stage1" "--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/diagnostic_namespace/on_const/it_works_foreign" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/diagnostic_namespace/on_const/it_works_foreign/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0015]: cannot call non-const operator in constants
##[error]  --> /checkout/tests/ui/diagnostic_namespace/on_const/it_works_foreign.rs:10:5
   |
---
---- [ui] tests/ui/typeck/typeck_type_placeholder_item.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/typeck/typeck_type_placeholder_item/typeck_type_placeholder_item.stderr`
diff of stderr:

587 LL + fn evens_squared(n: usize) -> impl Iterator<Item = usize> {
588    |
589 
- error[E0277]: the trait bound `std::ops::Range<{integer}>: const Iterator` is not satisfied
-   --> $DIR/typeck_type_placeholder_item.rs:240:15
+ error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
+   --> $DIR/typeck_type_placeholder_item.rs:240:10
592    |
593 LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
-    |               ^^^^^  ------ required by a bound introduced by this call
+    |          ^ not allowed in type signatures
595    |
- note: trait `Iterator` is implemented but not `const`
-   --> $SRC_DIR/core/src/iter/range.rs:LL:COL
- 
- error[E0277]: the trait bound `Filter<std::ops::Range<{integer}>, {closure@$DIR/typeck_type_placeholder_item.rs:240:29: 240:32}>: const Iterator` is not satisfied
-   --> $DIR/typeck_type_placeholder_item.rs:240:45
+ note: however, the inferred type `Map<Filter<Range<i32>, {closure@typeck_type_placeholder_item.rs:240:29}>, {closure@typeck_type_placeholder_item.rs:240:49}>` cannot be named
+   --> $DIR/typeck_type_placeholder_item.rs:240:14
601    |
602 LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
-    |                                             ^^^
-    |
- note: trait `Iterator` is implemented but not `const`
-   --> $SRC_DIR/core/src/iter/adapters/filter.rs:LL:COL
+    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
607 
- error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
-   --> $DIR/typeck_type_placeholder_item.rs:240:10
-    |
- LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
-    |          ^ not allowed in type signatures
- 
614 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
615   --> $DIR/typeck_type_placeholder_item.rs:40:24
616    |

690    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
691    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
692 
+ error[E0015]: cannot call non-const method `<std::ops::Range<i32> as Iterator>::filter::<{closure@$DIR/typeck_type_placeholder_item.rs:240:29: 240:32}>` in constants
+   --> $DIR/typeck_type_placeholder_item.rs:240:22
+    |
+ LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
+    |                      ^^^^^^^^^^^^^^^^^^^^^^
+    |
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+ 
+ error[E0015]: cannot call non-const method `<Filter<std::ops::Range<i32>, {closure@$DIR/typeck_type_placeholder_item.rs:240:29: 240:32}> as Iterator>::map::<i32, {closure@$DIR/typeck_type_placeholder_item.rs:240:49: 240:52}>` in constants
+   --> $DIR/typeck_type_placeholder_item.rs:240:45
+    |
+ LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
+    |                                             ^^^^^^^^^^^^^^
+    |
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+ 
693 error: aborting due to 83 previous errors
---

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:10
-   --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:14
- error[E0015]: cannot call non-const method `<std::ops::Range<i32> as Iterator>::filter::<{closure@/checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:29: 240:32}>` in constants
-   --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:22
- error[E0015]: cannot call non-const method `<Filter<std::ops::Range<i32>, {closure@/checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:29: 240:32}> as Iterator>::map::<i32, {closure@/checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:49: 240:52}>` in constants
-   --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:45
+ error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
+   --> $DIR/typeck_type_placeholder_item.rs:240:10
+    |          ^ not allowed in type signatures
+ note: however, the inferred type `Map<Filter<Range<i32>, {closure@typeck_type_placeholder_item.rs:240:29}>, {closure@typeck_type_placeholder_item.rs:240:49}>` cannot be named
+   --> $DIR/typeck_type_placeholder_item.rs:240:14
+    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ error[E0015]: cannot call non-const method `<std::ops::Range<i32> as Iterator>::filter::<{closure@$DIR/typeck_type_placeholder_item.rs:240:29: 240:32}>` in constants
+   --> $DIR/typeck_type_placeholder_item.rs:240:22
+    |
+ LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
+    |                      ^^^^^^^^^^^^^^^^^^^^^^
+    |
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+ 
+ error[E0015]: cannot call non-const method `<Filter<std::ops::Range<i32>, {closure@$DIR/typeck_type_placeholder_item.rs:240:29: 240:32}> as Iterator>::map::<i32, {closure@$DIR/typeck_type_placeholder_item.rs:240:49: 240:52}>` in constants
+   --> $DIR/typeck_type_placeholder_item.rs:240:45
+    |
+ LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
+    |                                             ^^^^^^^^^^^^^^
+    |
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+ 
+ Some errors have detailed explanations: E0015, E0046, E0121, E0282, E0403.
---
To only update this specific test, also pass `--test-args typeck/typeck_type_placeholder_item.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/stage1/bin/rustc" "/checkout/tests/ui/typeck/typeck_type_placeholder_item.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/stage1" "--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/typeck/typeck_type_placeholder_item" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error: expected identifier, found reserved identifier `_`
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:158:18
   |
LL | struct BadStruct<_>(_);
   |                  ^ expected identifier, found reserved identifier

error: expected identifier, found reserved identifier `_`
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:161:16
   |
LL | trait BadTrait<_> {}
   |                ^ expected identifier, found reserved identifier

error: expected identifier, found reserved identifier `_`
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:173:19
   |
LL | struct BadStruct1<_, _>(_);
   |                   ^ expected identifier, found reserved identifier

error: expected identifier, found reserved identifier `_`
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:173:22
   |
LL | struct BadStruct1<_, _>(_);
   |                      ^ expected identifier, found reserved identifier

error: expected identifier, found reserved identifier `_`
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:178:19
   |
LL | struct BadStruct2<_, T>(_, T);
   |                   ^ expected identifier, found reserved identifier

error: associated constant in `impl` without body
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:215:5
   |
LL |     const C: _;
   |     ^^^^^^^^^^-
   |               |
   |               help: provide a definition for the constant: `= <expr>;`

error[E0403]: the name `_` is already used for a generic parameter in this item's generic parameters
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:173:22
   |
LL | struct BadStruct1<_, _>(_);
   |                   -  ^ already used
   |                   |
   |                   first use of `_`

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:7:14
---

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:10:16
   |
LL | fn test2() -> (_, _) { (5, 5) }
   |                ^  ^ not allowed in type signatures
   |                |
   |                not allowed in type signatures
   |
help: replace with the correct return type
   |
LL - fn test2() -> (_, _) { (5, 5) }
LL + fn test2() -> (i32, i32) { (5, 5) }
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:13:15
   |
---
   |                not allowed in type signatures
   |
help: replace this with a fully-specified type
   |
LL - static TEST5: (_, _) = (1, 2);
LL + static TEST5: (i32, i32) = (1, 2);
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:22:13
   |
LL | fn test6(_: _) { }
   |             ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:25:18
   |
LL | fn test6_b<T>(_: _, _: T) { }
   |                  ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:28:30
   |
LL | fn test6_c<T, K, L, A, B>(_: _, _: (T, K, L, A, B)) { }
   |                              ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:31:13
   |
LL | fn test7(x: _) { let _x: usize = x; }
   |             ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:34:22
   |
LL | fn test8(_f: fn() -> _) { }
   |                      ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:66:8
   |
LL |     a: _,
   |        ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:68:9
   |
LL |     b: (_, _),
   |         ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:68:12
   |
LL |     b: (_, _),
   |            ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:123:12
   |
LL |         a: _,
   |            ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:125:13
   |
LL |         b: (_, _),
   |             ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:125:16
   |
LL |         b: (_, _),
   |                ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:158:21
   |
LL | struct BadStruct<_>(_);
   |                     ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:173:25
   |
LL | struct BadStruct1<_, _>(_);
   |                         ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:178:25
   |
LL | struct BadStruct2<_, T>(_, T);
   |                         ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:47:26
   |
LL | fn test11(x: &usize) -> &_ {
   |                          ^ not allowed in type signatures
   |
help: replace with the correct return type
   |
LL - fn test11(x: &usize) -> &_ {
LL + fn test11(x: &usize) -> &&usize {
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:52:52
   |
LL | unsafe fn test12(x: *const usize) -> *const *const _ {
   |                                                    ^ not allowed in type signatures
   |
help: replace with the correct return type
   |
LL - unsafe fn test12(x: *const usize) -> *const *const _ {
LL + unsafe fn test12(x: *const usize) -> *const *const usize {
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:58:24
   |
LL |     fn clone(&self) -> _ { Test9 }
   |                        ^ not allowed in type signatures
   |
help: try replacing `_` with the type in the corresponding trait method signature
   |
LL -     fn clone(&self) -> _ { Test9 }
LL +     fn clone(&self) -> Test9 { Test9 }
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:61:37
   |
LL |     fn clone_from(&mut self, other: _) { *self = Test9; }
   |                                     ^ not allowed in type signatures
   |
help: try replacing `_` with the type in the corresponding trait method signature
   |
LL -     fn clone_from(&mut self, other: _) { *self = Test9; }
LL +     fn clone_from(&mut self, other: &Test9) { *self = Test9; }
   |

error: missing type for `static` item
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:74:13
   |
LL |     static A = 42;
   |             ^ help: provide a type for the static variable: `: i32`

error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:76:15
   |
LL |     static B: _ = 42;
   |               ^ not allowed in type signatures
   |
help: replace this with a fully-specified type
   |
LL -     static B: _ = 42;
LL +     static B: i32 = 42;
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:78:22
   |
LL |     static C: Option<_> = Some(42);
   |                      ^ not allowed in type signatures
   |
help: replace this with a fully-specified type
   |
LL -     static C: Option<_> = Some(42);
LL +     static C: Option<i32> = Some(42);
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:80:21
   |
LL |     fn fn_test() -> _ { 5 }
   |                     ^ not allowed in type signatures
   |
help: replace with the correct return type
   |
LL -     fn fn_test() -> _ { 5 }
LL +     fn fn_test() -> i32 { 5 }
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:83:23
   |
LL |     fn fn_test2() -> (_, _) { (5, 5) }
   |                       ^  ^ not allowed in type signatures
   |                       |
   |                       not allowed in type signatures
   |
help: replace with the correct return type
   |
LL -     fn fn_test2() -> (_, _) { (5, 5) }
LL +     fn fn_test2() -> (i32, i32) { (5, 5) }
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:86:22
   |
LL |     static FN_TEST3: _ = "test";
   |                      ^ not allowed in type signatures
   |
help: replace this with a fully-specified type
   |
LL -     static FN_TEST3: _ = "test";
LL +     static FN_TEST3: &str = "test";
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:89:22
   |
LL |     static FN_TEST4: _ = 145;
   |                      ^ not allowed in type signatures
   |
help: replace this with a fully-specified type
   |
LL -     static FN_TEST4: _ = 145;
LL +     static FN_TEST4: i32 = 145;
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:92:23
   |
LL |     static FN_TEST5: (_, _) = (1, 2);
   |                       ^  ^ not allowed in type signatures
   |                       |
   |                       not allowed in type signatures
   |
help: replace this with a fully-specified type
   |
LL -     static FN_TEST5: (_, _) = (1, 2);
LL +     static FN_TEST5: (i32, i32) = (1, 2);
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:95:20
   |
LL |     fn fn_test6(_: _) { }
   |                    ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:98:20
   |
LL |     fn fn_test7(x: _) { let _x: usize = x; }
   |                    ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:101:29
   |
LL |     fn fn_test8(_f: fn() -> _) { }
   |                             ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:115:28
   |
LL |         fn clone(&self) -> _ { FnTest9 }
   |                            ^ not allowed in type signatures
   |
help: try replacing `_` with the type in the corresponding trait method signature
   |
LL -         fn clone(&self) -> _ { FnTest9 }
LL +         fn clone(&self) -> FnTest9 { FnTest9 }
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:118:41
   |
LL |         fn clone_from(&mut self, other: _) { *self = FnTest9; }
   |                                         ^ not allowed in type signatures
   |
help: try replacing `_` with the type in the corresponding trait method signature
   |
LL -         fn clone_from(&mut self, other: _) { *self = FnTest9; }
LL +         fn clone_from(&mut self, other: &FnTest9) { *self = FnTest9; }
   |

error[E0282]: type annotations needed
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:130:21
   |
LL |     fn fn_test11(_: _) -> (_, _) { panic!() }
   |                     ^ cannot infer type

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:130:28
   |
LL |     fn fn_test11(_: _) -> (_, _) { panic!() }
   |                            ^  ^ not allowed in type signatures
   |                            |
   |                            not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:134:30
   |
LL |     fn fn_test12(x: i32) -> (_, _) { (x, x) }
   |                              ^  ^ not allowed in type signatures
   |                              |
   |                              not allowed in type signatures
   |
help: replace with the correct return type
   |
LL -     fn fn_test12(x: i32) -> (_, _) { (x, x) }
LL +     fn fn_test12(x: i32) -> (i32, i32) { (x, x) }
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:137:33
   |
LL |     fn fn_test13(x: _) -> (i32, _) { (x, x) }
   |                                 ^ not allowed in type signatures
   |
help: replace with the correct return type
   |
LL -     fn fn_test13(x: _) -> (i32, _) { (x, x) }
LL +     fn fn_test13(x: _) -> (i32, i32) { (x, x) }
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:142:31
   |
LL |     fn method_test1(&self, x: _);
   |                               ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:144:31
   |
LL |     fn method_test2(&self, x: _) -> _;
   |                               ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:144:37
   |
LL |     fn method_test2(&self, x: _) -> _;
   |                                     ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:147:31
   |
LL |     fn method_test3(&self) -> _;
   |                               ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:149:26
   |
LL |     fn assoc_fn_test1(x: _);
   |                          ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:151:26
   |
LL |     fn assoc_fn_test2(x: _) -> _;
   |                          ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:151:32
   |
LL |     fn assoc_fn_test2(x: _) -> _;
   |                                ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:154:28
   |
LL |     fn assoc_fn_test3() -> _;
   |                            ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for implementations
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:163:32
   |
LL | impl BadTrait<_> for BadStruct<_> {}
   |                                ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for implementations
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:163:15
   |
LL | impl BadTrait<_> for BadStruct<_> {}
   |               ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:167:34
   |
LL | fn impl_trait() -> impl BadTrait<_> {
   |                                  ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:182:14
   |
---

error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated constants
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:202:14
   |
LL |     const D: _ = 42;
   |              ^ not allowed in type signatures
   |
help: replace this with a fully-specified type
   |
LL -     const D: _ = 42;
LL +     const D: i32 = 42;
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated constants
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:218:14
   |
LL |     const D: _ = 42;
   |              ^ not allowed in type signatures

error[E0046]: not all trait items implemented, missing: `F`
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:209:1
   |
LL |     type F: std::ops::Fn(_);
   |     ----------------------- `F` from trait
...
LL | impl Qux for Struct {
   | ^^^^^^^^^^^^^^^^^^^ missing `F` in implementation

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:226:31
   |
LL | fn value() -> Option<&'static _> {
---

error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:231:17
   |
LL | const _: Option<_> = map(value);
   |                 ^ not allowed in type signatures
   |
help: replace this with a fully-specified type
   |
LL - const _: Option<_> = map(value);
LL + const _: Option<u8> = map(value);
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:235:31
   |
LL | fn evens_squared(n: usize) -> _ {
   |                               ^ not allowed in type signatures
   |
help: replace with an appropriate return type
   |
LL - fn evens_squared(n: usize) -> _ {
LL + fn evens_squared(n: usize) -> impl Iterator<Item = usize> {
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:10
   |
LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
   |          ^ not allowed in type signatures
   |
note: however, the inferred type `Map<Filter<Range<i32>, {closure@typeck_type_placeholder_item.rs:240:29}>, {closure@typeck_type_placeholder_item.rs:240:49}>` cannot be named
  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:14
   |
LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:40:24
   |
LL |     fn test9(&self) -> _ { () }
   |                        ^ not allowed in type signatures
   |
help: replace with the correct return type
   |
LL -     fn test9(&self) -> _ { () }
LL +     fn test9(&self) -> () { () }
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:43:27
   |
LL |     fn test10(&self, _x : _) { }
   |                           ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:107:31
   |
LL |         fn fn_test9(&self) -> _ { () }
   |                               ^ not allowed in type signatures
   |
help: replace with the correct return type
   |
LL -         fn fn_test9(&self) -> _ { () }
LL +         fn fn_test9(&self) -> () { () }
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:110:34
   |
LL |         fn fn_test10(&self, _x : _) { }
   |                                  ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:205:26
   |
---
   |
LL |     type F: std::ops::Fn(_);
   |                          ^ not allowed in type signatures
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:167:34
   |
LL | fn impl_trait() -> impl BadTrait<_> {
   |                                  ^ not allowed in type signatures
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:188:21
   |
LL | type Y = impl Trait<_>;
   |                     ^ not allowed in type signatures
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0015]: cannot call non-const function `map::<u8>` in constants
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:231:22
   |
LL | const _: Option<_> = map(value);
   |                      ^^^^^^^^^^
   |
note: function `map` is not const
  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:222:1
   |
LL | fn map<T>(_: fn() -> Option<&'static T>) -> Option<T> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants

error[E0015]: cannot call non-const method `<std::ops::Range<i32> as Iterator>::filter::<{closure@/checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:29: 240:32}>` in constants
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:22
   |
LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
   |                      ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants

error[E0015]: cannot call non-const method `<Filter<std::ops::Range<i32>, {closure@/checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:29: 240:32}> as Iterator>::map::<i32, {closure@/checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:49: 240:52}>` in constants
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:45
   |
LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
   |                                             ^^^^^^^^^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants

error: aborting due to 83 previous errors

@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
PR_CI_JOB set; skipping tidy
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://static.rust-lang.org/dist/2026-03-05/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz
---
To only update this specific test, also pass `--test-args diagnostic_namespace/on_const/it_works_local.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/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/diagnostic_namespace/on_const/it_works_local.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-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/aarch64-unknown-linux-gnu/test/ui/diagnostic_namespace/on_const/it_works_local" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0015]: cannot call non-const operator in constants
##[error]  --> /checkout/tests/ui/diagnostic_namespace/on_const/it_works_local.rs:20:5
   |
---

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

---- [ui] tests/ui/diagnostic_namespace/on_const/it_works_local.rs stdout end ----
---- [ui] tests/ui/diagnostic_namespace/on_const/it_works_foreign.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/diagnostic_namespace/on_const/it_works_foreign/it_works_foreign.stderr`
diff of stderr:

- error[E0277]: their message
+ error[E0015]: cannot call non-const operator in constants
2   --> $DIR/it_works_foreign.rs:10:5
---
To only update this specific test, also pass `--test-args diagnostic_namespace/on_const/it_works_foreign.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/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/diagnostic_namespace/on_const/it_works_foreign.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-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/aarch64-unknown-linux-gnu/test/ui/diagnostic_namespace/on_const/it_works_foreign" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/diagnostic_namespace/on_const/it_works_foreign/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0015]: cannot call non-const operator in constants
##[error]  --> /checkout/tests/ui/diagnostic_namespace/on_const/it_works_foreign.rs:10:5
   |
---
---- [ui] tests/ui/typeck/typeck_type_placeholder_item.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/typeck/typeck_type_placeholder_item/typeck_type_placeholder_item.stderr`
diff of stderr:

587 LL + fn evens_squared(n: usize) -> impl Iterator<Item = usize> {
588    |
589 
- error[E0277]: the trait bound `std::ops::Range<{integer}>: const Iterator` is not satisfied
-   --> $DIR/typeck_type_placeholder_item.rs:240:15
+ error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
+   --> $DIR/typeck_type_placeholder_item.rs:240:10
592    |
593 LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
-    |               ^^^^^  ------ required by a bound introduced by this call
+    |          ^ not allowed in type signatures
595    |
- note: trait `Iterator` is implemented but not `const`
-   --> $SRC_DIR/core/src/iter/range.rs:LL:COL
- 
- error[E0277]: the trait bound `Filter<std::ops::Range<{integer}>, {closure@$DIR/typeck_type_placeholder_item.rs:240:29: 240:32}>: const Iterator` is not satisfied
-   --> $DIR/typeck_type_placeholder_item.rs:240:45
+ note: however, the inferred type `Map<Filter<Range<i32>, {closure@typeck_type_placeholder_item.rs:240:29}>, {closure@typeck_type_placeholder_item.rs:240:49}>` cannot be named
+   --> $DIR/typeck_type_placeholder_item.rs:240:14
601    |
602 LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
-    |                                             ^^^
-    |
- note: trait `Iterator` is implemented but not `const`
-   --> $SRC_DIR/core/src/iter/adapters/filter.rs:LL:COL
+    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
607 
- error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
-   --> $DIR/typeck_type_placeholder_item.rs:240:10
-    |
- LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
-    |          ^ not allowed in type signatures
- 
614 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
615   --> $DIR/typeck_type_placeholder_item.rs:40:24
616    |

690    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
691    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
692 
+ error[E0015]: cannot call non-const method `<std::ops::Range<i32> as Iterator>::filter::<{closure@$DIR/typeck_type_placeholder_item.rs:240:29: 240:32}>` in constants
+   --> $DIR/typeck_type_placeholder_item.rs:240:22
+    |
+ LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
+    |                      ^^^^^^^^^^^^^^^^^^^^^^
+    |
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+ 
+ error[E0015]: cannot call non-const method `<Filter<std::ops::Range<i32>, {closure@$DIR/typeck_type_placeholder_item.rs:240:29: 240:32}> as Iterator>::map::<i32, {closure@$DIR/typeck_type_placeholder_item.rs:240:49: 240:52}>` in constants
+   --> $DIR/typeck_type_placeholder_item.rs:240:45
+    |
+ LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
+    |                                             ^^^^^^^^^^^^^^
+    |
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+ 
693 error: aborting due to 83 previous errors
---

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:10
-   --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:14
- error[E0015]: cannot call non-const method `<std::ops::Range<i32> as Iterator>::filter::<{closure@/checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:29: 240:32}>` in constants
-   --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:22
- error[E0015]: cannot call non-const method `<Filter<std::ops::Range<i32>, {closure@/checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:29: 240:32}> as Iterator>::map::<i32, {closure@/checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:49: 240:52}>` in constants
-   --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:45
+ error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
+   --> $DIR/typeck_type_placeholder_item.rs:240:10
+    |          ^ not allowed in type signatures
+ note: however, the inferred type `Map<Filter<Range<i32>, {closure@typeck_type_placeholder_item.rs:240:29}>, {closure@typeck_type_placeholder_item.rs:240:49}>` cannot be named
+   --> $DIR/typeck_type_placeholder_item.rs:240:14
+    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ error[E0015]: cannot call non-const method `<std::ops::Range<i32> as Iterator>::filter::<{closure@$DIR/typeck_type_placeholder_item.rs:240:29: 240:32}>` in constants
+   --> $DIR/typeck_type_placeholder_item.rs:240:22
+    |
+ LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
+    |                      ^^^^^^^^^^^^^^^^^^^^^^
+    |
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+ 
+ error[E0015]: cannot call non-const method `<Filter<std::ops::Range<i32>, {closure@$DIR/typeck_type_placeholder_item.rs:240:29: 240:32}> as Iterator>::map::<i32, {closure@$DIR/typeck_type_placeholder_item.rs:240:49: 240:52}>` in constants
+   --> $DIR/typeck_type_placeholder_item.rs:240:45
+    |
+ LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
+    |                                             ^^^^^^^^^^^^^^
+    |
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+ 
+ Some errors have detailed explanations: E0015, E0046, E0121, E0282, E0403.
---
To only update this specific test, also pass `--test-args typeck/typeck_type_placeholder_item.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/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/typeck/typeck_type_placeholder_item.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-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/aarch64-unknown-linux-gnu/test/ui/typeck/typeck_type_placeholder_item" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error: expected identifier, found reserved identifier `_`
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:158:18
   |
LL | struct BadStruct<_>(_);
   |                  ^ expected identifier, found reserved identifier

error: expected identifier, found reserved identifier `_`
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:161:16
   |
LL | trait BadTrait<_> {}
   |                ^ expected identifier, found reserved identifier

error: expected identifier, found reserved identifier `_`
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:173:19
   |
LL | struct BadStruct1<_, _>(_);
   |                   ^ expected identifier, found reserved identifier

error: expected identifier, found reserved identifier `_`
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:173:22
   |
LL | struct BadStruct1<_, _>(_);
   |                      ^ expected identifier, found reserved identifier

error: expected identifier, found reserved identifier `_`
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:178:19
   |
LL | struct BadStruct2<_, T>(_, T);
   |                   ^ expected identifier, found reserved identifier

error: associated constant in `impl` without body
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:215:5
   |
LL |     const C: _;
   |     ^^^^^^^^^^-
   |               |
   |               help: provide a definition for the constant: `= <expr>;`

error[E0403]: the name `_` is already used for a generic parameter in this item's generic parameters
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:173:22
   |
LL | struct BadStruct1<_, _>(_);
   |                   -  ^ already used
   |                   |
   |                   first use of `_`

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:7:14
---

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:10:16
   |
LL | fn test2() -> (_, _) { (5, 5) }
   |                ^  ^ not allowed in type signatures
   |                |
   |                not allowed in type signatures
   |
help: replace with the correct return type
   |
LL - fn test2() -> (_, _) { (5, 5) }
LL + fn test2() -> (i32, i32) { (5, 5) }
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:13:15
   |
---
   |                not allowed in type signatures
   |
help: replace this with a fully-specified type
   |
LL - static TEST5: (_, _) = (1, 2);
LL + static TEST5: (i32, i32) = (1, 2);
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:22:13
   |
LL | fn test6(_: _) { }
   |             ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:25:18
   |
LL | fn test6_b<T>(_: _, _: T) { }
   |                  ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:28:30
   |
LL | fn test6_c<T, K, L, A, B>(_: _, _: (T, K, L, A, B)) { }
   |                              ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:31:13
   |
LL | fn test7(x: _) { let _x: usize = x; }
   |             ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:34:22
   |
LL | fn test8(_f: fn() -> _) { }
   |                      ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:66:8
   |
LL |     a: _,
   |        ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:68:9
   |
LL |     b: (_, _),
   |         ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:68:12
   |
LL |     b: (_, _),
   |            ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:123:12
   |
LL |         a: _,
   |            ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:125:13
   |
LL |         b: (_, _),
   |             ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:125:16
   |
LL |         b: (_, _),
   |                ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:158:21
   |
LL | struct BadStruct<_>(_);
   |                     ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:173:25
   |
LL | struct BadStruct1<_, _>(_);
   |                         ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:178:25
   |
LL | struct BadStruct2<_, T>(_, T);
   |                         ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:47:26
   |
LL | fn test11(x: &usize) -> &_ {
   |                          ^ not allowed in type signatures
   |
help: replace with the correct return type
   |
LL - fn test11(x: &usize) -> &_ {
LL + fn test11(x: &usize) -> &&usize {
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:52:52
   |
LL | unsafe fn test12(x: *const usize) -> *const *const _ {
   |                                                    ^ not allowed in type signatures
   |
help: replace with the correct return type
   |
LL - unsafe fn test12(x: *const usize) -> *const *const _ {
LL + unsafe fn test12(x: *const usize) -> *const *const usize {
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:58:24
   |
LL |     fn clone(&self) -> _ { Test9 }
   |                        ^ not allowed in type signatures
   |
help: try replacing `_` with the type in the corresponding trait method signature
   |
LL -     fn clone(&self) -> _ { Test9 }
LL +     fn clone(&self) -> Test9 { Test9 }
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:61:37
   |
LL |     fn clone_from(&mut self, other: _) { *self = Test9; }
   |                                     ^ not allowed in type signatures
   |
help: try replacing `_` with the type in the corresponding trait method signature
   |
LL -     fn clone_from(&mut self, other: _) { *self = Test9; }
LL +     fn clone_from(&mut self, other: &Test9) { *self = Test9; }
   |

error: missing type for `static` item
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:74:13
   |
LL |     static A = 42;
   |             ^ help: provide a type for the static variable: `: i32`

error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:76:15
   |
LL |     static B: _ = 42;
   |               ^ not allowed in type signatures
   |
help: replace this with a fully-specified type
   |
LL -     static B: _ = 42;
LL +     static B: i32 = 42;
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:78:22
   |
LL |     static C: Option<_> = Some(42);
   |                      ^ not allowed in type signatures
   |
help: replace this with a fully-specified type
   |
LL -     static C: Option<_> = Some(42);
LL +     static C: Option<i32> = Some(42);
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:80:21
   |
LL |     fn fn_test() -> _ { 5 }
   |                     ^ not allowed in type signatures
   |
help: replace with the correct return type
   |
LL -     fn fn_test() -> _ { 5 }
LL +     fn fn_test() -> i32 { 5 }
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:83:23
   |
LL |     fn fn_test2() -> (_, _) { (5, 5) }
   |                       ^  ^ not allowed in type signatures
   |                       |
   |                       not allowed in type signatures
   |
help: replace with the correct return type
   |
LL -     fn fn_test2() -> (_, _) { (5, 5) }
LL +     fn fn_test2() -> (i32, i32) { (5, 5) }
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:86:22
   |
LL |     static FN_TEST3: _ = "test";
   |                      ^ not allowed in type signatures
   |
help: replace this with a fully-specified type
   |
LL -     static FN_TEST3: _ = "test";
LL +     static FN_TEST3: &str = "test";
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:89:22
   |
LL |     static FN_TEST4: _ = 145;
   |                      ^ not allowed in type signatures
   |
help: replace this with a fully-specified type
   |
LL -     static FN_TEST4: _ = 145;
LL +     static FN_TEST4: i32 = 145;
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:92:23
   |
LL |     static FN_TEST5: (_, _) = (1, 2);
   |                       ^  ^ not allowed in type signatures
   |                       |
   |                       not allowed in type signatures
   |
help: replace this with a fully-specified type
   |
LL -     static FN_TEST5: (_, _) = (1, 2);
LL +     static FN_TEST5: (i32, i32) = (1, 2);
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:95:20
   |
LL |     fn fn_test6(_: _) { }
   |                    ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:98:20
   |
LL |     fn fn_test7(x: _) { let _x: usize = x; }
   |                    ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:101:29
   |
LL |     fn fn_test8(_f: fn() -> _) { }
   |                             ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:115:28
   |
LL |         fn clone(&self) -> _ { FnTest9 }
   |                            ^ not allowed in type signatures
   |
help: try replacing `_` with the type in the corresponding trait method signature
   |
LL -         fn clone(&self) -> _ { FnTest9 }
LL +         fn clone(&self) -> FnTest9 { FnTest9 }
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:118:41
   |
LL |         fn clone_from(&mut self, other: _) { *self = FnTest9; }
   |                                         ^ not allowed in type signatures
   |
help: try replacing `_` with the type in the corresponding trait method signature
   |
LL -         fn clone_from(&mut self, other: _) { *self = FnTest9; }
LL +         fn clone_from(&mut self, other: &FnTest9) { *self = FnTest9; }
   |

error[E0282]: type annotations needed
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:130:21
   |
LL |     fn fn_test11(_: _) -> (_, _) { panic!() }
   |                     ^ cannot infer type

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:130:28
   |
LL |     fn fn_test11(_: _) -> (_, _) { panic!() }
   |                            ^  ^ not allowed in type signatures
   |                            |
   |                            not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:134:30
   |
LL |     fn fn_test12(x: i32) -> (_, _) { (x, x) }
   |                              ^  ^ not allowed in type signatures
   |                              |
   |                              not allowed in type signatures
   |
help: replace with the correct return type
   |
LL -     fn fn_test12(x: i32) -> (_, _) { (x, x) }
LL +     fn fn_test12(x: i32) -> (i32, i32) { (x, x) }
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:137:33
   |
LL |     fn fn_test13(x: _) -> (i32, _) { (x, x) }
   |                                 ^ not allowed in type signatures
   |
help: replace with the correct return type
   |
LL -     fn fn_test13(x: _) -> (i32, _) { (x, x) }
LL +     fn fn_test13(x: _) -> (i32, i32) { (x, x) }
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:142:31
   |
LL |     fn method_test1(&self, x: _);
   |                               ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:144:31
   |
LL |     fn method_test2(&self, x: _) -> _;
   |                               ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:144:37
   |
LL |     fn method_test2(&self, x: _) -> _;
   |                                     ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:147:31
   |
LL |     fn method_test3(&self) -> _;
   |                               ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:149:26
   |
LL |     fn assoc_fn_test1(x: _);
   |                          ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:151:26
   |
LL |     fn assoc_fn_test2(x: _) -> _;
   |                          ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:151:32
   |
LL |     fn assoc_fn_test2(x: _) -> _;
   |                                ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated functions
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:154:28
   |
LL |     fn assoc_fn_test3() -> _;
   |                            ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for implementations
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:163:32
   |
LL | impl BadTrait<_> for BadStruct<_> {}
   |                                ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for implementations
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:163:15
   |
LL | impl BadTrait<_> for BadStruct<_> {}
   |               ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:167:34
   |
LL | fn impl_trait() -> impl BadTrait<_> {
   |                                  ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:182:14
   |
---

error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated constants
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:202:14
   |
LL |     const D: _ = 42;
   |              ^ not allowed in type signatures
   |
help: replace this with a fully-specified type
   |
LL -     const D: _ = 42;
LL +     const D: i32 = 42;
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated constants
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:218:14
   |
LL |     const D: _ = 42;
   |              ^ not allowed in type signatures

error[E0046]: not all trait items implemented, missing: `F`
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:209:1
   |
LL |     type F: std::ops::Fn(_);
   |     ----------------------- `F` from trait
...
LL | impl Qux for Struct {
   | ^^^^^^^^^^^^^^^^^^^ missing `F` in implementation

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:226:31
   |
LL | fn value() -> Option<&'static _> {
---

error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:231:17
   |
LL | const _: Option<_> = map(value);
   |                 ^ not allowed in type signatures
   |
help: replace this with a fully-specified type
   |
LL - const _: Option<_> = map(value);
LL + const _: Option<u8> = map(value);
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:235:31
   |
LL | fn evens_squared(n: usize) -> _ {
   |                               ^ not allowed in type signatures
   |
help: replace with an appropriate return type
   |
LL - fn evens_squared(n: usize) -> _ {
LL + fn evens_squared(n: usize) -> impl Iterator<Item = usize> {
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:10
   |
LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
   |          ^ not allowed in type signatures
   |
note: however, the inferred type `Map<Filter<Range<i32>, {closure@typeck_type_placeholder_item.rs:240:29}>, {closure@typeck_type_placeholder_item.rs:240:49}>` cannot be named
  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:14
   |
LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:40:24
   |
LL |     fn test9(&self) -> _ { () }
   |                        ^ not allowed in type signatures
   |
help: replace with the correct return type
   |
LL -     fn test9(&self) -> _ { () }
LL +     fn test9(&self) -> () { () }
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:43:27
   |
LL |     fn test10(&self, _x : _) { }
   |                           ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:107:31
   |
LL |         fn fn_test9(&self) -> _ { () }
   |                               ^ not allowed in type signatures
   |
help: replace with the correct return type
   |
LL -         fn fn_test9(&self) -> _ { () }
LL +         fn fn_test9(&self) -> () { () }
   |

error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:110:34
   |
LL |         fn fn_test10(&self, _x : _) { }
   |                                  ^ not allowed in type signatures

error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:205:26
   |
---
   |
LL |     type F: std::ops::Fn(_);
   |                          ^ not allowed in type signatures
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:167:34
   |
LL | fn impl_trait() -> impl BadTrait<_> {
   |                                  ^ not allowed in type signatures
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:188:21
   |
LL | type Y = impl Trait<_>;
   |                     ^ not allowed in type signatures
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0015]: cannot call non-const function `map::<u8>` in constants
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:231:22
   |
LL | const _: Option<_> = map(value);
   |                      ^^^^^^^^^^
   |
note: function `map` is not const
  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:222:1
   |
LL | fn map<T>(_: fn() -> Option<&'static T>) -> Option<T> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants

error[E0015]: cannot call non-const method `<std::ops::Range<i32> as Iterator>::filter::<{closure@/checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:29: 240:32}>` in constants
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:22
   |
LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
   |                      ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants

error[E0015]: cannot call non-const method `<Filter<std::ops::Range<i32>, {closure@/checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:29: 240:32}> as Iterator>::map::<i32, {closure@/checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:49: 240:52}>` in constants
##[error]  --> /checkout/tests/ui/typeck/typeck_type_placeholder_item.rs:240:45
   |
LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
   |                                             ^^^^^^^^^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants

error: aborting due to 83 previous errors

@rust-bors rust-bors bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 7, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 7, 2026

PR #154609, which is a member of this rollup, was unapproved.

This rollup was thus unapproved.

@rust-bors rust-bors bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 7, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 7, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors try cancel

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 7, 2026

Try build cancelled. Cancelled workflows:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-search Area: Rustdoc's search feature rollup A PR which is a rollup 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.