Skip to content

Clean compiler and cargo warnings#6

Open
bonzini wants to merge 3 commits intonbdd0121:trunkfrom
bonzini:clean-compile
Open

Clean compiler and cargo warnings#6
bonzini wants to merge 3 commits intonbdd0121:trunkfrom
bonzini:clean-compile

Conversation

@bonzini
Copy link
Copy Markdown

@bonzini bonzini commented May 12, 2025

There are two warnings when building trunk with latest rustc and Cargo, fix them:

  • allow dead_code when the field is unused but needed for its Drop implementation
  • use modern spelling of lib.proc_macro in Cargo.toml.

bonzini added 3 commits May 12, 2025 14:56
Fix the following warning:

  --> examples/pthread_mutex.rs:92:26
   |
92 + struct MutexGuard<'a, T>((), &'a mut T);
   |

warning: `pin-init` (example "pthread_mutex") generated 1 warning

The field is only present for its drop implementation, but rust chose
to warn anyway because the same is true of types such as String.
Suppress this warning:

warning: /home/pbonzini/work/upstream/pin-init/pin-init-internal/Cargo.toml: `proc_macro` is deprecated in favor of `proc-macro` and will not work in the 2024 edition
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
List the cfg(doc_cfg) symbol in Cargo.toml, so that recent Rust compilers do
not complain.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant