Skip to content
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: 1 addition & 2 deletions bindgen-tests/tests/expectations/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@ fn main() {
test_string.push_str(&format!(
r###"
#[path = "{}"]
mod {};
mod {module_name};
"###,
path.display().to_string().replace('\\', "\\\\"),
module_name,
));
}
}
Expand Down
3 changes: 1 addition & 2 deletions bindgen-tests/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,8 @@ fn compare_generated_header(
}
None => panic!(
"missing test expectation file and/or '__testing_only_libclang_$VERSION' \
feature for header '{}'; looking for expectation file at '{:?}'",
feature for header '{}'; looking for expectation file at '{looked_at:?}'",
header.display(),
looked_at,
),
}

Expand Down
2 changes: 1 addition & 1 deletion bindgen/codegen/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ pub(crate) fn blob(
}

ctx.generated_opaque_array(align);
let ident = format_ident!("__BindgenOpaqueArray{}", align);
let ident = format_ident!("__BindgenOpaqueArray{align}");
let size = layout.size;
if ctx.options().enable_cxx_namespaces {
syn::parse_quote! { root::#ident<[u8; #size]> }
Expand Down
2 changes: 1 addition & 1 deletion bindgen/codegen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5617,7 +5617,7 @@ pub(crate) mod utils {
let ident = if align == 1 {
format_ident!("__BindgenOpaqueArray")
} else {
format_ident!("__BindgenOpaqueArray{}", align)
format_ident!("__BindgenOpaqueArray{align}")
};
let repr = if align <= 1 {
quote! { #[repr(C)] }
Expand Down
12 changes: 4 additions & 8 deletions bindgen/ir/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1701,8 +1701,7 @@ impl Item {
if let Err(ParseError::Recurse) = result {
warn!(
"Unknown type, assuming named template type: \
id = {:?}; spelling = {}",
id,
id = {id:?}; spelling = {}",
ty.spelling()
);
Item::type_param(Some(id), location, ctx)
Expand Down Expand Up @@ -1732,13 +1731,10 @@ impl Item {

debug!(
"Item::type_param:\n\
\twith_id = {:?},\n\
\tty = {} {:?},\n\
\tlocation: {:?}",
with_id,
\twith_id = {with_id:?},\n\
\tty = {} {ty:?},\n\
\tlocation: {location:?}",
ty.spelling(),
ty,
location
);

if ty.kind() != clang_sys::CXType_Unexposed {
Expand Down
2 changes: 1 addition & 1 deletion bindgen/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ fn rust_to_clang_target(rust_target: &str) -> Box<str> {

let mut triple: Vec<&str> = rust_target.split_terminator('-').collect();

assert!(!triple.is_empty(), "{}", TRIPLE_HYPHENS_MESSAGE);
assert!(!triple.is_empty(), "{TRIPLE_HYPHENS_MESSAGE}");
triple.resize(4, "");

// RISC-V
Expand Down
Loading