This commit is contained in:
Shoyu Vanilla 2024-02-05 10:37:58 +09:00 committed by GitHub
parent f0428e57ea
commit 983cce8c31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -686,9 +686,9 @@ pub(crate) fn convert_reference_type(
} }
fn could_deref_to_target(ty: &hir::Type, target: &hir::Type, db: &dyn HirDatabase) -> bool { fn could_deref_to_target(ty: &hir::Type, target: &hir::Type, db: &dyn HirDatabase) -> bool {
let ty_ref = hir:Type::reference(ty, hir::Mutability::Shared); let ty_ref = hir::Type::reference(ty, hir::Mutability::Shared);
let target_ref = hir:Type::reference(target, hir::Mutability::Shared); let target_ref = hir::Type::reference(target, hir::Mutability::Shared);
ty_ref.could_coerece_to(db, &target_ref) ty_ref.could_coerce_to(db, &target_ref)
} }
fn handle_copy(ty: &hir::Type, db: &dyn HirDatabase) -> Option<(ReferenceConversionType, bool)> { fn handle_copy(ty: &hir::Type, db: &dyn HirDatabase) -> Option<(ReferenceConversionType, bool)> {