about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2016-01-02Limit displaying relevant trait impls to 4Florian Hahn-22/+34
2016-01-01Show similar trait implementations if no matching impl is foundFlorian Hahn-0/+59
closes #21659
2016-01-01Auto merge of #30663 - apasel422:ll, r=blussbors-7/+15
CC #30642 r? @Gankro
2016-01-01Auto merge of #30648 - tshepang:missing-graves, r=steveklabnikbors-2/+2
2015-12-31Auto merge of #30645 - tshepang:grammar, r=steveklabnikbors-2/+2
2015-12-31Auto merge of #30616 - arcnmx:cstr-asref, r=aturonbors-2/+33
Are trait impls still insta-stable? Considering that this design has been around for a long time on `String` and `OsString` it probably doesn't matter much... The `From` impl is a bit strange to me. It's stolen from `OsString` but I'm not really sure about it... `String` just impls `From<&str>` instead, would that make more sense?
2015-12-31Make `LinkedList` and its read-only iterators covariantAndrew Paseltiner-7/+15
CC #30642
2015-12-31CStr impl stabilityarcnmx-4/+4
2015-12-31impl From<&CStr> for CStringarcnmx-7/+7
2015-12-31Auto merge of #28469 - DenisKolodin:master, r=steveklabnikbors-1/+40
2015-12-31Auto merge of #30660 - nagisa:rollup, r=steveklabnikbors-476/+1395
- Successful merges: #30365, #30565, #30590, #30630 - Failed merges:
2015-12-31Rollup merge of #30630 - tsion:mir-closure-args, r=nagisaSimonas Kazlauskas-16/+13
Previously, all references to closure arguments went to the argument before the one they should (e.g. to `arg1` when it was supposed to go to `arg2`). This was because the MIR builder did not account for the implicit arguments that come before the explicit arguments, and closures have one implicit argument - the struct containing the captures. This is my test code and a diff of the MIR generated for the closure: ```rust let a = 2i32; let _f = |b: i32| -> i32 { a + b }: ``` ```diff --- old 2015-12-29 23:16:32.027926372 -0600 +++ new 2015-12-29 23:16:42.975400757 -0600 @@ -1,22 +1,22 @@ fn(arg0: &[closure@closure-args.rs:8:14: 8:39 a:&i32], arg1: i32) -> i32 { let var0: i32; // b let tmp0: (); let tmp1: i32; let tmp2: i32; bb0: { - var0 = arg0; + var0 = arg1; tmp1 = (*(*arg0).0); tmp2 = var0; ReturnPointer = Add(tmp1, tmp2); goto -> bb1; } bb1: { return; } bb2: { diverge; } } ``` (If you're wondering where this text MIR output comes from, it's from another branch of mine waiting on https://github.com/rust-lang/rust/pull/30602 to get merged.)
2015-12-31Rollup merge of #30590 - nagisa:mir-constval-function, r=luqmanaSimonas Kazlauskas-36/+46
This moves back (essentially reverts #30265) into MIR-specific translation code, but keeps the funcition split out, since it is expected to eventually become recursive. Fixes https://github.com/rust-lang/rust/issues/29572 cc @oli-obk
2015-12-31Rollup merge of #30565 - michaelwoerister:opaque_encoder, r=brsonSimonas Kazlauskas-369/+1308
This PR changes the `emit_opaque` and `read_opaque` methods in the RBML library to use a space-efficient binary encoder that does not emit any tags and uses the LEB128 variable-length integer format for all numbers it emits. The space savings are nice, albeit a bit underwhelming, especially for dynamic libraries where metadata is already compressed. | RLIBs | NEW | OLD | |--------------|--------|-----------| |libstd | 8.8 MB | 10.5 MB | |libcore |15.6 MB | 19.7 MB | |libcollections| 3.7 MB | 4.8 MB | |librustc |34.0 MB | 37.8 MB | |libsyntax |28.3 MB | 32.1 MB | | SOs | NEW | OLD | |---------------|-----------|--------| | libstd | 4.8 MB | 5.1 MB | | librustc | 8.6 MB | 9.2 MB | | libsyntax | 7.8 MB | 8.4 MB | At least this should make up for the size increase caused recently by also storing MIR in crate metadata. Can this be a breaking change for anyone? cc @rust-lang/compiler
2015-12-31Rollup merge of #30365 - tamird:update-valgrind, r=pnkfelixSimonas Kazlauskas-55/+28
Since `darwin` is really `apple-darwin`, the valgrind-rpass tests were not actually being run with valgrind on mac before. Also, the `HOST` check was completely wrong. r? @alexcrichton
2015-12-31Auto merge of #30644 - tshepang:typo, r=steveklabnikbors-1/+1
2015-12-31Auto merge of #30593 - steveklabnik:small_rc_refactoring, r=Gankrobors-8/+11
This hairy conditional doesn't need to be so. It _does_ need to be a thin pointer, otherwise, it will fail to compile, so let's pull that out into a temporary for future readers of the source. /cc @nrc @SimonSapin @Gankro @durka , who brought this up on IRC
2015-12-31Auto merge of #30641 - tsion:match-range, r=eddybbors-23/+59
The previous version using `PartialOrd::le` was broken since it passed `T` arguments where `&T` was expected. It makes sense to use primitive comparisons since range patterns can only be used with chars and numeric types. r? @eddyb
2015-12-31Auto merge of #30598 - est31:macro_export_help_note, r=Manishearthbors-5/+44
The current help message is too much about "normal" macros to be used as general message. Keep it for normal macros, and add custom help and error messages for macro definitions.
2015-12-31Auto merge of #30586 - nagisa:mir-cast, r=arielb1bors-1/+433
I think that should pretty much conclude all of https://github.com/rust-lang/rust/issues/29576.
2015-12-31Auto merge of #30585 - Ms2ger:ExplicitSelfCategory, r=brsonbors-60/+59
2015-12-30Auto merge of #30375 - aaronkeen:issue_28777, r=eddybbors-10/+54
RESTRICTION_STMT_EXPR restriction to allow subsequent expressions to contain braces. https://github.com/rust-lang/rust/issues/28777
2015-12-30Merge pull request #30643 from dhuseby/snaps_2015-12-18-3391630Dave Huseby-0/+3
Fixes #30521 and #30627 by adding new snapshots edunham uploaded the snapshots.
2015-12-30Auto merge of #30467 - shahn:master, r=brsonbors-1/+74
This adds a constructor for a Weak that can never be upgraded. These are mostly useless, but for example are required when deserializing.
2015-12-30doc: missed these in a4da9acTshepang Lekhonkhobe-2/+2
2015-12-30doc: fix grammarTshepang Lekhonkhobe-2/+2
2015-12-30doc: fix typoTshepang Lekhonkhobe-1/+1
2015-12-30Small refactoring to make this code more clearSteve Klabnik-8/+11
This hairy conditional doesn't need to be so. It _does_ need to be a thin pointer, otherwise, it will fail to compile, so let's pull that out into a temporary for future readers of the source. Also, after a discussion with @pnkfelix and @gankro, we don't need these null checks anymore, as zero-on-drop has been gone for a while now.
2015-12-30Fixes #30521 and #30627 by adding new snapshotsDave Huseby-0/+3
2015-12-30Add test for MIR range matching.Scott Olson-0/+30
2015-12-30Use built-in comparisons for range matching in MIR.Scott Olson-23/+29
The previous version using `PartialOrd::le` was broken since it passed `T` arguments where `&T` was expected. It makes sense to use primitive comparisons since range patterns can only be used with chars and numeric types.
2015-12-30Auto merge of #30640 - steveklabnik:rollup, r=steveklabnikbors-52/+80
- Successful merges: #30373, #30502, #30511, #30546, #30556, #30620 - Failed merges:
2015-12-30Limit line length to below 100 charsest31-2/+4
2015-12-30Move pub-{item,methd}-macro.rs to the parse-fail subdir as wellest31-0/+0
2015-12-30Move pub-macro-rules.rs test to parse-fail directoryest31-0/+0
2015-12-30whitespace after colon, not beforeest31-1/+1
2015-12-30Custom help message for people trying to make macro publicest31-5/+42
The current help message is too much about "normal" macros to be used as general message. Keep it for normal macros, and add custom help and error messages for macro definitions.
2015-12-30Rollup merge of #30620 - salty-horse:an_mut, r=brsonSteve Klabnik-4/+4
As discussed in issue #30568.
2015-12-30Rollup merge of #30546 - tshepang:add-links, r=steveklabnikSteve Klabnik-15/+36
2015-12-30Rollup merge of #30511 - defyrlt:issue_30507, r=steveklabnikSteve Klabnik-10/+11
Resolves #30507 r? @steveklabnik
2015-12-30Rollup merge of #30502 - Luke-Nukem:master, r=steveklabnikSteve Klabnik-16/+16
Rewrite of a paragraph in in the `match` section. The colon `:` should be used only when the sentence preceeding it is a complete sentence. If this is not the case, then a `;` should be used; this denotes that the following fragment is a part of the previous fragment. I got a new bike; it has two wheels. (Similar to I got a new bike, it has two wheels) The ice cream truck has great flavours; blueberry, blackberry, berryberry. Writing a complete sentence: - with a list under it - You can join two sentences with it: Much like this. r? @steveklabnik
2015-12-30Rollup merge of #30373 - ChrisBuchholz:master, r=steveklabnikSteve Klabnik-7/+13
The current explanation for scan() is not very clear as to how it works, especially when it compares itself to fold(). I believe these changes makes it all a bit more clear for the reader, and makes it easier to understand the example code. r? @steveklabnik
2015-12-30Auto merge of #30526 - Ms2ger:PathParameters, r=brsonbors-35/+36
2015-12-30Refactor MIR building for arguments.Scott Olson-18/+14
2015-12-30Auto merge of #30542 - nrc:errs-base, r=nagisabors-1517/+2253
As discussed [here](https://internals.rust-lang.org/t/more-structured-errors/3005) r? @nikomatsakis or anyone else on the @rust-lang/compiler team
2015-12-30doc: add gravesTshepang Lekhonkhobe-23/+23
2015-12-30doc: add some links for io::stdioTshepang Lekhonkhobe-14/+35
2015-12-30Auto merge of #30458 - fhahn:fix-warnings-tests-stdlib, r=sanxiynbors-75/+81
This PR siliences some warnings when compiling stdlib with --test. Mostly remove some unused imports and added a few `#[allow(..)]`. I also marked some signal handling functions with `#[cfg(not(test))]`, because they are only called through `rt::lang_start`, which is also marked as `#[cfg(not(test))]`
2015-12-29Fix argument indices in MIR for closures.Scott Olson-1/+2
Previously, all references to closure arguments went to the argument before the one they should (e.g. to arg1 when it was supposed to be arg2). This was because the MIR builder did not account for the implicit arguments that come before the explicit arguments, and closures have one implicit argument - the struct containing the captures.
2015-12-30Rebasing and review commentsNick Cameron-35/+30