Skip to content

Commit 03dba69

Browse files
resolve prelude import at build_reduced_graph phase
1 parent f016862 commit 03dba69

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

core/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,10 @@
210210
#[allow(unused_extern_crates)]
211211
extern crate self as core;
212212

213+
/* The core prelude, not as all-encompassing as the std prelude */
214+
// The compiler expects the prelude definition to be defined before it's use statement.
215+
pub mod prelude;
216+
213217
#[prelude_import]
214218
#[allow(unused)]
215219
use prelude::rust_2024::*;
@@ -295,10 +299,6 @@ pub mod f64;
295299
#[macro_use]
296300
pub mod num;
297301

298-
/* The core prelude, not as all-encompassing as the std prelude */
299-
300-
pub mod prelude;
301-
302302
/* Core modules for ownership management */
303303

304304
pub mod hint;

std/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,10 @@
428428
//
429429
#![default_lib_allocator]
430430

431+
// The Rust prelude
432+
// The compiler expects the prelude definition to be defined before it's use statement.
433+
pub mod prelude;
434+
431435
// Explicitly import the prelude. The compiler uses this same unstable attribute
432436
// to import the prelude implicitly when building crates that depend on std.
433437
#[prelude_import]
@@ -483,9 +487,6 @@ mod macros;
483487
#[macro_use]
484488
pub mod rt;
485489

486-
// The Rust prelude
487-
pub mod prelude;
488-
489490
#[stable(feature = "rust1", since = "1.0.0")]
490491
pub use core::any;
491492
#[stable(feature = "core_array", since = "1.35.0")]

0 commit comments

Comments
 (0)