Skip to content

Commit 0729e82

Browse files
author
Alfie John
committed
---
yaml --- r: 174546 b: refs/heads/tmp c: 66003c0 h: refs/heads/master v: v3
1 parent 6696d7f commit 0729e82

File tree

157 files changed

+1081
-2141
lines changed

Some content is hidden

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

157 files changed

+1081
-2141
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 44a287e6eb22ec3c2a687fc156813577464017f7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: 9db869b348689797f3e1022b0b7d85f2067ee424
37+
refs/heads/tmp: 66003c06a19836f049996a629e8db4b6a118d5fa

branches/tmp/mk/tests.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,8 +1011,7 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
10111011
$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3)) \
10121012
"$$(LD_LIBRARY_PATH_ENV_HOSTDIR$(1)_T_$(2)_H_$(3))" \
10131013
"$$(LD_LIBRARY_PATH_ENV_TARGETDIR$(1)_T_$(2)_H_$(3))" \
1014-
$(1) \
1015-
$$(S)
1014+
$(1)
10161015
@touch $$@
10171016
else
10181017
# FIXME #11094 - The above rule doesn't work right for multiple targets

branches/tmp/src/doc/guide-crates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
% The (old) Rust Crates and Modules Guide
22

3-
This content has moved into
3+
This content has moved into the
44
[the Rust Programming Language book](book/crates-and-modules.html).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
% Error Handling in Rust
22

3-
This content has moved into
3+
This content has moved into the
44
[the Rust Programming Language book](book/error-handling.html).

branches/tmp/src/doc/guide-ffi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
% The (old) Rust Foreign Function Interface Guide
22

3-
This content has moved into
3+
This content has moved into the
44
[the Rust Programming Language book](book/ffi.html).

branches/tmp/src/doc/guide-macros.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
% The (old) Rust Macros Guide
22

3-
This content has moved into
3+
This content has moved into the
44
[the Rust Programming Language book](book/macros.html).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
% The (old) Rust Ownership Guide
22

3-
This content has moved into
3+
This content has moved into the
44
[the Rust Programming Language book](book/ownership.html).

branches/tmp/src/doc/guide-plugins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
% The (old) Rust Compiler Plugins Guide
22

3-
This content has moved into
3+
This content has moved into the
44
[the Rust Programming Language book](book/plugins.html).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
% The (old) Rust Pointer Guide
22

3-
This content has moved into
3+
This content has moved into the
44
[the Rust Programming Language book](book/pointers.html).

branches/tmp/src/doc/guide-strings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
% The (old) Guide to Rust Strings
22

3-
This content has moved into
3+
This content has moved into the
44
[the Rust Programming Language book](book/strings.html).

branches/tmp/src/doc/guide-tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
% The (old) Rust Threads and Communication Guide
22

3-
This content has moved into
3+
This content has moved into the
44
[the Rust Programming Language book](book/tasks.html).

branches/tmp/src/doc/guide-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
% The (old) Rust Testing Guide
22

3-
This content has moved into
3+
This content has moved into the
44
[the Rust Programming Language book](book/testing.html).

branches/tmp/src/doc/guide-unsafe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
% Writing Safe Low-level and Unsafe Code in Rust
22

3-
This content has moved into
3+
This content has moved into the
44
[the Rust Programming Language book](book/unsafe.html).

branches/tmp/src/doc/guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
% The (old) Rust Guide
22

3-
This content has moved into
3+
This content has moved into the
44
[the Rust Programming Language book](book/README.html).

branches/tmp/src/doc/reference.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -257,18 +257,18 @@ cases mentioned in [Number literals](#number-literals) below.
257257

258258
| [Number literals](#number-literals)`*` | Example | Exponentiation | Suffixes |
259259
|----------------------------------------|---------|----------------|----------|
260-
| Decimal integer | `98_222i` | `N/A` | Integer suffixes |
261-
| Hex integer | `0xffi` | `N/A` | Integer suffixes |
262-
| Octal integer | `0o77i` | `N/A` | Integer suffixes |
263-
| Binary integer | `0b1111_0000i` | `N/A` | Integer suffixes |
260+
| Decimal integer | `98_222is` | `N/A` | Integer suffixes |
261+
| Hex integer | `0xffis` | `N/A` | Integer suffixes |
262+
| Octal integer | `0o77is` | `N/A` | Integer suffixes |
263+
| Binary integer | `0b1111_0000is` | `N/A` | Integer suffixes |
264264
| Floating-point | `123.0E+77f64` | `Optional` | Floating-point suffixes |
265265

266266
`*` All number literals allow `_` as a visual separator: `1_234.0E+18f64`
267267

268268
##### Suffixes
269269
| Integer | Floating-point |
270270
|---------|----------------|
271-
| `i` (`int`), `u` (`uint`), `u8`, `i8`, `u16`, `i16`, `u32`, `i32`, `u64`, `i64` | `f32`, `f64` |
271+
| `is` (`isize`), `us` (`usize`), `u8`, `i8`, `u16`, `i16`, `u32`, `i32`, `u64`, `i64` | `f32`, `f64` |
272272

273273
#### Character and string literals
274274

@@ -468,7 +468,7 @@ Like any literal, an integer literal may be followed (immediately,
468468
without any spaces) by an _integer suffix_, which forcibly sets the
469469
type of the literal. There are 10 valid values for an integer suffix:
470470

471-
* The `i` and `u` suffixes give the literal type `int` or `uint`,
471+
* The `is` and `us` suffixes give the literal type `isize` or `usize`,
472472
respectively.
473473
* Each of the signed and unsigned machine types `u8`, `i8`,
474474
`u16`, `i16`, `u32`, `i32`, `u64` and `i64`
@@ -483,9 +483,9 @@ context overconstrains the type, it is also considered a static type error.
483483
Examples of integer literals of various forms:
484484

485485
```
486-
123i; // type int
487-
123u; // type uint
488-
123_u; // type uint
486+
123is; // type isize
487+
123us; // type usize
488+
123_us // type usize
489489
0xff_u8; // type u8
490490
0o70_i16; // type i16
491491
0b1111_1111_1001_0000_i32; // type i32
@@ -1002,11 +1002,11 @@ use std::option::Option::{Some, None};
10021002
use std::collections::hash_map::{mod, HashMap};
10031003
10041004
fn foo<T>(_: T){}
1005-
fn bar(map1: HashMap<String, uint>, map2: hash_map::HashMap<String, uint>){}
1005+
fn bar(map1: HashMap<String, usize>, map2: hash_map::HashMap<String, usize>){}
10061006
10071007
fn main() {
1008-
// Equivalent to 'std::iter::range_step(0u, 10u, 2u);'
1009-
range_step(0u, 10u, 2u);
1008+
// Equivalent to 'std::iter::range_step(0us, 10, 2);'
1009+
range_step(0us, 10, 2);
10101010
10111011
// Equivalent to 'foo(vec![std::option::Option::Some(1.0f64),
10121012
// std::option::Option::None]);'
@@ -1611,7 +1611,7 @@ trait is in scope) to pointers to the trait name, used as a type.
16111611
```
16121612
# trait Shape { }
16131613
# impl Shape for int { }
1614-
# let mycircle = 0i;
1614+
# let mycircle = 0is;
16151615
let myshape: Box<Shape> = Box::new(mycircle) as Box<Shape>;
16161616
```
16171617

@@ -2451,7 +2451,7 @@ There are three different types of inline attributes:
24512451
* `#[inline(always)]` asks the compiler to always perform an inline expansion.
24522452
* `#[inline(never)]` asks the compiler to never perform an inline expansion.
24532453

2454-
### `derive`
2454+
### Derive
24552455

24562456
The `derive` attribute allows certain traits to be automatically implemented
24572457
for data structures. For example, the following will create an `impl` for the
@@ -2821,7 +2821,7 @@ parentheses. They are used to create [tuple-typed](#tuple-types) values.
28212821
```{.tuple}
28222822
(0,);
28232823
(0.0, 4.5);
2824-
("a", 4u, true);
2824+
("a", 4us, true);
28252825
```
28262826

28272827
### Unit expressions
@@ -2958,9 +2958,9 @@ constant expression that can be evaluated at compile time, such as a
29582958
[literal](#literals) or a [static item](#static-items).
29592959

29602960
```
2961-
[1i, 2, 3, 4];
2961+
[1is, 2, 3, 4];
29622962
["a", "b", "c", "d"];
2963-
[0i; 128]; // array with 128 zeros
2963+
[0is; 128]; // array with 128 zeros
29642964
[0u8, 0u8, 0u8, 0u8];
29652965
```
29662966

@@ -3133,7 +3133,7 @@ moves](#moved-and-copied-types) its right-hand operand to its left-hand
31333133
operand.
31343134

31353135
```
3136-
# let mut x = 0i;
3136+
# let mut x = 0is;
31373137
# let y = 0;
31383138
31393139
x = y;
@@ -3270,7 +3270,7 @@ conditional expression evaluates to `false`, the `while` expression completes.
32703270
An example:
32713271

32723272
```
3273-
let mut i = 0u;
3273+
let mut i = 0us;
32743274
32753275
while i < 10 {
32763276
println!("hello");
@@ -3349,8 +3349,8 @@ for e in v.iter() {
33493349
An example of a for loop over a series of integers:
33503350

33513351
```
3352-
# fn bar(b:uint) { }
3353-
for i in range(0u, 256) {
3352+
# fn bar(b:usize) { }
3353+
for i in range(0us, 256) {
33543354
bar(i);
33553355
}
33563356
```
@@ -3520,11 +3520,11 @@ fn main() {
35203520
```
35213521

35223522
Patterns can also dereference pointers by using the `&`, `&mut` and `box`
3523-
symbols, as appropriate. For example, these two matches on `x: &int` are
3523+
symbols, as appropriate. For example, these two matches on `x: &isize` are
35243524
equivalent:
35253525

35263526
```
3527-
# let x = &3i;
3527+
# let x = &3is;
35283528
let y = match *x { 0 => "zero", _ => "some" };
35293529
let z = match x { &0 => "zero", _ => "some" };
35303530
@@ -3545,7 +3545,7 @@ Multiple match patterns may be joined with the `|` operator. A range of values
35453545
may be specified with `...`. For example:
35463546

35473547
```
3548-
# let x = 2i;
3548+
# let x = 2is;
35493549
35503550
let message = match x {
35513551
0 | 1 => "not many",
@@ -3886,16 +3886,16 @@ The type of a closure mapping an input of type `A` to an output of type `B` is
38863886
An example of creating and calling a closure:
38873887

38883888
```rust
3889-
let captured_var = 10i;
3889+
let captured_var = 10is;
38903890

38913891
let closure_no_args = |&:| println!("captured_var={}", captured_var);
38923892

3893-
let closure_args = |&: arg: int| -> int {
3893+
let closure_args = |&: arg: isize| -> isize {
38943894
println!("captured_var={}, arg={}", captured_var, arg);
38953895
arg // Note lack of semicolon after 'arg'
38963896
};
38973897

3898-
fn call_closure<F: Fn(), G: Fn(int) -> int>(c1: F, c2: G) {
3898+
fn call_closure<F: Fn(), G: Fn(isize) -> isize>(c1: F, c2: G) {
38993899
c1();
39003900
c2(2);
39013901
}
@@ -3927,7 +3927,7 @@ trait Printable {
39273927
fn stringify(&self) -> String;
39283928
}
39293929
3930-
impl Printable for int {
3930+
impl Printable for isize {
39313931
fn stringify(&self) -> String { self.to_string() }
39323932
}
39333933
@@ -3936,7 +3936,7 @@ fn print(a: Box<Printable>) {
39363936
}
39373937
39383938
fn main() {
3939-
print(Box::new(10i) as Box<Printable>);
3939+
print(Box::new(10is) as Box<Printable>);
39403940
}
39413941
```
39423942

branches/tmp/src/doc/trpl/unsafe.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ in the same format as C:
447447

448448
```
449449
#![no_std]
450-
#![feature(lang_items, start)]
450+
#![feature(lang_items)]
451451
452452
// Pull in the system libc library for what crt0.o likely requires
453453
extern crate libc;
@@ -475,7 +475,7 @@ compiler's name mangling too:
475475
```ignore
476476
#![no_std]
477477
#![no_main]
478-
#![feature(lang_items, start)]
478+
#![feature(lang_items)]
479479
480480
extern crate libc;
481481
@@ -529,7 +529,7 @@ vectors provided from C, using idiomatic Rust practices.
529529

530530
```
531531
#![no_std]
532-
#![feature(lang_items, start)]
532+
#![feature(lang_items)]
533533
534534
# extern crate libc;
535535
extern crate core;
@@ -653,7 +653,7 @@ sugar for dynamic allocations via `malloc` and `free`:
653653

654654
```
655655
#![no_std]
656-
#![feature(lang_items, box_syntax, start)]
656+
#![feature(lang_items, box_syntax)]
657657
658658
extern crate libc;
659659

branches/tmp/src/etc/generate-deriving-span-tests.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
"""
1414
This script creates a pile of compile-fail tests check that all the
15-
derives have spans that point to the fields, rather than the
16-
#[derive(...)] line.
15+
derivings have spans that point to the fields, rather than the
16+
#[deriving(...)] line.
1717
1818
sample usage: src/etc/generate-deriving-span-tests.py
1919
"""
@@ -46,29 +46,29 @@
4646
"""
4747

4848
ENUM_STRING = """
49-
#[derive({traits})]
49+
#[deriving({traits})]
5050
enum Enum {{
5151
A(
5252
Error {errors}
5353
)
5454
}}
5555
"""
5656
ENUM_STRUCT_VARIANT_STRING = """
57-
#[derive({traits})]
57+
#[deriving({traits})]
5858
enum Enum {{
5959
A {{
6060
x: Error {errors}
6161
}}
6262
}}
6363
"""
6464
STRUCT_STRING = """
65-
#[derive({traits})]
65+
#[deriving({traits})]
6666
struct Struct {{
6767
x: Error {errors}
6868
}}
6969
"""
7070
STRUCT_TUPLE_STRING = """
71-
#[derive({traits})]
71+
#[deriving({traits})]
7272
struct Struct(
7373
Error {errors}
7474
);
@@ -80,14 +80,14 @@ def create_test_case(type, trait, super_traits, number_of_errors):
8080
string = [ENUM_STRING, ENUM_STRUCT_VARIANT_STRING, STRUCT_STRING, STRUCT_TUPLE_STRING][type]
8181
all_traits = ','.join([trait] + super_traits)
8282
super_traits = ','.join(super_traits)
83-
error_deriving = '#[derive(%s)]' % super_traits if super_traits else ''
83+
error_deriving = '#[deriving(%s)]' % super_traits if super_traits else ''
8484

8585
errors = '\n'.join('//~%s ERROR' % ('^' * n) for n in range(error_count))
8686
code = string.format(traits = all_traits, errors = errors)
8787
return TEMPLATE.format(year = YEAR, error_deriving=error_deriving, code = code)
8888

8989
def write_file(name, string):
90-
test_file = os.path.join(TEST_DIR, 'derives-span-%s.rs' % name)
90+
test_file = os.path.join(TEST_DIR, 'deriving-span-%s.rs' % name)
9191

9292
# set write permission if file exists, so it can be changed
9393
if os.path.exists(test_file):

0 commit comments

Comments
 (0)