@@ -78,6 +78,11 @@ pub use self::on_disk_cache::OnDiskCache;
7878// a way that memoizes and does dep-graph tracking,
7979// wrapping around the actual chain of providers that
8080// the driver creates (using several `rustc_*` crates).
81+ //
82+ // The result of query must implement Clone. They must also implement ty::maps::values::Value
83+ // which produces an appropiate error value if the query resulted in a query cycle.
84+ // Queries marked with `fatal_cycle` do not need that implementation
85+ // as they will raise an fatal error on query cycles instead.
8186define_maps ! { <' tcx>
8287 /// Records the type of every item.
8388 [ ] fn type_of: TypeOfItem ( DefId ) -> Ty <' tcx>,
@@ -267,13 +272,13 @@ define_maps! { <'tcx>
267272 [ ] fn dylib_dependency_formats: DylibDepFormats ( CrateNum )
268273 -> Rc <Vec <( CrateNum , LinkagePreference ) >>,
269274
270- [ ] fn is_panic_runtime: IsPanicRuntime ( CrateNum ) -> bool ,
271- [ ] fn is_compiler_builtins: IsCompilerBuiltins ( CrateNum ) -> bool ,
272- [ ] fn has_global_allocator: HasGlobalAllocator ( CrateNum ) -> bool ,
273- [ ] fn is_sanitizer_runtime: IsSanitizerRuntime ( CrateNum ) -> bool ,
274- [ ] fn is_profiler_runtime: IsProfilerRuntime ( CrateNum ) -> bool ,
275- [ ] fn panic_strategy: GetPanicStrategy ( CrateNum ) -> PanicStrategy ,
276- [ ] fn is_no_builtins: IsNoBuiltins ( CrateNum ) -> bool ,
275+ [ fatal_cycle ] fn is_panic_runtime: IsPanicRuntime ( CrateNum ) -> bool ,
276+ [ fatal_cycle ] fn is_compiler_builtins: IsCompilerBuiltins ( CrateNum ) -> bool ,
277+ [ fatal_cycle ] fn has_global_allocator: HasGlobalAllocator ( CrateNum ) -> bool ,
278+ [ fatal_cycle ] fn is_sanitizer_runtime: IsSanitizerRuntime ( CrateNum ) -> bool ,
279+ [ fatal_cycle ] fn is_profiler_runtime: IsProfilerRuntime ( CrateNum ) -> bool ,
280+ [ fatal_cycle ] fn panic_strategy: GetPanicStrategy ( CrateNum ) -> PanicStrategy ,
281+ [ fatal_cycle ] fn is_no_builtins: IsNoBuiltins ( CrateNum ) -> bool ,
277282
278283 [ ] fn extern_crate: ExternCrate ( DefId ) -> Rc <Option <ExternCrate >>,
279284
0 commit comments