mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-12-15 21:34:19 +00:00
Auto merge of #17523 - wada314:master, r=Veykril
Add an option to use "::" for the external crate prefix. Fixes #11823 . Hi I'm very new to rust-analyzer and not sure how the review process are. Can somebody take a look at this PR? thanks!
This commit is contained in:
commit
a494aaba87
43 changed files with 233 additions and 11 deletions
|
|
@ -146,6 +146,7 @@ pub(crate) fn json_in_items(
|
|||
let cfg = ImportPathConfig {
|
||||
prefer_no_std: config.prefer_no_std,
|
||||
prefer_prelude: config.prefer_prelude,
|
||||
prefer_absolute: config.prefer_absolute,
|
||||
};
|
||||
|
||||
if !scope_has("Serialize") {
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@ fn fixes(ctx: &DiagnosticsContext<'_>, d: &hir::MissingFields) -> Option<Vec<Ass
|
|||
ImportPathConfig {
|
||||
prefer_no_std: ctx.config.prefer_no_std,
|
||||
prefer_prelude: ctx.config.prefer_prelude,
|
||||
prefer_absolute: ctx.config.prefer_absolute,
|
||||
},
|
||||
)?;
|
||||
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ fn fixes(ctx: &DiagnosticsContext<'_>, d: &hir::TypedHole) -> Option<Vec<Assist>
|
|||
ImportPathConfig {
|
||||
prefer_no_std: ctx.config.prefer_no_std,
|
||||
prefer_prelude: ctx.config.prefer_prelude,
|
||||
prefer_absolute: ctx.config.prefer_absolute,
|
||||
},
|
||||
)
|
||||
.ok()
|
||||
|
|
|
|||
|
|
@ -231,6 +231,7 @@ pub struct DiagnosticsConfig {
|
|||
pub insert_use: InsertUseConfig,
|
||||
pub prefer_no_std: bool,
|
||||
pub prefer_prelude: bool,
|
||||
pub prefer_absolute: bool,
|
||||
pub term_search_fuel: u64,
|
||||
pub term_search_borrowck: bool,
|
||||
}
|
||||
|
|
@ -258,6 +259,7 @@ impl DiagnosticsConfig {
|
|||
},
|
||||
prefer_no_std: false,
|
||||
prefer_prelude: true,
|
||||
prefer_absolute: false,
|
||||
term_search_fuel: 400,
|
||||
term_search_borrowck: true,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue