diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-01-21 12:28:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-21 12:28:55 +0100 |
| commit | 3eb7fe32a137cc4c1a9b7616f99769ce81487f7f (patch) | |
| tree | 0508b37d9eee06802ff9117e1abe284171b48a2c /compiler/rustc_pattern_analysis/src | |
| parent | 1229d4cde300ddfe3873b59b269cfcf5db143295 (diff) | |
| parent | 6f1944d394923fcc88a02f46de5258a36896e99e (diff) | |
| download | rust-3eb7fe32a137cc4c1a9b7616f99769ce81487f7f.tar.gz rust-3eb7fe32a137cc4c1a9b7616f99769ce81487f7f.zip | |
Rollup merge of #120180 - Zalathar:vec-split-off-alternatives, r=dtolnay
Document some alternatives to `Vec::split_off` One of the discussion points that came up in #119917 is that some people use `Vec::split_off` in cases where they probably shouldn't, because the alternatives (like `mem::take`) are hard to discover. This PR adds some suggestions to the documentation of `split_off` that should point people towards alternatives that might be more appropriate for their use-case. I've deliberately tried to keep these changes as simple and uncontroversial as possible, so that they don't depend on how the team decides to handle the concerns raised in #119917. That's why I haven't touched the existing documentation for `split_off`, and haven't added links to `split_off` to the documentation of other methods.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions
