Commit graph

47943 commits

Author SHA1 Message Date
Steve Klabnik
1036d64db0 Rollup merge of #29630 - apasel422:marker, r=steveklabnik
r? @steveklabnik
2015-11-05 22:28:50 +01:00
Steve Klabnik
28fd5e49df Rollup merge of #29624 - rilut:patch-1, r=steveklabnik
Thanks.
r? @steveklabnik
2015-11-05 22:28:49 +01:00
Steve Klabnik
115c223e73 Rollup merge of #29619 - steveklabnik:gh28824, r=alexcrichton
Fixes #28824
2015-11-05 22:28:49 +01:00
Steve Klabnik
0171abb0d0 Rollup merge of #29614 - bluss:vec-drop-comment, r=Gankro
vec: Remove old comment in Vec::drop

This comment was leftover from an earlier revision of a PR, something
that never was merged. There is no ZST special casing in Vec::drop.
2015-11-05 22:28:49 +01:00
Steve Klabnik
15dd4170ff Rollup merge of #29613 - steveklabnik:29506, r=alexcrichton
in favor of just expect()

Fixes #29506
2015-11-05 22:28:49 +01:00
Steve Klabnik
fdccd94269 Rollup merge of #29611 - steveklabnik:gh25918, r=alexcrichton
Originally, this was my 30 minute introduction, and we eventually made
it the opener to the book. But as #25918 has shown, the example I use
here has some issues. The good news is that Rust makes heap allocation
syntatically expensive, but the bad news is that that means showing
equivalent programs from Rust and other languages is difficult. After
thinking about it, I'm not sure this section is pulling its weight, and
since it has problems, I'd rather just pull it than try to re-write it
right now. I think the book is fine without it.

FIxes #25918
2015-11-05 22:28:49 +01:00
Steve Klabnik
09a1e5853e Rollup merge of #29609 - ivan:rustdoc-ctrl-s, r=steveklabnik
Rustdoc pages with a search box inadvertently override `ctrl-s` in addition to the intended `s` and `S` keys.  You can test this in at least Firefox and Chrome (tested: Windows): press `ctrl-s` on http://doc.rust-lang.org/std/.  The search box is focused when instead the browser's save feature should be activated.  This PR fixes `ctrl-s` and possibly other browser shortcuts.
2015-11-05 22:28:48 +01:00
Vadim Petrochenkov
2ef07f0519 Remove stability annotations from trait impl items
Remove `stable` stability annotations from inherent impls
2015-11-06 00:13:46 +03:00
bors
96c95f160f Auto merge of #29583 - dotdash:mir_small_agg, r=nikomatsakis
Fix handling of small aggregate function arguments and assignments of temporaries to lvalues.
2015-11-05 20:06:13 +00:00
Andrew Paseltiner
d76cdac482 Tidy core::marker doc summaries 2015-11-05 13:29:46 -05:00
bors
3a0409d291 Auto merge of #29565 - sfackler:issue-29540, r=huonw
Closes #29540

r? @huonw
2015-11-05 18:15:26 +00:00
Rizky Luthfianto
edee023297 doc(lib.rs): fix #L79 with inline link syntax 2015-11-06 00:15:32 +07:00
Niko Matsakis
dcf323e586 Convert TODO into FIXME 2015-11-05 11:54:24 -05:00
bors
74185aff27 Auto merge of #29593 - ben0x539:reflect-doc-comment, r=steveklabnik
Rustdoc takes the first paragraph as a summary, so having a huge
paragraph that ends with introducing an example looked somewhat wrong on
the module page.
2015-11-05 16:29:07 +00:00
Steve Klabnik
58628b3f79 Beef up macro designator docs
Fixes #28824
2015-11-05 16:46:56 +01:00
Vadim Petrochenkov
1d693976df EmbargoVisitor::reexports isn't needed 2015-11-05 18:42:48 +03:00
Björn Steinbrink
3235b22ee3 Fix handling of fat pointer function arguments
The store for the "extra" data went to the wrong destination.
2015-11-05 16:18:45 +01:00
Vadim Petrochenkov
5092b09648 rustc_privacy: Do not export items needed solely for the reachability analysis
Process them in middle::reachable instead
Add tests for reachability of trait methods written in UFCS form
2015-11-05 18:17:33 +03:00
Steve Klabnik
63576c23e4 remove excess string allocation
&format!("...") is the same as "" if we're not doing any interpolation,
and doesn't allocate an intermediate String.
2015-11-05 15:30:34 +01:00
Ulrik Sverdrup
7300ed8e40 vec: Remove old comment in Vec::drop
This comment was leftover from an earlier revision of a PR, something
that never was merged. There is no ZST special casing in Vec::drop.
2015-11-05 14:41:31 +01:00
Steve Klabnik
6d9502d35b Remove .ok().expect()
in favor of just expect()

Fixes #29506
2015-11-05 14:40:50 +01:00
Steve Klabnik
f70f8b4301 Remove short intro from README
Originally, this was my 30 minute introduction, and we eventually made
it the opener to the book. But as #25918 has shown, the example I use
here has some issues. The good news is that Rust makes heap allocation
syntatically expensive, but the bad news is that that means showing
equivalent programs from Rust and other languages is difficult. After
thinking about it, I'm not sure this section is pulling its weight, and
since it has problems, I'd rather just pull it than try to re-write it
right now. I think the book is fine without it.

FIxes #25918
2015-11-05 14:04:39 +01:00
bors
2509948b3e Auto merge of #29610 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #29416, #29537, #29538, #29539, #29567, #29568, #29571, #29579
- Failed merges:
2015-11-05 12:49:44 +00:00
Benjamin Herr
4db95e652e docs for Reflect: blank line after first sentence
Rustdoc takes the first paragraph as a summary, so having a huge
paragraph that ends with introducing an example looked somewhat wrong on
the module page.
2015-11-05 13:37:43 +01:00
Steve Klabnik
05cbfa478c Rollup merge of #29579 - steveklabnik:gh27322, r=apasel422
Fixes #27322
2015-11-05 12:43:03 +01:00
Steve Klabnik
f04e77d598 Rollup merge of #29571 - steveklabnik:gh29322, r=apasel422
Fixes #29322
2015-11-05 12:43:03 +01:00
Steve Klabnik
255b81d22c Rollup merge of #29568 - steveklabnik:gh24591, r=apasel422
Fixes #24591
2015-11-05 12:43:02 +01:00
Steve Klabnik
92eb851f58 Rollup merge of #29567 - Toby-S:patch-1, r=steveklabnik
Reword "Writing the logic" paragraph to prevent `unwrap` being confused for a macro (and other small changes to improve the flow of the paragraph).

cc @steveklabnik
2015-11-05 12:43:02 +01:00
Steve Klabnik
444e8d6d01 Rollup merge of #29539 - shepmaster:empty-iterator-docs, r=Gankro 2015-11-05 12:43:02 +01:00
Steve Klabnik
268e360f39 Rollup merge of #29538 - steveklabnik:ch1_edits, r=brson
I did some preliminary editing work with No Starch on the first chapter of the book, and here's some of the results. We're going to want to return to this later when @brson etc's new rustup work is done, so this is mostly just a first pass.

But, we agreed that having separate chapters for each of this bit of intro is a bit excessive. So let's move all of this intro stuff into one chapter.

I'd appreciate a careful review of this, as there was also some confusion about some things, which resulted in me taking one huge markdown file apart and splitting it back up, as well as some editor issues, so I _think_ this looks good, but double checking things matters!

/cc @aturon
2015-11-05 12:43:02 +01:00
Steve Klabnik
dd53c834c9 Rollup merge of #29537 - bltavares:issue-24954, r=steveklabnik
Closes #24954
2015-11-05 12:43:02 +01:00
Steve Klabnik
72f3002681 Rollup merge of #29416 - brson:relnotes, r=alexcrichton
[Rendered](https://github.com/brson/rust/blob/relnotes/RELEASES.md)

More highlights would be good. I intend to go through and hyperlink all the APIs still.
2015-11-05 12:43:02 +01:00
Ivan Kozik
3b2a8e1259 librustdoc: don't override ctrl-s and other browser shortcuts 2015-11-05 10:39:02 +00:00
bors
792a9f12cf Auto merge of #28887 - steveklabnik:gh28851, r=alexcrichton
If you try to put something that's bigger than a char into a char
literal, you get an error:

    fn main() {
        let c = 'ஶ்ரீ';
    }

    error: unterminated character constant:

This is a very compiler-centric message. Yes, it's technically
'unterminated', but that's not what you, the user did wrong.

Instead, this commit changes it to

    error: character literal that's larger than a char:

As this actually tells you what went wrong.

Fixes #28851
2015-11-05 10:30:02 +00:00
Steve Klabnik
7bb193c0ae Fixes as per @brson's review 2015-11-05 09:45:38 +01:00
Steve Klabnik
00e9ad1df8 Improve error message for char literals
If you try to put something that's bigger than a char into a char
literal, you get an error:

    fn main() {
        let c = 'ஶ்ரீ';
    }

    error: unterminated character constant:

This is a very compiler-centric message. Yes, it's technically
'unterminated', but that's not what you, the user did wrong.

Instead, this commit changes it to

    error: character literal may only contain one codepoint

As this actually tells you what went wrong.

Fixes #28851
2015-11-05 09:34:14 +01:00
bors
7839827a39 Auto merge of #29581 - gereeter:unwrap-defmap-refcell, r=nrc
This is basically a more conservative recreation of #24096.
2015-11-05 04:24:01 +00:00
Ben Striegel
a2efa2aa29 Deprecate _ms functions that predate the Duration API 2015-11-04 18:43:30 -08:00
Jonathan S
b1788ef8e1 Remove use of RefCell<DefMap> in the simpler parts of pat_util 2015-11-04 20:38:03 -06:00
Jonathan S
1ca1874986 Remove use of RefCell<DefMap> in resolve_lifetime 2015-11-04 20:38:03 -06:00
Jonathan S
f5781f143c Remove use of RefCell<DefMap> in check_static_recursion 2015-11-04 20:38:03 -06:00
Jonathan S
8a69a00941 Unwrap the RefCell around DefMap 2015-11-04 20:38:03 -06:00
Brian Anderson
6b1de254d3 More relnotes tweaks 2015-11-04 16:56:23 -08:00
bors
effcd29652 Auto merge of #29543 - Amanieu:asm_mem_constraint, r=alexcrichton
The "m" memory constraint in inline assembly is broken (generates incorrect code or triggers LLVM asserts) and should not be used. Instead, indirect memory operands should be used with "\*m", "=\*m" and "+\*m".

Clang does this transparently by transforming "m" constraints into "\*m" indirect constraints, but for now just being able to use "\*m" directly is enough since asm! isn't stable.

While "\*m" works fine as an input operand, "=\*m" and "+\*m" need to be specified as input operands because they take a pointer value as an input. This PR relaxes the constraint checker to allow constraints starting with "=" or "+" if the constraint string contains a "\*", which indicates an indirect operand.

This (indirectly) fixes these issues: #29382, #16383 and #13366. The code will need to be changed to use "\*m" instead of "m".
2015-11-04 20:39:49 +00:00
Niko Matsakis
3e6b4545f9 Introduce a SwitchInt and restructure pattern matching to collect
integers and characters into one master switch.
2015-11-04 15:38:43 -05:00
bors
4ee11cd210 Auto merge of #29536 - sanxiyn:unused-assign-arg, r=alexcrichton
Fix #29136.
2015-11-04 18:52:07 +00:00
Björn Steinbrink
5a35f498f3 [MIR-trans] Fix handling of non-alloca temps in trans_operand_into() 2015-11-04 19:30:04 +01:00
bors
8fa8684b4c Auto merge of #29519 - alexcrichton:fix-distcheck, r=nikomatsakis
Needed for distcheck to pass and to have a working tarball.
2015-11-04 17:01:07 +00:00
Björn Steinbrink
fe3a609b0b [MIR-trans] Fix handling of small aggregate arguments
Function arguments that are small aggregates get passed as integer types
instead. To correctly handle that, we need to use store_ty instead of
plain Store.
2015-11-04 16:20:23 +01:00
bors
11e55e4de1 Auto merge of #29564 - gereeter:no-freevar-refcell, r=sanxiyn 2015-11-04 15:13:49 +00:00