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 @@ -520,6 +520,10 @@ pub struct TyCtxtFeed<'tcx, KEY: Copy> {
520520 key : KEY ,
521521}
522522
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+
523527/// The same as `TyCtxtFeed`, but does not contain a `TyCtxt`.
524528/// Use this to pass around when you have a `TyCtxt` elsewhere.
525529/// Just an optimization to save space and not store hundreds of
@@ -531,6 +535,10 @@ pub struct Feed<'tcx, KEY: Copy> {
531535 key : KEY ,
532536}
533537
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+
534542impl < T : fmt:: Debug + Copy > fmt:: Debug for Feed < ' _ , T > {
535543 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
536544 self . key . fmt ( f)
You can’t perform that action at this time.
0 commit comments