]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/higher-rank-trait-bounds/hrtb-just-for-static.stderr
Rollup merge of #100462 - zohnannor:master, r=thomcc
[rust.git] / src / test / ui / higher-rank-trait-bounds / hrtb-just-for-static.stderr
index b4312091edb279f9a987b73efe3e97634be548aa..31e11e12835166a4aca0c219a9cfd58ecc0f3b0b 100644 (file)
@@ -14,6 +14,12 @@ LL | fn give_some<'a>() {
    |              -- lifetime `'a` defined here
 LL |     want_hrtb::<&'a u32>()
    |     ^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+   |
+note: due to current limitations in the borrow checker, this implies a `'static` lifetime
+  --> $DIR/hrtb-just-for-static.rs:9:15
+   |
+LL |     where T : for<'a> Foo<&'a isize>
+   |               ^^^^^^^^^^^^^^^^^^^^^^
 
 error: implementation of `Foo` is not general enough
   --> $DIR/hrtb-just-for-static.rs:30:5