Skip to content

Commit 5071770

Browse files
committed
---
yaml --- r: 227501 b: refs/heads/try c: 8937ec1 h: refs/heads/master i: 227499: fbb3e4e v: v3
1 parent a3b2cce commit 5071770

File tree

248 files changed

+953
-12583
lines changed

Some content is hidden

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

248 files changed

+953
-12583
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: ebbd90d28f148ec29004c340eeb05e0aa989f9a5
4+
refs/heads/try: 8937ec10041e7cb9edaeb87f0d5a721a8be6c8df
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/configure

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,7 @@ fi
521521
DEFAULT_BUILD="${CFG_CPUTYPE}-${CFG_OSTYPE}"
522522

523523
CFG_SRC_DIR="$(abs_path $(dirname $0))/"
524+
CFG_SRC_DIR_RELATIVE="$(dirname $0)/"
524525
CFG_BUILD_DIR="$(pwd)/"
525526
CFG_SELF="$0"
526527
CFG_CONFIGURE_ARGS="$@"
@@ -1558,6 +1559,7 @@ done
15581559
step_msg "writing configuration"
15591560

15601561
putvar CFG_SRC_DIR
1562+
putvar CFG_SRC_DIR_RELATIVE
15611563
putvar CFG_BUILD_DIR
15621564
putvar CFG_OSTYPE
15631565
putvar CFG_CPUTYPE

branches/try/mk/cfg/x86_64-unknown-linux-musl.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ CC_x86_64-unknown-linux-musl=$(CFG_MUSL_ROOT)/bin/musl-gcc
33
CXX_x86_64-unknown-linux-musl=notaprogram
44
CPP_x86_64-unknown-linux-musl=$(CFG_MUSL_ROOT)/bin/musl-gcc -E
55
AR_x86_64-unknown-linux-musl=$(AR)
6+
CFG_INSTALL_ONLY_RLIB_x86_64-unknown-linux-musl = 1
67
CFG_LIB_NAME_x86_64-unknown-linux-musl=lib$(1).so
78
CFG_STATIC_LIB_NAME_x86_64-unknown-linux-musl=lib$(1).a
89
CFG_LIB_GLOB_x86_64-unknown-linux-musl=lib$(1)-*.so

branches/try/mk/crates.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ DOC_CRATES := std alloc collections core libc rustc_unicode
134134
#
135135
# $(1) is the crate to generate variables for
136136
define RUST_CRATE
137-
CRATEFILE_$(1) := $$(S)src/lib$(1)/lib.rs
137+
CRATEFILE_$(1) := $$(SREL)src/lib$(1)/lib.rs
138138
RSINPUTS_$(1) := $$(call rwildcard,$(S)src/lib$(1)/,*.rs)
139139
RUST_DEPS_$(1) := $$(filter-out native:%,$$(DEPS_$(1)))
140140
NATIVE_DEPS_$(1) := $$(patsubst native:%,%,$$(filter native:%,$$(DEPS_$(1))))

branches/try/mk/main.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ $(foreach host,$(CFG_HOST), \
322322
# exported
323323

324324
export CFG_SRC_DIR
325+
export CFG_SRC_DIR_RELATIVE
325326
export CFG_BUILD_DIR
326327
ifdef CFG_VER_DATE
327328
export CFG_VER_DATE

branches/try/mk/prepare.mk

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,34 @@ DEFAULT_PREPARE_MAN_CMD = install -m644
2929

3030
# Create a directory
3131
# $(1) is the directory
32+
#
33+
# XXX: These defines are called to generate make steps.
34+
# Adding blank lines means two steps from different defines will not end up on
35+
# the same line.
3236
define PREPARE_DIR
33-
@$(Q)$(call E, prepare: $(1))
37+
38+
@$(call E, prepare: $(1))
3439
$(Q)$(PREPARE_DIR_CMD) $(1)
40+
3541
endef
3642

3743
# Copy an executable
3844
# $(1) is the filename/libname-glob
3945
#
40-
# Gee, what's up with that $(nop)? See comment below.
46+
# See above for an explanation on the surrounding blank lines
4147
define PREPARE_BIN
42-
$(nop)
48+
4349
@$(call E, prepare: $(PREPARE_DEST_BIN_DIR)/$(1))
4450
$(Q)$(PREPARE_BIN_CMD) $(PREPARE_SOURCE_BIN_DIR)/$(1) $(PREPARE_DEST_BIN_DIR)/$(1)
51+
4552
endef
4653

4754
# Copy a dylib or rlib
4855
# $(1) is the filename/libname-glob
4956
#
50-
# XXX: Don't remove the $(nop) command below!
51-
# Yeah, that's right, it's voodoo. Something in the way this macro is being expanded
52-
# causes it to parse incorrectly. Throwing in that empty command seems to fix the
53-
# problem. I'm sorry, just don't remove the $(nop), alright?
57+
# See above for an explanation on the surrounding blank lines
5458
define PREPARE_LIB
55-
$(nop)
59+
5660
@$(call E, prepare: $(PREPARE_WORKING_DEST_LIB_DIR)/$(1))
5761
$(Q)LIB_NAME="$(notdir $(lastword $(wildcard $(PREPARE_WORKING_SOURCE_LIB_DIR)/$(1))))"; \
5862
MATCHES="$(filter-out %$(notdir $(lastword $(wildcard $(PREPARE_WORKING_SOURCE_LIB_DIR)/$(1)))), \
@@ -64,13 +68,18 @@ define PREPARE_LIB
6468
echo $$MATCHES ; \
6569
fi
6670
$(Q)$(PREPARE_LIB_CMD) `ls -drt1 $(PREPARE_WORKING_SOURCE_LIB_DIR)/$(1)` $(PREPARE_WORKING_DEST_LIB_DIR)/
71+
6772
endef
6873

6974
# Copy a man page
7075
# $(1) - source dir
76+
#
77+
# See above for an explanation on the surrounding blank lines
7178
define PREPARE_MAN
79+
7280
@$(call E, prepare: $(PREPARE_DEST_MAN_DIR)/$(1))
7381
$(Q)$(PREPARE_MAN_CMD) $(PREPARE_SOURCE_MAN_DIR)/$(1) $(PREPARE_DEST_MAN_DIR)/$(1)
82+
7483
endef
7584

7685
PREPARE_TOOLS = $(filter-out compiletest rustbook error-index-generator, $(TOOLS))

branches/try/mk/reconfig.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ Makefile config.mk: config.stamp
3434

3535
config.stamp: $(S)configure $(S)Makefile.in $(S)src/snapshots.txt
3636
@$(call E, cfg: reconfiguring)
37-
$(S)configure $(CFG_CONFIGURE_ARGS)
37+
$(SREL)configure $(CFG_CONFIGURE_ARGS)

branches/try/mk/util.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ print-%:
2020
@echo $*=$($*)
2121

2222
S := $(CFG_SRC_DIR)
23+
SREL := $(CFG_SRC_DIR_RELATIVE)

branches/try/src/compiletest/common.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,6 @@ pub struct Config {
124124
// Flags to pass to the compiler when building for the target
125125
pub target_rustcflags: Option<String>,
126126

127-
// Run tests using the JIT
128-
pub jit: bool,
129-
130127
// Target system to be tested
131128
pub target: String,
132129

branches/try/src/compiletest/compiletest.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
7979
optopt("", "target-rustcflags", "flags to pass to rustc for target", "FLAGS"),
8080
optflag("", "verbose", "run tests verbosely, showing all output"),
8181
optopt("", "logfile", "file to log test execution to", "FILE"),
82-
optflag("", "jit", "run tests under the JIT"),
8382
optopt("", "target", "the target to build for", "TARGET"),
8483
optopt("", "host", "the host to build for", "HOST"),
8584
optopt("", "gdb-version", "the version of GDB used", "VERSION STRING"),
@@ -146,7 +145,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
146145
runtool: matches.opt_str("runtool"),
147146
host_rustcflags: matches.opt_str("host-rustcflags"),
148147
target_rustcflags: matches.opt_str("target-rustcflags"),
149-
jit: matches.opt_present("jit"),
150148
target: opt_str2(matches.opt_str("target")),
151149
host: opt_str2(matches.opt_str("host")),
152150
gdb_version: extract_gdb_version(matches.opt_str("gdb-version")),
@@ -186,7 +184,6 @@ pub fn log_config(config: &Config) {
186184
opt_str(&config.host_rustcflags)));
187185
logv(c, format!("target-rustcflags: {}",
188186
opt_str(&config.target_rustcflags)));
189-
logv(c, format!("jit: {}", config.jit));
190187
logv(c, format!("target: {}", config.target));
191188
logv(c, format!("host: {}", config.host));
192189
logv(c, format!("android-cross-path: {:?}",

branches/try/src/compiletest/runtest.rs

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,13 @@ fn run_cfail_test(config: &Config, props: &TestProps, testfile: &Path) {
9898
}
9999

100100
fn run_rfail_test(config: &Config, props: &TestProps, testfile: &Path) {
101-
let proc_res = if !config.jit {
102-
let proc_res = compile_test(config, props, testfile);
101+
let proc_res = compile_test(config, props, testfile);
103102

104-
if !proc_res.status.success() {
105-
fatal_proc_rec("compilation failed!", &proc_res);
106-
}
103+
if !proc_res.status.success() {
104+
fatal_proc_rec("compilation failed!", &proc_res);
105+
}
107106

108-
exec_compiled_test(config, props, testfile)
109-
} else {
110-
jit_test(config, props, testfile)
111-
};
107+
let proc_res = exec_compiled_test(config, props, testfile);
112108

113109
// The value our Makefile configures valgrind to return on failure
114110
const VALGRIND_ERR: i32 = 100;
@@ -133,24 +129,16 @@ fn check_correct_failure_status(proc_res: &ProcRes) {
133129
}
134130

135131
fn run_rpass_test(config: &Config, props: &TestProps, testfile: &Path) {
136-
if !config.jit {
137-
let mut proc_res = compile_test(config, props, testfile);
138-
139-
if !proc_res.status.success() {
140-
fatal_proc_rec("compilation failed!", &proc_res);
141-
}
132+
let proc_res = compile_test(config, props, testfile);
142133

143-
proc_res = exec_compiled_test(config, props, testfile);
134+
if !proc_res.status.success() {
135+
fatal_proc_rec("compilation failed!", &proc_res);
136+
}
144137

145-
if !proc_res.status.success() {
146-
fatal_proc_rec("test run failed!", &proc_res);
147-
}
148-
} else {
149-
let proc_res = jit_test(config, props, testfile);
138+
let proc_res = exec_compiled_test(config, props, testfile);
150139

151-
if !proc_res.status.success() {
152-
fatal_proc_rec("jit failed!", &proc_res);
153-
}
140+
if !proc_res.status.success() {
141+
fatal_proc_rec("test run failed!", &proc_res);
154142
}
155143
}
156144

@@ -1141,10 +1129,6 @@ fn compile_test(config: &Config, props: &TestProps,
11411129
compile_test_(config, props, testfile, &[])
11421130
}
11431131

1144-
fn jit_test(config: &Config, props: &TestProps, testfile: &Path) -> ProcRes {
1145-
compile_test_(config, props, testfile, &["--jit".to_string()])
1146-
}
1147-
11481132
fn compile_test_(config: &Config, props: &TestProps,
11491133
testfile: &Path, extra_args: &[String]) -> ProcRes {
11501134
let aux_dir = aux_output_dir_name(config, testfile);

branches/try/src/doc/trpl/associated-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ trait Graph {
4343
Now, our clients can be abstract over a given `Graph`:
4444

4545
```rust,ignore
46-
fn distance<G: Graph>(graph: &G, start: &G::N, end: &G::N) -> usize { ... }
46+
fn distance<G: Graph>(graph: &G, start: &G::N, end: &G::N) -> u32 { ... }
4747
```
4848

4949
No need to deal with the `E`dge type here!

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,7 @@ has no side effect on the original iterator. Let's try it out with our infinite
285285
iterator from before:
286286

287287
```rust
288-
# #![feature(step_by)]
289-
for i in (1..).step_by(5).take(5) {
288+
for i in (1..).take(5) {
290289
println!("{}", i);
291290
}
292291
```
@@ -295,10 +294,10 @@ This will print
295294

296295
```text
297296
1
298-
6
299-
11
300-
16
301-
21
297+
2
298+
3
299+
4
300+
5
302301
```
303302

304303
`filter()` is an adapter that takes a closure as an argument. This closure

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ fn substr<'a>(s: &'a str, until: u32) -> &'a str; // expanded
305305
fn get_str() -> &str; // ILLEGAL, no inputs
306306
307307
fn frob(s: &str, t: &str) -> &str; // ILLEGAL, two inputs
308-
fn frob<'a, 'b>(s: &'a str, t: &'b str) -> &str; // Expanded: Output lifetime is unclear
308+
fn frob<'a, 'b>(s: &'a str, t: &'b str) -> &str; // Expanded: Output lifetime is ambiguous
309309
310310
fn get_mut(&mut self) -> &mut T; // elided
311311
fn get_mut<'a>(&'a mut self) -> &'a mut T; // expanded

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

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,27 @@ struct Point {
221221
let origin = Point { x: 0, y: 0 };
222222

223223
match origin {
224-
Point { x: x, y: y } => println!("({},{})", x, y),
224+
Point { x, y } => println!("({},{})", x, y),
225225
}
226226
```
227227

228228
[struct]: structs.html
229229

230+
We can use `:` to give a value a different name.
231+
232+
```rust
233+
struct Point {
234+
x: i32,
235+
y: i32,
236+
}
237+
238+
let origin = Point { x: 0, y: 0 };
239+
240+
match origin {
241+
Point { x: x1, y: y1 } => println!("({},{})", x1, y1),
242+
}
243+
```
244+
230245
If we only care about some of the values, we don’t have to give them all names:
231246

232247
```rust
@@ -238,7 +253,7 @@ struct Point {
238253
let origin = Point { x: 0, y: 0 };
239254

240255
match origin {
241-
Point { x: x, .. } => println!("x is {}", x),
256+
Point { x, .. } => println!("x is {}", x),
242257
}
243258
```
244259

@@ -255,7 +270,7 @@ struct Point {
255270
let origin = Point { x: 0, y: 0 };
256271

257272
match origin {
258-
Point { y: y, .. } => println!("y is {}", y),
273+
Point { y, .. } => println!("y is {}", y),
259274
}
260275
```
261276

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
% Traits
22

3+
A trait is a language feature that tells the Rust compiler about
4+
functionality a type must provide.
5+
36
Do you remember the `impl` keyword, used to call a function with [method
47
syntax][methodsyntax]?
58

branches/try/src/liballoc/arc.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -330,15 +330,6 @@ impl<T: ?Sized> Deref for Arc<T> {
330330
}
331331
}
332332

333-
#[stable(feature = "rc_arc_as_ref", since = "1.2.0")]
334-
impl<T: ?Sized> AsRef<T> for Arc<T> {
335-
336-
#[inline]
337-
fn as_ref(&self) -> &T {
338-
&self.inner().data
339-
}
340-
}
341-
342333
impl<T: Clone> Arc<T> {
343334
/// Make a mutable reference from the given `Arc<T>`.
344335
///

branches/try/src/liballoc/rc.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ use std::boxed;
156156
use core::cell::Cell;
157157
use core::clone::Clone;
158158
use core::cmp::{PartialEq, PartialOrd, Eq, Ord, Ordering};
159-
use core::convert::AsRef;
160159
use core::default::Default;
161160
use core::fmt;
162161
use core::hash::{Hasher, Hash};
@@ -380,15 +379,6 @@ impl<T: ?Sized> Deref for Rc<T> {
380379
}
381380
}
382381

383-
#[stable(feature = "rc_arc_as_ref", since = "1.2.0")]
384-
impl<T: ?Sized> AsRef<T> for Rc<T> {
385-
386-
#[inline(always)]
387-
fn as_ref(&self) -> &T {
388-
&self.inner().value
389-
}
390-
}
391-
392382
#[stable(feature = "rust1", since = "1.0.0")]
393383
impl<T: ?Sized> Drop for Rc<T> {
394384
/// Drops the `Rc<T>`.

branches/try/src/libcore/fmt/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub trait Write {
7272
///
7373
/// # Errors
7474
///
75-
/// This function will return an instance of `FormatError` on error.
75+
/// This function will return an instance of `Error` on error.
7676
#[stable(feature = "rust1", since = "1.0.0")]
7777
fn write_str(&mut self, s: &str) -> Result;
7878

@@ -85,7 +85,7 @@ pub trait Write {
8585
///
8686
/// # Errors
8787
///
88-
/// This function will return an instance of `FormatError` on error.
88+
/// This function will return an instance of `Error` on error.
8989
#[stable(feature = "fmt_write_char", since = "1.1.0")]
9090
fn write_char(&mut self, c: char) -> Result {
9191
let mut utf_8 = [0u8; 4];

branches/try/src/librustc/metadata/tyencode.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,12 @@ pub fn enc_ty<'a, 'tcx>(w: &mut Encoder, cx: &ctxt<'a, 'tcx>, t: Ty<'tcx>) {
113113
ty::TyArray(t, sz) => {
114114
mywrite!(w, "V");
115115
enc_ty(w, cx, t);
116-
mywrite!(w, "/");
117-
match sz {
118-
Some(n) => mywrite!(w, "{}|", n),
119-
None => mywrite!(w, "|"),
120-
}
116+
mywrite!(w, "/{}|", sz);
117+
}
118+
ty::TySlice(t) => {
119+
mywrite!(w, "V");
120+
enc_ty(w, cx, t);
121+
mywrite!(w, "/|");
121122
}
122123
ty::TyStr => {
123124
mywrite!(w, "v");

0 commit comments

Comments
 (0)