Commit Graph

42232 Commits

Author SHA1 Message Date
Eduard Burtescu
592165fb17 Fix ty::populate_implementations_for_trait_if_necessary to load the trait's impls from all the crates. 2015-05-12 07:56:37 +03:00
Eduard Burtescu
aeb92bab5d rustc: rename ty::populate_implementations_for_type_if_necessary to make it clear that it only populates inherent impls. 2015-05-12 07:51:15 +03:00
Eduard Burtescu
8bcb3cb475 rustc::metadata: use u64 for DefId's instead of strings. 2015-05-12 07:49:15 +03:00
bors
7129b25949 Auto merge of #25231 - carols10cents:lingering-quoted-crate-names, r=alexcrichton
This syntax was removed in b24a3b8 but references remained in the
grammar, the reference, rustdoc generation, and some auxiliary test
files that don't seem to have been used since 812637e.

Thanks!! 💟
2015-05-09 05:43:23 +00:00
bors
50aada70f4 Auto merge of #25159 - inrustwetrust:wrapping_inline, r=alexcrichton
This was causing function calls to be emitted for bitwise complements, even with optimizations on.
Steps to reproduce:
```
$ cat wrapping.rs
fn main() {
    let a = std::num::Wrapping(std::env::args().len() as u32);
    let b = !a;
    println!("{}", b.0);
}
$ rustc -O wrapping.rs --emit=asm,link
$ grep Not wrapping.s
        callq   _ZN3num8wrapping23Wrapping$LT$u32$GT$.Not3not20hba4b266232e02b1dHkbE
```
2015-05-09 03:55:27 +00:00
bors
8c9dc18355 Auto merge of #24859 - richo:valgrind-tests, r=brson
This stung me more than once in dev.

Bonus DRY'ing up of configure that I did on my way past.
2015-05-09 02:07:18 +00:00
Carol Nichols
bf06163ea7 Remove references to deprecated extern crate "foo" as bar syntax
This syntax was removed in b24a3b8 but references remained in the
grammar, the reference, rustdoc generation, and some auxiliary test
files that don't seem to have been used since 812637e.
2015-05-08 20:48:54 -04:00
bors
c033d98280 Auto merge of #25162 - seanmonstar:asref-bytes, r=alexcrichton
r? @aturon
2015-05-09 00:18:49 +00:00
Sean McArthur
8e491ef019 collections: change bounds of SliceConcatExt implementations to use Borrow instead of AsRef 2015-05-08 17:13:54 -07:00
Sean McArthur
093ebd5a62 collections: impl AsRef<[u8]> for String 2015-05-08 17:13:54 -07:00
Sean McArthur
aaa3641754 core: impl AsRef<[u8]> for str 2015-05-08 17:13:54 -07:00
bors
d3958c6bc3 Auto merge of #25217 - alexcrichton:fix-distcheck, r=brson
This fixes the `distcheck` target and nightly builds.
2015-05-08 22:29:05 +00:00
bors
b210aea1d4 Auto merge of #25218 - Manishearth:rollup, r=Manishearth
- Successful merges: #24864, #25140, #25179, #25181, #25190, #25194, #25195, #25198, #25203, #25210, #25211, #25215
- Failed merges: #25200
2015-05-08 20:39:08 +00:00
Manish Goregaokar
55437b4a57 Rollup merge of #25215 - acgtyrant:patch-2, r=alexcrichton
Fix wrong radius valve from 0.0 to 1.0 as above
2015-05-09 00:37:45 +05:30
Manish Goregaokar
dd37250674 Rollup merge of #25211 - huonw:libc, r=cmr
Many many many people ask in #rust about this libraries, having an
explanatory reason will probably help a lot.
2015-05-09 00:37:45 +05:30
Manish Goregaokar
a3a3d4efad Rollup merge of #25210 - rick68:patch-1, r=alexcrichton
fixed a doc mistake in libcore/marker.mk
2015-05-09 00:37:44 +05:30
Manish Goregaokar
8a6bb9f84e Rollup merge of #25203 - sharnik:fix-sort-authors, r=alexcrichton
Properly sorted, Ł goes between L and M.
2015-05-09 00:37:44 +05:30
Manish Goregaokar
f7980a3aab Rollup merge of #25198 - carols10cents:update-configure-osx, r=alexcrichton
Tiny tiny nitpick that I just noticed after getting a new laptop ( 🍺 + 💻 = 👼 ) and thus needing to ./configure anew on Yosemite. 

It's weird to see a message that says you're on 10.9 if you're on 10.10, in a oh-i-wonder-what-else-is-wrong sort of sense-- easy fix with a `>=` since `gcc --version` on 10.10 with the newest xcode still says it's clang.

❤️
2015-05-09 00:37:43 +05:30
Manish Goregaokar
4b4cb86248 Rollup merge of #25195 - simonkern:master, r=steveklabnik
I deleted one unneccessary 'the' and added the href for [bindings]
2015-05-09 00:37:43 +05:30
Manish Goregaokar
655042052c Rollup merge of #25194 - tshepang:assert-convention, r=steveklabnik
… compared
2015-05-09 00:37:43 +05:30
Manish Goregaokar
638deb3bc3 Rollup merge of #25190 - nham:E0046_E0054, r=alexcrichton
cc #24407
2015-05-09 00:37:43 +05:30
Manish Goregaokar
b02270963c Rollup merge of #25181 - steveklabnik:fix_curlies, r=alexcrichton 2015-05-09 00:37:43 +05:30
Manish Goregaokar
61c1cf7f74 Rollup merge of #25179 - bengesoff:patch-1, r=steveklabnik
Following paragraph says "we've used `*` which..." but code says "rand=\"0.3.0\""
2015-05-09 00:37:42 +05:30
Manish Goregaokar
4c0f7fd6fc Rollup merge of #25140 - kevinmehall:mips, r=steveklabnik
Building with `--target=mipsel-unknown-linux-gnu` currently results in the following errors, fixed by this PR:

```
rustc: x86_64-unknown-linux-gnu/stage2/lib/rustlib/mipsel-unknown-linux-gnu/lib/libstd
/vol/rust/src/libstd/os/linux/raw.rs:76:21: 76:28 error: use of undeclared type name `c_ulong`
/vol/rust/src/libstd/os/linux/raw.rs:76         pub st_dev: c_ulong,
                                                            ^~~~~~~
/vol/rust/src/libstd/os/linux/raw.rs:83:22: 83:29 error: use of undeclared type name `c_ulong`
/vol/rust/src/libstd/os/linux/raw.rs:83         pub st_rdev: c_ulong,
                                                             ^~~~~~~
/vol/rust/src/libstd/sys/common/net2.rs:210:52: 210:70 error: unresolved name `libc::TCP_KEEPIDLE`
/vol/rust/src/libstd/sys/common/net2.rs:210         setsockopt(&self.inner, libc::IPPROTO_TCP, libc::TCP_KEEPIDLE,
```
2015-05-09 00:37:42 +05:30
Manish Goregaokar
8b8cb34747 Rollup merge of #24864 - astraw:patch-1, r=steveklabnik
If you have 0 references (`&T`) to a resource, presumably, you could have a mutable reference (`&mut T`). So this only start to make sense at having 1 reference to a resource.
2015-05-09 00:37:42 +05:30
bors
7132092ce6 Auto merge of #25187 - alexcrichton:mem-forget-safe, r=brson
This commit is an implementation of [RFC 1066][rfc] where the conclusion was
that leaking a value is a safe operation in Rust code, so updating the signature
of this function follows suit.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1066-safe-mem-forget.md

Closes #25186
2015-05-08 18:21:51 +00:00
Richo Healey
01fc026440 mk: Log that valgrind tests are disabled 2015-05-08 10:49:02 -07:00
Alex Crichton
00204e8a83 mk: Add a missing folder to the dist directory
This fixes the `distcheck` target and nightly builds.
2015-05-08 09:45:16 -07:00
Isaac Ge
962816bc29 Update method-syntax.md
Fix wrong radius valve from 0.0 to 1.0 as above
2015-05-08 22:39:25 +08:00
Huon Wilson
091ba42d77 Add a reason to the libc & rand instability.
Many many many people ask in #rust about this libraries, having an
explanatory reason will probably help a lot.
2015-05-08 23:20:53 +10:00
Wei-Ming Yang
a4ec372a1e fixed a mistake 2015-05-08 20:44:11 +08:00
Wojciech Ogrodowczyk
c65a1838cb Fix sort in AUTHORS.txt
Properly sorted, Ł goes between L and M.
2015-05-08 07:38:18 +02:00
Andrew Straw
391d14802e fix logic when describing kinds of borrows
If you have 0 references (`&T`) to a resource, presumably, you could
have a mutable reference (`&mut T`). So this only start to make sense
at having 1 reference to a resource.
2015-05-08 06:12:59 +02:00
bors
cf76e63745 Auto merge of #25136 - alexcrichton:drop-the-two, r=aturon
* Remove the 2-suffix from some modules
* Remove some unused files
* Remove double-boxing for `ReentrantMutex`
2015-05-08 01:32:59 +00:00
Alex Crichton
dd59b1fb4c std: Mark mem::forget as a safe function
This commit is an implementation of [RFC 1066][rfc] where the conclusion was
that leaking a value is a safe operation in Rust code, so updating the signature
of this function follows suit.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1066-safe-mem-forget.md

Closes #25186
2015-05-07 17:25:04 -07:00
Simon Kern
60c0e75e74 fixed href for structs 2015-05-08 01:46:26 +02:00
Simon Kern
3e76f2838a v2 gets a copy of the pointer, not a copy of the data 2015-05-08 01:43:18 +02:00
bors
b402c43f08 Auto merge of #25123 - arielb1:self-inhibiting-error, r=nikomatsakis
Fix #25076.

r? @nikomatsakis
2015-05-07 23:40:55 +00:00
Carol Nichols
468cb052b8 Expand OS X versions referenced in configure message
10.10 is out, so it's weird to see a message that says you're on 10.9.
Change the message to be >=10.9.
2015-05-07 19:35:58 -04:00
Simon Kern
84c7dfa48c deleted unnecessary the 2015-05-08 00:59:45 +02:00
Simon Kern
2213898c19 two minor fixes 2015-05-08 00:42:10 +02:00
Tshepang Lekhonkhobe
7ef46e0dde doc: the prevailing convention is to use assert_eq! when 2 values are compared 2015-05-08 00:14:00 +02:00
bors
5ae026e892 Auto merge of #25157 - alexcrichton:remove-vec-add, r=aturon
Ideally this trait implementation would be unstable, requiring crates to opt-in
if they would like the functionality, but that's not currently how stability
works so the implementation needs to be removed entirely.

This may come back at a future date, but for now the conservative option is to
remove it.

[breaking-change]
2015-05-07 21:45:11 +00:00
Nick Hamann
11a7bad97b Add long diagnostic for E0054 2015-05-07 14:34:54 -05:00
Nick Hamann
11cb5e50ab Add long diagnostic for E0046 2015-05-07 13:08:59 -05:00
bors
f0ac7e04e6 Auto merge of #24973 - roryokane:fix-minus-doc-buttons, r=alexcrichton
My change in #24797 had a bug, described in that issue’s comments, and first discovered in issue #24918. This fixes it.

I tested this new `main.js` by changing the `main.js` content of [a rendered docs page](https://doc.rust-lang.org/std/option/) to this new content. The ‘[−]’ button worked again.

I am also including another related fix, because it would require manual merging if I made a separate pull request for it. The page-global ‘[−]’ button currently adds `#` to the end of the URL whenever it is clicked. I am changing its `href` from `#` to `javascript:void(0)` (the same as the `href` for section-specific ‘[−]’ links) to fix that.
2015-05-07 17:19:33 +00:00
Alex Crichton
7529bd60c3 std: Remove a double-box in ReentrantMutex
Perform unsafe initialization up front and then only afterward the mutex is in
place do we initialize it.
2015-05-07 09:30:00 -07:00
Alex Crichton
a031325e83 std: Remove unused helper_thread.rs file
This module has been removed for quite some time!
2015-05-07 09:30:00 -07:00
Alex Crichton
377b1adc36 std: Rename sys::foo2 modules to sys::foo
Now that `std::old_io` has been removed for quite some time the naming real
estate here has opened up to allow these modules to move back to their proper
names.
2015-05-07 09:30:00 -07:00
bors
a39d4fc684 Auto merge of #25013 - pnkfelix:span_to_lines-oflo, r=huonw
Guard against overflow in `codemap::span_to_lines`.

(Revised/expanded version of PR #24976)

Make `span_to_lines` to return a `Result`.

In `diagnostic`, catch `Err` from `span_to_lines` and print `"(unprintable span)"` instead.

----

There a number of recent issues that report the bug here.  See e.g. #24761 and #24954.

This change *might* fix them. However, that is *not* its main goal. The main goals are:

 1. Make it possible for callers to recover from an error here, and

 2. Insert a more conservative check, in that we are also checking that the files match up.

----

As a drive-by, fix #24997 , which was causing my attempts to `make check-stage1` on an `--enable-debug` build to fail.
2015-05-07 15:25:09 +00:00