@@ -2493,77 +2493,6 @@ Supported traits for `derive` are:
2493
2493
* ` Show ` , to format a value using the ` {} ` formatter.
2494
2494
* ` Zero ` , to create a zero instance of a numeric data type.
2495
2495
2496
- ### Stability
2497
-
2498
- One can indicate the stability of an API using the following attributes:
2499
-
2500
- * ` deprecated ` : This item should no longer be used, e.g. it has been
2501
- replaced. No guarantee of backwards-compatibility.
2502
- * ` experimental ` : This item was only recently introduced or is
2503
- otherwise in a state of flux. It may change significantly, or even
2504
- be removed. No guarantee of backwards-compatibility.
2505
- * ` unstable ` : This item is still under development, but requires more
2506
- testing to be considered stable. No guarantee of backwards-compatibility.
2507
- * ` stable ` : This item is considered stable, and will not change
2508
- significantly. Guarantee of backwards-compatibility.
2509
- * ` frozen ` : This item is very stable, and is unlikely to
2510
- change. Guarantee of backwards-compatibility.
2511
- * ` locked ` : This item will never change unless a serious bug is
2512
- found. Guarantee of backwards-compatibility.
2513
-
2514
- These levels are directly inspired by
2515
- [ Node.js' "stability index"] ( http://nodejs.org/api/documentation.html ) .
2516
-
2517
- Stability levels are inherited, so an item's stability attribute is the default
2518
- stability for everything nested underneath it.
2519
-
2520
- There are lints for disallowing items marked with certain levels: ` deprecated ` ,
2521
- ` experimental ` and ` unstable ` . For now, only ` deprecated ` warns by default, but
2522
- this will change once the standard library has been stabilized. Stability
2523
- levels are meant to be promises at the crate level, so these lints only apply
2524
- when referencing items from an _ external_ crate, not to items defined within
2525
- the current crate. Items with no stability level are considered to be unstable
2526
- for the purposes of the lint. One can give an optional string that will be
2527
- displayed when the lint flags the use of an item.
2528
-
2529
- For example, if we define one crate called ` stability_levels ` :
2530
-
2531
- ``` {.ignore}
2532
- #[deprecated="replaced by `best`"]
2533
- pub fn bad() {
2534
- // delete everything
2535
- }
2536
-
2537
- pub fn better() {
2538
- // delete fewer things
2539
- }
2540
-
2541
- #[stable]
2542
- pub fn best() {
2543
- // delete nothing
2544
- }
2545
- ```
2546
-
2547
- then the lints will work as follows for a client crate:
2548
-
2549
- ``` {.ignore}
2550
- #![warn(unstable)]
2551
- extern crate stability_levels;
2552
- use stability_levels::{bad, better, best};
2553
-
2554
- fn main() {
2555
- bad(); // "warning: use of deprecated item: replaced by `best`"
2556
-
2557
- better(); // "warning: use of unmarked item"
2558
-
2559
- best(); // no warning
2560
- }
2561
- ```
2562
-
2563
- > ** Note:** Currently these are only checked when applied to individual
2564
- > functions, structs, methods and enum variants, * not* to entire modules,
2565
- > traits, impls or enums themselves.
2566
-
2567
2496
### Compiler Features
2568
2497
2569
2498
Certain aspects of Rust may be implemented in the compiler, but they're not
0 commit comments