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

Clippy fixes #1372

Merged
merged 2 commits into from
May 7, 2024
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
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
Loading