diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/traits/bound/not-on-bare-trait.stderr (renamed from src/test/ui/traits/bound/not-on-bare-trait.stderr) | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/ui/traits/bound/not-on-bare-trait.stderr b/tests/ui/traits/bound/not-on-bare-trait.stderr index 8da0b6d6b..36b08a7d3 100644 --- a/src/test/ui/traits/bound/not-on-bare-trait.stderr +++ b/tests/ui/traits/bound/not-on-bare-trait.stderr @@ -20,6 +20,10 @@ LL | fn foo(_x: Foo + Send) { | = help: the trait `Sized` is not implemented for `(dyn Foo + Send + 'static)` = help: unsized fn params are gated as an unstable feature +help: you can use `impl Trait` as the argument type + | +LL | fn foo(_x: impl Foo + Send) { + | ++++ help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn foo(_x: &Foo + Send) { |