Skip to content
Permalink
Browse files

update test files to reflect new output

One surprise: old-lub-glb-object.rs, may indicate a bug
  • Loading branch information...
nikomatsakis committed Feb 20, 2019
1 parent 561ce44 commit 21e9478366423b899272f724e94c7b92a70c3ee6
Showing with 846 additions and 300 deletions.
  1. +12 −0 src/librustc/infer/region_constraints/leak_check.rs
  2. +11 −0 src/test/ui/anonymous-higher-ranked-lifetime.rs
  3. +175 −21 src/test/ui/anonymous-higher-ranked-lifetime.stderr
  4. +5 −3 src/test/ui/associated-types/associated-types-eq-hr.rs
  5. +76 −19 src/test/ui/associated-types/associated-types-eq-hr.stderr
  6. +10 −5 src/test/ui/associated-types/higher-ranked-projection.bad.stderr
  7. +1 −1 src/test/ui/associated-types/higher-ranked-projection.good.stderr
  8. +1 −1 src/test/ui/associated-types/higher-ranked-projection.rs
  9. +3 −3 src/test/ui/closure-expected-type/expect-fn-supply-fn.rs
  10. +41 −16 src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr
  11. +0 −14 src/test/ui/coherence/coherence-subtyping.old.stderr
  12. +0 −14 src/test/ui/coherence/coherence-subtyping.re.stderr
  13. +4 −2 src/test/ui/coherence/coherence-subtyping.rs
  14. +1 −1 src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr
  15. +12 −10 src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr
  16. +3 −3 src/test/ui/hr-subtype/hr-subtype.bound_a_vs_bound_a.stderr
  17. +3 −3 src/test/ui/hr-subtype/hr-subtype.bound_a_vs_bound_b.stderr
  18. +1 −1 src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr
  19. +12 −10 src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr
  20. +12 −10 src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr
  21. +3 −3 src/test/ui/hr-subtype/hr-subtype.bound_co_a_vs_bound_co_b.stderr
  22. +12 −10 src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr
  23. +1 −1 src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr
  24. +3 −3 src/test/ui/hr-subtype/hr-subtype.bound_inv_a_vs_bound_inv_b.stderr
  25. +3 −3 src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_x.stderr
  26. +4 −4 src/test/ui/hr-subtype/hr-subtype.rs
  27. +13 −5 src/test/ui/hrtb/hrtb-conflate-regions.stderr
  28. +1 −1 src/test/ui/hrtb/hrtb-exists-forall-fn.stderr
  29. +4 −3 src/test/ui/hrtb/hrtb-exists-forall-trait-contravariant.rs
  30. +21 −0 src/test/ui/hrtb/hrtb-exists-forall-trait-contravariant.stderr
  31. +4 −3 src/test/ui/hrtb/hrtb-exists-forall-trait-covariant.rs
  32. +21 −0 src/test/ui/hrtb/hrtb-exists-forall-trait-covariant.stderr
  33. +1 −1 src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.rs
  34. +15 −6 src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.stderr
  35. +12 −5 src/test/ui/hrtb/hrtb-higher-ranker-supertraits-transitive.stderr
  36. +2 −2 src/test/ui/hrtb/hrtb-higher-ranker-supertraits.rs
  37. +30 −11 src/test/ui/hrtb/hrtb-higher-ranker-supertraits.stderr
  38. +25 −10 src/test/ui/hrtb/hrtb-just-for-static.stderr
  39. +17 −0 src/test/ui/hrtb/issue-46989.stderr
  40. +1 −1 src/test/ui/hrtb/issue-58451.rs
  41. +16 −0 src/test/ui/hrtb/issue-58451.stderr
  42. +3 −3 src/test/ui/issues/issue-40000.stderr
  43. +1 −1 src/test/ui/issues/issue-57362-1.rs
  44. +7 −4 src/test/ui/issues/issue-57362-1.stderr
  45. +1 −1 src/test/ui/issues/issue-57362-2.rs
  46. +10 −6 src/test/ui/issues/issue-57362-2.stderr
  47. +3 −2 src/test/ui/lub-glb/old-lub-glb-hr.rs
  48. +18 −0 src/test/ui/lub-glb/old-lub-glb-hr.stderr
  49. +5 −1 src/test/ui/lub-glb/old-lub-glb-object.rs
  50. +0 −16 src/test/ui/lub-glb/old-lub-glb-object.stderr
  51. +2 −2 src/test/ui/mismatched_types/closure-arg-type-mismatch.rs
  52. +21 −12 src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr
  53. +2 −1 src/test/ui/mismatched_types/closure-mismatch.rs
  54. +27 −7 src/test/ui/mismatched_types/closure-mismatch.stderr
  55. +1 −0 src/test/ui/mismatched_types/issue-36053-2.rs
  56. +9 −1 src/test/ui/mismatched_types/issue-36053-2.stderr
  57. +2 −2 src/test/ui/regions-fn-subtyping-return-static-fail.rs
  58. +13 −4 src/test/ui/regions-fn-subtyping-return-static-fail.stderr
  59. +2 −2 src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr
  60. +2 −2 src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr
  61. +1 −3 src/test/ui/regions/regions-fn-subtyping-return-static.rs
  62. +12 −0 src/test/ui/regions/regions-fn-subtyping-return-static.stderr
  63. +2 −2 src/test/ui/regions/regions-lifetime-bounds-on-fns.stderr
  64. +2 −0 src/test/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.rs
  65. +30 −4 src/test/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr
  66. +2 −0 src/test/ui/unboxed-closures/unboxed-closures-wrong-abi.rs
  67. +30 −4 src/test/ui/unboxed-closures/unboxed-closures-wrong-abi.stderr
  68. +2 −0 src/test/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.rs
  69. +30 −4 src/test/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.stderr
  70. +1 −1 src/test/ui/where-clauses/where-for-self-2.rs
  71. +13 −6 src/test/ui/where-clauses/where-for-self-2.stderr
@@ -31,6 +31,18 @@ impl<'tcx> RegionConstraintCollector<'tcx> {

assert!(self.in_snapshot());

// If the user gave `-Zno-leak-check`, then skip the leak
// check completely. This is wildly unsound and also not
// unlikely to cause an ICE or two. It is intended for use
// only during a transition period, in which the MIR typeck
// uses the "universe-style" check, and the rest of typeck
// uses the more conservative leak check. Since the leak
// check is more conservative, we can't test the
// universe-style check without disabling it.
if tcx.sess.opts.debugging_opts.no_leak_check {
return Ok(());
}

// Go through each placeholder that we created.
for (_, &placeholder_region) in placeholder_map {
// Find the universe this placeholder inhabits.
@@ -1,15 +1,26 @@
fn main() {
f1(|_: (), _: ()| {}); //~ ERROR type mismatch
//~^ ERROR type mismatch
f2(|_: (), _: ()| {}); //~ ERROR type mismatch
//~^ ERROR type mismatch
f3(|_: (), _: ()| {}); //~ ERROR type mismatch
//~^ ERROR type mismatch
f4(|_: (), _: ()| {}); //~ ERROR type mismatch
//~^ ERROR type mismatch
f5(|_: (), _: ()| {}); //~ ERROR type mismatch
//~^ ERROR type mismatch
g1(|_: (), _: ()| {}); //~ ERROR type mismatch
//~^ ERROR type mismatch
g2(|_: (), _: ()| {}); //~ ERROR type mismatch
//~^ ERROR type mismatch
g3(|_: (), _: ()| {}); //~ ERROR type mismatch
//~^ ERROR type mismatch
g4(|_: (), _: ()| {}); //~ ERROR type mismatch
//~^ ERROR type mismatch
h1(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch
//~^ ERROR type mismatch
h2(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch
//~^ ERROR type mismatch
}

// Basic
@@ -7,151 +7,305 @@ LL | f1(|_: (), _: ()| {}); //~ ERROR type mismatch
| expected signature of `for<'r, 's> fn(&'r (), &'s ()) -> _`
|
note: required by `f1`
--> $DIR/anonymous-higher-ranked-lifetime.rs:16:1
--> $DIR/anonymous-higher-ranked-lifetime.rs:27:1
|
LL | fn f1<F>(_: F) where F: Fn(&(), &()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:3:5
--> $DIR/anonymous-higher-ranked-lifetime.rs:2:5
|
LL | f1(|_: (), _: ()| {}); //~ ERROR type mismatch
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `fn(&(), &()) -> _`
|
note: required by `f1`
--> $DIR/anonymous-higher-ranked-lifetime.rs:27:1
|
LL | fn f1<F>(_: F) where F: Fn(&(), &()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:4:5
|
LL | f2(|_: (), _: ()| {}); //~ ERROR type mismatch
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'a, 'r> fn(&'a (), &'r ()) -> _`
|
note: required by `f2`
--> $DIR/anonymous-higher-ranked-lifetime.rs:17:1
--> $DIR/anonymous-higher-ranked-lifetime.rs:28:1
|
LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:4:5
|
LL | f2(|_: (), _: ()| {}); //~ ERROR type mismatch
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `fn(&'a (), &()) -> _`
|
note: required by `f2`
--> $DIR/anonymous-higher-ranked-lifetime.rs:28:1
|
LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:6:5
|
LL | f3(|_: (), _: ()| {}); //~ ERROR type mismatch
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'r> fn(&(), &'r ()) -> _`
|
note: required by `f3`
--> $DIR/anonymous-higher-ranked-lifetime.rs:18:1
--> $DIR/anonymous-higher-ranked-lifetime.rs:29:1
|
LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:5:5
--> $DIR/anonymous-higher-ranked-lifetime.rs:6:5
|
LL | f3(|_: (), _: ()| {}); //~ ERROR type mismatch
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `fn(&(), &()) -> _`
|
note: required by `f3`
--> $DIR/anonymous-higher-ranked-lifetime.rs:29:1
|
LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:8:5
|
LL | f4(|_: (), _: ()| {}); //~ ERROR type mismatch
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'s, 'r> fn(&'s (), &'r ()) -> _`
|
note: required by `f4`
--> $DIR/anonymous-higher-ranked-lifetime.rs:19:1
--> $DIR/anonymous-higher-ranked-lifetime.rs:30:1
|
LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:6:5
--> $DIR/anonymous-higher-ranked-lifetime.rs:8:5
|
LL | f4(|_: (), _: ()| {}); //~ ERROR type mismatch
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `fn(&(), &'r ()) -> _`
|
note: required by `f4`
--> $DIR/anonymous-higher-ranked-lifetime.rs:30:1
|
LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:10:5
|
LL | f5(|_: (), _: ()| {}); //~ ERROR type mismatch
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'r> fn(&'r (), &'r ()) -> _`
|
note: required by `f5`
--> $DIR/anonymous-higher-ranked-lifetime.rs:20:1
--> $DIR/anonymous-higher-ranked-lifetime.rs:31:1
|
LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:7:5
--> $DIR/anonymous-higher-ranked-lifetime.rs:10:5
|
LL | f5(|_: (), _: ()| {}); //~ ERROR type mismatch
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `fn(&'r (), &'r ()) -> _`
|
note: required by `f5`
--> $DIR/anonymous-higher-ranked-lifetime.rs:31:1
|
LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:12:5
|
LL | g1(|_: (), _: ()| {}); //~ ERROR type mismatch
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'r> fn(&'r (), std::boxed::Box<(dyn for<'s> std::ops::Fn(&'s ()) + 'static)>) -> _`
|
note: required by `g1`
--> $DIR/anonymous-higher-ranked-lifetime.rs:23:1
--> $DIR/anonymous-higher-ranked-lifetime.rs:34:1
|
LL | fn g1<F>(_: F) where F: Fn(&(), Box<Fn(&())>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:8:5
--> $DIR/anonymous-higher-ranked-lifetime.rs:12:5
|
LL | g1(|_: (), _: ()| {}); //~ ERROR type mismatch
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _`
|
note: required by `g1`
--> $DIR/anonymous-higher-ranked-lifetime.rs:34:1
|
LL | fn g1<F>(_: F) where F: Fn(&(), Box<Fn(&())>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:14:5
|
LL | g2(|_: (), _: ()| {}); //~ ERROR type mismatch
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'r> fn(&'r (), for<'s> fn(&'s ())) -> _`
|
note: required by `g2`
--> $DIR/anonymous-higher-ranked-lifetime.rs:24:1
--> $DIR/anonymous-higher-ranked-lifetime.rs:35:1
|
LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:9:5
--> $DIR/anonymous-higher-ranked-lifetime.rs:14:5
|
LL | g2(|_: (), _: ()| {}); //~ ERROR type mismatch
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `fn(&(), for<'r> fn(&'r ())) -> _`
|
note: required by `g2`
--> $DIR/anonymous-higher-ranked-lifetime.rs:35:1
|
LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:16:5
|
LL | g3(|_: (), _: ()| {}); //~ ERROR type mismatch
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'s> fn(&'s (), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _`
|
note: required by `g3`
--> $DIR/anonymous-higher-ranked-lifetime.rs:25:1
--> $DIR/anonymous-higher-ranked-lifetime.rs:36:1
|
LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<Fn(&())>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:10:5
--> $DIR/anonymous-higher-ranked-lifetime.rs:16:5
|
LL | g3(|_: (), _: ()| {}); //~ ERROR type mismatch
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `fn(&'s (), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _`
|
note: required by `g3`
--> $DIR/anonymous-higher-ranked-lifetime.rs:36:1
|
LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<Fn(&())>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:18:5
|
LL | g4(|_: (), _: ()| {}); //~ ERROR type mismatch
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'s> fn(&'s (), for<'r> fn(&'r ())) -> _`
|
note: required by `g4`
--> $DIR/anonymous-higher-ranked-lifetime.rs:26:1
--> $DIR/anonymous-higher-ranked-lifetime.rs:37:1
|
LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:18:5
|
LL | g4(|_: (), _: ()| {}); //~ ERROR type mismatch
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `fn(&(), for<'r> fn(&'r ())) -> _`
|
note: required by `g4`
--> $DIR/anonymous-higher-ranked-lifetime.rs:37:1
|
LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:11:5
--> $DIR/anonymous-higher-ranked-lifetime.rs:20:5
|
LL | h1(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch
| ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
| |
| expected signature of `for<'r, 's> fn(&'r (), std::boxed::Box<(dyn for<'t0> std::ops::Fn(&'t0 ()) + 'static)>, &'s (), for<'t0, 't1> fn(&'t0 (), &'t1 ())) -> _`
|
note: required by `h1`
--> $DIR/anonymous-higher-ranked-lifetime.rs:29:1
--> $DIR/anonymous-higher-ranked-lifetime.rs:40:1
|
LL | fn h1<F>(_: F) where F: Fn(&(), Box<Fn(&())>, &(), fn(&(), &())) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:12:5
--> $DIR/anonymous-higher-ranked-lifetime.rs:20:5
|
LL | h1(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch
| ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
| |
| expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>, &(), for<'r, 's> fn(&'r (), &'s ())) -> _`
|
note: required by `h1`
--> $DIR/anonymous-higher-ranked-lifetime.rs:40:1
|
LL | fn h1<F>(_: F) where F: Fn(&(), Box<Fn(&())>, &(), fn(&(), &())) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:22:5
|
LL | h2(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch
| ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
| |
| expected signature of `for<'r, 't0> fn(&'r (), std::boxed::Box<(dyn for<'s> std::ops::Fn(&'s ()) + 'static)>, &'t0 (), for<'s, 't1> fn(&'s (), &'t1 ())) -> _`
|
note: required by `h2`
--> $DIR/anonymous-higher-ranked-lifetime.rs:30:1
--> $DIR/anonymous-higher-ranked-lifetime.rs:41:1
|
LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<Fn(&())>, &'t0 (), fn(&(), &())) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:22:5
|
LL | h2(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch
| ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
| |
| expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>, &'t0 (), for<'r, 's> fn(&'r (), &'s ())) -> _`
|
note: required by `h2`
--> $DIR/anonymous-higher-ranked-lifetime.rs:41:1
|
LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<Fn(&())>, &'t0 (), fn(&(), &())) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 11 previous errors
error: aborting due to 22 previous errors

For more information about this error, try `rustc --explain E0631`.
@@ -89,12 +89,14 @@ pub fn call_bar() {

pub fn call_tuple_one() {
tuple_one::<Tuple>();
//~^ ERROR not general enough
//~^ ERROR not satisfied
//~| ERROR type mismatch
}

pub fn call_tuple_two() {
tuple_two::<Tuple>();
//~^ ERROR not general enough
//~^ ERROR not satisfied
//~| ERROR type mismatch
}

pub fn call_tuple_three() {
@@ -103,7 +105,7 @@ pub fn call_tuple_three() {

pub fn call_tuple_four() {
tuple_four::<Tuple>();
//~^ ERROR not general enough
//~^ ERROR not satisfied
}

fn main() { }
Oops, something went wrong.

0 comments on commit 21e9478

Please sign in to comment.
You can’t perform that action at this time.