Skip to content

Commit

Permalink
Upgrade Rust support to edition 2021
Browse files Browse the repository at this point in the history
Fixes #783
  • Loading branch information
shaobo-he committed Mar 8, 2022
1 parent 9f8c1a6 commit 791a492
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/rust-cargo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "rust-cargo"
version = "0.1.0"
authors = ["Shaobo He <polarishehn@gmail.com>"]
edition = "2018"
edition = "2021"

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

Expand Down
5 changes: 4 additions & 1 deletion lib/smack/SmackInstGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,10 @@ void SmackInstGenerator::visitIntrinsicInst(llvm::IntrinsicInst &ii) {
auto it = stmtMap.find(ii.getIntrinsicID());
if (it != stmtMap.end())
it->second(&ii);
else {
else if (ii.getIntrinsicID() ==
llvm::Intrinsic::experimental_noalias_scope_decl) {
// Ignore this function as we cannot handle arguments of metadata type.
} else {
SmackWarnings::warnApproximate(ii.getCalledFunction()->getName().str(),
currBlock, &ii);
emit(rep->call(ii.getCalledFunction(), ii));
Expand Down
2 changes: 1 addition & 1 deletion share/smack/lib/smack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "smack"
version = "0.1.0"
authors = ["Shaobo He <polarishehn@gmail.com>"]
edition = "2018"
edition = "2021"

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

Expand Down
2 changes: 1 addition & 1 deletion test/rust/cargo/num-crate-test-fail/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "cargo-test"
version = "0.1.0"
authors = ["smackers"]
edition = "2018"
edition = "2021"

# @expect error

Expand Down
2 changes: 1 addition & 1 deletion test/rust/cargo/num-crate-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "cargo-test"
version = "0.1.0"
authors = ["smackers"]
edition = "2018"
edition = "2021"

# @expect verified

Expand Down
2 changes: 1 addition & 1 deletion test/rust/cargo/simple-static-lib-fail/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "simple-static-lib"
version = "0.1.0"
authors = ["Shaobo He <polarishehn@gmail.com>"]
edition = "2018"
edition = "2021"

# @expect error
# @flag --entry-point=helloworld
Expand Down
2 changes: 1 addition & 1 deletion test/rust/cargo/simple-static-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "simple-static-lib"
version = "0.1.0"
authors = ["Shaobo He <polarishehn@gmail.com>"]
edition = "2018"
edition = "2021"

# @expect verified
# @flag --entry-point=helloworld
Expand Down

0 comments on commit 791a492

Please sign in to comment.