commit
d3732a12e8
110 changed files with 2051 additions and 2029 deletions
|
|
@ -1813,7 +1813,6 @@ default visibility with the `priv` keyword. When an item is declared as `pub`,
|
|||
it can be thought of as being accessible to the outside world. For example:
|
||||
|
||||
```
|
||||
# #![allow(missing_copy_implementations)]
|
||||
# fn main() {}
|
||||
// Declare a private struct
|
||||
struct Foo;
|
||||
|
|
|
|||
|
|
@ -523,7 +523,7 @@ fn print<'a>(s: &'a str); // expanded
|
|||
fn debug(lvl: u32, s: &str); // elided
|
||||
fn debug<'a>(lvl: u32, s: &'a str); // expanded
|
||||
|
||||
// In the preceeding example, `lvl` doesn't need a lifetime because it's not a
|
||||
// In the preceding example, `lvl` doesn't need a lifetime because it's not a
|
||||
// reference (`&`). Only things relating to references (such as a `struct`
|
||||
// which contains a reference) need lifetimes.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue