]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agoauto merge of #13244 : cmr/rust/tbaa, r=alexcrichton
bors [Thu, 3 Apr 2014 10:42:02 +0000 (03:42 -0700)]
auto merge of #13244 : cmr/rust/tbaa, r=alexcrichton

10 years agoauto merge of #13262 : ben0x539/rust/guide-runtime-fixup, r=alexcrichton
bors [Thu, 3 Apr 2014 00:51:48 +0000 (17:51 -0700)]
auto merge of #13262 : ben0x539/rust/guide-runtime-fixup, r=alexcrichton

10 years agoauto merge of #13257 : alexcrichton/rust/index-uint, r=pnkfelix
bors [Wed, 2 Apr 2014 23:36:50 +0000 (16:36 -0700)]
auto merge of #13257 : alexcrichton/rust/index-uint, r=pnkfelix

The details are outlined in the first commit.

Closes #10453

10 years agoFix fallout of requiring uint indices
Alex Crichton [Wed, 2 Apr 2014 03:39:26 +0000 (20:39 -0700)]
Fix fallout of requiring uint indices

10 years agorustc: Require that vector indices are uints
Alex Crichton [Wed, 2 Apr 2014 03:34:40 +0000 (20:34 -0700)]
rustc: Require that vector indices are uints

This commit tightens up the restriction on types used to index slices to require
exactly `uint` indices. Previously any integral type was accepted, but this
leads to a few subtle problems:

  * 64-bit indices don't make much sense on 32-bit systems
  * Signed indices for slices used as negative indexing isn't implemented

This was discussed at the recent work week, and also has some discussion on
issue #10453.

Closes #10453

10 years agoutil: ppaux: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:47:40 +0000 (10:47 -0400)]
util: ppaux: remove dead code

10 years agoutil: common: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:47:01 +0000 (10:47 -0400)]
util: common: remove dead code

10 years agomiddle: typeck: rscope: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:46:43 +0000 (10:46 -0400)]
middle: typeck: rscope: remove dead code

10 years agomiddle: typeck: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:46:28 +0000 (10:46 -0400)]
middle: typeck: remove dead code

10 years agomiddle: typeck: infer: resolve: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:45:17 +0000 (10:45 -0400)]
middle: typeck: infer: resolve: remove dead code

10 years agomiddle: typeck: infer: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:44:51 +0000 (10:44 -0400)]
middle: typeck: infer: remove dead code

10 years agomiddle: typeck: infer: lub: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:44:29 +0000 (10:44 -0400)]
middle: typeck: infer: lub: remove dead code

10 years agomiddle: typeck: infer: combine: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:44:00 +0000 (10:44 -0400)]
middle: typeck: infer: combine: remove dead code

10 years agomiddle: typeck: check: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:39:02 +0000 (10:39 -0400)]
middle: typeck: check: remove dead code

10 years agomiddle: ty: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:38:20 +0000 (10:38 -0400)]
middle: ty: remove dead code

10 years agomiddle: trans: type_: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:37:12 +0000 (10:37 -0400)]
middle: trans: type_: remove dead code

10 years agomiddle: trans: tvec: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:33:30 +0000 (10:33 -0400)]
middle: trans: tvec: remove dead code

10 years agomiddle: trans: reflect: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:31:41 +0000 (10:31 -0400)]
middle: trans: reflect: remove dead code

10 years agomiddle: trans: meth: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:31:30 +0000 (10:31 -0400)]
middle: trans: meth: remove dead code

10 years agomiddle: trans: datum: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:29:37 +0000 (10:29 -0400)]
middle: trans: datum: remove dead code

10 years agomiddle: trans: context: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:28:56 +0000 (10:28 -0400)]
middle: trans: context: remove dead code

10 years agomiddle: trans: common: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:28:42 +0000 (10:28 -0400)]
middle: trans: common: remove dead code

10 years agomiddle: trans: callee: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:28:31 +0000 (10:28 -0400)]
middle: trans: callee: remove dead code

10 years agomiddle: trans: cabi: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:28:20 +0000 (10:28 -0400)]
middle: trans: cabi: remove dead code

10 years agomiddle: trans: builder: ignore dead code
Corey Richardson [Tue, 1 Apr 2014 14:28:08 +0000 (10:28 -0400)]
middle: trans: builder: ignore dead code

10 years agomiddle: trans: build: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:27:56 +0000 (10:27 -0400)]
middle: trans: build: remove dead code

10 years agomiddle: trans: base: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:27:40 +0000 (10:27 -0400)]
middle: trans: base: remove dead code

10 years agomiddle: trans: adt: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:27:20 +0000 (10:27 -0400)]
middle: trans: adt: remove dead code

10 years agomiddle: region: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:27:05 +0000 (10:27 -0400)]
middle: region: remove dead code

10 years agomiddle: pat_util: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:26:53 +0000 (10:26 -0400)]
middle: pat_util: remove dead code

10 years agomiddle: mem_categorization: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:26:34 +0000 (10:26 -0400)]
middle: mem_categorization: remove dead code

10 years agomiddle: lang_items: allow dead code
Corey Richardson [Tue, 1 Apr 2014 14:26:21 +0000 (10:26 -0400)]
middle: lang_items: allow dead code

10 years agomiddle: kind: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:26:05 +0000 (10:26 -0400)]
middle: kind: remove dead code

10 years agomiddle: graph: ignore dead code
Corey Richardson [Tue, 1 Apr 2014 14:25:19 +0000 (10:25 -0400)]
middle: graph: ignore dead code

10 years agomiddle: freevars: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:24:45 +0000 (10:24 -0400)]
middle: freevars: remove dead code

10 years agomiddle: dataflow: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:24:11 +0000 (10:24 -0400)]
middle: dataflow: remove dead code

10 years agomiddle: const_eval: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:23:49 +0000 (10:23 -0400)]
middle: const_eval: remove dead code

10 years agomiddle: cfg: allow dead code
Corey Richardson [Tue, 1 Apr 2014 14:23:30 +0000 (10:23 -0400)]
middle: cfg: allow dead code

10 years agomiddle: borrowck: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:20:41 +0000 (10:20 -0400)]
middle: borrowck: remove dead code

10 years agomiddle: astencode: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:20:20 +0000 (10:20 -0400)]
middle: astencode: remove dead code

10 years agometadata: filesearch: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:19:42 +0000 (10:19 -0400)]
metadata: filesearch: remove dead code

10 years agometadata: decoder: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:19:25 +0000 (10:19 -0400)]
metadata: decoder: remove dead code

10 years agoauto merge of #13248 : tedhorst/rust/master, r=alexcrichton
bors [Wed, 2 Apr 2014 15:16:42 +0000 (08:16 -0700)]
auto merge of #13248 : tedhorst/rust/master, r=alexcrichton

10 years agodoc: Remove dated "libgreen is default" statement.
Benjamin Herr [Wed, 2 Apr 2014 14:56:31 +0000 (16:56 +0200)]
doc: Remove dated "libgreen is default" statement.

10 years agoauto merge of #13177 : huonw/rust/devec-rand, r=alexcrichton
bors [Wed, 2 Apr 2014 13:01:44 +0000 (06:01 -0700)]
auto merge of #13177 : huonw/rust/devec-rand, r=alexcrichton

Remove ~[] from librand, rename Rng.shuffle_mut to .shuffle.

See commits.

10 years agorand: replace Rng.shuffle's functionality with .shuffle_mut.
Huon Wilson [Thu, 27 Mar 2014 12:01:41 +0000 (23:01 +1100)]
rand: replace Rng.shuffle's functionality with .shuffle_mut.

Deprecates the `shuffle_mut` name in favour of `shuffle` too.

In future there will be many different types of owned
vectors/vector-likes (e.g. DST's ~[], Vec, SmallVec, Rope, ...), and so
privileging just `Vec` with the "functional" `shuffle` method is silly.

10 years agorand: remove (almost) all ~[]'s from Vec.
Huon Wilson [Thu, 27 Mar 2014 12:00:46 +0000 (23:00 +1100)]
rand: remove (almost) all ~[]'s from Vec.

There are a few instances of them in tests which are using functions
from std etc. that still are using ~[].

10 years agoauto merge of #13243 : huonw/rust/cellshow, r=thestinger
bors [Wed, 2 Apr 2014 09:21:39 +0000 (02:21 -0700)]
auto merge of #13243 : huonw/rust/cellshow, r=thestinger

std: fix Cell's Show instance.

Previously it was printing the address of the Unsafe contained in the
Cell (i.e. the address of the Cell itself). This is clearly useless, and
was presumably a mistake due to writing `*&` instead of `&*`.

However, this later expression is likely also incorrect, since it takes
a reference into a Cell while other user code is executing (i.e. the
Show instance for the contained type), hence the contents should just be
copied out.

10 years agoauto merge of #13242 : huonw/rust/release-note-edits, r=alexcrichton
bors [Wed, 2 Apr 2014 07:06:40 +0000 (00:06 -0700)]
auto merge of #13242 : huonw/rust/release-note-edits, r=alexcrichton

Minor adjustments to the 0.10 release notes.

Mention another lint, fix a typo, and rearrange some things.

10 years agoauto merge of #13235 : klutzy/rust/doc-faq-win, r=alexcrichton
bors [Wed, 2 Apr 2014 05:41:42 +0000 (22:41 -0700)]
auto merge of #13235 : klutzy/rust/doc-faq-win, r=alexcrichton

10 years agoauto merge of #13241 : stepancheg/rust/push-all, r=alexcrichton
bors [Wed, 2 Apr 2014 04:21:48 +0000 (21:21 -0700)]
auto merge of #13241 : stepancheg/rust/push-all, r=alexcrichton

* push_all* operations should reserve capacity before pushing data to avoid unnecessary reallocations
* reserve_exact should never shrink, as specified in documentation

10 years agoauto merge of #13240 : sfackler/rust/time-pub, r=alexcrichton
bors [Tue, 1 Apr 2014 23:41:53 +0000 (16:41 -0700)]
auto merge of #13240 : sfackler/rust/time-pub, r=alexcrichton

10 years agoMinor adjustments to the 0.10 release notes.
Huon Wilson [Tue, 1 Apr 2014 11:55:09 +0000 (22:55 +1100)]
Minor adjustments to the 0.10 release notes.

Mention another lint, fix a typo, and rearrange some things.

10 years agoauto merge of #13234 : seanmonstar/rust/pr/12947, r=alexcrichton
bors [Tue, 1 Apr 2014 21:46:47 +0000 (14:46 -0700)]
auto merge of #13234 : seanmonstar/rust/pr/12947, r=alexcrichton

this is useful for macros like vec! which construct containers

rebase of #12947 because I'm impatient.

10 years agoauto merge of #13225 : thestinger/rust/num, r=cmr
bors [Tue, 1 Apr 2014 20:26:49 +0000 (13:26 -0700)]
auto merge of #13225 : thestinger/rust/num, r=cmr

The `Float` trait methods will be usable as functions via UFCS, and
we came to a consensus to remove duplicate functions like this a long
time ago.

It does still make sense to keep the duplicate functions when the trait
methods are static, unless the decision to leave out the in-scope trait
name resolution for static methods changes.

10 years agoReimplement Vec::push_all* with .extend
Stepan Koltsov [Tue, 1 Apr 2014 20:16:59 +0000 (20:16 +0000)]
Reimplement Vec::push_all* with .extend

It is shorter and also fixes missed reserve call.

10 years agoVec::reserve_exact should not shrink
Stepan Koltsov [Tue, 1 Apr 2014 20:16:59 +0000 (20:16 +0000)]
Vec::reserve_exact should not shrink

reserve_exact should not shrink according to documentation.

10 years agoauto merge of #13115 : huonw/rust/rand-errors, r=alexcrichton
bors [Tue, 1 Apr 2014 18:11:51 +0000 (11:11 -0700)]
auto merge of #13115 : huonw/rust/rand-errors, r=alexcrichton

move errno -> IoError converter into std, bubble up OSRng errors

Also adds a general errno -> `~str` converter to `std::os`, and makes the failure messages for the things using `OSRng` (e.g. (transitively) the task-local RNG, meaning hashmap initialisation failures aren't such a black box).

10 years agomake Cmplx fields public
Ted Horst [Tue, 1 Apr 2014 17:58:13 +0000 (12:58 -0500)]
make Cmplx fields public

10 years agometadata: cstore: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:19:10 +0000 (10:19 -0400)]
metadata: cstore: remove dead code

10 years agometadata: csearch: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:18:53 +0000 (10:18 -0400)]
metadata: csearch: remove dead code

10 years agometadata: common: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:17:32 +0000 (10:17 -0400)]
metadata: common: remove dead code

10 years agolib: llvm: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:17:18 +0000 (10:17 -0400)]
lib: llvm: remove dead code

10 years agoback: link: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:16:58 +0000 (10:16 -0400)]
back: link: remove dead code

10 years agoback: archive: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:16:46 +0000 (10:16 -0400)]
back: archive: remove dead code

10 years agoback: abi: remove dead code
Corey Richardson [Tue, 1 Apr 2014 14:12:02 +0000 (10:12 -0400)]
back: abi: remove dead code

10 years agostd: fix Cell's Show instance.
Huon Wilson [Tue, 1 Apr 2014 12:58:31 +0000 (23:58 +1100)]
std: fix Cell's Show instance.

Previously it was printing the address of the Unsafe contained in the
Cell (i.e. the address of the Cell itself). This is clearly useless, and
was presumably a mistake due to writing `*&` instead of `&*`.

However, this later expression is likely also incorrect, since it takes
a reference into a Cell while other user code is executing (i.e. the
Show instance for the contained type), hence the contents should just be
copied out.

10 years agorustc: make comments on CrateContext doc comments
Corey Richardson [Tue, 1 Apr 2014 11:11:23 +0000 (07:11 -0400)]
rustc: make comments on CrateContext doc comments

10 years agoremove the cmath module
Daniel Micay [Tue, 1 Apr 2014 09:11:23 +0000 (05:11 -0400)]
remove the cmath module

This is an implementation detail of the `f32` and `f64` modules and it
should not be public. It renames many functions and leaves out any
provided by LLVM intrinsics, so it is not a sensible binding to the C
standard library's math library and will never be a stable target.

This also removes the abuse of link_name so that this can be switched to
using automatically generated definitions in the future. This also
removes the `scalbn` binding as it is equivalent to `ldexp` when
`FLT_RADIX` is 2, which must always be true for Rust.

10 years agorand: bubble up IO messages futher.
Huon Wilson [Tue, 25 Mar 2014 05:13:11 +0000 (16:13 +1100)]
rand: bubble up IO messages futher.

The various ...Rng::new() methods can hit IO errors from the OSRng they use,
and it seems sensible to expose them at a higher level. Unfortunately, writing
e.g. `StdRng::new().unwrap()` gives a much poorer error message than if it
failed internally, but this is a problem with all `IoResult`s.

10 years agorand: bubble up IO errors when creating an OSRng.
Huon Wilson [Mon, 24 Mar 2014 13:41:43 +0000 (00:41 +1100)]
rand: bubble up IO errors when creating an OSRng.

10 years agostd: migrate the errno -> IoError converter from libnative.
Huon Wilson [Mon, 24 Mar 2014 13:39:40 +0000 (00:39 +1100)]
std: migrate the errno -> IoError converter from libnative.

This also adds a direct `errno` -> `~str` converter, rather than only
being possible to get a string for the very last error.

10 years agoMake libtime fields public
Steven Fackler [Tue, 1 Apr 2014 06:47:49 +0000 (23:47 -0700)]
Make libtime fields public

10 years agosyntax: allow stmt/expr macro invocations to be delimited by [].
Gábor Lehel [Sun, 16 Mar 2014 21:46:04 +0000 (22:46 +0100)]
syntax: allow stmt/expr macro invocations to be delimited by [].

this is useful for macros like vec! which construct containers

10 years agodoc: Update windows status on FAQ
klutzy [Tue, 1 Apr 2014 01:42:42 +0000 (10:42 +0900)]
doc: Update windows status on FAQ

10 years agoauto merge of #13184 : alexcrichton/rust/priv-fields, r=brson
bors [Mon, 31 Mar 2014 22:51:33 +0000 (15:51 -0700)]
auto merge of #13184 : alexcrichton/rust/priv-fields, r=brson

This is an implementation of a portion of [RFC #4](https://github.com/rust-lang/rfcs/blob/master/active/0004-private-fields.md). This PR makes named struct fields private by default (as opposed to inherited by default).

The only real meaty change is the first commit to `rustc`, all other commits are just fallout of that change.

Summary of changes made:

* Named fields are private by default *everywhere*
* The `priv` keyword is now default-deny on named fields (done in a "lint" pass in privacy)

Changes yet to be done (before the RFC is closed)

* Change tuple structs to have private fields by default
* Remove `priv` enum variants
* Make `priv` a reserved keyword

10 years agodoc: Update with changes in field privacy
Alex Crichton [Fri, 28 Mar 2014 22:00:40 +0000 (15:00 -0700)]
doc: Update with changes in field privacy

10 years agourl: Switch privacy defaults where necessary
Alex Crichton [Fri, 28 Mar 2014 19:41:44 +0000 (12:41 -0700)]
url: Switch privacy defaults where necessary

10 years agocompiletest: Switch field privacy where necessary
Alex Crichton [Fri, 28 Mar 2014 18:10:15 +0000 (11:10 -0700)]
compiletest: Switch field privacy where necessary

10 years agorpass/cfail: Update field privacy where necessary
Alex Crichton [Fri, 28 Mar 2014 18:09:31 +0000 (11:09 -0700)]
rpass/cfail: Update field privacy where necessary

10 years agonum: Switch field privacy as necessary
Alex Crichton [Fri, 28 Mar 2014 17:27:45 +0000 (10:27 -0700)]
num: Switch field privacy as necessary

10 years agogreen: Switch field privacy as necessary
Alex Crichton [Fri, 28 Mar 2014 17:27:34 +0000 (10:27 -0700)]
green: Switch field privacy as necessary

10 years agorustdoc: Switch field privacy as necessary
Alex Crichton [Fri, 28 Mar 2014 17:27:24 +0000 (10:27 -0700)]
rustdoc: Switch field privacy as necessary

10 years agorustuv: Switch field privacy as necessary
Alex Crichton [Fri, 28 Mar 2014 17:27:14 +0000 (10:27 -0700)]
rustuv: Switch field privacy as necessary

10 years agoworkcache: Switch field privacy as necessary
Alex Crichton [Fri, 28 Mar 2014 17:27:01 +0000 (10:27 -0700)]
workcache: Switch field privacy as necessary

10 years agoglob: Switch field privacy as necessary
Alex Crichton [Fri, 28 Mar 2014 17:26:43 +0000 (10:26 -0700)]
glob: Switch field privacy as necessary

10 years agorustc: Switch field privacy as necessary
Alex Crichton [Fri, 28 Mar 2014 17:05:27 +0000 (10:05 -0700)]
rustc: Switch field privacy as necessary

10 years agosyntax: Switch field privacy as necessary
Alex Crichton [Thu, 27 Mar 2014 22:39:48 +0000 (15:39 -0700)]
syntax: Switch field privacy as necessary

10 years agotest: Switch field privacy as necessary
Alex Crichton [Thu, 27 Mar 2014 22:15:28 +0000 (15:15 -0700)]
test: Switch field privacy as necessary

10 years agoterm: Switch field privacy as necessary
Alex Crichton [Thu, 27 Mar 2014 22:13:45 +0000 (15:13 -0700)]
term: Switch field privacy as necessary

10 years agoserialize: Switch field privacy as necessary
Alex Crichton [Thu, 27 Mar 2014 22:13:35 +0000 (15:13 -0700)]
serialize: Switch field privacy as necessary

10 years agolog: Swith field privacy as necessary
Alex Crichton [Thu, 27 Mar 2014 22:13:27 +0000 (15:13 -0700)]
log: Swith field privacy as necessary

10 years agoarena: Switch field privacy as necessary
Alex Crichton [Thu, 27 Mar 2014 22:13:16 +0000 (15:13 -0700)]
arena: Switch field privacy as necessary

10 years agosync: Switch field privacy as necessary
Alex Crichton [Thu, 27 Mar 2014 22:10:45 +0000 (15:10 -0700)]
sync: Switch field privacy as necessary

10 years agorand: Switch field privacy as necessary
Alex Crichton [Thu, 27 Mar 2014 22:10:38 +0000 (15:10 -0700)]
rand: Switch field privacy as necessary

10 years agonative: Switch field privacy as necessary
Alex Crichton [Thu, 27 Mar 2014 22:10:28 +0000 (15:10 -0700)]
native: Switch field privacy as necessary

10 years agogetopts: Switch field privacy as necessary
Alex Crichton [Thu, 27 Mar 2014 22:10:18 +0000 (15:10 -0700)]
getopts: Switch field privacy as necessary

10 years agocollections: Switch field privacy as necessary
Alex Crichton [Thu, 27 Mar 2014 22:10:04 +0000 (15:10 -0700)]
collections: Switch field privacy as necessary

10 years agostd: Switch field privacy as necessary
Alex Crichton [Thu, 27 Mar 2014 22:09:47 +0000 (15:09 -0700)]
std: Switch field privacy as necessary

10 years agonum: rm wrapping of `Float` methods as functions
Daniel Micay [Mon, 31 Mar 2014 11:00:26 +0000 (07:00 -0400)]
num: rm wrapping of `Float` methods as functions

The `Float` trait methods will be usable as functions via UFCS, and
we came to a consensus to remove duplicate functions like this a long
time ago.

It does still make sense to keep the duplicate functions when the trait
methods are static, unless the decision to leave out the in-scope trait
name resolution for static methods changes.