Skip to content

Commit a178591

Browse files
committed
---
yaml --- r: 211943 b: refs/heads/auto c: db2f9d2 h: refs/heads/master i: 211941: 6e9f1cb 211939: dc76fa0 211935: 0fc8f4d v: v3
1 parent 7417696 commit a178591

File tree

4 files changed

+57
-11
lines changed

4 files changed

+57
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 0b0c89efb37d1f7f6a72bf1a82a505cd1ca8b8eb
13+
refs/heads/auto: db2f9d2b6a2abe0288b7717cfdcd080bad7acba4
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/doc/trpl/hello-cargo.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ $ mv main.rs src/main.rs
3333
```
3434

3535
Note that since we're creating an executable, we used `main.rs`. If we
36-
want to make a library instead, we should use `lib.rs`. This convention is required
37-
for Cargo to successfully compile our projects, but it can be overridden if we wish.
36+
want to make a library instead, we should use `lib.rs`.
3837
Custom file locations for the entry point can be specified
3938
with a [`[[lib]]` or `[[bin]]`][crates-custom] key in the TOML file described below.
4039

@@ -63,17 +62,18 @@ version = "0.0.1"
6362
authors = [ "Your name <[email protected]>" ]
6463
```
6564

66-
This file is in the [TOML][toml] format. TOML is similar to INI, but has some
67-
extra goodies. According to the TOML docs,
65+
This file is in the [TOML][toml] format. Let’s let it explain itself to you:
6866

6967
> TOML aims to be a minimal configuration file format that's easy to read due
7068
> to obvious semantics. TOML is designed to map unambiguously to a hash table.
7169
> TOML should be easy to parse into data structures in a wide variety of
7270
> languages.
7371
72+
TOML is very similar to INI, but with some extra goodies.
73+
7474
[toml]: https://github.com/toml-lang/toml
7575

76-
Once you have this file in place, we should be ready to build! To do so, run:
76+
Once you have this file in place, we should be ready to build! Try this:
7777

7878
```bash
7979
$ cargo build
@@ -82,7 +82,7 @@ $ ./target/debug/hello_world
8282
Hello, world!
8383
```
8484

85-
Bam! We built our project with `cargo build`, and ran it with
85+
Bam! We build our project with `cargo build`, and run it with
8686
`./target/debug/hello_world`. We can do both in one step with `cargo run`:
8787

8888
```bash
@@ -103,9 +103,9 @@ Hello, world!
103103
```
104104

105105
This hasn’t bought us a whole lot over our simple use of `rustc`, but think
106-
about the future: when our project gets more complex, we need to do more
106+
about the future: when our project gets more complex, we would need to do more
107107
things to get all of the parts to properly compile. With Cargo, as our project
108-
grows, we can just run `cargo build`, and it’ll work the right way.
108+
grows, we can just `cargo build`, and it’ll work the right way.
109109

110110
When your project is finally ready for release, you can use
111111
`cargo build --release` to compile your project with optimizations.
@@ -118,7 +118,7 @@ name = "hello_world"
118118
version = "0.0.1"
119119
```
120120

121-
The `Cargo.lock` file is used by Cargo to keep track of dependencies in your application.
121+
This file is used by Cargo to keep track of dependencies in your application.
122122
Right now, we don’t have any, so it’s a bit sparse. You won't ever need
123123
to touch this file yourself, just let Cargo handle it.
124124

branches/auto/src/libcollections/str.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1466,7 +1466,6 @@ impl str {
14661466
/// assert_eq!("bors".as_bytes(), b"bors");
14671467
/// ```
14681468
#[stable(feature = "rust1", since = "1.0.0")]
1469-
#[inline(always)]
14701469
pub fn as_bytes(&self) -> &[u8] {
14711470
core_str::StrExt::as_bytes(&self[..])
14721471
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// pretty-expanded FIXME #23616
12+
13+
#![feature(collections)]
14+
15+
fn is_sync<T>(_: T) where T: Sync {}
16+
fn is_send<T>(_: T) where T: Send {}
17+
18+
macro_rules! all_sync_send {
19+
($ctor:expr, $($iter:ident),+) => ({
20+
$(
21+
let mut x = $ctor;
22+
is_sync(x.$iter());
23+
let mut y = $ctor;
24+
is_send(y.$iter());
25+
)+
26+
})
27+
}
28+
29+
fn main() {
30+
// for char.rs
31+
all_sync_send!("Я", escape_default, escape_unicode);
32+
33+
// for iter.rs
34+
// TODO
35+
36+
// for option.rs
37+
// TODO
38+
39+
// for result.rs
40+
// TODO
41+
42+
// for slice.rs
43+
// TODO
44+
45+
// for str/mod.rs
46+
// TODO
47+
}

0 commit comments

Comments
 (0)