Commit Graph

20565 Commits

Author SHA1 Message Date
James Miller
4a1a0fbed5 Add an atomic fence intrinsic 2013-07-28 20:26:49 +12:00
bors
20454da2db auto merge of #8069 : erickt/rust/maikklein, r=erickt
Good evening,

This is a superset of @MaikKlein's #7969 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 #7978 : 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 #8076 : omasanori/rust/cleanup, r=huonw
A cleanup suggested on #7922.
2013-07-27 20:13:22 -07:00
bors
82b29ae5a5 auto merge of #7864 : 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 #8074 : thestinger/rust/iterator, r=cmr
d7c9bb4 r=alexcrichton
7ae17e0 r=huonw
2013-07-27 16:37:27 -07:00
bors
098106870e auto merge of #8077 : 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 #8078 : luqmana/rust/gst, r=Aatch
Fixes #5917 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 #8066
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 #8036 : 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 #8070 : luqmana/rust/nom, r=alexcrichton
Fixes #5972.
2013-07-27 08:58:33 -07:00
bors
aa8f79d6cf auto merge of #8067 : alexcrichton/rust/issue-3636, r=huonw
Allow some common ones that are good for examples, however.

Closes #3636
2013-07-27 07:10:36 -07:00
bors
ed20fcc459 auto merge of #8060 : Blei/rust/fix-obsolete-extern-visibility-span, r=pcwalton 2013-07-27 05:25:34 -07:00
bors
e7211948a5 auto merge of #8045 : 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 #2533
2013-07-27 03:37:35 -07:00
bors
15310ba7c2 auto merge of #8040 : 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 #5917. 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 #7922.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-07-27 15:53:30 +09:00
bors
c5194740a7 auto merge of #8001 : 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 #8050 : 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 #7986 : 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 #6790. 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
bors
5c4cd30f80 auto merge of #7979 : crnobog/rust/auxfiles-path-windows, r=cmr 2013-07-26 17:49:40 -07:00
Michael Sullivan
f5721c9334 Eliminate unused variable warnings. 2013-07-26 16:42:03 -07:00
Michael Sullivan
8582fde150 Improve the camel case warning a bit. 2013-07-26 16:42:03 -07:00
Tim Chevalier
c8780511b9 rustpkg: Don't assume a non-numeric refspec is a tag
Just pass it directly to git, without prefixing it with tags/
2013-07-26 12:31:53 -07:00