Commit Graph

281 Commits

Author SHA1 Message Date
jmgrosen
4a18d46130 Fixes #8881. condition! imports parent's pub identifiers 2013-09-03 16:11:00 -07:00
Alex Crichton
2c1d6568f2 Fix a bug with statics inside blocks in generic fns
Whenever a generic function was encountered, only the top-level items were
recursed upon, even though the function could contain items inside blocks or
nested inside of other expressions. This fixes the existing code from traversing
just the top level items to using a Visitor to deeply recurse and find any items
which need to be translated.

This was uncovered when building code with --lib, because the encode_symbol
function would panic once it found that an item hadn't been translated.

Closes #8134
2013-08-29 18:51:29 -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
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
bors
9feaf1d023 auto merge of #8594 : bytewiseand/rust/static-fn-ptr, r=pcwalton
Fixes #8588
2013-08-21 15:51:34 -07: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
Ben Blum
4fd404f2ca Fixup style of test cases for #7083 2013-08-20 13:28:51 -04:00
Ben Blum
4ca2e55adb Add tests for #7083. 2013-08-20 13:28:50 -04:00
Graydon Hoare
29a449aae3 Add tests for cross-crate condition handling. Close #5446. 2013-08-19 15:09:20 -07:00
Niko Matsakis
0479d946c8 Add externfn macro and correctly label fixed_stack_segments 2013-08-19 07:13:15 -04:00
Andreas Martens
cc0c6fd43c Add assertions and cross crate tests 2013-08-18 22:17:47 +02:00
Erick Tryzelaar
ad5c676853 Fix warnings it tests 2013-08-17 08:42:35 -07:00
Alex Crichton
1764e207fb Add even more tests
Closes #8248
Closes #8249
Closes #8398
Closes #8401
2013-08-15 14:22:36 -07:00
Alex Crichton
443bf93e48 Fix a typo in the ifmt dox 2013-08-15 14:19:09 -07:00
Alex Crichton
783c6a1fbf Add a bunch of tests for closed issues
Closes #3907
Closes #5493
Closes #4464
Closes #4759
Closes #5666
Closes #5884
Closes #5926
Closes #6318
Closes #6557
Closes #6898
Closes #6919
Closes #7222
2013-08-13 21:32:34 -07:00
Alex Crichton
930885d5e5 Forbid pub/priv where it has no effect
Closes #5495
2013-08-12 23:20:46 -07:00
Erick Tryzelaar
09f4c9af13 Merge branch 'enum-method-privacy' of https://github.com/michaelwoerister/rust into rollup
Conflicts:
	src/libsyntax/opt_vec.rs
2013-08-10 12:59:52 -07:00
Corey Richardson
0627089bba Fix fallout 2013-08-07 23:20:06 -04:00
Alex Crichton
ffd80aa276 Fix unit structs in cross-crate situtations 2013-08-07 22:41:13 -04:00
Michael Woerister
2c9922aa49 Enable privacy check for enum methods. 2013-08-07 14:30:00 +02:00
Daniel Micay
1008945528 remove obsolete foreach keyword
this has been replaced by `for`
2013-08-03 22:48:02 -04:00
bors
bbcce8d95c auto merge of #8216 : thestinger/rust/range, r=huonw 2013-08-01 22:10:45 -07:00
Daniel Micay
234acad404 replace range with an external iterator 2013-08-02 00:51:14 -04:00
bors
ecefeb03cc auto merge of #8185 : alexcrichton/rust/issue-8179, r=pcwalton
* All globals marked as `pub` won't have the `internal` linkage type set
* All global references across crates are forced to use the address of the
  global in the other crate via an external reference.

r? @graydon

Closes #8179
2013-08-01 19:46:47 -07:00
Daniel Micay
1fc4db2d08 migrate many for loops to foreach 2013-08-01 05:34:55 -04:00
Alex Crichton
ea5f829307 Resolve globals having different addresses across crates
* All globals marked as `pub` won't have the `internal` linkage type set
* All global references across crates are forced to use the address of the
  global in the other crate via an external reference.
2013-08-01 01:54:34 -07:00
Brian Anderson
11fc1fd485 test: Use a test extern in various foreign fn tests 2013-07-30 21:13:55 -07:00
Alex Crichton
09e49a8e6c Allow linking against crates with #[no_std]
Previously having optional lang_items caused an assertion failure at
compile-time, and then once that was fixed there was a segfault at runtime of
using a NULL crate-map (crates with no_std)
2013-07-25 19:23:17 -07:00
bors
906264b50f auto merge of #8015 : msullivan/rust/default-methods, r=nikomatsakis
Lots of changes to vtable resolution, handling of super/self method calls in default methods. Fix a lot of trait inheritance bugs.

r? @nikomatsakis
2013-07-25 03:07:44 -07:00
Michael Sullivan
387df4e127 Fix the issue-3979 tests and add a new test. 2013-07-23 17:06:56 -07:00
Alex Crichton
5c6069141b Add a test for #5844 (a closed issue now) 2013-07-22 23:09:21 -07:00
Patrick Walton
06594ed96b librustc: Remove pub extern and priv extern from the language.
Place `pub` or `priv` on individual items instead.
2013-07-20 17:39:38 -07:00
bors
5c999d4eca auto merge of #7894 : pcwalton/rust/and-pointers-in-at-boxes, r=brson
r? @brson
2013-07-20 10:55:34 -07:00
Patrick Walton
9089cf2ec9 librustc: Forbid & pointers (other than &'static) inside @ boxes.
This makes custom borrowing implementations for custom smart pointers
sound.
2013-07-18 17:12:46 -07:00
Michael Sullivan
002bfd7966 Export information about used default methods instead of regenerating it. Closes #7862. 2013-07-18 13:56:15 -07:00
Patrick Walton
e20549ff19 librustc: Remove all uses of the Copy bound. 2013-07-17 14:57:53 -07:00
Patrick Walton
99b33f7219 librustc: Remove all uses of "copy". 2013-07-17 14:57:51 -07:00
Huon Wilson
e4f7561bcd Clean-up tests after debug!/std-macros change.
The entire testsuite is converted to using info! rather than debug!
because some depend on the code within the debug! being trans'd.
2013-07-17 03:10:13 +10:00
Michael Sullivan
3fa5203273 Take default methods out from behind the flag. 2013-07-11 15:51:10 -07:00
Michael Sullivan
186f6faf1e Get cross crate static default methods working. Closes #7569. 2013-07-11 15:51:10 -07:00
Michael Sullivan
7238d5a141 Make privacy checking on default methods for cross crate structs not fail. Closes #7481.
It is unclear to me that the way method call privacy checking is done
makes any sense, though. It is only performed if the type is a
struct...
2013-07-03 09:59:45 -07:00
Patrick Walton
1c0aa78481 librustc: Change "Owned" to "Send" everywhere 2013-06-28 10:44:15 -04:00
Patrick Walton
1eec3bba13 librustc: Rename Const to Freeze 2013-06-28 10:44:15 -04:00
Luqman Aden
ca2966c6d0 Change finalize -> drop. 2013-06-25 21:14:39 -04:00
Alex Crichton
1841b31c61 Add 'static mut' items to the language 2013-06-23 17:59:35 -07:00
Daniel Micay
d2e9912aea vec: remove BaseIter implementation
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-23 02:05:20 -04:00
Michael Sullivan
1a8969f64b Get cross crate default methods working.
This fixes the large number of problems that prevented cross crate
methods from ever working. It also fixes a couple lingering bugs with
polymorphic default methods and cleans up some of the code paths.

Closes #4102. Closes #4103.
2013-06-20 15:42:16 -07:00
Niko Matsakis
eb48c29681 Add copies to type params with Copy bound 2013-06-16 12:47:36 -04:00
Daniel Micay
ec27644870 automated whitespace fixes 2013-06-13 18:03:08 -04:00