Use ConstantData exclusively for inserting data into the constant pool

Previously we allowed anything that could be converted into ConstantData (e.g. a Vec).
This commit is contained in:
Andrew Brown
2019-10-11 09:26:08 -07:00
parent a69b0fc221
commit 67733bd2fc
5 changed files with 30 additions and 28 deletions

View File

@@ -470,7 +470,7 @@ fn gen_transform<'a>(
for (name, value) in transform.const_pool.iter() {
fmtln!(
fmt,
"let {} = pos.func.dfg.constants.insert(vec!{:?});",
"let {} = pos.func.dfg.constants.insert(vec!{:?}.into());",
name,
value
);