]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #73771 - alexcrichton:ignore-unstable, r=estebank,GuillaumeGomez
authorManish Goregaokar <manishsmail@gmail.com>
Thu, 16 Jul 2020 18:18:26 +0000 (11:18 -0700)
committerGitHub <noreply@github.com>
Thu, 16 Jul 2020 18:18:26 +0000 (11:18 -0700)
commita8bb2458e1798891112e53b08fe72477fdb75070
tree9086fd8439deff7aa665120abbd4c4b8e693939b
parentc23f045a8b10c92eef5b1fbefea7696065e5977c
parentfde8d11ca12e83fe2b07a536956f4a2725b24485
Rollup merge of #73771 - alexcrichton:ignore-unstable, r=estebank,GuillaumeGomez

Don't pollute docs/suggestions with libstd deps

Currently dependency crates of the standard library can sometimes leak
into error messages such as when traits to import are suggested.
Additionally they can leak into documentation such as in the list of
"all traits implemented by `u32`". The dependencies of the standard
library, however, are intended to be private.

The dependencies of the standard library can't actually be stabl-y
imported nor is the documentation that relevant since you can't import
them on stable either. This commit updates both the compiler and rustdoc
to ignore unstable traits in these two scenarios.

Specifically the suggestion for traits to import ignore unstable traits,
and similarly the list of traits implemented by a type excludes unstable
traits.

This commit is extracted from #73441 where the addition of some new
dependencies to the standard library was showed to leak into various
error messages and documentation. The intention here is to go ahead and
land these changes ahead of that since it will likely take some time to
land.
src/librustc_typeck/check/method/suggest.rs