]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoRollup merge of #36160 - Aatch:normalize-closure-sig, r=eddyb
Jonathan Turner [Fri, 2 Sep 2016 22:28:51 +0000 (15:28 -0700)]
Rollup merge of #36160 - Aatch:normalize-closure-sig, r=eddyb

Normalize the function signature of closures

Previously we didn't normalize the function signatures used for
closures. This didn't cause a problem in most cases, but caused an ICE
in during MIR type checking.

Fixes #36139

r? @eddyb

7 years agoRollup merge of #36099 - skade:better-try-documentation, r=steveklabnik
Jonathan Turner [Fri, 2 Sep 2016 22:28:51 +0000 (15:28 -0700)]
Rollup merge of #36099 - skade:better-try-documentation, r=steveklabnik

Document try!'s error conversion behaviour

try!'s documentation currently doesn't document the error conversion behaviour of the macro. This patch extends the documentation.

Open questions:
* is it worthwhile to have seperate examples with and without wrapping behaviour? It's not immediately obvious that From<T> for T is always defined. Though this is necessary for the macro to work in any case, is this the place to expect that knowledge.

7 years agoRollup merge of #35793 - matthew-piziak:add-rhs-example, r=steveklabnik
Jonathan Turner [Fri, 2 Sep 2016 22:28:50 +0000 (15:28 -0700)]
Rollup merge of #35793 - matthew-piziak:add-rhs-example, r=steveklabnik

demonstrate `RHS != Self` use cases for `Add` and `Sub`

7 years agoRollup merge of #35754 - QuietMisdreavus:must-use-reference, r=Manishearth
Jonathan Turner [Fri, 2 Sep 2016 22:28:50 +0000 (15:28 -0700)]
Rollup merge of #35754 - QuietMisdreavus:must-use-reference, r=Manishearth

Add `must_use` to the Reference

I'm a bit uncertain about the exact phrasing, but having it mentioned at all is probably better than before.

7 years agoUpdate compiler error E0558 to use new error format
Abhishek Kumar [Thu, 1 Sep 2016 20:51:53 +0000 (02:21 +0530)]
Update compiler error E0558 to use new error format

Fixes #36196 part of #35233

7 years agoUpdate E0496 to new format
Andrea Corradi [Sun, 28 Aug 2016 10:57:38 +0000 (12:57 +0200)]
Update E0496 to new format

7 years agorustc: Implement custom derive (macros 1.1)
Alex Crichton [Tue, 23 Aug 2016 00:07:11 +0000 (17:07 -0700)]
rustc: Implement custom derive (macros 1.1)

This commit is an implementation of [RFC 1681] which adds support to the
compiler for first-class user-define custom `#[derive]` modes with a far more
stable API than plugins have today.

[RFC 1681]: https://github.com/rust-lang/rfcs/blob/master/text/1681-macros-1.1.md

The main features added by this commit are:

* A new `rustc-macro` crate-type. This crate type represents one which will
  provide custom `derive` implementations and perhaps eventually flower into the
  implementation of macros 2.0 as well.

* A new `rustc_macro` crate in the standard distribution. This crate will
  provide the runtime interface between macro crates and the compiler. The API
  here is particularly conservative right now but has quite a bit of room to
  expand into any manner of APIs required by macro authors.

* The ability to load new derive modes through the `#[macro_use]` annotations on
  other crates.

All support added here is gated behind the `rustc_macro` feature gate, both for
the library support (the `rustc_macro` crate) as well as the language features.

There are a few minor differences from the implementation outlined in the RFC,
such as the `rustc_macro` crate being available as a dylib and all symbols are
`dlsym`'d directly instead of having a shim compiled. These should only affect
the implementation, however, not the public interface.

This commit also ended up touching a lot of code related to `#[derive]`, making
a few notable changes:

* Recognized derive attributes are no longer desugared to `derive_Foo`. Wasn't
  sure how to keep this behavior and *not* expose it to custom derive.

* Derive attributes no longer have access to unstable features by default, they
  have to opt in on a granular level.

* The `derive(Copy,Clone)` optimization is now done through another "obscure
  attribute" which is just intended to ferry along in the compiler that such an
  optimization is possible. The `derive(PartialEq,Eq)` optimization was also
  updated to do something similar.

---

One part of this PR which needs to be improved before stabilizing are the errors
and exact interfaces here. The error messages are relatively poor quality and
there are surprising spects of this such as `#[derive(PartialEq, Eq, MyTrait)]`
not working by default. The custom attributes added by the compiler end up
becoming unstable again when going through a custom impl.

Hopefully though this is enough to start allowing experimentation on crates.io!

syntax-[breaking-change]

7 years agoUpdate supported Windows versions to match Getting Started page.
johnthagen [Fri, 2 Sep 2016 19:32:13 +0000 (15:32 -0400)]
Update supported Windows versions to match Getting Started page.

7 years agoMoved test on E0493 from compile-fail to ui.
Federico Ravasio [Fri, 2 Sep 2016 17:55:14 +0000 (19:55 +0200)]
Moved test on E0493 from compile-fail to ui.

7 years agoTransition Travis CI to use rustbuild.
Corey Farwell [Wed, 31 Aug 2016 23:10:24 +0000 (19:10 -0400)]
Transition Travis CI to use rustbuild.

7 years agoAuto merge of #36084 - apasel422:counter, r=bluss
bors [Fri, 2 Sep 2016 16:13:00 +0000 (09:13 -0700)]
Auto merge of #36084 - apasel422:counter, r=bluss

Address FIXME in libcollectionstest/btree/set.rs

7 years agoAuto merge of #36024 - japaric:mips64, r=alexcrichton
bors [Fri, 2 Sep 2016 10:01:48 +0000 (03:01 -0700)]
Auto merge of #36024 - japaric:mips64, r=alexcrichton

add mips64-gnu and mips64el-gnu targets

With this commit one can build no_core (and probably no_std as well)
Rust programs for these targets. It's not yet possible to cross compile
std for these targets because rust-lang/libc doesn't know about the
mips64 architecture.

These targets have been tested by cross compiling the "smallest hello"
program (see code below) and then running it under QEMU.

``` rust

extern {
    fn puts(_: *const u8);
}

fn start(_: isize, _: *const *const u8) -> isize {
    unsafe {
        let msg = b"Hello, world!\0";
        puts(msg as *const _ as *const u8);
    }
    0
}

trait Copy {}

trait Sized {}
```

cc #36015
r? @alexcrichton
cc @brson

The cabi stuff is likely wrong. I just copied cabi_mips source and changed some `4`s to `8`s and `32`s to `64`s. It was enough to get libc's `puts` to work but I'd like someone familiar with this module to check it.

7 years agoE0493: showing a label where the destructor is defined.
Federico Ravasio [Fri, 2 Sep 2016 09:44:46 +0000 (11:44 +0200)]
E0493: showing a label where the destructor is defined.

7 years agoRemove --{enable|disable}-orbit from configure.
Ahmed Charles [Sat, 27 Aug 2016 08:52:32 +0000 (01:52 -0700)]
Remove --{enable|disable}-orbit from configure.

Fixes #35956.

7 years agoAuto merge of #35915 - llogiq:rfc-1623, r=nikomatsakis
bors [Fri, 2 Sep 2016 05:24:36 +0000 (22:24 -0700)]
Auto merge of #35915 - llogiq:rfc-1623, r=nikomatsakis

implementing RFC 1623. This fixes #35897.

This is a work in progress. In particular, I want to add more tests,
especially the compile-fail test is very bare-bones.

7 years agoFixed E0529's label and unit test
Eugene R Gonzalez [Fri, 2 Sep 2016 02:35:25 +0000 (22:35 -0400)]
Fixed E0529's label and unit test

7 years agoAuto merge of #35894 - jseyfried:new_import_semantics, r=nrc
bors [Fri, 2 Sep 2016 02:03:27 +0000 (19:03 -0700)]
Auto merge of #35894 - jseyfried:new_import_semantics, r=nrc

Implement RFC 1560 behind `#![feature(item_like_imports)]`

This implements https://github.com/rust-lang/rfcs/pull/1560 (cc #35120) behind the `item_like_imports` feature gate.

The [RFC text](https://github.com/rust-lang/rfcs/blob/master/text/1560-name-resolution.md#changes-to-name-resolution-rules) describes the changes to name resolution enabled by `#![feature(item_like_imports)` in detail. To summarize,
 - Items and named imports shadow glob imports.
 - Multiple globs can import the same name if the name is unused or the imports are shadowed.
 - Multiple globs can import the same name if the imports are of the same item (following re-exports).
  - The visibility of such a name is the maximum visibility of the imports.
  - Equivalently, adding a glob import will never reduce the visibility of a name, nor will removing one increase it.
 - Non-prelude private imports can be used wherever we currently allow private items to be used.
  - Prelude-imported names are unaffected, i.e. they continue to be usable only in lexical scopes.
 - Globs import all visible names, not just public names.
  - Equivalently, glob importing from an ancestor module imports all of the ancestor's names, and glob importing from other modules is unchanged.

r? @nrc

7 years agoAddress comments.
Jeffrey Seyfried [Mon, 29 Aug 2016 05:29:01 +0000 (05:29 +0000)]
Address comments.

7 years agotest: Add a min-llvm-version directive
Alex Crichton [Thu, 1 Sep 2016 17:52:44 +0000 (10:52 -0700)]
test: Add a min-llvm-version directive

We've got tests which require a particular version of LLVM to run as they're
testing bug fixes. Our build system, however, supports multiple LLVM versions,
so we can't run these tests on all LLVM versions.

This adds a new `min-llvm-version` directive for tests so they can opt out of
being run on older versions of LLVM. This then namely applies that logic to the
`issue-36023.rs` test case and...

Closes #36138

7 years agoFixed E0528 label and unit test
Eugene R Gonzalez [Thu, 1 Sep 2016 22:46:30 +0000 (18:46 -0400)]
Fixed E0528 label and unit test

7 years agoAvoid cascading name resolution errors caused by an ambiguous module.
Jeffrey Seyfried [Mon, 22 Aug 2016 07:12:13 +0000 (07:12 +0000)]
Avoid cascading name resolution errors caused by an ambiguous module.

7 years agoAvoid reporting multiple ambiguity errors for a single use of a name.
Jeffrey Seyfried [Mon, 22 Aug 2016 08:30:07 +0000 (08:30 +0000)]
Avoid reporting multiple ambiguity errors for a single use of a name.

7 years agoitem_like_imports: Allow unused ambiguous glob imports.
Jeffrey Seyfried [Sat, 20 Aug 2016 05:23:19 +0000 (05:23 +0000)]
item_like_imports: Allow unused ambiguous glob imports.

7 years agoitem_like_imports: Allow multiple glob imports of the same item.
Jeffrey Seyfried [Sat, 20 Aug 2016 03:28:35 +0000 (03:28 +0000)]
item_like_imports: Allow multiple glob imports of the same item.

7 years agoitem_like_imports: Make all visible items glob importable.
Jeffrey Seyfried [Sat, 20 Aug 2016 00:33:06 +0000 (00:33 +0000)]
item_like_imports: Make all visible items glob importable.

7 years agoitem_like_imports: Allow glob imports with a given visibility
Jeffrey Seyfried [Sat, 20 Aug 2016 00:23:32 +0000 (00:23 +0000)]
item_like_imports: Allow glob imports with a given visibility
to reexport some (but not all) names with less visibility.

7 years agoitem_like_imports: Allow single imports with a given visibility
Jeffrey Seyfried [Fri, 19 Aug 2016 22:52:26 +0000 (22:52 +0000)]
item_like_imports: Allow single imports with a given visibility
to reexport some (but not all) namespaces with less visibility.

7 years agoitem_like_imports: Allow glob imports to be shadowed by items and single imports.
Jeffrey Seyfried [Thu, 18 Aug 2016 20:33:24 +0000 (20:33 +0000)]
item_like_imports: Allow glob imports to be shadowed by items and single imports.

7 years agoitem_like_imports: Treat private imports like private items.
Jeffrey Seyfried [Sat, 20 Aug 2016 00:57:19 +0000 (00:57 +0000)]
item_like_imports: Treat private imports like private items.

7 years agoAdd `item_like_imports` feature.
Jeffrey Seyfried [Tue, 16 Aug 2016 06:03:36 +0000 (06:03 +0000)]
Add `item_like_imports` feature.

7 years agoAdd field `dummy_binding` to `Resolver`.
Jeffrey Seyfried [Mon, 22 Aug 2016 04:05:49 +0000 (04:05 +0000)]
Add field `dummy_binding` to `Resolver`.

7 years agoRefactor away `resolver.current_vis` and add `module.normal_ancestor_id`.
Jeffrey Seyfried [Mon, 22 Aug 2016 00:24:11 +0000 (00:24 +0000)]
Refactor away `resolver.current_vis` and add `module.normal_ancestor_id`.

7 years agoImprove diagnostics and remove dead code.
Jeffrey Seyfried [Sat, 20 Aug 2016 07:59:47 +0000 (07:59 +0000)]
Improve diagnostics and remove dead code.

7 years agoRefactor `binding.def()` to return a `Def` instead of an `Option<Def>`.
Jeffrey Seyfried [Sat, 20 Aug 2016 07:26:26 +0000 (07:26 +0000)]
Refactor `binding.def()` to return a `Def` instead of an `Option<Def>`.

7 years agoRename `new_binding` -> `binding`.
Jeffrey Seyfried [Sat, 20 Aug 2016 07:22:32 +0000 (07:22 +0000)]
Rename `new_binding` -> `binding`.

7 years agoRefactor away `binding.is_pseudo_public()`.
Jeffrey Seyfried [Fri, 19 Aug 2016 21:46:28 +0000 (21:46 +0000)]
Refactor away `binding.is_pseudo_public()`.

7 years agoFix test `compile-fail/task-rng-isnt-sendable.rs`.
Jeffrey Seyfried [Mon, 22 Aug 2016 19:20:08 +0000 (19:20 +0000)]
Fix test `compile-fail/task-rng-isnt-sendable.rs`.

7 years agoAuto merge of #35761 - nikomatsakis:faster-trans-fulfill-obligation, r=eddyb
bors [Thu, 1 Sep 2016 22:25:58 +0000 (15:25 -0700)]
Auto merge of #35761 - nikomatsakis:faster-trans-fulfill-obligation, r=eddyb

Cache projections in trans

This introduces a cache for the results of projection and normalization in trans. This is in addition to the existing cache that is per-inference-context. Trans is an easy place to put the cache because we are guaranteed not to have type parameters and also we don't expect any failures or inference variables, so there is no need to cache or follow-up on obligations that come along with.  (As evidenced by the fact that this particular code would panic if any error occurred.)

That said, I am not sure this is 100% the best place for it; I sort of wanted a cache like we have in the fulfillment context for global names; but that cache only triggers when all subsequent obligations are satisfied, and since projections don't have an entry in the obligation jungle there is no easy place to put it. I considered caching both the result and obligations globally, but haven't really tried implementing it. It might be a good next step.

Regardless, this cache seems to have no real effect on bootstrap time (maybe a slight improvement), but on [the futures.rs test case I was looking at](https://github.com/rust-lang-nursery/rustc-benchmarks/pull/6), it improves performance quite a bit:

| phase | before | after |
| ----- | ------ | ----- |
| collection | 0.79s | 0.46s |
| translation | 6.8s | 3.2s |
| total | 11.92s | 7.15s |

r? @arielb1

7 years agoAuto merge of #34494 - CensoredUsername:allow_sysV64_abi, r=nagisa
bors [Thu, 1 Sep 2016 18:56:51 +0000 (11:56 -0700)]
Auto merge of #34494 - CensoredUsername:allow_sysV64_abi, r=nagisa

Allow specification of the system V AMD64 ABI constraint.

This can be specified using `extern "sysV64" fn` on all platforms.

This ABI is used as the C ABI on unix platforms, but can only be specified there using extern "C". It was impossible to specify on other platforms. Meanwhile the win64 ABI, which was the extern "C" ABI on the windows platform could be specified on other platforms using extern "win64".

This pull request adds the the "sysV64" ABI constraint which exposes this calling convention on platforms where it is not the C ABI.

7 years agoDocument try!'s error conversion behaviour
Florian Gilcher [Mon, 29 Aug 2016 18:05:47 +0000 (20:05 +0200)]
Document try!'s error conversion behaviour

7 years agoconfigure: check if any of the arguments contain --help
Mohit Agarwal [Thu, 1 Sep 2016 13:19:35 +0000 (18:49 +0530)]
configure: check if any of the arguments contain --help

Currently it checks only the first argument.

Fixes #31216

7 years agoAuto merge of #34982 - arielb1:bad-tuples-and-objects, r=nikomatsakis
bors [Thu, 1 Sep 2016 13:05:04 +0000 (06:05 -0700)]
Auto merge of #34982 - arielb1:bad-tuples-and-objects, r=nikomatsakis

Turn the RFC1592 warnings into hard errors

The warnings have already reached stable, and I want to improve the trait error reporting code.

Turning warnings into errors, this is obviously a [breaking-change].

r? @nikomatsakis

cc @rust-lang/compiler

7 years agoturn the RFC1592 warnings into hard errors
Ariel Ben-Yehuda [Thu, 1 Sep 2016 10:34:56 +0000 (13:34 +0300)]
turn the RFC1592 warnings into hard errors

The warnings have already reached stable

The test rfc1592_deprecated is covered by `bad_sized` and
`unsized6`.

Fixes #33242
Fixes #33243

7 years agoAuto merge of #35755 - SimonSapin:char_convert, r=alexcrichton
bors [Thu, 1 Sep 2016 09:53:28 +0000 (02:53 -0700)]
Auto merge of #35755 - SimonSapin:char_convert, r=alexcrichton

Implement std::convert traits for char

This is motivated by avoiding the `as` operator, which sometimes silently truncates, and instead use conversions that are explicitly lossless and infallible.

I’m less certain that `From<u8> for char` should be implemented: while it matches an existing behavior of `as`, it’s not necessarily the right thing to use for non-ASCII bytes. It effectively decodes bytes as ISO/IEC 8859-1 (since Unicode designed its first 256 code points to be compatible with that encoding), but that is not apparent in the API name.

7 years agothe win64 calling convention is also used on x86_64-pc-windows-gnu, so ignore windows...
CensoredUsername [Thu, 1 Sep 2016 08:35:37 +0000 (10:35 +0200)]
the win64 calling convention is also used on x86_64-pc-windows-gnu, so ignore windows entirely instead of just msvc

7 years agoreview comments
Nick Cameron [Tue, 30 Aug 2016 04:40:44 +0000 (16:40 +1200)]
review comments

7 years agosave-analysis: add parent info to api dumps
Nick Cameron [Tue, 30 Aug 2016 04:00:48 +0000 (16:00 +1200)]
save-analysis: add parent info to api dumps

The parent id is used for constructing rustdoc URLs by clients

7 years agoThread visibility info through save-analysis and filter save-analysis-api on it.
Nick Cameron [Mon, 29 Aug 2016 04:46:55 +0000 (16:46 +1200)]
Thread visibility info through save-analysis and filter save-analysis-api on it.

7 years agoJsonApiDumper
Nick Cameron [Mon, 29 Aug 2016 01:29:12 +0000 (13:29 +1200)]
JsonApiDumper

7 years agosave-analsysis: add save-analysis-api CLI flag
Nick Cameron [Mon, 29 Aug 2016 00:24:55 +0000 (12:24 +1200)]
save-analsysis: add save-analysis-api CLI flag

7 years agoremove `normalize_infer_ctxt` constructor
Niko Matsakis [Thu, 1 Sep 2016 02:06:01 +0000 (22:06 -0400)]
remove `normalize_infer_ctxt` constructor

7 years agoUpdate error message for lifetime of borrowed values
Jonathan Turner [Thu, 1 Sep 2016 00:48:26 +0000 (17:48 -0700)]
Update error message for lifetime of borrowed values

7 years agoAuto merge of #36177 - jonathandturner:rollup, r=jonathandturner
bors [Thu, 1 Sep 2016 00:40:39 +0000 (17:40 -0700)]
Auto merge of #36177 - jonathandturner:rollup, r=jonathandturner

Rollup of 13 pull requests

- Successful merges: #35773, #35786, #35911, #35927, #36083, #36087, #36098, #36114, #36118, #36123, #36129, #36152, #36169
- Failed merges:

7 years agoSpecial case a few colors for Windows
Jonathan Turner [Wed, 31 Aug 2016 22:19:43 +0000 (15:19 -0700)]
Special case a few colors for Windows

7 years agoreplace `../` with `../../std/` to support `core` docs
Matthew Piziak [Wed, 31 Aug 2016 22:17:44 +0000 (18:17 -0400)]
replace `../` with `../../std/` to support `core` docs

7 years agocache projections in trans
Niko Matsakis [Thu, 11 Aug 2016 19:46:54 +0000 (15:46 -0400)]
cache projections in trans

7 years agoFix optimization regressions for operations on [x; n]-initialized arrays.
Eduard Burtescu [Wed, 31 Aug 2016 21:27:03 +0000 (00:27 +0300)]
Fix optimization regressions for operations on [x; n]-initialized arrays.

7 years agoadd cache to shared context for proj
Niko Matsakis [Tue, 9 Aug 2016 00:51:09 +0000 (20:51 -0400)]
add cache to shared context for proj

7 years agogive `apply_param_substs` a `SharedCrateContext`
Niko Matsakis [Tue, 9 Aug 2016 00:50:19 +0000 (20:50 -0400)]
give `apply_param_substs` a `SharedCrateContext`

I plan to put a cache on the shared context, for now at least.

7 years agoRollup merge of #36169 - wdv4758h:librustc_plugin_docs, r=nikomatsakis
Jonathan Turner [Wed, 31 Aug 2016 20:53:36 +0000 (13:53 -0700)]
Rollup merge of #36169 - wdv4758h:librustc_plugin_docs, r=nikomatsakis

Change 'rustc::plugin' to 'rustc_plugin' in doc comment

It looks like there is a missing one.

7 years agoRollup merge of #36152 - dns2utf8:man_page_date, r=nikomatsakis
Jonathan Turner [Wed, 31 Aug 2016 20:53:35 +0000 (13:53 -0700)]
Rollup merge of #36152 - dns2utf8:man_page_date, r=nikomatsakis

Update man pages

Until I finish #35438

7 years agoRollup merge of #36129 - eddyb:signal-exit-status, r=alexcrichton
Jonathan Turner [Wed, 31 Aug 2016 20:53:35 +0000 (13:53 -0700)]
Rollup merge of #36129 - eddyb:signal-exit-status, r=alexcrichton

Fix run-pass/signal-exit-status to not trigger UB by writing to NULL.

`run-pass/signal-exit-status` has had UB (NULL dereference) since it was introduced in #10109.
Fixes the test failure found by @camlorn while running under Windows Subsystem for Linux.

7 years agoRollup merge of #36123 - nagisa:unignore-json-tests, r=alexcrichton
Jonathan Turner [Wed, 31 Aug 2016 20:53:35 +0000 (13:53 -0700)]
Rollup merge of #36123 - nagisa:unignore-json-tests, r=alexcrichton

Unignore the json tests on 32-bit platforms

cc #14064

r? @alexcrichton

7 years agoRollup merge of #36118 - nagisa:windows-has-no-sprint-again, r=brson
Jonathan Turner [Wed, 31 Aug 2016 20:53:35 +0000 (13:53 -0700)]
Rollup merge of #36118 - nagisa:windows-has-no-sprint-again, r=brson

Fix the test_variadic_ptr fn on printf-less sys

Fixes #36076

7 years agoRollup merge of #36114 - zjhmale:fix-E0393, r=jonathandturner
Jonathan Turner [Wed, 31 Aug 2016 20:53:34 +0000 (13:53 -0700)]
Rollup merge of #36114 - zjhmale:fix-E0393, r=jonathandturner

Update E0393 to new error format

Fixes #35632.
Part of #35233.

r? @jonathandturner

and a wired thing is that if i add another label

```rust
.span_label(span, &format!("missing reference to `{}`", def.name))
.span_label(span, &format!("because of the default `Self` reference, type parameters must be specified on object types"))
```

and add a new note in the test case like

```rust
trait A<T=Self> {}

fn together_we_will_rule_the_galaxy(son: &A) {}
//~^ ERROR E0393
//~| NOTE missing reference to `T`
//~| NOTE because of the default `Self` reference, type parameters must be specified on object types
```

it will complain that

```
running 1 test
test [compile-fail] compile-fail/E0393.rs ... FAILED

failures:

---- [compile-fail] compile-fail/E0393.rs stdout ----

error: /Users/zjh/Documents/rustspace/rust/src/test/compile-fail/E0393.rs:13: unexpected "error": '13:43: 13:44: the type parameter `T` must be explicitly specified [E0393]'

unexpected errors (from JSON output): [
    Error {
        line_num: 13,
        kind: Some(
            Error
        ),
        msg: "13:43: 13:44: the type parameter `T` must be explicitly specified [E0393]"
    }
]
```

it is a little bit confusing and through the blog post we can use `//~^` and `//~|` to support multiple notes, @jonathandturner am i missing something here?

7 years agoRollup merge of #36098 - king6cong:master, r=alexcrichton
Jonathan Turner [Wed, 31 Aug 2016 20:53:34 +0000 (13:53 -0700)]
Rollup merge of #36098 - king6cong:master, r=alexcrichton

fix git submodule status check

None

7 years agoRollup merge of #36087 - apasel422:issue-28324, r=alexcrichton
Jonathan Turner [Wed, 31 Aug 2016 20:53:34 +0000 (13:53 -0700)]
Rollup merge of #36087 - apasel422:issue-28324, r=alexcrichton

Add test for #28324

Closes #28324

7 years agoRollup merge of #36083 - GuillaumeGomez:missing_convert_urls, r=steveklabnik
Jonathan Turner [Wed, 31 Aug 2016 20:53:34 +0000 (13:53 -0700)]
Rollup merge of #36083 - GuillaumeGomez:missing_convert_urls, r=steveklabnik

Add missing urls into convert module

r? @steveklabnik

7 years agoRollup merge of #35927 - matthew-piziak:bitandassign-example, r=GuillaumeGomez
Jonathan Turner [Wed, 31 Aug 2016 20:53:33 +0000 (13:53 -0700)]
Rollup merge of #35927 - matthew-piziak:bitandassign-example, r=GuillaumeGomez

replace `BitAndAssign` example with something more evocative

This is the augmented-assignment version of PR #35809.

r? @GuillaumeGomez

7 years agoRollup merge of #35911 - tbu-:pr_io_errorkind_traits, r=alexcrichton
Jonathan Turner [Wed, 31 Aug 2016 20:53:33 +0000 (13:53 -0700)]
Rollup merge of #35911 - tbu-:pr_io_errorkind_traits, r=alexcrichton

Implement more traits for `std::io::ErrorKind`

This makes it possible to use it as key in various maps.

7 years agoRollup merge of #35786 - GuillaumeGomez:paths_doc, r=steveklabnik
Jonathan Turner [Wed, 31 Aug 2016 20:53:33 +0000 (13:53 -0700)]
Rollup merge of #35786 - GuillaumeGomez:paths_doc, r=steveklabnik

Improve Path and PathBuf docs

r? @steveklabnik

7 years agoRollup merge of #35773 - EugeneGonzalez:master, r=jonathandturner
Jonathan Turner [Wed, 31 Aug 2016 20:53:33 +0000 (13:53 -0700)]
Rollup merge of #35773 - EugeneGonzalez:master, r=jonathandturner

Change E0259 to the new error format

Fixes #35514 as part of #35233.

Sorry about creating a new PR I was having a lot of troubles squashing the commit because I didn't properly branch the new feature.

r? @GuillaumeGomez

7 years agoAuto merge of #35718 - michaelwoerister:incr-comp-dir-locking, r=alexcrichton
bors [Wed, 31 Aug 2016 19:56:15 +0000 (12:56 -0700)]
Auto merge of #35718 - michaelwoerister:incr-comp-dir-locking, r=alexcrichton

Implement synchronization scheme for incr. comp. directory

This PR implements a copy-on-write-based synchronization scheme for the incremental compilation cache directory. For technical details, see the documentation at the beginning of `rustc_incremental/persist/fs.rs`.

The PR contains unit tests for some functions but for testing whether the scheme properly handles races, a more elaborate test setup would be needed. It would probably involve a small tool that allows to manipulate the incremental compilation directory in a controlled way and then letting a compiler instance run against directories in different states. I don't know if it's worth the trouble of adding another test category to `compiletest`, but I'd be happy to do so.

Fixes #32754
Fixes #34957

7 years agosimplify DepNode for trait selection
Niko Matsakis [Mon, 8 Aug 2016 13:40:12 +0000 (09:40 -0400)]
simplify DepNode for trait selection

7 years agoremove unneccessary uses of `drain_fulfillment_cx`
Niko Matsakis [Sun, 7 Aug 2016 10:41:17 +0000 (06:41 -0400)]
remove unneccessary uses of `drain_fulfillment_cx`

There were various places that we are invoking `drain_fulfillment_cx`
with a "result" of `()`. This is kind of pointless, since it amounts to
just a call to `select_all_or_error` along with some extra overhead.

7 years agoremove unused normalize field
Niko Matsakis [Fri, 5 Aug 2016 21:18:25 +0000 (17:18 -0400)]
remove unused normalize field

7 years agoUpdated E0493 to new format.
Federico Ravasio [Sun, 28 Aug 2016 10:51:00 +0000 (12:51 +0200)]
Updated E0493 to new format.

7 years agoAuto merge of #36166 - jonathandturner:rollup, r=jonathandturner
bors [Wed, 31 Aug 2016 16:38:36 +0000 (09:38 -0700)]
Auto merge of #36166 - jonathandturner:rollup, r=jonathandturner

Rollup of 16 pull requests

- Successful merges: #35758, #35926, #36050, #36079, #36085, #36089, #36101, #36130, #36134, #36135, #36136, #36140, #36141, #36147, #36148, #36165
- Failed merges:

7 years agoImprove Path and PathBuf docs
Guillaume Gomez [Thu, 18 Aug 2016 15:50:28 +0000 (17:50 +0200)]
Improve Path and PathBuf docs

7 years agoChange 'rustc::plugin' to 'rustc_plugin' in doc comment
Chiu-Hsiang Hsu [Wed, 31 Aug 2016 14:45:05 +0000 (22:45 +0800)]
Change 'rustc::plugin' to 'rustc_plugin' in doc comment

7 years agoAdd missing urls into convert module
Guillaume Gomez [Sun, 28 Aug 2016 22:07:03 +0000 (00:07 +0200)]
Add missing urls into convert module

7 years agoUpdate man pages
Stefan Schindler [Tue, 30 Aug 2016 23:04:56 +0000 (01:04 +0200)]
Update man pages

7 years agoAdd a tracking issue to the feature gate of the sysv64 ABI
CensoredUsername [Wed, 31 Aug 2016 13:52:10 +0000 (15:52 +0200)]
Add a tracking issue to the feature gate of the sysv64 ABI

7 years agoRollup merge of #36165 - fanzier:fix-typo, r=GuillaumeGomez
Jonathan Turner [Wed, 31 Aug 2016 13:29:12 +0000 (06:29 -0700)]
Rollup merge of #36165 - fanzier:fix-typo, r=GuillaumeGomez

Fix typo in PartialOrd docs

The inline code was formatted incorrectly because of the backtick.

7 years agoRollup merge of #36148 - birryree:E0194_bonus_format, r=jonathandturner
Jonathan Turner [Wed, 31 Aug 2016 13:29:11 +0000 (06:29 -0700)]
Rollup merge of #36148 - birryree:E0194_bonus_format, r=jonathandturner

Bonus format for E0194

Bonus fix for #35280. Part of #35233. Fixes #36057. Adding expanded notes/context for what trait a parameter shadows as part of E0194 error messages.

Errors for E0194 now look like this:

```
$> ./build/x86_64-apple-darwin/stage1/bin/rustc src/test/compile-fail/E0194.rs
error[E0194]: type parameter `T` shadows another type parameter of the same name
  --> src/test/compile-fail/E0194.rs:13:26
   |
11 | trait Foo<T> { //~ NOTE first `T` declared here
   |           - first `T` declared here
12 |     fn do_something(&self) -> T;
13 |     fn do_something_else<T: Clone>(&self, bar: T);
   |                          ^ shadows another type parameter

error: aborting due to previous error
```

r? @jonathandturner

7 years agoRollup merge of #36147 - mikhail-m1:master, r=jonathandturner
Jonathan Turner [Wed, 31 Aug 2016 13:29:11 +0000 (06:29 -0700)]
Rollup merge of #36147 - mikhail-m1:master, r=jonathandturner

update E0265 to new format

Fixes #35309 as part of #35233.
I've describe partially bonus achieve in #35309

r? @jonathandturner

7 years agoRollup merge of #36141 - GuillaumeGomez:err_codes, r=jonathandturner
Jonathan Turner [Wed, 31 Aug 2016 13:29:11 +0000 (06:29 -0700)]
Rollup merge of #36141 - GuillaumeGomez:err_codes, r=jonathandturner

Err codes

r? @jonathandturner

7 years agoRollup merge of #36140 - cristicbz:test-14875, r=nagisa
Jonathan Turner [Wed, 31 Aug 2016 13:29:11 +0000 (06:29 -0700)]
Rollup merge of #36140 - cristicbz:test-14875, r=nagisa

Add test for #14875

You can check this out in the playground https://is.gd/oVKC2T . It will fail on stable, but pass on nightly as @nagisa suggested on the issue.

Fixes #14875

7 years agoRollup merge of #36136 - athulappadan:E0034, r=jonathandturner
Jonathan Turner [Wed, 31 Aug 2016 13:29:10 +0000 (06:29 -0700)]
Rollup merge of #36136 - athulappadan:E0034, r=jonathandturner

Update compiler error 0034 to use new format.

Part of #35233
Addresses #35205

r? @jonathandturner

7 years agoRollup merge of #36135 - 0xmohit:pr/error-code-E0520, r=jonathandturner
Jonathan Turner [Wed, 31 Aug 2016 13:29:10 +0000 (06:29 -0700)]
Rollup merge of #36135 - 0xmohit:pr/error-code-E0520, r=jonathandturner

Update E0520 to new error format

Fixes #36112.
Part of #35233.

r? @jonathandturner

7 years agoRollup merge of #36134 - tshepang:more-simple, r=steveklabnik
Jonathan Turner [Wed, 31 Aug 2016 13:29:10 +0000 (06:29 -0700)]
Rollup merge of #36134 - tshepang:more-simple, r=steveklabnik

doc: make TcpListener example more simple

7 years agoRollup merge of #36130 - frewsxcv:patch-32, r=steveklabnik
Jonathan Turner [Wed, 31 Aug 2016 13:29:10 +0000 (06:29 -0700)]
Rollup merge of #36130 - frewsxcv:patch-32, r=steveklabnik

rustbook chapters/sections should be an ordered list.

7 years agoRollup merge of #36101 - frewsxcv:debug-path-components, r=alexcrichton
Jonathan Turner [Wed, 31 Aug 2016 13:29:09 +0000 (06:29 -0700)]
Rollup merge of #36101 - frewsxcv:debug-path-components, r=alexcrichton

Implement `Debug` for `std::path::{Components,Iter}`.

None

7 years agoRollup merge of #36089 - apasel422:issue-24204, r=alexcrichton
Jonathan Turner [Wed, 31 Aug 2016 13:29:09 +0000 (06:29 -0700)]
Rollup merge of #36089 - apasel422:issue-24204, r=alexcrichton

Add test for #24204

Closes #24204

7 years agoRollup merge of #36085 - apasel422:issue-34053, r=brson
Jonathan Turner [Wed, 31 Aug 2016 13:29:09 +0000 (06:29 -0700)]
Rollup merge of #36085 - apasel422:issue-34053, r=brson

Add test for #34053

Closes #34053

7 years agoRollup merge of #36079 - acrrd:new_format_E0318, r=GuillaumeGomez
Jonathan Turner [Wed, 31 Aug 2016 13:29:09 +0000 (06:29 -0700)]
Rollup merge of #36079 - acrrd:new_format_E0318, r=GuillaumeGomez

Update E0318 to new format

Fixes #35322.
Part of #35233.

r? @GuillaumeGomez

7 years agoRollup merge of #36050 - abhiQmar:e0076-formatting, r=jonathandturner
Jonathan Turner [Wed, 31 Aug 2016 13:29:09 +0000 (06:29 -0700)]
Rollup merge of #36050 - abhiQmar:e0076-formatting, r=jonathandturner

Update compiler error E0076 to use new error format

Fixes #35221 part of #35233

r? @jonathandturner

7 years agoRollup merge of #35926 - matthew-piziak:bit-or-xor-examples, r=GuillaumeGomez
Jonathan Turner [Wed, 31 Aug 2016 13:29:08 +0000 (06:29 -0700)]
Rollup merge of #35926 - matthew-piziak:bit-or-xor-examples, r=GuillaumeGomez

add evocative examples for `BitOr` and `BitXor`

These are exactly equivalent to PR #35809, with one caveat: I do not believe there is a non-bitwise binary XOR operator in Rust, so here it's expressed as `(a || b) && !(a && b)`.

Alternative decompositions are `(a && !b) || (!a && b)` and `(a || b) && (!a || !b)`.  Let me know if you think one of those would be clearer.

r? @GuillaumeGomez

7 years agoRollup merge of #35758 - matthew-piziak:vec-assert-over-println-remaining, r=Guillaum...
Jonathan Turner [Wed, 31 Aug 2016 13:29:08 +0000 (06:29 -0700)]
Rollup merge of #35758 - matthew-piziak:vec-assert-over-println-remaining, r=GuillaumeGomez

accumulate vector and assert for RangeFrom and RangeInclusive examples

PR #35695 for `Range` was merged, so it seems that this side-effect-free style is preferred for Range* examples. This PR performs the same translation for `RangeFrom` and `RangeInclusive`. It also removes what looks to be an erroneously commented line for `#![feature(step_by)]`, and an unnecessary primitive-type annotation in `0u8..`.

7 years agoBonus fix for #35280. Part of #35233. Fixes #36057. Adding expanded notes/context...
William Lee [Tue, 30 Aug 2016 21:30:08 +0000 (17:30 -0400)]
Bonus fix for #35280. Part of #35233. Fixes #36057. Adding expanded notes/context for what trait a parameter shadows as part of E0194 error messages.