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