Skip to content

Commit 90e9053

Browse files
committed
Deprecate the pre_configure query
Only deprecating it rather than making it private to just in case someone has a use case for it.
1 parent 0ed2914 commit 90e9053

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_interface/src/queries.rs

+2
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ impl<'tcx> Queries<'tcx> {
116116
.compute(|| passes::parse(self.session()).map_err(|mut parse_error| parse_error.emit()))
117117
}
118118

119+
#[deprecated = "pre_configure may be made private in the future. If you need it please open an issue with your use case."]
119120
pub fn pre_configure(&self) -> Result<QueryResult<'_, (ast::Crate, ast::AttrVec)>> {
120121
self.pre_configure.compute(|| {
121122
let mut krate = self.parse()?.steal();
@@ -173,6 +174,7 @@ impl<'tcx> Queries<'tcx> {
173174
pub fn global_ctxt(&'tcx self) -> Result<QueryResult<'_, &'tcx GlobalCtxt<'tcx>>> {
174175
self.gcx.compute(|| {
175176
let sess = self.session();
177+
#[allow(deprecated)]
176178
let (krate, pre_configured_attrs) = self.pre_configure()?.steal();
177179

178180
// parse `#[crate_name]` even if `--crate-name` was passed, to make sure it matches.

0 commit comments

Comments
 (0)