Commit Graph

47313 Commits

Author SHA1 Message Date
bors
20a6938c08 Auto merge of #28683 - GuillaumeGomez:rustdoc_error, r=alexcrichton
This PR solves the following issues (or at least help users to understand the problem):

```Rust
#![crate_name = "b"]
#![crate_type = "rlib"]

pub fn his_function_has_a_very_long_name_and_should_make_cargo_doc_explodes_because_it_will_want_to_make_a_filename_with_it_in_excess_of_the_max_filename_length_for_most_filesystem_this_is_not_yet_long_enough_i_need_moreis_function_has_a_very_long_name_and_should_make_cargo_doc_explodes_because_it_will_want_to_make_a_filename_with_it_in_excess_of_the_max_filename_length_for_most_filesystem_this_is_not_yet_long_enough_i_need_more_() {}
```

```Rust
#![crate_name = "b"]
#![crate_type = "rlib"]

pub struct his_function_has_a_very_long_name_and_should_make_cargo_doc_explodes_because_it_will_want_to_make_a_filename_with_it_in_excess_of_the_max_filename_length_for_most_filesystem_this_is_not_yet_long_enough_i_need_moreis_function_has_a_very_long_name_and_should_make_cargo_doc_explodes_because_it_will_want_to_make_a_filename_with_it_in_excess_of_the_max_filename_length_for_most_filesystem_this_is_not_yet_long_enough_i_need_more_;
```

For the maximum filename length chosen, @gkoz gave me [this link](http://unix.stackexchange.com/a/32834).
2015-10-16 23:28:14 +00:00
Guillaume Gomez
42c01d740b Improve error handling by providing Error struct with Path information 2015-10-17 00:20:00 +02:00
bors
be91042913 Auto merge of #29082 - DenisKolodin:patch-3, r=alexcrichton 2015-10-16 20:35:51 +00:00
bors
747d951e88 Auto merge of #29014 - petrochenkov:stability, r=brson
Stricter checking of stability attributes + enforcement of their invariants at compile time
(+ removed dead file librustc_front/attr.rs)
I intended to enforce use of `reason` for unstable items as well (it normally presents for new items), but it turned out too intrusive, many older unstable items don't have `reason`s.

r? @aturon 
I'm studying how stability works and do some refactoring along the way, so it's probably not the last PR.
2015-10-16 17:47:01 +00:00
DenisKolodin
5736c1d90a Update explanation about offset method 2015-10-16 19:10:01 +03:00
bors
87e26efbf2 Auto merge of #29074 - Manishearth:astconv-doc, r=eddyb
Confusion about what this does caused a bug in Servo's lints.

r? @eddyb
2015-10-16 16:03:57 +00:00
bors
24228fee15 Auto merge of #29020 - goyox86:goyox86/rustfmting-libarena, r=nrc
Hi Rustaceans!

This is the result of running latest rustfmt on libarena!

//cc @nrc
2015-10-16 14:20:25 +00:00
bors
05cfd72ed1 Auto merge of #29086 - fhahn:book-update-lint-plugin-example, r=alexcrichton 2015-10-16 11:33:01 +00:00
bors
beeaea4a70 Auto merge of #28957 - GuillaumeGomez:patch-5, r=Manishearth
cc @nagisa
2015-10-16 09:49:50 +00:00
Guillaume Gomez
a3f9fc69d6 Change error message in rustbook 2015-10-16 10:59:04 +02:00
bors
17776fdc73 Auto merge of #29085 - petrochenkov:nonzero, r=alexcrichton 2015-10-16 08:06:56 +00:00
bors
e4c7bb9ea7 Auto merge of #29081 - rust-lang:arc-example-edit, r=alexcrichton
The text says it's a vector of floats, but the code actually uses a vector of integers.  The type of the Vec doesn't really matter, so I just cut it from the text.
2015-10-16 06:24:11 +00:00
bors
d5a777c175 Auto merge of #29080 - Havvy:remove_doc_style_changing, r=alexcrichton
Fixes issue #29077.

There **are** API changing guidelines in the RFCs, so it might be prudent to put those there. But I'm leaving that up to another person. This PR just removes bad documentation.
2015-10-16 03:10:30 +00:00
Florian Hahn
ac097f1a5e Update lint plugin example in book to work with recent master 2015-10-15 23:53:05 +02:00
Vadim Petrochenkov
128ded7110 Make NonZero::new const function 2015-10-16 00:33:45 +03:00
bors
6cdf31b12f Auto merge of #29031 - cristicbz:mtx_inner, r=alexcrichton
The implementation for `into_inner` was a bit more complex than I had hoped for---is there any simpler, less unsafe way of getting around the fact that one can't move out of a `Drop` struct?

See #28968 and rust-lang/rfcs#1269 .
2015-10-15 21:21:27 +00:00
Matt Brubeck
11e65ebe31 Fix minor error in Arc docs
The text says it's a vector of floats, but the code actually uses a vector of integers.  The type of the Vec doesn't really matter, so I just cut it from the text.
2015-10-15 13:52:51 -07:00
Ryan Scheel (Havvy)
48c90a38c1 Remove outdated Changing directory. 2015-10-15 19:35:39 +00:00
Cristi Cobzarenco
90ccefd16e std: add into_inner and get_mut to RwLock 2015-10-15 18:05:54 +01:00
Cristi Cobzarenco
b8e8561e1a std: add into_inner and get_mut to mutex 2015-10-15 18:05:54 +01:00
Manish Goregaokar
e184c2daf1 Add docs for ast_ty_to_prim_ty
Confusion about what this does caused a bug in Servo's lints.
2015-10-15 20:14:52 +05:30
bors
be3d390cf5 Auto merge of #29050 - rkruppe:dec2flt-lonely-sign, r=alexcrichton
Fixes #29042
2015-10-15 14:43:47 +00:00
Jose Narvaez
e7be2c3e99 Fixed comment. 2015-10-15 14:56:03 +01:00
bors
7ac89d27ad Auto merge of #29040 - nrc:save-defid, r=@nikomatsakis
With this change, normalised node ids correspond to def id indices where they exist, or are made disjoint from def ids otherwise.

r? @nikomatsakis
2015-10-15 12:51:31 +00:00
bors
1ad1b7d947 Auto merge of #29021 - ogham:master, r=alexcrichton
This commit adds `#[derive(Clone)]` to `std::fs::Metadata`, making that struct cloneable. Although the exact contents of that struct differ between OSes, they all have it contain only value types, meaning that the data can be re-used without repercussions.

It also adds `#[derive(Clone)]` to every type used by that struct across all OSes, including the various Unix `stat` structs and Windows's `WIN32_FILE_ATTRIBUTE_DATA`.

This stems from my comment here: https://github.com/rust-lang/rfcs/issues/939#issuecomment-140524439
2015-10-15 10:58:37 +00:00
bors
9c9615eb6f Auto merge of #29070 - Manishearth:rollup, r=Manishearth
- Successful merges: #28906, #29022, #29047, #29058, #29059, #29060, #29062, #29066, #29068
- Failed merges:
2015-10-15 09:04:34 +00:00
Manish Goregaokar
7c7195d563 Rollup merge of #29068 - apasel422:tidy, r=alexcrichton
r? @alexcrichton
2015-10-15 13:41:33 +05:30
Manish Goregaokar
7be7ec300e Rollup merge of #29066 - dcarral:fix_issue_29063, r=steveklabnik
Regarding [#29063 _[Docs] Terminology inconsistency between 'iterator adapters' and 'iterator adaptors'_](https://github.com/rust-lang/rust/issues/29063) :

This PR replaces 'iterator adapters' appearances (in TRPL book) to 'iterator adaptors', thus embracing the terminology used along the API docs and achieving consistency between both sources.
2015-10-15 13:41:33 +05:30
Manish Goregaokar
677a9895a8 Rollup merge of #29062 - rgardner:rgardner-fix-book-comp-warning, r=alexcrichton
Before this commit, the first "A Rust library" code sample produced
the following compilation warning:
```
test.rs:7:22: 7:36 warning: unnecessary parentheses around `for` head
expression, #[warn(unused_parens)] on by default
test.rs:7             for _ in (0..5_000_000) {
```

This commit just removes the parens around the range 0..5_000_000 thereby removing the compilation warning.
2015-10-15 13:41:33 +05:30
Manish Goregaokar
596338b8ef Rollup merge of #29060 - tshepang:consistency, r=nikomatsakis 2015-10-15 13:41:33 +05:30
Manish Goregaokar
bcbad7ba8c Rollup merge of #29059 - tshepang:typo, r=nikomatsakis 2015-10-15 13:41:32 +05:30
Manish Goregaokar
2172d2a4ec Rollup merge of #29058 - tshepang:rename, r=steveklabnik
Shoud have been part of commit 0b13ee0ced
2015-10-15 13:41:32 +05:30
Manish Goregaokar
7d478f49f2 Rollup merge of #29047 - gkoz:doc_typo, r=steveklabnik
None
2015-10-15 13:41:32 +05:30
Manish Goregaokar
d90f8f912b Rollup merge of #29022 - apasel422:spell, r=steveklabnik
r? @steveklabnik
2015-10-15 13:41:32 +05:30
Manish Goregaokar
ad5159d52f Rollup merge of #28906 - tshepang:link, r=nikomatsakis 2015-10-15 13:41:31 +05:30
bors
fa9a421394 Auto merge of #28921 - petrochenkov:intconv, r=alexcrichton
Part of https://github.com/rust-lang/rfcs/pull/1218#issuecomment-146615171

r? @aturon
2015-10-15 07:11:33 +00:00
bors
99dc12472a Auto merge of #27017 - luqmana:25594-sysv-abi-ffi, r=bkoropoff
Fixes #25594.
2015-10-15 05:19:18 +00:00
Luqman Aden
5eb4de1a16 Update the comments for Win64 ABI in tests. 2015-10-15 01:07:22 -04:00
Luqman Aden
3c31841c72 rust_trans: struct argument over ffi were passed incorrectly in some situations on x86_64. 2015-10-15 01:06:57 -04:00
bors
785932f9d8 Auto merge of #28980 - nrc:unsafe-macros, r=@pnkfelix
This is a [breaking change].

@brson could you do a Crater run with this PR please?

Lets not land till Crater says its OK.

This was discussed at https://internals.rust-lang.org/t/does-anyone-use-the-push-pop-unsafe-macros/2702
2015-10-15 03:26:48 +00:00
Vadim Petrochenkov
6f3e84dbe9 Implement conversion traits for primitive integer types 2015-10-15 05:23:44 +03:00
Andrew Paseltiner
094f23e108 Remove unnecessary parentheses around range expressions 2015-10-14 21:43:05 -04:00
bors
eafe106ef3 Auto merge of #29012 - tari:issue-28676, r=luqmana
Fixes #28676.

There doesn't seem to be a good way to add a test for this, but I tested the repro in #28676 and confirmed it now yields the correct result.
2015-10-15 00:14:17 +00:00
Daniel Carral
6bff154b57 Replace 'adapters' to 'adaptors' in TRPL book
Regarding #29063: Replace 'iterator adapters' appearances to
'iterator adaptors', thus embracing the terminology used along the
API docs and achieving consistency between both sources.
2015-10-15 02:13:20 +02:00
Vadim Petrochenkov
704d598fac rustdoc: Report deprecation reason first 2015-10-15 01:28:38 +03:00
Tshepang Lekhonkhobe
18fa6d8dbc book: be consistent with preceding example 2015-10-15 00:19:47 +02:00
Tshepang Lekhonkhobe
5d5e62d7d8 book: fix typo 2015-10-15 00:16:13 +02:00
Tshepang Lekhonkhobe
ea37fadebb reference: 'struct' is more common that 'structure'
Shoud have been part of commit 0b13ee0ced
2015-10-15 00:09:08 +02:00
Nick Cameron
06b5a951a0 save-analysis: normalise node ids before emitting.
With this change, normalised node ids correspond to def id indices where they exist, or are made disjoint from def ids otherwise.
2015-10-15 10:58:12 +13:00
Tshepang Lekhonkhobe
0dbc2ef8a1 reference: add link to the symbols 2015-10-14 23:48:26 +02:00