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

2093 infer outlives requirements #50070

Merged
merged 1 commit into from
May 26, 2018
Merged

Conversation

toidiu
Copy link
Contributor

@toidiu toidiu commented Apr 19, 2018

Tracking issue: #44493
RFC: rust-lang/rfcs#2093

  • add rustc_attrs flag
  • use RequirePredicates type
  • handle explicit predicates on dyn Trait
  • handle explicit predicates on projections
  • more tests
  • remove unused, dead_code and etc..
  • documentation

@toidiu
Copy link
Contributor Author

toidiu commented Apr 19, 2018

r? @nikomatsakis

@pietroalbini pietroalbini added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 19, 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:56:49] ....i...................................................................................test [run-pass] run-pass/mir_heavy_promoted.rs has been running for over 60 seconds
[00:56:56] ............
[00:57:29] ....................................................................................................
[00:57:59] ......................................................................ii............................
[00:58:51] .................................i....................................................i.ii.....test [run-pass] run-pass/saturating-float-casts.rs has been running for over 60 seconds
[00:59:37] ..............................................................................................iiiiii
[01:00:05] i...................................................................................................
[01:00:36] ....................................................................................................
[01:00:59] ....................................................................................................
---
[01:02:59] ....................................................................................................
[01:03:12] ....................................................................................................
[01:03:21] ....i...............................................................................................
[01:03:30] ........i..ii.......................................................................................
[01:03:40] ......................F.............................................................................
[01:03:59] ..........................................................................i.........................
[01:04:10] ....................i...............................................................................
[01:04:21] ....................................................................................................
[01:04:30] ....................................................................................................
[01:04:30] ....................................................................................................
[01:04:40] ....................................................................................................
cted success, got: exit code: 101
[01:04:42] 
[01:04:42] 
[01:04:42] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:04:42] Build completed unsuccessfully in 0:18:52
[01:04:42] make: *** [check] Error 1
[01:04:42] Makefile:58: recipe for target 'check' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:025c418d
$ 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)



#[rustc_outlives]
struct Foo<'a, T> { //~ ERROR 17:1: 20:2: [Binder(OutlivesPredicate(T, ReEarlyBound(0, 'a)))]
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: you might prefer to have the "error message" be something very simple, like "rustc_outlives", and add the details via calls to note. this way, the //~ ERROR can be short and sweet, and the details are in the stderr file

@@ -0,0 +1,21 @@
error: ["/'a : /'a", "U : /'a"]
Copy link
Contributor

Choose a reason for hiding this comment

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

The \ here is unfortunate -- where does that come from...?

Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

Looking good! Left a few notes.

.collect();

tcx.sess
.span_err(tcx.def_span(item_def_id), &format!("{:?}", &pred));
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I guess the \ somehow comes from this {:?}. I think i'd change this to:

let mut err = tcx.sess.span_err(..., "rustc_outlives");
for p in &pred {
    err.note(p);
}
err.emit();

LL | | }
| |_^

error[E0640]: [Binder(OutlivesPredicate(ReEarlyBound(0, 'a), ReEarlyBound(0, 'a))), Binder(OutlivesPredicate(U, ReEarlyBound(0, 'a)))]
Copy link
Contributor

Choose a reason for hiding this comment

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

doesn't really matter, but during inference we should probably filter out identity predicates like 'a: 'a, just for efficiency / to make things easier to read

@nikomatsakis nikomatsakis 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 Apr 25, 2018
@bors
Copy link
Contributor

bors commented Apr 25, 2018

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

@@ -0,0 +1,4 @@
error: internal compiler error: librustc/ty/subst.rs:493: Type parameter `T/#2` (T/2) out of range when substituting (root type=Some(T)) substs=[ReEarlyBound(0, 'x)]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nikomatsakis Not sure how to tackle this error. From some debugging it seems like we are trying to infer Box: 'x here. Here is a pastebin link to my debug logs. https://pastebin.com/3fMkHPjb

These are the new debug statements I added: https://github.com/rust-lang/rust/pull/50070/files#diff-a43200d3360f31959b9f923bc33ed1edR251

// type `ty`. `ty` is being passes here as
// a dummy value since there is no concrete
// `Self` for a dyn Trait at this stage.
ex_trait_ref.with_self_ty(tcx, ty).substs(),
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@toidiu toidiu force-pushed the ak-2093-outlives branch 2 times, most recently from a31f9f6 to f8639a1 Compare May 3, 2018 04:07
debug!("predicate = {:?}", &predicate);

// FIXME explain why its ok to ignore Self.
if let (Some(self_ty), UnpackedKind::Type(ty)) = (ignore_self_ty, predicate.0.unpack())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nikomatsakis I need some help with explaining why its ok to ignore Self here.


Even though I am passing in Self and I was thinking more on our conversation about the different ways we could infer for TyDynamic:

  • pass Self and dont infer
  • pass self, infer and then remove Self predicates
  • pass a Fake ty and dont worry about inferring

The 'Fake ty' seems like the cleanest choice since it will never be in explicit_map. By using Self or any other type, we need to mentally check and comment why its ok to not infer.

Copy link
Contributor

@nikomatsakis nikomatsakis May 3, 2018

Choose a reason for hiding this comment

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

This isn't quite what I had in mind. I was thinking more something like this:

  • ignore_self_ty would be a boolean
  • we would do:
if let Some(explicit_predicates) = explicit_map.get(def_id) {
  for outlives_predicate in explicit_predicates.iter() {
    // Careful: If we are inferring the effects of a `dyn Trait<..>`
    // type, then when we look up the predicates for `Trait`,
    // we may find some that reference `Self`. e.g., perhaps the
    // definition of `Trait` was:
    //
    // ```
    // trait Trait<'a, T> where Self: 'a  { .. }
    // ```
    //
    // we want to ignore such predicates here, because
    // there is no type parameter for them to affect. Consider
    // a struct containing `dyn Trait`:
    //
    // ```
    // struct MyStruct<'x, X> { field: Box<dyn Trait<'x, X>> }
    // ```
    //
    // The `where Self: 'a` predicate refers to the *existential, hidden type*
    // that is represented by the `dyn Trait`, not to the `X` type parameter
    // (or any other generic parameter) declared on `MyStruct`.
    //
    // Note that we do this check for self **before** applying `substs`. In the
    // case that `substs` come from a `dyn Trait` type, our caller will have
    // included `Self = dyn Trait<'x, X>` as the value for `Self`. If we were to apply
    // the substs, and not filter this predicate, we might then falsely conclude
    // that e.g. `X: 'x` was a reasonable inferred requirement.
    if let UnpackedKind::Type(ty) = predicate.0.unpack() {
        if ignore_self_ty && ty.is_self() {
            continue;
        }
    }

    let predicate = outlives_predicate.subst(tcx, substs);
    ... // as before
}

// to apply the substs, and not filter this predicate, we might then falsely
// conclude that e.g. `X: 'x` was a reasonable inferred requirement.
if let UnpackedKind::Type(ty) = predicate.0.unpack() {
if ty.is_self() && ignore_self_ty {
Copy link
Contributor Author

@toidiu toidiu May 8, 2018

Choose a reason for hiding this comment

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

@nikomatsakis think we should have a test for ignore_self_ty and that it should be work for dyn but not for other things. I'll have some time this week to look at things.

@toidiu
Copy link
Contributor Author

toidiu commented May 8, 2018

  • I added some documentation.. not sure if I need more for this pr.

  • Any other tests come to mind?

  • The predicates produce self referential predicates eg. 'x: 'x which we might want to filter out.

  • I have noticed that the predicates are also not in the same order each time, not sure if that is of concern (makes testing difficult because of varying error message).

@nikomatsakis
Copy link
Contributor

@toidiu

I have noticed that the predicates are also not in the same order each time, not sure if that is of concern (makes testing difficult because of varying error message).

Seems like a problem — this will mess with incremental compilation too. I wonder why that is. Usually it's due to a use of a hashmap somewhere (instead of a FxHashMap).

// included `Self = dyn Trait<'x, X>` as the value for `Self`. If we were
// to apply the substs, and not filter this predicate, we might then falsely
// conclude that e.g. `X: 'x` was a reasonable inferred requirement.
if let UnpackedKind::Type(ty) = predicate.0.unpack() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is checking predicate, which is after substitution, but it should be checking outlives_predicate -- before substitution.


let span = tcx.def_span(item_def_id);
let mut err = tcx.sess.struct_span_err(span, "rustc_outlives");
for p in &pred {
Copy link
Contributor

Choose a reason for hiding this comment

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

Put a pred.sort() before this to get deterministic testing order


crate_map
let predicates = crate_map
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I think the order problem comes from the fact that this is a hashmap here, and hence iteration order is undefined. That's.. probably good news, because I think its effects should be limited? In any case, for the test output, I would sort the vec of strings (see comment below).

@nikomatsakis
Copy link
Contributor

I'm wondering though if the non-deterministic ordering will be a problem when we read the results of inference in the predicates_of query. Don't we construct a vector there?

@nikomatsakis
Copy link
Contributor

In that case, we could either use a BTreeSet (but things may not impl Ord...?) or else make RequiredPredicates also keep a vector so we can preserve insertion order (which ought to be deterministic). It's annoying that there is no hashmap that does that to my knowledge.

@toidiu
Copy link
Contributor Author

toidiu commented May 11, 2018

@nikomatsakis
I am inclined to go the BTreeSet route and implement Ord for OutlivesPredicate. It seems a more direct way to implement sorting than keeping a Vec with sort order.

Going to take a stab at that this weekend and see if I run into any road blocks.

@nikomatsakis
Copy link
Contributor

@toidiu I agree that makes sense. Implementing Ord would be convenient sometimes; I can't think of an immediate reason that it's a problem, presuming we implement it not based on the pointer value but rather the "sty" fields.

(cc @eddyb -- I also asked on IRC)

@toidiu toidiu force-pushed the ak-2093-outlives branch from 09db988 to 6945750 Compare May 20, 2018 03:49
@toidiu
Copy link
Contributor Author

toidiu commented May 20, 2018

@nikomatsakis implemented Ord in the following two commits. If the implementation looks ok I am going to rebase and get it ready for merge.

d624da8
6945750

@kennytm kennytm 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 20, 2018
@@ -30,7 +31,7 @@ use std::num::NonZeroUsize;
/// To reduce memory usage, a `Kind` is a interned pointer,
/// with the lowest 2 bits being reserved for a tag to
/// indicate the type (`Ty` or `Region`) it points to.
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Hash)]
Copy link
Member

Choose a reason for hiding this comment

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

I don't really think PartialOrd deriving calls into Ord::cmp, but rather it compares the fields.
So when you need a custom impl for Ord, you also need to implement PartialOrd.
But if you have Ord::cmp, you can just call it from PartialOrd::partial_cmp.

@toidiu toidiu force-pushed the ak-2093-outlives branch 2 times, most recently from 33811e6 to 3ad9e55 Compare May 25, 2018 02:11
@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:07:25]    Compiling proc_macro v0.0.0 (file:///checkout/src/libproc_macro)
[00:07:44]    Compiling syntax_ext v0.0.0 (file:///checkout/src/libsyntax_ext)
[00:13:35]    Compiling rustc_typeck v0.0.0 (file:///checkout/src/librustc_typeck)
[00:13:35]    Compiling rustc_mir v0.0.0 (file:///checkout/src/librustc_mir)
[00:13:36] error[E0532]: expected tuple struct/variant, found struct `ty::Binder`
[00:13:36]   --> librustc_typeck/outlives/explicit.rs:53:45
[00:13:36]    |
[00:13:36] 53 |                 ty::Predicate::TypeOutlives(ty::Binder(ty::OutlivesPredicate(ty1, region2))) => {
[00:13:36]    |                                             ^^^^^^^^^^ did you mean `ty::Binder { /* fields */ }`?
[00:13:36] 
[00:13:36] error[E0532]: expected tuple struct/variant, found struct `ty::Binder`
[00:13:36]   --> librustc_typeck/outlives/explicit.rs:62:47
[00:13:36]    |
[00:13:36] 62 |                 ty::Predicate::RegionOutlives(ty::Binder(ty::OutlivesPredicate(
[00:13:36]    |                                               ^^^^^^^^^^ did you mean `ty::Binder { /* fields */ }`?
[00:13:36] 
[00:13:36] error[E0532]: expected tuple struct/variant, found struct `ty::Binder`
[00:13:36]   --> librustc_typeck/outlives/mod.rs:57:63
[00:13:36]    |
[00:13:36] 57 |                                 ty::Predicate::RegionOutlives(ty::Binder(p)) => {
[00:13:36]    |                                                               ^^^^^^^^^^ did you mean `ty::Binder { /* fields */ }`?
[00:13:36] 
[00:13:36] error[E0532]: expected tuple struct/variant, found struct `ty::Binder`
[00:13:36]   --> librustc_typeck/outlives/mod.rs:62:61
[00:13:36]    |
[00:13:36] 62 |                                 ty::Predicate::TypeOutlives(ty::Binder(p)) => {
[00:13:36]    |                                                             ^^^^^^^^^^ did you mean `ty::Binder { /* fields */ }`?
[00:13:36] 
[00:13:43] error[E0599]: no method named `substs` found for type `rustc::ty::Binder<rustc::ty::TraitRef<'_>>` in the current scope
[00:13:43]    --> librustc_typeck/outlives/implicit_infer.rs:211:60
[00:13:43]     |
[00:13:43] 211 |                         ex_trait_ref.with_self_ty(tcx, ty).substs(),
[00:13:43] 
[00:13:43] 
[00:13:43] error[E0599]: no method named `mk_param` found for type `rustc::ty::TyCtxt<'_, 'tcx, 'tcx>` in the current scope
[00:13:43]   --> librustc_typeck/outlives/utils.rs:80:48
[00:13:43]    |
[00:13:43] 80 |                         let ty: Ty<'tcx> = tcx.mk_param(param_ty.idx, param_ty.name);
[00:13:43] 
[00:13:43] error: aborting due to 6 previous errors
[00:13:43] 
[00:13:43] Some errors occurred: E0532, E0599.
[00:13:43] Some errors occurred: E0532, E0599.
[00:13:43] For more information about an error, try `rustc --explain E0532`.
[00:13:43] error: Could not compile `rustc_typeck`.
[00:13:43] 
[00:13:43] Caused by:
[00:13:43]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name rustc_typeck librustc_typeck/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=3 -C metadata=519dd0906e1389d3 -C extra-filename=-519dd0906e1389d3 --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 arena=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libarena-6f643d03661f77af.so --extern rustc_errors=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_errors-5c21a695e1301573.so --extern rustc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc-c7310be923214c6b.so --extern syntax_pos=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax_pos-2bee8f0c1e719b79.so --extern rustc_target=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_target-a7e6c70c1d8dd47c.so --extern fmt_macros=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libfmt_macros-c2f2c8c35b176352.so --extern rustc_platform_intrinsics=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_platform_intrinsics-a11aa962d27a56e4.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-a8f5cae0510be7d3.so --extern syntax=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax-cfccf57e1967c508.so --extern log=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblog-bde077c9625bcd15.rlib -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/backtrace-sys-f085762345e9053e/out/.libs -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/miniz-sys-c0082fee642cc0bf/out` (exit code: 101)
[00:16:25] error: build failed
[00:16:25] error: build failed
[00:16:25] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" " jemalloc" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:16:25] expected success, got: exit code: 101
[00:16:25] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9
[00:16:25] travis_fold:end:stage0-rustc

[00:16:25] travis_time:end:stage0-rustc:start=1527214856072572671,finish=1527215539351725181,duration=683279152510


[00:16:25] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:16:25] Build completed unsuccessfully in 0:11:35
[00:16:25] Makefile:28: recipe for target 'all' failed
[00:16:25] make: *** [all] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:02c27f25
$ 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)

@toidiu toidiu force-pushed the ak-2093-outlives branch from 3ad9e55 to a5b6561 Compare May 25, 2018 03:26
@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:58:51] ....................................................................................................
[00:58:56] ....................................................................................................
[00:59:04] ....................................................................................................
[00:59:09] ...i................................................................................................
[00:59:15] ..i..ii.............................................................................................
[00:59:22] .......................F............................................................................
[00:59:32] ...............................................................................i....................
[00:59:37] .........................i..........................................................................
[00:59:43] ....................................................................................................
[00:59:47] ....................................................................................................
---
[00:59:52] 
[00:59:52] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[00:59:52] 
[00:59:52] 
[00:59:52] 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/compile-fail" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "compile-fail" "--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:59:52] 
[00:59:52] 
[00:59:52] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:59:52] Build completed unsuccessfully in 0:14:22
[00:59:52] Build completed unsuccessfully in 0:14:22
[00:59:52] make: *** [check] Error 1
[00:59:52] Makefile:58: recipe for target 'check' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:29601156
$ 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)

Add tests, documentation and attr for feature.
@toidiu toidiu force-pushed the ak-2093-outlives branch from c2925c8 to 3da7123 Compare May 25, 2018 13:58
@toidiu
Copy link
Contributor Author

toidiu commented May 25, 2018

@nikomatsakis rebased to master and uses BTreeSet. This should be ready for merge I think.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented May 25, 2018

📌 Commit 3da7123 has been approved by nikomatsakis

@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 May 25, 2018
@bors
Copy link
Contributor

bors commented May 25, 2018

⌛ Testing commit 3da7123 with merge 25144e8183e0d9cc8d166c279be956a559a48359...

@bors
Copy link
Contributor

bors commented May 25, 2018

💔 Test failed - status-travis

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

The job dist-various-1 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_fold:end:dpl_0
travis_time:start:0b433a17
travis_fold:start:dpl.1
Installing deploy dependencies
ERROR:  Could not find a valid gem 'aws-sdk-resources' (= 2.11.57) in any repository
ERROR:  Possible alternatives: aws-sdk-resources
/home/travis/.rvm/rubies/ruby-2.2.7/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- dpl/provider/s3 (LoadError)
 from /home/travis/.rvm/rubies/ruby-2.2.7/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:59:in `require'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/provider.rb:92:in `rescue in block in new'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/provider.rb:67:in `block in new'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/cli.rb:41:in `fold'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/provider.rb:66:in `new'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/cli.rb:31:in `run'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/cli.rb:7:in `run'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/bin/dpl:5:in `<top (required)>'
 from /home/travis/.rvm/gems/ruby-2.2.7/bin/dpl:23:in `load'
 from /home/travis/.rvm/gems/ruby-2.2.7/bin/dpl:23:in `<main>'
failed to deploy

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)

1 similar comment
@rust-highfive
Copy link
Collaborator

The job dist-various-1 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_fold:end:dpl_0
travis_time:start:0b433a17
travis_fold:start:dpl.1
Installing deploy dependencies
ERROR:  Could not find a valid gem 'aws-sdk-resources' (= 2.11.57) in any repository
ERROR:  Possible alternatives: aws-sdk-resources
/home/travis/.rvm/rubies/ruby-2.2.7/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- dpl/provider/s3 (LoadError)
 from /home/travis/.rvm/rubies/ruby-2.2.7/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:59:in `require'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/provider.rb:92:in `rescue in block in new'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/provider.rb:67:in `block in new'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/cli.rb:41:in `fold'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/provider.rb:66:in `new'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/cli.rb:31:in `run'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/lib/dpl/cli.rb:7:in `run'
 from /home/travis/.rvm/gems/ruby-2.2.7/gems/dpl-1.9.6/bin/dpl:5:in `<top (required)>'
 from /home/travis/.rvm/gems/ruby-2.2.7/bin/dpl:23:in `load'
 from /home/travis/.rvm/gems/ruby-2.2.7/bin/dpl:23:in `<main>'
failed to deploy

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)

@kennytm
Copy link
Member

kennytm commented May 25, 2018

@bors retry

@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 May 25, 2018
@toidiu
Copy link
Contributor Author

toidiu commented May 25, 2018

@kennytm curious what caused this error? seems to me either bad cache or travis error?

@bors
Copy link
Contributor

bors commented May 26, 2018

⌛ Testing commit 3da7123 with merge 49a97ef...

bors added a commit that referenced this pull request May 26, 2018
2093 infer outlives requirements

Tracking issue:  #44493
RFC: rust-lang/rfcs#2093

- [x] add `rustc_attrs` flag
- [x] use `RequirePredicates` type
- [x]  handle explicit predicates on `dyn` Trait
- [x] handle explicit predicates on projections
- [x] more tests
- [x]  remove `unused`, `dead_code` and etc..
- [x]  documentation
@bors
Copy link
Contributor

bors commented May 26, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing 49a97ef to master...

@bors bors merged commit 3da7123 into rust-lang:master May 26, 2018
@toidiu toidiu deleted the ak-2093-outlives branch May 26, 2018 03:23
@kennytm
Copy link
Member

kennytm commented May 26, 2018

@toidiu This is #44159, caused by Amazon not releasing all gem together and Travis not pinning to a fixed release (not using a lock file).

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants