Commit Graph

28635 Commits

Author SHA1 Message Date
bors
59569397fb auto merge of #13921 : TeXitoi/rust/shootout-spectralnorm-tweaks, r=alexcrichton
- using libgreen to optimize CPU usage
- less tasks to limit wasted resources

Here, on a one core 2 threads CPU, new version is ~1.2 faster.  May
be better with more core.
2014-05-04 12:06:50 -07:00
Virgile Andreani
169a57ee8d Remove two useless comparisons
according to the updated type_limits lint.
2014-05-04 20:48:16 +02:00
Virgile Andreani
0e8e0b2ede Add missing cases to the type_limits lint
and exhaustive testing for the `u8` type.
2014-05-04 20:42:45 +02:00
bors
d8e5d2712c auto merge of #13920 : Ryman/rust/inner_attr_doc, r=alexcrichton
Also updated the comment for `parse_inner_attrs_and_next` and removed extra whitespace on line endings.
2014-05-04 10:41:48 -07:00
Daniel Micay
f62c753b8f add back noalias to &mut T pointer parameters
This was removed because these could alias with `&const T` or `@mut T`
and those are now gone from the language. There are still aliasing
issues within local scopes, but this is correct for function parameters.

This also removes the no-op `noalias` marker on proc (not a pointer) and
leaves out the mention of #6750 because real type-based alias analysis
is not within the scope of best effort usage of the `noalias` attribute.

Test case:

    pub fn foo(x: &mut &mut u32) {
        **x = 5;
        **x = 5;
    }

Before:

    define void @_ZN3foo20h0ce94c9671b0150bdaa4v0.0E(i32** nocapture readonly) unnamed_addr #0 {
    entry-block:
      %1 = load i32** %0, align 8
      store i32 5, i32* %1, align 4
      %2 = load i32** %0, align 8
      store i32 5, i32* %2, align 4
      ret void
    }

After:

    define void @_ZN3foo20h0ce94c9671b0150bdaa4v0.0E(i32** noalias nocapture readonly) unnamed_addr #0 {
    entry-block:
      %1 = load i32** %0, align 8
      store i32 5, i32* %1, align 4
      ret void
    }

Closes #12436
2014-05-04 12:41:14 -04:00
bors
922c420fcd auto merge of #13916 : TeXitoi/rust/shootout-mandelbrot-rewrite, r=pcwalton
- removed warning
- improved performances
- parallelization
2014-05-04 08:26:47 -07:00
bors
1c9b77643c auto merge of #13915 : nick29581/rust/rslt, r=luqmana 2014-05-04 07:01:48 -07:00
bors
9c1761d0ab auto merge of #13908 : pcwalton/rust/box-pattern, r=alexcrichton
r? @alexcrichton
2014-05-04 05:36:49 -07:00
bors
de99da3fa5 auto merge of #13898 : nikomatsakis/rust/type-bounds-b, r=acrichto
This is needed to bootstrap fix for #5723.
2014-05-04 03:41:50 -07:00
bors
0f9a74fea4 auto merge of #13391 : smesseim/rust/apache-copyright, r=alexcrichton
The years of copyright and the name of the copyright holder were not
present in the notice.

The Apache license was added to the project in 2012, so 2012 is the
starting year. The copyright holder is the Mozilla Foundation (taken
from the MIT license).
2014-05-04 02:16:50 -07:00
bors
1f25c8b78d auto merge of #13895 : adrientetar/rust/js-escape, r=alexcrichton
See #13884 for the details. Closes #13884.

r? @alexcrichton
2014-05-04 00:51:50 -07:00
Niko Matsakis
92b741aad4 Skip pretty printing for the regions bound test 2014-05-03 22:05:21 -04:00
Gary M. Josack
9246682b06 Remove/Update dead links on Tasks guide. 2014-05-03 18:39:52 -07:00
Alex Crichton
d7891c7c0e rustdoc: Turn the noise down on implemented traits
This commit removes the inherited documentation from type pages. This generally
just clutters up the page when you can click through to the trait itself to get
all the meaty documentation.

Closes #11991
2014-05-03 17:36:20 -07:00
Alex Crichton
4d2877c189 doc: Remove latex math documentation
This hasn't worked since pandoc stopped being used. We can get by well enough
with the superscript extension for these equations.

Closes #12989
2014-05-03 17:36:20 -07:00
Alex Crichton
15856139e4 rustdoc: Enable the footnote markdown extension
This enables hoedown's footnote extension, and fixes all footnotes in the
reference manual to use the new syntax.
2014-05-03 17:36:20 -07:00
Alex Crichton
9306e840f5 rustdoc: Migrate from sundown to hoedown
This primary fix brought on by this upgrade is the proper matching of the ```
and ~~~ doc blocks. This also moves hoedown to a git submodule rather than a
bundled repository.

Additionally, hoedown is stricter about code blocks, so this ended up fixing a
lot of invalid code blocks (ending with " ```" instead of "```", or ending with
"~~~~" instead of "~~~").

Closes #12776
2014-05-03 17:36:20 -07:00
bors
afed55b99b auto merge of #13906 : alexcrichton/rust/issue-13620, r=luqmana
This ensures that private functions exported through static initializers will
actually end up being public in the object file (so other objects can continue
to reference the function).

Closes #13620
2014-05-03 15:56:51 -07:00
Ali Smesseim
90ba013bde Change the licence holder to The Rust Project Developers
The copyright of this project belongs to The Rust Project Developers,
who are mentioned in AUTHORS.txt.
2014-05-03 23:59:24 +02:00
Guillaume Pinot
2acab61377 shootout-spectralnorm tweaks
- using libgreen to optimize CPU usage
- less tasks to limit wasted resources

Here, on a one core 2 threads CPU, new version is ~1.2 faster.  May
be better with more core.
2014-05-03 23:20:13 +02:00
Phil Ruffwind
7e53af35b1 Recommend autoload instead of require
Lazy loading with autoload will result in faster startup time for Emacs
users and is generally the recommended approach for major modes.
2014-05-03 16:36:54 -04:00
Kevin Butler
74392246ff Remove comment about semicolons for inner attributes from docs and adjust comments. 2014-05-03 21:24:06 +01:00
bors
4f1b0b5199 auto merge of #13685 : Ryman/rust/issue7575, r=alexcrichton
Closes #7575.

I don't think the change from a contains lookup to an iteration of the HashSet in the resolver should be much of a burden as the set of methods with the same name should be relatively small.
2014-05-03 12:21:47 -07:00
bors
0c691df8ac auto merge of #13773 : brson/rust/boxxy, r=alexcrichton
`box` is the way you allocate in future-rust.
2014-05-03 10:56:57 -07:00
Niko Matsakis
5fe2f01dee Temporary patch to accept arbitrary lifetimes (behind feature gate) in bound lists. This is needed to bootstrap fix for #5723. 2014-05-03 13:53:07 -04:00
bors
bca9647cd3 auto merge of #13904 : pcwalton/rust/box, r=alexcrichton
r? @alexcrichton

RFC#14 

Issue #13885.
2014-05-03 09:31:49 -07:00
bors
757f106bcc auto merge of #13868 : FlaPer87/rust/opt-in-phase1, r=alexcrichton
This is a first patch towards an opt-in built-in trait world. This patch removes the restriction on built-in traits and allows such traits to be derived.

[RFC#3]

cc #13231

@nikomatsakis r?
2014-05-03 08:06:49 -07:00
bors
529b19f37b auto merge of #13903 : alexcrichton/rust/issue-13890, r=thestinger
The logic of the custom realpath function in metadata::loader was incorrect, but
the logic in util::fs was correct.

Closes #13890
2014-05-03 06:41:53 -07:00
Guillaume Pinot
66b7c11c90 shootout-mandelbrot rewrite
- removed warning
- improved performances
- parallelization
2014-05-03 14:53:52 +02:00
bors
f072984ac4 auto merge of #13899 : bjz/rust/simd, r=pcwalton
cc. @pcwalton
2014-05-03 04:21:51 -07:00
Nick Cameron
5854811082 Refactor rslt to Result::new 2014-05-03 23:14:56 +12:00
Alex Crichton
9ac9245564 rustdoc: Have no_run imply no_trans
This allows writing code examples which pass all analysis of the compiler, but
don't actually link. A good example is examples that use extern {} blocks.

Closes #12903
2014-05-03 02:09:30 -07:00
Alex Crichton
52955dd661 rustdoc: Allow forcing inlining of pub use
Rustdoc currently doesn't inline documentation of a `pub use` if the target is
publicly reachable. This changes rustdoc to allow a #[doc(inline)] attribute to
force inlining the documentation, regardless of whether the targe is public or
not.

Closes #13045
2014-05-03 02:09:30 -07:00
Alex Crichton
eb084b1818 rustdoc: Make static initalizers prettier
Previously, if an initializer took multiple lines or was just large in general,
it was pretty poorly rendered [1] [2]. This alters the logic to just link back
to the source for any multi-line static, with a placeholder of "[definition]".
This should make reading statics a little easier on the eyes. All single-line
statics are still inlined in the documentation.

Closes #13198

[1] - http://static.rust-lang.org/doc/master/sync/mutex/index.html#statics
[2] - http://static.rust-lang.org/doc/master/std/sync/atomics/index.html#statics
2014-05-03 02:09:30 -07:00
Alex Crichton
71a52a2edc syntax: Fix duplicate attributes on module files
The outer attributes were manually appended when a module file was parsed, but
the attributes were also added higher up the stack of parsing (when the module
finished parsing). This removes the append in parsing the module file.

Closes #13826
2014-05-03 02:09:30 -07:00
Alex Crichton
0b7954fa80 rustdoc: Put bangs on the names of macros
This makes them a little easier to search for and makes it clearer that they're
a macro and not an item to import.

Closes #13852
2014-05-03 02:09:29 -07:00
Alex Crichton
50fb77f8ba rustdoc: Stop requiring a crate ID attribute
This is mostly just an artificial requirement as it can use similar logic to the
compiler to infer the crate id.
2014-05-03 02:09:29 -07:00
Alex Crichton
5d145c1c18 rustdoc: Don't have rustc emit warnings
They're much more useful when building code, much less so when building
documentation.

Closes #13894
2014-05-03 02:09:29 -07:00
Alex Crichton
1547caf748 rustdoc: Fix inclusion of the new fonts
These fonts were moved into place by rust's makefiles, but rustdoc is widely
used outside of rustc itself. This moves the fonts into the rustdoc binary,
similarly to the other static assets, and writes them to the output location
whenever rustdoc generates documentation.

Closes #13593
Closes #13787
2014-05-03 02:09:29 -07:00
bors
d1ca0b1371 auto merge of #13891 : hjr3/rust/serialize-vec, r=pcwalton
Now that ~[T] is obsolete, we need to allow to_json() to work for
vectors.
2014-05-03 01:26:49 -07:00
Dirk Leifeld
a8da4f7309 Use is_zero 2014-05-03 10:04:33 +02:00
Dirk Leifeld
b43d7b024b Generalize stats from f64 to the Float trait 2014-05-03 10:04:33 +02:00
Brian Anderson
a5be12ce7e Replace most ~exprs with 'box'. #11779 2014-05-02 23:00:58 -07:00
Brian Anderson
a67307e2a5 emacs: Add 'box' to keywords 2014-05-02 23:00:10 -07:00
bors
3a321b001f auto merge of #13880 : TeXitoi/rust/biguint-always-use-u64, r=pcwalton
This change allow a speedup of ~1.5 on shootout-pidigits on a i32
system.  `MachineUint` is used to abstract the internal machine
unsigned integer to simplity future architecture specialization.
2014-05-02 20:56:52 -07:00
Patrick Walton
80b43de5ab libsyntax: Add box PAT to the pattern grammar. RFC #14. 2014-05-02 18:31:16 -07:00
Patrick Walton
7c64f03607 librustc: Implement the Box<T> type syntax. RFC #14. Issue #13885. 2014-05-02 18:27:50 -07:00
bors
e0d261e576 auto merge of #13579 : hirschenberger/rust/lint_unsigned_negate, r=alexcrichton
See #11273 and #13318
2014-05-02 16:51:50 -07:00
Alex Crichton
18ac26565f rustc: Crawl static initializers for reachability
This ensures that private functions exported through static initializers will
actually end up being public in the object file (so other objects can continue
to reference the function).

Closes #13620
2014-05-02 15:40:07 -07:00
Alex Crichton
825f6ace1d rustc: Remove the session building_library flag
This has long since not been too relevant since the introduction of many crate
type outputs. This commit removes the flag entirely, adjusting all logic to do
the most reasonable thing when building both a library and an executable.

Closes #13337
2014-05-02 15:26:45 -07:00