1. 07 2月, 2015 1 次提交
    • S
      sed -i option isn't portable · 04b7976c
      Sébastien Marie 提交于
      the sed option `--in-place` (or `-i`) is a GNU extension, and it is not
      portable to BSD system (openbsd and freebsd checked).
      
      use an alternate construction in order to keep the semantic.
      04b7976c
  2. 06 2月, 2015 18 次提交
    • B
      Auto merge of #21962 - vrinek:printable-book, r=steveklabnik · 0b56e9b1
      bors 提交于
      Tested on:
      
      * Safari on OSX
      * Firefox on OSX
      0b56e9b1
    • B
      Auto merge of #21609 - GarrettHeel:master, r=steveklabnik · f3573aa8
      bors 提交于
      Now that it's no longer feature gated, add docs for wildcard syntax.
      f3573aa8
    • B
      Auto merge of #21947 - bluss:full-range-syntax, r=brson · 715f9a5e
      bors 提交于
      Implement step 1 of rust-lang/rfcs#702
      
      Allows the expression `..` (without either endpoint) in general, can be
      used in slicing syntax `&expr[..]` where we previously wrote `&expr[]`.
      
      The old syntax &expr[] is not yet removed or warned for.
      715f9a5e
    • B
      Auto merge of #21619 - brson:featureck-tidy, r=alexcrichton · 706be5ba
      bors 提交于
      Builds on my [feature staging PR](https://github.com/rust-lang/rust/pull/21248) to clean up the tidy scripts a bit, and make them much faster (6s vs ~40s).
      
      Adds make rules 'tidy-basic', 'tidy-binaries', 'tidy-errors' and 'tidy-features'.
      
      This is the output of `make tidy` here:
      
      ```
      cfg: version 1.0.0-dev (a8c878d41 2015-01-25 01:49:14 -0800)
      cfg: build triple x86_64-unknown-linux-gnu
      cfg: host triples x86_64-unknown-linux-gnu
      cfg: target triples x86_64-unknown-linux-gnu
      cfg: host for x86_64-unknown-linux-gnu is x86_64
      cfg: os for x86_64-unknown-linux-gnu is unknown-linux-gnu
      cfg: good valgrind for x86_64-unknown-linux-gnu is 1
      cfg: using CC=gcc (CFG_CC)
      cfg: enabling valgrind run-pass tests (CFG_ENABLE_VALGRIND_RPASS)
      cfg: valgrind-rpass command set to "/usr/bin/valgrind" --error-exitcode=100 --soname-synonyms=somalloc=NONE --quiet --suppressions=/home/brian/dev/rust3/src/etc/x86.supp  --tool=memcheck --leak-check=full
      cfg: no lualatex found, deferring to xelatex
      cfg: no xelatex found, deferring to pdflatex
      cfg: no pdflatex found, disabling LaTeX docs
      cfg: no pandoc found, omitting PDF and EPUB docs
      cfg: including test rules
      cfg: javac not available, skipping lexer test...
      check: formatting
      
      * linted .rs files: 4948
      * linted .py files: 27
      * linted .js files: 2
      * linted .sh files: 5
      * linted .pl files: 0
      * linted .c files: 28
      * linted .h files: 3
      * other linted files: 0
      * total lines of code: 481217
      * total non-blank lines of code: 423682
      
      check: binaries
      check: extended errors
      
      * 249 error codes
      * highest error code: E0315
      
      check: feature sanity
      
      * advanced_slice_patterns         lang    unstable    None    
      * alloc                           lib     unstable    None    
      * asm                             lang    unstable    None    
      * associated_types                lang    stable      1.0.0   
      * box_syntax                      lang    unstable    None    
      * collections                     lib     unstable    None    
      * concat_idents                   lang    unstable    None    
      * core                            lib     unstable    None    
      * default_type_params             lang    stable      1.0.0   
      * globs                           lang    stable      1.0.0   
      * hash                            lib     unstable    None    
      * if_let                          lang    stable      1.0.0   
      * import_shadowing                lang    unstable    None    
      * int_uint                        lang    unstable    None    
      * intrinsics                      lang    unstable    None    
      * io                              lib     unstable    None    
      * issue_5723_bootstrap            lang    stable      1.0.0   
      * lang_items                      lang    unstable    None    
      * link_args                       lang    unstable    None    
      * link_llvm_intrinsics            lang    unstable    None    
      * linkage                         lang    unstable    None    
      * log_syntax                      lang    unstable    None    
      * macro_rules                     lang    stable      1.0.0   
      * main                            lang    unstable    None    
      * managed_boxes                   lang    unstable    None    
      * non_ascii_idents                lang    unstable    None    
      * old_impl_check                  lang    unstable    None    
      * old_orphan_check                lang    unstable    None    
      * on_unimplemented                lang    unstable    None    
      * opt_out_copy                    lang    unstable    None    
      * optin_builtin_traits            lang    unstable    None    
      * os                              lib     unstable    None    
      * path                            lib     unstable    None    
      * phase                           lang    unstable    None    
      * plugin                          lang    unstable    None    
      * plugin_registrar                lang    unstable    None    
      * quad_precision_float            lang    unstable    None    
      * quote                           lang    unstable    None    
      * rand                            lib     unstable    None    
      * rust1                           lib     stable      1.0.0   
      * rustc_diagnostic_macros         lang    unstable    None    
      * rustc_private                   lib     unstable    None    
      * rustdoc                         lib     unstable    None    
      * simd                            lang    unstable    None    
      * simd_ffi                        lang    unstable    None    
      * slicing_syntax                  lang    unstable    None    
      * staged_api                      lang    unstable    None    
      * start                           lang    unstable    None    
      * std_misc                        lib     unstable    None    
      * struct_inherit                  lang    unstable    None    
      * struct_variant                  lang    stable      1.0.0   
      * test                            lib     unstable    None    
      * test_accepted_feature           lang    stable      1.0.0   
      * test_removed_feature            lang    unstable    None    
      * thread_local                    lang    unstable    None    
      * trace_macros                    lang    unstable    None    
      * tuple_indexing                  lang    stable      1.0.0   
      * unboxed_closures                lang    unstable    None    
      * unicode                         lib     unstable    None    
      * unsafe_destructor               lang    unstable    None    
      * visible_private_types           lang    unstable    None    
      * while_let                       lang    stable      1.0.0   
      ```
      
      There's a lot of informational output now, which comes after things like 'NOTE's.
      706be5ba
    • B
      Tidy fixes · d0e82a68
      Brian Anderson 提交于
      d0e82a68
    • B
      Address review feedback · 3454c504
      Brian Anderson 提交于
      3454c504
    • B
      1364919b
    • B
      testparser has long lines · 68ddd732
      Brian Anderson 提交于
      68ddd732
    • B
      mk: Add version number to output. Useful for logs · 4368f616
      Brian Anderson 提交于
      4368f616
    • B
      mk: Add tidy commands to 'make tips' · 62c90fc6
      Brian Anderson 提交于
      62c90fc6
    • B
      mk: Remove redundant valgrind notices in build · 29be9381
      Brian Anderson 提交于
      29be9381
    • B
      Clean up tidy scripts, coverage, performance · 290b79c1
      Brian Anderson 提交于
      This restructures tidy.py to walk the tree itself,
      and improves performance considerably by not loading entire
      files into buffers for licenseck.
      
      Splits build rules into 'tidy', 'tidy-basic', 'tidy-binaries',
      'tidy-errors', 'tidy-features'.
      290b79c1
    • B
      Polish errorck and featureck UI · 0e16ad8c
      Brian Anderson 提交于
      0e16ad8c
    • B
      mk: Split tidy into multiple tidy rules · 1ce86651
      Brian Anderson 提交于
      * tidy - runs all tidy scripts
      * tidy-basic - tidy.rs
      * tidy-binaries - check-binaries.py
      * tidy-errors - errorck.py
      * tidy-features - featureck.py
      1ce86651
    • B
      Auto merge of #21894 - dotdash:assume_rc, r=alexcrichton · 99f6206c
      bors 提交于
      This is half of what @Aatch implemented in #21418. The non-null assumption is later canonicalized to !nonnull metadata and doesn't cause any slowdowns (in fact the build is slightly faster with this change). I left out the other half of #21418 because that still causes a ~16% increase in compile times (30m -> 35m).
      99f6206c
    • B
      Auto merge of #21916 - japaric:no-as-slice, r=alexcrichton · 189930fc
      bors 提交于
      r? @alexcrichton 
      cc @EddyB 
      189930fc
    • J
      17bc7d8d
    • U
      Implement pretty-printing of `..` and update tests. · 7d527fa9
      Ulrik Sverdrup 提交于
      Update tests to change all `&expr[]` to `&expr[..]` to make sure pretty printing
      passes.
      7d527fa9
  3. 05 2月, 2015 11 次提交
  4. 04 2月, 2015 10 次提交
    • B
      Auto merge of #21544 - P1start:mangle-unicode, r=alexcrichton · 3ae76d5c
      bors 提交于
      `{` and `}` aren’t valid characters on ARM, so this makes Unicode characters render as, e.g., `$u38d$` instead of `$u{38d}`.
      
      This also fixes a small bug where `)` (**r**ight **p**arenthesis) and `*` (**r**aw **p**ointer) would both mangle to `$RP$`, making `)` show up as `*` in backtraces.
      3ae76d5c
    • B
      Auto merge of #21499 - P1start:issue-8706, r=huonw · ac134f7c
      bors 提交于
      Closes #8706.
      ac134f7c
    • B
      Auto merge of #21892 - huonw:deprecate-rand, r=alexcrichton · c3e1f772
      bors 提交于
      Use [`rand`](https://crates.io/crates/rand) and [`derive_rand`](https://crates.io/crates/derive_rand) from crates.io.
      
      [breaking-change]
      c3e1f772
    • B
      Auto merge of #21919 - alexcrichton:rollup, r=alexcrichton · d6c15d9b
      bors 提交于
      d6c15d9b
    • A
      Test fixes and rebase conflicts · 70ecd8ed
      Alex Crichton 提交于
      70ecd8ed
    • A
      rollup merge of #21910: Manishearth/missing_stability · d0029a47
      Alex Crichton 提交于
      Currently, if a `#![staged_api]` crate contains an exported item without a stability marker (or inherited stability),
      the item is useless.
      
      This change introduces a check to ensure that all exported items have a defined stability.
      
      it also introduces the `unmarked_api` feature, which lets users import unmarked features. While this PR should in theory forbid these from existing,
      in practice we can't be so sure; so this lets users bypass this check instead of having to wait for the library and/or compiler to be fixed (since otherwise this is a hard error).
      
      r? @aturon
      d0029a47
    • A
      rollup merge of #21907: alexcrichton/iter-by-ref · 9db593c9
      Alex Crichton 提交于
      This removes the `ByRef` iterator adaptor to stay in line with the changes to
      `std::io`. The `by_ref` method instead just returns `&mut Self`.
      
      This also removes the implementation of `Iterator for &mut Iterator` and instead
      generalizes it to `Iterator for &mut I` where `I: Iterator + ?Sized`. The
      `Box<I>` implementations were also updated.
      9db593c9
    • A
      rollup merge of #21899: nikomatsakis/closure-unify-anyhow · 74f7e069
      Alex Crichton 提交于
      This *almost* completes the job for #16440. The idea is that even if we do not know whether some closure type `C` implements `Fn` or `FnMut` (etc), we still know its argument and return types. So if we see an obligation `C : Fn(_0)`, we can unify `_0` with those argument types while still considering the obligation ambiguous and unsatisfied. This helps to make a lot of progress with type inference even before closure kind inference is done.
      
      As part of this PR, the explicit `:` syntax is removed from the AST and completely ignored. We still infer the closure kind based on the expected type if that is available. There are several reasons for this. First, deciding the closure kind earlier is always better, as it allows us to make more progress. Second, this retains a (admittedly obscure) way for users to manually specify the closure kind, which is useful for writing tests if nothing else. Finally, there are still some cases where inference can fail, so it may be useful to have this manual override. (The expectation is that we will eventually revisit an explicit syntax for specifying the closure kind, but it will not be `:` and may be some sort of generalization of the `||` syntax to handle other traits as well.)
      
      This commit does not *quite* fix #16640 because a snapshot is still needed to enable the obsolete syntax errors for explicit `&mut:` and friends.
      
      r? @EddyB as he reviewed the prior patch in this direction
      74f7e069
    • A
      rollup merge of #21897: dotdash/rposition · 1d921f55
      Alex Crichton 提交于
      The extra check caused by the expect() call can, in general, not be
      optimized away, because the length of the iterator is unknown at compile
      time, causing a noticable slow-down. Since the check only triggers if
      the element isn't actually found in the iterator, i.e. it isn't
      guaranteed to trigger for ill-behaved ExactSizeIterators, it seems
      reasonable to switch to an implementation that doesn't need the check
      and just always returns None if the value isn't found.
      
      Benchmark:
      ````rust
      let v: Vec<u8> = (0..1024*65).map(|_| 0).collect();
      b.iter(|| {
          v.as_slice().iter().rposition(|&c| c == 1)
      });
      ````
      
      Before:
      ````
      test rposition  ... bench:     49939 ns/iter (+/- 23)
      ````
      
      After:
      ````
      test rposition  ... bench:     33306 ns/iter (+/- 68)
      ````
      1d921f55
    • A
      rollup merge of #21893: vhbit/ios-build-fix · 61b2f3a4
      Alex Crichton 提交于
      61b2f3a4