-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #71853 - Dylan-DPC:rollup-4qi6ry9, r=Dylan-DPC
Rollup of 4 pull requests Successful merges: - #71398 (Add `RefCell::take`) - #71663 (Fix exceeding bitshifts not emitting for assoc. consts (properly this time, I swear!)) - #71726 (Suggest deref when coercing `ty::Ref` to `ty::RawPtr` with arbitrary mutability) - #71808 (Add long error explanation for E0539) Failed merges: r? @ghost
- Loading branch information
Showing
24 changed files
with
677 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
An invalid meta-item was used inside an attribute. | ||
|
||
Erroneous code example: | ||
|
||
```compile_fail,E0539 | ||
#![feature(staged_api)] | ||
#![stable(since = "1.0.0", feature = "test")] | ||
#[rustc_deprecated(reason)] // error! | ||
#[unstable(feature = "deprecated_fn", issue = "123")] | ||
fn deprecated() {} | ||
#[unstable(feature = "unstable_struct", issue)] // error! | ||
struct Unstable; | ||
#[rustc_const_unstable(feature)] // error! | ||
const fn unstable_fn() {} | ||
#[stable(feature = "stable_struct", since)] // error! | ||
struct Stable; | ||
#[rustc_const_stable(feature)] // error! | ||
const fn stable_fn() {} | ||
``` | ||
|
||
Meta items are the key-value pairs inside of an attribute. | ||
To fix these issues you need to give required key-value pairs. | ||
|
||
``` | ||
#![feature(staged_api)] | ||
#![stable(since = "1.0.0", feature = "test")] | ||
#[rustc_deprecated(since = "1.39.0", reason = "reason")] // ok! | ||
#[unstable(feature = "deprecated_fn", issue = "123")] | ||
fn deprecated() {} | ||
#[unstable(feature = "unstable_struct", issue = "123")] // ok! | ||
struct Unstable; | ||
#[rustc_const_unstable(feature = "unstable_fn", issue = "124")] // ok! | ||
const fn unstable_fn() {} | ||
#[stable(feature = "stable_struct", since = "1.39.0")] // ok! | ||
struct Stable; | ||
#[rustc_const_stable(feature = "stable_fn", since = "1.39.0")] // ok! | ||
const fn stable_fn() {} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.