rust/tests/ui/return
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
..
dont-suggest-through-inner-const.rs
dont-suggest-through-inner-const.stderr
infer-return-ty-for-fn-sig-issue-125488.fixed
infer-return-ty-for-fn-sig-issue-125488.rs
infer-return-ty-for-fn-sig-issue-125488.stderr
issue-64620.rs
issue-64620.stderr
issue-82612-return-mutable-reference.rs
issue-82612-return-mutable-reference.stderr
issue-86188-return-not-in-fn-body.rs
issue-86188-return-not-in-fn-body.stderr Tweak multispan rendering 2024-12-12 23:36:27 +00:00
ret-bang.rs
ret-non-nil.rs
ret-non-nil.stderr
return-disjoint-regions.rs
return-disjoint-regions.stderr
return-from-diverging.rs
return-from-diverging.stderr
return-from-residual-sugg-issue-125997.fixed
return-from-residual-sugg-issue-125997.rs
return-from-residual-sugg-issue-125997.stderr Tweak E0277 when predicate comes indirectly from ? 2025-02-20 18:15:39 +00:00
return-impl-trait-bad.rs
return-impl-trait-bad.stderr
return-impl-trait.fixed
return-impl-trait.rs
return-impl-trait.stderr
return-match-array-const.rs
return-match-array-const.stderr Filter empty lines, comments and delimiters from previous to last multiline span rendering 2024-12-12 23:36:27 +00:00
return-nil.rs
return-struct.rs
return-struct.stderr
return-ty-mismatch-note.rs
return-ty-mismatch-note.stderr
return-type.rs
return-type.stderr
return-unit-from-diverging.rs
return-unit-from-diverging.stderr
suggest-a-value.rs
suggest-a-value.stderr
tail-expr-as-potential-return.rs
tail-expr-as-potential-return.stderr Tweak multispan rendering 2024-12-12 23:36:27 +00:00
tail-expr-if-as-return.rs
tail-expr-if-as-return.stderr