Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of stuff (take 2) #21698

Merged
merged 47 commits into from
Jan 28, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
5ab1405
Add Hash trait to NonZero type
GuillaumeGomez Jan 24, 2015
1ec13e7
Improve mobile-friendliness of API docs
iKevinY Jan 24, 2015
ac3b4b8
fix wrong link
bombless Jan 25, 2015
a0ed0f3
Add example for Lifetime Elision with two inputs
snowe2010 Jan 25, 2015
a09c085
more-strings.md: repaired links to API
dinfuehr Jan 25, 2015
59c2de1
fix vim syntastic: --parse-only => -Z parse-only
Jan 25, 2015
bff4623
cleanup: s/impl Copy/#[derive(Copy)]/g
Jan 24, 2015
f1c22a0
bench: this file has not compiled at least since March last year
tshepang Jan 26, 2015
6a90eca
Add on_unimplemented note to Index
Manishearth Jan 26, 2015
8e2a44a
Fix broken links in TRPL→More Strings
nagisa Jan 26, 2015
b93843e
add split_off method to vec with tests
JeffBelgum Jan 25, 2015
23fd8ca
cleanup depricated `uint` in rand mod and rand os
Victory Jan 27, 2015
ac285d5
Don't use if we can avoid it
Victory Jan 27, 2015
b8b52d6
Add examples to documentation of SliceExt methods
carols10cents Jan 24, 2015
ebd2d8d
Correct a typo in a deprecation warning
carols10cents Jan 24, 2015
6af3603
Fix PEP8 in gdb pretty printer
richo Jan 27, 2015
f230683
Fix PEP8 in get-snapshot
richo Jan 27, 2015
958dea1
make get-snapshot externally usable
richo Jan 27, 2015
f697a06
Fix PEP8 in lldb_batchmode.py
richo Jan 27, 2015
2822bc5
Fix PEP8 in lldb_rust_formatters.py
richo Jan 27, 2015
04408fa
Fix PEP8 in make-win-dist
richo Jan 27, 2015
58d03ad
Fix PEP8 in maketest
richo Jan 27, 2015
ab0081a
Fix PEP8 in snapshot.py
richo Jan 27, 2015
f7509df
Fix PEP8 in sugarise-doc-comments
richo Jan 27, 2015
91928dd
Fix PEP8 for check-summary.py
richo Jan 27, 2015
7faffbe
Fix PEP8 for errorck
richo Jan 27, 2015
888a149
Fix PEP8 for extract_grammar
richo Jan 27, 2015
bbb2871
Fix PEP8 for generate-keyword-tests
richo Jan 27, 2015
109a6bc
Fix PEP8 for htmldocck
richo Jan 27, 2015
a4ab5e5
Fix PEP8 for latest-unix-snaps.py
richo Jan 27, 2015
1db2039
Fix PEP8 in mirror-all-snapshots
richo Jan 27, 2015
7cabb21
Fix PEP8 for tidy
richo Jan 27, 2015
e7bcb27
Rollup merge of #21591 - GuillaumeGomez:hash, r=alexcrichton
Manishearth Jan 27, 2015
8418725
Rollup merge of #21597 - iKevinY:mobile-api-docs, r=cmr
Manishearth Jan 27, 2015
51ff9e8
Rollup merge of #21602 - japaric:derive-copy, r=alexcrichton
Manishearth Jan 27, 2015
3cda6af
Rollup merge of #21608 - JeffBelgum:collections-reform-issue-19986-ad…
Manishearth Jan 27, 2015
54cdae6
Rollup merge of #21612 - bombless:patch-3, r=alexcrichton
Manishearth Jan 27, 2015
cb63bcb
Rollup merge of #21618 - snowe2010:documentation, r=Gankro
Manishearth Jan 27, 2015
36d0e90
Rollup merge of #21623 - dinfuehr:patch-1, r=alexcrichton
Manishearth Jan 27, 2015
4af4b37
Rollup merge of #21624 - emanueLczirai:vim_syntastic_fix, r=sanxiyn
Manishearth Jan 27, 2015
335e8af
Rollup merge of #21625 - carols10cents:sliceext-examples, r=alexcrichton
Manishearth Jan 27, 2015
28b0271
Rollup merge of #21658 - Manishearth:index_on_unimplemented, r=Gankro
Manishearth Jan 27, 2015
2ac91a3
Rollup merge of #21686 - richo:python-fixes, r=alexcrichton
Manishearth Jan 27, 2015
1df0300
Rollup merge of #21676 - Victory:fix-deprication-in-random, r=alexcri…
Manishearth Jan 27, 2015
78567f1
Rollup merge of #21667 - nagisa:sbook-links, r=Gankro
Manishearth Jan 27, 2015
249c29f
Rollup merge of #21666 - tshepang:rm-unloved-file, r=brson
Manishearth Jan 27, 2015
c709ed2
Merge remote-tracking branch 'origin/master' into rollup
Manishearth Jan 28, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/compiletest/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::fmt;
use std::str::FromStr;

#[cfg(stage0)] // NOTE: remove impl after snapshot
#[derive(Clone, PartialEq, Show)]
#[derive(Clone, Copy, PartialEq, Show)]
pub enum Mode {
CompileFail,
RunFail,
Expand All @@ -26,7 +26,7 @@ pub enum Mode {
}

#[cfg(not(stage0))] // NOTE: remove cfg after snapshot
#[derive(Clone, PartialEq, Debug)]
#[derive(Clone, Copy, PartialEq, Debug)]
pub enum Mode {
CompileFail,
RunFail,
Expand All @@ -38,9 +38,6 @@ pub enum Mode {
Codegen
}


impl Copy for Mode {}

impl FromStr for Mode {
fn from_str(s: &str) -> Option<Mode> {
match s {
Expand Down
6 changes: 3 additions & 3 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1680,8 +1680,8 @@ specific type.
Implementations are defined with the keyword `impl`.

```
# #[derive(Copy)]
# struct Point {x: f64, y: f64};
# impl Copy for Point {}
# type Surface = i32;
# struct BoundingBox {x: f64, y: f64, width: f64, height: f64};
# trait Shape { fn draw(&self, Surface); fn bounding_box(&self) -> BoundingBox; }
Expand Down Expand Up @@ -2219,7 +2219,7 @@ For any lint check `C`:

The lint checks supported by the compiler can be found via `rustc -W help`,
along with their default settings. [Compiler
plugins](book/plugin.html#lint-plugins) can provide additional lint checks.
plugins](book/plugins.html#lint-plugins) can provide additional lint checks.

```{.ignore}
mod m1 {
Expand Down Expand Up @@ -4163,4 +4163,4 @@ that have since been removed):
pattern syntax

[ffi]: book/ffi.html
[plugin]: book/plugin.html
[plugin]: book/plugins.html
4 changes: 2 additions & 2 deletions src/doc/trpl/more-strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,5 +279,5 @@ Many more bytes than graphemes!

# Other Documentation

* [the `&str` API documentation](std/str/index.html)
* [the `String` API documentation](std/string/index.html)
* [the `&str` API documentation](../std/str/index.html)
* [the `String` API documentation](../std/string/index.html)
1 change: 1 addition & 0 deletions src/doc/trpl/ownership.md
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ fn substr<'a>(s: &'a str, until: u32) -> &'a str; // expanded
fn get_str() -> &str; // ILLEGAL, no inputs

fn frob(s: &str, t: &str) -> &str; // ILLEGAL, two inputs
fn frob<'a, 'b>(s: &'a str, t: &'b str) -> &str; // Expanded: Output lifetime is unclear

fn get_mut(&mut self) -> &mut T; // elided
fn get_mut<'a>(&'a mut self) -> &'a mut T; // expanded
Expand Down
8 changes: 6 additions & 2 deletions src/etc/check-summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

if __name__ == '__main__':
summaries = []

def summarise(fname):
summary = {}
with open(fname) as fd:
Expand All @@ -27,12 +28,14 @@ def summarise(fname):
# track bench runs
if splitline[1] == 'ns/iter':
status = 'bench'
if not summary.has_key(status):
if status not in summary:
summary[status] = []
summary[status].append(test)
summaries.append((fname, summary))

def count(t):
return sum(map(lambda (f, s): len(s.get(t, [])), summaries))

logfiles = sys.argv[1:]
for files in map(glob.glob, logfiles):
map(summarise, files)
Expand All @@ -41,8 +44,9 @@ def count(t):
ignored = count('ignored')
measured = count('bench')
print "summary of %d test runs: %d passed; %d failed; %d ignored; %d measured" % \
(len(logfiles), ok, failed, ignored, measured)
(len(logfiles), ok, failed, ignored, measured)
print ""

if failed > 0:
print "failed tests:"
for f, s in summaries:
Expand Down
4 changes: 3 additions & 1 deletion src/etc/errorck.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
# Digs error codes out of files named 'diagnostics.rs' across
# the tree, and ensures thare are no duplicates.

import sys, os, re
import sys
import os
import re

src_dir = sys.argv[1]
errcode_map = {}
Expand Down
136 changes: 68 additions & 68 deletions src/etc/extract_grammar.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

import fileinput

collections = { "gram": [],
"keyword": [],
"reserved": [],
"binop": [],
"unop": [] }
collections = {"gram": [],
"keyword": [],
"reserved": [],
"binop": [],
"unop": []}


in_coll = False
Expand Down Expand Up @@ -47,66 +47,66 @@
# Define operator symbol-names here

tokens = ["non_star", "non_slash", "non_eol",
"non_single_quote", "non_double_quote", "ident" ]
"non_single_quote", "non_double_quote", "ident"]

symnames = {
".": "dot",
"+": "plus",
"-": "minus",
"/": "slash",
"*": "star",
"%": "percent",

"~": "tilde",
"@": "at",

"!": "not",
"&": "and",
"|": "or",
"^": "xor",

"<<": "lsl",
">>": "lsr",
">>>": "asr",

"&&": "andand",
"||": "oror",

"<" : "lt",
"<=" : "le",
"==" : "eqeq",
">=" : "ge",
">" : "gt",

"=": "eq",

"+=": "plusequal",
"-=": "minusequal",
"/=": "divequal",
"*=": "starequal",
"%=": "percentequal",

"&=": "andequal",
"|=": "orequal",
"^=": "xorequal",

">>=": "lsrequal",
">>>=": "asrequal",
"<<=": "lslequal",

"::": "coloncolon",

"->": "rightarrow",
"<-": "leftarrow",
"<->": "swaparrow",

"//": "linecomment",
"/*": "openblockcomment",
"*/": "closeblockcomment",
"macro_rules": "macro_rules",
"=>" : "eg",
".." : "dotdot",
"," : "comma"
".": "dot",
"+": "plus",
"-": "minus",
"/": "slash",
"*": "star",
"%": "percent",

"~": "tilde",
"@": "at",

"!": "not",
"&": "and",
"|": "or",
"^": "xor",

"<<": "lsl",
">>": "lsr",
">>>": "asr",

"&&": "andand",
"||": "oror",

"<": "lt",
"<=": "le",
"==": "eqeq",
">=": "ge",
">": "gt",

"=": "eq",

"+=": "plusequal",
"-=": "minusequal",
"/=": "divequal",
"*=": "starequal",
"%=": "percentequal",

"&=": "andequal",
"|=": "orequal",
"^=": "xorequal",

">>=": "lsrequal",
">>>=": "asrequal",
"<<=": "lslequal",

"::": "coloncolon",

"->": "rightarrow",
"<-": "leftarrow",
"<->": "swaparrow",

"//": "linecomment",
"/*": "openblockcomment",
"*/": "closeblockcomment",
"macro_rules": "macro_rules",
"=>": "eg",
"..": "dotdot",
",": "comma"
}

lines = []
Expand All @@ -126,8 +126,8 @@
+ word)
if word not in tokens:
if (word in collections["keyword"] or
word in collections["reserved"]):
tokens.append(word)
word in collections["reserved"]):
tokens.append(word)
else:
raise Exception("unknown keyword/reserved word: "
+ word)
Expand All @@ -149,8 +149,8 @@
print("%start parser, token;")
print("%%token %s ;" % ("\n\t, ".join(tokens)))
for coll in ["keyword", "reserved"]:
print("%s: %s ; " % (coll, "\n\t| ".join(collections[coll])));
print("%s: %s ; " % (coll, "\n\t| ".join(collections[coll])))
for coll in ["binop", "unop"]:
print("%s: %s ; " % (coll, "\n\t| ".join([symnames[x]
for x in collections[coll]])));
print("\n".join(lines));
for x in collections[coll]])))
print("\n".join(lines))
Loading