Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
be0b42f
Recover from incorrectly ordered/duplicated function keywords
clubby789 Oct 27, 2023
f784fa7
tests/rustdoc-json: Remove some needless uses of `#![no_core]`.
aDotInTheVoid Nov 7, 2023
0875f45
tests/rustdoc-json: Remove more needless uses of `#![no_core]`.
aDotInTheVoid Nov 7, 2023
434b69a
tests/rustdoc-json: Rewrite tests no not use `#![no_core]`.
aDotInTheVoid Nov 7, 2023
94eb6b0
Move `BorrowedBuf` and `BorrowedCursor` from `std:io` to `core::io`
jmillikin Nov 8, 2023
76aa83e
target: move base specs to spec/base
davidtwco Nov 8, 2023
1af256f
targets: move target specs to spec/targets
davidtwco Nov 8, 2023
ef7ebaa
rustc_target: move file for uniformity
davidtwco Nov 8, 2023
ae4d18b
handle the case when the change-id isn't found
onur-ozkan Oct 27, 2023
e878100
bootstrap: improve `fn check_version`
onur-ozkan Oct 27, 2023
e0cb1cc
bootstrap: add more detail on change-id comments
onur-ozkan Nov 7, 2023
33edea6
Add test for reexported hidden item with `--document-hidden-items`
GuillaumeGomez Nov 8, 2023
fb31b00
Rollup merge of #117263 - onur-ozkan:change-id-fix, r=saethlin
GuillaumeGomez Nov 8, 2023
fb50ed7
Rollup merge of #117282 - clubby789:recover-wrong-function-header, r=…
GuillaumeGomez Nov 8, 2023
301b4ed
Rollup merge of #117679 - aDotInTheVoid:yes-core, r=GuillaumeGomez
GuillaumeGomez Nov 8, 2023
2627f72
Rollup merge of #117694 - jmillikin:core-io-borrowed-buf, r=m-ou-se
GuillaumeGomez Nov 8, 2023
259b749
Rollup merge of #117702 - davidtwco:target-tier-refactors, r=petroche…
GuillaumeGomez Nov 8, 2023
bf09474
Rollup merge of #117713 - GuillaumeGomez:document-hidden-json, r=notr…
GuillaumeGomez Nov 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compiler/rustc_span/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![feature(array_windows)]
#![feature(cfg_match)]
#![feature(core_io_borrowed_buf)]
#![feature(if_let_guard)]
#![feature(let_chains)]
#![feature(min_specialization)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#![unstable(feature = "read_buf", issue = "78485")]

#[cfg(test)]
mod tests;
#![unstable(feature = "core_io_borrowed_buf", issue = "117693")]

use crate::fmt::{self, Debug, Formatter};
use crate::io::{Result, Write};
use crate::mem::{self, MaybeUninit};
use crate::{cmp, ptr};

Expand Down Expand Up @@ -303,15 +299,3 @@ impl<'a> BorrowedCursor<'a> {
self.buf.filled += buf.len();
}
}

impl<'a> Write for BorrowedCursor<'a> {
fn write(&mut self, buf: &[u8]) -> Result<usize> {
self.append(buf);
Ok(buf.len())
}

#[inline]
fn flush(&mut self) -> Result<()> {
Ok(())
}
}
6 changes: 6 additions & 0 deletions library/core/src/io/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//! Traits, helpers, and type definitions for core I/O functionality.

mod borrowed_buf;

#[unstable(feature = "core_io_borrowed_buf", issue = "117693")]
pub use self::borrowed_buf::{BorrowedBuf, BorrowedCursor};
2 changes: 2 additions & 0 deletions library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,8 @@ pub mod async_iter;
pub mod cell;
pub mod char;
pub mod ffi;
#[unstable(feature = "core_io_borrowed_buf", issue = "117693")]
pub mod io;
pub mod iter;
pub mod net;
pub mod option;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::BorrowedBuf;
use crate::mem::MaybeUninit;
use core::io::BorrowedBuf;
use core::mem::MaybeUninit;

/// Test that BorrowedBuf has the correct numbers when created with new
#[test]
Expand Down
1 change: 1 addition & 0 deletions library/core/tests/io/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mod borrowed_buf;
2 changes: 2 additions & 0 deletions library/core/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#![feature(const_likely)]
#![feature(const_location_fields)]
#![feature(core_intrinsics)]
#![feature(core_io_borrowed_buf)]
#![feature(core_private_bignum)]
#![feature(core_private_diy_float)]
#![feature(dec2flt)]
Expand Down Expand Up @@ -135,6 +136,7 @@ mod fmt;
mod future;
mod hash;
mod intrinsics;
mod io;
mod iter;
mod lazy;
#[cfg(test)]
Expand Down
13 changes: 13 additions & 0 deletions library/std/src/io/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,3 +528,16 @@ impl<A: Allocator> Write for VecDeque<u8, A> {
Ok(())
}
}

#[unstable(feature = "read_buf", issue = "78485")]
impl<'a> io::Write for core::io::BorrowedCursor<'a> {
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
self.append(buf);
Ok(buf.len())
}

#[inline]
fn flush(&mut self) -> io::Result<()> {
Ok(())
}
}
3 changes: 1 addition & 2 deletions library/std/src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ pub use self::{
};

#[unstable(feature = "read_buf", issue = "78485")]
pub use self::readbuf::{BorrowedBuf, BorrowedCursor};
pub use core::io::{BorrowedBuf, BorrowedCursor};
pub(crate) use error::const_io_error;

mod buffered;
Expand All @@ -339,7 +339,6 @@ mod cursor;
mod error;
mod impls;
pub mod prelude;
mod readbuf;
mod stdio;
mod util;

Expand Down
1 change: 1 addition & 0 deletions library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@
// tidy-alphabetical-start
#![feature(char_internals)]
#![feature(core_intrinsics)]
#![feature(core_io_borrowed_buf)]
#![feature(duration_constants)]
#![feature(error_generic_member_access)]
#![feature(error_in_core)]
Expand Down