Skip to content

Commit 51d16ac

Browse files
committed
Rename feature gate bufwriter_into_parts from bufwriter_into_raw_parts
As requested #85901 (review) Signed-off-by: Ian Jackson <[email protected]>
1 parent 3aaa275 commit 51d16ac

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

library/std/src/io/buffered/bufwriter.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ impl<W: Write> BufWriter<W> {
324324
/// # Examples
325325
///
326326
/// ```
327-
/// #![feature(bufwriter_into_raw_parts)]
327+
/// #![feature(bufwriter_into_parts)]
328328
/// use std::io::{BufWriter, Write};
329329
///
330330
/// let mut buffer = [0u8; 10];
@@ -335,7 +335,7 @@ impl<W: Write> BufWriter<W> {
335335
/// assert_eq!(recovered_writer.len(), 0);
336336
/// assert_eq!(&buffered_data.unwrap(), b"ata");
337337
/// ```
338-
#[unstable(feature = "bufwriter_into_raw_parts", issue = "80690")]
338+
#[unstable(feature = "bufwriter_into_parts", issue = "80690")]
339339
pub fn into_parts(mut self) -> (W, Result<Vec<u8>, WriterPanicked>) {
340340
let buf = mem::take(&mut self.buf);
341341
let buf = if !self.panicked { Ok(buf) } else { Err(WriterPanicked { buf }) };
@@ -440,14 +440,14 @@ impl<W: Write> BufWriter<W> {
440440
}
441441
}
442442

443-
#[unstable(feature = "bufwriter_into_raw_parts", issue = "80690")]
443+
#[unstable(feature = "bufwriter_into_parts", issue = "80690")]
444444
/// Error returned for the buffered data from `BufWriter::into_parts`, when the underlying
445445
/// writer has previously panicked. Contains the (possibly partly written) buffered data.
446446
///
447447
/// # Example
448448
///
449449
/// ```
450-
/// #![feature(bufwriter_into_raw_parts)]
450+
/// #![feature(bufwriter_into_parts)]
451451
/// use std::io::{self, BufWriter, Write};
452452
/// use std::panic::{catch_unwind, AssertUnwindSafe};
453453
///
@@ -474,7 +474,7 @@ pub struct WriterPanicked {
474474
impl WriterPanicked {
475475
/// Returns the perhaps-unwritten data. Some of this data may have been written by the
476476
/// panicking call(s) to the underlying writer, so simply writing it again is not a good idea.
477-
#[unstable(feature = "bufwriter_into_raw_parts", issue = "80690")]
477+
#[unstable(feature = "bufwriter_into_parts", issue = "80690")]
478478
pub fn into_inner(self) -> Vec<u8> {
479479
self.buf
480480
}
@@ -483,22 +483,22 @@ impl WriterPanicked {
483483
"BufWriter inner writer panicked, what data remains unwritten is not known";
484484
}
485485

486-
#[unstable(feature = "bufwriter_into_raw_parts", issue = "80690")]
486+
#[unstable(feature = "bufwriter_into_parts", issue = "80690")]
487487
impl error::Error for WriterPanicked {
488488
#[allow(deprecated, deprecated_in_future)]
489489
fn description(&self) -> &str {
490490
Self::DESCRIPTION
491491
}
492492
}
493493

494-
#[unstable(feature = "bufwriter_into_raw_parts", issue = "80690")]
494+
#[unstable(feature = "bufwriter_into_parts", issue = "80690")]
495495
impl fmt::Display for WriterPanicked {
496496
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
497497
write!(f, "{}", Self::DESCRIPTION)
498498
}
499499
}
500500

501-
#[unstable(feature = "bufwriter_into_raw_parts", issue = "80690")]
501+
#[unstable(feature = "bufwriter_into_parts", issue = "80690")]
502502
impl fmt::Debug for WriterPanicked {
503503
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
504504
f.debug_struct("WriterPanicked")

library/std/src/io/buffered/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use crate::io::Error;
1414

1515
pub use bufreader::BufReader;
1616
pub use bufwriter::BufWriter;
17-
#[unstable(feature = "bufwriter_into_raw_parts", issue = "80690")]
17+
#[unstable(feature = "bufwriter_into_parts", issue = "80690")]
1818
pub use bufwriter::WriterPanicked;
1919
pub use linewriter::LineWriter;
2020
use linewritershim::LineWriterShim;

library/std/src/io/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ use crate::sys_common::memchr;
264264

265265
#[stable(feature = "rust1", since = "1.0.0")]
266266
pub use self::buffered::IntoInnerError;
267-
#[unstable(feature = "bufwriter_into_raw_parts", issue = "80690")]
267+
#[unstable(feature = "bufwriter_into_parts", issue = "80690")]
268268
pub use self::buffered::WriterPanicked;
269269
#[stable(feature = "rust1", since = "1.0.0")]
270270
pub use self::buffered::{BufReader, BufWriter, LineWriter};

0 commit comments

Comments
 (0)