Skip to content

Commit

Permalink
Merge pull request #1372 from google/clippy-9
Browse files Browse the repository at this point in the history
Clippy fixes
  • Loading branch information
adetaylor authored May 7, 2024
2 parents 6db9cb4 + 78cbeee commit 037f3af
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ exclude = [ ".github", "book", "tools" ]
# where we are depending on such features.
resolver = "2"

[features]
arbitrary_self_types = []

[dependencies]
autocxx-macro = { path="macro", version="0.26.0" }
cxx = "1.0.78" # ... also needed because expansion of type_id refers to ::cxx
Expand Down
1 change: 1 addition & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// It would be nice to use the rustversion crate here instead,
// but that doesn't work with inner attributes.
fn main() {
println!("cargo::rustc-check-cfg=cfg(nightly)");
if let Some(ver) = rustc_version() {
if ver.contains("nightly") {
println!("cargo:rustc-cfg=nightly")
Expand Down
12 changes: 12 additions & 0 deletions integration-tests/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

fn main() {
println!("cargo::rustc-check-cfg=cfg(skip_windows_gnu_failing_tests)");
println!("cargo::rustc-check-cfg=cfg(skip_windows_msvc_failing_tests)");
}
2 changes: 1 addition & 1 deletion src/reference_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ impl<T: ?Sized> CppPin<T> {
// to
// Box<CppPinContents<T>>
// is safe.
let contents = unsafe { std::mem::transmute(item) };
let contents = unsafe { std::mem::transmute::<Box<T>, Box<CppPinContents<T>>>(item) };
Self(contents)
}

Expand Down

0 comments on commit 037f3af

Please sign in to comment.