Skip to content

Commit f9393cb

Browse files
committed
---
yaml --- r: 146078 b: refs/heads/try2 c: f69795e h: refs/heads/master v: v3
1 parent b60aff6 commit f9393cb

37 files changed

+241
-547
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 7e4404b6fbbf28bbe115ab8837f929e51c831a31
8+
refs/heads/try2: f69795e443b73ac875092e54774b4666ca203aa5
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/doc/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ To generate HTML documentation from one source file/crate, do something like:
1919
To generate an HTML version of a doc from Markdown, without having Node.js
2020
installed, do something like:
2121

22-
pandoc --from=markdown --to=html --number-sections -o rust.html rust.md
22+
pandoc --from=markdown --to=html5 --number-sections -o rust.html rust.md
2323

2424
The syntax for pandoc flavored markdown can be found at:
2525
http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown

branches/try2/mk/docs.mk

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ doc/rust.html: rust.md doc/version_info.html doc/rust.css doc/manual.css
4848
--standalone --toc \
4949
--section-divs \
5050
--number-sections \
51-
--from=markdown --to=html \
51+
--from=markdown --to=html5 \
5252
--css=rust.css \
5353
--css=manual.css \
5454
--include-before-body=doc/version_info.html \
@@ -73,7 +73,7 @@ doc/rustpkg.html: rustpkg.md doc/version_info.html doc/rust.css doc/manual.css
7373
--standalone --toc \
7474
--section-divs \
7575
--number-sections \
76-
--from=markdown --to=html \
76+
--from=markdown --to=html5 \
7777
--css=rust.css \
7878
--css=manual.css \
7979
--include-before-body=doc/version_info.html \
@@ -85,7 +85,7 @@ doc/tutorial.html: tutorial.md doc/version_info.html doc/rust.css
8585
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
8686
$(CFG_PANDOC) --standalone --toc \
8787
--section-divs --number-sections \
88-
--from=markdown --to=html --css=rust.css \
88+
--from=markdown --to=html5 --css=rust.css \
8989
--include-before-body=doc/version_info.html \
9090
--output=$@
9191

@@ -95,7 +95,7 @@ doc/l10n/ja/tutorial.html: doc/l10n/ja/tutorial.md doc/version_info.html doc/rus
9595
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight doc/l10n/ja/tutorial.md | \
9696
$(CFG_PANDOC) --standalone --toc \
9797
--section-divs --number-sections \
98-
--from=markdown --to=html --css=../../rust.css \
98+
--from=markdown --to=html5 --css=../../rust.css \
9999
--include-before-body=doc/version_info.html \
100100
--output=$@
101101

@@ -106,7 +106,7 @@ doc/tutorial-macros.html: tutorial-macros.md doc/version_info.html \
106106
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
107107
$(CFG_PANDOC) --standalone --toc \
108108
--section-divs --number-sections \
109-
--from=markdown --to=html --css=rust.css \
109+
--from=markdown --to=html5 --css=rust.css \
110110
--include-before-body=doc/version_info.html \
111111
--output=$@
112112

@@ -116,7 +116,7 @@ doc/tutorial-container.html: tutorial-container.md doc/version_info.html doc/rus
116116
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
117117
$(CFG_PANDOC) --standalone --toc \
118118
--section-divs --number-sections \
119-
--from=markdown --to=html --css=rust.css \
119+
--from=markdown --to=html5 --css=rust.css \
120120
--include-before-body=doc/version_info.html \
121121
--output=$@
122122

@@ -126,7 +126,7 @@ doc/tutorial-ffi.html: tutorial-ffi.md doc/version_info.html doc/rust.css
126126
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
127127
$(CFG_PANDOC) --standalone --toc \
128128
--section-divs --number-sections \
129-
--from=markdown --to=html --css=rust.css \
129+
--from=markdown --to=html5 --css=rust.css \
130130
--include-before-body=doc/version_info.html \
131131
--output=$@
132132

@@ -136,7 +136,7 @@ doc/tutorial-borrowed-ptr.html: tutorial-borrowed-ptr.md doc/version_info.html d
136136
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
137137
$(CFG_PANDOC) --standalone --toc \
138138
--section-divs --number-sections \
139-
--from=markdown --to=html --css=rust.css \
139+
--from=markdown --to=html5 --css=rust.css \
140140
--include-before-body=doc/version_info.html \
141141
--output=$@
142142

@@ -146,7 +146,7 @@ doc/tutorial-tasks.html: tutorial-tasks.md doc/version_info.html doc/rust.css
146146
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
147147
$(CFG_PANDOC) --standalone --toc \
148148
--section-divs --number-sections \
149-
--from=markdown --to=html --css=rust.css \
149+
--from=markdown --to=html5 --css=rust.css \
150150
--include-before-body=doc/version_info.html \
151151
--output=$@
152152

@@ -156,7 +156,7 @@ doc/tutorial-conditions.html: tutorial-conditions.md doc/version_info.html doc/r
156156
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
157157
$(CFG_PANDOC) --standalone --toc \
158158
--section-divs --number-sections \
159-
--from=markdown --to=html --css=rust.css \
159+
--from=markdown --to=html5 --css=rust.css \
160160
--include-before-body=doc/version_info.html \
161161
--output=$@
162162

@@ -166,7 +166,7 @@ doc/tutorial-rustpkg.html: tutorial-rustpkg.md doc/version_info.html doc/rust.cs
166166
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
167167
$(CFG_PANDOC) --standalone --toc \
168168
--section-divs --number-sections \
169-
--from=markdown --to=html --css=rust.css \
169+
--from=markdown --to=html5 --css=rust.css \
170170
--include-before-body=doc/version_info.html \
171171
--output=$@
172172

branches/try2/src/driver/driver.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ extern mod this(name = "rustpkg");
1414
#[cfg(rustdoc)]
1515
extern mod this(name = "rustdoc");
1616

17+
#[cfg(rusti)]
18+
extern mod this(name = "rusti");
19+
20+
#[cfg(rust)]
21+
extern mod this(name = "rust");
22+
1723
#[cfg(rustc)]
1824
extern mod this(name = "rustc");
1925

branches/try2/src/libextra/glob.rs

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -39,32 +39,32 @@ pub struct GlobIterator {
3939
priv todo: ~[(Path,uint)]
4040
}
4141

42-
///
43-
/// Return an iterator that produces all the Paths that match the given pattern,
44-
/// which may be absolute or relative to the current working directory.
45-
///
46-
/// is method uses the default match options and is equivalent to calling
47-
/// `glob_with(pattern, MatchOptions::new())`. Use `glob_with` directly if you
48-
/// want to use non-default match options.
49-
///
50-
/// # Example
51-
///
52-
/// Consider a directory `/media/pictures` containing only the files `kittens.jpg`,
53-
/// `puppies.jpg` and `hamsters.gif`:
54-
///
55-
/// ```rust
56-
/// for path in glob("/media/pictures/*.jpg") {
57-
/// println(path.to_str());
58-
/// }
59-
/// ```
60-
///
61-
/// The above code will print:
62-
///
63-
/// ```
64-
/// /media/pictures/kittens.jpg
65-
/// /media/pictures/puppies.jpg
66-
/// ```
67-
///
42+
/**
43+
* Return an iterator that produces all the Paths that match the given pattern,
44+
* which may be absolute or relative to the current working directory.
45+
*
46+
* This method uses the default match options and is equivalent to calling
47+
* `glob_with(pattern, MatchOptions::new())`. Use `glob_with` directly if you
48+
* want to use non-default match options.
49+
*
50+
* # Example
51+
*
52+
* Consider a directory `/media/pictures` containing only the files `kittens.jpg`,
53+
* `puppies.jpg` and `hamsters.gif`:
54+
*
55+
* ```rust
56+
* for path in glob("/media/pictures/*.jpg") {
57+
* println(path.to_str());
58+
* }
59+
* ```
60+
*
61+
* The above code will print:
62+
*
63+
* ```
64+
* /media/pictures/kittens.jpg
65+
* /media/pictures/puppies.jpg
66+
* ```
67+
*/
6868
pub fn glob(pattern: &str) -> GlobIterator {
6969
glob_with(pattern, MatchOptions::new())
7070
}

branches/try2/src/librustc/back/link.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ pub mod write {
297297
if !sess.no_prepopulate_passes() {
298298
llvm::LLVMRustAddAnalysisPasses(tm, fpm, llmod);
299299
llvm::LLVMRustAddAnalysisPasses(tm, mpm, llmod);
300-
populate_llvm_passes(fpm, mpm, llmod, OptLevel);
300+
populate_llvm_passess(fpm, mpm, llmod, OptLevel);
301301
}
302302

303303
for pass in sess.opts.custom_passes.iter() {
@@ -422,10 +422,10 @@ pub mod write {
422422
}
423423
}
424424

425-
unsafe fn populate_llvm_passes(fpm: lib::llvm::PassManagerRef,
426-
mpm: lib::llvm::PassManagerRef,
427-
llmod: ModuleRef,
428-
opt: lib::llvm::CodeGenOptLevel) {
425+
unsafe fn populate_llvm_passess(fpm: lib::llvm::PassManagerRef,
426+
mpm: lib::llvm::PassManagerRef,
427+
llmod: ModuleRef,
428+
opt: lib::llvm::CodeGenOptLevel) {
429429
// Create the PassManagerBuilder for LLVM. We configure it with
430430
// reasonable defaults and prepare it to actually populate the pass
431431
// manager.

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

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
3434
("macro_rules", Active),
3535
("struct_variant", Active),
3636
("once_fns", Active),
37-
("asm", Active),
3837

3938
// These are used to test this portion of the compiler, they don't actually
4039
// mean anything
@@ -109,29 +108,26 @@ impl Visitor<()> for Context {
109108
}
110109
}
111110

111+
ast::item_mac(ref mac) => {
112+
match mac.node {
113+
ast::mac_invoc_tt(ref path, _, _) => {
114+
let rules = self.sess.ident_of("macro_rules");
115+
if path.segments.last().identifier == rules {
116+
self.gate_feature("macro_rules", i.span,
117+
"macro definitions are not \
118+
stable enough for use and are \
119+
subject to change");
120+
}
121+
}
122+
}
123+
}
124+
112125
_ => {}
113126
}
114127

115128
visit::walk_item(self, i, ());
116129
}
117130

118-
fn visit_mac(&mut self, macro: &ast::mac, _: ()) {
119-
let ast::mac_invoc_tt(ref path, _, _) = macro.node;
120-
121-
if path.segments.last().identifier == self.sess.ident_of("macro_rules") {
122-
self.gate_feature("macro_rules", path.span, "macro definitions are \
123-
not stable enough for use and are subject to change");
124-
}
125-
126-
else if path.segments.last().identifier == self.sess.ident_of("asm") {
127-
// NOTE: remove the false once the ASM feature is in the next snapshot
128-
if false {
129-
self.gate_feature("asm", path.span, "inline assembly is not \
130-
stable enough for use and is subject to change");
131-
}
132-
}
133-
}
134-
135131
fn visit_ty(&mut self, t: &ast::Ty, _: ()) {
136132
match t.node {
137133
ast::ty_closure(closure) if closure.onceness == ast::Once => {

branches/try2/src/librustc/middle/privacy.rs

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -563,20 +563,6 @@ impl<'self> PrivacyVisitor<'self> {
563563
}
564564
}
565565
};
566-
let check_struct = |def: &@ast::struct_def| {
567-
for f in def.fields.iter() {
568-
match f.node.kind {
569-
ast::named_field(_, ast::public) => {
570-
tcx.sess.span_err(f.span, "unnecessary `pub` \
571-
visibility");
572-
}
573-
ast::named_field(_, ast::private) => {
574-
// Fields should really be private by default...
575-
}
576-
ast::named_field(*) | ast::unnamed_field => {}
577-
}
578-
}
579-
};
580566
match item.node {
581567
// implementations of traits don't need visibility qualifiers because
582568
// that's controlled by having the trait in scope.
@@ -624,16 +610,24 @@ impl<'self> PrivacyVisitor<'self> {
624610
}
625611
ast::inherited => {}
626612
}
613+
}
614+
}
627615

628-
match v.node.kind {
629-
ast::struct_variant_kind(ref s) => check_struct(s),
630-
ast::tuple_variant_kind(*) => {}
616+
ast::item_struct(ref def, _) => {
617+
for f in def.fields.iter() {
618+
match f.node.kind {
619+
ast::named_field(_, ast::public) => {
620+
tcx.sess.span_err(f.span, "unnecessary `pub` \
621+
visibility");
622+
}
623+
ast::named_field(_, ast::private) => {
624+
// Fields should really be private by default...
625+
}
626+
ast::named_field(*) | ast::unnamed_field => {}
631627
}
632628
}
633629
}
634630

635-
ast::item_struct(ref def, _) => check_struct(def),
636-
637631
ast::item_trait(_, _, ref methods) => {
638632
for m in methods.iter() {
639633
match *m {

branches/try2/src/librustc/middle/trans/base.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2797,23 +2797,13 @@ pub fn declare_intrinsics(llmod: ModuleRef) -> HashMap<&'static str, ValueRef> {
27972797

27982798
ifn!(intrinsics, "llvm.fabs.f32", [Type::f32()], Type::f32());
27992799
ifn!(intrinsics, "llvm.fabs.f64", [Type::f64()], Type::f64());
2800-
ifn!(intrinsics, "llvm.copysign.f32", [Type::f32(), Type::f32()], Type::f32());
2801-
ifn!(intrinsics, "llvm.copysign.f64", [Type::f64(), Type::f64()], Type::f64());
2802-
28032800
ifn!(intrinsics, "llvm.floor.f32",[Type::f32()], Type::f32());
28042801
ifn!(intrinsics, "llvm.floor.f64",[Type::f64()], Type::f64());
28052802
ifn!(intrinsics, "llvm.ceil.f32", [Type::f32()], Type::f32());
28062803
ifn!(intrinsics, "llvm.ceil.f64", [Type::f64()], Type::f64());
28072804
ifn!(intrinsics, "llvm.trunc.f32",[Type::f32()], Type::f32());
28082805
ifn!(intrinsics, "llvm.trunc.f64",[Type::f64()], Type::f64());
28092806

2810-
ifn!(intrinsics, "llvm.rint.f32", [Type::f32()], Type::f32());
2811-
ifn!(intrinsics, "llvm.rint.f64", [Type::f64()], Type::f64());
2812-
ifn!(intrinsics, "llvm.nearbyint.f32", [Type::f32()], Type::f32());
2813-
ifn!(intrinsics, "llvm.nearbyint.f64", [Type::f64()], Type::f64());
2814-
ifn!(intrinsics, "llvm.round.f32", [Type::f32()], Type::f32());
2815-
ifn!(intrinsics, "llvm.round.f64", [Type::f64()], Type::f64());
2816-
28172807
ifn!(intrinsics, "llvm.ctpop.i8", [Type::i8()], Type::i8());
28182808
ifn!(intrinsics, "llvm.ctpop.i16",[Type::i16()], Type::i16());
28192809
ifn!(intrinsics, "llvm.ctpop.i32",[Type::i32()], Type::i32());

branches/try2/src/librustc/middle/trans/intrinsic.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -460,20 +460,12 @@ pub fn trans_intrinsic(ccx: @mut CrateContext,
460460
"fmaf64" => simple_llvm_intrinsic(bcx, "llvm.fma.f64", 3),
461461
"fabsf32" => simple_llvm_intrinsic(bcx, "llvm.fabs.f32", 1),
462462
"fabsf64" => simple_llvm_intrinsic(bcx, "llvm.fabs.f64", 1),
463-
"copysignf32" => simple_llvm_intrinsic(bcx, "llvm.copysign.f32", 2),
464-
"copysignf64" => simple_llvm_intrinsic(bcx, "llvm.copysign.f64", 2),
465463
"floorf32" => simple_llvm_intrinsic(bcx, "llvm.floor.f32", 1),
466464
"floorf64" => simple_llvm_intrinsic(bcx, "llvm.floor.f64", 1),
467465
"ceilf32" => simple_llvm_intrinsic(bcx, "llvm.ceil.f32", 1),
468466
"ceilf64" => simple_llvm_intrinsic(bcx, "llvm.ceil.f64", 1),
469467
"truncf32" => simple_llvm_intrinsic(bcx, "llvm.trunc.f32", 1),
470468
"truncf64" => simple_llvm_intrinsic(bcx, "llvm.trunc.f64", 1),
471-
"rintf32" => simple_llvm_intrinsic(bcx, "llvm.rint.f32", 1),
472-
"rintf64" => simple_llvm_intrinsic(bcx, "llvm.rint.f64", 1),
473-
"nearbyintf32" => simple_llvm_intrinsic(bcx, "llvm.nearbyint.f32", 1),
474-
"nearbyintf64" => simple_llvm_intrinsic(bcx, "llvm.nearbyint.f64", 1),
475-
"roundf32" => simple_llvm_intrinsic(bcx, "llvm.round.f32", 1),
476-
"roundf64" => simple_llvm_intrinsic(bcx, "llvm.round.f64", 1),
477469
"ctpop8" => simple_llvm_intrinsic(bcx, "llvm.ctpop.i8", 1),
478470
"ctpop16" => simple_llvm_intrinsic(bcx, "llvm.ctpop.i16", 1),
479471
"ctpop32" => simple_llvm_intrinsic(bcx, "llvm.ctpop.i32", 1),

0 commit comments

Comments
 (0)