]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #32407 - alexcrichton:netbsd-gcc-s-link, r=aturon
bors [Fri, 25 Mar 2016 18:00:01 +0000 (11:00 -0700)]
Auto merge of #32407 - alexcrichton:netbsd-gcc-s-link, r=aturon

std: Link to gcc_s on NetBSD

Currently the nightlies we're producing fail when linking some C code into a
Rust application with the error message:

    libgcc_s.so.1: error adding symbols: DSO missing from command line

By linking `gcc_s` instead of `gcc` this error goes away. I haven't tested this
on NetBSD itself, but should help get the Linux cross-compile image moreso up
and working!

8 years agoAuto merge of #31908 - jseyfried:disallow_shadowed_traits, r=nikomatsakis
bors [Fri, 25 Mar 2016 12:03:13 +0000 (05:03 -0700)]
Auto merge of #31908 - jseyfried:disallow_shadowed_traits, r=nikomatsakis

Disallow methods from traits that are not in scope

This PR only allows a trait method to be used if the trait is in scope (fixes #31379).
This is a [breaking-change]. For example, the following would break:
```rust
mod foo {
    pub trait T { fn f(&self) {} }
    impl T for () {}
}

mod bar { pub use foo::T; }

fn main() {
    pub use bar::*;
    struct T; // This shadows the trait `T`,
    ().f() // making this an error.
}
```
r? @nikomatsakis

8 years agoAuto merge of #32428 - nikomatsakis:scopes-in-mir, r=nagisa
bors [Fri, 25 Mar 2016 06:12:57 +0000 (23:12 -0700)]
Auto merge of #32428 - nikomatsakis:scopes-in-mir, r=nagisa

Scopes in mir

This PR adds scopes to MIR. There is a tree of scopes (each represented by a `ScopeId`). Every statement, variable, and terminator now has an associated scope and span.  It also adds a `-Z dump-mir` switch one can use to conveniently examine the MIR as optimizations proceed.

The intention is two-fold. First, to support MIR debug-info. This PR does not attempt to modify trans to make use of the scope information, however.

Second, in a more temporary capacity, to support the goal of moving regionck and borowck into the MIR. To that end, the PR also constructs a "scope auxiliary" table storing the extent of each span (this is kept separate from the main MIR, since it contains node-ids) and the dom/post-dom of the region in the graph where the scope occurs. When we move to non-lexical lifetimes, I expect this auxiliary information to be discarded, but that is still some ways in the future (requires, at minimum, an RFC, and there are some thorny details to work out -- though I've got an in-progress draft).

Right now, I'm just dropping this auxiliary information after it is constructed. I was debating for some time whether to add some sort of sanity tests, but decided to just open this PR instead, because I couldn't figure out what such a test would look like (and we don't have independent tests for this today beyond the regionck and borrowck tests).

I'd prefer not to store the auxiliary data into any kind of "per-fn" map. Rather, I'd prefer that we do regionck/borrowck/whatever-else immediately after construction -- that is, we build the MIR for fn X and immediately thereafter do extended correctness checking on it. This will reduce peak memory usage and also ensure that the auxiliary data doesn't exist once optimizations begin. It also clarifies the transition point where static checks are complete and MIR can be more freely optimized.

cc @rust-lang/compiler @nagisa

8 years agoAuto merge of #32396 - nodakai:range-contains, r=alexcrichton
bors [Fri, 25 Mar 2016 02:38:43 +0000 (19:38 -0700)]
Auto merge of #32396 - nodakai:range-contains, r=alexcrichton

Add core::ops::Range*::contains() as per rust-lang/rust#32311

8 years agoAuto merge of #32346 - nikomatsakis:no-erased-regions, r=eddyb
bors [Thu, 24 Mar 2016 21:22:26 +0000 (14:22 -0700)]
Auto merge of #32346 - nikomatsakis:no-erased-regions, r=eddyb

Remove `ErasedRegions` from substs

This commit removes the `ErasedRegions` enum from `Substs`. Instead, in trans, we just generate a vector of `ReStatic` of suitable length. The goal is both general cleanup and to help pave the way for a glorious future where erasure is used in type check.

r? @eddyb

One concern: might be nice to do some profiling. Not sure the best way to do that. Perhaps I'll investigate running nrc's test suite locally.

8 years agoremove `empty_substs_for_node_id`
Niko Matsakis [Sat, 19 Mar 2016 09:33:16 +0000 (05:33 -0400)]
remove `empty_substs_for_node_id`

8 years agoremove ErasedRegions from substitutions
Niko Matsakis [Wed, 9 Mar 2016 23:22:05 +0000 (18:22 -0500)]
remove ErasedRegions from substitutions

This hack has long since outlived its usefulness; the transition to
trans passing around full substitutions is basically done. Instead of
`ErasedRegions`, just supply substitutions with a suitable number of
`'static` entries, and invoke `erase_regions` when needed (the latter of
which we already do).

8 years agorewrite foreign types lint not to trawl the HIR
Niko Matsakis [Wed, 16 Mar 2016 19:53:08 +0000 (15:53 -0400)]
rewrite foreign types lint not to trawl the HIR

It no longer reads from `ast_ty_to_ty_cache`, which was very wrong. It
also correctly handles higher-ranked regions.

8 years agoAuto merge of #32465 - steveklabnik:rollup, r=steveklabnik
bors [Thu, 24 Mar 2016 16:25:02 +0000 (09:25 -0700)]
Auto merge of #32465 - steveklabnik:rollup, r=steveklabnik

Rollup of 6 pull requests

- Successful merges: #32276, #32416, #32452, #32459, #32462, #32464
- Failed merges:

8 years agoRollup merge of #32464 - GuillaumeGomez:patch-6, r=steveklabnik
Steve Klabnik [Thu, 24 Mar 2016 14:37:24 +0000 (10:37 -0400)]
Rollup merge of #32464 - GuillaumeGomez:patch-6, r=steveklabnik

Improve some Option code example

Part of #29366.

r? @steveklabnik

8 years agoRollup merge of #32462 - tclfs:patch-1, r=steveklabnik
Steve Klabnik [Thu, 24 Mar 2016 14:37:24 +0000 (10:37 -0400)]
Rollup merge of #32462 - tclfs:patch-1, r=steveklabnik

Docs: some tiny corrections

TNT->`tnt`
firecracker->`firecracker`

8 years agoRollup merge of #32459 - nrc:json-err-text, r=nikomatsakis
Steve Klabnik [Thu, 24 Mar 2016 14:37:24 +0000 (10:37 -0400)]
Rollup merge of #32459 - nrc:json-err-text, r=nikomatsakis

Include source text in JSON errors

8 years agoRollup merge of #32452 - GuillaumeGomez:patch-5, r=steveklabnik
Steve Klabnik [Thu, 24 Mar 2016 14:37:24 +0000 (10:37 -0400)]
Rollup merge of #32452 - GuillaumeGomez:patch-5, r=steveklabnik

Add code examples for libstd/time

Fixes #29379.

r? @steveklabnik

8 years agoRollup merge of #32416 - GuillaumeGomez:patch-3, r=steveklabnik
Steve Klabnik [Thu, 24 Mar 2016 14:37:23 +0000 (10:37 -0400)]
Rollup merge of #32416 - GuillaumeGomez:patch-3, r=steveklabnik

Add doc example to clone trait

Fixes #29346.

r? @steveklabnik

8 years agoRollup merge of #32276 - brson:doc, r=alexcrichton
Steve Klabnik [Thu, 24 Mar 2016 14:37:23 +0000 (10:37 -0400)]
Rollup merge of #32276 - brson:doc, r=alexcrichton

doc: Stdin is not writable

8 years agopacify the merciless tidy
Niko Matsakis [Thu, 24 Mar 2016 11:11:11 +0000 (07:11 -0400)]
pacify the merciless tidy

8 years agoImprove some Option code example
Guillaume Gomez [Thu, 24 Mar 2016 12:24:39 +0000 (13:24 +0100)]
Improve some Option code example

8 years agorework MIR visitor
Niko Matsakis [Thu, 24 Mar 2016 10:12:19 +0000 (06:12 -0400)]
rework MIR visitor

We now visit more things (e.g., types) and also follow a deliberate
style designed to reduce omissions.

8 years agoDocs: some tiny corrections
Tang Chenglong [Thu, 24 Mar 2016 06:49:40 +0000 (14:49 +0800)]
Docs: some tiny corrections

TNT->`tnt`
firecracker->`firecracker`

8 years agoAuto merge of #32219 - brson:lints, r=alexcrichton
bors [Thu, 24 Mar 2016 06:09:47 +0000 (23:09 -0700)]
Auto merge of #32219 - brson:lints, r=alexcrichton

Make warnings of renamed and removed lints themselves lints

This adds the `renamed_and_removed_lints` warning, defaulting
to the warning level.

Fixes #31141

8 years agoInclude source text in JSON errors
Nick Cameron [Thu, 24 Mar 2016 02:32:42 +0000 (15:32 +1300)]
Include source text in JSON errors

8 years agoAdd core::ops::Range*::contains() as per rust-lang/rust#32311
NODA, Kai [Sun, 20 Mar 2016 08:59:38 +0000 (16:59 +0800)]
Add core::ops::Range*::contains() as per rust-lang/rust#32311

Signed-off-by: NODA, Kai <nodakai@gmail.com>
8 years agorewrite scope drop to be iterative
Niko Matsakis [Thu, 24 Mar 2016 00:46:38 +0000 (20:46 -0400)]
rewrite scope drop to be iterative

while I'm at it, remove the "extra caching" that I was doing for no good
reason except laziness. Basically before I was caching at each scope in
the chain, but there's not really a reason to do that, since the cached
entry point at level N is always equal to the last cached exit point
from level N-1.

8 years agoMake warnings of renamed and removed lints themselves lints
Brian Anderson [Sat, 12 Mar 2016 20:46:59 +0000 (20:46 +0000)]
Make warnings of renamed and removed lints themselves lints

This adds the `renamed_and_removed_lints` warning, defaulting
to the warning level.

Fixes #31141

8 years agodoc: Stdin is locked for reads, not writes
Brian Anderson [Wed, 23 Mar 2016 23:39:01 +0000 (23:39 +0000)]
doc: Stdin is locked for reads, not writes

8 years agoAuto merge of #32455 - TimNN:patch-1, r=alexcrichton
bors [Wed, 23 Mar 2016 23:24:39 +0000 (16:24 -0700)]
Auto merge of #32455 - TimNN:patch-1, r=alexcrichton

add naked function tracking issue # to feature gate definition

8 years agointroduce "call-site-scope" as the outermost scope
Niko Matsakis [Wed, 23 Mar 2016 16:26:37 +0000 (12:26 -0400)]
introduce "call-site-scope" as the outermost scope

also, when exiting a scope, assign the final goto terminator with the
target scope's id

8 years agoUpdate borrowck to use `repr::*` instead of a mix
Niko Matsakis [Wed, 23 Mar 2016 09:57:52 +0000 (05:57 -0400)]
Update borrowck to use `repr::*` instead of a mix

We should probably settle on some conventions here. In MIR code, I have
generally been importing `*`, but perhaps borrowck does not want to do
that.

8 years agoadd comments on remaining fields
Niko Matsakis [Wed, 23 Mar 2016 09:18:49 +0000 (05:18 -0400)]
add comments on remaining fields

8 years agoAdd `ScopeAuxiliaryVec`, return MIR+aux via tuple
Niko Matsakis [Wed, 23 Mar 2016 09:01:30 +0000 (05:01 -0400)]
Add `ScopeAuxiliaryVec`, return MIR+aux via tuple

It's nice to be able to index with a scope-id,
but coherence rules prevent us from implementing
`Index<ScopeId>` for `Vec<ScopeAuxiliary>`, and I'd
prefer that `ScopeAuxiliary` remain in librustc_mir,
just for compilation time reasons.

8 years agoAddress nit: Remove `ScopedDataVec` newtype
Niko Matsakis [Wed, 23 Mar 2016 08:59:44 +0000 (04:59 -0400)]
Address nit: Remove `ScopedDataVec` newtype

8 years agoAddress nit: block.unit()
Niko Matsakis [Wed, 23 Mar 2016 08:25:09 +0000 (04:25 -0400)]
Address nit: block.unit()

8 years agoAddress nit: doc-comments on fields
Niko Matsakis [Wed, 23 Mar 2016 08:24:42 +0000 (04:24 -0400)]
Address nit: doc-comments on fields

8 years agoAddress nit: use doc-comments for fields of VarDecl
Niko Matsakis [Wed, 23 Mar 2016 08:21:02 +0000 (04:21 -0400)]
Address nit: use doc-comments for fields of VarDecl

8 years agoRename `MirPlusPlus` to `MirAndScopeAuxiliary`
Niko Matsakis [Wed, 23 Mar 2016 08:19:16 +0000 (04:19 -0400)]
Rename `MirPlusPlus` to `MirAndScopeAuxiliary`

8 years agoreplace DUMMY_SP on resume with span from fn
Niko Matsakis [Wed, 23 Mar 2016 00:41:07 +0000 (20:41 -0400)]
replace DUMMY_SP on resume with span from fn

8 years agorewrite drop code
Niko Matsakis [Wed, 23 Mar 2016 00:39:29 +0000 (20:39 -0400)]
rewrite drop code

This was triggered by me wanting to address a use of DUMMY_SP, but
actually I'm not sure what would be a better span -- I guess the span
for the function as a whole.

8 years agofix bug in `simplify_cfg` with inf. loops
Niko Matsakis [Tue, 22 Mar 2016 20:19:44 +0000 (16:19 -0400)]
fix bug in `simplify_cfg` with inf. loops

8 years agoallow dumping intermediate IR with -Z dump-mir
Niko Matsakis [Tue, 22 Mar 2016 20:05:28 +0000 (16:05 -0400)]
allow dumping intermediate IR with -Z dump-mir

8 years agoadjust pretty printer to print scopes / auxiliary
Niko Matsakis [Tue, 22 Mar 2016 15:52:34 +0000 (11:52 -0400)]
adjust pretty printer to print scopes / auxiliary

8 years agoaugment MIR pretty printer to print scopes
Niko Matsakis [Tue, 22 Mar 2016 14:08:44 +0000 (10:08 -0400)]
augment MIR pretty printer to print scopes

8 years agoreformat mir text pretty printer
Niko Matsakis [Sat, 19 Mar 2016 11:13:54 +0000 (07:13 -0400)]
reformat mir text pretty printer

8 years agoadd span/scope-id to terminator
Niko Matsakis [Fri, 18 Mar 2016 12:52:13 +0000 (08:52 -0400)]
add span/scope-id to terminator

8 years agoextend Terminator into a struct so it can have additional fields
Niko Matsakis [Thu, 10 Mar 2016 14:55:15 +0000 (09:55 -0500)]
extend Terminator into a struct so it can have additional fields

8 years agotrack the innermost scope for every stmt
Niko Matsakis [Wed, 9 Mar 2016 18:36:04 +0000 (13:36 -0500)]
track the innermost scope for every stmt

8 years agorecord a scope for each `VarDecl`
Niko Matsakis [Wed, 9 Mar 2016 17:36:07 +0000 (12:36 -0500)]
record a scope for each `VarDecl`

8 years agointegrate scopes into MIR
Niko Matsakis [Wed, 9 Mar 2016 16:04:26 +0000 (11:04 -0500)]
integrate scopes into MIR

8 years agoAuto merge of #32454 - eddyb:rollup, r=eddyb
bors [Wed, 23 Mar 2016 19:33:04 +0000 (12:33 -0700)]
Auto merge of #32454 - eddyb:rollup, r=eddyb

Rollup of 11 pull requests

- Successful merges: #32404, #32420, #32423, #32425, #32429, #32430, #32431, #32434, #32437, #32441, #32443
- Failed merges:

8 years agoadd naked function tracking issue # to feature gate definition
Tim Neumann [Wed, 23 Mar 2016 16:14:19 +0000 (17:14 +0100)]
add naked function tracking issue # to feature gate definition

8 years agoRollup merge of #32443 - tclfs:patch-8, r=steveklabnik
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:16 +0000 (17:59 +0200)]
Rollup merge of #32443 - tclfs:patch-8, r=steveklabnik

Docs: Change "statements" to "expressions" on `match`

I apt to use `expressions` over `statements`, because `match` is a expression in essence, though it can become a statement when followed a semicolon.

8 years agoRollup merge of #32441 - tshepang:doc-primitive, r=steveklabnik
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:16 +0000 (17:59 +0200)]
Rollup merge of #32441 - tshepang:doc-primitive, r=steveklabnik

doc: small char improvements

8 years agoRollup merge of #32437 - eddyb:orbital-msvc, r=alexcrichton
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:16 +0000 (17:59 +0200)]
Rollup merge of #32437 - eddyb:orbital-msvc, r=alexcrichton

Annotate run-pass/backtrace with #[rustc_no_mir] on MSVC.

Fixes #32384 by not using MIR on MSVC for the functions in the path of the backtrace.
This is the known blocker for the MSVC MIR builder, hopefully the only one overall.
r? @alexcrichton Confirmed to work on a nightly, by @retep998.

8 years agoRollup merge of #32434 - mitaa:rdoc-no-inline, r=alexcrichton
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:16 +0000 (17:59 +0200)]
Rollup merge of #32434 - mitaa:rdoc-no-inline, r=alexcrichton

rustdoc: Consider `doc(no_inline)` in crate-local inlining

Imports with `doc(no_inline)` will not be inlined, even when `doc(inline)` is present.

fixes #32343

r? @alexcrichton

8 years agoRollup merge of #32431 - nicholasf:tweak/improve-expression, r=steveklabnik
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:15 +0000 (17:59 +0200)]
Rollup merge of #32431 - nicholasf:tweak/improve-expression, r=steveklabnik

Simplifying some of the phrasing explaining lifetime elision

Just simplifying some of the language expressing what kind of inference Rust can and can't do on function signatures.

8 years agoRollup merge of #32430 - sanxiyn:const-trans, r=arielb1
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:15 +0000 (17:59 +0200)]
Rollup merge of #32430 - sanxiyn:const-trans, r=arielb1

Fix const trans

Fix #30615.

The idea was that when there are N autoderefs, first do N-1 derefs and check for autoref. If there is autoref, done, if not, do one more deref. But when N is zero, doing one more deref is wrong.

8 years agoRollup merge of #32429 - alexcrichton:scope-id-hton, r=aturon
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:15 +0000 (17:59 +0200)]
Rollup merge of #32429 - alexcrichton:scope-id-hton, r=aturon

std: Store flowinfo/scope_id in host byte order

Apparently these aren't supposed to be stored in network byte order, so doing so
ends up causing failures when it would otherwise succeed when stored in the host
byte order.

Closes #32424

8 years agoRollup merge of #32425 - ituxbag:master, r=alexcrichton
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:15 +0000 (17:59 +0200)]
Rollup merge of #32425 - ituxbag:master, r=alexcrichton

Added version 7.3* for Apple's clang compiler

The recent 7.3 clang version was missing.

Closes #32442

8 years agoRollup merge of #32423 - mitaa:rdoc-vstruct-fields, r=alexcrichton
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:15 +0000 (17:59 +0200)]
Rollup merge of #32423 - mitaa:rdoc-vstruct-fields, r=alexcrichton

rustdoc: Omit `pub` for inlined variant-struct fields

fixes #32395

r? @alexcrichton

8 years agoRollup merge of #32420 - frewsxcv:regression-test-26997, r=alexcrichton
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:14 +0000 (17:59 +0200)]
Rollup merge of #32420 - frewsxcv:regression-test-26997, r=alexcrichton

Add regression test for Issue 26997.

https://github.com/rust-lang/rust/issues/26997

8 years agoRollup merge of #32404 - WiSaGaN:feature/osstring-implement-default, r=aturon
Eduard-Mihai Burtescu [Wed, 23 Mar 2016 15:59:14 +0000 (17:59 +0200)]
Rollup merge of #32404 - WiSaGaN:feature/osstring-implement-default, r=aturon

Implement Default trait for OsString/OsStr

Fixes #32385

8 years agoAuto merge of #32390 - japaric:untry, r=pnkfelix
bors [Wed, 23 Mar 2016 15:59:10 +0000 (08:59 -0700)]
Auto merge of #32390 - japaric:untry, r=pnkfelix

convert 99.9% of `try!`s to `?`s

The first commit is an automated conversion using the [untry] tool and the following command:

```
$ find -name '*.rs' -type f | xargs untry
```

at the root of the Rust repo.

[untry]: https://github.com/japaric/untry

cc @rust-lang/lang @alexcrichton @brson

8 years agoAdd code examples for libstd/time
Guillaume Gomez [Wed, 23 Mar 2016 13:17:19 +0000 (14:17 +0100)]
Add code examples for libstd/time

8 years agoadd back `&` that was deleted by mistake
Jorge Aparicio [Wed, 23 Mar 2016 11:17:29 +0000 (06:17 -0500)]
add back `&` that was deleted by mistake

8 years agoAuto merge of #32410 - Ticki:master, r=eddyb
bors [Wed, 23 Mar 2016 10:49:02 +0000 (03:49 -0700)]
Auto merge of #32410 - Ticki:master, r=eddyb

Add support for naked functions

See https://github.com/rust-lang/rfcs/pull/1201#issuecomment-199442239

This PR adds `#[naked]` for marking naked functions.

8 years agoAuto merge of #32348 - brson:cargotest, r=alexcrichton
bors [Wed, 23 Mar 2016 08:03:04 +0000 (01:03 -0700)]
Auto merge of #32348 - brson:cargotest, r=alexcrichton

Introduce 'cargotest' and the check-cargotest buildstep

This is a new suite of tests that verifies that the compiler builds specific revisions of select crates from crates.io.

It does not run by default. It is intended that bors runs these tests against all PRs, and gates on them. In this way we will make it harder still to break important swaths of the ecosystem, even on nightly.

This is a very basic implementation intended for feedback. The biggest thing it probably should do but doesn't is use a lockfile for every project it builds.

r? @alexcrichton cc @rust-lang/lang @rust-lang/libs

8 years agoAuto merge of #32058 - pczarn:hashmap-initial-refactoring, r=apasel422
bors [Wed, 23 Mar 2016 04:21:45 +0000 (21:21 -0700)]
Auto merge of #32058 - pczarn:hashmap-initial-refactoring, r=apasel422

Basic refactoring of HashMap

8 years agoDocs: Change "statements" to "expressions" on `match`
Tang Chenglong [Wed, 23 Mar 2016 04:03:41 +0000 (12:03 +0800)]
Docs: Change "statements" to "expressions" on `match`

I apt to use `expressions` over `statements`, because `match` is a expression in essence, though it can become a statement when followed a semicolon.

8 years agoenable question_mark feature in rustc_borrowck
Jorge Aparicio [Wed, 23 Mar 2016 02:59:17 +0000 (21:59 -0500)]
enable question_mark feature in rustc_borrowck

8 years agofix alignment
Jorge Aparicio [Tue, 22 Mar 2016 22:58:45 +0000 (17:58 -0500)]
fix alignment

8 years agobreak long line
Jorge Aparicio [Mon, 21 Mar 2016 08:38:25 +0000 (03:38 -0500)]
break long line

8 years agoterm: undo conversion of user defined try!s
Jorge Aparicio [Mon, 21 Mar 2016 07:24:07 +0000 (02:24 -0500)]
term: undo conversion of user defined try!s

8 years agostd: undo conversion of user defined try!s
Jorge Aparicio [Mon, 21 Mar 2016 07:23:47 +0000 (02:23 -0500)]
std: undo conversion of user defined try!s

8 years agosprinkle feature gates here and there
Jorge Aparicio [Mon, 21 Mar 2016 07:23:03 +0000 (02:23 -0500)]
sprinkle feature gates here and there

8 years agotry! -> ?
Jorge Aparicio [Wed, 23 Mar 2016 03:01:37 +0000 (22:01 -0500)]
try! -> ?

Automated conversion using the untry tool [1] and the following command:

```
$ find -name '*.rs' -type f | xargs untry
```

at the root of the Rust repo.

[1]: https://github.com/japaric/untry

8 years agoAnnotate run-pass/backtrace with #[rustc_no_mir] on MSVC.
Eduard Burtescu [Wed, 23 Mar 2016 00:59:02 +0000 (02:59 +0200)]
Annotate run-pass/backtrace with #[rustc_no_mir] on MSVC.

8 years agoAuto merge of #32204 - alexcrichton:redesign-char-encoding-types, r=aturon
bors [Tue, 22 Mar 2016 23:05:39 +0000 (16:05 -0700)]
Auto merge of #32204 - alexcrichton:redesign-char-encoding-types, r=aturon

std: Change `encode_utf{8,16}` to return iterators

Currently these have non-traditional APIs which take a buffer and report how
much was filled in, but they're not necessarily ergonomic to use. Returning an
iterator which *also* exposes an underlying slice shouldn't result in any
performance loss as it's just a lazy version of the same implementation, and
it's also much more ergonomic!

cc #27784

8 years agoIntroduce 'cargotest' and the check-cargotest buildstep
Brian Anderson [Fri, 18 Mar 2016 20:54:31 +0000 (20:54 +0000)]
Introduce 'cargotest' and the check-cargotest buildstep

This is a new suite of tests that verifies that the compiler
builds specific revisions of select crates from crates.io.

It does not run by default. It is intended that buildbot
runs these tests against all PRs, and gate on them.

8 years agoConsider `doc(no_inline)` in crate-local inlining
mitaa [Tue, 22 Mar 2016 19:26:33 +0000 (20:26 +0100)]
Consider `doc(no_inline)` in crate-local inlining

8 years agoSimplifying some of the phrasing explaining lifetime elision
nicholasf [Tue, 22 Mar 2016 17:58:59 +0000 (04:58 +1100)]
Simplifying some of the phrasing explaining lifetime elision

8 years agostd: Change `encode_utf{8,16}` to return iterators
Alex Crichton [Fri, 11 Mar 2016 19:01:46 +0000 (11:01 -0800)]
std: Change `encode_utf{8,16}` to return iterators

Currently these have non-traditional APIs which take a buffer and report how
much was filled in, but they're not necessarily ergonomic to use. Returning an
iterator which *also* exposes an underlying slice shouldn't result in any
performance loss as it's just a lazy version of the same implementation, and
it's also much more ergonomic!

cc #27784

8 years agoAdd doc example to clone trait
Guillaume Gomez [Tue, 22 Mar 2016 00:12:59 +0000 (01:12 +0100)]
Add doc example to clone trait

8 years agoFix const trans
Seo Sanghyeon [Tue, 22 Mar 2016 17:10:09 +0000 (02:10 +0900)]
Fix const trans

Const was dereferenced when autoderefs is zero.

8 years agoAuto merge of #32156 - pnkfelix:borrowck-on-mir-move-analysis, r=nikomatsakis
bors [Tue, 22 Mar 2016 17:00:12 +0000 (10:00 -0700)]
Auto merge of #32156 - pnkfelix:borrowck-on-mir-move-analysis, r=nikomatsakis

Move analysis for MIR borrowck

This PR adds code for doing MIR-based gathering of the moves in a `fn` and the dataflow to determine where uninitialized locations flow to, analogous to how the same thing is done in `borrowck`.

It also adds a couple attributes to print out graphviz visualizations of the analyzed MIR that includes the dataflow analysis results.

cc @nikomatsakis

8 years agoAdd rustbuild dependency from `rustc_borrowck` upon `rustc_mir` crate.
Felix S. Klock II [Tue, 22 Mar 2016 17:09:57 +0000 (18:09 +0100)]
Add rustbuild dependency from `rustc_borrowck` upon `rustc_mir` crate.

8 years agostd: Store flowinfo/scope_id in host byte order
Alex Crichton [Tue, 22 Mar 2016 16:33:36 +0000 (09:33 -0700)]
std: Store flowinfo/scope_id in host byte order

Apparently these aren't supposed to be stored in network byte order, so doing so
ends up causing failures when it would otherwise succeed when stored in the host
byte order.

Closes #32424

8 years agoAuto merge of #32341 - frewsxcv:compiletest-enum, r=nikomatsakis
bors [Tue, 22 Mar 2016 15:02:13 +0000 (08:02 -0700)]
Auto merge of #32341 - frewsxcv:compiletest-enum, r=nikomatsakis

Use enum for message kind in compiletest harness.

None

8 years agoAdd test for the feature gating of naked
Ticki [Tue, 22 Mar 2016 13:08:56 +0000 (14:08 +0100)]
Add test for the feature gating of naked

8 years agoAdded version 7.3* for Apple's clang compiler
ituxbag [Tue, 22 Mar 2016 12:44:33 +0000 (13:44 +0100)]
Added version 7.3* for Apple's clang compiler

8 years agof clarification, docs
Piotr Czarnecki [Tue, 22 Mar 2016 11:52:31 +0000 (12:52 +0100)]
f clarification, docs

8 years agoAuto merge of #32264 - GuillaumeGomez:lang_item, r=nikomatsakis
bors [Tue, 22 Mar 2016 11:06:59 +0000 (04:06 -0700)]
Auto merge of #32264 - GuillaumeGomez:lang_item, r=nikomatsakis

Lang item

Fixes #32033

8 years agoAuto merge of #32388 - semarie:snapshot-openbsd, r=alexcrichton
bors [Tue, 22 Mar 2016 09:05:16 +0000 (02:05 -0700)]
Auto merge of #32388 - semarie:snapshot-openbsd, r=alexcrichton

register openbsd snapshot

Here openbsd version for latest snapshot.

The archive is at http://semarie.online.fr/rust/rust-stage0-2016-03-18-235d774-openbsd-x86_64-c5b6feda38138a12cd5c05574b585dadebbb5e87.tar.bz2

These segmentation fault starts to be annoying. @dhuseby do you think it would be possible to have a shell access to openbsd buildbot in order to try to investigating a bit the reason of them ?

r? @alexcrichton
Ref #32345

8 years agoAdd tests
Ticki [Mon, 21 Mar 2016 20:13:50 +0000 (21:13 +0100)]
Add tests

8 years agof Put and DerefMut
Piotr Czarnecki [Tue, 22 Mar 2016 08:45:51 +0000 (09:45 +0100)]
f Put and DerefMut

8 years agodoc: small char improvements
Tshepang Lekhonkhobe [Tue, 22 Mar 2016 06:29:55 +0000 (08:29 +0200)]
doc: small char improvements

8 years agoOmit `pub` for inlined variant-struct fields
mitaa [Tue, 22 Mar 2016 05:59:43 +0000 (06:59 +0100)]
Omit `pub` for inlined variant-struct fields

8 years agoAuto merge of #32253 - durka:derive-31886, r=alexcrichton
bors [Tue, 22 Mar 2016 04:07:28 +0000 (21:07 -0700)]
Auto merge of #32253 - durka:derive-31886, r=alexcrichton

derive: assume enum repr defaults to isize

derive: assume enum repr defaults to isize

Fixes #31886.

Spawned from #32139.

r? @alexcrichton

8 years agoAdd regression test for Issue 26997.
Corey Farwell [Tue, 22 Mar 2016 02:40:28 +0000 (22:40 -0400)]
Add regression test for Issue 26997.

https://github.com/rust-lang/rust/issues/26997

8 years agoAuto merge of #32402 - steveklabnik:rollup, r=steveklabnik
bors [Tue, 22 Mar 2016 01:36:13 +0000 (18:36 -0700)]
Auto merge of #32402 - steveklabnik:rollup, r=steveklabnik

Rollup of 6 pull requests

- Successful merges: #32322, #32339, #32340, #32373, #32376, #32397
- Failed merges:

8 years agoRefactor 'kind' extraction to use `str::split_whitespace`.
Corey Farwell [Tue, 22 Mar 2016 01:16:07 +0000 (21:16 -0400)]
Refactor 'kind' extraction to use `str::split_whitespace`.

8 years agoFix Default for OsString/OsStr
Wangshan Lu [Mon, 21 Mar 2016 23:38:44 +0000 (07:38 +0800)]
Fix Default for OsString/OsStr