Skip to content

Commit 95afc3b

Browse files
committed
Upgrade Rust support to edition 2021
Fixes #783
1 parent 7937ebd commit 95afc3b

File tree

7 files changed

+10
-7
lines changed

7 files changed

+10
-7
lines changed

examples/rust-cargo/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "rust-cargo"
33
version = "0.1.0"
44
authors = ["Shaobo He <[email protected]>"]
5-
edition = "2018"
5+
edition = "2021"
66

77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

lib/smack/SmackInstGenerator.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,10 @@ void SmackInstGenerator::visitIntrinsicInst(llvm::IntrinsicInst &ii) {
12181218
auto it = stmtMap.find(ii.getIntrinsicID());
12191219
if (it != stmtMap.end())
12201220
it->second(&ii);
1221-
else {
1221+
else if (ii.getIntrinsicID() ==
1222+
llvm::Intrinsic::experimental_noalias_scope_decl) {
1223+
// Ignore this function as we cannot handle arguments of metadata type.
1224+
} else {
12221225
SmackWarnings::warnApproximate(ii.getCalledFunction()->getName().str(),
12231226
currBlock, &ii);
12241227
emit(rep->call(ii.getCalledFunction(), ii));

share/smack/lib/smack/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "smack"
33
version = "0.1.0"
44
authors = ["Shaobo He <[email protected]>"]
5-
edition = "2018"
5+
edition = "2021"
66

77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

test/rust/cargo/num-crate-test-fail/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "cargo-test"
33
version = "0.1.0"
44
authors = ["smackers"]
5-
edition = "2018"
5+
edition = "2021"
66

77
# @expect error
88

test/rust/cargo/num-crate-test/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "cargo-test"
33
version = "0.1.0"
44
authors = ["smackers"]
5-
edition = "2018"
5+
edition = "2021"
66

77
# @expect verified
88

test/rust/cargo/simple-static-lib-fail/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "simple-static-lib"
33
version = "0.1.0"
44
authors = ["Shaobo He <[email protected]>"]
5-
edition = "2018"
5+
edition = "2021"
66

77
# @expect error
88
# @flag --entry-point=helloworld

test/rust/cargo/simple-static-lib/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "simple-static-lib"
33
version = "0.1.0"
44
authors = ["Shaobo He <[email protected]>"]
5-
edition = "2018"
5+
edition = "2021"
66

77
# @expect verified
88
# @flag --entry-point=helloworld

0 commit comments

Comments
 (0)