about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2016-08-13Add tests for ! typeAndrew Cann-0/+259
2016-08-13Add some tests for ! typeAndrew Cann-0/+60
2016-08-13Add run-pass/never_coercions.rs testAndrew Cann-0/+19
2016-08-13Rename empty/bang to neverAndrew Cann-3/+1
Split Ty::is_empty method into is_never and is_uninhabited
2016-08-13Control usage of `!` through a feature gate.Andrew Cann-0/+1
Adds the `bang_type` feature gate. `!` in a non-return-type position now relies on that feature.
2016-08-13Remove invalid compile-fail tests related to `!`Andrew Cann-178/+0
These tests check for the old error messages "`return` in a function declared as diverging" and "computation may converge in a function declared as diverging". The first of these is now invalid as `return` is permitted in functions that return `!`. The second of these is subsumed by the "mismatched types" error.
2016-08-13Remove obsolete divergence related stuffAndrew Cann-16/+0
Replace FnOutput with Ty Replace FnConverging(ty) with ty Purge FnDiverging, FunctionRetTy::NoReturn and FunctionRetTy::None
2016-08-13Add run-fail/adjust_empty.rs testAndrew Cann-0/+18
2016-08-13Auto merge of #35348 - scottcarr:discriminant2, r=nikomatsakisbors-0/+45
[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.
2016-08-12Auto merge of #35138 - petrochenkov:clarify, r=eddybbors-183/+280
Implement RFC 1506 "Clarify the relationships between various kinds of structs and variants" cc https://github.com/rust-lang/rust/issues/35626
2016-08-13Parse numeric fields in struct expressions and patternsVadim Petrochenkov-0/+43
2016-08-13Remove restrictions from tuple structs/variantsVadim Petrochenkov-191/+245
Hard errors are turned into feature gates
2016-08-12Auto merge of #35431 - GuillaumeGomez:err_codes, r=jonathandturnerbors-0/+190
Err codes r? @jonathandturner
2016-08-12test: add more extensive tests for impl Trait.Eduard Burtescu-0/+291
2016-08-12typeck: leak auto trait obligations through impl Trait.Eduard Burtescu-0/+114
2016-08-12typeck: record `impl Trait` concrete resolutions.Eduard Burtescu-0/+969
2016-08-12rustc: don't reveal specializable polymorphic projections.Eduard Burtescu-0/+12
2016-08-12rustc: always normalize projections in ty::layout regardless where they appear.Eduard Burtescu-0/+23
2016-08-11Auto merge of #35592 - jonathandturner:rollup, r=jonathandturnerbors-35/+114
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
2016-08-11add SetDiscriminant StatementKind to enable deaggregation of enumsScott A Carr-0/+45
2016-08-11Rollup merge of #35576 - circuitfox:E0072-update-error-format, r=jonathandturnerJonathan Turner-0/+5
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).
2016-08-11Rollup merge of #35565 - wdv4758h:E0133, r=jonathandturnerJonathan Turner-4/+12
Update E0133 to new format Part of #35233 Fix #35509 r? @jonathandturner
2016-08-11Rollup merge of #35557 - Limeth:master, r=jonathandturnerJonathan Turner-1/+5
E0263 updated to new format. Fixes #35518. Part of #35233. r? @jonathandturner
2016-08-11Rollup merge of #35555 - circuitfox:E0128-update-error-format, r=jonathandturnerJonathan Turner-0/+2
E0128 update error format Fixes #35508 Part of #35233 r? @jonathandturner
2016-08-11Rollup merge of #35552 - theypsilon:master, r=jonathandturnerJonathan Turner-5/+9
Update error message E0384 to new format Part of #35233 Fixes #35184 r? @jonathandturner
2016-08-11Rollup merge of #35541 - hank-der-hafenarbeiter:E0045, r=jonathandturnerJonathan Turner-1/+2
Updated E0045 to new error format (no bonus) Part of #35501 r? @jonathandturner
2016-08-11Rollup merge of #35537 - munyari:e0038, r=jonathandturnerJonathan Turner-3/+15
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 ```
2016-08-11Rollup merge of #35536 - hank-der-hafenarbeiter:E0433, r=jonathandturnerJonathan Turner-0/+1
Updated E0433 to new error message. (no bonus) Part of #35345 r? @jonathandturner
2016-08-11Rollup merge of #35530 - srdja:master, r=jonathandturnerJonathan Turner-3/+7
Update E0008 and E0007 to new format Part of #35233 A fix for #35496 r? @jonathandturner
2016-08-11Rollup merge of #35528 - Vassah:master, r=jonathandturnerJonathan Turner-1/+3
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
2016-08-11Rollup merge of #35505 - futile:test_29053, r=nikomatsakisJonathan Turner-0/+21
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
2016-08-11Rollup merge of #35486 - KiChjang:e0081-bonus, r=jonathandturnerJonathan Turner-11/+16
Shrink span to variant discriminant expression for E0081 Part of #35233. Extension of #35353. Fixes #35224. r? @jonathandturner
2016-08-11Rollup merge of #35445 - pcn:update-E0017-to-new-format, r=arielb1Jonathan Turner-1/+6
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.
2016-08-11Rollup merge of #35375 - trixnz:update-error-326, r=jonathandturnerJonathan Turner-2/+2
Update error format for E0326 Fixes #35335 as part of #35233 r? @jonathandturner
2016-08-11Rollup merge of #35331 - trixnz:update-error-130, r=jonathandturnerJonathan Turner-3/+8
Update error format for E0130 Fixes #35256 as part of #35233 r? @jonathandturner
2016-08-11Add test for recursive private alias substitution in rustdocVadim Petrochenkov-0/+11
2016-08-11privacy: Move private-in-public diagnostics for type aliases to the public ↵petrochenkov-2/+0
interface location
2016-08-11Substitute private type aliases in rustdocpetrochenkov-0/+30
2016-08-11privacy: Substitute type aliases in private-in-public checkerVadim Petrochenkov-7/+6
2016-08-10E0072 update error formatChris Stankus-0/+5
2016-08-10Fixed no-pattern-in-args test for new E0130 formattrixnz-2/+5
2016-08-10Update error format for E0130trixnz-1/+3
2016-08-10Update error format for E0326trixnz-2/+2
2016-08-10Auto merge of #35525 - jonathandturner:rollup, r=jonathandturnerbors-5/+40
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
2016-08-10Update E0133 to new formatChiu-Hsiang Hsu-4/+12
2016-08-09Auto merge of #35079 - nikomatsakis:incr-comp-ich-32753, r=mwbors-2/+174
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)
2016-08-09incorporate resolve results into hashingNiko Matsakis-2/+138
We now incorporate the `def_map` and `trait_map` results into the SVH.
2016-08-09stop hashing nested items, and add a testNiko Matsakis-0/+36
2016-08-09E0263 updated to new format. rust-lang/rust#35518Jakub Hlusička-1/+5
2016-08-09Auto merge of #35401 - jonathandturner:enable_json_and_new_errors, ↵bors-233/+3
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