summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2016-11-03add #32791 test caseNiko Matsakis-0/+81
2016-11-03Fix label scopes.Jeffrey Seyfried-0/+3
2016-10-22[beta] trans: pad const structs to aligned sizeTim Neumann-0/+25
2016-10-19Deprecate `Reflect`Nick Cameron-7/+1
[tracking issue](https://github.com/rust-lang/rust/issues/27749)
2016-10-19Stabilise attributes on statements.Nick Cameron-17/+9
Note that attributes on expressions are still unstable and are behind the `stmt_expr_attributes` flag. cc [Tracking issue](https://github.com/rust-lang/rust/issues/15701)
2016-10-19Stabilise `?`Nick Cameron-33/+2
cc [`?` tracking issue](https://github.com/rust-lang/rust/issues/31436)
2016-10-19Add regression test.Jeffrey Seyfried-0/+25
2016-10-18normalize types every time HR regions are erasedAriel Ben-Yehuda-0/+25
Associated type normalization is inhibited by higher-ranked regions. Therefore, every time we erase them, we must re-normalize. I was meaning to introduce this change some time ago, but we used to erase regions in generic context, which broke this terribly (because you can't always normalize in a generic context). That seems to be gone now. Ensure this by having a `erase_late_bound_regions_and_normalize` function. Fixes #37109 (the missing call was in mir::block).
2016-10-18Some tests to check that lifetime parametric fn's do not trip up LLVM.Felix S. Klock II-0/+54
2016-10-11force `i1` booleans to `i8` when comparingNiko Matsakis-0/+24
Work around LLVM bug. cc #36856
2016-10-11stop having identity casts be lexprsAriel Ben-Yehuda-0/+35
that made no sense (see test), and was incompatible with borrowck. Fixes #36936.
2016-10-11loosen assertion against proj in collectorNiko Matsakis-0/+34
The collector was asserting a total absence of projections, but some projections are expected, even in trans: in particular, projections containing higher-ranked regions, which we don't currently normalize.
2016-09-27Auto merge of #36761 - jonathandturner:E0425_E0446_E0449, r=nrcbors-29/+91
Update E0425, E0446, E0449 This addresses https://github.com/rust-lang/rust/issues/35343, https://github.com/rust-lang/rust/issues/35923, and https://github.com/rust-lang/rust/issues/35924. Part of https://github.com/rust-lang/rust/issues/35233 Specifically, this adds labels to these error messages following the suggestions in the attached bugs. r? @nrc
2016-09-27Auto merge of #36758 - michaelwoerister:incr-comp-file-headers, r=eddybbors-0/+29
incr.comp.: Let the compiler ignore incompatible incr. comp. cache artifacts Implements #35720. cc @nikomatsakis
2016-09-26Auto merge of #36764 - jonathandturner:rollup, r=jonathandturnerbors-8/+142
Rollup of 14 pull requests - Successful merges: #36563, #36574, #36586, #36662, #36663, #36669, #36676, #36721, #36723, #36727, #36729, #36742, #36754, #36756 - Failed merges:
2016-09-26Rollup merge of #36756 - alygin:e0512-new-format, r=jonathandturnerJonathan Turner-0/+1
New error format for E0512 Part of #35233, fixes #36107 r? @jonathandturner
2016-09-26Rollup merge of #36727 - kallisti5:master, r=AatchJonathan Turner-0/+1
Haiku: Initial work at OS support These changes should be non-invasive to non-Haiku platforms. These patches were hand reworked from Neil's original Rust 1.9.0 patches. I've done some style cleanup and design updates along the way. There are a few small additional patches to libc, rust-installer and compiler-rt that will be submitted once this one is accepted. Haiku can be compiled on Linux, and a full gcc cross-compiler with a Haiku target is available, which means bootstrapping should be fairly easy. The patches here have already successfully bootstrapped under our haiku x86_gcc2 architecture. http://rust-on-haiku.com/wiki/PortingRust I'll be focusing on our more modern gcc5 x86 and x86 architectures for now. As for support, we're not seeking official support for now. We understand Haiku isn't a top-tier OS choice, however having these patches upstream greatly reduces the amount of patchwork we have to do. Mesa has Haiku code upstream, and we submit patches to keep it going. Mesa doesn't test on Haiku and we're ok with that :-)
2016-09-26Rollup merge of #36723 - GuillaumeGomez:e0513, r=jonathandturnerJonathan Turner-0/+19
E0513 Part of #35233 r? @jonathandturner
2016-09-26Rollup merge of #36721 - TimNN:infinite-emptiness, r=nrcJonathan Turner-0/+62
reject macros with empty repetitions Fixes #5067 by checking the lhs of `macro_rules!` for repetitions which could match an empty token tree.
2016-09-26Rollup merge of #36662 - jseyfried:parse_macro_invoc_paths, r=nrcJonathan Turner-8/+43
parser: support paths in bang macro invocations (e.g. `path::to::macro!()`) r? @nrc
2016-09-26Rollup merge of #36574 - japaric:link-arg, r=alexcrichtonJonathan Turner-0/+16
rustc: implement -C link-arg this flag lets you pass a _single_ argument to the linker but can be used _repeatedly_. For example, instead of using: ``` rustc -C link-args='-l bar' (..) ``` you could write ``` rustc -C link-arg='-l' -C link-arg='bar' (..) ``` This new flag can be used with RUSTFLAGS where `-C link-args` has problems with "nested" spaces: ``` RUSTFLAGS='-C link-args="-Tlayout.ld -nostartfiles"' ``` This passes three arguments to rustc: `-C` `link-args="-Tlayout.ld` and `-nostartfiles"` to `rustc`. That's not what we meant. But this does what we want: ``` RUSTFLAGS='-C link-arg=-Tlayout.ld -C link-arg=-nostartfiles` ``` cc rust-lang/rfcs#1509 r? @alexcrichton cc @Zoxc This needs a test. Any suggestion?
2016-09-26Update E0446 label with improved wordingJonathan Turner-1/+1
2016-09-26Update E0425, E0446, E0449Jonathan Turner-29/+91
2016-09-26Auto merge of #36661 - jneem:master, r=nrcbors-0/+16
Change error message for intrinsic signature. Makes it so the signature of the intrinsic in the user's code is "found," while the signature that rustc knows about is "expected." Before this patch, the code ``` extern "platform-intrinsic" { fn x86_mm_movemask_ps() -> i32; } ``` would give the error ``` error[E0444]: platform-specific intrinsic has invalid number of arguments: found 1, expected 0 --> test.rs:4:5 | 4 | fn x86_mm_movemask_ps() -> i32; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error ``` After this patch, it says "found 0, expected 1".
2016-09-26incr.comp.: Add test case for cache artifact file headers.Michael Woerister-0/+29
2016-09-26New error format for E0512Andrew Lygin-0/+1
2016-09-26Add compile-fail test for E0513Guillaume Gomez-0/+19
2016-09-26Add a compile-fail test.Joe Neeman-0/+16
2016-09-26Auto merge of #36730 - jseyfried:make_macro_rules_invocations_magic, r=nrcbors-0/+11
Forbid user-defined macros named "macro_rules" This is a [breaking-change]. r? @nrc
2016-09-25Auto merge of #36652 - giannicic:issue-36553, r=nrcbors-1/+1
this commit corrects E0520 error text. See referenced issue for further info r? @nrc
2016-09-26reject macros with empty repetitionsTim Neumann-0/+62
2016-09-26Add regression test.Jeffrey Seyfried-0/+38
2016-09-25Auto merge of #36151 - camlorn:struct_layout_optimization, r=eddybbors-2/+2
refactor to remove trans::adt and make rustc::ty::layout authoritative I asked on IRC about optimizing struct layout by reordering fields from most-aligned to least-aligned and somehow ended up getting talked into doing this. The goal here is to make `layout` authoritative and to remove `adt`. The former has been accomplished by reimplementing `represent_type_uncached` and the latter is in progress. @eddyb thought I should make the PR now. My plan is to reserve the actual optimization for a second PR, as this work is useful by itself.
2016-09-26Forbid user-defined macros named "macro_rules".Jeffrey Seyfried-0/+11
2016-09-25Haiku: add workaround for missing F_DUPFD_CLOEXECNiels Sascha Reedijk-0/+1
The src/libstd/sys/unix/net.rs file depends on it. It is missing from Haiku. This workaround should actually 'fix' the problem, but it turns out the fds-are-cloexec.rs test hangs. I do not know how related these two issues are, but it warrants further investigation. The test is ignored on this platform for now. * Hand rebased from Niels original work on 1.9.0
2016-09-25fix 36708Tim Neumann-0/+38
2016-09-24Update codegen/link_section.rs.Austin Hicks-2/+2
2016-09-24librustc_mir: Propagate constants during copy propagation.Patrick Walton-10/+10
This optimization kicks in a lot when bootstrapping the compiler.
2016-09-23Auto merge of #36370 - michaelwoerister:incr-comp-metadata-hashes-check, ↵bors-0/+238
r=nikomatsakis ICH: Add ability to test the ICH of exported metadata items. Also adds an example test case for ICH testing. r? @nikomatsakis
2016-09-24Rollup merge of #36566 - frewsxcv:9837, r=nikomatsakisGuillaume Gomez-0/+20
Add regression test for #9837. Fixes https://github.com/rust-lang/rust/issues/9837
2016-09-24Rollup merge of #36498 - jonathandturner:macro_std_lib, r=nikomatsakisGuillaume Gomez-6/+6
Fix wording for out-of-crate macro error This fixes the wording of the note for out-of-crate macro errors to fix https://github.com/rust-lang/rust/issues/36469 The previous wording came from older logic in the PR that was replaced without updating the note.
2016-09-23ICH: Add ability to test the ICH of exported metadata items.Michael Woerister-0/+238
2016-09-23Auto merge of #36649 - eddyb:selfish-idents, r=pnkfelixbors-0/+19
Don't let a type parameter named "Self" unchanged past HIR lowering. Fixes #36638 by rewriting `Self` type parameters (which are a parse error) to a `gensym("Self")`. Background: #35605 introduced code across rustc that determines `Self` by its keyword name. Reverting the sanity checks around that would inadvertently cause confusion between the true `Self` of a `trait` and other type parameters named `Self` (which have caused parse errors already). I do not like to use `gensym`, and we may do something different here in the future, but this should work.
2016-09-23Auto merge of #36335 - mcarton:compiletest, r=GuillaumeGomezbors-1/+3
Fix ICE test in compiletest fail-tests While working on Clippy which uses *compiletest*, I noticed that as long as all expected error are found, *compile-fail* tests will be marked *ok* even if there is an ICE. One function seems to have not been updated with JSON errors because ICEs are now reported like this: ```json {"message":"../src/librustc/ty/context.rs:161: Attempted to intern `_` which contains inference types/regions in the global type context","code":null,"level":"error: internal compiler error","spans":[],"children":[],"rendered":null} ``` I don't think I can add a test for that. I guess: r? @nikomatsakis
2016-09-23Fix fallout in tests.Jeffrey Seyfried-8/+5
2016-09-22Auto merge of #36154 - nrc:proc-macro-init, r=@jseyfriedbors-0/+104
Adds a `ProcMacro` form of syntax extension This commit adds syntax extension forms matching the types for procedural macros 2.0 (RFC #1566), these still require the usual syntax extension boiler plate, but this is a first step towards proper implementation and should be useful for macros 1.1 stuff too. Supports both attribute-like and function-like macros. Note that RFC #1566 has not been accepted yet, but I think there is consensus that we want to head in vaguely that direction and so this PR will be useful in any case. It is also fairly easy to undo and does not break any existing programs. This is related to #35957 in that I hope it can be used in the implementation of macros 1.1, however, there is no direct overlap and is more of a complement than a competing proposal. There is still a fair bit of work to do before the two can be combined. r? @jseyfried cc @alexcrichton, @cgswords, @eddyb, @aturon
2016-09-22Rollup merge of #36539 - mikhail-m1:36530, r=jonathandturnerJonathan Turner-0/+32
fix top level attr spans issue #36530 ?r @jonathandturner
2016-09-22Rollup merge of #36330 - aclarry:e0560-update, r=jonathandturnerJonathan Turner-12/+23
Updated E0560 to new error format Added a small bit of code to add a label for E0560. Also renamed src/test/compile-fail/E560.rs file to E0560.rs (not sure why it was named E560). Updated all test cases which check this error. Closes #36199
2016-09-22Don't let a type parameter named "Self" unchanged past HIR lowering.Eduard Burtescu-0/+19
2016-09-22Fix compile-fail syntax in error filemcarton-2/+3