|
11 | 11 | use fmt; |
12 | 12 |
|
13 | 13 | struct PadAdapter<'a> { |
14 | | - buf: &'a mut (fmt::Write + 'a), |
| 14 | + buf: &'a mut (dyn fmt::Write + 'a), |
15 | 15 | on_newline: bool, |
16 | 16 | } |
17 | 17 |
|
@@ -107,7 +107,7 @@ pub fn debug_struct_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>, |
107 | 107 | impl<'a, 'b: 'a> DebugStruct<'a, 'b> { |
108 | 108 | /// Adds a new field to the generated struct output. |
109 | 109 | #[stable(feature = "debug_builders", since = "1.2.0")] |
110 | | - pub fn field(&mut self, name: &str, value: &fmt::Debug) -> &mut DebugStruct<'a, 'b> { |
| 110 | + pub fn field(&mut self, name: &str, value: &dyn fmt::Debug) -> &mut DebugStruct<'a, 'b> { |
111 | 111 | self.result = self.result.and_then(|_| { |
112 | 112 | let prefix = if self.has_fields { |
113 | 113 | "," |
@@ -204,7 +204,7 @@ pub fn debug_tuple_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>, name: &str) -> D |
204 | 204 | impl<'a, 'b: 'a> DebugTuple<'a, 'b> { |
205 | 205 | /// Adds a new field to the generated tuple struct output. |
206 | 206 | #[stable(feature = "debug_builders", since = "1.2.0")] |
207 | | - pub fn field(&mut self, value: &fmt::Debug) -> &mut DebugTuple<'a, 'b> { |
| 207 | + pub fn field(&mut self, value: &dyn fmt::Debug) -> &mut DebugTuple<'a, 'b> { |
208 | 208 | self.result = self.result.and_then(|_| { |
209 | 209 | let (prefix, space) = if self.fields > 0 { |
210 | 210 | (",", " ") |
@@ -258,7 +258,7 @@ struct DebugInner<'a, 'b: 'a> { |
258 | 258 | } |
259 | 259 |
|
260 | 260 | impl<'a, 'b: 'a> DebugInner<'a, 'b> { |
261 | | - fn entry(&mut self, entry: &fmt::Debug) { |
| 261 | + fn entry(&mut self, entry: &dyn fmt::Debug) { |
262 | 262 | self.result = self.result.and_then(|_| { |
263 | 263 | if self.is_pretty() { |
264 | 264 | let mut slot = None; |
@@ -340,7 +340,7 @@ pub fn debug_set_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>) -> DebugSet<'a, 'b |
340 | 340 | impl<'a, 'b: 'a> DebugSet<'a, 'b> { |
341 | 341 | /// Adds a new entry to the set output. |
342 | 342 | #[stable(feature = "debug_builders", since = "1.2.0")] |
343 | | - pub fn entry(&mut self, entry: &fmt::Debug) -> &mut DebugSet<'a, 'b> { |
| 343 | + pub fn entry(&mut self, entry: &dyn fmt::Debug) -> &mut DebugSet<'a, 'b> { |
344 | 344 | self.inner.entry(entry); |
345 | 345 | self |
346 | 346 | } |
@@ -411,7 +411,7 @@ pub fn debug_list_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>) -> DebugList<'a, |
411 | 411 | impl<'a, 'b: 'a> DebugList<'a, 'b> { |
412 | 412 | /// Adds a new entry to the list output. |
413 | 413 | #[stable(feature = "debug_builders", since = "1.2.0")] |
414 | | - pub fn entry(&mut self, entry: &fmt::Debug) -> &mut DebugList<'a, 'b> { |
| 414 | + pub fn entry(&mut self, entry: &dyn fmt::Debug) -> &mut DebugList<'a, 'b> { |
415 | 415 | self.inner.entry(entry); |
416 | 416 | self |
417 | 417 | } |
@@ -482,7 +482,7 @@ pub fn debug_map_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>) -> DebugMap<'a, 'b |
482 | 482 | impl<'a, 'b: 'a> DebugMap<'a, 'b> { |
483 | 483 | /// Adds a new entry to the map output. |
484 | 484 | #[stable(feature = "debug_builders", since = "1.2.0")] |
485 | | - pub fn entry(&mut self, key: &fmt::Debug, value: &fmt::Debug) -> &mut DebugMap<'a, 'b> { |
| 485 | + pub fn entry(&mut self, key: &dyn fmt::Debug, value: &dyn fmt::Debug) -> &mut DebugMap<'a, 'b> { |
486 | 486 | self.result = self.result.and_then(|_| { |
487 | 487 | if self.is_pretty() { |
488 | 488 | let mut slot = None; |
|
0 commit comments