Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more information to error message for unconstrained_parameter E0207 #115245

Closed
wants to merge 4 commits into from

Conversation

Lol3rrr
Copy link

@Lol3rrr Lol3rrr commented Aug 26, 2023

Fixes #107295 and also takes inspiration from a previously attempted PR #108252

@rustbot
Copy link
Collaborator

rustbot commented Aug 26, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jackh726 (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 26, 2023
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Lol3rrr Lol3rrr marked this pull request as ready for review August 26, 2023 14:07
@jackh726
Copy link
Member

I think the note here is not super helpful.

I would probably just start with the changes in #108252 and address the review comments there. Then I can review that!

@jackh726 jackh726 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 16, 2023
@Lol3rrr
Copy link
Author

Lol3rrr commented Sep 16, 2023

Should I directly transition to a structured error as mentioned in #108252 ?

@jackh726
Copy link
Member

Up to you :) happy to split it into parts

@Dylan-DPC
Copy link
Member

@jackh726 any updates?

@jackh726
Copy link
Member

This is waiting on @Lol3rrr to simplify to just the changes from #108252.

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=Lol3rrr
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_02a1a287-e52c-4f4f-acea-a8217c6aec9f
GITHUB_EVENT_NAME=pull_request
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=8b4803dd8a3f8822d5344d65a88cdec7dc22f216
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_02a1a287-e52c-4f4f-acea-a8217c6aec9f
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_02a1a287-e52c-4f4f-acea-a8217c6aec9f
GITHUB_TRIGGERING_ACTOR=Lol3rrr
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/115245/merge
GITHUB_WORKFLOW_SHA=8b4803dd8a3f8822d5344d65a88cdec7dc22f216
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64
---
Built container sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Looks like docker image is the same as before, not uploading
https://ci-caches.rust-lang.org/docker/7ebc15c01a233894034d277c8cce4e949f4e7791f66b4727c8fb6e058a0b8171d6152e1441d677cef0653843ceeee469c097b8699b2bb74249e674f6aa1a8813
sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-16]
##[group]Clock drift check
  local time: Wed Jan  3 17:49:29 UTC 2024
  network time: Wed, 03 Jan 2024 17:49:29 GMT
  network time: Wed, 03 Jan 2024 17:49:29 GMT
##[endgroup]
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-16', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-16/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: rust.codegen-units-std := 1
---
........................................................................................   528/16014
........................................................................................   616/16014
........................................................................................   704/16014
........................................................................................   792/16014
.................................................F......................................   880/16014
.................................................................F..F...................   968/16014
..........................................................................i.............  1144/16014
........................................................................................  1232/16014
........................................................................................  1320/16014
........................................................................................  1408/16014
---
.....................................................................................i..  2464/16014
........................................................................................  2552/16014
........................................................................................  2640/16014
........................................................................................  2728/16014
........................................................................F.F.............  2816/16014
........................................................................................  2992/16014
........................................................................................  3080/16014
............i...........................................................................  3168/16014
........................................................................................  3256/16014
---
........................................................................................  4928/16014
........................................................................................  5016/16014
......................................i.................................................  5104/16014
........................................................i...............................  5192/16014
............................................................................F.....F.....  5280/16014
................F.......................................................................  5368/16014
........................................................................................  5544/16014
........................................................................................  5632/16014
........................................................................................  5720/16014
........................................................................................  5808/16014
........................................................................................  5808/16014
.......................................................................F................  5896/16014
.........................................................F..............................  5984/16014
..........................................................................FF..F.........  6072/16014
........................................................................................  6248/16014
........................................................................................  6336/16014
........................................i..............i.i................iiiiii........  6424/16014
................................................................................i.......  6512/16014
---
........................................................................................ 14608/16014
........................................................................................ 14696/16014
........................................................................................ 14784/16014
........................................................................................ 14872/16014
...F..................................................................................F. 14960/16014
................................................................FF..F................... 15048/16014
.......................................................F............F................... 15136/16014
.................................................F...................................... 15312/16014
........................................................................................ 15400/16014
........................................................................................ 15488/16014
........................................................................................ 15576/16014
---
diff of stderr:

2   --> $DIR/unconstrained-impl-region.rs:13:6
3    |
4 LL | impl<'a> Actor for () {
-    |      ^^ unconstrained lifetime parameter
+    |      ^^ ------------- help: consider using the Parameter like ()<'a>: `()<'a>`
+    |      unconstrained lifetime parameter
6 
7 error: aborting due to 1 previous error
8 
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/async-await/in-trait/unconstrained-impl-region.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/async-await/in-trait/unconstrained-impl-region" "-A" "unused" "-A" "internal_features" "-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/async-await/in-trait/unconstrained-impl-region/auxiliary" "--edition=2021"
stdout: none
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
   |
   |
LL | impl<'a> Actor for () {
   |      ^^ ------------- help: consider using the Parameter like ()<'a>: `()<'a>`
   |      unconstrained lifetime parameter

error: aborting due to 1 previous error


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


---- [ui] tests/ui/async-await/issues/issue-78654.rs#full stdout ----
diff of stderr:

10 LL | impl<const H: feature> Foo {
12    |
12    |
-    = note: consider using const parameter `H` in the impl on `Foo` or otherwise constrain `H`
14    = note: expressions using a const parameter must map each value to a distinct output value
15    = note: proving the result of expressions other than the parameter are unique is not supported
+ help: consider using the Parameter like Foo<H>
+    |
+ LL | impl<const H: feature>Foo<H> {
+    |                       ~~~~~~
+ help: consider moving the const paramter `H` to one of the inner functions
+    |
+ LL - impl<const H: feature> Foo {
+ LL + impl<> Foo {
16 
17 error: aborting due to 2 previous errors
18 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/issues/issue-78654.full/issue-78654.full.stderr
To only update this specific test, also pass `--test-args async-await/issues/issue-78654.rs`


error in revision `full`: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/async-await/issues/issue-78654.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "full" "--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/async-await/issues/issue-78654.full" "-A" "unused" "-A" "internal_features" "-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/async-await/issues/issue-78654.full/auxiliary" "--edition=2018"
--- stderr -------------------------------
error[E0573]: expected type, found built-in attribute `feature`
##[error]  --> /checkout/tests/ui/async-await/issues/issue-78654.rs:9:15
   |
   |
LL | impl<const H: feature> Foo {


error[E0207]: the const parameter `H` is not constrained by the impl trait, self type, or predicates
   |
   |
LL | impl<const H: feature> Foo {
   |
   |
   = note: expressions using a const parameter must map each value to a distinct output value
   = note: proving the result of expressions other than the parameter are unique is not supported
help: consider using the Parameter like Foo<H>
   |
LL | impl<const H: feature>Foo<H> {
   |                       ~~~~~~
help: consider moving the const paramter `H` to one of the inner functions
   |
LL - impl<const H: feature> Foo {
LL + impl<> Foo {

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0207, E0573.
Some errors have detailed explanations: E0207, E0573.
For more information about an error, try `rustc --explain E0207`.
------------------------------------------


---- [ui] tests/ui/async-await/issues/issue-78654.rs#min stdout ----
diff of stderr:

10 LL | impl<const H: feature> Foo {
12    |
12    |
-    = note: consider using const parameter `H` in the impl on `Foo` or otherwise constrain `H`
14    = note: expressions using a const parameter must map each value to a distinct output value
15    = note: proving the result of expressions other than the parameter are unique is not supported
+ help: consider using the Parameter like Foo<H>
+    |
+ LL | impl<const H: feature>Foo<H> {
+    |                       ~~~~~~
+ help: consider moving the const paramter `H` to one of the inner functions
+    |
+ LL - impl<const H: feature> Foo {
+ LL + impl<> Foo {
16 
17 error: aborting due to 2 previous errors
18 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/issues/issue-78654.min/issue-78654.min.stderr
To only update this specific test, also pass `--test-args async-await/issues/issue-78654.rs`

error in revision `min`: 1 errors occurred comparing output.
status: exit status: 1
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/async-await/issues/issue-78654.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "min" "--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/async-await/issues/issue-78654.min" "-A" "unused" "-A" "internal_features" "-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/async-await/issues/issue-78654.min/auxiliary" "--edition=2018"
--- stderr -------------------------------
error[E0573]: expected type, found built-in attribute `feature`
##[error]  --> /checkout/tests/ui/async-await/issues/issue-78654.rs:9:15
   |
   |
LL | impl<const H: feature> Foo {


error[E0207]: the const parameter `H` is not constrained by the impl trait, self type, or predicates
   |
   |
LL | impl<const H: feature> Foo {
   |
   |
   = note: expressions using a const parameter must map each value to a distinct output value
   = note: proving the result of expressions other than the parameter are unique is not supported
help: consider using the Parameter like Foo<H>
   |
LL | impl<const H: feature>Foo<H> {
   |                       ~~~~~~
help: consider moving the const paramter `H` to one of the inner functions
   |
LL - impl<const H: feature> Foo {
LL + impl<> Foo {

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0207, E0573.
Some errors have detailed explanations: E0207, E0573.
For more information about an error, try `rustc --explain E0207`.
------------------------------------------


---- [ui] tests/ui/const-generics/issues/issue-68366.rs#full stdout ----
diff of stderr:

4 LL | impl <const N: usize> Collatz<{Some(N)}> {}
6    |
6    |
-    = note: consider using const parameter `N` in the impl on `Collatz<{Some(N)}>` or otherwise constrain `N`
8    = note: expressions using a const parameter must map each value to a distinct output value
9    = note: proving the result of expressions other than the parameter are unique is not supported
+ help: consider using the Parameter like Collatz<{Some(N)}, N>
+    |
+ LL | impl <const N: usize>Collatz<{Some(N)}, N>{Some(N)}> {}
+    |                      ~~~~~~~~~~~~~~~~~~~~~
+ help: consider moving the const paramter `N` to one of the inner functions
+    |
+ LL - impl <const N: usize> Collatz<{Some(N)}> {}
+ LL + impl <> Collatz<{Some(N)}> {}
10 
10 
11 error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates

14 LL | impl<const N: usize> Foo {}
15    |      ^^^^^^^^^^^^^^ unconstrained const parameter
16    |
16    |
-    = note: consider using const parameter `N` in the impl on `Foo` or otherwise constrain `N`
18    = note: expressions using a const parameter must map each value to a distinct output value
19    = note: proving the result of expressions other than the parameter are unique is not supported
+ help: consider using the Parameter like Foo<N>
+    |
+ LL | impl<const N: usize>Foo<N> {}
+    |                     ~~~~~~
+ help: consider moving the const paramter `N` to one of the inner functions
+    |
+ LL - impl<const N: usize> Foo {}
+ LL + impl<> Foo {}
20 
21 error: aborting due to 2 previous errors
22 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/issues/issue-68366.full/issue-68366.full.stderr
To only update this specific test, also pass `--test-args const-generics/issues/issue-68366.rs`


error in revision `full`: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/const-generics/issues/issue-68366.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "full" "--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/const-generics/issues/issue-68366.full" "-A" "unused" "-A" "internal_features" "-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/const-generics/issues/issue-68366.full/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates
   |
   |
LL | impl <const N: usize> Collatz<{Some(N)}> {}
   |
   |
   = note: expressions using a const parameter must map each value to a distinct output value
   = note: proving the result of expressions other than the parameter are unique is not supported
help: consider using the Parameter like Collatz<{Some(N)}, N>
   |
LL | impl <const N: usize>Collatz<{Some(N)}, N>{Some(N)}> {}
   |                      ~~~~~~~~~~~~~~~~~~~~~
help: consider moving the const paramter `N` to one of the inner functions
   |
LL - impl <const N: usize> Collatz<{Some(N)}> {}
LL + impl <> Collatz<{Some(N)}> {}


error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates
   |
LL | impl<const N: usize> Foo {}
   |      ^^^^^^^^^^^^^^ unconstrained const parameter
   |
   |
   = note: expressions using a const parameter must map each value to a distinct output value
   = note: proving the result of expressions other than the parameter are unique is not supported
help: consider using the Parameter like Foo<N>
   |
LL | impl<const N: usize>Foo<N> {}
   |                     ~~~~~~
help: consider moving the const paramter `N` to one of the inner functions
   |
LL - impl<const N: usize> Foo {}
LL + impl<> Foo {}

error: aborting due to 2 previous errors

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


---- [ui] tests/ui/const-generics/issues/issue-68366.rs#min stdout ----
diff of stderr:

13 LL | impl <const N: usize> Collatz<{Some(N)}> {}
15    |
15    |
-    = note: consider using const parameter `N` in the impl on `Collatz<{Some(N)}>` or otherwise constrain `N`
17    = note: expressions using a const parameter must map each value to a distinct output value
18    = note: proving the result of expressions other than the parameter are unique is not supported
+ help: consider using the Parameter like Collatz<{Some(N)}, N>
+    |
+ LL | impl <const N: usize>Collatz<{Some(N)}, N>{Some(N)}> {}
+    |                      ~~~~~~~~~~~~~~~~~~~~~
+ help: consider moving the const paramter `N` to one of the inner functions
+    |
+ LL - impl <const N: usize> Collatz<{Some(N)}> {}
+ LL + impl <> Collatz<{Some(N)}> {}
19 
19 
20 error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates

23 LL | impl<const N: usize> Foo {}
24    |      ^^^^^^^^^^^^^^ unconstrained const parameter
25    |
25    |
-    = note: consider using const parameter `N` in the impl on `Foo` or otherwise constrain `N`
27    = note: expressions using a const parameter must map each value to a distinct output value
28    = note: proving the result of expressions other than the parameter are unique is not supported
+ help: consider using the Parameter like Foo<N>
+    |
+ LL | impl<const N: usize>Foo<N> {}
+    |                     ~~~~~~
+ help: consider moving the const paramter `N` to one of the inner functions
+    |
+ LL - impl<const N: usize> Foo {}
+ LL + impl<> Foo {}
29 
30 error: aborting due to 3 previous errors
31 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/issues/issue-68366.min/issue-68366.min.stderr
To only update this specific test, also pass `--test-args const-generics/issues/issue-68366.rs`

error in revision `min`: 1 errors occurred comparing output.
status: exit status: 1
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/const-generics/issues/issue-68366.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "min" "--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/const-generics/issues/issue-68366.min" "-A" "unused" "-A" "internal_features" "-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/const-generics/issues/issue-68366.min/auxiliary"
--- stderr -------------------------------
error: generic parameters may not be used in const operations
##[error]  --> /checkout/tests/ui/const-generics/issues/issue-68366.rs:11:37
   |
   |
LL | impl <const N: usize> Collatz<{Some(N)}> {}
   |                                     ^ cannot perform const operation using `N`
   |
   = help: const parameters may only be used as standalone arguments, i.e. `N`
   = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates
   |
   |
LL | impl <const N: usize> Collatz<{Some(N)}> {}
   |
Build completed unsuccessfully in 0:13:28
Build completed unsuccessfully in 0:13:28
   = note: expressions using a const parameter must map each value to a distinct output value
   = note: proving the result of expressions other than the parameter are unique is not supported
help: consider using the Parameter like Collatz<{Some(N)}, N>
   |
LL | impl <const N: usize>Collatz<{Some(N)}, N>{Some(N)}> {}
   |                      ~~~~~~~~~~~~~~~~~~~~~
help: consider moving the const paramter `N` to one of the inner functions
   |
LL - impl <const N: usize> Collatz<{Some(N)}> {}
LL + impl <> Collatz<{Some(N)}> {}


error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates
   |
LL | impl<const N: usize> Foo {}
   |      ^^^^^^^^^^^^^^ unconstrained const parameter
   |
   |
   = note: expressions using a const parameter must map each value to a distinct output value
   = note: proving the result of expressions other than the parameter are unique is not supported
help: consider using the Parameter like Foo<N>
   |
LL | impl<const N: usize>Foo<N> {}
   |                     ~~~~~~
help: consider moving the const paramter `N` to one of the inner functions
   |
LL - impl<const N: usize> Foo {}
LL + impl<> Foo {}

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0207`.
---
11   --> $DIR/rustc-impl-const-stability.rs:15:6
12    |
13 LL | impl const Default for Data {
-    |      ^^^^^ unconstrained const parameter
+    |      ^^^^^                 - help: consider using the Parameter like Data<host>: `Data<host>`
+    |      unconstrained const parameter
15    |
15    |
-    = note: consider using const parameter `host` in the impl on `Data` or otherwise constrain `host`
17    = note: expressions using a const parameter must map each value to a distinct output value
18    = note: proving the result of expressions other than the parameter are unique is not supported


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/rustc-impl-const-stability/rustc-impl-const-stability.stderr
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/rustc-impl-const-stability.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/rustc-impl-const-stability" "-A" "unused" "-A" "internal_features" "-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/consts/rustc-impl-const-stability/auxiliary"
stdout: none
--- stderr -------------------------------
error: const `impl` for trait `Default` which is not marked with `#[const_trait]`
   |
LL | impl const Default for Data {
   |            ^^^^^^^
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change
error[E0207]: the const parameter `host` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/consts/rustc-impl-const-stability.rs:15:6
   |
LL | impl const Default for Data {
LL | impl const Default for Data {
   |      ^^^^^                 - help: consider using the Parameter like Data<host>: `Data<host>`
   |      unconstrained const parameter
   |
   |
   = note: expressions using a const parameter must map each value to a distinct output value
   = note: proving the result of expressions other than the parameter are unique is not supported
error: aborting due to 2 previous errors

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


---- [ui] tests/ui/duplicate/duplicate-type-parameter.rs stdout ----
diff of stderr:

58   --> $DIR/duplicate-type-parameter.rs:24:8
59    |
60 LL | impl<T,T> Qux<T,T> for Option<T> {}
-    |
-    |
-    = note: consider using type parameter `T` in the impl on `Option<T>` or otherwise constrain `T`
+    |        ^ ----------------------- help: consider using the Parameter like Option<T, T>: `Option<T, T>`
+    |        unconstrained type parameter
64 
65 error: aborting due to 8 previous errors
66 
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/duplicate/duplicate-type-parameter.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/duplicate/duplicate-type-parameter" "-A" "unused" "-A" "internal_features" "-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/duplicate/duplicate-type-parameter/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
   |
   |
LL | type Foo<T,T> = Option<T>;
   |          - ^ already used
   |          first use of `T`


error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
   |
   |
LL | struct Bar<T,T>(T);
   |            - ^ already used
   |            first use of `T`


error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
   |
   |
LL | struct Baz<T,T> {
   |            - ^ already used
   |            first use of `T`


error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
   |
   |
LL | enum Boo<T,T> {
   |          - ^ already used
   |          first use of `T`


error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
   |
   |
LL | fn quux<T,T>(x: T) {}
   |         - ^ already used
   |         first use of `T`


error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
   |
   |
LL | trait Qux<T,T> {}
   |           - ^ already used
   |           first use of `T`


error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
   |
   |
LL | impl<T,T> Qux<T,T> for Option<T> {}
   |      - ^ already used
   |      first use of `T`

error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/duplicate/duplicate-type-parameter.rs:24:8
##[error]  --> /checkout/tests/ui/duplicate/duplicate-type-parameter.rs:24:8
   |
LL | impl<T,T> Qux<T,T> for Option<T> {}
   |        ^ ----------------------- help: consider using the Parameter like Option<T, T>: `Option<T, T>`
   |        unconstrained type parameter

error: aborting due to 8 previous errors

---

4 LL | impl<T: Default> Foo {
5    |      ^ unconstrained type parameter
6    |
-    = note: consider using type parameter `T` in the impl on `Foo` or otherwise constrain `T`
+ help: consider using the Parameter like Foo<T>
+    |
+ LL | impl<T: Default>Foo<T> {
+    |                 ~~~~~~
+ help: consider moving the type paramter `T` to one of the inner functions
+    |
+ LL - impl<T: Default> Foo {
+ LL + impl<> Foo {
8 
9 error: aborting due to 1 previous error
10 

---
To only update this specific test, also pass `--test-args error-codes/E0207.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/error-codes/E0207.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/error-codes/E0207" "-A" "unused" "-A" "internal_features" "-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/error-codes/E0207/auxiliary"
--- stderr -------------------------------
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/error-codes/E0207.rs:3:6
   |
   |
LL | impl<T: Default> Foo { //~ ERROR E0207
   |
help: consider using the Parameter like Foo<T>
   |
   |
LL | impl<T: Default>Foo<T> { //~ ERROR E0207
   |                 ~~~~~~
help: consider moving the type paramter `T` to one of the inner functions
   |
LL - impl<T: Default> Foo { //~ ERROR E0207
LL + impl<> Foo { //~ ERROR E0207

error: aborting due to 1 previous error

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

1 error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
2   --> $DIR/issue-87735.rs:25:13
3    |
- LL | impl<'b, T, U> AsRef2 for Foo<T>
-    |
-    |
-    = note: consider using type parameter `U` in the impl on `Foo<T>` or otherwise constrain `U`
+ LL |   impl<'b, T, U> AsRef2 for Foo<T>
+    |  _____________^_-
+    | |             unconstrained type parameter
+ LL | | where
+ LL | | where
+ LL | |     // * `for<'b, 'c> T: AsRef2<Output<'b> = &'c [U]>>` does not work
+ LL | |     //
+ LL | |   }
+ LL | | }
+ LL | | }
+    | |_- help: consider using the Parameter like Foo<T, U>: `Foo<T, U>`
9 error: aborting due to 1 previous error
10 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/generic-associated-types/bugs/issue-87735/issue-87735.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args generic-associated-types/bugs/issue-87735.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/generic-associated-types/bugs/issue-87735.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/generic-associated-types/bugs/issue-87735" "-A" "unused" "-A" "internal_features" "-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/generic-associated-types/bugs/issue-87735/auxiliary"
--- stderr -------------------------------
error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/generic-associated-types/bugs/issue-87735.rs:25:13
   |
   |
LL |   impl<'b, T, U> AsRef2 for Foo<T>
   |  _____________^_-
   | |             unconstrained type parameter
LL | | where
LL | | where
LL | |     // * `for<'b, 'c> T: AsRef2<Output<'b> = &'c [U]>>` does not work
...  |
LL | |   }
LL | | }
LL | | }
   | |_- help: consider using the Parameter like Foo<T, U>: `Foo<T, U>`
error: aborting due to 1 previous error

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

1 error[E0207]: the type parameter `I` is not constrained by the impl trait, self type, or predicates
2   --> $DIR/issue-88526.rs:25:13
3    |
- LL | impl<'q, Q, I, F> A for TestB<Q, F>
-    |
-    |
-    = note: consider using type parameter `I` in the impl on `TestB<Q, F>` or otherwise constrain `I`
+ LL |   impl<'q, Q, I, F> A for TestB<Q, F>
+    |  _____________^____-
+    | |             unconstrained type parameter
+ LL | | where
+ LL | | where
+ LL | |     Q: A<I<'q> = &'q I>,
+ LL | |     F: Fn(I),
+ LL | | {
+ LL | |     type I<'a> = ();
+ LL | | }
+    | |_- help: consider using the Parameter like TestB<Q, F, I>: `TestB<Q, F, I>`
9 error: aborting due to 1 previous error
10 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/generic-associated-types/bugs/issue-88526/issue-88526.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args generic-associated-types/bugs/issue-88526.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/generic-associated-types/bugs/issue-88526.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/generic-associated-types/bugs/issue-88526" "-A" "unused" "-A" "internal_features" "-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/generic-associated-types/bugs/issue-88526/auxiliary"
--- stderr -------------------------------
error[E0207]: the type parameter `I` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/generic-associated-types/bugs/issue-88526.rs:25:13
   |
   |
LL |   impl<'q, Q, I, F> A for TestB<Q, F>
   |  _____________^____-
   | |             unconstrained type parameter
LL | | where
LL | | where
LL | |     Q: A<I<'q> = &'q I>,
LL | |     F: Fn(I),
LL | | {
LL | |     type I<'a> = ();
LL | | }
   | |_- help: consider using the Parameter like TestB<Q, F, I>: `TestB<Q, F, I>`
error: aborting due to 1 previous error

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


---- [ui] tests/ui/generic-associated-types/gat-trait-path-generic-type-arg.rs stdout ----
diff of stderr:

17   --> $DIR/gat-trait-path-generic-type-arg.rs:7:10
18    |
19 LL | impl <T, T1> Foo for T {
-    |
-    |
-    = note: consider using type parameter `T1` in the impl on `T` or otherwise constrain `T1`
+    |          ^^ ---------- help: consider using the Parameter like T<T1>: `T<T1>`
+    |          unconstrained type parameter
23 
24 error: aborting due to 3 previous errors
25 
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/generic-associated-types/gat-trait-path-generic-type-arg.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/generic-associated-types/gat-trait-path-generic-type-arg" "-A" "unused" "-A" "internal_features" "-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/generic-associated-types/gat-trait-path-generic-type-arg/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0403]: the name `T1` is already used for a generic parameter in this item's generic parameters
   |
   |
LL | impl <T, T1> Foo for T {
   |          -- first use of `T1`
LL |     //~^ ERROR: the type parameter `T1` is not constrained
LL |     type F<T1> = &[u8];
   |            ^^ already used

error[E0637]: `&` without an explicit lifetime name cannot be used here
   |
   |
LL |     type F<T1> = &[u8];
   |                  ^ explicit lifetime name needed here
error[E0207]: the type parameter `T1` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/generic-associated-types/gat-trait-path-generic-type-arg.rs:7:10
   |
   |
LL | impl <T, T1> Foo for T {
   |          ^^ ---------- help: consider using the Parameter like T<T1>: `T<T1>`
   |          unconstrained type parameter

error: aborting due to 3 previous errors

---
diff of stderr:

2   --> $DIR/unconstrained-lt.rs:5:6
3    |
4 LL | impl<'a, T> Foo for T {
-    |      ^^ unconstrained lifetime parameter
-    |
-    = note: consider using lifetime parameter `'a` in the impl on `T` or otherwise constrain `'a`
+    |      ^^    ---------- help: consider using the Parameter like T<'a>: `T<'a>`
+    |      unconstrained lifetime parameter
8 
9 error: aborting due to 1 previous error
10 
---
To only update this specific test, also pass `--test-args impl-trait/in-trait/unconstrained-lt.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/impl-trait/in-trait/unconstrained-lt.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/impl-trait/in-trait/unconstrained-lt" "-A" "unused" "-A" "internal_features" "-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/impl-trait/in-trait/unconstrained-lt/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
   |
   |
LL | impl<'a, T> Foo for T {
   |      ^^    ---------- help: consider using the Parameter like T<'a>: `T<'a>`
   |      unconstrained lifetime parameter

error: aborting due to 1 previous error

---
diff of stderr:

2   --> $DIR/issue-87340.rs:8:6
3    |
4 LL | impl<T> X for () {
-    |
-    |
-    = note: consider using type parameter `T` in the impl on `()` or otherwise constrain `T`
+    |      ^ --------- help: consider using the Parameter like ()<T>: `()<T>`
+    |      unconstrained type parameter
8 
9 error: aborting due to 1 previous error
10 
---
To only update this specific test, also pass `--test-args impl-trait/issues/issue-87340.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/impl-trait/issues/issue-87340.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/impl-trait/issues/issue-87340" "-A" "unused" "-A" "internal_features" "-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/impl-trait/issues/issue-87340/auxiliary"
--- stderr -------------------------------
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/impl-trait/issues/issue-87340.rs:8:6
   |
   |
LL | impl<T> X for () {
   |      ^ --------- help: consider using the Parameter like ()<T>: `()<T>`
   |      unconstrained type parameter

error: aborting due to 1 previous error

---
diff of stderr:

2   --> $DIR/impl-unused-rps-in-assoc-type.rs:11:6
3    |
4 LL | impl<'a> Fun for Holder {
-    |      ^^ unconstrained lifetime parameter
-    |
-    = note: consider using lifetime parameter `'a` in the impl on `Holder` or otherwise constrain `'a`
+    |      ^^ --------------- help: consider using the Parameter like Holder<'a>: `Holder<'a>`
+    |      unconstrained lifetime parameter
8 
9 error: aborting due to 1 previous error
10 
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/impl-unused-rps-in-assoc-type.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/impl-unused-rps-in-assoc-type" "-A" "unused" "-A" "internal_features" "-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/impl-unused-rps-in-assoc-type/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
   |
   |
LL | impl<'a> Fun for Holder { //~ ERROR E0207
   |      ^^ --------------- help: consider using the Parameter like Holder<'a>: `Holder<'a>`
   |      unconstrained lifetime parameter

error: aborting due to 1 previous error


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


---- [ui] tests/ui/impl-unused-tps-inherent.rs stdout ----
diff of stderr:

4 LL | impl<T> MyType {
6    |
6    |
-    = note: consider using type parameter `T` in the impl on `MyType` or otherwise constrain `T`
+ help: consider using the Parameter like MyType<T>
+    |
+ LL | impl<T>MyType<T> {
+    |        ~~~~~~~~~
+ help: consider moving the type paramter `T` to one of the inner functions
+    |
+ LL - impl<T> MyType {
+ LL + impl<> MyType {
8 
9 error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
10   --> $DIR/impl-unused-tps-inherent.rs:17:8


12 LL | impl<T,U> MyType1<T> {
14    |
14    |
-    = note: consider using type parameter `U` in the impl on `MyType1<T>` or otherwise constrain `U`
+ help: consider using the Parameter like MyType1<T, U>
+    |
+ LL | impl<T,U>MyType1<T, U> {
+    |          ~~~~~~~~~~~~~
+ help: consider moving the type paramter `U` to one of the inner functions
+    |
+ LL - impl<T,U> MyType1<T> {
+ LL + impl<T,> MyType1<T> {
16 
17 error: aborting due to 2 previous errors
18 

---
--- stderr -------------------------------
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/impl-unused-tps-inherent.rs:9:6
   |
LL | impl<T> MyType {
   |
   |
help: consider using the Parameter like MyType<T>
   |
LL | impl<T>MyType<T> {
   |        ~~~~~~~~~
help: consider moving the type paramter `T` to one of the inner functions
   |
LL - impl<T> MyType {
LL + impl<> MyType {

error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/impl-unused-tps-inherent.rs:17:8
   |
   |
LL | impl<T,U> MyType1<T> {
   |
   |
help: consider using the Parameter like MyType1<T, U>
   |
LL | impl<T,U>MyType1<T, U> {
   |          ~~~~~~~~~~~~~
help: consider moving the type paramter `U` to one of the inner functions
   |
LL - impl<T,U> MyType1<T> {
LL + impl<T,> MyType1<T> {

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0207`.
---
diff of stderr:

2   --> $DIR/impl-unused-tps.rs:15:8
3    |
4 LL | impl<T,U> Foo<T> for [isize;1] {
-    |
-    |
-    = note: consider using type parameter `U` in the impl on `[isize; 1]` or otherwise constrain `U`
+    |        ^ --------------------- help: consider using the Parameter like [isize; 1]<U>: `[isize; 1]<U>`
+    |        unconstrained type parameter
8 
9 error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
10   --> $DIR/impl-unused-tps.rs:31:8
10   --> $DIR/impl-unused-tps.rs:31:8

11    |
12 LL | impl<T,U> Bar for T {
-    |
-    |
-    = note: consider using type parameter `U` in the impl on `T` or otherwise constrain `U`
+    |        ^ ---------- help: consider using the Parameter like T<U>: `T<U>`
+    |        unconstrained type parameter
16 
17 error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
18   --> $DIR/impl-unused-tps.rs:39:8
18   --> $DIR/impl-unused-tps.rs:39:8

19    |
- LL | impl<T,U> Bar for T
-    |
-    |
-    = note: consider using type parameter `U` in the impl on `T` or otherwise constrain `U`
+ LL |   impl<T,U> Bar for T
+    |  ________^_-
+    | |        unconstrained type parameter
+    | |        unconstrained type parameter
+ LL | |     where T : Bar<Out=U>
+ LL | | {
+ LL | |
+ LL | |
+ LL | |     // This crafty self-referential attempt is still no good.
+ LL | | }
+    | |_- help: consider using the Parameter like T<U>: `T<U>`
25 error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
26   --> $DIR/impl-unused-tps.rs:47:8

27    |
27    |
- LL | impl<T,U,V> Foo<T> for T
-    |
-    |
-    = note: consider using type parameter `U` in the impl on `T` or otherwise constrain `U`
+ LL |   impl<T,U,V> Foo<T> for T
+    |  ________^___-
+    | |        unconstrained type parameter
+    | |        unconstrained type parameter
+ LL | |     where (T,U): Bar<Out=V>
+ LL | | {
+ LL | |
+ LL | |     // are not themselves constrained.
+ LL | | }
+ LL | | }
+    | |_- help: consider using the Parameter like T<U>: `T<U>`
32 
33 error[E0207]: the type parameter `V` is not constrained by the impl trait, self type, or predicates

35    |
35    |
- LL | impl<T,U,V> Foo<T> for T
-    |
-    |
-    = note: consider using type parameter `V` in the impl on `T` or otherwise constrain `V`
+ LL |   impl<T,U,V> Foo<T> for T
+    |  __________^_-
+    | |          unconstrained type parameter
+    | |          unconstrained type parameter
+ LL | |     where (T,U): Bar<Out=V>
+ LL | | {
+ LL | |
+ LL | |     // are not themselves constrained.
+ LL | | }
+ LL | | }
+    | |_- help: consider using the Parameter like T<V>: `T<V>`
40 
41 error[E0119]: conflicting implementations of trait `Foo<_>` for type `[isize; 0]`


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-unused-tps/impl-unused-tps.stderr
---
--- stderr -------------------------------
error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/impl-unused-tps.rs:15:8
   |
LL | impl<T,U> Foo<T> for [isize;1] {
   |        ^ --------------------- help: consider using the Parameter like [isize; 1]<U>: `[isize; 1]<U>`
   |        unconstrained type parameter

error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/impl-unused-tps.rs:31:8
##[error]  --> /checkout/tests/ui/impl-unused-tps.rs:31:8
   |
LL | impl<T,U> Bar for T {
   |        ^ ---------- help: consider using the Parameter like T<U>: `T<U>`
   |        unconstrained type parameter

error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/impl-unused-tps.rs:39:8
##[error]  --> /checkout/tests/ui/impl-unused-tps.rs:39:8
   |
LL |   impl<T,U> Bar for T
   |  ________^_-
   | |        unconstrained type parameter
   | |        unconstrained type parameter
LL | |     where T : Bar<Out=U>
LL | | {
LL | |     //~^^^ ERROR the type parameter `U` is not constrained
LL | |
LL | |     // This crafty self-referential attempt is still no good.
LL | | }
   | |_- help: consider using the Parameter like T<U>: `T<U>`
error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/impl-unused-tps.rs:47:8
   |
   |
LL |   impl<T,U,V> Foo<T> for T
   |  ________^___-
   | |        unconstrained type parameter
   | |        unconstrained type parameter
LL | |     where (T,U): Bar<Out=V>
LL | | {
LL | |     //~^^^ ERROR the type parameter `U` is not constrained
LL | |     // are not themselves constrained.
LL | | }
LL | | }
   | |_- help: consider using the Parameter like T<U>: `T<U>`

error[E0207]: the type parameter `V` is not constrained by the impl trait, self type, or predicates
   |
   |
LL |   impl<T,U,V> Foo<T> for T
   |  __________^_-
   | |          unconstrained type parameter
   | |          unconstrained type parameter
LL | |     where (T,U): Bar<Out=V>
LL | | {
LL | |     //~^^^ ERROR the type parameter `U` is not constrained
LL | |     // are not themselves constrained.
LL | | }
LL | | }
   | |_- help: consider using the Parameter like T<V>: `T<V>`

error[E0119]: conflicting implementations of trait `Foo<_>` for type `[isize; 0]`
   |
   |
LL | impl<T> Foo<T> for [isize;0] {
...
...
LL | impl<T,U> Foo<T> for U {
   | ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `[isize; 0]`

error[E0275]: overflow evaluating the requirement `([isize; 0], _): Sized`
   |
   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`impl_unused_tps`)
note: required for `([isize; 0], _)` to implement `Bar`
   |
   |
LL | impl<T,U> Bar for T {
   |      |
   |      unsatisfied trait bound introduced here
   = note: 126 redundant requirements hidden
   = note: 126 redundant requirements hidden
   = note: required for `([isize; 0], _)` to implement `Bar`
error: aborting due to 7 previous errors

Some errors have detailed explanations: E0119, E0207, E0275.
For more information about an error, try `rustc --explain E0119`.
---
diff of stderr:

2   --> $DIR/issue-16562.rs:10:6
3    |
4 LL | impl<T, M: MatrixShape> Collection for Col<M, usize> {
-    |
-    |
-    = note: consider using type parameter `T` in the impl on `Col<M, usize>` or otherwise constrain `T`
+    |      ^                 ----------------------------- help: consider using the Parameter like Col<M, usize, T>: `Col<M, usize, T>`
+    |      unconstrained type parameter
8 
9 error: aborting due to 1 previous error
10 
---
To only update this specific test, also pass `--test-args issues/issue-16562.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/issues/issue-16562.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/issues/issue-16562" "-A" "unused" "-A" "internal_features" "-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/issues/issue-16562/auxiliary"
--- stderr -------------------------------
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/issues/issue-16562.rs:10:6
   |
   |
LL | impl<T, M: MatrixShape> Collection for Col<M, usize> {
   |      ^                 ----------------------------- help: consider using the Parameter like Col<M, usize, T>: `Col<M, usize, T>`
   |      unconstrained type parameter

error: aborting due to 1 previous error

---
3    |
4 LL | impl<'a> Iterator for Newtype {
-    |      ^^ unconstrained lifetime parameter
-    |
-    = note: consider using lifetime parameter `'a` in the impl on `Newtype` or otherwise constrain `'a`
+    |      ^^ --------------------- help: consider using the Parameter like Newtype<'a>: `Newtype<'a>`
+    |      unconstrained lifetime parameter
8 
9 error: aborting due to 1 previous error
10 
---
To only update this specific test, also pass `--test-args issues/issue-22886.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/issues/issue-22886.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/issues/issue-22886" "-A" "unused" "-A" "internal_features" "-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/issues/issue-22886/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
   |
   |
LL | impl<'a> Iterator for Newtype { //~ ERROR E0207
   |      ^^ --------------------- help: consider using the Parameter like Newtype<'a>: `Newtype<'a>`
   |      unconstrained lifetime parameter

error: aborting due to 1 previous error


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


---- [ui] tests/ui/issues/issue-26262.rs stdout ----
diff of stderr:

4 LL | impl<T: Tr> S<T::Assoc> {
6    |
6    |
-    = note: consider using type parameter `T` in the impl on `S<<T as Tr>::Assoc>` or otherwise constrain `T`
+ help: consider using the Parameter like S<<T as Tr>::Assoc, T>
+    |
+ LL | impl<T: Tr>S<<T as Tr>::Assoc, T> {
+    |            ~~~~~~~~~~~~~~~~~~~~~~
+ help: consider moving the type paramter `T` to one of the inner functions
+    |
+ LL - impl<T: Tr> S<T::Assoc> {
+ LL + impl<> S<T::Assoc> {
8 
8 
9 error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates

11    |
11    |
12 LL | impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
-    |      ^^ unconstrained lifetime parameter
-    |
-    = note: consider using lifetime parameter `'a` in the impl on `T` or otherwise constrain `'a`
+    |      ^^              -------------------------------------- help: consider using the Parameter like T<'a>: `T<'a>`
+    |      unconstrained lifetime parameter
16 
17 error: aborting due to 2 previous errors
18 
---
To only update this specific test, also pass `--test-args issues/issue-26262.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/issues/issue-26262.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/issues/issue-26262" "-A" "unused" "-A" "internal_features" "-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/issues/issue-26262/auxiliary"
--- stderr -------------------------------
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/issues/issue-26262.rs:7:6
   |
   |
LL | impl<T: Tr> S<T::Assoc> {
   |
   |
help: consider using the Parameter like S<<T as Tr>::Assoc, T>
   |
LL | impl<T: Tr>S<<T as Tr>::Assoc, T> {
   |            ~~~~~~~~~~~~~~~~~~~~~~
help: consider moving the type paramter `T` to one of the inner functions
   |
LL - impl<T: Tr> S<T::Assoc> {
LL + impl<> S<T::Assoc> {


error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
   |
   |
LL | impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
   |      ^^              -------------------------------------- help: consider using the Parameter like T<'a>: `T<'a>`
   |      unconstrained lifetime parameter

error: aborting due to 2 previous errors

---
diff of stderr:

2   --> $DIR/issue-29861.rs:11:6
3    |
4 LL | impl<'a, T: 'a> MakeRef2 for T {
-    |      ^^ unconstrained lifetime parameter
-    |
-    = note: consider using lifetime parameter `'a` in the impl on `T` or otherwise constrain `'a`
+    |      ^^        --------------- help: consider using the Parameter like T<'a>: `T<'a>`
+    |      unconstrained lifetime parameter
8 
9 error: aborting due to 1 previous error
10 
---
To only update this specific test, also pass `--test-args issues/issue-29861.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/issues/issue-29861.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/issues/issue-29861" "-A" "unused" "-A" "internal_features" "-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/issues/issue-29861/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
   |
   |
LL | impl<'a, T: 'a> MakeRef2 for T {
   |      ^^        --------------- help: consider using the Parameter like T<'a>: `T<'a>`
   |      unconstrained lifetime parameter

error: aborting due to 1 previous error

---
diff of stderr:

2   --> $DIR/issue-35139.rs:9:6
3    |
4 LL | impl<'a> MethodType for MTFn {
-    |      ^^ unconstrained lifetime parameter
-    |
-    = note: consider using lifetime parameter `'a` in the impl on `MTFn` or otherwise constrain `'a`
+    |      ^^ -------------------- help: consider using the Parameter like MTFn<'a>: `MTFn<'a>`
+    |      unconstrained lifetime parameter
8 
9 error: aborting due to 1 previous error
10 
---
To only update this specific test, also pass `--test-args issues/issue-35139.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/issues/issue-35139.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/issues/issue-35139" "-A" "unused" "-A" "internal_features" "-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/issues/issue-35139/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
   |
   |
LL | impl<'a> MethodType for MTFn { //~ ERROR E0207
   |      ^^ -------------------- help: consider using the Parameter like MTFn<'a>: `MTFn<'a>`
   |      unconstrained lifetime parameter

error: aborting due to 1 previous error

---
20   --> $DIR/trait-default-body-stability.rs:18:6
21    |
22 LL | impl const Try for T {
-    |      ^^^^^ unconstrained const parameter
+    |      ^^^^^          - help: consider using the Parameter like T<host>: `T<host>`
+    |      unconstrained const parameter
24    |
24    |
25    = note: expressions using a const parameter must map each value to a distinct output value
26    = note: proving the result of expressions other than the parameter are unique is not supported
29   --> $DIR/trait-default-body-stability.rs:33:6
30    |
31 LL | impl const FromResidual for T {
-    |      ^^^^^ unconstrained const parameter
-    |      ^^^^^ unconstrained const parameter
+    |      ^^^^^                   - help: consider using the Parameter like T<host>: `T<host>`
+    |      unconstrained const parameter
33    |
33    |
34    = note: expressions using a const parameter must map each value to a distinct output value
35    = note: proving the result of expressions other than the parameter are unique is not supported

The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability/trait-default-body-stability.stderr
To update references, rerun the tests and pass the `--bless` flag
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args rfcs/rfc-2632-const-trait-impl/trait-default-body-stability.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability" "-A" "unused" "-A" "internal_features" "-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/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability/auxiliary"
stdout: none
--- stderr -------------------------------
error: const `impl` for trait `Try` which is not marked with `#[const_trait]`
   |
LL | impl const Try for T {
   |            ^^^
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change

error: const `impl` for trait `FromResidual` which is not marked with `#[const_trait]`
   |
LL | impl const FromResidual for T {
   |            ^^^^^^^^^^^^
   |
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change
error[E0207]: the const parameter `host` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability.rs:18:6
   |
LL | impl const Try for T {
LL | impl const Try for T {
   |      ^^^^^          - help: consider using the Parameter like T<host>: `T<host>`
   |      unconstrained const parameter
   |
   |
   = note: expressions using a const parameter must map each value to a distinct output value
   = note: proving the result of expressions other than the parameter are unique is not supported
error[E0207]: the const parameter `host` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-default-body-stability.rs:33:6
   |
LL | impl const FromResidual for T {
LL | impl const FromResidual for T {
   |      ^^^^^                   - help: consider using the Parameter like T<host>: `T<host>`
   |      unconstrained const parameter
   |
   |
   = note: expressions using a const parameter must map each value to a distinct output value
   = note: proving the result of expressions other than the parameter are unique is not supported
error: aborting due to 4 previous errors

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


---- [ui] tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs stdout ----
diff of stderr:

2   --> $DIR/assoc-type-lifetime-unconstrained.rs:17:6
3    |
4 LL | impl<'a, I> UnwrapItemsExt for I {
-    |      ^^ unconstrained lifetime parameter
-    |
-    = note: consider using lifetime parameter `'a` in the impl on `I` or otherwise constrain `'a`
+    |      ^^    --------------------- help: consider using the Parameter like I<'a>: `I<'a>`
+    |      unconstrained lifetime parameter
8 
9 error: aborting due to 1 previous error
10 
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/type-alias-impl-trait/assoc-type-lifetime-unconstrained" "-A" "unused" "-A" "internal_features" "-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/type-alias-impl-trait/assoc-type-lifetime-unconstrained/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
   |
   |
LL | impl<'a, I> UnwrapItemsExt for I {
   |      ^^    --------------------- help: consider using the Parameter like I<'a>: `I<'a>`
   |      unconstrained lifetime parameter

error: aborting due to 1 previous error

---
diff of stderr:

2   --> $DIR/impl-with-unconstrained-param.rs:11:6
3    |
4 LL | impl<T> X for () {
-    |
-    |
-    = note: consider using type parameter `T` in the impl on `()` or otherwise constrain `T`
+    |      ^ --------- help: consider using the Parameter like ()<T>: `()<T>`
+    |      unconstrained type parameter
8 
9 error: aborting due to 1 previous error
10 
---
--- stderr -------------------------------
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/impl-with-unconstrained-param.rs:11:6
   |
LL | impl<T> X for () {
   |      ^ --------- help: consider using the Parameter like ()<T>: `()<T>`
   |      unconstrained type parameter

error: aborting due to 1 previous error

---
diff of stderr:

2   --> $DIR/issue-74761-2.rs:7:6
3    |
4 LL | impl<'a, 'b> A for () {
-    |      ^^ unconstrained lifetime parameter
-    |
-    = note: consider using lifetime parameter `'a` in the impl on `()` or otherwise constrain `'a`
+    |      ^^     --------- help: consider using the Parameter like ()<'a>: `()<'a>`
+    |      unconstrained lifetime parameter
8 
8 
9 error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates

11    |
11    |
12 LL | impl<'a, 'b> A for () {
-    |          ^^ unconstrained lifetime parameter
-    |
-    = note: consider using lifetime parameter `'b` in the impl on `()` or otherwise constrain `'b`
+    |          ^^ --------- help: consider using the Parameter like ()<'b>: `()<'b>`
+    |          unconstrained lifetime parameter
16 
17 error: aborting due to 2 previous errors
18 
---
To only update this specific test, also pass `--test-args type-alias-impl-trait/issue-74761-2.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/type-alias-impl-trait/issue-74761-2.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/type-alias-impl-trait/issue-74761-2" "-A" "unused" "-A" "internal_features" "-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/type-alias-impl-trait/issue-74761-2/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
   |
   |
LL | impl<'a, 'b> A for () {
   |      ^^     --------- help: consider using the Parameter like ()<'a>: `()<'a>`
   |      unconstrained lifetime parameter


error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates
   |
   |
LL | impl<'a, 'b> A for () {
   |          ^^ --------- help: consider using the Parameter like ()<'b>: `()<'b>`
   |          unconstrained lifetime parameter

error: aborting due to 2 previous errors

---
diff of stderr:

2   --> $DIR/issue-74761.rs:7:6
3    |
4 LL | impl<'a, 'b> A for () {
-    |      ^^ unconstrained lifetime parameter
-    |
-    = note: consider using lifetime parameter `'a` in the impl on `()` or otherwise constrain `'a`
+    |      ^^     --------- help: consider using the Parameter like ()<'a>: `()<'a>`
+    |      unconstrained lifetime parameter
8 
8 
9 error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates

11    |
11    |
12 LL | impl<'a, 'b> A for () {
-    |          ^^ unconstrained lifetime parameter
-    |
-    = note: consider using lifetime parameter `'b` in the impl on `()` or otherwise constrain `'b`
+    |          ^^ --------- help: consider using the Parameter like ()<'b>: `()<'b>`
+    |          unconstrained lifetime parameter
16 
17 error: aborting due to 2 previous errors
18 
---
To only update this specific test, also pass `--test-args type-alias-impl-trait/issue-74761.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/type-alias-impl-trait/issue-74761.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/type-alias-impl-trait/issue-74761" "-A" "unused" "-A" "internal_features" "-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/type-alias-impl-trait/issue-74761/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
   |
   |
LL | impl<'a, 'b> A for () {
   |      ^^     --------- help: consider using the Parameter like ()<'a>: `()<'a>`
   |      unconstrained lifetime parameter


error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates
   |
   |
LL | impl<'a, 'b> A for () {
   |          ^^ --------- help: consider using the Parameter like ()<'b>: `()<'b>`
   |          unconstrained lifetime parameter

error: aborting due to 2 previous errors

---
3    |
4 LL | impl<T> Allocator for DefaultAllocator {
-    |      ^ unconstrained type parameter
-    |
-    = note: consider using type parameter `T` in the impl on `DefaultAllocator` or otherwise constrain `T`
+    |      ^ ------------------------------- help: consider using the Parameter like DefaultAllocator<T>: `DefaultAllocator<T>`
+    |      unconstrained type parameter
8 
9 error: aborting due to 1 previous error
10 
---
To only update this specific test, also pass `--test-args type-alias-impl-trait/issue-74244.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/type-alias-impl-trait/issue-74244.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/type-alias-impl-trait/issue-74244" "-A" "unused" "-A" "internal_features" "-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/type-alias-impl-trait/issue-74244/auxiliary"
--- stderr -------------------------------
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/issue-74244.rs:9:6
   |
   |
LL | impl<T> Allocator for DefaultAllocator {
   |      ^ ------------------------------- help: consider using the Parameter like DefaultAllocator<T>: `DefaultAllocator<T>`
   |      unconstrained type parameter

error: aborting due to 1 previous error

---
diff of stderr:

2   --> $DIR/type-alias-impl-trait-unconstrained-lifetime.rs:10:6
3    |
4 LL | impl<'a, I: Iterator<Item = i32>> Trait for (i32, I) {
-    |      ^^ unconstrained lifetime parameter
-    |
-    = note: consider using lifetime parameter `'a` in the impl on `(i32, I)` or otherwise constrain `'a`
+    |      ^^                         -------------------- help: consider using the Parameter like (i32, I)<'a>: `(i32, I)<'a>`
+    |      unconstrained lifetime parameter
8 
9 error: aborting due to 1 previous error
10 
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime" "-A" "unused" "-A" "internal_features" "-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/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
   |
   |
LL | impl<'a, I: Iterator<Item = i32>> Trait for (i32, I) {
   |      ^^                         -------------------- help: consider using the Parameter like (i32, I)<'a>: `(i32, I)<'a>`
   |      unconstrained lifetime parameter

error: aborting due to 1 previous error

---
diff of stderr:

2   --> $DIR/unconstrained-impl-param.rs:11:6
3    |
4 LL | impl<'a> Trait for Opaque<&'a str> {
-    |      ^^ unconstrained lifetime parameter
-    |
-    = note: consider using lifetime parameter `'a` in the impl on `Opaque<&'a str>` or otherwise constrain `'a`
+    |      ^^ -------------------------- help: consider using the Parameter like Opaque<&'a str, 'a>: `Opaque<&'a str, 'a>`
+    |      unconstrained lifetime parameter
8 
9 error: aborting due to 1 previous error
10 
10 


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/unconstrained-impl-param/unconstrained-impl-param.stderr
To only update this specific test, also pass `--test-args type-alias-impl-trait/unconstrained-impl-param.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/type-alias-impl-trait/unconstrained-impl-param.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/type-alias-impl-trait/unconstrained-impl-param" "-A" "unused" "-A" "internal_features" "-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/type-alias-impl-trait/unconstrained-impl-param/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
   |
   |
LL | impl<'a> Trait for Opaque<&'a str> {
   |      ^^ -------------------------- help: consider using the Parameter like Opaque<&'a str, 'a>: `Opaque<&'a str, 'a>`
   |      unconstrained lifetime parameter

error: aborting due to 1 previous error

---
diff of stderr:

2   --> $DIR/issue-13853-5.rs:7:10
3    |
4 LL | impl<'a, T: Deserializable> Deserializable for &'a str {
-    |
-    |
-    = note: consider using type parameter `T` in the impl on `&'a str` or otherwise constrain `T`
+    |          ^                 --------------------------- help: consider using the Parameter like &'a str<T>: `&'a str<T>`
+    |          unconstrained type parameter
8 
9 error: aborting due to 1 previous error
10 
---
To only update this specific test, also pass `--test-args typeck/issue-13853-5.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/typeck/issue-13853-5.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" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--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/issue-13853-5" "-A" "unused" "-A" "internal_features" "-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/typeck/issue-13853-5/auxiliary"
--- stderr -------------------------------
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/typeck/issue-13853-5.rs:7:10
   |
   |
LL | impl<'a, T: Deserializable> Deserializable for &'a str {
   |          ^                 --------------------------- help: consider using the Parameter like &'a str<T>: `&'a str<T>`
   |          unconstrained type parameter

error: aborting due to 1 previous error

@Lol3rrr
Copy link
Author

Lol3rrr commented Jan 3, 2024

Sorry for the delay, I am now starting to pick this issue up again.
I am currently just playing around with some ideas on how a good error message could look like and how I might implement them, as working on the compiler is new to me.

If there are some more concrete ideas / examples on how the error should look exactly, I am happy to hear them as the discussion on the previous PR was not very conclusive (i think) and mentions a variety of ideas and potential things

@bors
Copy link
Contributor

bors commented Jan 10, 2024

☔ The latest upstream changes (presumably #119751) made this pull request unmergeable. Please resolve the merge conflicts.

@jackh726
Copy link
Member

Thinking about this more, I wonder if it's worth distinguishing unused vs unconstrained here? Completely unused is easy (just remove), but unconstrained is harder (because it may still be used, and we don't know the best way to fix it, see #64155 for an example).

@jackh726
Copy link
Member

In the unused case, we can suggest removing (with suggested change). In the unconstrained case, we can just note the requirements to make it constrained.

@Dylan-DPC
Copy link
Member

@Lol3rrr any updates on this? thanks

@JohnCSimon
Copy link
Member

@Lol3rrr

Ping from triage: I'm closing this due to inactivity, Please reopen when you are ready to continue with this.
Note: if you are going to continue please open the PR BEFORE you push to it, else you won't be able to reopen - this is a quirk of github.
Thanks for your contribution.

@rustbot label: +S-inactive

@JohnCSimon JohnCSimon closed this Apr 14, 2024
@rustbot rustbot added the S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. label Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unconstrained type parameter makes no suggestions as to how to fix
7 participants