Commit Graph

34077 Commits

Author SHA1 Message Date
Jauhien Piatlicki
e889f8091a Look for standard crates in LIBDIR provided by --libdir option,
not in hardcoded libdir path. If there was no LIBDIR provided
during configuration fallback to hardcoded paths.

Thanks to Jan Niklas Hasse for solution and to Alex Crichton for improvements.

Closes #11671
2014-11-16 01:01:11 +01:00
bors
7e43f419cb auto merge of #18924 : cakebaker/rust/fix_list, r=steveklabnik 2014-11-15 13:22:24 +00:00
bors
d3af16bdbb auto merge of #18922 : japaric/rust/for, r=jakub-
r? @alexcrichton
2014-11-15 11:37:21 +00:00
bors
bc0b6120c1 auto merge of #18901 : steveklabnik/rust/quickfix, r=alexcrichton
Small copy/paste error from the crates guide.
2014-11-15 07:12:27 +00:00
bors
d91a015ab4 auto merge of #18894 : ArtemGr/rust/patch-1, r=pnkfelix
A typo about Results being panics crawled in. Fixing it.
2014-11-14 23:37:27 +00:00
bors
1e4e55aebc auto merge of #18880 : barosl/rust/doc-fail-to-panic, r=alexcrichton
I found some occurrences of "failure" and "fails" in the documentation. I changed them to "panics" if it means a task panic. Otherwise I left it as is, or changed it to "errors" to clearly distinguish them.

Also, I made a minor fix that is breaking the layout of a module page. "Example" is shown in an irrelevant place from the following page: http://doc.rust-lang.org/std/os/index.html
2014-11-14 18:17:28 +00:00
bors
1bf0649544 auto merge of #18893 : bkoropoff/rust/issue-18883, r=alexcrichton
This was a simple case of substitutions being applied inconsistently.  I haven't investigated why type parameters are actually showing up in the closure type here, but trans needs to handle them correctly in any case.
2014-11-14 15:22:28 +00:00
bors
4963afdc7b auto merge of #18891 : erickt/rust/deprecate-as-ref, r=alexcrichton
It seems odd that the `AsRefReader`/`AsRefWriter` have the single method `by_ref()`. This creates the new traits `ByRefReader`/`ByRefWriter` and deprecates the old traits.
2014-11-14 13:17:24 +00:00
bors
bb2168c525 auto merge of #18840 : huonw/rust/tweaks, r=alexcrichton
Fix some old papercuts with diagnostics, e.g. tweaking spans, rewording messages. See individual commits.
2014-11-14 08:17:19 +00:00
bors
6f7081fad5 auto merge of #18827 : bjz/rust/rfc369-numerics, r=alexcrichton
This implements a considerable portion of rust-lang/rfcs#369 (tracked in #18640). Some interpretations had to be made in order to get this to work. The breaking changes are listed below:

[breaking-change]

- `core::num::{Num, Unsigned, Primitive}` have been deprecated and their re-exports removed from the `{std, core}::prelude`.
- `core::num::{Zero, One, Bounded}` have been deprecated. Use the static methods on `core::num::{Float, Int}` instead. There is no equivalent to `Zero::is_zero`. Use `(==)` with `{Float, Int}::zero` instead.
- `Signed::abs_sub` has been moved to `std::num::FloatMath`, and is no longer implemented for signed integers.
- `core::num::Signed` has been removed, and its methods have been moved to `core::num::Float` and a new trait, `core::num::SignedInt`. The methods now take the `self` parameter by value.
- `core::num::{Saturating, CheckedAdd, CheckedSub, CheckedMul, CheckedDiv}` have been removed, and their methods moved to `core::num::Int`. Their parameters are now taken by value. This means that
- `std::time::Duration` no longer implements `core::num::{Zero, CheckedAdd, CheckedSub}` instead defining the required methods non-polymorphically.
- `core::num::{zero, one, abs, signum}` have been deprecated. Use their respective methods instead.
- The `core::num::{next_power_of_two, is_power_of_two, checked_next_power_of_two}` functions have been deprecated in favor of methods defined a new trait, `core::num::UnsignedInt`
- `core::iter::{AdditiveIterator, MultiplicativeIterator}` are now only implemented for the built-in numeric types.
- `core::iter::{range, range_inclusive, range_step, range_step_inclusive}` now require `core::num::Int` to be implemented for the type they a re parametrized over.
2014-11-14 05:37:17 +00:00
Brendan Zabarauskas
c9e6bda9c7 Revert the need for initial values with arithmetic iterators 2014-11-14 15:35:44 +11:00
bors
a58fc68223 auto merge of #18929 : alexcrichton/rust/issue-18928, r=brson
Apparently it's not found on win64!

Closes #18928
2014-11-14 01:52:14 +00:00
bors
b1c84d6be8 auto merge of #18926 : alexcrichton/rust/issue-18925, r=huonw
The subtraction was erroneously backwards, returning negative durations!

Closes #18925
2014-11-13 23:37:21 +00:00
bors
15ba87f031 auto merge of #18887 : aturon/rust/controlled-inherit, r=alexcrichton
This patch tweaks the stability inheritance infrastructure so that
`#{stable]` attributes are not inherited. Doing so solves two problems:

1. It allows us to mark module *names* as stable without accidentally
marking the items they contain as stable.

2. It means that a `#[stable]` attribution must always appear directly
on the item it applies to, which makes it easier for reviewers to catch
changes to stable APIs.

Fixes #17484
2014-11-13 19:32:21 +00:00
Alex Crichton
b73bc79d12 etc: Don't bundle libctl3d32 on windows
Apparently it's not found on win64!

Closes #18928
2014-11-13 09:28:26 -08:00
Alex Crichton
877139495d std: Fix the return value of Duration::span
The subtraction was erroneously backwards, returning negative durations!

Closes #18925
2014-11-13 09:03:33 -08:00
Daniel Hofstetter
e8056a452f Reference: Fix list in Expressions section 2014-11-13 16:05:07 +01:00
bors
37ea270acc auto merge of #18811 : pczarn/rust/issue-18763-ice, r=pnkfelix
Fix ICEs introduced in #17830

* fixed get_tt for doc comments
* properly handle MatchNt in `quote`

Fixes #18763
Fixes #18775
2014-11-13 14:17:10 +00:00
Jorge Aparicio
e5ef55675b fix "warning: deprecated syntax, use for keyword now" 2014-11-13 08:59:44 -05:00
bors
82f383839c auto merge of #18879 : pcwalton/rust/path-silliness, r=aturon
This breaks code like:

    struct Foo {
        x: int,
    }

    let f: Foo = ...;
    ... f.x::<int> ...

Change this code to not contain an unused type parameter. For example:

    struct Foo {
        x: int,
    }

    let f: Foo = ...;
    ... f.x ...

Closes #18680.

[breaking-change]

r? @aturon
2014-11-13 12:27:03 +00:00
bors
f6c0250139 auto merge of #18877 : michaelsproul/rust/panic-tests, r=alexcrichton
I'm fairly sure all these tests refer to task panics. I skim read them all, but there's a small chance I renamed something too eagerly.
2014-11-13 10:37:06 +00:00
bors
5db8381c7e auto merge of #18872 : hirschenberger/rust/master, r=thestinger
Discussed in #18587
2014-11-13 08:17:09 +00:00
bors
e2cd4765fb auto merge of #18867 : michaelsproul/rust/unreachable-formatting, r=pcwalton
Closes #18842.
2014-11-13 06:12:10 +00:00
Huon Wilson
661598cef0 Use the correct span for out-of-range int literals.
This corrects the error message to point at the literal, not the next
token.

Closes #17123.
2014-11-13 13:43:01 +11:00
Huon Wilson
26282ac337 Add more "help: ..."'s to the parser.
Adds a method for printing a fatal error and also a help message to the
parser and uses this in a variety of places to improve error messages.

Closes #12213.
2014-11-13 13:43:00 +11:00
Huon Wilson
e621e3216b Add error message specific to \<carriage return>.
This can crop-up with a misconfigured editor or an unexpected
interaction between version control and certain operating systems.

Closes #11669.
2014-11-13 13:43:00 +11:00
Huon Wilson
ceff2ca1fc Tweak and add test for detecting libraries with mismatching target triples.
Closes #10814.
2014-11-13 13:40:25 +11:00
bors
6a62ad3e29 auto merge of #18862 : murarth/rust/issue-18566-test, r=alexcrichton 2014-11-13 02:37:05 +00:00
bors
5745e41950 auto merge of #18858 : alexcrichton/rust/remove-time, r=jakub
This commit deprecates the entire libtime library in favor of the
externally-provided libtime in the rust-lang organization. Users of the
`libtime` crate as-is today should add this to their Cargo manifests:

    [dependencies.time]
    git = "https://github.com/rust-lang/time"

To implement this transition, a new function `Duration::span` was added to the
`std::time::Duration` time. This function takes a closure and then returns the
duration of time it took that closure to execute. This interface will likely
improve with `FnOnce` unboxed closures as moving in and out will be a little
easier.

Due to the deprecation of the in-tree crate, this is a:

[breaking-change]

cc #18855, some of the conversions in the `src/test/bench` area may have been a
little nicer with that implemented
2014-11-12 22:57:16 +00:00
bors
7a86aa83ee auto merge of #18907 : alexcrichton/rust/snapshots, r=jakub-,jakub 2014-11-12 21:07:09 +00:00
Alex Crichton
065e39bb2f Register new snapshots 2014-11-12 12:17:55 -08:00
bors
e1149f0223 auto merge of #18830 : adaszko/rust/patch-1, r=steveklabnik 2014-11-12 17:22:05 +00:00
Alex Crichton
fcd05ed99f time: Deprecate the library in the distribution
This commit deprecates the entire libtime library in favor of the
externally-provided libtime in the rust-lang organization. Users of the
`libtime` crate as-is today should add this to their Cargo manifests:

    [dependencies.time]
    git = "https://github.com/rust-lang/time"

To implement this transition, a new function `Duration::span` was added to the
`std::time::Duration` time. This function takes a closure and then returns the
duration of time it took that closure to execute. This interface will likely
improve with `FnOnce` unboxed closures as moving in and out will be a little
easier.

Due to the deprecation of the in-tree crate, this is a:

[breaking-change]

cc #18855, some of the conversions in the `src/test/bench` area may have been a
little nicer with that implemented
2014-11-12 09:18:35 -08:00
Brendan Zabarauskas
064e84e30b Fix stability_summary fallout 2014-11-13 03:46:39 +11:00
Brendan Zabarauskas
de938b6ca1 Remove Signed trait and add SignedInt trait
The methods have been moved into Float and SignedInt
2014-11-13 03:46:03 +11:00
Brendan Zabarauskas
e965ba85ca Remove lots of numeric traits from the preludes
Num, NumCast, Unsigned, Float, Primitive and Int have been removed.
2014-11-13 03:46:03 +11:00
Steve Klabnik
607eb12ab7 Fix po4a.conf 2014-11-12 11:34:00 -05:00
Brendan Zabarauskas
891559e30d Clean up core::num doc comments 2014-11-13 02:04:31 +11:00
Brendan Zabarauskas
878bebfb63 Deprecate signum wrapper and clean up signed impls 2014-11-13 02:04:31 +11:00
Brendan Zabarauskas
26196715e8 Deprecate Num, Unsigned and Primitive 2014-11-13 02:04:31 +11:00
Brendan Zabarauskas
46333d527b Deprecate Zero and One traits 2014-11-13 02:04:31 +11:00
Brendan Zabarauskas
0da49dcf13 Deprecate Bounded trait 2014-11-13 02:02:44 +11:00
Brendan Zabarauskas
e51cc089da Move checked arithmetic operators into Int trait 2014-11-13 02:02:44 +11:00
Brendan Zabarauskas
7e57cd843c Rejig Int impl macros
This should make implementing the checked operator methods easier
2014-11-13 02:02:44 +11:00
Brendan Zabarauskas
d431a67cec Move saturating operator methods into Int 2014-11-13 02:02:44 +11:00
Brendan Zabarauskas
d1eb68e8d7 Create UnsignedInt trait and deprecate free functions 2014-11-13 02:02:44 +11:00
Brendan Zabarauskas
9fe94bd995 Move abs_sub to FloatMath
This removes the need for libcore to depend on libm. `abs_sub` is not as useful for integers.
2014-11-13 02:02:44 +11:00
Brendan Zabarauskas
e6db701d5b Deprecate Signed method wrappers 2014-11-13 02:02:43 +11:00
Brendan Zabarauskas
8666812dce Take parameters by-value in Signed trait 2014-11-13 02:02:43 +11:00
bors
e4ead7b034 auto merge of #18860 : aturon/rust/reexports-in-stab-summary, r=brson
Previously, the stability summary page attempted to associate impl
blocks with the module in which they were defined, rather than the
module defining the type they apply to (which is usually, but not
always, the same). Unfortunately, due to the basic architecture of
rustdoc, this meant that impls from re-exports were not being counted.

This commit makes the stability summary work the same way that rustdoc's
rendered output does: all methods are counted alongside the type they
apply to, no matter where the methods are defined.

In addition, for trait impl blocks only the stability of the overall
block is counted; the stability of the methods within is not
counted (since that stability level is part of the trait definition).

Fixes #18812
2014-11-12 12:21:57 +00:00