Skip to content

Commit a8f109f

Browse files
committed
---
yaml --- r: 229245 b: refs/heads/try c: 8f3901f h: refs/heads/master i: 229243: fe28b3c v: v3
1 parent 20a8f15 commit a8f109f

File tree

5 files changed

+29
-7
lines changed

5 files changed

+29
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 38d627fe480c92e6123cff7c2f050b1943c89d64
4+
refs/heads/try: 8f3901feabf6c9072e533ae69b14b5761909f642
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/doc/reference.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1501,7 +1501,29 @@ have an implementation for `Shape`. Multiple supertraits are separated by `+`,
15011501
`trait Circle : Shape + PartialEq { }`. In an implementation of `Circle` for a
15021502
given type `T`, methods can refer to `Shape` methods, since the typechecker
15031503
checks that any type with an implementation of `Circle` also has an
1504-
implementation of `Shape`.
1504+
implementation of `Shape`:
1505+
1506+
```rust
1507+
struct Foo;
1508+
1509+
trait Shape { fn area(&self) -> f64; }
1510+
trait Circle : Shape { fn radius(&self) -> f64; }
1511+
# impl Shape for Foo {
1512+
# fn area(&self) -> f64 {
1513+
# 0.0
1514+
# }
1515+
# }
1516+
impl Circle for Foo {
1517+
fn radius(&self) -> f64 {
1518+
println!("calling area: {}", self.area());
1519+
1520+
0.0
1521+
}
1522+
}
1523+
1524+
let c = Foo;
1525+
c.radius();
1526+
```
15051527

15061528
In type-parameterized functions, methods of the supertrait may be called on
15071529
values of subtrait-bound type parameters. Referring to the previous example of

branches/try/src/libstd/fs.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,8 @@ pub fn rename<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<()>
855855
/// Note that if `from` and `to` both point to the same file, then the file
856856
/// will likely get truncated by this operation.
857857
///
858+
/// On success, the total number of bytes copied is returned.
859+
///
858860
/// # Errors
859861
///
860862
/// This function will return an error in the following situations, but is not

branches/try/src/libstd/rand/os.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,7 @@ mod imp {
205205
_dummy: (),
206206
}
207207

208-
// Fake definition; this is actually a struct, but we don't use the
209-
// contents here.
210-
type SecRandom = c_void;
208+
enum SecRandom {}
211209

212210
#[allow(non_upper_case_globals)]
213211
const kSecRandomDefault: *const SecRandom = 0 as *const SecRandom;

branches/try/src/libstd/rt/unwind/seh64_gnu.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ pub struct EXCEPTION_RECORD {
6060
ExceptionInformation: [ULONG_PTR; 15],
6161
}
6262

63-
pub type CONTEXT = c_void;
64-
pub type UNWIND_HISTORY_TABLE = c_void;
63+
pub enum CONTEXT {}
64+
pub enum UNWIND_HISTORY_TABLE {}
6565

6666
#[repr(C)]
6767
pub struct RUNTIME_FUNCTION {

0 commit comments

Comments
 (0)