Skip to content

Commit bf30c51

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 66f3807 commit bf30c51

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
@@ -323,7 +323,7 @@ impl<W: Write> BufWriter<W> {
323323
/// # Examples
324324
///
325325
/// ```
326-
/// #![feature(bufwriter_into_raw_parts)]
326+
/// #![feature(bufwriter_into_parts)]
327327
/// use std::io::{BufWriter, Write};
328328
///
329329
/// let mut buffer = [0u8; 10];
@@ -334,7 +334,7 @@ impl<W: Write> BufWriter<W> {
334334
/// assert_eq!(recovered_writer.len(), 0);
335335
/// assert_eq!(&buffered_data.unwrap(), b"ata");
336336
/// ```
337-
#[unstable(feature = "bufwriter_into_raw_parts", issue = "80690")]
337+
#[unstable(feature = "bufwriter_into_parts", issue = "80690")]
338338
pub fn into_parts(mut self) -> (W, Result<Vec<u8>, WriterPanicked>) {
339339
let buf = mem::take(&mut self.buf);
340340
let buf = if !self.panicked { Ok(buf) } else { Err(WriterPanicked { buf }) };
@@ -444,14 +444,14 @@ impl<W: Write> BufWriter<W> {
444444
}
445445
}
446446

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

490-
#[unstable(feature = "bufwriter_into_raw_parts", issue = "80690")]
490+
#[unstable(feature = "bufwriter_into_parts", issue = "80690")]
491491
impl error::Error for WriterPanicked {
492492
#[allow(deprecated, deprecated_in_future)]
493493
fn description(&self) -> &str {
494494
Self::DESCRIPTION
495495
}
496496
}
497497

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

505-
#[unstable(feature = "bufwriter_into_raw_parts", issue = "80690")]
505+
#[unstable(feature = "bufwriter_into_parts", issue = "80690")]
506506
impl fmt::Debug for WriterPanicked {
507507
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
508508
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)