summary refs log tree commit diff
path: root/src/test/run-pass
AgeCommit message (Collapse)AuthorLines
2015-08-10placate the pretty tests by ignoring my test.Felix S. Klock II-0/+2
2015-08-10Regression test for dropflag reinit issue.Felix S. Klock II-0/+34
Fix #27401.
2015-08-03Auto merge of #27210 - vadimcn:win64-eh-pers, r=alexcrichtonbors-0/+1
After this change, the only remaining symbol we are pulling from libgcc on Win64 is `__chkstk_ms` - the stack probing routine.
2015-07-31Auto merge of #27382 - brson:gate-assoc-type, r=alexcrichtonbors-0/+4
There are still problems in both the design and implementation of this, so we don't want it landing in 1.2. cc @arielb1 @nikomatsakis cc #27364 r? @alexcrichton
2015-07-30Implement Win64 eh_personality natively.Vadim Chugunov-0/+1
2015-07-30Auto merge of #27052 - wthrowe:atomic_send, r=Gankrobors-0/+22
I think this was just missed when `Send` and `Sync` were redone, since it seems odd to not be able to use things like `Arc<AtomicPtr>`. If it was intentional feel free to just close this. I used another test as a template for writing mine, so I hope I got all the headers and stuff right.
2015-07-29Feature gate associated type defaultsBrian Anderson-0/+4
There are multiple issues with them as designed and implemented. cc #27364
2015-07-29Auto merge of #27261 - arielb1:drop-sanity-check, r=pnkfelixbors-0/+77
This fixes multiple bugs, and as several of these are soundness issue, is a [breaking-change]. r? @pnkfelix
2015-07-29Auto merge of #27260 - alexcrichton:cap-lints, r=nrcbors-0/+18
This commit is an implementation of [RFC 1193][rfc] which adds the ability to the compiler to cap the lint level for the entire compilation session. This flag will ensure that no lints will go above this level, and Cargo will primarily use this flag passing `--cap-lints allow` to all upstream dependencies. [rfc]: https://github.com/rust-lang/rfcs/pull/1193 Closes #27259
2015-07-28rustc: Add a --cap-lints flag to the compilerAlex Crichton-0/+18
This commit is an implementation of [RFC 1193][rfc] which adds the ability to the compiler to cap the lint level for the entire compilation session. This flag will ensure that no lints will go above this level, and Cargo will primarily use this flag passing `--cap-lints allow` to all upstream dependencies. [rfc]: https://github.com/rust-lang/rfcs/pull/1193 Closes #27259
2015-07-28Revise intrinsic-move-val test to not require knowledge of whether filling ↵Felix S. Klock II-11/+74
drop is in use.
2015-07-27Auto merge of #27304 - alexcrichton:revert-picky-dllimport, r=brsonbors-17/+0
This reverts commit a0efd3a3d99a98e3399a4f07abe6a67cf0660335. This commit caused a lot of unintended breakage for many Cargo builds. The problem is that Cargo compiles build scripts with `-C prefer-dynamic`, so the standard library is always dynamically linked and hence any imports need to be marked with `dllimport`. Dependencies of build scripts, however, were compiled as rlibs and did not have their imports tagged with `dllimport`, so build scripts would fail to link. While known that this situation would break, it was unknown that it was a common scenario in the wild. As a result I'm just reverting these heuristics for now.
2015-07-27typeck: handle unsized structs in type hints by recursing into their last field.Eduard Burtescu-0/+5
2015-07-26Auto merge of #27272 - eefriedman:closure-const-crash, r=nikomatsakisbors-0/+13
Fixes issue #27268. r? @nikomatsakis
2015-07-26Revert "trans: Be a little more picky about dllimport"Alex Crichton-17/+0
This reverts commit a0efd3a3d99a98e3399a4f07abe6a67cf0660335.
2015-07-26Auto merge of #26870 - jroesch:default-typaram-fallback, r=nikomatsakisbors-0/+212
This PR completes [RFC 213](https://github.com/rust-lang/rfcs/blob/master/text/0213-defaulted-type-params.md) by allowing default type parameters to influence inference. This is almost certainly a breaking change due to interactions between default type parameters and the old fallback algorithm used for integral and floating point literals. The error messages still require polish but I wanted to get early review and feedback from others on the the changes, error messages, and test cases. I also imagine we will want to run anywhere from 1-3 versions of this on crater and evaluate the impact, and it would be best to get that ball rolling. The only outstanding issue I'm aware of is that type alias defaults don't work. It seems this may require significant restructuring, since during inference type aliases have already been expanded. @nikomatsakis might be able to provide some clarity here. r? @nikomatsakis cc @eddyb @Gankro @aturon @brson
2015-07-26Auto merge of #27283 - arielb1:free-self-2, r=eddybbors-0/+26
Fixes #27281 r? @eddyb
2015-07-25Add feature gateJared Roesch-7/+21
2015-07-25Fix error message spansJared Roesch-2/+2
2015-07-25Clean up test casesJared Roesch-33/+62
2015-07-25Remove defaults table and attach defaults directly to tyvarsJared Roesch-0/+60
2015-07-25Correctly collect defaults from type alises in astconvJared Roesch-0/+17
2015-07-25Implement Default TyParam fallbackJared Roesch-0/+92
This patch allows type parameter defaults to influence type inference. This is a possible breaking change since it effects the way type inference works and will have different behavior when mixing defaults and literal fallback.
2015-07-25Substitute free lifetimes in `Self::T`Ariel Ben-Yehuda-0/+26
Fixes #27281
2015-07-25Auto merge of #27258 - nikomatsakis:issue-26952, r=eddybbors-0/+33
Correct regression in type-inference caused by failing to reconfirm that the object trait matches the required trait during trait selection. The existing code was checking that the object trait WOULD match (in a probe), but never executing the match outside of a probe. This corrects various regressions observed in the wild, including issue #26952. Fixes #26952. r? @eddyb cc @frankmcsherry
2015-07-24Allow writing types which "can't" be instantiated.Eli Friedman-0/+87
The borrow checker doesn't allow constructing such a type at runtime using safe code, but there isn't any reason to ban them in the type checker. Included in this commit is an example of a neat static doubly-linked list. Feature-gated under the static_recursion gate to be on the safe side, but there are unlikely to be any reasons this shouldn't be turned on by default.
2015-07-24Add static_recursion feature gate.Eli Friedman-0/+2
2015-07-24Allow recursive static variables.Eli Friedman-0/+15
There isn't any particularly good reason for this restriction, so just get rid of it, and fix trans to handle this case.
2015-07-24Fix an ICE with a closure in a constant.Eli Friedman-0/+13
Fixes issue #27268.
2015-07-24handle all type variants correctly in dropckAriel Ben-Yehuda-0/+77
This fixes a few soundness bugs in dropck, so to anyone who relied on them, this is a [breaking-change] Fixes #24086. Fixes #25389. Fixes #25598. Fixes #25750. Fixes #26641. Fixes #26657. Fixes #27240. Fixes #27241.
2015-07-24Correct regression in type-inference caused by failing to reconfirm thatNiko Matsakis-0/+33
the object trait matches the required trait during trait selection. The existing code was checking that the object trait WOULD match (in a probe), but never executing the match outside of a probe. This corrects various regressions observed in the wild, including issue #26952. Fixes #26952.
2015-07-24Auto merge of #27215 - pnkfelix:fsk-placer-take-5-just-in, r=nikomatsakisbors-2/+105
Macro desugaring of `in PLACE { BLOCK }` into "simpler" expressions following the in-development "Placer" protocol. Includes Placer API that one can override to integrate support for `in` into one's own type. (See [RFC 809].) [RFC 809]: https://github.com/rust-lang/rfcs/blob/master/text/0809-box-and-in-for-stdlib.md Part of #22181 Replaced PR #26180. Turns on the `in PLACE { BLOCK }` syntax, while leaving in support for the old `box (PLACE) EXPR` syntax (since we need to support that at least until we have a snapshot with support for `in PLACE { BLOCK }`. (Note that we are not 100% committed to the `in PLACE { BLOCK }` syntax. In particular I still want to play around with some other alternatives. Still, I want to get the fundamental framework for the protocol landed so we can play with implementing it for non `Box` types.) ---- Also, this PR leaves out support for desugaring-based `box EXPR`. We will hopefully land that in the future, but for the short term there are type-inference issues injected by that change that we want to resolve separately.
2015-07-24Auto merge of #27208 - alexcrichton:msvc-less-dllimport, r=brsonbors-0/+17
Currently you can hit a link error on MSVC by only referencing static items from a crate (no functions for example) and then link to the crate statically (as all Rust crates do 99% of the time). A detailed investigation can be found [on github][details], but the tl;dr is that we need to stop applying dllimport so aggressively. This commit alters the application of dllimport on constants to only cases where the crate the constant originated from will be linked as a dylib in some output crate type. That way if we're just linking rlibs (like the motivation for this issue) we won't use dllimport. For the compiler, however, (which has lots of dylibs) we'll use dllimport. [details]: https://github.com/rust-lang/rust/issues/26591#issuecomment-123513631 cc #26591
2015-07-23fix pretty printing tests by opting into the features that the expanded code ↵Felix S. Klock II-0/+4
needs.
2015-07-22Rollup merge of #27158 - apasel422:issue-14382, r=alexcrichtonSteve Klabnik-0/+24
closes #14382
2015-07-22Rollup merge of #27154 - apasel422:issue-10436, r=GankroSteve Klabnik-0/+20
closes #10436
2015-07-22Rollup merge of #27147 - apasel422:issue-19404, r=alexcrichtonSteve Klabnik-0/+47
closes #19404
2015-07-22Rollup merge of #27146 - apasel422:issue-14229, r=alexcrichtonSteve Klabnik-0/+30
closes #14229
2015-07-22Rollup merge of #27140 - dotdash:test-26468, r=luqmanaSteve Klabnik-0/+38
The fix for #26468 was made upstream and landed with the LLVM update in #27076. Closes #26468
2015-07-22Add test of placement-in syntax, analogous to `new-box-syntax.rs`Felix S. Klock II-0/+37
2015-07-22refine set of allowed warnings in `new-box-syntax.rs` test.Felix S. Klock II-1/+1
2015-07-22Add actual use of the `struct Structure` lying dormant in `new-box-syntax.rs`.Felix S. Klock II-0/+5
The original test program exercised the (garbage-collected heap) allocation form `box (GC) ...`, feeding an instance of `Structure` in as the expression. This obviously went away when `GC` went away, but there's no reason for us not to include an appropriate unit test here for the same form, just for heap-allocated instances of `Structure`.
2015-07-22Add new feature gate opt-in necessary for `new-box-syntax.rs`.Felix S. Klock II-0/+1
2015-07-22Update the `intrinsic-move-val.rs` test to reflect its newer signature.Felix S. Klock II-1/+1
2015-07-22Hack for "unsafety hygiene" -- `push_unsafe!` and `pop_unsafe!`.Felix S. Klock II-0/+56
Even after expansion, the generated expressions still track depth of such pushes (i.e. how often you have "pushed" without a corresponding "pop"), and we add a rule that in a context with a positive `push_unsafe!` depth, it is effectively an `unsafe` block context. (This way, we can inject code that uses `unsafe` features, but still contains within it a sub-expression that should inherit the outer safety checking setting, outside of the injected code.) This is a total hack; it not only needs a feature-gate, but probably should be feature-gated forever (if possible). ignore-pretty in test/run-pass/pushpop-unsafe-okay.rs
2015-07-21trans: Be a little more picky about dllimportAlex Crichton-0/+17
Currently you can hit a link error on MSVC by only referencing static items from a crate (no functions for example) and then link to the crate statically (as all Rust crates do 99% of the time). A detailed investigation can be found [on github][details], but the tl;dr is that we need to stop applying dllimport so aggressively. This commit alters the application of dllimport on constants to only cases where the crate the constant originated from will be linked as a dylib in some output crate type. That way if we're just linking rlibs (like the motivation for this issue) we won't use dllimport. For the compiler, however, (which has lots of dylibs) we'll use dllimport. [details]: https://github.com/rust-lang/rust/issues/26591#issuecomment-123513631 cc #26591
2015-07-22Auto merge of #27185 - pnkfelix:test-cyclic-collections, r=alexcrichtonbors-0/+759
This test attempts to exercise cyclic structure in much of `std::collections` (as much as is possible; e.g. things like `EnumSet` and `BitVec` do not really support carrying references at all, so trying to represent cyclic structure within them dooes not really make sense.) This work should land before we make future revisions to `dropck`; that is, I am attempting to catch potential regressions to cases where we supported cyclic structure circa Rust 1.2.
2015-07-21Auto merge of #27093 - Manishearth:closure-label-shadow, r=pnkfelixbors-0/+16
Fixes #25343 To be honest I'm not sure if this is the right fix (I haven't yet fully understood the code), but it seems to work. I'll look closer at the code when I have some time, in the meantime if this is the right fix it would be nice to get verification from someone who does understand the code :smile: r? @pnkfelix
2015-07-21add test for #14382Andrew Paseltiner-0/+24
closes #14382
2015-07-21This test attempts to exercise cyclic structure much of `std::collections`Felix S. Klock II-0/+759
(as much as is possible; e.g. things like `EnumSet` and `BitVec` do not really support carrying references at all, so trying to represent cyclic structure within them dooes not really make sense.)