]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoMore docs for std::io::Seek
Steve Klabnik [Thu, 9 Jul 2015 20:34:32 +0000 (16:34 -0400)]
More docs for std::io::Seek

9 years agoMore docs for std::io::Read
Steve Klabnik [Thu, 9 Jul 2015 20:23:27 +0000 (16:23 -0400)]
More docs for std::io::Read

9 years agoMore docs for std::io::BufRead
Steve Klabnik [Thu, 9 Jul 2015 18:04:30 +0000 (14:04 -0400)]
More docs for std::io::BufRead

9 years agoAuto merge of #27024 - bluss:io-drain, r=alexcrichton
bors [Tue, 14 Jul 2015 11:13:21 +0000 (11:13 +0000)]
Auto merge of #27024 - bluss:io-drain, r=alexcrichton

Use Vec::drain in BufWriter

I happened past a comment that asked for functionality that we now have.

9 years agoUse Vec::drain in BufWriter
Ulrik Sverdrup [Sat, 11 Jul 2015 20:38:41 +0000 (22:38 +0200)]
Use Vec::drain in BufWriter

I happened past a comment that asked for functionality that we now have.

9 years agoAuto merge of #27016 - alexcrichton:inline-asm-docs, r=steveklabnik
bors [Tue, 14 Jul 2015 07:51:04 +0000 (07:51 +0000)]
Auto merge of #27016 - alexcrichton:inline-asm-docs, r=steveklabnik

Hot off the press, we've now got some nice documentation to link to in LLVM
officially!

9 years agoAuto merge of #27015 - frankmcsherry:patch-1, r=steveklabnik
bors [Tue, 14 Jul 2015 06:19:08 +0000 (06:19 +0000)]
Auto merge of #27015 - frankmcsherry:patch-1, r=steveklabnik

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

9 years agoAuto merge of #27002 - IvanUkhov:docblock-pre-code, r=Gankro
bors [Tue, 14 Jul 2015 04:00:26 +0000 (04:00 +0000)]
Auto merge of #27002 - IvanUkhov:docblock-pre-code, r=Gankro

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

9 years agoAuto merge of #26241 - SimonSapin:derefmut-for-string, r=alexcrichton
bors [Mon, 13 Jul 2015 23:47:06 +0000 (23:47 +0000)]
Auto merge of #26241 - SimonSapin:derefmut-for-string, r=alexcrichton

See https://github.com/rust-lang/rfcs/issues/1157

9 years agoAuto merge of #27006 - ryanp-me:apple-llvm, r=brson
bors [Mon, 13 Jul 2015 22:14:50 +0000 (22:14 +0000)]
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)

9 years agoFix tests for changes in #26241.
Simon Sapin [Mon, 13 Jul 2015 16:59:06 +0000 (18:59 +0200)]
Fix tests for changes in #26241.

9 years agoAuto merge of #26993 - michaelwoerister:msvc-debuginfo, r=alexcrichton
bors [Mon, 13 Jul 2015 20:42:55 +0000 (20:42 +0000)]
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

9 years agoAuto merge of #26984 - nham:errorck-ignore-long-diag, r=brson
bors [Mon, 13 Jul 2015 18:42:49 +0000 (18:42 +0000)]
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.

9 years agodoc: Add a link to LLVM's new inline assembly docs
Alex Crichton [Mon, 13 Jul 2015 17:08:09 +0000 (10:08 -0700)]
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!

9 years agoAuto merge of #27001 - tsion:patch-2, r=Gankro
bors [Mon, 13 Jul 2015 16:31:05 +0000 (16:31 +0000)]
Auto merge of #27001 - tsion:patch-2, r=Gankro

9 years agominor grammatical update
Frank McSherry [Mon, 13 Jul 2015 15:22:08 +0000 (17:22 +0200)]
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)

9 years agoMark some new things as unstable.
Simon Sapin [Wed, 1 Jul 2015 05:39:47 +0000 (07:39 +0200)]
Mark some new things as unstable.

9 years agoAdd str::split_at_mut
Simon Sapin [Mon, 15 Jun 2015 17:24:52 +0000 (19:24 +0200)]
Add str::split_at_mut

9 years agoImplement IndexMut for String and str.
Simon Sapin [Mon, 15 Jun 2015 16:33:21 +0000 (18:33 +0200)]
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.

9 years agoAdd more tests for AsciiExt::is_ascii
Simon Sapin [Fri, 12 Jun 2015 08:30:32 +0000 (10:30 +0200)]
Add more tests for AsciiExt::is_ascii

9 years agoAdd tests for AsciiExt::make_ascii_*case, including on String.
Simon Sapin [Fri, 12 Jun 2015 08:30:16 +0000 (10:30 +0200)]
Add tests for AsciiExt::make_ascii_*case, including on String.

9 years agoImplement DerefMut for String
Simon Sapin [Fri, 12 Jun 2015 08:29:23 +0000 (10:29 +0200)]
Implement DerefMut for String

`&mut str` is rarely useful, but it is for e.g.
`AsciiExt::make_ascii_lowercase`.

9 years agoAuto merge of #27000 - alexcrichton:semi-after-type, r=cmr
bors [Mon, 13 Jul 2015 13:55:29 +0000 (13:55 +0000)]
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
    }

9 years agoAuto merge of #27011 - dotdash:issue-26996, r=luqmana
bors [Mon, 13 Jul 2015 12:24:25 +0000 (12:24 +0000)]
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.

9 years agoCorrectly detect reassignments to the interior of matched structs/tuples
Björn Steinbrink [Mon, 13 Jul 2015 11:23:13 +0000 (13:23 +0200)]
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.

9 years agoAuto merge of #26999 - rick68:patch-13, r=Gankro
bors [Mon, 13 Jul 2015 10:53:14 +0000 (10:53 +0000)]
Auto merge of #26999 - rick68:patch-13, r=Gankro

Reverse PR `#26944 `, symbol `#` are actually as intended.

9 years agoAuto merge of #26990 - rwz:patch-1, r=alexcrichton
bors [Mon, 13 Jul 2015 09:15:12 +0000 (09:15 +0000)]
Auto merge of #26990 - rwz:patch-1, r=alexcrichton

The current example does not illustrate threaded behavior imo.

9 years agoAuto merge of #26981 - wthrowe:div_docs, r=Gankro
bors [Mon, 13 Jul 2015 07:03:01 +0000 (07:03 +0000)]
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`.

9 years agoverify Apple LLVM versions independently, since the "based on LLVM" version is no...
Ryan Pendleton [Mon, 13 Jul 2015 06:33:36 +0000 (00:33 -0600)]
verify Apple LLVM versions independently, since the "based on LLVM" version is no longer reported

9 years agoAuto merge of #26910 - nrc:ice-lang-item, r=@huonw
bors [Mon, 13 Jul 2015 05:32:33 +0000 (05:32 +0000)]
Auto merge of #26910 - nrc:ice-lang-item, r=@huonw

9 years agoAuto merge of #26947 - nagisa:unicode-escape-error, r=nrc
bors [Mon, 13 Jul 2015 04:00:49 +0000 (04:00 +0000)]
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.

9 years agoAdd comments.
Nick Hamann [Mon, 13 Jul 2015 02:19:19 +0000 (21:19 -0500)]
Add comments.

9 years agoAuto merge of #26750 - nrc:refactor-submod, r=sfackler
bors [Mon, 13 Jul 2015 01:07:51 +0000 (01:07 +0000)]
Auto merge of #26750 - nrc:refactor-submod, r=sfackler

This makes the functionality usable from outside the parser

9 years agoMove rounding discussion to integer Div/Rem impls
William Throwe [Mon, 13 Jul 2015 00:28:16 +0000 (20:28 -0400)]
Move rounding discussion to integer Div/Rem impls

9 years agoDon't ICE when missing owned_box lang item
Nick Cameron [Thu, 9 Jul 2015 05:02:35 +0000 (17:02 +1200)]
Don't ICE when missing owned_box lang item

Closes #20549

9 years agoUpdate my email address.
Scott Olson [Sun, 12 Jul 2015 23:46:33 +0000 (19:46 -0400)]
Update my email address.

9 years agoSet zero padding for pre tags
Ivan Ukhov [Sun, 12 Jul 2015 23:42:42 +0000 (19:42 -0400)]
Set zero padding for pre tags

9 years agoAuto merge of #26958 - alexcrichton:down-with-thread-dtors, r=brson
bors [Sun, 12 Jul 2015 23:37:12 +0000 (23:37 +0000)]
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.

9 years agoTell unicode escapes can’t be used as bytes earlier/more
Simonas Kazlauskas [Fri, 10 Jul 2015 19:31:44 +0000 (22:31 +0300)]
Tell unicode escapes can’t be used as bytes earlier/more

9 years agosyntax: Allow semi tokens after macro ty/path
Alex Crichton [Sun, 12 Jul 2015 22:53:04 +0000 (15:53 -0700)]
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
    }

9 years agoUpdate boxed.rs
Wei-Ming Yang [Sun, 12 Jul 2015 22:43:54 +0000 (06:43 +0800)]
Update boxed.rs

Reverse PR `#26944 `, symbol `#` are actually as intended.

9 years agostd: Fix a TLS destructor bug on OSX
Alex Crichton [Sat, 11 Jul 2015 00:46:20 +0000 (17:46 -0700)]
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.

9 years agoAuto merge of #26957 - wesleywiser:rename_connect_to_join, r=alexcrichton
bors [Sun, 12 Jul 2015 22:05:59 +0000 (22:05 +0000)]
Auto merge of #26957 - wesleywiser:rename_connect_to_join, r=alexcrichton

Fixes #26900

9 years agoAuto merge of #26895 - jroesch:modernize-typeck-names, r=nikomatsakis
bors [Sun, 12 Jul 2015 19:22:11 +0000 (19:22 +0000)]
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

9 years agodebuginfo: Instruct MSVC linker to generate PDB file if debuginfo is enabled
Michael Woerister [Sat, 4 Jul 2015 21:25:38 +0000 (23:25 +0200)]
debuginfo: Instruct MSVC linker to generate PDB file if debuginfo is enabled

9 years agoClean up trailing whitespaces
Pavel Pravosud [Sun, 12 Jul 2015 18:23:09 +0000 (11:23 -0700)]
Clean up trailing whitespaces

9 years agoFix multi-threading example in dining-philosophers
Pavel Pravosud [Sun, 12 Jul 2015 18:13:04 +0000 (11:13 -0700)]
Fix multi-threading example in dining-philosophers

9 years agoAuto merge of #26966 - nagisa:tail-init, r=alexcrichton
bors [Sun, 12 Jul 2015 13:16:24 +0000 (13:16 +0000)]
Auto merge of #26966 - nagisa:tail-init, r=alexcrichton

Fixes #26906

9 years agoAuto merge of #26965 - bluss:cstring-debug, r=alexcrichton
bors [Sun, 12 Jul 2015 11:45:23 +0000 (11:45 +0000)]
Auto merge of #26965 - bluss:cstring-debug, r=alexcrichton

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.

9 years agoAuto merge of #26985 - Manishearth:rollup, r=Manishearth
bors [Sun, 12 Jul 2015 09:50:13 +0000 (09:50 +0000)]
Auto merge of #26985 - Manishearth:rollup, r=Manishearth

- Successful merges: #26881, #26967, #26973, #26974, #26976, #26979
- Failed merges:

9 years agoRollup merge of #26979 - tshepang:trim, r=Gankro
Manish Goregaokar [Sun, 12 Jul 2015 13:05:55 +0000 (18:35 +0530)]
Rollup merge of #26979 - tshepang:trim, r=Gankro

- It is clear that what follows are re-exports
- There aren't so many re-exports that examples should be given

9 years agoRollup merge of #26976 - tshepang:more-simple-explanation, r=gankro
Manish Goregaokar [Sun, 12 Jul 2015 13:05:55 +0000 (18:35 +0530)]
Rollup merge of #26976 - tshepang:more-simple-explanation, r=gankro

That sentence make me read it a few times before properly understanding it

9 years agoRollup merge of #26974 - tshepang:trailing-comma, r=Gankro
Manish Goregaokar [Sun, 12 Jul 2015 13:05:55 +0000 (18:35 +0530)]
Rollup merge of #26974 - tshepang:trailing-comma, r=Gankro

9 years agoRollup merge of #26973 - tshepang:repetition, r=Gankro
Manish Goregaokar [Sun, 12 Jul 2015 13:05:54 +0000 (18:35 +0530)]
Rollup merge of #26973 - tshepang:repetition, r=Gankro

9 years agoRollup merge of #26967 - tsurai:master, r=steveklabnik
Manish Goregaokar [Sun, 12 Jul 2015 13:05:54 +0000 (18:35 +0530)]
Rollup merge of #26967 - tsurai:master, r=steveklabnik

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

9 years agoRollup merge of #26881 - andreastt:international_keyboard, r=alexcrichton
Manish Goregaokar [Sun, 12 Jul 2015 13:05:54 +0000 (18:35 +0530)]
Rollup merge of #26881 - andreastt:international_keyboard, r=alexcrichton

Avoids some code duplication and relies less on deprecated properties on `KeyboardEvent`.  The code is still looking quite bad, but that’s primarily because interop in this area is a disaster zone.

9 years agoAuto merge of #26931 - reem:string-conversions, r=alexcrichton
bors [Sun, 12 Jul 2015 07:32:54 +0000 (07:32 +0000)]
Auto merge of #26931 - reem:string-conversions, r=alexcrichton

Implements merged RFC 1152.

Closes #26697.

9 years agoSkip diagnostic codes occurring inside a long diagnostic in errorck.
Nick Hamann [Sun, 12 Jul 2015 07:23:33 +0000 (02:23 -0500)]
Skip diagnostic codes occurring inside a long diagnostic in errorck.

9 years agoAuto merge of #26972 - jethrogb:patch-1, r=alexcrichton
bors [Sun, 12 Jul 2015 06:02:17 +0000 (06:02 +0000)]
Auto merge of #26972 - jethrogb:patch-1, r=alexcrichton

The File object needs to be writable for the set_len to succeed.

9 years agoAdd String::into_boxed_slice and Box<str>::into_string
Jonathan Reem [Fri, 10 Jul 2015 07:04:06 +0000 (00:04 -0700)]
Add String::into_boxed_slice and Box<str>::into_string

Implements merged RFC 1152.

Closes #26697.

9 years agoAuto merge of #26959 - dhuseby:i686-unknown-freebsd, r=alexcrichton
bors [Sun, 12 Jul 2015 02:37:31 +0000 (02:37 +0000)]
Auto merge of #26959 - dhuseby:i686-unknown-freebsd, r=alexcrichton

this adds support for i686-unknown-freebsd target.

9 years agoCorrect and clarify integer division rounding docs
William Throwe [Sun, 12 Jul 2015 00:30:50 +0000 (20:30 -0400)]
Correct and clarify integer division rounding docs

9 years agoAuto merge of #26913 - sfackler:tuple-debug, r=alexcrichton
bors [Sat, 11 Jul 2015 23:41:07 +0000 (23:41 +0000)]
Auto merge of #26913 - sfackler:tuple-debug, r=alexcrichton

This does change the Debug output for 1-tuples to `(foo)` instead of `(foo,)` but I don't think it's that big  of a deal.

r? @alexcrichton

9 years agodoc: remove redundant info
Tshepang Lekhonkhobe [Sat, 11 Jul 2015 22:51:07 +0000 (00:51 +0200)]
doc: remove redundant info

- It is clear that what follows are re-exports
- There aren't so many re-exports that examples should be given

9 years agoAuto merge of #26882 - andreastt:style_improvements, r=alexcrichton
bors [Sat, 11 Jul 2015 21:48:44 +0000 (21:48 +0000)]
Auto merge of #26882 - andreastt:style_improvements, r=alexcrichton

Sharpens the help dialogues edges by removing border-padding, which
matches better with the rest of the document.

Also increases somewhat the rounded edges of the key symbols to
make it clear they are symbols.

Also introduces closing apostrophes and ellipsis for search field
placeholder.

9 years agoImplement RFC 1058
Simonas Kazlauskas [Sat, 11 Jul 2015 11:34:57 +0000 (14:34 +0300)]
Implement RFC 1058

9 years agoChange std::fs::File.set_len example and documentation
jethrogb [Sat, 11 Jul 2015 18:05:47 +0000 (11:05 -0700)]
Change std::fs::File.set_len example and documentation

The File object needs to be writable for the truncate to succeed.

9 years agodoc: make explanation easier to undrstand
Tshepang Lekhonkhobe [Sat, 11 Jul 2015 21:01:30 +0000 (23:01 +0200)]
doc: make explanation easier to undrstand

9 years agoUse escaped byte string representation for CString Debug
Ulrik Sverdrup [Sat, 11 Jul 2015 20:55:52 +0000 (22:55 +0200)]
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.

9 years agoAuto merge of #26878 - Esption:master, r=pnkfelix
bors [Sat, 11 Jul 2015 19:18:02 +0000 (19:18 +0000)]
Auto merge of #26878 - Esption:master, r=pnkfelix

I noticed in docs, specifically http://doc.rust-lang.org/std/primitive.u8.html#method.is_power_of_two, that it was like this, and it was apparently in multiple places too.

Didn't change any occurrences through the cross-depo things. There's a lot in /src/llvm/ for instance, but I'm not confident on how to go about sending fixes for those, so this is just what's in the base rust depo.

r? @steveklabnik

9 years agoremove repetition from E0308 explanation
Tshepang Lekhonkhobe [Sat, 11 Jul 2015 18:21:10 +0000 (20:21 +0200)]
remove repetition from E0308 explanation

9 years agoFix feature name
Wesley Wiser [Sat, 11 Jul 2015 15:14:23 +0000 (11:14 -0400)]
Fix feature name

9 years agoFix version number on SliceConcatExt:join
Wesley Wiser [Sat, 11 Jul 2015 15:00:18 +0000 (11:00 -0400)]
Fix version number on SliceConcatExt:join

9 years agofixing trailing whitespace
Dave Huseby [Sat, 11 Jul 2015 14:18:12 +0000 (07:18 -0700)]
fixing trailing whitespace

9 years agodoc: remove playground links for structs and traits
Cristian Kubis [Sat, 11 Jul 2015 11:48:10 +0000 (13:48 +0200)]
doc: remove playground links for structs and traits

9 years agoAuto merge of #26961 - Manishearth:rollup, r=Manishearth
bors [Sat, 11 Jul 2015 07:40:27 +0000 (07:40 +0000)]
Auto merge of #26961 - Manishearth:rollup, r=Manishearth

- Successful merges: #26932, #26936, #26943, #26944
- Failed merges:

9 years agoRollup merge of #26944 - rick68:patch-11, r=brson
Manish Goregaokar [Sat, 11 Jul 2015 13:10:13 +0000 (18:40 +0530)]
Rollup merge of #26944 - rick68:patch-11, r=brson

fix typos

9 years agoRollup merge of #26943 - brson:installer, r=alexcrichton
Manish Goregaokar [Sat, 11 Jul 2015 13:10:13 +0000 (18:40 +0530)]
Rollup merge of #26943 - brson:installer, r=alexcrichton

9 years agoRollup merge of #26936 - bluss:doc-array, r=steveklabnik
Manish Goregaokar [Sat, 11 Jul 2015 13:10:13 +0000 (18:40 +0530)]
Rollup merge of #26936 - bluss:doc-array, r=steveklabnik

Small tweaks for the documentation of the primitive type array

Follow up to PR #26923, fix a few small details.

9 years agoRollup merge of #26932 - tsurai:master, r=steveklabnik
Manish Goregaokar [Sat, 11 Jul 2015 13:10:13 +0000 (18:40 +0530)]
Rollup merge of #26932 - tsurai:master, r=steveklabnik

Simple adjustment to auto select the nightly channel for examples using unstable feature.

9 years agoadding support for i686-unknown-freebsd target
Dave Huseby [Fri, 10 Jul 2015 23:48:59 +0000 (16:48 -0700)]
adding support for i686-unknown-freebsd target

9 years agoAuto merge of #26903 - steveklabnik:io_function_docs, r=alexcricthon
bors [Sat, 11 Jul 2015 04:44:55 +0000 (04:44 +0000)]
Auto merge of #26903 - steveklabnik:io_function_docs, r=alexcricthon

This round: io::Result and the free functions.

9 years agoAuto merge of #26945 - steveklabnik:doc_io_bufreader, r=alexcrichton
bors [Sat, 11 Jul 2015 03:10:11 +0000 (03:10 +0000)]
Auto merge of #26945 - steveklabnik:doc_io_bufreader, r=alexcrichton

Mostly just adding basic examples, what's there seems mostly good.

r? @alexcrichton

9 years agoFix make tidy
Jared Roesch [Sat, 11 Jul 2015 02:16:35 +0000 (19:16 -0700)]
Fix make tidy

9 years agoAuto merge of #26929 - alexcrichton:windows-dir-junction, r=brson
bors [Sat, 11 Jul 2015 01:35:30 +0000 (01:35 +0000)]
Auto merge of #26929 - alexcrichton:windows-dir-junction, r=brson

Previously on Windows a directory junction would return false from `is_dir`,
causing various odd behavior, specifically calls to `create_dir_all` might fail
when they would otherwise continue to succeed.

Closes #26716

9 years agoRename TypeWithMutability to TypeAndMut
Jared Roesch [Sat, 11 Jul 2015 01:27:06 +0000 (18:27 -0700)]
Rename TypeWithMutability to TypeAndMut

9 years agoAuto merge of #26941 - fhartwig:osx-file-debug, r=alexcrichton
bors [Sat, 11 Jul 2015 00:01:51 +0000 (00:01 +0000)]
Auto merge of #26941 - fhartwig:osx-file-debug, r=alexcrichton

This makes `Debug` for `File` show the file path and access mode of the file on OS X, just like on Linux.
I'd be happy about any feedback how to make this code better. In particular, I'm not sure how to handle the buffer passed to `fnctl`. This way works, but it feels a bit cumbersome. `fcntl` unfortunately doesn't return the length of the path.

9 years agoChange some instances of .connect() to .join()
Wesley Wiser [Fri, 10 Jul 2015 12:19:21 +0000 (08:19 -0400)]
Change some instances of .connect() to .join()

9 years agoRename SliceConcatExt::connect to join #26900
Wesley Wiser [Fri, 10 Jul 2015 03:08:34 +0000 (23:08 -0400)]
Rename SliceConcatExt::connect to join #26900

9 years agoRemove `pub use` of TypeError in ty.rs
Jared Roesch [Fri, 10 Jul 2015 22:40:04 +0000 (15:40 -0700)]
Remove `pub use` of TypeError in ty.rs

9 years agoMore docs for std::io::BufReader
Steve Klabnik [Fri, 10 Jul 2015 20:47:48 +0000 (16:47 -0400)]
More docs for std::io::BufReader

9 years agoAuto merge of #26926 - alexcrichton:llvm-archive-writer, r=brson
bors [Fri, 10 Jul 2015 20:18:30 +0000 (20:18 +0000)]
Auto merge of #26926 - alexcrichton:llvm-archive-writer, r=brson

We have previously always relied upon an external tool, `ar`, to modify archives
that the compiler produces (staticlibs, rlibs, etc). This approach, however, has
a number of downsides:

* Spawning a process is relatively expensive for small compilations
* Encoding arguments across process boundaries often incurs unnecessary overhead
  or lossiness. For example `ar` has a tough time dealing with files that have
  the same name in archives, and the compiler copies many files around to ensure
  they can be passed to `ar` in a reasonable fashion.
* Most `ar` programs found do **not** have the ability to target arbitrary
  platforms, so this is an extra tool which needs to be found/specified when
  cross compiling.

The LLVM project has had a tool called `llvm-ar` for quite some time now, but it
wasn't available in the standard LLVM libraries (it was just a standalone
program). Recently, however, in LLVM 3.7, this functionality has been moved to a
library and is now accessible by consumers of LLVM via the `writeArchive`
function.

This commit migrates our archive bindings to no longer invoke `ar` by default
but instead make a library call to LLVM to do various operations. This solves
all of the downsides listed above:

* Archive management is now much faster, for example creating a "hello world"
  staticlib is now 6x faster (50ms => 8ms). Linking dynamic libraries also
  recently started requiring modification of rlibs, and linking a hello world
  dynamic library is now 2x faster.
* The compiler is now one step closer to "hassle free" cross compilation because
  no external tool is needed for managing archives, LLVM does the right thing!

This commit does not remove support for calling a system `ar` utility currently.
We will continue to maintain compatibility with LLVM 3.5 and 3.6 looking forward
(so the system LLVM can be used wherever possible), and in these cases we must
shell out to a system utility. All nightly builds of Rust, however, will stop
needing a system `ar`.

9 years agoUpdate boxed.rs
Wei-Ming Yang [Fri, 10 Jul 2015 19:50:32 +0000 (03:50 +0800)]
Update boxed.rs

fix typos

9 years agoImprove some of the string escape diagnostic spans
Simonas Kazlauskas [Fri, 10 Jul 2015 18:41:37 +0000 (21:41 +0300)]
Improve some of the string escape diagnostic spans

9 years agoImprove incomplete unicode escape reporting
Simonas Kazlauskas [Fri, 10 Jul 2015 18:37:21 +0000 (21:37 +0300)]
Improve incomplete unicode escape reporting

This improves diagnostic messages when \u escape is used incorrectly and { is
missing. Instead of saying “unknown character escape: u”, it will now report
that unicode escape sequence is incomplete and suggest what the correct syntax
is.

9 years agoAdd trailing , for 1-tuples
Steven Fackler [Fri, 10 Jul 2015 19:03:52 +0000 (11:03 -0800)]
Add trailing , for 1-tuples

9 years agoUpgrade rust-installer. Fixes install on Fedora-based Linuxes.
Brian Anderson [Fri, 10 Jul 2015 17:41:55 +0000 (10:41 -0700)]
Upgrade rust-installer. Fixes install on Fedora-based Linuxes.

9 years agoAuto merge of #26896 - tbu-:pr_getcwd, r=alexcrichton
bors [Fri, 10 Jul 2015 16:26:19 +0000 (16:26 +0000)]
Auto merge of #26896 - tbu-:pr_getcwd, r=alexcrichton

(On Windows, it works already.)

9 years agotrans: Use LLVM's writeArchive to modify archives
Alex Crichton [Thu, 9 Jul 2015 07:14:20 +0000 (00:14 -0700)]
trans: Use LLVM's writeArchive to modify archives

We have previously always relied upon an external tool, `ar`, to modify archives
that the compiler produces (staticlibs, rlibs, etc). This approach, however, has
a number of downsides:

* Spawning a process is relatively expensive for small compilations
* Encoding arguments across process boundaries often incurs unnecessary overhead
  or lossiness. For example `ar` has a tough time dealing with files that have
  the same name in archives, and the compiler copies many files around to ensure
  they can be passed to `ar` in a reasonable fashion.
* Most `ar` programs found do **not** have the ability to target arbitrary
  platforms, so this is an extra tool which needs to be found/specified when
  cross compiling.

The LLVM project has had a tool called `llvm-ar` for quite some time now, but it
wasn't available in the standard LLVM libraries (it was just a standalone
program). Recently, however, in LLVM 3.7, this functionality has been moved to a
library and is now accessible by consumers of LLVM via the `writeArchive`
function.

This commit migrates our archive bindings to no longer invoke `ar` by default
but instead make a library call to LLVM to do various operations. This solves
all of the downsides listed above:

* Archive management is now much faster, for example creating a "hello world"
  staticlib is now 6x faster (50ms => 8ms). Linking dynamic libraries also
  recently started requiring modification of rlibs, and linking a hello world
  dynamic library is now 2x faster.
* The compiler is now one step closer to "hassle free" cross compilation because
  no external tool is needed for managing archives, LLVM does the right thing!

This commit does not remove support for calling a system `ar` utility currently.
We will continue to maintain compatibility with LLVM 3.5 and 3.6 looking forward
(so the system LLVM can be used wherever possible), and in these cases we must
shell out to a system utility. All nightly builds of Rust, however, will stop
needing a system `ar`.

9 years agostd: Consider directory junctions as directories
Alex Crichton [Thu, 9 Jul 2015 17:45:40 +0000 (10:45 -0700)]
std: Consider directory junctions as directories

Previously on Windows a directory junction would return false from `is_dir`,
causing various odd behavior, specifically calls to `create_dir_all` might fail
when they would otherwise continue to succeed.

Closes #26716