mirror of https://github.com/rwf2/Rocket.git
Record instances in lint from launch calls.
This commit is contained in:
parent
8b39b88e46
commit
ecd72f686e
|
@ -179,6 +179,12 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for RocketLint {
|
||||||
.insert(def_id, expr.span);
|
.insert(def_id, expr.span);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let Some((recvr, _)) = rocket_method_call("launch", cx, expr) {
|
||||||
|
let instance = recvr.and_then(|r| instance_for(self, r));
|
||||||
|
self.instances.entry(instance)
|
||||||
|
.or_insert_with(|| InstanceInfo::default());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We collect all of the names and defids for the info structures that
|
// We collect all of the names and defids for the info structures that
|
||||||
|
|
Loading…
Reference in New Issue