]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAdd pretty printer output for `default`
Aaron Turon [Mon, 14 Mar 2016 05:55:26 +0000 (22:55 -0700)]
Add pretty printer output for `default`

8 years agoAdjust error code
Aaron Turon [Sun, 13 Mar 2016 21:18:45 +0000 (14:18 -0700)]
Adjust error code

8 years agoParse fail test fixes
Aaron Turon [Sun, 13 Mar 2016 20:30:44 +0000 (13:30 -0700)]
Parse fail test fixes

8 years agoFixes after rebase
Aaron Turon [Fri, 11 Mar 2016 23:51:35 +0000 (15:51 -0800)]
Fixes after rebase

8 years agoIntroduce ICE when the topmost projection restriction kicks in, as per issue #32205
Aaron Turon [Fri, 11 Mar 2016 22:47:29 +0000 (14:47 -0800)]
Introduce ICE when the topmost projection restriction kicks in, as per issue #32205

8 years agoTest fixes, added README for tests
Aaron Turon [Fri, 11 Mar 2016 20:15:28 +0000 (12:15 -0800)]
Test fixes, added README for tests

8 years agoMove tests to dedicated subdirectories
Aaron Turon [Wed, 9 Mar 2016 00:14:13 +0000 (16:14 -0800)]
Move tests to dedicated subdirectories

8 years agoFixes after a rebase
Aaron Turon [Wed, 9 Mar 2016 00:09:39 +0000 (16:09 -0800)]
Fixes after a rebase

8 years agoAddress review comments
Aaron Turon [Tue, 8 Mar 2016 23:23:52 +0000 (15:23 -0800)]
Address review comments

8 years agoMove projection_mode to InferContext rather than SelectionContext to reduce chance...
Aaron Turon [Tue, 23 Feb 2016 20:47:09 +0000 (12:47 -0800)]
Move projection_mode to InferContext rather than SelectionContext to reduce chance of bugs

8 years agoForbid cross-polarity specializations
Aaron Turon [Tue, 23 Feb 2016 15:48:34 +0000 (07:48 -0800)]
Forbid cross-polarity specializations

8 years agoAdd regression tests from initial implementation review
Aaron Turon [Tue, 23 Feb 2016 06:46:45 +0000 (22:46 -0800)]
Add regression tests from initial implementation review

8 years agoAdd some debugging output for specialization graph assembly
Aaron Turon [Tue, 23 Feb 2016 06:21:37 +0000 (22:21 -0800)]
Add some debugging output for specialization graph assembly

8 years agoRefactor core specialization and subst translation code to avoid
Aaron Turon [Fri, 19 Feb 2016 18:49:14 +0000 (10:49 -0800)]
Refactor core specialization and subst translation code to avoid
danger of inference variables floating around without their inference
context.

The main insight here is that, when we are translating substitutions
between two impls, *we already know that the more specific impl holds*,
so we do not need to add its obligations to the parameter
environment. Instead, we can just thread through the inference context
we used to show select the more specific impl in the first place.

8 years agoAdd more commentary for subst translation
Aaron Turon [Wed, 17 Feb 2016 17:04:26 +0000 (09:04 -0800)]
Add more commentary for subst translation

8 years agoMove specialization graph walks to iterators; make associated type
Aaron Turon [Tue, 16 Feb 2016 18:36:47 +0000 (10:36 -0800)]
Move specialization graph walks to iterators; make associated type
projection sensitive to "mode" (most importantly, trans vs middle).

This commit introduces several pieces of iteration infrastructure in the
specialization graph data structure, as well as various helpers for
finding the definition of a given item, given its kind and name.

In addition, associated type projection is now *mode-sensitive*, with
three possible modes:

- **Topmost**. This means that projection is only possible if there is a
    non-`default` definition of the associated type directly on the
    selected impl. This mode is a bit of a hack: it's used during early
    coherence checking before we have built the specialization
    graph (and therefore before we can walk up the specialization
    parents to find other definitions). Eventually, this should be
    replaced with a less "staged" construction of the specialization
    graph.

- **AnyFinal**. Projection succeeds for any non-`default` associated
    type definition, even if it is defined by a parent impl. Used
    throughout typechecking.

- **Any**. Projection always succeeds. Used by trans.

The lasting distinction here is between `AnyFinal` and `Any` -- we wish
to treat `default` associated types opaquely for typechecking purposes.

In addition to the above, the commit includes a few other minor review fixes.

8 years agoAddress basic nits from initial review
Aaron Turon [Sat, 30 Jan 2016 17:25:25 +0000 (09:25 -0800)]
Address basic nits from initial review

8 years agoAssorted fixed after rebasing
Aaron Turon [Sat, 30 Jan 2016 00:25:18 +0000 (16:25 -0800)]
Assorted fixed after rebasing

8 years agoAdd some basic comments about how specialization fits into the rest of the trait...
Aaron Turon [Wed, 30 Dec 2015 23:57:49 +0000 (15:57 -0800)]
Add some basic comments about how specialization fits into the rest of the trait machinery

8 years agoAdjust tests for feature gate, and add tests for the gate itself
Aaron Turon [Wed, 30 Dec 2015 23:25:31 +0000 (15:25 -0800)]
Adjust tests for feature gate, and add tests for the gate itself

8 years agoAdd feature gate
Aaron Turon [Wed, 30 Dec 2015 23:16:43 +0000 (15:16 -0800)]
Add feature gate

8 years agoAdjust coherence test to reflect that only the orphan rule prevents you from adding...
Aaron Turon [Wed, 30 Dec 2015 15:00:05 +0000 (07:00 -0800)]
Adjust coherence test to reflect that only the orphan rule prevents you from adding *generalizing* impls

8 years agoAdjust test for new overlap message on default trait impls
Aaron Turon [Wed, 30 Dec 2015 14:56:06 +0000 (06:56 -0800)]
Adjust test for new overlap message on default trait impls

8 years agoAdjust overlap-related tests to account for cosmetic changes to error reporting behavior
Aaron Turon [Wed, 30 Dec 2015 05:18:24 +0000 (21:18 -0800)]
Adjust overlap-related tests to account for cosmetic changes to error reporting behavior

8 years agoAdd tests for specialization on associated types
Aaron Turon [Tue, 29 Dec 2015 22:01:30 +0000 (14:01 -0800)]
Add tests for specialization on associated types

8 years agoImplement default associated type inheritance.
Aaron Turon [Tue, 29 Dec 2015 21:37:34 +0000 (13:37 -0800)]
Implement default associated type inheritance.

This commit leverages the specialization graph infrastructure to allow
specializing trait implementations to leave off associated types for
which their parents have provided defaults.

It also modifies the type projection code to avoid projecting associated
types unless either (1) all input types are fully known or (2) the
available associated type is "final", i.e. not marked `default`.
This restriction is required for soundness, due to examples like:

```rust
trait Foo {
    type Assoc;
}

impl<T> Foo for T {
    default type Assoc = ();
}

impl Foo for u8 {
    type Assoc = String;
}

fn generic<T>() -> <T as Foo>::Assoc {
    () //~ ERROR
}

fn main() {
    let s: String = generic::<u8>();
    println!("{}", s); // bad news
}
```

8 years agoCheck for proper use of `default` keyword in specializing impls.
Aaron Turon [Tue, 29 Dec 2015 18:55:34 +0000 (10:55 -0800)]
Check for proper use of `default` keyword in specializing impls.

8 years agoAdd basic specialization tests, including for default item
Aaron Turon [Mon, 28 Dec 2015 23:40:11 +0000 (15:40 -0800)]
Add basic specialization tests, including for default item
inheritance. Updates some of the coherence tests as well.

8 years agoImplement default method inheritance.
Aaron Turon [Mon, 28 Dec 2015 23:38:26 +0000 (15:38 -0800)]
Implement default method inheritance.

This commit leverages the specialization graph infrastructure to allow
specializing trait implementations to leave off methods for which their
parents have provided defaults.

It does not yet check that the `default` keyword is appropriately used
in such cases.

8 years agoAdd subst helper for inheriting FnSpace from another subst
Aaron Turon [Mon, 28 Dec 2015 21:34:01 +0000 (13:34 -0800)]
Add subst helper for inheriting FnSpace from another subst

8 years agoInitial incorporation of specialization:
Aaron Turon [Tue, 22 Dec 2015 18:20:47 +0000 (10:20 -0800)]
Initial incorporation of specialization:

- Rewrites the overlap checker to instead build up a specialization
  graph, checking for overlap errors in the process.

- Use the specialization order during impl selection.

This commit does not yet handle associated types correctly, and assumes
that all items are `default` and are overridden.

8 years agoAdd specialization module.
Aaron Turon [Tue, 22 Dec 2015 18:17:59 +0000 (10:17 -0800)]
Add specialization module.

The module contains a few important components:

- The `specialize` function, which determines whether one impl is a
  specialization of another.

- The `SpecializationGraph`, a per-trait graph recording the
  specialization tree. The main purpose of the graph is to allow
  traversals upwards (to less specialized impls) for discovering
  un-overridden defaults, and for ensuring that overridden items are
  allowed to be overridden.

8 years agoRefactor `impl_trait_ref_and_oblig`, making it generally available as a utility
Aaron Turon [Wed, 30 Dec 2015 21:47:23 +0000 (13:47 -0800)]
Refactor `impl_trait_ref_and_oblig`, making it generally available as a utility

8 years agoHook `default` keyword into metadata and carry data through to typeck
Aaron Turon [Tue, 29 Dec 2015 00:14:28 +0000 (16:14 -0800)]
Hook `default` keyword into metadata and carry data through to typeck

8 years agoAdd `default` as contextual keyword, and parse it for impl items.
Aaron Turon [Fri, 18 Dec 2015 22:38:28 +0000 (14:38 -0800)]
Add `default` as contextual keyword, and parse it for impl items.

8 years agoRemove useless vector accumulation in `type_vars_for_defs`
Aaron Turon [Tue, 8 Dec 2015 00:59:26 +0000 (16:59 -0800)]
Remove useless vector accumulation in `type_vars_for_defs`

8 years agoFix existing comment typo.
Aaron Turon [Fri, 4 Dec 2015 18:57:02 +0000 (10:57 -0800)]
Fix existing comment typo.

8 years agoAuto merge of #30587 - oli-obk:eager_const_eval2, r=nikomatsakis
bors [Mon, 14 Mar 2016 18:38:23 +0000 (11:38 -0700)]
Auto merge of #30587 - oli-obk:eager_const_eval2, r=nikomatsakis

typestrong const integers

~~It would be great if someone could run crater on this PR, as this has a high danger of breaking valid code~~ Crater ran. Good to go.

----

So this PR does a few things:

1. ~~const eval array values when const evaluating an array expression~~
2. ~~const eval repeat value when const evaluating a repeat expression~~
3. ~~const eval all struct and tuple fields when evaluating a struct/tuple expression~~
4. remove the `ConstVal::Int` and `ConstVal::Uint` variants and replace them with a single enum (`ConstInt`) which has variants for all integral types
  * `usize`/`isize` are also enums with variants for 32 and 64 bit. At creation and various usage steps there are assertions in place checking if the target bitwidth matches with the chosen enum variant
5. enum discriminants (`ty::Disr`) are now `ConstInt`
6. trans has its own `Disr` type now (newtype around `u64`)

This obviously can't be done without breaking changes (the ones that are noticable in stable)
We could probably write lints that find those situations and error on it for a cycle or two. But then again, those situations are rare and really bugs imo anyway:

```rust
let v10 = 10 as i8;
let v4 = 4 as isize;
assert_eq!(v10 << v4 as usize, 160 as i8);
 ```

stops compiling because 160 is not a valid i8

```rust
struct S<T, S> {
    a: T,
    b: u8,
    c: S
}
let s = S { a: 0xff_ff_ff_ffu32, b: 1, c: 0xaa_aa_aa_aa as i32 };
```

stops compiling because `0xaa_aa_aa_aa` is not a valid i32

----

cc @eddyb @pnkfelix

related: https://github.com/rust-lang/rfcs/issues/1071

8 years agoAuto merge of #32233 - Amanieu:volatile_store, r=eddyb
bors [Mon, 14 Mar 2016 15:32:45 +0000 (08:32 -0700)]
Auto merge of #32233 - Amanieu:volatile_store, r=eddyb

Fix LLVM assert with write_volatile

Fixes #29663

8 years agoAuto merge of #32232 - jonas-schievink:issue31511, r=eddyb
bors [Mon, 14 Mar 2016 12:44:24 +0000 (05:44 -0700)]
Auto merge of #32232 - jonas-schievink:issue31511, r=eddyb

Give a more accurate error on thin-to-fat ptr cast

Fixes #31511

8 years agorustbuild
Oliver Schneider [Mon, 14 Mar 2016 08:29:18 +0000 (09:29 +0100)]
rustbuild

8 years agoAuto merge of #32231 - ruud-v-a:avx-cmp-blend, r=alexcrichton
bors [Mon, 14 Mar 2016 07:30:53 +0000 (00:30 -0700)]
Auto merge of #32231 - ruud-v-a:avx-cmp-blend, r=alexcrichton

Define AVX compare and blend intrinsics

This defines the following intrinsics:

 * `_mm256_blendv_pd`
 * `_mm256_blendv_ps`
 * `_mm256_cmp_pd`
 * `_mm256_cmp_ps`

I verified these locally.

8 years agoAuto merge of #32226 - andoriyu:patch-2, r=alexcrichton
bors [Mon, 14 Mar 2016 01:46:59 +0000 (18:46 -0700)]
Auto merge of #32226 - andoriyu:patch-2, r=alexcrichton

Fix. FreeBSD snapshot

Previous snapshot was complied with avx2 instructions by accident.

Actual file: http://people.freebsd.org/~davide/rust/rust-stage0-2016-02-17-4d3eebf-freebsd-x86_64-f38991fbb81c1cd8d0bbda396f98f13a55b42804.tar.bz2

/cc @alexcrichton @dcci

8 years agoAuto merge of #32211 - achanda:ipv6-global, r=alexcrichton
bors [Sun, 13 Mar 2016 23:53:09 +0000 (16:53 -0700)]
Auto merge of #32211 - achanda:ipv6-global, r=alexcrichton

Reject unspecified IP from global

Also fixed the test

8 years agoFix test fallout
Jonas Schievink [Sun, 13 Mar 2016 19:35:04 +0000 (20:35 +0100)]
Fix test fallout

8 years agoAuto merge of #32227 - jseyfried:fix_import_resolution_bug, r=alexcrichton
bors [Sun, 13 Mar 2016 19:24:42 +0000 (12:24 -0700)]
Auto merge of #32227 - jseyfried:fix_import_resolution_bug, r=alexcrichton

Fix import resolution bug

This fixes #32222, which was introduced in #31726.

8 years agoFix LLVM assert with write_volatile
Amanieu d'Antras [Sun, 13 Mar 2016 16:40:06 +0000 (17:40 +0100)]
Fix LLVM assert with write_volatile

8 years agoAuto merge of #32184 - ollie27:win_stdout, r=alexcrichton
bors [Sun, 13 Mar 2016 16:27:17 +0000 (09:27 -0700)]
Auto merge of #32184 - ollie27:win_stdout, r=alexcrichton

Fixup stout/stderr on Windows

WriteConsoleW can fail if called with a large buffer so we need to slice
any stdout/stderr output.
However the current slicing has a few problems:
 1. It slices by byte but still expects valid UTF-8.
 2. The slicing happens even when not outputting to a console.
 3. panic! output is not sliced.

This fixes these issues by moving the slice to right before
WriteConsoleW and slicing on a char boundary.

8 years agoGive a more accurate error on thin-to-fat ptr cast
Jonas Schievink [Sun, 13 Mar 2016 16:01:10 +0000 (17:01 +0100)]
Give a more accurate error on thin-to-fat ptr cast

Fixes #31511

8 years agoAuto merge of #32229 - Manishearth:rollup, r=Manishearth
bors [Sun, 13 Mar 2016 14:30:14 +0000 (07:30 -0700)]
Auto merge of #32229 - Manishearth:rollup, r=Manishearth

Rollup of 4 pull requests

- Successful merges: #32164, #32179, #32212, #32218
- Failed merges:

8 years agoRegenerate x86 platform intrinsics
Ruud van Asseldonk [Sun, 13 Mar 2016 14:09:46 +0000 (15:09 +0100)]
Regenerate x86 platform intrinsics

The exact command used was:

    $ cd src/etc/platform-intrinsics/x86
    $ python2 ../generator.py --format compiler-defs -i info.json   \
      sse.json sse2.json sse3.json ssse3.json sse41.json sse42.json \
      avx.json avx2.json fma.json                                   \
      > ../../../librustc_platform_intrinsics/x86.rs

8 years agoDefine AVX blend intrinsics
Ruud van Asseldonk [Fri, 11 Mar 2016 15:22:11 +0000 (16:22 +0100)]
Define AVX blend intrinsics

This defines the `_mm256_blendv_pd` and `_mm256_blendv_ps` intrinsics.
The `_mm256_blend_pd` and `_mm256_blend_ps` intrinsics are not available
as LLVM intrinsics. In Clang they are implemented using the
shufflevector builtin.

Intel reference: https://software.intel.com/en-us/node/524070.

8 years agoDefine AVX comparison intrinsics
Ruud van Asseldonk [Wed, 9 Mar 2016 20:37:44 +0000 (21:37 +0100)]
Define AVX comparison intrinsics

This defines `_mm256_cmp_pd` and `_mm256_cmp_ps`.

Intel reference: https://software.intel.com/en-us/node/524075.

8 years agoRollup merge of #32218 - cantino:minor_book_typo_fixes, r=steveklabnik
Manish Goregaokar [Sun, 13 Mar 2016 14:03:27 +0000 (19:33 +0530)]
Rollup merge of #32218 - cantino:minor_book_typo_fixes, r=steveklabnik

Fix minor typos in doc.rust-lang.org/book

I've made a few typo and grammar fixes as I've been working through the book.

8 years agoRollup merge of #32212 - Manishearth:ice-cu, r=eddyb
Manish Goregaokar [Sun, 13 Mar 2016 14:03:27 +0000 (19:33 +0530)]
Rollup merge of #32212 - Manishearth:ice-cu, r=eddyb

Don't allow values for codegen-units less than 1

r? @eddyb

fixes #32191

8 years agoRollup merge of #32179 - srinivasreddy:remove_int_suffix, r=steveklabnik
Manish Goregaokar [Sun, 13 Mar 2016 14:03:27 +0000 (19:33 +0530)]
Rollup merge of #32179 - srinivasreddy:remove_int_suffix, r=steveklabnik

Removed integer suffixes in libsyntax crate

8 years agoRollup merge of #32164 - nikomatsakis:fewer-errors, r=eddyb
Manish Goregaokar [Sun, 13 Mar 2016 14:03:27 +0000 (19:33 +0530)]
Rollup merge of #32164 - nikomatsakis:fewer-errors, r=eddyb

Do not report errors from regionck if other errors were already reported

Do not report errors from regionck if other errors were already reported during the lifetime of this inferencer. Fixes #30580.

r? @arielb1

8 years agoAuto merge of #31916 - nagisa:mir-passmgr-2, r=arielb1
bors [Sun, 13 Mar 2016 12:33:28 +0000 (05:33 -0700)]
Auto merge of #31916 - nagisa:mir-passmgr-2, r=arielb1

Add Pass manager for MIR

A new PR, since rebasing the original one (https://github.com/rust-lang/rust/pull/31448) properly was a pain. Since then there has been several changes most notable of which:

1. Removed the pretty-printing with `#[rustc_mir(graphviz/pretty)]`, mostly because we now have `--unpretty=mir`, IMHO that’s the direction we should expand this functionality into;
2. Reverted the infercx change done for typeck, because typeck can make an infercx for itself by being a `MirMapPass`

r? @nikomatsakis

8 years agoAdd regression test for #32222
Jeffrey Seyfried [Sun, 13 Mar 2016 10:41:21 +0000 (10:41 +0000)]
Add regression test for #32222

8 years agoFixes #32222
Jeffrey Seyfried [Sun, 13 Mar 2016 10:31:40 +0000 (10:31 +0000)]
Fixes #32222

8 years agoRefactor out methods `NameResolution::increment_outstanding_references` and
Jeffrey Seyfried [Sun, 13 Mar 2016 09:59:16 +0000 (09:59 +0000)]
Refactor out methods `NameResolution::increment_outstanding_references` and
`NameResolution::decrement_outstanding_references`.

8 years agoAuto merge of #32182 - bluss:string-from-is-str-owned, r=alexcrichton
bors [Sun, 13 Mar 2016 10:40:14 +0000 (03:40 -0700)]
Auto merge of #32182 - bluss:string-from-is-str-owned, r=alexcrichton

Call str::to_owned in String::from and uninline it

Call str::to_owned in String::from and uninline it

These methods were already effectively equal, but now one calls
the other, and neither is marked inline.
String::from does not need to be inlined, it can be without it just like
str::to_owned and String::clone are.

Fixes #32163

8 years agoCall str::to_owned in String::from and uninline it
Ulrik Sverdrup [Thu, 10 Mar 2016 20:15:29 +0000 (21:15 +0100)]
Call str::to_owned in String::from and uninline it

String::from does not need to be inlined, it can be without it just like
str::to_owned and String::clone are.

8 years agoFix. FreeBSD snapshot
Andrey Cherkashin [Sun, 13 Mar 2016 06:02:39 +0000 (22:02 -0800)]
Fix. FreeBSD snapshot

Previous snapshot was complied with avx2 instructions by accident.

Actual file: http://people.freebsd.org/~davide/rust/rust-stage0-2016-02-17-4d3eebf-freebsd-x86_64-f38991fbb81c1cd8d0bbda396f98f13a55b42804.tar.bz2

8 years agoAuto merge of #32141 - jseyfried:fix_resolution_in_lexical_scopes, r=nikomatsakis
bors [Sun, 13 Mar 2016 05:55:14 +0000 (21:55 -0800)]
Auto merge of #32141 - jseyfried:fix_resolution_in_lexical_scopes, r=nikomatsakis

Fix name resolution in lexical scopes

Currently, `resolve_item_in_lexical_scope` does not check the "ribs" (type parameters and local variables). This can allow items that should be shadowed by type parameters to be named.

For example,
```rust
struct T { i: i32 }
fn f<T>() {
    let t = T { i: 0 }; // This use of `T` resolves to the struct, not the type parameter
}

mod Foo {
    pub fn f() {}
}
fn g<Foo>() {
    Foo::f(); // This use of `Foo` resolves to the module, not the type parameter
}
```

This PR changes `resolve_item_in_lexical_scope` so that it fails when the item is shadowed by a rib (fixes #32120).
This is a [breaking-change], but it looks unlikely to cause breakage in practice.

r? @nikomatsakis

8 years agoAuto merge of #32217 - alexcrichton:fix-make-dist, r=brson
bors [Sun, 13 Mar 2016 02:58:15 +0000 (18:58 -0800)]
Auto merge of #32217 - alexcrichton:fix-make-dist, r=brson

mk: Fix `make dist`

With the movement of the erro-index-generator and rustbook, need to update the
rules in `make dist`.

8 years agoAuto merge of #32140 - ruud-v-a:avx-intrinsics, r=alexcrichton
bors [Sun, 13 Mar 2016 00:18:34 +0000 (16:18 -0800)]
Auto merge of #32140 - ruud-v-a:avx-intrinsics, r=alexcrichton

Add AVX broadcast and conversion intrinsics

This adds the following intrinsics:

 * `_mm256_broadcast_pd`
 * `_mm256_broadcast_ps`
 * `_mm256_cvtepi32_pd`
 * `_mm256_cvtepi32_ps`
 * `_mm256_cvtpd_epi32`
 * `_mm256_cvtpd_ps`
 * `_mm256_cvtps_epi32`
 * `_mm256_cvtps_pd`
 * `_mm256_cvttpd_epi32`
 * `_mm256_cvttps_epi32`

The "avx" codegen feature must be enabled to use these.

8 years agoReject unspecified and loopback IP from global
Abhishek Chanda [Sat, 12 Mar 2016 10:13:40 +0000 (02:13 -0800)]
Reject unspecified and loopback IP from global

8 years agoAuto merge of #32112 - alexcrichton:fix-issues, r=aturon
bors [Sat, 12 Mar 2016 21:21:06 +0000 (13:21 -0800)]
Auto merge of #32112 - alexcrichton:fix-issues, r=aturon

std: Fix tracking issues and clean deprecated APIs

This PR fixes up a number of discrepancies found with tracking issues (some closed, some needed new ones, etc), and also cleans out all pre-1.8 deprecated APIs. The big beast here was dealing with `std::dynamic_lib`, and via many applications of a large hammer it's now out of the standard library.

8 years agoFix minor typos in doc.rust-lang.org/book
Andrew Cantino [Sat, 12 Mar 2016 20:35:34 +0000 (12:35 -0800)]
Fix minor typos in doc.rust-lang.org/book

8 years agostd: Clean out deprecated APIs
Alex Crichton [Mon, 7 Mar 2016 23:42:29 +0000 (15:42 -0800)]
std: Clean out deprecated APIs

Removes all unstable and deprecated APIs prior to the 1.8 release. All APIs that
are deprecated in the 1.8 release are sticking around for the rest of this
cycle.

Some notable changes are:

* The `dynamic_lib` module was moved into `rustc_back` as the compiler still
  relies on a few bits and pieces.
* The `DebugTuple` formatter now special-cases an empty struct name with only
  one field to append a trailing comma.

8 years agomk: Fix `make dist`
Alex Crichton [Sat, 12 Mar 2016 20:22:40 +0000 (12:22 -0800)]
mk: Fix `make dist`

With the movement of the erro-index-generator and rustbook, need to update the
rules in `make dist`.

8 years agoAuto merge of #32193 - eddyb:stage1-is-useful-mkay, r=eddyb
bors [Sat, 12 Mar 2016 17:37:19 +0000 (09:37 -0800)]
Auto merge of #32193 - eddyb:stage1-is-useful-mkay, r=eddyb

Statically link run-pass/command-before-exec so it passes not just whenever we happen to bootstrap perfectly.

8 years agoImplement --unpretty mir-cfg for graphviz output
Simonas Kazlauskas [Sat, 12 Mar 2016 17:07:00 +0000 (19:07 +0200)]
Implement --unpretty mir-cfg for graphviz output

Also change output for --unpretty mir to output function names in a prettier way.

8 years agoAuto merge of #32142 - mitaa:rdoc-maybe-inline-local, r=alexcrichton
bors [Sat, 12 Mar 2016 15:31:11 +0000 (07:31 -0800)]
Auto merge of #32142 - mitaa:rdoc-maybe-inline-local, r=alexcrichton

rustdoc: improve crate-local inlining

fixes #28537

r? @alexcrichton

8 years agoStatically link run-pass/command-before-exec so it passes not just whenever we happen...
Eduard Burtescu [Sat, 12 Mar 2016 12:36:35 +0000 (14:36 +0200)]
Statically link run-pass/command-before-exec so it passes not just whenever we happen to bootstrap perfectly.

8 years agoDon't allow values for codegen-units less than 1 (fixes #32191)
Manish Goregaokar [Sat, 12 Mar 2016 10:31:34 +0000 (16:01 +0530)]
Don't allow values for codegen-units less than 1 (fixes #32191)

8 years agostd: Add a tracking issue for Peekable::is_empty
Alex Crichton [Tue, 8 Mar 2016 00:35:09 +0000 (16:35 -0800)]
std: Add a tracking issue for Peekable::is_empty

The listed tracking issue was hooked up to the wrong location by accident.

8 years agocore: Make a new tracking issue for prelude traits
Alex Crichton [Tue, 8 Mar 2016 00:34:35 +0000 (16:34 -0800)]
core: Make a new tracking issue for prelude traits

The referenced issues here were both closed, so hook up a new issue which tracks
specifically the prelude traits being unstable.

8 years agocore: Mark Wrapping impls as stable
Alex Crichton [Tue, 8 Mar 2016 00:29:39 +0000 (16:29 -0800)]
core: Mark Wrapping impls as stable

These are all insta-stable anyway, so just properly tag them.

8 years agostd: Remove unstable from ReentrantMutex
Alex Crichton [Mon, 7 Mar 2016 23:02:43 +0000 (15:02 -0800)]
std: Remove unstable from ReentrantMutex

This isn't exported so it doesn't need a tag.

8 years agotest: Move some test outputs into $(TMPDIR)
Alex Crichton [Mon, 7 Mar 2016 22:39:37 +0000 (14:39 -0800)]
test: Move some test outputs into $(TMPDIR)

Don't want to pollute the source tree!

8 years agoalloc: Add unstable issue for FnBox APIs
Alex Crichton [Mon, 7 Mar 2016 22:38:36 +0000 (14:38 -0800)]
alloc: Add unstable issue for FnBox APIs

8 years agoAuto merge of #31925 - aturon:inherent-overlap, r=nikomatsakis
bors [Sat, 12 Mar 2016 04:57:39 +0000 (20:57 -0800)]
Auto merge of #31925 - aturon:inherent-overlap, r=nikomatsakis

Forbid items with the same name from appearing in overlapping inherent impl blocks

For example, the following is now correctly illegal:

```rust
struct Foo;

impl Foo {
    fn id() {}
}

impl Foo {
    fn id() {}
}
```

"Overlapping" here is determined the same way it is for traits (and in fact shares the same code path): roughly, there must be some way of substituting any generic types to unify the impls, such that none of the `where` clauses are provably unsatisfiable under such a unification.

Along the way, this PR also introduces an `ImplHeader` abstraction (the first commit) that makes it easier to work with impls abstractly (without caring whether they are trait or inherent impl blocks); see the first commit.

Closes #22889
r? @nikomatsakis

8 years agoFurther simplify Windows stdout/stderr
Oliver Middleton [Sat, 12 Mar 2016 04:18:17 +0000 (04:18 +0000)]
Further simplify Windows stdout/stderr

This makes it output as much valid UTF-8 as it can then return failure.

8 years agoRemoved integer suffixes in libsyntax crate
srinivasreddy [Thu, 10 Mar 2016 18:35:53 +0000 (00:05 +0530)]
Removed integer suffixes in libsyntax crate

8 years agoAuto merge of #32200 - Manishearth:rollup, r=Manishearth
bors [Sat, 12 Mar 2016 01:50:45 +0000 (17:50 -0800)]
Auto merge of #32200 - Manishearth:rollup, r=Manishearth

Rollup of 11 pull requests

- Successful merges: #32137, #32158, #32171, #32174, #32178, #32179, #32180, #32181, #32183, #32186, #32197
- Failed merges:

8 years agoRollup merge of #32197 - andoriyu:patch-1, r=alexcrichton
Manish Goregaokar [Fri, 11 Mar 2016 21:11:27 +0000 (02:41 +0530)]
Rollup merge of #32197 - andoriyu:patch-1, r=alexcrichton

Add FreeBSD amd64 snapshot

Snapshot itself: https://github.com/dhuseby/rust-manual-snapshots/pull/3

8 years agoRollup merge of #32186 - srinivasreddy:libcoretest, r=steveklabnik
Manish Goregaokar [Fri, 11 Mar 2016 21:11:27 +0000 (02:41 +0530)]
Rollup merge of #32186 - srinivasreddy:libcoretest, r=steveklabnik

cleanup int suffixes in libcoretest

8 years agoRollup merge of #32183 - bluss:doc-index, r=alexcrichton
Manish Goregaokar [Fri, 11 Mar 2016 21:11:27 +0000 (02:41 +0530)]
Rollup merge of #32183 - bluss:doc-index, r=alexcrichton

Clarify doc for slice slicing (Index impls)

Clarify doc for slice slicing (Index impls)

This is a follow up for PR #32099 and #32057

8 years agoRollup merge of #32181 - srinivasreddy:librustfront, r=steveklabnik
Manish Goregaokar [Fri, 11 Mar 2016 21:11:27 +0000 (02:41 +0530)]
Rollup merge of #32181 - srinivasreddy:librustfront, r=steveklabnik

removed suffixes for librustc_front

8 years agoRollup merge of #32180 - srinivasreddy:type_check_lib, r=steveklabnik
Manish Goregaokar [Fri, 11 Mar 2016 21:11:27 +0000 (02:41 +0530)]
Rollup merge of #32180 - srinivasreddy:type_check_lib, r=steveklabnik

removed integer suffixes in librustc_typeck crate

8 years agoComment `resolve_item_in_lexical_scope`
Jeffrey Seyfried [Fri, 11 Mar 2016 23:28:22 +0000 (23:28 +0000)]
Comment `resolve_item_in_lexical_scope`

8 years agoAuto merge of #32132 - arcnmx:cargobuild-std-target, r=alexcrichton
bors [Fri, 11 Mar 2016 23:25:03 +0000 (15:25 -0800)]
Auto merge of #32132 - arcnmx:cargobuild-std-target, r=alexcrichton

cover more linux targets in libstd cargobuild

libstd/build.rs checked the target name against `"unknown-linux"`... That doesn't necessarily apply to all Linux targets as some toolchains for embedded targets will change that `unknown` field to some vendor name. Some shifting around was needed since Android is also a Linux target.

r? @alexcrichton

8 years agoAdjust rustdoc test for new restriction
Aaron Turon [Fri, 11 Mar 2016 23:22:07 +0000 (15:22 -0800)]
Adjust rustdoc test for new restriction

8 years agoRollup merge of #32178 - naltun:patch-1, r=steveklabnik
Manish Goregaokar [Fri, 11 Mar 2016 21:11:26 +0000 (02:41 +0530)]
Rollup merge of #32178 - naltun:patch-1, r=steveklabnik

Update getting-started.md

In `rustc 1.7.0` the message that is displayed is now `Rust is ready to roll.`

8 years agoRollup merge of #32174 - cmbrandenburg:spell_fix, r=steveklabnik
Manish Goregaokar [Fri, 11 Mar 2016 21:11:26 +0000 (02:41 +0530)]
Rollup merge of #32174 - cmbrandenburg:spell_fix, r=steveklabnik

Spell fixes for std::ffi doc comments

8 years agoRollup merge of #32171 - frewsxcv:compiletest, r=alexcrichton
Manish Goregaokar [Fri, 11 Mar 2016 21:11:26 +0000 (02:41 +0530)]
Rollup merge of #32171 - frewsxcv:compiletest, r=alexcrichton

Fix a couple compiletest nits.

8 years agoRollup merge of #32158 - seanmonstar:dead-associated-type, r=alexcrichton
Manish Goregaokar [Fri, 11 Mar 2016 21:11:26 +0000 (02:41 +0530)]
Rollup merge of #32158 - seanmonstar:dead-associated-type, r=alexcrichton

lint: mark associated types as live for the dead_code pass

Associated types of trait impls were being excluded from the live list. So types that only appeared in trait impls were being marked as dead code.

8 years agoRollup merge of #32137 - nathankleyn:improve-docs-for-binaryheap, r=steveklabnik
Manish Goregaokar [Fri, 11 Mar 2016 21:11:26 +0000 (02:41 +0530)]
Rollup merge of #32137 - nathankleyn:improve-docs-for-binaryheap, r=steveklabnik

Add missing documentation examples for BinaryHeap.

As part of the ongoing effort to document all methods with examples,
this commit adds the missing examples for the `BinaryHeap` collection
type.

This is part of issue #29348.

r? @steveklabnik