Skip to content

Commit e2940cd

Browse files
committed
chore: Fix some warnings with latest stable.
1 parent 5d7f684 commit e2940cd

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

bindgen/clang.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ impl Cursor {
945945
}
946946

947947
/// Gets the tokens that correspond to that cursor.
948-
pub(crate) fn tokens(&self) -> RawTokens {
948+
pub(crate) fn tokens(&self) -> RawTokens<'_> {
949949
RawTokens::new(self)
950950
}
951951

@@ -1006,7 +1006,7 @@ impl<'a> RawTokens<'a> {
10061006
}
10071007

10081008
/// Get an iterator over these tokens.
1009-
pub(crate) fn iter(&self) -> ClangTokenIterator {
1009+
pub(crate) fn iter(&self) -> ClangTokenIterator<'_> {
10101010
ClangTokenIterator {
10111011
tu: self.tu,
10121012
raw: self.as_slice().iter(),

bindgen/ir/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
12281228

12291229
fn assert_no_dangling_item_traversal(
12301230
&self,
1231-
) -> traversal::AssertNoDanglingItemsTraversal {
1231+
) -> traversal::AssertNoDanglingItemsTraversal<'_> {
12321232
assert!(self.in_codegen_phase());
12331233
assert_eq!(self.current_module, self.root_module);
12341234

bindgen/ir/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ impl Type {
243243
}
244244

245245
/// Takes `name`, and returns a suitable identifier representation for it.
246-
fn sanitize_name(name: &str) -> Cow<str> {
246+
fn sanitize_name(name: &str) -> Cow<'_, str> {
247247
if clang::is_valid_identifier(name) {
248248
return Cow::Borrowed(name);
249249
}

bindgen/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ impl Bindings {
980980
}
981981

982982
/// Gets the rustfmt path to rustfmt the generated bindings.
983-
fn rustfmt_path(&self) -> io::Result<Cow<PathBuf>> {
983+
fn rustfmt_path(&self) -> io::Result<Cow<'_, PathBuf>> {
984984
debug_assert!(matches!(self.options.formatter, Formatter::Rustfmt));
985985
if let Some(ref p) = self.options.rustfmt_path {
986986
return Ok(Cow::Borrowed(p));

0 commit comments

Comments
 (0)