Deprecate the pre_configure query
Only deprecating it rather than making it private to just in case someone has a use case for it.
This commit is contained in:
parent
0ed291453d
commit
90e9053189
1 changed files with 2 additions and 0 deletions
|
@ -116,6 +116,7 @@ impl<'tcx> Queries<'tcx> {
|
|||
.compute(|| passes::parse(self.session()).map_err(|mut parse_error| parse_error.emit()))
|
||||
}
|
||||
|
||||
#[deprecated = "pre_configure may be made private in the future. If you need it please open an issue with your use case."]
|
||||
pub fn pre_configure(&self) -> Result<QueryResult<'_, (ast::Crate, ast::AttrVec)>> {
|
||||
self.pre_configure.compute(|| {
|
||||
let mut krate = self.parse()?.steal();
|
||||
|
@ -173,6 +174,7 @@ impl<'tcx> Queries<'tcx> {
|
|||
pub fn global_ctxt(&'tcx self) -> Result<QueryResult<'_, &'tcx GlobalCtxt<'tcx>>> {
|
||||
self.gcx.compute(|| {
|
||||
let sess = self.session();
|
||||
#[allow(deprecated)]
|
||||
let (krate, pre_configured_attrs) = self.pre_configure()?.steal();
|
||||
|
||||
// parse `#[crate_name]` even if `--crate-name` was passed, to make sure it matches.
|
||||
|
|
Loading…
Add table
Reference in a new issue