aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Add benchmark test for mbeEdwin Cheng2021-02-246-0/+783
| | | |
* | | | Merge #7677bors[bot]2021-02-275-64/+488
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7677: More enum matching r=yoshuawuyts a=jDomantas * Renamed existing `generate_enum_match_method` to `generate_enum_is_variant` * Added two similar assists to generate `into_` and `as_` methods. * Made all of them general enough to work on record and tuple variants too. For `as_` method generation there's room to improve: * Right now it always returns `Option<&Field>`, even though `Option<Field>` would be nicer when `Field: Copy`. I don't know how to check if the field type implements `Copy`. If given suggestions I could try to fix this in a follow-up pr. * `&String` could be replaced with `&str`, `&Box<_>` with `&_`, and probably some more. I don't know what would be a good way to do that. Closes #7604 Co-authored-by: Domantas Jadenkus <[email protected]>
| * | | generate try_into instead of intoDomantas Jadenkus2021-02-273-72/+96
| | | |
| * | | rename generate_enum_match_method file to match assist nameDomantas Jadenkus2021-02-272-2/+2
| | | |
| * | | move into_ and as_ generation to a separate fileDomantas Jadenkus2021-02-274-402/+340
| | | |
| * | | cargo fmtDomantas Jadenkus2021-02-271-35/+20
| | | |
| * | | add generate_enum_as_method assistDomantas Jadenkus2021-02-273-0/+154
| | | |
| * | | deduplicate someDomantas Jadenkus2021-02-271-37/+28
| | | |
| * | | add generate_enum_into_method assistDomantas Jadenkus2021-02-273-20/+275
| | | |
| * | | make generate_enum_is_method work on any variantsDomantas Jadenkus2021-02-271-18/+95
| | | |
| * | | rename existing assist to generate_enum_is_methodDomantas Jadenkus2021-02-273-11/+11
|/ / /
* | | Merge #7794bors[bot]2021-02-261-2/+24
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7794: Disable "Flip comma" assist inside a macro call r=Veykril a=greenhat Fix #7693 Disables "Flip comma" assist if called inside a macro call. Co-authored-by: Denys Zadorozhnyi <[email protected]>
| * | | Disable "Flip comma" assist inside a macro callDenys Zadorozhnyi2021-02-261-2/+24
|/ / /
* | | Merge #7792bors[bot]2021-02-261-3/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7792: docs(ide_assists): Change remaining occurrences of importMergeBehaviour to importMergeBehavior r=lnicola a=SanchithHegde Co-authored-by: Sanchith Hegde <[email protected]>
| * | | docs(ide_assists): Change importMergeBehaviour to importMergeBehaviorSanchith Hegde2021-02-261-3/+3
|/ / /
* | | Merge #7786bors[bot]2021-02-252-7/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7786: bump crates r=kjeremy a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * | | bump crateskjeremy2021-02-252-7/+7
|/ / /
* | | Merge #7785bors[bot]2021-02-251-40/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7785: :arrow_up: crates r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | :arrow_up: cratesAleksey Kladov2021-02-251-40/+8
|/ / /
* | | Merge #7741bors[bot]2021-02-244-0/+327
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7741: Add convert_for_to_iter_for_each assist r=mattyhall a=mattyhall Implements one direction of #7681 I wonder if this tries to guess too much at the right thing here. A common pattern is: ```rust let col = vec![1, 2, 3]; for v in &mut col { *v *= 2; } // equivalent to: col.iter_mut().for_each(|v| *v *= 2); ``` I've tried to detect this case by checking if the expression after the `in` is a (mutable) reference and if not inserting iter()/iter_mut(). This is just a convention used in the stdlib however, so could sometimes be wrong. I'd be happy to make an improvement for this, but not sure what would be best. A few options spring to mind: 1. Only allow this for types that are known to have iter/iter_mut (ie stdlib types) 2. Try to check if iter/iter_mut exists and they return the right iterator type 3. Don't try to do this and just add `.into_iter()` to whatever is after `in` Co-authored-by: Matt Hall <[email protected]>
| * | Address further review commentsMatt Hall2021-02-242-51/+36
| | | | | | | | | | | | | | | | | | * Use known names for iter/iter_mut method (simplifies checking if the method exists * Extract code to check assist with fixtures to function
| * | Address review commentsMatt Hall2021-02-231-33/+125
| | | | | | | | | | | | | | | * Move code to build replacement into closure * Look for iter/iter_mut methods on types behind reference
| * | Add convert_for_to_iter_for_each assistMatt Hall2021-02-233-0/+250
| |/
* | Merge #7719bors[bot]2021-02-248-21/+137
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 7719: De Morgan's Law assist now correctly parenthesizes binary expressions. r=Veykril a=lbrande Closes #7694 by parenthesizing binary expressions that are negated. Co-authored-by: lbrande <[email protected]> Co-authored-by: Lukas Wirth <[email protected]>
| * | Add tests for apply_demorganLukas Wirth2021-02-243-18/+83
| | |
| * | De Morgan's Law assist now correctly inverts <, <=, >, >=.lbrande2021-02-247-13/+68
| | |
| * | De Morgan's Law assist now correctly parenthesizes binary expressions.lbrande2021-02-243-11/+7
| | |
* | | Merge #7775bors[bot]2021-02-241-1/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 7775: Fix typo. r=Veykril a=boxdot Co-authored-by: boxdot <[email protected]>
| * | Fix typo.boxdot2021-02-241-1/+1
|/ /
* | Merge #7772bors[bot]2021-02-232-4/+36
|\ \ | | | | | | | | | | | | | | | | | | | | | 7772: Pickup ConstReference patterns in FindUsages r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <[email protected]>
| * | Pickup ConstReference patterns in FindUsagesLukas Wirth2021-02-232-4/+36
|/ /
* | Merge #7770bors[bot]2021-02-231-1/+4
|\ \ | |/ |/| | | | | | | | | | | | | 7770: reliable memory usage during benchmarking r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * reliable memory usage during benchmarkingAleksey Kladov2021-02-231-1/+4
| |
* | Merge #7769bors[bot]2021-02-231-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | 7769: Update mio r=kjeremy a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * | Update miokjeremy2021-02-231-2/+2
| | |
* | | Merge #7768bors[bot]2021-02-234-9/+65
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | 7768: Fix visibility computation when inside a block expression r=jonas-schievink a=jonas-schievink fixes https://github.com/rust-analyzer/rust-analyzer/issues/7728 bors r+ Co-authored-by: Jonas Schievink <[email protected]>
| * | is_visible_from_def_map: handle block expressionsJonas Schievink2021-02-233-9/+37
| | |
| * | Add testJonas Schievink2021-02-231-0/+28
| |/
* | Merge #7766bors[bot]2021-02-232-1630/+1852
|\ \ | |/ |/| | | | | | | | | | | 7766: Update our vscode npm packages r=kjeremy a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * Update our vscode npm packageskjeremy2021-02-232-1630/+1852
|/
* Merge #7759bors[bot]2021-02-2286-50/+51
|\ | | | | | | | | | | | | | | | | 7759: 7526: Rename ide related crates r=Veykril a=chetankhilosiya renamed assists -> ide_assists and ssr -> ide_ssr. the completion crate is already renamed. Co-authored-by: Chetan Khilosiya <[email protected]>
| * 7526: Renamed create ssr to ide_ssr.Chetan Khilosiya2021-02-2216-24/+25
| |
| * 7526: Rename crate assists to ide_assists.Chetan Khilosiya2021-02-2273-26/+26
|/
* Merge #7756bors[bot]2021-02-222-22/+2
|\ | | | | | | | | | | | | | | 7756: update tracing-tree r=kjeremy a=kjeremy Removes some dependencies Co-authored-by: kjeremy <[email protected]>
| * update tidykjeremy2021-02-221-1/+0
| |
| * update tracing-treekjeremy2021-02-221-21/+2
|/
* Merge #7753bors[bot]2021-02-221-2/+1
|\ | | | | | | | | | | | | | | | | | | 7753: Add isize to the list of suffixed integers in typed_integer r=kjeremy a=jonasbb The missing `isize` in `typed_integers` seems to just be an oversight. Might fix: #7751 Co-authored-by: Jonas Bushart <[email protected]>
| * Add isize to the list of suffixed integers in typed_integerJonas Bushart2021-02-221-2/+1
| | | | | | | | | | | | The missing `isize` in `typed_integers` seems to just be an oversight. Might fix: #7751
* | Merge #7752bors[bot]2021-02-221-2/+2
|\ \ | |/ |/| | | | | | | | | | | 7752: up once_cell r=kjeremy a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * up once_cellkjeremy2021-02-221-2/+2
| |