mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Run cargo fix --edition-idioms
This commit is contained in:
parent
23d25a3094
commit
816f7fe12a
230 changed files with 888 additions and 888 deletions
|
@ -44,7 +44,7 @@ fn render(
|
|||
ctx @ RenderContext { completion, .. }: RenderContext<'_>,
|
||||
local_name: Option<hir::Name>,
|
||||
func: hir::Function,
|
||||
func_kind: FuncKind,
|
||||
func_kind: FuncKind<'_>,
|
||||
) -> Builder {
|
||||
let db = completion.db;
|
||||
|
||||
|
@ -150,7 +150,7 @@ fn render(
|
|||
|
||||
pub(super) fn add_call_parens<'b>(
|
||||
builder: &'b mut Builder,
|
||||
ctx: &CompletionContext,
|
||||
ctx: &CompletionContext<'_>,
|
||||
cap: SnippetCap,
|
||||
name: SmolStr,
|
||||
escaped_name: SmolStr,
|
||||
|
@ -211,7 +211,7 @@ pub(super) fn add_call_parens<'b>(
|
|||
builder.label(SmolStr::from_iter([&name, label_suffix])).insert_snippet(cap, snippet)
|
||||
}
|
||||
|
||||
fn ref_of_param(ctx: &CompletionContext, arg: &str, ty: &hir::Type) -> &'static str {
|
||||
fn ref_of_param(ctx: &CompletionContext<'_>, arg: &str, ty: &hir::Type) -> &'static str {
|
||||
if let Some(derefed_ty) = ty.remove_ref() {
|
||||
for (name, local) in ctx.locals.iter() {
|
||||
if name.as_text().as_deref() == Some(arg) {
|
||||
|
@ -278,7 +278,7 @@ fn params_display(db: &dyn HirDatabase, func: hir::Function) -> String {
|
|||
fn params(
|
||||
ctx: &CompletionContext<'_>,
|
||||
func: hir::Function,
|
||||
func_kind: &FuncKind,
|
||||
func_kind: &FuncKind<'_>,
|
||||
has_dot_receiver: bool,
|
||||
) -> Option<(Option<hir::SelfParam>, Vec<hir::Param>)> {
|
||||
if ctx.config.callable.is_none() {
|
||||
|
|
|
@ -138,7 +138,7 @@ enum Variant {
|
|||
}
|
||||
|
||||
impl Variant {
|
||||
fn fields(self, ctx: &CompletionContext) -> Option<Vec<hir::Field>> {
|
||||
fn fields(self, ctx: &CompletionContext<'_>) -> Option<Vec<hir::Field>> {
|
||||
let fields = match self {
|
||||
Variant::Struct(it) => it.fields(ctx.db),
|
||||
Variant::EnumVariant(it) => it.fields(ctx.db),
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::{
|
|||
};
|
||||
|
||||
pub(crate) fn render_union_literal(
|
||||
ctx: RenderContext,
|
||||
ctx: RenderContext<'_>,
|
||||
un: hir::Union,
|
||||
path: Option<hir::ModPath>,
|
||||
local_name: Option<Name>,
|
||||
|
|
|
@ -68,7 +68,7 @@ pub(crate) fn render_tuple_lit(
|
|||
/// fields, plus a boolean for whether the list is comprehensive (contains no
|
||||
/// private fields and its item is not marked `#[non_exhaustive]`).
|
||||
pub(crate) fn visible_fields(
|
||||
ctx: &CompletionContext,
|
||||
ctx: &CompletionContext<'_>,
|
||||
fields: &[hir::Field],
|
||||
item: impl HasAttrs + HasCrate + Copy,
|
||||
) -> Option<(Vec<hir::Field>, bool)> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue