Commit Graph

42672 Commits

Author SHA1 Message Date
Manish Goregaokar
f23867aa66 Rollup merge of #25248 - carols10cents:unused-auxiliaries, r=Manishearth
Hiiiii Rust, it's me again, Carol ;)

Based on the unused files that I found hanging out and that I removed in #25231, I looked at the rest of the auxiliary files to see if there were any more not being used. Guess what!! There were!!!!! ;)

Have I mentioned how much I enjoy deleting code? ;) ;) ;) <3
2015-05-10 11:01:45 +05:30
Manish Goregaokar
79ca74d8e3 Rollup merge of #25242 - acgtyrant:patch-3, r=Manishearth
Fix a typo while `io::stdin().read_line()` returns `Result` actually
2015-05-10 11:01:45 +05:30
Manish Goregaokar
15c9f44c9a Rollup merge of #25200 - nham:E0062_E0063, r=alexcrichton
cc #24407
2015-05-10 11:01:45 +05:30
Don Petersen
ae1b64ff73 Fix typo in Match document. 2015-05-09 22:10:34 -07:00
Nick Hamann
788d76281e Remove obsolete comment in rustc::middle::subst.
This was added in d2f8074 along with the AssocSpace stuff. The AssocSpace
stuff was then removed in de8e0ae, except the comment was missed it seems.
2015-05-09 23:43:48 -05:00
Don Petersen
f8888af412 Add omitted word to mutability docs. 2015-05-09 20:32:00 -07:00
Isaac Ge
fa3fd813d6 Update error-handling.md
Fix two typos while `io::stdin().read_line()` returns `Result` actually

Signed-off-by: acgtyrant <acgtyrant@gmail.com>
2015-05-10 10:20:47 +08:00
Clark Gaebel
101b25c100
[liballoc] Adds checks for UB during allocation.
They're only enabled in debug builds, but a panic is usually more
welcome than UB in debug builds.
2015-05-09 20:49:59 -04:00
inrustwetrust
8e8f8d9a5a Upgraded warning for invalid crate_type attribute syntax to an error
If the user intended to set the crate_type to "lib" but accidentally used
incorrect syntax such as `#![crate_type(lib)]`, the compilation would fail with
"main function not found". This made it hard to locate the source of the
problem, since the failure would cause the warning about the incorrect
attribute not to be shown.
2015-05-10 00:07:26 +02:00
robertfoss
9f2b7a332b Update AUTHORS.txt 2015-05-09 17:10:50 -04:00
Nick Hamann
7984074e25 Convert #[lang=".."] to #[lang = ".."] for docs too. 2015-05-09 16:08:02 -05:00
Nick Hamann
a1898f890d Convert #[lang="..."] to #[lang = "..."]
In my opinion this looks nicer, but also it matches the whitespace generally
used for stability markers more closely.
2015-05-09 14:50:28 -05:00
Nick Hamann
df64e05426 Change E0062 and E0063 to say each field should be specified once. 2015-05-09 13:56:18 -05:00
Nick Hamann
f736468c06 Add long diagnostic for E0137 2015-05-09 13:56:18 -05:00
Nick Hamann
87f0237d01 Add long diagnostics for E0062 and E0063 2015-05-09 13:56:18 -05:00
Rob Young
978dc9f36a Minor docs fix
Remove an rogue 'is' and fix some line wrapping.
2015-05-09 18:31:00 +01:00
Carol Nichols
757809c8d3 Remove auxiliary files not used since eb4d39e 2015-05-09 13:10:57 -04:00
Carol Nichols
7d5c248f31 Remove auxiliary file not used since 17da4c7 2015-05-09 13:10:57 -04:00
Carol Nichols
14d476ecbb Remove auxiliary files not used since 812637e 2015-05-09 13:10:57 -04:00
bors
dc630d01e3 Auto merge of #24728 - GuillaumeGomez:type-mismatch, r=pnkfelix
Part of #24407.
2015-05-09 16:48:11 +00:00
Guillaume Gomez
30f88c841b Use of @pnkfelix code and fix typos 2015-05-09 17:54:53 +02:00
bors
67ba6dcf68 Auto merge of #24612 - lifthrasiir:flt2dec, r=pnkfelix
This is a direct port of my prior work on the float formatting. The detailed description is available [here](https://github.com/lifthrasiir/rust-strconv#flt2dec). In brief,

* This adds a new hidden module `core::num::flt2dec` for testing from `libcoretest`. Why is it in `core::num` instead of `core::fmt`? Because I envision that the table used by `flt2dec` is directly applicable to `dec2flt` (cf. #24557) as well, which exceeds the realm of "formatting".
* This contains both Dragon4 algorithm (exact, complete but slow) and Grisu3 algorithm (exact, fast but incomplete).
* The code is accompanied with a large amount of self-tests and some exhaustive tests. In particular, `libcoretest` gets a new dependency on `librand`. For the external interface it relies on the existing test suite.
* It is known that, in the best case, the entire formatting code has about 30 KBs of binary overhead (judged from strconv experiments). Not too bad but there might be a potential room for improvements.

This is rather large code. I did my best to comment and annotate the code, but you have been warned.

For the maximal availability the original code was licensed in CC0, but I've also dual-licensed it in MIT/Apache as well so there should be no licensing concern.

This is [breaking-change] as it changes the float output slightly (and it also affects the casing of `inf` and `nan`). I hope this is not a big deal though :)

Fixes #7030, #18038 and #24556. Also related to #6220 and #20870.

## Known Issues

- [x] I've yet to finish `make check-stage1`. It does pass main test suites including `run-pass` but there might be some unknown edges on the doctests.
- [ ] Figure out how this PR affects rustc.
- [ ] Determine which internal routine is mapped to the formatting specifier. Depending on the decision, some internal routine can be safely removed (for instance, currently `to_shortest_str` is unused).
2015-05-09 14:56:56 +00:00
Kang Seonghoon
1aecd17463 test: fixed some tests affected by banker's rounding. 2015-05-09 22:52:47 +09:00
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