Commit Graph

42699 Commits

Author SHA1 Message Date
bors
497942332f Auto merge of #25243 - Manishearth:rollup, r=Manishearth
- Successful merges: #25216, #25227
- Failed merges:
2015-05-09 13:10:43 +00:00
Manish Goregaokar
511a8d47eb Rollup merge of #25227 - jooert:bitvec-doc-fix, r=alexcrichton
I forgot this in #24890.
2015-05-09 18:40:19 +05:30
Manish Goregaokar
ac478ecb50 Rollup merge of #25216 - barosl:no-more-task, r=Manishearth
I've found that there are still huge amounts of occurrences of `task`s in the documentation. This PR tries to eliminate all of them in favor of `thread`.
2015-05-09 18:40:19 +05:30
Sindre Johansen
7a2ac0cd5a Added start of last text block
The start of the last text block in references was missing, I added it.
2015-05-09 13:34:49 +02:00
Ulrik Sverdrup
1e9ce0d505 std: Add example for HashMap::entry() 2015-05-09 13:27:23 +02:00
Sindre Johansen
7a91fe845c Fixed a typo. Removed an extra s 2015-05-09 12:59:24 +02:00
Ulrik Sverdrup
c46f3ff12b rustdoc: Add Associated Constants section
Section only visible if there are assoc. consts. present.
2015-05-09 12:20:45 +02:00
bors
3906edf41e Auto merge of #25212 - pnkfelix:dropck-box-trait, r=nikomatsakis
dropck: must assume `Box<Trait + 'a>` has a destructor of interest.

Fix #25199.

This detail was documented in [RFC 769]; the implementation was just missing.

[breaking-change]

The breakage here falls into both obvious and non-obvious cases.

The obvious case: if you were relying on the unsoundness this exposes (namely being able to reference dead storage from a destructor, by doing it via a boxed trait object bounded by the lifetime of the dead storage), then this change disallows that.

The non-obvious cases: The way dropck works, it causes lifetimes to be extended to longer extents than they covered before. I.e.  lifetimes that are attached as trait-bounds may become longer than they were previously.

* This includes lifetimes that are only *implicitly* attached as trait-bounds (due to [RFC 599]). So you may have code that was e.g. taking a parameter of type `&'a Box<Trait>` (which expands to `&'a Box<Trait+'a>`), that now may need to be assigned type `&'a Box<Trait+'static>` to ensure that `'a` is not inadvertantly inferred to a region that is actually too long.  (See commit ee06263 for an example of this.)

[RFC 769]: https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md#the-drop-check-rule

[RFC 599]: https://github.com/rust-lang/rfcs/blob/master/text/0599-default-object-bound.md
2015-05-09 09:20:43 +00:00
bors
95400c51c3 Auto merge of #25214 - acgtyrant:patch-1, r=brson
make the definition of static methods explicit
2015-05-09 07:31:44 +00:00
Felix S. Klock II
8654dfbc2f address fallout in libsyntaxtest. 2015-05-09 08:46:58 +02: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
Johannes Oertel
a29dc05c93 Document panic behaviour of BitVec::split_off 2015-05-09 00:41:38 +02: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
Brian Anderson
9b3d315fff std: Update crate docs
Attempted to organize them in a way more relevant to what newbies
would be interested in hearing.
2015-05-08 15:15:03 -07:00
Ulrik Sverdrup
ff4e061049 rustdoc: Link associated items in search index to trait
This is related to isssue #22442 and solves it partly.

This solves the links of associated types and constants, so that they
link to the trait page.
2015-05-09 00:03:42 +02:00
Guillaume Gomez
715f7c3cd2 Add a precision for references 2015-05-08 23:54:24 +02: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
Brian Anderson
51a1e83cb0 doc: Remove mention of 30 minute intro 2015-05-08 13:19:02 -07:00
Lee Jeffery
a76244fcef Fix CRLF line-ending parsing for comments. 2015-05-08 20:33:58 +01: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
Barosl Lee
9b91ccffb0 Fix the tests broken by replacing task with thread 2015-05-09 04:04:08 +09:00
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
Barosl Lee
857b70f3e5 Please the make tidy 2015-05-09 02:24:18 +09:00
Barosl Lee
1e1e6e046a Fix invalid references due to the automated string substitution 2015-05-09 02:24:18 +09:00
Barosl Lee
ff332b6467 Squeeze the last bits of tasks in documentation in favor of thread
An automated script was run against the `.rs` and `.md` files,
subsituting every occurrence of `task` with `thread`. In the `.rs`
files, only the texts in the comment blocks were affected.
2015-05-09 02:24:18 +09: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
Isaac Ge
544362c9b8 Update method-syntax.md
make the definition of static methods explicit
2015-05-08 22:30:00 +08:00
Felix S. Klock II
0fa1c1662f Fallout to compile-fail tests.
This change is worrisome to me, both because:

1. I thought the rules in RFC 599 imply that the `Box<Trait>` without `'static`
   in the first case would expand to the second case, but their behaviors
   here differ.  And,

2. The explicit handling of `'static` should mean `dropck` has no application
   here and thus we should have seen no change to the expected error messages.
   Nonetheless, the error messages changed.
2015-05-08 16:08:59 +02:00
Felix S. Klock II
d8d4bb4ce3 fallout to run-pass tests. 2015-05-08 15:39:25 +02:00
Felix S. Klock II
ccf12853d8 Regression tests for Issue 25199 (dropck and Box<Trait + 'a>). 2015-05-08 15:22:25 +02:00