Commit Graph

47380 Commits

Author SHA1 Message Date
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
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
bors
7275d3d361 Auto merge of #29009 - alexcrichton:std-pkgs, r=brson
This commit splits out the standard library from the current 'rustc' package
into a new 'rust-std' package. This is the basis for the work on easily
packaging compilers that can cross-compile to new targets.
2015-10-20 00:30:23 +00:00
bors
2258159981 Auto merge of #29172 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #29027, #29125, #29132, #29165, #29168, #29169
- Failed merges:
2015-10-19 21:44:56 +00: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
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
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
bors
3e268f2fba Auto merge of #29144 - dotdash:llvmup, r=alexcrichton
Fixes #28947
2015-10-19 07:48:20 +00:00
arcnmx
cb48d44583 Owned conversions for CString 2015-10-19 01:29:44 -04: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
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
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
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
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
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