1. 05 4月, 2014 27 次提交
  2. 04 4月, 2014 13 次提交
    • B
      auto merge of #13301 : erickt/rust/remove-refcell-get, r=huonw · eae26527
      bors 提交于
      `RefCell::get` can be a bit surprising, because it actually clones the wrapped value. This removes `RefCell::get` and replaces all the users with `RefCell::borrow()` when it can, and `RefCell::borrow().clone()` when it can't. It removes `RefCell::set` for consistency. This closes #13182.
      
      It also fixes an infinite loop in a test when debugging is on.
      eae26527
    • B
      auto merge of #13298 : ckendell/rust/remove_managed_pointers_from_tutorial, r=cmr · 46e6194e
      bors 提交于
      Work on #13287 
      
      This is not ready for a merge yet, but I wanted to get some eyes on what I have done so far.
      
      As of right now, all references in the text to managed boxes or pointers are removed. Code associated with those specific sections of text have likewise been altered. I also removed all references to managed closures.
      
      There is a small change I would like to add to the work done in 3137cd5a, on the new lines 1495 and 1496, I would like to change those values to 10 and 20. I did the same in a later change on lines 1596 and 1508.
      
      There are still bits of sample code that use managed pointers and the sigil @. Those are next on my list to remove, but I wanted to have the outstanding changes reviewed first. The uses of @ in the code samples are a bit more embedded, and I will need to be more careful changing them as to not change the purpose of the code examples.
      
      I ensured that make check still passes, although I'm not sure if that actually tests the code in tutorial.md.
      
      One issues I ran into, and tried to avoid, was that `tutorial.md` is formatted with a nice column limit. I was unsure how this was enforced, so wherever I edited a line, I did my best to keep edits on the line they previously existed on. As such, the plain text of `tutorial.md` looks a bit strange as I've left it, and I will clean that up as suggested. The rendered markdown output should not be affected.
      46e6194e
    • B
      auto merge of #13295 : huonw/rust/gate-concat-idents, r=alexcrichton · 286b62e0
      bors 提交于
      rustc: feature-gate `concat_idents!`.
      
      concat_idents! is not as useful as it could be, due to macros only being
      allowed in limited places, and hygiene, so lets feature gate it until we
      make a decision about it.
      
      cc #13294
      286b62e0
    • B
      auto merge of #13291 : thestinger/rust/no_null, r=alexcrichton · 37a98854
      bors 提交于
      This was missed when dropping the null-termination from our string
      types. An explicit null byte can still be placed anywhere in a string if
      desired, but there's no reason to stick one at the end of every string
      constant.
      37a98854
    • H
      rustc: feature-gate `concat_idents!`. · 6c5e1d09
      Huon Wilson 提交于
      concat_idents! is not as useful as it could be, due to macros only being
      allowed in limited places, and hygiene, so lets feature gate it until we
      make a decision about it.
      
      cc #13294
      6c5e1d09
    • K
      [std::cmp] add missing docs and provide an example · 02c9c94d
      Kevin Cantu 提交于
      02c9c94d
    • B
      auto merge of #13207 : cmr/rust/attrib-reference, r=kballard · f819c219
      bors 提交于
      f819c219
    • C
      manual: fix a broken example · b727bb7f
      Corey Richardson 提交于
      b727bb7f
    • B
      auto merge of #13255 : alexcrichton/rust/issue-5605, r=huonw · 540c2a2a
      bors 提交于
      These syntax extensions need a place to be documented, and this starts passing a
      `--cfg dox` parameter to `rustdoc` when building and testing documentation in
      order to document macros so that they have no effect on the compiled crate, but
      only documentation.
      
      Closes #5605
      540c2a2a
    • C
      manual: refine ECMA-335 reference for attributes · 838a57ba
      Corey Richardson 提交于
      838a57ba
    • C
      manual: further attribute clarifications · d2648cc2
      Corey Richardson 提交于
      - Sort attributes lexicographically
      - Use new attribute syntax consistently
      - Fix wording describing new attribute syntax
      - Expand section on `repr`
      d2648cc2
    • C
      manual: fix attribute ebnf · a86d6b4c
      Corey Richardson 提交于
      a86d6b4c
    • C
      manual: update style · 13ac12db
      Corey Richardson 提交于
      13ac12db