Commit Graph

47458 Commits

Author SHA1 Message Date
Cristi Cobzarenco
49d2441b05 bench: rewrite nbody for better vectorization 2015-10-07 21:05:22 +01:00
bors
babe953e69 Auto merge of #28852 - steveklabnik:doc_char, r=alexcrichton
Mostly adding examples, and reformatting for consistency.
2015-10-07 19:40:03 +00:00
Boris Egorov
1e0fbbd721 trpl: Fix some bad wording in iterators subsection 2015-10-07 23:57:52 +06:00
Boris Egorov
2ba0c48b79 trpl: Use ordered list to release user from counting
Later in text we mention 'step four' and 'step three'. This fix releases user
from counting.
2015-10-07 23:41:20 +06:00
Ariel Ben-Yehuda
8afa1762f0 use the struct's ctor-id as its variant def-id
this makes the code cleaner, and is a complement to the cleanup on the
HIR side.
2015-10-07 20:31:23 +03:00
bors
3cee9e20f2 Auto merge of #28873 - dotdash:28339, r=nikomatsakis
Fixes #28839
2015-10-07 16:41:55 +00:00
Björn Steinbrink
4da796f1f4 Fix reborrows of &mut pointers
Fixes #28839
2015-10-07 17:23:51 +02:00
bors
c056cbbe05 Auto merge of #28868 - JIghtuse:str_doc, r=steveklabnik 2015-10-07 13:58:51 +00:00
Corey Farwell
e84461a5c5 Alter formatting for words in Option::cloned doc comment 2015-10-07 09:38:36 -04:00
Ms2ger
c73e78ce64 Partially format librustc_mir with rustfmt.
This commit contains some of the changes proposed by a rustfmt invocation,
chosen based on the fairly non-deterministic metric of how much I liked the
change. I expect we will run rustfmt on this crate again later, probably
accepting more of its changes. For now, this is already an improvement over
the status-quo.
2015-10-07 14:37:45 +02:00
bors
add6b90a3f Auto merge of #28867 - panicbit:german-trpl, r=steveklabnik 2015-10-07 12:13:32 +00:00
Will Speak
5d01556183 Make --explain Handle Partial Error Codes
Currently the explain command requires full erorr codes, complete with
the leading zeros and the E at the beginning. This commit changes that,
if you don't supply a full erorr code then the error number is padded
out to the required size and the E is added to the beginning.

This means that where previously you would need to write E0001, you can
now write 0001, 001, 01 or jsut 1 to refer to the same error.
2015-10-07 11:59:51 +01:00
bors
d454c826f3 Auto merge of #28865 - GuillaumeGomez:patch-1, r=Manishearth
r? @Manishearth
2015-10-07 10:27:31 +00:00
Simonas Kazlauskas
d5dfa87f4d Add a test for #16403 2015-10-07 12:12:13 +03:00
Guillaume Gomez
a94f684129 Add error explanation for E0515 2015-10-07 10:25:46 +02:00
Guillaume Gomez
8fee5480c3 Add new error code 2015-10-07 10:25:45 +02:00
bors
0ea1305fad Auto merge of #28877 - sourcefrog:doc-fuse, r=alexcrichton 2015-10-07 07:41:36 +00:00
Yoshito Komatsu
03dfe89786 Fix a typo
Add musl link
2015-10-07 16:07:42 +09:00
bors
a63b0f045d Auto merge of #28866 - nikomatsakis:remove-hair-trait, r=nrc
As the subject says. This PR also removes the `Hair` trait, which was impeding the ability to build such a map, as described in this thread on internals:

https://internals.rust-lang.org/t/removing-the-hair-trait-from-mir-construction/2732

r? @nrc
2015-10-07 05:11:44 +00:00
Colin Wallace
4119fc2749 Fix "the the" typo and split a run-on sentence 2015-10-06 21:39:18 -07:00
Martin Pool
cbf97c3e65 style guide: suggest manual links to constructors 2015-10-06 19:42:58 -07:00
Martin Pool
22404e1f47 Link from Fuse type docstring to iter.fuse that creates them 2015-10-06 19:29:27 -07:00
Jack Wilson
d21b4f5451 Use the correct mod name from the example 2015-10-06 19:22:05 -07:00
Steve Klabnik
4d40dd3c03 Restore line endings in a test
In #28864, @aarzee submitted some whitespace fixes. I r+'d it. But
@retp998 noticed[1] that this file is explicitly a test of this kind of
whitespace, and so I shouldn't have changed it. This restores the old
line endings.

1: https://github.com/rust-lang/rust/pull/28864#discussion_r41332279
2015-10-06 21:59:49 -04:00
bors
b2cc47ff94 Auto merge of #28841 - jld:const-slice-ice, r=Aatch
This turned up as part of #3170.  When constructing an `undef` value to
return in the error case, we were trying to get the element type of the
Rust-level value being indexed instead of the underlying array; when
indexing a slice, that's not an array and the LLVM assertion failure
reflects this.

The regression test is a lightly altered copy of `const-array-oob.rs`.
2015-10-07 01:59:31 +00:00
Daniel Carral
f5a653e46f Update TRPL/Installing Rust to avoid concrete version numbers
As discussed in PR #28817
2015-10-07 00:30:02 +02:00
Steve Klabnik
51097fcdac Write a bunch of docs for char
Mostly adding examples, and reformatting for consistency.
2015-10-06 17:58:51 -04:00
Niko Matsakis
50c83a9061 remove now unnecessary trait impls 2015-10-06 17:15:54 -04:00
bors
80660d6ba0 Auto merge of #28864 - aarzee:master, r=steveklabnik
Remove leading newlines in files and replace lines containing only whitespace with blank lines
2015-10-06 20:21:34 +00:00
Niko Matsakis
0d51e80b6d fix some tidy complaints 2015-10-06 14:58:15 -04:00
Boris Egorov
836be409ee doc: Mention split_whitespace in split doc 2015-10-07 00:44:55 +06:00
bors
e7b6056048 Auto merge of #28842 - chrisccerami:patch-1, r=steveklabnik 2015-10-06 17:57:00 +00:00
panicbit
ce1f4fc0ba Add link to the german trpl translation 2015-10-06 19:50:09 +02:00
Carlos Liam
aba267fd0d Replace multiple trailing newlines with a single trailing newline
Sorry I didn’t get this in the last PR (#28864), I hadn’t thought of it.
2015-10-06 13:06:39 -04:00
Niko Matsakis
24ee4b1f6c rename dump to mir_map, which seems more suitable 2015-10-06 12:37:43 -04:00
Niko Matsakis
810cf71a3c make mir map available to later passes (currently unused) 2015-10-06 12:35:53 -04:00
Guillaume Gomez
df7d3b916d Add error explanation for E0496 2015-10-06 18:04:09 +02:00
Niko Matsakis
3099fd4617 store the mir into a map, restructure to avoid rebuilding so many times 2015-10-06 11:41:31 -04:00
Carlos Liam
3967e1c940 Clean newlines 2015-10-06 11:14:11 -04:00
Felix S. Klock II
7a4743fab0 review comment: use RFC example for compile-fail/issue28498-reject-ex1.rs
(It is not *exactly* the text from the RFC, but the only thing it adds
is a call to a no-op function that is just an attempt to make it clear
where the potential for impl specialization comes from.)
2015-10-06 16:54:10 +02:00
Felix S. Klock II
5708f44b36 shorten URLs to placate make tidy. 2015-10-06 16:51:20 +02:00
Niko Matsakis
5858f6bd67 purge -Z always-build-mir, which is no longer relevant 2015-10-06 10:48:11 -04:00
Chris C Cerami
f490f5171e Wrap words at 80 characters 2015-10-06 10:39:37 -04:00
Craig Hills
7895ec2d57 address review concerns 2015-10-06 10:30:33 -04:00
Niko Matsakis
e02ddff816 strip out the hair trait and use concrete types instead 2015-10-06 09:51:58 -04:00
Felix S. Klock II
83077bee93 compile-fail tests.
One just checks that we are feature-gating the UGEH attribute (as
usual for attributes associated with unstable features).

The other is adapted from the RFC 1238 text, except that it has been
extended somewhat to actually *illustrate* the scenario that we are
trying to prevent, namely observing the state of data, from safe code,
after the destructor for that data has been executed.
2015-10-06 14:16:50 +02:00
Felix S. Klock II
eea299beaa run-pass tests for RFC 1238.
Illustrates cases that worked before and must continue to work, and a
case that shows how to use the `unsafe_destructor_blind_to_params`
attribute (aka "the UGEH attribute") to work around
cannot-assume-parametricity.
2015-10-06 14:16:49 +02:00
Felix S. Klock II
d778e57bf6 Add RFC 1238's unsafe_destructor_blind_to_params (UGEH) where needed.
I needed it in `RawVec`, `Vec`, and `TypedArena` for `rustc` to
bootstrap; but of course that alone was not sufficient for `make
check`.

Later I added `unsafe_destructor_blind_to_params` to collections, in
particular `LinkedList` and `RawTable` (the backing representation for
`HashMap` and `HashSet`), to get the regression tests exercising
cyclic structure from PR #27185 building.

----

Note that the feature is `dropck_parametricity` (which is not the same
as the attribute's name). We will almost certainly vary our strategy
here in the future, so it makes some sense to have a not-as-ugly name
for the feature gate. (The attribute name was deliberately selected to
be ugly looking.)
2015-10-06 14:16:49 +02:00
Felix S. Klock II
9868df2fd5 Non-parametric dropck; instead trust an unsafe attribute (RFC 1238).
Implement cannot-assume-parametricity (CAP) from RFC 1238, and add the
UGEH attribute.

----

Note that we check for the attribute attached to the dtor method, not
the Drop impl.

(This is just to match the specification of RFC and the tests; I am
not wedded to this approach.)
2015-10-06 14:16:20 +02:00
bors
2f60768e84 Auto merge of #28858 - jryans:crate-doc-syntax, r=alexcrichton
Without the blank lines, the content is displayed inline, including the `rust,ignore` syntax hint.

r? @steveklabnik
2015-10-06 10:37:02 +00:00