Commit graph

16632 commits

Author SHA1 Message Date
Daniel Micay
47011e3b71 vim: use Operator group for 'as' 2013-03-30 18:19:47 -04:00
Daniel Micay
6442b1c0e7 vim: separate the conditional keywords 2013-03-30 18:17:13 -04:00
Daniel Micay
b0f66c4732 vim: mark Todo as contained and rm unsafe from it
It's nice to make unsafe stand out, but this way isn't correct because it
highlights it in comments.
2013-03-30 18:17:13 -04:00
Daniel Micay
7142cdef1e vim: highlight ref + static as storage specifiers
lifetimes and globals are now the only two places static is used, and
'static isn't matched by this
2013-03-30 18:16:53 -04:00
Daniel Micay
0224eb3d32 vim: assert and pure keywords were removed 2013-03-30 17:54:24 -04:00
bors
fbd8eae26d auto merge of #5631 : brson/rust/abiset, r=brson,brson
Continuing #5421
2013-03-29 18:39:41 -07:00
Niko Matsakis
6965fe4bce Add AbiSet and integrate it into the AST.
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-29 18:36:20 -07:00
bors
f864934f54 auto merge of #5628 : brson/rust/assert, r=brson 2013-03-29 16:42:43 -07:00
Patrick Walton
1e91595520 librustc: Remove fail_unless! 2013-03-29 16:39:08 -07:00
bors
a17a9d41f6 auto merge of #5624 : thestinger/rust/tutorial, r=pcwalton 2013-03-29 13:30:46 -07:00
Daniel Micay
0189ef3600 tutorial: add an example of freezing a managed box 2013-03-29 15:45:10 -04:00
Daniel Micay
f78af18127 tutorial: improve the managed boxes section 2013-03-29 15:45:10 -04:00
Daniel Micay
85ed840e23 tutorial: improve the owned boxes section 2013-03-29 15:45:07 -04:00
bors
0a5e522acd auto merge of #5623 : brson/rust/snapshot, r=brson 2013-03-29 12:21:46 -07:00
bors
bda4dd3c91 auto merge of #5615 : brson/rust/noclang, r=brson
r? @graydon

Closes #5403
2013-03-29 11:30:47 -07:00
Brian Anderson
518c295a03 Register snapshots 2013-03-29 11:30:42 -07:00
Brian Anderson
dd088afd43 Stop building clang
Removing it from the tree is an ordeal and there is no official way
to disable clang via LLVM's Makefiles so this edits the Makefile
in llvm/tools after running configure.
2013-03-29 11:23:15 -07:00
Daniel Micay
777ad8b204 tutorial: use "owned box" consistently 2013-03-29 14:16:52 -04:00
bors
706ed6dd53 auto merge of #5583 : jbclements/rust/docfix-for-block-comment-grammar, r=jbclements
... by adding Kleene '+' in two places, and changing a "non-slash" into "non_slash_or_star".

Closes #1588
2013-03-29 09:39:43 -07:00
bors
5da9e12778 auto merge of #5570 : alexcrichton/rust/fix-unused-imports, r=sanxiyn
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-29 05:57:44 -07:00
bors
7f2788112d auto merge of #5622 : yichoi/rust/pull-0329, r=catamorphism
libcore: language change minor fix for ARM & MIPS

fix context.rs
2013-03-29 04:42:43 -07:00
bors
848ffe2dac auto merge of #5620 : catamorphism/rust/issue-4325, r=catamorphism 2013-03-29 03:42:46 -07:00
bors
318d926854 auto merge of #5619 : catamorphism/rust/issue-4333, r=catamorphism 2013-03-29 02:45:46 -07:00
bors
4e830d11ba auto merge of #5618 : pcwalton/rust/print-in-prelude, r=brson
r? @brson
2013-03-29 01:09:49 -07:00
bors
16445c5418 auto merge of #5617 : catamorphism/rust/issue-4335, r=catamorphism 2013-03-29 00:03:48 -07:00
Young-il Choi
e6f2d7a48c libcore: language change minor fix for ARM & MIPS 2013-03-29 15:46:13 +09:00
bors
a985bc52cd auto merge of #5616 : pcwalton/rust/parenthesized-trait, r=brson
r? @brson
2013-03-28 23:00:50 -07:00
bors
f7a2371c17 auto merge of #5614 : graydon/rust/static-linkage-bug, r=catamorphism
re bug that @nikomatsakis was hitting: when you define a `static` (old: `const`) containing a `&` or `&[]` expression, it will create temporaries (the underlying pointee) by creating a throwaway symbol for each temporary, each with _global_ linkage, and each named `"const"`. LLVM will helpfully rename multiple copies of this throwaway symbol to `"const1"` and `"const2"` and so forth in the _same_ library. But if you have _2 libraries_ -- say, libcore and librustc -- that both do this, the dynamic linker (at least on linux) will happily do horrible things like make the slice in one library point to the bytes of the vector from the other library. This is obviously a recipe for much hilarity and head-scratching.

The solution is to change the linkage to something else, internal or (in the case of this patch) _private_.

It will require a snapshot to integrate this into stage0 and thereby fix the problem / unblock patches that were hitting this in stage1.
2013-03-28 21:48:49 -07:00
Alex Crichton
be57d745d2 Removing unused imports 2013-03-28 23:56:46 -04:00
Alex Crichton
cc83049a56 Fix warning about unused imports in import lists
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-28 23:56:45 -04:00
bors
d98a195ffc auto merge of #5610 : thestinger/rust/tutorial, r=pcwalton 2013-03-28 20:48:52 -07:00
Tim Chevalier
ae7e072af7 testsuite: Add test case for #4325 2013-03-28 19:24:17 -07:00
Patrick Walton
ef56aa62fb libcore: Add print and println to the prelude 2013-03-28 19:16:06 -07:00
Tim Chevalier
499f96dca1 testsuite: Add test for #4333 2013-03-28 19:15:24 -07:00
bors
7a6cd2b21e auto merge of #5608 : erickt/rust/incoming, r=catamorphism
@nikomatsakis pointed out that `fn read_option<T>(&self, f: &fn() -> T) -> Option<T>` should have this syntax so it can work with custom option types: `fn read_option<T>(&self, f: &fn(bool) -> T) -> T`.

Also, this also includes some `#[inline(always)]` on the memory functions in `src/libcore/unstable/lang.rs` to reduce one level of indirection when allocating memory.
2013-03-28 19:06:48 -07:00
Tim Chevalier
bf519dad6b testsuite: Update and un-xfail test for #4335 2013-03-28 19:00:49 -07:00
Patrick Walton
36909c7575 libsyntax: Don't allow impl (Trait) for Type (with the parentheses). 2013-03-28 18:56:36 -07:00
bors
f81459211d auto merge of #5593 : luqmana/rust/inline-asm, r=catamorphism
Clean things up a bit. Also, allow selecting intel syntax in addition to the default AT&T dialect.
2013-03-28 18:18:46 -07:00
Graydon Hoare
1163f69c84 rustc: fix linkage of internal static nodes. 2013-03-28 18:15:35 -07:00
Luqman Aden
a3996c1626 Tidy. 2013-03-28 16:34:10 -07:00
bors
943d7adedc auto merge of #5603 : brson/rust/relnotes, r=brson 2013-03-28 16:33:47 -07:00
Daniel Micay
d4509f270b tutorial: only Owned types can have a Drop impl 2013-03-28 18:41:55 -04:00
Daniel Micay
467502216e tutorial: cleaner libc use statements 2013-03-28 17:53:29 -04:00
bors
5a97c484b1 auto merge of #5609 : Kimundi/rust/incoming, r=catamorphism 2013-03-28 14:42:49 -07:00
Marvin Löbel
eac2f3b93e Unbreak 'rustc --help' 2013-03-28 21:44:46 +01:00
bors
e16f94f6a1 auto merge of #5607 : brson/rust/shapshot3, r=brson 2013-03-28 13:36:53 -07:00
Erick Tryzelaar
aa779c1240 std: change Decoder::read_option to return a generic type
This allows read_option to be used with a custom option type instead
of just core::Option.
2013-03-28 13:11:24 -07:00
Erick Tryzelaar
ce9e5ecb6c core: Inline mallocing wrapper functions
As far as I can tell, this doesn't make rust compile any
faster, but it does at least remove one level of indirection
on malloc, which might help speed up some operations.
2013-03-28 13:11:24 -07:00
Brian Anderson
145f66fdf0 Register snapshots 2013-03-28 12:40:57 -07:00
bors
86024e39aa auto merge of #5602 : pcwalton/rust/common-fields, r=brson
r? @brson
2013-03-28 12:39:47 -07:00