about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2016-06-11run rustfmt on libstd/collections/hash folderSrinivas Reddy Thatiparthy-167/+178
2016-06-10Auto merge of #34200 - sanxiyn:rollup, r=sanxiynbors-256/+341
Rollup of 12 pull requests - Successful merges: #34088, #34129, #34136, #34145, #34146, #34148, #34159, #34160, #34165, #34175, #34184, #34185 - Failed merges:
2016-06-10Rollup merge of #34185 - tshepang:shorten-paragraph, r=steveklabnikSeo Sanghyeon-2/+4
doc: intro should be 1 sentence Also, do not repeat name of type
2016-06-10Rollup merge of #34175 - rwz:patch-2, r=alexcrichtonSeo Sanghyeon-1/+1
Fix BTreeMap example typo The whole example is made around movies reviews, but that one line says "review some books".
2016-06-10Rollup merge of #34165 - ollie27:docs_char_case, r=steveklabnikSeo Sanghyeon-9/+15
docs: Improve char::to_{lower,upper}case examples Collect the results to a String to make it clear that it will not always return only one char and add examples showing that. r? @steveklabnik
2016-06-10Rollup merge of #34160 - hoodie:bug/GoT_References, r=GuillaumeGomezSeo Sanghyeon-4/+4
Fixed two little Game Of Thrones References Fixed: conflicting spelling of "Jon Snow" Fixed: It's call "Night's Watch"
2016-06-10Rollup merge of #34148 - srinivasreddy:bitflags_rustfmt, r=nagisaSeo Sanghyeon-2/+2
run rustfmt on librustc_bitflags folder
2016-06-10Rollup merge of #34146 - srinivasreddy:libflate_rustfmt, r=nagisaSeo Sanghyeon-5/+5
run rustfmt on libflate folder
2016-06-10Rollup merge of #34145 - matklad:any-docs, r=steveklabnikSeo Sanghyeon-1/+1
docs: simplify wording It took me more then a moment to decipher "with no non-`'static`" thing :) "`'static` type" should say the same thing more clearly. r? @steveklabnik
2016-06-10Rollup merge of #34136 - imjacobclark:ice-test-case-25579, r=nikomatsakisSeo Sanghyeon-0/+27
Test case for borrowk ICE #25579 r? @nikomatsakis Fixes #25579
2016-06-10Rollup merge of #34129 - jviide:from-string-box-error, r=steveklabnikSeo Sanghyeon-12/+8
Remove a gotcha from book/error-handling.md The book's "Error handling with `Box<Error>`" section talks about `Box<Error>`. In the actual example `Box<Error + Send + Sync>` is used instead so that the corresponding From impls could be used to convert a plain string to an error type. Rust 1.7 added support for conversion from `&str`/`String` to `Box<Error>`, so this gotcha and later references to it can now be removed. r? @steveklabnik
2016-06-10Rollup merge of #34088 - srinivasreddy:rustfmt_map.rs, r=nrcSeo Sanghyeon-220/+274
run rustfmt on map.rs in libcollections/btree folder
2016-06-10Auto merge of #34178 - shepmaster:llvm-3.7-and-up, r=alexcrichtonbors-224/+5
Reflect supporting only LLVM 3.7+ in the LLVM wrappers Based on 12abddb06b681f5c1cb389074b5a35d3e260698f, it appears we can drop support for these older LLVM versions. Hopefully, this will make it slightly easier to support the changes needed for LLVM 3.9. r? @nagisa /cc @brson
2016-06-10Auto merge of #34086 - srinivasreddy:rustfmt_liballoc_jemalloc, r=nagisabors-14/+26
run rustfmt on liballoc_jemalloc folder
2016-06-09Auto merge of #34046 - Vtec234:fix-atomic-doc, r=steveklabnikbors-3/+3
Fix wrong statement in compare_exchange doc The documentation for `core::sync::atomic::AtomicSomething::compare_exchange` contains a wrong, or imprecise, statement about the return value. It goes: The return value is a result indicating whether the new value was written and containing the previous value. On success this value is guaranteed to be equal to `new`. In the second sentence, `this value` is gramatically understood as referring to `return value` from the first sentence. Due to how CAS works, the returned value is always what was in the atomic variable _before_ the operation occurred, not what was written into it during the operation. Hence, the fixed doc should say: The return value is a result indicating whether the new value was written and containing the previous value. On success this value is guaranteed to be equal to `current`. This version is confirmed by the runnable examples in variants of `AtomicSomething`, e.g. assert_eq!(some_bool.compare_exchange(true, false, Ordering::Acquire, Ordering::Relaxed), Ok(true)); where the returned value is `Ok(current)`. This PR fixes all occurrences of this bug I could find. An alternative solution would be to modify the second sentence so that it refers to the value _written_ into the Atomic rather than what was there before, in which case it would be correct. Example alternative formulation: On success the value written into the `bool`/`usize`/`whatever` is guaranteed to be equal to `new`. r? @steveklabnik
2016-06-09Auto merge of #34173 - srinivasreddy:rm_redundant, r=alexcrichtonbors-16/+14
remove redundant assert statements
2016-06-10Address review comments + fix rebaseVadim Petrochenkov-167/+51
2016-06-10make all pattern bindings with the same name resolve to the first oneAriel Ben-Yehuda-77/+22
This simplifies the code considerably, removing one of the last uses of hygienic matching out of resolution.
2016-06-10Add testsVadim Petrochenkov-1/+56
2016-06-10Introduce TyCtxt::expect_def/expect_resolution helpers and use them where ↵Vadim Petrochenkov-473/+277
possible
2016-06-10Move the hack with fake partial resolution for <A>::B from typeck to resolveVadim Petrochenkov-105/+40
2016-06-10resolve: Rewrite resolve_patternVadim Petrochenkov-483/+339
2016-06-09doc: intro should be 1 sentenceTshepang Lekhonkhobe-2/+4
Also, do not repeat name of type
2016-06-09Remove unneeded indirection of GET_ARCHIVEJake Goulding-2/+1
2016-06-09Reflect supporting only LLVM 3.7+ in the LLVM wrappersJake Goulding-222/+4
2016-06-09Auto merge of #34149 - arielb1:remove-remove-dead-blocks, r=nikomatsakisbors-942/+1262
MIR cleanups and predecessor cache This PR cleans up a few things in MIR and adds a predecessor cache to allow graph algorithms to be run easily. r? @nikomatsakis
2016-06-09fix issuesAriel Ben-Yehuda-2/+10
2016-06-09Auto merge of #33895 - AndrewBrinker:master, r=steveklabnikbors-137/+114
Rewrote "How Safe and Unsafe Interact" Nomicon chapter. The previous version of the chapter covered a lot of ground, but was a little meandering and hard to follow at times. This draft is intended to be clearer and more direct, while still providing the same information as the previous version. r? @steveklabnik
2016-06-09use the type name as the pass nameAriel Ben-Yehuda-27/+12
2016-06-09refactor simplify_cfg and split off simplify_branchesAriel Ben-Yehuda-133/+194
2016-06-09add hook infrastructure for automatically dumping MIR on every passAriel Ben-Yehuda-30/+152
2016-06-09introduce an `unreachable` terminatorAriel Ben-Yehuda-92/+37
Use it instead of a `panic` for inexhaustive matches and correct the comment. I think we trust our match-generation algorithm enough to generate these blocks, and not generating an `unreachable` means that LLVM won't optimize `match void() {}` to an `unreachable`.
2016-06-09add a cache for MIR predecessorsAriel Ben-Yehuda-21/+93
2016-06-09make the basic_blocks field privateAriel Ben-Yehuda-200/+203
2016-06-09introduce the type-safe IdxVec and use it instead of loose indexesAriel Ben-Yehuda-437/+594
2016-06-09Auto merge of #34109 - pnkfelix:fix-issue-34101, r=arielb1bors-28/+103
Fix issue #34101 Fix issue #34101: do not track subcontent of type with dtor nor gather flags for untracked content. (Includes a regression test, which needed to go into `compile-fail/` due to weaknesses when combining `#[deny(warnings)]` with `tcx.sess.span_warn(..)`)
2016-06-09merge the RemoveDeadBlocks pass into the SimplifyCfg passAriel Ben-Yehuda-103/+70
2016-06-09Auto merge of #34108 - jseyfried:refactor_prelude_injection, r=nrcbors-173/+98
Refactor away the prelude injection fold Instead, just inject `#[prelude_import] use [core|std]::prelude::v1::*;` at the crate root while injecting `extern crate [core|std];` and process `#[no_implicit_prelude]` attributes in `resolve`. r? @nrc
2016-06-08Auto merge of #34032 - jseyfried:load_macros_in_expansion, r=nrcbors-97/+99
Support `#[macro_use]` on macro-expanded crates This PR loads macros from `#[macro_use]` crates during expansion so that - macro-expanded `#[macro_use]` crates work (fixes #33936, fixes #28071), and - macros imported from crates have the same scope as macros imported from modules. This is a [breaking-change]. For example, this will break: ```rust macro_rules! m { () => { #[macro_use(foo)] extern crate core; } //~ ERROR imported macro not found } m!(); ``` Also, this will break: ```rust macro_rules! try { () => {} } // #[macro_use] mod bar { macro_rules! try { ... } } //< ... just like this would ... fn main() { try!(); } //< ... making this an error ``` r? @nrc
2016-06-08Fix BTreeMap example typoPavel Pravosud-1/+1
The whole example is made around movies reviews, but that one line says "review some books".
2016-06-09clean up for test casesSrinivas Reddy Thatiparthy-14/+14
2016-06-09remove redundant assert statementsSrinivas Reddy Thatiparthy-2/+0
2016-06-08Auto merge of #32202 - arielb1:slice-patterns, r=nikomatsakisbors-729/+931
Implement RFC495 semantics for slice patterns non-MIR translation is still not supported for these and will happily ICE. This is a [breaking-change] for many uses of slice_patterns. [RFC 495 text](https://github.com/rust-lang/rfcs/blob/master/text/0495-array-pattern-changes.md)
2016-06-09Add comment and clean up `expand_annotatable`Jeffrey Seyfried-8/+8
2016-06-09Add regression testJeffrey Seyfried-0/+19
2016-06-09Load macros from `extern crate`s during expansion.Jeffrey Seyfried-90/+73
2016-06-08Auto merge of #34167 - eddyb:fix-pairs-for-real, r=nikomatsakisbors-4/+20
trans: don't misuse C_nil for ZSTs other than (). `C_nil` is actually `C_null` for `()` so `TempRef::new_operand` was treating all ZSTs as `()`. This should allow running Servo with `RUSTFLAGS=-Zorbit`, assuming there are no other bugs.
2016-06-09fix Cargo.lockAriel Ben-Yehuda-2/+0
2016-06-09use the slice_pat hack in libstd tooAriel Ben-Yehuda-18/+21
2016-06-09remove residual slice pattern junk from mem_categorizationAriel Ben-Yehuda-76/+10