summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2016-07-03Don't translate vtable methods with Self: Sized bounds.Eduard Burtescu-0/+28
2016-07-03Revert "skip double negation in const eval"Alex Crichton-0/+1
This reverts commit 735c018974e5570ea13fd887aa70a011a5b8e7b8.
2016-07-03fail obligations that depend on erroring obligationsAriel Ben-Yehuda-0/+20
Fix a bug where an obligation that depend on an erroring obligation would be regarded as successful, leading to global cache pollution and random lossage. Fixes #33723. Fixes #34503.
2016-07-02fix test falloutAriel Ben-Yehuda-9/+9
2016-06-27trans: always use a memcpy for ABI argument/return casts.Eduard Burtescu-4/+12
2016-05-26Fix stores codegen passSimonas Kazlauskas-4/+4
2016-05-26Add a regression testSimonas Kazlauskas-0/+29
2016-05-22Auto merge of #31457 - lambda:rtabort-use-libc-abort, r=alexcrichtonbors-2/+1
Use libc::abort, not intrinsics::abort, in rtabort! intrinsics::abort compiles down to an illegal instruction, which on Unix-like platforms causes the process to be killed with SIGILL. A more appropriate way to kill the process would be SIGABRT; this indicates better that the runtime has explicitly aborted, rather than some kind of compiler bug or architecture mismatch that SIGILL might indicate. For rtassert!, replace this with libc::abort. libc::abort raises SIGABRT, but is defined to do so in such a way that it will terminate the process even if SIGABRT is currently masked or caught by a signal handler that returns. On non-Unix platforms, retain the existing behavior. On Windows we prefer to avoid depending on the C runtime, and we need a fallback for any other platforms that may be defined. An alternative on Windows would be to call TerminateProcess, but this seems less essential than switching to using SIGABRT on Unix-like platforms, where it is common for the process-killing signal to be printed out or logged. This is a [breaking-change] for any code that depends on the exact signal raised to abort a process via rtabort! cc #31273 cc #31333
2016-05-23Use libc::abort, not intrinsics::abort, in rtabort!Brian Campbell-2/+1
intrinsics::abort compiles down to an illegal instruction, which on Unix-like platforms causes the process to be killed with SIGILL. A more appropriate way to kill the process would be SIGABRT; this indicates better that the runtime has explicitly aborted, rather than some kind of compiler bug or architecture mismatch that SIGILL might indicate. For rtassert!, replace this with libc::abort. libc::abort raises SIGABRT, but is defined to do so in such a way that it will terminate the process even if SIGABRT is currently masked or caught by a signal handler that returns. On non-Unix platforms, retain the existing behavior. On Windows we prefer to avoid depending on the C runtime, and we need a fallback for any other platforms that may be defined. An alternative on Windows would be to call TerminateProcess, but this seems less essential than switching to using SIGABRT on Unix-like platforms, where it is common for the process-killing signal to be printed out or logged. This is a [breaking-change] for any code that depends on the exact signal raised to abort a process via rtabort! cc #31273 cc #31333
2016-05-21Auto merge of #33768 - Manishearth:rollup, r=Manishearthbors-6/+19
Rollup of 7 pull requests - Successful merges: #33578, #33679, #33743, #33746, #33747, #33750, #33757 - Failed merges:
2016-05-21Rollup merge of #33679 - Manishearth:rustdoc-readmore-impls, r=alexcrichtonManish Goregaokar-6/+19
rustdoc: Add doc snippets for trait impls, with a read more link The read more link only appears if the documentation is more than one line long. ![screenshot from 2016-05-17 06 54 14](https://cloud.githubusercontent.com/assets/1617736/15308544/4c2ba0ce-1bfc-11e6-9add-29de8dc7ac6e.png) It currently does not appear on non-defaulted methods, since you can document them directly. I could make it so that default documentation gets forwarded if regular docs don't exist. Fixes #33672 r? @alexcrichton cc @steveklabnik
2016-05-20Auto merge of #33625 - alexcrichton:rustbuild-moar-tests, r=aturonbors-0/+63
rustbuild: Touch up some test suites This adds in some missing test suites, primarily a few pretty suites. It also starts optimizing tests by default as the current test suite does, but also recognizes `--disable-optimize-tests`. Currently the optimization of tests isn't recognized by crate tests because Cargo doesn't support the ability to compile an unoptimized test suite against an optimized library. Perhaps a feature to add, though!
2016-05-20Auto merge of #33758 - GuillaumeGomez:rollup, r=Manishearthbors-13/+374
Rollup of 6 pull requests - Successful merges: #33668, #33676, #33683, #33734, #33739, #33745 - Failed merges: #33578
2016-05-20rustc: Fix again order-dependence in extern crateAlex Crichton-0/+63
Originally fixed in #29961 the bug was unfortunately still present in the face of crates using `#[macro_use]`. This commit refactors for the two code paths to share common logic to ensure that they both pick up the same bug fix. Closes #33762
2016-05-20Auto merge of #33378 - oli-obk:fix/registry_args, r=Manishearthbors-1/+1
fix Registry::args for plugins loaded with --extra-plugins r? @Manishearth
2016-05-20Rollup merge of #33739 - GuillaumeGomez:error-code-tests, r=ManishearthGuillaume Gomez-0/+284
Add new error code tests r? @steveklabnik
2016-05-20Rollup merge of #33734 - luqmana:33387-mir_fat_ptr_coerce, r=arielb1Guillaume Gomez-0/+44
[MIR] Add PointerCast for Unsize casts of fat pointers. Fixes #33387. r? @eddyb
2016-05-20Rollup merge of #33683 - sanxiyn:paren-span, r=nikomatsakisGuillaume Gomez-3/+34
Preserve span when lowering ExprKind::Paren Fix #33681.
2016-05-20Rollup merge of #33676 - rkruppe:e0509-exact-words, r=sanxiynGuillaume Gomez-10/+12
Reword the short diagnostic for E0509 Saying that a type *implements* a trait is much more idiomatic than saying it *defines* the trait.
2016-05-20Update testsManish Goregaokar-6/+19
2016-05-20Auto merge of #33553 - alexcrichton:cdylibs, r=brsonbors-0/+105
rustc: Add a new crate type, cdylib This commit is an implementation of [RFC 1510] which adds a new crate type, `cdylib`, to the compiler. This new crate type differs from the existing `dylib` crate type in a few key ways: * No metadata is present in the final artifact * Symbol visibility rules are the same as executables, that is only reachable `extern` functions are visible symbols * LTO is allowed * All libraries are always linked statically This commit is relatively simple by just plubming the compiler with another crate type which takes different branches here and there. The only major change is an implementation of the `Linker::export_symbols` function on Unix which now actually does something. This helps restrict the public symbols from a cdylib on Unix. With this PR a "hello world" `cdylib` is 7.2K while the same `dylib` is 2.4MB, which is some nice size savings! [RFC 1510]: https://github.com/rust-lang/rfcs/pull/1510 Closes #33132
2016-05-19rustc: Add a new crate type, cdylibAlex Crichton-0/+105
This commit is an implementation of [RFC 1510] which adds a new crate type, `cdylib`, to the compiler. This new crate type differs from the existing `dylib` crate type in a few key ways: * No metadata is present in the final artifact * Symbol visibility rules are the same as executables, that is only reachable `extern` functions are visible symbols * LTO is allowed * All libraries are always linked statically This commit is relatively simple by just plubming the compiler with another crate type which takes different branches here and there. The only major change is an implementation of the `Linker::export_symbols` function on Unix which now actually does something. This helps restrict the public symbols from a cdylib on Unix. With this PR a "hello world" `cdylib` is 7.2K while the same `dylib` is 2.4MB, which is some nice size savings! [RFC 1510]: https://github.com/rust-lang/rfcs/pull/1510 Closes #33132
2016-05-19Rollup merge of #33712 - jseyfried:fix_expanded_expr_span_bug, r=nrcManish Goregaokar-21/+23
Fix bug in macro expression spans Fix a bug in macro expression spans. r? @nrc
2016-05-19Rollup merge of #33708 - nham:zero-elided-lifetimes, r=sanxiynManish Goregaokar-0/+35
Only print parameters with elided lifetimes in elision error messages. When displaying the function parameters for a lifetime elision error message, this changes it to first filter out the parameters that don't have elided lifetimes. Fixes #30255.
2016-05-19Rollup merge of #33696 - nham:add-test-21225, r=luqmanaManish Goregaokar-0/+30
Add regression tests for error message when using enum variant as a type I'm guessing these were actually fixed with PR #27085. Closes #21225 Closes #19197
2016-05-19Add new error code testsggomez-0/+284
2016-05-19Reword the short diagnostic for E0509Robin Kruppe-10/+12
Saying that a type *implements* a trait is much more idiomatic than saying it *defines* the trait.
2016-05-19Auto merge of #33694 - arielb1:fuzzy-on-unimplemented, r=nikomatsakisbors-1/+58
implement fuzzy matching in on_unimplemented Fixes #31062 r? @nikomatsakis
2016-05-19[MIR] Add PointerCast for Unsize casts of fat pointers.Luqman Aden-0/+44
2016-05-18Auto merge of #33688 - jonathandturner:fix_old_school, r=nikomatsakisbors-24/+29
Fix for old school error issues, improvements to new school This PR: * Fixes some old school error issues, specifically #33559, #33543, #33366 * Improves wording borrowck errors with match patterns * De-emphasize multi-line spans, so we don't color the single source character when we're trying to say "span starts here" * Rollup of #33392 (which should help fix #33390) r? @nikomatsakis
2016-05-18Auto merge of #33686 - GuillaumeGomez:error-code-tests, r=steveklabnikbors-0/+121
Add new error code tests r? @steveklabnik
2016-05-18address review commentsAriel Ben-Yehuda-2/+2
2016-05-18implement fuzzy matching in on_unimplementedAriel Ben-Yehuda-1/+58
2016-05-19Be smart about span of parenthesized expression in macroSeo Sanghyeon-0/+31
2016-05-18basic tests for cross-crate hashingNiko Matsakis-0/+102
2016-05-18thread the DepGraph to session/crate-storeNiko Matsakis-6/+12
This is a [breaking-change] for plugin authors. You must now create a dep-graph earlier.
2016-05-18Fix code suggestion in testSeo Sanghyeon-3/+3
2016-05-18Fix tidy errorJonathan Turner-1/+1
2016-05-18Fix bug in macro expression spansJeffrey Seyfried-21/+23
2016-05-18Add new error code testsggomez-0/+121
2016-05-18Only print parameters with elided lifetimes in elision error messages.Nick Hamann-0/+35
When displaying the function parameters for a lifetime elision error message, this changes it to first filter out the parameters that don't have elided lifetimes. Fixes #30255.
2016-05-17Auto merge of #33137 - ↵bors-5/+264
nikomatsakis:issue-32330-lbr-in-return-type-warning-2, r=aturon Warnings for issue #32330 This is an extension of the previous PR that issues warnings in more situations than before. It does not handle *all* cases of #32330 but I believe it issues warnings for all cases I've seen in practice. Before merging I'd like to address: - open a good issue explaining the problem and how to fix it (I have a [draft writeup][]) - work on the error message, which I think is not as clear as it could/should be (suggestions welcome) r? @aturon [draft writeup]: https://gist.github.com/nikomatsakis/631ec8b4af9a18b5d062d9d9b7d3d967
2016-05-17warn for where/return-types that reference regionsNiko Matsakis-5/+264
This is a step towards fixing #32330. The full fix would be a breaking change, so we begin by issuing warnings for scenarios that will break.
2016-05-17Add regression tests for error message when using enum variant as a typeNick Hamann-0/+30
I'm guessing these were actually fixed with PR #27085. Closes #21225 Closes #19197
2016-05-17Improve a few errors and fix #33366Jonathan Turner-24/+29
2016-05-16Auto merge of #33491 - arielb1:obligation-jungle, r=nikomatsakisbors-74/+49
Replace the obligation forest with a graph In the presence of caching, arbitrary nodes in the obligation forest can be merged, which makes it a general graph. Handle it as such, using cycle-detection algorithms in the processing. I should do performance measurements sometime. This was pretty much written as a proof-of-concept. Please help me write this in a less-ugly way. I should also add comments explaining what is going on. r? @nikomatsakis
2016-05-16Auto merge of #33588 - nikomatsakis:compiletest-ui, r=acrichtobors-0/+152
add UI testing framework This adds a framework for capturing and tracking the precise output of rustc, which allows us to check all manner of minor details with the output. It's pretty strict right now -- the output must match almost exactly -- and hence maybe a bit too strict. But I figure we can add wildcards or whatever later. There is also a script intended to make updating the references easy, though the script could make things a *bit* easier (in particular, it'd be nice if it would find the build directory for you automatically). One thing I was wondering about is the best way to test colors. Since windows doesn't embed those in the output stream, this test framework can't test colors on windows -- so I figure we can just write tests that are ignored on windows and which pass `--color=always` or whatever to rustc. cc @jonathandturner r? @alexcrichton
2016-05-16pacify the mercilous tidyNiko Matsakis-1/+20
2016-05-16change on_unimplented logicAriel Ben-Yehuda-0/+2
2016-05-16Auto merge of #33640 - lucab:to-upstream/tcp-stress, r=alexcrichtonbors-9/+15
test: explicitely check the number of spawned threads in tcp-stress System limits may restrict the number of threads effectively spawned by this test (eg. systemd recently introduced a 512 tasks per unit maximum default). Now this test explicitly asserts on the expected number of threads, making failures due to system limits easier to spot. More details at https://bugs.debian.org/822325