diff options
| author | bors <bors@rust-lang.org> | 2023-04-11 14:34:47 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-04-11 14:34:47 +0000 |
| commit | fd276218ecdfd64f915460be3b68aaa5dc58a18e (patch) | |
| tree | 26af886bc27885387c44bfe9f2f8c60d3eb5dd05 /tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-unwind.diff | |
| parent | 600283f2de12b40fbe60a6cade3650785ef0bbbc (diff) | |
| parent | e6e48728da1c4500304e022d6dfe29bb5afb0699 (diff) | |
| download | rust-fd276218ecdfd64f915460be3b68aaa5dc58a18e.tar.gz rust-fd276218ecdfd64f915460be3b68aaa5dc58a18e.zip | |
Auto merge of #14549 - lowr:patch/no-unstable-item-compl-on-stable, r=Veykril
Don't suggest unstable items on stable toolchain Closes #3020 This PR implements stability check in `ide-completion` so that unstable items are only suggested if you're on nightly toolchain. It's a bit unfortunate `CompletionContext::check_stability()` is spammed all over the crate, but we should call it before building `CompletionItem` as you cannot get attributes on the item it's completing from that struct. I looked up every callsite of `Builder::add_to()`, `Completions::add[_opt]()`, and`Completions::add_all()` and inserted the check wherever necessary. The tests are admittedly incomplete in that I didn't add tests for every kind of item as I thought that would be too big and not worthwhile. I copy-pasted some existing basic tests in every test module and adjusted them.
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-unwind.diff')
0 files changed, 0 insertions, 0 deletions
