diff options
author | jkozlowski <mail@jakub-kozlowski.com> | 2018-09-22 22:54:36 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-09-25 01:59:57 +0200 |
commit | ad2227b1e3acc6478fc2cc85d89ed5ac9f029cab (patch) | |
tree | 235d0fe5f7ce486f4dd58caef5deb7e30bc72f3c /src | |
parent | 65f6779fd8bd677a9ab8077f0006787ed2094408 (diff) |
Indicate the anonymous lifetime in Formatter.
Diffstat (limited to 'src')
-rw-r--r-- | src/clang.rs | 12 | ||||
-rw-r--r-- | src/codegen/error.rs | 2 | ||||
-rw-r--r-- | src/codegen/impl_debug.rs | 2 | ||||
-rw-r--r-- | src/codegen/mod.rs | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/clang.rs b/src/clang.rs index f8f7e581..7ddd540e 100644 --- a/src/clang.rs +++ b/src/clang.rs @@ -23,7 +23,7 @@ pub struct Cursor { } impl fmt::Debug for Cursor { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { write!( fmt, "Cursor({} kind: {}, loc: {}, usr: {:?})", @@ -746,7 +746,7 @@ impl PartialEq for Type { impl Eq for Type {} impl fmt::Debug for Type { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { write!( fmt, "Type({}, kind: {}, cconv: {}, decl: {:?}, canon: {:?})", @@ -1153,7 +1153,7 @@ impl SourceLocation { } impl fmt::Display for SourceLocation { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let (file, line, col, _) = self.location(); if let Some(name) = file.name() { write!(f, "{}:{}:{}", name, line, col) @@ -1314,7 +1314,7 @@ impl Index { } impl fmt::Debug for Index { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { write!(fmt, "Index {{ }}") } } @@ -1342,7 +1342,7 @@ pub struct TranslationUnit { } impl fmt::Debug for TranslationUnit { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { write!(fmt, "TranslationUnit {{ }}") } } @@ -1482,7 +1482,7 @@ impl UnsavedFile { } impl fmt::Debug for UnsavedFile { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { write!( fmt, "UnsavedFile(name: {:?}, contents: {:?})", diff --git a/src/codegen/error.rs b/src/codegen/error.rs index ccb76c5b..4b7f8827 100644 --- a/src/codegen/error.rs +++ b/src/codegen/error.rs @@ -14,7 +14,7 @@ pub enum Error { } impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}", error::Error::description(self)) } } diff --git a/src/codegen/impl_debug.rs b/src/codegen/impl_debug.rs index 2c6d36d9..8759bf27 100644 --- a/src/codegen/impl_debug.rs +++ b/src/codegen/impl_debug.rs @@ -45,7 +45,7 @@ pub fn gen_debug_impl( let prefix = ctx.trait_prefix(); quote! { - fn fmt(&self, f: &mut ::#prefix::fmt::Formatter) -> ::#prefix ::fmt::Result { + fn fmt(&self, f: &mut ::#prefix::fmt::Formatter<'_>) -> ::#prefix ::fmt::Result { write!(f, #( #tokens ),*) } } diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index 7e183ad5..91198701 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -3686,7 +3686,7 @@ mod utils { let union_field_debug_impl = quote! { impl<T> ::#prefix::fmt::Debug for __BindgenUnionField<T> { - fn fmt(&self, fmt: &mut ::#prefix::fmt::Formatter) + fn fmt(&self, fmt: &mut ::#prefix::fmt::Formatter<'_>) -> ::#prefix::fmt::Result { fmt.write_str("__BindgenUnionField") } @@ -3773,7 +3773,7 @@ mod utils { let incomplete_array_debug_impl = quote! { impl<T> ::#prefix::fmt::Debug for __IncompleteArrayField<T> { - fn fmt(&self, fmt: &mut ::#prefix::fmt::Formatter) + fn fmt(&self, fmt: &mut ::#prefix::fmt::Formatter<'_>) -> ::#prefix::fmt::Result { fmt.write_str("__IncompleteArrayField") } |