Skip to content

Commit a1eb3e1

Browse files
committed
---
yaml --- r: 210775 b: refs/heads/try c: e5efea4 h: refs/heads/master i: 210773: 6e0a686 210771: c548fce 210767: 34491c2 v: v3
1 parent bd95e9f commit a1eb3e1

File tree

204 files changed

+1937
-4580
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+1937
-4580
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3e561f05c00cd180ec02db4ccab2840a4aba93d2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
5-
refs/heads/try: dd4dad8c860363077a3d53af025a0c029a613320
5+
refs/heads/try: e5efea4eb3a75db539fd267ae2574278ec6838bd
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/AUTHORS.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,6 @@ Rob Hoelz <[email protected]>
736736
Robert Buonpastore <[email protected]>
737737
Robert Clipsham <[email protected]>
738738
Robert Gawdzik <[email protected]>
739-
Robert Foss <[email protected]>
740739
Robert Irelan <[email protected]>
741740
Robert Knight <[email protected]>
742741
Robert Millar <[email protected]>

branches/try/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,9 @@ fetch snapshots, and an OS that can execute the available snapshot binaries.
8787

8888
Snapshot binaries are currently built and tested on several platforms:
8989

90-
| Platform \ Architecture | x86 | x86_64 |
91-
|--------------------------------|-----|--------|
92-
| Windows (7, 8, Server 2008 R2) |||
93-
| Linux (2.6.18 or later) |||
94-
| OSX (10.7 Lion or later) |||
90+
* Windows (7, 8, Server 2008 R2), x86 and x86-64 (64-bit support added in Rust 0.12.0)
91+
* Linux (2.6.18 or later, various distributions), x86 and x86-64
92+
* OSX 10.7 (Lion) or greater, x86 and x86-64
9593

9694
You may find that other platforms work, but these are our officially
9795
supported build environments that are most likely to work.

branches/try/configure

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ probe() {
106106
T=$(command -v $P 2>&1)
107107
if [ $? -eq 0 ]
108108
then
109-
VER0=$($P --version 2>/dev/null \
110-
| grep -o '[vV]\?[0-9][0-9.][a-z0-9.-]*' | head -1 )
109+
VER0=$($P --version 2>/dev/null | head -1 \
110+
| sed -e 's/[^0-9]*\([vV]\?[0-9.]\+[^ ]*\).*/\1/' )
111111
if [ $? -eq 0 -a "x${VER0}" != "x" ]
112112
then
113113
VER="($VER0)"
@@ -711,20 +711,6 @@ else
711711
probe_need CFG_GIT git
712712
fi
713713

714-
# Use `md5sum` on GNU platforms, or `md5 -q` on BSD
715-
probe CFG_MD5 md5
716-
probe CFG_MD5SUM md5sum
717-
if [ -n "$CFG_MD5" ]
718-
then
719-
CFG_HASH_COMMAND="$CFG_MD5 -q | head -c 8"
720-
elif [ -n "$CFG_MD5SUM" ]
721-
then
722-
CFG_HASH_COMMAND="$CFG_MD5SUM | head -c 8"
723-
else
724-
err 'could not find one of: md5 md5sum'
725-
fi
726-
putvar CFG_HASH_COMMAND
727-
728714
probe CFG_CLANG clang++
729715
probe CFG_CCACHE ccache
730716
probe CFG_GCC gcc

branches/try/mk/main.mk

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ CFG_RELEASE_NUM=1.1.0
2020
# versions (section 9)
2121
CFG_PRERELEASE_VERSION=.1
2222

23-
# Append a version-dependent hash to each library, so we can install different
24-
# versions in the same place
25-
CFG_FILENAME_EXTRA=$(shell printf '%s' $(CFG_RELEASE) | $(CFG_HASH_COMMAND))
23+
CFG_FILENAME_EXTRA=4e7c5e5c
2624

2725
ifeq ($(CFG_RELEASE_CHANNEL),stable)
2826
# This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly"

branches/try/src/doc/reference.md

Lines changed: 7 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,8 +1346,6 @@ vtable when the trait is used as a [trait object](#trait-objects).
13461346
Traits are implemented for specific types through separate
13471347
[implementations](#implementations).
13481348

1349-
Consider the following trait:
1350-
13511349
```
13521350
# type Surface = i32;
13531351
# type BoundingBox = i32;
@@ -1362,20 +1360,6 @@ This defines a trait with two methods. All values that have
13621360
`draw` and `bounding_box` methods called, using `value.bounding_box()`
13631361
[syntax](#method-call-expressions).
13641362

1365-
Traits can include default implementations of methods, as in:
1366-
1367-
```
1368-
trait Foo {
1369-
fn bar(&self);
1370-
1371-
fn baz(&self) { println!("We called baz."); }
1372-
}
1373-
```
1374-
1375-
Here the `baz` method has a default implementation, so types that implement
1376-
`Foo` need only implement `bar`. It is also possible for implementing types
1377-
to override a method that has a default implementation.
1378-
13791363
Type parameters can be specified for a trait to make it generic. These appear
13801364
after the trait name, using the same syntax used in [generic
13811365
functions](#generic-functions).
@@ -1388,35 +1372,6 @@ trait Seq<T> {
13881372
}
13891373
```
13901374

1391-
It is also possible to define associated types for a trait. Consider the
1392-
following example of a `Container` trait. Notice how the type is available
1393-
for use in the method signatures:
1394-
1395-
```
1396-
trait Container {
1397-
type E;
1398-
fn empty() -> Self;
1399-
fn insert(&mut self, Self::E);
1400-
}
1401-
```
1402-
1403-
In order for a type to implement this trait, it must not only provide
1404-
implementations for every method, but it must specify the type `E`. Here's
1405-
an implementation of `Container` for the standard library type `Vec`:
1406-
1407-
```
1408-
# trait Container {
1409-
# type E;
1410-
# fn empty() -> Self;
1411-
# fn insert(&mut self, Self::E);
1412-
# }
1413-
impl<T> Container for Vec<T> {
1414-
type E = T;
1415-
fn empty() -> Vec<T> { Vec::new() }
1416-
fn insert(&mut self, x: T) { self.push(x); }
1417-
}
1418-
```
1419-
14201375
Generic functions may use traits as _bounds_ on their type parameters. This
14211376
will have two effects: only types that have the trait may instantiate the
14221377
parameter, and within the generic function, the methods of the trait can be
@@ -3515,21 +3470,13 @@ more of the closure traits:
35153470

35163471
### Trait objects
35173472

3518-
In Rust, a type like `&SomeTrait` or `Box<SomeTrait>` is called a _trait object_.
3519-
Each instance of a trait object includes:
3520-
3521-
- a pointer to an instance of a type `T` that implements `SomeTrait`
3522-
- a _virtual method table_, often just called a _vtable_, which contains, for
3523-
each method of `SomeTrait` that `T` implements, a pointer to `T`'s
3524-
implementation (i.e. a function pointer).
3525-
3526-
The purpose of trait objects is to permit "late binding" of methods. A call to
3527-
a method on a trait object is only resolved to a vtable entry at compile time.
3528-
The actual implementation for each vtable entry can vary on an object-by-object
3529-
basis.
3530-
3531-
Note that for a trait object to be instantiated, the trait must be
3532-
_object-safe_. Object safety rules are defined in [RFC 255][rfc255].
3473+
Every trait item (see [traits](#traits)) defines a type with the same name as
3474+
the trait. This type is called the _trait object_ of the trait. Trait objects
3475+
permit "late binding" of methods, dispatched using _virtual method tables_
3476+
("vtables"). Whereas most calls to trait methods are "early bound" (statically
3477+
resolved) to specific implementations at compile time, a call to a method on an
3478+
trait objects is only resolved to a vtable entry at compile time. The actual
3479+
implementation for each vtable entry can vary on an object-by-object basis.
35333480

35343481
Given a pointer-typed expression `E` of type `&T` or `Box<T>`, where `T`
35353482
implements trait `R`, casting `E` to the corresponding pointer type `&R` or

branches/try/src/doc/trpl/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ data, we call the `clone()` method. In this example, `y` is no longer a referenc
175175
to the vector stored in `x`, but a copy of its first element, `"Hello"`. Now
176176
that we don’t have a reference, our `push()` works just fine.
177177

178-
[move]: ownership.html#move-semantics
178+
[move]: move-semantics.html
179179

180180
If we truly want a reference, we need the other option: ensure that our reference
181181
goes out of scope before we try to do the mutation. That looks like this:

branches/try/src/doc/trpl/SUMMARY.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
* [Hello, Cargo!](hello-cargo.md)
77
* [Learn Rust](learn-rust.md)
88
* [Guessing Game](guessing-game.md)
9-
* [Dining Philosophers](dining-philosophers.md)
10-
* [Rust inside other languages](rust-inside-other-languages.md)
119
* [Effective Rust](effective-rust.md)
1210
* [The Stack and the Heap](the-stack-and-the-heap.md)
1311
* [Testing](testing.md)
@@ -18,7 +16,6 @@
1816
* [Error Handling](error-handling.md)
1917
* [FFI](ffi.md)
2018
* [Borrow and AsRef](borrow-and-asref.md)
21-
* [Release Channels](release-channels.md)
2219
* [Syntax and Semantics](syntax-and-semantics.md)
2320
* [Variable Bindings](variable-bindings.md)
2421
* [Functions](functions.md)
@@ -31,9 +28,9 @@
3128
* [References and Borrowing](references-and-borrowing.md)
3229
* [Lifetimes](lifetimes.md)
3330
* [Mutability](mutability.md)
34-
* [Structs](structs.md)
3531
* [Enums](enums.md)
3632
* [Match](match.md)
33+
* [Structs](structs.md)
3734
* [Patterns](patterns.md)
3835
* [Method Syntax](method-syntax.md)
3936
* [Vectors](vectors.md)
@@ -47,6 +44,7 @@
4744
* [Universal Function Call Syntax](ufcs.md)
4845
* [Crates and Modules](crates-and-modules.md)
4946
* [`const` and `static`](const-and-static.md)
47+
* [Tuple Structs](tuple-structs.md)
5048
* [Attributes](attributes.md)
5149
* [`type` aliases](type-aliases.md)
5250
* [Casting between types](casting-between-types.md)

0 commit comments

Comments
 (0)