1
Fork 0

Stabilize THIR unsafeck

This commit is contained in:
Matthew Jasper 2023-12-07 11:56:48 +00:00
parent 982b49494e
commit 26f48b4cba
67 changed files with 331 additions and 353 deletions

View file

@ -720,7 +720,7 @@ pub struct SourceInfo {
pub span: Span,
/// The source scope, keeping track of which bindings can be
/// seen by debuginfo, active lint levels, `unsafe {...}`, etc.
/// seen by debuginfo, active lint levels, etc.
pub scope: SourceScope,
}
@ -942,7 +942,7 @@ pub struct LocalDecl<'tcx> {
/// Extra information about a some locals that's used for diagnostics and for
/// classifying variables into local variables, statics, etc, which is needed e.g.
/// for unsafety checking.
/// for borrow checking.
///
/// Not used for non-StaticRef temporaries, the return place, or anonymous
/// function parameters.

View file

@ -869,15 +869,14 @@ rustc_queries! {
desc { |tcx| "collecting all inherent impls for `{:?}`", key }
}
/// The result of unsafety-checking this `LocalDefId`.
query unsafety_check_result(key: LocalDefId) -> &'tcx mir::UnsafetyCheckResult {
/// The result of unsafety-checking this `LocalDefId` with the old checker.
query mir_unsafety_check_result(key: LocalDefId) -> &'tcx mir::UnsafetyCheckResult {
desc { |tcx| "unsafety-checking `{}`", tcx.def_path_str(key) }
cache_on_disk_if { true }
}
/// Unsafety-check this `LocalDefId` with THIR unsafeck. This should be
/// used with `-Zthir-unsafeck`.
query thir_check_unsafety(key: LocalDefId) {
/// Unsafety-check this `LocalDefId`.
query check_unsafety(key: LocalDefId) {
desc { |tcx| "unsafety-checking `{}`", tcx.def_path_str(key) }
cache_on_disk_if { true }
}