Update documentation
This commit is contained in:
parent
afdcae2860
commit
6201ad9205
@ -485,12 +485,13 @@
|
||||
separate_provide_extern
|
||||
}
|
||||
|
||||
/// Fetch the MIR for a given `DefId` up till the point where it is
|
||||
/// ready for const qualification.
|
||||
/// Build the MIR for a given `DefId` and prepare it for const qualification.
|
||||
///
|
||||
/// See the README for the `mir` module for details.
|
||||
/// See the [rustc dev guide] for more info.
|
||||
///
|
||||
/// [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/mir/construction.html
|
||||
query mir_built(key: LocalDefId) -> &'tcx Steal<mir::Body<'tcx>> {
|
||||
desc { |tcx| "preparing `{}` for borrow checking", tcx.def_path_str(key) }
|
||||
desc { |tcx| "building MIR for `{}`", tcx.def_path_str(key) }
|
||||
}
|
||||
|
||||
/// Try to build an abstract representation of the given constant.
|
||||
|
@ -279,9 +279,6 @@ fn mir_const_qualif(tcx: TyCtxt<'_>, def: LocalDefId) -> ConstQualifs {
|
||||
validator.qualifs_in_return_place()
|
||||
}
|
||||
|
||||
/// Make MIR ready for const evaluation. This is run on all MIR, not just on consts!
|
||||
/// FIXME(oli-obk): it's unclear whether we still need this phase (and its corresponding query).
|
||||
/// We used to have this for pre-miri MIR based const eval.
|
||||
fn mir_built(tcx: TyCtxt<'_>, def: LocalDefId) -> &Steal<Body<'_>> {
|
||||
// MIR unsafety check uses the raw mir, so make sure it is run.
|
||||
if !tcx.sess.opts.unstable_opts.thir_unsafeck {
|
||||
|
@ -19,7 +19,7 @@ note: ...which requires checking if `foo::{closure#0}` contains FFI-unwind calls
|
||||
|
|
||||
LL | move |_: ()| {
|
||||
| ^^^^^^^^^^^^
|
||||
note: ...which requires preparing `foo::{closure#0}` for borrow checking...
|
||||
note: ...which requires building MIR for `foo::{closure#0}`...
|
||||
--> $DIR/clone-rpit.rs:14:5
|
||||
|
|
||||
LL | move |_: ()| {
|
||||
|
@ -18,7 +18,7 @@ LL | struct Dealigned<T>(u8, T);
|
||||
|
|
||||
= Box<dyn Any>
|
||||
query stack during panic:
|
||||
#0 [mir_built] preparing `<impl at $DIR/multiple_definitions_attribute_merging.rs:15:10: 15:19>::eq` for borrow checking
|
||||
#0 [mir_built] building MIR for `<impl at $DIR/multiple_definitions_attribute_merging.rs:15:10: 15:19>::eq`
|
||||
#1 [check_unsafety] unsafety-checking `<impl at $DIR/multiple_definitions_attribute_merging.rs:15:10: 15:19>::eq`
|
||||
end of query stack
|
||||
error: aborting due to 2 previous errors
|
||||
|
@ -9,7 +9,7 @@ LL | struct Dealigned<T>(u8, T);
|
||||
|
|
||||
= Box<dyn Any>
|
||||
query stack during panic:
|
||||
#0 [mir_built] preparing `<impl at $DIR/proc_macro_generated_packed.rs:15:10: 15:19>::eq` for borrow checking
|
||||
#0 [mir_built] building MIR for `<impl at $DIR/proc_macro_generated_packed.rs:15:10: 15:19>::eq`
|
||||
#1 [check_unsafety] unsafety-checking `<impl at $DIR/proc_macro_generated_packed.rs:15:10: 15:19>::eq`
|
||||
end of query stack
|
||||
error: aborting due to 1 previous error
|
||||
|
@ -34,7 +34,7 @@ note: ...which requires const checking `Alpha::V3::{constant#0}`...
|
||||
|
|
||||
LL | V3 = Self::V1 {} as u8 + 2,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
note: ...which requires preparing `Alpha::V3::{constant#0}` for borrow checking...
|
||||
note: ...which requires building MIR for `Alpha::V3::{constant#0}`...
|
||||
--> $DIR/self-in-enum-definition.rs:5:10
|
||||
|
|
||||
LL | V3 = Self::V1 {} as u8 + 2,
|
||||
|
Loading…
Reference in New Issue
Block a user