]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoRollup merge of #34160 - hoodie:bug/GoT_References, r=GuillaumeGomez
Seo Sanghyeon [Fri, 10 Jun 2016 12:16:45 +0000 (21:16 +0900)]
Rollup merge of #34160 - hoodie:bug/GoT_References, r=GuillaumeGomez

Fixed two little Game Of Thrones References

Fixed: conflicting spelling of "Jon Snow"
Fixed: It's call "Night's Watch"

8 years agoRollup merge of #34159 - seventh-chord:master, r=alexcrichton
Seo Sanghyeon [Fri, 10 Jun 2016 12:16:45 +0000 (21:16 +0900)]
Rollup merge of #34159 - seventh-chord:master, r=alexcrichton

Updated README to account for changes in MSYS2

One of the newest versions of MSYS2 now only has one .cmd file which replaces the old bat files. It has to be used to launch the mingw32/64 shell.

8 years agoRollup merge of #34148 - srinivasreddy:bitflags_rustfmt, r=nagisa
Seo Sanghyeon [Fri, 10 Jun 2016 12:16:45 +0000 (21:16 +0900)]
Rollup merge of #34148 - srinivasreddy:bitflags_rustfmt, r=nagisa

run rustfmt on librustc_bitflags folder

8 years agoRollup merge of #34146 - srinivasreddy:libflate_rustfmt, r=nagisa
Seo Sanghyeon [Fri, 10 Jun 2016 12:16:45 +0000 (21:16 +0900)]
Rollup merge of #34146 - srinivasreddy:libflate_rustfmt, r=nagisa

run rustfmt on libflate folder

8 years agoRollup merge of #34145 - matklad:any-docs, r=steveklabnik
Seo Sanghyeon [Fri, 10 Jun 2016 12:16:45 +0000 (21:16 +0900)]
Rollup merge of #34145 - matklad:any-docs, r=steveklabnik

docs: simplify wording

It took me more then a moment to decipher "with no non-`'static`" thing :)

"`'static` type" should say the same thing more clearly.

r? @steveklabnik

8 years agoRollup merge of #34136 - imjacobclark:ice-test-case-25579, r=nikomatsakis
Seo Sanghyeon [Fri, 10 Jun 2016 12:16:44 +0000 (21:16 +0900)]
Rollup merge of #34136 - imjacobclark:ice-test-case-25579, r=nikomatsakis

Test case for borrowk ICE #25579

r? @nikomatsakis

Fixes #25579

8 years agoRollup merge of #34129 - jviide:from-string-box-error, r=steveklabnik
Seo Sanghyeon [Fri, 10 Jun 2016 12:16:44 +0000 (21:16 +0900)]
Rollup merge of #34129 - jviide:from-string-box-error, r=steveklabnik

Remove a gotcha from book/error-handling.md

The book's "Error handling with `Box<Error>`" section talks about `Box<Error>`. In the actual example `Box<Error + Send + Sync>` is used instead so that the corresponding From impls could be used to convert a plain string to an error type. Rust 1.7 added support for conversion from `&str`/`String` to
`Box<Error>`, so this gotcha and later references to it can now be removed.

r? @steveklabnik

8 years agoRollup merge of #34088 - srinivasreddy:rustfmt_map.rs, r=nrc
Seo Sanghyeon [Fri, 10 Jun 2016 12:16:44 +0000 (21:16 +0900)]
Rollup merge of #34088 - srinivasreddy:rustfmt_map.rs, r=nrc

run rustfmt on map.rs in libcollections/btree folder

8 years agoAuto merge of #34086 - srinivasreddy:rustfmt_liballoc_jemalloc, r=nagisa
bors [Fri, 10 Jun 2016 07:19:09 +0000 (00:19 -0700)]
Auto merge of #34086 - srinivasreddy:rustfmt_liballoc_jemalloc, r=nagisa

run rustfmt on liballoc_jemalloc folder

8 years agoAuto merge of #34046 - Vtec234:fix-atomic-doc, r=steveklabnik
bors [Fri, 10 Jun 2016 04:29:26 +0000 (21:29 -0700)]
Auto merge of #34046 - Vtec234:fix-atomic-doc, r=steveklabnik

Fix wrong statement in compare_exchange doc

The documentation for `core::sync::atomic::AtomicSomething::compare_exchange` contains a wrong, or imprecise, statement about the return value. It goes:

The return value is a result indicating whether the new value was written and containing
the previous value. On success this value is guaranteed to be equal to `new`.

In the second sentence, `this value` is gramatically understood as referring to `return value` from the first sentence. Due to how CAS works, the returned value is always what was in the atomic variable _before_ the operation occurred, not what was written into it during the operation. Hence, the fixed doc should say:

The return value is a result indicating whether the new value was written and containing
the previous value. On success this value is guaranteed to be equal to `current`.

This version is confirmed by the runnable examples in variants of `AtomicSomething`, e.g.

    assert_eq!(some_bool.compare_exchange(true, false, Ordering::Acquire, Ordering::Relaxed),
    Ok(true));

where the returned value is `Ok(current)`. This PR fixes all occurrences of this bug I could find.

An alternative solution would be to modify the second sentence so that it refers to the value _written_ into the Atomic rather than what was there before, in which case it would be correct. Example alternative formulation:

On success the value written into the `bool`/`usize`/`whatever` is guaranteed to be equal to `new`.

r? @steveklabnik

8 years agoAuto merge of #34173 - srinivasreddy:rm_redundant, r=alexcrichton
bors [Fri, 10 Jun 2016 01:38:46 +0000 (18:38 -0700)]
Auto merge of #34173 - srinivasreddy:rm_redundant, r=alexcrichton

remove redundant  assert statements

8 years agoAuto merge of #34095 - petrochenkov:pathir2, r=jseyfried
bors [Thu, 9 Jun 2016 22:48:37 +0000 (15:48 -0700)]
Auto merge of #34095 - petrochenkov:pathir2, r=jseyfried

Improvements to pattern resolution + some refactoring

Continuation of https://github.com/rust-lang/rust/pull/33929
First commit is a careful rewrite of `resolve_pattern`, pattern path resolution and new binding creation logic is factored out in separate functions, some minor bugs are fixed. Also, `resolve_possibly_assoc_item` doesn't swallow modules now.
Later commits are refactorings, see the comment descriptions.

I intend to continue this work later with better support for `Def::Err` in patterns in post-resolve stages and cleanup of pattern resolution code in type checker.

Fixes https://github.com/rust-lang/rust/issues/32086
Fixes https://github.com/rust-lang/rust/issues/34047 ([breaking-change])
Fixes https://github.com/rust-lang/rust/issues/34074

cc @jseyfried
r? @eddyb

8 years agoAddress review comments + fix rebase
Vadim Petrochenkov [Fri, 3 Jun 2016 20:15:00 +0000 (23:15 +0300)]
Address review comments + fix rebase

8 years agomake all pattern bindings with the same name resolve to the first one
Ariel Ben-Yehuda [Tue, 17 May 2016 13:45:02 +0000 (16:45 +0300)]
make all pattern bindings with the same name resolve to the first one

This simplifies the code considerably, removing one of the
last uses of hygienic matching out of resolution.

8 years agoAdd tests
Vadim Petrochenkov [Fri, 3 Jun 2016 20:15:00 +0000 (23:15 +0300)]
Add tests

8 years agoIntroduce TyCtxt::expect_def/expect_resolution helpers and use them where possible
Vadim Petrochenkov [Fri, 3 Jun 2016 20:15:00 +0000 (23:15 +0300)]
Introduce TyCtxt::expect_def/expect_resolution helpers and use them where possible

8 years agoMove the hack with fake partial resolution for <A>::B from typeck to resolve
Vadim Petrochenkov [Fri, 3 Jun 2016 20:15:00 +0000 (23:15 +0300)]
Move the hack with fake partial resolution for <A>::B from typeck to resolve

8 years agoresolve: Rewrite resolve_pattern
Vadim Petrochenkov [Fri, 3 Jun 2016 20:15:00 +0000 (23:15 +0300)]
resolve: Rewrite resolve_pattern

8 years agoAuto merge of #34149 - arielb1:remove-remove-dead-blocks, r=nikomatsakis
bors [Thu, 9 Jun 2016 19:07:38 +0000 (12:07 -0700)]
Auto merge of #34149 - arielb1:remove-remove-dead-blocks, r=nikomatsakis

MIR cleanups and predecessor cache

This PR cleans up a few things in MIR and adds a predecessor cache to allow graph algorithms to be run easily.

r? @nikomatsakis

8 years agofix issues
Ariel Ben-Yehuda [Thu, 9 Jun 2016 14:23:23 +0000 (17:23 +0300)]
fix issues

8 years agoAuto merge of #33895 - AndrewBrinker:master, r=steveklabnik
bors [Thu, 9 Jun 2016 14:13:34 +0000 (07:13 -0700)]
Auto merge of #33895 - AndrewBrinker:master, r=steveklabnik

Rewrote "How Safe and Unsafe Interact" Nomicon chapter.

The previous version of the chapter covered a lot of ground, but was a little meandering and hard to follow at times. This draft is intended to be clearer and more direct, while still providing the same information as the previous version.

r? @steveklabnik

8 years agouse the type name as the pass name
Ariel Ben-Yehuda [Wed, 8 Jun 2016 21:16:35 +0000 (00:16 +0300)]
use the type name as the pass name

8 years agorefactor simplify_cfg and split off simplify_branches
Ariel Ben-Yehuda [Wed, 8 Jun 2016 21:10:15 +0000 (00:10 +0300)]
refactor simplify_cfg and split off simplify_branches

8 years agoadd hook infrastructure for automatically dumping MIR on every pass
Ariel Ben-Yehuda [Wed, 8 Jun 2016 18:03:06 +0000 (21:03 +0300)]
add hook infrastructure for automatically dumping MIR on every pass

8 years agointroduce an `unreachable` terminator
Ariel Ben-Yehuda [Wed, 8 Jun 2016 16:26:19 +0000 (19:26 +0300)]
introduce an `unreachable` terminator

Use it instead of a `panic` for inexhaustive matches and correct the
comment. I think we trust our match-generation algorithm enough to
generate these blocks, and not generating an `unreachable` means that
LLVM won't optimize `match void() {}` to an `unreachable`.

8 years agoadd a cache for MIR predecessors
Ariel Ben-Yehuda [Tue, 7 Jun 2016 19:02:08 +0000 (22:02 +0300)]
add a cache for MIR predecessors

8 years agomake the basic_blocks field private
Ariel Ben-Yehuda [Tue, 7 Jun 2016 18:20:50 +0000 (21:20 +0300)]
make the basic_blocks field private

8 years agointroduce the type-safe IdxVec and use it instead of loose indexes
Ariel Ben-Yehuda [Tue, 7 Jun 2016 14:28:36 +0000 (17:28 +0300)]
introduce the type-safe IdxVec and use it instead of loose indexes

8 years agoAuto merge of #34109 - pnkfelix:fix-issue-34101, r=arielb1
bors [Thu, 9 Jun 2016 11:24:50 +0000 (04:24 -0700)]
Auto merge of #34109 - pnkfelix:fix-issue-34101, r=arielb1

Fix issue #34101

Fix issue #34101: do not track subcontent of type with dtor nor gather flags for untracked content.

(Includes a regression test, which needed to go into `compile-fail/`
due to weaknesses when combining `#[deny(warnings)]` with
`tcx.sess.span_warn(..)`)

8 years agomerge the RemoveDeadBlocks pass into the SimplifyCfg pass
Ariel Ben-Yehuda [Mon, 6 Jun 2016 19:58:28 +0000 (22:58 +0300)]
merge the RemoveDeadBlocks pass into the SimplifyCfg pass

8 years agoAuto merge of #34108 - jseyfried:refactor_prelude_injection, r=nrc
bors [Thu, 9 Jun 2016 08:35:26 +0000 (01:35 -0700)]
Auto merge of #34108 - jseyfried:refactor_prelude_injection, r=nrc

Refactor away the prelude injection fold

Instead, just inject `#[prelude_import] use [core|std]::prelude::v1::*;` at the crate root while injecting `extern crate [core|std];` and process `#[no_implicit_prelude]` attributes in `resolve`.

r? @nrc

8 years agoAuto merge of #34032 - jseyfried:load_macros_in_expansion, r=nrc
bors [Thu, 9 Jun 2016 05:45:35 +0000 (22:45 -0700)]
Auto merge of #34032 - jseyfried:load_macros_in_expansion, r=nrc

Support `#[macro_use]` on macro-expanded crates

This PR loads macros from `#[macro_use]` crates during expansion so that
 - macro-expanded `#[macro_use]` crates work (fixes #33936, fixes #28071), and
 - macros imported from crates have the same scope as macros imported from modules.

This is a [breaking-change]. For example, this will break:
```rust
macro_rules! m {
    () => { #[macro_use(foo)] extern crate core; } //~ ERROR imported macro not found
}
m!();
```
Also, this will break:
```rust
macro_rules! try { () => {} }
// #[macro_use] mod bar { macro_rules! try { ... } } //< ... just like this would ...
fn main() { try!(); } //< ... making this an error
```

r? @nrc

8 years agoclean up for test cases
Srinivas Reddy Thatiparthy [Thu, 9 Jun 2016 02:50:08 +0000 (08:20 +0530)]
clean up for test cases

8 years agoremove redundant assert statements
Srinivas Reddy Thatiparthy [Thu, 9 Jun 2016 02:42:31 +0000 (08:12 +0530)]
remove redundant  assert statements

8 years agoAuto merge of #32202 - arielb1:slice-patterns, r=nikomatsakis
bors [Thu, 9 Jun 2016 02:30:33 +0000 (19:30 -0700)]
Auto merge of #32202 - arielb1:slice-patterns, r=nikomatsakis

Implement RFC495 semantics for slice patterns

non-MIR translation is still not supported for these and will happily ICE.

This is a [breaking-change] for many uses of slice_patterns.

[RFC 495 text](https://github.com/rust-lang/rfcs/blob/master/text/0495-array-pattern-changes.md)

8 years agoAdd comment and clean up `expand_annotatable`
Jeffrey Seyfried [Thu, 9 Jun 2016 00:47:52 +0000 (00:47 +0000)]
Add comment and clean up `expand_annotatable`

8 years agoAdd regression test
Jeffrey Seyfried [Thu, 2 Jun 2016 02:24:49 +0000 (02:24 +0000)]
Add regression test

8 years agoLoad macros from `extern crate`s during expansion.
Jeffrey Seyfried [Thu, 2 Jun 2016 01:14:33 +0000 (01:14 +0000)]
Load macros from `extern crate`s during expansion.

8 years agoAuto merge of #34167 - eddyb:fix-pairs-for-real, r=nikomatsakis
bors [Wed, 8 Jun 2016 23:41:01 +0000 (16:41 -0700)]
Auto merge of #34167 - eddyb:fix-pairs-for-real, r=nikomatsakis

trans: don't misuse C_nil for ZSTs other than ().

`C_nil` is actually `C_null` for `()` so `TempRef::new_operand` was treating all ZSTs as `()`.
This should allow running Servo with `RUSTFLAGS=-Zorbit`, assuming there are no other bugs.

8 years agofix Cargo.lock
Ariel Ben-Yehuda [Wed, 8 Jun 2016 22:05:37 +0000 (01:05 +0300)]
fix Cargo.lock

8 years agouse the slice_pat hack in libstd too
Ariel Ben-Yehuda [Wed, 8 Jun 2016 06:19:44 +0000 (09:19 +0300)]
use the slice_pat hack in libstd too

8 years agoremove residual slice pattern junk from mem_categorization
Ariel Ben-Yehuda [Tue, 7 Jun 2016 13:26:23 +0000 (16:26 +0300)]
remove residual slice pattern junk from mem_categorization

8 years agoadd an help message when using an old-style slice pattern
Ariel Ben-Yehuda [Tue, 7 Jun 2016 10:13:20 +0000 (13:13 +0300)]
add an help message when using an old-style slice pattern

8 years agofix tests
Ariel Ben-Yehuda [Mon, 6 Jun 2016 21:07:24 +0000 (00:07 +0300)]
fix tests

8 years agofix stdtest
Ariel Ben-Yehuda [Mon, 6 Jun 2016 20:41:54 +0000 (23:41 +0300)]
fix stdtest

8 years agofix damage in librustc
Ariel Ben-Yehuda [Mon, 6 Jun 2016 17:10:00 +0000 (20:10 +0300)]
fix damage in librustc

8 years agoaddress review comments
Ariel Ben-Yehuda [Sun, 5 Jun 2016 21:20:15 +0000 (00:20 +0300)]
address review comments

8 years agohandle string literals correctly in match checking
Ariel Ben-Yehuda [Sun, 5 Jun 2016 20:56:11 +0000 (23:56 +0300)]
handle string literals correctly in match checking

The root of the problem is that a string literal pattern is essentially of
the form `&LITERAL`, in a single block, while match checking wants to
split that.

To fix that, I added a type field to the patterns in match checking,
which allows us to distinguish between a full and split pattern.

That file is ugly and needs to be cleaned. However, `trans::_match` calls
it, so I think we should delay the cleanup until we kill that.

Fixes #30240

8 years agowrap calls to `lvalue_ty`
Ariel Ben-Yehuda [Sun, 5 Jun 2016 16:03:30 +0000 (19:03 +0300)]
wrap calls to `lvalue_ty`

8 years agoimplement RFC495 semantics for slice patterns
Ariel Ben-Yehuda [Fri, 11 Mar 2016 10:54:59 +0000 (12:54 +0200)]
implement RFC495 semantics for slice patterns

non-MIR translation is still not supported for these and will happily ICE.

This is a [breaking-change] for many uses of slice_patterns.

8 years agotrans: don't misuse C_nil for ZSTs other than ().
Eduard Burtescu [Wed, 8 Jun 2016 21:33:57 +0000 (00:33 +0300)]
trans: don't misuse C_nil for ZSTs other than ().

8 years agofix translation of unsized types and arrays
Ariel Ben-Yehuda [Sun, 13 Mar 2016 18:03:48 +0000 (20:03 +0200)]
fix translation of unsized types and arrays

8 years agoremove the librustc_trans -> librustc_mir dependency
Ariel Ben-Yehuda [Sun, 5 Jun 2016 16:38:22 +0000 (19:38 +0300)]
remove the librustc_trans -> librustc_mir dependency

8 years agoAuto merge of #33989 - eddyb:mir-viz, r=nikomatsakis
bors [Wed, 8 Jun 2016 20:51:57 +0000 (13:51 -0700)]
Auto merge of #33989 - eddyb:mir-viz, r=nikomatsakis

[MIR] Make scopes debuginfo-specific (visibility scopes).

Fixes #32949 by having MIR (visibility) scopes mimic the lexical structure.
Unlike #33235, this PR also removes all scopes without variable bindings.

Printing of scopes also changed, e.g. for:
```rust
fn foo(x: i32, y: i32) { let a = 0; let b = 0; let c = 0; }
```
Before my changes:
```rust
fn foo(arg0: i32, arg1: i32) -> () {
    let var0: i32;                       // "x" in scope 1 at <anon>:1:8: 1:9
    let var1: i32;                       // "y" in scope 1 at <anon>:1:16: 1:17
    let var2: i32;                       // "a" in scope 3 at <anon>:1:30: 1:31
    let var3: i32;                       // "b" in scope 6 at <anon>:1:41: 1:42
    let var4: i32;                       // "c" in scope 9 at <anon>:1:52: 1:53

    ...

    scope tree:
    0 1 2 3 {
        4 5
        6 {
            7 8
            9 10 11
        }
    }
}
```
After my changes:
```rust
fn foo(arg0: i32, arg1: i32) -> () {
    scope 1 {
        let var0: i32;                   // "x" in scope 1 at <anon>:1:8: 1:9
        let var1: i32;                   // "y" in scope 1 at <anon>:1:16: 1:17
        scope 2 {
            let var2: i32;               // "a" in scope 2 at <anon>:1:30: 1:31
            scope 3 {
                let var3: i32;           // "b" in scope 3 at <anon>:1:41: 1:42
                scope 4 {
                    let var4: i32;       // "c" in scope 4 at <anon>:1:52: 1:53
                }
            }
        }
    }

    ...
}

8 years agoAuto merge of #34083 - alexcrichton:dumb-hack, r=nrc
bors [Wed, 8 Jun 2016 14:43:29 +0000 (07:43 -0700)]
Auto merge of #34083 - alexcrichton:dumb-hack, r=nrc

rustc: Try to contain prepends to PATH

This commit attempts to bring our prepends to PATH on Windows when loading
plugins because we've been seeing quite a few issues with failing to spawn a
process on Windows, the leading theory of which is that PATH is too large as a
result of this. Currently this is mostly a stab in the dark as it's not
confirmed to actually fix the problem, but it's probably not a bad change to
have anyway!

cc #33844
Closes #17360

8 years agoFixed two little Game Of Thrones References
Hendrik Sollich [Tue, 7 Jun 2016 09:30:38 +0000 (11:30 +0200)]
Fixed two little Game Of Thrones References

Fixed: conflicting spelling of "Jon Snow"
Fixed: It's call "Night's Watch"

8 years agoResolving line length build fail
Jacob Clark [Wed, 8 Jun 2016 12:26:18 +0000 (13:26 +0100)]
Resolving line length build fail

8 years agoAuto merge of #34068 - ollie27:rustdoc_redirect_const, r=brson
bors [Wed, 8 Jun 2016 11:53:34 +0000 (04:53 -0700)]
Auto merge of #34068 - ollie27:rustdoc_redirect_const, r=brson

rustdoc: Fix generating redirect pages for statics and consts

These were missing from the cache for some reason meaning the redirect pages failed to render.

8 years agoUpdated README to account for changes in MSYS2
Morten H. Solvang [Wed, 8 Jun 2016 09:27:31 +0000 (11:27 +0200)]
Updated README to account for changes in MSYS2

One of the newest versions of MSYS2 now only has one .cmd file which replaces the old bat files. It has to be used to launch the mingw32/64 shell.

8 years agoAuto merge of #34010 - jseyfried:decorate_expanded, r=nrc
bors [Wed, 8 Jun 2016 09:05:38 +0000 (02:05 -0700)]
Auto merge of #34010 - jseyfried:decorate_expanded, r=nrc

Run decorators on expanded AST

Fixes #32950.
r? @nrc

8 years agoResolving build failure
Jacob Clark [Tue, 7 Jun 2016 11:35:41 +0000 (12:35 +0100)]
Resolving build failure

8 years agoAuto merge of #34003 - frewsxcv:13727-regressions, r=brson
bors [Wed, 8 Jun 2016 04:38:30 +0000 (21:38 -0700)]
Auto merge of #34003 - frewsxcv:13727-regressions, r=brson

Add regression tests for #13727.

Fixes https://github.com/rust-lang/rust/issues/13727.

8 years agoAuto merge of #33982 - LeoTestard:remove-check-matcher-old, r=pnkfelix
bors [Wed, 8 Jun 2016 00:56:35 +0000 (17:56 -0700)]
Auto merge of #33982 - LeoTestard:remove-check-matcher-old, r=pnkfelix

Remove the old FOLLOW checking (aka `check_matcher_old`).

It was supposed to be removed at the next release cycle but is still in the tree since like 6 months.
Potential breaking change, since some cases (such as #25658) will change from a warning to an error. But the warning stating that it will be a hard error in the next release has been there for 6 months now.
I think it's safe to break this code. ^_^

8 years agoFixed based on feedback from steveklabnik
Andrew Brinker [Tue, 7 Jun 2016 22:09:24 +0000 (18:09 -0400)]
Fixed based on feedback from steveklabnik

8 years agoAuto merge of #34141 - eddyb:trans-abi-memcpy, r=nikomatsakis
bors [Tue, 7 Jun 2016 21:45:39 +0000 (14:45 -0700)]
Auto merge of #34141 - eddyb:trans-abi-memcpy, r=nikomatsakis

trans: always use a memcpy for ABI argument/return casts.

When storing incoming arguments or values returned by call/invoke, always do a `memcpy` from a temporary of the cast type, if there is an ABI cast.
While Clang has gotten smarter ([store](https://godbolt.org/g/EphFuK) vs [memcpy](https://godbolt.org/g/5dikH9)), a `memcpy` will always work.
This is what @dotdash has wanted to do all along, and it fixes #32049.

8 years agotrans: always use a memcpy for ABI argument/return casts.
Eduard Burtescu [Tue, 7 Jun 2016 21:35:01 +0000 (00:35 +0300)]
trans: always use a memcpy for ABI argument/return casts.

8 years agoAuto merge of #34139 - steveklabnik:rollup, r=steveklabnik
bors [Tue, 7 Jun 2016 18:50:31 +0000 (11:50 -0700)]
Auto merge of #34139 - steveklabnik:rollup, r=steveklabnik

Rollup of 13 pull requests

- Successful merges: #33645, #33897, #33945, #34007, #34060, #34070, #34094, #34098, #34099, #34104, #34124, #34125, #34138
- Failed merges:

8 years agodocs: simplify wording
Aleksey Kladov [Tue, 7 Jun 2016 17:19:08 +0000 (20:19 +0300)]
docs: simplify wording

8 years agomir: group span + visibility scope under a new SourceInfo type.
Eduard Burtescu [Tue, 7 Jun 2016 16:21:56 +0000 (19:21 +0300)]
mir: group span + visibility scope under a new SourceInfo type.

8 years agorun rustfmt on libflate folder
Srinivas Reddy Thatiparthy [Tue, 7 Jun 2016 15:59:35 +0000 (21:29 +0530)]
run rustfmt on libflate folder

8 years agomir: distinguish between variable visibility scopes and SEME scopes.
Eduard Burtescu [Tue, 31 May 2016 17:27:36 +0000 (20:27 +0300)]
mir: distinguish between variable visibility scopes and SEME scopes.

8 years agoRollup merge of #34138 - hoodie:bug/bool_colors, r=steveklabnik
Steve Klabnik [Tue, 7 Jun 2016 14:43:58 +0000 (10:43 -0400)]
Rollup merge of #34138 - hoodie:bug/bool_colors, r=steveklabnik

Bug/bool colors

This is actually #33661 @steveklabnik, sorry about this, github ate my homework

8 years agoRollup merge of #34125 - MichaelNecio:book_addition, r=steveklabnik
Steve Klabnik [Tue, 7 Jun 2016 14:43:58 +0000 (10:43 -0400)]
Rollup merge of #34125 - MichaelNecio:book_addition, r=steveklabnik

Noted that shadowing never destroys a value

Fixes issue #33887

r? @steveklabnik

8 years agoRollup merge of #34124 - jonas-schievink:remove-useless-optns, r=sanxiyn
Steve Klabnik [Tue, 7 Jun 2016 14:43:58 +0000 (10:43 -0400)]
Rollup merge of #34124 - jonas-schievink:remove-useless-optns, r=sanxiyn

Remove old -Z options that do nothing

Technically, this is a [breaking-change], but I'm not sure what the policy for -Z flags is (especially unused ones).

8 years agoRollup merge of #34104 - nagisa:cfg-llvm-up, r=alexcrichton
Steve Klabnik [Tue, 7 Jun 2016 14:43:57 +0000 (10:43 -0400)]
Rollup merge of #34104 - nagisa:cfg-llvm-up, r=alexcrichton

Require LLVM 3.7

We are using getMCTargetInfo which is 3.7+. I’m not sure whether 3.7 works though.

Fixes https://github.com/rust-lang/rust/issues/34103

r? @alexcrichton

8 years agoRollup merge of #34099 - markrcote:functions-copyedit, r=steveklabnik
Steve Klabnik [Tue, 7 Jun 2016 14:43:57 +0000 (10:43 -0400)]
Rollup merge of #34099 - markrcote:functions-copyedit, r=steveklabnik

Add missing space before parenthesis.

8 years agoRollup merge of #34098 - frankmcsherry:patch-1, r=alexcrichton
Steve Klabnik [Tue, 7 Jun 2016 14:43:57 +0000 (10:43 -0400)]
Rollup merge of #34098 - frankmcsherry:patch-1, r=alexcrichton

Update rc.rs

The original description suggests that the original `Rc<T>` itself is downgraded, which doesn't seem to be what the code does. At the same time, `Rc` is one of those types that can do weird things with only a shared reference, so I thought it would be good to be clear.

8 years agoRollup merge of #34094 - abenga:doc_changes_variable_bindings, r=steveklabnik
Steve Klabnik [Tue, 7 Jun 2016 14:43:57 +0000 (10:43 -0400)]
Rollup merge of #34094 - abenga:doc_changes_variable_bindings, r=steveklabnik

Minor changes to variable bindings chapter

* In "*... name as another binding, that's currently in scope, will ...*", *"
  that's currently in scope"* is not a parenthetical element, and the commas
  can be omitted.

* Other minor changes.

8 years agoRollup merge of #34070 - chriskrycho:update-reference-deprecated-attribute, r=stevekl...
Steve Klabnik [Tue, 7 Jun 2016 14:43:57 +0000 (10:43 -0400)]
Rollup merge of #34070 - chriskrycho:update-reference-deprecated-attribute, r=steveklabnik

Update reference to indicate stabilization of `deprecated` attribute.

None

8 years agoRollup merge of #34060 - JDemler:master, r=steveklabnik
Steve Klabnik [Tue, 7 Jun 2016 14:43:56 +0000 (10:43 -0400)]
Rollup merge of #34060 - JDemler:master, r=steveklabnik

Improved documentation for tests/ directory

This ambigouity problem was already discussed in the [forums](https://users.rust-lang.org/t/problem-using-external-modules-inside-integration-test-submodule/5312/6).

8 years agoRollup merge of #34007 - flo-l:improve-hacking-docs, r=alexcrichton
Steve Klabnik [Tue, 7 Jun 2016 14:43:56 +0000 (10:43 -0400)]
Rollup merge of #34007 - flo-l:improve-hacking-docs, r=alexcrichton

add documentation on howto build just rustc without libstd to the build system

I searched for days until I found this, maybe this helps other poor souls :joy:

for reference #33990

8 years agoRollup merge of #33945 - srinivasreddy:libpanic_unwind, r=nrc
Steve Klabnik [Tue, 7 Jun 2016 14:43:56 +0000 (10:43 -0400)]
Rollup merge of #33945 - srinivasreddy:libpanic_unwind, r=nrc

run rustfmt on libpanic_unwind folder

8 years agoRollup merge of #33897 - srinivasreddy:runfail_rustfmt, r=nrc
Steve Klabnik [Tue, 7 Jun 2016 14:43:56 +0000 (10:43 -0400)]
Rollup merge of #33897 - srinivasreddy:runfail_rustfmt, r=nrc

run rustfmt on test/run-fail folder

8 years agoRollup merge of #33645 - withoutboats:woboats_trim_matches_doc, r=steveklabnik
Steve Klabnik [Tue, 7 Jun 2016 14:43:55 +0000 (10:43 -0400)]
Rollup merge of #33645 - withoutboats:woboats_trim_matches_doc, r=steveklabnik

Correct the docs on str::trim_matches

This pattern cannot be a str because str's pattern is not double-ended.

8 years agoAuto merge of #34128 - eddyb:mir-trans-fixes, r=luqmana
bors [Tue, 7 Jun 2016 13:31:32 +0000 (06:31 -0700)]
Auto merge of #34128 - eddyb:mir-trans-fixes, r=luqmana

[MIR] Fix MIR trans edge cases that showed up on crater.

These fixes cover all of the [regressions found by crater](https://gist.github.com/nikomatsakis/88ce89ed06ef7f7f19bfd1e221d7f7ec) (for #34096).

Two of them were `Pair` edge cases (ZSTs and constants) causing LLVM assertions, the other one was  causing stack overflows in debug scripts compiled in debug mode, due to the `fn_ret_cast` `alloca` ending up in a loop.

8 years agoTest case for borrowk ICE #25579
Jacob Clark [Tue, 7 Jun 2016 10:38:32 +0000 (11:38 +0100)]
Test case for borrowk ICE #25579

8 years agoFix issue #34101: do not track subcontent of type with dtor nor gather flags for...
Felix S. Klock II [Mon, 6 Jun 2016 14:16:44 +0000 (16:16 +0200)]
Fix issue #34101: do not track subcontent of type with dtor nor gather flags for untracked content.

(Includes a regression test, which needed to go into `compile-fail/`
due to weaknesses when combining `#[deny(warnings)]` with
`tcx.sess.span_warn(..)`)

(updated with review feedback from arielb1.)

8 years agoAuto merge of #34012 - eddyb:tick-erased, r=nikomatsakis
bors [Tue, 7 Jun 2016 07:04:53 +0000 (00:04 -0700)]
Auto merge of #34012 - eddyb:tick-erased, r=nikomatsakis

rustc: add ReErased to be used by trait selection, MIR and trans.

`ReErased` replaces `ReStatic` (i.e. `'static`) for erasing regions.
Using a distinct lifetime helps prevent accidental mix-ups between the two.
It also allows cleaner type printing (see test changes), including in symbol names:
```rust
str..pattern..CharSearcher$LT$$u27$static$GT$::drop.30560::h840c2f2afc03bbea // before
str..pattern..CharSearcher::drop.30561::h6bd31d2af614377a // after
```
Not that we should be producing symbols this way, but it's still better.

8 years agotrans: don't create allocas anywhere other than the entry block.
Eduard Burtescu [Tue, 7 Jun 2016 07:04:31 +0000 (10:04 +0300)]
trans: don't create allocas anywhere other than the entry block.

8 years agoMinor changes to variable bindings chapter
Horace Abenga [Sun, 5 Jun 2016 10:16:59 +0000 (13:16 +0300)]
Minor changes to variable bindings chapter

* In "... name as another binding, that's currently in scope, will ...", ",
  that's currently in scope, " is not a parenthetical element, and the commas
  can be omitted.

* Other minor changes.

8 years agoAdd regression tests for #13727.
Corey Farwell [Wed, 1 Jun 2016 04:01:03 +0000 (00:01 -0400)]
Add regression tests for #13727.

Fixes https://github.com/rust-lang/rust/issues/13727.

8 years agoFix bug in `librustdoc` in which an unmatched "</table>" is emitted.
Jeffrey Seyfried [Mon, 6 Jun 2016 08:00:34 +0000 (08:00 +0000)]
Fix bug in `librustdoc` in which an unmatched "</table>" is emitted.

8 years agoRefactor away the prelude injection pass
Jeffrey Seyfried [Sun, 5 Jun 2016 09:56:05 +0000 (09:56 +0000)]
Refactor away the prelude injection pass

8 years agoRemove a gotcha from book/error-handling.md
Joachim Viide [Mon, 6 Jun 2016 23:37:12 +0000 (02:37 +0300)]
Remove a gotcha from book/error-handling.md

The book's "Error handling with Box<Error>" section talks about Box<Error>.
In the actual example Box<Error + Send + Sync> is used instead so that the
corresponding From impls could be used to convert a plain string to an error
type. Rust 1.7 added support for conversion from &str/String to
Box<Error>, so this gotcha and later references to it can now be removed.

8 years agotrans: don't forget to cast Pair constants of the wrong type.
Eduard Burtescu [Mon, 6 Jun 2016 23:21:58 +0000 (02:21 +0300)]
trans: don't forget to cast Pair constants of the wrong type.

8 years agoNoted that shadowing never destroys a value
Michael Necio [Mon, 6 Jun 2016 22:13:20 +0000 (18:13 -0400)]
Noted that shadowing never destroys a value

8 years agoRefactor away method `resolve_name_in_lexical_scope` of `ModuleS`
Jeffrey Seyfried [Sun, 5 Jun 2016 08:02:04 +0000 (08:02 +0000)]
Refactor away method `resolve_name_in_lexical_scope` of `ModuleS`

8 years agoRemove old -Z options that do nothing
Jonas Schievink [Mon, 6 Jun 2016 21:43:44 +0000 (23:43 +0200)]
Remove old -Z options that do nothing

Technically, this is a [breaking-change], but I'm not sure what the
policy for -Z flags is (especially unused ones).

8 years agotrans: use Pair for ignored nil pairs instead of Immediate.
Eduard Burtescu [Mon, 6 Jun 2016 21:24:21 +0000 (00:24 +0300)]
trans: use Pair for ignored nil pairs instead of Immediate.

8 years agoAuto merge of #34006 - eddyb:mir-const-fixes, r=nikomatsakis
bors [Mon, 6 Jun 2016 12:08:50 +0000 (05:08 -0700)]
Auto merge of #34006 - eddyb:mir-const-fixes, r=nikomatsakis

 [MIR] Fix double-rounding of float constants and ignore NaN sign in tests.

Fixes #32805 by handling f32 and f64 separately in rustc_const_eval.

Also removes `#[rustc_no_mir]` from a couple libstd tests by ignoring NaN sign.
Turns out that runtime evaluation of `0.0 / 0.0` produces a NaN with the sign bit set,
whereas LLVM constant folds it to a NaN with the sign bit unset, which we were testing for.