forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
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 rust-lang#135278 - tgross35:ignore-std-dep-crates, r=Sp…
…arrowLii Exclude dependencies of `std` for diagnostics Currently crates in the sysroot can show up in diagnostic suggestions, such as in rust-lang#135232. To prevent this, duplicate `all_traits` into `visible_traits` which only shows traits in non-private crates. Setting `#![feature(rustc_private)]` overrides this and makes items in private crates visible as well, since `rustc_private` enables use of `std`'s private dependencies. This may be reviewed per-commit. Fixes: rust-lang#135232
- Loading branch information
Showing
11 changed files
with
225 additions
and
44 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
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
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,39 @@ | ||
error[E0405]: cannot find trait `Equivalent` in this scope | ||
--> $DIR/sysroot-private.rs:26:18 | ||
| | ||
LL | trait Trait2<K>: Equivalent<K> {} | ||
| ^^^^^^^^^^ not found in this scope | ||
|
||
error[E0412]: cannot find type `K` in this scope | ||
--> $DIR/sysroot-private.rs:31:35 | ||
| | ||
LL | fn trait_member<T>(val: &T, key: &K) -> bool { | ||
| - ^ | ||
| | | ||
| similarly named type parameter `T` defined here | ||
| | ||
help: a type parameter with a similar name exists | ||
| | ||
LL | fn trait_member<T>(val: &T, key: &T) -> bool { | ||
| ~ | ||
help: you might be missing a type parameter | ||
| | ||
LL | fn trait_member<T, K>(val: &T, key: &K) -> bool { | ||
| +++ | ||
|
||
error[E0220]: associated type `ExpressionStack` not found for `Trait` | ||
--> $DIR/sysroot-private.rs:21:31 | ||
| | ||
LL | type AssociatedTy = dyn Trait<ExpressionStack = i32, Bar = i32>; | ||
| ^^^^^^^^^^^^^^^ help: `Trait` has the following associated type: `Bar` | ||
|
||
error[E0425]: cannot find function `memchr2` in this scope | ||
--> $DIR/sysroot-private.rs:39:5 | ||
| | ||
LL | memchr2(b'a', b'b', buf) | ||
| ^^^^^^^ not found in this scope | ||
|
||
error: aborting due to 4 previous errors | ||
|
||
Some errors have detailed explanations: E0220, E0405, E0412, E0425. | ||
For more information about an error, try `rustc --explain E0220`. |
Oops, something went wrong.