summary refs log tree commit diff
path: root/src/test/compile-fail
AgeCommit message (Collapse)AuthorLines
2013-03-29Add AbiSet and integrate it into the AST.Niko Matsakis-4/+4
I believe this patch incorporates all expected syntax changes from extern function reform (#3678). You can now write things like: extern "<abi>" fn foo(s: S) -> T { ... } extern "<abi>" mod { ... } extern "<abi>" fn(S) -> T The ABI for foreign functions is taken from this syntax (rather than from an annotation). We support the full ABI specification I described on the mailing list. The correct ABI is chosen based on the target architecture. Calls by pointer to C functions are not yet supported, and the Rust type of crust fns is still *u8.
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-46/+46
2013-03-29auto merge of #5570 : alexcrichton/rust/fix-unused-imports, r=sanxiynbors-1/+9
Before it wouldn't warn about unused imports in the list if something in the list was used. These commits fix that case, add a test, and remove all unused imports in lists of imports throughout the compiler.
2013-03-28Removing unused importsAlex Crichton-2/+2
2013-03-28Fix warning about unused imports in import listsAlex Crichton-1/+9
Before, if anything in a list was used, the entire list was considered to be used. This corrects this and also warns on a span of the actual unused import instead of the entire list.
2013-03-28testsuite: Update and un-xfail test for #4335Tim Chevalier-3/+2
2013-03-28auto merge of #5596 : luqmana/rust/unit-struct, r=catamorphismbors-1/+17
Fixes #5449.
2013-03-27auto merge of #5579 : dbaupp/rust/rustc-typo-limit, r=catamorphismbors-0/+13
Impose a limit so that the typo suggester only shows reasonable suggestions (i.e. don't suggest `args` when the error is `foobar`). A tiny bit of progress on #2281.
2013-03-27libsyntax: error on struct Foo {}.Luqman Aden-1/+17
2013-03-27testsuite: Add various test casesTim Chevalier-13/+110
Some are xfailed, some not, some existing ones get un-xfailed.
2013-03-28librustc: Limit the typo suggestions to reasonable suggests.Huon Wilson-0/+13
Impose a limit so that the typo suggester only shows reasonable suggestions (i.e. don't suggest `args` when the error is `foobar`).
2013-03-26test: Fix botched error message in compile-fail testPatrick Walton-1/+1
2013-03-26test: Fix testsPatrick Walton-4/+5
2013-03-26librustc: Modify all code to use new lifetime binder syntaxPatrick Walton-156/+85
2013-03-26librustc: Remove all uses of the old `[T * N]` fixed-length vector syntaxPatrick Walton-5/+5
2013-03-26libcore: Change `[const T]` to `const [T]` everywherePatrick Walton-88/+3
2013-03-26option: rm functions that duplicate methodsDaniel Micay-9/+9
2013-03-26test: Remove uses of oldmap::HashMapAlex Crichton-7/+7
2013-03-22test: Add lifetime binders and new-style lifetime parameters to the test suitePatrick Walton-35/+35
2013-03-22librustc: Remove the `const` declaration form everywherePatrick Walton-20/+20
2013-03-22auto merge of #5488 : pcwalton/rust/depure, r=pcwaltonbors-21/+21
2013-03-22test: Remove `pure` from the test suitePatrick Walton-17/+17
2013-03-22test: Fix test. rs=testPatrick Walton-1/+1
2013-03-22auto merge of #5483 : pcwalton/rust/static-syntax, r=graydonbors-9/+9
r? @nikomatsakis
2013-03-22librustc: Remove all uses of `static` from functions. rs=destaticPatrick Walton-5/+5
2013-03-22syntax: make old `#[deriving_foo]` attribute obsoleteAndrew Paseltiner-0/+17
2013-03-21auto merge of #5480 : pcwalton/rust/at-const, r=pcwaltonbors-244/+30
r? @catamorphism
2013-03-21librustc: Replace the `&static` bound with `'static`Patrick Walton-9/+9
2013-03-21libsyntax: Remove `@const` from the languagePatrick Walton-239/+0
2013-03-21librustc: Forbid destructors from being attached to any structs that might ↵Patrick Walton-5/+30
contain non-Owned fields. r=nmatsakis
2013-03-21auto merge of #5461 : catamorphism/rust/flagless, r=nikomatsakisbors-8/+21
r? @nikomatsakis The typechecker previously passed around a boolean return flag to indicate whether it saw something with type _|_ (that is, something it knows at compile-time will definitely diverge) and also had some manual checks for the `ty_err` pseudo-type that represents a previous type error. This was because the typing rules implemented by the typechecker didn't properly propagate _|_ and ty_err. I fixed it. This also required changing expected error messages in a few tests, as now we're printing out fewer derived errors -- in fact, at this point we should print out no derived errors, so report any that you see (ones that include "[type error]") as bugs.
2013-03-21librustc: Forbid access to cross-crate private static methodsPatrick Walton-0/+9
2013-03-21back-renamed slice_DBG_BRWD, slice_V_DBG_BRWD -> slice, slice_DBG_UNIQ -> ↵Marvin Löbel-1/+1
slice_unique
2013-03-20Make typechecker compositionalTim Chevalier-8/+21
The typechecker previously passed around a boolean return flag to indicate whether it saw something with type _|_ (that is, something it knows at compile-time will definitely diverge) and also had some manual checks for the `ty_err` pseudo-type that represents a previous type error. This was because the typing rules implemented by the typechecker didn't properly propagate _|_ and ty_err. I fixed it. This also required changing expected error messages in a few tests, as now we're printing out fewer derived errors -- in fact, at this point we should print out no derived errors, so report any that you see (ones that include "[type error]") as bugs.
2013-03-21renamed str::view -> slice_DBG_BRWDMarvin Löbel-1/+1
renamed str::slice -> slice_DBG_UNIQ changed vec slice method -> to_owned() renamed vec view method -> slice_V_DBG_BRWD
2013-03-19auto merge of #5442 : pcwalton/rust/extern-block-restriction, r=pcwaltonbors-0/+11
r? @graydon
2013-03-19librustc: Enforce privacy for static methods.Patrick Walton-0/+11
This starts moving a bunch of privacy checks into the privacy checking phase and out of resolve.
2013-03-19Tests for cfg attribute.Luqman Aden-0/+18
2013-03-18Add tests for const exprs in fixed vec length type and vec repeat.Luqman Aden-0/+34
2013-03-18librustc: Make the compiler ignore purity.Patrick Walton-258/+3
For bootstrapping purposes, this commit does not remove all uses of the keyword "pure" -- doing so would cause the compiler to no longer bootstrap due to some syntax extensions ("deriving" in particular). Instead, it makes the compiler ignore "pure". Post-snapshot, we can remove "pure" from the language. There are quite a few (~100) borrow check errors that were essentially all the result of mutable fields or partial borrows of `@mut`. Per discussions with Niko I think we want to allow partial borrows of `@mut` but detect obvious footguns. We should also improve the error message when `@mut` is erroneously reborrowed.
2013-03-18libsyntax: Stop parsing old lifetimes, except for the ones on data type ↵Patrick Walton-10/+13
declarations.
2013-03-18librustc: Convert all uses of old lifetime notation to new lifetime ↵Patrick Walton-70/+70
notation. rs=delifetiming
2013-03-13test: Fix tests. rs=testsPatrick Walton-42/+44
2013-03-13librustc: Remove implicit self from the language, except for old-style drop ↵Patrick Walton-110/+90
blocks.
2013-03-13librustc: Don't accept `as Trait` anymore; fix all occurrences of it.Patrick Walton-25/+25
2013-03-13Remove `++` mode from the compiler (it is parsed as `+` mode)Niko Matsakis-11/+2
and obsolete `-` mode altogether (it *was* parsed as `+` mode).
2013-03-13auto merge of #5293 : brson/rust/logging, r=brsonbors-72/+72
r? @graydon This removes `log` from the language. Because we can't quite implement it as a syntax extension (probably need globals at the least) it simply renames the keyword to `__log` and hides it behind macros. After this the only way to log is with `debug!`, `info!`, etc. I figure that if there is demand for `log!` we can add it back later. I am not sure that we ever agreed on this course of action, though I *think* there is consensus that `log` shouldn't be a statement.
2013-03-12syntax: implement #[deriving] meta-attributeAndrew Paseltiner-0/+14
2013-03-11Remove uses of logBrian Anderson-72/+72
2013-03-11librustc: Lint the old `drop` destructor notation offPatrick Walton-0/+4