@@ -84,7 +84,6 @@ pub struct Queries<'tcx> {
84
84
hir_arena : WorkerLocal < rustc_hir:: Arena < ' tcx > > ,
85
85
86
86
parse : Query < ast:: Crate > ,
87
- pre_configure : Query < ( ast:: Crate , ast:: AttrVec ) > ,
88
87
// This just points to what's in `gcx_cell`.
89
88
gcx : Query < & ' tcx GlobalCtxt < ' tcx > > ,
90
89
}
@@ -97,7 +96,6 @@ impl<'tcx> Queries<'tcx> {
97
96
arena : WorkerLocal :: new ( |_| Arena :: default ( ) ) ,
98
97
hir_arena : WorkerLocal :: new ( |_| rustc_hir:: Arena :: default ( ) ) ,
99
98
parse : Default :: default ( ) ,
100
- pre_configure : Default :: default ( ) ,
101
99
gcx : Default :: default ( ) ,
102
100
}
103
101
}
@@ -108,12 +106,12 @@ impl<'tcx> Queries<'tcx> {
108
106
} )
109
107
}
110
108
111
- #[ deprecated = "pre_configure may be made private in the future. If you need it please open an issue with your use case." ]
112
- pub fn pre_configure ( & self ) -> Result < QueryResult < ' _ , ( ast:: Crate , ast:: AttrVec ) > > {
113
- self . pre_configure . compute ( || {
109
+ pub fn global_ctxt ( & ' tcx self ) -> Result < QueryResult < ' _ , & ' tcx GlobalCtxt < ' tcx > > > {
110
+ self . gcx . compute ( || {
111
+ let sess = & self . compiler . sess ;
112
+
114
113
let mut krate = self . parse ( ) ?. steal ( ) ;
115
114
116
- let sess = & self . compiler . sess ;
117
115
rustc_builtin_macros:: cmdline_attrs:: inject (
118
116
& mut krate,
119
117
& sess. parse_sess ,
@@ -122,15 +120,6 @@ impl<'tcx> Queries<'tcx> {
122
120
123
121
let pre_configured_attrs =
124
122
rustc_expand:: config:: pre_configure_attrs ( sess, & krate. attrs ) ;
125
- Ok ( ( krate, pre_configured_attrs) )
126
- } )
127
- }
128
-
129
- pub fn global_ctxt ( & ' tcx self ) -> Result < QueryResult < ' _ , & ' tcx GlobalCtxt < ' tcx > > > {
130
- self . gcx . compute ( || {
131
- let sess = & self . compiler . sess ;
132
- #[ allow( deprecated) ]
133
- let ( krate, pre_configured_attrs) = self . pre_configure ( ) ?. steal ( ) ;
134
123
135
124
// parse `#[crate_name]` even if `--crate-name` was passed, to make sure it matches.
136
125
let crate_name = find_crate_name ( sess, & pre_configured_attrs) ;
0 commit comments