Skip to content

Commit

Permalink
Update the description of link_cfg unstable
Browse files Browse the repository at this point in the history
Fmt code

Update tests

Modify msg

Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
  • Loading branch information
Rustin170506 committed Apr 3, 2020
1 parent 34f7f55 commit d2ad9f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/librustc_metadata/native_libs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,13 @@ 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")
.emit();
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 {
feature_err(
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/feature-gates/feature-gate-link_cfg.stderr
Original file line number Diff line number Diff line change
@@ -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))]
Expand Down

0 comments on commit d2ad9f4

Please sign in to comment.