Rollup merge of #91625 - est31:remove_indexes, r=oli-obk

Remove redundant [..]s
This commit is contained in:
Matthias Krüger 2021-12-10 22:40:36 +01:00 committed by GitHub
commit 40988591ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 123 additions and 127 deletions

View file

@ -677,11 +677,11 @@ impl<B: WriteBackendMethods> WorkItem<B> {
fn start_profiling<'a>(&self, cgcx: &'a CodegenContext<B>) -> TimingGuard<'a> {
match *self {
WorkItem::Optimize(ref m) => {
cgcx.prof.generic_activity_with_arg("codegen_module_optimize", &m.name[..])
cgcx.prof.generic_activity_with_arg("codegen_module_optimize", &*m.name)
}
WorkItem::CopyPostLtoArtifacts(ref m) => cgcx
.prof
.generic_activity_with_arg("codegen_copy_artifacts_from_incr_cache", &m.name[..]),
.generic_activity_with_arg("codegen_copy_artifacts_from_incr_cache", &*m.name),
WorkItem::LTO(ref m) => {
cgcx.prof.generic_activity_with_arg("codegen_module_perform_lto", m.name())
}

View file

@ -122,8 +122,8 @@ pub fn langcall(tcx: TyCtxt<'_>, span: Option<Span>, msg: &str, li: LangItem) ->
tcx.lang_items().require(li).unwrap_or_else(|s| {
let msg = format!("{} {}", msg, s);
match span {
Some(span) => tcx.sess.span_fatal(span, &msg[..]),
None => tcx.sess.fatal(&msg[..]),
Some(span) => tcx.sess.span_fatal(span, &msg),
None => tcx.sess.fatal(&msg),
}
})
}