Skip to content

Commit 49984e1

Browse files
committed
---
yaml --- r: 102099 b: refs/heads/master c: 5444da5 h: refs/heads/master i: 102097: bf8c45a 102095: 7af326b v: v3
1 parent a22eeaa commit 49984e1

File tree

11 files changed

+35
-246
lines changed

11 files changed

+35
-246
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: 8786405047cadcfb5ec3a2d711ca264d74843c13
2+
refs/heads/master: 5444da54fd32b705eec28112e309f63b704e3f8c
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6e7f170fedd3c526a643c0b2d13863acd982be02
55
refs/heads/try: a97642026c18a624ff6ea01075dd9550f8ed07ff

trunk/src/librustc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ This API is completely unstable and subject to change.
2828
html_root_url = "http://static.rust-lang.org/doc/master")];
2929

3030
#[feature(macro_rules, globs, struct_variant, managed_boxes)];
31-
#[allow(unknown_features)]; // Note: remove it after a snapshot.
3231
#[feature(quote)];
3332

3433
extern crate extra;

trunk/src/librustdoc/html/highlight.rs

Lines changed: 0 additions & 174 deletions
This file was deleted.

trunk/src/librustdoc/html/markdown.rs

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ use std::str;
3535
use std::intrinsics;
3636
use std::vec;
3737

38-
use html::highlight;
39-
4038
/// A unit struct which has the `fmt::Show` trait implemented. When
4139
/// formatted, this struct will emit the HTML corresponding to the rendered
4240
/// version of the contained markdown string.
@@ -97,7 +95,6 @@ extern {
9795
fn sd_markdown_free(md: *sd_markdown);
9896

9997
fn bufnew(unit: libc::size_t) -> *buf;
100-
fn bufputs(b: *buf, c: *libc::c_char);
10198
fn bufrelease(b: *buf);
10299

103100
}
@@ -130,27 +127,7 @@ pub fn render(w: &mut io::Writer, s: &str) -> fmt::Result {
130127
asize: text.len() as libc::size_t,
131128
unit: 0,
132129
};
133-
let rendered = if lang.is_null() {
134-
false
135-
} else {
136-
vec::raw::buf_as_slice((*lang).data,
137-
(*lang).size as uint, |rlang| {
138-
let rlang = str::from_utf8(rlang).unwrap();
139-
if rlang.contains("notrust") {
140-
(my_opaque.dfltblk)(ob, &buf, lang, opaque);
141-
true
142-
} else {
143-
false
144-
}
145-
})
146-
};
147-
148-
if !rendered {
149-
let output = highlight::highlight(text).to_c_str();
150-
output.with_ref(|r| {
151-
bufputs(ob, r)
152-
})
153-
}
130+
(my_opaque.dfltblk)(ob, &buf, lang, opaque);
154131
})
155132
}
156133
}
@@ -204,8 +181,7 @@ pub fn find_testable_code(doc: &str, tests: &mut ::test::Collector) {
204181
vec::raw::buf_as_slice((*lang).data,
205182
(*lang).size as uint, |lang| {
206183
let s = str::from_utf8(lang).unwrap();
207-
(s.contains("should_fail"), s.contains("ignore") ||
208-
s.contains("notrust"))
184+
(s.contains("should_fail"), s.contains("ignore"))
209185
})
210186
};
211187
if ignore { return }

trunk/src/librustdoc/html/render.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ use syntax::parse::token::InternedString;
5050
use clean;
5151
use doctree;
5252
use fold::DocFolder;
53+
use html::escape::Escape;
5354
use html::format::{VisSpace, Method, PuritySpace};
5455
use html::layout;
5556
use html::markdown::Markdown;
56-
use html::highlight;
5757

5858
/// Major driving force in all rustdoc rendering. This contains information
5959
/// about where in the tree-like hierarchy rendering is occurring and controls
@@ -1091,8 +1091,7 @@ fn item_module(w: &mut Writer, cx: &Context,
10911091

10921092
fn item_function(w: &mut Writer, it: &clean::Item,
10931093
f: &clean::Function) -> fmt::Result {
1094-
try!(write!(w, "<pre class='rust fn'>{vis}{purity}fn \
1095-
{name}{generics}{decl}</pre>",
1094+
try!(write!(w, "<pre class='fn'>{vis}{purity}fn {name}{generics}{decl}</pre>",
10961095
vis = VisSpace(it.visibility),
10971096
purity = PuritySpace(f.purity),
10981097
name = it.name.get_ref().as_slice(),
@@ -1113,7 +1112,7 @@ fn item_trait(w: &mut Writer, it: &clean::Item,
11131112
}
11141113

11151114
// Output the trait definition
1116-
try!(write!(w, "<pre class='rust trait'>{}trait {}{}{} ",
1115+
try!(write!(w, "<pre class='trait'>{}trait {}{}{} ",
11171116
VisSpace(it.visibility),
11181117
it.name.get_ref().as_slice(),
11191118
t.generics,
@@ -1232,7 +1231,7 @@ fn render_method(w: &mut Writer, meth: &clean::Item) -> fmt::Result {
12321231

12331232
fn item_struct(w: &mut Writer, it: &clean::Item,
12341233
s: &clean::Struct) -> fmt::Result {
1235-
try!(write!(w, "<pre class='rust struct'>"));
1234+
try!(write!(w, "<pre class='struct'>"));
12361235
try!(render_struct(w, it, Some(&s.generics), s.struct_type, s.fields,
12371236
s.fields_stripped, "", true));
12381237
try!(write!(w, "</pre>"));
@@ -1256,7 +1255,7 @@ fn item_struct(w: &mut Writer, it: &clean::Item,
12561255
}
12571256

12581257
fn item_enum(w: &mut Writer, it: &clean::Item, e: &clean::Enum) -> fmt::Result {
1259-
try!(write!(w, "<pre class='rust enum'>{}enum {}{}",
1258+
try!(write!(w, "<pre class='enum'>{}enum {}{}",
12601259
VisSpace(it.visibility),
12611260
it.name.get_ref().as_slice(),
12621261
e.generics));
@@ -1533,7 +1532,7 @@ fn render_impl(w: &mut Writer, i: &clean::Impl,
15331532

15341533
fn item_typedef(w: &mut Writer, it: &clean::Item,
15351534
t: &clean::Typedef) -> fmt::Result {
1536-
try!(write!(w, "<pre class='rust typedef'>type {}{} = {};</pre>",
1535+
try!(write!(w, "<pre class='typedef'>type {}{} = {};</pre>",
15371536
it.name.get_ref().as_slice(),
15381537
t.generics,
15391538
t.type_));
@@ -1626,7 +1625,9 @@ impl<'a> fmt::Show for Source<'a> {
16261625
try!(write!(fmt.buf, "<span id='{0:u}'>{0:1$u}</span>\n", i, cols));
16271626
}
16281627
try!(write!(fmt.buf, "</pre>"));
1629-
try!(write!(fmt.buf, "{}", highlight::highlight(s.as_slice())));
1628+
try!(write!(fmt.buf, "<pre class='rust'>"));
1629+
try!(write!(fmt.buf, "{}", Escape(s.as_slice())));
1630+
try!(write!(fmt.buf, "</pre>"));
16301631
Ok(())
16311632
}
16321633
}

trunk/src/librustdoc/html/static/main.css

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -303,18 +303,3 @@ a {
303303
.stability.Locked { border-color: #0084B6; color: #00668c; }
304304

305305
:target { background: #FDFFD3; }
306-
307-
pre.rust .kw { color: #cc782f; }
308-
pre.rust .kw-2 { color: #3bbb33; }
309-
pre.rust .prelude-ty { color: #3bbb33; }
310-
pre.rust .number { color: #c13928; }
311-
pre.rust .self { color: #c13928; }
312-
pre.rust .boolval { color: #c13928; }
313-
pre.rust .prelude-val { color: #c13928; }
314-
pre.rust .op { color: #cc782f; }
315-
pre.rust .comment { color: #533add; }
316-
pre.rust .doccomment { color: #d343d0; }
317-
pre.rust .macro { color: #d343d0; }
318-
pre.rust .string { color: #c13928; }
319-
pre.rust .lifetime { color: #d343d0; }
320-
pre.rust .attribute { color: #d343d0 !important; }

trunk/src/librustdoc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ pub mod core;
3838
pub mod doctree;
3939
pub mod fold;
4040
pub mod html {
41-
pub mod highlight;
4241
pub mod escape;
4342
pub mod format;
4443
pub mod layout;

0 commit comments

Comments
 (0)