Commit Graph

47812 Commits

Author SHA1 Message Date
Andrew Paseltiner
d76cdac482 Tidy core::marker doc summaries 2015-11-05 13:29:46 -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
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
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
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
bors
4ee11cd210 Auto merge of #29536 - sanxiyn:unused-assign-arg, r=alexcrichton
Fix #29136.
2015-11-04 18:52:07 +00: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
bors
11e55e4de1 Auto merge of #29564 - gereeter:no-freevar-refcell, r=sanxiyn 2015-11-04 15:13:49 +00:00
bors
14db074659 Auto merge of #29528 - amitsaha:rust-inside-other-languages-minor, r=nikomatsakis
When referring to the different shared library extensions, specify the OS explicitly.
2015-11-04 13:24:50 +00:00
Steve Klabnik
a118aa270a Mention [T]::sort is stable in docs
Fixes #27322
2015-11-04 12:44:31 +01:00
bors
1be3f9f602 Auto merge of #29200 - tshepang:rustfmt-path, r=aturon 2015-11-04 11:37:50 +00:00
Steve Klabnik
0c93e727c2 Mention multiple impl blocks in TRPL
Fixes #29322
2015-11-04 10:35:09 +01:00
Steve Klabnik
e9989d526d Add note about HashMap::capacity's bounds
Fixes #24591
2015-11-04 10:19:54 +01:00
Steve Klabnik
2f4fbb2bf5 Merge first three chapters into one.
Conceptually, this makes more sense as one introductory chapter.
2015-11-04 10:06:50 +01:00
bors
1ad89e0de6 Auto merge of #29550 - nrc:save-root, r=alexcrichton 2015-11-04 08:39:44 +00:00
Toby Scrace
6fb2333d77 Fix #29542
Reword "Writing the logic" paragraph to prevent `unwrap` being confused
for a macro.
2015-11-04 07:42:54 +00:00
bors
cc403b6c33 Auto merge of #29478 - angelsl:msvc2, r=alexcrichton
r? @alexcrichton
2015-11-04 06:07:24 +00:00
Jonathan S
fb2129e043 Remove the RefCell around freevars and freevars_seen in librustc_resolve 2015-11-03 23:45:47 -06:00
angelsl
9fe4e962e1 Build compiler-rt/builtins with MSVC 2015-11-04 11:43:41 +08:00
bors
a216e84727 Auto merge of #29217 - nikomatsakis:mir-trans, r=dotdash
This branch implements a variant of trans that is based on MIR. It is very incomplete (intentionally), and had only the goal of laying out enough work to enable more incremental follow-on patches. Currently, only fns tagged with `#[rustc_mir]` use the new trans code. I plan to build up a meta-issue as well that tracks the various "not-yet-implemented" points. The only fn that has been tested so far is this amazingly complex "spike" fn:

```rust
#[rustc_mir]
fn sum(x: i32, y: i32) -> i32 {
    x + y
}
```

In general, the most interesting commit is the last one. There are some points on which I would like feedback from @rust-lang/compiler:

- I did not use `Datum`. Originally, I thought that maybe just a `ValueRef` would be enough but I wound up with two very simple structures, `LvalueRef` and `OperandRef`, that just package up a `ValueRef` and a type. Because of MIR's structure, you don't wind up mixing by-ref and by-value so much, and I tend to think that a thinner abstraction layer is better here, but I'm not sure.
- Related to the above, I expect that sooner or later we will analyze temps (and maybe variables too) to find those whose address is never taken and which are word-sized and which perhaps meet a few other criteria. For those, we'll probably want to avoid the alloca, just because it means prettier code.
- I generally tried to re-use data structures from elsewhere in trans, though I'm sure we can trim these down.
- I didn't do any debuginfo primarily because it seems to want node-ids and we have only spans. I haven't really read into that code so I don't know what's going on there.

r? @nrc
2015-11-04 02:13:05 +00:00
Niko Matsakis
e78786315b remove unused import 2015-11-03 20:38:02 -05:00
bors
c340ea1de5 Auto merge of #29547 - arielb1:speculative-upvar, r=eddyb
`resolve_identifier` used to mark a variable as an upvar when used within a closure. However, the function is also used for the "unnecessary qualification" lint, which would mark paths whose last component had the same name as a local as upvars.

Fixes #29522 

r? @eddyb
2015-11-04 00:30:05 +00:00
Niko Matsakis
b46c0fc497 address nits from dotdash 2015-11-03 18:00:35 -05:00
Niko Matsakis
9c9f4be9df correct typos 2015-11-03 18:00:30 -05:00
Niko Matsakis
6a5b263503 Add (and use) an analysis to determine which temps can forgo an alloca. 2015-11-03 18:00:30 -05:00
Nick Cameron
6252af9ce1 save-analysis: emit the crate root 2015-11-04 10:16:06 +13:00
bors
708e319f80 Auto merge of #29545 - mystor:vec-deque-test-panic, r=bluss
I think this should fix the test failures in debug mode from #29492

The assertion was written incorrectly, and I don't like the way the new assertion is written, but I _think_ it does the right thing now.
2015-11-03 21:12:03 +00:00
bors
2a7bd082ac Auto merge of #29532 - Ryman:cow_path, r=alexcrichton 2015-11-03 19:29:44 +00:00
Ariel Ben-Yehuda
ca04855a06 resolve: don't speculatively create freevars when resolving
Fixes #29522
2015-11-03 21:08:42 +02:00
Amanieu d'Antras
59c5191c21 Add test for inline asm indirect memory operands 2015-11-03 18:13:03 +00:00
Michael Layzell
26db71783f Correct incorrect assertion in VecDeque::wrap_copy 2015-11-03 13:03:36 -05:00
angelsl
54d85b4f2f Update compiler-rt 2015-11-04 01:41:46 +08:00
Kevin Butler
f57621535e libcollections: DRY up a PartialEq impl for String 2015-11-03 17:41:42 +00:00