Commit Graph

45279 Commits

Author SHA1 Message Date
Steve Klabnik
5af1b3f3a3 Improve docs for mem::forget()
We were burying the reason to use this function below a bunch of caveats about
its usage. That's backwards. Why a function should be used belongs at the top of
the docs, not the bottom.

Also, add some extra links to related functions mentioned in the body.
2015-08-04 16:45:32 -04:00
Brian Anderson
ac085a6a9e Bump to 1.4 2015-08-04 12:47:00 -07:00
bors
eb11d65d08 Auto merge of #27515 - Eljay:rustdoc-search, r=alexcrichton
Some small changes to (hopefully) make search more useful:

* Less strict filtering, e.g:
    * searching for "fn: foo" now matches methods and trait functions as well.
    * searching for types also matches primitive types.
    * searching for const will also match associated constants (but there aren't any in std yet)
* Changed searching for types to use the actual keyword "type" instead of the strange C-like "typedef".
* Added const and macro to allowed keywords.
2015-08-04 19:37:50 +00:00
Chris Nixon
d5b522e20e Tweaked concurrency.md 2015-08-04 20:36:28 +01:00
Jan Likar
c1f938d7b8 Rearrange sections in "Patterns"
- Move "Destructuring" after "Multiple patterns", because some of
    later sections include examples which make use of destructuring.

  - Move "Ignoring bindings" after "Destructoring", because the former
    features Result<T,E> destructuring. Some of examples in later
    sections use "_" and "..", so "Ignoring bindings" must be
    positioned before them.

  - Fix #27347 by moving "Ref and mut ref" before "Ranges" and
    "Bindings", because "Bindings" section includes a somewhat
    difficult example, which also makes use of "ref" and "mut ref"
    operators.
2015-08-04 20:22:42 +02:00
bors
c980aba9a8 Auto merge of #27508 - friedm:remove_integer_suffixes, r=alexcrichton
For #27501  

r? @steveklabnik
2015-08-04 16:31:16 +00:00
Eljay
acf9d6768e Improve rustdoc search type filtering. 2015-08-04 16:40:23 +01:00
bors
4b79add086 Auto merge of #27512 - Manishearth:rollup, r=Manishearth
- Successful merges: #27397, #27398, #27460, #27470, #27491, #27498, #27502
- Failed merges:
2015-08-04 12:31:32 +00:00
Manish Goregaokar
614f640856 Rollup merge of #27502 - rust-lang:grammer, r=brson
this grammar isn't correct

this should also get backported to beta

/cc @brson
2015-08-04 18:00:53 +05:30
Manish Goregaokar
0bf16ffe1c Rollup merge of #27498 - nagisa:eeeeeeh, r=Gankro
r? @Gankro
2015-08-04 18:00:53 +05:30
Manish Goregaokar
6be272cff5 Rollup merge of #27491 - GuillaumeGomez:patch-4, r=Manishearth 2015-08-04 18:00:53 +05:30
Manish Goregaokar
33663f0bd5 Rollup merge of #27470 - cactorium:e0074toe0077, r=alexcrichton
For https://github.com/rust-lang/rust/issues/24407
2015-08-04 18:00:52 +05:30
Manish Goregaokar
5f841eb824 Rollup merge of #27460 - JanLikar:master, r=steveklabnik
- Fix #26968 by noting the difference between ".." and "_" more explicitly

  - Change one of the examples to show the match-all behaviour of ".."

  - Merge "Ignoring variants" and "Ignoring bindings" sections into the latter

r? @steveklabnik
2015-08-04 18:00:52 +05:30
Manish Goregaokar
f7eecc93f3 Rollup merge of #27398 - tshepang:patch-5, r=steveklabnik 2015-08-04 18:00:52 +05:30
Manish Goregaokar
3e3a9b4eec Rollup merge of #27397 - Dangthrimble:master, r=steveklabnik
Clarifications for those new to Rust and Cargo:
* It's a good idea to get rid of the original `main.exe` in project root
* Slight clarification on the use of `main.rs` vs `lib.rs`
* Clarify that the TOML file needs to be in project root
2015-08-04 18:00:52 +05:30
bors
f971f86238 Auto merge of #27507 - eefriedman:link-section, r=alexcrichton
Fixes #27467.
2015-08-04 09:02:43 +00:00
bors
7a7789df11 Auto merge of #27444 - Gankro:nomicon, r=brson
Closes #27412 

r? @brson
2015-08-04 06:27:22 +00:00
Victor Berger
58e35d7c2a Addressing nits & tests explanations. 2015-08-04 08:14:32 +02:00
bors
ebc3a87fb4 Auto merge of #27500 - michaelwoerister:bring-gdb-pp-tests-back, r=alexcrichton
This test case has been removed a while ago because it allegedly was broken. But I don't think it is (at least I couldn't reproduce any failure on Linux). Let's give it another chance `:)`
2015-08-04 03:51:32 +00:00
Matt Friedman
f53ba18f43 remove unneeded integer suffixes from concurrency chapter 2015-08-03 19:48:14 -05:00
Eli Friedman
c40703f9b3 Fix link_section regression.
Fixes #27467.
2015-08-03 17:33:23 -07:00
Alex Crichton
5cccf3cd25 syntax: Implement #![no_core]
This commit is an implementation of [RFC 1184][rfc] which tweaks the behavior of
the `#![no_std]` attribute and adds a new `#![no_core]` attribute. The
`#![no_std]` attribute now injects `extern crate core` at the top of the crate
as well as the libcore prelude into all modules (in the same manner as the
standard library's prelude). The `#![no_core]` attribute disables both std and
core injection.

[rfc]: https://github.com/rust-lang/rfcs/pull/1184
2015-08-03 17:23:01 -07:00
bors
38517944f0 Auto merge of #26783 - eddyb:methrec, r=huonw
After #26694, the overloaded operator and "impl not known at method lookup time" cases started triggering the lint.
I've also added checks for overloaded autoderef and method calls via paths (i.e. `T::method()`).
All new 8 test cases did not trigger the lint before #26694.
r? @huonw
2015-08-03 23:47:02 +00:00
Eduard Burtescu
585f0e928b rustc_lint: handle more method calls in unconditional_recursion. 2015-08-04 01:17:56 +03:00
Eduard Burtescu
a34b0a4691 rustc: replace def::MethodProvenance with ty::ImplOrTraitItemContainer. 2015-08-04 01:16:53 +03:00
bors
ceded6adb3 Auto merge of #27210 - vadimcn:win64-eh-pers, r=alexcrichton
After this change, the only remaining symbol we are pulling from libgcc on Win64 is `__chkstk_ms` - the stack probing routine.
2015-08-03 22:12:46 +00:00
Steve Klabnik
b5a7827505 delete some old tests
These are for syntaxes that haven't existed for a long time.
2015-08-03 17:25:56 -04:00
Jonathan Hansford
c54df0e454 required -> used; you -> we 2015-08-03 21:37:15 +01:00
bors
d877e65404 Auto merge of #27134 - fhartwig:derive, r=huonw
Fixes #25022

This adapts the deriving mechanism to not repeat bounds for the same type parameter. To give an example: for the following code:

```rust
#[derive(Clone)]
pub struct FlatMap<I, U: IntoIterator, F> {
    iter: I,
    f: F,
    frontiter: Option<U::IntoIter>,
    backiter: Option<U::IntoIter>,
}
```
the latest nightly generates the following impl signature:

```rust
impl <I: ::std::clone::Clone,
      U: ::std::clone::Clone + IntoIterator,
      F: ::std::clone::Clone>
::std::clone::Clone for FlatMap<I, U, F> where
    I: ::std::clone::Clone,
    F: ::std::clone::Clone,
    U::IntoIter: ::std::clone::Clone,
    U::IntoIter: ::std::clone::Clone
```

With these changes, the signature changes to this:
```rust
impl <I, U: IntoIterator, F> ::std::clone::Clone for FlatMap<I, U, F> where
    I: ::std::clone::Clone,
    F: ::std::clone::Clone,
    U::IntoIter: ::std::clone::Clone
```
(Nothing in the body of the impl changes)
Note that the second impl is more permissive, as it doesn't have a `Clone` bound on `U` at all. There was a compile-fail test that failed due to this. I don't understand why we would want the old behaviour (and nobody on IRC could tell me either), so please tell me if there is a good reason that I missed.
2015-08-03 20:29:21 +00:00
Steve Klabnik
d7b93216cd small fix in RELEASES
this grammar isn't correct
2015-08-03 16:19:21 -04:00
Michael Woerister
354cf4b56b debuginfo: Bring back some GDB pretty printing autotests that are not actually broken. 2015-08-03 21:47:53 +02:00
Simonas Kazlauskas
c5d877977a Post merge changes to #27488 2015-08-03 21:52:20 +03:00
Alexis Beingessner
ca902dd8cb rename TARPL to The Rustinomicon 2015-08-03 11:22:08 -07:00
bors
1fe32ca12c Auto merge of #27495 - tshepang:patch-6, r=Gankro 2015-08-03 16:51:28 +00:00
Guillaume Gomez
549de0d47a Update error comment 2015-08-03 16:50:18 +02:00
bors
76ba3f0dd9 Auto merge of #27488 - Gankro:uninit-docs, r=bluss
Inspired by https://github.com/rust-lang/rust/issues/27484
2015-08-03 14:16:52 +00:00
Tshepang Lekhonkhobe
8d331ba8c3 reference: follow idiom in this tiny snippet 2015-08-03 16:07:36 +02:00
Alexis Beingessner
5e6973ddc5 vastly expand on the mem::uninitialized docs 2015-08-03 06:55:14 -07:00
Jonathan Hansford
d9b1882248 Updated in response to review 2015-08-03 10:22:03 +01:00
Guillaume Gomez
d6f713be3f Improve E0423 error message 2015-08-03 10:43:13 +02:00
Vadim Chugunov
96d1db2b1a Fix compile errors for ARM. 2015-08-02 21:15:01 -07:00
bors
ea5cc76aac Auto merge of #27475 - AgostonSzepessy:master, r=alexcrichton 2015-08-03 01:03:50 +00:00
bors
2a309b7f55 Auto merge of #27476 - Manishearth:rollup, r=Manishearth
- Successful merges: #27464, #27473
- Failed merges:
2015-08-02 21:04:21 +00:00
Manish Goregaokar
d33cca9b9d Rollup merge of #27473 - brson:stddocs, r=Gankro
This removes some of the more casual language.

The only outright goofiness I couldn't bear to remove is "these modules are the bedrock upon which all of Rust is forged, and they have mighty names like `std::slice` and `std::cmp`", which I believe the greatest sentence I have ever created.
2015-08-03 02:33:53 +05:30
Manish Goregaokar
0860b29b6a Rollup merge of #27464 - killercup:patch-16, r=Gankro
Because Markdown.
2015-08-03 02:33:52 +05:30
Agoston Szepessy
74787b98ba Added error explanation for E0384. 2015-08-02 15:30:06 -04:00
bors
504eaa5929 Auto merge of #27305 - KieranHunt:master, r=steveklabnik
I found that the book had little information for `loop`s and `loop` label so I've added some.
2015-08-02 19:08:21 +00:00
Brian Anderson
ffa21217d2 std: Tighten up crate docs 2015-08-02 11:09:37 -07:00
bors
30ba0ee3bc Auto merge of #27469 - SimonSapin:patch-6, r=Gankro 2015-08-02 16:03:46 +00:00
Simon Sapin
7b2dd1fb28 Docs: clarify return value of std::io::Seek::seek 2015-08-02 14:15:00 +02:00