Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 94b2b15

Browse files
committed
Auto merge of rust-lang#101143 - matthiaskrgr:rollup-g8y5k0g, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - rust-lang#94890 (Support parsing IP addresses from a byte string) - rust-lang#96334 (socket `set_mark` addition.) - rust-lang#99027 (Replace `Body::basic_blocks()` with field access) - rust-lang#100437 (Improve const mismatch `FulfillmentError`) - rust-lang#100843 (Migrate part of rustc_infer to session diagnostic) - rust-lang#100897 (extra sanity check against consts pointing to mutable memory) - rust-lang#100959 (translations: rename warn_ to warning) - rust-lang#101111 (Use the declaration's SourceInfo for FnEntry retags, not the outermost) - rust-lang#101116 ([rustdoc] Remove Attrs type alias) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 7c142a6 + fa177a9 commit 94b2b15

File tree

115 files changed

+1289
-524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+1289
-524
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3631,6 +3631,7 @@ dependencies = [
36313631
"rustc_macros",
36323632
"rustc_middle",
36333633
"rustc_serialize",
3634+
"rustc_session",
36343635
"rustc_span",
36353636
"rustc_target",
36363637
"smallvec",

compiler/rustc_borrowck/src/constraint_generation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub(super) fn generate_constraints<'cx, 'tcx>(
3131
body,
3232
};
3333

34-
for (bb, data) in body.basic_blocks().iter_enumerated() {
34+
for (bb, data) in body.basic_blocks.iter_enumerated() {
3535
cg.visit_basic_block_data(bb, data);
3636
}
3737
}

compiler/rustc_borrowck/src/dataflow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ struct OutOfScopePrecomputer<'a, 'tcx> {
143143
impl<'a, 'tcx> OutOfScopePrecomputer<'a, 'tcx> {
144144
fn new(body: &'a Body<'tcx>, regioncx: &'a RegionInferenceContext<'tcx>) -> Self {
145145
OutOfScopePrecomputer {
146-
visited: BitSet::new_empty(body.basic_blocks().len()),
146+
visited: BitSet::new_empty(body.basic_blocks.len()),
147147
visit_stack: vec![],
148148
body,
149149
regioncx,

compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
459459
return outmost_back_edge;
460460
}
461461

462-
let block = &self.body.basic_blocks()[location.block];
462+
let block = &self.body.basic_blocks[location.block];
463463

464464
if location.statement_index < block.statements.len() {
465465
let successor = location.successor_within_block();
@@ -518,7 +518,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
518518
}
519519

520520
if loop_head.dominates(from, &self.dominators) {
521-
let block = &self.body.basic_blocks()[from.block];
521+
let block = &self.body.basic_blocks[from.block];
522522

523523
if from.statement_index < block.statements.len() {
524524
let successor = from.successor_within_block();
@@ -568,7 +568,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
568568
UseSpans::PatUse(span)
569569
| UseSpans::OtherUse(span)
570570
| UseSpans::FnSelfUse { var_span: span, .. } => {
571-
let block = &self.body.basic_blocks()[location.block];
571+
let block = &self.body.basic_blocks[location.block];
572572

573573
let kind = if let Some(&Statement {
574574
kind: StatementKind::FakeRead(box (FakeReadCause::ForLet(_), _)),

compiler/rustc_borrowck/src/diagnostics/move_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
8888
if let Some(StatementKind::Assign(box (
8989
place,
9090
Rvalue::Use(Operand::Move(move_from)),
91-
))) = self.body.basic_blocks()[location.block]
91+
))) = self.body.basic_blocks[location.block]
9292
.statements
9393
.get(location.statement_index)
9494
.map(|stmt| &stmt.kind)

compiler/rustc_borrowck/src/location.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl LocationTable {
3333
pub(crate) fn new(body: &Body<'_>) -> Self {
3434
let mut num_points = 0;
3535
let statements_before_block = body
36-
.basic_blocks()
36+
.basic_blocks
3737
.iter()
3838
.map(|block_data| {
3939
let v = num_points;

compiler/rustc_borrowck/src/region_infer/values.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl RegionValueElements {
2525
pub(crate) fn new(body: &Body<'_>) -> Self {
2626
let mut num_points = 0;
2727
let statements_before_block: IndexVec<BasicBlock, usize> = body
28-
.basic_blocks()
28+
.basic_blocks
2929
.iter()
3030
.map(|block_data| {
3131
let v = num_points;
@@ -37,7 +37,7 @@ impl RegionValueElements {
3737
debug!("RegionValueElements: num_points={:#?}", num_points);
3838

3939
let mut basic_blocks = IndexVec::with_capacity(num_points);
40-
for (bb, bb_data) in body.basic_blocks().iter_enumerated() {
40+
for (bb, bb_data) in body.basic_blocks.iter_enumerated() {
4141
basic_blocks.extend((0..=bb_data.statements.len()).map(|_| bb));
4242
}
4343

compiler/rustc_borrowck/src/type_check/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2633,7 +2633,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
26332633
self.check_local(&body, local, local_decl);
26342634
}
26352635

2636-
for (block, block_data) in body.basic_blocks().iter_enumerated() {
2636+
for (block, block_data) in body.basic_blocks.iter_enumerated() {
26372637
let mut location = Location { block, statement_index: 0 };
26382638
for stmt in &block_data.statements {
26392639
if !stmt.source_info.span.is_dummy() {

compiler/rustc_codegen_cranelift/src/analyze.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub(crate) fn analyze(fx: &FunctionCx<'_, '_, '_>) -> IndexVec<Local, SsaKind> {
2626
})
2727
.collect::<IndexVec<Local, SsaKind>>();
2828

29-
for bb in fx.mir.basic_blocks().iter() {
29+
for bb in fx.mir.basic_blocks.iter() {
3030
for stmt in bb.statements.iter() {
3131
match &stmt.kind {
3232
Assign(place_and_rval) => match &place_and_rval.1 {

compiler/rustc_codegen_cranelift/src/base.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub(crate) fn codegen_fn<'tcx>(
7373
// Predefine blocks
7474
let start_block = bcx.create_block();
7575
let block_map: IndexVec<BasicBlock, Block> =
76-
(0..mir.basic_blocks().len()).map(|_| bcx.create_block()).collect();
76+
(0..mir.basic_blocks.len()).map(|_| bcx.create_block()).collect();
7777

7878
// Make FunctionCx
7979
let target_config = module.target_config();
@@ -271,7 +271,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
271271
}
272272
fx.tcx.sess.time("codegen prelude", || crate::abi::codegen_fn_prelude(fx, start_block));
273273

274-
for (bb, bb_data) in fx.mir.basic_blocks().iter_enumerated() {
274+
for (bb, bb_data) in fx.mir.basic_blocks.iter_enumerated() {
275275
let block = fx.get_block(bb);
276276
fx.bcx.switch_to_block(block);
277277

0 commit comments

Comments
 (0)