mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
80cf576f59
Fix a error suggestion for E0121 when using placeholder _ as return types on function signature. Recommit after refactoring based on comment: https://github.com/rust-lang/rust/pull/126017#issuecomment-2189149361 But when changing return type's lifetime to `ReError` will affect the subsequent borrow check process and cause test11 in typeck_type_placeholder_item.rs to lost E0515 message. ```rust fn test11(x: &usize) -> &_ { //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types &x //~ ERROR cannot return reference to function parameter(this E0515 msg will disappear) } ``` fixes #125488 r? ``@pnkfelix`` |
||
---|---|---|
.. | ||
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 | ||
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 | ||
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 | ||
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 | ||
tail-expr-if-as-return.rs | ||
tail-expr-if-as-return.stderr |