Skip to content

Commit c9864ce

Browse files
committed
auto merge of #12410 : DaGenix/rust/fix-incorrect-comment, r=alexcrichton
The comments say that the prelude imports std::io::println since it would be annoying to have to import it in every program that uses it. However, the prelude doesn't actually import that function anymore. So, update the comments to better match reality.
2 parents 37903cb + bb6fc34 commit c9864ce

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/libstd/prelude.rs

+2-11
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,8 @@ The standard module imported by default into all Rust modules
1414
1515
Many programming languages have a 'prelude': a particular subset of the
1616
libraries that come with the language. Every program imports the prelude by
17-
default.
18-
19-
For example, it would be annoying to add `use std::io::println;` to every single
20-
program, and the vast majority of Rust programs will wish to print to standard
21-
output. Therefore, it makes sense to import it into every program.
22-
23-
Rust's prelude has three main parts:
24-
25-
1. io::print and io::println.
26-
2. Core operators, such as `Add`, `Mul`, and `Not`.
27-
3. Various types and traits, such as `Clone`, `Eq`, and `comm::Chan`.
17+
default. The prelude imports various core parts of the library that are
18+
generally useful to many Rust programs.
2819
2920
*/
3021

0 commit comments

Comments
 (0)