mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
attr: fix expected meta-item for #[stable]
When an unexpected meta item is provided to `#[stable]`, the diagnostic lists "since" and "note" as expected meta-items, however the surrounding code actually expects "feature" and "since". Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
parent
6f0b8f1a4b
commit
a1d5af24ec
@ -404,7 +404,7 @@ where
|
||||
meta.span(),
|
||||
AttrError::UnknownMetaItem(
|
||||
pprust::path_to_string(&mi.path),
|
||||
&["since", "note"],
|
||||
&["feature", "since"],
|
||||
),
|
||||
);
|
||||
continue 'outer;
|
||||
|
@ -8,7 +8,7 @@ error[E0541]: unknown meta item 'sinse'
|
||||
--> $DIR/stability-attribute-sanity-2.rs:10:25
|
||||
|
|
||||
LL | #[stable(feature = "a", sinse = "1.0.0")]
|
||||
| ^^^^^^^^^^^^^^^ expected one of `since`, `note`
|
||||
| ^^^^^^^^^^^^^^^ expected one of `feature`, `since`
|
||||
|
||||
error[E0545]: `issue` must be a non-zero numeric string or "none"
|
||||
--> $DIR/stability-attribute-sanity-2.rs:13:27
|
||||
|
@ -14,7 +14,7 @@ error[E0541]: unknown meta item 'reason'
|
||||
--> $DIR/stability-attribute-sanity.rs:8:42
|
||||
|
|
||||
LL | #[stable(feature = "a", since = "b", reason)]
|
||||
| ^^^^^^ expected one of `since`, `note`
|
||||
| ^^^^^^ expected one of `feature`, `since`
|
||||
|
||||
error[E0539]: incorrect meta item
|
||||
--> $DIR/stability-attribute-sanity.rs:11:29
|
||||
|
Loading…
Reference in New Issue
Block a user