Commit Graph

34168 Commits

Author SHA1 Message Date
Ian Connolly
769d49a8b7 Don't use rust keyword for fake code 2014-11-13 19:52:08 +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
areski
4aa2040cc7 convert 1 line match to 2 lines for readability 2014-11-13 17:58:03 +01: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
bors
7ea23e5627 auto merge of #18854 : thestinger/rust/spawn, r=aturon
cc https://github.com/rust-lang/rust/issues/18000
2014-11-12 10:27:01 +00:00
bors
a2dee35e01 auto merge of #18841 : Manishearth/rust/doc-ty, r=alexcrichton
I'll probably start documenting the rest of `syntax::ast` whenever I get time.
2014-11-12 08:32:03 +00:00
Artem
7b28ba0778 Results aren't panics
A typo about Results being panics crawled in. Fixing it.
2014-11-12 11:18:30 +03:00
Brian Koropoff
01358587a5 Add regression test for #18883 2014-11-11 21:27:11 -08:00
bors
4d5e7f3249 auto merge of #18833 : slashgrin/rust/patch-1, r=brson
Should refer to handling panicking tasks like any other computation
that may _fail_, not any other computation that may _panic_.
2014-11-12 05:27:02 +00:00
Brian Koropoff
6de477cef8 Fix inconsistent use of substs in trans_unboxing_shim
Substs were not applied when calling `untuple_arguments_if_necessary`.
Just apply them once at the start of the function, rebinding `fty`.
Also change the function to take them by reference since we don't
need to consume them at all.  Closes #18883
2014-11-11 21:24:36 -08:00
Erick Tryzelaar
0ab861aa2d std: Rename AsRef{Reader,Writer} to ByRef{Reader,Writer} 2014-11-11 17:51:43 -08:00
Luqman Aden
04a02ffb94 librustc: Respect no-compiler-rt target option for static libs as well. 2014-11-11 20:24:17 -05:00
Luqman Aden
27ea11eda8 librustc: Allow linkage attribute on any statics, not just foreign statics. 2014-11-11 20:24:17 -05:00
Aaron Turon
8352195426 Update tests for new stability inheritance rules 2014-11-11 15:06:54 -08:00
Aaron Turon
5b895a833a rustc: do not inherit #[stable]
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-11 15:06:54 -08:00