]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoimpl Debug + Display for !
Andrew Cann [Sat, 30 Jul 2016 05:24:53 +0000 (13:24 +0800)]
impl Debug + Display for !

7 years agoMake unused lint ignore unused `!`
Andrew Cann [Fri, 29 Jul 2016 11:20:57 +0000 (19:20 +0800)]
Make unused lint ignore unused `!`

7 years agoFix super_relate_tys so that ! == !
Andrew Cann [Fri, 29 Jul 2016 11:20:05 +0000 (19:20 +0800)]
Fix super_relate_tys so that ! == !

7 years agoSwitch on TyEmpty
Andrew Cann [Fri, 22 Jul 2016 05:50:04 +0000 (13:50 +0800)]
Switch on TyEmpty

Parse -> ! as FnConverging(!)
Add AdjustEmptyToAny coercion to all ! expressions
Some fixes

7 years agoFix rustdoc after rebase
Andrew Cann [Wed, 29 Jun 2016 18:13:59 +0000 (02:13 +0800)]
Fix rustdoc after rebase

7 years agoSmall optimization
Andrew Cann [Mon, 27 Jun 2016 17:44:50 +0000 (01:44 +0800)]
Small optimization

Optimiize ExprKind::EmptyToAny expressions applied to function calls.

7 years agoAdd run-fail/adjust_empty.rs test
Andrew Cann [Sat, 25 Jun 2016 12:02:38 +0000 (20:02 +0800)]
Add run-fail/adjust_empty.rs test

7 years agoInvoke coercions on !
Andrew Cann [Sat, 25 Jun 2016 12:02:09 +0000 (20:02 +0800)]
Invoke coercions on !

7 years agoAdd EmptyToAny adjustment
Andrew Cann [Sat, 25 Jun 2016 10:42:52 +0000 (18:42 +0800)]
Add EmptyToAny adjustment

7 years agoParse `!` as TyEmpty (except in fn return type)
Andrew Cann [Wed, 22 Jun 2016 06:02:26 +0000 (14:02 +0800)]
Parse `!` as TyEmpty (except in fn return type)

7 years agoStart implementation of RFC 1216 (make ! a type)
Andrew Cann [Mon, 9 May 2016 16:03:59 +0000 (00:03 +0800)]
Start implementation of RFC 1216 (make ! a type)

Add `TyKind::Empty` and fix resulting build errors.

7 years agoAuto merge of #35348 - scottcarr:discriminant2, r=nikomatsakis
bors [Sat, 13 Aug 2016 08:20:46 +0000 (01:20 -0700)]
Auto merge of #35348 - scottcarr:discriminant2, r=nikomatsakis

[MIR] Add explicit SetDiscriminant StatementKind for deaggregating enums

cc #35186

To deaggregate enums, we need to be able to explicitly set the discriminant.  This PR implements a new StatementKind that does that.

I think some of the places that have `panics!` now could maybe do something smarter.

7 years agoAuto merge of #35138 - petrochenkov:clarify, r=eddyb
bors [Sat, 13 Aug 2016 02:38:46 +0000 (19:38 -0700)]
Auto merge of #35138 - petrochenkov:clarify, r=eddyb

Implement RFC 1506 "Clarify the relationships between various kinds of structs and variants"

cc https://github.com/rust-lang/rust/issues/35626

7 years agoParse numeric fields in struct expressions and patterns
Vadim Petrochenkov [Fri, 29 Jul 2016 20:47:55 +0000 (23:47 +0300)]
Parse numeric fields in struct expressions and patterns

7 years agoRemove restrictions from tuple structs/variants
Vadim Petrochenkov [Fri, 29 Jul 2016 20:47:55 +0000 (23:47 +0300)]
Remove restrictions from tuple structs/variants

Hard errors are turned into feature gates

7 years agoAuto merge of #35431 - GuillaumeGomez:err_codes, r=jonathandturner
bors [Fri, 12 Aug 2016 15:58:55 +0000 (08:58 -0700)]
Auto merge of #35431 - GuillaumeGomez:err_codes, r=jonathandturner

Err codes

r? @jonathandturner

7 years agoAuto merge of #35091 - eddyb:impl-trait, r=nikomatsakis
bors [Fri, 12 Aug 2016 08:26:12 +0000 (01:26 -0700)]
Auto merge of #35091 - eddyb:impl-trait, r=nikomatsakis

Implement `impl Trait` in return type position by anonymization.

This is the first step towards implementing `impl Trait` (cc #34511).
`impl Trait` types are only allowed in function and inherent method return types, and capture all named lifetime and type parameters, being invariant over them.
No lifetimes that are not explicitly named lifetime parameters are allowed to escape from the function body.
The exposed traits are only those listed explicitly, i.e. `Foo` and `Clone` in `impl Foo + Clone`, with the exception of "auto traits" (like `Send` or `Sync`) which "leak" the actual contents.

The implementation strategy is anonymization, i.e.:
```rust
fn foo<T>(xs: Vec<T>) -> impl Iterator<Item=impl FnOnce() -> T> {
    xs.into_iter().map(|x| || x)
}

// is represented as:
type A</*invariant over*/ T> where A<T>: Iterator<Item=B<T>>;
type B</*invariant over*/ T> where B<T>: FnOnce() -> T;
fn foo<T>(xs: Vec<T>) -> A<T> {
    xs.into_iter().map(|x| || x): $0 where $0: Iterator<Item=$1>, $1: FnOnce() -> T
}
```
`$0` and `$1` are resolved (to `iter::Map<vec::Iter<T>, closure>` and the closure, respectively) and assigned to `A` and `B`, after checking the body of `foo`. `A` and `B` are *never* resolved for user-facing type equality (typeck), but always for the low-level representation and specialization (trans).

The "auto traits" exception is implemented by collecting bounds like `impl Trait: Send` that have failed for the obscure `impl Trait` type (i.e. `A` or `B` above), pretending they succeeded within the function and trying them again after type-checking the whole crate, by replacing `impl Trait` with the real type.

While passing around values which have explicit lifetime parameters (of the function with `-> impl Trait`) in their type *should* work, regionck appears to assign inference variables in *way* too many cases, and never properly resolving them to either explicit lifetime parameters, or `'static`.
We might not be able to handle lifetime parameters in `impl Trait` without changes to lifetime inference, but type parameters can have arbitrary lifetimes in them from the caller, so most type-generic usecases (or not generic at all) should not run into this problem.

cc @rust-lang/lang

7 years agoAuto merge of #34811 - DanielJCampbell:Expander, r=jseyfried
bors [Fri, 12 Aug 2016 05:10:16 +0000 (22:10 -0700)]
Auto merge of #34811 - DanielJCampbell:Expander, r=jseyfried

Extended expand.rs to support alternate expansion behaviours (eg. stepwise expansion)

r? nrc

7 years agotest: add more extensive tests for impl Trait.
Eduard Burtescu [Wed, 10 Aug 2016 21:04:43 +0000 (00:04 +0300)]
test: add more extensive tests for impl Trait.

7 years agotypeck: leak auto trait obligations through impl Trait.
Eduard Burtescu [Thu, 28 Jul 2016 15:27:11 +0000 (18:27 +0300)]
typeck: leak auto trait obligations through impl Trait.

7 years agotypeck: record `impl Trait` concrete resolutions.
Eduard Burtescu [Sat, 6 Aug 2016 00:12:20 +0000 (03:12 +0300)]
typeck: record `impl Trait` concrete resolutions.

7 years agotypeck: disallow `impl Trait` outside of return types of functions and impl methods.
Eduard Burtescu [Sat, 6 Aug 2016 00:11:17 +0000 (03:11 +0300)]
typeck: disallow `impl Trait` outside of return types of functions and impl methods.

7 years agorustc: add TyAnon (impl Trait) to the typesystem.
Eduard Burtescu [Fri, 22 Jul 2016 15:56:22 +0000 (18:56 +0300)]
rustc: add TyAnon (impl Trait) to the typesystem.

7 years agosyntax: add anonymized type syntax, i.e. impl TraitA+TraitB.
Eduard Burtescu [Mon, 1 Aug 2016 01:25:32 +0000 (04:25 +0300)]
syntax: add anonymized type syntax, i.e. impl TraitA+TraitB.

7 years agorustc: don't reveal specializable polymorphic projections.
Eduard Burtescu [Fri, 1 Jul 2016 16:32:53 +0000 (19:32 +0300)]
rustc: don't reveal specializable polymorphic projections.

7 years agorustc: always normalize projections in ty::layout regardless where they appear.
Eduard Burtescu [Fri, 1 Jul 2016 15:36:54 +0000 (18:36 +0300)]
rustc: always normalize projections in ty::layout regardless where they appear.

7 years agorustc: rename ProjectionMode and its variant to be more memorable.
Eduard Burtescu [Thu, 30 Jun 2016 18:22:47 +0000 (21:22 +0300)]
rustc: rename ProjectionMode and its variant to be more memorable.

7 years agoAuto merge of #35592 - jonathandturner:rollup, r=jonathandturner
bors [Thu, 11 Aug 2016 20:14:28 +0000 (13:14 -0700)]
Auto merge of #35592 - jonathandturner:rollup, r=jonathandturner

Rollup of 23 pull requests

- Successful merges: #35279, #35331, #35358, #35375, #35445, #35448, #35482, #35486, #35505, #35528, #35530, #35532, #35536, #35537, #35541, #35552, #35554, #35555, #35557, #35562, #35565, #35569, #35576
- Failed merges: #35395, #35415, #35563

7 years agoadd SetDiscriminant StatementKind to enable deaggregation of enums
Scott A Carr [Thu, 4 Aug 2016 23:14:33 +0000 (16:14 -0700)]
add SetDiscriminant StatementKind to enable deaggregation of enums

7 years agoFix tidy warning
Jonathan Turner [Thu, 11 Aug 2016 17:17:12 +0000 (10:17 -0700)]
Fix tidy warning

7 years agoAuto merge of #34193 - petrochenkov:privalias, r=nikomatsakis
bors [Thu, 11 Aug 2016 17:09:10 +0000 (10:09 -0700)]
Auto merge of #34193 - petrochenkov:privalias, r=nikomatsakis

privacy: Substitute type aliases in private-in-public checker

Closes https://github.com/rust-lang/rust/issues/30503
Closes https://github.com/rust-lang/rust/issues/34293

Everyone in the issue discussion seemed to be in favor, @huonw also spoke about this [here](https://www.reddit.com/r/rust/comments/3xldr9/surfaces_and_signatures_component_privacy_versus/cy615wq), but the issue haven't got any movement.
I think it's reasonable to do this before turning `private_in_public` warnings into errors.

r? @nikomatsakis

7 years agoRollup merge of #35576 - circuitfox:E0072-update-error-format, r=jonathandturner
Jonathan Turner [Thu, 11 Aug 2016 13:34:02 +0000 (06:34 -0700)]
Rollup merge of #35576 - circuitfox:E0072-update-error-format, r=jonathandturner

E0072 update error format

Part of  #35233

Fixes #35506

r? @jonathandturner

The bonus for this issue currently seems to be impossible to do reliably, as the compiler seems to lack span information for item names alone, like `Foo` in `struct Foo { ... }`. It would be possible to hack something together by computing span offsets, but that seems like a solution that would be begging for trouble.

A proper solution to this would, of course, be to add span information to the right place (seems to be `rustc::hir::Item::name` but I may be wrong).

7 years agoRollup merge of #35569 - pietroalbini:fix-typo, r=steveklabnik
Jonathan Turner [Thu, 11 Aug 2016 13:34:02 +0000 (06:34 -0700)]
Rollup merge of #35569 - pietroalbini:fix-typo, r=steveklabnik

Fix docs typo in std::os::unix::net::SocketAddr::is_unnamed

7 years agoRollup merge of #35565 - wdv4758h:E0133, r=jonathandturner
Jonathan Turner [Thu, 11 Aug 2016 13:34:01 +0000 (06:34 -0700)]
Rollup merge of #35565 - wdv4758h:E0133, r=jonathandturner

Update E0133 to new format

Part of #35233
Fix #35509
r? @jonathandturner

7 years agoRollup merge of #35562 - birkenfeld:as-mut-doc, r=steveklabnik
Jonathan Turner [Thu, 11 Aug 2016 13:34:01 +0000 (06:34 -0700)]
Rollup merge of #35562 - birkenfeld:as-mut-doc, r=steveklabnik

Remove redundant `&mut ref mut` in doc for Result::as_mut()

While a good example of how `&mut ref mut` is a no-op, I don't think we should show that here :)
See https://users.rust-lang.org/t/mnemonic-for-reading-qualifiers/6853

r? @steveklabnik

7 years agoRollup merge of #35557 - Limeth:master, r=jonathandturner
Jonathan Turner [Thu, 11 Aug 2016 13:34:01 +0000 (06:34 -0700)]
Rollup merge of #35557 - Limeth:master, r=jonathandturner

E0263 updated to new format.

Fixes #35518. Part of #35233.
r? @jonathandturner

7 years agoRollup merge of #35555 - circuitfox:E0128-update-error-format, r=jonathandturner
Jonathan Turner [Thu, 11 Aug 2016 13:34:00 +0000 (06:34 -0700)]
Rollup merge of #35555 - circuitfox:E0128-update-error-format, r=jonathandturner

E0128 update error format

Fixes #35508

Part of #35233

r? @jonathandturner

7 years agoRollup merge of #35554 - murarth:insert-str-issue, r=apasel422
Jonathan Turner [Thu, 11 Aug 2016 13:34:00 +0000 (06:34 -0700)]
Rollup merge of #35554 - murarth:insert-str-issue, r=apasel422

Add tracking issue for `String::insert_str`

7 years agoRollup merge of #35552 - theypsilon:master, r=jonathandturner
Jonathan Turner [Thu, 11 Aug 2016 13:34:00 +0000 (06:34 -0700)]
Rollup merge of #35552 - theypsilon:master, r=jonathandturner

Update error message E0384 to new format

Part of #35233
Fixes #35184

r? @jonathandturner

7 years agoRollup merge of #35541 - hank-der-hafenarbeiter:E0045, r=jonathandturner
Jonathan Turner [Thu, 11 Aug 2016 13:34:00 +0000 (06:34 -0700)]
Rollup merge of #35541 - hank-der-hafenarbeiter:E0045, r=jonathandturner

Updated E0045 to new error format (no bonus)

Part of #35501
r? @jonathandturner

7 years agoRollup merge of #35537 - munyari:e0038, r=jonathandturner
Jonathan Turner [Thu, 11 Aug 2016 13:34:00 +0000 (06:34 -0700)]
Rollup merge of #35537 - munyari:e0038, r=jonathandturner

Update E0038 to the new error format

Part of #35233

Addresses #35500
"r? @jonathandturner

This doesn't compile yet, and I need help. In my naive solution, adding the span label makes our error message a mutable `errors::DiagnosticBuilder` pointer.

```bash
python src/bootstrap/bootstrap.py --step check-cfail E0038 --stage 1
```

```
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Building stage0 test artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
   Compiling rustc v0.0.0 (file:///home/nash/code/rust/src/librustc)
src/librustc/traits/error_reporting.rs:735:9: 735:12 error: mismatched types [E0308]
src/librustc/traits/error_reporting.rs:735         err
                                                   ^~~
src/librustc/traits/error_reporting.rs:735:9: 735:12 help: run `rustc --explain E0308` to see a detailed explanation
src/librustc/traits/error_reporting.rs:735:9: 735:12 note: expected type `core::option::Option<errors::DiagnosticBuilder<'tcx>>`
src/librustc/traits/error_reporting.rs:735:9: 735:12 note:    found type `core::option::Option<&mut errors::DiagnosticBuilder<'_>>`
error: aborting due to previous error
error: Could not compile `rustc`.

To learn more, run the command again with --verbose.

command did not execute successfully: "/home/nash/code/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "-j" "4" "--target" "x86_64-unknown-linux-gnu" "--release" "--features" " jemalloc" "--manifest-path" "/home/nash/code/rust/src/rustc/Cargo.toml"
expected success, got: exit code: 101
```

7 years agoRollup merge of #35536 - hank-der-hafenarbeiter:E0433, r=jonathandturner
Jonathan Turner [Thu, 11 Aug 2016 13:33:59 +0000 (06:33 -0700)]
Rollup merge of #35536 - hank-der-hafenarbeiter:E0433, r=jonathandturner

Updated E0433 to new error message. (no bonus)

Part of #35345
r? @jonathandturner

7 years agoRollup merge of #35532 - KiChjang:e0004-follow-up, r=jonathandturner
Jonathan Turner [Thu, 11 Aug 2016 13:33:59 +0000 (06:33 -0700)]
Rollup merge of #35532 - KiChjang:e0004-follow-up, r=jonathandturner

Do not span across nodes for E0004

Part of #35233.
Fixes #35529.

r? @arielb1

7 years agoRollup merge of #35530 - srdja:master, r=jonathandturner
Jonathan Turner [Thu, 11 Aug 2016 13:33:59 +0000 (06:33 -0700)]
Rollup merge of #35530 - srdja:master, r=jonathandturner

Update E0008 and E0007 to new format

Part of #35233
A fix for #35496

r? @jonathandturner

7 years agoRollup merge of #35528 - Vassah:master, r=jonathandturner
Jonathan Turner [Thu, 11 Aug 2016 13:33:59 +0000 (06:33 -0700)]
Rollup merge of #35528 - Vassah:master, r=jonathandturner

Update Error Format for E0091 and E0092

Addresses [#35228](https://github.com/rust-lang/rust/issues/35228) and [#35229](https://github.com/rust-lang/rust/issues/35229) as part of [#35233](https://github.com/rust-lang/rust/issues/35233).

Please let me know if there are any issues; first time contributor.

r? @jonathandturner

7 years agoRollup merge of #35505 - futile:test_29053, r=nikomatsakis
Jonathan Turner [Thu, 11 Aug 2016 13:33:59 +0000 (06:33 -0700)]
Rollup merge of #35505 - futile:test_29053, r=nikomatsakis

Add test for issue #29053

This PR adds a test for #29053 (currently fails on stage 0, but works with stage 1, as it should).

Fixes #29053

7 years agoRollup merge of #35486 - KiChjang:e0081-bonus, r=jonathandturner
Jonathan Turner [Thu, 11 Aug 2016 13:33:58 +0000 (06:33 -0700)]
Rollup merge of #35486 - KiChjang:e0081-bonus, r=jonathandturner

Shrink span to variant discriminant expression for E0081

Part of #35233.
Extension of #35353.
Fixes #35224.

r? @jonathandturner

7 years agoRollup merge of #35482 - frewsxcv:patch-31, r=GuillaumeGomez
Jonathan Turner [Thu, 11 Aug 2016 13:33:58 +0000 (06:33 -0700)]
Rollup merge of #35482 - frewsxcv:patch-31, r=GuillaumeGomez

Remove unnecessary `main` functions in doc examples.

7 years agoRollup merge of #35448 - srinivasreddy:rf_compiletest, r=nikomatsakis
Jonathan Turner [Thu, 11 Aug 2016 13:33:58 +0000 (06:33 -0700)]
Rollup merge of #35448 - srinivasreddy:rf_compiletest, r=nikomatsakis

run rustfmt on compiletest folder in src/tools/ folder

7 years agoRollup merge of #35445 - pcn:update-E0017-to-new-format, r=arielb1
Jonathan Turner [Thu, 11 Aug 2016 13:33:58 +0000 (06:33 -0700)]
Rollup merge of #35445 - pcn:update-E0017-to-new-format, r=arielb1

Update e0017 to new format

Updated `span_err!` to use `struct_span_err!` and provide a `span_label` that describes the error in context.

Updated the test to look for the `span_label`s that are provided now.

7 years agoRollup merge of #35375 - trixnz:update-error-326, r=jonathandturner
Jonathan Turner [Thu, 11 Aug 2016 13:33:57 +0000 (06:33 -0700)]
Rollup merge of #35375 - trixnz:update-error-326, r=jonathandturner

Update error format for E0326

Fixes #35335 as part of #35233

r? @jonathandturner

7 years agoRollup merge of #35358 - vadimcn:vscode, r=steveklabnik
Jonathan Turner [Thu, 11 Aug 2016 13:33:57 +0000 (06:33 -0700)]
Rollup merge of #35358 - vadimcn:vscode, r=steveklabnik

Ignore VS Code settings directory

r? @steveklabnik

7 years agoRollup merge of #35331 - trixnz:update-error-130, r=jonathandturner
Jonathan Turner [Thu, 11 Aug 2016 13:33:57 +0000 (06:33 -0700)]
Rollup merge of #35331 - trixnz:update-error-130, r=jonathandturner

Update error format for E0130

Fixes #35256 as part of #35233

r? @jonathandturner

7 years agoRollup merge of #35279 - cengizIO:master, r=brson
Jonathan Turner [Thu, 11 Aug 2016 13:33:57 +0000 (06:33 -0700)]
Rollup merge of #35279 - cengizIO:master, r=brson

Provide a cleaner documentation for 'write!'

Hello!

This is my attempt to fix #35110

Any feedback is more than welcome!

Cheers!

7 years agoAuto merge of #35403 - scottcarr:lvalue_refactor, r=nikomatsakis
bors [Thu, 11 Aug 2016 12:04:41 +0000 (05:04 -0700)]
Auto merge of #35403 - scottcarr:lvalue_refactor, r=nikomatsakis

refactor lvalue_ty to be method of lvalue

Currently `Mir` (and `MirContext`) implement a method `lvalue_ty` (and actually many more `foo_ty`).  But this should be a method of `Lvalue`.

If you have an `lvalue` and you want to get its type, the natural thing to write is:

```
lvalue.ty()
```

Of course it needs context, but still:

```
lvalue.ty(mir, tcx)
```

Makes more sense than

```
mir.lvalue_ty(lvalue, tcx)
```

I actually think we should go a step farther and have traits so we could get the type of some value generically, but that's up for debate.  The thing I'm running into a lot in the compiler is I have a value of type `Foo` and I know that there is some related type `Bar` which I can get through some combination of method calls, but it's often not as direct as I would imagine.  Unless you already know the code, its not clear why you would look in `Mir` for a method to get the type of an `Lvalue`.

7 years agoAuto merge of #34866 - cynicaldevil:panic-counter, r=alexcrichton
bors [Thu, 11 Aug 2016 08:58:48 +0000 (01:58 -0700)]
Auto merge of #34866 - cynicaldevil:panic-counter, r=alexcrichton

Refactored code to access TLS only in case of panic (II)

Fixes #34787
r? @alexcrichton
Do it **very** carefully this time!

7 years agoAuto merge of #34845 - bitshifter:issue-30961, r=alexcrichton
bors [Thu, 11 Aug 2016 04:42:48 +0000 (21:42 -0700)]
Auto merge of #34845 - bitshifter:issue-30961, r=alexcrichton

Add help for target CPUs, features, relocation and code models.

Fix for https://github.com/rust-lang/rust/issues/30961. Requires PR https://github.com/rust-lang/llvm/pull/45 to be accepted first, and the .gitmodules for llvm to be updated before this can be merged.

7 years agoAdd test for recursive private alias substitution in rustdoc
Vadim Petrochenkov [Wed, 10 Aug 2016 18:00:17 +0000 (21:00 +0300)]
Add test for recursive private alias substitution in rustdoc

7 years agoprivacy: Move private-in-public diagnostics for type aliases to the public interface...
petrochenkov [Fri, 8 Jul 2016 08:44:43 +0000 (11:44 +0300)]
privacy: Move private-in-public diagnostics for type aliases to the public interface location

7 years agoSubstitute private type aliases in rustdoc
petrochenkov [Thu, 7 Jul 2016 15:20:26 +0000 (18:20 +0300)]
Substitute private type aliases in rustdoc

7 years agoprivacy: Substitute type aliases in private-in-public checker
Vadim Petrochenkov [Thu, 9 Jun 2016 23:09:43 +0000 (02:09 +0300)]
privacy: Substitute type aliases in private-in-public checker

7 years agoAuto merge of #35489 - sanxiyn:target-list, r=alexcrichton
bors [Wed, 10 Aug 2016 20:13:50 +0000 (13:13 -0700)]
Auto merge of #35489 - sanxiyn:target-list, r=alexcrichton

Print Rust target name, not LLVM target name, for `--print target-list`

Rust target name and LLVM target name are usually the same, but not always. For example, `arm-unknown-linux-musleabi` Rust target uses `arm-unknown-linux-gnueabi` LLVM target.

Fix #35481.

7 years agoE0072 update error format
Chris Stankus [Wed, 10 Aug 2016 18:36:36 +0000 (13:36 -0500)]
E0072 update error format

7 years agoFixed no-pattern-in-args test for new E0130 format
trixnz [Fri, 5 Aug 2016 10:58:43 +0000 (12:58 +0200)]
Fixed no-pattern-in-args test for new E0130 format

7 years agoUpdate error format for E0130
trixnz [Thu, 4 Aug 2016 21:15:58 +0000 (23:15 +0200)]
Update error format for E0130

7 years agoUpdate error format for E0326
trixnz [Fri, 5 Aug 2016 18:05:57 +0000 (20:05 +0200)]
Update error format for E0326

7 years agoAuto merge of #35525 - jonathandturner:rollup, r=jonathandturner
bors [Wed, 10 Aug 2016 17:03:08 +0000 (10:03 -0700)]
Auto merge of #35525 - jonathandturner:rollup, r=jonathandturner

Rollup of 15 pull requests

- Successful merges: #35371, #35396, #35446, #35449, #35452, #35458, #35465, #35466, #35470, #35475, #35477, #35484, #35504, #35507, #35524
- Failed merges: #35395, #35415

7 years agono op commit for travis
Scott A Carr [Wed, 10 Aug 2016 16:42:33 +0000 (09:42 -0700)]
no op commit for travis

7 years agoAdded an update_panic_count function to handle access to PANIC_COUNT
Nikhil Shagrithaya [Wed, 10 Aug 2016 16:32:35 +0000 (22:02 +0530)]
Added an update_panic_count function to handle access to PANIC_COUNT

7 years agoAdded a shim around rust_panic to update panic counter
Nikhil Shagrithaya [Wed, 20 Jul 2016 13:05:25 +0000 (18:35 +0530)]
Added a shim around rust_panic to update panic counter

7 years agoRefactored code to access TLS only in case of panic
Nikhil Shagrithaya [Fri, 15 Jul 2016 15:17:45 +0000 (20:47 +0530)]
Refactored code to access TLS only in case of panic

7 years agoClarify std::os::unix::net::SocketAddr::is_unnamed's docstring
Pietro Albini [Wed, 10 Aug 2016 15:53:25 +0000 (17:53 +0200)]
Clarify std::os::unix::net::SocketAddr::is_unnamed's docstring

7 years agoFix docs typo in std::os::unix::net::SocketAddr::is_unnamed
Pietro Albini [Wed, 10 Aug 2016 15:34:50 +0000 (17:34 +0200)]
Fix docs typo in std::os::unix::net::SocketAddr::is_unnamed

7 years agoImproved checking of target's llvm_config
Cameron Hart [Sat, 6 Aug 2016 05:54:28 +0000 (15:54 +1000)]
Improved checking of target's llvm_config

Point llvm @bitshifter branch until PR accepted

Use today's date for LLVM auto clean trigger

Update LLVM submodule to point at rust-lang fork.

Handle case when target is set

7 years agoAuto merge of #35405 - futile:tests_warn_timeout, r=brson
bors [Wed, 10 Aug 2016 10:00:56 +0000 (03:00 -0700)]
Auto merge of #35405 - futile:tests_warn_timeout, r=brson

Add warning timeout for tests that run >1min

This makes it easier to identify hanging tests. As described in #2873,
when a test doesn't finish, we so far had no information on which test
that was. In this PR, we add a duration of 60 seconds for each test,
after which a warning will be printed mentioning that this specific test
has been running for a long time already.

Example output:
https://gist.github.com/futile/6ea3eed85fe632df8633c1b03c08b012

r? @brson

7 years agoUpdate E0133 to new format
Chiu-Hsiang Hsu [Wed, 10 Aug 2016 07:29:45 +0000 (15:29 +0800)]
Update E0133 to new format

7 years agoExtended expand.rs to support alternate expansion behaviours
Daniel Campbell [Thu, 4 Aug 2016 00:55:05 +0000 (12:55 +1200)]
Extended expand.rs to support alternate expansion behaviours

Added single_step & keep_macs flags and functionality to expander

7 years agoRemove redundant `&mut ref mut` in doc for Result::as_mut()
Georg Brandl [Wed, 10 Aug 2016 06:14:57 +0000 (08:14 +0200)]
Remove redundant `&mut ref mut` in doc for Result::as_mut()

7 years agoAuto merge of #35079 - nikomatsakis:incr-comp-ich-32753, r=mw
bors [Wed, 10 Aug 2016 04:00:21 +0000 (21:00 -0700)]
Auto merge of #35079 - nikomatsakis:incr-comp-ich-32753, r=mw

Various improvements to the SVH

This fixes a few points for the SVH:

- incorporate resolve results into the SVH;
- don't include nested items.

r? @michaelwoerister

cc #32753 (not fully fixed I don't think)

7 years agopacify the merciless tidy
Niko Matsakis [Tue, 9 Aug 2016 18:45:58 +0000 (14:45 -0400)]
pacify the merciless tidy

7 years agoincorporate resolve results into hashing
Niko Matsakis [Wed, 27 Jul 2016 21:26:55 +0000 (17:26 -0400)]
incorporate resolve results into hashing

We now incorporate the `def_map` and `trait_map`
results into the SVH.

7 years agopromote svh calculation into its own directory
Niko Matsakis [Wed, 27 Jul 2016 19:00:38 +0000 (15:00 -0400)]
promote svh calculation into its own directory

7 years agoremove field that need not be public
Niko Matsakis [Wed, 27 Jul 2016 18:43:06 +0000 (14:43 -0400)]
remove field that need not be public

7 years agostop hashing nested items, and add a test
Niko Matsakis [Wed, 27 Jul 2016 18:42:58 +0000 (14:42 -0400)]
stop hashing nested items, and add a test

7 years agomake it possible to test if HIR is dirty
Niko Matsakis [Wed, 27 Jul 2016 18:36:21 +0000 (14:36 -0400)]
make it possible to test if HIR is dirty

This requires passing in the dirty-node set explicitly since HIR nodes
wind up added to the graph either way.

7 years agoE0263 updated to new format. rust-lang/rust#35518
Jakub Hlusička [Tue, 9 Aug 2016 20:42:35 +0000 (22:42 +0200)]
E0263 updated to new format. rust-lang/rust#35518

7 years agoAuto merge of #35401 - jonathandturner:enable_json_and_new_errors, r=jonathandturner
bors [Tue, 9 Aug 2016 21:04:54 +0000 (14:04 -0700)]
Auto merge of #35401 - jonathandturner:enable_json_and_new_errors, r=jonathandturner

Turn on new errors and json mode

This PR is a big-switch, but on a well-worn path:

* Turns on new errors by default (and removes old skool)
* Moves json output from behind a flag

The RFC for new errors [landed](https://github.com/rust-lang/rfcs/pull/1644) and as part of that we wanted some bake time.  It's now had a few weeks + all the time leading up to the RFC of people banging on it.  We've also had [editors updating to the new format](https://github.com/saviorisdead/RustyCode/pull/159) and expect more to follow.

We also have an [issue on old skool](https://github.com/rust-lang/rust/issues/35330) that needs to be fixed as more errors are switched to the new style, but it seems silly to fix old skool errors when we fully intend to throw the switch in the near future.

This makes it lean towards "why not just throw the switch now, rather than waiting a couple more weeks?"  I only know of vim that wanted to try to parse the new format but were not sure how, and I think we can reach out to them and work out something in the 8 weeks before this would appear in a stable release.

We've [hashed out](https://github.com/rust-lang/rust/issues/35330) stabilizing JSON output, and it seems like people are relatively happy making what we have v1 and then likely adding to it in the future.  The idea is that we'd maintain backward compatibility and just add new fields as needed.  We'll also work on a separate output format that'd be better suited for interactive tools like IDES (since JSON message can get a little long depending on the error).

This PR stabilizes JSON mode, allowing its use without `-Z unstable-options`

Combined, this gives editors two ways to support errors going forward: parsing the new error format or using the JSON mode.  By moving JSON to stable, we can also add support to Cargo, which plugin authors tell us does help simplify their support story.

r? @nikomatsakis
cc @rust-lang/tools

Closes https://github.com/rust-lang/rust/issues/34826

7 years agoE0128 update error format
Chris Stankus [Tue, 9 Aug 2016 20:12:46 +0000 (15:12 -0500)]
E0128 update error format

7 years agoUpdate E0007 to new format
srdja [Tue, 9 Aug 2016 19:23:11 +0000 (21:23 +0200)]
Update E0007 to new format

7 years agoAdd tracking issue for `String::insert_str`
Murarth [Tue, 9 Aug 2016 18:42:16 +0000 (11:42 -0700)]
Add tracking issue for `String::insert_str`

7 years agoUpdate E0038 to the new error format
Panashe M. Fundira [Mon, 8 Aug 2016 22:54:16 +0000 (18:54 -0400)]
Update E0038 to the new error format

7 years agoMerge branch 'master' of github.com:theypsilon/rust
José manuel Barroso Galindo [Tue, 9 Aug 2016 17:35:16 +0000 (00:35 +0700)]
Merge branch 'master' of github.com:theypsilon/rust

7 years agoUpdate cargo SHA to latest cargo
Jonathan Turner [Tue, 9 Aug 2016 17:14:08 +0000 (10:14 -0700)]
Update cargo SHA to latest cargo

7 years agoUpdate error message E0384 to new format
José manuel Barroso Galindo [Tue, 9 Aug 2016 17:07:42 +0000 (00:07 +0700)]
Update error message E0384 to new format

Part of #35233
Fixes #35184

7 years agoAuto merge of #35166 - nikomatsakis:incr-comp-ice-34991-2, r=mw
bors [Tue, 9 Aug 2016 17:00:54 +0000 (10:00 -0700)]
Auto merge of #35166 - nikomatsakis:incr-comp-ice-34991-2, r=mw

Address ICEs running w/ incremental compilation and building glium

Fixes for various ICEs I encountered trying to build glium with incremental compilation enabled. Building glium now works. Of the 4 ICEs, I have test cases for 3 of them -- I didn't isolate a test for the last commit and kind of want to go do other things -- most notably, figuring out why incremental isn't saving much *effort*.

But if it seems worthwhile and I can come back and try to narrow down the problem.

r? @michaelwoerister

Fixes #34991
Fixes #32015

7 years agofix license
Niko Matsakis [Tue, 9 Aug 2016 16:43:59 +0000 (12:43 -0400)]
fix license

7 years agomake tidy
Scott A Carr [Tue, 9 Aug 2016 15:17:50 +0000 (08:17 -0700)]
make tidy

7 years agoUpdate E0087.rs
Jonathan Turner [Tue, 9 Aug 2016 14:53:52 +0000 (07:53 -0700)]
Update E0087.rs

7 years agopacify the mercilous tidy
Niko Matsakis [Tue, 9 Aug 2016 14:25:31 +0000 (10:25 -0400)]
pacify the mercilous tidy

7 years agoadded unit test
hank-der-hafenarbeiter [Tue, 9 Aug 2016 12:40:07 +0000 (14:40 +0200)]
added unit test