Skip to content

Commit 7184bcb

Browse files
committed
upgrade rust-toolchain to nightly-2022-09-25
1 parent 110671d commit 7184bcb

File tree

13 files changed

+18
-16
lines changed

13 files changed

+18
-16
lines changed

c2rust-analyze/src/borrowck/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ fn run_polonius<'tcx>(
216216
//pretty::write_mir_fn(tcx, mir, &mut |_, _| Ok(()), &mut std::io::stdout()).unwrap();
217217

218218
// Populate `cfg_edge`
219-
for (bb, bb_data) in mir.basic_blocks().iter_enumerated() {
219+
for (bb, bb_data) in mir.basic_blocks.iter_enumerated() {
220220
eprintln!("{:?}:", bb);
221221

222222
for idx in 0..bb_data.statements.len() {

c2rust-analyze/src/borrowck/type_check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ pub fn visit_body<'tcx>(
531531
adt_metadata,
532532
};
533533

534-
for (block, bb_data) in mir.basic_blocks().iter_enumerated() {
534+
for (block, bb_data) in mir.basic_blocks.iter_enumerated() {
535535
for (idx, stmt) in bb_data.statements.iter().enumerate() {
536536
let loc = Location {
537537
block,

c2rust-analyze/src/c_void_casts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ impl<'tcx> CVoidCasts<'tcx> {
402402
///
403403
/// [`*c_void`]: core::ffi::c_void
404404
fn insert_all_from_body(&mut self, body: &Body<'tcx>, tcx: TyCtxt<'tcx>) {
405-
for (block, bb_data) in body.basic_blocks().iter_enumerated() {
405+
for (block, bb_data) in body.basic_blocks.iter_enumerated() {
406406
let term: &Terminator = match &bb_data.terminator {
407407
Some(term) => term,
408408
None => continue,
@@ -436,7 +436,7 @@ impl<'tcx> CVoidCasts<'tcx> {
436436
// a cast from `*c_void` to an arbitrary type in the subsequent block,
437437
// searching forward.
438438
From => Self::find_first_cast(
439-
&body.basic_blocks()[target.unwrap()].statements,
439+
&body.basic_blocks[target.unwrap()].statements,
440440
c_void_ptr,
441441
),
442442
// For [`CVoidCastDirection::To`], we only count

c2rust-analyze/src/dataflow/type_check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ pub fn visit<'tcx>(
457457
equiv_constraints: Vec::new(),
458458
};
459459

460-
for (bb, bb_data) in mir.basic_blocks().iter_enumerated() {
460+
for (bb, bb_data) in mir.basic_blocks.iter_enumerated() {
461461
for (i, stmt) in bb_data.statements.iter().enumerate() {
462462
tc.visit_statement(
463463
stmt,

c2rust-analyze/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ fn run(tcx: TyCtxt) {
454454
assert_eq!(local, l);
455455
}
456456

457-
for (bb, bb_data) in mir.basic_blocks().iter_enumerated() {
457+
for (bb, bb_data) in mir.basic_blocks.iter_enumerated() {
458458
for (i, stmt) in bb_data.statements.iter().enumerate() {
459459
let (_, rv) = match &stmt.kind {
460460
StatementKind::Assign(x) => *x.clone(),

c2rust-analyze/src/rewrite/expr/mir_op.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl<'a, 'tcx> ExprRewriteVisitor<'a, 'tcx> {
137137
StatementKind::Retag(..) => {}
138138
StatementKind::AscribeUserType(..) => {}
139139
StatementKind::Coverage(..) => {}
140-
StatementKind::CopyNonOverlapping(..) => todo!("statement {:?}", stmt),
140+
StatementKind::Intrinsic(..) => todo!("statement {:?}", stmt),
141141
StatementKind::Nop => {}
142142
}
143143
}
@@ -386,7 +386,7 @@ pub fn gen_mir_rewrites<'tcx>(
386386

387387
let mut v = ExprRewriteVisitor::new(acx, asn, &mut out, mir);
388388

389-
for (bb_id, bb) in mir.basic_blocks().iter_enumerated() {
389+
for (bb_id, bb) in mir.basic_blocks.iter_enumerated() {
390390
for (i, stmt) in bb.statements.iter().enumerate() {
391391
let loc = Location {
392392
block: bb_id,

c2rust-analyze/src/trivial.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use rustc_middle::ty::{self, Binder, EarlyBinder, FnSig, GenSig, Subst, Ty, TyCtxt};
1+
use rustc_middle::ty::{self, Binder, EarlyBinder, FnSig, GenSig, Ty, TyCtxt};
22

33
pub trait IsTrivial<'tcx> {
44
/// Something [`is_trivial`] if it has no effect on pointer permissions,
@@ -83,7 +83,7 @@ impl<'tcx> IsTrivial<'tcx> for Ty<'tcx> {
8383
}
8484

8585
// don't know, as `dyn Trait` could be anything
86-
ty::Dynamic(trait_ty, _reg) => {
86+
ty::Dynamic(trait_ty, _reg, _) => {
8787
eprintln!("unsure how to check `dyn Trait` for accessible pointers, so assuming non-trivial: ty = {self:?}, trait_ty = {trait_ty:?}");
8888
false
8989
}

c2rust-analyze/src/util.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ pub fn lty_project<'tcx, L: Debug>(
314314
}
315315
ProjectionElem::Subslice { .. } => todo!("type_of Subslice"),
316316
ProjectionElem::Downcast(..) => todo!("type_of Downcast"),
317+
ProjectionElem::OpaqueCast(..) => todo!("type of OpaqueCast"),
317318
}
318319
}
319320

dynamic_instrumentation/src/callbacks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use rustc_ast::ast::{Item, ItemKind, Visibility, VisibilityKind};
33
use rustc_ast::node_id::NodeId;
44
use rustc_ast::ptr::P;
55
use rustc_const_eval::transform::validate::Validator;
6-
use rustc_data_structures::thin_vec::ThinVec;
76
use rustc_driver::Compilation;
87
use rustc_interface::interface::Compiler;
98
use rustc_interface::Queries;
@@ -15,6 +14,7 @@ use rustc_span::def_id::LocalDefId;
1514
use rustc_span::symbol::Ident;
1615
use rustc_span::DUMMY_SP;
1716

17+
use thin_vec::ThinVec;
1818
use crate::instrument::Instrumenter;
1919

2020
pub static INSTRUMENTER: Lazy<Instrumenter> = Lazy::new(Instrumenter::new);

dynamic_instrumentation/src/instrument.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ impl<'tcx> MutVisitor<'tcx> for RewriteAddressTakenLocals<'tcx> {
237237
// terminators with a destination to the address-taken local, or drop and replace
238238
// statements, put the address-taking statement in the first statement of the successor
239239
// block
240-
for (bid, block) in body.basic_blocks().iter_enumerated().rev() {
240+
for (bid, block) in body.basic_blocks.iter_enumerated().rev() {
241241
for (sid, statement) in block.statements.iter().enumerate().rev() {
242242
if let StatementKind::Assign(stmt) = &statement.kind {
243243
let (ref place, _) = **stmt;
@@ -408,7 +408,7 @@ impl<'tcx> Visitor<'tcx> for CollectInstrumentationPoints<'_, 'tcx> {
408408
// TODO: this is a hack that places the store_addr_taken_fn
409409
// after the instrumentation for taking the address of that local,
410410
// which must be in place prior to this instrumentation.
411-
let num_statements = self.body.basic_blocks()[location.block].statements.len();
411+
let num_statements = self.body.basic_blocks[location.block].statements.len();
412412
let store_addr_taken_loc = Location {
413413
block: location.block,
414414
// +1 to ensure `dest` is in scope
@@ -740,7 +740,7 @@ fn instrument_entry_fn<'tcx>(tcx: TyCtxt<'tcx>, hooks: Hooks, body: &mut Body<'t
740740

741741
let mut return_blocks = vec![];
742742
let mut resume_blocks = vec![];
743-
for (block, block_data) in body.basic_blocks().iter_enumerated() {
743+
for (block, block_data) in body.basic_blocks.iter_enumerated() {
744744
match &block_data.terminator().kind {
745745
TerminatorKind::Return => {
746746
return_blocks.push(block);

dynamic_instrumentation/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ extern crate rustc_mir_build;
1010
extern crate rustc_mir_transform;
1111
extern crate rustc_session;
1212
extern crate rustc_span;
13+
extern crate thin_vec;
1314

1415
mod arg;
1516
mod callbacks;

dynamic_instrumentation/src/point/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ impl<'tcx> InstrumentationBuilder<'_, 'tcx> {
172172
}
173173

174174
fn debug_mir_to_string(&self, loc: Location) -> String {
175-
let block = &self.body.basic_blocks()[loc.block];
175+
let block = &self.body.basic_blocks[loc.block];
176176
if loc.statement_index != block.statements.len() {
177177
return format!("{:?}", block.statements[loc.statement_index]);
178178
}

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2022-08-25"
2+
channel = "nightly-2022-09-25"
33
components = ["rustfmt-preview", "rustc-dev", "rust-src", "miri"]

0 commit comments

Comments
 (0)