about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/parser-slice-array.js
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2023-12-20 01:03:05 +0000
committerEsteban Küber <esteban@kuber.com.ar>2024-01-03 18:59:42 +0000
commit8551cab7b75ab8f9c51b1d5a847031093b79b546 (patch)
tree634b99c6f69f3ffb1cc0a8f075c5e75548605782 /tests/rustdoc-js-std/parser-slice-array.js
parent048750077676190a0733112d8f700e76a0553f60 (diff)
downloadrust-8551cab7b75ab8f9c51b1d5a847031093b79b546.tar.gz
rust-8551cab7b75ab8f9c51b1d5a847031093b79b546.zip
Account for multiple trait bounds in bare trait object suggestion
Note the parentheses in the last suggestion:

```
error[E0277]: the size for values of type `(dyn Foo + Send + 'static)` cannot be known at compilation time
  --> $DIR/not-on-bare-trait.rs:7:8
   |
LL | fn foo(_x: Foo + Send) {
   |        ^^ doesn't have a size known at compile-time
   |
   = 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)) {
   |            ++          +
```
Diffstat (limited to 'tests/rustdoc-js-std/parser-slice-array.js')
0 files changed, 0 insertions, 0 deletions