Mark symbols as used, fix warnings #28
Merged
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.
Compiler is optimizing-away some event symbols, breaking registration. This causes a link error (when there are zero events) and runtime failures (due to zero events getting registered). Fix by marking these symbols as
#[used].Also fix a few clippy warnings.
tests.rs:
event_generator.rs:
#[used]to the_EH_TRACEPOINT_PTRsymbol so that it is not optimized-away so we can use it when registering the provider.unsafe, so removeunsafe{ ... }from the generated code.provider_generator.rs:
#[used]to the_eh_define_provider_MY_PROVIDERsymbol so that it is not optimized-away so we don't get linker errors on a provider with no events.Cargo.toml:
perf_abi.rs:
const transmute_copyis not supported until 1.74. Nobody really benefits from this being const, so remove the const.