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

[WIP] replace the leak check with universes, take 2 #65232

Open
wants to merge 14 commits into
base: master
from

Conversation

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Oct 9, 2019

This PR is an attempt to revive the "universe-based region check", which is an important step towards lazy normalization. Unlike before, we also modify the definition of 'empty so that it is indexed by a universe. This sidesteps some of the surprising effects we saw before -- at the core, we no longer think that exists<'a> { forall<'b> { 'b: 'a } } is solveable. The new region lattice looks like this:

static ----------+-----...------+       (greatest)
|                |              |
early-bound and  |              |
free regions     |              |
|                |              |
scope regions    |              |
|                |              |
empty(root)   placeholder(U1)   |
|            /                  |
|           /         placeholder(Un)
empty(U1) --         /
|                   /
...                /
|                 /
empty(Un) --------                      (smallest)

This PR has three effects:

  • It changes a fair number of error messages, I think for the better.
  • It fixes a number of bugs. The old algorithm was too conservative and caused us to reject legal subtypings.
  • It also causes two regressions (things that used to compile, but now do not).
    • coherence-subtyping.rs gets an additional error. This is expected.
    • issue-57639.rs regresses as before, for the reasons covered in #57639.

Both of the regressions stem from the same underlying property: without the leak check, the instantaneous "subtype" check is not able to tell whether higher-ranked subtyping will succeed or not. In both cases, we might be able to fix the problem by doing a 'leak-check like change' at some later point (e.g., as part of coherence).

This is a draft PR because:

  • I didn't finish ripping out the leak-check completely.
  • We might want to consider a crater run before landing this.
  • We might want some kind of design meeting to cover the overall strategy.
  • I just remembered I never finished 100% integrating this into the canonicalization code.
  • I should also review what happens in NLL region checking -- it probably still has a notion of bottom (empty set).

r? @matthewjasper

Copy link
Member

Centril left a comment

Just a series of nits that can be batch-applied.

src/librustc/infer/lexical_region_resolve/mod.rs Outdated Show resolved Hide resolved
src/librustc/infer/lexical_region_resolve/mod.rs Outdated Show resolved Hide resolved
src/librustc/infer/lexical_region_resolve/mod.rs Outdated Show resolved Hide resolved
src/librustc/infer/lexical_region_resolve/mod.rs Outdated Show resolved Hide resolved
src/librustc/infer/lexical_region_resolve/mod.rs Outdated Show resolved Hide resolved
src/librustc/ty/context.rs Outdated Show resolved Hide resolved
src/librustc/ty/context.rs Outdated Show resolved Hide resolved
src/librustc/ty/sty.rs Outdated Show resolved Hide resolved
src/librustc/ty/sty.rs Outdated Show resolved Hide resolved
src/librustc/ty/sty.rs Outdated Show resolved Hide resolved
@lqd

This comment has been minimized.

Copy link
Contributor

lqd commented Oct 9, 2019

When this PR is complete (particularly the "I didn't finish ripping out the leak-check completely." bullet point), it will also fix #59490.

@matthewjasper

This comment has been minimized.

Copy link
Contributor

matthewjasper commented Oct 9, 2019

  • I should also review what happens in NLL region checking -- it probably still has a notion of bottom (empty set).

It definitely considers regions that are not live anywhere and don't outlive any universal regions as 'empty:

let error_element = match {
self.scc_values.elements_contained_in(longer_fr_scc).find(|element| match element {
RegionElement::Location(_) => true,
RegionElement::RootUniversalRegion(_) => true,
RegionElement::PlaceholderRegion(placeholder1) => placeholder != *placeholder1,
})
} {
Some(v) => v,
None => return,
};

@nikomatsakis

This comment has been minimized.

Copy link
Contributor Author

nikomatsakis commented Oct 9, 2019

@nikomatsakis

This comment has been minimized.

Copy link
Contributor Author

nikomatsakis commented Oct 9, 2019

It occurs to me that updating NLL to match is not (presently) a strict requirement, but it would be something we have to do before we disable the AST-based regionck.

@matthewjasper

This comment has been minimized.

Copy link
Contributor

matthewjasper commented Oct 9, 2019

Can you bless the NLL compare mode output and check how this handles #57936 as well?

@nikomatsakis

This comment has been minimized.

Copy link
Contributor Author

nikomatsakis commented Oct 9, 2019

@matthewjasper I will bless compare-mode output, yes. As far as #57936, I get two errors: one in the call_indirect function and one in the direct function. The call_indirect error appears to be new? It is as follows:

error[E0308]: mismatched types
  --> /home/nmatsakis/tmp/issue-57936.rs:19:5
   |
19 |     indirect::<fn(&())>(); // OK
   |     ^^^^^^^^^^^^^^^^^^^ one type is more general than the other
   |
   = note: expected type `X`
              found type `X`

This error is very bad -- I think we have an open issue on it, actually? I should fix that. The problem here is that the real cause has to do with the full trait ref, but for some reason we're not printing all the details.

@nikomatsakis

This comment has been minimized.

Copy link
Contributor Author

nikomatsakis commented Oct 9, 2019

(I had not noticed #57936 at the time, or else I forgot about it, I'm not sure. :)

@nikomatsakis

This comment has been minimized.

Copy link
Contributor Author

nikomatsakis commented Oct 9, 2019

Commit just pushed. Message:

--bless --compare-mode=nll -- but note that we get two errors

failures:
    [ui (nll)] ui/hrtb/hrtb-exists-forall-trait-contravariant.rs
    [ui (nll)] ui/hrtb/issue-46989.rs

Both are related to the NLL region checker not handling the empty(ui) correctly.

@lqd

This comment has been minimized.

Copy link
Contributor

lqd commented Oct 9, 2019

...
   = note: expected type `X`
              found type `X`

This error is very bad -- I think we have an open issue on it, actually?

We used to have #57362 for example, but it was fixed.

At the time we mentioned there might still be some cases missing from try_report_placeholder_conflict's big match but didn't have cases exercising these possibly missing arms, maybe that is such a case ?

(Or, In particular, some cases needed to be written "twice", where the subtype was once with the sub and once with the sup, here in this PR RegionResolutionError::UpperBoundUniverseConflict is handled for one of these 2 sides, and maybe it needs to be handled symmetrically for both ?)

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Oct 10, 2019

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

@nikomatsakis

This comment has been minimized.

Copy link
Contributor Author

nikomatsakis commented Oct 10, 2019

@lqd

We used to have #57362 for example, but it was fixed.

OK, well, I guess I broke it again. Thanks for the cite.

src/test/ui/issues/issue-57362-2.stderr Outdated Show resolved Hide resolved
src/test/ui/hr-subtype/hr-subtype.rs Outdated Show resolved Hide resolved
= help: the following implementations were found:
<&'static u32 as Bar>
= note: `Bar` would have to be implemented for the type `&'0 u32`, for any lifetime `'0`...
= note: ...but `Bar` is actually implemented for the type `&'1 u32`, for some specific lifetime `'1`

This comment has been minimized.

Copy link
@matthewjasper

matthewjasper Oct 13, 2019

Contributor

It would be nice for this to use 'static instead of '1.

| |
| expected signature of `fn(&(u32, u32)) -> _`

error: aborting due to 3 previous errors

This comment has been minimized.

Copy link
@matthewjasper

matthewjasper Oct 13, 2019

Contributor

The other two errors are missing here because typeck errors stop compilation before borrow checking, right?

= help: the following implementations were found:
<SomeStruct as Foo<(&'a isize, &'a isize)>>
= note: `SomeStruct` must implement `Foo<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`...
= note: ...but `SomeStruct` actually implements `Foo<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`

This comment has been minimized.

Copy link
@matthewjasper

matthewjasper Oct 13, 2019

Contributor

This wording is a little odd.

= note: expected type `&isize`
found type `&usize`

error: aborting due to 2 previous errors

This comment has been minimized.

Copy link
@matthewjasper

matthewjasper Oct 13, 2019

Contributor

Typeck errors are hiding borrowck errors

| |
| expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _`
LL | with_closure_expecting_fn_with_free_region(|x: fn(&'x u32), y| {});
| ^ requires that `'x` must outlive `'static`

This comment has been minimized.

Copy link
@matthewjasper

matthewjasper Oct 13, 2019

Contributor

Does replacing 'x with 'static make this compile?
edit: it doesn't. It would be nice for the error messages here to be better.

...
LL | foo((), drop)
| ^^^ expected bound lifetime parameter 'a, found concrete lifetime
| expected signature of `fn(<() as Trait<'a>>::Item) -> _`

This comment has been minimized.

Copy link
@matthewjasper

matthewjasper Oct 13, 2019

Contributor

This should be compiling but isn't because we don't normalize types with escaping bound regions, right?

@nikomatsakis nikomatsakis marked this pull request as ready for review Oct 22, 2019
@nikomatsakis nikomatsakis changed the title replace the leak check with universes, take 2 [WIP] replace the leak check with universes, take 2 Oct 22, 2019
@lqd

This comment has been minimized.

Copy link
Contributor

lqd commented Oct 24, 2019

I looked a bit at the region errors managing to avoid the nice_region_errors mechanism, and left a couple notes in this Zulip thread.

@JohnCSimon

This comment has been minimized.

Copy link
Member

JohnCSimon commented Nov 2, 2019

Ping from triage.
@nikomatsakis can you please address the merge conflicts?
Thank you!

nikomatsakis added 5 commits Oct 8, 2019
We currently have a kind of arbitrary check for `Verify` conditions
which says that if the "test region" is `'empty`, then the check
passes. This was added to fix #42467 -- it happens to be correct for
the purposes that we use verify bounds for, but it doesn't feel
generally correct. Replace with a more principled test.
This mostly affects error messages, but it also causes two
regressions. One is expected, and one is not.

Expected regression:

* `coherence-subtyping.rs` gets an additional error

Known but unexpected regression:

* `issue-57639.rs` regresses, for the reasons covered in the issue

Both of these stem from the same underlying property: without the leak
check, the instantaneous "subtype" check is not able to tell whether
higher-ranked subtyping will succeed or not. In both cases, we might
be able to fix the problem by doing a 'leak-check like change' at some
later point.
We now make `'empty` indexed by a universe index, resulting
in a region lattice like this:

```
static ----------+-----...------+       (greatest)
|                |              |
early-bound and  |              |
free regions     |              |
|                |              |
scope regions    |              |
|                |              |
empty(root)   placeholder(U1)   |
|            /                  |
|           /         placeholder(Un)
empty(U1) --         /
|                   /
...                /
|                 /
empty(Un) --------                      (smallest)
```

Therefore, `exists<A> { forall<B> { B: A } }` is now unprovable,
because A must be at least Empty(U1) and B is placeholder(U2), and hence
the two regions are unrelated.
nikomatsakis and others added 5 commits Oct 9, 2019
```
failures:
    [ui (nll)] ui/hrtb/hrtb-exists-forall-trait-contravariant.rs
    [ui (nll)] ui/hrtb/issue-46989.rs
```

Both are related to the NLL region checker not handling the
`empty(ui)` correctly.
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
@nikomatsakis nikomatsakis force-pushed the nikomatsakis:lazy-norm-anon-const-push-2 branch from 1b4cc3c to 049dafd Nov 11, 2019
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Nov 11, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-11-11T14:13:15.1576502Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-11T14:13:15.1768153Z ##[command]git config gc.auto 0
2019-11-11T14:13:15.1822857Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-11T14:13:15.1855333Z ##[command]git config --get-all http.proxy
2019-11-11T14:13:15.2012362Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/65232/merge:refs/remotes/pull/65232/merge
---
2019-11-11T15:07:40.8233505Z .................................................................................................... 1400/9225
2019-11-11T15:07:46.5733984Z .................................................................................................... 1500/9225
2019-11-11T15:07:52.1154842Z .................................................................................................... 1600/9225
2019-11-11T15:08:00.7540114Z .................................................................................................... 1700/9225
2019-11-11T15:08:08.6262271Z ..i................................................................................................. 1800/9225
2019-11-11T15:08:14.8139133Z ......................................................................................iiiii......... 1900/9225
2019-11-11T15:08:34.3191944Z .................................................................................................... 2100/9225
2019-11-11T15:08:36.4470163Z .................................................................................................... 2200/9225
2019-11-11T15:08:38.7134379Z .................................................................................................... 2300/9225
2019-11-11T15:08:47.4838379Z .................................................................................................... 2400/9225
---
2019-11-11T15:11:27.5864845Z ...............................................................................i...............i.... 4700/9225
2019-11-11T15:11:34.3487281Z .................................................................................................... 4800/9225
2019-11-11T15:11:42.5444706Z .................................................................................................... 4900/9225
2019-11-11T15:11:47.1862820Z .................................................................................................... 5000/9225
2019-11-11T15:11:57.6723122Z ..................................................................................ii.ii...........i. 5100/9225
2019-11-11T15:12:05.7303677Z .................i.................................................................................. 5300/9225
2019-11-11T15:12:14.6746396Z .................................................................................................... 5400/9225
2019-11-11T15:12:21.0122275Z ................................................................i................................... 5500/9225
2019-11-11T15:12:27.6395903Z .................................................................................................... 5600/9225
2019-11-11T15:12:27.6395903Z .................................................................................................... 5600/9225
2019-11-11T15:12:35.8454811Z .................................................................................................... 5700/9225
2019-11-11T15:12:43.0986403Z .................................................ii...i..ii...........i............................. 5800/9225
2019-11-11T15:13:04.2365706Z .................................................................................................... 6000/9225
2019-11-11T15:13:11.8766614Z .................................................................................................... 6100/9225
2019-11-11T15:13:11.8766614Z .................................................................................................... 6100/9225
2019-11-11T15:13:16.7273441Z ....................................................................i..ii........................... 6200/9225
2019-11-11T15:13:43.2487225Z .................................................................................................... 6400/9225
2019-11-11T15:13:45.0658864Z ....................................i............................................................... 6500/9225
2019-11-11T15:13:47.0691202Z .................................................................................................... 6600/9225
2019-11-11T15:13:49.2123423Z ....................i............................................................................... 6700/9225
---
2019-11-11T15:18:13.0656749Z 
2019-11-11T15:18:13.0657390Z ---- [ui] ui/coherence/coherence-subtyping.rs#old stdout ----
2019-11-11T15:18:13.0657704Z diff of stderr:
2019-11-11T15:18:13.0657893Z 
2019-11-11T15:18:13.0658426Z 1 error[E0119]: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`:
2019-11-11T15:18:13.0658934Z -   --> $DIR/coherence-subtyping.rs:18:1
2019-11-11T15:18:13.0659917Z +   --> $DIR/coherence-subtyping.rs:16:1
2019-11-11T15:18:13.0660230Z 3    |
2019-11-11T15:18:13.0660739Z 4 LL | impl TheTrait for for<'a,'b> fn(&'a u8, &'b u8) -> &'a u8 {
2019-11-11T15:18:13.0661278Z 5    | --------------------------------------------------------- first implementation here
2019-11-11T15:18:13.0661737Z 
2019-11-11T15:18:13.0661956Z The actual stderr differed from the expected stderr.
2019-11-11T15:18:13.0661956Z The actual stderr differed from the expected stderr.
2019-11-11T15:18:13.0662494Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-subtyping.old/coherence-subtyping.old.stderr
2019-11-11T15:18:13.0663407Z To update references, rerun the tests and pass the `--bless` flag
2019-11-11T15:18:13.0663881Z To only update this specific test, also pass `--test-args coherence/coherence-subtyping.rs`
2019-11-11T15:18:13.0664092Z 
2019-11-11T15:18:13.0664295Z error in revision `old`: 1 errors occurred comparing output.
2019-11-11T15:18:13.0664473Z status: exit code: 1
2019-11-11T15:18:13.0665356Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/coherence/coherence-subtyping.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--cfg" "old" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-subtyping.old" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-subtyping.old/auxiliary" "-A" "unused"
2019-11-11T15:18:13.0666105Z ------------------------------------------
2019-11-11T15:18:13.0666325Z 
2019-11-11T15:18:13.0666710Z ------------------------------------------
2019-11-11T15:18:13.0666953Z stderr:
2019-11-11T15:18:13.0666953Z stderr:
2019-11-11T15:18:13.0667313Z ------------------------------------------
2019-11-11T15:18:13.0667777Z error[E0119]: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`:
2019-11-11T15:18:13.0668458Z    |
2019-11-11T15:18:13.0668458Z    |
2019-11-11T15:18:13.0668833Z LL | impl TheTrait for for<'a,'b> fn(&'a u8, &'b u8) -> &'a u8 {
2019-11-11T15:18:13.0670565Z    | --------------------------------------------------------- first implementation here
2019-11-11T15:18:13.0670904Z ...
2019-11-11T15:18:13.0671417Z LL | impl TheTrait for for<'a> fn(&'a u8, &'a u8) -> &'a u8 {
2019-11-11T15:18:13.0672007Z    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`
2019-11-11T15:18:13.0672287Z    |
2019-11-11T15:18:13.0672943Z    = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
2019-11-11T15:18:13.0673692Z error: aborting due to previous error
2019-11-11T15:18:13.0673859Z 
2019-11-11T15:18:13.0674248Z For more information about this error, try `rustc --explain E0119`.
2019-11-11T15:18:13.0674449Z 
2019-11-11T15:18:13.0674449Z 
2019-11-11T15:18:13.0674807Z ------------------------------------------
2019-11-11T15:18:13.0675027Z 
2019-11-11T15:18:13.0675175Z 
2019-11-11T15:18:13.0675564Z ---- [ui] ui/coherence/coherence-subtyping.rs#re stdout ----
2019-11-11T15:18:13.0675806Z diff of stderr:
2019-11-11T15:18:13.0675970Z 
2019-11-11T15:18:13.0676397Z 1 error[E0119]: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`:
2019-11-11T15:18:13.0676824Z -   --> $DIR/coherence-subtyping.rs:18:1
2019-11-11T15:18:13.0677377Z +   --> $DIR/coherence-subtyping.rs:16:1
2019-11-11T15:18:13.0677598Z 3    |
2019-11-11T15:18:13.0677999Z 4 LL | impl TheTrait for for<'a,'b> fn(&'a u8, &'b u8) -> &'a u8 {
2019-11-11T15:18:13.0678445Z 5    | --------------------------------------------------------- first implementation here
2019-11-11T15:18:13.0678826Z 
2019-11-11T15:18:13.0679347Z The actual stderr differed from the expected stderr.
2019-11-11T15:18:13.0679347Z The actual stderr differed from the expected stderr.
2019-11-11T15:18:13.0680060Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-subtyping.re/coherence-subtyping.re.stderr
2019-11-11T15:18:13.0681278Z To update references, rerun the tests and pass the `--bless` flag
2019-11-11T15:18:13.0682016Z To only update this specific test, also pass `--test-args coherence/coherence-subtyping.rs`
2019-11-11T15:18:13.0682205Z 
2019-11-11T15:18:13.0682374Z error in revision `re`: 1 errors occurred comparing output.
2019-11-11T15:18:13.0682543Z status: exit code: 1
2019-11-11T15:18:13.0683550Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/coherence/coherence-subtyping.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--cfg" "re" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-subtyping.re" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-subtyping.re/auxiliary" "-A" "unused"
2019-11-11T15:18:13.0684070Z ------------------------------------------
2019-11-11T15:18:13.0684223Z 
2019-11-11T15:18:13.0684527Z ------------------------------------------
2019-11-11T15:18:13.0684674Z stderr:
2019-11-11T15:18:13.0684674Z stderr:
2019-11-11T15:18:13.0684979Z ------------------------------------------
2019-11-11T15:18:13.0685448Z error[E0119]: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`:
2019-11-11T15:18:13.0685991Z    |
2019-11-11T15:18:13.0685991Z    |
2019-11-11T15:18:13.0686299Z LL | impl TheTrait for for<'a,'b> fn(&'a u8, &'b u8) -> &'a u8 {
2019-11-11T15:18:13.0686676Z    | --------------------------------------------------------- first implementation here
2019-11-11T15:18:13.0686821Z ...
2019-11-11T15:18:13.0687129Z LL | impl TheTrait for for<'a> fn(&'a u8, &'a u8) -> &'a u8 {
2019-11-11T15:18:13.0688951Z    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`
2019-11-11T15:18:13.0689883Z    |
2019-11-11T15:18:13.0690527Z    = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
2019-11-11T15:18:13.0690898Z error: aborting due to previous error
2019-11-11T15:18:13.0691021Z 
2019-11-11T15:18:13.0691452Z For more information about this error, try `rustc --explain E0119`.
2019-11-11T15:18:13.0691624Z 
---
2019-11-11T15:18:13.0703972Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-11-11T15:18:13.0704213Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-11-11T15:18:13.0707297Z 
2019-11-11T15:18:13.0707354Z 
2019-11-11T15:18:13.0715697Z 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" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-11-11T15:18:13.0751514Z 
2019-11-11T15:18:13.0751897Z 
2019-11-11T15:18:13.0752216Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-11-11T15:18:13.0752479Z Build completed unsuccessfully in 0:58:56
2019-11-11T15:18:13.0752479Z Build completed unsuccessfully in 0:58:56
2019-11-11T15:18:13.0768789Z == clock drift check ==
2019-11-11T15:18:13.0780266Z   local time: Mon Nov 11 15:18:13 UTC 2019
2019-11-11T15:18:13.3551207Z   network time: Mon, 11 Nov 2019 15:18:13 GMT
2019-11-11T15:18:13.3551391Z == end clock drift check ==
2019-11-11T15:18:14.2136442Z 
2019-11-11T15:18:14.2251436Z ##[error]Bash exited with code '1'.
2019-11-11T15:18:14.2286196Z ##[section]Starting: Checkout
2019-11-11T15:18:14.2287789Z ==============================================================================
2019-11-11T15:18:14.2287851Z Task         : Get sources
2019-11-11T15:18:14.2287893Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Nov 11, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-11-11T22:02:27.2063660Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-11T22:02:27.2238856Z ##[command]git config gc.auto 0
2019-11-11T22:02:27.2316300Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-11T22:02:27.2368903Z ##[command]git config --get-all http.proxy
2019-11-11T22:02:27.2496935Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/65232/merge:refs/remotes/pull/65232/merge
---
2019-11-11T22:56:51.7647391Z .................................................................................................... 1400/9228
2019-11-11T22:56:57.6557540Z .................................................................................................... 1500/9228
2019-11-11T22:57:03.5510691Z .................................................................................................... 1600/9228
2019-11-11T22:57:12.4182452Z .................................................................................................... 1700/9228
2019-11-11T22:57:20.8519757Z ..i................................................................................................. 1800/9228
2019-11-11T22:57:27.3664908Z ......................................................................................iiiii......... 1900/9228
2019-11-11T22:57:47.6022956Z .................................................................................................... 2100/9228
2019-11-11T22:57:50.0103305Z .................................................................................................... 2200/9228
2019-11-11T22:57:52.4679351Z .................................................................................................... 2300/9228
2019-11-11T22:58:02.3423869Z .................................................................................................... 2400/9228
---
2019-11-11T23:00:56.2664681Z ..................................................................................i...............i. 4700/9228
2019-11-11T23:01:03.2843761Z .................................................................................................... 4800/9228
2019-11-11T23:01:12.3901829Z .................................................................................................... 4900/9228
2019-11-11T23:01:17.7407805Z .................................................................................................... 5000/9228
2019-11-11T23:01:29.2102733Z .....................................................................................ii.ii.......... 5100/9228
2019-11-11T23:01:33.0580251Z .i.................................................................................................. 5200/9228
2019-11-11T23:01:47.6396253Z .................................................................................................... 5400/9228
2019-11-11T23:01:54.6297852Z ...................................................................i................................ 5500/9228
2019-11-11T23:02:02.0087804Z .................................................................................................... 5600/9228
2019-11-11T23:02:09.9690698Z .................................................................................................... 5700/9228
2019-11-11T23:02:09.9690698Z .................................................................................................... 5700/9228
2019-11-11T23:02:19.0329938Z ....................................................ii...i..ii...........i.......................... 5800/9228
2019-11-11T23:02:41.6383994Z .................................................................................................... 6000/9228
2019-11-11T23:02:50.0969625Z .................................................................................................... 6100/9228
2019-11-11T23:02:50.0969625Z .................................................................................................... 6100/9228
2019-11-11T23:02:55.4023674Z .......................................................................i..ii........................ 6200/9228
2019-11-11T23:03:24.6834541Z .................................................................................................... 6400/9228
2019-11-11T23:03:26.7767033Z .......................................i............................................................ 6500/9228
2019-11-11T23:03:28.9522987Z .................................................................................................... 6600/9228
2019-11-11T23:03:31.2108286Z .......................i............................................................................ 6700/9228
---
2019-11-11T23:08:18.6817240Z 
2019-11-11T23:08:18.6818373Z ---- [ui] ui/coherence/coherence-subtyping.rs#old stdout ----
2019-11-11T23:08:18.6818600Z diff of stderr:
2019-11-11T23:08:18.6818730Z 
2019-11-11T23:08:18.6819194Z 1 error[E0119]: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`:
2019-11-11T23:08:18.6819571Z -   --> $DIR/coherence-subtyping.rs:18:1
2019-11-11T23:08:18.6819962Z +   --> $DIR/coherence-subtyping.rs:16:1
2019-11-11T23:08:18.6820155Z 3    |
2019-11-11T23:08:18.6820659Z 4 LL | impl TheTrait for for<'a,'b> fn(&'a u8, &'b u8) -> &'a u8 {
2019-11-11T23:08:18.6821041Z 5    | --------------------------------------------------------- first implementation here
2019-11-11T23:08:18.6821319Z 
2019-11-11T23:08:18.6821450Z The actual stderr differed from the expected stderr.
2019-11-11T23:08:18.6821450Z The actual stderr differed from the expected stderr.
2019-11-11T23:08:18.6821893Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-subtyping.old/coherence-subtyping.old.stderr
2019-11-11T23:08:18.6822277Z To update references, rerun the tests and pass the `--bless` flag
2019-11-11T23:08:18.6822709Z To only update this specific test, also pass `--test-args coherence/coherence-subtyping.rs`
2019-11-11T23:08:18.6822889Z 
2019-11-11T23:08:18.6823030Z error in revision `old`: 1 errors occurred comparing output.
2019-11-11T23:08:18.6823163Z status: exit code: 1
2019-11-11T23:08:18.6824253Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/coherence/coherence-subtyping.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--cfg" "old" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-subtyping.old" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-subtyping.old/auxiliary" "-A" "unused"
2019-11-11T23:08:18.6825233Z ------------------------------------------
2019-11-11T23:08:18.6825807Z 
2019-11-11T23:08:18.6826598Z ------------------------------------------
2019-11-11T23:08:18.6826820Z stderr:
2019-11-11T23:08:18.6826820Z stderr:
2019-11-11T23:08:18.6827197Z ------------------------------------------
2019-11-11T23:08:18.6827697Z error[E0119]: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`:
2019-11-11T23:08:18.6828683Z    |
2019-11-11T23:08:18.6828683Z    |
2019-11-11T23:08:18.6829371Z LL | impl TheTrait for for<'a,'b> fn(&'a u8, &'b u8) -> &'a u8 {
2019-11-11T23:08:18.6829771Z    | --------------------------------------------------------- first implementation here
2019-11-11T23:08:18.6829958Z ...
2019-11-11T23:08:18.6830318Z LL | impl TheTrait for for<'a> fn(&'a u8, &'a u8) -> &'a u8 {
2019-11-11T23:08:18.6830774Z    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`
2019-11-11T23:08:18.6830970Z    |
2019-11-11T23:08:18.6831519Z    = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
2019-11-11T23:08:18.6831824Z error: aborting due to previous error
2019-11-11T23:08:18.6831937Z 
2019-11-11T23:08:18.6833457Z For more information about this error, try `rustc --explain E0119`.
2019-11-11T23:08:18.6833654Z 
2019-11-11T23:08:18.6833654Z 
2019-11-11T23:08:18.6833977Z ------------------------------------------
2019-11-11T23:08:18.6834116Z 
2019-11-11T23:08:18.6834225Z 
2019-11-11T23:08:18.6835166Z ---- [ui] ui/coherence/coherence-subtyping.rs#re stdout ----
2019-11-11T23:08:18.6835393Z diff of stderr:
2019-11-11T23:08:18.6835523Z 
2019-11-11T23:08:18.6836001Z 1 error[E0119]: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`:
2019-11-11T23:08:18.6836401Z -   --> $DIR/coherence-subtyping.rs:18:1
2019-11-11T23:08:18.6836784Z +   --> $DIR/coherence-subtyping.rs:16:1
2019-11-11T23:08:18.6837190Z 3    |
2019-11-11T23:08:18.6837640Z 4 LL | impl TheTrait for for<'a,'b> fn(&'a u8, &'b u8) -> &'a u8 {
2019-11-11T23:08:18.6838107Z 5    | --------------------------------------------------------- first implementation here
2019-11-11T23:08:18.6838533Z 
2019-11-11T23:08:18.6838681Z The actual stderr differed from the expected stderr.
2019-11-11T23:08:18.6838681Z The actual stderr differed from the expected stderr.
2019-11-11T23:08:18.6839118Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-subtyping.re/coherence-subtyping.re.stderr
2019-11-11T23:08:18.6839489Z To update references, rerun the tests and pass the `--bless` flag
2019-11-11T23:08:18.6840164Z To only update this specific test, also pass `--test-args coherence/coherence-subtyping.rs`
2019-11-11T23:08:18.6840492Z 
2019-11-11T23:08:18.6840643Z error in revision `re`: 1 errors occurred comparing output.
2019-11-11T23:08:18.6840810Z status: exit code: 1
2019-11-11T23:08:18.6841722Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/coherence/coherence-subtyping.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--cfg" "re" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-subtyping.re" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-subtyping.re/auxiliary" "-A" "unused"
2019-11-11T23:08:18.6842478Z ------------------------------------------
2019-11-11T23:08:18.6843135Z 
2019-11-11T23:08:18.6843767Z ------------------------------------------
2019-11-11T23:08:18.6845074Z stderr:
2019-11-11T23:08:18.6845074Z stderr:
2019-11-11T23:08:18.6845646Z ------------------------------------------
2019-11-11T23:08:18.6846138Z error[E0119]: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`:
2019-11-11T23:08:18.6846520Z    |
2019-11-11T23:08:18.6846520Z    |
2019-11-11T23:08:18.6846766Z LL | impl TheTrait for for<'a,'b> fn(&'a u8, &'b u8) -> &'a u8 {
2019-11-11T23:08:18.6847033Z    | --------------------------------------------------------- first implementation here
2019-11-11T23:08:18.6847094Z ...
2019-11-11T23:08:18.6847355Z LL | impl TheTrait for for<'a> fn(&'a u8, &'a u8) -> &'a u8 {
2019-11-11T23:08:18.6847669Z    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`
2019-11-11T23:08:18.6847722Z    |
2019-11-11T23:08:18.6848022Z    = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
2019-11-11T23:08:18.6848276Z error: aborting due to previous error
2019-11-11T23:08:18.6848302Z 
2019-11-11T23:08:18.6848541Z For more information about this error, try `rustc --explain E0119`.
2019-11-11T23:08:18.6848572Z 
---
2019-11-11T23:08:18.6857779Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-11-11T23:08:18.6857861Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-11-11T23:08:18.6875997Z 
2019-11-11T23:08:18.6876125Z 
2019-11-11T23:08:18.6877963Z 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" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-11-11T23:08:18.6878396Z 
2019-11-11T23:08:18.6878425Z 
2019-11-11T23:08:18.6917714Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-11-11T23:08:18.6917811Z Build completed unsuccessfully in 0:59:36
2019-11-11T23:08:18.6917811Z Build completed unsuccessfully in 0:59:36
2019-11-11T23:08:18.6937667Z == clock drift check ==
2019-11-11T23:08:18.6953391Z   local time: Mon Nov 11 23:08:18 UTC 2019
2019-11-11T23:08:18.8458366Z   network time: Mon, 11 Nov 2019 23:08:18 GMT
2019-11-11T23:08:18.8462861Z == end clock drift check ==
2019-11-11T23:08:19.5991515Z 
2019-11-11T23:08:19.6102299Z ##[error]Bash exited with code '1'.
2019-11-11T23:08:19.6142956Z ##[section]Starting: Checkout
2019-11-11T23:08:19.6145278Z ==============================================================================
2019-11-11T23:08:19.6145336Z Task         : Get sources
2019-11-11T23:08:19.6145403Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@matthewjasper

This comment has been minimized.

Copy link
Contributor

matthewjasper commented Nov 12, 2019

  • I just remembered I never finished 100% integrating this into the canonicalization code.

If this is referring to this, I guess this can be done in a follow up issue

ty::ReEmpty(ui) => {
bug!("canonicalizing 'empty in universe {:?}", ui) // FIXME
}

I think that this should be good to go with follow up issues raised and a crater run.

@JohnCSimon

This comment has been minimized.

Copy link
Member

JohnCSimon commented Nov 17, 2019

Ping from triage:
@nikomatsakis Can you please address the failing build?
cc: @matthewjasper @Centril
Thanks.

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 20, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.