Handle auto traits & negative impls

We don't pass field types to Chalk yet though, so the auto trait inference won't
be correct.
This commit is contained in:
Florian Diebold 2019-05-07 18:53:16 +02:00
parent 7744cd41e2
commit d6dc75f9f2
5 changed files with 48 additions and 8 deletions

View file

@ -703,6 +703,10 @@ impl Trait {
TraitRef::for_trait(db, self)
}
pub fn is_auto(self, db: &impl DefDatabase) -> bool {
self.trait_data(db).is_auto()
}
pub(crate) fn resolver(&self, db: &impl DefDatabase) -> Resolver {
let r = self.module(db).resolver(db);
// add generic params, if present