Commit Graph

34250 Commits

Author SHA1 Message Date
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
bors
e82f60eb47 auto merge of #18813 : csherratt/rust/add-encode-decode-vecmap, r=alexcrichton 2014-11-11 22:37:05 +00:00
Barosl Lee
5969bf663e Fix documentation bug
The first paragraph must be separated from the next paragraph.
Otherwise, rustdoc will consider the content of the latter as part of
the title.
2014-11-12 03:48:42 +09:00
Patrick Walton
e6e58e43f8 libsyntax: Forbid type parameters in field expressions.
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]
2014-11-11 10:45:59 -08:00
Barosl Lee
8bf77fa786 Fix remaining documentation to reflect fail!() -> panic!()
Throughout the docs, "failure" was replaced with "panics" if it means a
task panic. Otherwise, it remained as is, or changed to "errors" to
clearly differentiate it from a task panic.
2014-11-12 03:36:09 +09:00
bors
351f7afd06 auto merge of #18793 : swgillespie/rust/master, r=alexcrichton
I noticed today that `move` wasn't getting highlighted in my editor of choice (emacs), so I went ahead and added it as a keyword in the emacs, vim, and kate editor files. Apparently it has already been done for gedit.
2014-11-11 18:26:56 +00:00
Michael Sproul
7f0b9d4465 test: Rename files, fail -> panic. 2014-11-11 09:36:12 -08:00
bors
8f87538786 auto merge of #18821 : arielb1/rust/fnv-hash-map, r=eddyb
This should improve performance
2014-11-11 16:22:04 +00:00
bors
5d29209bda auto merge of #18808 : ebfe/rust/lint-names, r=alexcrichton 2014-11-11 12:21:59 +00:00
bors
5c058418df auto merge of #18797 : vadimcn/rust/prefer-bundled2, r=alexcrichton
Based on Windows bundle feedback we got to date, 
- We *do* want to prefer the bundled linker: The external one might be for the wrong architecture (e.g. 32 bit vs 64 bit).  On the other hand, binutils don't add many new features these days, so using an older bundled linker is not likely to be a problem.
- We *do* want to prefer bundled libraries: The external ones might not have the symbols we expect (e.g. what's needed for DWARF exceptions vs SjLj).  Since `-L rustlib/<triple>/lib` appears first on the linker command line, it's a good place to keep our platform libs that we want to be found first.

Closes #18325, closes #17726.
2014-11-11 10:12:00 +00:00
Falco Hirschenberger
7dab903725 Set exceeding bitshifts lint to deny
Discussed in #18587
2014-11-11 10:41:53 +01:00
Sean Gillespie
27774e8e24 Add 'move' keyword to emacs, kate, and vim editor modes. 2014-11-10 23:46:36 -08:00
bors
d962fb0ec8 auto merge of #18789 : cuviper/rust/vim-move, r=alexcrichton
It used to be in `rustKeyword`, until commit 5c75f210ba removed it, and then #18782 restored it again.  However, this is now a closure modifier, and I think moving it to `rustStorage` is more appropriate to highlight it similarly to `mut`, `ref`, and the `&` sigil.
2014-11-11 07:16:56 +00:00
bors
66c3c8e3e6 auto merge of #18766 : liigo/rust/improve-inner-attr-msg, r=huonw
for the code:
```
use std::io;

#![crate_type="rlib"] // ERROR: an inner attribute is not permitted in this context

fn say_hello() {
	println!("hello");
}
```

this PR provides another note to help programmer fixing this error more easily:
```
hello.rs:6:3: 6:4 error: an inner attribute is not permitted in this context
hello.rs:6 #![crate_type="rlib"]
             ^
hello.rs:6:3: 6:4 note: put inner attribute in top of file or block
hello.rs:6 #![crate_type="rlib"]
             ^
```
2014-11-11 04:26:57 +00:00
Michael Sproul
837dd14de3 Add optional messages to the unreachable macro.
Closes #18842.
2014-11-10 19:35:25 -08:00
bors
60820ba528 auto merge of #18753 : jbcrail/rust/fix-deprecated-enum-set, r=alexcrichton
I renamed the deprecated methods, resulting from the collection reform.
2014-11-11 02:11:54 +00:00
Liigo Zhuang
0a52cc3534 syntax: improve message for misused inner attributes 2014-11-11 08:53:26 +08:00
Murarth
67a694443e Add regression test for #18566 2014-11-10 16:47:32 -07:00
Aaron Turon
5f09a50e8f rustdoc: revise method counts in stability summary
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-10 15:36:03 -08:00