Prevent leaking Feed
s into query results
This commit is contained in:
parent
5a0c46a22c
commit
890dd58650
@ -520,6 +520,10 @@ pub struct TyCtxtFeed<'tcx, KEY: Copy> {
|
|||||||
key: KEY,
|
key: KEY,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Never return a `Feed` from a query. Only queries that create a `DefId` are
|
||||||
|
/// allowed to feed queries for that `DefId`.
|
||||||
|
impl<KEY: Copy, CTX> !HashStable<CTX> for TyCtxtFeed<'_, KEY> {}
|
||||||
|
|
||||||
/// The same as `TyCtxtFeed`, but does not contain a `TyCtxt`.
|
/// The same as `TyCtxtFeed`, but does not contain a `TyCtxt`.
|
||||||
/// Use this to pass around when you have a `TyCtxt` elsewhere.
|
/// Use this to pass around when you have a `TyCtxt` elsewhere.
|
||||||
/// Just an optimization to save space and not store hundreds of
|
/// Just an optimization to save space and not store hundreds of
|
||||||
@ -531,6 +535,10 @@ pub struct Feed<'tcx, KEY: Copy> {
|
|||||||
key: KEY,
|
key: KEY,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Never return a `Feed` from a query. Only queries that create a `DefId` are
|
||||||
|
/// allowed to feed queries for that `DefId`.
|
||||||
|
impl<KEY: Copy, CTX> !HashStable<CTX> for Feed<'_, KEY> {}
|
||||||
|
|
||||||
impl<T: fmt::Debug + Copy> fmt::Debug for Feed<'_, T> {
|
impl<T: fmt::Debug + Copy> fmt::Debug for Feed<'_, T> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
self.key.fmt(f)
|
self.key.fmt(f)
|
||||||
|
Loading…
Reference in New Issue
Block a user