]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agoFix FIXME #3511 in Dlist code
Piotr Jawniak [Sun, 25 May 2014 09:41:20 +0000 (11:41 +0200)]
Fix FIXME #3511 in Dlist code

Issue #3511 was closed, but dlist.rs contained a FIXME for it.

10 years agoauto merge of #14323 : richo/rust/features/strbuf_to_string, r=huonw
bors [Sun, 25 May 2014 04:51:18 +0000 (21:51 -0700)]
auto merge of #14323 : richo/rust/features/strbuf_to_string, r=huonw

Converts `StrBuf` to `String` throughout rustc and the standard library.

Tests all pass locally, but usual caveats about platforms that aren't OSX apply since I don't have a test environment handy.

@alexcritchon mentioned that @pcwalton may have a patch incoming that should block this?

closes #14312

10 years agocore: rename strbuf::StrBuf to string::String
Richo Healey [Thu, 22 May 2014 23:57:53 +0000 (16:57 -0700)]
core: rename strbuf::StrBuf to string::String

[breaking-change]

10 years agoauto merge of #14402 : huonw/rust/arc-field-rename, r=alexcrichton
bors [Sun, 25 May 2014 01:56:19 +0000 (18:56 -0700)]
auto merge of #14402 : huonw/rust/arc-field-rename, r=alexcrichton

Paper over privacy issues with Deref by changing field names.

Types that implement Deref can cause weird error messages due to their
private fields conflicting with a field of the type they deref to, e.g.,
previously

    struct Foo { x: int }

    let a: Arc<Foo> = ...;
    println!("{}", a.x);

would complain the the `x` field of `Arc` was private (since Arc has a
private field called `x`) rather than just ignoring it.

This patch doesn't fix that issue, but does mean one would have to write
`a._ptr` to hit the same error message, which seems far less
common. (This patch `_`-prefixes all private fields of
`Deref`-implementing types.)

cc #12808

10 years agoPaper over privacy issues with Deref by changing field names.
Huon Wilson [Sat, 24 May 2014 11:35:53 +0000 (21:35 +1000)]
Paper over privacy issues with Deref by changing field names.

Types that implement Deref can cause weird error messages due to their
private fields conflicting with a field of the type they deref to, e.g.,
previously

    struct Foo { x: int }

    let a: Arc<Foo> = ...;
    println!("{}", a.x);

would complain the the `x` field of `Arc` was private (since Arc has a
private field called `x`) rather than just ignoring it.

This patch doesn't fix that issue, but does mean one would have to write
`a._ptr` to hit the same error message, which seems far less
common. (This patch `_`-prefixes all private fields of
`Deref`-implementing types.)

cc #12808

10 years agoauto merge of #14373 : sfackler/rust/unused-attr, r=huonw
bors [Sun, 25 May 2014 00:21:20 +0000 (17:21 -0700)]
auto merge of #14373 : sfackler/rust/unused-attr, r=huonw

The compiler now tracks which attributes were actually looked at during the compilation process and warns for those that were unused.

Some things of note:

* The tracking is done via thread locals, as it made the implementation more straightforward. Note that this shouldn't hamper any future parallelization as each task can have its own thread local state which can be merged for the lint pass. If there are serious objections to this, I can restructure things to explicitly pass the state around.
* There are a number of attributes that have to be special-cased and globally whitelisted. This happens for four reasons:
  * The `doc` and `automatically_derived` attributes are used by rustdoc, but not by the compiler.
  * The crate-level attributes `license`, `desc` and `comment` aren't currently used by anything.
  * Stability attributes as well as `must_use` are checked only when the tagged item is used, so we can't guarantee that the compiler's looked at them.
  * 12 attributes are used only in trans, which happens after the lint pass.

#14300 is adding infrastructure to track lint state through trans, which this lint should also be able to use to handle the last case. For the other attributes, the right solution would probably involve a specific pass to mark uses that occur in the correct context. For example, a `doc` attribute attached to a match arm should generate a warning, but will not currently.

RFC: 0002-attribute-usage

10 years agoChanges from feedback
Steven Fackler [Fri, 23 May 2014 15:39:26 +0000 (08:39 -0700)]
Changes from feedback

10 years agoGet "make check" to work with unused-attribute
Steven Fackler [Fri, 23 May 2014 05:29:13 +0000 (22:29 -0700)]
Get "make check" to work with unused-attribute

There's a fair number of attributes that have to be whitelisted since
they're either looked for by rustdoc, in trans, or as needed. These can
be cleaned up in the future.

10 years agoWhitelist doc attributes
Steven Fackler [Thu, 22 May 2014 02:02:40 +0000 (19:02 -0700)]
Whitelist doc attributes

This is a bit overly permissive but should be okay for now.

10 years agoPort more stuff to mark used attributes
Steven Fackler [Wed, 21 May 2014 07:05:45 +0000 (00:05 -0700)]
Port more stuff to mark used attributes

10 years agoFirst sketch of lint pass
Steven Fackler [Wed, 21 May 2014 05:07:42 +0000 (22:07 -0700)]
First sketch of lint pass

Enough attributes are marked to cleanly compile an empty library.

10 years agoAdd AttrId to Attribute_
Steven Fackler [Tue, 20 May 2014 07:07:24 +0000 (00:07 -0700)]
Add AttrId to Attribute_

10 years agoauto merge of #14401 : aochagavia/rust/pr4, r=alexcrichton
bors [Sat, 24 May 2014 21:26:23 +0000 (14:26 -0700)]
auto merge of #14401 : aochagavia/rust/pr4, r=alexcrichton

Some functions implemented for the Ascii struct have the same functionality as other functions implemented for the normal chars. For consistency, I think they should have the same name, so I renamed the functions in Ascii to match the names in the Char trait.

* Renamed `to_lower` to `to_lowercase`
* Renamed `to_upper` to `to_uppercase`
* Renamed `is_alpha` to `is_alphabetic`
* Renamed `is_alnum` to `is_alphanumeric`
* Renamed `is_lower` to `is_lowercase`
* Renamed `is_upper` to `is_uppercase`

[breaking-change]

10 years agoUpdate ascii functions used elsewhere
Adolfo Ochagavía [Sat, 24 May 2014 12:44:10 +0000 (14:44 +0200)]
Update ascii functions used elsewhere

10 years agoauto merge of #14378 : huonw/rust/deque-adjustments, r=alexcrichton
bors [Sat, 24 May 2014 19:51:24 +0000 (12:51 -0700)]
auto merge of #14378 : huonw/rust/deque-adjustments, r=alexcrichton

Might as well remove the duplication/`forget` call.

10 years agoauto merge of #14405 : aochagavia/rust/pr5, r=cmr
bors [Sat, 24 May 2014 17:51:25 +0000 (10:51 -0700)]
auto merge of #14405 : aochagavia/rust/pr5, r=cmr

10 years agoRemoved unnecessary macro declaration
Adolfo Ochagavía [Sat, 24 May 2014 16:10:18 +0000 (18:10 +0200)]
Removed unnecessary macro declaration

10 years agoauto merge of #14396 : vhbit/rust/opaque-mutex, r=alexcrichton
bors [Sat, 24 May 2014 11:56:25 +0000 (04:56 -0700)]
auto merge of #14396 : vhbit/rust/opaque-mutex, r=alexcrichton

On some systems (iOS for example) mutex is represented by opaque data structure which doesn't play well with simple data copy. Therefore mutex should be initialized from magic static value and filled by OS only when it landed RC.

Initially written for iOS but since landing iOS support might require quite a lot of time I think it is better to split parts which aren't directly related to iOS and merge them in

10 years agostd: minor simplification to sync::deque.
Huon Wilson [Fri, 23 May 2014 15:07:05 +0000 (01:07 +1000)]
std: minor simplification to sync::deque.

10 years agoRename functions in Ascii
Adolfo Ochagavía [Sat, 24 May 2014 10:24:50 +0000 (12:24 +0200)]
Rename functions in Ascii

Some functions implemented for the Ascii struct have the same functionality as other functions implemented for the normal chars. For consistency, I think they should have the same name, so I renamed the functions in Ascii to match the names in the Char trait.

* Renamed `to_lower` to `to_lowercase`
* Renamed `to_upper` to `to_uppercase`
* Renamed `is_alpha` to `is_alphabetic`
* Renamed `is_alnum` to `is_alphanumeric`
* Renamed `is_lower` to `is_lowercase`
* Renamed `is_upper` to `is_uppercase`

[breaking-change]

10 years agoauto merge of #14392 : alexcrichton/rust/mem-updates, r=sfackler
bors [Sat, 24 May 2014 10:21:24 +0000 (03:21 -0700)]
auto merge of #14392 : alexcrichton/rust/mem-updates, r=sfackler

* All of the *_val functions have gone from #[unstable] to #[stable]
* The overwrite and zeroed functions have gone from #[unstable] to #[stable]
* The uninit function is now deprecated, replaced by its stable counterpart,
  uninitialized

[breaking-change]

10 years agoauto merge of #14389 : Ryman/rust/14303, r=alexcrichton
bors [Sat, 24 May 2014 08:41:25 +0000 (01:41 -0700)]
auto merge of #14389 : Ryman/rust/14303, r=alexcrichton

Closes #14303.

10 years agoauto merge of #14388 : kballard/rust/nonfatal_lexer_errors, r=alexcrichton
bors [Sat, 24 May 2014 07:01:25 +0000 (00:01 -0700)]
auto merge of #14388 : kballard/rust/nonfatal_lexer_errors, r=alexcrichton

Most errors that arise in the lexer can be recovered from. This allows
for more than one syntax error to be reported at a time.

10 years agoauto merge of #14384 : luqmana/rust/mca, r=alexcrichton
bors [Sat, 24 May 2014 05:06:23 +0000 (22:06 -0700)]
auto merge of #14384 : luqmana/rust/mca, r=alexcrichton

Only add `-Qunused-arguments` for clang.

10 years agoFixes problems on systems with opaque mutex
Valerii Hiora [Sat, 24 May 2014 05:01:23 +0000 (08:01 +0300)]
Fixes problems on systems with opaque mutex

On some systems (iOS for example) mutex is represented by
opaque data structure which doesn't play well with simple
data copy. Therefore mutex should be initialized from
magic static value and filled by OS only when it landed RC.

10 years agocore: Finish stabilizing the `mem` module.
Alex Crichton [Sat, 24 May 2014 03:53:56 +0000 (20:53 -0700)]
core: Finish stabilizing the `mem` module.

* All of the *_val functions have gone from #[unstable] to #[stable]
* The overwrite and zeroed functions have gone from #[unstable] to #[stable]
* The uninit function is now deprecated, replaced by its stable counterpart,
  uninitialized

[breaking-change]

10 years agoauto merge of #14306 : luqmana/rust/up-llvm, r=alexcrichton
bors [Sat, 24 May 2014 02:51:20 +0000 (19:51 -0700)]
auto merge of #14306 : luqmana/rust/up-llvm, r=alexcrichton

We can now mark arguments and returns as `nonnull` in LLVM. It's still somewhat limited by the fact that LLVM loses this information after inlining but it might help in certain cases.

10 years agoMake most lexer errors non-fatal
Kevin Ballard [Fri, 23 May 2014 22:20:46 +0000 (15:20 -0700)]
Make most lexer errors non-fatal

Most errors that arise in the lexer can be recovered from. This allows
for more than one syntax error to be reported at a time.

10 years agolibrustc: Consolidate the attribute handling for tagging function arguments and returns.
Luqman Aden [Wed, 21 May 2014 19:07:48 +0000 (15:07 -0400)]
librustc: Consolidate the attribute handling for tagging function arguments and returns.

10 years agoauto merge of #14379 : brson/rust/simd, r=alexcrichton
bors [Sat, 24 May 2014 01:06:19 +0000 (18:06 -0700)]
auto merge of #14379 : brson/rust/simd, r=alexcrichton

Followup to https://github.com/mozilla/rust/pull/14331 and https://github.com/mozilla/rust/pull/12524

10 years agoAdd clang specific flag more selectively.
Luqman Aden [Fri, 23 May 2014 21:16:21 +0000 (14:16 -0700)]
Add clang specific flag more selectively.

10 years agoauto merge of #14317 : P1start/rust/lifetime-formatting, r=alexcrichton
bors [Fri, 23 May 2014 23:31:20 +0000 (16:31 -0700)]
auto merge of #14317 : P1start/rust/lifetime-formatting, r=alexcrichton

This changes certain error messages about lifetimes so that they display lifetimes without an `&`.

Fixes #10291.

10 years agocore: Derive Show on SIMD types
Brian Anderson [Fri, 23 May 2014 18:02:39 +0000 (11:02 -0700)]
core: Derive Show on SIMD types

10 years agocore: Document simd mod
Brian Anderson [Fri, 23 May 2014 18:02:04 +0000 (11:02 -0700)]
core: Document simd mod

10 years agostd: Move unstable::finally to std::finally. #1457
Brian Anderson [Wed, 21 May 2014 05:27:24 +0000 (22:27 -0700)]
std: Move unstable::finally to std::finally. #1457

[breaking-change]

10 years agostd: Move simd to core::simd and reexport. #1457
Brian Anderson [Wed, 21 May 2014 03:24:17 +0000 (20:24 -0700)]
std: Move simd to core::simd and reexport. #1457

[breaking-change]

10 years agostd: Move running_on_valgrind to rt::util. #1457
Brian Anderson [Wed, 21 May 2014 03:19:39 +0000 (20:19 -0700)]
std: Move running_on_valgrind to rt::util. #1457

[breaking-change]

10 years agoauto merge of #14368 : tedhorst/rust/master, r=alexcrichton
bors [Fri, 23 May 2014 21:56:24 +0000 (14:56 -0700)]
auto merge of #14368 : tedhorst/rust/master, r=alexcrichton

10 years agoauto merge of #14359 : brson/rust/minordoc, r=alexcrichton
bors [Fri, 23 May 2014 20:21:25 +0000 (13:21 -0700)]
auto merge of #14359 : brson/rust/minordoc, r=alexcrichton

10 years agoImprove error message for lifetimes after type params.
Kevin Butler [Fri, 23 May 2014 19:51:21 +0000 (20:51 +0100)]
Improve error message for lifetimes after type params.

Closes #14303.

10 years agoauto merge of #14313 : kballard/rust/tuple_dotdot_match_ice, r=cmr
bors [Fri, 23 May 2014 18:46:26 +0000 (11:46 -0700)]
auto merge of #14313 : kballard/rust/tuple_dotdot_match_ice, r=cmr

Fixes #14308.

10 years agoMinor library doc copyediting
Brian Anderson [Thu, 22 May 2014 16:44:54 +0000 (09:44 -0700)]
Minor library doc copyediting

10 years agoauto merge of #14360 : alexcrichton/rust/remove-deprecated, r=kballard
bors [Fri, 23 May 2014 16:11:26 +0000 (09:11 -0700)]
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.

10 years agosyntax: Clean out obsolete syntax parsing
Alex Crichton [Thu, 22 May 2014 17:49:26 +0000 (10:49 -0700)]
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.

10 years agoauto merge of #14372 : neeee/rust/intrinsic-docs, r=brson
bors [Fri, 23 May 2014 09:06:25 +0000 (02:06 -0700)]
auto merge of #14372 : neeee/rust/intrinsic-docs, r=brson

10 years agoauto merge of #14362 : zecozephyr/rust/docfixes, r=cmr
bors [Fri, 23 May 2014 07:31:27 +0000 (00:31 -0700)]
auto merge of #14362 : zecozephyr/rust/docfixes, r=cmr

extra::arc -> alloc::arc

10 years agoFix lifetime error to print `'a` instead of `&'a`
P1start [Wed, 21 May 2014 03:28:40 +0000 (15:28 +1200)]
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.

10 years agolibcore: Document math intrinsics.
lucy [Fri, 23 May 2014 05:09:11 +0000 (07:09 +0200)]
libcore: Document math intrinsics.

10 years agoupdated hash value in reduced benchmark
Ted Horst [Fri, 23 May 2014 04:07:57 +0000 (23:07 -0500)]
updated hash value in reduced benchmark

10 years agoauto merge of #14357 : huonw/rust/spelling, r=pnkfelix
bors [Fri, 23 May 2014 03:56:18 +0000 (20:56 -0700)]
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() {}
```

10 years agoauto merge of #14314 : alexcrichton/rust/deriving-hash, r=brson
bors [Fri, 23 May 2014 01:36:22 +0000 (18:36 -0700)]
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::hash::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.

10 years agoUpdate to LLVM head and mark various ptrs as nonnull.
Luqman Aden [Tue, 20 May 2014 21:42:20 +0000 (17:42 -0400)]
Update to LLVM head and mark various ptrs as nonnull.

10 years agoauto merge of #14348 : alexcrichton/rust/doc.rust-lang.org, r=huonw
bors [Thu, 22 May 2014 23:56:23 +0000 (16:56 -0700)]
auto merge of #14348 : alexcrichton/rust/doc.rust-lang.org, r=huonw

10 years agoauto merge of #14310 : pcwalton/rust/detildestr-alllibs, r=brson
bors [Thu, 22 May 2014 22:16:31 +0000 (15:16 -0700)]
auto merge of #14310 : pcwalton/rust/detildestr-alllibs, r=brson

r? @brson

10 years agodoc: Touch up the unsafe guide
Alex Crichton [Thu, 22 May 2014 03:33:11 +0000 (20:33 -0700)]
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

10 years agolibcore: Remove all uses of `~str` from `libcore`.
Patrick Walton [Tue, 20 May 2014 06:19:56 +0000 (23:19 -0700)]
libcore: Remove all uses of `~str` from `libcore`.

[breaking-change]

10 years agolibstd: Remove all uses of `~str` from `libstd`
Patrick Walton [Tue, 20 May 2014 00:23:26 +0000 (17:23 -0700)]
libstd: Remove all uses of `~str` from `libstd`

10 years agolibtime: Remove the `tz_zone` field from times.
Patrick Walton [Tue, 20 May 2014 00:06:54 +0000 (17:06 -0700)]
libtime: Remove the `tz_zone` field from times.

It depends on `~str`.

10 years agolibstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.
Patrick Walton [Fri, 16 May 2014 17:45:16 +0000 (10:45 -0700)]
libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.

10 years agoFixed incorrect module path
Jonathan Bailey [Thu, 22 May 2014 18:40:52 +0000 (11:40 -0700)]
Fixed incorrect module path
extra::arc -> sync::arc

10 years agoauto merge of #14350 : zwarich/rust/let-suggestion, r=pcwalton
bors [Thu, 22 May 2014 20:31:24 +0000 (13:31 -0700)]
auto merge of #14350 : zwarich/rust/let-suggestion, r=pcwalton

10 years agoRemove a slew of old deprecated functions
Alex Crichton [Thu, 22 May 2014 17:40:07 +0000 (10:40 -0700)]
Remove a slew of old deprecated functions

10 years agoauto merge of #14346 : alexcrichton/rust/rustdoc-external-crates, r=pcwalton
bors [Thu, 22 May 2014 17:31:25 +0000 (10:31 -0700)]
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.

10 years agorustdoc: Fill in external trait methods
Alex Crichton [Sat, 3 May 2014 09:08:58 +0000 (02:08 -0700)]
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.

10 years agoauto merge of #14354 : EdorianDark/rust/master, r=huonw
bors [Thu, 22 May 2014 15:51:20 +0000 (08:51 -0700)]
auto merge of #14354 : EdorianDark/rust/master, r=huonw

It seemed to me, that [T] was deprecated and i am trying to help.

10 years agoauto merge of #14349 : richo/rust/docs/win64_calling_convention, r=alexcrichton
bors [Thu, 22 May 2014 14:16:22 +0000 (07:16 -0700)]
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

10 years agosyntax: put the correct span on doc-comments inside a module.
Huon Wilson [Thu, 22 May 2014 12:55:48 +0000 (22:55 +1000)]
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.

10 years agoSpelling/doc formatting fixes.
Huon Wilson [Thu, 22 May 2014 12:50:31 +0000 (22:50 +1000)]
Spelling/doc formatting fixes.

10 years agoauto merge of #14335 : tbu-/rust/pr_doc_strsplit, r=pnkfelix
bors [Thu, 22 May 2014 12:26:22 +0000 (05:26 -0700)]
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.

10 years agoRemove allow(deprecated_owned_vector) lint
Dirk Leifeld [Thu, 22 May 2014 11:19:44 +0000 (13:19 +0200)]
Remove allow(deprecated_owned_vector) lint

10 years agoauto merge of #14345 : alexcrichton/rust/rustdoc-many-impls, r=pcwalton
bors [Thu, 22 May 2014 09:51:21 +0000 (02:51 -0700)]
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.

10 years agoauto merge of #14322 : thestinger/rust/secret_santa_heap, r=alexcrichton
bors [Thu, 22 May 2014 08:06:25 +0000 (01:06 -0700)]
auto merge of #14322 : thestinger/rust/secret_santa_heap, r=alexcrichton

10 years agodocs: Add win64 calling convention
Richo Healey [Thu, 22 May 2014 04:22:58 +0000 (21:22 -0700)]
docs: Add win64 calling convention

10 years agoauto merge of #14321 : alexcrichton/rust/ices, r=pcwalton
bors [Thu, 22 May 2014 06:31:27 +0000 (23:31 -0700)]
auto merge of #14321 : alexcrichton/rust/ices, r=pcwalton

Also adding tests for fixed ICEs

10 years agoAdd a suggestion to use a `let` binding on some borrowck errors.
Cameron Zwarich [Thu, 22 May 2014 04:44:49 +0000 (21:44 -0700)]
Add a suggestion to use a `let` binding on some borrowck errors.

10 years agodoc: Fix some broken links
Alex Crichton [Thu, 22 May 2014 03:33:00 +0000 (20:33 -0700)]
doc: Fix some broken links

10 years agoauto merge of #14307 : kballard/rust/vim_prelude_mutablecloneablevector, r=cmr
bors [Thu, 22 May 2014 03:11:27 +0000 (20:11 -0700)]
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.

10 years agoChange static.rust-lang.org to doc.rust-lang.org
Alex Crichton [Thu, 22 May 2014 02:55:39 +0000 (19:55 -0700)]
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.

10 years agoauto merge of #14301 : alexcrichton/rust/remove-unsafe-arc, r=brson
bors [Thu, 22 May 2014 00:31:29 +0000 (17:31 -0700)]
auto merge of #14301 : alexcrichton/rust/remove-unsafe-arc, r=brson

This type can be built with `Arc<Unsafe<T>>` now that liballoc exists.

10 years agorustdoc: Show types for traits across crates
Alex Crichton [Wed, 21 May 2014 23:41:58 +0000 (16:41 -0700)]
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.

10 years agostd,green: Mark some queue types as NoShare
Alex Crichton [Wed, 21 May 2014 01:54:31 +0000 (18:54 -0700)]
std,green: Mark some queue types as NoShare

10 years agoalter `exchange_free` for sized deallocation
Daniel Micay [Wed, 21 May 2014 04:18:10 +0000 (00:18 -0400)]
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`.

10 years agomigrate from `exchange_malloc` to `allocate`
Daniel Micay [Wed, 21 May 2014 03:43:18 +0000 (23:43 -0400)]
migrate from `exchange_malloc` to `allocate`

This is now only used internally by the compiler.

10 years agoauto merge of #14334 : brson/rust/deoxidize, r=alexcrichton
bors [Wed, 21 May 2014 20:11:28 +0000 (13:11 -0700)]
auto merge of #14334 : brson/rust/deoxidize, r=alexcrichton

Using `rustc` instead of e.g. `compile` makes it clear this is a rust build step.

10 years agoauto merge of #14328 : Sawyer47/rust/remove-fixmes, r=alexcrichton
bors [Wed, 21 May 2014 18:36:29 +0000 (11:36 -0700)]
auto merge of #14328 : Sawyer47/rust/remove-fixmes, r=alexcrichton

10 years agoAdd examples for edge cases of str.split/str.splitn
Tobias Bucher [Wed, 21 May 2014 18:05:55 +0000 (20:05 +0200)]
Add examples for edge cases of str.split/str.splitn

In particular, show examples for splitting the empty string and using `splitn`
with a count of 0.

Fix #14222.

10 years agomk: Replace 'oxidize' with 'rustc'. Closes #13781
Brian Anderson [Wed, 21 May 2014 05:14:38 +0000 (22:14 -0700)]
mk: Replace 'oxidize' with 'rustc'. Closes #13781

10 years agoauto merge of #14320 : kballard/rust/fix_stdlib_inject_attrs, r=alexcrichton
bors [Wed, 21 May 2014 16:46:27 +0000 (09:46 -0700)]
auto merge of #14320 : kballard/rust/fix_stdlib_inject_attrs, r=alexcrichton

The #[phase(syntax,link)] attribute on `extern crate std` needs to be an
outer attribute so it can pretty-print properly.

Also add `#![no_std]` and `#[feature(phase)]` so compiling the
pretty-printed source will work.

10 years agorustc: Fix an ICE with box-placement syntax
Alex Crichton [Wed, 21 May 2014 05:39:14 +0000 (22:39 -0700)]
rustc: Fix an ICE with box-placement syntax

Closes #14084

10 years agorustc: Turn a Box ICE into an error
Alex Crichton [Wed, 21 May 2014 05:07:45 +0000 (22:07 -0700)]
rustc: Turn a Box ICE into an error

Closes #14092

10 years agostd: Change hash to reexport its own Writer
Alex Crichton [Wed, 21 May 2014 03:06:33 +0000 (20:06 -0700)]
std: Change hash to reexport its own Writer

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::hash::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.

10 years agoauto merge of #14326 : huonw/rust/tiny-fixes, r=pnkfelix
bors [Wed, 21 May 2014 15:06:27 +0000 (08:06 -0700)]
auto merge of #14326 : huonw/rust/tiny-fixes, r=pnkfelix

The changes to flowgraph make invalid invocations slightly more forgiving by (trying to) provide slightly more information and by avoiding the ICE message.

10 years agoRemove two outdated FIXMEs from complex.rs
Piotr Jawniak [Wed, 21 May 2014 14:04:35 +0000 (16:04 +0200)]
Remove two outdated FIXMEs from complex.rs

10 years agoauto merge of #14324 : zecozephyr/rust/docfix, r=luqmana
bors [Wed, 21 May 2014 13:21:25 +0000 (06:21 -0700)]
auto merge of #14324 : zecozephyr/rust/docfix, r=luqmana

10 years agorustc: improve error messages from wrong --pretty flowgraph use.
Huon Wilson [Wed, 21 May 2014 12:21:11 +0000 (22:21 +1000)]
rustc: improve error messages from wrong --pretty flowgraph use.

This defers to .fatal and .span_fatal for errors (rather than `fail!`
which prints the ICE message). It also adds the span lookup when an id
doesn't correspond to a block, to show what it is pointing at.

It also makes the argument parser slightly looser, so that passing
`--pretty flowgraph` recognises the `flowgraph` part and suggests to use
an integer.

10 years agorustc: ng -> gn, fix a typo in a string.
Huon Wilson [Wed, 21 May 2014 11:53:41 +0000 (21:53 +1000)]
rustc: ng -> gn, fix a typo in a string.

10 years agorustc: rename the lint `level` enum for style.
Huon Wilson [Wed, 21 May 2014 11:50:37 +0000 (21:50 +1000)]
rustc: rename the lint `level` enum for style.

CamelCase all the way!

10 years agoauto merge of #14319 : kballard/rust/rename_rng_choose_option, r=alexcrichton
bors [Wed, 21 May 2014 11:26:23 +0000 (04:26 -0700)]
auto merge of #14319 : kballard/rust/rename_rng_choose_option, r=alexcrichton

Rng.choose() is used so rarely that it doesn't necessitate having two
methods, especially since the failing, non-option variant also requires
Clone.

[breaking-change]

10 years agoUpdated doc with correct type.
Jonathan Bailey [Wed, 21 May 2014 09:48:23 +0000 (02:48 -0700)]
Updated doc with correct type.

10 years agoauto merge of #14316 : kballard/rust/range_inclusive_no_toprimitive, r=alexcrichton
bors [Wed, 21 May 2014 09:46:23 +0000 (02:46 -0700)]
auto merge of #14316 : kballard/rust/range_inclusive_no_toprimitive, r=alexcrichton