about summary refs log tree commit diff
path: root/src/test/compile-fail
AgeCommit message (Collapse)AuthorLines
2016-09-10Improve `Eq` derivingVadim Petrochenkov-1/+30
2016-09-10Improve shallow `Clone` derivingVadim Petrochenkov-13/+45
2016-09-10Rollup merge of #35691 - jaredwy:update-error-63, r=jonathandturnerGuillaume Gomez-3/+39
Update the wording for E0063. This will truncate the fields to 3. Instead of listing every field it will now show missing `a`, `z`, `b`, and 1 other field This is for #35218 as part of #35233 r? @jonathandturner
2016-09-10Auto merge of #36333 - apasel422:issue-35668, r=eddybbors-0/+24
Handle `ReEmpty` for `impl Trait` Closes #35668 r? @eddyb
2016-09-10fix span for errors E0537, E0535 & E0536Mikhail Modin-42/+0
2016-09-09Auto merge of #36332 - llogiq:static_consts_feature, r=nikomatsakisbors-100/+15
add static_in_const feature gate also updates tests and deletes the spurious .bk files I inadvertently added last time. r? @nikomatsakis
2016-09-09Add s390x supportUlrich Weigand-0/+10
This adds support for building the Rust compiler and standard library for s390x-linux, allowing a full cross-bootstrap sequence to complete. This includes: - Makefile/configure changes to allow native s390x builds - Full Rust compiler support for the s390x C ABI (only the non-vector ABI is supported at this point) - Port of the standard library to s390x - Update the liblibc submodule to a version including s390x support - Testsuite fixes to allow clean "make check" on s390x Caveats: - Resets base cpu to "z10" to bring support in sync with the default behaviour of other compilers on the platforms. (Usually, upstream supports all older processors; a distribution build may then chose to require a more recent base version.) (Also, using zEC12 causes failures in the valgrind tests since valgrind doesn't fully support this CPU yet.) - z13 vector ABI is not yet supported. To ensure compatible code generation, the -vector feature is passed to LLVM. Note that this means that even when compiling for z13, no vector instructions will be used. In the future, support for the vector ABI should be added (this will require common code support for different ABIs that need different data_layout strings on the same platform). - Two test cases are (temporarily) ignored on s390x to allow passing the test suite. The underlying issues still need to be fixed: * debuginfo/simd.rs fails because of incorrect debug information. This seems to be a LLVM bug (also seen with C code). * run-pass/union/union-basic.rs simply seems to be incorrect for all big-endian platforms. Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
2016-09-09Update the wording for E0063. This will truncate the fields to 3.Jared Wyles-3/+39
Instead of listing every field it will now show missing `a`, `z`, `b`, and 1 other field
2016-09-09Issue deprecation warnings for safe accesses to extern staticsVadim Petrochenkov-2/+76
2016-09-08fix feature error, test falloutAndre Bogus-3/+0
2016-09-08Auto merge of #35745 - jroesch:soundness-fix-29859, r=nikomatsakisbors-148/+76
Fix soundness bug described in #29859 This is an attempt at fixing the problems described in #29859 based on an IRC conversation between @nikomatsakis and I today. I'm waiting on a full build to come back, otherwise both tests trigger the correct error.
2016-09-08added feature gate testAndre Bogus-0/+14
2016-09-08warning → error, lowercaseAndre Bogus-3/+3
2016-09-07Fix duplicate error codeJared Roesch-7/+7
2016-09-07Handle `ReEmpty` for `impl Trait`Andrew Paseltiner-0/+24
Closes #35668
2016-09-07add static_in_const feature gateAndre Bogus-100/+4
also updates tests and deletes the spurious .bk files I inadvertently added last time.
2016-09-07Auto merge of #36304 - TimNN:fix-36299, r=eddybbors-0/+15
re-add accidentally removed line in wfcheck Fixes #36299, introduced in #36119. r? @eddyb
2016-09-07Auto merge of #36289 - euclio:self-suggestion, r=jseyfriedbors-0/+20
resolve: Suggest `use self` when import resolves Improves errors messages by replacing "Maybe a missing `extern crate`" messages with "Did you mean `self::...`" when the `self` import would succeed. Fixes #34191. Thank you for the help @jseyfried!
2016-09-06Auto merge of #36252 - joshtriplett:union-field-never-used, r=sanxiynbors-5/+31
Fix "field is never used" warning to take unions into account When compiling code containing a union with an unused field, rustc says "struct field is never used". Rather than saying "struct or union", or adding logic to determine the type of the item, just change the message to "field is never used", dropping the "struct". Update tests accordingly.
2016-09-06re-add accidentally removed lineTim Neumann-0/+15
2016-09-06Rollup merge of #36267 - Cobrand:E0559, r=jonathandturnerJonathan Turner-15/+24
Updated E0559 to new format Refactored a method that printed one suggested field name, into a method that returns an `Option` of a suggestion (Updated test cases accordingly) r? @jonathandturner Closes #36197
2016-09-06Rollup merge of #36128 - gavinb:error_msgs_p2, r=jonathandturnerJonathan Turner-0/+7
Update Error format for E0516, E0517, E0518 - E0518 Update error format #36111 - E0517 Update error format #36109 - E0516 Update error format #36108 - Part of #35233 r? @jonathandturner
2016-09-06Rollup merge of #36121 - Cobrand:master, r=jonathandturnerJonathan Turner-1/+3
Updated E0527 to new error format * Closes #36113
2016-09-06Auto merge of #36276 - jseyfried:fix_unused, r=nrcbors-0/+38
resolve: Fix unused import false positive with `item_like_imports` Fixes #36249. r? @nrc
2016-09-06Add regression test.Jeffrey Seyfried-0/+38
2016-09-05show `self` suggestion when items are in the blockAndy Russell-0/+11
2016-09-05resolve: Suggest `use self` when import resolvesAndy Russell-0/+9
Improves errors messages by replacing "Maybe a missing `extern crate`" messages with "Did you mean `self::...`" when the `self` import would succeed.
2016-09-05Updated E0527 to new error formatCobrand-1/+3
* Closes #36113
2016-09-05Add test for unused field in unionJosh Triplett-0/+26
2016-09-06E0518 Update error format #36111Gavin Baker-0/+2
- Fixes #36111 - Part of #35233
2016-09-06E0517 Update error format #36109Gavin Baker-0/+4
- Fixes #36109 - Part of #35233
2016-09-05E0516 Update error format #36108Gavin Baker-0/+1
- fixes #36108 - part of #35233
2016-09-05Rollup merge of #36065 - acrrd:new_format_E0496, r=GuillaumeGomezManish Goregaokar-46/+66
Update E0496 to new format Fixes #36000. Part of #35233. r? @GuillaumeGomez
2016-09-05Rollup merge of #35983 - GuillaumeGomez:e0060_bonus, r=jonathandturnerManish Goregaokar-18/+19
E0060 and E0061 improvement Fixes #35290. r? @jonathandturner
2016-09-05Make `private_in_public` compatibility lint warn-by-default againVadim Petrochenkov-2/+6
2016-09-04Updated E0559 to new formatCobrand-15/+24
Refactored a method that printed one suggested field name, into a method that returns an `Option` of a suggestion Updated test cases accordingly
2016-09-04Rollup merge of #36212 - razielgn:updated-e0493-to-new-format, r=jonathandturnerManish Goregaokar-22/+0
Updated e0493 to new format (+ bonus). Part of #35233. Fixes #35999. r? @jonathandturner I'm not satisfied with the bonus part, there has to be an easier way to reach into the `Drop`'s span implementation. I'm all ears. :)
2016-09-04Rollup merge of #36070 - gavinb:master, r=jonathandturnerManish Goregaokar-1/+4
Update error format for E0458, E0459 Fixes #35933, #35932 Part of #35233 r? @jonathandturner
2016-09-04E0060 and E0061 improvementGuillaume Gomez-18/+19
2016-09-03Fix "field is never used" warning to take unions into accountJosh Triplett-5/+5
Rather than saying "struct or union" or adding logic to determine the type of the item, just change the message to "field is never used", dropping the "struct". Update tests accordingly.
2016-09-03Address comments and add requested testsVadim Petrochenkov-17/+185
2016-09-03Fix rebase, fix some testsVadim Petrochenkov-9/+9
2016-09-03Support unions in borrow checkerVadim Petrochenkov-0/+309
Add some more tests
2016-09-03Support deriving some traits for unionsVadim Petrochenkov-0/+30
2016-09-03Translate union constantsVadim Petrochenkov-0/+72
Fix alignment for packed unions Add some missing privacy test Get rid of `unimplemented_unions` macro
2016-09-03Implement drop translation and add lint for unions with drop fieldsVadim Petrochenkov-0/+40
Fix some typeck bugs blocking drop tests
2016-09-03Make accesses to union fields unsafeVadim Petrochenkov-0/+23
2016-09-03Check fields in union patters/expressionsVadim Petrochenkov-11/+60
Make parsing of union items backward compatible Add some tests
2016-09-03Implement encoding/decoding unions in metadataVadim Petrochenkov-2/+37
Add well-formedness check Implement some more missing code
2016-09-03Auto merge of #35957 - alexcrichton:macros-1.1, r=nrcbors-4/+3
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!