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

Rollup of 12 pull requests #87344

Closed
wants to merge 34 commits into from

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

matthiaskrgr and others added 30 commits July 17, 2021 01:20
Avoid collecting an interator just to re-iterate immediately.
Rather reuse the previous iterator. (clippy::needless_collect)
Following up on rust-lang#87236, add comments to the unix command-line argument
support explaining that the code doesn't mutate the system-provided
argc/argv, and that this is why the code doesn't need a lock or special
memory ordering.
MSVC.

The LLVM limitation that previously prevented this has been fixed in LLVM
9 which is older than the oldest LLVM version we currently support.

See rust-lang#61002.
It used to allow you to mutate the key, even though that can invalidate the map by creating duplicate keys.
I attempted that with the previous code, but I misunderstdood how
`shallow_resolve` works.
During function type-checking, we normalize any associated types in
the function signature (argument types + return type), and then
create WF obligations for each of the normalized types. The HIR wf code
does not currently support this case, so any errors that we get have
imprecise spans.

This commit extends `ObligationCauseCode::WellFormed` to support
recording a function parameter, allowing us to get the corresponding
HIR type if an error occurs. Function typechecking is modified to
pass this information during signature normalization and WF checking.
The resulting code is fairly verbose, due to the fact that we can
no longer normalize the entire signature with a single function call.

As part of the refactoring, we now perform HIR-based WF checking
for several other 'typed items' (statics, consts, and inherent impls).

As a result, WF and projection errors in a function signature now
have a precise span, which points directly at the responsible type.
If a function signature is constructed via a macro, this will allow
the error message to point at the code 'most responsible' for the error
(e.g. a user-supplied macro argument).
…dtwco

avoid temporary vectors/reuse iterators

Avoid collecting an interator just to re-iterate immediately.
Rather reuse the previous iterator. (clippy::needless_collect)
Support HIR wf checking for function signatures

During function type-checking, we normalize any associated types in
the function signature (argument types + return type), and then
create WF obligations for each of the normalized types. The HIR wf code
does not currently support this case, so any errors that we get have
imprecise spans.

This commit extends `ObligationCauseCode::WellFormed` to support
recording a function parameter, allowing us to get the corresponding
HIR type if an error occurs. Function typechecking is modified to
pass this information during signature normalization and WF checking.
The resulting code is fairly verbose, due to the fact that we can
no longer normalize the entire signature with a single function call.

As part of the refactoring, we now perform HIR-based WF checking
for several other 'typed items' (statics, consts, and inherent impls).

As a result, WF and projection errors in a function signature now
have a precise span, which points directly at the responsible type.
If a function signature is constructed via a macro, this will allow
the error message to point at the code 'most responsible' for the error
(e.g. a user-supplied macro argument).
…r=notriddle

Don't display <table> in item summary

Fixes rust-lang#87231.

r? ``@notriddle``
…=oli-obk

Recognize bounds on impls as const bounds

r? ``@oli-obk``
…alfJung

Add comments explaining the unix command-line argument support.

Following up on rust-lang#87236, add comments to the unix command-line argument
support explaining that the code doesn't mutate the system-provided
argc/argv, and that this is why the code doesn't need a lock or special
memory ordering.

r? ``@RalfJung``
…pes, r=spastorino

 Make mir borrowck's use of opaque types independent of the typeck query's result

fixes rust-lang#87218
fixes rust-lang#86465

we used to use the typeck results only to generate an obligation for the mir borrowck type to be equal to the typeck result.

When i removed the `fixup_opaque_types` function in rust-lang#87200, I exposed a bug that showed that mir borrowck can't doesn't get enough information from typeck in order to build the correct lifetime mapping from opaque type usage to the actual concrete type. We therefor now fully compute the information within mir borrowck (we already did that, but we only used it to verify the typeck result) and stop using the typeck information.

We will likely be able to remove most opaque type information from the borrowck results in the future and just have all current callers use the mir borrowck result instead.

r? ``@spastorino``
…=nagisa

Allow combining -Cprofile-generate and -Cpanic=unwind when targeting MSVC.

The LLVM limitation that previously prevented this has been fixed in LLVM 9 which is older than the oldest LLVM version we currently support.

Fixes rust-lang#61002.

r? `@nagisa` (or anyone else from `@rust-lang/wg-llvm)`
…bank

Get back the more precise suggestion spans of old regionck

I noticed that when you turn on nll, the structured suggestion replaces a snippet instead of appending a snippet. It seems clearer to the user to only highlight the newly added characters instead of the entire `impl Trait` (and old regionck already does it this way).

r? `@estebank`
Update cargo

6 commits in 27277d966b3cfa454d6dea7f724cb961c036251c..4e143fd131e0c16cefd008456e974236ca54e62e
2021-07-16 00:50:39 +0000 to 2021-07-20 21:55:45 +0000
- Named profile updates (rust-lang/cargo#9685)
- Inform build scripts of rustc compiler context (rust-lang/cargo#9601)
- Factor version preferences into a struct (rust-lang/cargo#9703)
- docs: Fix sentence & update link for GitLab CI docs (rust-lang/cargo#9704)
- Deduplicate compiler diagnostics. (rust-lang/cargo#9675)
- Re-enable future-incompatible tests. (rust-lang/cargo#9698)
@rustbot rustbot added the rollup A PR which is a rollup label Jul 21, 2021
@Dylan-DPC-zz
Copy link
Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jul 21, 2021

📌 Commit 37bb86c has been approved by Dylan-DPC

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 21, 2021
@bors
Copy link
Contributor

bors commented Jul 21, 2021

⌛ Testing commit 37bb86c with merge dbde2aa426f7955ddaa78dd7970b66b5c15a0a9d...

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
1 error: lifetime may not live long enough
-   --> $DIR/ret-impl-trait-one.rs:10:80
+   --> $DIR/ret-impl-trait-one.rs:10:65
3    |
- LL |   async fn async_ret_impl_trait1<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'a> {
-    |  ________________________________--__--__________________________________________^
-    | |                                |   |
-    | |                                |   lifetime `'b` defined here
-    | |                                lifetime `'a` defined here
- LL | |
- LL | |     (a, b)
- LL | | }
-    | |_^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
+ LL | async fn async_ret_impl_trait1<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'a> {
+    |                                --  --                           ^^^^^^^^^^^^^^ opaque type requires that `'b` must outlive `'a`
+    |                                |   |
+    |                                |   lifetime `'b` defined here
+    |                                lifetime `'a` defined here
13    |
14    = help: consider adding the following bound: `'b: 'a`


The actual stderr differed from the expected stderr.
The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/multiple-lifetimes/ret-impl-trait-one.nll/ret-impl-trait-one.nll.stderr
To only update this specific test, also pass `--test-args async-await/multiple-lifetimes/ret-impl-trait-one.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-one.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zemit-future-incompat-report" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/multiple-lifetimes/ret-impl-trait-one.nll" "-Zborrowck=mir" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2018" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/multiple-lifetimes/ret-impl-trait-one.nll/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
error: lifetime may not live long enough
  --> /checkout/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-one.rs:10:65
   |
LL | async fn async_ret_impl_trait1<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'a> {
   |                                --  --                           ^^^^^^^^^^^^^^ opaque type requires that `'b` must outlive `'a`
   |                                |   |
   |                                |   lifetime `'b` defined here
   |                                lifetime `'a` defined here
   |
   = help: consider adding the following bound: `'b: 'a`
error: aborting due to previous error


------------------------------------------
---
1 error: lifetime may not live long enough
-   --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:8:48
+   --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:8:37
3    |
4 LL |     async fn f(self: Pin<&Self>) -> impl Clone { self }
-    |                          -                     ^^^^^^^^ returning this value requires that `'1` must outlive `'static`
+    |                          -          ^^^^^^^^^^ opaque type requires that `'1` must outlive `'static`
6    |                          |
7    |                          let's call the lifetime of this reference `'1`


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

error: 1 errors occurred comparing output.
error: 1 errors occurred comparing output.
Some tests failed in compiletest suite=ui compare_mode=Nll mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zemit-future-incompat-report" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.nll" "-Zborrowck=mir" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2018" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.nll/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
error: lifetime may not live long enough
  --> /checkout/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:8:37
   |
LL |     async fn f(self: Pin<&Self>) -> impl Clone { self }
   |                          -          ^^^^^^^^^^ opaque type requires that `'1` must outlive `'static`
   |                          |
   |                          let's call the lifetime of this reference `'1`
   |
help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a bound
   |
LL |     async fn f(self: Pin<&Self>) -> impl Clone + '_ { self }

error: aborting due to previous error


---
diff of stderr:

28            found opaque type `impl Sized`
29 
30 error[E0310]: the parameter type `T` may not live long enough
-   --> $DIR/generic_type_does_not_live_long_enough.rs:17:30
32    |
32    |
33 LL | fn wrong_generic<T>(t: T) -> WrongGeneric<T> {


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


error in revision `full_tait`: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--cfg" "full_tait" "--error-format" "json" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zemit-future-incompat-report" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.full_tait.nll" "-Zborrowck=mir" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.full_tait.nll/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
error: at least one trait must be specified
  --> /checkout/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs:12:24
   |
LL | type WrongGeneric<T> = impl 'static;

warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
  --> /checkout/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs:3:32
   |
   |
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
   |
   = note: `#[warn(incomplete_features)]` on by default
   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information


error[E0308]: mismatched types
  --> /checkout/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs:9:18
   |
LL |     let z: i32 = x; //~ ERROR mismatched types
   |            ---   ^ expected `i32`, found opaque type
   |            expected due to this
...
...
LL | type WrongGeneric<T> = impl 'static;
   |
   = note:     expected type `i32`
           found opaque type `impl Sized`


error[E0310]: the parameter type `T` may not live long enough
   |
   |
LL | fn wrong_generic<T>(t: T) -> WrongGeneric<T> {
   |
   |
   = help: consider adding an explicit lifetime bound `T: 'static`...

error[E0310]: the parameter type `T` may not live long enough
   |
   |
LL | type WrongGeneric<T> = impl 'static;
   |
   |
   = help: consider adding an explicit lifetime bound `T: 'static`...
   = note: ...so that the type `T` will meet its required lifetime bounds
error: aborting due to 4 previous errors; 1 warning emitted

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

19            found opaque type `impl Sized`
20 
21 error[E0310]: the parameter type `T` may not live long enough
-   --> $DIR/generic_type_does_not_live_long_enough.rs:17:30
23    |
23    |
24 LL | fn wrong_generic<T>(t: T) -> WrongGeneric<T> {


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


error in revision `min_tait`: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--cfg" "min_tait" "--error-format" "json" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zemit-future-incompat-report" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.min_tait.nll" "-Zborrowck=mir" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.min_tait.nll/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
error: at least one trait must be specified
  --> /checkout/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs:12:24
   |
LL | type WrongGeneric<T> = impl 'static;

error[E0308]: mismatched types
  --> /checkout/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs:9:18
   |
   |
LL |     let z: i32 = x; //~ ERROR mismatched types
   |            ---   ^ expected `i32`, found opaque type
   |            expected due to this
...
...
LL | type WrongGeneric<T> = impl 'static;
   |
   = note:     expected type `i32`
           found opaque type `impl Sized`


error[E0310]: the parameter type `T` may not live long enough
   |
   |
LL | fn wrong_generic<T>(t: T) -> WrongGeneric<T> {
   |
   |
   = help: consider adding an explicit lifetime bound `T: 'static`...

error[E0310]: the parameter type `T` may not live long enough
   |
   |
LL | type WrongGeneric<T> = impl 'static;
   |
   |
   = help: consider adding an explicit lifetime bound `T: 'static`...
   = note: ...so that the type `T` will meet its required lifetime bounds
error: aborting due to 4 previous errors

Some errors have detailed explanations: E0308, E0310.
For more information about an error, try `rustc --explain E0308`.
---
9    |
10 LL |         |x| x
11    |         ^^^^^

19    = note: expected type `for<'r> Fn<(&'r X,)>`
20               found type `Fn<(&'static X,)>`
21 note: this closure does not fulfill the lifetime requirements
-   --> $DIR/issue-57611-trait-alias.rs:28:9
23    |
24 LL |         |x| x
25    |         ^^^^^



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


error in revision `min_tait`: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--cfg" "min_tait" "--error-format" "json" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zemit-future-incompat-report" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/issue-57611-trait-alias.min_tait.nll" "-Zborrowck=mir" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/issue-57611-trait-alias.min_tait.nll/auxiliary"
------------------------------------------

------------------------------------------
stderr:
---

error[E0308]: mismatched types
  --> /checkout/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs:20:16
   |
LL |     type Bar = impl Baz<Self, Self>;
   |                ^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
   |
   = note: expected type `for<'r> Fn<(&'r X,)>`
              found type `Fn<(&'static X,)>`
note: this closure does not fulfill the lifetime requirements
   |
LL |         |x| x
   |         ^^^^^


error: implementation of `FnOnce` is not general enough
   |
   |
LL |     type Bar = impl Baz<Self, Self>;
   |                ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
   |
   = note: closure with signature `fn(&'static X) -> &'static X` must implement `FnOnce<(&'0 X,)>`, for any lifetime `'0`...
   = note: ...but it actually implements `FnOnce<(&'static X,)>`
error: aborting due to 4 previous errors

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

---
18    |
19 LL |         |x| x
20    |         ^^^^^

28    = note: expected type `for<'r> Fn<(&'r X,)>`
29               found type `Fn<(&'static X,)>`
30 note: this closure does not fulfill the lifetime requirements
-   --> $DIR/issue-57611-trait-alias.rs:28:9
32    |
33 LL |         |x| x
34    |         ^^^^^



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


error in revision `full_tait`: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--cfg" "full_tait" "--error-format" "json" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zemit-future-incompat-report" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/issue-57611-trait-alias.full_tait.nll" "-Zborrowck=mir" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/type-alias-impl-trait/issue-57611-trait-alias.full_tait.nll/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
  --> /checkout/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs:8:32
   |
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
   |
   = note: `#[warn(incomplete_features)]` on by default
   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information

---

error[E0308]: mismatched types
  --> /checkout/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs:20:16
   |
LL |     type Bar = impl Baz<Self, Self>;
   |                ^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
   |
   = note: expected type `for<'r> Fn<(&'r X,)>`
              found type `Fn<(&'static X,)>`
note: this closure does not fulfill the lifetime requirements
   |
LL |         |x| x
   |         ^^^^^


error: implementation of `FnOnce` is not general enough
   |
   |
LL |     type Bar = impl Baz<Self, Self>;
   |                ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
   |
   = note: closure with signature `fn(&'static X) -> &'static X` must implement `FnOnce<(&'0 X,)>`, for any lifetime `'0`...
   = note: ...but it actually implements `FnOnce<(&'static X,)>`
error: aborting due to 4 previous errors; 1 warning emitted

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

---
test result: FAILED. 12020 passed; 6 failed; 125 ignored; 0 measured; 0 filtered out; finished in 105.70s



command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--suite" "ui" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--host-rustcflags" "-Crpath -Cdebuginfo=0  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -Cdebuginfo=0  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python3" "--lldb-python" "/usr/bin/python3" "--gdb" "/usr/bin/gdb" "--llvm-version" "12.0.1-rust-1.55.0-nightly" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker engine executionengine extensions filecheck frontendopenacc frontendopenmp fuzzmutate globalisel hellonew hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interfacestub interpreter ipo irreader jitlink libdriver lineeditor linker lto mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcjit orcshared orctargetprocess passes powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info xray" "--cc" "" "--cxx" "" "--cflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--channel" "nightly" "--color" "always" "--compare-mode" "nll"


Build completed unsuccessfully in 0:20:26

@bors
Copy link
Contributor

bors commented Jul 21, 2021

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 21, 2021
@bors
Copy link
Contributor

bors commented Jul 21, 2021

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

@ehuss ehuss closed this Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet