Skip to content

Commit ffa28ac

Browse files
committed
---
yaml --- r: 225719 b: refs/heads/stable c: 63da18b h: refs/heads/master i: 225717: dd409e6 225715: 97be10b 225711: 3574e72 v: v3
1 parent dbc2e71 commit ffa28ac

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ refs/heads/tmp: e5d90d98402475b6e154ce216f9efcb80da1a747
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: 1fe32ca12c51afcd761d9962f51a74ff0d07a591
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 15b028c5859f98b32cde69b81dd62468039db0be
32+
refs/heads/stable: 63da18b269128c6594b0fa60064b187a9b5d0418
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b

branches/stable/src/libcore/fmt/mod.rs

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -731,13 +731,6 @@ impl<'a> Formatter<'a> {
731731
self.buf.write_str(data)
732732
}
733733

734-
/// Writes a `char` to the underlying buffer contained within this
735-
/// formatter.
736-
#[stable(feature = "fmt_write_char", since = "1.1.0")]
737-
pub fn write_char(&mut self, c: char) -> Result {
738-
self.buf.write_char(c)
739-
}
740-
741734
/// Writes some formatted information into this instance
742735
#[stable(feature = "rust1", since = "1.0.0")]
743736
pub fn write_fmt(&mut self, fmt: Arguments) -> Result {
@@ -899,6 +892,21 @@ impl<'a> Formatter<'a> {
899892
}
900893
}
901894

895+
#[stable(since = "1.2.0", feature = "formatter_write")]
896+
impl<'a> Write for Formatter<'a> {
897+
fn write_str(&mut self, s: &str) -> Result {
898+
self.buf.write_str(s)
899+
}
900+
901+
fn write_char(&mut self, c: char) -> Result {
902+
self.buf.write_char(c)
903+
}
904+
905+
fn write_fmt(&mut self, args: Arguments) -> Result {
906+
write(self.buf, args)
907+
}
908+
}
909+
902910
#[stable(feature = "rust1", since = "1.0.0")]
903911
impl Display for Error {
904912
fn fmt(&self, f: &mut Formatter) -> Result {

branches/stable/src/test/run-pass/ifmt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#![allow(unknown_features)]
1616
#![feature(box_syntax)]
1717

18-
use std::fmt;
18+
use std::fmt::{self, Write};
1919
use std::usize;
2020

2121
struct A;

0 commit comments

Comments
 (0)