about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2015-07-19Add test of impl formattingWilliam Throwe-0/+23
2015-07-18Fix rustdoc formatting of implsWilliam Throwe-24/+18
Some cases displayed negative impls as positive, and some were missing where clauses. This factors all the impl formatting into one function so the different cases can't get out of sync again.
2015-07-14Auto merge of #27024 - bluss:io-drain, r=alexcrichtonbors-8/+2
Use Vec::drain in BufWriter I happened past a comment that asked for functionality that we now have.
2015-07-14Use Vec::drain in BufWriterUlrik Sverdrup-8/+2
I happened past a comment that asked for functionality that we now have.
2015-07-14Auto merge of #27016 - alexcrichton:inline-asm-docs, r=steveklabnikbors-1/+10
Hot off the press, we've now got some nice documentation to link to in LLVM officially!
2015-07-14Auto merge of #27015 - frankmcsherry:patch-1, r=steveklabnikbors-2/+2
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) r? @steveklabnik
2015-07-14Auto merge of #27002 - IvanUkhov:docblock-pre-code, r=Gankrobors-0/+3
The current nonzero side padding of `code` tags is good for legibility in paragraphs and lists; however, it introduces an awkward indentation to `pre` tags. Specifically, when a `pre` tag contains preformatted text with multiple lines, the fist line gets pushed slightly to the right, running the vertical alignment. An example can be seen [here](http://doc.rust-lang.org/std/fmt/#syntax). I propose setting the padding to zero for `code`s contained in `pre`s. Regards, Ivan
2015-07-13Auto merge of #26241 - SimonSapin:derefmut-for-string, r=alexcrichtonbors-27/+213
See https://github.com/rust-lang/rfcs/issues/1157
2015-07-13Fix tests for changes in #26241.Simon Sapin-19/+5
2015-07-13Auto merge of #26993 - michaelwoerister:msvc-debuginfo, r=alexcrichtonbors-0/+24
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-13Auto merge of #26984 - nham:errorck-ignore-long-diag, r=brsonbors-0/+22
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-13doc: Add a link to LLVM's new inline assembly docsAlex Crichton-1/+10
Hot off the press, we've now got some nice documentation to link to in LLVM officially!
2015-07-13minor grammatical updateFrank McSherry-2/+2
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-13Mark some new things as unstable.Simon Sapin-1/+3
2015-07-13Add str::split_at_mutSimon Sapin-0/+34
2015-07-13Implement IndexMut for String and str.Simon Sapin-0/+108
... 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-13Add more tests for AsciiExt::is_asciiSimon Sapin-8/+11
2015-07-13Add tests for AsciiExt::make_ascii_*case, including on String.Simon Sapin-0/+45
2015-07-13Implement DerefMut for StringSimon Sapin-0/+8
`&mut str` is rarely useful, but it is for e.g. `AsciiExt::make_ascii_lowercase`.
2015-07-13Auto merge of #27000 - alexcrichton:semi-after-type, r=cmrbors-1/+18
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-13Auto merge of #27011 - dotdash:issue-26996, r=luqmanabors-1/+21
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-13Correctly detect reassignments to the interior of matched structs/tuplesBjörn Steinbrink-1/+21
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-13Auto merge of #26999 - rick68:patch-13, r=Gankrobors-2/+2
Reverse PR `#26944 `, symbol `#` are actually as intended.
2015-07-13Auto merge of #26990 - rwz:patch-1, r=alexcrichtonbors-15/+15
The current example does not illustrate threaded behavior imo.
2015-07-13Auto merge of #26981 - wthrowe:div_docs, r=Gankrobors-6/+26
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-13Auto merge of #26910 - nrc:ice-lang-item, r=@huonwbors-3/+38
2015-07-13Auto merge of #26947 - nagisa:unicode-escape-error, r=nrcbors-20/+32
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-12Add comments.Nick Hamann-0/+10
2015-07-13Auto merge of #26750 - nrc:refactor-submod, r=sfacklerbors-68/+108
This makes the functionality usable from outside the parser
2015-07-12Move rounding discussion to integer Div/Rem implsWilliam Throwe-8/+22
2015-07-13Don't ICE when missing owned_box lang itemNick Cameron-3/+38
Closes #20549
2015-07-12Set zero padding for pre tagsIvan Ukhov-0/+3
2015-07-12Auto merge of #26958 - alexcrichton:down-with-thread-dtors, r=brsonbors-2/+57
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-13Tell unicode escapes can’t be used as bytes earlier/moreSimonas Kazlauskas-19/+19
2015-07-12syntax: Allow semi tokens after macro ty/pathAlex Crichton-1/+18
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-13Update boxed.rsWei-Ming Yang-2/+2
Reverse PR `#26944 `, symbol `#` are actually as intended.
2015-07-12std: Fix a TLS destructor bug on OSXAlex Crichton-2/+57
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-12Auto merge of #26957 - wesleywiser:rename_connect_to_join, r=alexcrichtonbors-89/+109
Fixes #26900
2015-07-12Auto merge of #26895 - jroesch:modernize-typeck-names, r=nikomatsakisbors-312/+316
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-12debuginfo: Instruct MSVC linker to generate PDB file if debuginfo is enabledMichael Woerister-0/+24
2015-07-12Clean up trailing whitespacesPavel Pravosud-11/+11
2015-07-12Fix multi-threading example in dining-philosophersPavel Pravosud-4/+4
2015-07-12Auto merge of #26966 - nagisa:tail-init, r=alexcrichtonbors-77/+110
Fixes #26906
2015-07-12Auto merge of #26965 - bluss:cstring-debug, r=alexcrichtonbors-4/+16
Use escaped byte string representation for CString Debug Faithfully represent the contents of the CString and CStr in their Debug impl, by treating them as byte strings with our default escaping to ascii representation. Add impl Debug for CStr. Fixes #26964.
2015-07-12Auto merge of #26985 - Manishearth:rollup, r=Manishearthbors-67/+66
- Successful merges: #26881, #26967, #26973, #26974, #26976, #26979 - Failed merges:
2015-07-12Rollup merge of #26979 - tshepang:trim, r=GankroManish Goregaokar-4/+0
- It is clear that what follows are re-exports - There aren't so many re-exports that examples should be given
2015-07-12Rollup merge of #26976 - tshepang:more-simple-explanation, r=gankroManish Goregaokar-2/+1
That sentence make me read it a few times before properly understanding it
2015-07-12Rollup merge of #26974 - tshepang:trailing-comma, r=GankroManish Goregaokar-15/+15
2015-07-12Rollup merge of #26973 - tshepang:repetition, r=GankroManish Goregaokar-1/+1
2015-07-12Rollup merge of #26967 - tsurai:master, r=steveklabnikManish Goregaokar-1/+1
The very first code fragment off every struct and trait documentation page generates wrong playground code. This pull request adjusts ```playpen.js``` to only create a link for real examples. Documentation: ```rust pub struct String { // some fields omitted } ``` Playground: ```rust Struct std::String [−] [src] ``` r? @steveklabnik