1
Fork 0

Fix review comment

This commit is contained in:
bjorn3 2022-01-15 19:57:47 +01:00
parent 042aa379a5
commit 9336fe33d7
2 changed files with 6 additions and 1 deletions

View file

@ -411,7 +411,11 @@ impl<'tcx> ExprVisitor<'tcx> {
let msg = format!( let msg = format!(
"register class `{}` requires at least one of the following target features: {}", "register class `{}` requires at least one of the following target features: {}",
reg_class.name(), reg_class.name(),
features.iter().map(|f| f.as_str()).collect::<Vec<_>>().join(", ") features
.iter()
.map(|f| f.as_str())
.intersperse(", ")
.collect::<String>(),
); );
self.tcx.sess.struct_span_err(*op_sp, &msg).emit(); self.tcx.sess.struct_span_err(*op_sp, &msg).emit();
// register isn't enabled, don't do more checks // register isn't enabled, don't do more checks

View file

@ -6,6 +6,7 @@
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![feature(crate_visibility_modifier)] #![feature(crate_visibility_modifier)]
#![feature(iter_intersperse)]
#![feature(let_else)] #![feature(let_else)]
#![feature(map_try_insert)] #![feature(map_try_insert)]
#![feature(min_specialization)] #![feature(min_specialization)]