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

Chalk lowering rule: WellFormed-TraitRef #50250

Merged
merged 8 commits into from
Jul 9, 2018
Merged

Conversation

csmoe
Copy link
Member

@csmoe csmoe commented Apr 26, 2018

Address chalk lowering "Implemented-From-Env" as part of #49177.
r? @nikomatsakis

@rust-highfive
Copy link
Collaborator

warning Warning warning

  • These commits modify submodules.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 26, 2018
@csmoe csmoe removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 26, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (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.

[00:04:43] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:04:43] tidy error: /checkout/src/librustc_traits/lowering.rs:225: trailing whitespace
[00:04:43] tidy error: /checkout/src/librustc_traits/lowering.rs:263: trailing whitespace
[00:04:43] tidy error: /checkout/src/librustc_traits/lowering.rs:447: trailing whitespace
[00:04:45] some tidy checks failed
[00:04:45] 
[00:04:45] 
[00:04:45] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:04:45] 
[00:04:45] 
[00:04:45] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:45] Build completed unsuccessfully in 0:01:54
[00:04:45] Build completed unsuccessfully in 0:01:54
[00:04:45] Makefile:79: recipe for target 'tidy' failed
[00:04:45] make: *** [tidy] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:078bc130
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (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.
[00:19:05]    Compiling rustc_plugin v0.0.0 (file:///checkout/src/librustc_plugin)
[00:19:06] error[E0308]: mismatched types
[00:19:06]    --> librustc_traits/lowering.rs:224:77
[00:19:06]     |
[00:19:06] 224 |     let wellformed_wc = DomainGoal::WellFormed(WhereClauseAtom::Implemented(where_clauses));
[00:19:06]     |                                                                             ^^^^^^^^^^^^^ expected struct `rustc::ty::TraitPredicate`, found struct `std::vec::Vec`
[00:19:06]     |
[00:19:06]     = note: expected type `rustc::ty::TraitPredicate<'_>`
[00:19:06]                found type `std::vec::Vec<rustc::ty::Binder<rustc::traits::DomainGoal<'_>>>`
[00:19:06] 
[00:19:06] error[E0277]: the trait bound `rustc::traits::DomainGoal<'_>: std::iter::Iterator` is not satisfied
[00:19:06]    --> librustc_traits/lowering.rs:228:20
[00:19:06]     |
[00:19:06] 228 |     wellformed_wcs.extend(wellformed_wc);
[00:19:06]     |                    ^^^^^^ `rustc::traits::DomainGoal<'_>` is not an iterator; maybe try calling `.iter()` or a similar method
[00:19:06]     |
[00:19:06]     = help: the trait `std::iter::Iterator` is not implemented for `rustc::traits::DomainGoal<'_>`
[00:19:06]     = note: required because of the requirements on the impl of `std::iter::IntoIterator` for `rustc::traits::DomainGoal<'_>`
[00:19:06] error[E0308]: mismatched types
[00:19:06]    --> librustc_traits/lowering.rs:268:55
[00:19:06]     |
[00:19:06]     |
[00:19:06] 268 |                 .map(|wc| Goal::from_poly_domain_goal(wc, tcx)),
[00:19:06]     |                                                       |
[00:19:06]     |                                                       |
[00:19:06]     |                                                       expected struct `rustc::ty::Binder`, found enum `rustc::traits::DomainGoal`
[00:19:06]     |                                                       help: try using a variant of the expected type: `rustc::ty::Binder(wc)`
[00:19:06]     |
[00:19:06]     = note: expected type `rustc::ty::Binder<rustc::traits::DomainGoal<'_>>`
[00:19:06]                found type `rustc::traits::DomainGoal<'_>`
[00:19:06] 
[00:19:06] error[E0277]: the trait bound `rustc::traits::ProgramClause<'_>: std::iter::Iterator` is not satisfied
[00:19:06]    --> librustc_traits/lowering.rs:275:14
[00:19:06]     |
[00:19:06] 275 |             .chain(wellformed_traitref),
[00:19:06]     |              ^^^^^ `rustc::traits::ProgramClause<'_>` is not an iterator; maybe try calling `.iter()` or a similar method
[00:19:06]     |
[00:19:06]     = help: the trait `std::iter::Iterator` is not implemented for `rustc::traits::ProgramClause<'_>`
[00:19:06]     = note: required because of the requirements on the impl of `std::iter::IntoIterator` for `rustc::traits::ProgramClause<'_>`
[00:19:06] 
[00:19:06] error[E0277]: the trait bound `rustc::traits::ProgramClause<'_>: std::iter::Iterator` is not satisfied
[00:19:06]    --> librustc_traits/lowering.rs:272:9
[00:19:06]     |
[00:19:06] 272 |     tcx.mk_clauses(
[00:19:06]     |         ^^^^^^^^^^ `rustc::traits::ProgramClause<'_>` is not an iterator; maybe try calling `.iter()` or a similar method
[00:19:06]     |
[00:19:06]     = help: the trait `std::iter::Iterator` is not implemented for `rustc::traits::ProgramClause<'_>`
[00:19:06]     = note: required because of the requirements on the impl of `std::iter::Iterator` for `std::iter::Chain<std::iter::Chain<std::iter::Once<rustc::traits::Clause<'_>>, std::iter::Map<std::slice::Iter<'_, rustc::ty::Predicate<'_>>, [closure@librustc_traits/lowering.rs:252:14: 252:64 tcx:_, trait_pred:_]>>, rustc::traits::ProgramClause<'_>>`
[00:19:06]     = note: required because of the requirements on the impl of `rustc::ty::context::InternAs<[rustc::traits::Clause<'_>], &rustc::ty::Slice<rustc::traits::Clause<'_>>>` for `std::iter::Chain<std::iter::Chain<std::iter::Once<rustc::traits::Clause<'_>>, std::iter::Map<std::slice::Iter<'_, rustc::ty::Predicate<'_>>, [closure@librustc_traits/lowering.rs:252:14: 252:64 tcx:_, trait_pred:_]>>, rustc::traits::ProgramClause<'_>>`
[00:19:06] error: aborting due to 5 previous errors
[00:19:06] 
[00:19:06] Some errors occurred: E0277, E0308.
[00:19:06] For more information about an error, try `rustc --explain E0277`.
[00:19:06] For more information about an error, try `rustc --explain E0277`.
[00:19:06] error: Could not compile `rustc_traits`.
[00:19:06] 
[00:19:06] Caused by:
[00:19:06]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name rustc_traits librustc_traits/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 -C metadata=f874c027ab685544 -C extra-filename=-f874c027ab685544 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps --extern bitflags=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libbitflags-9866e194db82a141.rlib --extern rustc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc-3e9ac89279d9d9fd.so --extern log=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblog-3e35efb9e5bc7a9a.rlib --extern rustc_data_structures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_data_structures-93cb1ddd29ab61a4.so --extern graphviz=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libgraphviz-0bde40de32995f14.so --extern syntax=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax-d3b6fcf798f7d22a.so --extern syntax_pos=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax_pos-9f3518d56a01456f.so -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/backtrace-sys-22398a187b4139a2/out/.libs -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/miniz-sys-4a7fffed6b170d5b/out` (exit code: 101)
[00:19:52] error: build failed
[00:19:52] error: build failed
[00:19:52] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "--release" "--locked" "--color" "always" "--features" " jemalloc" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:19:52] expected success, got: exit code: 101
[00:19:52] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9
[00:19:52] travis_fold:end:stage0-rustc

[00:19:52] travis_time:end:stage0-rustc:start=1524750987123813941,finish=1524751858652724865,duration=871528910924


[00:19:52] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:19:52] Build completed unsuccessfully in 0:14:45
[00:19:52] Makefile:28: recipe for target 'all' failed
[00:19:52] make: *** [all] Error 1
314856 ./src/llvm
256592 ./obj/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib
241188 ./src/llvm-emscripten
210060 ./src/llvm/test
---
149020 ./.git/modules/src
143664 ./obj/build/bootstrap/debug/incremental
135420 ./obj/build/x86_64-unknown-linux-gnu/stage0-rustc
122708 ./obj/build/bootstrap/debug/incremental/bootstrap-1sil8jgb030ka
122704 ./obj/build/bootstrap/debug/incremental/bootstrap-1sil8jgb030ka/s-f0h8ucxal7-gp84ip-2f3cmz1knheyt
91276 ./obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu
91272 ./obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release
89696 ./src/llvm/test/CodeGen
70944 ./obj/build/x86_64-unknown-linux-gnu/native

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)

@pietroalbini pietroalbini added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 26, 2018
@nikomatsakis
Copy link
Contributor

@bors delegate=scalexm

Just giving scalexm ability to r+ too

@bors
Copy link
Contributor

bors commented Apr 27, 2018

✌️ @scalexm can now approve this pull request

@nikomatsakis
Copy link
Contributor

cc @csmoe -- I guess you know this doesn't build yet. =) Do you need help w/ that?

@csmoe
Copy link
Member Author

csmoe commented Apr 28, 2018

@nikomatsakis
I’m tackling this, I will ping you at gitter if necessary.

@csmoe csmoe force-pushed the wf_traitref branch 2 times, most recently from 637d034 to c87d2d1 Compare May 2, 2018 04:44
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (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.
travis_time:start:test_ui
Check compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:42:20] 
[00:42:20] running 1380 tests
[00:42:25] ...........................................................F.FFF..................i.................
[00:42:34] ....................................................................................................
[00:42:38] ....................................................................................................
[00:42:41] ....................................................................................................
[00:42:45] ....................................................................................................
---
[00:43:26] ....................................................................................................
-------------------------------------
[00:43:31] stderr:
[00:43:31] ------------------------------------------
[00:43:31] {"message":"program clause dump","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/chalkify/lower_trait.rs","byte_start":493,"byte_end":522,"line_start":13,"line_end":13,"column_start":1,"column_end":30,"is_primary":true,"text":[{"text":"#[rustc_dump_program_clauses] //~ ERROR program clause dump","highlight_start":1,"highlight_end":30}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[{"message":"FromEnv(S: std::marker::Sized) :- FromEnv(Self: Foo<S, T, U>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"FromEnv(T: std::marker::Sized) :- FromEnv(Self: Foo<S, T, U>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"FromEnv(U: std::marker::Sized) :- FromEnv(Self: Foo<S, T, U>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"Implemented(Self: Foo<S, T, U>) :- FromEnv(Self: Foo<S, T, U>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"WellFormed(Self: Foo<S, T, U>) :- Implemented(Self: Foo<S, T, U>), Implemented(S: std::marker::Sized).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"WellFormed(Self: Foo<S, T, U>) :- Implemented(Self: Foo<S, T, U>), Implemented(T: std::marker::Sized).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"WellFormed(Self: Foo<S, T, U>) :- Implemented(Self: Foo<S, T, U>), Implemented(U: std::marker::Sized).","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: program clause dump\n  --> /checkout/src/test/ui/chalkify/lower_trait.rs:13:1\n   |\nLL | #[rustc_dump_program_clauses] //~ ERROR program clause dump\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: FromEnv(S: std::marker::Sized) :- FromEnv(Self: Foo<S, T, U>).\n   = note: FromEnv(T: std::marker::Sized) :- FromEnv(Self: Foo<S, T, U>).\n   = note: FromEnv(U: std::marker::Sized) :- FromEnv(Self: Foo<S, T, U>).\n   = note: Implemented(Self: Foo<S, T, U>) :- FromEnv(Self: Foo<S, T, U>).\n   = note: WellFormed(Self: Foo<S, T, U>) :- Implemented(Self: Foo<S, T, U>), Implemented(S: std::marker::Sized).\n   = note: WellFormed(Self: Foo<S, T, U>) :- Implemented(Self: Foo<S, T, U>), Implemented(T: std::marker::Sized).\n   = note: WellFormed(Self: Foo<S, T, U>) :- Implemented(Self: Foo<S, T, U>), Implemented(U: std::marker::Sized).\n\n"}
[00:43:31] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:43:31] ------------------------------------------
[00:43:31] 
[00:43:31] thread '[ui] ui/chalkify/lower_trait.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:2965:9
[00:43:31] 
[00:43:31] 
[00:43:31] ---- [ui] ui/chalkify/lower_trait_higher_rank.rs stdout ----
[00:43:31]  diff of stderr:
[00:43:31] 
[00:43:31] 8    = note: FromEnv(F: std::marker::Sized) :- FromEnv(Self: Foo<F>).
[00:43:31] 9    = note: FromEnv(F: std::ops::Fn<(&'a (u8, u16),)>) :- FromEnv(Self: Foo<F>).
[00:43:31] 10    = note: Implemented(Self: Foo<F>) :- FromEnv(Self: Foo/test/ui/chalkify/lower_trait_higher_rank.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[00:43:31] ------------------------------------------
[00:43:31] 
[00:43:31] ------------------------------------------
[00:43:31] stderr:
[00:43:31] stderr:
[00:43:31] ------------------------------------------
[00:43:31] {"message":"program clause dump","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/chalkify/lower_trait_higher_rank.rs","byte_start":493,"byte_end":522,"line_start":13,"line_end":13,"column_start":1,"column_end":30,"is_primary":true,"text":[{"text":"#[rustc_dump_program_clauses] //~ ERROR program clause dump","highlight_start":1,"highlight_end":30}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[{"message":"FromEnv(<F as std::ops::FnOnce<(&'a (u8, u16),)>>::Output == &'a u8) :- FromEnv(Self: Foo<F>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"FromEnv(F: std::marker::Sized) :- FromEnv(Self: Foo<F>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"FromEnv(F: std::ops::Fn<(&'a (u8, u16),)>) :- FromEnv(Self: Foo<F>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"Implemented(Self: Foo<F>) :- FromEnv(Self: Foo<F>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"WellFormed(Self: Foo<F>) :- Implemented(Self: Foo<F>), Implemented(F: std::marker::Sized).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"WellFormed(Self: Foo<F>) :- Implemented(Self: Foo<F>), forall<> { Implemented(F: std::ops::Fn<(&'a (u8, u16),)>) }.","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"WellFormed(Self: Foo<F>) :- Implemented(Self: Foo<F>), forall<> { ProjectionEq(<F as std::ops::FnOnce<(&'a (u8, u16),)>>::Output == &'a u8) }.","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: program clause dump\n  --> /checkout/src/test/ui/chalkify/lower_trait_higher_rank.rs:13:1\n   |\nLL | #[rustc_dump_program_clauses] //~ ERROR program clause dump\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: FromEnv(<F as std::ops::FnOnce<(&'a (u8, u16),)>>::Output == &'a u8) :- FromEnv(Self: Foo<F>).\n   = note: FromEnv(F: std::marker::Sized) :- FromEnv(Self: Foo<F>).\n   = note: FromEnv(F: std::ops::Fn<(&'a (u8, u16),)>) :- FromEnv(Self: Foo<F>).\n   = note: Implemented(Self: Foo<F>) :- FromEnv(Self: Foo<F>).\n   = note: WellFormed(Self: Foo<F>) :- Implemented(Self: Foo<F>), Implemented(F: std::marker::Sized).\n   = note: WellFormed(Self: Foo<F>) :- Implemented(Self: Foo<F>), forall<> { Implemented(F: std::ops::Fn<(&'a (u8, u16),)>) }.\n   = note: WellFormed(Self: Foo<F>) :- Implemented(Self: Foo<F>), forall<> { ProjectionEq(<F as std::ops::FnOnce<(&'a (u8, u16),)>>::Output == &'a u8) }.\n\n"}
[00:43:31] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:43:31] ------------------------------------------
[00:43:31] 
[00:43:31] thread '[ui] ui/chalkify/lower_trait_higher_rank.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:2965:9
[00:43:31] 
[00:43:31] 
[00:43:31] ---- [ui] ui/chalkify/lower_trait_where_clause.rs stdout ----
[00:43:31]  diff of stderr:
[00:43:31] 
[00:43:31] 11    = note: Implemented(Self: Foo<'a, 'b, S, T, U>) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).
[00:43:31] 12    = note: RegionOutlives('a : 'b) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).
[00:43:31] 13    = note: TypeOutlives(U : 'b) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).
[00:43:31] +    = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), Implemented(S: std::fmt::Debug).
[00:43:31] +    = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), Implemented(S: std::marker::Sized).
[00:43:31] +    = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), Implemented(T: std::borrow::Borrow<U>).
[00:43:31] +    = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), Implemented(T: std::marker::Sized).
[00:43:31] +    = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), RegionOutlives('a : 'b).
[00:43:31] +    = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), TypeOutlives(U : 'b).
[00:43:31] 15 error: aborting due to previous error
[00:43:31] 16 
[00:43:31] 
[00:43:31] 
[00:43:31] 
[00:43:31] The actual stderr differed from the expected stderr.
[00:43:31] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/chalkify/lower_trait_where_clause.stderr
[00:43:31] To update references, run this command from build directory:
[00:43:31] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'chalkify/lower_trait_where_clause.rs'
[00:43:31] 
[00:43:31] error: 1 errors occurred comparing output.
[00:43:31] status: exit code: 101
[00:43:31] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/chalkify/lower_trait_where_clause.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/chalkify/lower_trait_where_clause.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-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/chalkify/lower_trait_where_clause.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[00:43:31] ------------------------------------------
[00:43:31] 
[00:43:31] ------------------------------------------
[00:43:31] stderr:
[00:43:31] stderr:
[00:43:31] ------------------------------------------
[00:43:31] {"message":"program clause dump","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/chalkify/lower_trait_where_clause.rs","byte_start":551,"byte_end":580,"line_start":16,"line_end":16,"column_start":1,"column_end":30,"is_primary":true,"text":[{"text":"#[rustc_dump_program_clauses] //~ ERROR program clause dump","highlight_start":1,"highlight_end":30}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[{"message":"FromEnv(S: std::fmt::Debug) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"FromEnv(S: std::marker::Sized) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"FromEnv(T: std::borrow::Borrow<U>) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"FromEnv(T: std::marker::Sized) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"Implemented(Self: Foo<'a, 'b, S, T, U>) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"RegionOutlives('a : 'b) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"TypeOutlives(U : 'b) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), Implemented(S: std::fmt::Debug).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), Implemented(S: std::marker::Sized).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), Implemented(T: std::borrow::Borrow<U>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implema, 'b, S, T, U>), Implemented(T: std::borrow::Borrow<U>).\n   = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), Implemented(T: std::marker::Sized).\n   = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), RegionOutlives('a : 'b).\n   = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), TypeOutlives(U : 'b).\n\n"}
[00:43:31] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:43:31] ------------------------------------------
[00:43:31] 
[00:43:31] thread '[ui] ui/chalkify/lower_trait_where_clause.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:2965:9
[00:43:31] 
---
[00:43:31] 
[00:43:31] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:488:22
[00:43:31] 
[00:43:31] 
[00:43:31] 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-3.9/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpath -O -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" "3.9.1\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[00:43:31] 
[00:43:31] 
[00:43:31] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:43:31] Build completed unsuccessfully in 0:02:19
[00:43:31] Build completed unsuccessfully in 0:02:19
[00:43:31] make: *** [check] Error 1
[00:43:31] Makefile:58: recipe for target 'check' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:133c8a35
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
149620 ./.git/modules
149616 ./.git/modules/src
149112 ./src/llvm-emscripten/test
123716 ./obj/build/bootstrap/debug/incremental/bootstrap-1wl4zjaz72e5d
123712 ./obj/build/bootstrap/debug/incremental/bootstrap-1wl4zjaz72e5d/s-f0nfzdy1il-9p8v43-1ujokh614sjd2
116500  ./obj/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib
71000 ./.git/modules/src/tools
70976 ./obj/build/x86_64-unknown-linux-gnu/native
70488 ./obj/build/x86_64-unknown-linux-gnu/stage0-rustc
70300 ./obj/build/x86_64-unknown-linux-gnu/native/jemalloc
70300 ./obj/build/x86_64-unknown-linux-gnu/native/jemalloc
68772 ./src/llvm/lib
65412 ./src/llvm-emscripten/test/CodeGen
60840 ./src/llvm-emscripten/lib
56088 ./obj/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/bin
55348 ./obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release
53568 ./obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release/build
53520 ./obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/incremental/syntax-284je5yviillk
53516 ./obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/incremental/syntax-284je5yviillk/s-f0nh20oflf-1kr01lw-1sbjlj4g8q538
47824 ./obj/build/x86_64-unknown-linux-gnu/stage0-std
46848 ./src/test
46828 ./obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps
46660 ./obj/build/x86_64-unknown-linux-gnu/stage0-std/release

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
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (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.
travis_time:start:test_ui
Check compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:43:20] 
[00:43:20] running 1380 tests
[00:43:25] ...........................................................F.FFF..................i.................
[00:43:34] ....................................................................................................
[00:43:38] ....................................................................................................
[00:43:41] ....................................................................................................
[00:43:45] ....................................................................................................
[00:43:45] ....................................................................................................
[00:43:51] ....................................................................................................
[00:43:57] ....................................................................................................
[00:44:02] ....................................................................................................
[00:44:09] .....................................i..............................................................
[00:44:14] .............i......................................................................................
[00:44:20] ...............................ii...................................................................
[00:44:27] ....................................................................................................
lemented(Self: Bar) :- FromEnv(Self: Bar).
[00:44:32] 20    = note: Implemented(Self: Foo) :- FromEnv(Self: Foo).
[00:44:32] 21    = note: Implemented(Self: std::marker::Sized) :- FromEnv(Self: std::marker::Sized).
[00:44:32] +    = note: WellFormed(Self: Bar) :- Implemented(Self: Bar), WellFormed(Self: Bar).
[00:44:32] +    = note: WellFormed(Self: Bar) :- Implemented(Self: Bar), WellFormed(Self: Foo).
[00:44:32] 23 error: aborting due to 2 previous errors
[00:44:32] 24 
[00:44:32] 
[00:44:32] 
[00:44:32] 
[00:44:32] The actual stderr differed from the expected stderr.
[00:44:32] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/chalkify/lower_env1.stderr
[00:44:32] To update references, run this command from build directory:
[00:44:32] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'chalkify/lower_env1.rs'
[00:44:32] error: 1 errors occurred comparing output.
[00:44:32] status: exit code: 101
[00:44:32] status: exit code: 101
[00:44:32] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/chalkify/lower_env1.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/chalkify/lower_env1.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-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/chalkify/lower_env1.stage2-x86_64-unknown-linux-gnu.aux" "-Ao) :- FromEnv(Self: Bar).\n   = note: Implemented(Self: Bar) :- FromEnv(Self: Bar).\n   = note: WellFormed(Self: Bar) :- Implemented(Self: Bar), WellFormed(Self: Bar).\n   = note: WellFormed(Self: Bar) :- Implemented(Self: Bar), WellFormed(Self: Foo).\n\n"}
[00:44:32] {"message":"program clause dump","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/chalkify/lower_env1.rs","byte_start":620,"byte_end":653,"line_start":19,"line_end":19,"column_start":1,"column_end":34,"is_primary":true,"text":[{"text":"#[rustc_dump_env_program_clauses] //~ ERROR program clause dump","highlight_start":1,"highlight_end":34}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[{"message":"FromEnv(Self: Bar) :- FromEnv(Self: Bar).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"FromEnv(Self: Foo) :- FromEnv(Self: Bar).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"Implemented(Self: Bar) :- FromEnv(Self: Bar).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"Implemented(Self: Foo) :- FromEnv(Self: Foo).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"Implemented(Self: std::marker::Sized) :- FromEnv(Self: std::marker::Sized).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"WellFormed(Self: Bar) :- Implemented(Self: Bar), WellFormed(Self: Bar).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"WellFormed(Self: Bar) :- Implemented(Self: Bar), WellFormed(Self: Foo).","code":null,"level":"note","spans":[],"chil----------------------
[00:44:32] ------------------------------------------
[00:44:32] ------------------------------------------
[00:44:32] {"message":"program clause dump","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/chalkify/lower_trait.rs","byte_start":493,"byte_end":522,"line_start":13,"line_end":13,"column_start":1,"column_end":30,"is_primary":true,"text":[{"text":"#[rustc_dump_program_clauses] //~ ERROR program clause dump","highlight_start":1,"highlight_end":30}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[{"message":"FromEnv(S: std::marker::Sized) :- FromEnv(Self: Foo<S, T, U>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"FromEnv(T: std::marker::Sized) :- FromEnv(Self: Foo<S, T, U>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"FromEnv(U: std::marker::Sized) :- FromEnv(Self: Foo<S, T, U>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"Implemented(Self: Foo<S, T, U>) :- FromEnv(Self: Foo<S, T, U>).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"WellFormed(Self: Foo<S, T, U>) :- Implemented(Self: Foo<S, T, U>), WellFormed(S: std::marker::Sized).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"WellFormed(Self: Foo<S, T, U>) :- Implemented(Self: Foo<S, T, U>), WellFormed(T: std::marker::Sized).","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"WellFormed(Self: Foo<S, T, U>) :- Implemented(Self: Foo<S, T, U>), WellFormed(U: std::marker::Sized).","code":null,"level":"note","spans":[],"chiltput == &'a u8) }.","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"WellFormed(Self: Foo<F>) :- Implemented(Self: Foo<F>), forall<> { WellFormed(F: std::ops::Fn<(&'a (u8, u16),)>) }.","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: program clause dump\n  --> /checkout/src/test/ui/chalkify/lower_trait_higher_rank.rs:13:1\n   |\nLL | #[rustc_dump_program_clauses] //~ ERROR program clause dump\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: FromEnv(<F as std::ops::FnOnce<(&'a (u8, u16),)>>::Output == &'a u8) :- FromEnv(Self: Foo<F>).\n   = note: FromEnv(F: std::marker::Sized) :- FromEnv(Self: Foo<F>).\n   = note: FromEnv(F: std::ops::Fn<(&'a (u8, u16),)>) :- FromEnv(Self: Foo<F>).\n   = note: Implemented(Self: Foo<F>) :- FromEnv(Self: Foo<F>).\n   = note: WellFormed(Self: Foo<F>) :- Implemented(Self: Foo<F>), WellFormed(F: std::marker::Sized).\n   = note: WellFormed(Self: Foo<F>) :- Implemented(Self: Foo<F>), forall<> { WellFormed(<F as std::ops::FnOnce<(&'a (u8, u16),)>>::Output == &'a u8) }.\n   = note: WellFormed(Self: Foo<F>) :- Implemented(Self: Foo<F>), forall<> { WellFormed(F: std::ops::Fn<(&'a (u8, u16),)>) }.\n\n"}
[00:44:32] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:44:32] ------------------------------------------
[00:44:32] 
[00:44:32] thread '[ui] ui/chalkify/lower_trait_higher_rank.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:2965:9
[00:44:32] 
[00:44:32] 
[00:44:32] ---- [ui] ui/chalkify/lower_trait_where_clause.rs stdout ----
[00:44:32]  diff of stderr:
[00:44:32] 
[00:44:32] 11    = note: Implemented(Self: Foo<'a, 'b, S, T, U>) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).
[00:44:32] 12    = note: RegionOutlives('a : 'b) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).
[00:44:32] 13    = note: TypeOutlives(U : 'b) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).
[00:44:32] +    = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), RegionOutlives('a : 'b).
[00:44:32] +    = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), TypeOutlives(U : 'b).
[00:44:32] +    = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), WellFormed(S: std::fmt::Debug).
[00:44:32] +    = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), WellFormed(S: std::marker::Sized).
[00:44:32] +    = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), WellFormed(T: std::borrow::Borrow<U>).
[00:44:32] +    = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), WellFormed(T: std::marker::Sized).
[00:44:32] 15 error: aborting due to previous error
[00:44:32] 16 
[00:44:32] 
[00:44:32] 
[00:44:32] 
[00:44:32] The actual stderr differed from the expected stderr.
[00:44:32] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/chalkify/lower_trait_where_clause.stderr
[00:44:32] To update references, run this command from build directory:
[00:44:32] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'chalkify/lower_trait_where_clause.rs'
[00:44:32] 
[00:44:32] error: 1 errors occurred comparing output.
[00:44:32] status: exit code: 101
[00:44:32] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/chalkify/lower_trait_where_clause.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/chalkify/lower_trait_where_clause.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-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/chalkify/lower_trait_where_clause.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[00:44:32] ------------------------------------------
[00:44:32] 
[00:44:32] ------------------------------------------
[00:44:32] stderr:
[00:44:32] stderr:
[00:44:32] ------------------------------------------
[00:44:32] {"message":"program clause dump","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/chalkify/lower_trait_where_clause.rs","byte_start":551,"byte_end":580,"line_start":16,"line_end":16,"column_start":1,"column_end":30,"is_primary":true,"text":[{"text":"#[rustc_dump_program_clauses] //~ ERROR program clause dump","highlight_start":1,"highlight_end":30}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[{"message":"FromEnv(S: std::fmt::Debug) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).","code":null,"level":"note","spaead https://google.com | grep ^Date: | sed 's/Date: //g' || true)
travis_fold:start:after_failure.1
travis_time:start:0173fd24

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)

@csmoe csmoe changed the title [WIP] Chalk lowering rule: WellFormed-TraitRef Chalk lowering rule: WellFormed-TraitRef May 2, 2018
@nikomatsakis nikomatsakis added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 2, 2018
@nikomatsakis
Copy link
Contributor

@bors delegate=scalexm

I'm just super overloaded on reviews right now, so delegating this one to @scalexm, even though it looks pretty easy. =) @scalexm if that's not something you have time for, let me know!

@bors
Copy link
Contributor

bors commented May 2, 2018

✌️ @scalexm can now approve this pull request

/// Used for lowered where clauses (see rustc guide).
trait IntoFromEnvGoal {
trait IntoGoal {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: could we have two traits IntoFromEnvGoal and IntoWellFormedGoal instead of just one? I find the name IntoGoal not very informative.

fn into_from_env_goal(self) -> Self;
// Transforms an existing goal into a WellFormed goal.
fn into_wellformed_goal(self) -> Self;
Copy link
Member

Choose a reason for hiding this comment

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

Very nit: well_formed is how we snake-casify WellFormed in chalk, so I'd like into_well_formed_goal for consistency :)


// WellFormed(Self: Trait<P1..Pn>)
let wellformed_trait = DomainGoal::WellFormed(WhereClauseAtom::Implemented(trait_pred));
// Impemented(Self: Trait<P1..Pn>)
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Impemented -> Implemented

// For each where clause WC:
// forall<Self, P1..Pn> {
// WellFormed(Self: Trait<P1..Pn>) :- Implemented(Self: Trait<P1..Pn>) && WellFormed(WC)
// }
Copy link
Member

Choose a reason for hiding this comment

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

Actually the guide is a bit misleading here, WC should represent the full set of where clauses e.g. you have WC := WC1, WC2, ..., WCn and we want to output only one clause which is:

WellFormed(Self: Trait<P1..Pn>) :-
    Implemented(Self: Trait<P1..Pn>) && WC1 && ... && WCn

Copy link
Member

Choose a reason for hiding this comment

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

(So you should change your code logic a bit)

Copy link
Member Author

@csmoe csmoe May 4, 2018

Choose a reason for hiding this comment

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

@scalexm

Implemented(Self: Trait<P1..Pn>) && WC1 && ... && WCn
                                    ^^^ = should this be WellFormed(WC1)?

Since the wellformed guide says:

T: Trait is well-formed if (a) T: Trait is implemented and (b) all the where-clauses declared on Trait are well-formed

Thus do you mean this(merge all the WellFormed(WC_1...n) inside one clause instead of split them like current test/ui output below)?

Currently(copy from ui test output)

   = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), RegionOutlives('a : 'b).
   = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), TypeOutlives(U : 'b).
   = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), WellFormed(S: std::fmt::Debug).
   = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), WellFormed(S: std::marker::Sized).
   = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), WellFormed(T: std::borrow::Borrow<U>).
   = note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(Self: Foo<'a, 'b, S, T, U>), WellFormed(T: std::marker::Sized).

After=>

= note: WellFormed(Self: Foo<'a, 'b, S, T, U>) :- Implemented(...), ..., WellFormed(WC1) , ..., WellFormed(WCn).

Copy link
Member

Choose a reason for hiding this comment

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

Yes absolutely, merge all into one clause (and yes you’re right about WellFormed(WC1), ..., WellFormed(WCn)

@TimNN TimNN added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 8, 2018
@bors
Copy link
Contributor

bors commented May 10, 2018

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

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (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.
  Downloading https://files.pythonhosted.org/packages/b7/31/05c8d001f7f87f0f07289a5fc0fc3832e9a57f2dbd4d3b0fee70e0d51365/jmespath-0.9.3-py2.py3-none-any.whl
Collecting python-dateutil<3.0.0,>=2.1; python_version >= "2.7" (from botocore==1.10.17->awscli)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/cf/f5/af2b09c957ace60dcfac112b669c45c8c97e32f94aa8b56da4c6d1682825/python_dateutil-2.7.3-py2.py3-none-any.whl (211kB)
    4% |█▌                              | 10kB 45.3MB/s eta 0:00:01
    9% |███                             | 20kB 40.3MB/s eta 0:00:01
    14% |████▋                           | 30kB 45.8MB/s eta 0:00:01
    19% |██████▏                         | 40kB 48.4MB/s eta 0:00:01
---
[00:17:55]    Compiling rustc_traits v0.0.0 (file:///checkout/src/librustc_traits)
[00:17:56] error[E0282]: type annotations needed
[00:17:56]    --> librustc_traits/lowering.rs:258:9
[00:17:56]     |
[00:17:56] 258 |     let wellformed_clauses = where_clauses[1..]
[00:17:56]     |         |
[00:17:56]     |         cannot infer type for `_`
[00:17:56]     |         cannot infer type for `_`
[00:17:56]     |         consider giving `wellformed_clauses` a type
[00:17:56] 
[00:17:56] error[E0599]: no method named `into_wellformed_goal` found for type `rustc::traits::DomainGoal<'_>` in the current scope
[00:17:56]    --> librustc_traits/lowering.rs:301:64
[00:17:56]     |
[00:17:56] 301 |     let wellformed_wc = where_clause.lower().map_bound(|wc| wc.into_wellformed_goal());
[00:17:56] 
[00:17:56] error: aborting due to 2 previous errors
[00:17:56] 
[00:17:56] Some errors occurred: E0282, E0599.
[00:17:56] Some errors occurred: E0282, E0599.
[00:17:56] For more information about an error, try `rustc --explain E0282`.
[00:17:56] error: Could not compile `rustc_traits`.
[00:17:56] 
[00:17:56] Caused by:
[00:17:56]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name rustc_traits librustc_traits/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=3 -C metadata=21a43c459e5c4f83 -C extra-filename=-21a43c459e5c4f83 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps --extern graphviz=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libgraphviz-21ce4bd19908f0cc.so --extern rustc_data_structures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_data_structures-f456f53371aa074c.so --extern syntax_pos=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax_pos-b9901acb1e9e6766.so --extern rustc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc-dec7324c263ceb0f.so --extern bitflags=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libbitflags-401bddd0d1809e53.rlib --extern log=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblog-4f0866e958f59455.rlib --extern syntax=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax-566a8d95e6a18781.so -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/backtrace-sys-ffd9dcc5ce13143f/out/.libs -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/miniz-sys-41d448831c9d08f1/out` (exit code: 101)
[00:19:21] error: build failed
[00:19:21] error: build failed
[00:19:21] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "--release" "--locked" "--color" "always" "--features" " jemalloc" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:19:21] expected success, got: exit code: 101
[00:19:21] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9
[00:19:21] travis_fold:end:stage0-rustc

[00:19:21] travis_time:end:stage0-rustc:start=1525961030619140234,finish=1525961896673188150,duration=866054047916


[00:19:21] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:19:21] Build completed unsuccessfully in 0:14:41
[00:19:21] make: *** [all] Error 1
[00:19:21] Makefile:28: recipe for target 'all' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:21309462
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
The command "date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
" exited with 0.
travis_fold:start:after_failure.1
travis_time:start:2332a1a2
$ echo "#### Build failed; Disk usagry/Logs/DiagnosticReports/: No such file or directory
travis_fold:end:after_failure.2
travis_fold:start:after_failure.3
travis_time:start:17f81f6a
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true

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)

@nikomatsakis
Copy link
Contributor

This is now unblocked as #51895 has landed. It just needs to be rebased. @csmoe -- think you can do that?

(Also, note that you may need to use predicates_defined_on to get the predicates for a trait.)

@kennytm kennytm added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Jul 4, 2018
@csmoe
Copy link
Member Author

csmoe commented Jul 4, 2018

@nikomatsakis more commits soon.

@rust-highfive

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@csmoe csmoe added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 8, 2018
@scalexm
Copy link
Member

scalexm commented Jul 9, 2018

@bors r+

@bors
Copy link
Contributor

bors commented Jul 9, 2018

📌 Commit 37c5c0b has been approved by scalexm

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

bors commented Jul 9, 2018

⌛ Testing commit 37c5c0b with merge 9bd8458...

bors added a commit that referenced this pull request Jul 9, 2018
Chalk lowering rule: WellFormed-TraitRef

Address chalk lowering "Implemented-From-Env" as part of #49177.
r? @nikomatsakis
@bors
Copy link
Contributor

bors commented Jul 9, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: scalexm
Pushing 9bd8458 to master...

@bors bors merged commit 37c5c0b into rust-lang:master Jul 9, 2018
@csmoe csmoe deleted the wf_traitref branch July 13, 2018 08:43
@tmandry tmandry added the WG-traits Working group: Traits, https://internals.rust-lang.org/t/announcing-traits-working-group/6804 label May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. WG-traits Working group: Traits, https://internals.rust-lang.org/t/announcing-traits-working-group/6804
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants