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 9 pull requests #45141

Merged
merged 19 commits into from
Oct 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
07b1899
debuginfo-test: Fix #45086.
kennytm Oct 7, 2017
b5b7666
Don't encourage people to ignore threading errors in the docs
shepmaster Oct 1, 2017
19029d5
Add links and examples for std::process::Stdio
Oct 8, 2017
9772003
Remove ./ prefix from relative URLs
Oct 8, 2017
dee517a
Fix trying to raise a bare str as an exception. This has been depreca…
johnthagen Oct 8, 2017
430e875
Fix variable name reference
johnthagen Oct 8, 2017
d9e6703
Use identity operator `is` when comparing to None
johnthagen Oct 8, 2017
8240b87
Update grammar to parse current rust syntax
bleibig Oct 9, 2017
53a6485
New rebase for the issue #45022
k0pernicus Oct 5, 2017
c3ff628
Clarify RAM usage during build
johnthagen Oct 9, 2017
dad731c
Rollup merge of #44962 - shepmaster:no-ignore-result, r=steveklabnik
kennytm Oct 9, 2017
9e6b565
Rollup merge of #45051 - k0pernicus:master, r=michaelwoerister
kennytm Oct 9, 2017
9687c2e
Rollup merge of #45091 - kennytm:fix-45086, r=michaelwoerister
kennytm Oct 9, 2017
4c99211
Rollup merge of #45106 - Pirh:process_stdio_docs, r=dtolnay
kennytm Oct 9, 2017
743ff73
Rollup merge of #45117 - johnthagen:fix-str-raise, r=alexcrichton
kennytm Oct 9, 2017
380b795
Rollup merge of #45118 - johnthagen:fix-section-key-name, r=alexcrichton
kennytm Oct 9, 2017
d7f1a26
Rollup merge of #45120 - johnthagen:none-identity-test, r=sfackler
kennytm Oct 9, 2017
c5ba2d2
Rollup merge of #45125 - bleibig:grammar-update, r=alexcrichton
kennytm Oct 9, 2017
6a77853
Rollup merge of #45136 - johnthagen:patch-1, r=QuietMisdreavus
kennytm Oct 9, 2017
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Snapshot binaries are currently built and tested on several platforms:
You may find that other platforms work, but these are our officially
supported build environments that are most likely to work.

Rust currently needs between 600MiB and 1.5GiB to build, depending on platform.
Rust currently needs between 600MiB and 1.5GiB of RAM to build, depending on platform.
If it hits swap, it will take a very long time to build.

There is more advice about hacking on Rust in [CONTRIBUTING.md].
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def get_toml(self, key):

If the key does not exists, the result is None:

>>> rb.get_toml("key3") == None
>>> rb.get_toml("key3") is None
True
"""
for line in self.config_toml.splitlines():
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def to_toml(value):
elif isinstance(value, str):
return "'" + value + "'"
else:
raise 'no toml'
raise RuntimeError('no toml')

def configure_section(lines, config):
for key in config:
Expand All @@ -378,7 +378,7 @@ def configure_section(lines, config):
for section_key in config:
section_config = config[section_key]
if not section_key in sections:
raise RuntimeError("config key {} not in sections".format(key))
raise RuntimeError("config key {} not in sections".format(section_key))

if section_key == 'target':
for target in section_config:
Expand Down
2 changes: 1 addition & 1 deletion src/etc/lldb_batchmode.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def execute_command(command_interpreter, command):

if res.Succeeded():
if res.HasResult():
print(normalize_whitespace(res.GetOutput()), end='\n')
print(normalize_whitespace(res.GetOutput() or ''), end='\n')

# If the command introduced any breakpoints, make sure to register
# them with the breakpoint
Expand Down
73 changes: 45 additions & 28 deletions src/grammar/lexer.l
Original file line number Diff line number Diff line change
Expand Up @@ -85,43 +85,60 @@ ident [a-zA-Z\x80-\xff_][a-zA-Z0-9\x80-\xff_]*
<blockcomment>(.|\n) { }

_ { return UNDERSCORE; }
abstract { return ABSTRACT; }
alignof { return ALIGNOF; }
as { return AS; }
become { return BECOME; }
box { return BOX; }
break { return BREAK; }
catch { return CATCH; }
const { return CONST; }
continue { return CONTINUE; }
crate { return CRATE; }
default { return DEFAULT; }
do { return DO; }
else { return ELSE; }
enum { return ENUM; }
extern { return EXTERN; }
false { return FALSE; }
final { return FINAL; }
fn { return FN; }
for { return FOR; }
if { return IF; }
impl { return IMPL; }
in { return IN; }
let { return LET; }
loop { return LOOP; }
macro { return MACRO; }
match { return MATCH; }
mod { return MOD; }
move { return MOVE; }
mut { return MUT; }
offsetof { return OFFSETOF; }
override { return OVERRIDE; }
priv { return PRIV; }
proc { return PROC; }
pure { return PURE; }
pub { return PUB; }
ref { return REF; }
return { return RETURN; }
self { return SELF; }
sizeof { return SIZEOF; }
static { return STATIC; }
struct { return STRUCT; }
super { return SUPER; }
trait { return TRAIT; }
true { return TRUE; }
type { return TYPE; }
typeof { return TYPEOF; }
union { return UNION; }
unsafe { return UNSAFE; }
unsized { return UNSIZED; }
use { return USE; }
virtual { return VIRTUAL; }
where { return WHERE; }
while { return WHILE; }
yield { return YIELD; }

{ident} { return IDENT; }

Expand Down Expand Up @@ -189,25 +206,25 @@ while { return WHILE; }
\>\>= { return SHREQ; }
\> { return '>'; }

\x27 { BEGIN(ltorchar); yymore(); }
<ltorchar>static { BEGIN(INITIAL); return STATIC_LIFETIME; }
<ltorchar>{ident} { BEGIN(INITIAL); return LIFETIME; }
<ltorchar>\\[nrt\\\x27\x220]\x27 { BEGIN(suffix); return LIT_CHAR; }
<ltorchar>\\x[0-9a-fA-F]{2}\x27 { BEGIN(suffix); return LIT_CHAR; }
<ltorchar>\\u\{[0-9a-fA-F]?{6}\}\x27 { BEGIN(suffix); return LIT_CHAR; }
<ltorchar>.\x27 { BEGIN(suffix); return LIT_CHAR; }
<ltorchar>[\x80-\xff]{2,4}\x27 { BEGIN(suffix); return LIT_CHAR; }
<ltorchar><<EOF>> { BEGIN(INITIAL); return -1; }
\x27 { BEGIN(ltorchar); yymore(); }
<ltorchar>static { BEGIN(INITIAL); return STATIC_LIFETIME; }
<ltorchar>{ident} { BEGIN(INITIAL); return LIFETIME; }
<ltorchar>\\[nrt\\\x27\x220]\x27 { BEGIN(suffix); return LIT_CHAR; }
<ltorchar>\\x[0-9a-fA-F]{2}\x27 { BEGIN(suffix); return LIT_CHAR; }
<ltorchar>\\u\{([0-9a-fA-F]_*){1,6}\}\x27 { BEGIN(suffix); return LIT_CHAR; }
<ltorchar>.\x27 { BEGIN(suffix); return LIT_CHAR; }
<ltorchar>[\x80-\xff]{2,4}\x27 { BEGIN(suffix); return LIT_CHAR; }
<ltorchar><<EOF>> { BEGIN(INITIAL); return -1; }

b\x22 { BEGIN(bytestr); yymore(); }
<bytestr>\x22 { BEGIN(suffix); return LIT_BYTE_STR; }

<bytestr><<EOF>> { return -1; }
<bytestr>\\[n\nrt\\\x27\x220] { yymore(); }
<bytestr>\\x[0-9a-fA-F]{2} { yymore(); }
<bytestr>\\u\{[0-9a-fA-F]?{6}\} { yymore(); }
<bytestr>\\[^n\nrt\\\x27\x220] { return -1; }
<bytestr>(.|\n) { yymore(); }
<bytestr><<EOF>> { return -1; }
<bytestr>\\[n\nrt\\\x27\x220] { yymore(); }
<bytestr>\\x[0-9a-fA-F]{2} { yymore(); }
<bytestr>\\u\{([0-9a-fA-F]_*){1,6}\} { yymore(); }
<bytestr>\\[^n\nrt\\\x27\x220] { return -1; }
<bytestr>(.|\n) { yymore(); }

br\x22 { BEGIN(rawbytestr_nohash); yymore(); }
<rawbytestr_nohash>\x22 { BEGIN(suffix); return LIT_BYTE_STR_RAW; }
Expand Down Expand Up @@ -252,13 +269,13 @@ br/# {
}
<rawbytestr><<EOF>> { return -1; }

b\x27 { BEGIN(byte); yymore(); }
<byte>\\[nrt\\\x27\x220]\x27 { BEGIN(INITIAL); return LIT_BYTE; }
<byte>\\x[0-9a-fA-F]{2}\x27 { BEGIN(INITIAL); return LIT_BYTE; }
<byte>\\u[0-9a-fA-F]{4}\x27 { BEGIN(INITIAL); return LIT_BYTE; }
<byte>\\U[0-9a-fA-F]{8}\x27 { BEGIN(INITIAL); return LIT_BYTE; }
<byte>.\x27 { BEGIN(INITIAL); return LIT_BYTE; }
<byte><<EOF>> { BEGIN(INITIAL); return -1; }
b\x27 { BEGIN(byte); yymore(); }
<byte>\\[nrt\\\x27\x220]\x27 { BEGIN(INITIAL); return LIT_BYTE; }
<byte>\\x[0-9a-fA-F]{2}\x27 { BEGIN(INITIAL); return LIT_BYTE; }
<byte>\\u([0-9a-fA-F]_*){4}\x27 { BEGIN(INITIAL); return LIT_BYTE; }
<byte>\\U([0-9a-fA-F]_*){8}\x27 { BEGIN(INITIAL); return LIT_BYTE; }
<byte>.\x27 { BEGIN(INITIAL); return LIT_BYTE; }
<byte><<EOF>> { BEGIN(INITIAL); return -1; }

r\x22 { BEGIN(rawstr); yymore(); }
<rawstr>\x22 { BEGIN(suffix); return LIT_STR_RAW; }
Expand Down Expand Up @@ -310,12 +327,12 @@ r/# {
\x22 { BEGIN(str); yymore(); }
<str>\x22 { BEGIN(suffix); return LIT_STR; }

<str><<EOF>> { return -1; }
<str>\\[n\nr\rt\\\x27\x220] { yymore(); }
<str>\\x[0-9a-fA-F]{2} { yymore(); }
<str>\\u\{[0-9a-fA-F]?{6}\} { yymore(); }
<str>\\[^n\nrt\\\x27\x220] { return -1; }
<str>(.|\n) { yymore(); }
<str><<EOF>> { return -1; }
<str>\\[n\nr\rt\\\x27\x220] { yymore(); }
<str>\\x[0-9a-fA-F]{2} { yymore(); }
<str>\\u\{([0-9a-fA-F]_*){1,6}\} { yymore(); }
<str>\\[^n\nrt\\\x27\x220] { return -1; }
<str>(.|\n) { yymore(); }

\<- { return LARROW; }
-\> { return RARROW; }
Expand Down
Loading