Skip to content

Commit 5bd4aee

Browse files
committed
---
yaml --- r: 83334 b: refs/heads/try c: 40834a0 h: refs/heads/master v: v3
1 parent fed65d1 commit 5bd4aee

File tree

9 files changed

+66
-25
lines changed

9 files changed

+66
-25
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: 83499d1a89ef4e38a0cd0fc02316539a836e24a2
5+
refs/heads/try: 40834a0c23b32416af6a04512c6937004e487a88
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/mk/tools.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ RUSTPKG_INPUTS := $(wildcard $(S)src/librustpkg/*.rs)
2121

2222
# Rustdoc, the documentation tool
2323
RUSTDOC_LIB := $(S)src/librustdoc/rustdoc.rs
24-
RUSTDOC_INPUTS := $(wildcard $(addprefix $(S)src/librustdoc/, \
25-
*.rs */*.rs */*/*.rs))
24+
RUSTDOC_INPUTS := $(wildcard $(S)src/librustdoc/*.rs)
2625

2726
# Rusti, the JIT REPL
2827
RUSTI_LIB := $(S)src/librusti/rusti.rs

branches/try/src/etc/vim/syntax/rust.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:spac
3434
syn match rustFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
3535

3636
" Reserved (but not yet used) keywords {{{2
37-
syn keyword rustKeyword be yield typeof
37+
syn keyword rustKeyword alignof be offsetof pure sizeof typeof yield
3838

3939
" Built-in types {{{2
4040
syn keyword rustType int uint float char bool u8 u16 u32 u64 f32

branches/try/src/libextra/semver.rs

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,25 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! Semver parsing and logic
12-
13-
#[allow(missing_doc)];
14-
11+
//! Semantic version parsing and comparison.
12+
//!
13+
//! Semantic versioning (see http://semver.org/) is a set of rules for
14+
//! assigning version numbers intended to convey meaning about what has
15+
//! changed, and how much. A version number has five parts:
16+
//!
17+
//! * Major number, updated for incompatible API changes
18+
//! * Minor number, updated for backwards-compatible API additions
19+
//! * Patch number, updated for backwards-compatible bugfixes
20+
//! * Pre-release information (optional), preceded by a hyphen (`-`)
21+
//! * Build metadata (optional), preceded by a plus sign (`+`)
22+
//!
23+
//! The three mandatory components are required to be decimal numbers. The
24+
//! pre-release information and build metadata are required to be a
25+
//! period-separated list of identifiers containing only alphanumeric
26+
//! characters and hyphens.
27+
//!
28+
//! An example version number with all five components is
29+
//! `0.8.1-rc.3.0+20130922.linux`.
1530
1631
use std::char;
1732
use std::cmp;
@@ -20,6 +35,8 @@ use std::io;
2035
use std::option::{Option, Some, None};
2136
use std::to_str::ToStr;
2237

38+
/// An identifier in the pre-release or build metadata. If the identifier can
39+
/// be parsed as a decimal value, it will be represented with `Numeric`.
2340
#[deriving(Clone, Eq)]
2441
pub enum Identifier {
2542
Numeric(uint),
@@ -49,12 +66,20 @@ impl ToStr for Identifier {
4966
}
5067

5168

69+
/// Represents a version number conforming to the semantic versioning scheme.
5270
#[deriving(Clone, Eq)]
5371
pub struct Version {
72+
/// The major version, to be incremented on incompatible changes.
5473
major: uint,
74+
/// The minor version, to be incremented when functionality is added in a
75+
/// backwards-compatible manner.
5576
minor: uint,
77+
/// The patch version, to be incremented when backwards-compatible bug
78+
/// fixes are made.
5679
patch: uint,
80+
/// The pre-release version identifier, if one exists.
5781
pre: ~[Identifier],
82+
/// The build metadata, ignored when determining version precedence.
5883
build: ~[Identifier],
5984
}
6085

@@ -202,6 +227,7 @@ fn parse_reader(rdr: @io::Reader) -> Version {
202227
}
203228

204229

230+
/// Parse a string into a semver object.
205231
pub fn parse(s: &str) -> Option<Version> {
206232
if !s.is_ascii() {
207233
return None;

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub fn render<T: fmt::Default, S: fmt::Default>(
3636
3737
<link href='http://fonts.googleapis.com/css?family=Oswald:700|Inconsolata:400'
3838
rel='stylesheet' type='text/css'>
39-
<link rel=\"stylesheet\" type=\"text/css\" href=\"{root_path}{crate}/main.css\">
39+
<link rel=\"stylesheet\" type=\"text/css\" href=\"{root_path}main.css\">
4040
4141
{favicon, select, none{} other{
4242
<link rel=\"icon\" href=\"#\" sizes=\"16x16\"
@@ -52,7 +52,7 @@ pub fn render<T: fmt::Default, S: fmt::Default>(
5252
5353
<section class=\"sidebar\">
5454
{logo, select, none{} other{
55-
<a href='{root_path}{crate}/index.html'><img src='#' alt=''/></a>
55+
<a href='{root_path}index.html'><img src='#' alt=''/></a>
5656
}}
5757
5858
{sidebar}
@@ -73,9 +73,9 @@ pub fn render<T: fmt::Default, S: fmt::Default>(
7373
<script>
7474
var rootPath = \"{root_path}\";
7575
</script>
76-
<script src=\"{root_path}{crate}/jquery.js\"></script>
76+
<script src=\"{root_path}jquery.js\"></script>
7777
<script src=\"{root_path}{crate}/search-index.js\"></script>
78-
<script src=\"{root_path}{crate}/main.js\"></script>
78+
<script src=\"{root_path}main.js\"></script>
7979
8080
<div id=\"help\" class=\"hidden\">
8181
<div class=\"shortcuts\">

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,20 @@ pub fn run(mut crate: clean::Crate, dst: Path) {
128128
crate = cache.fold_crate(crate);
129129

130130
// Add all the static files
131-
let dst = cx.dst.push(crate.name);
132-
mkdir(&dst);
133-
write(dst.push("jquery.js"), include_str!("static/jquery-2.0.3.min.js"));
134-
write(dst.push("main.js"), include_str!("static/main.js"));
135-
write(dst.push("main.css"), include_str!("static/main.css"));
136-
write(dst.push("normalize.css"), include_str!("static/normalize.css"));
131+
write(cx.dst.push("jquery.js"), include_str!("static/jquery-2.0.3.min.js"));
132+
write(cx.dst.push("main.js"), include_str!("static/main.js"));
133+
write(cx.dst.push("main.css"), include_str!("static/main.css"));
134+
write(cx.dst.push("normalize.css"), include_str!("static/normalize.css"));
135+
write(cx.dst.push("index.html"), format!("
136+
<DOCTYPE html><html><head>
137+
<meta http-equiv='refresh'
138+
content=\"0; url={}/index.html\">
139+
</head><body></body></html>
140+
", crate.name));
137141

138142
{
139-
let dst = dst.push("search-index.js");
143+
mkdir(&cx.dst.push(crate.name));
144+
let dst = cx.dst.push(crate.name).push("search-index.js");
140145
let mut w = BufferedWriter::new(dst.open_writer(io::CreateOrTruncate));
141146
let w = &mut w as &mut io::Writer;
142147
write!(w, "var searchIndex = [");

branches/try/src/libstd/rt/sched.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,9 +1212,10 @@ mod test {
12121212
}
12131213
}
12141214

1215-
#[test]
1215+
// FIXME: #9407: xfail-test
12161216
fn dont_starve_1() {
12171217
use rt::comm::oneshot;
1218+
use unstable::running_on_valgrind;
12181219

12191220
do stress_factor().times {
12201221
do run_in_mt_newsched_task {

branches/try/src/libsyntax/parse/token.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,9 @@ fn mk_fresh_ident_interner() -> @ident_interner {
482482
"pure", // 65
483483
"yield", // 66
484484
"typeof", // 67
485+
"alignof", // 68
486+
"offsetof", // 69
487+
"sizeof", // 70
485488
];
486489

487490
@interner::StrInterner::prefill(init_vec)
@@ -622,14 +625,17 @@ pub mod keywords {
622625
True,
623626
Trait,
624627
Type,
625-
Typeof,
626628
Unsafe,
627629
Use,
628630
While,
629631

630632
// Reserved keywords
633+
Alignof,
631634
Be,
635+
Offsetof,
632636
Pure,
637+
Sizeof,
638+
Typeof,
633639
Yield,
634640
}
635641

@@ -667,12 +673,16 @@ pub mod keywords {
667673
True => Ident { name: 57, ctxt: 0 },
668674
Trait => Ident { name: 58, ctxt: 0 },
669675
Type => Ident { name: 59, ctxt: 0 },
670-
Typeof => Ident { name: 67, ctxt: 0 },
671676
Unsafe => Ident { name: 60, ctxt: 0 },
672677
Use => Ident { name: 61, ctxt: 0 },
673678
While => Ident { name: 62, ctxt: 0 },
679+
680+
Alignof => Ident { name: 68, ctxt: 0 },
674681
Be => Ident { name: 64, ctxt: 0 },
682+
Offsetof => Ident { name: 69, ctxt: 0 },
675683
Pure => Ident { name: 65, ctxt: 0 },
684+
Sizeof => Ident { name: 70, ctxt: 0 },
685+
Typeof => Ident { name: 67, ctxt: 0 },
676686
Yield => Ident { name: 66, ctxt: 0 },
677687
}
678688
}
@@ -689,7 +699,7 @@ pub fn is_keyword(kw: keywords::Keyword, tok: &Token) -> bool {
689699
pub fn is_any_keyword(tok: &Token) -> bool {
690700
match *tok {
691701
token::IDENT(sid, false) => match sid.name {
692-
8 | 27 | 32 .. 67 => true,
702+
8 | 27 | 32 .. 70 => true,
693703
_ => false,
694704
},
695705
_ => false
@@ -709,7 +719,7 @@ pub fn is_strict_keyword(tok: &Token) -> bool {
709719
pub fn is_reserved_keyword(tok: &Token) -> bool {
710720
match *tok {
711721
token::IDENT(sid, false) => match sid.name {
712-
64 .. 67 => true,
722+
64 .. 70 => true,
713723
_ => false,
714724
},
715725
_ => false,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# If this file is modified, then llvm will be forcibly cleaned and then rebuilt.
22
# The actual contents of this file do not matter, but to trigger a change on the
33
# build bots then the contents should be changed so git updates the mtime.
4-
2013-09-11
4+
2013-09-22

0 commit comments

Comments
 (0)