GitHub PushEvent at 2014-04-19 04:12:20
Repository: rust
Actor: luqmana
Payload: {"shas":[["0cc257eb42c72d26a151623825ecc6a8074c53cf","60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcrichton.com","rustc: Run destructors when dest=Ignore\n\nPreviously, if statements of the form \"Foo;\" or \"let _ = Foo;\" were encountered\nwhere Foo had a destructor, the destructors were not run. This changes\nthe relevant locations in trans to check for ty::type_needs_drop and invokes\ntrans_to_lvalue instead of trans_into.\n\nCloses #4734\nCloses #6892","Alex Crichton",true],["3a709761a59fcbc6b279b4368d7a2bb3ab7226dc","e49f19fbbc9313b6d8b1340b8bed108ace34c014@c-plusplus.de","rust-mode cleanup.\n\n* Use `setq-local' instead of (set (make-local-variable ...) value).\n  Provides a version for older Emacsen.\n* Remove use of `cl.el'.\n* Use \\' in file regexp instead of line end match $.\n* Use type for defcustom and add parent group.","Rüdiger Sonderfeld",true],["13d6c35c56b4dfbfb0cd4775ef27a5cc38305591","1de44bb216b4f0b7f3e864dd9d3b6104a9b142ec@gmail.com","Collect move errors before reporting\n\nThis commit changes the way move errors are reported when some value is\ncaptured by a PatIdent. First, we collect all of the \"cannot move out\nof\" errors before reporting them, and those errors with the same \"move\nsource\" are reported together. If the move is caused by a PatIdent (that\nbinds by value), we add a note indicating where it is and suggest the\nuser to put `ref` if they don't want the value to move. This makes the\n\"cannot move out of\" error in match expression nicer (though the extra\nnote may not feel that helpful in other places :P). For example, with\nthe following code snippet,\n\n```rust\nenum Foo {\n    Foo1(~u32, ~u32),\n    Foo2(~u32),\n    Foo3,\n}\n\nfn main() {\n    let f = &Foo1(~1u32, ~2u32);\n    match *f {\n        Foo1(num1, num2) => (),\n        Foo2(num) => (),\n        Foo3 => ()\n    }\n}\n```\n\nErrors before the change:\n\n```rust\ntest.rs:10:9: 10:25 error: cannot move out of dereference of `&`-pointer\ntest.rs:10         Foo1(num1, num2) => (),\n                   ^~~~~~~~~~~~~~~~\ntest.rs:10:9: 10:25 error: cannot move out of dereference of `&`-pointer\ntest.rs:10         Foo1(num1, num2) => (),\n                   ^~~~~~~~~~~~~~~~\ntest.rs:11:9: 11:18 error: cannot move out of dereference of `&`-pointer\ntest.rs:11         Foo2(num) => (),\n                   ^~~~~~~~~\n```\n\nAfter:\n\n```rust\ntest.rs:9:11: 9:13 error: cannot move out of dereference of `&`-pointer\ntest.rs:9     match *f {\n                    ^~\ntest.rs:10:14: 10:18 note: attempting to move value to here (to prevent the move, you can use `ref num1` to capture value by reference)\ntest.rs:10         Foo1(num1, num2) => (),\n                        ^~~~\ntest.rs:10:20: 10:24 note: and here (use `ref num2`)\ntest.rs:10         Foo1(num1, num2) => (),\n                              ^~~~\ntest.rs:11:14: 11:17 note: and here (use `ref num`)\ntest.rs:11         Foo2(num) => (),\n                        ^~~\n```\n\nClose #8064","Kiet Tran",true],["ad66f56afd7fd3127d6991bd6078246a799573c0","a6cc2cef7d25f27847876bdb81651755fcebacf0@mozilla.com","doc: Add \"A 30-minute Introduction to Rust\"\n\nBy Steve Klabnik.","Brian Anderson",true],["6bacbcc32efee19f05da01fc9a9474657988485d","a6cc2cef7d25f27847876bdb81651755fcebacf0@mozilla.com","doc: Edit intro","Brian Anderson",true],["545d4718c8e1b9e69474165a1cb38d873627183d","60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcrichton.com","std: Make std::comm return types consistent\n\nThere are currently a number of return values from the std::comm methods, not\nall of which are necessarily completely expressive:\n\n  Sender::try_send(t: T) -> bool\n    This method currently doesn't transmit back the data `t` if the send fails\n    due to the other end having disconnected. Additionally, this shares the name\n    of the synchronous try_send method, but it differs in semantics in that it\n    only has one failure case, not two (the buffer can never be full).\n\n  SyncSender::try_send(t: T) -> TrySendResult<T>\n    This method accurately conveys all possible information, but it uses a\n    custom type to the std::comm module with no convenience methods on it.\n    Additionally, if you want to inspect the result you're forced to import\n    something from `std::comm`.\n\n  SyncSender::send_opt(t: T) -> Option<T>\n    This method uses Some(T) as an \"error value\" and None as a \"success value\",\n    but almost all other uses of Option<T> have Some/None the other way\n\n  Receiver::try_recv(t: T) -> TryRecvResult<T>\n    Similarly to the synchronous try_send, this custom return type is lacking in\n    terms of usability (no convenience methods).\n\nWith this number of drawbacks in mind, I believed it was time to re-work the\nreturn types of these methods. The new API for the comm module is:\n\n  Sender::send(t: T) -> ()\n  Sender::send_opt(t: T) -> Result<(), T>\n  SyncSender::send(t: T) -> ()\n  SyncSender::send_opt(t: T) -> Result<(), T>\n  SyncSender::try_send(t: T) -> Result<(), TrySendError<T>>\n  Receiver::recv() -> T\n  Receiver::recv_opt() -> Result<T, ()>\n  Receiver::try_recv() -> Result<T, TryRecvError>\n\nThe notable changes made are:\n\n* Sender::try_send => Sender::send_opt. This renaming brings the semantics in\n  line with the SyncSender::send_opt method. An asychronous send only has one\n  failure case, unlike the synchronous try_send method which has two failure\n  cases (full/disconnected).\n\n* Sender::send_opt returns the data back to the caller if the send is guaranteed\n  to fail. This method previously returned `bool`, but then it was unable to\n  retrieve the data if the data was guaranteed to fail to send. There is still a\n  race such that when `Ok(())` is returned the data could still fail to be\n  received, but that's inherent to an asynchronous channel.\n\n* Result is now the basis of all return values. This not only adds lots of\n  convenience methods to all return values for free, but it also means that you\n  can inspect the return values with no extra imports (Ok/Err are in the\n  prelude). Additionally, it's now self documenting when something failed or not\n  because the return value has \"Err\" in the name.\n\nThings I'm a little uneasy about:\n\n* The methods send_opt and recv_opt are not returning options, but rather\n  results. I felt more strongly that Option was the wrong return type than the\n  _opt prefix was wrong, and I coudn't think of a much better name for these\n  methods. One possible way to think about them is to read the _opt suffix as\n  \"optionally\".\n\n* Result<T, ()> is often better expressed as Option<T>. This is only applicable\n  to the recv_opt() method, but I thought it would be more consistent for\n  everything to return Result rather than one method returning an Option.\n\nDespite my two reasons to feel uneasy, I feel much better about the consistency\nin return values at this point, and I think the only real open question is if\nthere's a better suffix for {send,recv}_opt.\n\nCloses #11527","Alex Crichton",true],["b945573e299e1e8b9d24759bb447d9bd1e88ec82","cca99684d893888d01a53127bf515d97ac84478d@exyr.org","liblog doc: Fix apparent search-and-replace errors","Simon Sapin",true],["0ac532686f0134d28602fdb01d7fe128bc2f498e","7b617481dc67255f8ac089bf33cb7fadcdc5dda1@gmail.com","syntax: remove ast::Sigil.","Eduard Burtescu",true],["9351c01b3576f32206b80b32a03b66be66f18b39","7b617481dc67255f8ac089bf33cb7fadcdc5dda1@gmail.com","rustdoc: fix fallout from removing ast::Sigil.","Eduard Burtescu",true],["402d946868c4d775eebd29b4e13d3897f5cc2d47","7b617481dc67255f8ac089bf33cb7fadcdc5dda1@gmail.com","rustc: fix fallout from removing ast::Sigil and use ty::TraitStore in ty::ClosureTy.","Eduard Burtescu",true],["f0c0c2ae91061a2b6041658a6e406c757e4e5483","7b617481dc67255f8ac089bf33cb7fadcdc5dda1@gmail.com","rustc: remove proc -> once || coercions.","Eduard Burtescu",true],["9d570ad8c16970e1b2f629d224716f2d7a8b7820","7b617481dc67255f8ac089bf33cb7fadcdc5dda1@gmail.com","rustc: remove the last mentions of @fn.","Eduard Burtescu",true],["c60d9ad57c1d409a0737838eefe82da0eeb9a9ec","60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcrichton.com","mk: Fix rpath on cross compile builds\n\nAfter removing absolute rpaths, cross compile builds (notably the nightly\nbuilders) broke. This is because the RPATH was pointing at an empty directory\nbecause only the rustc binary is copied over, not all of the target libraries.\nThis modifies the cross compile logic to fixup the rpath of the stage0\ncross-compiled rustc to point to where it came from.","Alex Crichton",true],["e6072fa0c4c22d62acf3dcb78c8ee260a1368bd7","60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcrichton.com","rustc: Deterministically link upstream C libraries\n\nPreviously, upstream C libraries were linked in a nondeterministic fashion\nbecause they were collected through iter_crate_data() which is a nodeterministic\ntraversal of a hash map. When upstream rlibs had interdependencies among their\nnative libraries (such as libfoo depending on libc), then the ordering would\noccasionally be wrong, causing linkage to fail.\n\nThis uses the topologically sorted list of libraries to collect native\nlibraries, so if a native library depends on libc it just needs to make sure\nthat the rust crate depends on liblibc.","Alex Crichton",true],["d1e20488a5d1258b1582caa2db77e5210b8bd28f","7b3ae16b13baf2c98b283b3d77c80865a6e39eeb@gmail.com","Parameterize contains_nul for BytesContainer.","Kevin Butler",true],["9b9ad9b741bcab9669b9a64dd8004382290dfa47","7b3ae16b13baf2c98b283b3d77c80865a6e39eeb@gmail.com","Simplify GenericPath::set_extension.","Kevin Butler",true],["ecc774f788ca3880ce76e4b87ac0d21a3a16d3ae","3a2c29237f73c7cf88424b80e427b1884f346b35@rust-lang.org","auto merge of #13395 : Ryman/rust/bytecontainer_impl_container, r=alexcrichton\n\nAlso some minor cleanup in Path related to this.","bors",true],["7a82d478a3c9301eda4453ec222842f750e13630","60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcrichton.com","std: Fix iteration over vectors of 0-size values\n\nPreviously, all slices derived from a vector whose values were of size 0 had a\nnull pointer as the 'data' pointer on the slice. This caused first pointer to be\nyielded during iteration to always be the null pointer. Due to the null pointer\noptimization, this meant that the first return value was None, instead of\nSome(&T).\n\nThis commit changes slice construction from a Vec instance to use a base pointer\nof 1 if the values have zero size. This means that the iterator will never\nreturn null, and the iteration will proceed appropriately.\n\nCloses #13467","Alex Crichton",true],["e011939b1af554d2a29947feb66f01e27a2a1524","ffbcc695a1ffccd9c63cb1f8bda5fe8d25efe036@mozilla.com","Implement Char::encode_utf16\n\nAnd clean up encode_utf8 a bit.","Keegan McAllister",true],["58fc85db93bf6c73c4da957db8c6b8b025826e93","ffbcc695a1ffccd9c63cb1f8bda5fe8d25efe036@mozilla.com","Add tests for Char::encode_utf{8,16}","Keegan McAllister",true]],"size":180,"ref":"refs/heads/master","head":"af24045ff0e17764524a9eaf243479a3260c2d8b"}