rust/compiler/rustc_hir_analysis
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
..
src Rollup merge of #127110 - surechen:fix_125488_06, r=compiler-errors 2024-06-29 22:10:58 +02:00
Cargo.toml bump itertools to 0.12 2024-03-08 12:34:05 +03:00
messages.ftl Rollup merge of #126686 - fmease:dump-preds-n-item-bounds, r=compiler-errors 2024-06-22 12:57:19 +02:00
README.md

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.