Commit Graph

46282 Commits

Author SHA1 Message Date
christopherdumas
17fde3a34d Removed incorrect reference from #28196 2015-09-03 14:39:34 -07:00
Aleksey Kladov
73a6199248 reference grammar: fix item definition
extern_block should extern_block_item
2015-09-04 00:29:47 +03:00
Aleksey Kladov
f7d5c25b3d reference grammar: whitespace cleanup 2015-09-03 23:42:33 +03:00
Tshepang Lekhonkhobe
6cdba4f766 book: it is RwLock, not RWLock 2015-09-03 22:14:28 +02:00
bors
1b908be9a0 Auto merge of #28200 - Manishearth:rollup, r=Manishearth
- Successful merges: #28164, #28170, #28184, #28186, #28187, #28188, #28191, #28193, #28194, #28195
- Failed merges:
2015-09-03 20:10:42 +00:00
Manish Goregaokar
e6e175b828 Add ptr import (fixup #28187) 2015-09-04 01:40:05 +05:30
Manish Goregaokar
94807b2f9c Rollup merge of #28195 - AlisdairO:diagnostics214, r=Manishearth
As title :-)
Part of #24407.

r? @Manishearth
2015-09-04 01:40:04 +05:30
Manish Goregaokar
956c5977ac Rollup merge of #28194 - steveklabnik:add_fixme, r=alexcrichton 2015-09-04 01:40:04 +05:30
Manish Goregaokar
75ca401f2d Rollup merge of #28193 - dhuseby:fixing_bitrig_alloc_crate_tests, r=alexcrichton
@alexcrichton this will get the bitrig buildbot back to green.
2015-09-04 01:40:03 +05:30
Manish Goregaokar
3c4d6d626f Rollup merge of #28191 - llogiq:iter, r=Manishearth
Nothing too big, a few needless returns and a few closures eliminated (the latter may improve performance in some cases, at least compilation should be a bit faster).
2015-09-04 01:40:03 +05:30
Manish Goregaokar
cac4a1c5c8 Rollup merge of #28188 - Manishearth:elide-core, r=alexcrichton
Makes things more greppable.

This change was made automatically by clippy + bash scripts, though I will run test passes, please review carefully.
2015-09-04 01:40:02 +05:30
Manish Goregaokar
9ea8f3e2dd Rollup merge of #28187 - petrochenkov:null, r=aturon
And replace more `0 as *const T`/`0 as *mut T`s with `null()`/`null_mut()`s

I'm not sure what is the general policy about making simple functions `const`, but `null()` and `null_mut()` seem to be good candidates.
2015-09-04 01:40:02 +05:30
Manish Goregaokar
67616f7191 Rollup merge of #28186 - thomas07vt:thomas07vt-patch-trpl-rust-inside-other-languages.md, r=steveklabnik
The embed rust file that we compile prints out 'Thread finished..' messages along with a 'done!' r? @steveklabnik
2015-09-04 01:40:02 +05:30
Manish Goregaokar
0c2924386d Rollup merge of #28184 - xiaochuanyu:patch-1, r=alexcrichton
Originally in an example it reads as follows:
```rust
fn inverse<T>() -> T
        // this is using ConvertTo as if it were "ConvertFrom<i32>"
         where i32: ConvertTo<T> {
     42.convert()
 }
```
There was no mention of `ConvertFrom` elsewhere in the page other than in this comment. Is this supposed to be `ConvertTo<i64>` ?
I'm confused by this example.
2015-09-04 01:40:01 +05:30
Tshepang Lekhonkhobe
355847f5c1 doc: reduce indentation of examples to 4 spaces
Also, add trailing commas
2015-09-03 22:08:47 +02:00
Tshepang Lekhonkhobe
23956ae1f4 book: improve flow 2015-09-03 21:54:00 +02:00
Tshepang Lekhonkhobe
197cec6ed9 book: Rust is a language, so no need to mention that fact here 2015-09-03 21:40:19 +02:00
Aleksey Kladov
59f2343bdb reference grammar: remove procedure_type 2015-09-03 22:25:47 +03:00
Aleksey Kladov
000fe00726 reference grammar: remove duplicate else_tail rule 2015-09-03 22:19:56 +03:00
benshu
986f523b89 Take method invocation semantics out of chapter on deref coercion. 2015-09-03 21:17:59 +02:00
Tshepang Lekhonkhobe
3525a13fea book: "word" feels more suitable than "name"
Also, add missing comma
2015-09-03 21:14:03 +02:00
Aleksey Kladov
83aee74fce reference grammar: loop label should be optional
This adds missing `?` marks to productions for loops and break/continue.

It also adds missing option label to while let loop
2015-09-03 22:13:50 +03:00
Tshepang Lekhonkhobe
8b2b949830 book: replace comma with a more suitable character 2015-09-03 21:11:44 +02:00
Andrew Paseltiner
b8dad48435 Fix multiple mutable autoderefs with Box
Closes #26205.
2015-09-03 14:41:27 -04:00
Manish Goregaokar
2a40e46f18 Rollup merge of #28164 - AlisdairO:diagnostics329, r=Manishearth
As title :-)
Part of #24407.

r? @Manishearth
2015-09-03 23:30:36 +05:30
Alex Crichton
6bb2c5d322 std: Update CString::{into,from}_raw with *mut T
Conventionally in C `*mut T` is a transfer of ownership where `*const T` is a
loan, so `*mut T` is likely the more appropriate return type for these
functions. Additionally, this more closely mirrors the APIs on `Box` for this
sort of functionality.

cc #27769
2015-09-03 10:36:34 -07:00
Vadim Petrochenkov
52417d5b5c Implement Borrow for fixed-size arrays 2015-09-03 19:35:26 +03:00
Alisdair Owens
130e8d4ff2 add long diagnostics for E0214 2015-09-03 17:01:50 +01:00
Georg Brandl
a88659d8a6 middle: use filter_map instead of flat_map with Option iters 2015-09-03 17:54:59 +02:00
bors
0762f58c11 Auto merge of #28192 - Manishearth:lint-hir, r=eddyb
LintPass still uses the AST, though there isn't any need to. This makes it hard to move lints to the HIR.

r? @eddyb @nrc
2015-09-03 15:42:16 +00:00
Manish Goregaokar
7732ad85df Move lints to HIR 2015-09-03 20:58:07 +05:30
Steve Klabnik
9e79fc2d22 Add an issue number to this FIXME 2015-09-03 11:00:40 -04:00
Dave Huseby
e5e4744766 Fixes #27886 -- bitrig does not use jemalloc (yet) 2015-09-03 07:26:17 -07:00
bors
9e9c83b899 Auto merge of #28176 - arielb1:fast-index, r=eddyb
r? @eddyb
2015-09-03 13:01:03 +00:00
llogiq
e1f89196a0 take mapped function by mutable reference 2015-09-03 14:50:06 +02:00
Manish Goregaokar
a520568ae7 Elide lifetimes in libcore 2015-09-03 17:46:35 +05:30
Ariel Ben-Yehuda
16f75f773d create a region-map for types in generics
Fixes #28181
This may fix #28151
2015-09-03 13:35:41 +03:00
llogiq
b6a3978886 clippy improvements to iterators 2015-09-03 12:35:34 +02:00
Ariel Ben-Yehuda
cde09e7ca3 rewrite metadata indexing
this improves the compilation time for small crates by ~20%
2015-09-03 12:59:51 +03:00
Ariel Ben-Yehuda
fcad49e416 remove totally useless struct-field index 2015-09-03 12:23:56 +03:00
Simonas Kazlauskas
c493084ec1 Adapt the PR for HIR changes 2015-09-03 11:54:17 +03:00
Vadim Petrochenkov
405c616eaf Use consistent terminology for byte string literals
Avoid confusion with binary integer literals and binary operator expressions in libsyntax
2015-09-03 10:54:53 +03:00
Vadim Petrochenkov
06fb196256 Use null()/null_mut() instead of 0 as *const T/0 as *mut T 2015-09-03 09:49:50 +03:00
John Thomas
6fcdead4ee Bash output fix to match real 'ruby embed.rb' call
The embed rust file that we compile prints out 'Thread finished..' messages along with a 'done!'
2015-09-02 23:13:56 -07:00
Vadim Petrochenkov
3903ea96f5 Make null() and null_mut() const functions 2015-09-03 09:03:52 +03:00
Xiao Chuan Yu
865d6c3b5b Fix mistake in trait.md 2015-09-03 01:36:22 -04:00
bors
1661947014 Auto merge of #28182 - jackwilsonv:patch-2, r=steveklabnik
r? @steveklabnik

##### About the `struct` section specifically:
I wasn't sure how you'd feel about the first instance since it was originally capitalized, happy to change it back if you think that's better.

Also, I left 'tuple struct' as is since together it isn't a keyword. The first instance currently has single quotes but the others have nothing. I think that feels right.

##### Generally:
I'm working through the book now and I'm happy to keep updating this branch with any formatting tweaks or updates I find if that's easier for you guys, otherwise I'll just create smaller PRs as I go. Just let me know.
2015-09-03 04:43:40 +00:00
bors
69c3b39d0d Auto merge of #28174 - steveklabnik:gh14705, r=alexcricton
Because 'doc' is a directory, when running `make doc`, you'll see
this:

    make: Nothing to be done for `doc'.

By adding a target for `doc` to build `docs`, both work.

Fixes #14705
2015-09-03 02:12:21 +00:00
Steve Klabnik
7c8c72d3b0 Introduce 'make doc' -> 'make docs'
Because 'doc' is a directory, when running `make doc`, you'll see
this:

    make: Nothing to be done for `doc'.

By adding a target for `doc` to build `docs`, both work.

Fixes #14705
2015-09-02 22:00:58 -04:00
Jack Wilson
28bf68f3fe Makes formatting of struct keyword consistent 2015-09-02 18:58:18 -07:00