Rollup merge of #80495 - jyn514:rename-empty, r=petrochenkov

Rename kw::Invalid -> kw::Empty

See https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Is.20there.20a.20symbol.20for.20the.20empty.20string.3F/near/220054471
for context.

r? `@petrochenkov`
This commit is contained in:
Mara Bos
2020-12-30 20:56:58 +00:00
committed by GitHub
27 changed files with 46 additions and 46 deletions

View File

@@ -2086,8 +2086,8 @@ fn item_module(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, items: &[cl
(true, false) => return Ordering::Greater,
}
}
let lhs = i1.name.unwrap_or(kw::Invalid).as_str();
let rhs = i2.name.unwrap_or(kw::Invalid).as_str();
let lhs = i1.name.unwrap_or(kw::Empty).as_str();
let rhs = i2.name.unwrap_or(kw::Empty).as_str();
compare_names(&lhs, &rhs)
}
@@ -4207,7 +4207,7 @@ fn print_sidebar(cx: &Context<'_>, it: &clean::Item, buffer: &mut Buffer, cache:
ty: \"{ty}\", \
relpath: \"{path}\"\
}};</script>",
name = it.name.unwrap_or(kw::Invalid),
name = it.name.unwrap_or(kw::Empty),
ty = it.type_(),
path = relpath
);