Skip to content

Commit c310198

Browse files
committed
stacked -> stacked_borrows
1 parent 246c747 commit c310198

File tree

7 files changed

+10
-11
lines changed

7 files changed

+10
-11
lines changed

src/borrow_tracker/mod.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
pub mod stacked;
2-
31
use std::cell::RefCell;
42
use std::fmt;
53
use std::num::NonZeroU64;
@@ -11,7 +9,8 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet};
119
use rustc_middle::mir;
1210

1311
use crate::*;
14-
use stacked::diagnostics::RetagCause;
12+
pub mod stacked_borrows;
13+
use stacked_borrows::diagnostics::RetagCause;
1514

1615
pub type CallId = NonZeroU64;
1716

@@ -305,20 +304,20 @@ impl Method {
305304
#[derive(Debug, Clone)]
306305
pub enum AllocExtra {
307306
/// Data corresponding to Stacked Borrows
308-
StackedBorrows(Box<RefCell<stacked::AllocExtra>>),
307+
StackedBorrows(Box<RefCell<stacked_borrows::AllocExtra>>),
309308
/// No data because borrow tracking is deactivated
310309
None,
311310
}
312311

313312
impl AllocExtra {
314-
pub fn assert_sb(&self) -> &RefCell<stacked::AllocExtra> {
313+
pub fn assert_sb(&self) -> &RefCell<stacked_borrows::AllocExtra> {
315314
match self {
316315
AllocExtra::StackedBorrows(ref sb) => sb,
317316
AllocExtra::None => panic!("Expected Stacked Borrows data, got nothing"),
318317
}
319318
}
320319

321-
pub fn assert_sb_mut(&mut self) -> &mut RefCell<stacked::AllocExtra> {
320+
pub fn assert_sb_mut(&mut self) -> &mut RefCell<stacked_borrows::AllocExtra> {
322321
match self {
323322
AllocExtra::StackedBorrows(ref mut sb) => sb,
324323
AllocExtra::None => panic!("Expected Stacked Borrows data, got nothing"),

src/borrow_tracker/stacked/diagnostics.rs renamed to src/borrow_tracker/stacked_borrows/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use rustc_span::{Span, SpanData};
66
use rustc_target::abi::Size;
77

88
use crate::borrow_tracker::{
9-
stacked::{err_sb_ub, Permission},
9+
stacked_borrows::{err_sb_ub, Permission},
1010
AccessKind, GlobalStateInner, ProtectorKind,
1111
};
1212
use crate::*;
File renamed without changes.

src/borrow_tracker/stacked/mod.rs renamed to src/borrow_tracker/stacked_borrows/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use rustc_middle::ty::{
1616
};
1717

1818
use crate::borrow_tracker::{
19-
stacked::diagnostics::{AllocHistory, DiagnosticCx, DiagnosticCxBuilder, TagHistory},
19+
stacked_borrows::diagnostics::{AllocHistory, DiagnosticCx, DiagnosticCxBuilder, TagHistory},
2020
AccessKind, GlobalState, GlobalStateInner, ProtectorKind, RetagCause, RetagFields,
2121
};
2222
use crate::*;

src/borrow_tracker/stacked/stack.rs renamed to src/borrow_tracker/stacked_borrows/stack.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::ops::Range;
44
use rustc_data_structures::fx::FxHashSet;
55

66
use crate::borrow_tracker::{
7-
stacked::{Item, Permission},
7+
stacked_borrows::{Item, Permission},
88
AccessKind, BorTag,
99
};
1010
use crate::ProvenanceExtra;

src/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use log::trace;
66
use rustc_span::{source_map::DUMMY_SP, SpanData, Symbol};
77
use rustc_target::abi::{Align, Size};
88

9-
use crate::borrow_tracker::{stacked::diagnostics::TagHistory, AccessKind};
9+
use crate::borrow_tracker::{stacked_borrows::diagnostics::TagHistory, AccessKind};
1010
use crate::*;
1111

1212
/// Details of premature program termination.

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub use crate::shims::time::EvalContextExt as _;
8484
pub use crate::shims::tls::TlsData;
8585
pub use crate::shims::EvalContextExt as _;
8686

87-
pub use crate::borrow_tracker::stacked::{
87+
pub use crate::borrow_tracker::stacked_borrows::{
8888
EvalContextExt as StackedBorEvalContextExt, Item, Permission, Stack, Stacks,
8989
};
9090
pub use crate::borrow_tracker::{BorTag, CallId, Method as BorrowTrackerMethod, RetagFields};

0 commit comments

Comments
 (0)