Commit Graph

5063 Commits

Author SHA1 Message Date
bors 501eea0842 auto merge of #8744 : jld/rust/discr64, r=nikomatsakis
This is in preparation for making discriminants not always be int (#1647), but it also makes compiles for a 64-bit target not behave differently — with respect to how many bits of discriminants are preserved — depending on the build host's word size, which is a nice property to have.

We may want to standardize how to abbreviate "discriminant" in a followup change.
2013-08-26 03:51:19 -07:00
Jed Davis 0db2b198f2 Add a test case for the preceding changes.
This would have failed on 32-to-64-bit cross-compiles.
2013-08-24 20:16:40 -07:00
Alex Crichton a3e39b9454 Introduce alternate forms of logging
These new macros are all based on format! instead of fmt! and purely exist for
bootstrapping purposes. After the next snapshot, all uses of logging will be
migrated to these macros, and then after the next snapshot after that we can
drop the `2` suffix on everything
2013-08-24 17:07:30 -07:00
Alex Crichton eb836dd61e Settle on the format/write/print family of names 2013-08-24 12:48:10 -07:00
Alex Crichton 67512f717e Implement a wrapper macro around fprintf -- ifmtf 2013-08-24 12:48:10 -07:00
Brian Anderson c17447f8b3 rt: Move some test functions to rust_test_helpers 2013-08-23 18:38:59 -07:00
bors 5e5e2c71e4 auto merge of #8677 : bblum/rust/scratch, r=alexcrichton
r anybody; there isn't anything complicated here
2013-08-23 00:16:28 -07:00
bors 9e1e152091 auto merge of #8596 : vadimcn/rust/master, r=alexcrichton
This resolves issue #908.  

Notable changes:
-  On Windows, LLVM integrated assembler emits bad stack unwind tables when segmented stacks are enabled.  However, unwind info directives in the assembly output are correct, so we generate assembly first and then run it through an external assembler, just like it is already done for Android builds.

- Linker is invoked  via "g++" command instead of "gcc": g++ passes the appropriate magic parameters to the linker, which ensure correct registration of stack unwind tables in dynamic libraries.
2013-08-22 21:06:25 -07:00
Michael Sullivan ad6eeb843b Don't do a bogus substitution on the transformed self ty for objects. Closes #8664. 2013-08-22 10:52:11 -07:00
Michael Sullivan 97d2b44f87 Substitute into the impl method rather than the trait method when emitting vtables. Closes #8601. 2013-08-22 10:52:11 -07:00
bors 4e3dbf959a auto merge of #8666 : nikomatsakis/rust/issue-3678-extern-fn-types, r=pcwalton
Change the type of crust fns like this one:

    extern fn foo() { ... }

from `*u8` to `extern "C" fn()`.

r? @pcwalton (or whomever)
2013-08-22 07:01:27 -07:00
bors 7e50260f13 auto merge of #8626 : kballard/rust/issue-8615, r=catamorphism
Fixes #8615.
2013-08-22 03:11:29 -07:00
bors b95c135621 auto merge of #8620 : brson/rust/issue-7563, r=alexcrichton 2013-08-22 01:41:30 -07:00
Vadim Chugunov 39fc0883fd Enabled tests. 2013-08-22 00:12:44 -07:00
bors 8e776c75e9 auto merge of #8570 : catamorphism/rust/2013-08-16-rollup, r=catamorphism
Nothing arguable here, as far as I can tell.
2013-08-21 20:21:32 -07:00
bors 3ddfb72512 auto merge of #8562 : bblum/rust/superkinds, r=nikomatsakis
For #7083.

The metadata issue with the old version is now fixed. Ready for review.

This is also not the full solution to #7083, because this is not supported yet:
```
trait Foo : Send { }

impl <T: Send> Foo for T { }

fn foo<T: Foo>(val: T, chan: std::comm::Chan<T>) {
    chan.send(val);
}
```

cc @nikomatsakis
2013-08-21 18:51:42 -07:00
Brian Anderson a02a759f14 test: Add test for #7563. Closes #7563 2013-08-21 17:50:18 -07:00
Ben Blum b795fab046 oops v2, apparently writing std::comm::stream() doesn't work on check-fast; fix this 2013-08-21 20:33:56 -04:00
bors fca75199c7 auto merge of #8595 : vadimcn/rust/print_link_args, r=alexcrichton
This resolves issue #8569
2013-08-21 17:21:33 -07:00
Tim Chevalier 5622ce10fe testsuite: Un-xfail test for #5917 2013-08-21 17:17:50 -07:00
Tim Chevalier 8e3a4f13c5 testsuite: Test for #4447
Closes #4447
2013-08-21 17:17:50 -07:00
Tim Chevalier 21720a09de testsuite: Test for #6132
Closes #6132
2013-08-21 17:17:50 -07:00
Tim Chevalier fb9f97ebee rustc: More helpful error message when using a struct type like a function
Closes #6702
2013-08-21 17:17:50 -07:00
Tim Chevalier 393a130b3d Testsuite: Test for #7013. Closes #7013 2013-08-21 17:17:49 -07:00
Tim Chevalier 77279a73cb testsuite: Tests for #6458. Closes #6458 2013-08-21 17:14:31 -07:00
Ben Blum 0081961c57 Only bug on self-not-mapped-to-def if no previous errors were present. Close #6642. 2013-08-21 19:22:57 -04:00
bors 9feaf1d023 auto merge of #8594 : bytewiseand/rust/static-fn-ptr, r=pcwalton
Fixes #8588
2013-08-21 15:51:34 -07:00
Ben Blum 22ad36d75b oops, xfail-fast the cross-crate superkind tests 2013-08-21 15:52:31 -04:00
Andreas Martens 5ed9f60a97 Changed fn main to pub fn main 2013-08-21 18:32:04 +02:00
Andreas Martens 0f6dd53948 Split cross-crate test into own test and xfail-fast it 2013-08-21 17:29:47 +02:00
Niko Matsakis 82a9abbf62 Change type of extern fns from *u8 to extern "ABI" fn
cc #3678
2013-08-21 10:50:37 -04:00
bors d4d856b129 auto merge of #8582 : thestinger/rust/container, r=thestinger
5f3a637 r=huonw
934a5eb r=thestinger
0f6e90a r=cmr
2013-08-21 01:01:47 -07:00
bors 48dded95c6 auto merge of #8580 : bytewiseand/rust/tuple-struct-ctor-ptr, r=alexcrichton
Fixes #5315
2013-08-20 23:11:50 -07:00
bors 00dd9e9cc5 auto merge of #8573 : mrordinaire/rust/struct-new-as-field-name, r=alexcrichton
fix for #8088, along with a test.
2013-08-20 21:41:50 -07:00
nsf 0f6e90a5fd Fix typo in test/bench/noise.rs. Closes #8574. 2013-08-20 22:38:00 -04:00
Daniel Micay 46fc549fa9 rm obsolete integer to_str{,_radix} free functions 2013-08-20 22:05:03 -04:00
Ben Blum 5796e9e49c Add tests for self type using builtin kinds. (#7083) 2013-08-20 15:56:34 -04:00
Ben Blum 4fd404f2ca Fixup style of test cases for #7083 2013-08-20 13:28:51 -04:00
Ben Blum 95089d3793 Add tests for super-builtin-kind capabilities (#7083) 2013-08-20 13:28:50 -04:00
Ben Blum 4ca2e55adb Add tests for #7083. 2013-08-20 13:28:50 -04:00
Ben Blum 369f7fa169 Prevent Send, Freeze, and Sized from being manually implemented. Close #8517. 2013-08-20 13:28:50 -04:00
Vadim Chugunov c8354ff958 Rename functional-struct-update.rs to avoid tripping Windows installer detector.
(The "update" keyword in the test name makes Windows want to run it with elevated privileges, which fails of course)
2013-08-19 18:45:09 -07:00
Graydon Hoare 29a449aae3 Add tests for cross-crate condition handling. Close #5446. 2013-08-19 15:09:20 -07:00
Graydon Hoare eaa378033c test: add testcase, close #4929 which was already fixed. 2013-08-19 15:09:20 -07:00
Graydon Hoare 8c78311e81 test: un-xfail now working run-pass/foreign-struct.rs, close #2334. 2013-08-19 15:09:19 -07:00
Kevin Ballard 8aa47990da Don't skip token after @'static
Fixes #8615.
2013-08-19 14:55:35 -07:00
bors 81a78161b5 auto merge of #8535 : nikomatsakis/rust/issue-3678-wrappers-be-gone-2, r=graydon
Long-standing branch to remove foreign function wrappers altogether. Calls to C functions are done "in place" with no stack manipulation; the scheme relies entirely on the correct use of `#[fixed_stack_segment]` to guarantee adequate stack space. A linter is added to detect when `#[fixed_stack_segment]` annotations are missing. An `externfn!` macro is added to make it easier to declare foreign fns and wrappers in one go: this macro may need some refinement, though, for example it might be good to be able to declare a group of foreign fns. I leave that for future work (hopefully somebody else's work :) ).

Fixes #3678.
2013-08-19 04:32:04 -07:00
Niko Matsakis 0479d946c8 Add externfn macro and correctly label fixed_stack_segments 2013-08-19 07:13:15 -04:00
Niko Matsakis 303f650ecf Issue #3678: Remove wrappers and call foreign functions directly 2013-08-19 07:13:15 -04:00
bors 3e4f40ec5a auto merge of #8564 : alexcrichton/rust/ifmt+++, r=graydon
See discussion in #8489, but this selects option 3 by adding a `Default` trait to be implemented by various basic types.

Once this makes it into a snapshot I think it's about time to start overhauling all current use-cases of `fmt!` to move towards `ifmt!`. The goal is to replace `%X` with `{}` in 90% of situations, and this commit should enable that.
2013-08-19 01:42:05 -07:00