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 @@ -520,6 +520,10 @@ pub struct TyCtxtFeed<'tcx, KEY: Copy> {
520
520
key : KEY ,
521
521
}
522
522
523
+ /// Never return a `Feed` from a query. Only queries that create a `DefId` are
524
+ /// allowed to feed queries for that `DefId`.
525
+ impl < KEY : Copy , CTX > !HashStable < CTX > for TyCtxtFeed < ' _ , KEY > { }
526
+
523
527
/// The same as `TyCtxtFeed`, but does not contain a `TyCtxt`.
524
528
/// Use this to pass around when you have a `TyCtxt` elsewhere.
525
529
/// Just an optimization to save space and not store hundreds of
@@ -531,6 +535,10 @@ pub struct Feed<'tcx, KEY: Copy> {
531
535
key : KEY ,
532
536
}
533
537
538
+ /// Never return a `Feed` from a query. Only queries that create a `DefId` are
539
+ /// allowed to feed queries for that `DefId`.
540
+ impl < KEY : Copy , CTX > !HashStable < CTX > for Feed < ' _ , KEY > { }
541
+
534
542
impl < T : fmt:: Debug + Copy > fmt:: Debug for Feed < ' _ , T > {
535
543
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
536
544
self . key . fmt ( f)
You can’t perform that action at this time.
0 commit comments