@@ -78,6 +78,11 @@ pub use self::on_disk_cache::OnDiskCache;
78
78
// a way that memoizes and does dep-graph tracking,
79
79
// wrapping around the actual chain of providers that
80
80
// 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.
81
86
define_maps ! { <' tcx>
82
87
/// Records the type of every item.
83
88
[ ] fn type_of: TypeOfItem ( DefId ) -> Ty <' tcx>,
@@ -267,13 +272,13 @@ define_maps! { <'tcx>
267
272
[ ] fn dylib_dependency_formats: DylibDepFormats ( CrateNum )
268
273
-> Rc <Vec <( CrateNum , LinkagePreference ) >>,
269
274
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 ,
277
282
278
283
[ ] fn extern_crate: ExternCrate ( DefId ) -> Rc <Option <ExternCrate >>,
279
284
0 commit comments