summary refs log tree commit diff
path: root/src/test/compile-fail
AgeCommit message (Collapse)AuthorLines
2013-07-01auto merge of #7443 : yjh0502/rust/fix_field_dup, r=huonwbors-0/+17
Check if there is duplicated field names in struct.
2013-06-30Remove vec::{map, mapi, zip_map} and the methods, except for .map, since thisHuon Wilson-4/+2
is very common, and the replacement (.iter().transform().collect()) is very ugly.
2013-06-30Convert vec::{reverse, swap} to methods.Huon Wilson-3/+1
2013-06-30Fixes #7377jihyun-0/+17
2013-06-29auto merge of #7441 : catamorphism/rust/testcases_2013-06-27, r=catamorphismbors-0/+29
2013-06-29auto merge of #7363 : bblum/rust/soundness, r=nikomatsakisbors-3/+91
The commit f9a5453 is meant to be a temporary hold-over. Whether or not there is added a way for the compiler to "implicitly borrow" stack closures in this way, there should be a codegen optimization that prevents having to traverse possibly-very-many function pointers to find the function you ultimately wanted to call. I tried to separate out the changes so this particular commit could be straight-up reverted if auto-borrowing happens in the future. r? @nikomatsakis
2013-06-29auto merge of #7244 : bblum/rust/once, r=nikomatsakisbors-0/+137
@graydon suggested that once closures not be part of the language for 1.0, but that they might be hidden behind a -Z compile flag as an "experimental feature" in case people decide they need them. Regardless of whether ```-Z once-fns``` is set, this PR will parse the ```once``` keyword and will prevent closures labelled with it from being called more than once. It will also permit moving out of captured vars in heap closures, just to let the runtime writers stop using ```Cell``` sooner. Setting ```-Z once-fns``` only toggles whether the move-out-from-capture privilege is also given for stack closures. r? @nikomatsakis
2013-06-29Add two tests for the case of the recurring closure.Ben Blum-0/+88
2013-06-29Trade stack closure copyability for type soundness.Ben Blum-1/+1
2013-06-29'Borrow' stack closures rather than copying them (e.g., "|x|f(x)"), in prep ↵Ben Blum-2/+2
for making them noncopyable.
2013-06-28auto merge of #7479 : mozilla/rust/rollup, r=thestingerbors-4/+4
22b7eb3 r=thestinger 28a3613 r=cmr a0c31ec r=bstrie ee7307e r=thestinger b9cf6a3 r=thestinger
2013-06-29Rename #[mutable] to #[no_freeze]Brian Anderson-2/+2
2013-06-29Rename #[non_sendable] to #[no_send]Brian Anderson-2/+2
2013-06-28Add tests for some default method things.Michael Sullivan-0/+24
2013-06-28Rename Const/Owned in more placesJames Miller-5/+5
2013-06-28librustc: Fix merge fallout and test cases.Patrick Walton-11/+11
2013-06-28librustc: Remove the broken overloaded assign-ops from the language.Patrick Walton-1/+1
They evaluated the receiver twice. They should be added back with `AddAssign`, `SubAssign`, etc., traits.
2013-06-28libsyntax: Remove "copy" pattern bindings from the languagePatrick Walton-4/+4
2013-06-28librustc: Disallow "mut" from distributing over bindings.Patrick Walton-7/+7
This is the backwards-incompatible part of per-binding-site "mut".
2013-06-28librustc: Change "Owned" to "Send" everywherePatrick Walton-20/+20
2013-06-28librustc: Rename Const to FreezePatrick Walton-6/+6
2013-06-27testsuite: Add test cases, some xfailedTim Chevalier-0/+29
Closes #5060 Closes #4446 Closes #5192
2013-06-26Change expected error message in kindchk compile-fail tests.Ben Blum-7/+8
2013-06-26Infer default static/Owned bounds for unbounded heap fns/traits (#7264)Ben Blum-4/+41
2013-06-25auto merge of #7269 : luqmana/rust/drop, r=thestingerbors-30/+30
Finally rename finalize to drop. Closes #4332.
2013-06-25Change finalize -> drop.Luqman Aden-30/+30
2013-06-25auto merge of #7373 : thestinger/rust/iterator, r=huonwbors-10/+5
2013-06-25remove `each` from vec, HashMap and HashSetDaniel Micay-10/+5
2013-06-25auto merge of #7325 : artagnon/rust/resolve-module, r=cmrbors-1/+1
Fix #7322. I started out with a band-aid approach to special-case the duplicate module error using `is_duplicate_module`, but thought this would be better in the long term.
2013-06-25resolve: report duplicate module definitionsRamkumar Ramachandra-1/+1
add_child() is responsible for reporting errors about type, value, and module duplicate definitions. Although it checks for all three, it uses namespace_to_str() to convert a Namespace value into a string before printing an error like: error: duplicate definition of type `foo` ^^^^ note: first definition of type foo here: ^^^^ Unfortunately, this string can only be one of "type" or "value" (corresponding to TypeNS and ValueNS respectively), and it reports duplicate modules as duplicate types. To alleviate the problem, define a special NamespaceError enum to define more specialized errors, and use it instead of attempting to reuse the Namespace enum. Reported-by: Corey Richardson <corey@octayn.net> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
2013-06-25Add the `warnings` lint attributeAlex Crichton-0/+30
2013-06-23Support foreign 'static mut' variables as wellAlex Crichton-0/+21
2013-06-23Add 'static mut' items to the languageAlex Crichton-0/+73
2013-06-23Add basic test cases for closure bounds. (#3569)Ben Blum-1/+73
2013-06-23Add tests for not-kind-checked trait bounds.Ben Blum-0/+81
2013-06-23Fix error messages in test cases, since fns/traits now pretty-print with a ↵Ben Blum-8/+8
bounds list
2013-06-23auto merge of #7267 : luqmana/rust/issue-5792, r=cmrbors-0/+17
Fixes #5792
2013-06-23vec: remove BaseIter implementationDaniel Micay-4/+4
I removed the `static-method-test.rs` test because it was heavily based on `BaseIter` and there are plenty of other more complex uses of static methods anyway.
2013-06-22Fix-up PP Code to reflect new lifetime param syntaxJames Miller-2/+2
2013-06-20Add test for duplicate definitions of structs and enum struct variants.Luqman Aden-0/+17
2013-06-19Hide the once-move-out privilege for stack fns behind '-Z once-fns'Ben Blum-0/+1
2013-06-19Add tests for once functions (#2549).Ben Blum-0/+136
2013-06-16Add copies to type params with Copy boundNiko Matsakis-3/+4
2013-06-14auto merge of #7110 : thestinger/rust/iterator, r=brsonbors-6/+0
2013-06-14add IteratorUtil to the preludeDaniel Micay-6/+0
2013-06-13automated whitespace fixesDaniel Micay-4/+0
2013-06-13std: remove the invalid NullTerminatedStr instance for &'static str.Huon Wilson-0/+21
A slice of a 'static str is still 'static, but doesn't necessarily have the null terminator.
2013-06-12Add tests for duplicate methods on traits/impls.Luqman Aden-0/+33
2013-06-10auto merge of #7046 : luqmana/rust/issue-7044, r=sanxiynbors-0/+14
Fixes #7044.
2013-06-10Add test for #7044.Luqman Aden-0/+14