aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/assist_context.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-24 15:26:33 +0100
committerGitHub <[email protected]>2020-08-24 15:26:33 +0100
commit81fa00c5b5d5ffb559a39c7ff5190a2519a8ea61 (patch)
tree9d6b197eb7da370c26b52d8a0e4e7dfac480b979 /crates/assists/src/assist_context.rs
parent3aa35e284590c709f1efea695bb12a1d651ddedb (diff)
parentef54e8451d2ebe20e900f9bea4545795ebd035c7 (diff)
Merge #5733
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]>
Diffstat (limited to 'crates/assists/src/assist_context.rs')
-rw-r--r--crates/assists/src/assist_context.rs4
1 files changed, 0 insertions, 4 deletions
diff --git a/crates/assists/src/assist_context.rs b/crates/assists/src/assist_context.rs
index 11c171fc2..bf520069e 100644
--- a/crates/assists/src/assist_context.rs
+++ b/crates/assists/src/assist_context.rs
@@ -73,10 +73,6 @@ impl<'a> AssistContext<'a> {
73 self.sema.db 73 self.sema.db
74 } 74 }
75 75
76 pub(crate) fn source_file(&self) -> &SourceFile {
77 &self.source_file
78 }
79
80 // NB, this ignores active selection. 76 // NB, this ignores active selection.
81 pub(crate) fn offset(&self) -> TextSize { 77 pub(crate) fn offset(&self) -> TextSize {
82 self.frange.range.start() 78 self.frange.range.start()