Suggest how to fix with unconstrained type parameters by kei519 · Pull Request #134270 · rust-lang/rust (original) (raw)

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.