s/ConstantSource/ConstantKind/

This commit is contained in:
Oli Scherer 2021-03-15 11:23:44 +00:00
parent 11ddd22510
commit c30c1be1e6
11 changed files with 43 additions and 51 deletions

View file

@ -378,8 +378,8 @@ impl<'a, 'tcx> AbstractConstBuilder<'a, 'tcx> {
Ok(self.locals[local])
}
mir::Operand::Constant(ct) => match ct.literal {
mir::ConstantSource::Ty(ct) => Ok(self.add_node(Node::Leaf(ct), span)),
mir::ConstantSource::Val(..) => self.error(Some(span), "unsupported constant")?,
mir::ConstantKind::Ty(ct) => Ok(self.add_node(Node::Leaf(ct), span)),
mir::ConstantKind::Val(..) => self.error(Some(span), "unsupported constant")?,
},
}
}