]> git.lizzy.rs Git - rust.git/commit
Deprecate Error::description for real
authorDavid Tolnay <dtolnay@gmail.com>
Sun, 1 Dec 2019 04:01:48 +0000 (20:01 -0800)
committerDavid Tolnay <dtolnay@gmail.com>
Wed, 25 Dec 2019 06:39:49 +0000 (22:39 -0800)
commit4646a88b7a1e68326d092b9cbbbbdd616a51077f
treee22c490b7e63a021218a48af92bc08a6483c6a9e
parentc5a2a9a99c3973f77d7c86acb8ff7039c3d9c703
Deprecate Error::description for real

`description` has been documented as soft-deprecated since 1.27.0 (17
months ago). There is no longer any reason to call it or implement it.

This commit:

- adds #[rustc_deprecated(since = "1.41.0")] to Error::description;

- moves description (and cause, which is also deprecated) below the
  source and backtrace methods in the Error trait;

- reduces documentation of description and cause to take up much less
  vertical real estate in rustdocs, while preserving the example that
  shows how to render errors without needing to call description;

- removes the description function of all *currently unstable* Error
  impls in the standard library;

- marks #[allow(deprecated)] the description function of all *stable*
  Error impls in the standard library;

- replaces miscellaneous uses of description in example code and the
  compiler.
30 files changed:
src/librustc_driver/args.rs
src/librustc_error_codes/error_codes/E0638.md
src/librustc_errors/lib.rs
src/librustc_mir/const_eval.rs
src/librustdoc/html/render.rs
src/libserialize/hex.rs
src/libserialize/json.rs
src/libstd/env.rs
src/libstd/error.rs
src/libstd/ffi/c_str.rs
src/libstd/io/buffered.rs
src/libstd/io/error.rs
src/libstd/net/parser.rs
src/libstd/path.rs
src/libstd/sync/mpsc/mod.rs
src/libstd/sys/cloudabi/shims/os.rs
src/libstd/sys/hermit/os.rs
src/libstd/sys/sgx/net.rs
src/libstd/sys/sgx/os.rs
src/libstd/sys/unix/os.rs
src/libstd/sys/vxworks/os.rs
src/libstd/sys/wasi/os.rs
src/libstd/sys/wasm/os.rs
src/libstd/sys/windows/os.rs
src/libstd/sys_common/poison.rs
src/libstd/time.rs
src/libsyntax_pos/fatal_error.rs
src/libterm/terminfo/mod.rs
src/test/ui/consts/miri_unleashed/mutable_const2.stderr
src/tools/error_index_generator/main.rs