We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2f6874d + de184a6 commit 68dc639Copy full SHA for 68dc639
compiler/rustc_middle/src/query/mod.rs
@@ -1611,6 +1611,16 @@ rustc_queries! {
1611
desc { "looking up late bound vars" }
1612
}
1613
1614
+ /// Computes the visibility of the provided `def_id`.
1615
+ ///
1616
+ /// If the item from the `def_id` doesn't have a visibility, it will panic. For example
1617
+ /// a generic type parameter will panic if you call this method on it:
1618
1619
+ /// ```
1620
+ /// pub trait Foo<T: Debug> {}
1621
1622
1623
+ /// In here, if you call `visibility` on `T`, it'll panic.
1624
query visibility(def_id: DefId) -> ty::Visibility<DefId> {
1625
desc { |tcx| "computing visibility of `{}`", tcx.def_path_str(def_id) }
1626
separate_provide_extern
0 commit comments