mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
minor: fix typo
This commit is contained in:
parent
af174b9428
commit
f3d84e86c8
5 changed files with 8 additions and 8 deletions
|
@ -281,14 +281,14 @@ pub(super) fn type_constructor<'a, DB: HirDatabase>(
|
||||||
if ctx.config.enable_borrowcheck && struct_ty.contains_reference(db) {
|
if ctx.config.enable_borrowcheck && struct_ty.contains_reference(db) {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
let fileds = it.fields(db);
|
let fields = it.fields(db);
|
||||||
// Check if all fields are visible, otherwise we cannot fill them
|
// Check if all fields are visible, otherwise we cannot fill them
|
||||||
if fileds.iter().any(|it| !it.is_visible_from(db, module)) {
|
if fields.iter().any(|it| !it.is_visible_from(db, module)) {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Early exit if some param cannot be filled from lookup
|
// Early exit if some param cannot be filled from lookup
|
||||||
let param_exprs: Vec<Vec<Expr>> = fileds
|
let param_exprs: Vec<Vec<Expr>> = fields
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|field| lookup.find(db, &field.ty(db)))
|
.map(|field| lookup.find(db, &field.ty(db)))
|
||||||
.collect::<Option<_>>()?;
|
.collect::<Option<_>>()?;
|
||||||
|
|
|
@ -308,7 +308,7 @@ impl CompletionRelevance {
|
||||||
|
|
||||||
// When a fn is bumped due to return type:
|
// When a fn is bumped due to return type:
|
||||||
// Bump Constructor or Builder methods with no arguments,
|
// Bump Constructor or Builder methods with no arguments,
|
||||||
// over them tha with self arguments
|
// over them than with self arguments
|
||||||
if fn_score > 0 {
|
if fn_score > 0 {
|
||||||
if !asf.has_params {
|
if !asf.has_params {
|
||||||
// bump associated functions
|
// bump associated functions
|
||||||
|
|
|
@ -243,7 +243,7 @@ impl Server {
|
||||||
to_string_pretty(actual_part).unwrap(),
|
to_string_pretty(actual_part).unwrap(),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
tracing::debug!("sucessfully matched notification");
|
tracing::debug!("successfully matched notification");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -456,12 +456,12 @@ pub trait Query: Debug + Default + Sized + for<'d> QueryDb<'d> {
|
||||||
/// Name of the query method (e.g., `foo`)
|
/// Name of the query method (e.g., `foo`)
|
||||||
const QUERY_NAME: &'static str;
|
const QUERY_NAME: &'static str;
|
||||||
|
|
||||||
/// Extact storage for this query from the storage for its group.
|
/// Extract storage for this query from the storage for its group.
|
||||||
fn query_storage<'a>(
|
fn query_storage<'a>(
|
||||||
group_storage: &'a <Self as QueryDb<'_>>::GroupStorage,
|
group_storage: &'a <Self as QueryDb<'_>>::GroupStorage,
|
||||||
) -> &'a std::sync::Arc<Self::Storage>;
|
) -> &'a std::sync::Arc<Self::Storage>;
|
||||||
|
|
||||||
/// Extact storage for this query from the storage for its group.
|
/// Extract storage for this query from the storage for its group.
|
||||||
fn query_storage_mut<'a>(
|
fn query_storage_mut<'a>(
|
||||||
group_storage: &'a <Self as QueryDb<'_>>::GroupStorage,
|
group_storage: &'a <Self as QueryDb<'_>>::GroupStorage,
|
||||||
) -> &'a std::sync::Arc<Self::Storage>;
|
) -> &'a std::sync::Arc<Self::Storage>;
|
||||||
|
|
|
@ -40,7 +40,7 @@ pub(crate) trait LruNode: Sized + Debug {
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub(crate) struct LruIndex {
|
pub(crate) struct LruIndex {
|
||||||
/// Index in the approprate LRU list, or std::usize::MAX if not a
|
/// Index in the appropriate LRU list, or std::usize::MAX if not a
|
||||||
/// member.
|
/// member.
|
||||||
index: AtomicUsize,
|
index: AtomicUsize,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue