Skip to content

Commit 9cd2735

Browse files
committed
---
yaml --- r: 212468 b: refs/heads/master c: c85f307 h: refs/heads/master v: v3
1 parent 75ce0a7 commit 9cd2735

File tree

25 files changed

+434
-231
lines changed

25 files changed

+434
-231
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 5b2edcdd6ee87b09e42422dedfed9a0828ae412e
2+
refs/heads/master: c85f30736913cf42549d8e0fd40049b346b4cec4
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
55
refs/heads/try: 1864973ae17213c5a58c4dd3f9af6d1b6c7d2e05

trunk/src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1550,7 +1550,7 @@ methods in such an implementation can only be used as direct calls on the
15501550
values of the type that the implementation targets. In such an implementation,
15511551
the trait type and `for` after `impl` are omitted. Such implementations are
15521552
limited to nominal types (enums, structs), and the implementation must appear
1553-
in the same module or a sub-module as the `self` type:
1553+
in the same crate as the `self` type:
15541554

15551555
```
15561556
struct Point {x: i32, y: i32}

trunk/src/libcollections/borrow.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use core::ops::Deref;
2121
use core::option::Option;
2222

2323
use fmt;
24-
use alloc::{rc, arc};
24+
use alloc::{boxed, rc, arc};
2525

2626
use self::Cow::*;
2727

@@ -116,6 +116,14 @@ impl<'a, T: ?Sized> BorrowMut<T> for &'a mut T {
116116
fn borrow_mut(&mut self) -> &mut T { &mut **self }
117117
}
118118

119+
impl<T: ?Sized> Borrow<T> for boxed::Box<T> {
120+
fn borrow(&self) -> &T { &**self }
121+
}
122+
123+
impl<T: ?Sized> BorrowMut<T> for boxed::Box<T> {
124+
fn borrow_mut(&mut self) -> &mut T { &mut **self }
125+
}
126+
119127
impl<T: ?Sized> Borrow<T> for rc::Rc<T> {
120128
fn borrow(&self) -> &T { &**self }
121129
}

0 commit comments

Comments
 (0)