Commit graph

41621 commits

Author SHA1 Message Date
Steve Klabnik
213708867e TRPL editing: enums
Now that we're not doing the guessing game, a lot of this is irrelevant.
2015-04-20 09:37:45 -04:00
bors
be9a72b9c1 Auto merge of #22117 - fhahn:fail-on-errors, r=nikomatsakis
At the moment, when compilation is stopped at a stop point (like `-Z parse-only`), `rustc` does not return an nonzero exit code even if there are errors (expect fatal ones, that cause it to panic immediately). As an example, compiling `src/test/compile-fail/doc-before-semi.rs` with `-Z parse-only` raises an error, but exists with 0.

Note that I could not use `sess.abort_if_errors()` in the macro, because `sess` is passed by value and move at some point.
2015-04-20 13:20:19 +00:00
Corey Farwell
be08d35c8f Simplify alloc::arc::Arc example in doc-comment
As far as I can tell, this conversion to integer to floating point does not need to happen and is beside the point
2015-04-20 08:57:06 -04:00
bors
fe11393172 Auto merge of #24525 - GuillaumeGomez:check-const, r=pnkfelix
Part of #24407.
2015-04-20 10:26:17 +00:00
Guillaume Gomez
737005a110 Fix typos 2015-04-20 12:01:56 +02:00
bors
5910dc0e8e Auto merge of #24608 - frewsxcv:patch-15, r=alexcrichton 2015-04-20 02:47:45 +00:00
York Xiang
c3c761058c Improve doc for Result::unwrap() 2015-04-20 08:59:06 +08:00
bors
07560d2330 Auto merge of #24586 - richo:test-16745, r=jakub-
closes #16745
2015-04-20 00:43:37 +00:00
Guillaume Gomez
8a6980c553 Add long explanation for E0018 2015-04-20 00:49:53 +02:00
bors
c64feb6341 Auto merge of #24592 - P1start:style-lints-changes, r=alexcrichton
Passing a non-snake-case name to `#![crate_name]` or `--crate-name` will now yield a warning from the `non_snake_case` lint.
2015-04-19 21:36:14 +00:00
Piotr Czarnecki
e5e343aeb7 Finished unicode support in the model lexer.
Completed XID_Start and XID_Continue rules
2015-04-19 23:05:32 +02:00
Florian Hahn
be437132b8 Add proper XID_Start and XID_Continue rules and use CharPos for span comparison, closes #15679 2015-04-19 23:02:10 +02:00
Ariel Ben-Yehuda
94a1b266f9 Call skolemize_late_bound_regions only after fast rejection
skolemize_late_bound_regions essentially copies the entire type (most of the times it shouldn't, but it does), and match_impl runs millions of times.

Times compiling rustc, tested with
$ make -j4 rustc-stage1
$ ( time RUSTFLAGS=-Z time-passes make -j4 rustc-stage2 ) # need LLVM time for calibration

Before:
real	21m44.960s
user	29m38.812s
sys	0m14.944s

After:
real	19m31.445s
user	26m47.260s
sys	0m14.952s

Making this is a 10% performance improvement.

LLVM passes took 867 seconds before, 862 seconds after.
2015-04-19 23:38:37 +03:00
bors
da355efc1c Auto merge of #24517 - erickt:str, r=alexcrichton
This implementation is currently about 3-4 times faster than using the `.to_string()` based approach.

I would also suggest we deprecate `String::from_str` since it's redundant with the stable `String::from` method, but I'll leave that for a future PR.
2015-04-19 19:32:45 +00:00
Erick Tryzelaar
f055054eab collections: Move optimized String::from_str to String::from
This implementation is currently about 3-4 times faster than using
the `.to_string()` based approach.
2015-04-19 10:59:06 -07:00
bors
c6b8d96abd Auto merge of #24526 - klutzy:getrandom-fix, r=alexcrichton
Fixes #21538.
2015-04-19 17:28:27 +00:00
Corey Farwell
aaafb96abd Fix typos in code comments 2015-04-19 12:18:51 -04:00
bors
ddf25c890d Auto merge of #24572 - steveklabnik:gh24569, r=brson
Fixes #24569.

Should wait until https://github.com/rust-lang/rust-www/pull/114 is merged.
2015-04-19 15:24:19 +00:00
bors
be41e98067 Auto merge of #24567 - tamird:windows-caviats, r=steveklabnik
- https://github.com/rust-lang/rust/issues/1237 is closed
- `libgcc` is now statically linked:
  https://github.com/rust-lang/rust/pull/17471
2015-04-19 13:20:24 +00:00
bors
d86b6f67bc Auto merge of #24559 - frewsxcv:get-mut-if-let, r=steveklabnik
None
2015-04-19 11:16:45 +00:00
York Xiang
adc93ceac9 rustdoc: don't inject "extern crate std;" 2015-04-19 18:10:45 +08:00
P1start
c163f89310 Lint non-snake-case crate names
Passing a non-snake-case name to #![crate_name] or --crate-name will now yield a
warning from the `non_snake_case` lint.
2015-04-19 20:31:18 +12:00
klutzy
4d80a82381 std::rand::os: Fix race condition of atomics
Fixes #21538.
2015-04-19 16:56:35 +09:00
bors
14d9d1c1cf Auto merge of #24552 - meqif:explain, r=alexcrichton
cc #24407
2015-04-19 07:51:27 +00:00
Richo Healey
4cf9e2db5e test: Add an assertion to the #16745 testcase 2015-04-19 00:25:13 -07:00
bors
049de3fe7f Auto merge of #24555 - frewsxcv:patch-14, r=steveklabnik 2015-04-19 05:46:47 +00:00
bors
bd968a1d65 Auto merge of #24554 - tshepang:let-faq, r=steveklabnik 2015-04-19 03:42:59 +00:00
Richo Healey
57fdeecd91 test: Add testcase for #16745 2015-04-18 17:41:18 -07:00
Ricardo Martins
5c7a0ba06e Add long diagnostics for E0133. 2015-04-19 00:36:59 +01:00
bors
00978a9879 Auto merge of #24383 - avdi:patch-1, r=steveklabnik
"Dynamically typed" didn't seem like a relevant distinction; there are statically-compiled dynamically-typed languages. Another term that might work here (despite being notoriously vague) is "scripting languages".
2015-04-18 23:35:50 +00:00
Guillaume Gomez
1d7d0192d2 Add backquotes to have better looking rust code 2015-04-19 00:01:58 +02:00
Steve Klabnik
290da6f016 Remove the 30 minute intro
Fixes #24569.
2015-04-18 17:55:31 -04:00
bors
a16640051d Auto merge of #24560 - kwantam:apply_table_opt, r=alexcrichton
Apply optimization described in
https://github.com/rust-lang/regex/pull/73#issuecomment-93777126
to rust's copy of `unicode.py`.

This shrinks librustc_unicode's tables.rs from 479kB to 456kB,
and should improve performance slightly for related operations
(e.g., is_alphabetic(), is_xid_start(), etc).

In addition, pull in fix from @dscorbett's commit
d25c39f86568a147f9b7080c25711fb1f98f056a in regex, which
makes `load_properties()` more tolerant of whitespace
in the Unicode tables. (This fix does not result in any
changes to tables.rs, but could if the Unicode tables
change in the future.)
2015-04-18 21:30:03 +00:00
Corey Farwell
d2ed11862c Indicate keywords are code-like in Fuse::reset_fuse doc comment 2015-04-18 16:48:29 -04:00
Tamir Duberstein
a8aa4ee034 Update Windows caveats
- https://github.com/rust-lang/rust/issues/1237 is closed
- `libgcc` is now statically linked:
  https://github.com/rust-lang/rust/pull/17471
2015-04-18 13:00:40 -07:00
bors
49a94f29bb Auto merge of #24562 - Manishearth:rollup, r=Manishearth
- Successful merges: #24466, #24472, #24532, #24542, #24548
- Failed merges: #24552
2015-04-18 19:24:06 +00:00
Manish Goregaokar
88601f8d7d fix doctest (fixup #24466) 2015-04-19 00:54:42 +05:30
Manish Goregaokar
695efb53d6 Rollup merge of #24548 - graydon:reference-tidying, r=steveklabnik
This just deletes some egregious lies and obsolete terminology -- all of which I originally wrote -- from the reference. I expect the reference itself will be deleted soon enough, but I found myself gritting teeth over these bits too much to let them into a 1.0 release.
2015-04-18 23:29:58 +05:30
Manish Goregaokar
cb7a12757b Rollup merge of #24542 - michaelsproul:rollup, r=alexcrichton
I did a manual merge of all the extended error PRs as we were getting merge conflicts yesterday. I think this is preferable to merging separately as I ended up having to manually merge @nham and @GuillaumeGomez's commits.

Rollup of #24458, #24482 and #24488.

#24482 and #24488 were already re-approved, and would need to be cancelled if this is merged instead.
2015-04-18 23:29:57 +05:30
Manish Goregaokar
93d8ba2906 Rollup merge of #24532 - brson:beta, r=pnkfelix 2015-04-18 23:29:57 +05:30
Manish Goregaokar
4afd45e5b3 Rollup merge of #24472 - dotdash:23431, r=nikomatsakis
Loading from and storing to small aggregates happens by casting the
aggregate pointer to an appropriately sized integer pointer to avoid
the usage of first class aggregates which would lead to less optimized
code.

But this means that, for example, a tuple of type (i16, i16) will be
loading through an i32 pointer and because we currently don't provide
alignment information LLVM assumes that the load should use the ABI
alignment for i32 which would usually be 4 byte alignment. But the
alignment requirement for the (i16, i16) tuple will usually be just 2
bytes, so we're overestimating alignment, which invokes undefined
behaviour.

Therefore we must emit appropriate alignment information for
stores/loads through such casted pointers.

Fixes #23431
2015-04-18 23:29:57 +05:30
Manish Goregaokar
514e06d65d Rollup merge of #24466 - steveklabnik:more_more_more, r=alexcrichton
Link to the big chapter for now, and add move semantics.
2015-04-18 23:29:57 +05:30
kwantam
f14d289d71 optimize Unicode tables
Apply optimization described in
https://github.com/rust-lang/regex/pull/73#issuecomment-93777126
to rust's copy of `unicode.py`.

This shrinks librustc_unicode's tables.rs from 479kB to 456kB,
and should improve performance slightly for related operations
(e.g., is_alphabetic(), is_xid_start(), etc).

In addition, pull in fix from @dscorbett's commit
d25c39f86568a147f9b7080c25711fb1f98f056a in regex, which
makes `load_properties()` more tolerant of whitespace
in the Unicode tables. (This fix does not result in any
changes to tables.rs, but could if the Unicode tables
change in the future.)
2015-04-18 13:20:57 -04:00
Corey Farwell
68d003c9ba Utilize if..let for get_mut doc-comment examples 2015-04-18 12:45:05 -04:00
Björn Steinbrink
78745a4afe Emit correct alignment information for loads/store of small aggregates
Loading from and storing to small aggregates happens by casting the
aggregate pointer to an appropriately sized integer pointer to avoid
the usage of first class aggregates which would lead to less optimized
code.

But this means that, for example, a tuple of type (i16, i16) will be
loading through an i32 pointer and because we currently don't provide
alignment information LLVM assumes that the load should use the ABI
alignment for i32 which would usually be 4 byte alignment. But the
alignment requirement for the (i16, i16) tuple will usually be just 2
bytes, so we're overestimating alignment, which invokes undefined
behaviour.

Therefore we must emit appropriate alignment information for
stores/loads through such casted pointers.

Fixes #23431
2015-04-18 18:32:14 +02:00
Tshepang Lekhonkhobe
4665c3bbfa doc: improve/fix 'let' FAQ 2015-04-18 17:36:41 +02:00
bors
a81ce5f991 Auto merge of #24528 - tamird:valgrind-sched, r=alexcrichton
r? @brson
2015-04-18 14:38:44 +00:00
bors
fcf637b19f Auto merge of #24519 - rprichard:opt-write-args, r=alexcrichton
It's just as convenient, but it's much faster. Using write! requires an
extra call to fmt::write and a extra dynamically dispatched call to
Arguments' Display format function.
2015-04-18 12:35:07 +00:00
Florian Hahn
2a24e97c80 Return nonzero exit code if there are errors at a stop point 2015-04-18 12:23:49 +02:00
bors
ba1192835b Auto merge of #24464 - lambdaburrito:master, r=alexcrichton
resolves #24462
2015-04-18 09:12:53 +00:00