diff options
| author | Rémy Rakic <remy.rakic+github@gmail.com> | 2024-12-29 23:42:45 +0000 | 
|---|---|---|
| committer | Rémy Rakic <remy.rakic+github@gmail.com> | 2024-12-30 06:51:16 +0000 | 
| commit | 50c152f34766b8624e18dbec2f3b3366456a79c6 (patch) | |
| tree | ae722abcab8d95932332d9020bb19c15bb3f34ef | |
| parent | b0fc1d47d5dcffb5d516059d4a5af3b6843132d5 (diff) | |
| download | rust-50c152f34766b8624e18dbec2f3b3366456a79c6.tar.gz rust-50c152f34766b8624e18dbec2f3b3366456a79c6.zip  | |
move `location` module to polonius legacy module
this is specific to the old datalog implementation and wasn't noticed in the previous module move
| -rw-r--r-- | compiler/rustc_borrowck/src/consumers.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/facts.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/lib.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/nll.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/polonius/legacy/accesses.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/polonius/legacy/loan_invalidations.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/polonius/legacy/loan_kills.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/polonius/legacy/location.rs (renamed from compiler/rustc_borrowck/src/location.rs) | 0 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/polonius/legacy/mod.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/type_check/liveness/trace.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/type_check/mod.rs | 2 | 
11 files changed, 11 insertions, 11 deletions
diff --git a/compiler/rustc_borrowck/src/consumers.rs b/compiler/rustc_borrowck/src/consumers.rs index 74de766ba23..90ca4f7518c 100644 --- a/compiler/rustc_borrowck/src/consumers.rs +++ b/compiler/rustc_borrowck/src/consumers.rs @@ -9,10 +9,10 @@ pub use super::borrow_set::{BorrowData, BorrowSet, TwoPhaseActivation}; pub use super::constraints::OutlivesConstraint; pub use super::dataflow::{BorrowIndex, Borrows, calculate_borrows_out_of_scope_at_location}; pub use super::facts::{AllFacts as PoloniusInput, PoloniusRegionVid, RustcFacts}; -pub use super::location::{LocationTable, RichLocation}; pub use super::nll::PoloniusOutput; pub use super::place_ext::PlaceExt; pub use super::places_conflict::{PlaceConflictBias, places_conflict}; +pub use super::polonius::legacy::{LocationTable, RichLocation}; pub use super::region_infer::RegionInferenceContext; /// Options determining the output behavior of [`get_body_with_borrowck_facts`]. diff --git a/compiler/rustc_borrowck/src/facts.rs b/compiler/rustc_borrowck/src/facts.rs index ef8e757a547..8181616d4cf 100644 --- a/compiler/rustc_borrowck/src/facts.rs +++ b/compiler/rustc_borrowck/src/facts.rs @@ -11,7 +11,7 @@ use rustc_middle::ty::{RegionVid, TyCtxt}; use rustc_mir_dataflow::move_paths::MovePathIndex; use crate::BorrowIndex; -use crate::location::{LocationIndex, LocationTable}; +use crate::polonius::legacy::{LocationIndex, LocationTable}; #[derive(Copy, Clone, Debug)] pub struct RustcFacts; diff --git a/compiler/rustc_borrowck/src/lib.rs b/compiler/rustc_borrowck/src/lib.rs index e99c7e03313..a23348116d2 100644 --- a/compiler/rustc_borrowck/src/lib.rs +++ b/compiler/rustc_borrowck/src/lib.rs @@ -53,11 +53,11 @@ use crate::borrow_set::{BorrowData, BorrowSet}; use crate::consumers::{BodyWithBorrowckFacts, ConsumerOptions}; use crate::dataflow::{BorrowIndex, Borrowck, BorrowckDomain, Borrows}; use crate::diagnostics::{AccessKind, IllegalMoveOriginKind, MoveError, RegionName}; -use crate::location::LocationTable; use crate::nll::PoloniusOutput; use crate::path_utils::*; use crate::place_ext::PlaceExt; use crate::places_conflict::{PlaceConflictBias, places_conflict}; +use crate::polonius::legacy::LocationTable; use crate::prefixes::PrefixSet; use crate::region_infer::RegionInferenceContext; use crate::renumber::RegionCtxt; @@ -70,7 +70,6 @@ mod dataflow; mod def_use; mod diagnostics; mod facts; -mod location; mod member_constraints; mod nll; mod path_utils; diff --git a/compiler/rustc_borrowck/src/nll.rs b/compiler/rustc_borrowck/src/nll.rs index 5113ca063c6..c75d92cd48e 100644 --- a/compiler/rustc_borrowck/src/nll.rs +++ b/compiler/rustc_borrowck/src/nll.rs @@ -28,8 +28,8 @@ use crate::borrow_set::BorrowSet; use crate::consumers::ConsumerOptions; use crate::diagnostics::RegionErrors; use crate::facts::{AllFacts, AllFactsExt, RustcFacts}; -use crate::location::LocationTable; use crate::polonius::LocalizedOutlivesConstraintSet; +use crate::polonius::legacy::LocationTable; use crate::region_infer::RegionInferenceContext; use crate::type_check::{self, MirTypeckResults}; use crate::universal_regions::UniversalRegions; diff --git a/compiler/rustc_borrowck/src/polonius/legacy/accesses.rs b/compiler/rustc_borrowck/src/polonius/legacy/accesses.rs index 9c4aa8ea1ed..cc414b854a2 100644 --- a/compiler/rustc_borrowck/src/polonius/legacy/accesses.rs +++ b/compiler/rustc_borrowck/src/polonius/legacy/accesses.rs @@ -4,9 +4,9 @@ use rustc_middle::ty::TyCtxt; use rustc_mir_dataflow::move_paths::{LookupResult, MoveData}; use tracing::debug; +use super::{LocationIndex, LocationTable}; use crate::def_use::{self, DefUse}; use crate::facts::AllFacts; -use crate::location::{LocationIndex, LocationTable}; use crate::universal_regions::UniversalRegions; /// Emit polonius facts for variable defs, uses, drops, and path accesses. diff --git a/compiler/rustc_borrowck/src/polonius/legacy/loan_invalidations.rs b/compiler/rustc_borrowck/src/polonius/legacy/loan_invalidations.rs index 178f70a6730..5e8a1bfe13e 100644 --- a/compiler/rustc_borrowck/src/polonius/legacy/loan_invalidations.rs +++ b/compiler/rustc_borrowck/src/polonius/legacy/loan_invalidations.rs @@ -9,9 +9,9 @@ use rustc_middle::mir::{ use rustc_middle::ty::TyCtxt; use tracing::debug; +use super::LocationTable; use crate::borrow_set::BorrowSet; use crate::facts::AllFacts; -use crate::location::LocationTable; use crate::path_utils::*; use crate::{ AccessDepth, Activation, ArtificialField, BorrowIndex, Deep, LocalMutationIsAllowed, Read, diff --git a/compiler/rustc_borrowck/src/polonius/legacy/loan_kills.rs b/compiler/rustc_borrowck/src/polonius/legacy/loan_kills.rs index fdde9fa0476..55b06bc6b77 100644 --- a/compiler/rustc_borrowck/src/polonius/legacy/loan_kills.rs +++ b/compiler/rustc_borrowck/src/polonius/legacy/loan_kills.rs @@ -6,9 +6,9 @@ use rustc_middle::mir::{ use rustc_middle::ty::TyCtxt; use tracing::debug; +use super::LocationTable; use crate::borrow_set::BorrowSet; use crate::facts::AllFacts; -use crate::location::LocationTable; use crate::places_conflict; /// Emit `loan_killed_at` and `cfg_edge` facts at the same time. diff --git a/compiler/rustc_borrowck/src/location.rs b/compiler/rustc_borrowck/src/polonius/legacy/location.rs index fbe5f94ed42..fbe5f94ed42 100644 --- a/compiler/rustc_borrowck/src/location.rs +++ b/compiler/rustc_borrowck/src/polonius/legacy/location.rs diff --git a/compiler/rustc_borrowck/src/polonius/legacy/mod.rs b/compiler/rustc_borrowck/src/polonius/legacy/mod.rs index 60fd2afe63e..9a5f5c6c566 100644 --- a/compiler/rustc_borrowck/src/polonius/legacy/mod.rs +++ b/compiler/rustc_borrowck/src/polonius/legacy/mod.rs @@ -14,7 +14,6 @@ use tracing::debug; use crate::borrow_set::BorrowSet; use crate::constraints::OutlivesConstraint; use crate::facts::{AllFacts, PoloniusRegionVid}; -use crate::location::LocationTable; use crate::type_check::MirTypeckRegionConstraints; use crate::type_check::free_region_relations::UniversalRegionRelations; use crate::universal_regions::UniversalRegions; @@ -22,6 +21,8 @@ use crate::universal_regions::UniversalRegions; mod accesses; mod loan_invalidations; mod loan_kills; +mod location; +pub use self::location::*; /// When requested, emit most of the facts needed by polonius: /// - moves and assignments diff --git a/compiler/rustc_borrowck/src/type_check/liveness/trace.rs b/compiler/rustc_borrowck/src/type_check/liveness/trace.rs index 2c658edc41c..bd969ba96f2 100644 --- a/compiler/rustc_borrowck/src/type_check/liveness/trace.rs +++ b/compiler/rustc_borrowck/src/type_check/liveness/trace.rs @@ -15,8 +15,8 @@ use rustc_span::DUMMY_SP; use rustc_trait_selection::traits::query::type_op::{DropckOutlives, TypeOp, TypeOpOutput}; use tracing::debug; -use crate::location::RichLocation; use crate::polonius; +use crate::polonius::legacy::RichLocation; use crate::region_infer::values::{self, LiveLoans}; use crate::type_check::liveness::local_use_map::LocalUseMap; use crate::type_check::{NormalizeLocation, TypeChecker}; diff --git a/compiler/rustc_borrowck/src/type_check/mod.rs b/compiler/rustc_borrowck/src/type_check/mod.rs index 3968900d047..c4bd8ad28bb 100644 --- a/compiler/rustc_borrowck/src/type_check/mod.rs +++ b/compiler/rustc_borrowck/src/type_check/mod.rs @@ -48,9 +48,9 @@ use crate::borrow_set::BorrowSet; use crate::constraints::{OutlivesConstraint, OutlivesConstraintSet}; use crate::diagnostics::UniverseInfo; use crate::facts::AllFacts; -use crate::location::LocationTable; use crate::member_constraints::MemberConstraintSet; use crate::polonius::PoloniusContext; +use crate::polonius::legacy::LocationTable; use crate::region_infer::TypeTest; use crate::region_infer::values::{LivenessValues, PlaceholderIndex, PlaceholderIndices}; use crate::renumber::RegionCtxt;  | 
