rust/tests/ui/issues/issue-66706.stderr
Esteban Küber c7d171d771 On implicit Sized bound on fn argument, point at type instead of pattern
Instead of

```
error[E0277]: the size for values of type `(dyn ThriftService<(), AssocType = _> + 'static)` cannot be known at compilation time
  --> $DIR/issue-59324.rs:23:20
   |
LL | fn with_factory<H>(factory: dyn ThriftService<()>) {}
   |                    ^^^^^^^ doesn't have a size known at compile-time
```

output

```
error[E0277]: the size for values of type `(dyn ThriftService<(), AssocType = _> + 'static)` cannot be known at compilation time
  --> $DIR/issue-59324.rs:23:29
   |
LL | fn with_factory<H>(factory: dyn ThriftService<()>) {}
   |                             ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
```
2024-09-27 00:45:02 +00:00

46 lines
1.3 KiB
Plaintext

error: expected one of `,` or `|`, found `&`
--> $DIR/issue-66706.rs:2:16
|
LL | [0; [|_: _ &_| ()].len()]
| -^ expected one of `,` or `|`
| |
| help: missing `,`
error: expected identifier, found reserved identifier `_`
--> $DIR/issue-66706.rs:8:20
|
LL | [0; [|f @ &ref _| {} ; 0 ].len() ];
| ^ expected identifier, found reserved identifier
error: expected one of `,` or `|`, found `&`
--> $DIR/issue-66706.rs:13:17
|
LL | [0; [|&_: _ &_| {}; 0 ].len()]
| -^ expected one of `,` or `|`
| |
| help: missing `,`
error: expected identifier, found reserved identifier `_`
--> $DIR/issue-66706.rs:19:26
|
LL | [0; match [|f @ &ref _| () ] {} ]
| ----- ^ expected identifier, found reserved identifier
| |
| while parsing this `match` expression
error[E0282]: type annotations needed
--> $DIR/issue-66706.rs:2:14
|
LL | [0; [|_: _ &_| ()].len()]
| ^ cannot infer type
error[E0282]: type annotations needed
--> $DIR/issue-66706.rs:13:11
|
LL | [0; [|&_: _ &_| {}; 0 ].len()]
| ^^^^^ cannot infer type
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0282`.