Skip to content

Commit 1b3578d

Browse files
Seldaekalexcrichton
authored andcommitted
---
yaml --- r: 95150 b: refs/heads/dist-snap c: 1501d65 h: refs/heads/master v: v3
1 parent 2b5d46c commit 1b3578d

File tree

23 files changed

+76
-172
lines changed

23 files changed

+76
-172
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: b637798a5aa7878daa57c147028e98f2c5bc03c5
9+
refs/heads/dist-snap: 1501d6511278028f1dfe597c85141dd835f0f073
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libextra/getopts.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,13 @@ use std::vec;
8585

8686
/// Name of an option. Either a string or a single char.
8787
#[deriving(Clone, Eq)]
88-
#[allow(missing_doc)]
8988
pub enum Name {
9089
Long(~str),
9190
Short(char),
9291
}
9392

9493
/// Describes whether an option has an argument.
9594
#[deriving(Clone, Eq)]
96-
#[allow(missing_doc)]
9795
pub enum HasArg {
9896
Yes,
9997
No,
@@ -102,7 +100,6 @@ pub enum HasArg {
102100

103101
/// Describes how often an option may occur.
104102
#[deriving(Clone, Eq)]
105-
#[allow(missing_doc)]
106103
pub enum Occur {
107104
Req,
108105
Optional,
@@ -144,7 +141,6 @@ pub struct Matches {
144141
/// The type returned when the command line does not conform to the
145142
/// expected format. Pass this value to <fail_str> to get an error message.
146143
#[deriving(Clone, Eq, ToStr)]
147-
#[allow(missing_doc)]
148144
pub enum Fail_ {
149145
ArgumentMissing(~str),
150146
UnrecognizedOption(~str),
@@ -155,7 +151,6 @@ pub enum Fail_ {
155151

156152
/// The type of failure that occured.
157153
#[deriving(Eq)]
158-
#[allow(missing_doc)]
159154
pub enum FailType {
160155
ArgumentMissing_,
161156
UnrecognizedOption_,

branches/dist-snap/src/libextra/list.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@
1313

1414

1515
#[deriving(Clone, Eq)]
16-
#[allow(missing_doc)]
1716
pub enum List<T> {
1817
Cons(T, @List<T>),
1918
Nil,
2019
}
2120

2221
#[deriving(Eq)]
23-
#[allow(missing_doc)]
2422
pub enum MutList<T> {
2523
MutCons(T, @mut MutList<T>),
2624
MutNil,

branches/dist-snap/src/libextra/semver.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ use std::to_str::ToStr;
3838
/// An identifier in the pre-release or build metadata. If the identifier can
3939
/// be parsed as a decimal value, it will be represented with `Numeric`.
4040
#[deriving(Clone, Eq)]
41-
#[allow(missing_doc)]
4241
pub enum Identifier {
4342
Numeric(uint),
4443
AlphaNumeric(~str)

branches/dist-snap/src/libextra/terminfo/parm.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ enum FormatState {
3939

4040
/// Types of parameters a capability can use
4141
#[deriving(Clone)]
42-
#[allow(missing_doc)]
4342
pub enum Param {
4443
String(~str),
4544
Number(int)

branches/dist-snap/src/libextra/time.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,7 @@ fn do_strftime(format: &str, tm: &Tm) -> ~str {
788788
}
789789

790790
fn parse_type(ch: char, tm: &Tm) -> ~str {
791+
//FIXME (#2350): Implement missing types.
791792
let die = || format!("strftime: can't understand this format {} ", ch);
792793
match ch {
793794
'A' => match tm.tm_wday as int {
@@ -919,9 +920,10 @@ fn do_strftime(format: &str, tm: &Tm) -> ~str {
919920
parse_type('b', tm),
920921
parse_type('Y', tm))
921922
}
922-
'W' => format!("{:02d}", (tm.tm_yday - (tm.tm_wday - 1 + 7) % 7 + 7)
923-
/ 7),
923+
//'W' {}
924924
'w' => (tm.tm_wday as int).to_str(),
925+
//'X' {}
926+
//'x' {}
925927
'Y' => (tm.tm_year as int + 1900).to_str(),
926928
'y' => format!("{:02d}", (tm.tm_year as int + 1900) % 100),
927929
'Z' => tm.tm_zone.clone(),
@@ -932,7 +934,7 @@ fn do_strftime(format: &str, tm: &Tm) -> ~str {
932934
m -= h * 60_i32;
933935
format!("{}{:02d}{:02d}", sign, h, m)
934936
}
935-
'+' => tm.rfc3339(),
937+
//'+' {}
936938
'%' => ~"%",
937939
_ => die()
938940
}
@@ -1295,13 +1297,12 @@ mod tests {
12951297
assert_eq!(local.strftime("%u"), ~"5");
12961298
assert_eq!(local.strftime("%V"), ~"07");
12971299
assert_eq!(local.strftime("%v"), ~"13-Feb-2009");
1298-
assert_eq!(local.strftime("%W"), ~"06");
1300+
// assert!(local.strftime("%W") == "06");
12991301
assert_eq!(local.strftime("%w"), ~"5");
1300-
assert_eq!(local.strftime("%X"), ~"15:31:30"); // FIXME (#2350): support locale
1301-
assert_eq!(local.strftime("%x"), ~"02/13/09"); // FIXME (#2350): support locale
1302+
// handle "%X"
1303+
// handle "%x"
13021304
assert_eq!(local.strftime("%Y"), ~"2009");
13031305
assert_eq!(local.strftime("%y"), ~"09");
1304-
assert_eq!(local.strftime("%+"), ~"2009-02-13T15:31:30-08:00");
13051306
13061307
// FIXME (#2350): We should probably standardize on the timezone
13071308
// abbreviation.

branches/dist-snap/src/libextra/uuid.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ struct UuidFields {
116116
}
117117

118118
/// Error details for string parsing failures
119-
#[allow(missing_doc)]
120119
pub enum ParseError {
121120
ErrorInvalidLength(uint),
122121
ErrorInvalidCharacter(char, uint),

branches/dist-snap/src/librustc/middle/lint.rs

Lines changed: 12 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,18 +1351,6 @@ impl MissingDocLintVisitor {
13511351
// otherwise, warn!
13521352
cx.span_lint(missing_doc, sp, msg);
13531353
}
1354-
1355-
fn check_struct(&mut self, cx: @mut Context, sdef: @ast::struct_def) {
1356-
for field in sdef.fields.iter() {
1357-
match field.node.kind {
1358-
ast::named_field(_, vis) if vis != ast::private => {
1359-
self.check_attrs(cx, field.node.attrs, field.span,
1360-
"missing documentation for a field");
1361-
}
1362-
ast::unnamed_field | ast::named_field(*) => {}
1363-
}
1364-
}
1365-
}
13661354
}
13671355

13681356
impl Visitor<@mut Context> for MissingDocLintVisitor {
@@ -1407,49 +1395,35 @@ impl SubitemStoppableVisitor for MissingDocLintVisitor {
14071395
}
14081396

14091397
fn visit_item_action(&mut self, it:@ast::item, cx:@mut Context) {
1410-
if it.vis != ast::public {
1411-
return;
1412-
}
14131398

14141399
match it.node {
14151400
// Go ahead and match the fields here instead of using
14161401
// visit_struct_field while we have access to the enclosing
14171402
// struct's visibility
1418-
ast::item_struct(sdef, _) => {
1403+
ast::item_struct(sdef, _) if it.vis == ast::public => {
14191404
self.check_attrs(cx, it.attrs, it.span,
14201405
"missing documentation for a struct");
1421-
self.check_struct(cx, sdef);
1406+
for field in sdef.fields.iter() {
1407+
match field.node.kind {
1408+
ast::named_field(_, vis) if vis != ast::private => {
1409+
self.check_attrs(cx, field.node.attrs, field.span,
1410+
"missing documentation for a field");
1411+
}
1412+
ast::unnamed_field | ast::named_field(*) => {}
1413+
}
1414+
}
14221415
}
14231416

1424-
ast::item_trait(*) => {
1417+
ast::item_trait(*) if it.vis == ast::public => {
14251418
self.check_attrs(cx, it.attrs, it.span,
14261419
"missing documentation for a trait");
14271420
}
14281421

1429-
ast::item_fn(*) => {
1422+
ast::item_fn(*) if it.vis == ast::public => {
14301423
self.check_attrs(cx, it.attrs, it.span,
14311424
"missing documentation for a function");
14321425
}
14331426

1434-
ast::item_enum(ref edef, _) => {
1435-
self.check_attrs(cx, it.attrs, it.span,
1436-
"missing documentation for an enum");
1437-
for variant in edef.variants.iter() {
1438-
if variant.node.vis == ast::private {
1439-
continue;
1440-
}
1441-
1442-
self.check_attrs(cx, variant.node.attrs, variant.span,
1443-
"missing documentation for a variant");
1444-
match variant.node.kind {
1445-
ast::struct_variant_kind(sdef) => {
1446-
self.check_struct(cx, sdef);
1447-
}
1448-
_ => ()
1449-
}
1450-
}
1451-
}
1452-
14531427
_ => {}
14541428
}
14551429
}

branches/dist-snap/src/librustc/middle/trans/intrinsic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pub fn trans_intrinsic(ccx: @mut CrateContext,
6565
let val = Call(bcx, llfn, [a, b], []);
6666
let result = ExtractValue(bcx, val, 0);
6767
let overflow = ZExt(bcx, ExtractValue(bcx, val, 1), Type::bool());
68-
let ret = C_undef(type_of::type_of(bcx.ccx(), t));
68+
let ret = Load(bcx, Alloca(bcx, type_of::type_of(bcx.ccx(), t), ""));
6969
let ret = InsertValue(bcx, ret, result, 0);
7070
let ret = InsertValue(bcx, ret, overflow, 1);
7171

branches/dist-snap/src/librustdoc/html/static/main.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ body {
121121

122122
.content pre.line-numbers { float: left; border: none; }
123123
.line-numbers span { color: #c67e2d; }
124+
.line-numbers .line-highlighted {
125+
background-color: #fff871;
126+
}
124127

125128
.content .highlighted {
126129
cursor: pointer;

branches/dist-snap/src/librustdoc/html/static/main.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,25 @@
3131
resizeShortBlocks();
3232
$(window).on('resize', resizeShortBlocks);
3333

34+
function highlightSourceLines() {
35+
var i, from, to, match = window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);
36+
if (match) {
37+
from = parseInt(match[1], 10);
38+
to = Math.min(50000, parseInt(match[2] || match[1], 10));
39+
from = Math.min(from, to);
40+
if ($('#' + from).length === 0) {
41+
return;
42+
}
43+
$('#' + from)[0].scrollIntoView();
44+
$('.line-numbers span').removeClass('line-highlighted');
45+
for (i = from; i <= to; i += 1) {
46+
$('#' + i).addClass('line-highlighted');
47+
}
48+
}
49+
}
50+
highlightSourceLines();
51+
$(window).on('hashchange', highlightSourceLines);
52+
3453
$(document).on('keyup', function (e) {
3554
if (document.activeElement.tagName === 'INPUT') {
3655
return;

branches/dist-snap/src/libstd/fmt/parse.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,17 @@ pub struct FormatSpec<'self> {
6161

6262
/// Enum describing where an argument for a format can be located.
6363
#[deriving(Eq)]
64-
#[allow(missing_doc)]
6564
pub enum Position<'self> {
6665
ArgumentNext, ArgumentIs(uint), ArgumentNamed(&'self str)
6766
}
6867

6968
/// Enum of alignments which are supported.
7069
#[deriving(Eq)]
71-
#[allow(missing_doc)]
7270
pub enum Alignment { AlignLeft, AlignRight, AlignUnknown }
7371

7472
/// Various flags which can be applied to format strings, the meaning of these
7573
/// flags is defined by the formatters themselves.
7674
#[deriving(Eq)]
77-
#[allow(missing_doc)]
7875
pub enum Flag {
7976
FlagSignPlus,
8077
FlagSignMinus,
@@ -85,7 +82,6 @@ pub enum Flag {
8582
/// A count is used for the precision and width parameters of an integer, and
8683
/// can reference either an argument or a literal integer.
8784
#[deriving(Eq)]
88-
#[allow(missing_doc)]
8985
pub enum Count {
9086
CountIs(uint),
9187
CountIsParam(uint),
@@ -130,7 +126,6 @@ pub struct PluralArm<'self> {
130126
///
131127
/// http://www.icu-project.org/apiref/icu4c/classicu_1_1PluralRules.html
132128
#[deriving(Eq, IterBytes)]
133-
#[allow(missing_doc)]
134129
pub enum PluralKeyword {
135130
Zero, One, Two, Few, Many
136131
}

branches/dist-snap/src/libstd/local_data.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ use util;
5959
*/
6060
pub type Key<T> = &'static KeyValue<T>;
6161

62-
#[allow(missing_doc)]
6362
pub enum KeyValue<T> { Key }
6463

6564
trait LocalData {}

branches/dist-snap/src/libstd/option.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ use clone::DeepClone;
5656

5757
/// The option type
5858
#[deriving(Clone, DeepClone, Eq)]
59-
#[allow(missing_doc)]
6059
pub enum Option<T> {
6160
None,
6261
Some(T),

branches/dist-snap/src/libstd/rt/io/native/file.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ use libc::{c_int, FILE};
1717
#[allow(non_camel_case_types)]
1818
pub type fd_t = c_int;
1919

20-
pub struct FileDesc {
21-
priv fd: fd_t
22-
}
20+
// Make this a newtype so we can't do I/O on arbitrary integers
21+
pub struct FileDesc(fd_t);
2322

2423
impl FileDesc {
2524
/// Create a `FileDesc` from an open C file descriptor.
@@ -47,9 +46,7 @@ impl Seek for FileDesc {
4746
fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail2!() }
4847
}
4948

50-
pub struct CFile {
51-
priv file: *FILE
52-
}
49+
pub struct CFile(*FILE);
5350

5451
impl CFile {
5552
/// Create a `CFile` from an open `FILE` pointer.

0 commit comments

Comments
 (0)