mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-28 18:43:01 +00:00
Merge pull request #19704 from Veykril/push-wrvznvvpvtvp
Add expression fill mode variant for filling with underscore expressions
This commit is contained in:
commit
0fee71065b
31 changed files with 172 additions and 125 deletions
|
|
@ -599,7 +599,7 @@ fn filename_and_frag_for_def(
|
|||
Some(name) => {
|
||||
match m.attrs(db).by_key(sym::doc).find_string_value_in_tt(sym::keyword) {
|
||||
Some(kw) => {
|
||||
format!("keyword.{}.html", kw)
|
||||
format!("keyword.{kw}.html")
|
||||
}
|
||||
None => format!("{}/index.html", name.as_str()),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,9 +123,9 @@ pub use ide_completion::{
|
|||
CallableSnippets, CompletionConfig, CompletionFieldsToResolve, CompletionItem,
|
||||
CompletionItemKind, CompletionItemRefMode, CompletionRelevance, Snippet, SnippetScope,
|
||||
};
|
||||
pub use ide_db::text_edit::{Indel, TextEdit};
|
||||
pub use ide_db::{
|
||||
FileId, FilePosition, FileRange, RootDatabase, Severity, SymbolKind,
|
||||
assists::ExprFillDefaultMode,
|
||||
base_db::{Crate, CrateGraphBuilder, FileChange, SourceRoot, SourceRootId},
|
||||
documentation::Documentation,
|
||||
label::Label,
|
||||
|
|
@ -134,8 +134,9 @@ pub use ide_db::{
|
|||
search::{ReferenceCategory, SearchScope},
|
||||
source_change::{FileSystemEdit, SnippetEdit, SourceChange},
|
||||
symbol_index::Query,
|
||||
text_edit::{Indel, TextEdit},
|
||||
};
|
||||
pub use ide_diagnostics::{Diagnostic, DiagnosticCode, DiagnosticsConfig, ExprFillDefaultMode};
|
||||
pub use ide_diagnostics::{Diagnostic, DiagnosticCode, DiagnosticsConfig};
|
||||
pub use ide_ssr::SsrError;
|
||||
pub use span::Edition;
|
||||
pub use syntax::{TextRange, TextSize};
|
||||
|
|
|
|||
|
|
@ -451,7 +451,7 @@ mod tests {
|
|||
assert_eq!(x.len(), 1);
|
||||
match x.into_iter().next().unwrap() {
|
||||
MonikerResult::Local { enclosing_moniker } => {
|
||||
panic!("Unexpected local enclosed in {:?}", enclosing_moniker);
|
||||
panic!("Unexpected local enclosed in {enclosing_moniker:?}");
|
||||
}
|
||||
MonikerResult::Moniker(x) => {
|
||||
assert_eq!(identifier, x.identifier.to_string());
|
||||
|
|
|
|||
|
|
@ -51,8 +51,8 @@ pub(crate) fn status(db: &RootDatabase, file_id: Option<FileId>) -> String {
|
|||
buf,
|
||||
"Crate: {}\n",
|
||||
match display_name {
|
||||
Some(it) => format!("{it}({:?})", crate_id),
|
||||
None => format!("{:?}", crate_id),
|
||||
Some(it) => format!("{it}({crate_id:?})"),
|
||||
None => format!("{crate_id:?}"),
|
||||
}
|
||||
);
|
||||
format_to!(buf, " Root module file id: {}\n", root_file_id.index());
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ impl<'a> dot::Labeller<'a, Crate, Edge<'a>> for DotCrateGraph<'_> {
|
|||
|
||||
fn node_id(&'a self, n: &Crate) -> Id<'a> {
|
||||
let id = n.as_id().as_u32();
|
||||
Id::new(format!("_{:?}", id)).unwrap()
|
||||
Id::new(format!("_{id:?}")).unwrap()
|
||||
}
|
||||
|
||||
fn node_shape(&'a self, _node: &Crate) -> Option<LabelText<'a>> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue