Commit Graph

20569 Commits

Author SHA1 Message Date
bors
fe9929e303 auto merge of : luqmana/rust/rhelp, r=Aatch
 

While the code that was there should've been perfectly fine (and seemingly is on linux at least) there seems to be some sort of weird interaction going on with statics and vectors. I couldn't get a smaller test case to reproduce that behaviour. The for loop in `rust::usage` seemingly just goes past the end of the vector thus getting garbage which it tries to pass to malloc somewhere down the line.

In any case, using a fixed length vector seems to mitigate this.
2013-07-28 02:07:27 -07:00
Luqman Aden
7bd6a92a5a librust: Stop rust tool from crashing on macos. 2013-07-28 04:52:13 -04:00
James Miller
639819f3d9 Fix spelling errors 2013-07-28 20:45:23 +12:00
James Miller
5c7e016700 Add static initializers for atomics 2013-07-28 20:26:49 +12:00
James Miller
4a1a0fbed5 Add an atomic fence intrinsic 2013-07-28 20:26:49 +12:00
bors
20454da2db auto merge of : erickt/rust/maikklein, r=erickt
Good evening,

This is a superset of @MaikKlein's  commit, that I've fixed up to compile. I had a couple commits I wanted to do on top of @MaikKlein's work that I didn't want to bitrot.
2013-07-28 00:19:21 -07:00
Erick Tryzelaar
b147d70b08 std: cleanup imports in result::tests 2013-07-27 23:42:53 -07:00
Erick Tryzelaar
3478589b99 std and rustc: cleanup uses of result methods 2013-07-27 23:42:53 -07:00
Erick Tryzelaar
ea106f72f7 core: correct the casing of result::{Ok,Err} in the docs 2013-07-27 23:42:53 -07:00
Erick Tryzelaar
796b3371f9 std: Put the option tests into a tests submodule 2013-07-27 23:42:53 -07:00
Erick Tryzelaar
03a16dbb8e std: fix the casing of option::{Some,None} in the docs 2013-07-27 23:41:10 -07:00
Erick Tryzelaar
2a68c719f4 to_either + fixes 2013-07-27 23:41:09 -07:00
Erick Tryzelaar
aad53cb6e2 cleanup .map and .map_err 2013-07-27 23:41:09 -07:00
maikklein
9dc1de4c9e cleanup .get and .get_err 2013-07-27 23:41:09 -07:00
maikklein
f6bcf5d5f1 cleanup .chain and .chain_err + fixing other files 2013-07-27 23:41:09 -07:00
Erick Tryzelaar
e308167a2f cleanup .unwrap and .unwrap_err fixing io tests 2013-07-27 23:41:09 -07:00
Erick Tryzelaar
4eb95f6d1c cleanup .iter and .iter_err 2013-07-27 23:41:09 -07:00
Erick Tryzelaar
225f1c760d cleanup get_ref 2013-07-27 23:41:09 -07:00
bors
9325535b41 auto merge of : sstewartgallus/rust/rename_arc, r=bblum
To be more specific:

`UPPERCASETYPE` was changed to `UppercaseType`
`type_new` was changed to `Type::new`
`type_function(value)` was changed to `value.method()`
2013-07-27 22:31:22 -07:00
Steven Stewart-Gallus
39b3a0561f Fix nits. 2013-07-27 22:06:29 -07:00
Steven Stewart-Gallus
d0b7515aed Change concurrency primitives to standard naming conventions
To be more specific:

`UPPERCASETYPE` was changed to `UppercaseType`
`type_new` was changed to `Type::new`
`type_function(value)` was changed to `value.method()`
2013-07-27 22:06:29 -07:00
bors
3078e83c3f auto merge of : omasanori/rust/cleanup, r=huonw
A cleanup suggested on .
2013-07-27 20:13:22 -07:00
bors
82b29ae5a5 auto merge of : brson/rust/start-on-main-thread, r=brson
Applications that need to use the GUI can override start and set up the runtime using
this function.
2013-07-27 18:25:24 -07:00
Brian Anderson
34a27db8bf std::rt: Add start_on_main_thread function
Applications that need to use the GUI can override start and set up the runtime using
this function.
2013-07-27 17:36:14 -07:00
bors
b027c5fce3 auto merge of : thestinger/rust/iterator, r=cmr
d7c9bb4 r=alexcrichton
7ae17e0 r=huonw
2013-07-27 16:37:27 -07:00
bors
098106870e auto merge of : graydon/rust/reorganize-driver, r=pcwalton
The purpose here is to get rid of compile_upto, which pretty much always requires the user to read the source to figure out what it does. It's replaced by a sequence of obviously-named functions:

  - phase_1_parse_input(sess, cfg, input);
  - phase_2_configure_and_expand(sess, cfg, crate);
  - phase_3_run_analysis_passes(sess, expanded_crate);
  - phase_4_translate_to_llvm(sess, expanded_crate, &analysis, outputs);
  - phase_5_run_llvm_passes(sess, &trans, outputs);
  - phase_6_link_output(sess, &trans, outputs); 

Each of which takes what it takes and returns what it returns, with as little variation as possible in behaviour: no "pairs of options" and "pairs of control flags". You can tell if you missed a phase because you will be missing a `phase_N` call to some `N` between 1 and 6.

It does mean that people invoking librustc from outside need to write more function calls. The benefit is that they can _figure out what they're doing_ much more easily, and stop at any point, rather than further overloading the tangled logic of `compile_upto`.
2013-07-27 14:49:28 -07:00
Daniel Micay
fe955e7b06 iterator: add an Extendable trait 2013-07-27 17:42:10 -04:00
Daniel Micay
ffe549daf5 vec: replace some as_mut_buf with to_mut_ptr 2013-07-27 17:30:29 -04:00
bors
32622cef99 auto merge of : luqmana/rust/gst, r=Aatch
Fixes  by not trying to treat `&[T]` as a slice since it already is one.
2013-07-27 13:01:32 -07:00
blake2-ppc
7ae17e0964 Remove dummy type parameters from iterator adaptors
With the recent fixes to method resolution, we can now remove the
dummy type parameters used as crutches in the iterator module.

For example, the zip adaptor type is just ZipIterator<T, U> now.
2013-07-27 14:37:55 -04:00
Daniel Micay
d7c9bb4b68 vec: add mut_slice_{to,from}
Closes 
2013-07-27 14:36:52 -04:00
Daniel Micay
d6bc438bbc make RandomAccessIterator inherit from Iterator 2013-07-27 14:36:52 -04:00
bors
5157e05049 auto merge of : sfackler/rust/container-impls, r=msullivan
A couple of implementations of Container::is_empty weren't exactly
self.len() == 0 so I left them alone (e.g. Treemap).
2013-07-27 11:16:31 -07:00
bors
0522955d10 auto merge of : luqmana/rust/nom, r=alexcrichton
Fixes .
2013-07-27 08:58:33 -07:00
bors
aa8f79d6cf auto merge of : alexcrichton/rust/issue-3636, r=huonw
Allow some common ones that are good for examples, however.

Closes 
2013-07-27 07:10:36 -07:00
bors
ed20fcc459 auto merge of : Blei/rust/fix-obsolete-extern-visibility-span, r=pcwalton 2013-07-27 05:25:34 -07:00
bors
e7211948a5 auto merge of : michaelwoerister/rust/destructuring, r=jdm
As the title says, valid debug info is now generated for any kind of pattern-based bindings like an example from the automated tests: 
```rust
let ((u, v), ((w, (x, Struct { a: y, b: z})), Struct { a: ae, b: oe }), ue) =
    ((25, 26), ((27, (28, Struct { a: 29, b: 30})), Struct { a: 31, b: 32 }), 33);  
```
(Not that you would necessarily want to do a thing like that :P )

Fixes 
2013-07-27 03:37:35 -07:00
bors
15310ba7c2 auto merge of : luqmana/rust/rtn, r=brson
Implements various missing tcp & udp methods.. Also fixes handling ipv4-mapped/compatible ipv6 addresses and addresses the XXX on `status_to_maybe_uv_error`.

r? @brson
2013-07-27 01:49:35 -07:00
Luqman Aden
68b61e8cc9 Add test for . 2013-07-27 04:47:12 -04:00
Luqman Aden
4a85b08e08 librustc: Stop trying to make invalid slice with vec in static. 2013-07-27 04:47:12 -04:00
Graydon Hoare
413446c85b rustc: reorganize driver, replace compile_upto with multiple more-obvious functions. 2013-07-27 00:48:05 -07:00
OGINO Masanori
8d654fc41d Remove unnecessary #[path = "***/mod.rs"] lines.
Fixes .

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-07-27 15:53:30 +09:00
bors
c5194740a7 auto merge of : crnobog/rust/xfail-win32-7999, r=cmr 2013-07-26 23:52:33 -07:00
Luqman Aden
c32b26be10 librustc: Unify name mangling for functions and statics. 2013-07-27 01:50:20 -04:00
bors
300ba1cc5c auto merge of : msullivan/rust/cleanup, r=graydon
And a couple other things. Fix up some unused variable warnings, and improve the camel case lint message a little.
2013-07-26 21:43:38 -07:00
Michael Sullivan
07361802a2 Register snapshots. 2013-07-26 20:43:18 -07:00
Luqman Aden
e82394013d librustc: Respect no_mangle attribute on statics. 2013-07-26 23:41:22 -04:00
Tim Chevalier
7079ec6e2e docs: Talk about tags that aren't versions in the "Package identifiers" section 2013-07-26 20:06:41 -07:00
bors
4989799799 auto merge of : alexcrichton/rust/raw-repr, r=brson
This moves the raw struct layout of closures, vectors, boxes, and strings into a
new `unstable::raw` module. This is meant to be a centralized location to find
information for the layout of these values.

As safe method, `unwrap`, is provided to convert a rust value to its raw
representation. Unsafe methods to convert back are not provided because they are
rarely used and too numerous to write an implementation for each (not much of a
common pattern).

This is progress on . I tried to get a nice interface for a trait to implement in the raw module, but I was unable to come up with one. The hard part is that there are so many different directions to go from one way to another that it's difficult to find a pattern to follow to implement a trait with. Someone else might have some better luck though.
2013-07-26 19:46:36 -07:00
Alex Crichton
b782d42cba Deny all warnings by default in doc tests
Allow some common ones that are good for examples, however.
2013-07-26 18:04:20 -07:00