Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | Added test for impl member assist when impl def is missing braces | Matt Hooper | 2020-09-21 | 1 | -0/+19 | |
| | | ||||||
* | | Replace entire impl def instead of only associated items for missing impl ↵ | Matt Hooper | 2020-09-21 | 1 | -9/+12 | |
| | | | | | | | | member assist (if braces are missing from an impl def then there is no associated item list in the AST) | |||||
* | | Merge #5989 | bors[bot] | 2020-09-16 | 3 | -103/+287 | |
|\ \ | |/ |/| | | | | | | | | | | | | | | | 5989: Rewrite import merging r=jonas-schievink a=Veykril Rewrites how import merging is being handled. It is now a recursive function to properly handle merging of intermediate levels in the import trees. With this ordering the imports is also now possible tho it doesn't quite order it the same way as `rustfmt` does yet, namely it orders lowercase identifiers after uppercase identifiers as that is the standard character order that rust uses. This also fixes a few weird behaviors that were visible in some of the `replace_qualified_name_with_use.rs` tests. This really took longer than I was hoping for, fighting with import trees is quite the exhausting task 😅 Co-authored-by: Lukas Wirth <[email protected]> | |||||
| * | Add make::glob_use_tree function to create star-only UseTree | Lukas Wirth | 2020-09-16 | 1 | -11/+3 | |
| | | ||||||
| * | Fix merge imports failing if the `self` module import is in the wrong tree | Lukas Wirth | 2020-09-12 | 1 | -22/+34 | |
| | | ||||||
| * | Tidy up `recursive_merge` implementation | Lukas Wirth | 2020-09-12 | 1 | -60/+60 | |
| | | ||||||
| * | Reimplement import merging by making it recursive properly nesting all levels | Lukas Wirth | 2020-09-12 | 3 | -83/+263 | |
| | | ||||||
* | | Make MergeBehaviour configurable | Lukas Wirth | 2020-09-12 | 6 | -15/+27 | |
|/ | ||||||
* | Properly preserve macro braces | Kirill Bulatov | 2020-09-11 | 1 | -25/+16 | |
| | ||||||
* | Merge #5955 | bors[bot] | 2020-09-11 | 2 | -82/+114 | |
|\ | | | | | | | | | | | | | | | | | | | 5955: Remove merge import code duplication r=jonas-schievink a=Veykril This removes the code duplication caused by #5935, this also allows the assist to merge imports that have equal visibility and prevents merges of unequal visibility. This PR also fixes an iteration mistake in the mentioned PR: Turns out I made a mistake when writing the `segment_iter` function, I was assuming that the `children` of a path will just be the segments, which is obviously not the case. This also brings insertion order of shorter paths in line with how `rustfmt` orders them. Co-authored-by: Lukas Wirth <[email protected]> | |||||
| * | Allow merge_imports assists to merge imports of equal visibility | Lukas Wirth | 2020-09-05 | 2 | -6/+61 | |
| | | ||||||
| * | Remove duplicated import merge logic | Lukas Wirth | 2020-09-05 | 2 | -77/+43 | |
| | | ||||||
| * | Fix segment_iter not iterating segments properly | Lukas Wirth | 2020-09-05 | 1 | -5/+16 | |
| | | ||||||
* | | One more test | Kirill Bulatov | 2020-09-10 | 1 | -0/+2 | |
| | | ||||||
* | | Use better heuristics for replacement text when removing dbg! | Kirill Bulatov | 2020-09-10 | 1 | -37/+116 | |
|/ | ||||||
* | Merge #5940 | bors[bot] | 2020-09-04 | 3 | -0/+183 | |
|\ | | | | | | | | | | | | | | | 5940: Implement "Replace `impl Trait` function argument with the named generic" assist. r=matklad a=alekseysidorov Fixes #5085 Co-authored-by: Aleksei Sidorov <[email protected]> | |||||
| * | Remove unnecessary comma | Aleksei Sidorov | 2020-09-04 | 2 | -10/+10 | |
| | | ||||||
| * | Fix tests | Aleksei Sidorov | 2020-09-04 | 2 | -17/+24 | |
| | | ||||||
| * | Update codegen | Aleksei Sidorov | 2020-09-04 | 1 | -0/+13 | |
| | | ||||||
| * | Fix nitpicks | Aleksei Sidorov | 2020-09-04 | 1 | -7/+12 | |
| | | ||||||
| * | Resolve most of corner cases | Aleksei Sidorov | 2020-09-03 | 1 | -8/+102 | |
| | | ||||||
| * | Initial implementation of the #5085 issue | Aleksei Sidorov | 2020-09-03 | 2 | -0/+64 | |
| | | ||||||
* | | Add extra insert_use test for pub(crate) re-export handling | Lukas Wirth | 2020-09-03 | 2 | -12/+19 | |
| | | ||||||
* | | Disable insert_import in extract_struct_from_enum_variant until its fixed | Lukas Wirth | 2020-09-03 | 1 | -0/+4 | |
| | | ||||||
* | | Fix import insertion breaking nested modules | Lukas Wirth | 2020-09-03 | 5 | -62/+117 | |
| | | ||||||
* | | Fix inserting imports in front of inner attributes | Lukas Wirth | 2020-09-03 | 2 | -3/+54 | |
| | | ||||||
* | | Replace insert_use_statement with the new insert_use | Lukas Wirth | 2020-09-03 | 4 | -54/+68 | |
| | | ||||||
* | | Impl make::blank_line | Lukas Wirth | 2020-09-03 | 2 | -26/+9 | |
| | | ||||||
* | | Use mark to check that paths that are too long will not be merged | Lukas Wirth | 2020-09-03 | 1 | -0/+13 | |
| | | ||||||
* | | Tidy up tests and apply suggested changes | Lukas Wirth | 2020-09-03 | 1 | -72/+107 | |
| | | ||||||
* | | Add more import insertion tests | Lukas Wirth | 2020-09-03 | 1 | -3/+68 | |
| | | ||||||
* | | Begin refactor of import insertion | Lukas Wirth | 2020-09-03 | 1 | -468/+440 | |
|/ | ||||||
* | Unify naming | Aleksey Kladov | 2020-09-03 | 1 | -1/+1 | |
| | ||||||
* | Reduce path_from_text usage | Aleksey Kladov | 2020-08-31 | 1 | -13/+17 | |
| | ||||||
* | **Inline Variable** works with field shorthand | Aleksey Kladov | 2020-08-26 | 1 | -2/+29 | |
| | ||||||
* | Minor | Aleksey Kladov | 2020-08-25 | 1 | -2/+1 | |
| | ||||||
* | Cleanup invert-if | Aleksey Kladov | 2020-08-25 | 1 | -19/+14 | |
| | | | | | * stick to trivial factory functions in make * compress the logic for inverting Option/Result | |||||
* | Merge #5733 | bors[bot] | 2020-08-24 | 2 | -119/+617 | |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5733: Fix expand glob import bugs r=matklad a=unexge fixes https://github.com/rust-analyzer/rust-analyzer/issues/5709 TODOs: - [x] Incorrect node replacing <details> <summary>Details</summary> ```rust use crate::{ body::scope::{ExprScopes, ScopeId}, body::Body, builtin_type::BuiltinType, db::DefDatabase, expr::{ExprId, PatId}, generics::GenericParams, item_scope::{BuiltinShadowMode, BUILTIN_SCOPE}, nameres::CrateDefMap, path::*<|>, per_ns::PerNs, visibility::{RawVisibility, Visibility}, AdtId, AssocContainerId, ConstId, ContainerId, DefWithBodyId, EnumId, EnumVariantId, FunctionId, GenericDefId, HasModule, ImplId, LocalModuleId, Lookup, ModuleDefId, ModuleId, StaticId, StructId, TraitId, TypeAliasId, TypeParamId, VariantId, }; ``` becames ```rust use crate::{PathKind, name, name, ModPath}; ``` </details> - [x] Ignoring visibility <details> <summary>Details</summary> ```rust mod foo { mod bar { pub struct Bar; } } use foo::bar::*; fn baz(bar: Bar) {} ``` becames ```rust mod foo { mod bar { pub struct Bar; } } use foo::bar::Bar; fn baz(bar: Bar) {} ``` although mod `bar` is private </details> - [x] Eating attributes Co-authored-by: unexge <[email protected]> | |||||
| * | Use new `Definition::usages` API in expand glob import | unexge | 2020-08-20 | 1 | -1/+1 | |
| | | ||||||
| * | Fix importing private modules in expand glob import | unexge | 2020-08-20 | 1 | -0/+52 | |
| | | ||||||
| * | Fix importing unused traits in expand glob import | unexge | 2020-08-20 | 1 | -28/+73 | |
| | | ||||||
| * | Use fixme instead of todo | unexge | 2020-08-20 | 1 | -1/+1 | |
| | | ||||||
| * | Use `Definition::find_usages` for finding used items in expand glob import | unexge | 2020-08-20 | 2 | -114/+137 | |
| | | ||||||
| * | Run rustfmt | unexge | 2020-08-20 | 1 | -3/+5 | |
| | | ||||||
| * | Handle more cases in AST replacing in expand glob import | unexge | 2020-08-20 | 1 | -34/+219 | |
| | | ||||||
| * | Improve AST replacing in expand glob import | unexge | 2020-08-20 | 1 | -38/+229 | |
| | | ||||||
* | | Merge #4776 | bors[bot] | 2020-08-24 | 1 | -8/+9 | |
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4776: Do a weekly minor publish to crates.io r=matklad a=pksunkara This is the same system I set up on Chalk repo. Every week it creates a new minor version, pushes it to github and then deploys it to crates.io. Co-authored-by: Pavan Kumar Sunkara <[email protected]> | |||||
| * | | Add description for crates that will be published | Pavan Kumar Sunkara | 2020-08-24 | 1 | -0/+1 | |
| | | | ||||||
| * | | Add version to deps in cargo.toml | Pavan Kumar Sunkara | 2020-08-24 | 1 | -8/+8 | |
| | | | ||||||
* | | | Invert if should be smart about is_some, is_none, is_ok, is_err | dragfire | 2020-08-24 | 2 | -1/+38 | |
|/ / |