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

Suggest how to fix with unconstrained type parameters #134270

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kei519
Copy link
Contributor

@kei519 kei519 commented Dec 13, 2024

Unconstrained type parameters made no suggestion and it makes difficult to know how to fix (#107295).

To make fixing easier, we output suggestions how to fix.

close #107295

@rustbot
Copy link
Collaborator

rustbot commented Dec 13, 2024

r? @cjgillot

rustbot has assigned @cjgillot.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Dec 13, 2024
@rust-log-analyzer

This comment has been minimized.

@kei519 kei519 marked this pull request as ready for review December 22, 2024 15:38
@rust-log-analyzer

This comment has been minimized.

@kei519 kei519 changed the title WIP: suggest how to fix with unconstrained type parameters Suggest how to fix with unconstrained type parameters Dec 23, 2024
@bors
Copy link
Contributor

bors commented Jan 4, 2025

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

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jan 6, 2025

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

Comment on lines 251 to 257
let node = tcx.hir().get_if_local(impl_def_id.into()).expect("cannot get `Node`");
let hir_impl = if let rustc_hir::Node::Item(item) = node {
if let rustc_hir::ItemKind::Impl(imp) = item.kind { Some(imp) } else { None }
} else {
None
}
.expect("cannot take `Impl` in a impl block");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let node = tcx.hir().get_if_local(impl_def_id.into()).expect("cannot get `Node`");
let hir_impl = if let rustc_hir::Node::Item(item) = node {
if let rustc_hir::ItemKind::Impl(imp) = item.kind { Some(imp) } else { None }
} else {
None
}
.expect("cannot take `Impl` in a impl block");
let node = tcx.hir_node_by_def_id(impl_def_id);
let hir_impl = node.expect_item().expect_impl();

.iter()
.enumerate()
.find(|(_, par)| par.name.ident().name == param.name)
.unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you avoid unwrapping here? We may get very weird stuff in diagnostic code.

.params
.iter()
.enumerate()
.find(|(_, par)| par.name.ident().name == param.name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This identifies by parameter name, which is ambiguous due to hygiene. This should perhaps identify using par.def_id and param.def_id.

Comment on lines 277 to 304
if let Some(prev) = hir_impl.generics.params[..index].iter().rfind(is_impl_generic) {
let mut span = prev.span;

// Consider the span of the bounds with the generic parameter when there is.
if let Some(predicate) = hir_impl.generics.predicates.iter().find(|pred| {
if let WherePredicateKind::BoundPredicate(WhereBoundPredicate {
origin: PredicateOrigin::GenericParam,
bounded_ty,
..
}) = pred.kind
{
bounded_ty.span == prev.span
} else {
false
}
}) {
span = span.to(predicate.span)
};

span.shrink_to_hi().to(hir_param.span)
} else if let Some(next) =
hir_impl.generics.params[index + 1..].iter().find(is_impl_generic)
{
hir_param.span.until(next.span)
} else {
// Remove also angle brackets <> when there is just ONE generic parameter.
hir_impl.generics.span
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind making all this a method on Generics? For instance fn span_for_param_removal(&self, param: usize) -> Span.

Comment on lines +12 to +13
LL | unsafe impl<Q: Trait> Send for Inner<Q> {}
| +++
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really convinced that suggesting to use Q in some path is the right solution. Inner takes no generic params, so the suggestion is wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To do this, we must know the ty::Ty for self_ty (e.g. Inner here). Is there any way to get it?

help: either remove the type parameter T, or make use of it, for example
|
LL - impl<T: Tr> S<T::Assoc> {
LL + impl S<T::Assoc> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case is more subtle. We should not suggest to remove T if it appears somewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like avoidable, but only we can do is to compare symbols of generics parameters and, bounds of them and generics of the type. Is it acceptable, or do you know better ways?

@cjgillot cjgillot 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 Jan 8, 2025
Unconstrained type parameters made no suggestion and it makes difficult
to know how to fix (rust-lang#107295).

To make fixing easier, we output suggestions how to fix.
@kei519 kei519 marked this pull request as draft January 12, 2025 12:50
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
#22 exporting to docker image format
#22 sending tarball 27.6s done
#22 DONE 33.4s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-18]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
---- [ui] tests/ui/associated-types/issue-26262.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/associated-types/issue-26262/issue-26262.stderr"
diff of stderr:

26 LL | impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T<'a> {
28 
- error: aborting due to 2 previous errors
+ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+   --> $DIR/issue-26262.rs:17:6
+   --> $DIR/issue-26262.rs:17:6
+    |
+ LL | impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
+    |
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
+ LL + impl<T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
+    |
+ LL | impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T<'a> {
+ 
+ error: aborting due to 3 previous errors
30 
31 For more information about this error, try `rustc --explain E0207`.
31 For more information about this error, try `rustc --explain E0207`.
32 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/associated-types/issue-26262.rs:17:6
+ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+   --> $DIR/issue-26262.rs:17:6
+    |
+ LL | impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
+    |
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
+ LL + impl<T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
+    |
+ LL | impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T<'a> {
+ 
+ error: aborting due to 3 previous errors



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args associated-types/issue-26262.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/associated-types/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" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/associated-types/issue-26262" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/associated-types/issue-26262.rs:7:6
   |
   |
LL | impl<T: Tr> S<T::Assoc> {
   |
   |
help: either remove the type parameter T, or make use of it, for example
   |
LL - impl<T: Tr> S<T::Assoc> {
LL + impl S<T::Assoc> {
   |
LL | impl<T: Tr> S<T::Assoc, T> {

error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/associated-types/issue-26262.rs:17:6
   |
   |
LL | impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
   |
   |
help: either remove the type parameter 'a, or make use of it, for example
   |
LL - impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
LL + impl<T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
   |
LL | impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T<'a> {

error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/associated-types/issue-26262.rs:17:6
   |
   |
LL | impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
   |
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: either remove the type parameter 'a, or make use of it, for example
   |
LL - impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
LL + impl<T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T {
   |
LL | impl<'a,T: Trait2<'a>> Trait1<<T as Trait2<'a>>::Foo> for T<'a> {

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0207`.
---
+    |
+ LL | impl<'a> Actor for () {
+    |      ^^ unconstrained lifetime parameter
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a> Actor for () {
+ LL + impl Actor for () {
+ 
+ error: aborting due to 2 previous errors
14 
15 For more information about this error, try `rustc --explain E0207`.
---
+    |
+ LL | impl<'a> Actor for () {
+    |      ^^ unconstrained lifetime parameter
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a> Actor for () {
+ LL + impl Actor for () {
+ 
+ error: aborting due to 2 previous errors



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args async-await/in-trait/unconstrained-impl-region.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/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" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/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" "--edition=2021"
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/async-await/in-trait/unconstrained-impl-region.rs:13:6
   |
   |
LL | impl<'a> Actor for () {
   |      ^^ unconstrained lifetime parameter
   |
help: either remove the type parameter 'a, or make use of it, for example
LL - impl<'a> Actor for () {
LL + impl Actor for () {
   |


error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/async-await/in-trait/unconstrained-impl-region.rs:13:6
   |
LL | impl<'a> Actor for () {
   |      ^^ unconstrained lifetime parameter
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: either remove the type parameter 'a, or make use of it, for example
LL - impl<'a> Actor for () {
LL + impl Actor for () {
   |

---
+    |
+ LL | impl<'a, T> Foo for T {
+    |      ^^ unconstrained lifetime parameter
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+ LL - impl<'a, T> Foo for T {
+ LL + impl<T> Foo for T {
+    |
+    |
+ LL | impl<'a, T> Foo for T<'a> {
+ 
+ error: aborting due to 2 previous errors
16 
17 For more information about this error, try `rustc --explain E0207`.
---
+    |
+ LL | impl<'a, T> Foo for T {
+    |      ^^ unconstrained lifetime parameter
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+ LL - impl<'a, T> Foo for T {
+ LL + impl<T> Foo for T {
+    |
+    |
+ LL | impl<'a, T> Foo for T<'a> {
+ 
+ error: aborting due to 2 previous errors



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args impl-trait/in-trait/unconstrained-lt.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/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" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/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"
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/impl-trait/in-trait/unconstrained-lt.rs:5:6
   |
   |
LL | impl<'a, T> Foo for T {
   |      ^^ unconstrained lifetime parameter
   |
help: either remove the type parameter 'a, or make use of it, for example
LL - impl<'a, T> Foo for T {
LL + impl<T> Foo for T {
   |
LL | impl<'a, T> Foo for T<'a> {
---
   |
LL | impl<'a, T> Foo for T {
   |      ^^ unconstrained lifetime parameter
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: either remove the type parameter 'a, or make use of it, for example
LL - impl<'a, T> Foo for T {
LL + impl<T> Foo for T {
   |
LL | impl<'a, T> Foo for T<'a> {
---
---- [ui] tests/ui/impl-unused-rps-in-assoc-type.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-unused-rps-in-assoc-type/impl-unused-rps-in-assoc-type.stderr"
diff of stderr:

12 LL | impl<'a> Fun for Holder<'a> {
14 
- error: aborting due to 1 previous error
+ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+   --> $DIR/impl-unused-rps-in-assoc-type.rs:11:6
+   --> $DIR/impl-unused-rps-in-assoc-type.rs:11:6
+    |
+ LL | impl<'a> Fun for Holder {
+    |
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a> Fun for Holder {
+ LL + impl Fun for Holder {
+    |
+ LL | impl<'a> Fun for Holder<'a> {
+ 
+ error: aborting due to 2 previous errors
16 
17 For more information about this error, try `rustc --explain E0207`.
17 For more information about this error, try `rustc --explain E0207`.
18 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/impl-unused-rps-in-assoc-type.rs:11:6
- LL | impl<'a> Fun for Holder { //~ ERROR E0207
- LL - impl<'a> Fun for Holder { //~ ERROR E0207
- LL + impl Fun for Holder { //~ ERROR E0207
- LL | impl<'a> Fun for Holder<'a> { //~ ERROR E0207
+ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+    |
+    |
+ LL | impl<'a> Fun for Holder {
+    |
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a> Fun for Holder {
+ LL + impl Fun for Holder {
+    |
+ LL | impl<'a> Fun for Holder<'a> {
+ 
+ error: aborting due to 2 previous errors



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args impl-unused-rps-in-assoc-type.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/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" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/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"
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/impl-unused-rps-in-assoc-type.rs:11:6
   |
   |
LL | impl<'a> Fun for Holder { //~ ERROR E0207
   |
   |
help: either remove the type parameter 'a, or make use of it, for example
   |
LL - impl<'a> Fun for Holder { //~ ERROR E0207
LL + impl Fun for Holder { //~ ERROR E0207
   |
LL | impl<'a> Fun for Holder<'a> { //~ ERROR E0207

error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/impl-unused-rps-in-assoc-type.rs:11:6
   |
   |
LL | impl<'a> Fun for Holder { //~ ERROR E0207
   |
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: either remove the type parameter 'a, or make use of it, for example
   |
LL - impl<'a> Fun for Holder { //~ ERROR E0207
LL + impl Fun for Holder { //~ ERROR E0207
   |
LL | impl<'a> Fun for Holder<'a> { //~ ERROR E0207

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0207`.
---
+    |
+ LL | impl<'a> Iterator for Newtype {
+    |      ^^ unconstrained lifetime parameter
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+ LL - impl<'a> Iterator for Newtype {
+ LL + impl Iterator for Newtype {
+    |
+ LL | impl<'a> Iterator for Newtype<'a> {
---
18 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/issues/issue-22886.rs:13:6
- LL | impl<'a> Iterator for Newtype { //~ ERROR E0207
- LL - impl<'a> Iterator for Newtype { //~ ERROR E0207
- LL + impl Iterator for Newtype { //~ ERROR E0207
- LL | impl<'a> Iterator for Newtype<'a> { //~ ERROR E0207
+ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+    |
+ LL | impl<'a> Iterator for Newtype {
+    |      ^^ unconstrained lifetime parameter
+    |
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+ LL - impl<'a> Iterator for Newtype {
+ LL + impl Iterator for Newtype {
+    |
+ LL | impl<'a> Iterator for Newtype<'a> {
---
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: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/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" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-22886" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/issues/issue-22886.rs:13:6
   |
   |
LL | impl<'a> Iterator for Newtype { //~ ERROR E0207
   |
   |
help: either remove the type parameter 'a, or make use of it, for example
   |
LL - impl<'a> Iterator for Newtype { //~ ERROR E0207
LL + impl Iterator for Newtype { //~ ERROR E0207
   |
LL | impl<'a> Iterator for Newtype<'a> { //~ ERROR E0207

error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/issues/issue-22886.rs:13:6
   |
   |
LL | impl<'a> Iterator for Newtype { //~ ERROR E0207
   |
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: either remove the type parameter 'a, or make use of it, for example
   |
LL - impl<'a> Iterator for Newtype { //~ ERROR E0207
LL + impl Iterator for Newtype { //~ ERROR E0207
   |
LL | impl<'a> Iterator for Newtype<'a> { //~ ERROR E0207

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/issues/issue-29861.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-29861/issue-29861.stderr"
diff of stderr:

12 LL | impl<'a, T: 'a> MakeRef2 for T<'a> {
14 
+ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+   --> $DIR/issue-29861.rs:11:6
+    |
+    |
+ LL | impl<'a, T: 'a> MakeRef2 for T {
+    |
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a, T: 'a> MakeRef2 for T {
+ LL + impl<T: 'a> MakeRef2 for T {
+    |
+ LL | impl<'a, T: 'a> MakeRef2 for T<'a> {
+ 
15 error[E0716]: temporary value dropped while borrowed
16   --> $DIR/issue-29861.rs:16:43
17    |
---
-   --> /checkout/tests/ui/issues/issue-29861.rs:11:6
+ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+   --> $DIR/issue-29861.rs:11:6
+    |
+ LL | impl<'a, T: 'a> MakeRef2 for T {
+    |
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a, T: 'a> MakeRef2 for T {
+ LL + impl<T: 'a> MakeRef2 for T {
+    |
+ LL | impl<'a, T: 'a> MakeRef2 for T<'a> {
+ 
+ error: aborting due to 3 previous errors



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args issues/issue-29861.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/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" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-29861" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/issues/issue-29861.rs:11:6
   |
   |
LL | impl<'a, T: 'a> MakeRef2 for T {
   |
   |
help: either remove the type parameter 'a, or make use of it, for example
   |
LL - impl<'a, T: 'a> MakeRef2 for T {
LL + impl<T: 'a> MakeRef2 for T {
   |
LL | impl<'a, T: 'a> MakeRef2 for T<'a> {

error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/issues/issue-29861.rs:11:6
   |
   |
LL | impl<'a, T: 'a> MakeRef2 for T {
   |
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: either remove the type parameter 'a, or make use of it, for example
   |
LL - impl<'a, T: 'a> MakeRef2 for T {
LL + impl<T: 'a> MakeRef2 for T {
   |
LL | impl<'a, T: 'a> MakeRef2 for T<'a> {

error[E0716]: temporary value dropped while borrowed
##[error]  --> /checkout/tests/ui/issues/issue-29861.rs:16:43
   |
   |
LL | fn foo() -> <String as MakeRef2>::Ref2 { &String::from("foo") }
   |                                           |                   |
   |                                           |                   temporary value is freed at the end of this statement
   |                                           creates a temporary value which is freed while still in use
   |
---
---- [ui] tests/ui/issues/issue-35139.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-35139/issue-35139.stderr"
diff of stderr:

12 LL | impl<'a> MethodType for MTFn<'a> {
14 
- error: aborting due to 1 previous error
+ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+   --> $DIR/issue-35139.rs:9:6
+   --> $DIR/issue-35139.rs:9:6
+    |
+ LL | impl<'a> MethodType for MTFn {
+    |
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a> MethodType for MTFn {
+ LL + impl MethodType for MTFn {
+    |
+ LL | impl<'a> MethodType for MTFn<'a> {
+ 
+ error: aborting due to 2 previous errors
16 
17 For more information about this error, try `rustc --explain E0207`.
17 For more information about this error, try `rustc --explain E0207`.
18 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/issues/issue-35139.rs:9:6
- LL | impl<'a> MethodType for MTFn { //~ ERROR E0207
- LL - impl<'a> MethodType for MTFn { //~ ERROR E0207
- LL + impl MethodType for MTFn { //~ ERROR E0207
- LL | impl<'a> MethodType for MTFn<'a> { //~ ERROR E0207
+ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+    |
+    |
+ LL | impl<'a> MethodType for MTFn {
+    |
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a> MethodType for MTFn {
+ LL + impl MethodType for MTFn {
+    |
+ LL | impl<'a> MethodType for MTFn<'a> {
+ 
+ error: aborting due to 2 previous errors



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args issues/issue-35139.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/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" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-35139" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/issues/issue-35139.rs:9:6
   |
   |
LL | impl<'a> MethodType for MTFn { //~ ERROR E0207
   |
   |
help: either remove the type parameter 'a, or make use of it, for example
   |
LL - impl<'a> MethodType for MTFn { //~ ERROR E0207
LL + impl MethodType for MTFn { //~ ERROR E0207
   |
LL | impl<'a> MethodType for MTFn<'a> { //~ ERROR E0207

error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/issues/issue-35139.rs:9:6
   |
   |
LL | impl<'a> MethodType for MTFn { //~ ERROR E0207
   |
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: either remove the type parameter 'a, or make use of it, for example
   |
LL - impl<'a> MethodType for MTFn { //~ ERROR E0207
LL + impl MethodType for MTFn { //~ ERROR E0207
   |
LL | impl<'a> MethodType for MTFn<'a> { //~ ERROR E0207

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/type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained/assoc-type-lifetime-unconstrained.stderr"
diff of stderr:

12 LL | impl<'a, I> UnwrapItemsExt for I<'a> {
14 
+ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+   --> $DIR/assoc-type-lifetime-unconstrained.rs:17:6
+    |
+    |
+ LL | impl<'a, I> UnwrapItemsExt for I {
+    |
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a, I> UnwrapItemsExt for I {
+ LL + impl<I> UnwrapItemsExt for I {
+    |
+ LL | impl<'a, I> UnwrapItemsExt for I<'a> {
+ 
15 error[E0792]: expected generic lifetime parameter, found `'_`
16   --> $DIR/assoc-type-lifetime-unconstrained.rs:22:9
17    |
---
-   --> /checkout/tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs:17:6
+ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+   --> $DIR/assoc-type-lifetime-unconstrained.rs:17:6
+    |
+ LL | impl<'a, I> UnwrapItemsExt for I {
+    |
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a, I> UnwrapItemsExt for I {
+ LL + impl<I> UnwrapItemsExt for I {
+    |
+ LL | impl<'a, I> UnwrapItemsExt for I<'a> {
+ 
+ error: aborting due to 3 previous errors



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/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" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/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"
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs:17:6
   |
   |
LL | impl<'a, I> UnwrapItemsExt for I {
   |
   |
help: either remove the type parameter 'a, or make use of it, for example
   |
LL - impl<'a, I> UnwrapItemsExt for I {
LL + impl<I> UnwrapItemsExt for I {
   |
LL | impl<'a, I> UnwrapItemsExt for I<'a> {

error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs:17:6
   |
   |
LL | impl<'a, I> UnwrapItemsExt for I {
   |
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: either remove the type parameter 'a, or make use of it, for example
   |
LL - impl<'a, I> UnwrapItemsExt for I {
LL + impl<I> UnwrapItemsExt for I {
   |
LL | impl<'a, I> UnwrapItemsExt for I<'a> {

error[E0792]: expected generic lifetime parameter, found `'_`
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs:22:9
   |
   |
LL | impl<'a, I> UnwrapItemsExt for I {
   |      -- this generic parameter must be used with a generic lifetime parameter
LL |         MyStruct {}
   |         ^^^^^^^^^^^

error: aborting due to 3 previous errors
---
---- [ui] tests/ui/type-alias-impl-trait/issue-74761.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/issue-74761/issue-74761.stderr"
diff of stderr:

10 LL + impl<'b> A for () {
12 
+ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+   --> $DIR/issue-74761.rs:7:6
+    |
+    |
+ LL | impl<'a, 'b> A for () {
+    |      ^^ unconstrained lifetime parameter
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a, 'b> A for () {
+ LL + impl<'b> A for () {
+ 
13 error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates
14   --> $DIR/issue-74761.rs:7:10
15    |
---
+    |
+ LL | impl<'a, 'b> A for () {
+    |          ^^ unconstrained lifetime parameter
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'b, or make use of it, for example
+    |
+ LL - impl<'a, 'b> A for () {
+ LL + impl<'a> A for () {
+ 
25 error[E0792]: expected generic lifetime parameter, found `'_`
26   --> $DIR/issue-74761.rs:12:28
27    |
---
+    |
+ LL | impl<'a, 'b> A for () {
+    |      ^^ unconstrained lifetime parameter
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a, 'b> A for () {
+ LL + impl<'b> A for () {
+ 
+ error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates
+   --> $DIR/issue-74761.rs:7:10
+    |
+    |
+ LL | impl<'a, 'b> A for () {
+    |          ^^ unconstrained lifetime parameter
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'b, or make use of it, for example
+    |
+ LL - impl<'a, 'b> A for () {
+ LL + impl<'a> A for () {
+ 
+ error: aborting due to 5 previous errors



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args type-alias-impl-trait/issue-74761.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/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" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/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"
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/issue-74761.rs:7:6
   |
   |
LL | impl<'a, 'b> A for () {
   |      ^^ unconstrained lifetime parameter
   |
help: either remove the type parameter 'a, or make use of it, for example
LL - impl<'a, 'b> A for () {
LL - impl<'a, 'b> A for () {
LL + impl<'b> A for () {

error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/issue-74761.rs:7:6
   |
   |
LL | impl<'a, 'b> A for () {
   |      ^^ unconstrained lifetime parameter
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: either remove the type parameter 'a, or make use of it, for example
LL - impl<'a, 'b> A for () {
LL - impl<'a, 'b> A for () {
LL + impl<'b> A for () {

error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/issue-74761.rs:7:10
   |
   |
LL | impl<'a, 'b> A for () {
   |          ^^ unconstrained lifetime parameter
   |
help: either remove the type parameter 'b, or make use of it, for example
LL - impl<'a, 'b> A for () {
LL + impl<'a> A for () {
   |


error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/issue-74761.rs:7:10
   |
LL | impl<'a, 'b> A for () {
   |          ^^ unconstrained lifetime parameter
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: either remove the type parameter 'b, or make use of it, for example
LL - impl<'a, 'b> A for () {
LL + impl<'a> A for () {
   |

---
---- [ui] tests/ui/type-alias-impl-trait/issue-74761-2.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/issue-74761-2/issue-74761-2.stderr"
diff of stderr:

10 LL + impl<'b> A for () {
12 
+ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+   --> $DIR/issue-74761-2.rs:7:6
+    |
+    |
+ LL | impl<'a, 'b> A for () {
+    |      ^^ unconstrained lifetime parameter
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a, 'b> A for () {
+ LL + impl<'b> A for () {
+ 
13 error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates
14   --> $DIR/issue-74761-2.rs:7:10
15    |
---
+    |
+ LL | impl<'a, 'b> A for () {
+    |          ^^ unconstrained lifetime parameter
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'b, or make use of it, for example
+    |
+ LL - impl<'a, 'b> A for () {
+ LL + impl<'a> A for () {
+ 
25 error[E0792]: expected generic lifetime parameter, found `'_`
26   --> $DIR/issue-74761-2.rs:12:28
27    |
---
+    |
+ LL | impl<'a, 'b> A for () {
+    |      ^^ unconstrained lifetime parameter
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a, 'b> A for () {
+ LL + impl<'b> A for () {
+ 
+ error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates
+   --> $DIR/issue-74761-2.rs:7:10
+    |
+    |
+ LL | impl<'a, 'b> A for () {
+    |          ^^ unconstrained lifetime parameter
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'b, or make use of it, for example
+    |
+ LL - impl<'a, 'b> A for () {
+ LL + impl<'a> A for () {
+ 
+ error: aborting due to 5 previous errors



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args type-alias-impl-trait/issue-74761-2.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/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" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/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"
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/issue-74761-2.rs:7:6
   |
   |
LL | impl<'a, 'b> A for () {
   |      ^^ unconstrained lifetime parameter
   |
help: either remove the type parameter 'a, or make use of it, for example
LL - impl<'a, 'b> A for () {
LL - impl<'a, 'b> A for () {
LL + impl<'b> A for () {

error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/issue-74761-2.rs:7:6
   |
   |
LL | impl<'a, 'b> A for () {
   |      ^^ unconstrained lifetime parameter
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: either remove the type parameter 'a, or make use of it, for example
LL - impl<'a, 'b> A for () {
LL - impl<'a, 'b> A for () {
LL + impl<'b> A for () {

error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/issue-74761-2.rs:7:10
   |
   |
LL | impl<'a, 'b> A for () {
   |          ^^ unconstrained lifetime parameter
   |
help: either remove the type parameter 'b, or make use of it, for example
LL - impl<'a, 'b> A for () {
LL + impl<'a> A for () {
   |


error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/issue-74761-2.rs:7:10
   |
LL | impl<'a, 'b> A for () {
   |          ^^ unconstrained lifetime parameter
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: either remove the type parameter 'b, or make use of it, for example
LL - impl<'a, 'b> A for () {
LL + impl<'a> A for () {
   |

---
---- [ui] tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime/type-alias-impl-trait-unconstrained-lifetime.stderr"
diff of stderr:

10 LL + impl<I: Iterator<Item = i32>> Trait for (i32, I) {
12 
+ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+   --> $DIR/type-alias-impl-trait-unconstrained-lifetime.rs:10:6
+    |
+    |
+ LL | impl<'a, I: Iterator<Item = i32>> Trait for (i32, I) {
+    |
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a, I: Iterator<Item = i32>> Trait for (i32, I) {
+ LL + impl<I: Iterator<Item = i32>> Trait for (i32, I) {
+ 
13 error[E0792]: expected generic lifetime parameter, found `'_`
14   --> $DIR/type-alias-impl-trait-unconstrained-lifetime.rs:14:9
15    |
15    |

19 LL |         (0_i32, [0_i32].iter().copied())
21 
- error: aborting due to 2 previous errors
+ error: aborting due to 3 previous errors
23 
---
-   --> /checkout/tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.rs:10:6
+ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+   --> $DIR/type-alias-impl-trait-unconstrained-lifetime.rs:10:6
+    |
+ LL | impl<'a, I: Iterator<Item = i32>> Trait for (i32, I) {
+    |
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a, I: Iterator<Item = i32>> Trait for (i32, I) {
+ LL + impl<I: Iterator<Item = i32>> Trait for (i32, I) {
+ 
+ error: aborting due to 3 previous errors



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/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" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/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"
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.rs:10:6
   |
   |
LL | impl<'a, I: Iterator<Item = i32>> Trait for (i32, I) {
   |
   |
help: either remove the type parameter 'a, or make use of it, for example
   |
LL - impl<'a, I: Iterator<Item = i32>> Trait for (i32, I) {
LL + impl<I: Iterator<Item = i32>> Trait for (i32, I) {

error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.rs:10:6
   |
   |
LL | impl<'a, I: Iterator<Item = i32>> Trait for (i32, I) {
   |
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: either remove the type parameter 'a, or make use of it, for example
   |
LL - impl<'a, I: Iterator<Item = i32>> Trait for (i32, I) {
LL + impl<I: Iterator<Item = i32>> Trait for (i32, I) {

error[E0792]: expected generic lifetime parameter, found `'_`
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.rs:14:9
   |
   |
LL | impl<'a, I: Iterator<Item = i32>> Trait for (i32, I) {
   |      -- this generic parameter must be used with a generic lifetime parameter
...
LL |         (0_i32, [0_i32].iter().copied())

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0207, E0792.
---
---- [ui] tests/ui/type-alias-impl-trait/unconstrained-impl-param.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/unconstrained-impl-param/unconstrained-impl-param.stderr"
diff of stderr:

12 LL | impl<'a> Trait for Opaque<&'a str, 'a> {
14 
- error: aborting due to 1 previous error
+ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+   --> $DIR/unconstrained-impl-param.rs:11:6
+   --> $DIR/unconstrained-impl-param.rs:11:6
+    |
+ LL | impl<'a> Trait for Opaque<&'a str> {
+    |
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a> Trait for Opaque<&'a str> {
+ LL + impl Trait for Opaque<&'a str> {
+    |
+ LL | impl<'a> Trait for Opaque<&'a str, 'a> {
+ 
+ error: aborting due to 2 previous errors
16 
17 For more information about this error, try `rustc --explain E0207`.
17 For more information about this error, try `rustc --explain E0207`.
18 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/type-alias-impl-trait/unconstrained-impl-param.rs:11:6
+ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+   --> $DIR/unconstrained-impl-param.rs:11:6
+    |
+ LL | impl<'a> Trait for Opaque<&'a str> {
+    |
+    |
+    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+ help: either remove the type parameter 'a, or make use of it, for example
+    |
+ LL - impl<'a> Trait for Opaque<&'a str> {
+ LL + impl Trait for Opaque<&'a str> {
+    |
+ LL | impl<'a> Trait for Opaque<&'a str, 'a> {
+ 
+ error: aborting due to 2 previous errors



The actual stderr differed from the expected stderr.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args type-alias-impl-trait/unconstrained-impl-param.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/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" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/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"
--- stderr -------------------------------
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/unconstrained-impl-param.rs:11:6
   |
   |
LL | impl<'a> Trait for Opaque<&'a str> {
   |      ^^ unconstrained lifetime parameter
   |
help: either remove the type parameter 'a, or make use of it, for example
LL - impl<'a> Trait for Opaque<&'a str> {
LL + impl Trait for Opaque<&'a str> {
   |
   |
LL | impl<'a> Trait for Opaque<&'a str, 'a> {

error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
##[error]  --> /checkout/tests/ui/type-alias-impl-trait/unconstrained-impl-param.rs:11:6
   |
   |
LL | impl<'a> Trait for Opaque<&'a str> {
   |      ^^ unconstrained lifetime parameter
   |
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: either remove the type parameter 'a, or make use of it, for example
LL - impl<'a> Trait for Opaque<&'a str> {
LL + impl Trait for Opaque<&'a str> {
   |
   |
LL | impl<'a> Trait for Opaque<&'a str, 'a> {

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/typeck/issue-13853-5.rs stdout ----
Saved the actual stderr to "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/typeck/issue-13853-5/issue-13853-5.stderr"
diff of stderr:

7 help: either remove the type parameter T, or make use of it, for example
9 LL - impl<'a, T: Deserializable> Deserializable for &'a str {
9 LL - impl<'a, T: Deserializable> Deserializable for &'a str {
- LL + impl<'a: Deserializable> Deserializable for &'a str {
+ LL + impl<'a> Deserializable for &'a str {
11    |
12 LL | impl<'a, T: Deserializable> Deserializable for &'a str<T> {


The actual stderr differed from the expected 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 typeck/issue-13853-5.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/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" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/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"
--- 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 {
   |          ^ unconstrained type parameter
   |
help: either remove the type parameter T, or make use of it, for example
LL - impl<'a, T: Deserializable> Deserializable for &'a str {
LL + impl<'a> Deserializable for &'a str {
   |
   |
LL | impl<'a, T: Deserializable> Deserializable for &'a str<T> {

error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/typeck/issue-13853-5.rs:9:70
   |
   |
LL |     fn deserialize_token<D: Deserializer<'a>>(_x: D, _y: &'a str) -> &'a str {
   |        -----------------                                             ^^^^^^^ expected `&str`, found `()`
   |        |
   |        implicitly returns `()` as its body has no tail or `return` expression
help: consider returning the local binding `_y`
   |
   |
LL ~     fn deserialize_token<D: Deserializer<'a>>(_x: D, _y: &'a str) -> &'a str {
LL +         _y
LL ~     //~^ ERROR mismatched types

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0207, E0308.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
5 participants