summary refs log tree commit diff
path: root/src/test/compile-fail
AgeCommit message (Collapse)AuthorLines
2015-10-16check upvars in closures that are in staticsAriel Ben-Yehuda-0/+37
Fixes #27890 Fixes #28099 Fixes #28113
2015-10-16Warn on `pub extern crate`.Nick Cameron-0/+18
Temporary 'fix' for #26775
2015-10-16don't crash when there are multiple conflicting implementations of DropAriel Ben-Yehuda-0/+23
Fixes #28568
2015-10-16show each object-safety violation onceAriel Ben-Yehuda-0/+23
different supertraits can suffer from the same object-safety violation, leading to duplication in the error message. Avoid it. Fixes #20692
2015-10-16deduplicate trait errors before they are displayedAriel Ben-Yehuda-39/+36
Because of type inference, duplicate obligations exist and cause duplicate errors. To avoid this, only display the first error for each (predicate,span). The inclusion of the span is somewhat bikesheddy, but *is* the more conservative option (it does not remove some instability, as duplicate obligations are ignored by `duplicate_set` under some inference conditions). Fixes #28098 cc #21528 (is it a dupe?)
2015-10-16rustc: Don't lint about isize/usize in FFIAlex Crichton-28/+8
This lint warning was originally intended to help against misuse of the old Rust `int` and `uint` types in FFI bindings where the Rust `int` was not equal to the C `int`. This confusion no longer exists (as Rust's types are now `isize` and `usize`), and as a result the need for this lint has become much less over time. Additionally, starting with [the RFC for libc][rfc] it's likely that `isize` and `usize` will be quite common in FFI bindings (e.g. they're the definition of `size_t` and `ssize_t` on many platforms). [rfc]: https://github.com/rust-lang/rfcs/pull/1291 This commit disables these lints to instead consider `isize` and `usize` valid types to have in FFI signatures.
2015-09-15Auto merge of #28406 - petrochenkov:primitive, r=eddybbors-0/+2
This was missing from https://github.com/rust-lang/rust/pull/27451 r? @eddyb
2015-09-15Auto merge of #28395 - ebfull:fix-associated-item-resolution, r=arielb1bors-0/+51
Fixes #28344
2015-09-15Auto merge of #28351 - jonas-schievink:macro-bt, r=nrcbors-16/+19
The second commit in this PR will stop printing the macro definition site in backtraces, which cuts their length in half and increases readability (the definition site was only correct for local macros). The third commit will not print an invocation if the last one printed occurred at the same place (span). This will make backtraces caused by a self-recursive macro much shorter. (A possible alternative would be to capture the backtrace first, then limit it to a few frames at the start and end of the chain and print `...` inbetween. This would also work with multiple macros calling each other, which is not addressed by this PR - although the backtrace will still be halved) Example: ```rust macro_rules! m { ( 0 $($t:tt)* ) => ( m!($($t)*); ); () => ( fn main() {0} ); } m!(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0); ``` On a semi-recent nightly, this yields: ``` test.rs:3:21: 3:22 error: mismatched types: expected `()`, found `_` (expected (), found integral variable) [E0308] test.rs:3 () => ( fn main() {0} ); ^ test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:2:23: 2:34 note: expansion site test.rs:1:1: 4:2 note: in expansion of m! test.rs:6:1: 6:35 note: expansion site test.rs:3:21: 3:22 help: run `rustc --explain E0308` to see a detailed explanation error: aborting due to previous error ``` After this patch: ``` test.rs:3:21: 3:22 error: mismatched types: expected `()`, found `_` (expected (), found integral variable) [E0308] test.rs:3 () => ( fn main() {0} ); ^ test.rs:2:23: 2:34 note: in this expansion of m! test.rs:6:1: 6:35 note: in this expansion of m! test.rs:3:21: 3:22 help: run `rustc --explain E0308` to see a detailed explanation error: aborting due to previous error ```
2015-09-15Prohibit renaming to primitive types' names in import listsVadim Petrochenkov-0/+2
2015-09-14Auto merge of #28396 - arielb1:misplaced-binding, r=eddybbors-0/+31
Technically a [breaking-change], but the broken code is useless, like `i32<Param=()>`. Fixes #24682 r? @eddyb
2015-09-13Added test for partially supplied type params in which remaining reference ↵Sean Bowe-0/+2
non-existant self
2015-09-14Auto merge of #28383 - semarie:openbsd-jemalloc, r=alexcrichtonbors-0/+2
ignore severals tests under openbsd as we have disabling jemalloc under this target. r? @alexcrichton
2015-09-13Auto merge of #28178 - christopherdumas:fix_ice, r=nikomatsakisbors-0/+18
This fixes the ICE, and makes it just a compiler error/warning. I'm not exactly sure that's whats wanted, so tell me if it isn't.
2015-09-13ensure projections are prohibited when type parameters areAriel Ben-Yehuda-0/+31
Technically a [breaking-change], but the broken code is useless, like `i32<Param=()>`. Fixes #24682
2015-09-13Fixed regression in associated item resolution with default type parameters ↵Sean Bowe-0/+49
that reference Self in traits.
2015-09-12disable jemalloc tests for openbsdSébastien Marie-0/+2
ignore severals tests under openbsd as we have disabling jemalloc under this target.
2015-09-11Fixed testchristopherdumas-1/+3
2015-09-10Added testchristopherdumas-0/+16
2015-09-10Don't print the macro definition site in backtracesJonas Schievink-16/+19
This halves the backtrace length. The definition site wasn't very useful anyways, since it may be invalid (for compiler expansions) or located in another crate. Since the macro name is still printed, grepping for it is still an easy way of finding the definition.
2015-09-10Add test for #17994Andrew Paseltiner-0/+13
Closes #17994.
2015-09-10Add tests for #22638, #22872, #23024, #23046Andrew Paseltiner-0/+156
Closes #22638. Closes #22872. Closes #23024. Closes #23046.
2015-09-09Auto merge of #28299 - apasel422:tests, r=alexcrichtonbors-0/+30
Closes #17001 Closes #21449 Closes #22992 Closes #23208 Closes #23442
2015-09-09Auto merge of #28300 - Manishearth:crate_err, r=eddybbors-0/+33
Partially fixes #22750 I'll write a test for this when I figure out how to. r? @eddyb cc @steveklabnik
2015-09-08Add tests for #17001, #21449, #22992, #23208, #23442Andrew Paseltiner-0/+30
Closes #17001 Closes #21449 Closes #22992 Closes #23208 Closes #23442
2015-09-09Print correct crate nameManish Goregaokar-2/+2
2015-09-09Add testManish Goregaokar-0/+33
2015-09-08Auto merge of #28291 - nrc:shr_span_fix, r=sfacklerbors-0/+20
2015-09-08Fix span bug with >> and type bindingsNick Cameron-0/+20
2015-09-08Auto merge of #28246 - huonw:lang-tracking-issues, r=alexcrichtonbors-1/+1
This is similar to the libs version, which allow an `issue` field in the `#[unstable]` attribute. cc #28244
2015-09-08Allow tracking issues for lang features.Huon Wilson-1/+1
This is similar to the libs version, which allow an `issue` field in the `#[unstable]` attribute. cc #28244
2015-09-06add MIR code (unused thus far)Niko Matsakis-1/+1
2015-09-06generalize graphviz library to handle HTML tags and other such thingsNiko Matsakis-2/+2
2015-09-04Auto merge of #28170 - nagisa:loopctl-label-spans, r=alexcrichtonbors-14/+29
r? @alexcrichton
2015-09-03Rollup merge of #28167 - petrochenkov:bytelit, r=nikomatsakisSteve Klabnik-2/+2
Avoid confusion with binary integer literals and binary operator expressions in libsyntax
2015-09-03Fixes #27886 -- bitrig does not use jemalloc (yet)Dave Huseby-0/+2
2015-09-03Use consistent terminology for byte string literalsVadim Petrochenkov-2/+2
Avoid confusion with binary integer literals and binary operator expressions in libsyntax
2015-09-03Fix hygienic-label-x testsSimonas Kazlauskas-4/+4
2015-09-03Fix #28105 test and add a test for #28109Simonas Kazlauskas-10/+25
2015-09-01Auto merge of #28132 - arielb1:uninstantiable, r=nikomatsakisbors-14/+0
It is *very* easy to bypass, and is a relic of a bygone age where the type-checker was *much* less robust. Fixes #27497 r? @nikomatsakis
2015-08-31Auto merge of #28079 - huonw:simd, r=alexcrichtonbors-7/+18
This adds a new Python script (compatible with 2.7 and 3.x) that will consume some JSON files that define a platform's intrinsics. It can output a file that defines the intrinsics in the compiler, or an `extern` block that will import them. The complexity of the generator is to be DRY: platforms (especially ARM and AArch64) have a lot of repetition with their intrinsics, for different versions with different types, so being able to write it once is nice.
2015-08-31remove the is_instantiable checkAriel Ben-Yehuda-14/+0
Fixes #27497
2015-08-31Auto merge of #28103 - GuillaumeGomez:fix-intrinsic, r=huonwbors-0/+24
Fixes #28062
2015-08-30Assign correct span to continue expressionMarcus Klaas-0/+23
Fixes https://github.com/rust-lang/rust/issues/28105.
2015-08-30Add compile-fail test for E0444Guillaume Gomez-0/+24
2015-08-29Separate integers into signed and unsigned.Huon Wilson-7/+18
This is necessary to reflect the ARM APIs accurately, since some functions explicitly take an unsigned parameter and a signed one, of the same integer shape, so the no-duplicates check will fail unless we distinguish.
2015-08-29Handle gateage of built-in attributes seperatelyJonas Schievink-0/+17
This allows marking attributes as whitelisted/crate-only independent of their feature gate status. Closes #24213
2015-08-27Auto merge of #28001 - arielb1:dtor-fixes, r=pnkfelixbors-3/+5
r? @pnkfelix
2015-08-25use the parameter environment when checking dtorsAriel Ben-Yehuda-3/+5
This makes it more uniform. No functional changes.
2015-08-24Mark main-like functions allow(dead_code) in testsWilliam Throwe-0/+17
Fixes #12327.