]> git.lizzy.rs Git - rust.git/commitdiff
Add label to item source of bound obligation
authorEsteban Küber <esteban@kuber.com.ar>
Sat, 18 Apr 2020 23:36:46 +0000 (16:36 -0700)
committerEsteban Küber <esteban@kuber.com.ar>
Sun, 19 Apr 2020 00:19:53 +0000 (17:19 -0700)
32 files changed:
src/librustc_trait_selection/traits/error_reporting/suggestions.rs
src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr
src/test/ui/associated-types/associated-types-eq-hr.stderr
src/test/ui/associated-types/defaults-unsound-62211-1.stderr
src/test/ui/associated-types/defaults-unsound-62211-2.stderr
src/test/ui/associated-types/higher-ranked-projection.bad.stderr
src/test/ui/associated-types/issue-43924.stderr
src/test/ui/associated-types/issue-65774-1.stderr
src/test/ui/associated-types/issue-65774-2.stderr
src/test/ui/associated-types/point-at-type-on-obligation-failure-2.stderr
src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr
src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr
src/test/ui/closure-expected-type/expect-infer-var-appearing-twice.stderr
src/test/ui/generator/generator-yielding-or-returning-itself.stderr
src/test/ui/generic-associated-types/issue-62326-parameter-out-of-range.stderr
src/test/ui/generic-associated-types/iterable.stderr
src/test/ui/hrtb/hrtb-conflate-regions.stderr
src/test/ui/hrtb/hrtb-exists-forall-trait-contravariant.stderr
src/test/ui/hrtb/hrtb-exists-forall-trait-covariant.stderr
src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.stderr
src/test/ui/hrtb/hrtb-higher-ranker-supertraits-transitive.stderr
src/test/ui/hrtb/hrtb-higher-ranker-supertraits.stderr
src/test/ui/hrtb/hrtb-just-for-static.stderr
src/test/ui/issues/issue-24204.stderr
src/test/ui/issues/issue-43623.stderr
src/test/ui/issues/issue-47706.stderr
src/test/ui/issues/issue-60218.stderr
src/test/ui/issues/issue-60283.stderr
src/test/ui/issues/issue-65673.stderr
src/test/ui/suggestions/missing-assoc-type-bound-restriction.stderr
src/test/ui/traits/cycle-cache-err-60010.stderr
src/test/ui/where-clauses/where-for-self-2.stderr

index 9a6a6fefa7c7150b3f9e2f71579242dc8d8b048d..aaa5174420fa0f1ec339aba3051589d134eba5d8 100644 (file)
@@ -1532,14 +1532,14 @@ fn note_obligation_cause_code<T>(
                 let item_name = tcx.def_path_str(item_def_id);
                 let msg = format!("required by this bound in `{}`", item_name);
                 if let Some(ident) = tcx.opt_item_name(item_def_id) {
-                    let sm = self.tcx.sess.source_map();
+                    let sm = tcx.sess.source_map();
                     let same_line =
                         match (sm.lookup_line(ident.span.hi()), sm.lookup_line(span.lo())) {
                             (Ok(l), Ok(r)) => l.line == r.line,
                             _ => true,
                         };
                     if !ident.span.overlaps(span) && !same_line {
-                        err.span_label(ident.span, "");
+                        err.span_label(ident.span, "required by a bound in this");
                     }
                 }
                 if span != DUMMY_SP {
index 96e690631894dfc5c5884f516a470f857d0f9bf2..f65ae32c01c99d2266d37c5fd44b4f6b2e94709f 100644 (file)
@@ -2,7 +2,7 @@ error[E0277]: `<L1 as Lam<&'a u8>>::App` doesn't implement `std::fmt::Debug`
   --> $DIR/bad-bounds-on-assoc-in-trait.rs:31:6
    |
 LL | trait Case1 {
-   |       -----
+   |       ----- required by a bound in this
 ...
 LL |                 Debug
    |                 ----- required by this bound in `Case1`
@@ -26,7 +26,7 @@ error[E0277]: `<<T as Case1>::C as std::iter::Iterator>::Item` cannot be sent be
   --> $DIR/bad-bounds-on-assoc-in-trait.rs:36:20
    |
 LL | trait Case1 {
-   |       -----
+   |       ----- required by a bound in this
 LL |     type C: Clone + Iterator<Item:
 LL |         Send + Iterator<Item:
    |         ---- required by this bound in `Case1`
@@ -42,7 +42,7 @@ error[E0277]: `<<T as Case1>::C as std::iter::Iterator>::Item` cannot be shared
   --> $DIR/bad-bounds-on-assoc-in-trait.rs:36:20
    |
 LL | trait Case1 {
-   |       -----
+   |       ----- required by a bound in this
 ...
 LL |         > + Sync>;
    |             ---- required by this bound in `Case1`
@@ -58,7 +58,7 @@ error[E0277]: `<_ as Lam<&'a u8>>::App` doesn't implement `std::fmt::Debug`
   --> $DIR/bad-bounds-on-assoc-in-trait.rs:36:20
    |
 LL | trait Case1 {
-   |       -----
+   |       ----- required by a bound in this
 ...
 LL |                 Debug
    |                 ----- required by this bound in `Case1`
index fd7d89d1933816ee4c3a4cdac77872f2b502fee4..58d72746e76aa3c3c4c4ec7f003b142a52c51af1 100644 (file)
@@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `for<'x> <UintStruct as TheTrait<&'x isize
   --> $DIR/associated-types-eq-hr.rs:82:5
    |
 LL | fn foo<T>()
-   |    ---
+   |    --- required by a bound in this
 LL |     where T : for<'x> TheTrait<&'x isize, A = &'x isize>
    |                                           ------------- required by this bound in `foo`
 ...
@@ -16,7 +16,7 @@ error[E0271]: type mismatch resolving `for<'x> <IntStruct as TheTrait<&'x isize>
   --> $DIR/associated-types-eq-hr.rs:86:5
    |
 LL | fn bar<T>()
-   |    ---
+   |    --- required by a bound in this
 LL |     where T : for<'x> TheTrait<&'x isize, A = &'x usize>
    |                                           ------------- required by this bound in `bar`
 ...
@@ -30,7 +30,7 @@ error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize
   --> $DIR/associated-types-eq-hr.rs:91:17
    |
 LL | fn tuple_one<T>()
-   |    ---------
+   |    --------- required by a bound in this
 LL |     where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'x isize>
    |               ---------------------------------------------------------- required by this bound in `tuple_one`
 ...
@@ -44,7 +44,7 @@ error[E0271]: type mismatch resolving `for<'x, 'y> <Tuple as TheTrait<(&'x isize
   --> $DIR/associated-types-eq-hr.rs:91:5
    |
 LL | fn tuple_one<T>()
-   |    ---------
+   |    --------- required by a bound in this
 LL |     where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'x isize>
    |                                                           ------------- required by this bound in `tuple_one`
 ...
@@ -55,7 +55,7 @@ error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize
   --> $DIR/associated-types-eq-hr.rs:97:17
    |
 LL | fn tuple_two<T>()
-   |    ---------
+   |    --------- required by a bound in this
 LL |     where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'y isize>
    |               ---------------------------------------------------------- required by this bound in `tuple_two`
 ...
@@ -69,7 +69,7 @@ error[E0271]: type mismatch resolving `for<'x, 'y> <Tuple as TheTrait<(&'x isize
   --> $DIR/associated-types-eq-hr.rs:97:5
    |
 LL | fn tuple_two<T>()
-   |    ---------
+   |    --------- required by a bound in this
 LL |     where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'y isize>
    |                                                           ------------- required by this bound in `tuple_two`
 ...
@@ -80,7 +80,7 @@ error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize
   --> $DIR/associated-types-eq-hr.rs:107:18
    |
 LL | fn tuple_four<T>()
-   |    ----------
+   |    ---------- required by a bound in this
 LL |     where T : for<'x,'y> TheTrait<(&'x isize, &'y isize)>
    |               ------------------------------------------- required by this bound in `tuple_four`
 ...
index 7bf75f3839c0ebab1e19b60d6434fd6f39c328bc..856d513d60bd313b8ea95e2498a231cbdc41889d 100644 (file)
@@ -43,7 +43,7 @@ error[E0277]: `T` doesn't implement `std::fmt::Display`
   --> $DIR/defaults-unsound-62211-1.rs:41:9
    |
 LL | trait UncheckedCopy: Sized {
-   |       -------------
+   |       ------------- required by a bound in this
 ...
 LL |     + Display = Self;
    |       ------- required by this bound in `UncheckedCopy`
@@ -62,7 +62,7 @@ error[E0277]: the trait bound `T: std::ops::Deref` is not satisfied
   --> $DIR/defaults-unsound-62211-1.rs:41:9
    |
 LL | trait UncheckedCopy: Sized {
-   |       -------------
+   |       ------------- required by a bound in this
 ...
 LL |     + Deref<Target = str>
    |       ------------------- required by this bound in `UncheckedCopy`
@@ -79,7 +79,7 @@ error[E0277]: cannot add-assign `&'static str` to `T`
   --> $DIR/defaults-unsound-62211-1.rs:41:9
    |
 LL | trait UncheckedCopy: Sized {
-   |       -------------
+   |       ------------- required by a bound in this
 ...
 LL |     + AddAssign<&'static str>
    |       ----------------------- required by this bound in `UncheckedCopy`
@@ -97,7 +97,7 @@ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
   --> $DIR/defaults-unsound-62211-1.rs:41:9
    |
 LL | trait UncheckedCopy: Sized {
-   |       -------------
+   |       ------------- required by a bound in this
 ...
 LL |     type Output: Copy
    |                  ---- required by this bound in `UncheckedCopy`
index b6d889515b6fbe6408ab1b854176488757c7b0a0..1060c82fec22ae598670c898aabe824b9e3cdffc 100644 (file)
@@ -43,7 +43,7 @@ error[E0277]: `T` doesn't implement `std::fmt::Display`
   --> $DIR/defaults-unsound-62211-2.rs:41:9
    |
 LL | trait UncheckedCopy: Sized {
-   |       -------------
+   |       ------------- required by a bound in this
 ...
 LL |     + Display = Self;
    |       ------- required by this bound in `UncheckedCopy`
@@ -62,7 +62,7 @@ error[E0277]: the trait bound `T: std::ops::Deref` is not satisfied
   --> $DIR/defaults-unsound-62211-2.rs:41:9
    |
 LL | trait UncheckedCopy: Sized {
-   |       -------------
+   |       ------------- required by a bound in this
 ...
 LL |     + Deref<Target = str>
    |       ------------------- required by this bound in `UncheckedCopy`
@@ -79,7 +79,7 @@ error[E0277]: cannot add-assign `&'static str` to `T`
   --> $DIR/defaults-unsound-62211-2.rs:41:9
    |
 LL | trait UncheckedCopy: Sized {
-   |       -------------
+   |       ------------- required by a bound in this
 ...
 LL |     + AddAssign<&'static str>
    |       ----------------------- required by this bound in `UncheckedCopy`
@@ -97,7 +97,7 @@ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
   --> $DIR/defaults-unsound-62211-2.rs:41:9
    |
 LL | trait UncheckedCopy: Sized {
-   |       -------------
+   |       ------------- required by a bound in this
 ...
 LL |     type Output: Copy
    |                  ---- required by this bound in `UncheckedCopy`
index 74c9ad2c39e67f36f37334d19aa6ebb729425812..3b3e4c3ea117a6211ee32e7c95984f7826787b8c 100644 (file)
@@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `for<'a> <&'a _ as Mirror>::Image == _`
   --> $DIR/higher-ranked-projection.rs:25:5
    |
 LL | fn foo<U, T>(_t: T)
-   |    ---
+   |    --- required by a bound in this
 LL |     where for<'a> &'a T: Mirror<Image=U>
    |                                 ------- required by this bound in `foo`
 ...
index 58f71b8b14ed291fa313ef8a8bfa5f6b852c98f9..f21846fd82c43a8ea5f1bc3bf13f32786ae43f58 100644 (file)
@@ -10,7 +10,7 @@ error[E0277]: the trait bound `(dyn std::string::ToString + 'static): std::defau
   --> $DIR/issue-43924.rs:10:6
    |
 LL | trait Foo<T: Default + ToString> {
-   |       ---
+   |       --- required by a bound in this
 LL |     type Out: Default + ToString + ?Sized = dyn ToString;
    |               ------- required by this bound in `Foo`
 ...
@@ -21,7 +21,7 @@ error[E0277]: the trait bound `(dyn std::string::ToString + 'static): std::defau
   --> $DIR/issue-43924.rs:11:6
    |
 LL | trait Foo<T: Default + ToString> {
-   |       ---
+   |       --- required by a bound in this
 LL |     type Out: Default + ToString + ?Sized = dyn ToString;
    |               ------- required by this bound in `Foo`
 ...
index 2e5a1ebf19afa698afa322b4f0212b7bcbebd6ae..72f47df5d80e727b1be77f8bc4a323e49cafd671 100644 (file)
@@ -10,7 +10,7 @@ error[E0277]: the trait bound `T: MyDisplay` is not satisfied
   --> $DIR/issue-65774-1.rs:16:6
    |
 LL | trait MPU {
-   |       ---
+   |       --- required by a bound in this
 LL |     type MpuConfig: MyDisplay = T;
    |                     --------- required by this bound in `MPU`
 ...
index 5b3986407bc4c82029fafb99eaf2e9fc013d91b8..aef70885af369d5afe50d676076b8824856d9dfe 100644 (file)
@@ -10,7 +10,7 @@ error[E0277]: the trait bound `T: MyDisplay` is not satisfied
   --> $DIR/issue-65774-2.rs:16:6
    |
 LL | trait MPU {
-   |       ---
+   |       --- required by a bound in this
 LL |     type MpuConfig: MyDisplay = T;
    |                     --------- required by this bound in `MPU`
 ...
index dac713567b5e27f5129131775010d56913a863cd..3118a9c5352c351ca0105cdeaf6ac4059b5ebe26 100644 (file)
@@ -2,7 +2,7 @@ error[E0277]: the trait bound `bool: Bar` is not satisfied
   --> $DIR/point-at-type-on-obligation-failure-2.rs:8:18
    |
 LL | trait Foo {
-   |       ---
+   |       --- required by a bound in this
 LL |     type Assoc: Bar;
    |                 --- required by this bound in `Foo`
 ...
index 7141c047d7f53e4197ce42740949ed910c5d7e42..97fdb76dd11c77b1f6cdf9eeb4015761c3c58360 100644 (file)
@@ -2,7 +2,7 @@ error[E0631]: type mismatch in closure arguments
   --> $DIR/expect-fn-supply-fn.rs:30:5
    |
 LL | fn with_closure_expecting_fn_with_free_region<F>(_: F)
-   |    ------------------------------------------
+   |    ------------------------------------------ required by a bound in this
 LL |     where F: for<'a> FnOnce(fn(&'a u32), &i32)
    |                      ------------------------- required by this bound in `with_closure_expecting_fn_with_free_region`
 ...
@@ -15,7 +15,7 @@ error[E0631]: type mismatch in closure arguments
   --> $DIR/expect-fn-supply-fn.rs:37:5
    |
 LL | fn with_closure_expecting_fn_with_bound_region<F>(_: F)
-   |    -------------------------------------------
+   |    ------------------------------------------- required by a bound in this
 LL |     where F: FnOnce(fn(&u32), &i32)
    |              ---------------------- required by this bound in `with_closure_expecting_fn_with_bound_region`
 ...
@@ -28,7 +28,7 @@ error[E0631]: type mismatch in closure arguments
   --> $DIR/expect-fn-supply-fn.rs:46:5
    |
 LL | fn with_closure_expecting_fn_with_bound_region<F>(_: F)
-   |    -------------------------------------------
+   |    ------------------------------------------- required by a bound in this
 LL |     where F: FnOnce(fn(&u32), &i32)
    |              ---------------------- required by this bound in `with_closure_expecting_fn_with_bound_region`
 ...
index 003339584681529f296a311586e29e05d6c8f1d4..fae41c4114abc49621895e30b76b73d935008ea4 100644 (file)
@@ -40,7 +40,7 @@ error[E0631]: type mismatch in closure arguments
   --> $DIR/expect-fn-supply-fn.rs:30:5
    |
 LL | fn with_closure_expecting_fn_with_free_region<F>(_: F)
-   |    ------------------------------------------
+   |    ------------------------------------------ required by a bound in this
 LL |     where F: for<'a> FnOnce(fn(&'a u32), &i32)
    |                      ------------------------- required by this bound in `with_closure_expecting_fn_with_free_region`
 ...
@@ -53,7 +53,7 @@ error[E0631]: type mismatch in closure arguments
   --> $DIR/expect-fn-supply-fn.rs:37:5
    |
 LL | fn with_closure_expecting_fn_with_bound_region<F>(_: F)
-   |    -------------------------------------------
+   |    ------------------------------------------- required by a bound in this
 LL |     where F: FnOnce(fn(&u32), &i32)
    |              ---------------------- required by this bound in `with_closure_expecting_fn_with_bound_region`
 ...
@@ -66,7 +66,7 @@ error[E0631]: type mismatch in closure arguments
   --> $DIR/expect-fn-supply-fn.rs:46:5
    |
 LL | fn with_closure_expecting_fn_with_bound_region<F>(_: F)
-   |    -------------------------------------------
+   |    ------------------------------------------- required by a bound in this
 LL |     where F: FnOnce(fn(&u32), &i32)
    |              ---------------------- required by this bound in `with_closure_expecting_fn_with_bound_region`
 ...
index 1c6564ee426e50b3b7dfcad2746fbaa21a769f8e..93b42a5a305f23fb518a228fad92109099834a60 100644 (file)
@@ -2,7 +2,7 @@ error[E0631]: type mismatch in closure arguments
   --> $DIR/expect-infer-var-appearing-twice.rs:14:5
    |
 LL | fn with_closure<F, A>(_: F)
-   |    ------------
+   |    ------------ required by a bound in this
 LL |     where F: FnOnce(A, A)
    |              ------------ required by this bound in `with_closure`
 ...
index fc8064d8225bf5db7b665be067d8c1f8678fb56e..9699abd5661a2510b5bfd547a78992fa46454142 100644 (file)
@@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `<[generator@$DIR/generator-yielding-or-re
   --> $DIR/generator-yielding-or-returning-itself.rs:15:5
    |
 LL | pub fn want_cyclic_generator_return<T>(_: T)
-   |        ----------------------------
+   |        ---------------------------- required by a bound in this
 LL |     where T: Generator<Yield = (), Return = T>
    |                                    ---------- required by this bound in `want_cyclic_generator_return`
 ...
@@ -18,7 +18,7 @@ error[E0271]: type mismatch resolving `<[generator@$DIR/generator-yielding-or-re
   --> $DIR/generator-yielding-or-returning-itself.rs:28:5
    |
 LL | pub fn want_cyclic_generator_yield<T>(_: T)
-   |        ---------------------------
+   |        --------------------------- required by a bound in this
 LL |     where T: Generator<Yield = T, Return = ()>
    |                        --------- required by this bound in `want_cyclic_generator_yield`
 ...
index 88b5c6a0a013c870bcb42129f6245e19d6543d07..4b06baa09ffbfa574c57475a7a3d5dcdec8556e4 100644 (file)
@@ -2,7 +2,7 @@ error[E0280]: the requirement `for<'a> <Self as Iterator>::Item<'a>: 'a` is not
   --> $DIR/issue-62326-parameter-out-of-range.rs:7:20
    |
 LL | trait Iterator {
-   |       --------
+   |       -------- required by a bound in this
 LL |     type Item<'a>: 'a;
    |                    ^^ required by this bound in `Iterator`
 
index 6bc5a2319a980fd0ae98e93fe3656228b971ac50..b1298163aabf09727cda6efd72eab5164933b92b 100644 (file)
@@ -24,7 +24,7 @@ error[E0271]: type mismatch resolving `for<'a> <<std::vec::Vec<T> as Iterable>::
   --> $DIR/iterable.rs:19:30
    |
 LL | trait Iterable {
-   |       --------
+   |       -------- required by a bound in this
 LL |     type Item<'a> where Self: 'a;
 LL |     type Iter<'a>: Iterator<Item = Self::Item<'a>> where Self: 'a;
    |                             --------------------- required by this bound in `Iterable`
@@ -41,7 +41,7 @@ error[E0271]: type mismatch resolving `for<'a> <<[T] as Iterable>::Iter<'a> as s
   --> $DIR/iterable.rs:31:30
    |
 LL | trait Iterable {
-   |       --------
+   |       -------- required by a bound in this
 LL |     type Item<'a> where Self: 'a;
 LL |     type Iter<'a>: Iterator<Item = Self::Item<'a>> where Self: 'a;
    |                             --------------------- required by this bound in `Iterable`
index 9822b48f4f48fe4412697e1690b82c3c6684fe6a..7250935ea296b067fb44fd8798154d9dd631adca 100644 (file)
@@ -2,7 +2,7 @@ error[E0277]: the trait bound `for<'a, 'b> SomeStruct: Foo<(&'a isize, &'b isize
   --> $DIR/hrtb-conflate-regions.rs:27:22
    |
 LL | fn want_foo2<T>()
-   |    ---------
+   |    --------- required by a bound in this
 LL |     where T : for<'a,'b> Foo<(&'a isize, &'b isize)>
    |               -------------------------------------- required by this bound in `want_foo2`
 ...
index 969d9eda7351970b8541e4d039b5d9ca469a2ed6..7a7285d3d76e051dbc23c8ee082448a4be4fe33e 100644 (file)
@@ -2,7 +2,7 @@ error[E0277]: the trait bound `(): Trait<for<'b> fn(&'b u32)>` is not satisfied
   --> $DIR/hrtb-exists-forall-trait-contravariant.rs:34:11
    |
 LL | fn foo<T>()
-   |    ---
+   |    --- required by a bound in this
 LL | where
 LL |     T: Trait<for<'b> fn(&'b u32)>,
    |        -------------------------- required by this bound in `foo`
index dddc2bcce49e5d06b2466d2324c62415530c9a72..1e335f9ee96106d4a8df6b0f1a36f12ca6df4077 100644 (file)
@@ -2,7 +2,7 @@ error[E0277]: the trait bound `(): Trait<for<'b> fn(fn(&'b u32))>` is not satisf
   --> $DIR/hrtb-exists-forall-trait-covariant.rs:36:11
    |
 LL | fn foo<T>()
-   |    ---
+   |    --- required by a bound in this
 LL | where
 LL |     T: Trait<for<'b> fn(fn(&'b u32))>,
    |        ------------------------------ required by this bound in `foo`
index 23ef75944d317bc0c352d5efe08af8ef384d11f5..9174ea4d8419d208f087468ffe879240533ee88a 100644 (file)
@@ -2,7 +2,7 @@ error[E0277]: the trait bound `(): Trait<for<'b> fn(std::cell::Cell<&'b u32>)>`
   --> $DIR/hrtb-exists-forall-trait-invariant.rs:28:11
    |
 LL | fn foo<T>()
-   |    ---
+   |    --- required by a bound in this
 LL | where
 LL |     T: Trait<for<'b> fn(Cell<&'b u32>)>,
    |        -------------------------------- required by this bound in `foo`
index 268ff057421fe17961c63fcfc9e8f4f376c90044..87a13889298dfc81f40b9d9cc3923b50942cabc0 100644 (file)
@@ -2,7 +2,7 @@ error[E0277]: the trait bound `for<'ccx> B: Bar<'ccx>` is not satisfied
   --> $DIR/hrtb-higher-ranker-supertraits-transitive.rs:47:26
    |
 LL | fn want_bar_for_any_ccx<B>(b: &B)
-   |    --------------------
+   |    -------------------- required by a bound in this
 LL |     where B : for<'ccx> Bar<'ccx>
    |               ------------------- required by this bound in `want_bar_for_any_ccx`
 ...
index 2e20d2fe6dda3fcc9d2f5886b053d2d2ee2cc5e0..0123faa36dbcd8fdbcdd1c072dd9cc99a398a889 100644 (file)
@@ -5,7 +5,7 @@ LL |     want_foo_for_any_tcx(f);
    |                          ^ the trait `for<'tcx> Foo<'tcx>` is not implemented for `F`
 ...
 LL | fn want_foo_for_any_tcx<F>(f: &F)
-   |    --------------------
+   |    -------------------- required by a bound in this
 LL |     where F : for<'tcx> Foo<'tcx>
    |               ------------------- required by this bound in `want_foo_for_any_tcx`
    |
@@ -21,7 +21,7 @@ LL |     want_bar_for_any_ccx(b);
    |                          ^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B`
 ...
 LL | fn want_bar_for_any_ccx<B>(b: &B)
-   |    --------------------
+   |    -------------------- required by a bound in this
 LL |     where B : for<'ccx> Bar<'ccx>
    |               ------------------- required by this bound in `want_bar_for_any_ccx`
    |
index 6ec0beefd60e39f900989e54ba590dbefde98788..4fa404624775b731bba309d7034687fefba4fd1d 100644 (file)
@@ -2,7 +2,7 @@ error[E0277]: the trait bound `for<'a> StaticInt: Foo<&'a isize>` is not satisfi
   --> $DIR/hrtb-just-for-static.rs:24:17
    |
 LL | fn want_hrtb<T>()
-   |    ---------
+   |    --------- required by a bound in this
 LL |     where T : for<'a> Foo<&'a isize>
    |               ---------------------- required by this bound in `want_hrtb`
 ...
@@ -16,7 +16,7 @@ error[E0277]: the trait bound `for<'a> &'a u32: Foo<&'a isize>` is not satisfied
   --> $DIR/hrtb-just-for-static.rs:30:17
    |
 LL | fn want_hrtb<T>()
-   |    ---------
+   |    --------- required by a bound in this
 LL |     where T : for<'a> Foo<&'a isize>
    |               ---------------------- required by this bound in `want_hrtb`
 ...
index 64d1b68cbed7f3df411a05e53768cda3567059a6..d69efc860059b83c7c5be9cb40bf2781a4521612 100644 (file)
@@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `<<T as Trait>::A as MultiDispatch<i32>>::
   --> $DIR/issue-24204.rs:14:12
    |
 LL | trait Trait: Sized {
-   |       -----
+   |       ----- required by a bound in this
 LL |     type A: MultiDispatch<Self::B, O = Self>;
    |                                    -------- required by this bound in `Trait`
 ...
index d90eb53f9006ffe8d2d651257d41e05a9aba2d9c..99fb2a1f5d030fc3889f44e1507e881e10ef37b5 100644 (file)
@@ -2,7 +2,7 @@ error[E0631]: type mismatch in function arguments
   --> $DIR/issue-43623.rs:14:5
    |
 LL | pub fn break_me<T, F>(f: F)
-   |        --------
+   |        -------- required by a bound in this
 LL | where T: for<'b> Trait<'b>,
 LL |       F: for<'b> FnMut(<T as Trait<'b>>::Assoc) {
    |          -------------------------------------- required by this bound in `break_me`
@@ -16,7 +16,7 @@ error[E0271]: type mismatch resolving `for<'b> <fn(_) as std::ops::FnOnce<(<Type
   --> $DIR/issue-43623.rs:14:5
    |
 LL | pub fn break_me<T, F>(f: F)
-   |        --------
+   |        -------- required by a bound in this
 LL | where T: for<'b> Trait<'b>,
 LL |       F: for<'b> FnMut(<T as Trait<'b>>::Assoc) {
    |                  ------------------------------ required by this bound in `break_me`
index 6cde93734667fca1fba59aca6b65f9274ee65428..c84d8ecb4c9e634a161771502972d54babd60875 100644 (file)
@@ -14,7 +14,7 @@ LL |     Bar(i32),
    |     -------- takes 1 argument
 ...
 LL | fn foo<F>(f: F)
-   |    ---
+   |    --- required by a bound in this
 LL | where
 LL |     F: Fn(),
    |        ---- required by this bound in `foo`
index a9970cc109699909c00bc092ca2ecefe0e448408..77b9d9c4aaa3a34da22ba01e6ec292dae93d1266 100644 (file)
@@ -2,7 +2,7 @@ error[E0277]: the trait bound `for<'t> <std::iter::Map<<&'t _ as std::iter::Into
   --> $DIR/issue-60218.rs:18:5
    |
 LL | pub fn trigger_error<I, F>(iterable: I, functor: F)
-   |        -------------
+   |        ------------- required by a bound in this
 ...
 LL | for<'t> <Map<<&'t I as IntoIterator>::IntoIter, F> as Iterator>::Item: Foo,
    |                                                                        --- required by this bound in `trigger_error`
index d13dcd54a479aa079dde0093cee5101c7e57d786..e74a34e247a6763e3381b031daaca69dd7854db2 100644 (file)
@@ -2,7 +2,7 @@ error[E0631]: type mismatch in function arguments
   --> $DIR/issue-60283.rs:14:13
    |
 LL | pub fn foo<T, F>(_: T, _: F)
-   |        ---
+   |        --- required by a bound in this
 LL | where T: for<'a> Trait<'a>,
 LL |       F: for<'a> FnMut(<T as Trait<'a>>::Item) {}
    |          ------------------------------------- required by this bound in `foo`
@@ -17,7 +17,7 @@ error[E0271]: type mismatch resolving `for<'a> <fn(_) {std::mem::drop::<_>} as s
   --> $DIR/issue-60283.rs:14:5
    |
 LL | pub fn foo<T, F>(_: T, _: F)
-   |        ---
+   |        --- required by a bound in this
 LL | where T: for<'a> Trait<'a>,
 LL |       F: for<'a> FnMut(<T as Trait<'a>>::Item) {}
    |                  ----------------------------- required by this bound in `foo`
index 6778ab8bfe4f29550a6ee6f30d6253a8cb191a8b..114f2d62e561ad0204af45e6a342a927b5bf3ab6 100644 (file)
@@ -2,7 +2,7 @@ error[E0277]: the size for values of type `(dyn Trait + 'static)` cannot be know
   --> $DIR/issue-65673.rs:9:16
    |
 LL | trait WithType {
-   |       --------
+   |       -------- required by a bound in this
 LL |     type Ctx;
    |     --------- required by this bound in `WithType`
 ...
index c5510bfa3f2fed9a678ae0fa43386fc482c4567e..ef484e94729e84105af767207cbba3ca6d223acf 100644 (file)
@@ -2,7 +2,7 @@ error[E0277]: the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
   --> $DIR/missing-assoc-type-bound-restriction.rs:17:19
    |
 LL | trait Parent {
-   |       ------
+   |       ------ required by a bound in this
 LL |     type Ty;
 LL |     type Assoc: Child<Self::Ty>;
    |                 --------------- required by this bound in `Parent`
@@ -16,7 +16,7 @@ error[E0277]: the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
   --> $DIR/missing-assoc-type-bound-restriction.rs:20:18
    |
 LL | trait Parent {
-   |       ------
+   |       ------ required by a bound in this
 LL |     type Ty;
 LL |     type Assoc: Child<Self::Ty>;
    |                 --------------- required by this bound in `Parent`
@@ -33,7 +33,7 @@ error[E0277]: the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
   --> $DIR/missing-assoc-type-bound-restriction.rs:20:5
    |
 LL | trait Parent {
-   |       ------
+   |       ------ required by a bound in this
 LL |     type Ty;
 LL |     type Assoc: Child<Self::Ty>;
    |                 --------------- required by this bound in `Parent`
index 356b90d0646236512e4117ce462362045621bebc..3188ee83e7d39f4cc5bd16c7340cc8b1606a4f40 100644 (file)
@@ -10,7 +10,7 @@ error[E0275]: overflow evaluating the requirement `Runtime<RootDatabase>: std::p
   --> $DIR/cycle-cache-err-60010.rs:31:20
    |
 LL | trait Database {
-   |       --------
+   |       -------- required by a bound in this
 LL |     type Storage;
    |     ------------- required by this bound in `Database`
 ...
index b18b36d029d702f6a2a8c16a76f3af673a29e191..9976243b200dc907562306b21bee2ef8995e799e 100644 (file)
@@ -2,7 +2,7 @@ error[E0277]: the trait bound `for<'a> &'a _: Bar` is not satisfied
   --> $DIR/where-for-self-2.rs:21:5
    |
 LL | fn foo<T>(x: &T)
-   |    ---
+   |    --- required by a bound in this
 LL |     where for<'a> &'a T: Bar
    |                          --- required by this bound in `foo`
 ...