File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed
librustc_metadata/rmeta/decoder Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change
1
+ //! Query configuration and description traits.
2
+
1
3
use crate :: dep_graph:: SerializedDepNodeIndex ;
2
4
use crate :: dep_graph:: { DepKind , DepNode } ;
3
5
use crate :: ty:: query:: caches:: QueryCache ;
@@ -13,19 +15,15 @@ use std::borrow::Cow;
13
15
use std:: fmt:: Debug ;
14
16
use std:: hash:: Hash ;
15
17
16
- // Query configuration and description traits.
17
-
18
- // FIXME(eddyb) false positive, the lifetime parameter is used for `Key`/`Value`.
19
- #[ allow( unused_lifetimes) ]
20
- pub trait QueryConfig < ' tcx > {
18
+ pub trait QueryConfig < CTX > {
21
19
const NAME : & ' static str ;
22
20
const CATEGORY : ProfileCategory ;
23
21
24
22
type Key : Eq + Hash + Clone + Debug ;
25
23
type Value : Clone ;
26
24
}
27
25
28
- pub ( crate ) trait QueryAccessors < ' tcx > : QueryConfig < ' tcx > {
26
+ pub ( crate ) trait QueryAccessors < ' tcx > : QueryConfig < TyCtxt < ' tcx > > {
29
27
const ANON : bool ;
30
28
const EVAL_ALWAYS : bool ;
31
29
const DEP_KIND : DepKind ;
Original file line number Diff line number Diff line change @@ -956,7 +956,7 @@ macro_rules! define_queries_inner {
956
956
} ) *
957
957
}
958
958
959
- $( impl <$tcx> QueryConfig <$tcx> for queries:: $name<$tcx> {
959
+ $( impl <$tcx> QueryConfig <TyCtxt < $tcx> > for queries:: $name<$tcx> {
960
960
type Key = $K;
961
961
type Value = $V;
962
962
const NAME : & ' static str = stringify!( $name) ;
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ macro_rules! provide {
37
37
$( fn $name<$lt: $lt, T : IntoArgs >(
38
38
$tcx: TyCtxt <$lt>,
39
39
def_id_arg: T ,
40
- ) -> <ty:: queries:: $name<$lt> as QueryConfig <$lt>>:: Value {
40
+ ) -> <ty:: queries:: $name<$lt> as QueryConfig <TyCtxt < $lt> >>:: Value {
41
41
let _prof_timer =
42
42
$tcx. prof. generic_activity( "metadata_decode_entry" ) ;
43
43
You can’t perform that action at this time.
0 commit comments