W3cubDocs

/Rust

Error code E0497

Note: this error code is no longer emitted by the compiler.

A stability attribute was used outside of the standard library.

Erroneous code example:

#![allow(unused)]
fn main() {
#[stable] // error: stability attributes may not be used outside of the
          //        standard library
fn foo() {}
}

It is not possible to use stability attributes outside of the standard library. Also, for now, it is not possible to write deprecation messages either.

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0497.html