summary refs log tree commit diff
path: root/src/test/run-pass
AgeCommit message (Collapse)AuthorLines
2018-02-02Auto merge of #47943 - MaloJaffre:beta-backport, r=Mark-Simulacrumbors-0/+63
[beta] Backports Cherry-picked into beta: - #47762 - #47794 - #47891
2018-02-02Auto merge of #47918 - nikomatsakis:issue-47139-beta, r=eddybbors-0/+162
Backport 47738 to beta Backport of #47738 to beta branch.
2018-02-01rustc_trans: keep LLVM types for trait objects anonymous.Eduard-Mihai Burtescu-0/+18
2018-02-01Expand union test to include different typesRyan Cumming-7/+26
2018-02-01Fix ICE on const eval of union fieldRyan Cumming-0/+26
MIR's `Const::get_field()` attempts to retrieve the value for a given field in a constant. In the case of a union constant it was falling through to a generic `const_get_elt` based on the field index. As union fields don't have an index this caused an ICE in `llvm_field_index`. Fix by simply returning the current value when accessing any field in a union. This works because all union fields start at byte offset 0. The added test uses `const_fn` it ensure the field is extracted using MIR's const evaluation. The crash is reproducible without it, however. Fixes #47788
2018-01-31add regression testNiko Matsakis-0/+162
Fixes #47139
2018-01-23avoid double-unsizing arrays in bytestring match loweringAriel Ben-Yehuda-0/+37
The match lowering code, when lowering matches against bytestrings, works by coercing both the scrutinee and the pattern to `&[u8]` and then comparing them using `<[u8] as Eq>::eq`. If the scrutinee is already of type `&[u8]`, then unsizing it is both unneccessary and a trait error caught by the new and updated MIR typeck, so this PR changes lowering to avoid doing that (match lowering tried to avoid that before, but that attempt was quite broken). Fixes #46920.
2018-01-12Treat #[path] files as mod.rs filesTaylor Cramer-0/+0
2018-01-01Auto merge of #46895 - ricochet1k:macro-lifetimes, r=jseyfriedbors-0/+119
Allow lifetimes in macros This is a resurrection of PR #41927 which was a resurrection of #33135, which is intended to fix #34303. In short, this allows macros_rules! to use :lifetime as a matcher to match 'lifetimes. Still to do: - [x] Feature gate
2018-01-01Auto merge of #47064 - kennytm:force-trailing-newlines, r=estebankbors-12/+10
Add a tidy check for missing or too many trailing newlines. I've noticed recently there are lots of review comments requesting to fix trailing newlines. If this is going to be an official style here, it's better to let the CI do this repetitive check.
2017-12-30Add tests on fixed ICEsSeiichi Uchida-0/+42
Closes #29924. Closes #38857. Closes #39665. Closes #39872. Closes #39553. Closes #41210. Closes #41880. Closes #43483.
2017-12-30Remove excessive trailing newlines.kennytm-2/+0
2017-12-30Add trailing newlines to files which have no trailing newlines.kennytm-10/+10
2017-12-28Add feature gate macro_lifetime_matcherMatt Peterson-0/+7
2017-12-28Fix build and add a macro lifetime labels testMatt Peterson-0/+43
2017-12-28Resurrecting #33135Michael Hewson-0/+69
Started rebasing @sgrif's PR #33135 off of current master. (Well, actually merging it into a new branch based off current master.) The following files still need to be fixed or at least reviewed: - `src/libsyntax/ext/tt/macro_parser.rs`: calls `Parser::parse_lifetime`, which doesn't exist anymore - `src/libsyntax/parse/parser.rs`: @sgrif added an error message to `Parser::parse_lifetime`. Code has since been refactored, so I just took it out for now. - `src/libsyntax/ext/tt/transcribe.rs`: This code has been refactored bigtime. Not sure whether @sgrif's changes here are still necessary. Took it out for this commit.
2017-12-27Auto merge of #47014 - topecongiro:fixed-ices, r=estebankbors-0/+113
Add tests to fixed ICEs Closes #27078. Closes #27985. Closes #39848. Closes #42164. Closes #42479. Closes #45662. Closes #45965. Closes #46152.
2017-12-27Auto merge of #46479 - bkchr:termination_trait, r=arielb1bors-0/+45
Implements RFC 1937: `?` in `main` This is the first part of the RFC 1937 that supports new `Termination` trait in the rust `main` function. Thanks @nikomatsakis, @arielb1 and all other people in the gitter channel for all your help! The support for doctest and `#[test]` is still missing, bu as @nikomatsakis said, smaller pull requests are better :)
2017-12-27Auto merge of #47009 - eddyb:issue-46855, r=arielb1bors-0/+34
rustc_trans: support ZST indexing involving uninhabited types. Fixes #46855 in a minimal way. I decided against supporting non-memory `Rvalue::Len` in this PR (see https://github.com/rust-lang/rust/issues/46855#issuecomment-352965807), as `PlaceContext::Inspect` is also used for `Rvalue::Discriminant`. r? @arielb1
2017-12-27Auto merge of #46977 - est31:column_fix, r=dtolnaybors-5/+5
Make the output of the column! macro 1 based Fixes #46868. I didn't add any regression tests as the change already had to change tests inside the codebase. r? @dtolnay
2017-12-26Auto merge of #46975 - matthewjasper:mir-moveck-asm, r=arielb1bors-0/+43
[MIR Borrowck] Moveck inline asm statements Closes #45695 New behavior: * Input operands to `asm!` are moved, direct output operands are initialized. * Direct, non-read-write outputs match the assignment changes in #46752 (Shallow writes, end borrows).
2017-12-26rustc_trans: support ZST indexing involving uninhabited types.Eduard-Mihai Burtescu-0/+34
2017-12-26Implements RFC 1937: `?` in `main`Bastian Köcher-0/+45
This is the first part of the RFC 1937 that supports new `Termination` trait in the rust `main` function.
2017-12-26Add tests to fixed ICEsSeiichi Uchida-0/+113
Closes #27078. Closes #27985. Closes #39848. Closes #42164. Closes #42479. Closes #45152. Closes #45662. Closes #45876. Closes #45965.
2017-12-25Auto merge of #46973 - arielb1:tuple-casting, r=estebankbors-0/+17
Update check::cast::pointer_kind logic to new rustc Make the match exhaustive, adding handling for anonymous types and tuple coercions on the way. Also, exit early when type errors are detected, to avoid error cascades and the like. Fixes #33690. Fixes #46365. Fixes #46880.
2017-12-24Auto merge of #46859 - gereeter:uninhabited-unions, r=eddybbors-0/+39
Only mark unions as uninhabited if all of their fields are uninhabited Fixes #46845.
2017-12-24Auto merge of #46888 - cramertj:nested-impl-trait-error, r=nikomatsakisbors-1/+1
Add a feature gate for nested uses of `impl Trait` This allows us to delay stabilization of nested `impl Trait` until we have a plan to solve the problem posed [here](https://github.com/rust-lang/rust/issues/34511#issuecomment-350715858). r? @nikomatsakis
2017-12-24Auto merge of #46833 - diwic:7c-abort-ffi, r=arielb1bors-0/+43
Prevent unwinding past FFI boundaries Second attempt to write a patch to solve this. r? @nikomatsakis ~~So, my biggest issue with this patch is the way the patch determines *what* functions should have an abort landing pad (in `construct_fn`). I would ideally have this code match [src/librustc_trans/callee.rs::get_fn](https://github.com/rust-lang/rust/blob/master/src/librustc_trans/callee.rs#L107-L115) but couldn't find an id that returns true for `is_foreign_item`. Also tried `tcx.has_attr("unwind")` with no luck.~~ FIXED Other issues: * llvm.trap is an SIGILL on amd64. Ideally we could use panic-abort's version of aborting which is nicer but we don't want to depend on that library... * ~~Mir inlining is a stub currently.~~ FIXED (no-op) Also, when reviewing please take into account that I'm new to the code and only partially know what I'm doing... and that I've mostly made made matches on `TerminatorKind::Abort` match either `TerminatorKind::Resume` or `TerminatorKind::Unreachable` based on what looked best.
2017-12-24Fix testsest31-5/+5
2017-12-23Give MIR borrowck a better understanding of inline asmMatthew Jasper-0/+43
2017-12-23Update check::cast::pointer_kind logic to new rustcAriel Ben-Yehuda-0/+17
Make the match exhaustive, adding handling for anonymous types and tuple coercions on the way. Also, exit early when type errors are detected, to avoid error cascades and the like.
2017-12-22Auto merge of #46752 - Yoric:nll, r=arielb1bors-0/+34
Issue #46589 - Kill borrows on a local variable whenever we assign ov… …er this variable This is a first patch for the issue, handling the simple case while I figure out the data structures involved in the more complex cases.
2017-12-22Rollup merge of #46809 - eddyb:issue-46769-optimal, r=arielb1kennytm-2/+11
rustc: do not raise the alignment of optimized enums to the niche's alignment. This is the improved fix for #46769 that does not increase the size of any types (see also #46808).
2017-12-21Issue #46589 - Kill borrows on a local variable whenever we assign over this ↵David Teller-0/+34
variable
2017-12-21Add a feature gate for nested uses of `impl Trait`Taylor Cramer-1/+1
2017-12-21Auto merge of #46754 - cramertj:refactor-arg-impl, r=nikomatsakisbors-3/+2
Refactor argument-position impl Trait Fixes https://github.com/rust-lang/rust/issues/46685, https://github.com/rust-lang/rust/issues/46470 r? @nikomatsakis cc @chrisvittal
2017-12-21Auto merge of #46531 - cramertj:no-mo-modrs, r=nikomatsakisbors-0/+173
Implement non-mod.rs mod statements Fixes https://github.com/rust-lang/rust/issues/45385, cc https://github.com/rust-lang/rust/issues/44660 This will fail tidy right now because it doesn't recognize my UI tests as feature-gate tests. However, I'm not sure if compile-fail will work out either because compile-fail usually requires there to be error patterns in the top-level file, which isn't possible with this feature. What's the recommended way to handle this?
2017-12-21Mir: Abort on nounwind ABIsDavid Henningsson-0/+43
Generate Abort instead of Resume terminators on nounwind ABIs. https://github.com/rust-lang/rust/issues/18510 Signed-off-by: David Henningsson <diwic@ubuntu.com>
2017-12-20add some run-pass tests for NLL showing that things work as expectedNiko Matsakis-0/+108
2017-12-20feature nll implies borrowck=mirSantiago Pastorino-1/+0
2017-12-20feature nll implies two-phase-borrowsSantiago Pastorino-1/+3
2017-12-20connect NLL type checker to the impl trait codeNiko Matsakis-0/+3
We now add the suitable `impl Trait` constraints.
2017-12-20Rollup merge of #46831 - Diggsey:float-debug-fmt, r=dtolnaykennytm-2/+2
Always `Debug` floats with a decimal point Fixes #30967 r? @dtolnay
2017-12-20rustc: do not raise the alignment of optimized enums to the niche's alignment.Eduard-Mihai Burtescu-2/+11
2017-12-19Ignore pretty printing tests for non_modrs_modsTaylor Cramer-0/+2
2017-12-19Only mark unions as uninhabited if all of their fields are uninhabited. ↵Jonathan S-0/+39
Fixes #46845.
2017-12-19Implement non-mod.rs mod statementsTaylor Cramer-0/+171
2017-12-19Auto merge of #46664 - mikeyhew:raw_pointer_self, r=arielb1bors-0/+107
arbitrary_self_types: add support for raw pointer `self` types This adds support for raw pointer `self` types, under the `arbitrary_self_types` feature flag. Types like `self: *const Self`, `self: *const Rc<Self>`, `self: Rc<*const Self` are all supported. Object safety checks are updated to allow`self: *const Self` and `self: *mut Self`. This PR does not add support for `*const self` and `*mut self` syntax. That can be added in a later PR once this code is reviewed and merged. #44874 r? @arielb1
2017-12-19Auto merge of #46829 - GuillaumeGomez:rollup, r=GuillaumeGomezbors-0/+16
Rollup of 11 pull requests - Successful merges: #46700, #46786, #46790, #46800, #46801, #46802, #46804, #46805, #46812, #46824, #46825 - Failed merges:
2017-12-19Always print floats with a decimal point with the Debug formatterDiggory Blake-2/+2