Skip to content

Commit

Permalink
Add Future and IntoFuture to the 2024 prelude
Browse files Browse the repository at this point in the history
Implements RFC 3509.
  • Loading branch information
Noratrieb committed Feb 18, 2024
1 parent 8a49772 commit cba7f1a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions library/core/src/prelude/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ pub mod rust_2024 {
#[unstable(feature = "prelude_2024", issue = "none")]
#[doc(no_inline)]
pub use super::rust_2021::*;

#[unstable(feature = "prelude_2024", issue = "none")]
#[doc(no_inline)]
pub use crate::future::{Future, IntoFuture};
}
3 changes: 2 additions & 1 deletion src/tools/tidy/src/ui_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const ENTRY_LIMIT: usize = 900;
// FIXME: The following limits should be reduced eventually.

const ISSUES_ENTRY_LIMIT: usize = 1781;
const ROOT_ENTRY_LIMIT: usize = 871;

const ROOT_ENTRY_LIMIT: usize = 872;

const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
"rs", // test source files
Expand Down
9 changes: 9 additions & 0 deletions tests/ui/rust-2024/prelude2024.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// check-pass
// compile-flags: -Zunstable-options
// edition:2024

fn main() {
fut(async {}.into_future(), async {});
}

fn fut(_: impl Future, _: impl IntoFuture) {}

0 comments on commit cba7f1a

Please sign in to comment.