Files
rust/compiler/rustc_hir_analysis/src
Matthias Krüger 80cf576f59 Rollup merge of #127110 - surechen:fix_125488_06, r=compiler-errors
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``
2024-06-29 22:10:58 +02:00
..
2024-06-21 12:32:05 -04:00
2024-06-27 12:03:57 -04:00
2024-04-20 11:39:43 -04:00
2024-06-14 16:54:29 -04:00
2024-05-23 04:08:35 +02:00
2024-06-03 13:03:53 +00:00