rust/tests/ui/async-await
Esteban Küber e565eeed78 Tweak E0277 when predicate comes indirectly from ?
When a `?` operation requires an `Into` conversion with additional bounds (like having a concrete error but wanting to convert to a trait object), we handle it speficically and provide the same kind of information we give other `?` related errors.

```
error[E0277]: `?` couldn't convert the error: `E: std::error::Error` is not satisfied
  --> $DIR/bad-question-mark-on-trait-object.rs:5:13
   |
LL | fn foo() -> Result<(), Box<dyn std::error::Error>> {
   |             -------------------------------------- required `E: std::error::Error` because of this
LL |     Ok(bar()?)
   |             ^ the trait `std::error::Error` is not implemented for `E`
   |
   = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
   = note: required for `Box<dyn std::error::Error>` to implement `From<E>`
```

Avoid talking about `FromResidual` when other more relevant information is being given, particularly from `rust_on_unimplemented`.
2025-02-20 18:15:39 +00:00
..
2024-08-20 18:33:25 +02:00
2024-08-17 12:43:25 -04:00
2024-12-13 00:04:56 +00:00
2024-12-13 00:04:56 +00:00
2024-12-13 00:04:56 +00:00
2024-10-12 06:14:46 -04:00
2024-10-12 06:14:46 -04:00
2024-12-05 14:14:17 -08:00
2024-12-05 14:14:17 -08:00
2024-10-12 06:14:46 -04:00