about summary refs log tree commit diff
path: root/src/test/run-fail
AgeCommit message (Collapse)AuthorLines
2017-09-28Migrate to eprint/eprintln macros where appropriate.Corey Farwell-26/+14
2017-09-10Relaxed error pattern, and add test for SystemTime as well.kennytm-2/+38
2017-09-07Properly detect overflow in Instance +/- Duration.kennytm-0/+36
Avoid unchecked cast from `u64` to `i64`. Use `try_into()` for checked cast. (On Unix, cast to `time_t` instead of `i64`.)
2017-07-25Add tests for issues with the E-needstest labeltopecongiro-0/+20
2017-06-13updated assert_eq test, fixed incorrect assert_ne message and added test.Giles Cope-1/+20
2017-04-28Unignore tests which work fine now.Mark Simulacrum-1/+0
2016-11-18Warn when a #[should_panic] test has an unexpected messageJosh Driver-0/+38
2016-10-18Fix some pretty printing testsVadim Petrochenkov-41/+0
2016-09-30Unignore some working emscripten testsBrian Anderson-1/+0
2016-09-30TidyBrian Anderson-2/+2
2016-09-30Adding ignore-emscripten to failing tests.Ross Schulman-0/+7
2016-09-19Auto merge of #34942 - porglezomp:master, r=sfacklerbors-0/+16
Fix overflow checking in unsigned pow() The pow() method for unsigned integers produced 0 instead of trapping overflow for certain inputs. Calls such as 2u32.pow(1024) produced 0 when they should trap an overflow. This also adds tests for the correctly handling overflow in unsigned pow(). This was previously fixed for signed integers in #28248, but it seems unsigned integers got missed that time. For issue number #34913
2016-09-14core: Use primitive indexing in slice's Index/IndexMutUlrik Sverdrup-1/+1
[T]'s Index implementation is normally not used for indexing, instead the compiler supplied indexing is used. Use the compiler supplied version in Index/IndexMut. This removes an inconsistency: Compiler supplied bound check failures look like this: thread 'main' panicked at 'index out of bounds: the len is 3 but the index is 4' If you convince Rust to use the Index impl for slices, bounds check failure looks like this instead: thread 'main' panicked at 'assertion failed: index < self.len()' The latter is used if you for example use Index generically:: use std::ops::Index; fn foo<T: ?Sized>(x: &T) where T: Index<usize> { &x[4]; } foo(&[1, 2, 3][..])
2016-08-24Auto merge of #35764 - eddyb:byegone, r=nikomatsakisbors-32/+5
Remove the old AST-based backend from rustc_trans. Starting with Rust 1.13, `--disable-orbit` , `-Z orbit=off` and `#[rustc_no_mir]` have been removed. Only the new MIR backend is left in the compiler, and only early const_eval uses ASTs from other crates. Filling drop (previously "zeroing drop"), `#[unsafe_no_drop_flag]` and associated unstable APIs are gone. Implementing `Drop` doesn't add a flag anymore to the type, all of the dynamic drop is function local. This is a [breaking-change], please use `Option::None` and/or `mem::forget` if you are unsure about your ability to prevent/control the drop of a value. In the future, `union` will be usable in some such cases. **NOTE**: DO NOT MERGE before we get the new beta as the stage0, there's some cruft to remove. All of this will massively simplify any efforts to implement (and as such it blocks) features such as `union`s, safe use of `#[packed]` or new type layout optimizations, not to mention many other experiments.
2016-08-24Disable old trans access via -Z orbit, #[rustc_no_mir] or --disable-orbit.Eduard Burtescu-32/+5
2016-08-23typeck: use NoExpectation to check return type of diverging fnAlex Burka-0/+1
This fixes #35849, a regression introduced by the typeck refactoring around TyNever/!.
2016-08-13Add explanations to testsAndrew Cann-0/+12
2016-08-13Permit `! as T` with testAndrew Cann-0/+18
2016-08-13Add tests for ! typeAndrew Cann-0/+81
2016-08-13Add some tests for ! typeAndrew Cann-0/+26
2016-08-13Rename empty/bang to neverAndrew Cann-3/+1
Split Ty::is_empty method into is_never and is_uninhabited
2016-08-13Control usage of `!` through a feature gate.Andrew Cann-0/+1
Adds the `bang_type` feature gate. `!` in a non-return-type position now relies on that feature.
2016-08-13Add run-fail/adjust_empty.rs testAndrew Cann-0/+18
2016-08-06Change the expected panic message for unsignedCaleb Jones-1/+1
2016-08-06Fix overflow checking in unsigned pow()Caleb Jones-0/+16
The pow() method for unsigned integers produced 0 instead of trapping overflow for certain inputs. Calls such as 2u32.pow(1024) produced 0 when they should trap an overflow. This also adds tests for the correctly handling overflow in unsigned pow(). For issue number #34913
2016-08-04Update wording on E0080Shantanu Raj-17/+17
Change "attempted" to "attempt"
2016-06-07Rollup merge of #33897 - srinivasreddy:runfail_rustfmt, r=nrcSteve Klabnik-107/+278
run rustfmt on test/run-fail folder
2016-06-06run rustfmt on test/run-fail folderSrinivas Reddy Thatiparthy-107/+278
2016-06-05trans: use the same messages for both MIR and old arithmetic checks.Eduard Burtescu-15/+15
2016-06-05Enable the overflow-related tests for MIRJames Miller-32/+0
2016-06-04Auto merge of #33622 - arielb1:elaborate-drops, r=nikomatsakisbors-0/+47
[MIR] non-zeroing drop This enables non-zeroing drop through stack flags for MIR. Fixes #30380. Fixes #5016.
2016-06-04fix translation of terminators in MSVC cleanup blocksAriel Ben-Yehuda-0/+3
MSVC requires unwinding code to be split to a tree of *funclets*, where each funclet can only branch to itself or to to its parent. Luckily, the code we generates matches this pattern. Recover that structure in an analyze pass and translate according to that.
2016-06-03Auto merge of #33803 - WiSaGaN:feature/rename-main-thread, r=alexcrichtonbors-18/+18
Rename main thread from "<main>" to "main". Fix issue #33789 We may need to discuss whether this counts as a breaking change since code may check the main thread name against "\<main\>". Discussion is in #33789
2016-06-03implement drop elaborationAriel Ben-Yehuda-0/+44
Fixes #30380
2016-05-30std: Clean out old unstable + deprecated APIsAlex Crichton-9/+12
These should all have been deprecated for at least one cycle, so this commit cleans them all out.
2016-05-22Rename main thread from "<main>" to "main".Wangshan Lu-18/+18
Fix issue #33789
2016-03-17Add #[rustc_no_mir] to make tests pass with -Z orbit.Eduard Burtescu-0/+66
2016-03-03Auto merge of #32007 - nikomatsakis:compiletest-incremental, r=alexcrichtonbors-0/+43
This PR extends compiletest to support **test revisions** and with a preliminary **incremental testing harness**. run-pass, compile-fail, and run-fail tests may be tagged with ``` // revisions: a b c d ``` This will cause the test to be re-run four times with `--cfg {a,b,c,d}` in turn. This means you can write very closely related things using `cfg`. You can also configure the headers/expected-errors by writing `//[foo] header: value` or `//[foo]~ ERROR bar`, where `foo` is the name of your revision. See the changes to `coherence-cow.rs` as a proof of concept. The main point of this work is to support the incremental testing harness. This PR contains an initial, unused version. The code that uses it will land later. The incremental testing harness compiles each revision in turn, and requires that the revisions have particular names (e.g., `rpass2`, `cfail3`), which tell it whether a particular revision is expected to compile or not. Two questions: - Is there compiletest documentation anywhere I can update? - Should I hold off on landing the incremental testing harness until I have the code to exercise it? (That will come in a separate PR, still fixing a few details) r? @alexcrichton cc @rust-lang/compiler <-- new testing capabilities
2016-03-02add a run-fail meta testNiko Matsakis-0/+43
2016-02-24Fix testsSimonas Kazlauskas-21/+25
2016-02-24Add some tests for dynamic droppingSimonas Kazlauskas-0/+123
2016-02-17MSVC SEH in MIR is implemented hereSimonas Kazlauskas-4/+0
2016-02-06Ignore a test on MSVCSimonas Kazlauskas-0/+2
The MSVC SEH is still not implemented, so we go ahead and ignore it.
2016-02-04Translation part of drop panic recoverySimonas Kazlauskas-0/+34
With this commit we now finally execute all the leftover drops once some drop panics for some reason!
2016-01-29Get tests working on MSVC 32-bitAlex Crichton-0/+10
2016-01-06Add testsSimonas Kazlauskas-0/+277
2015-12-23Implement custom panic handlersSteven Fackler-0/+64
2015-12-08add tests for ensuring const indexing does not cause compile-time errors in ↵Oliver Schneider-0/+37
runtime code
2015-10-28Move test file to run-fail, since it does an unwrapNiko Matsakis-0/+28
2015-10-13implement RFC 1229Oliver Schneider-39/+20
const eval errors outside of true constant enviroments are not reported anymore, but instead forwarded to a lint.