Commit Graph

47030 Commits

Author SHA1 Message Date
Alex Crichton
abe7874b35 book: Add documentation on custom allocators
This adds a chapter to the nightly section of the book on leveraging and
implementing the `#![allocator]` attribute to write custom allocators as well as
explaining the current situation with allocators.
2015-10-08 12:49:52 -07:00
bors
e50298f7b5 Auto merge of #28884 - Ms2ger:fmt-mir, r=nikomatsakis
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 21:25:43 +00: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
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
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
bors
d454c826f3 Auto merge of #28865 - GuillaumeGomez:patch-1, r=Manishearth
r? @Manishearth
2015-10-07 10:27:31 +00:00
bors
0ea1305fad Auto merge of #28877 - sourcefrog:doc-fuse, r=alexcrichton 2015-10-07 07:41:36 +00: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
Martin Pool
22404e1f47 Link from Fuse type docstring to iter.fuse that creates them 2015-10-06 19:29:27 -07: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
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
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
Niko Matsakis
e02ddff816 strip out the hair trait and use concrete types instead 2015-10-06 09:51:58 -04: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
bors
547c2cdca8 Auto merge of #28855 - jld:mathematial, r=alexcrichton 2015-10-06 08:48:37 +00:00
bors
b1d9ce967f Auto merge of #28823 - petrochenkov:identeq2, r=nrc
Closes https://github.com/rust-lang/rust/issues/28658
2015-10-06 07:00:25 +00:00
J. Ryan Stinnett
ed97bcd44a Complex import example needs blank lines 2015-10-06 00:11:18 -05:00
bors
3729b126e2 Auto merge of #28698 - nrc:fmt8, r=brson 2015-10-06 04:14:56 +00:00
bors
88b6a5063d Auto merge of #28779 - alexcrichton:ffi-isize-usize, r=nrc
This lint warning was originally intended to help against misuse of the old Rust
`int` and `uint` types in FFI bindings where the Rust `int` was not equal to the
C `int`. This confusion no longer exists (as Rust's types are now `isize` and
`usize`), and as a result the need for this lint has become much less over time.

Additionally, starting with [the RFC for libc][rfc] it's likely that `isize` and
`usize` will be quite common in FFI bindings (e.g. they're the definition of
`size_t` and `ssize_t` on many platforms).

[rfc]: https://github.com/rust-lang/rfcs/pull/1291

This commit disables these lints to instead consider `isize` and `usize` valid
types to have in FFI signatures.
2015-10-06 01:26:13 +00:00
Nick Cameron
b22231c820 rustfmt librustc_trans/save 2015-10-06 14:25:30 +13:00
Jed Davis
da001b8730 Fix doc typo in num::{f32,f64}. 2015-10-05 16:51:43 -07:00
bors
32a8567ea4 Auto merge of #28697 - nrc:fmt7, r=brson 2015-10-05 23:34:07 +00:00
Vadim Petrochenkov
b82d76c8a1 Add comment for the use of Ident in hash map in mtwt 2015-10-06 01:47:35 +03:00
Nick Cameron
7843404d29 Skip one method 2015-10-06 11:24:19 +13:00
Nick Cameron
869e9719fd rustfmt librustc_front 2015-10-06 11:22:34 +13:00
bors
6843ea4a46 Auto merge of #28717 - nagisa:optional-no-landing-pads, r=alexcrichton
Part of #28710

Landing pads during stage0 are now enabled by defaullt. Since this has its downsides and upsides either way, I made it possible to change the option through configure.
2015-10-05 21:47:47 +00:00
Simonas Kazlauskas
a7f2a7881d Fix MSVC stage0 with landing pads enabled 2015-10-05 23:50:04 +03:00
bors
c2be91ede0 Auto merge of #28847 - Ms2ger:typos, r=steveklabnik 2015-10-05 20:02:02 +00:00
bors
be96988cf8 Auto merge of #28849 - semmaz:doc-anchor-fix, r=alexcrichton
r? @steveklabnik
2015-10-05 18:14:09 +00:00
Simon Mazur
fcf8dedb99 docs: anchors fixes 2015-10-05 19:25:54 +03:00
Chris C Cerami
e39808cba8 Link to 'Lifetime Elision' section at first use of elide 2015-10-05 11:40:32 -04:00
Chris C Cerami
915cf01cb6 Use a more common word than "elide", e.g. omit 2015-10-05 11:29:55 -04:00
Ms2ger
6b5349a45e Fix some typos. 2015-10-05 16:48:57 +02:00
bors
c298efdb1f Auto merge of #28748 - nikomatsakis:universal-mir, r=pnkfelix
I had to fix a few things. Notable changes:

1. I removed the MIR support for constants, instead falling back to the existing `ConstVal`. I still think we ought to reform how we handle constants, but it's not clear to me that the approach I was taking is correct, and anyway I think we ought to do it separately.
2. I adjusted how we handle bindings in matches: we now *declare* all the bindings up front, rather than doing it as we encounter them. This is not only simpler, since we don't have to check if a binding has already been declared, it avoids ICEs if any of the arms turn out to be unreachable.
3. I do MIR construction *after* `check_match`, because it detects various broken cases. I'd like for `check_match` to be subsumed by MIR construction, but we can do that as a separate PR (if indeed it makes sense).

I did a crater run and found no regressions in the wild: https://gist.github.com/nikomatsakis/0038f90e10c8ad00f2f8
2015-10-05 03:06:33 +00:00