diff options
| author | Remy Rakic <remy.rakic@gmail.com> | 2019-12-02 18:38:05 +0100 |
|---|---|---|
| committer | Remy Rakic <remy.rakic@gmail.com> | 2019-12-06 11:50:02 +0100 |
| commit | 67b04d5f641efe6bc0dd989d0a2747c210c134eb (patch) | |
| tree | d313c958e3073a2426db9240c0a7253669dec925 | |
| parent | 02a6662e2feec6ecf49d497c78ecf17599223e03 (diff) | |
| download | rust-67b04d5f641efe6bc0dd989d0a2747c210c134eb.tar.gz rust-67b04d5f641efe6bc0dd989d0a2747c210c134eb.zip | |
bless polonius output of test hrtb-perfect-forwarding.rs
The plan is to use chalk and not have polonius deal with this.
| -rw-r--r-- | src/test/ui/hrtb/hrtb-perfect-forwarding.polonius.stderr | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/test/ui/hrtb/hrtb-perfect-forwarding.polonius.stderr b/src/test/ui/hrtb/hrtb-perfect-forwarding.polonius.stderr new file mode 100644 index 00000000000..558d643cde8 --- /dev/null +++ b/src/test/ui/hrtb/hrtb-perfect-forwarding.polonius.stderr @@ -0,0 +1,68 @@ +warning: function cannot return without recursing + --> $DIR/hrtb-perfect-forwarding.rs:22:1 + | +LL | / fn no_hrtb<'b,T>(mut t: T) +LL | | where T : Bar<&'b isize> +LL | | { +LL | | // OK -- `T : Bar<&'b isize>`, and thus the impl above ensures that +LL | | // `&mut T : Bar<&'b isize>`. +LL | | no_hrtb(&mut t); + | | --------------- recursive call site +LL | | } + | |_^ cannot return without recursing + | + = note: `#[warn(unconditional_recursion)]` on by default + = help: a `loop` may express intention better if this is on purpose + +warning: function cannot return without recursing + --> $DIR/hrtb-perfect-forwarding.rs:30:1 + | +LL | / fn bar_hrtb<T>(mut t: T) +LL | | where T : for<'b> Bar<&'b isize> +LL | | { +LL | | // OK -- `T : for<'b> Bar<&'b isize>`, and thus the impl above +... | +LL | | bar_hrtb(&mut t); + | | ---------------- recursive call site +LL | | } + | |_^ cannot return without recursing + | + = help: a `loop` may express intention better if this is on purpose + +warning: function cannot return without recursing + --> $DIR/hrtb-perfect-forwarding.rs:39:1 + | +LL | / fn foo_hrtb_bar_not<'b,T>(mut t: T) +LL | | where T : for<'a> Foo<&'a isize> + Bar<&'b isize> +LL | | { +LL | | // Not OK -- The forwarding impl for `Foo` requires that `Bar` also +... | +LL | | foo_hrtb_bar_not(&mut t); + | | ------------------------ recursive call site +LL | | } + | |_^ cannot return without recursing + | + = help: a `loop` may express intention better if this is on purpose + +error: higher-ranked subtype error + --> $DIR/hrtb-perfect-forwarding.rs:46:5 + | +LL | foo_hrtb_bar_not(&mut t); + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: function cannot return without recursing + --> $DIR/hrtb-perfect-forwarding.rs:49:1 + | +LL | / fn foo_hrtb_bar_hrtb<T>(mut t: T) +LL | | where T : for<'a> Foo<&'a isize> + for<'b> Bar<&'b isize> +LL | | { +LL | | // OK -- now we have `T : for<'b> Bar&'b isize>`. +LL | | foo_hrtb_bar_hrtb(&mut t); + | | ------------------------- recursive call site +LL | | } + | |_^ cannot return without recursing + | + = help: a `loop` may express intention better if this is on purpose + +error: aborting due to previous error + |
