Commit graph

43429 commits

Author SHA1 Message Date
Charlotte Spencer
7447457ef8 Remove use of 'just' in trpl/installing-rust.md
The beginning of the work that needs to be done as part of #28835.
2015-10-26 16:29:54 +00:00
Alex Crichton
cb0ce69026 Revert "Remove unnecessary trait accessibility check."
This reverts commit f4f95eb3a9.
2015-10-26 09:16:05 -07:00
Alex Crichton
0cfdb33720 Revert "Add UFCS privacy test."
This reverts commit b3e1aca40f.
2015-10-26 09:16:01 -07:00
bors
c5d650cf74 Auto merge of #29310 - mdinger:book_playpen, r=steveklabnik
Makes rustbook code playpen links follow the style set in https://github.com/rust-lang/rust/pull/28963. This is basically cut and paste from the other one. The link looks better and still works so I assume it's good.

![rustbook](https://cloud.githubusercontent.com/assets/4156987/10717631/7a74f8ae-7b34-11e5-8870-35b5fc2526a4.png)

Fixes https://github.com/rust-lang/rust/issues/29308

r? @steveklabnik
2015-10-26 15:50:45 +00:00
Seo Sanghyeon
d7944cee12 Distinguish argument from local variable 2015-10-27 00:46:11 +09:00
bors
0b9edc77c5 Auto merge of #29280 - Ryman:bad_docattr, r=Manishearth
As is, this attr would lead to the "///" prefix being in the output text.
2015-10-26 13:58:50 +00:00
bors
7de9c4eea8 Auto merge of #29247 - dcarral:missing_word_trpl, r=steveklabnik
I somehow missed a word behind the numbers while going through this section, don't know what the best approach would be though since "**available** addresses" sounds good to me, too".
2015-10-26 12:08:51 +00:00
bors
bf7eec04d8 Auto merge of #29312 - apasel422:issue-21410, r=alexcrichton
Closes #21410.
Closes #24972.
2015-10-26 10:16:52 +00:00
Aleksey Kladov
32e4ba8f50 reference: clarify impl
Another kind of nominal types in Rust are trait objects, so the following is valid

```rust
trait A {

}

impl A {

}
```
2015-10-26 12:31:17 +03:00
bors
c44316d4a1 Auto merge of #29303 - petrochenkov:unistrimp, r=eddyb
And use `VariantData` instead of `P<VariantData>` in `Item_` and `Variant_`

Improvements suggested by @eddyb in https://github.com/rust-lang/rust/pull/28816#discussion_r42483587 and https://github.com/rust-lang/rust/pull/28816#discussion_r42483648

plugin-[breaking-change]

r? @eddyb
2015-10-26 08:27:59 +00:00
bors
72ed590f8b Auto merge of #29301 - reddraggone9:patch-1, r=alexcrichton
Added a single character to fix a typo in a doc comment.
2015-10-26 06:37:12 +00:00
bors
039b2ca74f Auto merge of #29306 - alexcrichton:yet-another-windows-dist-fix, r=vadimcn
We don't need the support libgcc SEH library, but we do need the C++ standard
library for running the compiler itself.

cc #29208
Closes #29294
2015-10-26 04:48:00 +00:00
bors
908979d53d Auto merge of #29299 - tbu-:pr_btreemap_example_dup, r=alexcrichton 2015-10-26 02:56:27 +00:00
Andrew Paseltiner
fbc53e5a63 Add tests for #21410 and #24972
Closes #21410.
Closes #24972.
2015-10-25 20:32:10 -04:00
bors
c3db627cbf Auto merge of #29296 - zazdxscf:compiletest_noargs_show_help, r=alexcrichton
instead of this panic:
```
thread '<main>' panicked at 'index out of bounds: the len is 1 but the
index is 1', src/libcollections/vec.rs:1110
```

It still panics, just like `-h` does, so it should be okay in this
regard.
2015-10-26 00:19:51 +00:00
bors
f7bde94ea8 Auto merge of #29284 - apasel422:tests, r=alexcrichton
Closes #22781.
Closes #23891.
Closes #24956.
Closes #25145.
Closes #25693.
Closes #26095.
Closes #26459.
Closes #27320.
Closes #27895.
2015-10-25 20:31:48 +00:00
mdinger
a3478e0d16 Update the playpen link for code in the rust book to agree with rustdoc's new style 2015-10-25 16:18:55 -04:00
Ricardo Signes
50611331b4 reformat the docs for hidden code in rust sections
As displayed before this commit, I found the book confusing in its
explanation of `#`-led comments in `rust` blocks.  Possibly the
biggest confusion was because the many-dashes construct does not
become an HR element in the Markdown translator used, so things were
not being properly set off.

This change should more clearly show the as-rendered content as
rendered, and the as-coded content as code.
2015-10-25 16:05:58 -04:00
Tobias Bucher
fe2a47b88a Say that std::env::{set_var, unset_var} *may* panic
Previously the documentation suggested that the documentation about the
panics are guarantees.
2015-10-25 20:03:42 +00:00
bors
2a418216fe Auto merge of #29266 - apasel422:wf, r=alexcrichton
Using these traits in an object context previously resulted in an RFC 1214 warning.
2015-10-25 18:34:29 +00:00
Alex Crichton
d51b432fd7 mk: Package libstdc++-6.dll on x86_64 MinGW
We don't need the support libgcc SEH library, but we do need the C++ standard
library for running the compiler itself.

cc #29208
2015-10-25 10:32:11 -07:00
bors
e02ada6d38 Auto merge of #29254 - alexcrichton:stabilize-1.5, r=brson
This commit stabilizes and deprecates library APIs whose FCP has closed in the
last cycle, specifically:

Stabilized APIs:

* `fs::canonicalize`
* `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists,
   is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait.
* `Formatter::fill`
* `Formatter::width`
* `Formatter::precision`
* `Formatter::sign_plus`
* `Formatter::sign_minus`
* `Formatter::alternate`
* `Formatter::sign_aware_zero_pad`
* `string::ParseError`
* `Utf8Error::valid_up_to`
* `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}`
* `<[T]>::split_{first,last}{,_mut}`
* `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated
  but will be once 1.5 is released.
* `str::{R,}MatchIndices`
* `str::{r,}match_indices`
* `char::from_u32_unchecked`
* `VecDeque::insert`
* `VecDeque::shrink_to_fit`
* `VecDeque::as_slices`
* `VecDeque::as_mut_slices`
* `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`)
* `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`)
* `Vec::resize`
* `str::slice_mut_unchecked`
* `FileTypeExt`
* `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}`
* `BinaryHeap::from` - `from_vec` deprecated in favor of this
* `BinaryHeap::into_vec` - plus a `Into` impl
* `BinaryHeap::into_sorted_vec`

Deprecated APIs

* `slice::ref_slice`
* `slice::mut_ref_slice`
* `iter::{range_inclusive, RangeInclusive}`
* `std::dynamic_lib`

Closes #27706
Closes #27725
cc #27726 (align not stabilized yet)
Closes #27734
Closes #27737
Closes #27742
Closes #27743
Closes #27772
Closes #27774
Closes #27777
Closes #27781
cc #27788 (a few remaining methods though)
Closes #27790
Closes #27793
Closes #27796
Closes #27810
cc #28147 (not all parts stabilized)
2015-10-25 16:38:38 +00:00
Alex Crichton
ff49733274 std: Stabilize library APIs for 1.5
This commit stabilizes and deprecates library APIs whose FCP has closed in the
last cycle, specifically:

Stabilized APIs:

* `fs::canonicalize`
* `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists,
   is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait.
* `Formatter::fill`
* `Formatter::width`
* `Formatter::precision`
* `Formatter::sign_plus`
* `Formatter::sign_minus`
* `Formatter::alternate`
* `Formatter::sign_aware_zero_pad`
* `string::ParseError`
* `Utf8Error::valid_up_to`
* `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}`
* `<[T]>::split_{first,last}{,_mut}`
* `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated
  but will be once 1.5 is released.
* `str::{R,}MatchIndices`
* `str::{r,}match_indices`
* `char::from_u32_unchecked`
* `VecDeque::insert`
* `VecDeque::shrink_to_fit`
* `VecDeque::as_slices`
* `VecDeque::as_mut_slices`
* `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`)
* `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`)
* `Vec::resize`
* `str::slice_mut_unchecked`
* `FileTypeExt`
* `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}`
* `BinaryHeap::from` - `from_vec` deprecated in favor of this
* `BinaryHeap::into_vec` - plus a `Into` impl
* `BinaryHeap::into_sorted_vec`

Deprecated APIs

* `slice::ref_slice`
* `slice::mut_ref_slice`
* `iter::{range_inclusive, RangeInclusive}`
* `std::dynamic_lib`

Closes #27706
Closes #27725
cc #27726 (align not stabilized yet)
Closes #27734
Closes #27737
Closes #27742
Closes #27743
Closes #27772
Closes #27774
Closes #27777
Closes #27781
cc #27788 (a few remaining methods though)
Closes #27790
Closes #27793
Closes #27796
Closes #27810
cc #28147 (not all parts stabilized)
2015-10-25 09:36:32 -07:00
Vadim Petrochenkov
e8ddbba2ed syntax/rustc_front: Simplify VariantData::fields
And use VariantData instead of P<VariantData> in Item_ and Variant_
2015-10-25 18:33:51 +03:00
bors
079f3848c3 Auto merge of #29281 - skeleten:issue-28189, r=steveklabnik
Closes #28189
2015-10-25 14:41:06 +00:00
Lee Jenkins
0044a68249 Fix doc comment typo
Added a single character to fix a typo in a doc comment.
2015-10-25 09:17:27 -05:00
bors
5acda1d3b2 Auto merge of #29279 - Ryman:strtests, r=alexcrichton 2015-10-25 12:44:33 +00:00
Tobias Bucher
5794950c2d Document possible panics for std::env::{set_var, unset_var} 2015-10-25 12:04:29 +00:00
Tobias Bucher
4b45f39f92 Remove key duplication from BTreeMap example in collections 2015-10-25 12:03:21 +00:00
Andrew Paseltiner
671602c8c9 Add tests
Closes #22781.
Closes #23891.
Closes #24956.
Closes #25145.
Closes #25693.
Closes #26095.
Closes #26459.
Closes #27320.
Closes #27895.
2015-10-25 07:37:21 -04:00
Emanuel Czirai
351efd55e9 compiletest: show usage/help when passed no args
instead of this panic:
```
thread '<main>' panicked at 'index out of bounds: the len is 1 but the
index is 1', src/libcollections/vec.rs:1110
```

It still panics, just like `-h` does, so it should be okay in this
regard.
2015-10-25 11:53:47 +01:00
bors
f68cd9aef1 Auto merge of #29273 - Manishearth:regression, r=alexcrichton
None
2015-10-25 10:45:27 +00:00
bors
92dd81ab51 Auto merge of #29272 - sanxiyn:llvm-update, r=alexcrichton
cc @zazdxscf
2015-10-25 08:47:46 +00:00
bors
49b232edaf Auto merge of #29261 - apasel422:issue-22403, r=alexcrichton
Closes #22403.

r? @pnkfelix
2015-10-25 06:48:21 +00:00
John Hodge
f9b8c49cdb Switch to 'const unsafe fn' ordering (rust-lang/rust#29107) 2015-10-25 12:03:07 +08:00
Vadim Petrochenkov
43b4373a23 Tweak stability to not require annotations on impl items and unnamed fields 2015-10-25 05:30:26 +03:00
bors
1d792a64b6 Auto merge of #29256 - alexcrichton:less-flaky, r=brson
The new bots we have may conflict with one another on base ports, causing tests
to fail. For example the linux-musl-64-opt and linux-64-opt bots are using the
same base port right now, causing some spurious failures every now and then.
2015-10-25 02:12:00 +00:00
Vadim Petrochenkov
599df16551 rustc_privacy: Expand public node set, build exported node set more correctly 2015-10-25 04:42:31 +03:00
Kevin Butler
1a235274a1 libsyntax: Consolidate branch to benefit from exhaustive checking instead of unwrapping 2015-10-25 01:34:45 +01:00
Kevin Butler
998914f5da libsyntax: remove panics from Parser::parse_pat_nopanic 2015-10-25 01:33:22 +01:00
Kevin Butler
64da379c8c libsyntax: better error for lifetimes in patterns
Previously, if you copied a signature from a trait definition such as:

```
fn foo<'a>(&'a Bar) -> bool {}
```

and moved it into an `impl`, there would be an error message:

"unexpected token `'a`"

Adding to the error message that a pattern is expected should help
users to find the actual problem with using a lifetime here.
2015-10-25 01:28:00 +01:00
bors
d2f41bd5be Auto merge of #29151 - wthrowe:linker-output-ICE, r=alexcrichton
I suspect this won't work on Windows, but let's be optimistic and try it before disabling.
2015-10-24 21:24:49 +00:00
skeleten
37904063ec adding test for #28189 2015-10-24 21:23:32 +02:00
Kevin Butler
315f76202f Fix docattr to match surrounding text
As is, this attr would lead to the "///" prefix being in the output text
2015-10-24 20:00:58 +01:00
Kevin Butler
83b308e585 Add assertions to test_total_ord for str 2015-10-24 19:53:42 +01:00
Kevin Butler
49c78789ce Remove unnecessary String allocations from str tests 2015-10-24 19:53:33 +01:00
bors
8d86d1a4e1 Auto merge of #29215 - fhahn:issue-28157-bad-semicolon, r=alexcrichton
PR for #28157. At the moment, `rustc` emits a warning when a bare semicolon is encountered (could also be a fail, but I think this is a backwards incompatible change).

Also I am not sure where the best place for a test for that warning would be. Seems run-pass tests do not check warnings.
2015-10-24 18:37:09 +00:00
Manish Goregaokar
aec5576623 Add regression test for #26886
(fixes #26886)
2015-10-24 18:01:06 +05:30
bors
04e497c005 Auto merge of #29259 - arielb1:supertrait-self-2, r=eddyb
…being it

This is a [breaking-change]:lang, but the broken code does not make
much sense.

Fixes #26056

r? @eddyb
2015-10-24 12:21:12 +00:00
Seo Sanghyeon
b285f92025 rustllvm: Update to LLVM trunk 2015-10-24 18:42:23 +09:00
bors
43869e94ab Auto merge of #29260 - GuillaumeGomez:E0211_improvement, r=Manishearth
r? @Manishearth

cc #29248
2015-10-24 09:15:14 +00:00
bors
8d41c6fc0a Auto merge of #29252 - steveklabnik:safety, r=alexcrichton
Follow https://doc.rust-lang.org/book/documentation.html#special-sections
2015-10-24 06:26:50 +00:00
mdinger
11c7bdd160 Add colors for rustdoc primitives, type, and macros links 2015-10-23 21:59:48 -04:00
Andrew Paseltiner
863bb1f515 Make {Default, From, FromIterator, One, Zero} well-formed
Using these traits in an object context previously resulted in an RFC
1214 warning.
2015-10-23 21:56:23 -04:00
bors
d689182e5d Auto merge of #29245 - james-darkfox:master, r=alexcrichton 2015-10-24 01:19:26 +00:00
mdinger
b1e3baa5b4 Merge same colors together 2015-10-23 21:07:09 -04:00
Andrew Paseltiner
b83235f76f Add test for #22403
Closes #22403.
2015-10-23 20:15:33 -04:00
Guillaume Gomez
77053e20ba Improve E0211 error diagnostic 2015-10-24 00:49:12 +02:00
Florian Hahn
1e62bd2754 Allow bare semicolon in grammar doc, closes #28157 2015-10-24 00:45:18 +02:00
Florian Hahn
107b4aa329 Remove bare semicolons 2015-10-24 00:35:44 +02:00
bors
525ab4a413 Auto merge of #29065 - steveklabnik:doc_iter_traits, r=alexcrichton
This adds a bunch of documentation for most of the traits in std::iter
2015-10-23 21:35:59 +00:00
Ariel Ben-Yehuda
5d6d26c241 object_safety: check whether a supertrait contains Self even without being it
This is a [breaking-change]:lang, but the broken code does not make
much sense.

Fixes #26056
2015-10-24 00:22:29 +03:00
William Throwe
a1c8431f82 Add a regression test for #29122 (fixed in #29134) 2015-10-23 17:11:33 -04:00
Steve Klabnik
608cb84955 Document a bunch of std::iter traits
This adds a bunch of documentation for most of the traits in std::iter
2015-10-23 16:03:52 -04:00
bors
bbb5f8e12e Auto merge of #29241 - nikomatsakis:issue-28871, r=arielb1
Give preference to projections from where-clauses over those from trait definitions. This makes #28871 work again, though I think there's more to fix in this general area.

r? @arielb1 
cc @brson (fixes regression)
2015-10-23 19:46:57 +00:00
James McGlashan
36ce1c06a4 Implements Default for mutable slices. Fixes: #29244 2015-10-24 05:17:35 +11:00
Alex Crichton
2098ff4a33 std: Add more entries to stdtest base_port
The new bots we have may conflict with one another on base ports, causing tests
to fail. For example the linux-musl-64-opt and linux-64-opt bots are using the
same base port right now, causing some spurious failures every now and then.
2015-10-23 10:51:48 -07:00
bors
7ee4e9e7ec Auto merge of #29243 - skeleten:issue-29184, r=alexcrichton
Fixes #29184 

This adds an error message for the use of the reserved `typeof` keyword, instead of reporting an ICE.
Also adds a `compile-fail` test.

I chose to add a `span_err` instead of removing to parser code, as to preserve the reservation of `typeof`.
2015-10-23 16:53:40 +00:00
Vadim Chugunov
afc3046515 Drop advapi32 and shell32 from late_link_args. 2015-10-23 09:35:02 -07:00
Steve Klabnik
b17433292d Unsafety -> Safety in doc headings
Follow https://doc.rust-lang.org/book/documentation.html#special-sections
2015-10-23 11:42:14 -04:00
Niko Matsakis
b69e08ceca add main fn to test 2015-10-23 11:04:38 -04:00
skeleten
044a8fe6f6 Add error message for using typeof instead of an ICE.
This adds error E0516

fixing a type pointed out by @jonas-schievink
2015-10-23 16:34:47 +02:00
Daniel Carral
2e0e32f4eb Add missing word to TRPL's 'The Heap' section 2015-10-23 12:37:46 +02:00
bors
9a855668fc Auto merge of #29194 - chrisccerami:clarify-headers-in-traits-docs, r=Manishearth
It's possible that there is some meaning I'm not grasping from the headers "Traits bounds for generic functions" and "Traits bounds for generic structs", but they seem to me like they could be clearer and more grammatically correct.
2015-10-23 09:06:24 +00:00
bors
3f37f5a443 Auto merge of #29242 - matklad:fix-comment, r=alexcrichton
Qualified paths allow full path after the `>::`. For example

```rust
<T as Foo>::U::generic_method::<f64>()
```

The example is taken from `test/run-pass/associated-item-long-paths.rs`.
2015-10-23 06:51:24 +00:00
Chris C Cerami
00c1419e32 Define bounds in glossary.md 2015-10-23 00:45:44 -04:00
bors
e518c057f5 Auto merge of #27894 - steveklabnik:gh26888, r=alexcrichton
{BTree,Hash}{Map,Set} will not update their key if it already exists, which
can matter with more complex keys. This behavior is now documented.

Fixes #26888
2015-10-23 03:13:10 +00:00
Steve Klabnik
e8e3c6f386 Document replacement behavior in some collections
{BTree,Hash}{Map,Set} will not update their key if it already exists, which
can matter with more complex keys. This behavior is now documented.

Fixes #26888
2015-10-22 20:30:42 -04:00
bors
414d68ec72 Auto merge of #29216 - steveklabnik:fix_libc, r=alexcrichton
This is needed to release a new version of libc

r? @alexcrichton
2015-10-23 00:24:14 +00:00
Aleksey Kladov
bf2f1e512a parser: fix erroneous comment
Qualified paths allow full path after the `>::`. For example

```rust
<T as Foo>::U::generic_method::<f64>()
```

The example is taken from `test/run-pass/associated-item-long-paths.rs`.
2015-10-23 02:17:03 +03:00
Nick Hamann
f0af1eb110 Warn when creating a module and a struct that both have the same name.
Currently it is possible to do the following:

 - define a module named `Foo` and then a unit or tuple struct also named `Foo`
 - define any struct named `Foo` and then a module named `Foo`

This commit introduces a warning for both of these cases.
2015-10-22 17:12:16 -05:00
Niko Matsakis
b48b6eaf75 fix bug in hir,identified 2015-10-22 16:58:08 -04:00
Niko Matsakis
e5bc5c7aa0 improve Scope to print node-ids etc 2015-10-22 16:58:08 -04:00
Niko Matsakis
8fa5f09a8f distinguish projections from the env/obj-types vs those from
trait definitions, and give prefence to the former. This is consistent
with what we do for selection. It also works around a limitation
that was leading to #28871.
2015-10-22 16:58:08 -04:00
Steve Klabnik
b51d5e10b2 Rollup merge of #29230 - tsion:fix-nomicon-typo-2, r=steveklabnik
r? @steveklabnik
2015-10-22 12:43:50 -04:00
Steve Klabnik
7aa39a60dd Rollup merge of #29224 - wesleywiser:patch-2, r=alexcrichton
Fixes #29219
2015-10-22 12:43:50 -04:00
Steve Klabnik
7b608dfacd Rollup merge of #29213 - apasel422:unsafe-cell, r=Gankro
r? @alexcrichton
2015-10-22 12:43:49 -04:00
Steve Klabnik
58fed892c5 Rollup merge of #29207 - ykomatsu:trpl, r=steveklabnik 2015-10-22 12:43:49 -04:00
Steve Klabnik
94326e1916 Rollup merge of #29193 - kini:filename-conventions, r=alexcrichton
When reading this paragraph, the beginning Rust programmer is starting
to write a Hello World program.  We have just told her to name the file
`main.rs`, and immediately afterward, a `hello_world.rs` is mentioned.
I changed this to an unrelated filename (incidentally one that appears
in this repository) to make it clear that this is just an example.
Also, wording it as a declarative sentence rather than an imperative one
further separates it from the Hello World instructions in this section.

r? @steveklabnik 

(Let me know if I'm sending too many PRs -- I can batch up TRPL edits, say, per chapter, if that works better. Or I can just refrain from editing TRPL as I read through it, if these are not sufficiently useful.)
2015-10-22 12:43:49 -04:00
Steve Klabnik
7a16b95d4a Rollup merge of #29170 - kini:curl-sh-disclaimer, r=steveklabnik
The paragraph here seemed confusing, so I reworded it.  Also added
another possible reason why `curl | sh` might be objectionable to users.

r? @steveklabnik
2015-10-22 12:43:48 -04:00
bors
83cf3ce498 Auto merge of #29170 - kini:curl-sh-disclaimer, r=steveklabnik
The paragraph here seemed confusing, so I reworded it.  Also added
another possible reason why `curl | sh` might be objectionable to users.

r? @steveklabnik
2015-10-22 16:37:28 +00:00
Steve Klabnik
dd8ae4f64e Fix build of libc on stable
This is needed to release a new version of libc
2015-10-22 11:44:16 -04:00
bors
ca998fc2f1 Auto merge of #29018 - tsion:doc-typo, r=steveklabnik
r? @steveklabnik
2015-10-22 13:12:20 +00:00
Scott Olson
6003b479a0 Add missing "to" in Rustonomicon Atomics. 2015-10-22 03:33:47 -06:00
bors
e7b2052f34 Auto merge of #28355 - DiamondLovesYou:pnacl-librustc-trans, r=alexcrichton
r? @alexcrichton
2015-10-22 08:35:38 +00:00
bors
5eac68cca7 Auto merge of #29210 - arielb1:suggest-overflow, r=eddyb
This prevents a stack-overflow when the module graph was cyclic.

Fixes #29181 

r? @eddyb
2015-10-22 06:47:27 +00:00
Wesley Wiser
3673978539 Fix doc sample for Cursor
Fixes #29219
2015-10-21 22:33:24 -04:00
bors
7bb0ac59b1 Auto merge of #29045 - mseri:patch-4, r=nrc
r? @nrc

Nothing special going on, the only real notable change is the explicit ABI on line 6183. 
I re-onlined some extern on top of the file by hand.
2015-10-22 02:28:36 +00:00
bors
5692e16270 Auto merge of #28963 - mdinger:arrow, r=steveklabnik
This is to make the link more prominent so hopefully people will actually see it. The new icon is partially because I wasn't sure how easy it would be to apply the previous transformations only to the last character of the string. As it is, I wasn't sure at first but I think the look is growing on me.

A minor nitpick is that the space after `Runnable` is underlined and I tried to fix that but it wasn't working for me right now. I tried switching a link with subelements to a div with subelements but I missed something because it wasn't working correctly.

---
Unselected:

![arrow](https://cloud.githubusercontent.com/assets/4156987/10414475/b1730ab2-6fa4-11e5-9062-15bc0c7c8b96.png)

---

Selected:

![arrow_selected](https://cloud.githubusercontent.com/assets/4156987/10414483/4a78088e-6fa5-11e5-864e-c83f354769b1.png)

Fixes https://github.com/rust-lang/rust/issues/28958
2015-10-22 00:41:21 +00:00
Yoshito Komatsu
f609d17573 Correct a previous patch 2015-10-22 09:17:04 +09:00
Richard Diamond
e497d4a4e2 Add the PNaCl/JS targets to the backend. 2015-10-21 19:11:44 -05:00
Andrew Paseltiner
f657e134cb Remove obsolete note about UnsafeCell's fields 2015-10-21 14:17:39 -04:00
Ariel Ben-Yehuda
ad4cdf7077 don't revisit modules while finding traits in suggest
Fixes #29181
2015-10-21 20:18:21 +03:00
Vadim Chugunov
d710f8ba1f Moar comments. 2015-10-21 10:05:27 -07:00
bors
e7690e7764 Auto merge of #29206 - apasel422:issue-28936, r=alexcrichton
Closes #28936.
2015-10-21 16:37:31 +00:00
bors
ea2dabf6b2 Auto merge of #29138 - ykomatsu:trpl2, r=Manishearth 2015-10-21 14:45:48 +00:00
Yoshito Komatsu
55796c07b8 Fix some typos in TRPL 2015-10-21 22:17:23 +09:00
bors
58d782d777 Auto merge of #29179 - cjdrake:fixup, r=steveklabnik
This is a pretty trivial change. My eye caught some inconsistent whitespace while perusing compiler errors tonight. Specifically, I changed `//correct` to `// correct`, and got rid of some trailing whitespace that isn't seen in other code snippets.
2015-10-21 12:56:24 +00:00
Andrew Paseltiner
0f6b71846c Add test for #28936
Closes #28936.
2015-10-21 08:40:33 -04:00
bors
26c14a488b Auto merge of #29017 - ykomatsu:trpl, r=steveklabnik 2015-10-21 11:13:46 +00:00
bors
e99a77f9b6 Auto merge of #29108 - notriddle:master, r=alexcrichton 2015-10-21 09:28:37 +00:00
Marcello Seri
34a547f12d rustfmt liblibc 2015-10-21 09:32:52 +01:00
bors
4aec7c7d61 Auto merge of #29055 - alexcrichton:tiers, r=steveklabnik
This commit expands the "supported platforms" section of the book to include
documentation on the tiers that Rust currently has as well as organizing all
supported platforms into these various tiers. Infrastructure improvements over
the next few months are likely to change the location of may of these platforms
over, but for now this should faithfully represent what we've got today!
2015-10-21 07:45:48 +00:00
bors
3e139dc615 Auto merge of #29192 - phil-opp:unsafe-const-fns, r=alexcrichton
similar to #29085
2015-10-21 06:03:39 +00:00
bors
ff5cc89f8c Auto merge of #29190 - alexcrichton:from-str-socket-addr, r=brson
This was already implemented for SocketAddr, so the other types are lacking it
is just an oversight!

Closes #29183
2015-10-21 04:21:20 +00:00
bors
fddf2f7574 Auto merge of #29186 - pnkfelix:fsk-fix-issue-29166, r=alexcrichton
Add dropck unsafe escape hatch (UGEH) to vec::IntoIter.

Fix #29166
2015-10-21 02:39:59 +00:00
Chris C Cerami
509bec89fa Change headers in Traits section of the book 2015-10-20 21:21:44 -04:00
bors
4826f9625b Auto merge of #29171 - nrc:servo-dxr, r=@arielb1 2015-10-21 00:55:49 +00:00
Nick Cameron
401c80dab1 save-analysis: don't recompute crate name 2015-10-21 12:04:48 +13:00
bors
d8acb03cd5 Auto merge of #29159 - arcnmx:travis-trusty, r=alexcrichton
Moves back away from docker but still uses the GCE infrastructure with a system-installed LLVM. 

See http://docs.travis-ci.com/user/trusty-ci-environment/
2015-10-20 22:00:56 +00:00
Keshav Kini
79102e327c Remove reference to hello_world.rs in TRPL §2.2
When reading this paragraph, the beginning Rust programmer is starting
to write a Hello World program.  We have just told her to name the file
`main.rs`, and immediately afterward, a `hello_world.rs` is mentioned.
I changed this to an unrelated filename (incidentally one that appears
in this repository) to make it clear that this is just an example.
Also, wording it as a declarative sentence rather than an imperative one
further separates it from the Hello World instructions in this section.
2015-10-20 16:58:43 -05:00
bors
97ba52ec37 Auto merge of #29148 - petrochenkov:noshow, r=alexcrichton
Closes https://github.com/rust-lang/rust/issues/29145

[breaking-change], needs a crater run.
2015-10-20 19:02:27 +00:00
Alex Crichton
8aa6a117a4 std: Implement FromStr for SocketAddrV{4,6}
This was already implemented for SocketAddr, so the other types are lacking it
is just an oversight!

Closes #29183
2015-10-20 11:35:05 -07:00
Philipp Oppermann
3ed79944e8 Make Unique::new const function 2015-10-20 19:56:45 +02:00
Alex Crichton
93e419cab6 doc: Clarify supported platforms and tiers
This commit expands the "supported platforms" section of the book to include
documentation on the tiers that Rust currently has as well as organizing all
supported platforms into these various tiers. Infrastructure improvements over
the next few months are likely to change the location of may of these platforms
over, but for now this should faithfully represent what we've got today!
2015-10-20 10:13:32 -07:00
bors
5e9f305642 Auto merge of #29187 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #29158, #29162, #29175, #29176
- Failed merges:
2015-10-20 15:28:08 +00:00
Steve Klabnik
e058318b2c Rollup merge of #29176 - huonw:shared-tracking, r=Gankro 2015-10-20 09:43:48 -04:00
Steve Klabnik
2fb3b856c5 Rollup merge of #29175 - durka:patch-8, r=Gankro
Yay, markdown isn't standardized and rustbook's parser has subtle incompatibilities with Github's! So in the Github preview you don't see that this list fails to separate from the previous paragraph. I think this should fix it, but I didn't check.
2015-10-20 09:43:47 -04:00
Steve Klabnik
53c4b4d412 Rollup merge of #29162 - tsion:fix-nomicon-typo, r=alexcrichton
r? @steveklabnik
2015-10-20 09:43:47 -04:00
Steve Klabnik
b314f845e0 Rollup merge of #29158 - arcnmx:process-test, r=alexcrichton
This test was mysteriously messed with as part of #28500

r? @alexcrichton
2015-10-20 09:43:47 -04:00
bors
229385c4f8 Auto merge of #29156 - arcnmx:net-tests, r=alexcrichton
Just some minor cleanup.
2015-10-20 13:39:23 +00:00
Felix S. Klock II
2b712c78cf Add dropck unsafe escape hatch (UGEH) to vec::IntoIter.
Fix #29166
2015-10-20 14:54:38 +02:00
bors
e7eb7d58f9 Auto merge of #27723 - mystor:vecdeque_drain_range, r=bluss
This is a WIP PR for my implementation of drain over the VecDeque data structure supporting ranges. It brings the VecDeque drain implementation in line with Vec's.

Tests haven't been written for the new function yet.
2015-10-20 11:55:17 +00:00
bors
a9d5285344 Auto merge of #29155 - retep998:read-no-dir, r=alexcrichton
Fixes #29150 

r? @alexcrichton
2015-10-20 10:06:42 +00:00
bors
db54339f5a Auto merge of #29152 - petrochenkov:derstab, r=alexcrichton
The attributes are copied from the item for which the trait impl is derived

I think now we can close these two issues:
https://github.com/rust-lang/rust/issues/13054 - `allow`, `deny` etc. were already copied, now `stable` and `unstable` are copied as well.
https://github.com/rust-lang/rust/issues/18969 - I'm not sure this is needed, insta-stability were good enough so far, copied stability will be better. Nonetheless, it can be subsumed by some more general mechanism for supplying arbitrary not necessarily stability related attributes (for example `inline`) to derived impls and their methods (I haven't found an open issue for such mechanism).

r? @alexcrichton
2015-10-20 08:19:19 +00:00
Chris Drake
f820dc84ca Fixup some inconsistent whitespace 2015-10-20 00:11:33 -07:00
bors
2e86485f7b Auto merge of #29140 - sorear:dst-document-on-sized, r=alexcrichton
This is for discoverability.  If someone wants to know what `?Sized` means, then
Sized will be the only keyword they can use to search; so even though this is
technically a language matter, it makes sense to document it where it will be
looked for.
2015-10-20 06:36:50 +00:00
Vadim Chugunov
145b8438fe Use cfg_attr for switching link attrs in libunwind. 2015-10-19 18:57:09 -07:00
Vadim Chugunov
adce670e75 Fix up tests and docs. 2015-10-19 18:54:38 -07:00
Huon Wilson
94e9a073b0 Point core::ptr::Shared to tracking issue #27730. 2015-10-20 11:49:08 +11:00
Alex Burka
f1e06db8c2 fix markdown in nomicon/dropck 2015-10-19 20:14:38 -04:00
arcnmx
1181ca4b51 Use Travis trusty infrastructure 2015-10-19 18:31:02 -04:00
Keshav Kini
968d17a3eb Replace -- with — 2015-10-19 16:18:20 -05:00
Steve Klabnik
2f2d8df534 Rollup merge of #29169 - apasel422:spell, r=steveklabnik
r? @steveklabnik
2015-10-19 17:14:08 -04:00
Steve Klabnik
ea3bf79bac Rollup merge of #29168 - aarzee:master, r=steveklabnik
Remove leading newlines; replace lines containing only whitespace with empty lines; replace multiple trailing newlines with a single newline; remove trailing whitespace in lines.

This PR was created semiautomatically.
2015-10-19 17:14:08 -04:00
Steve Klabnik
d89c2ada16 Rollup merge of #29165 - iajrz:patch-1, r=steveklabnik
To augment the didactic effect, made placed the thread::sleep_ms call in the last example, so that there will be time for the other locks to happen; without this, I was unable to observe the deadlock in over 1,000 runs when there was no left-handed philosopher.
2015-10-19 17:14:08 -04:00
Steve Klabnik
f06e35c3ab Rollup merge of #29132 - sorear:document-ordering-relaxed, r=alexcrichton
I wasn't sure whether `Ordering::Relaxed` meant `Monotonic` or `Unordered`, so I checked the compiler sources and found 206af38e74/src/librustc_trans/trans/intrinsic.rs (L846) which appears conclusive.  Adding this answer to the documentation.
2015-10-19 17:14:07 -04:00
Steve Klabnik
e1d4983879 Rollup merge of #29125 - iKevinY:std-io-doc-fixes, r=alexcrichton
Just a few minor spelling/grammar fixes.
2015-10-19 17:14:07 -04:00
Steve Klabnik
0a47175fbb Rollup merge of #29027 - steveklabnik:iter_docs, r=manishearth
Due to the way iterators work, the std::iter module is chock full of
structs that you, humble Rust programmer, will never actually use.
However, they have URLs, and therefore get linked to, because they are
real structs that do exist.

So, rather than just have a tiny sentence about each one of them,
this patch adds links back to the functions and methods on Iterator
which actually create the structs, where helpful documentation already
exists.
2015-10-19 17:14:07 -04:00
Andrew Paseltiner
9431f3cc7b Correct spelling in docs 2015-10-19 13:48:42 -04:00
Keshav Kini
d142a4eed0 Reword curl | sh disclaimer in TRPL §2.1
The paragraph here seemed confusing, so I reworded it.  Also added
another possible reason why `curl | sh` might be objectionable to users.
2015-10-19 12:05:52 -05:00
bors
c74454a360 Auto merge of #28977 - arcnmx:cstring-into, r=alexcrichton
`OsString` has these sorts of conversions, while `CString` has been missing them. I'm iffy on `into_string` simply because the return type would be better off as `FromUtf8Error<CString>`, which of course isn't generic 😢

Also should a different/new feature gate be used?
2015-10-19 17:05:40 +00:00
Michael Layzell
dec0ea08f7 Correct drain implementations in libcollectionstest 2015-10-19 11:53:35 -04:00
Carlos Liam
f9d056f1b7 Clean whitespace
Remove leading newlines; replace lines containing only whitespace with empty lines; replace multiple trailing newlines with a single newline; remove trailing whitespace in lines
2015-10-19 11:16:31 -04:00
Irving A.J. Rivas Z.
e2ecf279b6 Made the example capable of consistent deadlocking
To augment the didactic effect, made placed the thread::sleep_ms call in the last example, so that there will be time for the other locks to happen; without this, I was unable to observe the deadlock in over 1,000 runs when there was no left-handed philosopher.
2015-10-19 10:02:46 -04:00
bors
7aec91734e Auto merge of #29153 - arcnmx:thread-spawn, r=alexcrichton
Fixes #29128

Most of the weird lifetime things and `inner` stuff seems like leftover cruft from `thread::scoped`. Should `JoinInner` just be removed/merged with `JoinHandle`?

Also is it okay to remove the `FnBox`? I'm not really sure why there were two allocations there...
2015-10-19 12:45:25 +00:00
Oliver Schneider
72f42f1174 copy paste error of stable attribute 2015-10-19 13:13:02 +02:00
Oliver Schneider
b4e30bd2a3 allow constant evaluation of function calls 2015-10-19 13:13:02 +02:00
bors
3e268f2fba Auto merge of #29144 - dotdash:llvmup, r=alexcrichton
Fixes #28947
2015-10-19 07:48:20 +00:00
Scott Olson
8222970f79 Fix minor syntax error in example. 2015-10-19 01:43:48 -06:00
Vadim Chugunov
bd0cf1ba13 Don't use GCC's startup objects (crtbegin.o/crtend.o); build and use our own (for now on for -windows-gnu target only).
Since it isn't possible to disable linkage of just GCC startup objects, we now need logic for finding libc installation directory and copying the required startup files (e.g. crt2.o) to rustlib directory.
Bonus change: use the `-nodefaultlibs` flag on Windows, thus paving the way to direct linker invocation.
2015-10-19 00:42:04 -07:00
arcnmx
cb48d44583 Owned conversions for CString 2015-10-19 01:29:44 -04:00
Yoshito Komatsu
5a15144b95 Change to avoid repeated "is" 2015-10-19 14:23:51 +09:00
Peter Atashian
dd11d3c619 Add error kind handling for ERROR_PATH_NOT_FOUND
Fixes #29150

Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-10-19 00:54:51 -04:00
arcnmx
9c3a06219a Add missing #[test] attribute to test 2015-10-19 00:54:31 -04:00
arcnmx
f7ad223f8e Touch up net tests 2015-10-19 00:19:01 -04:00
Vadim Chugunov
c807ff3b44 Create entry points for unwind frame registry in libstd. 2015-10-18 19:57:32 -07:00
Vadim Chugunov
def917afeb Implement eh_unwind_resume in libstd. 2015-10-18 19:57:32 -07:00
Vadim Chugunov
1da466253c Revisit implementation of custom unwind resume;
Rather than injecting a local `_Unwind_Resume` into the current translation unit,
just replace `resume` instruction with a direct call the the `eh_unwind_resume` lang item.
This is likely to be more robust in the face of future LLVM changes, and also allows us to delegate
work back to libgcc's `_Unwind_Resume`.
2015-10-18 19:57:28 -07:00
arcnmx
1303687d48 Clean up thread::spawn 2015-10-18 20:03:09 -04:00
Vadim Petrochenkov
629c2a840c Generate stability attributes for derived impls
The attributes are copied from the item for which the trait impl is derived
2015-10-19 01:55:53 +03:00
bors
9ed32bba77 Auto merge of #29117 - mseri:patch-5a, r=nrc
r? @nrc

Re-submission of the closed PR #29054 with the additional rustfmt-zation of the full librand.
2015-10-18 21:56:51 +00:00
bors
d3f497861d Auto merge of #29141 - marcusklaas:pat-expr, r=alexcrichton
Closes https://github.com/rust-lang/rust/issues/29120.
2015-10-18 20:06:07 +00:00
Stefan O'Rear
dc61d0f093 Document DST parameters on std::marker::Sized
This is for discoverability.  If someone wants to know what ?Sized means, then
Sized will be the only keyword they can use to search; so even though this is
technically a language matter, it makes sense to document it where it will be
looked for.
2015-10-18 12:29:06 -07:00
bors
3dc2aeef46 Auto merge of #29142 - liigo:patch-6, r=alexcrichton
https://github.com/rust-lang/rust/blob/master/src/libcore/iter.rs#L1541

r? @alexcrichton
2015-10-18 17:17:56 +00:00
Vadim Petrochenkov
025cf75864 Remove #[derive(Show)] 2015-10-18 19:12:09 +03:00
Björn Steinbrink
92276dc616 Update LLVM fork to include a backported fix for broken debug locations
Fixes #28947
2015-10-18 16:40:45 +02:00
Liigo Zhuang
6ec807c220 docs: change where clause to bound
https://github.com/rust-lang/rust/blob/master/src/libcore/iter.rs#L1541
2015-10-18 21:23:56 +08:00
bors
140e793854 Auto merge of #29131 - apasel422:transmute, r=bluss 2015-10-18 12:59:29 +00:00
Marcus Klaas
e5962c206e Fix span for pattern literals 2015-10-18 14:45:56 +02:00
bors
3f2ad610a8 Auto merge of #28845 - oli-obk:rfc1229, r=pnkfelix
This PR turns statically known erroneous code (e.g. numeric overflow) into a warning and continues normal code-generation to emit the same code that would have been generated without `check_const` detecting that the result can be computed at compile-time.

<del>It's not done yet, as I don't know how to properly emit a lint from trans. I can't seem to extract the real lint level of the item the erroneous expression is in.</del> It's an unconditional warning now.

r? @pnkfelix 

cc @nikomatsakis 

* [RFC 1229 text](https://github.com/rust-lang/rfcs/blob/master/text/1229-compile-time-asserts.md)
* RFC PR: rust-lang/rfcs#1229
* tracking issue: https://github.com/rust-lang/rust/issues/28238
2015-10-18 11:09:03 +00:00
bors
9d7c5e5d3d Auto merge of #29134 - wthrowe:linker-output-ICE, r=pnkfelix
The escaped form isn't pretty, but this should be a very rare error.
Having a general binary-escaping string creation function might be a
good idea, though.

Closes #29122
2015-10-18 08:20:38 +00:00
Yoshito Komatsu
5122a6d936 Fix some typos 2015-10-18 16:07:00 +09:00
William Throwe
d12522c25e Don't ICE if the linker prints something non-UTF-8
The escaped form isn't pretty, but this should be a very rare error.
Having a general binary-escaping string creation function might be a
good idea, though.

Closes #29122
2015-10-17 23:58:11 -04:00
bors
4af89fe317 Auto merge of #29091 - luqmana:29073-overflow-cabi, r=pnkfelix
Fixes #29073.
2015-10-18 02:07:01 +00:00
Stefan O'Rear
1e68c91666 Document that Ordering::Relaxed is Monotonic 2015-10-17 17:39:31 -07:00
Andrew Paseltiner
6031a58a20 Remove some trivial transmutes
`rbml::writer::Encoder::unsafe_clone` had no users across the entire
repo.
2015-10-17 20:29:49 -04:00
Josh Stone
00d8d7bc04 Implement conversion traits for primitive float types 2015-10-17 16:27:31 -07:00
Kevin Yap
c3058a25d8 Fix minor issues with std::io docs 2015-10-17 12:35:23 -07:00
bors
206af38e74 Auto merge of #29105 - billpmurphy:master, r=alexcrichton
Change the spacing/order of lines in the final pointer conversion example to make it more clear.

Very small change, can be rolled up.
2015-10-17 17:53:53 +00:00
bors
971856d0ec Auto merge of #29089 - kickinbahk:edit-testing-docs, r=steveklabnik
When going through the docs, it is not clear that binary files cannot be tested. Additionally, it is hard to find the proper structure of a Rust crate and it took me several hours of looking through the docs to find the crates and modules section. I think we can link to it from here and it will be beneficial to those who are coming to the language.
2015-10-17 15:10:07 +00:00
Michael Howell
5fd98b3d79 other should be called other, not v. 2015-10-17 07:56:38 -07:00
bors
c7a58b534e Auto merge of #28933 - fhahn:issue-28837-partialeq-note, r=alexcrichton
this PR adds notes for missing `PartialEq` and `PartialOrd`. I've added a test case but it seems like `NOTE` is ignored by the test runner.

#28837
2015-10-17 13:24:01 +00:00
Marcello Seri
8a0b9c0542 Re-formatted macros by hand with rustfmt style 2015-10-17 13:16:13 +01:00
bors
ad5a43a483 Auto merge of #29114 - apasel422:issue-27105, r=alexcrichton
Closes #27105.
2015-10-17 11:38:10 +00:00
bors
e1944b6b0b Auto merge of #29110 - apasel422:shared, r=alexcrichton
Fixes #29037.
Fixes #29106.

r? @pnkfelix 
CC @Gankro
2015-10-17 09:51:30 +00:00
Marcello Seri
d0bd5e87a2 attitional tests fixups 2015-10-17 10:20:50 +01:00
bors
cd79acf21e Auto merge of #29109 - nxnfufunezn:master, r=Manishearth
Fixes : #19668 

r? @Manishearth
2015-10-17 08:04:32 +00:00
bors
32a4bd9ae5 Auto merge of #29102 - petrochenkov:spanvis, r=alexcrichton
Closes https://github.com/rust-lang/rust/issues/28750
`Arm` and `Generics` don't have spans at all, so it's not a visitor's problem, `visit_struct_def` was fixed in https://github.com/rust-lang/rust/pull/28816
2015-10-17 06:16:09 +00:00
bors
4ed46e7225 Auto merge of #29079 - fhahn:remove-unused-files-libcoretest, r=alexcrichton
While working on #28711 I found out that 

*  src/libcoretest/clone.rs 
* src/libcoretest/fmt/float.rs  
* src/libcoretest/intrinsics.rs 

are not used. I am not sure if removing them is the right way to go. If it makes sense to keep (and fix and enable) them, I would be happy to update the PR.
2015-10-17 03:19:45 +00:00
Andrew Paseltiner
eca0732e2e Add test for #27105
Closes #27105.
2015-10-16 21:32:06 -04:00
Luqman Aden
82f08ea21c trans: Use an isize to count the number of registers so we don't underflow for fn's with > 7 args in debug builds. 2015-10-16 21:10:52 -04:00
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
Andrew Paseltiner
d6bd8d8491 Add Shared pointer and have {Arc, Rc} use it
This change has two consequences:

1. It makes `Arc<T>` and `Rc<T>` covariant in `T`.

2. It causes the compiler to reject code that was unsound with respect
to dropck. See compile-fail/issue-29106.rs for an example of code that
no longer compiles. Because of this, this is a [breaking-change].

Fixes #29037.
Fixes #29106.
2015-10-16 18:35:31 -04:00
Guillaume Gomez
42c01d740b Improve error handling by providing Error struct with Path information 2015-10-17 00:20:00 +02:00
Marcello Seri
65547ff5a2 Tests fixup 2015-10-16 22:47:54 +01:00
Marcello Seri
2a59875c72 Added attributes to allow rustfmt_skip in librand 2015-10-16 22:43:50 +01:00
Marcello Seri
ee5c5838a7 fixup 2015-10-16 22:40:08 +01:00
Marcello Seri
76b69e365b rustfmt src/librand 2015-10-16 22:38:49 +01:00
nxnfufunezn
72e0e59574 Updated librustc_lint/builtin.rs to use span_lint_note 2015-10-17 02:14:26 +05:30
bors
be91042913 Auto merge of #29082 - DenisKolodin:patch-3, r=alexcrichton 2015-10-16 20:35:51 +00:00
nxnfufunezn
99ae898c57 Add span_lint_note and span_lint_help to the LintContext 2015-10-17 01:50:33 +05:30
Florian Hahn
510360de21 Add unused modules to libcoretest 2015-10-16 21:15:23 +02:00
kickinbahk
cf926f1c18 Update the testing doc to be more clear and include dynamic link
Fixed some typos and changed the link to the link to crates-and-modules to be dynamic.
2015-10-16 11:45:22 -07: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
billpmurphy
348cbe0cb9 book: Change raw pointer conversion example
Change the spacing/order of lines in the final pointer conversion example to make it more clear.
2015-10-16 11:42:27 -04: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
Vadim Petrochenkov
a0f2a591e0 Provide span for visit_enum_def 2015-10-16 17:17:14 +03: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
kickinbahk
1468b190ac Add to Testing docs to make more clear
When going through the docs, it is not clear that binary files cannot be tested. Additionally, it is hard to find the proper structure of a Rust crate and it took me several hours of looking through the docs to find the crates and modules section. I think we can link to it from here and it will be beneficial to those who are coming to the language.
2015-10-15 17:44:21 -07: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