File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
compiler/rustc_middle/src/query Expand file tree Collapse file tree 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};
1515/// The `Key` trait controls what types can legally be used as the key
1616/// for a query.
1717pub 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>
1826 type CacheSelector ;
1927
2028 /// Given an instance of this key, what crate is it referring to?
You can’t perform that action at this time.
0 commit comments