Commit Graph

44604 Commits

Author SHA1 Message Date
Brian Anderson
4089ba873e Fix local path 2015-07-13 17:56:47 -07:00
Brian Anderson
68781e25c5 std: Refining crate docs
Yet another attempt to make the prose on the std crate page
clearer and more informative.

This does a lot of things: tightens up the opening, adds useful links
(including a link to the search bar), offers guidance on how to use
the docs, and expands the prelude docs as a useful newbie entrypoint.
2015-07-13 17:56:47 -07:00
bors
dd46cf8b22 Auto merge of #26241 - SimonSapin:derefmut-for-string, r=alexcrichton
See https://github.com/rust-lang/rfcs/issues/1157
2015-07-13 23:47:06 +00:00
bors
72483f58e3 Auto merge of #27006 - ryanp-me:apple-llvm, r=brson
Since Apple LLVM no longer reports which version of LLVM it's based off (starting with 7.0.0), I believe it's time to start checking Apple LLVM versions directly.

The changes in this pull request update the `configure` script to check "Apple LLVM" versions independently if no "based off" version can be found. If a "based off" version is included, however, it will be preferred.

(This is a less hacky version of #26653)
2015-07-13 22:14:50 +00:00
Simon Sapin
3226858e50 Fix tests for changes in #26241. 2015-07-13 23:28:58 +02:00
bors
2533a85be4 Auto merge of #26993 - michaelwoerister:msvc-debuginfo, r=alexcrichton
This PR will enable RUSTC to generate PDB debuginfo files when targeting the MSVC toolchain. Mind that these are not full featured PDB files -- they just contain line tables, so you can get proper backtraces and step through your code, but variable values can't be inspected. We are just levering (LLVM's current support)[http://clang.llvm.org/docs/MSVCCompatibility.html] for creating Windows debuginfo. When LLVM's support gets better, we should benefit from that too without much effort.

I also wanted to include some kind of auto test with this PR but I could not get the `rmake` tests to work properly when targeting MSVC.

EDIT:
Closes #19533
2015-07-13 20:42:55 +00:00
Jose Narvaez
2e1f75acc4 Fixed snippet to return the proper error. 2015-07-13 20:54:33 +01:00
Akos Kiss
eaee43aeba Fix section of __morestack for aarch64-unknown-linux-gnu
When building for AArch64/Linux, __morestack ends up in the .note.GNU-stack section,
which causes missing references for the linker. By using the func/endfunc macros
from macros.S we get __morestack right to .text (and a bit more on the side).
2015-07-13 21:13:52 +02:00
bors
6800538489 Auto merge of #26984 - nham:errorck-ignore-long-diag, r=brson
Currently errorck yields bogus `duplicate error code` messages when an error code occurs inside of a long diagnostic message (see https://github.com/rust-lang/rust/pull/26982), because errorck just goes line by line checking for error codes and recording them all.

A simplistic approach to fixing this is just to detect the beginning of a long diagnostic raw string literal (`r##"`) and skip lines until the end of the raw string literal is encountered. I'm not completely confident in this approach, but I think a more robust approach would be more complicated and I wanted to get feedback before pursuing that.
2015-07-13 18:42:49 +00:00
Guillaume Gomez
f52a87c44e Centralize error spaning and add an enum to make this treatment easier 2015-07-13 19:32:45 +02:00
Alex Crichton
07132b499f doc: Add a link to LLVM's new inline assembly docs
Hot off the press, we've now got some nice documentation to link to in LLVM
officially!
2015-07-13 10:08:09 -07:00
bors
0fbcebaaec Auto merge of #27001 - tsion:patch-2, r=Gankro 2015-07-13 16:31:05 +00:00
Frank McSherry
d673bdef0f minor grammatical update
Grammatical update (and passive -> active, but I'm not sure if "Rust" is often used as a subject in the book; feel free to revert that part for style, but keep the subject-verb agreement)
2015-07-13 17:22:08 +02:00
Simon Sapin
eb99f0e420 Mark some new things as unstable. 2015-07-13 16:21:43 +02:00
Simon Sapin
7469914e96 Add str::split_at_mut 2015-07-13 16:21:43 +02:00
Simon Sapin
f9005512a9 Implement IndexMut for String and str.
... matching the existing Index impls.
There is no reason not to if String implement DerefMut.

The code removed in `src/librustc/middle/effect.rs` was added in #9750
to prevent things like `s[0] = 0x80` where `s: String`,
but I belive became unnecessary when the Index(Mut) traits were introduced.
2015-07-13 16:21:43 +02:00
Simon Sapin
90d61d828f Add more tests for AsciiExt::is_ascii 2015-07-13 16:21:43 +02:00
Simon Sapin
304f545274 Add tests for AsciiExt::make_ascii_*case, including on String. 2015-07-13 16:21:43 +02:00
Simon Sapin
2d34a531f4 Implement DerefMut for String
`&mut str` is rarely useful, but it is for e.g.
`AsciiExt::make_ascii_lowercase`.
2015-07-13 16:21:43 +02:00
bors
9ff2d19c45 Auto merge of #27000 - alexcrichton:semi-after-type, r=cmr
This commit expands the follow set of the `ty` and `path` macro fragments to
include the semicolon token as well. A semicolon is already allowed after these
tokens, so it's currently a little too restrictive to not have a semicolon
allowed. For example:

    extern {
        fn foo() -> i32; // semicolon after type
    }

    fn main() {
        struct Foo;

        Foo; // semicolon after path
    }
2015-07-13 13:55:29 +00:00
Corey Farwell
9d94ef5263 Add regression tests for #23595
Closes #23595
2015-07-13 22:25:20 +09:00
Corey Farwell
00f726803b Add regression test for #20544
Closes #20544
2015-07-13 22:25:19 +09:00
Corey Farwell
26ef17d1a9 Add regression test for #22312
Closes #22312
2015-07-13 22:25:19 +09:00
Michael Sproul
4ec3ab61c0 diagnostics: Fix E0303 explanation. 2015-07-13 23:21:33 +10:00
bors
df39a92e22 Auto merge of #27011 - dotdash:issue-26996, r=luqmana
If we match a whole struct or tuple, the "field" for the reassignment
checker will be "None" which means that mutating any field should count
as a reassignment.

Fixes #26996.
2015-07-13 12:24:25 +00:00
Björn Steinbrink
043d7b5198 Correctly detect reassignments to the interior of matched structs/tuples
If we match a whole struct or tuple, the "field" for the reassignment
checker will be "None" which means that mutating any field should count
as a reassignment.

Fixes #26996.
2015-07-13 13:23:13 +02:00
bors
edf29a7102 Auto merge of #26999 - rick68:patch-13, r=Gankro
Reverse PR `#26944 `, symbol `#` are actually as intended.
2015-07-13 10:53:14 +00:00
bors
a16a4173c9 Auto merge of #26990 - rwz:patch-1, r=alexcrichton
The current example does not illustrate threaded behavior imo.
2015-07-13 09:15:12 +00:00
Oliver Schneider
441b9940ec simplify processing of ConstVal objects when not all variants are legal 2015-07-13 10:53:16 +02:00
bors
5f552a5da5 Auto merge of #26981 - wthrowe:div_docs, r=Gankro
This resolves #26845.

I'm not entirely satisfied with the placement of the rounding discussion in the docs for the `Div` and `Rem` traits, but I couldn't come up with anywhere better to put it.  Suggestions are welcome.

I didn't add any discussion of rounding to the `checked_div` (or rem) or `wrapping_div` documentation because those seem to make it pretty clear that they do the same thing as `Div`.
2015-07-13 07:03:01 +00:00
Ryan Pendleton
7131e6f378 verify Apple LLVM versions independently, since the "based on LLVM" version is no longer reported 2015-07-13 00:33:36 -06:00
bors
c044791d80 Auto merge of #26910 - nrc:ice-lang-item, r=@huonw 2015-07-13 05:32:33 +00:00
bors
07be6299d8 Auto merge of #26947 - nagisa:unicode-escape-error, r=nrc
Inspired by the now-mysteriously-closed https://github.com/rust-lang/rust/pull/26782.

This PR introduces better error messages when unicode escapes have invalid format (e.g. `\uFFFF`). It also makes rustc always tell the user that escape may not be used in byte-strings and bytes and fixes some spans to not include unecessary characters and include escape backslash in some others.
2015-07-13 04:00:49 +00:00
Nick Hamann
4630fc75a7 Add comments. 2015-07-12 21:19:19 -05:00
bors
7ea2674c75 Auto merge of #26750 - nrc:refactor-submod, r=sfackler
This makes the functionality usable from outside the parser
2015-07-13 01:07:51 +00:00
William Throwe
7824956eff Move rounding discussion to integer Div/Rem impls 2015-07-12 20:28:16 -04:00
Guillaume Gomez
cbf0b1b399 Remove warnings by centralizing error codes usage 2015-07-13 02:05:02 +02:00
Nick Cameron
7fb8208758 Don't ICE when missing owned_box lang item
Closes #20549
2015-07-13 11:53:16 +12:00
Scott Olson
3f636c3ccb Update my email address. 2015-07-12 19:46:33 -04:00
Ivan Ukhov
71e7fee803 Set zero padding for pre tags 2015-07-12 19:42:42 -04:00
bors
e1ac57de67 Auto merge of #26958 - alexcrichton:down-with-thread-dtors, r=brson
TLS tests have been deadlocking on the OSX bots for quite some time now and this
commit is the result of the investigation into what's going on. It turns out
that a value in TLS which is being destroyed (e.g. the destructor is run) can be
reset back to the initial state **while the destructor is running** if TLS is
re-accessed.

To fix this we stop calling drop_in_place on OSX and instead move the data to a
temporary location on the stack.
2015-07-12 23:37:12 +00:00
Simonas Kazlauskas
4d65ef4549 Tell unicode escapes can’t be used as bytes earlier/more 2015-07-13 02:09:22 +03:00
Guillaume Gomez
48ee57e656 Update error codes 2015-07-13 00:57:16 +02:00
Alex Crichton
af556238eb syntax: Allow semi tokens after macro ty/path
This commit expands the follow set of the `ty` and `path` macro fragments to
include the semicolon token as well. A semicolon is already allowed after these
tokens, so it's currently a little too restrictive to not have a semicolon
allowed. For example:

    extern {
        fn foo() -> i32; // semicolon after type
    }

    fn main() {
        struct Foo;

        Foo; // semicolon after path
    }
2015-07-12 15:53:04 -07:00
Guillaume Gomez
f1b231dd71 Remove unused method 2015-07-13 00:45:50 +02:00
Wei-Ming Yang
5f8b1fadb8 Update boxed.rs
Reverse PR `#26944 `, symbol `#` are actually as intended.
2015-07-13 06:43:54 +08:00
Guillaume Gomez
8b731a5cac Add error codes 2015-07-13 00:31:09 +02:00
Alex Crichton
987dc84b52 std: Fix a TLS destructor bug on OSX
TLS tests have been deadlocking on the OSX bots for quite some time now and this
commit is the result of the investigation into what's going on. It turns out
that a value in TLS which is being destroyed (e.g. the destructor is run) can be
reset back to the initial state **while the destructor is running** if TLS is
re-accessed.

To fix this we stop calling drop_in_place on OSX and instead move the data to a
temporary location on the stack.
2015-07-12 15:08:40 -07:00
bors
05d8767289 Auto merge of #26957 - wesleywiser:rename_connect_to_join, r=alexcrichton
Fixes #26900
2015-07-12 22:05:59 +00:00
bors
adcae006d2 Auto merge of #26895 - jroesch:modernize-typeck-names, r=nikomatsakis
This PR modernizes some names in the type checker. The only remaining snake_case name in ty.rs is `ctxt` which should be resolved by @eddyb's pending refactor. We can bike shed over the names, it would just be nice to bring the type checker inline with modern Rust.

r? @eddyb 

cc @nikomatsakis
2015-07-12 19:22:11 +00:00