make MirSource::from_local_def_id invokable with 'gcx and 'tcx

This commit is contained in:
Niko Matsakis 2017-10-26 09:48:33 -04:00
parent 68c4844a1b
commit 5aa1cbf18f

View File

@ -40,7 +40,7 @@ pub enum MirSource {
}
impl<'a, 'gcx, 'tcx> MirSource {
pub fn from_local_def_id(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> MirSource {
pub fn from_local_def_id(tcx: TyCtxt<'a, 'gcx, 'tcx>, def_id: DefId) -> MirSource {
let id = tcx.hir.as_local_node_id(def_id).expect("mir source requires local def-id");
Self::from_node(tcx, id)
}