Skip to content

Commit f5fde7e

Browse files
committed
---
yaml --- r: 44669 b: refs/heads/master c: cdd6f38 h: refs/heads/master i: 44667: db442ba v: v3
1 parent 5c53637 commit f5fde7e

38 files changed

+418
-303
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9ea6a496964e8f380f257cfd281b364f3337176b
2+
refs/heads/master: cdd6f38220ae4b6d6b84524fa4b8f684898bad55
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d9689399d091c3265f00434a69c551a61c28dc
55
refs/heads/try: ef355f6332f83371e4acf04fc4eb940ab41d78d3

trunk/src/compiletest/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub enum mode {
2121
mode_debug_info,
2222
}
2323

24-
pub struct config {
24+
pub type config = {
2525
// The library paths required for running the compiler
2626
compile_lib_path: ~str,
2727

@@ -68,4 +68,4 @@ pub struct config {
6868
// Explain what's going on
6969
verbose: bool
7070

71-
}
71+
};

trunk/src/compiletest/compiletest.rc

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#[crate_type = "bin"];
1212

1313
#[no_core];
14+
#[legacy_records];
1415

1516
#[allow(vecs_implicitly_copyable)];
1617
#[allow(non_camel_case_types)];
@@ -76,28 +77,26 @@ pub fn parse_config(args: ~[~str]) -> config {
7677
Path(getopts::opt_str(m, nm))
7778
}
7879

79-
config {
80-
compile_lib_path: getopts::opt_str(matches, ~"compile-lib-path"),
81-
run_lib_path: getopts::opt_str(matches, ~"run-lib-path"),
82-
rustc_path: opt_path(matches, ~"rustc-path"),
83-
src_base: opt_path(matches, ~"src-base"),
84-
build_base: opt_path(matches, ~"build-base"),
85-
aux_base: opt_path(matches, ~"aux-base"),
86-
stage_id: getopts::opt_str(matches, ~"stage-id"),
87-
mode: str_mode(getopts::opt_str(matches, ~"mode")),
88-
run_ignored: getopts::opt_present(matches, ~"ignored"),
89-
filter:
80+
return {compile_lib_path: getopts::opt_str(matches, ~"compile-lib-path"),
81+
run_lib_path: getopts::opt_str(matches, ~"run-lib-path"),
82+
rustc_path: opt_path(matches, ~"rustc-path"),
83+
src_base: opt_path(matches, ~"src-base"),
84+
build_base: opt_path(matches, ~"build-base"),
85+
aux_base: opt_path(matches, ~"aux-base"),
86+
stage_id: getopts::opt_str(matches, ~"stage-id"),
87+
mode: str_mode(getopts::opt_str(matches, ~"mode")),
88+
run_ignored: getopts::opt_present(matches, ~"ignored"),
89+
filter:
9090
if vec::len(matches.free) > 0u {
9191
option::Some(matches.free[0])
9292
} else { option::None },
93-
logfile: option::map(&getopts::opt_maybe_str(matches,
93+
logfile: option::map(&getopts::opt_maybe_str(matches,
9494
~"logfile"),
95-
|s| Path(*s)),
96-
runtool: getopts::opt_maybe_str(matches, ~"runtool"),
97-
rustcflags: getopts::opt_maybe_str(matches, ~"rustcflags"),
98-
jit: getopts::opt_present(matches, ~"jit"),
99-
verbose: getopts::opt_present(matches, ~"verbose")
100-
}
95+
|s| Path(*s)),
96+
runtool: getopts::opt_maybe_str(matches, ~"runtool"),
97+
rustcflags: getopts::opt_maybe_str(matches, ~"rustcflags"),
98+
jit: getopts::opt_present(matches, ~"jit"),
99+
verbose: getopts::opt_present(matches, ~"verbose")};
101100
}
102101

103102
pub fn log_config(config: config) {

trunk/src/librustc/middle/lint.rs

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -706,21 +706,23 @@ fn check_item_deprecated_self(cx: ty::ctxt, item: @ast::item) {
706706
}
707707
708708
fn check_item_structural_records(cx: ty::ctxt, it: @ast::item) {
709-
let visit = item_stopping_visitor(
710-
visit::mk_simple_visitor(@visit::SimpleVisitor {
711-
visit_expr: |e: @ast::expr| {
712-
match e.node {
713-
ast::expr_rec(*) =>
714-
cx.sess.span_lint(
715-
structural_records, e.id, it.id,
716-
e.span,
717-
~"structural records are deprecated"),
718-
_ => ()
719-
}
720-
},
721-
.. *visit::default_simple_visitor()
722-
}));
723-
visit::visit_item(it, (), visit);
709+
if !cx.legacy_records {
710+
let visit = item_stopping_visitor(
711+
visit::mk_simple_visitor(@visit::SimpleVisitor {
712+
visit_expr: |e: @ast::expr| {
713+
match e.node {
714+
ast::expr_rec(*) =>
715+
cx.sess.span_lint(
716+
structural_records, e.id, it.id,
717+
e.span,
718+
~"structural records are deprecated"),
719+
_ => ()
720+
}
721+
},
722+
.. *visit::default_simple_visitor()
723+
}));
724+
visit::visit_item(it, (), visit);
725+
}
724726
}
725727

726728
fn check_item_ctypes(cx: ty::ctxt, it: @ast::item) {

0 commit comments

Comments
 (0)