Skip to content

Commit 09ad1a4

Browse files
committed
---
yaml --- r: 195060 b: refs/heads/beta c: e361b25 h: refs/heads/master v: v3
1 parent d1c1dd1 commit 09ad1a4

File tree

1,511 files changed

+7620
-7869
lines changed

Some content is hidden

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

1,511 files changed

+7620
-7869
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: 9754b06cd80cfcc523573535090519bec935fec3
34+
refs/heads/beta: e361b25c5e0ae2b49b1850499f0c19683c843fe6
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: be7f6ac7008f8ddf980ac07026b05bdd865f29cc

branches/beta/src/compiletest/compiletest.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
#![feature(box_syntax)]
1414
#![feature(collections)]
15-
#![feature(int_uint)]
1615
#![feature(old_io)]
1716
#![feature(old_path)]
1817
#![feature(rustc_private)]

branches/beta/src/compiletest/errors.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ use std::io::prelude::*;
1515
use std::path::Path;
1616

1717
pub struct ExpectedError {
18-
pub line: uint,
18+
pub line: usize,
1919
pub kind: String,
2020
pub msg: String,
2121
}
2222

2323
#[derive(PartialEq, Debug)]
24-
enum WhichLine { ThisLine, FollowPrevious(uint), AdjustBackward(uint) }
24+
enum WhichLine { ThisLine, FollowPrevious(usize), AdjustBackward(usize) }
2525

2626
/// Looks for either "//~| KIND MESSAGE" or "//~^^... KIND MESSAGE"
2727
/// The former is a "follow" that inherits its target from the preceding line;
@@ -58,8 +58,8 @@ pub fn load_errors(testfile: &Path) -> Vec<ExpectedError> {
5858
}).collect()
5959
}
6060

61-
fn parse_expected(last_nonfollow_error: Option<uint>,
62-
line_num: uint,
61+
fn parse_expected(last_nonfollow_error: Option<usize>,
62+
line_num: usize,
6363
line: &str) -> Option<(WhichLine, ExpectedError)> {
6464
let start = match line.find("//~") { Some(i) => i, None => return None };
6565
let (follow, adjusts) = if line.char_at(start + 3) == '|' {

branches/beta/src/compiletest/header.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ pub fn parse_name_value_directive(line: &str, directive: &str)
357357
}
358358
}
359359

360-
pub fn gdb_version_to_int(version_string: &str) -> int {
360+
pub fn gdb_version_to_int(version_string: &str) -> isize {
361361
let error_string = format!(
362362
"Encountered GDB version string with unexpected format: {}",
363363
version_string);
@@ -369,17 +369,17 @@ pub fn gdb_version_to_int(version_string: &str) -> int {
369369
panic!("{}", error_string);
370370
}
371371

372-
let major: int = components[0].parse().ok().expect(&error_string);
373-
let minor: int = components[1].parse().ok().expect(&error_string);
372+
let major: isize = components[0].parse().ok().expect(&error_string);
373+
let minor: isize = components[1].parse().ok().expect(&error_string);
374374

375375
return major * 1000 + minor;
376376
}
377377

378-
pub fn lldb_version_to_int(version_string: &str) -> int {
378+
pub fn lldb_version_to_int(version_string: &str) -> isize {
379379
let error_string = format!(
380380
"Encountered LLDB version string with unexpected format: {}",
381381
version_string);
382382
let error_string = error_string;
383-
let major: int = version_string.parse().ok().expect(&error_string);
383+
let major: isize = version_string.parse().ok().expect(&error_string);
384384
return major;
385385
}

branches/beta/src/compiletest/runtest.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
758758
struct DebuggerCommands {
759759
commands: Vec<String>,
760760
check_lines: Vec<String>,
761-
breakpoint_lines: Vec<uint>,
761+
breakpoint_lines: Vec<usize>,
762762
}
763763

764764
fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
@@ -1036,7 +1036,7 @@ fn is_compiler_error_or_warning(line: &str) -> bool {
10361036
scan_string(line, "warning", &mut i));
10371037
}
10381038

1039-
fn scan_until_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
1039+
fn scan_until_char(haystack: &str, needle: char, idx: &mut usize) -> bool {
10401040
if *idx >= haystack.len() {
10411041
return false;
10421042
}
@@ -1048,7 +1048,7 @@ fn scan_until_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
10481048
return true;
10491049
}
10501050

1051-
fn scan_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
1051+
fn scan_char(haystack: &str, needle: char, idx: &mut usize) -> bool {
10521052
if *idx >= haystack.len() {
10531053
return false;
10541054
}
@@ -1060,7 +1060,7 @@ fn scan_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
10601060
return true;
10611061
}
10621062

1063-
fn scan_integer(haystack: &str, idx: &mut uint) -> bool {
1063+
fn scan_integer(haystack: &str, idx: &mut usize) -> bool {
10641064
let mut i = *idx;
10651065
while i < haystack.len() {
10661066
let ch = haystack.char_at(i);
@@ -1076,7 +1076,7 @@ fn scan_integer(haystack: &str, idx: &mut uint) -> bool {
10761076
return true;
10771077
}
10781078

1079-
fn scan_string(haystack: &str, needle: &str, idx: &mut uint) -> bool {
1079+
fn scan_string(haystack: &str, needle: &str, idx: &mut usize) -> bool {
10801080
let mut haystack_i = *idx;
10811081
let mut needle_i = 0;
10821082
while needle_i < needle.len() {
@@ -1725,7 +1725,7 @@ fn disassemble_extract(config: &Config, _props: &TestProps,
17251725
}
17261726

17271727

1728-
fn count_extracted_lines(p: &Path) -> uint {
1728+
fn count_extracted_lines(p: &Path) -> usize {
17291729
let mut x = Vec::new();
17301730
File::open(&p.with_extension("ll")).unwrap().read_to_end(&mut x).unwrap();
17311731
let x = str::from_utf8(&x).unwrap();

branches/beta/src/compiletest/util.rs

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,34 @@ use common::Config;
1313

1414
/// Conversion table from triple OS name to Rust SYSNAME
1515
const OS_TABLE: &'static [(&'static str, &'static str)] = &[
16-
("mingw32", "windows"),
17-
("win32", "windows"),
18-
("windows", "windows"),
19-
("darwin", "macos"),
2016
("android", "android"),
21-
("linux", "linux"),
22-
("freebsd", "freebsd"),
23-
("dragonfly", "dragonfly"),
2417
("bitrig", "bitrig"),
18+
("darwin", "macos"),
19+
("dragonfly", "dragonfly"),
20+
("freebsd", "freebsd"),
21+
("ios", "ios"),
22+
("linux", "linux"),
23+
("mingw32", "windows"),
2524
("openbsd", "openbsd"),
25+
("win32", "windows"),
26+
("windows", "windows"),
2627
];
2728

2829
const ARCH_TABLE: &'static [(&'static str, &'static str)] = &[
29-
("i386", "x86"),
30-
("i686", "x86"),
30+
("aarch64", "aarch64"),
3131
("amd64", "x86_64"),
32-
("x86_64", "x86_64"),
33-
("sparc", "sparc"),
34-
("powerpc", "powerpc"),
35-
("arm64", "aarch64"),
3632
("arm", "arm"),
37-
("aarch64", "aarch64"),
33+
("arm64", "aarch64"),
34+
("hexagon", "hexagon"),
35+
("i386", "x86"),
36+
("i686", "x86"),
3837
("mips", "mips"),
39-
("xcore", "xcore"),
4038
("msp430", "msp430"),
41-
("hexagon", "hexagon"),
39+
("powerpc", "powerpc"),
4240
("s390x", "systemz"),
41+
("sparc", "sparc"),
42+
("x86_64", "x86_64"),
43+
("xcore", "xcore"),
4344
];
4445

4546
pub fn get_os(triple: &str) -> &'static str {

branches/beta/src/doc/reference.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2440,9 +2440,6 @@ The currently implemented features of the reference compiler are:
24402440
* `intrinsics` - Allows use of the "rust-intrinsics" ABI. Compiler intrinsics
24412441
are inherently unstable and no promise about them is made.
24422442

2443-
* `int_uint` - Allows the use of the `int` and `uint` types, which are deprecated.
2444-
Use `isize` and `usize` instead.
2445-
24462443
* `lang_items` - Allows use of the `#[lang]` attribute. Like `intrinsics`,
24472444
lang items are inherently unstable and no promise about them
24482445
is made.
@@ -2759,7 +2756,7 @@ The following are examples of structure expressions:
27592756
```
27602757
# struct Point { x: f64, y: f64 }
27612758
# struct TuplePoint(f64, f64);
2762-
# mod game { pub struct User<'a> { pub name: &'a str, pub age: u32, pub score: uint } }
2759+
# mod game { pub struct User<'a> { pub name: &'a str, pub age: u32, pub score: usize } }
27632760
# struct Cookie; fn some_fn<T>(t: T) {}
27642761
Point {x: 10.0, y: 20.0};
27652762
TuplePoint(10.0, 20.0);
@@ -3402,7 +3399,7 @@ subpattern`. For example:
34023399
#![feature(box_patterns)]
34033400
#![feature(box_syntax)]
34043401
3405-
enum List { Nil, Cons(uint, Box<List>) }
3402+
enum List { Nil, Cons(u32, Box<List>) }
34063403
34073404
fn is_sorted(list: &List) -> bool {
34083405
match *list {

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ navigate through the menu on the left.
1111
<h2 class="section-header"><a href="basic.html">Basics</a></h2>
1212

1313
This section is a linear introduction to the basic syntax and semantics of
14-
Rust. It has individual sections on each part of Rust's syntax, and culminates
15-
in a small project: a guessing game.
14+
Rust. It has individual sections on each part of Rust's syntax.
1615

1716
After reading "Basics," you will have a good foundation to learn more about
1817
Rust, and can write very simple programs.
@@ -29,7 +28,12 @@ and will be able to understand most Rust code and write more complex programs.
2928

3029
In a similar fashion to "Intermediate," this section is full of individual,
3130
deep-dive chapters, which stand alone and can be read in any order. These
32-
chapters focus on the most complex features, as well as some things that
33-
are only available in upcoming versions of Rust.
31+
chapters focus on the most complex features,
3432

35-
After reading "Advanced," you'll be a Rust expert!
33+
<h2 class="section-header"><a href="unstable.html">Unstable</a></h2>
34+
35+
In a similar fashion to "Intermediate," this section is full of individual,
36+
deep-dive chapters, which stand alone and can be read in any order.
37+
38+
This chapter contains things that are only available on the nightly channel of
39+
Rust.

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@
3636
* [FFI](ffi.md)
3737
* [Unsafe Code](unsafe.md)
3838
* [Advanced Macros](advanced-macros.md)
39+
* [Unstable Rust](unstable.md)
3940
* [Compiler Plugins](plugins.md)
41+
* [Inline Assembly](inline-assembly.md)
42+
* [No stdlib](no-stdlib.md)
43+
* [Intrinsics](intrinsics.md)
44+
* [Lang items](lang-items.md)
45+
* [Link args](link-args.md)
4046
* [Conclusion](conclusion.md)
4147
* [Glossary](glossary.md)

branches/beta/src/doc/trpl/advanced-macros.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,6 @@ the [Bitwise Cyclic Tag](http://esolangs.org/wiki/Bitwise_Cyclic_Tag) automaton
206206
within Rust's macro system.
207207

208208
```rust
209-
#![feature(trace_macros)]
210-
211209
macro_rules! bct {
212210
// cmd 0: d ... => ...
213211
(0, $($ps:tt),* ; $_d:tt)
@@ -229,13 +227,6 @@ macro_rules! bct {
229227
( $($ps:tt),* ; )
230228
=> (());
231229
}
232-
233-
fn main() {
234-
trace_macros!(true);
235-
# /* just check the definition
236-
bct!(0, 0, 1, 1, 1 ; 1, 0, 1);
237-
# */
238-
}
239230
```
240231

241232
Exercise: use macros to reduce duplication in the above definition of the

branches/beta/src/doc/trpl/arrays-vectors-and-slices.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,5 @@ You can also take a slice of a vector, `String`, or `&str`, because they are
9999
backed by arrays. Slices have type `&[T]`, which we'll talk about when we cover
100100
generics.
101101

102-
We have now learned all of the most basic Rust concepts. We're ready to start
103-
building ourselves a guessing game, we just need to know one last thing: how to
104-
get input from the keyboard. You can't have a guessing game without the ability
105-
to guess!
102+
We have now learned all of the most basic Rust concepts. Next, we learn how to
103+
get input from the keyboard.

branches/beta/src/doc/trpl/basic.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
% Basics
22

33
This section is a linear introduction to the basic syntax and semantics of
4-
Rust. It has individual sections on each part of Rust's syntax, and cumulates
5-
in a small project: a guessing game.
4+
Rust. It has individual sections on each part of Rust's syntax.
65

76
After reading "Basics," you will have a good foundation to learn more about
87
Rust, and can write very simple programs.

branches/beta/src/doc/trpl/compound-data-types.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,5 +361,4 @@ and brittle `if`/`else`s.
361361

362362
[arity]: ./glossary.html#arity
363363
[match]: ./match.html
364-
[game]: ./guessing-game.html#comparing-guesses
365364
[generics]: ./generics.html

branches/beta/src/doc/trpl/documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ Here’s an example of documenting a macro:
352352
/// # }
353353
/// ```
354354
///
355-
/// ```should_fail
355+
/// ```should_panic
356356
/// # #[macro_use] extern crate foo;
357357
/// # fn main() {
358358
/// panic_unless!(true == false, “I’m broken.”);

branches/beta/src/doc/trpl/ffi.md

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -366,31 +366,6 @@ A few examples of how this model can be used are:
366366
367367
On OSX, frameworks behave with the same semantics as a dynamic library.
368368
369-
## The `link_args` attribute
370-
371-
There is one other way to tell rustc how to customize linking, and that is via
372-
the `link_args` attribute. This attribute is applied to `extern` blocks and
373-
specifies raw flags which need to get passed to the linker when producing an
374-
artifact. An example usage would be:
375-
376-
``` no_run
377-
#![feature(link_args)]
378-
379-
#[link_args = "-foo -bar -baz"]
380-
extern {}
381-
# fn main() {}
382-
```
383-
384-
Note that this feature is currently hidden behind the `feature(link_args)` gate
385-
because this is not a sanctioned way of performing linking. Right now rustc
386-
shells out to the system linker, so it makes sense to provide extra command line
387-
arguments, but this will not always be the case. In the future rustc may use
388-
LLVM directly to link native libraries in which case `link_args` will have no
389-
meaning.
390-
391-
It is highly recommended to *not* use this attribute, and rather use the more
392-
formal `#[link(...)]` attribute on `extern` blocks instead.
393-
394369
# Unsafe blocks
395370
396371
Some operations, like dereferencing unsafe pointers or calling functions that have been marked
@@ -401,7 +376,7 @@ Unsafe functions, on the other hand, advertise it to the world. An unsafe functi
401376
this:
402377
403378
```
404-
unsafe fn kaboom(ptr: *const int) -> int { *ptr }
379+
unsafe fn kaboom(ptr: *const i32) -> i32 { *ptr }
405380
```
406381
407382
This function can only be called from an `unsafe` block or another `unsafe` function.
@@ -423,7 +398,7 @@ extern {
423398
424399
fn main() {
425400
println!("You have readline version {} installed.",
426-
rl_readline_version as int);
401+
rl_readline_version as i32);
427402
}
428403
```
429404

0 commit comments

Comments
 (0)