Commit graph

699 commits

Author SHA1 Message Date
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Nikita Popov
97e1d36937 Fix two run-fail tests for asmjs
Use eprintln!() to make sure stdio is flushed.
2018-11-04 18:50:57 +01:00
Oliver Schneider
ec74d3533a Stabilize min_const_fn 2018-10-05 10:36:14 +02:00
Oliver Schneider
d125e904b5 Restrict most uses of const_fn to min_const_fn 2018-08-31 08:40:00 +02:00
Matthias Krüger
71120ef1e5 Fix typos found by codespell. 2018-08-19 17:41:28 +02:00
varkor
120989195f Convert unknown_features lint into an error 2018-08-05 15:54:49 +01:00
varkor
61b9d87c28 Fix test/run-fail 2018-08-05 15:54:49 +01:00
David Wood
aeb1682894
Ensure that borrows wind up unactivated. 2018-07-04 21:35:38 +01:00
Fabian Zaiser
96004899be Fix tests 2018-06-05 10:35:44 +02:00
gnzlbg
729c22e797 move simd-minmax-test to run-pass; require llvm 7 2018-05-24 16:04:38 +02:00
Oliver Schneider
8753d0f12f Overflows only panic in debug mode 2018-05-19 13:10:52 +02:00
Oliver Schneider
d81651e8e9 Release mode overflows should not cause const eval to error 2018-05-19 13:10:51 +02:00
bors
a722296b6e Auto merge of #50653 - oli-obk:bad_const, r=cramertj
Make the `const_err` lint `deny`-by-default

At best these things are runtime panics (debug mode) or overflows (release mode). More likely they are public constants that are unused in the crate declaring them.

This is not a breaking change, as dependencies won't break and root crates can `#![warn(const_err)]`, though I don't know why anyone would do that.
2018-05-18 17:17:35 +00:00
Irina Popa
b63d7e2b1c Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
Oliver Schneider
1788af357a
Make the const_err lint deny-by-default 2018-05-12 16:21:02 +02:00
Christian Poveda
0efb5677d7 dyn_trait feature-gate just for stage0 2018-04-27 10:04:58 -05:00
kennytm
42b6d4653a
Add back missing #![feature(never_type)]s 2018-04-21 15:18:13 +08:00
Guillaume Gomez
812656dc95 Rename must-compile-successfully into compile-pass 2018-04-13 23:28:03 +02:00
Niko Matsakis
40a1ee8efa
add failure-status: 1 to the test 2018-04-05 19:01:45 -04:00
Shotaro Yamada
dc9128fff8 Fix ICE with main's return type containing lifetimes 2018-04-06 00:39:36 +09:00
gnzlbg
56aaf344c4 fix tests 2018-03-26 10:20:41 +02:00
gnzlbg
48fd903eae set min-llvm-version 6.0, ignore-emscripten 2018-03-26 10:20:41 +02:00
gnzlbg
d2cd57c8ff add tests 2018-03-26 10:20:41 +02:00
Tyler Mandry
97b3bf99f6 Stabilize termination_trait
This stabilizes `main` with non-() return types; see #48453.
2018-03-19 01:31:04 -05:00
Andrew Cann
a9fc3901b0 stabilise feature(never_type)
Replace feature(never_type) with feature(exhaustive_patterns).
feature(exhaustive_patterns) only covers the pattern-exhaustives checks
that used to be covered by feature(never_type)
2018-03-14 12:44:51 +08:00
Niko Matsakis
e0ed88df3d add test for fn main() -> ! 2018-02-22 20:10:36 -05:00
Brad Gibson
7948afdc53 changed termination_trait's bound from Error to Debug; added compiletest header command and appropriate tests 2018-02-12 13:52:49 -08:00
Ed Schouten
3f880912e9 Add 'ignore-cloudabi' to tests that don't and won't build on CloudABI.
It looks like many of these tests are already disabled on emscripten,
which also doesn't seem to support environment variables and subprocess
spawning. Just add a similar tag for CloudABI. While there, sort some of
the lists of operating systems alphabetically.
2018-01-02 14:11:41 +01:00
kennytm
470a8e1a97
Remove excessive trailing newlines. 2017-12-30 15:50:52 +08:00
Alex Crichton
855f6d1483 rustc: Prepare to enable ThinLTO by default
This commit prepares to enable ThinLTO and multiple codegen units in release
mode by default. We've still got a debuginfo bug or two to sort out before
actually turning it on by default.
2017-11-30 07:17:53 -08:00
est31
755fa9c23e Update tests for -Zborrowck-mir -> -Zborrowck=mode migration 2017-11-26 16:39:15 +01:00
Keith Yeung
0996bb0901 Kill the storage for all locals on returning terminators 2017-11-24 12:00:59 -08:00
Eduard-Mihai Burtescu
1a7fb7dc78 rustc_typeck: use subtyping on the LHS of binops. 2017-10-31 17:34:46 +02:00
Corey Farwell
8ef5447815 Migrate to eprint/eprintln macros where appropriate. 2017-09-28 11:38:35 -04:00
kennytm
4962f9d725
Relaxed error pattern, and add test for SystemTime as well. 2017-09-10 12:35:47 +08:00
kennytm
8410ca6632
Properly detect overflow in Instance +/- Duration.
Avoid unchecked cast from `u64` to `i64`. Use `try_into()` for checked
cast. (On Unix, cast to `time_t` instead of `i64`.)
2017-09-07 17:14:27 +08:00
topecongiro
04aa5c1c76 Add tests for issues with the E-needstest label 2017-07-25 12:23:16 +09:00
Giles Cope
1ec1b1f1eb updated assert_eq test, fixed incorrect assert_ne message and added test. 2017-06-13 14:17:59 +01:00
Mark Simulacrum
f48a8f592d Unignore tests which work fine now. 2017-04-28 22:31:10 -06:00
Josh Driver
fb5ccf80fe Warn when a #[should_panic] test has an unexpected message 2016-11-18 21:01:19 +10:30
Vadim Petrochenkov
4a91a80b26 Fix some pretty printing tests 2016-10-18 23:23:40 +03:00
Brian Anderson
21b987ea08 Unignore some working emscripten tests 2016-09-30 14:02:58 -07:00
Brian Anderson
37abec06e5 Tidy 2016-09-30 14:02:51 -07:00
Ross Schulman
b2dfeac690 Adding ignore-emscripten to failing tests. 2016-09-30 14:02:44 -07:00
bors
cbd84aeb73 Auto merge of #34942 - porglezomp:master, r=sfackler
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-19 19:03:52 -07:00
Ulrik Sverdrup
a4ee9c6e96 core: Use primitive indexing in slice's Index/IndexMut
[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-09-14 20:19:35 +02:00
bors
e9bc1bac8c Auto merge of #35764 - eddyb:byegone, r=nikomatsakis
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-24 14:57:34 -07:00
Eduard Burtescu
cb9b0ed91b Disable old trans access via -Z orbit, #[rustc_no_mir] or --disable-orbit. 2016-08-24 13:23:37 +03:00
Alex Burka
702ea7169c typeck: use NoExpectation to check return type of diverging fn
This fixes #35849, a regression introduced by the typeck refactoring
around TyNever/!.
2016-08-23 16:58:49 +00:00
Andrew Cann
29f3636282 Add explanations to tests 2016-08-13 21:37:09 +08:00