about summary refs log tree commit diff
path: root/src/test/compile-fail
AgeCommit message (Collapse)AuthorLines
2013-05-14Use static string with fail!() and remove fail!(fmt!())Björn Steinbrink-8/+8
fail!() used to require owned strings but can handle static strings now. Also, it can pass its arguments to fmt!() on its own, no need for the caller to call fmt!() itself.
2013-05-13Remove re-exports from libcore/core.rcAlex Crichton-1/+1
Also fix up all the fallout elsewhere throughout core. It's really nice being able to have the prelude.
2013-05-13auto merge of #6387 : brson/rust/unstable, r=brsonbors-1/+1
r? @pcwalton * Move `SharedMutableState`, `LittleLock`, and `Exclusive` from `core::unstable` to `core::unstable::sync` * Modernize the `SharedMutableState` interface with methods * Rename `SharedMutableState` to `UnsafeAtomicRcBox` to match `RcBox`.
2013-05-13auto merge of #6417 : pcwalton/rust/exprs-in-patterns, r=pcwaltonbors-5/+7
r? @graydon
2013-05-13core: Move locks, atomic rc to unstable::syncBrian Anderson-1/+1
2013-05-13Better error for some unresolved importsCorey Richardson-1/+1
When trying to import nonexistent items from existing modules, specify that that is what happened, rather than just reporting "unresolved name".
2013-05-12auto merge of #6400 : cmr/rust/remove_useless_import_error, r=thestingerbors-2/+1
Every unresolved import is reported. An additional error message isn't useful and obscures (imo) the real errors: I need to take it into account when looking at the error count.
2013-05-12actually fix failing testCorey Richardson-1/+1
2013-05-12librustc: Make `self` and `static` into keywordsPatrick Walton-3/+3
2013-05-12libsyntax: Remove `extern mod foo { ... }` from the language.Patrick Walton-2/+4
2013-05-12auto merge of #6427 : catamorphism/rust/issue-6319, r=nikomatsakisbors-1/+15
r? @nikomatsakis In #6319, several people mentioned they ran into a "computing fictitious type" ICE in trans. This turns out to be because some of my recent changes to typeck::check::_match resulted in type errors getting reported with ty_err as the expected type, which meant the errors were suppressed, and typechecking incorrectly succeeded (since the errors weren't recorded). Changed the error messages in these cases not to use an expected type at all, rather, printing out a string describing the type that was expected (which is what the code originally did). The result is a bit repetitive and the proliferation of error-reporting functions in typeck::infer is a bit annoying, but I thought it was important to fix this now; more cleanup can happen later.
2013-05-12Fix failing testCorey Richardson-2/+1
2013-05-11rustc: Don't call type_error_message() with ty_err as the expected typeTim Chevalier-1/+15
In #6319, several people mentioned they ran into a "computing fictitious type" ICE in trans. This turns out to be because some of my recent changes to typeck::check::_match resulted in type errors getting reported with ty_err as the expected type, which meant the errors were suppressed, and typechecking incorrectly succeeded (since the errors weren't recorded). Changed the error messages in these cases not to use an expected type at all, rather, printing out a string describing the type that was expected (which is what the code originally did). The result is a bit repetitive and the proliferation of error-reporting functions in typeck::infer is a bit annoying, but I thought it was important to fix this now; more cleanup can happen later.
2013-05-11auto merge of #6402 : kud1ing/rust/fixes, r=pcwaltonbors-20/+20
2013-05-11auto merge of #6385 : huonw/rust/rustc-dtor-struct-match, r=nikomatsakisbors-1/+30
**Caveat**: With the current commit, this check only works for `match`s, the checks (incorrectly) do not run for patterns in `let`s, and invalid/unsafe code compiles. I don't know how to fix this, I experimented with some things to try to make let patterns and match patterns run on the same code (since this would presumably fix many of the other unsoundness issues of let-patterns, e.g. #6225), but I don't understand enough of the code. (I think I heard someone talking about a fix for `let` being in progress?) Fixes #6344 and #6341.
2013-05-10Stop using the '<->' operatorAlex Crichton-60/+1
2013-05-10auto merge of #6223 : alexcrichton/rust/issue-6183, r=pcwaltonbors-6/+8
Closes #6183. The first commit changes the compiler's method of treating a `for` loop, and all the remaining commits are just dealing with the fallout. The biggest fallout was the `IterBytes` trait, although it's really a whole lot nicer now because all of the `iter_bytes_XX` methods are just and-ed together. Sadly there was a huge amount of stuff that's `cfg(stage0)` gated, but whoever lands the next snapshot is going to have a lot of fun deleting all this code!
2013-05-10test: Use the new `for` protocolAlex Crichton-6/+8
2013-05-10more back-ticks, less colonsLenny222-20/+20
2013-05-10auto merge of #6366 : catamorphism/rust/issue-3920, r=catamorphismbors-0/+17
r? @nikomatsakis as per #3920
2013-05-10auto merge of #6329 : sonwow/rust/issue-6306, r=ILyoanbors-2/+2
Fix for #6306
2013-05-10Issue number on xfailed testHuon Wilson-1/+1
2013-05-10auto merge of #6356 : dotdash/rust/strinterner, r=pcwaltonbors-6/+6
&str can be turned into @~str on demand, using to_owned(), so for strings, we can create a specialized interner that accepts &str for intern() and find() but stores and returns @~str.
2013-05-10librustc: allow destructuring of structs with destructors if the pattern has ↵Huon Wilson-1/+30
no moves. This check only works for `match`s, the checks (incorrectly) do not run for patterns in `let`s.
2013-05-10A test file is fixedYoungsoo Son-2/+2
2013-05-10auto merge of #6347 : cmr/rust/unknown_module_resolve_error, r=catamorphismbors-1/+13
This improves error reporting for the following class of imports: ```rust use foo::bar; ``` Where foo, the topmost module, is unresolved. It now results in: ```text /tmp/foo.rs:1:4: 1:7 error: unresolved import. perhapsyou forgot an 'extern mod foo'? /tmp/foo.rs:1 use foo::bar; ^~~ /tmp/foo.rs:1:4: 1:12 error: failed to resolve import: foo::bar /tmp/foo.rs:1 use foo::bar; ^~~~~~~~ error: failed to resolve imports error: aborting due to 3 previous errors ``` This is the first of a series of changes I plan on making to unresolved name error messages.
2013-05-09auto merge of #6336 : nikomatsakis/rust/issue-6308-closure-bounds, ↵bors-30/+1
r=nikomatsakis Use a bitset to represent built-in bounds. There are several places in the language where only builtin bounds (aka kinds) will be accepted, e.g. on closures, destructor type parameters perhaps, and on trait types. r? @brson
2013-05-09fix formating and testsCorey Richardson-1/+1
2013-05-09compile-fail test for new unresolved import errorCorey Richardson-0/+12
2013-05-09testsuite: Test that init and forget are both unsafeTim Chevalier-0/+17
2013-05-09Refactor representation of bounds to separate out BuiltinBounds intoNiko Matsakis-30/+1
its own type. Use a bitset to represent built-in bounds. There are several places in the language where only builtin bounds (aka kinds) will be accepted, e.g. on closures, destructor type parameters perhaps, and on trait types.
2013-05-09back-ticksLenny222-1/+1
2013-05-09Use a specialized string interner to reduce the need for owned stringsBjörn Steinbrink-6/+6
&str can be turned into @~str on demand, using to_owned(), so for strings, we can create a specialized interner that accepts &str for intern() and find() but stores and returns @~str.
2013-05-09auto merge of #6345 : seanmoon/rust/fix-typos, r=sanxiynbors-4/+4
Hi there, Really enjoying Rust. Noticed a few typos so I searched around for a few more--here's some fixes. Ran `make check` and got `summary of 24 test runs: 4868 passed; 0 failed; 330 ignored`. Thanks! Sean
2013-05-08test: Fix broken testPatrick Walton-1/+1
2013-05-08test: Fix tests.Patrick Walton-14/+14
2013-05-08auto merge of #6214 : sanxiyn/rust/simd-2, r=graydonbors-0/+13
At the moment this only includes type checking and there is no code generation support yet. I wanted to get the design reviewed first. From discussion with @graydon at #5841, re-implemented as `#[simd]` attribute on structs. Progressing towards #3499.
2013-05-08auto merge of #6119 : brson/rust/main, r=brsonbors-9/+11
r? @ILyoan This pulls all the logic for discovering the crate entry point into a new pass (out of resolve and typeck), then changes it so that main is only looked for at the crate level (`#[main]` can still be used anywhere). I don't understand the special android logic here and worry that I may have broken it.
2013-05-08rustc: Fix the logic for finding the Android main functionBrian Anderson-0/+4
I don't understand what this logic is doing
2013-05-09Fix typosSean Moon-4/+4
2013-05-08auto merge of #6317 : brson/rust/durable, r=z0w0bors-0/+21
#6312
2013-05-07Add some tests for local data + borrowed pointersBrian Anderson-0/+21
2013-05-07auto merge of #6290 : brson/rust/issue-3707, r=thestingerbors-3/+2
This issue has been fixed in passing.
2013-05-07Add SIMD vector type testsSeo Sanghyeon-0/+13
2013-05-07auto merge of #6251 : thestinger/rust/non_owned, r=pcwaltonbors-0/+76
Also fixed the docstring on `TC_ONCE_CLOSURE` (was accidentally the same as `TC_MUTABLE`) and shifted the `TC_EMPTY_ENUM` bit left by one since whatever previously used that bit has been removed.
2013-05-06Enable test for #3707Brian Anderson-3/+2
2013-05-06refinement to technique used to not run regionckNiko Matsakis-52/+12
2013-05-05compile-fail tests for #[non_owned] and #[mutable]Daniel Micay-0/+76
2013-05-05Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freezeNiko Matsakis-101/+126
Conflicts: src/libcore/core.rc src/libcore/hashmap.rs src/libcore/num/f32.rs src/libcore/num/f64.rs src/libcore/num/float.rs src/libcore/num/int-template.rs src/libcore/num/num.rs src/libcore/num/strconv.rs src/libcore/num/uint-template.rs src/libcore/ops.rs src/libcore/os.rs src/libcore/prelude.rs src/libcore/rt/mod.rs src/libcore/unstable/lang.rs src/librustc/driver/session.rs src/librustc/middle/astencode.rs src/librustc/middle/borrowck/check_loans.rs src/librustc/middle/borrowck/gather_loans.rs src/librustc/middle/borrowck/loan.rs src/librustc/middle/borrowck/preserve.rs src/librustc/middle/liveness.rs src/librustc/middle/mem_categorization.rs src/librustc/middle/region.rs src/librustc/middle/trans/base.rs src/librustc/middle/trans/inline.rs src/librustc/middle/trans/reachable.rs src/librustc/middle/typeck/check/_match.rs src/librustc/middle/typeck/check/regionck.rs src/librustc/util/ppaux.rs src/libstd/arena.rs src/libstd/ebml.rs src/libstd/json.rs src/libstd/serialize.rs src/libstd/std.rc src/libsyntax/ast_map.rs src/libsyntax/parse/parser.rs src/test/compile-fail/borrowck-uniq-via-box.rs src/test/compile-fail/regions-infer-borrow-scope-within-loop.rs src/test/run-pass/borrowck-nested-calls.rs
2013-05-04auto merge of #6230 : thestinger/rust/whitespace, r=catamorphismbors-102/+20
I just had `git apply` fix most of them and then did a quick skim over the diff to fix a few cases where it did the wrong thing (mostly replacing tabs with 4 spaces, when someone's editor had them at 8 spaces).