Commit Graph

15743 Commits

Author SHA1 Message Date
bors
66f9e60ea9 auto merge of #5177 : catamorphism/rust/register-snapshots, r=catamorphism
Note that this throws FreeBSD under the bus. Hopefully we'll pull it back out again soon.
2013-02-28 18:36:38 -08:00
Tim Chevalier
326759337b Register snapshots 2013-02-28 18:31:16 -08:00
bors
916d1a9165 auto merge of #5176 : brson/rust/unwrap_shared_mutable_state, r=nikomatsakis
r?

This fixes the current [random failures](http://buildbot.rust-lang.org/builders/auto-linux/builds/291/steps/test/logs/stdio) on the bots and closes #4436 by removing `unwrap_shared_mutable_state` and the code that depends on it. The result is that ARC-like things will not be unwrappable. This feature is complex and is not used outside of test cases.

Note that there is not consensus to remove it.

(second commit)
2013-02-28 17:21:40 -08:00
bors
5680ec0270 auto merge of #5113 : alexcrichton/rust/issue-4366, r=catamorphism
The first two commits are the actual fix going into place, and the last is just dealing with the fallout in the rest of the compiler.

The test added in the first two commits had 0 failures before this patch, and if the glob imports were changed to explicit imports then the errors showed up. Due to this behavior, I figured that the desired behavior was for glob imports to not accidentally leak a lot of non-public imports/functions/types into other modules.

There was quite a lot of fallout, and it all passes `make check` locally, but I doubt that it will pass on all platforms because there's probably some guarded off thing I missed.

I plan on making another patch soon which changes the default level of `unused_imports` to `warn` which will hopefully reduce a lot of the `use` noise throughout. In conjunction with #5104, and a few minor fixes, I think that the default level of `warn` is actually really usable.
2013-02-28 15:21:41 -08:00
Brian Anderson
78d5091a4f core: Remove unwrap_shared_mutable_state. #4436 2013-02-28 15:20:40 -08:00
Alex Crichton
2df07ddc25 Fix implicit leaks of imports throughout libraries
Also touch up use of 'pub' and move some tests around so the tested functions
don't have to be 'pub'
2013-02-28 18:00:34 -05:00
Alex Crichton
f2837fa3f5 Fix leaking immediate children and types via glob imports 2013-02-28 17:59:56 -05:00
Alex Crichton
94a07b6e4a Fix leaking non-public 'use' statements with glob imports 2013-02-28 17:59:56 -05:00
Brian Anderson
b01d2babaf rt: Comment out an assert in rust_kernel. #4711 2013-02-28 14:21:39 -08:00
bors
0d30af1ebe auto merge of #5166 : danniel/rust/incoming, r=brson
I copied and adapted the syntax highlighting rules from Kate, to be used in GEdit and other GtkSourceView based editors.
2013-02-28 13:48:49 -08:00
bors
e1d3a4fb3e auto merge of #5156 : pcwalton/rust/method-privacy, r=pcwalton
r? @brson
2013-02-28 12:45:49 -08:00
Patrick Walton
2859c1ac6d librustc: Enforce cross-crate method privacy 2013-02-28 11:32:26 -08:00
Patrick Walton
09a2b4e599 librustc: Make methods private if the impl is private 2013-02-28 11:32:26 -08:00
Patrick Walton
107bf96ff0 librustc: Mark all type implementations public. rs=impl-publicity 2013-02-28 11:32:24 -08:00
Daniel Ursache Dogariu
1bcd4c674c Add syntax highlighting support for GtkSourceView / GEdit 2013-02-28 11:52:25 +02:00
bors
b171d0ef7b auto merge of #5159 : brson/rust/rtcall, r=brson 2013-02-28 01:12:38 -08:00
bors
c705440ee3 auto merge of #5155 : bstrie/rust/dedrop, r=pcwalton
This removes all but 6 uses of `drop {}` from the entire codebase. Removing any of the remaining uses causes various non-trivial bugs; I'll start reporting them once this gets merged.
2013-02-27 23:30:40 -08:00
bors
fcd4af169f auto merge of #5152 : catamorphism/rust/issue-3601, r=catamorphism 2013-02-27 22:15:38 -08:00
bors
6bff18ea0d auto merge of #5098 : pkgw/rust/pr/issue4869, r=brson
See issue #4869. I'm not quite sure what constitutes "consensus from the core team" (cf. discussion in the issue), but this at least demonstrates that the proposed change is pretty straightforward.

After this change, there are no new test failures. I've un-ignored the `to_str` vectors test; it's not at all obvious to me why it'd be problematic, and it passes on my Linux machine.
2013-02-27 20:39:39 -08:00
bors
292e946163 auto merge of #5106 : pnkfelix/rust/fix-docs, r=graydon
...s.  I freely admit I have not run a "make check" on this (trivial) change.
2013-02-27 19:03:41 -08:00
Brian Anderson
2f858de1c3 Remove the last remnants of rtcalls 2013-02-27 18:34:04 -08:00
bors
d0a12347de auto merge of #5141 : nikomatsakis/rust/region-syntax-expl-lifetimes, r=nikomatsakis
Major changes are:
- replace ~[ty_param] with Generics structure, which includes
  both OptVec<TyParam> and OptVec<Lifetime>;
- the use of syntax::opt_vec to avoid allocation for empty lists;

cc #4846

r? @graydon
2013-02-27 17:36:41 -08:00
bors
269409f912 auto merge of #5149 : brson/rust/rt, r=brson
Just a few minor things required for freestanding Rust.
2013-02-27 16:42:42 -08:00
Niko Matsakis
c623d21e38 Introduce lifetime declarations into the lists of type parameters.
Major changes are:
- replace ~[ty_param] with Generics structure, which includes
  both OptVec<TyParam> and OptVec<Lifetime>;
- the use of syntax::opt_vec to avoid allocation for empty lists;

cc #4846
2013-02-27 19:42:09 -05:00
Ben Striegel
43d43adf6b Turn old drop blocks into Drop traits 2013-02-27 19:14:19 -05:00
bors
6ebc761f99 auto merge of #5140 : yjh0502/rust/issue_4458, r=catamorphism
Fix is a bug fix for issue #4458.

This patch is quite straight-forward. A test for result_str() is added.
2013-02-27 15:45:41 -08:00
Tim Chevalier
dbbdca31b4 testsuite: Update and un-xfail #3601 test 2013-02-27 14:33:19 -08:00
bors
33e7a1f087 auto merge of #5145 : Kimundi/rust/incoming, r=catamorphism 2013-02-27 13:27:48 -08:00
Brian Anderson
1b1017087b rt: Make some runtime calls work outside of task context 2013-02-27 12:39:11 -08:00
bors
5fc0eccdfa auto merge of #5070 : youknowone/rust/struct-match2, r=nikomatsakis
It is reversed that type of arm pattern and type of search pattern
in error message.
2013-02-27 12:21:49 -08:00
Jeong YunWon
35baf5b202 Fix reversed current/expected type
Fix some reversed type of arm pattern and type of search pattern
in error message.
2013-02-28 03:31:22 +09:00
bors
a6d9689399 auto merge of #5136 : pcwalton/rust/impl-publicizing, r=pcwalton 2013-02-27 09:42:56 -08:00
Patrick Walton
07c3f5c0de librustc: Forbid pub or priv before trait implementations 2013-02-27 09:40:16 -08:00
Patrick Walton
573a31dfa7 libsyntax: Forbid mutable vectors. rs=demuting 2013-02-27 09:40:16 -08:00
Patrick Walton
8d7e6ef772 libsyntax: Forbid ~mut and ~const. rs=demuting 2013-02-27 09:40:15 -08:00
Marvin Löbel
c2be2ec42d Added ToStr implementations for &[T] and @[T] 2013-02-27 16:02:53 +01:00
bors
061a223723 auto merge of #5118 : youknowone/rust/match-guard, r=nikomatsakis
Fix ICE while there is no remained arms after checking guards.

This fix #3601 also.
2013-02-27 06:06:44 -08:00
Jihyun Yu
5ae9b2949f Fix: now sha1 result_str() return correct value 2013-02-27 22:48:55 +09:00
bors
8e492ccaa7 auto merge of #5123 : thestinger/rust/treemap, r=nikomatsakis
* replace the dual next() and get() calls with a single next() function
* drop one of the pointer members from the struct
* add a method for using the lazy iterator with a for loop
2013-02-27 05:18:39 -08:00
Daniel Micay
5b0a2d1fc0 treemap: improve the lazy iterator
* replace the dual next() and get() calls with a single next() function
* drop one of the pointer members from the struct
* add a method for using the lazy iterator with a for loop
2013-02-27 05:30:15 -05:00
bors
f4e8ac21cd auto merge of #5135 : brson/rust/start, r=pcwalton
r?

#3406

Pretty straightforward. I'm using opaque pointers instead trying to get trans and core to agree on the types of the main function and crate map. One oddity is that this required changing the order of the `-lrustrt` argument to the linker in order to resolve `upcall_new_stack`. Linkers are mysterious.
2013-02-26 23:45:39 -08:00
bors
a3dbd07979 auto merge of #5134 : brson/rust/disable-optimize-llvm, r=brson 2013-02-26 22:57:39 -08:00
bors
99a902c81d auto merge of #5120 : jbclements/rust/macros-have-scope, r=pcwalton
r?

After this patch, macros declared in a module, function, or block can only be used inside of that module, function or block, with the exception of modules declared with the #[macro_escape] attribute; these modules allow macros to escape, and can be used as a limited macro export mechanism.

This pull request also includes miscellaneous comments, lots of new test cases, a few renamings, and a few as-yet-unused data definitions for hygiene.
2013-02-26 20:00:38 -08:00
Brian Anderson
f4327230fa Add a 'start' lang item and use it instead of rust_start 2013-02-26 19:43:26 -08:00
bors
28b50a4892 auto merge of #5096 : luqmana/rust/spell, r=catamorphism
Address #2281


```
-> % cat foo.rs
fn foo() -> int {
    let bar = 10;

    bad
}
```

```
-> % rustc foo.rs
foo.rs:4:4: 4:7 error: unresolved name: `bad`. Did you mean: `bar`?
foo.rs:4     bad
             ^~~
error: aborting due to previous error
```
2013-02-26 19:03:40 -08:00
bors
93a7f237d7 auto merge of #5115 : sanxiyn/rust/arm-abi, r=brson
Type size and alignment code needs to be factored, but I didn't want to interfere with MIPS port. Can be done later.

Fix #4797.
2013-02-26 17:57:41 -08:00
Brian Anderson
3e6b2cfab5 Fix --disable-optimize-llvm 2013-02-26 17:30:32 -08:00
Luqman Aden
a0866d0166 Adjust error messages for compile-fail tests. 2013-02-26 17:23:30 -08:00
Luqman Aden
f460c2adf8 Move levenshtein distance fn to core::str. 2013-02-26 17:23:30 -08:00
Luqman Aden
0a0fcdb018 librustc: offer suggestions for unresolved names. 2013-02-26 17:23:30 -08:00