File tree 1 file changed +8
-0
lines changed
compiler/rustc_middle/src/ty
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -523,6 +523,10 @@ pub struct TyCtxtFeed<'tcx, KEY: Copy> {
523
523
key : KEY ,
524
524
}
525
525
526
+ /// Never return a `Feed` from a query. Only queries that create a `DefId` are
527
+ /// allowed to feed queries for that `DefId`.
528
+ impl < KEY : Copy , CTX > !HashStable < CTX > for TyCtxtFeed < ' _ , KEY > { }
529
+
526
530
/// The same as `TyCtxtFeed`, but does not contain a `TyCtxt`.
527
531
/// Use this to pass around when you have a `TyCtxt` elsewhere.
528
532
/// Just an optimization to save space and not store hundreds of
@@ -534,6 +538,10 @@ pub struct Feed<'tcx, KEY: Copy> {
534
538
key : KEY ,
535
539
}
536
540
541
+ /// Never return a `Feed` from a query. Only queries that create a `DefId` are
542
+ /// allowed to feed queries for that `DefId`.
543
+ impl < KEY : Copy , CTX > !HashStable < CTX > for Feed < ' _ , KEY > { }
544
+
537
545
impl < T : fmt:: Debug + Copy > fmt:: Debug for Feed < ' _ , T > {
538
546
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
539
547
self . key . fmt ( f)
You can’t perform that action at this time.
0 commit comments