Skip to content

Commit 39bc3bd

Browse files
author
Steven Stewart-Gallus
committed
---
yaml --- r: 63262 b: refs/heads/snap-stage3 c: 786ea3f h: refs/heads/master v: v3
1 parent 0cdbd59 commit 39bc3bd

File tree

123 files changed

+2459
-2264
lines changed

Some content is hidden

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

123 files changed

+2459
-2264
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: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: a30ee0dee1ae023c3892361ad2a698e1ebbce12e
4+
refs/heads/snap-stage3: 786ea3ffe64209ea68421013f7721288dfab1f6d
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/doc/rust.css

Lines changed: 23 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,39 @@
11
body {
2-
padding: 1em 6em;
3-
margin: 0;
4-
margin-bottom: 4em;
5-
font-family: "Helvetica Neue", Helvetica, sans-serif;
6-
font-size: 12pt;
7-
background-color: white;
8-
color: black;
9-
line-height: 1.6em;
10-
min-width: 45em;
11-
max-width: 60em;
2+
padding: 1em;
3+
margin: 0;
4+
margin-bottom: 4em;
5+
font-family: "Helvetica Neue", Helvetica, sans-serif;
6+
background-color: white;
7+
color: black;
8+
line-height: 1.6em;
129
}
1310

14-
h1 {
15-
font-size: 20pt;
16-
margin-top: 2em;
17-
padding-left: 0.4em;
18-
line-height: 1.6em;
19-
background-color:#FFF2CE;
20-
border-radius: 0.2em;
21-
border: 1px solid rgba(0, 0, 0, 0.15);
11+
body {
12+
padding: 1em 6em;
13+
max-width: 60em;
2214
}
2315

16+
h1 {
17+
font-size: 20pt;
18+
margin-top: 2em;
19+
border-bottom: 1px solid silver;
20+
line-height: 1.6em;
21+
}
2422
h2 {
2523
font-size: 15pt;
2624
margin-top: 2em;
27-
padding-left: 0.4em;
28-
background-color:#FFF2CE;
29-
border-radius: 0.4em;
30-
border: 1px solid rgba(0, 0, 0, 0.15);
31-
}
32-
33-
h2 code {
34-
color: #097334;
35-
font-size: 15pt;
36-
}
37-
38-
h3 {
39-
font-size: 13pt;
40-
color: black;
41-
background-color:#D9E7FF;
42-
border-radius: 0.4em;
43-
border: 1px solid rgba(0, 0, 0, 0.15);
44-
padding: 0 0.4em 0 0.4em;
45-
}
46-
47-
h3 code {
48-
color: #541800;
49-
font-size: 13pt;
50-
font-style: italic;
51-
}
52-
53-
h4 {
54-
font-size: 11pt;
55-
margin-top: 0em;
56-
margin-bottom: 0em;
57-
}
58-
59-
code {
60-
font-size: 11pt;
6125
}
26+
h3 { font-size: 13pt; }
6227

6328
pre {
64-
margin-left: 1.1em;
65-
padding: .4em .4em .4em .8em;
66-
font-size: 10pt;
67-
background-color: #F5F5F5;
68-
border-radius: 0.5em;
69-
border: 1px solid rgba(0, 0, 0, 0.15);
70-
}
71-
72-
pre.rust {
73-
background-color: #F3F6FF;
29+
margin: 1.1em 0;
30+
padding: .4em .4em .4em 2em;
31+
font-size: 120%;
7432
}
7533

7634
a, a:visited, a:link {
77-
text-decoration: none;
78-
color: rgb(0, 105, 214);
35+
text-decoration: none;
36+
color: rgb(0, 105, 214);
7937
}
8038

8139
h1 a:link, h1 a:visited, h2 a:link, h2 a:visited,
@@ -148,12 +106,4 @@ td {
148106
/* Adjust list alignment so rustdoc indexes don't align with blockquotes */
149107
div.index ul {
150108
padding-left: 1em;
151-
}
152-
153-
ul {
154-
margin-top: 0em
155-
}
156-
157-
div.section.level3 {
158-
margin-left: 1.0em;
159-
}
109+
}

branches/snap-stage3/src/libfuzzer/fuzzer.rc

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ pub fn steal(crate: @ast::crate, tm: test_mode) -> StolenStuff {
176176
visit_ty: |a| stash_ty_if(safe_to_steal_ty, tys, a, tm),
177177
.. *visit::default_simple_visitor()
178178
});
179-
visit::visit_crate(crate, ((), v));
179+
visit::visit_crate(crate, (), v);
180180
StolenStuff {
181181
exprs: (*exprs).clone(),
182182
tys: (*tys).clone(),
@@ -345,13 +345,13 @@ pub fn check_variants_T<T:Copy>(crate: @ast::crate,
345345
intr,
346346
span_handler,
347347
crate2,
348-
fname.to_managed(),
348+
fname.to_str(),
349349
rdr,
350350
a,
351351
pprust::no_ann(),
352352
false)
353353
};
354-
string.to_managed()
354+
@string
355355
};
356356
match cx.mode {
357357
tm_converge => check_roundtrip_convergence(str3, 1),
@@ -361,9 +361,9 @@ pub fn check_variants_T<T:Copy>(crate: @ast::crate,
361361
thing_label,
362362
i,
363363
j);
364-
let safe_to_run = !(content_is_dangerous_to_run(str3)
364+
let safe_to_run = !(content_is_dangerous_to_run(*str3)
365365
|| has_raw_pointers(crate2));
366-
check_whole_compiler(str3,
366+
check_whole_compiler(*str3,
367367
&Path(file_label),
368368
safe_to_run);
369369
}
@@ -502,28 +502,28 @@ pub fn check_compiling(filename: &Path) -> happiness {
502502
}
503503

504504

505-
pub fn parse_and_print(code: @str) -> @str {
505+
pub fn parse_and_print(code: @~str) -> ~str {
506506
let filename = Path("tmp.rs");
507507
let sess = parse::new_parse_sess(option::None);
508-
write_file(&filename, code);
509-
let crate = parse::parse_crate_from_source_str(filename.to_str().to_managed(),
508+
write_file(&filename, *code);
509+
let crate = parse::parse_crate_from_source_str(filename.to_str(),
510510
code,
511511
~[],
512512
sess);
513-
do io::with_str_reader(code) |rdr| {
513+
do io::with_str_reader(*code) |rdr| {
514514
let filename = filename.to_str();
515515
do as_str |a| {
516516
pprust::print_crate(sess.cm,
517517
// Assuming there are no token_trees
518518
token::mk_fake_ident_interner(),
519519
copy sess.span_diagnostic,
520520
crate,
521-
filename.to_managed(),
521+
filename.to_str(),
522522
rdr,
523523
a,
524524
pprust::no_ann(),
525525
false)
526-
}.to_managed()
526+
}
527527
}
528528
}
529529

@@ -539,7 +539,7 @@ pub fn has_raw_pointers(c: @ast::crate) -> bool {
539539
visit::mk_simple_visitor(@visit::SimpleVisitor {
540540
visit_ty: |a| visit_ty(has_rp, a),
541541
.. *visit::default_simple_visitor()});
542-
visit::visit_crate(c, ((), v));
542+
visit::visit_crate(c, (), v);
543543
return *has_rp;
544544
}
545545

@@ -598,15 +598,15 @@ pub fn file_might_not_converge(filename: &Path) -> bool {
598598
return false;
599599
}
600600

601-
pub fn check_roundtrip_convergence(code: @str, maxIters: uint) {
601+
pub fn check_roundtrip_convergence(code: @~str, maxIters: uint) {
602602
let mut i = 0u;
603603
let mut newv = code;
604604
let mut oldv = code;
605605

606606
while i < maxIters {
607607
oldv = newv;
608-
if content_might_not_converge(oldv) { return; }
609-
newv = parse_and_print(oldv);
608+
if content_might_not_converge(*oldv) { return; }
609+
newv = @parse_and_print(oldv);
610610
if oldv == newv { break; }
611611
i += 1u;
612612
}
@@ -615,8 +615,8 @@ pub fn check_roundtrip_convergence(code: @str, maxIters: uint) {
615615
error!("Converged after %u iterations", i);
616616
} else {
617617
error!("Did not converge after %u iterations!", i);
618-
write_file(&Path("round-trip-a.rs"), oldv);
619-
write_file(&Path("round-trip-b.rs"), newv);
618+
write_file(&Path("round-trip-a.rs"), *oldv);
619+
write_file(&Path("round-trip-b.rs"), *newv);
620620
run::process_status("diff", [~"-w", ~"-u", ~"round-trip-a.rs", ~"round-trip-b.rs"]);
621621
fail!("Mismatch");
622622
}
@@ -626,8 +626,8 @@ pub fn check_convergence(files: &[Path]) {
626626
error!("pp convergence tests: %u files", files.len());
627627
for files.each |file| {
628628
if !file_might_not_converge(file) {
629-
let s = result::get(&io::read_whole_file_str(file)).to_managed();
630-
if !content_might_not_converge(s) {
629+
let s = @result::get(&io::read_whole_file_str(file));
630+
if !content_might_not_converge(*s) {
631631
error!("pp converge: %s", file.to_str());
632632
// Change from 7u to 2u once
633633
// https://github.com/mozilla/rust/issues/850 is fixed
@@ -646,26 +646,26 @@ pub fn check_variants(files: &[Path], cx: Context) {
646646
loop;
647647
}
648648

649-
let s = result::get(&io::read_whole_file_str(file)).to_managed();
650-
if s.contains_char('#') {
649+
let s = @result::get(&io::read_whole_file_str(file));
650+
if contains(*s, "#") {
651651
loop; // Macros are confusing
652652
}
653-
if cx.mode == tm_converge && content_might_not_converge(s) {
653+
if cx.mode == tm_converge && content_might_not_converge(*s) {
654654
loop;
655655
}
656-
if cx.mode == tm_run && content_is_dangerous_to_compile(s) {
656+
if cx.mode == tm_run && content_is_dangerous_to_compile(*s) {
657657
loop;
658658
}
659659

660660
let file_str = file.to_str();
661661

662662
error!("check_variants: %?", file_str);
663663
let sess = parse::new_parse_sess(None);
664-
let crate = parse::parse_crate_from_source_str(file_str.to_managed(),
664+
let crate = parse::parse_crate_from_source_str(file_str.to_str(),
665665
s,
666666
~[],
667667
sess);
668-
io::with_str_reader(s, |rdr| {
668+
io::with_str_reader(*s, |rdr| {
669669
let file_str = file_str.to_str();
670670
error!("%s",
671671
as_str(|a| {
@@ -675,7 +675,7 @@ pub fn check_variants(files: &[Path], cx: Context) {
675675
token::mk_fake_ident_interner(),
676676
copy sess.span_diagnostic,
677677
crate,
678-
file_str.to_managed(),
678+
file_str.to_str(),
679679
rdr,
680680
a,
681681
pprust::no_ann(),

branches/snap-stage3/src/librustc/back/link.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -493,16 +493,16 @@ pub fn build_link_meta(sess: Session,
493493
let linkage_metas = attr::find_linkage_metas(c.node.attrs);
494494
attr::require_unique_names(sess.diagnostic(), linkage_metas);
495495
for linkage_metas.each |meta| {
496-
if "name" == attr::get_meta_item_name(*meta) {
496+
if *attr::get_meta_item_name(*meta) == ~"name" {
497497
match attr::get_meta_item_value_str(*meta) {
498498
// Changing attr would avoid the need for the copy
499499
// here
500-
Some(v) => { name = Some(v); }
500+
Some(v) => { name = Some(v.to_managed()); }
501501
None => cmh_items.push(*meta)
502502
}
503-
} else if "vers" == attr::get_meta_item_name(*meta) {
503+
} else if *attr::get_meta_item_name(*meta) == ~"vers" {
504504
match attr::get_meta_item_value_str(*meta) {
505-
Some(v) => { vers = Some(v); }
505+
Some(v) => { vers = Some(v.to_managed()); }
506506
None => cmh_items.push(*meta)
507507
}
508508
} else { cmh_items.push(*meta); }
@@ -518,7 +518,7 @@ pub fn build_link_meta(sess: Session,
518518
// This calculates CMH as defined above
519519
fn crate_meta_extras_hash(symbol_hasher: &mut hash::State,
520520
cmh_items: ~[@ast::meta_item],
521-
dep_hashes: ~[@str]) -> @str {
521+
dep_hashes: ~[~str]) -> @str {
522522
fn len_and_str(s: &str) -> ~str {
523523
fmt!("%u_%s", s.len(), s)
524524
}
@@ -532,14 +532,14 @@ pub fn build_link_meta(sess: Session,
532532
fn hash(symbol_hasher: &mut hash::State, m: &@ast::meta_item) {
533533
match m.node {
534534
ast::meta_name_value(key, value) => {
535-
write_string(symbol_hasher, len_and_str(key));
535+
write_string(symbol_hasher, len_and_str(*key));
536536
write_string(symbol_hasher, len_and_str_lit(value));
537537
}
538538
ast::meta_word(name) => {
539-
write_string(symbol_hasher, len_and_str(name));
539+
write_string(symbol_hasher, len_and_str(*name));
540540
}
541541
ast::meta_list(name, ref mis) => {
542-
write_string(symbol_hasher, len_and_str(name));
542+
write_string(symbol_hasher, len_and_str(*name));
543543
for mis.each |m_| {
544544
hash(symbol_hasher, m_);
545545
}
@@ -706,7 +706,7 @@ pub fn mangle(sess: Session, ss: path) -> ~str {
706706

707707
for ss.each |s| {
708708
match *s { path_name(s) | path_mod(s) => {
709-
let sani = sanitize(sess.str_of(s));
709+
let sani = sanitize(*sess.str_of(s));
710710
n += fmt!("%u%s", sani.len(), sani);
711711
} }
712712
}
@@ -912,7 +912,7 @@ pub fn link_args(sess: Session,
912912
}
913913

914914
let ula = cstore::get_used_link_args(cstore);
915-
for ula.each |arg| { args.push(arg.to_owned()); }
915+
for ula.each |arg| { args.push(/*bad*/copy *arg); }
916916

917917
// Add all the link args for external crates.
918918
do cstore::iter_crate_data(cstore) |crate_num, _| {

0 commit comments

Comments
 (0)