Skip to content

Commit fb93bdc

Browse files
committed
---
yaml --- r: 112218 b: refs/heads/try c: 7265567 h: refs/heads/master v: v3
1 parent 6a63165 commit fb93bdc

Some content is hidden

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

42 files changed

+600
-985
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: a692e9b1234ff6573b0cfbc39394d9222eb38f81
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: b5dd3f05fe95168b5569d0f519636149479eb6ac
5-
refs/heads/try: 0b77a49deef5fe0e8f46cefa652af4b55e7bac51
5+
refs/heads/try: 72655677b173c5f77118b2535b22acaa94076f17
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/compiletest/header.rs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ pub struct TestProps {
1717
pub error_patterns: Vec<~str> ,
1818
// Extra flags to pass to the compiler
1919
pub compile_flags: Option<~str>,
20-
// Extra flags to pass when the compiled code is run (such as --bench)
21-
pub run_flags: Option<~str>,
2220
// If present, the name of a file that this test should match when
2321
// pretty-printed
2422
pub pp_exact: Option<Path>,
@@ -44,7 +42,6 @@ pub fn load_props(testfile: &Path) -> TestProps {
4442
let mut aux_builds = Vec::new();
4543
let mut exec_env = Vec::new();
4644
let mut compile_flags = None;
47-
let mut run_flags = None;
4845
let mut pp_exact = None;
4946
let mut debugger_cmds = Vec::new();
5047
let mut check_lines = Vec::new();
@@ -61,10 +58,6 @@ pub fn load_props(testfile: &Path) -> TestProps {
6158
compile_flags = parse_compile_flags(ln);
6259
}
6360

64-
if run_flags.is_none() {
65-
run_flags = parse_run_flags(ln);
66-
}
67-
6861
if pp_exact.is_none() {
6962
pp_exact = parse_pp_exact(ln, testfile);
7063
}
@@ -103,11 +96,9 @@ pub fn load_props(testfile: &Path) -> TestProps {
10396

10497
true
10598
});
106-
107-
TestProps {
99+
return TestProps {
108100
error_patterns: error_patterns,
109101
compile_flags: compile_flags,
110-
run_flags: run_flags,
111102
pp_exact: pp_exact,
112103
aux_builds: aux_builds,
113104
exec_env: exec_env,
@@ -116,7 +107,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
116107
force_host: force_host,
117108
check_stdout: check_stdout,
118109
no_prefer_dynamic: no_prefer_dynamic,
119-
}
110+
};
120111
}
121112

122113
pub fn is_test_ignored(config: &config, testfile: &Path) -> bool {
@@ -169,10 +160,6 @@ fn parse_compile_flags(line: &str) -> Option<~str> {
169160
parse_name_value_directive(line, "compile-flags".to_owned())
170161
}
171162

172-
fn parse_run_flags(line: &str) -> Option<~str> {
173-
parse_name_value_directive(line, ~"run-flags")
174-
}
175-
176163
fn parse_debugger_cmd(line: &str) -> Option<~str> {
177164
parse_name_value_directive(line, "debugger".to_owned())
178165
}

branches/try/src/compiletest/runtest.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -835,19 +835,14 @@ fn make_exe_name(config: &config, testfile: &Path) -> Path {
835835
f
836836
}
837837

838-
fn make_run_args(config: &config, props: &TestProps, testfile: &Path) ->
838+
fn make_run_args(config: &config, _props: &TestProps, testfile: &Path) ->
839839
ProcArgs {
840840
// If we've got another tool to run under (valgrind),
841841
// then split apart its command
842842
let mut args = split_maybe_args(&config.runtool);
843843
let exe_file = make_exe_name(config, testfile);
844-
845844
// FIXME (#9639): This needs to handle non-utf8 paths
846845
args.push(exe_file.as_str().unwrap().to_owned());
847-
848-
// Add the arguments in the run_flags directive
849-
args.push_all_move(split_maybe_args(&props.run_flags));
850-
851846
let prog = args.shift().unwrap();
852847
return ProcArgs {prog: prog, args: args};
853848
}

branches/try/src/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1883,8 +1883,8 @@ impl Shape {
18831883

18841884
let s = Circle(Point { x: 1.0, y: 2.0 }, 3.0);
18851885

1886-
(&s).draw_reference();
18871886
(~s).draw_owned();
1887+
(&s).draw_reference();
18881888
s.draw_value();
18891889
~~~
18901890

branches/try/src/librustc/front/feature_gate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//! enabled.
1717
//!
1818
//! Features are enabled in programs via the crate-level attributes of
19-
//! #![feature(...)] with a comma-separated list of features.
19+
//! #[feature(...)] with a comma-separated list of features.
2020
2121
use middle::lint;
2222

@@ -324,7 +324,7 @@ pub fn check_crate(sess: &Session, krate: &ast::Crate) {
324324
match attr.meta_item_list() {
325325
None => {
326326
sess.span_err(attr.span, "malformed feature attribute, \
327-
expected #![feature(...)]");
327+
expected #[feature(...)]");
328328
}
329329
Some(list) => {
330330
for &mi in list.iter() {

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

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ pub fn parse_substs_data(data: &[u8], crate_num: ast::CrateNum, pos: uint, tcx:
137137
parse_substs(&mut st, conv)
138138
}
139139

140-
fn parse_vstore(st: &mut PState, conv: conv_did) -> ty::Vstore {
140+
fn parse_vstore<M>(st: &mut PState, conv: conv_did,
141+
parse_mut: |&mut PState| -> M) -> ty::Vstore<M> {
141142
assert_eq!(next(st), '/');
142143

143144
let c = peek(st);
@@ -149,24 +150,11 @@ fn parse_vstore(st: &mut PState, conv: conv_did) -> ty::Vstore {
149150

150151
match next(st) {
151152
'~' => ty::VstoreUniq,
152-
'&' => ty::VstoreSlice(parse_region(st, conv)),
153+
'&' => ty::VstoreSlice(parse_region(st, conv), parse_mut(st)),
153154
c => st.tcx.sess.bug(format!("parse_vstore(): bad input '{}'", c))
154155
}
155156
}
156157

157-
fn parse_size(st: &mut PState) -> Option<uint> {
158-
assert_eq!(next(st), '/');
159-
160-
if peek(st) == '|' {
161-
assert_eq!(next(st), '|');
162-
None
163-
} else {
164-
let n = parse_uint(st);
165-
assert_eq!(next(st), '|');
166-
Some(n)
167-
}
168-
}
169-
170158
fn parse_trait_store(st: &mut PState, conv: conv_did) -> ty::TraitStore {
171159
match next(st) {
172160
'~' => ty::UniqTraitStore,
@@ -354,12 +342,12 @@ fn parse_ty(st: &mut PState, conv: conv_did) -> ty::t {
354342
return ty::mk_rptr(st.tcx, r, mt);
355343
}
356344
'V' => {
357-
let mt = parse_mt(st, |x,y| conv(x,y));
358-
let sz = parse_size(st);
359-
return ty::mk_vec(st.tcx, mt, sz);
345+
let ty = parse_ty(st, |x,y| conv(x,y));
346+
let v = parse_vstore(st, |x,y| conv(x,y), parse_mutability);
347+
return ty::mk_vec(st.tcx, ty, v);
360348
}
361349
'v' => {
362-
let v = parse_vstore(st, |x,y| conv(x,y));
350+
let v = parse_vstore(st, |x,y| conv(x,y), |_| ());
363351
return ty::mk_str(st.tcx, v);
364352
}
365353
'T' => {
@@ -408,7 +396,7 @@ fn parse_ty(st: &mut PState, conv: conv_did) -> ty::t {
408396
assert_eq!(next(st), ']');
409397
return ty::mk_struct(st.tcx, did, substs);
410398
}
411-
c => { fail!("unexpected char in type string: {}", c);}
399+
c => { error!("unexpected char in type string: {}", c); fail!();}
412400
}
413401
}
414402

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

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -204,17 +204,17 @@ fn enc_bound_region(w: &mut MemWriter, cx: &ctxt, br: ty::BoundRegion) {
204204
}
205205
}
206206

207-
pub fn enc_vstore(w: &mut MemWriter, cx: &ctxt,
208-
v: ty::Vstore,
209-
enc_mut: |&mut MemWriter|) {
207+
pub fn enc_vstore<M>(w: &mut MemWriter, cx: &ctxt,
208+
v: ty::Vstore<M>,
209+
enc_mut: |&mut MemWriter, M|) {
210210
mywrite!(w, "/");
211211
match v {
212212
ty::VstoreFixed(u) => mywrite!(w, "{}|", u),
213213
ty::VstoreUniq => mywrite!(w, "~"),
214-
ty::VstoreSlice(r) => {
214+
ty::VstoreSlice(r, m) => {
215215
mywrite!(w, "&");
216216
enc_region(w, cx, r);
217-
enc_mut(w);
217+
enc_mut(w, m);
218218
}
219219
}
220220
}
@@ -292,18 +292,14 @@ fn enc_sty(w: &mut MemWriter, cx: &ctxt, st: &ty::sty) {
292292
enc_region(w, cx, r);
293293
enc_mt(w, cx, mt);
294294
}
295-
ty::ty_vec(mt, sz) => {
295+
ty::ty_vec(ty, v) => {
296296
mywrite!(w, "V");
297-
enc_mt(w, cx, mt);
298-
mywrite!(w, "/");
299-
match sz {
300-
Some(n) => mywrite!(w, "{}|", n),
301-
None => mywrite!(w, "|"),
302-
}
297+
enc_ty(w, cx, ty);
298+
enc_vstore(w, cx, v, enc_mutability);
303299
}
304300
ty::ty_str(v) => {
305301
mywrite!(w, "v");
306-
enc_vstore(w, cx, v, |_| {});
302+
enc_vstore(w, cx, v, |_, ()| {});
307303
}
308304
ty::ty_closure(ref f) => {
309305
mywrite!(w, "f");

0 commit comments

Comments
 (0)