diff options
| author | bors <bors@rust-lang.org> | 2023-08-22 00:02:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-08-22 00:02:50 +0000 |
| commit | 795ade084ac18e2198faeb63a783d2b8e2108c42 (patch) | |
| tree | 269a079212900202aba7f33c0cc947eb30835dd9 /compiler/rustc_lint/src | |
| parent | ef85656a10657ba5e4f7fe2931a4ca6293138d51 (diff) | |
| parent | 07b57f9a7a7c532497215e7973ae54d479f68cf9 (diff) | |
| download | rust-795ade084ac18e2198faeb63a783d2b8e2108c42.tar.gz rust-795ade084ac18e2198faeb63a783d2b8e2108c42.zip | |
Auto merge of #113365 - dima74:diralik/add-deprecated-suggestions, r=workingjubilee
Add `suggestion` for some `#[deprecated]` items
Consider code:
```rust
fn main() {
let _ = ["a", "b"].connect(" ");
}
```
Currently it shows deprecated warning:
```rust
warning: use of deprecated method `std::slice::<impl [T]>::connect`: renamed to join
--> src/main.rs:2:24
|
2 | let _ = ["a", "b"].connect(" ");
| ^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
```
This PR adds `suggestion` for `connect` and some other deprecated items, so the warning will be changed to this:
```rust
warning: use of deprecated method `std::slice::<impl [T]>::connect`: renamed to join
--> src/main.rs:2:24
|
2 | let _ = ["a", "b"].connect(" ");
| ^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
help: replace the use of the deprecated method
|
2 | let _ = ["a", "b"].join(" ");
| ^^^^
```
Diffstat (limited to 'compiler/rustc_lint/src')
0 files changed, 0 insertions, 0 deletions
