Commit Graph

53324 Commits

Author SHA1 Message Date
bors
5158f3b282 Auto merge of #33138 - arielb1:sized-shortcut, r=nikomatsakis
Short-cut `T: Sized` trait selection for ADTs

Basically avoids all nested obligations when checking whether an ADT is sized - this speeds up typeck by ~15%

The refactoring fixed #32963, but I also want to make `Copy` not object-safe (will commit that soon).

Fixes #33201

r? @nikomatsakis
2016-05-06 06:21:25 -07:00
Corey Farwell
40025e8cd3 Indicate struct names are code-like in doc-comment. 2016-05-06 09:12:10 -04:00
bors
a36c41912b Auto merge of #33086 - cardoe:non-blocking-rand-read, r=alexcrichton
rand: don't block before random pool is initialized

If we attempt a read with getrandom() on Linux the syscall can block
before the random pool is initialized unless the GRND_NONBLOCK flag is
passed. This flag causes getrandom() to instead return EAGAIN while the
pool is uninitialized. To avoid downstream users of crate or std
functionality that have no ability to avoid this blocking behavior this
change causes Rust to read bytes from /dev/urandom while getrandom()
would block and once getrandom() is available to use that. Fixes #32953.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2016-05-06 03:07:00 -07:00
Christopher Serr
32edf1d7a8 Fix Typo in Barrier::wait documentation
This should be `have` instead of `has`.
2016-05-06 11:18:05 +02:00
bors
6301e22e15 Auto merge of #33072 - tbu-:pr_duration_new_overflow, r=alexcrichton
Panic on overflow in `Duration::new` constructor

Panicking on overflow is also done for `+`, and it replaces the
currently incorrect overflow behavior of wrapping around, which does not
make sense for `Duration`s.
2016-05-06 00:58:59 -07:00
Georg Brandl
89aa042994 rustdoc: add "src" links to individual impls
Since these impls can be scattered around quite a bit, it is nice
to be able to jump to the location where individual methods and
trait impls are defined.

Fixes: #30416
2016-05-06 08:19:31 +02:00
bors
68d399d7e3 Auto merge of #32835 - brson:alldebug, r=michaelwoerister
Distribute both rust-lldb and rust-gdb everywhere

Both debuggers are viable in some capacity on all tier-1 platforms,
and people often ask for rust-lldb on Linux or rust-gdb on OS X.

r? @michaelwoerister

I'm still testing locally, but this *looks* like the right thing to change.
2016-05-05 21:55:02 -07:00
Nick Cameron
01be25b1f9 Use crate/index pair for def ids 2016-05-06 16:15:48 +12:00
Brian Anderson
5ad99e2296 Distribute both rust-lldb and rust-gdb everywhere except win-msvc
Both debuggers are viable in some capacity on all tier-1 platforms,
and people often ask for rust-lldb on Linux or rust-gdb on OS X.
2016-05-06 03:09:48 +00:00
Nick Cameron
ca6062d25b Merge branch 'dump' of https://github.com/aochagavia/rust into aochagavia-dump 2016-05-06 13:06:28 +12:00
bors
b071c1feea Auto merge of #32565 - tbu-:pr_cell_as_mut, r=alexcrichton
Add `as_mut` methods to the `std::cell` structs

This is safe since the borrow checking ensures that we have the only
mutable reference to the struct, thus we can safely borrow its interior.
2016-05-05 17:55:28 -07:00
Tobias Bucher
9370d3a051 Add get_mut methods to the RefCell and Cell
This is safe since the borrow checker ensures that we have the only
mutable reference to the struct, thus we can safely borrow its interior.

Tracking issue is #33444.
2016-05-06 00:40:51 +02:00
ggomez
cdca084377 Improve rustdoc css of "source" and "since" elements 2016-05-05 22:58:24 +02:00
Guillaume Gomez
083c3952e0 Update CSS for future rustdoc merge 2016-05-06 16:48:25 +02:00
bors
77987ba898 Auto merge of #32990 - tbu-:pr_more_defaults_cstr_path, r=alexcrichton
Add `Default` implementation for `&CStr`, `CString`, `Path`
2016-05-05 13:18:57 -07:00
Georg Brandl
10599e4641 doc: make RFC references consistent 2016-05-05 21:15:15 +02:00
Georg Brandl
26eb2bef25 Fix some some duplicate words. 2016-05-05 21:12:37 +02:00
Brian Anderson
2912bfb2b9 doc: Update reference with better description of target_env
The definition of this value recently changed slightly. It no
longer corresponds directly to the target triple.

Also shuffled things around to make the order of cfg descriptions more
logical and added text related them to the target triple.

cc #33403
2016-05-05 18:23:52 +00:00
Alex Crichton
39eec8071c mk: Fix building with --enable-ccache
We will no longer use `ccache` in the makefiles for our local dependencies like
miniz, but they're so small anyway it doesn't really matter.

Closes #33285
2016-05-05 09:12:24 -07:00
bors
413bafdabf Auto merge of #33128 - xen0n:more-confusing-unicode-chars, r=nagisa
Add more aliases for Unicode confusable chars

Building upon #29837, this PR:

* added aliases for space characters,
* distinguished square brackets from parens, and
* added common CJK punctuation characters as aliases.

This will especially help CJK users who may have forgotten to switch off IME when coding.
2016-05-05 08:50:23 -07:00
Philipp Oppermann
a22ca2872e [Doc] Default cpu is "generic" (and not "default") 2016-05-05 14:23:43 +02:00
Tobias Bucher
5efe083ddc Add Default implementation for &CStr and CString 2016-05-05 10:57:06 +02:00
bors
3f65afa694 Auto merge of #33067 - notriddle:wrapping_neg, r=alexcrichton
Implement negation for wrapping numerals.

Fixes #33037
2016-05-05 00:37:56 -07:00
Philipp Matthias Schaefer
d1c487e6c7 Add an example to Wrapping's documentation. 2016-05-05 08:23:24 +02:00
Sébastien Marie
21117259b0 specify the archive file as stdout
If the `-f` option isn't given, GNU tar will use environment variable
`TAPE` first, and next use the compiled-in default, which isn't
necessary `stdout` (it is the tape device `/dev/rst0` under OpenBSD for
example).
2016-05-05 06:48:35 +02:00
Manish Goregaokar
9f302b6bcd
Add long diagnostics for E0414 2016-05-05 10:12:22 +05:30
Alex Burka
c5aa879490 implement RFC 1521
Adds documentation to Clone, specifying that Copy types should have a trivial Clone impl.

Fixes #33416.
2016-05-04 22:16:06 -04:00
Taylor Cramer
8facc97711 Add detailed error explanation for E0506
Broke up long lines in E0506

Trimmed E0506 comment to be under max line width

Added function example to E0506

Changed example of erroneous code wording on E0506
2016-05-04 18:40:09 -07:00
bors
8655587c1e Auto merge of #33381 - alexcrichton:fix-nightlies, r=nikomatsakis
mk: Pass CFLAGS for target, not host

This changes the CFLAGS and related variables passed to compiletest to be passed
for the target, not the host, so we can correctly test 32-bit cross compiles on
64-bit host machines.

Hopefuly fixes #33379
2016-05-04 17:38:39 -07:00
Ariel Ben-Yehuda
238e4ee104 fixes 2016-05-05 01:59:22 +03:00
Kaiyin Zhong
16219deb5c Update iterator.rs 2016-05-04 23:29:28 +02:00
bors
7a0ccc458f Auto merge of #33376 - Manishearth:rollup, r=Manishearth
Rollup of 14 pull requests

- Successful merges: #33277, #33294, #33314, #33322, #33333, #33338, #33339, #33340, #33343, #33357, #33363, #33365, #33371, #33372
- Failed merges:
2016-05-04 14:26:28 -07:00
Kaiyin Zhong
2ca31205f3 errors in the doc 2016-05-04 21:50:51 +02:00
Manish Goregaokar
5f9e304310
Improve diagnostics for constants being used in irrefutable patterns
It's pretty confusing and this error triggers in resolve only when "shadowing" a
const, so let's make that clearer.
2016-05-04 23:31:02 +05:30
Garrett Squire
b3de042146 add a check to make tidy to ensure cargo lock file is updated 2016-05-04 10:25:17 -07:00
Alex Crichton
29875c2e5e rustc: Change target_env for ARM targets to gnu
Right now they're `gnueabihf` and `gnueabi`, but when adding new platforms like
musl on ARM it's unfortunate to have to test for all three (`musl`, `musleabi`,
and `musleabihf`). This PR switches everything currently to `gnu`, and the new
musl targets can also use `musl` when they land.

Closes #33244
2016-05-04 10:14:36 -07:00
Jake Goulding
a11ddb3727 Replace copy-pasted variable name with relevant one 2016-05-04 13:05:21 -04:00
Georg Brandl
b48b509d89 typeck: show a note about tuple indexing for erroneous tup[i]
Fixes: #27842
2016-05-04 09:10:54 +02:00
Nick Cameron
25160af4b4 rustdoc: refactor rustdoc syntax highlighting for a more flexible API
Clients can now use the rustdoc syntax highlighter to classify tokens, then use that info to put together there own HTML (or whatever), rather than just having static HTML output.
2016-05-04 10:29:58 +12:00
Alex Crichton
f72bfe6661 rustbuild: Document many more parts of the build
This commit expands the bootstrap build system's `README.md` as well as ensuring
that all API documentation is present and up-to-date. Additionally a new
`config.toml.example` file is checked in with commented out versions of all
possible configuration values.
2016-05-03 15:15:27 -07:00
Adolfo Ochagavía
dca29d7b08 save-analysis: use a decoupled representation for dumped data
Closes #33348
2016-05-03 23:18:38 +02:00
Alex Crichton
74d1520c22 mk: Pass CFLAGS for target, not host
This changes the CFLAGS and related variables passed to compiletest to be passed
for the target, not the host, so we can correctly test 32-bit cross compiles on
64-bit host machines.

Hopefuly fixes #33379
2016-05-03 13:49:35 -07:00
Seo Sanghyeon
282afda58a Update commit hash in cargotest 2016-05-04 04:26:05 +09:00
Michael Woerister
bb0e5254ae Make runtest::check_debugger_output() handle wildcards at end. 2016-05-03 15:00:24 -04:00
Georg Brandl
72560e1403 parser: show a helpful note on unexpected inner comment
Fixes: #30318.
2016-05-03 17:53:23 +02:00
Ariel Ben-Yehuda
6c883840e6 stop dropping impls from cause backtraces 2016-05-03 18:52:55 +03:00
Ariel Ben-Yehuda
62db786fc8 stop using commit_if_ok where no errors can happen 2016-05-03 18:52:55 +03:00
Ariel Ben-Yehuda
6057a7f188 change the newly-added errors to warnings
this commit should be reverted after a release cycle
2016-05-03 18:52:55 +03:00
Ariel Ben-Yehuda
5876b4b12a improve error message for WF Tuples 2016-05-03 18:30:10 +03:00
Ariel Ben-Yehuda
05f1a057b6 address review comments 2016-05-03 18:30:10 +03:00