File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
compiler/rustc_middle/src/ty Expand file tree Collapse file tree 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> {
523523 key : KEY ,
524524}
525525
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+
526530/// The same as `TyCtxtFeed`, but does not contain a `TyCtxt`.
527531/// Use this to pass around when you have a `TyCtxt` elsewhere.
528532/// Just an optimization to save space and not store hundreds of
@@ -534,6 +538,10 @@ pub struct Feed<'tcx, KEY: Copy> {
534538 key : KEY ,
535539}
536540
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+
537545impl < T : fmt:: Debug + Copy > fmt:: Debug for Feed < ' _ , T > {
538546 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
539547 self . key . fmt ( f)
You can’t perform that action at this time.
0 commit comments