Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings from Rust 1.80.0 nightly #3074

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ exclude = [

[workspace.lints.rust]
rust_2018_idioms = { level = "warn", priority = -1 }
unused_qualifications = "warn"
unused_qualifications = "allow" # See https://github.com/microsoft/windows-rs/issues/3076
missing_docs = "warn"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(windows_raw_dylib, windows_debugger_visualizer)'] }
3 changes: 1 addition & 2 deletions crates/libs/core/src/imp/weak_ref_count.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ impl WeakRefCount {

let tear_off = TearOff::new(object, count_or_pointer as u32);
let tear_off_ptr: *mut c_void = transmute_copy(&tear_off);
let encoding: usize =
((tear_off_ptr as usize) >> 1) | (1 << (core::mem::size_of::<usize>() * 8 - 1));
let encoding: usize = ((tear_off_ptr as usize) >> 1) | (1 << (usize::BITS - 1));

loop {
match self.0.compare_exchange_weak(
Expand Down