File tree 1 file changed +8
-0
lines changed
compiler/rustc_middle/src/query
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,14 @@ use rustc_span::{Span, DUMMY_SP};
15
15
/// The `Key` trait controls what types can legally be used as the key
16
16
/// for a query.
17
17
pub trait Key : Sized {
18
+ // N.B. Most of the keys down below have `type CacheSelector = DefaultCacheSelector<Self>;`,
19
+ // it would be reasonable to use associated type defaults, to remove the duplication...
20
+ //
21
+ // ...But r-a doesn't support them yet and using a default here causes r-a to not infer
22
+ // return types of queries which is very annoying. Thus, until r-a support associated
23
+ // type defaults, plese restrain from using them here <3
24
+ //
25
+ // r-a issue: <https://github.com/rust-lang/rust-analyzer/issues/13693>
18
26
type CacheSelector ;
19
27
20
28
/// Given an instance of this key, what crate is it referring to?
You can’t perform that action at this time.
0 commit comments