Skip to content

Commit 017fc41

Browse files
committed
Upgrade lints
1 parent 8185644 commit 017fc41

File tree

18 files changed

+33
-27
lines changed

18 files changed

+33
-27
lines changed

lints/arbitrary_cpi/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lints/arbitrary_cpi/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ name = "secure"
2626
path = "ui/secure/src/lib.rs"
2727

2828
[dependencies]
29-
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "0cb0f7636851f9fcc57085cf80197a2ef6db098f" }
29+
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "2b2190cb5667cdd276a24ef8b9f3692209c54a89" }
3030
dylint_linting = "2.0.1"
3131
if_chain = "1.0.2"
3232
solana-lints = { path = "../../crate" }

lints/arbitrary_cpi/rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2022-06-30"
2+
channel = "nightly-2022-08-11"
33
components = ["llvm-tools-preview", "rustc-dev"]

lints/arbitrary_cpi/src/lib.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ use rustc_lint::{LateContext, LateLintPass};
88

99
use rustc_middle::{
1010
mir,
11-
mir::terminator::TerminatorKind,
12-
mir::{BasicBlock, Local, Operand, Place, ProjectionElem, Rvalue, StatementKind},
11+
mir::{
12+
BasicBlock, Local, Operand, Place, ProjectionElem, Rvalue, StatementKind, TerminatorKind,
13+
},
1314
ty::TyKind,
1415
};
1516
use rustc_span::symbol::Symbol;
@@ -142,7 +143,7 @@ impl ArbitraryCpi {
142143
block: BasicBlock,
143144
mut inst_arg: &Place<'tcx>,
144145
) -> (bool, Vec<Place<'tcx>>) {
145-
let preds = body.predecessors();
146+
let preds = body.basic_blocks.predecessors();
146147
let bbs = body.basic_blocks();
147148
let mut cur_block = block;
148149
let mut found_program_id = false;
@@ -261,7 +262,7 @@ impl ArbitraryCpi {
261262
mut search_place: &Place<'tcx>,
262263
search_list: &[Local],
263264
) -> bool {
264-
let preds = body.predecessors();
265+
let preds = body.basic_blocks.predecessors();
265266
let bbs = body.basic_blocks();
266267
let mut cur_block = block;
267268
if let Some(search_loc) = search_place.local_or_deref_local() {
@@ -313,7 +314,7 @@ impl ArbitraryCpi {
313314
block: BasicBlock,
314315
programid_locals: &[Local],
315316
) -> bool {
316-
let preds = body.predecessors();
317+
let preds = body.basic_blocks.predecessors();
317318
let bbs = body.basic_blocks();
318319
let mut cur_block = block;
319320
loop {
@@ -339,7 +340,10 @@ impl ArbitraryCpi {
339340
{
340341
// we found the check. if it dominates the call to invoke, then the check
341342
// is assumed to be sufficient!
342-
return body.dominators().is_dominated_by(block, cur_block);
343+
return body
344+
.basic_blocks
345+
.dominators()
346+
.is_dominated_by(block, cur_block);
343347
}
344348
}
345349
}

lints/insecure_account_close/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lints/insecure_account_close/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ name = "secure"
3030
path = "ui/secure/src/lib.rs"
3131

3232
[dependencies]
33-
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "0cb0f7636851f9fcc57085cf80197a2ef6db098f" }
33+
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "2b2190cb5667cdd276a24ef8b9f3692209c54a89" }
3434
dylint_linting = "2.0.7"
3535
if_chain = "1.0.2"
3636
solana-lints = { path = "../../crate" }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2022-06-30"
2+
channel = "nightly-2022-08-11"
33
components = ["llvm-tools-preview", "rustc-dev"]

lints/missing_owner_check/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lints/missing_owner_check/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ name = "fixed-secure"
2626
path = "ui/fixed-secure/src/lib.rs"
2727

2828
[dependencies]
29-
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "0cb0f7636851f9fcc57085cf80197a2ef6db098f" }
29+
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "2b2190cb5667cdd276a24ef8b9f3692209c54a89" }
3030
dylint_linting = "2.0.7"
3131
if_chain = "1.0.2"
3232
solana-lints = { path = "../../crate" }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2022-06-30"
2+
channel = "nightly-2022-08-11"
33
components = ["llvm-tools-preview", "rustc-dev"]

0 commit comments

Comments
 (0)