-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Exclude dependencies of std
for diagnostics
#135278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4896a65
4dc866c
9c34253
2da9acc
ed63539
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -876,6 +876,11 @@ impl<'tcx> TyCtxt<'tcx> { | |
/// [public]: TyCtxt::is_private_dep | ||
/// [direct]: rustc_session::cstore::ExternCrate::is_direct | ||
pub fn is_user_visible_dep(self, key: CrateNum) -> bool { | ||
// `#![rustc_private]` overrides defaults to make private dependencies usable. | ||
if self.features().enabled(sym::rustc_private) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Not really. There are a lot of external custom drivers that need to enable this feature. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you suggesting that it is worth filtering here to only expose crates that are dependencies of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the override for rustc_private should be removed. Even with rustc_private enabled you generally shouldn't do something like |
||
return true; | ||
} | ||
|
||
// | Private | Direct | Visible | | | ||
// |---------|--------|---------|--------------------| | ||
// | Yes | Yes | Yes | !true || true | | ||
|
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`. |
Uh oh!
There was an error while loading. Please reload this page.