diff options
| author | surechen <chenshuo17@huawei.com> | 2024-06-29 14:23:33 +0800 |
|---|---|---|
| committer | surechen <chenshuo17@huawei.com> | 2024-06-29 14:23:33 +0800 |
| commit | 50edb32939898fa6c22f3e2b2596317a031acaa7 (patch) | |
| tree | 81229a01ced8a58c2cb8195161352990c07ee6a9 /compiler/rustc_mir_transform/src | |
| parent | 4e63822fc4e2ca675dd28bb3f332f7fd4f3f8126 (diff) | |
| download | rust-50edb32939898fa6c22f3e2b2596317a031acaa7.tar.gz rust-50edb32939898fa6c22f3e2b2596317a031acaa7.zip | |
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)
}
```
Diffstat (limited to 'compiler/rustc_mir_transform/src')
0 files changed, 0 insertions, 0 deletions
