Skip to content

Rollup of 15 pull requests#154953

Closed
JonathanBrouwer wants to merge 39 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-X55JDNG
Closed

Rollup of 15 pull requests#154953
JonathanBrouwer wants to merge 39 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-X55JDNG

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@JonathanBrouwer JonathanBrouwer commented Apr 7, 2026

Successful merges:

r? @ghost

Create a similar rollup

mati865 and others added 30 commits March 20, 2026 16:39
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.
These intrinsics don't technically need to be limited to a specific
architecture, they'll probably only make sense to use on AArch64,
but this just makes it harder to use them in stdarch where it is
appropriate (such as on `arm64ec`), requiring a rustc patch to land and
be on nightly before stdarch work can proceed - so just don't `cfg` them
at all.
…50921, r=notriddle,GuillaumeGomez

Fix no results when searching for == in doc

Fixes rust-lang#150921

r? @GuillaumeGomez
…ses, r=petrochenkov

Remove `TaggedQueryKey::def_kind`

This removes `TaggedQueryKey::def_kind` by accessing the relevant query keys directly.
Split out the creation of `Cycle` to a new `process_cycle` function

This splits out the creation of `CycleError` to a new `process_cycle` function. This makes it a bit clearer which operations are done for diagnostic purposes vs. what's needed to break cycles.
…petrochenkov

Do not attempt generating DllImport for extern types

Fixes rust-lang#154111
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
…, r=petrochenkov

delegation(small cleanup): remove not needed PhantomData

r? @petrochenkov
library: no `cfg(target_arch)` on scalable intrinsics

These intrinsics don't technically need to be limited to a specific architecture, they'll probably only make sense to use on AArch64, but this just makes it harder to use them in stdarch where it is appropriate (such as on `arm64ec`): requiring a rustc patch to land and be on nightly before stdarch work can proceed. So let's just not `cfg` them at all, they're perma-unstable anyway.

Fixes CI failure in rust-lang/stdarch#2071
@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-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-run-make Area: port run-make Makefiles to rmake.rs 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 b2437fe 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 b2437fe with merge 12e82a6

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

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

rust-bors bot pushed a commit that referenced this pull request Apr 7, 2026
Rollup of 15 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)
---- [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-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 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
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 7, 2026

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

This rollup was thus unapproved.

@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
@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)
##[endgroup]
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
PR_CI_JOB set; skipping tidy
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
---
---- [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

@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-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-run-make Area: port run-make Makefiles to rmake.rs 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.