This commit is contained in:
Richard Feldman 2022-08-18 15:21:35 -04:00
parent 3b9c65aefe
commit 3a1f2a2fcf
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
2 changed files with 3 additions and 3 deletions

View file

@ -2437,7 +2437,7 @@ fn has_float_help(roc_type: &RocType, types: &Types, do_not_recurse: &[TypeId])
}
// Based on https://doc.rust-lang.org/reference/keywords.html
const RESERVED_KEYWORDS: &[&'static str] = &[
const RESERVED_KEYWORDS: &[&str] = &[
"try", "abstract", "become", "box", "do", "final", "macro", "override", "priv", "typeof",
"unsized", "virtual", "yield", "async", "await", "dyn", "as", "break", "const", "continue",
"crate", "else", "enum", "extern", "false", "fn", "for", "if", "impl", "in", "let", "loop",

View file

@ -1280,7 +1280,7 @@ fn add_tag_union<'a>(
fn add_int_enumeration(
union_tags: &UnionLabels<TagName>,
subs: &Subs,
name: &String,
name: &str,
int_width: IntWidth,
) -> RocTagUnion {
let tags: Vec<String> = union_tags
@ -1288,7 +1288,7 @@ fn add_int_enumeration(
.map(|(tag_name, _)| tag_name.0.as_str().to_string())
.collect();
RocTagUnion::Enumeration {
name: name.clone(),
name: name.to_string(),
tags,
size: int_width.stack_size(),
}