Commit Graph

31536 Commits

Author SHA1 Message Date
Steve Klabnik
b1435ed593 Guide: tasks 2014-08-07 15:21:57 -04:00
mdinger
0582a2d6e7 Fix typo 2014-08-07 15:14:16 -04:00
bors
50834e7de4 auto merge of #16317 : adrienbrault/rust/patch-1, r=kballard 2014-08-07 18:56:11 +00:00
Steve Klabnik
aa8602e20a Guide: closures 2014-08-07 14:11:14 -04:00
bors
4879ca7924 auto merge of #15831 : rpjohnst/rust/generic-foreign-fns, r=alexcrichton
This allows for things like this:

    extern "C" fn callback<T>(t: T) { /* ... */ }
    extern "C" {
        fn take_callback(c: extern fn(i32));
    }

and later:

    take_callback(callback::<i32>);

Closes #12502.
2014-08-07 15:56:43 +00:00
Alex Crichton
1f760d5d1a Rename Share to Sync
This leaves the `Share` trait at `std::kinds` via a `#[deprecated]` `pub use`
statement, but the `NoShare` struct is no longer part of `std::kinds::marker`
due to #12660 (the build cannot bootstrap otherwise).

All code referencing the `Share` trait should now reference the `Sync` trait,
and all code referencing the `NoShare` type should now reference the `NoSync`
type. The functionality and meaning of this trait have not changed, only the
naming.

Closes #16281
[breaking-change]
2014-08-07 08:54:38 -07:00
Nathan Froyd
0d974eecd3 fix grammar in Vec.retain's doc comment 2014-08-07 11:27:06 -04:00
Gioele Barabucci
ddeb3db872 Use system rustc if configured with --enable-local-rust
This commit makes the configuration system autodetect a rustc that
is already installed and use that instead of downloading a snapshot.
2014-08-07 15:55:10 +02:00
Huon Wilson
3826026f98 rustc: gensym the module names for --test to avoid introducing user-accessible names.
This requires avoiding `quote_...!` for constructing the parts of the
__test module, since that stringifies and reinterns the idents, losing
the special gensym'd nature of them. (#15962.)
2014-08-07 21:54:13 +10:00
bors
8a02304a44 auto merge of #16318 : nikomatsakis/rust/issue-5723-bootstrap-2, r=pnkfelix
Introduce syntax for lifetime bounds like `'b:'a`, meaning `'b outlives 'a`. Syntax currently does nothing but is needed for full fix to #5763. To use this syntax, the issue_5763_bootstrap feature guard is required.
2014-08-07 11:31:05 +00:00
Niko Matsakis
fcab98038c Temporary bootstrapping hack: introduce syntax for r egion bounds like 'b:'a,
meaning `'b outlives 'a`. Syntax currently does nothing but is needed for full
fix to #5763. To use this syntax, the issue_5763_bootstrap feature guard is
required.
2014-08-07 07:23:59 -04:00
Peter Atashian
feb219d23f windows: Fix several tests on 64-bit.
Signed-off-by: Peter Atashian <retep998@gmail.com>
2014-08-07 04:05:00 -04:00
bors
1a53c00117 auto merge of #16220 : tshepang/rust/temp, r=steveklabnik 2014-08-07 07:16:04 +00:00
Adrien Brault
c186b4be6b Fix typo in the tutorial 2014-08-06 23:09:08 -07:00
bors
e9c5c4c9bd auto merge of #16316 : forticulous/rust/char-Fix, r=alexcrichton
Signature for `from_digit` in `Char` wasn't using `Self` so there was no way to use this method
2014-08-07 04:21:04 +00:00
bors
7be8f0af03 auto merge of #16306 : pnkfelix/rust/fsk-ast-refactor-PatWild, r=alexcrichton
AST refactoring: merge PatWild and PatWildMulti into one variant with a flag
2014-08-07 02:26:07 +00:00
fort
ef03363059 Char::from_digit signature fix 2014-08-06 18:46:54 -07:00
Kevin Butler
64896d6103 libcollections: Fix RingBuf growth for non-power-of-two capacities 2014-08-07 02:11:13 +01:00
bors
8fe73f1166 auto merge of #16291 : nham/rust/byte_literals, r=alexcrichton
This replaces many instances chars being casted to u8 with byte literals.
2014-08-06 23:41:05 +00:00
bors
b9308d1ff0 auto merge of #16225 : pczarn/rust/iter-refactoring, r=kballard
Simplifying the code of methods: `nth`, `fold`, `rposition`, and iterators: `Filter`, `FilterMap`, `SkipWhile`.

```
before
test iter::bench_multiple_take      ... bench:        15 ns/iter (+/- 0)
test iter::bench_rposition          ... bench:       349 ns/iter (+/- 94)
test iter::bench_skip_while         ... bench:       158 ns/iter (+/- 6)

after
test iter::bench_multiple_take      ... bench:        15 ns/iter (+/- 0)
test iter::bench_rposition          ... bench:       314 ns/iter (+/- 2)
test iter::bench_skip_while         ... bench:       107 ns/iter (+/- 0)
```
@koalazen has the code for `Skip`.

Once #16011 is fixed, `min_max` could use a for loop.
2014-08-06 21:56:07 +00:00
bors
51e19e7501 auto merge of #16308 : alexcrichton/rust/rollup, r=alexcrichton 2014-08-06 19:26:19 +00:00
Alex Crichton
ffa258846a Merge commit '3b41f3256228ffb01225eab671ef301aa18337d7' into rollup 2014-08-06 11:25:47 -07:00
Alex Crichton
d29123b35d Merge commit 'd92eaf0273af8c09112f951b2f483505b2f3e8c9' into rollup 2014-08-06 11:25:45 -07:00
Alex Crichton
1652d4ab08 Merge commit 'c6c3f47f7c72ddf45ba1bf6bae6bec3699d7212e' into rollup 2014-08-06 11:25:42 -07:00
Alex Crichton
0f9ee795f9 Merge commit 'cb8bd83888cddc37c912be648ce5a814b08ceb25' into rollup 2014-08-06 11:25:36 -07:00
Alex Crichton
10c8105842 Merge commit '74ae05ad90d1e809663702f374bba6e62671692c' into rollup 2014-08-06 11:25:22 -07:00
Alex Crichton
720746a139 Merge commit '881bfb1a180a1b545daa9da1539ec4c8ebda7ed1' into rollup 2014-08-06 11:25:14 -07:00
Alexis Beingessner
dd437ee6ed make rustdoc more responsive
* move some sidebar contents to a title bar when small
* inline description toggle when small
* make out-of-band and in-band content share space, rather than float and clash
* compress wording of out-of-band content to avoid line-wrap as much as possible
2014-08-06 14:06:52 -04:00
bors
dd20f09611 auto merge of #15985 : jfager/rust/r6334, r=pnkfelix
Closes #6334
2014-08-06 17:31:19 +00:00
nham
96d1712511 Use byte literals in libgetopts 2014-08-06 13:06:37 -04:00
nham
efdb77b8d4 Remove cast to char in libserialize::hex 2014-08-06 12:23:21 -04:00
bors
e5df5f5606 auto merge of #15865 : jamesrhurst/rust/ctags-regex, r=alexcrichton
Previously the implementation detection regex would detect
`impl fmt::Show for MyStruct` as `fmt`. Now it will be detected as
`fmt::Show for MyStruct`. Implementations such as `impl MyStruct` will
still be detected as `MyStruct`.
2014-08-06 15:51:19 +00:00
Felix S. Klock II
d3202354f5 AST refactoring: merge PatWild and PatWildMulti into one variant with a flag. 2014-08-06 17:04:44 +02:00
bors
8fcfd02d85 auto merge of #16276 : nham/rust/fix_marker_docs, r=steveklabnik 2014-08-06 13:21:27 +00:00
bors
b09a02b415 auto merge of #16263 : brson/rust/morestack, r=alexcrichton 2014-08-06 10:26:30 +00:00
Piotr Czarnecki
a55149b84e core: Refactor iterators
Simplifying the code of methods: nth, fold, rposition
and iterators: Filter, FilterMap, SkipWhile
Adding basic benchmarks
2014-08-06 11:20:37 +01:00
Simon Sapin
3b41f32562 Rustdoc: Add padding on <code>
… to separate text from the edge of the newly added background.
2014-08-06 11:07:35 +01:00
Simon Sapin
7f388068b9 Rustdoc: Highlight <code> elements (from Markdown backticks) 2014-08-06 11:03:18 +01:00
Simon Sapin
d92eaf0273 Gtksourceview language spec: add the \0 escape sequence. 2014-08-06 10:18:22 +01:00
bors
84782c4e26 auto merge of #16258 : aturon/rust/stabilize-atomics, r=alexcrichton
This commit stabilizes the `std::sync::atomics` module, renaming it to
`std::sync::atomic` to match library precedent elsewhere, and tightening
up behavior around incorrect memory ordering annotations.

The vast majority of the module is now `stable`. However, the
`AtomicOption` type has been deprecated, since it is essentially unused
and is not truly a primitive atomic type. It will eventually be replaced
by a higher-level abstraction like MVars.

Due to deprecations, this is a:

[breaking-change]
2014-08-06 08:31:28 +00:00
Daniel Hofstetter
c6c3f47f7c Guide: Fix imports (times_four instead of add_four) 2014-08-06 09:51:02 +02:00
nham
6df514b061 Use byte literals in libcore 2014-08-06 02:30:17 -04:00
nham
3fb78e29f4 Use byte literals in libstd 2014-08-06 02:02:50 -04:00
nham
dfdea3f116 Use byte literals in libsyntax 2014-08-06 01:31:48 -04:00
nham
20d1ad9b59 Use byte literal in libnum 2014-08-06 01:29:26 -04:00
Russell
f7aadee14e Add new tests for extern and foreign fns and name mangling. 2014-08-05 23:28:50 -06:00
Russell
e6e6ef24ab Allow generic foreign functions.
Generic extern functions written in Rust have their names mangled, as well as their internal clownshoe __rust_abi functions. This allows e.g. specific monomorphizations of these functions to be used as callbacks.

Closes #12502.
2014-08-05 23:28:50 -06:00
nham
daf432e8b6 Use byte literals in libterm 2014-08-06 01:25:48 -04:00
nham
30cfce3d92 Use a byte literal in libregex 2014-08-06 01:18:19 -04:00
nham
1c2c4942a6 Use byte literals in libdebug 2014-08-06 01:14:31 -04:00