Commit Graph

45789 Commits

Author SHA1 Message Date
Alex Ozdemir
e09f83ea44 O(1) count,nth,last for slice::Windows,Chunks(Mut)
Implemented count, nth, and last in constant time for Windows, Chunks,
and ChunksMut created from a slice.

Included checks for overflow in the implementation of nth().

Also added a test for each implemented method to libcoretest.

Addresses #24214
2015-08-12 08:34:51 -07:00
Simonas Kazlauskas
646eace6ec Fix ReentrantMutex documentation wrt DerefMut
Initial version of PR had an DerefMut implementation, which was later removed
because it may cause mutable reference aliasing.

Suggest how to implement mutability with reentrant mutex and remove the claim we
implement DerefMut.
2015-08-12 17:00:58 +03:00
bors
81c9ff24fe Auto merge of #27630 - sylvestre:master, r=dotdash 2015-08-12 12:47:22 +00:00
Robin Kruppe
15518a9c0c Mention that the fast path is broken without SSE. 2015-08-12 11:09:56 +02:00
Jonas Schievink
a016dfb1d1 Fix macro expansion in for loop pattern 2015-08-12 10:34:14 +02:00
bors
2b45a0d908 Auto merge of #27618 - dotdash:drop_fixes, r=luqmana 2015-08-12 08:13:35 +00:00
Tim Neumann
2d4e07edb5 Fix #23808: dead_code lint: visit types in paths 2015-08-12 08:22:08 +02:00
Vadim Chugunov
31be146ba0 Fix #26803 2015-08-11 23:20:19 -07:00
Björn Steinbrink
d17d2dd48e Workaround ODR violations in enum debuginfo
When using a generic enum type that was defined in an external crate,
our debuginfo currently claims that the concrete type (e.g. Option<i32>)
was defined in the current crate, where it was first used.

This means that if there are multiple crates that all use, for example,
Option<i32> values, they'll have conflicting debuginfo, each crate
claiming to have defined that type. This doesn't cause problems in
regular builds, but with LTO enabled, LLVM complains because it tries to
merge the debuginfo for those types and sees the ODR violations.

Since I couldn't find a way to get the file info for the external crate
that actually defined the enum, I'm working around the issue by using
"<unknown>" as the file for enum types. We'll want to re-visit and fix
this later, but this at least this fixes the ICE. And with the file
being unknown instead of wrong, the debuginfo isn't really worse than
before either.

Fixes #26447
2015-08-12 07:42:31 +02:00
Alex Crichton
6b09eb8e17 Test fixes and rebase conflicts 2015-08-11 22:42:22 -07:00
Alex Crichton
fe3ab21054 rollup merge of #27682: neurons/np.27681
PR for [Issue #27681] (https://github.com/rust-lang/rust/issues/27681). A simple update to the latest version of rust when typing the command rustc --version.
2015-08-11 22:42:22 -07:00
Alex Crichton
db3f06388b rollup merge of #27679: durka/patch-5
I'm not 100% sure lines 63 and 73 are typos.
2015-08-11 22:42:22 -07:00
Alex Crichton
837ae4f3d4 rollup merge of #27678: alexcrichton/snapshots
* Lots of core prelude imports removed
* Makefile support for MSVC env vars and Rust crates removed
* Makefile support for morestack removed
2015-08-11 22:42:22 -07:00
Alex Crichton
bbef8893f7 rollup merge of #27676: alexcrichton/msvc-unwind
This commit leverages the runtime support for DWARF exception info added
in #27210 to enable unwinding by default on 64-bit MSVC. This also additionally
adds a few minor fixes here and there in the test harness and such to get
`make check` entirely passing on 64-bit MSVC:

* The invocation of `maketest.py` now works with spaces/quotes in CC
* debuginfo tests are disabled on MSVC
* A link error for librustc was hacked around (see #27438)
2015-08-11 22:42:21 -07:00
Alex Crichton
00ac2c0550 rollup merge of #27674: zaeleus/ios-imports
See https://github.com/rust-lang/rust/issues/27590#issuecomment-128885975.
2015-08-11 22:42:21 -07:00
Alex Crichton
d4f2ef9b30 rollup merge of #27672: eefriedman/ios-target-cpu
This matches the behavior of clang.

See also discussion on #27307.
2015-08-11 22:42:21 -07:00
Alex Crichton
d493659d7b rollup merge of #27666: vadimcn/cabi-typo
I was not able to come up with tests that would expose this bug, as, apparently, Rust types of the args are not used for anything but debug logging.
Thanks to @luqmana for pointing this out!
2015-08-11 22:42:21 -07:00
Alex Crichton
d2552faa9d rollup merge of #27665: frewsxcv/patch-25
They are currently rendered incorrectly

https://doc.rust-lang.org/error-index.html#E0067

https://doc.rust-lang.org/error-index.html#E0070
2015-08-11 22:42:21 -07:00
Alex Crichton
8267ff7ae2 rollup merge of #27664: birkenfeld/patch-1 2015-08-11 22:42:20 -07:00
Alex Crichton
2abc93606f rollup merge of #27663: tbu-/pr_remove_fixme 2015-08-11 22:42:20 -07:00
Alex Crichton
1757837228 rollup merge of #27659: goyox86/goyox86/update-spanish-book-link
This PR just updates the link of my translation of the book to the final rendered version of it.

/cc @steveklabnik
2015-08-11 22:42:20 -07:00
Alex Crichton
29eae0eceb rollup merge of #27650: dotdash/backtrace_test
LLVM might perform tail merging on the calls that initiate the unwinding
process which breaks debuginfo and therefore this test. Since tail
merging is guaranteed to break debuginfo, it should be disabled for this
test.

This allows us to restore a testcase that I had to remove earlier
because of the same problem, because back then I didn't realize that
disabling tail merging was an option.

cc #27619
2015-08-11 22:42:20 -07:00
Alex Crichton
b5b8f1bd90 rollup merge of #27644: AlisdairO/diagnostics194
As title :-)
Part of #24407.

r? @Manishearth

This will need merging with E0193, so probably want to delay any r+ until that goes in and I can merge myself.
2015-08-11 22:42:20 -07:00
Alex Crichton
4c728f8fe7 rollup merge of #27636: llogiq/patch-1
See line 181: The lookup should start with the random index and iterate from there.

Also locked stdout (which makes it a bit faster on my machine). And the `make_lookup` function now uses `map` (as the TODO asked for).

Perhaps the multi-thread output from the fasta benchmark could be used to speed it up even more.
2015-08-11 22:42:19 -07:00
Alex Crichton
726c9f2c80 rollup merge of #27635: GuillaumeGomez/patch-4
r? @Manishearth
2015-08-11 22:42:19 -07:00
Alex Crichton
e837258bbd rollup merge of #27630: sylvestre/master 2015-08-11 22:42:19 -07:00
Alex Crichton
737397c584 rollup merge of #27622: eefriedman/https-url
Also fixes a few outdated links.
2015-08-11 22:11:25 -07:00
Alex Crichton
e132f76703 rollup merge of #27618: dotdash/drop_fixes 2015-08-11 22:11:22 -07:00
Alex Crichton
a0d51819c3 rollup merge of #27615: GuillaumeGomez/send_sync
Part of #22709.
cc @Veedrac

r? @bluss
2015-08-11 22:11:21 -07:00
Alex Crichton
93bb57e765 rollup merge of #27605: AlisdairO/diagnostics387
As title :-)
Part of #24407.

r? @Manishearth
2015-08-11 22:11:20 -07:00
bors
542d56ea91 Auto merge of #27615 - GuillaumeGomez:send_sync, r=huonw
Part of #22709.
cc @Veedrac

r? @bluss
2015-08-12 03:11:48 +00:00
Niranjan Padmanabhan
d73d22b8cc Update version number response for new version of rust 2015-08-11 18:45:53 -07:00
Alex Burka
27c44c8106 correct copy/paste typos in stdio.rs comments
I'm not 100% sure lines 63 and 73 are typos.
2015-08-11 20:58:15 -04:00
Chris Krycho
09ed80fc9c mk/docs: remove Pandoc and LaTeX elements. 2015-08-11 20:12:11 -04:00
Alex Crichton
b6b4f5a0e7 trans: Re-enable unwinding on 64-bit MSVC
This commit leverages the runtime support for DWARF exception info added
in #27210 to enable unwinding by default on 64-bit MSVC. This also additionally
adds a few minor fixes here and there in the test harness and such to get
`make check` entirely passing on 64-bit MSVC:

* The invocation of `maketest.py` now works with spaces/quotes in CC
* debuginfo tests are disabled on MSVC
* A link error for librustc was hacked around (see #27438)
2015-08-11 16:45:02 -07:00
bors
58b0aa5e42 Auto merge of #27584 - TimNN:macro-eof-span, r=huonw
The ideas is to use the span of the complete macro invocation if the span of a macro error is `DUMMY_SP`.

fixes #7970
2015-08-11 23:21:19 +00:00
Alex Crichton
938099a7eb Register new snapshots
* Lots of core prelude imports removed
* Makefile support for MSVC env vars and Rust crates removed
* Makefile support for morestack removed
2015-08-11 15:11:13 -07:00
Michael Macias
8f4aee8e7f std: Fix imports for ios target 2015-08-11 14:57:14 -05:00
Eli Friedman
155689b699 Use correct target CPU for iOS simulator.
This matches the behavior of clang.
2015-08-11 12:05:36 -07:00
Vadim Chugunov
cb5cd5497c Fix copy-paste bug.
(that didn't seem to affect anything as the Rust type of the args wasn't getting used for code generation)
2015-08-11 10:41:22 -07:00
bors
dcdcc6f6bc Auto merge of #27571 - TimNN:pretty-no-crate-type, r=alexcrichton
Because I wanted to change the pretty test as little as possible I added `// compiler-flags: --crate-type=lib` to those test that failed because of a missing `main`. Passes `make check-stage1-pretty` locally.

cc @nrc
cc #27567
2015-08-11 17:27:34 +00:00
Corey Farwell
3acec57d36 Fix formatting for E0067 and E0070 error messages
They are currently rendered incorrectly

https://doc.rust-lang.org/error-index.html#E0067

https://doc.rust-lang.org/error-index.html#E0070
2015-08-11 13:25:11 -04:00
Guillaume Gomez
f1e613eeb1 Update E0425 error explanation 2015-08-11 19:16:23 +02:00
Guillaume Gomez
f2f4a5c862 Add HashSet and HashMap tests 2015-08-11 18:44:39 +02:00
Georg Brandl
29945d5db0 syntax: fix use of "vector" for [x; n] literal and [x, y] patterns 2015-08-11 17:41:06 +02:00
Tobias Bucher
0354d7a800 Remove unneeded FIXME 2015-08-11 17:13:35 +02:00
bors
91c618f133 Auto merge of #27575 - brson:lint, r=alexcrichton
This reverts commit 9191a78955.

This was reverted previously until the `--cap-lints` option was implemented.
2015-08-11 14:42:23 +00:00
Alisdair Owens
fef60c03e0 add long diagnostics for E0194 2015-08-11 15:09:09 +01:00
bors
1af31d4974 Auto merge of #27553 - Diggsey:win-path-fix, r=alexcrichton
I have no idea how bors keeps working without this - I can only assume it's some peculiarity of how windows searches for DLLs.

Without this change, running `make check` on windows will not correctly set PATH to include eg. `x86_64-pc-windows-gnu\stage1\bin\rustlib\x86_64-pc-windows-gnu\lib`, and when it tries to run eg. `stage1/test/stdtest-x86_64-pc-windows-gnu.exe`, it will fail because windows can't find the DLLs on which it relies.

It seems to be just a mistake: when the equivalent was added for the branch that deals with unix-like platforms, the windows branch was left unchanged.
2015-08-11 12:59:14 +00:00
bors
c756526eb2 Auto merge of #27658 - Manishearth:rollup, r=Manishearth
- Successful merges: #27542, #27571, #27572, #27577, #27611, #27612, #27617, #27633, #27647, #27648, #27651
- Failed merges:
2015-08-11 11:20:11 +00:00