about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/counters.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-06-29 22:10:58 +0200
committerGitHub <noreply@github.com>2024-06-29 22:10:58 +0200
commit80cf576f59db72852b8b6fe25e8d697645dd20c8 (patch)
treed7b6c53352ab581e15d996f64a4e7572d8e14ba4 /compiler/rustc_mir_transform/src/coverage/counters.rs
parent77152955b8a1911d6a1f9f6ed07bf77e8531490c (diff)
parent50edb32939898fa6c22f3e2b2596317a031acaa7 (diff)
downloadrust-80cf576f59db72852b8b6fe25e8d697645dd20c8.tar.gz
rust-80cf576f59db72852b8b6fe25e8d697645dd20c8.zip
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``
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/counters.rs')
0 files changed, 0 insertions, 0 deletions