Change "import" to "bring into scope"

Fixes #460.
This commit is contained in:
Carol (Nichols || Goulding)
2017-02-22 09:33:46 -05:00
parent 2a8f1f39dc
commit eca768b994
+6 -5
View File
@@ -104,16 +104,17 @@ Listing 2-1: Code to get a guess from the user and print it out
</figure> </figure>
This code contains a lot of information, so let’s go over it bit by bit. To This code contains a lot of information, so let’s go over it bit by bit. To
obtain user input and then print the result as output, we need to import the obtain user input and then print the result as output, we need to bring the
`io` (input/output) library from the standard library (which is known as `std`): `io` (input/output) library into scope. The `io` library comes from the
standard library (which is known as `std`):
```rust,ignore ```rust,ignore
use std::io; use std::io;
``` ```
By default, Rust imports only a few types into every program in [the By default, Rust brings only a few types into the scope of every program in
*prelude*][prelude]<!-- ignore -->. If a type you want to use isn’t in the [the *prelude*][prelude]<!-- ignore -->. If a type you want to use isn’t in the
prelude, you have to import that type into your program explicitly with a `use` prelude, you have to bring that type into scope explicitly with a `use`
statement. Using the `std::io` library provides you with a number of useful statement. Using the `std::io` library provides you with a number of useful
`io`-related features, including the functionality to accept user input. `io`-related features, including the functionality to accept user input.