about summary refs log tree commit diff
path: root/src/test/compile-fail
AgeCommit message (Collapse)AuthorLines
2013-02-21Remove the last bits of structural records from tests/rustc/rusti/rustpkg.Luqman Aden-123/+86
2013-02-20librustc: Separate most trait bounds with '+'. rs=plussingPatrick Walton-28/+28
2013-02-20auto merge of #5046 : sanxiyn/rust/struct-match, r=catamorphismbors-0/+11
Previously check always succeeded because struct type was derived from the matched expression, not the matched pattern. Fix #4849.
2013-02-20Check type when struct is matched against enum-like patternSeo Sanghyeon-0/+11
Previously check always succeeded because struct type was derived from the matched expression, not the matched pattern.
2013-02-20fix ICE after incorrect number of args in callsKang Seonghoon-0/+14
2013-02-19add missing typecheck for const pattern match armJeong YunWon-0/+17
Issue #4968
2013-02-17Removed more capture claueses.Seth Pink-1/+1
2013-02-16Parse (and discard) lifetime declarations on function typesNiko Matsakis-14/+14
2013-02-16Permit lifetimes to appear in type parameter lists and after `&`. Lifetimes inNiko Matsakis-9/+12
type parameter lists are currently ignored, but `&'a T` is equivalent to `&a/T`.
2013-02-15librustc: Stop parsing `impl Type : Trait` and fix several declarations that ↵Patrick Walton-3/+3
slipped through. r=tjc
2013-02-15tests/tutorials: Get rid of `move`.Luqman Aden-32/+32
2013-02-14libcore: Remove ptr::mut_addr_of since &mut is coerced to *mutLuqman Aden-4/+4
2013-02-14auto merge of #4934 : nickdesaulniers/rust/issue4524cleanup, r=brsonbors-2/+2
review? @brson Issue #4524
2013-02-14librustc: Replace `impl Type : Trait` with `impl Trait for Type`. ↵Patrick Walton-195/+195
rs=implflipping
2013-02-14Remove all final references to die!Nick Desaulniers-2/+2
2013-02-14libcore: Move the numeric operations out of Num. r=brsonPatrick Walton-1/+1
Sadly I could not use trait inheritance due to a type parameter substitution bug.
2013-02-13Remove die!, raplace invocations with fail! Issue #4524 pt 3Nick Desaulniers-59/+59
2013-02-13RIMOV core::vecBen Striegel-2/+2
Also remove as many uses as possible of vec::cast_to_mut and cast_from_mut
2013-02-12Adjust borrow checker algorithm to address #4856 unsoundness,Niko Matsakis-66/+371
and then adjust code to match. rs=unsound (will review post-landing)
2013-02-09auto merge of #4861 : sethpink/rust/incoming, r=catamorphismbors-8/+0
Fix for issue #4830.
2013-02-09Issue #4830 fixSeth Pink-8/+0
2013-02-08Fix subtle error in caching during kind computation that could cause linearNiko Matsakis-46/+79
values to be copied. Rewrite kind computation so that instead of directly computing the kind it computes what kinds of values are present in the type, and then derive kinds based on that. I find this easier to think about. Fixes #4821.
2013-02-07auto merge of #4803 : alexcrichton/rust/fix-unused-imports, r=graydonbors-8/+24
The first commit message has most of the comments, but this pull request basically fixes a lot of issues surrounding the `unused_imports` warning/deny attribute. Before this patch there were these problems: 1. Unused imports from `prelude.rs` were warned about with dummy spans, leading to a large number of confusing warnings. 2. Unused imports from `intrinsic.rs` were warned about with the file `<intrinsic>` which couldn't be forced to go away 3. Methods used from imported traites (like `io::WriterUtil`) resulted in an unused warning of the import even though it was used. 4. If one `use` statement imported N modules, M of which weren't used, M warning statements were issued. 5. If a glob import statement was used, each public export of the target module which wasn't used had a warning issued. This patch deals with all these cases by doing: 1. Ignore unused imports from `prelude.rs` (indicated by a dummy span of 0) 2. Ignore unused imports from `intrinsic.rs` (test on the imported module name, is there a better way?) 3. Track when imported modules are used as candidates for methods, and just assume they're used. This may not end up being the actual case, but in theory not warning about an unused thing is worse than warning about a used thing. 4. Only issue one warning statement 5. Only issue one warning statement. This is the first time I've edited the compiler itself, and I tried to keep up with the style around, but I may have missed something here or there...
2013-02-07Make ~fn non-copyable, make &fn copyable, split barefn/closure types,Niko Matsakis-73/+33
correct handling of moves for struct-record update. Part of #3678. Fixes #2828, #3904, #4719.
2013-02-07auto merge of #4816 : lifthrasiir/rust/float-literal, r=graydonbors-0/+34
See #4804 for details.
2013-02-06got rid of last empty linesKang Seonghoon-2/+0
2013-02-06libsyntax: no binary/hex float literalsKang Seonghoon-0/+36
2013-02-05testsuite: Add test for #4523Tim Chevalier-0/+17
2013-02-05Don't warn when imported traits are indeed usedAlex Crichton-0/+6
2013-02-05Fix some bugs with -W unused-importsAlex Crichton-8/+18
1. Don't warn about anything not used in the prelude which is autmoatically injected, accomplished with a test that the span is equal to a dummy span. 2. Don't warn about unused imports from the injected intrinsic module, accomplished by testing against the name of the imported module 3. If anything is used from a glob import, don't warn about the glob import. 4. If an import imports more than one thing, and none of them are used, only issue a warning once Also updated the unused-imports-warn test to have stricter requirements on error messages.
2013-02-04auto merge of #4747 : sanxiyn/rust/integral-type, r=graydonbors-0/+3
`ty::type_is_integral` returns `true` for `ty_bool`. This causes `-true` to compile, instead of resulting in a type error.
2013-02-04Let type_is_integral return false for bool typeSeo Sanghyeon-0/+3
2013-02-03core: convert ToStr::to_str to take explicit &selfErick Tryzelaar-3/+3
2013-02-03rename map -> oldmap and mark it as deprecatedDaniel Micay-3/+3
LinearMap is quite a bit faster, and is fully owned/sendable without requiring copies. The older std::map also doesn't use explicit self and relies on mutable fields.
2013-02-03update compile-fail/map-types.rs to use hashmapDaniel Micay-8/+6
2013-02-01Remove fail keyword from lexer & parser and clean up remaining calls toNick Desaulniers-5/+5
fail Fix merge conflicts - Issue 4524
2013-01-31Replace most invocations of fail keyword with die! macroNick Desaulniers-2/+2
2013-01-31Replace most invocations of fail keyword with die! macroNick Desaulniers-60/+60
2013-01-31Finalize moves-based-on-type implementation.Niko Matsakis-297/+236
Changes: - Refactor move mode computation - Removes move mode arguments, unary move, capture clauses (though they still parse for backwards compatibility) - Simplify how moves are handled in trans - Fix a number of illegal copies that cropped up - Workaround for bug involving def-ids in params (see details below) Future work (I'll open bugs for these...): - Improve error messages for moves that are due to bindings - Add support for moving owned content like a.b.c to borrow check, test in trans (but I think it'll "just work") - Proper fix for def-ids in params Def ids in params: Move captures into a map instead of recomputing. This is a workaround for a larger bug having to do with the def-ids associated with ty_params, which are not always properly preserved when inlining. I am not sure of my preferred fix for the larger bug yet. This current fix removes the only code in trans that I know of which relies on ty_param def-ids, but feels fragile.
2013-01-30librustc: Change `self` as a type to `Self` everywhere. r=brsonPatrick Walton-6/+6
2013-01-30test: fix compile-fail tests somehow missed from local 'make check', ↵Graydon Hoare-3/+3
r=burningtree.
2013-01-30test: De-export aux, bench, compile-fail, and run-fail. rs=deexportingPatrick Walton-181/+76
2013-01-30Remove oldcomm from the test suiteBrian Anderson-8/+7
2013-01-29librustc: De-implicit-self the visitor. r=graydonPatrick Walton-1/+1
2013-01-29librustc: Disallow trait bounds in types, enumerations, and structure ↵Patrick Walton-1/+1
definitions. r=tjc
2013-01-29libstd: Remove "dual impls" from the language and enforce coherence rules. ↵Patrick Walton-4/+6
r=brson "Dual impls" are impls that are both type implementations and trait implementations. They can lead to ambiguity and so this patch removes them from the language. This also enforces coherence rules. Without this patch, records can implement traits not defined in the current crate. This patch fixes this, and updates all of rustc to adhere to the new enforcement. Most of this patch is fixing rustc to obey the coherence rules, which involves converting a bunch of records to structs.
2013-01-28testsuite: Remove structural records from remaining compile-fail testsTim Chevalier-15/+14
2013-01-28Rewrite the coercion code to be more readable, more sound, and to reborrow whenNiko Matsakis-12/+28
needed. Regarding soundness: there was a subtle bug in how it was done before; see the compile-fail test for an example. Regarding reborrowing: reborrowing allows mut and const slices/borrowed-pointers to be used with pure fns that expect immutable data. r=brson
2013-01-28Integrate vec patterns into borrow checker.Niko Matsakis-6/+37
The tail portion of the pattern effectively borrows a vector, but the borrow checker knew nothing about this. r=catamorphism
2013-01-25Fix Option camel case in a compile-fail testTyler Bindon-3/+3
The compile fails for another reason, that triggers before the the failure for non-camel cased option, some or none undefined errors.