This commit is contained in:
Lukas Wirth 2024-02-13 17:26:14 +01:00 committed by GitHub
parent 0e47befaf3
commit 7f661782cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -239,7 +239,7 @@ fn import_on_the_fly(
if matches!(location, TypeLocation::TypeBound) {
matches!(ty, ModuleDef::Trait(_))
} else if matches!(location, TypeLocation::ImplTrait) {
matches!(ty, ModuleDef::Trait(_)) || matches!(ty, ModuleDef::Module(_))
matches!(ty, ModuleDef::Trait(_) | ModuleDef::Module(_))
} else {
true
}