Skip to content

Commit 3384c08

Browse files
committed
---
yaml --- r: 7468 b: refs/heads/master c: 04a2887 h: refs/heads/master v: v3
1 parent f4b3f86 commit 3384c08

Some content is hidden

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

97 files changed

+1411
-1411
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: ca7cfbe3d0251766217e5d4e559903e655e7549b
2+
refs/heads/master: 04a2887f8791bb080b4e76a55949a7c1954dbb97

trunk/src/cargo/cargo.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ fn install_source(c: cargo, path: str) {
417417
for cf: str in cratefiles {
418418
let p = load_pkg(cf);
419419
alt p {
420-
none. { cont; }
420+
none { cont; }
421421
some(_p) {
422422
if c.test {
423423
test_one_crate(c, path, cf, _p);
@@ -559,7 +559,7 @@ fn cmd_install(c: cargo, argv: [str]) {
559559

560560
let wd = alt tempfile::mkdtemp(c.workdir + fs::path_sep(), "") {
561561
some(_wd) { _wd }
562-
none. { fail "needed temp dir"; }
562+
none { fail "needed temp dir"; }
563563
};
564564

565565
if str::starts_with(target, "uuid:") {

trunk/src/comp/back/link.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fn load_intrinsics_bc(sess: session) -> option::t<ModuleRef> {
4343
sess.filesearch,
4444
bind filesearch::pick_file("intrinsics.bc", _)) {
4545
option::some(path) { path }
46-
option::none. {
46+
option::none {
4747
sess.warn("couldn't find intrinsics.bc");
4848
ret option::none;
4949
}
@@ -70,7 +70,7 @@ fn load_intrinsics_ll(sess: session) -> ModuleRef {
7070
sess.filesearch,
7171
bind filesearch::pick_file("intrinsics.ll", _)) {
7272
option::some(path) { path }
73-
option::none. { sess.fatal("couldn't find intrinsics.ll") }
73+
option::none { sess.fatal("couldn't find intrinsics.ll") }
7474
};
7575
let llintrinsicsmod = str::as_buf(path, { |buf|
7676
llvm::LLVMRustParseAssemblyFile(buf)
@@ -86,7 +86,7 @@ fn link_intrinsics(sess: session, llmod: ModuleRef) {
8686
let llintrinsicsmod = {
8787
alt load_intrinsics_bc(sess) {
8888
option::some(m) { m }
89-
option::none. {
89+
option::none {
9090
// When the bitcode format changes we can't parse a .bc
9191
// file produced with a newer LLVM (as happens when stage0
9292
// is trying to build against a new LLVM revision), in
@@ -139,7 +139,7 @@ mod write {
139139

140140
if opts.save_temps {
141141
alt opts.output_type {
142-
output_type_bitcode. {
142+
output_type_bitcode {
143143
if opts.optimize != 0u {
144144
let filename = mk_intermediate_name(output, "no-opt.bc");
145145
str::as_buf(filename,
@@ -383,12 +383,12 @@ fn build_link_meta(sess: session, c: ast::crate, output: str,
383383
if attr::get_meta_item_name(meta) == "name" {
384384
alt attr::get_meta_item_value_str(meta) {
385385
some(v) { name = some(v); }
386-
none. { cmh_items += [meta]; }
386+
none { cmh_items += [meta]; }
387387
}
388388
} else if attr::get_meta_item_name(meta) == "vers" {
389389
alt attr::get_meta_item_value_str(meta) {
390390
some(v) { vers = some(v); }
391-
none. { cmh_items += [meta]; }
391+
none { cmh_items += [meta]; }
392392
}
393393
} else { cmh_items += [meta]; }
394394
}
@@ -442,7 +442,7 @@ fn build_link_meta(sess: session, c: ast::crate, output: str,
442442
output: str, metas: provided_metas) -> str {
443443
ret alt metas.name {
444444
some(v) { v }
445-
none. {
445+
none {
446446
let name =
447447
{
448448
let os = str::split(fs::basename(output), '.' as u8);
@@ -463,7 +463,7 @@ fn build_link_meta(sess: session, c: ast::crate, output: str,
463463
metas: provided_metas) -> str {
464464
ret alt metas.vers {
465465
some(v) { v }
466-
none. {
466+
none {
467467
let vers = "0.0";
468468
warn_missing(sess, "vers", vers);
469469
vers
@@ -509,7 +509,7 @@ fn get_symbol_hash(ccx: @crate_ctxt, t: ty::t) -> str {
509509
let hash = "";
510510
alt ccx.type_sha1s.find(t) {
511511
some(h) { hash = h; }
512-
none. {
512+
none {
513513
hash = symbol_hash(ccx.tcx, ccx.sha, t, ccx.link_meta);
514514
ccx.type_sha1s.insert(t, hash);
515515
}

trunk/src/comp/back/x86.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,37 @@ fn get_target_strs(target_os: session::os) -> target_strs::t {
55
module_asm: "",
66

77
meta_sect_name: alt target_os {
8-
session::os_macos. { "__DATA,__note.rustc" }
9-
session::os_win32. { ".note.rustc" }
10-
session::os_linux. { ".note.rustc" }
11-
session::os_freebsd. { ".note.rustc" }
8+
session::os_macos { "__DATA,__note.rustc" }
9+
session::os_win32 { ".note.rustc" }
10+
session::os_linux { ".note.rustc" }
11+
session::os_freebsd { ".note.rustc" }
1212
},
1313

1414
data_layout: alt target_os {
15-
session::os_macos. {
15+
session::os_macos {
1616
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16" + "-i32:32:32-i64:32:64" +
1717
"-f32:32:32-f64:32:64-v64:64:64" +
1818
"-v128:128:128-a0:0:64-f80:128:128" + "-n8:16:32"
1919
}
2020

21-
session::os_win32. {
21+
session::os_win32 {
2222
"e-p:32:32-f64:64:64-i64:64:64-f80:32:32-n8:16:32"
2323
}
2424

25-
session::os_linux. {
25+
session::os_linux {
2626
"e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32"
2727
}
2828

29-
session::os_freebsd. {
29+
session::os_freebsd {
3030
"e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32"
3131
}
3232
},
3333

3434
target_triple: alt target_os {
35-
session::os_macos. { "i686-apple-darwin" }
36-
session::os_win32. { "i686-pc-mingw32" }
37-
session::os_linux. { "i686-unknown-linux-gnu" }
38-
session::os_freebsd. { "i686-unknown-freebsd" }
35+
session::os_macos { "i686-apple-darwin" }
36+
session::os_win32 { "i686-pc-mingw32" }
37+
session::os_linux { "i686-unknown-linux-gnu" }
38+
session::os_freebsd { "i686-unknown-freebsd" }
3939
},
4040

4141
gcc_args: ["-m32"]

trunk/src/comp/back/x86_64.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,44 @@ fn get_target_strs(target_os: session::os) -> target_strs::t {
55
module_asm: "",
66

77
meta_sect_name: alt target_os {
8-
session::os_macos. { "__DATA,__note.rustc" }
9-
session::os_win32. { ".note.rustc" }
10-
session::os_linux. { ".note.rustc" }
11-
session::os_freebsd. { ".note.rustc" }
8+
session::os_macos { "__DATA,__note.rustc" }
9+
session::os_win32 { ".note.rustc" }
10+
session::os_linux { ".note.rustc" }
11+
session::os_freebsd { ".note.rustc" }
1212
},
1313

1414
data_layout: alt target_os {
15-
session::os_macos. {
15+
session::os_macos {
1616
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-"+
1717
"f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-"+
1818
"s0:64:64-f80:128:128-n8:16:32:64"
1919
}
2020

21-
session::os_win32. {
21+
session::os_win32 {
2222
// FIXME: Test this. Copied from linux
2323
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-"+
2424
"f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-"+
2525
"s0:64:64-f80:128:128-n8:16:32:64-S128"
2626
}
2727

28-
session::os_linux. {
28+
session::os_linux {
2929
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-"+
3030
"f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-"+
3131
"s0:64:64-f80:128:128-n8:16:32:64-S128"
3232
}
3333

34-
session::os_freebsd. {
34+
session::os_freebsd {
3535
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-"+
3636
"f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-"+
3737
"s0:64:64-f80:128:128-n8:16:32:64-S128"
3838
}
3939
},
4040

4141
target_triple: alt target_os {
42-
session::os_macos. { "x86_64-apple-darwin" }
43-
session::os_win32. { "x86_64-pc-mingw32" }
44-
session::os_linux. { "x86_64-unknown-linux-gnu" }
45-
session::os_freebsd. { "x86_64-unknown-freebsd" }
42+
session::os_macos { "x86_64-apple-darwin" }
43+
session::os_win32 { "x86_64-pc-mingw32" }
44+
session::os_linux { "x86_64-unknown-linux-gnu" }
45+
session::os_freebsd { "x86_64-unknown-freebsd" }
4646
},
4747

4848
gcc_args: ["-m64"]

trunk/src/comp/driver/diagnostic.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ fn mk_handler(cm: codemap::codemap,
9191

9292
let emit = alt emitter {
9393
some(e) { e }
94-
none. {
94+
none {
9595
let f = fn@(cmsp: option<(codemap::codemap, span)>,
9696
msg: str, t: level) {
9797
emit(cmsp, msg, t);
@@ -116,19 +116,19 @@ tag level {
116116

117117
fn diagnosticstr(lvl: level) -> str {
118118
alt lvl {
119-
fatal. { "error" }
120-
error. { "error" }
121-
warning. { "warning" }
122-
note. { "note" }
119+
fatal { "error" }
120+
error { "error" }
121+
warning { "warning" }
122+
note { "note" }
123123
}
124124
}
125125

126126
fn diagnosticcolor(lvl: level) -> u8 {
127127
alt lvl {
128-
fatal. { term::color_bright_red }
129-
error. { term::color_bright_red }
130-
warning. { term::color_bright_yellow }
131-
note. { term::color_bright_green }
128+
fatal { term::color_bright_red }
129+
error { term::color_bright_red }
130+
warning { term::color_bright_yellow }
131+
note { term::color_bright_green }
132132
}
133133
}
134134

@@ -155,7 +155,7 @@ fn emit(cmsp: option<(codemap::codemap, span)>,
155155
print_diagnostic(ss, lvl, msg);
156156
highlight_lines(cm, sp, lines);
157157
}
158-
none. {
158+
none {
159159
print_diagnostic("", lvl, msg);
160160
}
161161
}

trunk/src/comp/driver/driver.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -280,22 +280,22 @@ fn pretty_print_input(sess: session, cfg: ast::crate_cfg, input: str,
280280
// from stdin, we're going to just suck the source into a string
281281
// so both the parser and pretty-printer can use it.
282282
let upto = alt ppm {
283-
ppm_expanded. { cu_expand }
284-
ppm_typed. { cu_typeck }
283+
ppm_expanded { cu_expand }
284+
ppm_typed { cu_typeck }
285285
_ { cu_parse }
286286
};
287287
let {crate, tcx, src} = compile_upto(sess, cfg, input, upto, none);
288288

289289
let ann: pprust::pp_ann = pprust::no_ann();
290290
alt ppm {
291-
ppm_typed. {
291+
ppm_typed {
292292
ann = {pre: ann_paren_for_expr,
293293
post: bind ann_typed_post(option::get(tcx), _)};
294294
}
295-
ppm_identified. {
295+
ppm_identified {
296296
ann = {pre: ann_paren_for_expr, post: ann_identified_post};
297297
}
298-
ppm_expanded. | ppm_normal. {}
298+
ppm_expanded | ppm_normal {}
299299
}
300300
pprust::print_crate(sess.codemap, sess.diagnostic, crate, input,
301301
io::string_reader(src), io::stdout(), ann);
@@ -332,11 +332,11 @@ fn build_target_config(sopts: @session::options,
332332
demitter: diagnostic::emitter) -> @session::config {
333333
let os = alt get_os(sopts.target_triple) {
334334
some(os) { os }
335-
none. { early_error(demitter, "Unknown operating system!") }
335+
none { early_error(demitter, "Unknown operating system!") }
336336
};
337337
let arch = alt get_arch(sopts.target_triple) {
338338
some(arch) { arch }
339-
none. { early_error(demitter,
339+
none { early_error(demitter,
340340
"Unknown architecture! " + sopts.target_triple) }
341341
};
342342
let (int_type, uint_type, float_type) = alt arch {
@@ -429,7 +429,7 @@ fn build_session_options(match: getopts::match,
429429
} else { 0u };
430430
let target =
431431
alt target_opt {
432-
none. { host_triple() }
432+
none { host_triple() }
433433
some(s) { s }
434434
};
435435

@@ -538,8 +538,8 @@ fn build_output_filenames(ifile: str,
538538

539539
let obj_suffix =
540540
alt sopts.output_type {
541-
link::output_type_none. { "none" }
542-
link::output_type_bitcode. { "bc" }
541+
link::output_type_none { "none" }
542+
link::output_type_bitcode { "bc" }
543543
link::output_type_assembly. { "s" }
544544
link::output_type_llvm_assembly. { "ll" }
545545
// Object and exe output both use the '.o' extension here
@@ -549,13 +549,13 @@ fn build_output_filenames(ifile: str,
549549
};
550550

551551
alt ofile {
552-
none. {
552+
none {
553553
// "-" as input file will cause the parser to read from stdin so we
554554
// have to make up a name
555555
// We want to toss everything after the final '.'
556556
let dirname = alt odir {
557557
some(d) { d }
558-
none. {
558+
none {
559559
if input_is_stdin(ifile) {
560560
std::os::getcwd()
561561
} else {

trunk/src/comp/driver/session.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ impl session for session {
114114
fn building_library(req_crate_type: crate_type, crate: @ast::crate,
115115
testing: bool) -> bool {
116116
alt req_crate_type {
117-
bin_crate. { false }
118-
lib_crate. { true }
119-
unknown_crate. {
117+
bin_crate { false }
118+
lib_crate { true }
119+
unknown_crate {
120120
if testing {
121121
false
122122
} else {

trunk/src/comp/front/attr.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ fn require_unique_names(sess: session, metas: [@ast::meta_item]) {
202202

203203
fn native_abi(attrs: [ast::attribute]) -> either::t<str, ast::native_abi> {
204204
ret alt attr::get_meta_item_value_str_by_name(attrs, "abi") {
205-
option::none. {
205+
option::none {
206206
either::right(ast::native_abi_cdecl)
207207
}
208208
option::some("rust-intrinsic") {
@@ -236,10 +236,10 @@ fn meta_item_value_from_list(
236236
some(item) {
237237
alt attr::get_meta_item_value_str(item) {
238238
some(value) { some(value) }
239-
none. { none }
239+
none { none }
240240
}
241241
}
242-
none. { none }
242+
none { none }
243243
}
244244
}
245245

@@ -251,7 +251,7 @@ fn meta_item_list_from_list(
251251
some(item) {
252252
attr::get_meta_item_list(item)
253253
}
254-
none. { none }
254+
none { none }
255255
}
256256
}
257257

@@ -263,7 +263,7 @@ fn name_value_str_pair(
263263
let name = attr::get_meta_item_name(item);
264264
some((name, value))
265265
}
266-
none. { none }
266+
none { none }
267267
}
268268
}
269269

0 commit comments

Comments
 (0)