Update the description of link_cfg unstable

Fmt code

Update tests

Modify msg

Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
This commit is contained in:
Rustin-Liu 2020-03-31 01:04:03 +08:00
parent 34f7f55e7a
commit d2ad9f4453
2 changed files with 8 additions and 3 deletions

View File

@ -162,7 +162,12 @@ impl Collector<'tcx> {
}
}
if lib.cfg.is_some() && !self.tcx.features().link_cfg {
feature_err(&self.tcx.sess.parse_sess, sym::link_cfg, span.unwrap(), "is unstable")
feature_err(
&self.tcx.sess.parse_sess,
sym::link_cfg,
span.unwrap(),
"kind=\"link_cfg\" is unstable",
)
.emit();
}
if lib.kind == cstore::NativeStaticNobundle && !self.tcx.features().static_nobundle {

View File

@ -1,4 +1,4 @@
error[E0658]: is unstable
error[E0658]: kind="link_cfg" is unstable
--> $DIR/feature-gate-link_cfg.rs:1:1
|
LL | #[link(name = "foo", cfg(foo))]