summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2013-03-30auto merge of #5630 : erickt/rust/serial, r=ericktbors-21/+0
@nikomatsakis and I were talking about how the serializers were a bit too complicated. None of the users of With the `emit_option` and `read_option` functions, the serializers are now moving more high level. This patch series continues that trend. I've removed support for emitting specific string and vec types, and added support for emitting mapping types.
2013-03-29Add AbiSet and integrate it into the AST.Niko Matsakis-23/+22
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-29Merge remote-tracking branch 'remotes/origin/incoming' into serialErick Tryzelaar-1911/+1911
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-1912/+1912
2013-03-29Merge remote-tracking branch 'remotes/origin/incoming' into serialErick Tryzelaar-4/+50
2013-03-29std: remove prettyprintErick Tryzelaar-21/+0
Everyone uses fmt!("%?", ...) instead of the prettyprint module, so I'm removing this file.
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-29auto merge of #5620 : catamorphism/rust/issue-4325, r=catamorphismbors-0/+25
2013-03-29auto merge of #5619 : catamorphism/rust/issue-4333, r=catamorphismbors-0/+14
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: Add test case for #4325Tim Chevalier-0/+25
2013-03-28testsuite: Add test for #4333Tim Chevalier-0/+14
2013-03-28testsuite: Update and un-xfail test for #4335Tim Chevalier-3/+2
2013-03-28librustc: Remove common fields and nested enums from the languagePatrick Walton-24/+0
2013-03-28auto merge of #5596 : luqmana/rust/unit-struct, r=catamorphismbors-1/+17
Fixes #5449.
2013-03-28auto merge of #5586 : pcwalton/rust/expr-repeat-vstore, r=graydonbors-0/+23
r? @graydon
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-27auto merge of #5578 : erickt/rust/incoming, r=jbclements,ericktbors-0/+3
Hey folks, This patch series does some work on the json decoder, specifically with auto decoding of enums. Previously, we would take this code: ``` enum A { B, C(~str, uint) } ``` and would encode a value of this enum to either `["B", []]` or `["C", ["D", 123]]`. I've changed this to `"B"` or `["C", "D", 123]`. This matches the style of the O'Caml json library [json-wheel](http://mjambon.com/json-wheel.html). I've added tests to make sure all this work. In order to make this change, I added passing a `&[&str]` vec to `Decode::emit_enum_variant` so the json decoder can convert the name of a variant into it's position. I also changed the impl of `Encodable` for `Option<T>` to have the right upper casing. I also did some work on the parser, which allows for `fn foo<T: ::cmp::Eq>() { ... }` statements (#5572), fixed the pretty printer properly expanding `debug!("...")` expressions, and removed `ast::expr_vstore_fixed`, which doesn't appear to be used anymore.
2013-03-27libsyntax: error on struct Foo {}.Luqman Aden-1/+17
2013-03-27auto merge of #5569 : thestinger/rust/map, r=catamorphismbors-3/+3
2013-03-27librustc: Allow expr_repeat to be used with any vstorePatrick Walton-0/+23
2013-03-27auto merge of #5558 : nikomatsakis/rust/issue-4920-autoref-index-operator, ↵bors-2/+57
r=nikomatsakis Per discussion on IRC. r? @pcwalton
2013-03-27Fix pretty-printer test failure by carrying the bound lifetime names throughNiko Matsakis-2/+0
the types. Initially I thought it would be necessary to thread this data through not only the AST but the types themselves, but then I remembered that the pretty printer only cares about the AST. Regardless, I have elected to leave the changes to the types intact since they will eventually be needed. I left a few FIXMEs where it didn't seem worth finishing up since the code wasn't crucial yet.
2013-03-27another pub fn for check-fastGraydon Hoare-1/+1
2013-03-27testsuite: more `pub fn main`Tim Chevalier-26/+126
2013-03-27Oh, cool, I xfailed the wrong test, neatTim Chevalier-0/+1
2013-03-27testsuite: Add various test casesTim Chevalier-13/+383
Some are xfailed, some not, some existing ones get un-xfailed.
2013-03-27Autoref the argument to the index operator (#4920)Niko Matsakis-2/+57
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-27test: xfail-pretty one of the run-pass tests. rs=burningtreePatrick Walton-0/+2
2013-03-27syntax: Fix parsing global generics (Closes #5572)Erick Tryzelaar-0/+3
2013-03-26test: Fix botched error message in compile-fail testPatrick Walton-1/+1
2013-03-26test: Fix testsPatrick Walton-16/+18
2013-03-26librustc: Enforce that `extern mod` directives come first, then `use` ↵Patrick Walton-0/+17
directives, then items. Resolve them in this order as well.
2013-03-26librustc: Modify all code to use new lifetime binder syntaxPatrick Walton-280/+156
2013-03-26librustc: Fix bug with newtype structs containing dtorsPatrick Walton-0/+17
2013-03-26librustc: Remove all uses of the old `[T * N]` fixed-length vector syntaxPatrick Walton-31/+31
2013-03-26libcore: Change `[const T]` to `const [T]` everywherePatrick Walton-192/+9
2013-03-26option: rm functions that duplicate methodsDaniel Micay-29/+29
2013-03-26fix the core-map benchmark's descending rangeDaniel Micay-3/+3
2013-03-26std: Remove the oldmap moduleAlex Crichton-1/+0
2013-03-26test: Remove uses of oldmap::HashMapAlex Crichton-116/+88
2013-03-26auto merge of #5555 : Kimundi/rust/str-dealloc-3, r=catamorphismbors-3/+4
- Most functions that used to return `~[~str]` for a list of substrings got turned into iterators over `&str` slices - Some cleanup of apis, docs and code layout
2013-03-26Stop writing directly to the final type/method/vtable sidetables from astconvNiko Matsakis-0/+21
and from typeck, which is verboten. We are supposed to write inference results into the FnCtxt and then these get copied over in writeback. Add assertions that no inference by-products are added to this table. Fixes #3888 Fixes #4036 Fixes #4492
2013-03-26Fixed all use sites and testsMarvin Löbel-3/+4
2013-03-25auto merge of #5528 : thestinger/rust/find_mut, r=brsonbors-0/+2
This currently requires workarounds for the borrow checker not being flow-sensitive for `LinearMap` and `TrieMap`, but it can already be expressed for `TreeMap` and `SmallIntMap` without that.
2013-03-25auto merge of #5524 : luqmana/rust/repeat-loop, r=pcwaltonbors-0/+7
`let v = [24, ..1000];` now more or less emits the same IR as: ```Rust let mut i = 0; while i < 1000 { v[i] = 24; i += 1; } ``` LLVM will still turn it into a memset if possible with optimization on.
2013-03-25Expand on cleanups in trans for expr_repeat and add to tests.Luqman Aden-0/+7
2013-03-24expose find_mut in the Map traitDaniel Micay-0/+2