Rollup merge of #123817 - slanterns:seek_relative, r=dtolnay

Stabilize `seek_seek_relative`

This PR stabilizes `seek_seek_relative`:

```rust
// std::io::Seek

trait Seek {
    fn seek_relative(&mut self, offset: i64) -> Result<()>;
}
```

<br>

Tracking issue: https://github.com/rust-lang/rust/issues/117374.
Implementation PR: https://github.com/rust-lang/rust/pull/116750.

FCPs already completed in the tracking issue.

Closes https://github.com/rust-lang/rust/issues/117374.

r? libs-api
This commit is contained in:
Matthias Krüger 2024-05-13 20:29:18 +02:00 committed by GitHub
commit b0cbd4e5f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2044,7 +2044,6 @@ pub trait Seek {
/// # Example /// # Example
/// ///
/// ```no_run /// ```no_run
/// #![feature(seek_seek_relative)]
/// use std::{ /// use std::{
/// io::{self, Seek}, /// io::{self, Seek},
/// fs::File, /// fs::File,
@ -2059,7 +2058,7 @@ pub trait Seek {
/// ``` /// ```
/// ///
/// [`BufReader`]: crate::io::BufReader /// [`BufReader`]: crate::io::BufReader
#[unstable(feature = "seek_seek_relative", issue = "117374")] #[stable(feature = "seek_seek_relative", since = "CURRENT_RUSTC_VERSION")]
fn seek_relative(&mut self, offset: i64) -> Result<()> { fn seek_relative(&mut self, offset: i64) -> Result<()> {
self.seek(SeekFrom::Current(offset))?; self.seek(SeekFrom::Current(offset))?;
Ok(()) Ok(())