]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoDoc fix for process.rs
Martin Pool [Sat, 6 Jun 2015 00:27:04 +0000 (17:27 -0700)]
Doc fix for process.rs

File handles are inherited from, not by, the parent process

9 years agoAuto merge of #26024 - Aatch:inline-as_bytes, r=Gankro
bors [Fri, 5 Jun 2015 18:47:38 +0000 (18:47 +0000)]
Auto merge of #26024 - Aatch:inline-as_bytes, r=Gankro

This wasn't marked inline, so wasn't being inlined cross-crate. It's
actually a no-op function, since it's a wrapper around `mem::transmute`.
Marking it inline means that programs calling it can see that it's a
no-op and act accordingly during optimisation.

9 years agoAuto merge of #26023 - arielb1:fast-sized, r=eddyb
bors [Fri, 5 Jun 2015 15:27:34 +0000 (15:27 +0000)]
Auto merge of #26023 - arielb1:fast-sized, r=eddyb

r? @eddyb

The change to `trans::common::type_is_sized` is because we currently abort, rather than return random results, on overflow.

9 years agofix test fallout
Ariel Ben-Yehuda [Fri, 5 Jun 2015 14:27:27 +0000 (17:27 +0300)]
fix test fallout

9 years agoAuto merge of #26028 - steveklabnik:rollup, r=steveklabnik
bors [Fri, 5 Jun 2015 11:59:34 +0000 (11:59 +0000)]
Auto merge of #26028 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #25925, #26001, #26010, #26011, #26017, #26020
- Failed merges:

9 years agoRollup merge of #26020 - frewsxcv:patch-24, r=steveklabnik
Steve Klabnik [Fri, 5 Jun 2015 09:20:29 +0000 (11:20 +0200)]
Rollup merge of #26020 - frewsxcv:patch-24, r=steveklabnik

9 years agoRollup merge of #26017 - Stebalien:fix-rustdoc, r=alexcrichton
Steve Klabnik [Fri, 5 Jun 2015 09:20:28 +0000 (11:20 +0200)]
Rollup merge of #26017 - Stebalien:fix-rustdoc, r=alexcrichton

rust-example-rendered should be a class, not an id.

fixes #26013

9 years agoRollup merge of #26011 - genodeftest:patch-1, r=steveklabnik
Steve Klabnik [Fri, 5 Jun 2015 09:20:28 +0000 (11:20 +0200)]
Rollup merge of #26011 - genodeftest:patch-1, r=steveklabnik

9 years agoRollup merge of #26010 - ranma42:improve-doc, r=steveklabnik
Steve Klabnik [Fri, 5 Jun 2015 09:20:28 +0000 (11:20 +0200)]
Rollup merge of #26010 - ranma42:improve-doc, r=steveklabnik

The statement is not completely exact, because it is valid to have
both 0 non-mutable references and 1 mutable reference. Instead, use
the same wording as in mutability.md.

9 years agoRollup merge of #26001 - sae-bom:master, r=alexcrichton
Steve Klabnik [Fri, 5 Jun 2015 09:20:28 +0000 (11:20 +0200)]
Rollup merge of #26001 - sae-bom:master, r=alexcrichton

fixed build fail on aarch64-android
by support aarch64-android raw type definitions

9 years agoRollup merge of #25925 - azerupi:patch-4, r=steveklabnik
Steve Klabnik [Fri, 5 Jun 2015 09:20:28 +0000 (11:20 +0200)]
Rollup merge of #25925 - azerupi:patch-4, r=steveklabnik

Hi

I added a little section in the for loops about the `enumerate()` function.
I think it's useful for beginners to know this function and how you can use it.

I used the title loopcounter, but it's probably not the best word to describe it. So let me know if there is a better word :)

9 years agoAuto merge of #26008 - Marwes:arc_rc_as_ref, r=alexcrichton
bors [Fri, 5 Jun 2015 08:30:33 +0000 (08:30 +0000)]
Auto merge of #26008 - Marwes:arc_rc_as_ref, r=alexcrichton

The implementations are straightforward, I only hope I got the stability attributes correct(?).

9 years agoAuto merge of #26004 - alexcrichton:msvc-llvm-assertions, r=brson
bors [Fri, 5 Jun 2015 05:11:01 +0000 (05:11 +0000)]
Auto merge of #26004 - alexcrichton:msvc-llvm-assertions, r=brson

If LLVM assertions are enabled for MSVC, it looks like the output directory is
still just `Release` (or assertions are just always ignored on MSVC).

9 years agoMark std::as_bytes as inline
James Miller [Thu, 4 Jun 2015 04:20:48 +0000 (16:20 +1200)]
Mark std::as_bytes as inline

This wasn't marked inline, so wasn't being inlined cross-crate. It's
actually a no-op function, since it's a wrapper around `mem::transmute`.
Marking it inline means that programs calling it can see that it's a
no-op and act accordingly during optimisation.

9 years agoAuto merge of #26022 - Gankro:fix-linked-list, r=huonw
bors [Fri, 5 Jun 2015 01:10:59 +0000 (01:10 +0000)]
Auto merge of #26022 - Gankro:fix-linked-list, r=huonw

Still running tests...

9 years agoproperly null out ptr in LinkedList::split_off - fixes #26020
Alexis Beingessner [Fri, 5 Jun 2015 00:18:27 +0000 (17:18 -0700)]
properly null out ptr in LinkedList::split_off - fixes #26020

9 years agoIntroduce a fast-path for type_is_sized/type_moves_by_default
Ariel Ben-Yehuda [Fri, 5 Jun 2015 00:50:49 +0000 (03:50 +0300)]
Introduce a fast-path for type_is_sized/type_moves_by_default

This seems to improve performance by the same 2-3% of my selection
fast-path.

9 years agoDoc-comment fix; trait names are capitalized
Corey Farwell [Thu, 4 Jun 2015 23:45:43 +0000 (19:45 -0400)]
Doc-comment fix; trait names are capitalized

9 years agoFix order of rustdoc arguments.
Steven Allen [Thu, 4 Jun 2015 21:30:28 +0000 (17:30 -0400)]
Fix order of rustdoc arguments.

rust-example-rendered should be a class, not an id.

fixes #26013

9 years agoAuto merge of #25975 - arielb1:remove-param-space, r=nikomatsakis
bors [Thu, 4 Jun 2015 21:48:58 +0000 (21:48 +0000)]
Auto merge of #25975 - arielb1:remove-param-space, r=nikomatsakis

r? @nikomatsakis

9 years agoAuto merge of #25985 - bombless:patch-2, r=alexcrichton
bors [Thu, 4 Jun 2015 18:32:43 +0000 (18:32 +0000)]
Auto merge of #25985 - bombless:patch-2, r=alexcrichton

nNumberOfBytesToRead --> nNumberOfBytesToWrite
lpNumberOfBytesRead --> lpNumberOfBytesWritten
LPVOID --> LPCVOID

See <https://msdn.microsoft.com/en-us/library/windows/desktop/aa365747(v=vs.85).aspx>

9 years agoAuto merge of #26005 - Ms2ger:get_enum_variant_defs, r=Aatch
bors [Thu, 4 Jun 2015 14:57:18 +0000 (14:57 +0000)]
Auto merge of #26005 - Ms2ger:get_enum_variant_defs, r=Aatch

9 years ago[Documentation: Macros] Use some more SSL
Christian Stadelmann [Thu, 4 Jun 2015 13:53:22 +0000 (15:53 +0200)]
[Documentation: Macros] Use some more SSL

9 years agocrate libc: Correct signature of `WriteFile`
York Xiang [Wed, 3 Jun 2015 09:37:33 +0000 (17:37 +0800)]
crate libc: Correct signature of `WriteFile`

9 years ago[Documentation] Use SSL where possible
Christian Stadelmann [Thu, 4 Jun 2015 13:44:30 +0000 (15:44 +0200)]
[Documentation] Use SSL where possible

9 years agoMinor fix to docs of constraints on mut/non-mut references
Andrea Canciani [Thu, 4 Jun 2015 13:11:36 +0000 (15:11 +0200)]
Minor fix to docs of constraints on mut/non-mut references

The statement is not completely exact, because it is valid to have
both 0 non-mutable references and 1 mutable reference. Instead, use
the same wording as in mutability.md.

9 years agoAdded AsRef implementations for Arc and Rc
Markus Westerlind [Thu, 4 Jun 2015 12:35:04 +0000 (14:35 +0200)]
Added AsRef implementations for Arc and Rc

9 years agoAuto merge of #25981 - nham:fix_E0201, r=alexcrichton
bors [Thu, 4 Jun 2015 11:48:58 +0000 (11:48 +0000)]
Auto merge of #25981 - nham:fix_E0201, r=alexcrichton

It seems better to use "associated function" here. Methods are associated functions that take a `self` parameter.

9 years agoAuto merge of #26002 - Manishearth:rollup, r=Manishearth
bors [Thu, 4 Jun 2015 08:42:22 +0000 (08:42 +0000)]
Auto merge of #26002 - Manishearth:rollup, r=Manishearth

- Successful merges: #25900, #25987, #25988, #25990, #25994, #26000
- Failed merges:

9 years agoInline enum_variant_ids into its only caller.
Ms2ger [Thu, 4 Jun 2015 08:12:19 +0000 (10:12 +0200)]
Inline enum_variant_ids into its only caller.

9 years agoAuto merge of #25991 - Jexell:master, r=alexcrichton
bors [Thu, 4 Jun 2015 06:08:42 +0000 (06:08 +0000)]
Auto merge of #25991 - Jexell:master, r=alexcrichton

Removed an unnecessary `transmute` and replaced some code with an equivalent method.

9 years agoFix doctest (fixup \96#25900)
Manish Goregaokar [Thu, 4 Jun 2015 05:56:31 +0000 (11:26 +0530)]
Fix doctest (fixup \96#25900)

9 years agosupport aarch64-android raw type definitions
Sae-bom Kim [Thu, 4 Jun 2015 01:38:49 +0000 (10:38 +0900)]
support aarch64-android raw type definitions

9 years agoconfigure: Fix LLVM output dir on MSVC
Alex Crichton [Thu, 4 Jun 2015 05:08:47 +0000 (22:08 -0700)]
configure: Fix LLVM output dir on MSVC

If LLVM assertions are enabled for MSVC, it looks like the output directory is
still just `Release` (or assertions are just always ignored on MSVC).

9 years agoRollup merge of #26000 - heejongahn:master, r=alexcrichton
Manish Goregaokar [Thu, 4 Jun 2015 04:37:03 +0000 (10:07 +0530)]
Rollup merge of #26000 - heejongahn:master, r=alexcrichton

Added missing '>' at the end of my email address :)

9 years agoRollup merge of #25994 - marcusklaas:issue-25969, r=huonw
Manish Goregaokar [Thu, 4 Jun 2015 04:37:03 +0000 (10:07 +0530)]
Rollup merge of #25994 - marcusklaas:issue-25969, r=huonw

Issue: https://github.com/rust-lang/rust/issues/25969

Compare the span on the stable branch (correct) with the span on the nightly branch (incorrect) for the following example: http://is.gd/lTAo9c. This pull request fixes the regression.

@Manishearth has been kind enough to pitch some ideas for a regression test, mainly revolving around testing the span in compile-fail test, but this has proven unsuccessful. Other suggestions/ ideas would be much appreciated!

9 years agoRollup merge of #25990 - carols10cents:try-docs, r=nikomatsakis
Manish Goregaokar [Thu, 4 Jun 2015 04:37:02 +0000 (10:07 +0530)]
Rollup merge of #25990 - carols10cents:try-docs, r=nikomatsakis

The API documentation is not explicit enough that because `try!` returns
`Err` early for you, you can only use it in functions that return
`Result`. The book mentions this, but if you come across `try!` outside
of the book and look it up in the docs, this restriction on the return
type of the function is not particularly clear.

I seriously had this epiphany a few days ago after working with Rust for MONTHS, and after seeing [a friend have to come to the same realization](http://joelmccracken.github.io/entries/a-simple-web-app-in-rust-pt-2a/), I'd like to save more people from this confusion :) :sparkling_heart:

9 years agoRollup merge of #25988 - webmobster:master, r=alexcrichton
Manish Goregaokar [Thu, 4 Jun 2015 04:37:02 +0000 (10:07 +0530)]
Rollup merge of #25988 - webmobster:master, r=alexcrichton

The priority policy of RWLock is not specified, and the fact there is no policy should probably be specified.

9 years agoRollup merge of #25987 - pnkfelix:fix-dropck-doc-formatto, r=Manishearth
Manish Goregaokar [Thu, 4 Jun 2015 04:37:02 +0000 (10:07 +0530)]
Rollup merge of #25987 - pnkfelix:fix-dropck-doc-formatto, r=Manishearth

Fix the dropck doc formatting to avoid hitting four-space indent.

This was causing `rustdoc` to interpret the part starting with `(A.) ...` as a code block based on its four-space indentation, which then was treated by `rustdoc` as a *Rust* code snippet, and thus was attempting (and failing) to parse my english as Rust code. Thus causing the compiler-docs build to fail.

Independently, we should probably change `rustdoc` to not interpret four-space indents as code that needs to be tested; it seems too perilous to me at least.

(But the formatting here needed to be changed either way.)

cc Issue #25699.

9 years agoRollup merge of #25900 - lorenzb:more_about_types, r=nikomatsakis
Manish Goregaokar [Thu, 4 Jun 2015 04:37:02 +0000 (10:07 +0530)]
Rollup merge of #25900 - lorenzb:more_about_types, r=nikomatsakis

My main sources of information are [RFC401](https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md), the rust IRC channel, and a bunch of experiments to figure out what `rustc` currently supports.
Note that the RFC calls for some coercion behaviour that is not implemented yet (see #18469).
The documentation in this PR mostly covers current behaviour of rust and doesn't document the future behaviour. I haven't written about receiver expression coercion.

I would be happy to rewrite/adapt the PR according to feedback.

r? @steveklabnik

9 years agoTypo fixed in AUTHORS.txt
Heejong Ahn [Thu, 4 Jun 2015 04:20:27 +0000 (13:20 +0900)]
Typo fixed in AUTHORS.txt

Added '>' at the end of my email address

9 years agoAuto merge of #25743 - michaelsproul:match-diagnostics, r=nrc
bors [Thu, 4 Jun 2015 01:02:41 +0000 (01:02 +0000)]
Auto merge of #25743 - michaelsproul:match-diagnostics, r=nrc

Part of #24407.

Currently the diagnostics for range patterns are a bit wrong:

```rust
fn main() {
    match 5u32 {
        0 ... 10 => (),
        'a' ... 10 => (),
        10 ... 'z' => (),
        "what" ... 10 => (),
        "what" ... "well" => (),
        10 ... "what" => ()
    }
}
```

```
range.rs:4:9: 4:19 error: mismatched types in range:
 expected integral variable,
    found char [E0211]
range.rs:4         'a' ... 10 => (),
                   ^~~~~~~~~~
range.rs:4:9: 4:16 error: only char and numeric types are allowed in range [E0029]
range.rs:4         'a' ... 10 => (),
                   ^~~~~~~
range.rs:4:9: 4:19 error: mismatched types:
 expected `u32`,
    found `char`
(expected u32,
    found char) [E0308]
range.rs:4         'a' ... 10 => (),
                   ^~~~~~~~~~
range.rs:5:9: 5:19 error: mismatched types in range:
 expected char,
    found integral variable [E0211]
range.rs:5         10 ... 'z' => (),
                   ^~~~~~~~~~
range.rs:5:9: 5:15 error: only char and numeric types are allowed in range [E0029]
range.rs:5         10 ... 'z' => (),
                   ^~~~~~
range.rs:6:9: 6:22 error: mismatched types in range:
 expected integral variable,
    found &-ptr [E0211]
range.rs:6         "what" ... 10 => (),
                   ^~~~~~~~~~~~~
range.rs:6:9: 6:19 error: only char and numeric types are allowed in range [E0029]
range.rs:6         "what" ... 10 => (),
                   ^~~~~~~~~~
range.rs:6:9: 6:22 error: mismatched types:
 expected `u32`,
    found `&'static str`
(expected u32,
    found &-ptr) [E0308]
range.rs:6         "what" ... 10 => (),
                   ^~~~~~~~~~~~~
range.rs:7:9: 7:19 error: only char and numeric types are allowed in range [E0029]
range.rs:7         "what" ... "well" => (),
                   ^~~~~~~~~~
range.rs:7:9: 7:26 error: mismatched types:
 expected `u32`,
    found `&'static str`
(expected u32,
    found &-ptr) [E0308]
range.rs:7         "what" ... "well" => (),
                   ^~~~~~~~~~~~~~~~~
range.rs:8:9: 8:22 error: mismatched types in range:
 expected &-ptr,
    found integral variable [E0211]
range.rs:8         10 ... "what" => ()
                   ^~~~~~~~~~~~~
range.rs:8:9: 8:15 error: only char and numeric types are allowed in range [E0029]
range.rs:8         10 ... "what" => ()
                   ^~~~~~
error: aborting due to 12 previous errors
```

The problems here are:

1. The type of the end of the range is used to predict the type of the start (only mildly counter intuitive).
2. E0029 is erroneously generated for `char ... num` and `num ... char`.
2. `u32` is mentioned.
3. Errors which are essentially the same are reported multiple times.

I've attempted to fix this by checking the requirements in a different order. The output I've achieved for the above example is:

```
/home/michael/Temp/range.rs:4:17: 4:22 error: mismatched types in range:
 expected char,
    found integral variable [E0211]
/home/michael/Temp/range.rs:4         'a' ... 10 => (),
                                              ^~~~~
/home/michael/Temp/range.rs:5:16: 5:22 error: mismatched types in range:
 expected integral variable,
    found char [E0211]
/home/michael/Temp/range.rs:5         10 ... 'z' => (),
                                             ^~~~~~
/home/michael/Temp/range.rs:6:9: 6:19 error: only char and numeric types are allowed in range [E0029]
/home/michael/Temp/range.rs:6         "what" ... 10 => (),
                                      ^~~~~~~~~~
/home/michael/Temp/range.rs:6:9: 6:19 help: run `rustc --explain E0029` to see a detailed explanation
/home/michael/Temp/range.rs:6:9: 6:19 note: Start type: &'static str
End type: _
/home/michael/Temp/range.rs:6         "what" ... 10 => (),
                                      ^~~~~~~~~~
/home/michael/Temp/range.rs:7:9: 7:26 error: only char and numeric types are allowed in range [E0029]
/home/michael/Temp/range.rs:7         "what" ... "well" => (),
                                      ^~~~~~~~~~~~~~~~~
/home/michael/Temp/range.rs:7:9: 7:26 help: run `rustc --explain E0029` to see a detailed explanation
/home/michael/Temp/range.rs:7:9: 7:26 note: Start type: &'static str
End type: &'static str
/home/michael/Temp/range.rs:7         "what" ... "well" => (),
                                      ^~~~~~~~~~~~~~~~~
/home/michael/Temp/range.rs:8:16: 8:25 error: only char and numeric types are allowed in range [E0029]
/home/michael/Temp/range.rs:8         10 ... "what" => ()
                                             ^~~~~~~~~
/home/michael/Temp/range.rs:8:16: 8:25 help: run `rustc --explain E0029` to see a detailed explanation
/home/michael/Temp/range.rs:8:16: 8:25 note: Start type: _
End type: &'static str
/home/michael/Temp/range.rs:8         10 ... "what" => ()
                                             ^~~~~~~~~
error: aborting due to 5 previous errors
```

I think this is already tonnes better, but the `Start type/End type` stuff could be neater. I don't think there's really any need to start a `note:` block but I wanted to get some feedback on this. I'd also appreciate advice on how to print the integer types as something other than `_`.

9 years agoFix span for ExprPath variants
Marcus Klaas [Wed, 3 Jun 2015 21:51:51 +0000 (23:51 +0200)]
Fix span for ExprPath variants

9 years agoAuto merge of #25959 - pnkfelix:fsk-hack-move-val-init, r=nikomatsakis
bors [Wed, 3 Jun 2015 21:46:21 +0000 (21:46 +0000)]
Auto merge of #25959 - pnkfelix:fsk-hack-move-val-init, r=nikomatsakis

Hack the move_val_init intrinsic to trans directly into the destination address.

This is to remove an intermediate (and unnecessary) alloca on the stack that one otherwise suffers when using this intrinsic.

This is part of the `box` protocol work; in particular, this is meant to address the `ptr::write` codegen issues alluded to at this comment:

  https://github.com/rust-lang/rust/pull/22086#issuecomment-96168675

cc #22181

9 years agoUse a plain Vec instead of VecPerParamSpace in trait selection.
Ariel Ben-Yehuda [Tue, 2 Jun 2015 23:14:45 +0000 (02:14 +0300)]
Use a plain Vec instead of VecPerParamSpace in trait selection.

9 years agoAuto merge of #24910 - steveklabnik:remove_static_assert, r=alexcrichton
bors [Wed, 3 Jun 2015 18:21:09 +0000 (18:21 +0000)]
Auto merge of #24910 - steveklabnik:remove_static_assert, r=alexcrichton

This was always a weird feature, and isn't being used in the compiler.
Static assertions should be done better than this.

Fixes #13951
Fixes #23008
Fixes #6676

This is behind a feature gate, but that's still a

[breaking-change]

(It's not entirely clear to me that this should or shouldn't have an RFC, but if it does, I'm fine blocking on such a thing.)

9 years agoAdd priority policy to RWLock API Documentation
webmobster [Wed, 3 Jun 2015 12:47:07 +0000 (13:47 +0100)]
Add priority policy to RWLock API Documentation

9 years agoIndent 4 spaces instead of 2
Carol Nichols [Wed, 3 Jun 2015 17:23:55 +0000 (13:23 -0400)]
Indent 4 spaces instead of 2

9 years agoReturn Ok(()) instead of Ok()
Carol Nichols [Wed, 3 Jun 2015 17:23:40 +0000 (13:23 -0400)]
Return Ok(()) instead of Ok()

9 years agoUse write_all instead of write_line
Carol Nichols [Wed, 3 Jun 2015 17:23:20 +0000 (13:23 -0400)]
Use write_all instead of write_line

9 years agoAdd prelude to get Write
Carol Nichols [Wed, 3 Jun 2015 17:15:50 +0000 (13:15 -0400)]
Add prelude to get Write

9 years agoRemove unused get_enum_variant_defs functions.
Ms2ger [Wed, 3 Jun 2015 16:58:26 +0000 (18:58 +0200)]
Remove unused get_enum_variant_defs functions.

9 years agoUpdate linked_list.rs
Jexell [Wed, 3 Jun 2015 15:14:35 +0000 (16:14 +0100)]
Update linked_list.rs

Removed an unnecessary `transmute` and replaced some code with an equivalent method.

9 years agoAuto merge of #25966 - pelmers:save-api, r=nrc
bors [Wed, 3 Jun 2015 14:40:37 +0000 (14:40 +0000)]
Auto merge of #25966 - pelmers:save-api, r=nrc

Move EnumData into the API, and change a few spots where we use &String[..] when it is equivalent to &String.

r? @nrc

9 years agoImprove `try!` docs to make clearer it returns `Result`.
Carol Nichols [Wed, 3 Jun 2015 14:12:16 +0000 (10:12 -0400)]
Improve `try!` docs to make clearer it returns `Result`.

The API documentation is not explicit enough that because `try!` returns
`Err` early for you, you can only use it in functions that return
`Result`. The book mentions this, but if you come across `try!` outside
of the book and look it up in the docs, this restriction on the return
type of the function is not particularly clear.

9 years agoRemove #[static_assert]
Steve Klabnik [Tue, 28 Apr 2015 20:45:22 +0000 (16:45 -0400)]
Remove #[static_assert]

This was always a weird feature, and isn't being used in the compiler.
Static assertions should be done better than this.

This implements RFC #1096.

Fixes #13951
Fixes #23008
Fixes #6676

This is behind a feature gate, but that's still a

[breaking-change]

9 years agoFix the dropck doc formatting to avoid hitting four-space indent.
Felix S. Klock II [Wed, 3 Jun 2015 12:34:24 +0000 (14:34 +0200)]
Fix the dropck doc formatting to avoid hitting four-space indent.

This was causing `rustdoc` to interpret the part starting with
`(A.) ...` as a code block based on its four-space indentation,
which then was treated by `rustdoc` as a *Rust* code snippet,
and thus was attempting (and failing) to parse my english as
Rust code. Thus causing the compiler-docs build to fail.

Independently, we should probably change `rustdoc` to not interpret
four-space indents as code that needs to be tested; it seems too
perilous to me at least.

(But the formatting here needed to be changed either way.)

cc Issue #25699.

9 years agoAuto merge of #25984 - Manishearth:rollup, r=Manishearth
bors [Wed, 3 Jun 2015 09:44:26 +0000 (09:44 +0000)]
Auto merge of #25984 - Manishearth:rollup, r=Manishearth

- Successful merges: #25939, #25963, #25970, #25971, #25974
- Failed merges:

9 years agoRollup merge of #25974 - richo:stack-msg, r=alexcrichton
Manish Goregaokar [Wed, 3 Jun 2015 09:16:41 +0000 (14:46 +0530)]
Rollup merge of #25974 - richo:stack-msg, r=alexcrichton

These are implemented in asm, they're just not inlined.

Open questions are:
* Should I just inline them? They're.. big, but it seems as though this needs violates the #[inline(always)] gaurantees the others make.
* Does something (llvm?) provide these as intrinsics? The structure of this code suggests that we could be hoisting off something else, instead of flagrantly ignoring it like we do for power and mips.

9 years agoRollup merge of #25971 - richo:configurable-python, r=alexcrichton
Manish Goregaokar [Wed, 3 Jun 2015 09:16:41 +0000 (14:46 +0530)]
Rollup merge of #25971 - richo:configurable-python, r=alexcrichton

r? @alexcrichton

9 years agoRollup merge of #25970 - gkoz:make_compiler_docs, r=brson
Manish Goregaokar [Wed, 3 Jun 2015 09:16:41 +0000 (14:46 +0530)]
Rollup merge of #25970 - gkoz:make_compiler_docs, r=brson

9 years agoRollup merge of #25963 - steveklabnik:link_to_cell, r=alexcrichton
Manish Goregaokar [Wed, 3 Jun 2015 09:16:40 +0000 (14:46 +0530)]
Rollup merge of #25963 - steveklabnik:link_to_cell, r=alexcrichton

9 years agoRollup merge of #25939 - wca:fix-freebsd-configure, r=alexcrichton
Manish Goregaokar [Wed, 3 Jun 2015 09:16:40 +0000 (14:46 +0530)]
Rollup merge of #25939 - wca:fix-freebsd-configure, r=alexcrichton

Bug fixes for configure on FreeBSD:
- Don't ban using gcc; newer versions can be installed and other checks should enforce its suitability.
- Don't force Rust to link itself with /usr/local/lib{,gcc4[46]}, which causes builds to fail if Rust is already installed.  I've not been able to find an use case where this is actually necessary.

9 years agoMake E0201 detect when duplicate function is a method.
Nick Hamann [Wed, 3 Jun 2015 06:34:39 +0000 (01:34 -0500)]
Make E0201 detect when duplicate function is a method.

9 years agoImprove diagnostic messages for range patterns.
Michael Sproul [Sun, 24 May 2015 04:29:12 +0000 (14:29 +1000)]
Improve diagnostic messages for range patterns.

9 years agoAuto merge of #25938 - wca:fix-clang-check-compatibility, r=alexcrichton
bors [Wed, 3 Jun 2015 06:07:44 +0000 (06:07 +0000)]
Auto merge of #25938 - wca:fix-clang-check-compatibility, r=alexcrichton

Not all /bin/sh have [[ available, so for compatibility using case..esac
for pattern matching is better.

9 years agos/method/associated function/ in E0201
Nick Hamann [Wed, 3 Jun 2015 03:00:01 +0000 (22:00 -0500)]
s/method/associated function/ in E0201

9 years agoAuto merge of #25935 - wesleywiser:fix_libcollection_build_warnings, r=alexcrichton
bors [Wed, 3 Jun 2015 02:47:45 +0000 (02:47 +0000)]
Auto merge of #25935 - wesleywiser:fix_libcollection_build_warnings, r=alexcrichton

Fixes a bunch of warnings that are generated during the stage0 build of libcollections.

9 years agostd: clarify comments about sp* implementations
Richo Healey [Tue, 2 Jun 2015 23:55:50 +0000 (16:55 -0700)]
std: clarify comments about sp* implementations

9 years agoAuto merge of #25867 - petrochenkov:ucellv, r=alexcrichton
bors [Tue, 2 Jun 2015 23:23:32 +0000 (23:23 +0000)]
Auto merge of #25867 - petrochenkov:ucellv, r=alexcrichton

Now when const functions are implemented and used, the `value` field of `UnsafeCell` can be made deprecated (and then private as intended).

9 years agoconfigure: Allow specifying your python with --python
Richo Healey [Tue, 2 Jun 2015 22:16:30 +0000 (15:16 -0700)]
configure: Allow specifying your python with --python

9 years agomk: fix the CFG_ENABLE_COMPILER_DOCS spelling
Gleb Kozyrev [Tue, 2 Jun 2015 21:49:47 +0000 (00:49 +0300)]
mk: fix the CFG_ENABLE_COMPILER_DOCS spelling

9 years agoAuto merge of #25926 - Ms2ger:enum_variant_ids, r=alexcrichton
bors [Tue, 2 Jun 2015 20:05:49 +0000 (20:05 +0000)]
Auto merge of #25926 - Ms2ger:enum_variant_ids, r=alexcrichton

9 years agoChange &String[..] to just &String, since it coerces to &str automatically.
Peter Elmers [Tue, 2 Jun 2015 19:21:49 +0000 (12:21 -0700)]
Change &String[..] to just &String, since it coerces to &str automatically.

9 years agoMove EnumData to the API.
Peter Elmers [Tue, 2 Jun 2015 19:21:20 +0000 (12:21 -0700)]
Move EnumData to the API.

9 years agoAuto merge of #25868 - alexcrichton:issue-25505, r=brson
bors [Tue, 2 Jun 2015 16:37:21 +0000 (16:37 +0000)]
Auto merge of #25868 - alexcrichton:issue-25505, r=brson

The compiler already has special support for fixing up verbatim paths with disks
on Windows to something that can be correctly passed down to gcc, and this
commit adds support for verbatim UNC paths as well.

Closes #25505

9 years agoLink to cell in TRPL: mutability
Steve Klabnik [Tue, 2 Jun 2015 13:37:54 +0000 (09:37 -0400)]
Link to cell in TRPL: mutability

9 years agoAuto merge of #25905 - michaelwoerister:lldb-pp-strings, r=brson
bors [Tue, 2 Jun 2015 13:07:41 +0000 (13:07 +0000)]
Auto merge of #25905 - michaelwoerister:lldb-pp-strings, r=brson

GDB and LLDB pretty printers have some common functionality and also access some common information, such as the layout of standard library types. So far, this information has been duplicated in the two pretty printing python modules. This PR introduces a common module used by both debuggers.

This PR also implements proper rendering of `String` and `&str` values in LLDB.

9 years agoadded test to ensure move_val_init still handles cleanups properly.
Felix S. Klock II [Tue, 2 Jun 2015 08:37:38 +0000 (10:37 +0200)]
added test to ensure move_val_init still handles cleanups properly.

9 years agoHack the move_val_init intrinsic to trans directly into the destination address.
Felix S. Klock II [Fri, 29 May 2015 23:23:29 +0000 (01:23 +0200)]
Hack the move_val_init intrinsic to trans directly into the destination address.

remove dead code further down for intrinsic.

9 years agoAuto merge of #25958 - Manishearth:rollup, r=Manishearth
bors [Tue, 2 Jun 2015 08:28:20 +0000 (08:28 +0000)]
Auto merge of #25958 - Manishearth:rollup, r=Manishearth

- Successful merges: #25751, #25821, #25920, #25932, #25933, #25936, #25941, #25949, #25951
- Failed merges:

9 years agoRollup merge of #25951 - mbrubeck:nan, r=alexcrichton
Manish Goregaokar [Tue, 2 Jun 2015 05:44:09 +0000 (11:14 +0530)]
Rollup merge of #25951 - mbrubeck:nan, r=alexcrichton

This is based on the documented behavior of cmath::{fmin,fmax}.  It is also tested by existing unit tests in this module.

9 years agoRollup merge of #25949 - mbrubeck:ndebug, r=alexcrichton
Manish Goregaokar [Tue, 2 Jun 2015 05:44:09 +0000 (11:14 +0530)]
Rollup merge of #25949 - mbrubeck:ndebug, r=alexcrichton

As of rust-lang/rust#22980 only `cfg(debug_assertions)` is used in the
standard library and rustc code.

9 years agoRollup merge of #25941 - puzza007:trpl-infinite-iterator-chain-take, r=steveklabnik
Manish Goregaokar [Tue, 2 Jun 2015 05:44:08 +0000 (11:14 +0530)]
Rollup merge of #25941 - puzza007:trpl-infinite-iterator-chain-take, r=steveklabnik

9 years agoRollup merge of #25936 - tshepang:patch-2, r=alexcrichton
Manish Goregaokar [Tue, 2 Jun 2015 05:44:08 +0000 (11:14 +0530)]
Rollup merge of #25936 - tshepang:patch-2, r=alexcrichton

9 years agoRollup merge of #25933 - bluss:rustdoc-fn-css, r=alexcrichton
Manish Goregaokar [Tue, 2 Jun 2015 05:44:08 +0000 (11:14 +0530)]
Rollup merge of #25933 - bluss:rustdoc-fn-css, r=alexcrichton

rustdoc: Tweak css of function where clauses

Method where clauses are put indented on a new line, do the same tweak
to free functions, which makes it cleaner and easier to read.

9 years agoRollup merge of #25932 - bluss:doc-book-1, r=alexcrichton
Manish Goregaokar [Tue, 2 Jun 2015 05:44:08 +0000 (11:14 +0530)]
Rollup merge of #25932 - bluss:doc-book-1, r=alexcrichton

trpl: Fix typo in Raw Pointers chapter

9 years agoRollup merge of #25920 - tshepang:option-map-example, r=Gankro
Manish Goregaokar [Tue, 2 Jun 2015 05:44:08 +0000 (11:14 +0530)]
Rollup merge of #25920 - tshepang:option-map-example, r=Gankro

9 years agoRollup merge of #25821 - jooert:remove_build_date, r=brson
Manish Goregaokar [Tue, 2 Jun 2015 05:44:07 +0000 (11:14 +0530)]
Rollup merge of #25821 - jooert:remove_build_date, r=brson

Closes #25812.

9 years agoRollup merge of #25751 - steveklabnik:translations, r=brson
Manish Goregaokar [Tue, 2 Jun 2015 05:44:07 +0000 (11:14 +0530)]
Rollup merge of #25751 - steveklabnik:translations, r=brson

/cc @kgv, @rust-kr, @KaiserY, @mkpankov

9 years agoAuto merge of #25848 - alexcrichton:fix-msvc, r=brson
bors [Tue, 2 Jun 2015 05:12:51 +0000 (05:12 +0000)]
Auto merge of #25848 - alexcrichton:fix-msvc, r=brson

Now that MSVC support has landed in the most recent nightlies we can now have
MSVC bootstrap itself without going through a GNU compiler first. Unfortunately,
however, the bootstrap currently fails due to the compiler not being able to
find the llvm-ar.exe tool during the stage0 libcore compile. The compiler cannot
find this tool because it's looking inside a directory that does not exist:

    $SYSROOT/rustlib/x86_64-pc-windows-gnu/bin

The `gnu` on this triple is because the bootstrap compiler's host architecture
is GNU. The build system, however, only arranges for the llvm-ar.exe tool to be
available in this location:

    $SYSROOT/rustlib/x86_64-pc-windows-msvc/bin

To resolve this discrepancy, the build system has been modified to understand
triples that are bootstrapped from another triple, and in this case copy the
native tools to the right location.

9 years agoAuto merge of #25654 - petrochenkov:encenv, r=alexcrichton
bors [Tue, 2 Jun 2015 02:08:17 +0000 (02:08 +0000)]
Auto merge of #25654 - petrochenkov:encenv, r=alexcrichton

Fixes https://github.com/rust-lang/rust/issues/25268 and a couple of similar test errors

r? @alexcrichton

9 years ago[libcollections] Fix unused import warnings during stage0 build
Wesley Wiser [Sat, 30 May 2015 23:49:56 +0000 (19:49 -0400)]
[libcollections] Fix unused import warnings during stage0 build

9 years agoAuto merge of #25246 - mzabaluev:io-invalid-data, r=alexcrichton
bors [Mon, 1 Jun 2015 23:12:52 +0000 (23:12 +0000)]
Auto merge of #25246 - mzabaluev:io-invalid-data, r=alexcrichton

This takes the cases from `InvalidInput` where a data format error
was encountered. This is different from the documented semantics
of `InvalidInput`, which more likely indicate a programming error.

Fixes rust-lang/rfcs#906

9 years agoDocument behavior of {f32,f64}::{min,max} on NaN
Matt Brubeck [Mon, 1 Jun 2015 21:59:30 +0000 (14:59 -0700)]
Document behavior of {f32,f64}::{min,max} on NaN

This is based on the documented behavior of cmath::{fmin,fmax}.  It is also
tested by existing unit tests in this module.

9 years agoStop passing the old ndebug/debug cfg directives
Matt Brubeck [Mon, 1 Jun 2015 21:01:13 +0000 (14:01 -0700)]
Stop passing the old ndebug/debug cfg directives

As of rust-lang/rust#22980 only `cfg(debug_assertions)` is used in the
standard library and rustc code.

9 years agoAdd community translations.
Steve Klabnik [Sun, 24 May 2015 15:37:11 +0000 (11:37 -0400)]
Add community translations.

9 years agoAuto merge of #25858 - alexcrichton:disable-os-tls, r=brson
bors [Mon, 1 Jun 2015 19:51:57 +0000 (19:51 +0000)]
Auto merge of #25858 - alexcrichton:disable-os-tls, r=brson

This commit adds a ./configure option called `--disable-elf-tls` which disables
ELF based TLS (that which is communicated to LLVM) on platforms which already
support it. OSX 10.6 does not support this form of TLS, and some users of Rust
need to target 10.6 and are unable to do so due to the usage of TLS. The
standard library will continue to use ELF based TLS on OSX by default (as the
officially supported platform is 10.7+), but this adds an option to compile the
standard library in a way that is compatible with 10.6.

Closes #25342

9 years agoAdded # let lines = "hello\nworld".lines(); to pass the tests
Mathieu David [Mon, 1 Jun 2015 19:34:31 +0000 (21:34 +0200)]
Added # let lines = "hello\nworld".lines(); to pass the tests

9 years agodoc: improve Option::map example
Tshepang Lekhonkhobe [Sun, 31 May 2015 07:37:52 +0000 (09:37 +0200)]
doc: improve Option::map example