Commit Graph

29491 Commits

Author SHA1 Message Date
Brian Anderson
1240197a5b std: Move running_on_valgrind to rt::util. #1457
[breaking-change]
2014-05-23 15:27:48 -07:00
bors
11aa731b38 auto merge of #14368 : tedhorst/rust/master, r=alexcrichton 2014-05-23 14:56:24 -07:00
bors
53db981148 auto merge of #14359 : brson/rust/minordoc, r=alexcrichton 2014-05-23 13:21:25 -07:00
Kevin Butler
da663ccf9f Improve error message for lifetimes after type params.
Closes #14303.
2014-05-23 20:51:21 +01:00
bors
c329a1fcdc auto merge of #14313 : kballard/rust/tuple_dotdot_match_ice, r=cmr
Fixes #14308.
2014-05-23 11:46:26 -07:00
Brian Anderson
807dffde18 Minor library doc copyediting 2014-05-23 10:33:21 -07:00
bors
ad775be8b4 auto merge of #14360 : alexcrichton/rust/remove-deprecated, r=kballard
These have all been deprecated for awhile now, so it's likely time to start removing them.
2014-05-23 09:11:26 -07:00
Alex Crichton
33573bc0aa syntax: Clean out obsolete syntax parsing
All of these features have been obsolete since February 2014, where most have
been obsolete since 2013. There shouldn't be any more need to keep around the
parser hacks after this length of time.
2014-05-23 09:07:28 -07:00
bors
9e244d7084 auto merge of #14372 : neeee/rust/intrinsic-docs, r=brson 2014-05-23 02:06:25 -07:00
bors
33c3eddd11 auto merge of #14362 : zecozephyr/rust/docfixes, r=cmr
extra::arc -> alloc::arc
2014-05-23 00:31:27 -07:00
P1start
e6b23da5a2 Fix lifetime error to print 'a instead of &'a
This changes certain error messages about lifetimes so that they display
lifetimes without an `&`.

Fixes #10291.
2014-05-23 18:22:48 +12:00
Corey Richardson
d8467e23e7 rustc: abstract lint level exporting from EnumSizeVariance 2014-05-22 23:01:47 -07:00
Corey Richardson
c327080ee0 rustc: add a lint for large enum variants
It can be easy to accidentally bloat the size of an enum by making one variant
larger than the others. When this happens, it usually goes unnoticed. This
commit adds a lint that can warn when the largest variant in an enum is more
than 3 times larger than the second-largest variant. This requires a little
bit of rejiggering, because size information is only available in trans, but
lint levels are only available in the lint context.

It is allow by default because it's pretty noisy, and isn't really *that*
undesirable.

Closes #10362
2014-05-22 23:01:47 -07:00
lucy
3d6337079f libcore: Document math intrinsics. 2014-05-23 07:44:03 +02:00
Corey Richardson
f122ad08a5 rustc: middle: ty: use doc comments for the tcx 2014-05-22 22:24:56 -07:00
Corey Richardson
3f8cc1683b rustc: middle: lint: use more doc comments 2014-05-22 22:24:54 -07:00
Ted Horst
2571d42241 updated hash value in reduced benchmark 2014-05-22 23:07:57 -05:00
bors
02117dd1bc auto merge of #14357 : huonw/rust/spelling, r=pnkfelix
The span on a inner doc-comment would point to the next token, e.g. the span for the `a` line points to the `b` line, and the span of `b` points to the `fn`.

```rust
//! a
//! b

fn bar() {}
```
2014-05-22 20:56:18 -07:00
bors
ec0258a381 auto merge of #14314 : alexcrichton/rust/deriving-hash, r=brson
One of the long-term goals of the libstd facade is to move the collections
library underneath the standard library. This would imply that libcollections
today would invert its dependency with libstd.

One of the primary blockers for doing this is the HashMap collection. Of its two
major dependencies, hashing and randomness, this commit is the first step in
dealing with hashing.

When moving the hash module beneath libstd, it must break its primary dependence
on the io::Writer trait (used as the hashing state). The proposed strategy for
breaking this dependence is taking a similar path as core::fmt, which is to have
the hash module define its own "writer trait". This trait would be similar to
std::io::Writer, except that it would not return errors and it would have fewer
convenience methods.

The Hash trait today has its type parameter behind a feature gate (default type
parameters), so this pending change will likely break no code which hasn't opted
in to the feature gate. The SipState struct will lose its implementation of
io::Writer, but it will regain similar methods for dealing with writing data.

This change specifically prepares for the hash migration by modifying
deriving(Hash) to use the std:#️⃣:Writer bound instead of the std::io::Writer
bound. This bound is currently wired to std::io::Writer, but after a snapshot it
will have no need to be wired to the io writer trait.
2014-05-22 18:36:22 -07:00
Luqman Aden
90eeb92e10 Update to LLVM head and mark various ptrs as nonnull. 2014-05-22 21:06:24 -04:00
bors
a0960a1223 auto merge of #14348 : alexcrichton/rust/doc.rust-lang.org, r=huonw 2014-05-22 16:56:23 -07:00
bors
87ad19eb78 auto merge of #14310 : pcwalton/rust/detildestr-alllibs, r=brson
r? @brson
2014-05-22 15:16:31 -07:00
Alex Crichton
711f531b65 doc: Touch up the unsafe guide
* Change ~ references to Box
* Rewrite examples so they can be compiled an run
* Mention libcore
* Update wording about compiler-required functions
2014-05-22 15:14:23 -07:00
Patrick Walton
e878721d70 libcore: Remove all uses of ~str from libcore.
[breaking-change]
2014-05-22 14:42:02 -07:00
Patrick Walton
5633d4641f libstd: Remove all uses of ~str from libstd 2014-05-22 14:42:02 -07:00
Patrick Walton
a9dd903d79 libtime: Remove the tz_zone field from times.
It depends on `~str`.
2014-05-22 14:42:02 -07:00
Patrick Walton
36195eb91f libstd: Remove ~str from all libstd modules except fmt and str. 2014-05-22 14:42:01 -07:00
Jonathan Bailey
12240e5b9e Fixed incorrect module path
extra::arc -> sync::arc
2014-05-22 13:46:52 -07:00
bors
e402e75f4e auto merge of #14350 : zwarich/rust/let-suggestion, r=pcwalton 2014-05-22 13:31:24 -07:00
Alex Crichton
0dd4c1e7bd Remove a slew of old deprecated functions 2014-05-22 11:54:14 -07:00
bors
8d50d6a93c auto merge of #14346 : alexcrichton/rust/rustdoc-external-crates, r=pcwalton
This commit alters rustdoc to crawl the metadata of upstream libraries in order
to fill in default methods for traits implemented in downstream crates. This,
for example, documents the `insert` function on hash maps.

This is a fairly lossy extraction from the metadata. Documentation and
attributes are lost, but they aren't used anyway. Unfortunately, argument names
are also lost because they are not present in the metadata. Source links are
also lost because the spans are not serialized.

While not perfect, it appears that presenting this documentation through rustdoc
is much better than nothing, so I wanted to land this to allow iteration on it
later on.
2014-05-22 10:31:25 -07:00
Alex Crichton
c746c503f0 rustdoc: Fill in external trait methods
This commit alters rustdoc to crawl the metadata of upstream libraries in order
to fill in default methods for traits implemented in downstream crates. This,
for example, documents the `insert` function on hash maps.

This is a fairly lossy extraction from the metadata. Documentation and
attributes are lost, but they aren't used anyway. Unfortunately, argument names
are also lost because they are not present in the metadata. Source links are
also lost because the spans are not serialized.

While not perfect, it appears that presenting this documentation through rustdoc
is much better than nothing, so I wanted to land this to allow iteration on it
later on.
2014-05-22 09:46:22 -07:00
bors
3c9f2a5d0a auto merge of #14354 : EdorianDark/rust/master, r=huonw
It seemed to me, that [T] was deprecated and i am trying to help.
2014-05-22 08:51:20 -07:00
bors
9411cec580 auto merge of #14349 : richo/rust/docs/win64_calling_convention, r=alexcrichton
Wikipedia suggests that windows on x64 has it's own calling convention (Supported by the fact that we implement it)

source: http://en.wikipedia.org/wiki/X86_calling_conventions#x86-64_calling_conventions
2014-05-22 07:16:22 -07:00
Huon Wilson
d3fde8476b syntax: put the correct span on doc-comments inside a module.
The position of the .bump call (before extracting the span fields) was
causing a doc-comment to have the span of the next token, not itself.
2014-05-22 22:58:14 +10:00
Huon Wilson
37bd466e58 Spelling/doc formatting fixes. 2014-05-22 22:55:37 +10:00
bors
9ac9148bbd auto merge of #14335 : tbu-/rust/pr_doc_strsplit, r=pnkfelix
In particular, show examples for splitting the empty string and using `splitn`
with a count of 0.

Fix #14222.
2014-05-22 05:26:22 -07:00
Dirk Leifeld
6787e22c08 Remove allow(deprecated_owned_vector) lint 2014-05-22 13:19:44 +02:00
bors
e7e5e9ce96 auto merge of #14345 : alexcrichton/rust/rustdoc-many-impls, r=pcwalton
Right now, when you look in the "Implementors" section for traits, you only see
implementors within that crate. This commit modifies that section to include
implementors from neighboring crates as well.

For example, the Container trait currently says that it is only implemented by
strings and slices, but it is in fact implemented by nearly all containers.

Implementation-wise, this change generates an "implementors cache" similarly to
the search index where each crate will append implementors to the files. When
the page for a trait is loaded, it will load its specific cache file, rendering
links for all upstream types which implement the trait.
2014-05-22 02:51:21 -07:00
bors
022a7b3cfb auto merge of #14322 : thestinger/rust/secret_santa_heap, r=alexcrichton 2014-05-22 01:06:25 -07:00
Richo Healey
e5d883101c docs: Add win64 calling convention 2014-05-22 00:05:56 -07:00
bors
22e2204c3d auto merge of #14321 : alexcrichton/rust/ices, r=pcwalton
Also adding tests for fixed ICEs
2014-05-21 23:31:27 -07:00
Cameron Zwarich
516a177273 Add a suggestion to use a let binding on some borrowck errors. 2014-05-21 22:04:22 -07:00
Alex Crichton
1ccc51ce3b doc: Fix some broken links 2014-05-21 20:33:00 -07:00
bors
f78eb14341 auto merge of #14307 : kballard/rust/vim_prelude_mutablecloneablevector, r=cmr
Add slice::MutableCloneableVector to the prelude. It's the only slice
trait that's currently missing.

Update rust.vim to match the latest prelude and current set of keywords.
Also teach it to handle box placement expressions specially.
2014-05-21 20:11:27 -07:00
Alex Crichton
799ddba8da Change static.rust-lang.org to doc.rust-lang.org
The new documentation site has shorter urls, gzip'd content, and index.html
redirecting functionality.
2014-05-21 19:55:39 -07:00
bors
257a73ce82 auto merge of #14301 : alexcrichton/rust/remove-unsafe-arc, r=brson
This type can be built with `Arc<Unsafe<T>>` now that liballoc exists.
2014-05-21 17:31:29 -07:00
Alex Crichton
06eb9765fe rustdoc: Show types for traits across crates
Right now, when you look in the "Implementors" section for traits, you only see
implementors within that crate. This commit modifies that section to include
implementors from neighboring crates as well.

For example, the Container trait currently says that it is only implemented by
strings and slices, but it is in fact implemented by nearly all containers.

Implementation-wise, this change generates an "implementors cache" similarly to
the search index where each crate will append implementors to the files. When
the page for a trait is loaded, it will load its specific cache file, rendering
links for all upstream types which implement the trait.
2014-05-21 16:41:58 -07:00
Alex Crichton
fdf935a524 std,green: Mark some queue types as NoShare 2014-05-21 16:36:57 -07:00
Daniel Micay
f1ce693e61 alter exchange_free for sized deallocation
The support for sized deallocation is nearly complete. The only known
missing pieces are `Box<str>`, `Box<[T]>` and `proc`.
2014-05-21 16:16:17 -04:00