Skip to content

Commit

Permalink
Add a DCA test for unused private functions in a library. (FuelLabs#3507
Browse files Browse the repository at this point in the history
)
  • Loading branch information
tritao authored Dec 5, 2022
1 parent d17b29f commit 3e6f8cf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[[package]]
name = 'unused_priv_free_fn'
source = 'member'
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[project]
authors = ["Fuel Labs <[email protected]>"]
entry = "main.sw"
implicit-std = false
license = "Apache-2.0"
name = "unused_priv_free_fn"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
library foo;

fn private_fn(x: u64) -> u64 {
x
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
category = "compile"

# check: $()This function is never called.

0 comments on commit 3e6f8cf

Please sign in to comment.