toplevel_ref_arg

This commit is contained in:
Johann Hemmann 2024-01-22 01:00:13 +01:00
parent 386d438e17
commit daa20725c5
3 changed files with 3 additions and 4 deletions

View File

@ -180,7 +180,6 @@ non_canonical_clone_impl = "allow"
non_canonical_partial_ord_impl = "allow"
self_named_constructors = "allow"
too_many_arguments = "allow"
toplevel_ref_arg = "allow"
type_complexity = "allow"
unnecessary_cast = "allow"
unnecessary_filter_map = "allow"

View File

@ -396,7 +396,7 @@ impl Query {
pub fn search_dependencies(
db: &dyn DefDatabase,
krate: CrateId,
ref query: Query,
query: &Query,
) -> FxHashSet<ItemInNs> {
let _p = tracing::span!(tracing::Level::INFO, "search_dependencies", ?query).entered();
@ -516,7 +516,7 @@ mod tests {
})
.expect("could not find crate");
let actual = search_dependencies(db.upcast(), krate, query)
let actual = search_dependencies(db.upcast(), krate, &query)
.into_iter()
.filter_map(|dependency| {
let dependency_krate = dependency.krate(db.upcast())?;

View File

@ -236,7 +236,7 @@ impl Crate {
query: import_map::Query,
) -> impl Iterator<Item = Either<ModuleDef, Macro>> {
let _p = tracing::span!(tracing::Level::INFO, "query_external_importables");
import_map::search_dependencies(db, self.into(), query).into_iter().map(|item| {
import_map::search_dependencies(db, self.into(), &query).into_iter().map(|item| {
match ItemInNs::from(item) {
ItemInNs::Types(mod_id) | ItemInNs::Values(mod_id) => Either::Left(mod_id),
ItemInNs::Macros(mac_id) => Either::Right(mac_id),