Disallow dead code/unused imports by default in wasmtime
crate
#10108
+0
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a change to the crate attributes of the
wasmtime
crate. Quite some time ago when Wasmtime had far fewer crate features I added a directive to allow dead code and unused imports when thedefault
feature was disabled. The original intention was to not worry too much about unused imports and dead code in every possible configuration of Wasmtime to ease the burden of dealing with unused imports or compile-time conditionally used code.The primary consequence of this change though is that
cargo build
doesn't actually warn about dead code or unused imports in this repository during development. The reason for this is that thedefault
feature is disabled by default and never actually enabled by any dependency inside the repository. Instead each crate, likewasmtime-cli
, has its owndefault
feature.If I were to start from the problem of "I want dead code warnings by default in this repository" there's two possible fixes:
wasmtime-cli
'sdefault
feature to includewasmtime/default
.#[allow]
directive.While (1) would indeed work this is an attempt to get (2) working to see how bad the changes are necessary within the crate.
prtest:full