Skip to content

Commit 3d88435

Browse files
committed
---
yaml --- r: 83530 b: refs/heads/try c: dd8d565 h: refs/heads/master v: v3
1 parent f0f86b9 commit 3d88435

File tree

28 files changed

+381
-253
lines changed

28 files changed

+381
-253
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: 0e4d1fc8cae42e15e00f71d9f439b01bb25a86ae
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
5-
refs/heads/try: cde44ea2885ceac0f4589387ecc8bfd566ac675c
5+
refs/heads/try: dd8d5650830b5af9c6e01503fa3c3284844ecd5c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ endif
141141

142142
# version-string calculation
143143
CFG_GIT_DIR := $(CFG_SRC_DIR).git
144-
CFG_RELEASE = 0.9-pre
144+
CFG_RELEASE = 0.8
145145
CFG_VERSION = $(CFG_RELEASE)
146146
# windows exe's need numeric versions - don't use anything but
147147
# numbers and dots here
148-
CFG_VERSION_WIN = 0.9
148+
CFG_VERSION_WIN = 0.8
149149

150150
ifneq ($(wildcard $(CFG_GIT)),)
151151
ifneq ($(wildcard $(CFG_GIT_DIR)),)

branches/try/mk/clean.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ clean-misc:
5454
$(Q)rm -Rf rust-stage0-*.tar.bz2 $(PKG_NAME)-*.tar.gz dist
5555
$(Q)rm -Rf $(foreach ext, \
5656
html aux cp fn ky log pdf pg toc tp vr cps, \
57-
$(wildcard doc/*.$(ext)))
58-
$(Q)find doc/std doc/extra -mindepth 1 | xargs rm -Rf
57+
$(wildcard doc/*.$(ext) \
58+
doc/*/*.$(ext) \
59+
doc/*/*/*.$(ext)))
5960
$(Q)rm -Rf doc/version.md
6061
$(Q)rm -Rf $(foreach sub, index styles files search javascript, \
6162
$(wildcard doc/*/$(sub)))

branches/try/src/etc/kate/rust.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!ENTITY rustIdent "[a-zA-Z_][a-zA-Z_0-9]*">
88
<!ENTITY rustIntSuf "([iu](8|16|32|64)?)?">
99
]>
10-
<language name="Rust" version="0.9-pre" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
10+
<language name="Rust" version="0.8" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
1111
<highlighting>
1212
<list name="fn">
1313
<item> fn </item>

branches/try/src/libextra/extra.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Rust extras are part of the standard Rust distribution.
2121
*/
2222

2323
#[link(name = "extra",
24-
vers = "0.9-pre",
24+
vers = "0.8",
2525
uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297",
2626
url = "https://github.com/mozilla/rust/tree/master/src/libextra")];
2727

branches/try/src/librust/rust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// FIXME #2238 Make run only accept source that emits an executable
1414

1515
#[link(name = "rust",
16-
vers = "0.9-pre",
16+
vers = "0.8",
1717
uuid = "4a24da33-5cc8-4037-9352-2cbe9bd9d27c",
1818
url = "https://github.com/mozilla/rust/tree/master/src/rust")];
1919

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use syntax::fold::ast_fold;
2020
use syntax::fold;
2121
use syntax::opt_vec;
2222

23-
static STD_VERSION: &'static str = "0.9-pre";
23+
static STD_VERSION: &'static str = "0.8";
2424

2525
pub fn maybe_inject_libstd_ref(sess: Session, crate: @ast::Crate)
2626
-> @ast::Crate {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ fn mk_std(cx: &TestCtxt) -> ast::view_item {
279279
path_node(~[id_extra]),
280280
ast::DUMMY_NODE_ID))])
281281
} else {
282-
let mi = attr::mk_name_value_item_str(@"vers", @"0.9-pre");
282+
let mi = attr::mk_name_value_item_str(@"vers", @"0.8");
283283
ast::view_item_extern_mod(id_extra, None, ~[mi], ast::DUMMY_NODE_ID)
284284
};
285285
ast::view_item {

branches/try/src/librustc/rustc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
#[link(name = "rustc",
12-
vers = "0.9-pre",
12+
vers = "0.8",
1313
uuid = "0ce89b41-2f92-459e-bbc1-8f5fe32f16cf",
1414
url = "https://github.com/mozilla/rust/tree/master/src/rustc")];
1515

branches/try/src/librustdoc/clean.rs

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl Clean<Crate> for visit_ast::RustdocVisitor {
8484
#[deriving(Clone, Encodable, Decodable)]
8585
pub struct Item {
8686
/// Stringified span
87-
source: ~str,
87+
source: Span,
8888
/// Not everything has a name. E.g., impls
8989
name: Option<~str>,
9090
attrs: ~[Attribute],
@@ -737,10 +737,28 @@ impl Clean<VariantKind> for ast::variant_kind {
737737
}
738738
}
739739

740-
impl Clean<~str> for syntax::codemap::Span {
741-
fn clean(&self) -> ~str {
742-
let cm = local_data::get(super::ctxtkey, |x| x.unwrap().clone()).sess.codemap;
743-
cm.span_to_str(*self)
740+
#[deriving(Clone, Encodable, Decodable)]
741+
pub struct Span {
742+
filename: ~str,
743+
loline: uint,
744+
locol: uint,
745+
hiline: uint,
746+
hicol: uint,
747+
}
748+
749+
impl Clean<Span> for syntax::codemap::Span {
750+
fn clean(&self) -> Span {
751+
let cm = local_data::get(super::ctxtkey, |x| *x.unwrap()).sess.codemap;
752+
let filename = cm.span_to_filename(*self);
753+
let lo = cm.lookup_char_pos(self.lo);
754+
let hi = cm.lookup_char_pos(self.hi);
755+
Span {
756+
filename: filename.to_owned(),
757+
loline: lo.line,
758+
locol: *lo.col,
759+
hiline: hi.line,
760+
hicol: *hi.col,
761+
}
744762
}
745763
}
746764

@@ -1034,7 +1052,7 @@ trait ToSource {
10341052

10351053
impl ToSource for syntax::codemap::Span {
10361054
fn to_src(&self) -> ~str {
1037-
debug!("converting span %s to snippet", self.clean());
1055+
debug!("converting span %? to snippet", self.clean());
10381056
let cm = local_data::get(super::ctxtkey, |x| x.unwrap().clone()).sess.codemap.clone();
10391057
let sn = match cm.span_to_snippet(*self) {
10401058
Some(x) => x,
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
use std::fmt;
12+
13+
pub struct Escape<'self>(&'self str);
14+
15+
impl<'self> fmt::Default for Escape<'self> {
16+
fn fmt(s: &Escape<'self>, fmt: &mut fmt::Formatter) {
17+
// Because the internet is always right, turns out there's not that many
18+
// characters to escape: http://stackoverflow.com/questions/7381974
19+
let pile_o_bits = s.as_slice();
20+
let mut last = 0;
21+
for (i, ch) in s.byte_iter().enumerate() {
22+
match ch as char {
23+
'<' | '>' | '&' | '\'' | '"' => {
24+
fmt.buf.write(pile_o_bits.slice(last, i).as_bytes());
25+
let s = match ch as char {
26+
'>' => "&gt;",
27+
'<' => "&lt;",
28+
'&' => "&amp;",
29+
'\'' => "&#39;",
30+
'"' => "&quot;",
31+
_ => unreachable!()
32+
};
33+
fmt.buf.write(s.as_bytes());
34+
last = i + 1;
35+
}
36+
_ => {}
37+
}
38+
}
39+
40+
if last < s.len() {
41+
fmt.buf.write(pile_o_bits.slice_from(last).as_bytes());
42+
}
43+
}
44+
}

branches/try/src/librustdoc/html/layout.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ pub fn render<T: fmt::Default, S: fmt::Default>(
6666
</form>
6767
</nav>
6868
69-
<section class=\"content {ty}\">{content}</section>
69+
<section id='main' class=\"content {ty}\">{content}</section>
70+
<section id='search' class=\"content hidden\"></section>
7071
7172
<section class=\"footer\"></section>
7273

0 commit comments

Comments
 (0)