diff options
| author | bors <bors@rust-lang.org> | 2020-01-25 22:44:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-01-25 22:44:39 +0000 |
| commit | 83beb0a118f7508b2a1888bfecf4e46640b9b3c2 (patch) | |
| tree | 0c26e650eec40a1bf8c994e89c98290f0c7d22af /src/libcore | |
| parent | 6d3f4e0aab3e36ceb8b83d1e9467514685f6b751 (diff) | |
| parent | 5774dd053b103f2d169962b2af7a145e14d51211 (diff) | |
| download | rust-83beb0a118f7508b2a1888bfecf4e46640b9b3c2.tar.gz rust-83beb0a118f7508b2a1888bfecf4e46640b9b3c2.zip | |
Auto merge of #68546 - JohnTitor:rollup-znuot4b, r=JohnTitor
Rollup of 5 pull requests Successful merges: - #68485 (add a test for #60976) - #68498 (Add some type-alias-impl-trait regression tests) - #68514 (Use Self instead of self return type) - #68534 (Update submodules to rust-lang) - #68540 (clean up error codes E0229 and E0261) Failed merges: r? @ghost
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/fmt/builders.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libcore/fmt/builders.rs b/src/libcore/fmt/builders.rs index dd0f3ccb158..8ba0e422e8f 100644 --- a/src/libcore/fmt/builders.rs +++ b/src/libcore/fmt/builders.rs @@ -133,7 +133,7 @@ impl<'a, 'b: 'a> DebugStruct<'a, 'b> { /// ); /// ``` #[stable(feature = "debug_builders", since = "1.2.0")] - pub fn field(&mut self, name: &str, value: &dyn fmt::Debug) -> &mut DebugStruct<'a, 'b> { + pub fn field(&mut self, name: &str, value: &dyn fmt::Debug) -> &mut Self { self.result = self.result.and_then(|_| { if self.is_pretty() { if !self.has_fields { @@ -330,7 +330,7 @@ impl<'a, 'b: 'a> DebugTuple<'a, 'b> { /// ); /// ``` #[stable(feature = "debug_builders", since = "1.2.0")] - pub fn field(&mut self, value: &dyn fmt::Debug) -> &mut DebugTuple<'a, 'b> { + pub fn field(&mut self, value: &dyn fmt::Debug) -> &mut Self { self.result = self.result.and_then(|_| { if self.is_pretty() { if self.fields == 0 { @@ -492,7 +492,7 @@ impl<'a, 'b: 'a> DebugSet<'a, 'b> { /// ); /// ``` #[stable(feature = "debug_builders", since = "1.2.0")] - pub fn entry(&mut self, entry: &dyn fmt::Debug) -> &mut DebugSet<'a, 'b> { + pub fn entry(&mut self, entry: &dyn fmt::Debug) -> &mut Self { self.inner.entry(entry); self } @@ -521,7 +521,7 @@ impl<'a, 'b: 'a> DebugSet<'a, 'b> { /// ); /// ``` #[stable(feature = "debug_builders", since = "1.2.0")] - pub fn entries<D, I>(&mut self, entries: I) -> &mut DebugSet<'a, 'b> + pub fn entries<D, I>(&mut self, entries: I) -> &mut Self where D: fmt::Debug, I: IntoIterator<Item = D>, @@ -624,7 +624,7 @@ impl<'a, 'b: 'a> DebugList<'a, 'b> { /// ); /// ``` #[stable(feature = "debug_builders", since = "1.2.0")] - pub fn entry(&mut self, entry: &dyn fmt::Debug) -> &mut DebugList<'a, 'b> { + pub fn entry(&mut self, entry: &dyn fmt::Debug) -> &mut Self { self.inner.entry(entry); self } @@ -653,7 +653,7 @@ impl<'a, 'b: 'a> DebugList<'a, 'b> { /// ); /// ``` #[stable(feature = "debug_builders", since = "1.2.0")] - pub fn entries<D, I>(&mut self, entries: I) -> &mut DebugList<'a, 'b> + pub fn entries<D, I>(&mut self, entries: I) -> &mut Self where D: fmt::Debug, I: IntoIterator<Item = D>, @@ -760,7 +760,7 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> { /// ); /// ``` #[stable(feature = "debug_builders", since = "1.2.0")] - pub fn entry(&mut self, key: &dyn fmt::Debug, value: &dyn fmt::Debug) -> &mut DebugMap<'a, 'b> { + pub fn entry(&mut self, key: &dyn fmt::Debug, value: &dyn fmt::Debug) -> &mut Self { self.key(key).value(value) } @@ -797,7 +797,7 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> { /// ); /// ``` #[unstable(feature = "debug_map_key_value", reason = "recently added", issue = "62482")] - pub fn key(&mut self, key: &dyn fmt::Debug) -> &mut DebugMap<'a, 'b> { + pub fn key(&mut self, key: &dyn fmt::Debug) -> &mut Self { self.result = self.result.and_then(|_| { assert!( !self.has_key, @@ -862,7 +862,7 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> { /// ); /// ``` #[unstable(feature = "debug_map_key_value", reason = "recently added", issue = "62482")] - pub fn value(&mut self, value: &dyn fmt::Debug) -> &mut DebugMap<'a, 'b> { + pub fn value(&mut self, value: &dyn fmt::Debug) -> &mut Self { self.result = self.result.and_then(|_| { assert!(self.has_key, "attempted to format a map value before its key"); @@ -908,7 +908,7 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> { /// ); /// ``` #[stable(feature = "debug_builders", since = "1.2.0")] - pub fn entries<K, V, I>(&mut self, entries: I) -> &mut DebugMap<'a, 'b> + pub fn entries<K, V, I>(&mut self, entries: I) -> &mut Self where K: fmt::Debug, V: fmt::Debug, |
