Skip to content

Commit 46e7fcd

Browse files
csouth3Manishearth
authored andcommitted
Remove unneeded box import in examples
1 parent 560fc67 commit 46e7fcd

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

reference.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,6 @@ pointer values (pointing to a type for which an implementation of the given
15881588
trait is in scope) to pointers to the trait name, used as a type.
15891589

15901590
```
1591-
# use std::boxed::Box;
15921591
# trait Shape { }
15931592
# impl Shape for int { }
15941593
# let mycircle = 0i;
@@ -1647,7 +1646,6 @@ fn radius_times_area<T: Circle>(c: T) -> f64 {
16471646
Likewise, supertrait methods may also be called on trait objects.
16481647

16491648
```{.ignore}
1650-
# use std::boxed::Box;
16511649
# trait Shape { fn area(&self) -> f64; }
16521650
# trait Circle : Shape { fn radius(&self) -> f64; }
16531651
# impl Shape for int { fn area(&self) -> f64 { 0.0 } }
@@ -3792,7 +3790,6 @@ enclosing `enum` or `struct` type itself. Such recursion has restrictions:
37923790
An example of a *recursive* type and its use:
37933791

37943792
```
3795-
# use std::boxed::Box;
37963793
enum List<T> {
37973794
Nil,
37983795
Cons(T, Box<List<T>>)
@@ -3905,7 +3902,6 @@ implementation of `R`, and the pointer value of `E`.
39053902
An example of an object type:
39063903

39073904
```
3908-
# use std::boxed::Box;
39093905
trait Printable {
39103906
fn stringify(&self) -> String;
39113907
}
@@ -4113,7 +4109,6 @@ the type of a box is `std::owned::Box<T>`.
41134109
An example of a box type and value:
41144110

41154111
```
4116-
# use std::boxed::Box;
41174112
let x: Box<int> = Box::new(10);
41184113
```
41194114

@@ -4123,7 +4118,6 @@ copy of a box to move ownership of the value. After a value has been moved,
41234118
the source location cannot be used unless it is reinitialized.
41244119

41254120
```
4126-
# use std::boxed::Box;
41274121
let x: Box<int> = Box::new(10);
41284122
let y = x;
41294123
// attempting to use `x` will result in an error here

0 commit comments

Comments
 (0)