]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoMake function pointers implement traits for up to 12 parameters
Manish Goregaokar [Mon, 21 Sep 2015 08:51:30 +0000 (14:21 +0530)]
Make function pointers implement traits for up to 12 parameters

(12 was chosen to be consistent with what we do for tuples)

Fixes #28559

8 years agoAuto merge of #28539 - rkruppe:shuffle-num-internals, r=alexcrichton
bors [Sun, 20 Sep 2015 23:14:58 +0000 (23:14 +0000)]
Auto merge of #28539 - rkruppe:shuffle-num-internals, r=alexcrichton

Move private bignum module to core::num, because it is not only used in flt2dec.
Extract private 80-bit soft-float into new core::num module for the same reason.

8 years agoAuto merge of #28534 - marcusklaas:fix-mod-inner-span, r=alexcrichton
bors [Sun, 20 Sep 2015 21:31:24 +0000 (21:31 +0000)]
Auto merge of #28534 - marcusklaas:fix-mod-inner-span, r=alexcrichton

Fixes https://github.com/rust-lang/rust/issues/28520.

r? @alexcrichton or @nrc?

8 years agoAuto merge of #28429 - wesleywiser:split_up_lints, r=alexcrichton
bors [Sun, 20 Sep 2015 19:48:12 +0000 (19:48 +0000)]
Auto merge of #28429 - wesleywiser:split_up_lints, r=alexcrichton

This breaks out some of the lints defined in `librustc_lint/builtin.rs` into two new modules: `unused` for the `UNUSED_*` lints and `bad_style` for the various style related lints as suggested in #22206. `builtin.rs` could probably get broken up more but this is a start.

8 years agoAuto merge of #28501 - semarie:stdcpp-path, r=alexcrichton
bors [Sun, 20 Sep 2015 18:04:52 +0000 (18:04 +0000)]
Auto merge of #28501 - semarie:stdcpp-path, r=alexcrichton

By default, the linker in use under OpenBSD is the linker of base, which
don't include /usr/local/lib where libstdc++ of gcc-4.9 lives. We need
to add this directory to linker-path-search (using -L).

Search the path of libstdc++.a, which is a known name (libstdc++.so has
SO_VERSION) in the same directory.

r? @alexcrichton

this commit needs #28495 to be commited first. It should be the last piece for building rustc under OpenBSD from scratch.

8 years agoPass libstdc++.so path to linker under OpenBSD
Sébastien Marie [Fri, 18 Sep 2015 21:02:05 +0000 (23:02 +0200)]
Pass libstdc++.so path to linker under OpenBSD

By default, the linker in use under OpenBSD is the linker of base, which
don't include /usr/local/lib where libstdc++ of gcc-4.9 lives. We need
to add this directory to linker-path-search (using -L).

Search the path of libstdc++.a, which is a known name (libstdc++.so has
SO_VERSION) in the same directory.

8 years agoReorganize core::num internals
Robin Kruppe [Sun, 20 Sep 2015 16:34:33 +0000 (18:34 +0200)]
Reorganize core::num internals

Move private bignum module to core::num, because it is not only used in flt2dec.
Extract private 80-bit soft-float into new core::num module for the same reason.

8 years agoAuto merge of #28499 - semmaz:doc-anchor-fix, r=steveklabnik
bors [Sun, 20 Sep 2015 16:21:43 +0000 (16:21 +0000)]
Auto merge of #28499 - semmaz:doc-anchor-fix, r=steveklabnik

This changes how rustic generate `id` and `href` attributes for section header anchor. Now they are more github-like.

Also fixes breakage in docs caused by this and broken links in "Error Handling" section of book.

r? @steveklabnik
cc @alexcrichton

8 years agoAuto merge of #28532 - Eljay:misc-fixes, r=bluss
bors [Sun, 20 Sep 2015 13:39:57 +0000 (13:39 +0000)]
Auto merge of #28532 - Eljay:misc-fixes, r=bluss

As the title says, just cleaning up some old stuff.

8 years agoFix the overly long inner spans of inline mods
Marcus Klaas [Sun, 20 Sep 2015 12:06:58 +0000 (14:06 +0200)]
Fix the overly long inner spans of inline mods

8 years agoMiscellaneous cleanup for old issues.
Lee Jeffery [Sun, 20 Sep 2015 10:35:08 +0000 (11:35 +0100)]
Miscellaneous cleanup for old issues.

8 years agorustdoc: added tests for header rendering & minor fixes
Simon Mazur [Sat, 19 Sep 2015 01:43:59 +0000 (04:43 +0300)]
rustdoc: added tests for header rendering & minor fixes

8 years agorustdoc: remove redundant test
Simon Mazur [Fri, 18 Sep 2015 18:39:05 +0000 (21:39 +0300)]
rustdoc: remove redundant test

8 years agorustdoc: some code style improvements
Simon Mazur [Fri, 18 Sep 2015 18:34:16 +0000 (21:34 +0300)]
rustdoc: some code style improvements

8 years agodoc: Fix broken links
Simon Mazur [Fri, 18 Sep 2015 14:12:58 +0000 (17:12 +0300)]
doc: Fix broken links

8 years agorustdoc: Changed section headers anchor rendering
Simon Mazur [Fri, 18 Sep 2015 12:05:35 +0000 (15:05 +0300)]
rustdoc: Changed section headers anchor rendering

8 years agoAuto merge of #28529 - Manishearth:rollup, r=Manishearth
bors [Sun, 20 Sep 2015 07:32:46 +0000 (07:32 +0000)]
Auto merge of #28529 - Manishearth:rollup, r=Manishearth

- Successful merges: #28463, #28507, #28522, #28525, #28526
- Failed merges:

8 years agoRollup merge of #28526 - Manishearth:expand-clone, r=eddyb
Manish Goregaokar [Sun, 20 Sep 2015 05:46:27 +0000 (11:16 +0530)]
Rollup merge of #28526 - Manishearth:expand-clone, r=eddyb

This reduces some clones of `Vec`s. These are not deep copies since the
token tree is made using `Rc`s, so this won't be a major improvement.

r? @eddyb

8 years agoRollup merge of #28525 - Wallacoloo:book-4.8-double-more, r=steveklabnik
Manish Goregaokar [Sun, 20 Sep 2015 05:46:27 +0000 (11:16 +0530)]
Rollup merge of #28525 - Wallacoloo:book-4.8-double-more, r=steveklabnik

This is a simple grammar fix in which the previous author accidentally repeated a word when (s)he shouldn't have.

8 years agoRollup merge of #28522 - apasel422:issue-28091, r=alexcrichton
Manish Goregaokar [Sun, 20 Sep 2015 05:46:27 +0000 (11:16 +0530)]
Rollup merge of #28522 - apasel422:issue-28091, r=alexcrichton

Closes #28091.

r? @huonw

8 years agoRollup merge of #28507 - Manishearth:const-stable, r=alexcrichton
Manish Goregaokar [Sun, 20 Sep 2015 05:46:27 +0000 (11:16 +0530)]
Rollup merge of #28507 - Manishearth:const-stable, r=alexcrichton

Fixes #28490

cc #24111

8 years agoRollup merge of #28463 - critiqjo:book-concurrency, r=steveklabnik
Manish Goregaokar [Sun, 20 Sep 2015 05:46:26 +0000 (11:16 +0530)]
Rollup merge of #28463 - critiqjo:book-concurrency, r=steveklabnik

Fixes #28458

Details about `Arc` may be too soon to be described together with `Sync`... Tell me what you think.

r? @steveklabnik

8 years agoAuto merge of #28503 - marcusklaas:pub-extern, r=alexcrichton
bors [Sun, 20 Sep 2015 05:44:45 +0000 (05:44 +0000)]
Auto merge of #28503 - marcusklaas:pub-extern, r=alexcrichton

Fixes https://github.com/rust-lang/rust/issues/28472.

8 years agoAuto merge of #28519 - wthrowe:fixup-28321, r=alexcrichton
bors [Sun, 20 Sep 2015 03:57:13 +0000 (03:57 +0000)]
Auto merge of #28519 - wthrowe:fixup-28321, r=alexcrichton

I assume the expected error changed during the development of pull
request #28321 and that wasn't noticed because the test was
accidentally not running.

r? @nikomatsakis

8 years agoAuto merge of #28506 - Manishearth:no_mac, r=eddyb
bors [Sun, 20 Sep 2015 02:00:04 +0000 (02:00 +0000)]
Auto merge of #28506 - Manishearth:no_mac, r=eddyb

It's not being called or used, and `Mac`s don't exist at either lint phase.

8 years agoDon't recommend const fns on a stable build without a note about nightlies
Manish Goregaokar [Sat, 19 Sep 2015 03:59:04 +0000 (09:29 +0530)]
Don't recommend const fns on a stable build without a note about nightlies

Fixes #28490

8 years agoMove tts instead of cloning in expansion
Manish Goregaokar [Sun, 20 Sep 2015 01:15:19 +0000 (06:45 +0530)]
Move tts instead of cloning in expansion

8 years agoFix "more more" typo
Colin Wallace [Sun, 20 Sep 2015 00:19:29 +0000 (17:19 -0700)]
Fix "more more" typo

8 years agoAuto merge of #28512 - lfairy:snapshot-pyc, r=alexcrichton
bors [Sun, 20 Sep 2015 00:12:12 +0000 (00:12 +0000)]
Auto merge of #28512 - lfairy:snapshot-pyc, r=alexcrichton

Closes #28508

r? @brson

8 years agoFeature-gate `#[no_debug]` and `#[omit_gdb_pretty_printer_section]`
Andrew Paseltiner [Sat, 19 Sep 2015 20:33:47 +0000 (16:33 -0400)]
Feature-gate `#[no_debug]` and `#[omit_gdb_pretty_printer_section]`

Closes #28091.

8 years agoSplit out the UNUSED_* lints into a new module
Wesley Wiser [Tue, 15 Sep 2015 22:58:19 +0000 (18:58 -0400)]
Split out the UNUSED_* lints into a new module

Part of #22206

8 years agoSplit out the bad_style lints into a new module
Wesley Wiser [Tue, 15 Sep 2015 02:36:39 +0000 (22:36 -0400)]
Split out the bad_style lints into a new module

Part of #22206

8 years agoAuto merge of #28345 - japaric:op-assign, r=nmatsakis
bors [Sat, 19 Sep 2015 21:19:29 +0000 (21:19 +0000)]
Auto merge of #28345 - japaric:op-assign, r=nmatsakis

Implements overload-able augmented/compound assignments, like `a += b` via the `AddAssign` trait, as specified in RFC [953]

[953]: https://github.com/rust-lang/rfcs/blob/master/text/0953-op-assign.md

r? @nikomatsakis

8 years agoAuto merge of #28516 - steveklabnik:rollup, r=steveklabnik
bors [Sat, 19 Sep 2015 19:28:59 +0000 (19:28 +0000)]
Auto merge of #28516 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #28400, #28430, #28443, #28483, #28485, #28496, #28511, #28515
- Failed merges:

8 years agoMove test to the right directory and make it pass
William Throwe [Sat, 19 Sep 2015 16:49:56 +0000 (12:49 -0400)]
Move test to the right directory and make it pass

I assume the expected error changed during the development of pull
request #28321 and that wasn't noticed because the test was
accidentally not running.

8 years agoAuto merge of #28497 - apasel422:issue-28493, r=Gankro
bors [Sat, 19 Sep 2015 17:40:56 +0000 (17:40 +0000)]
Auto merge of #28497 - apasel422:issue-28493, r=Gankro

When both the key and value types were zero-sized, `BTreeMap` previously
called `heap::allocate` with `size == 0` for leaf nodes, which is
undefined behavior, and jemalloc would attempt to read invalid memory,
crashing the process.

This avoids undefined behavior by allocating enough space to store one
edge in leaf nodes that would otherwise have `size == 0`. Although this
uses extra memory, maps with zero-sized key types that have sensible
implementations of the ordering traits can only contain a single
key-value pair (and therefore only a single leaf node), and maps with
key and value types that are both zero-sized have few uses, if any.

Furthermore, this is a temporary fix that will likely be unnecessary
once the `BTreeMap` implementation is rewritten to use parent pointers.

Closes #28493.

8 years agotrpl: Improve clarity in Concurrency
critiqjo [Thu, 17 Sep 2015 15:00:17 +0000 (20:30 +0530)]
trpl: Improve clarity in Concurrency

8 years agoRollup merge of #28515 - alex:patch-1, r=steveklabnik
Steve Klabnik [Sat, 19 Sep 2015 15:15:49 +0000 (11:15 -0400)]
Rollup merge of #28515 - alex:patch-1, r=steveklabnik

Repertory is a real world, but it doesn't really make sense in that context.

8 years agoRollup merge of #28511 - llogiq:printdoc, r=steveklabnik
Steve Klabnik [Sat, 19 Sep 2015 15:15:49 +0000 (11:15 -0400)]
Rollup merge of #28511 - llogiq:printdoc, r=steveklabnik

This closes #28510.

8 years agoRollup merge of #28496 - davidszotten:fix_error_anchors, r=steveklabnik
Steve Klabnik [Sat, 19 Sep 2015 15:15:48 +0000 (11:15 -0400)]
Rollup merge of #28496 - davidszotten:fix_error_anchors, r=steveklabnik

8 years agoRollup merge of #28485 - Wallacoloo:clarify-let-lhs, r=alexcrichton
Steve Klabnik [Sat, 19 Sep 2015 15:15:48 +0000 (11:15 -0400)]
Rollup merge of #28485 - Wallacoloo:clarify-let-lhs, r=alexcrichton

In code like `let x = 5`, I am initially confused as to the meaning of "let doesn't take a name on the left hand side, it actually accepts a pattern." - I interpret that as the pattern being located as: `<pattern> let [...]`.

I think what is meant is that the name/pattern is on the left hand side *of the assignment*, rather than to the left of the *let* statement. This change clarifies that.

8 years agoRollup merge of #28483 - dagnir:compiler-test-doc-cleanup, r=alexcrichton
Steve Klabnik [Sat, 19 Sep 2015 15:15:48 +0000 (11:15 -0400)]
Rollup merge of #28483 - dagnir:compiler-test-doc-cleanup, r=alexcrichton

Fix some minor spelling errors, remove a weirdly placed comma.

8 years agoRollup merge of #28443 - GuillaumeGomez:error_codes, r=Manishearth
Steve Klabnik [Sat, 19 Sep 2015 15:15:48 +0000 (11:15 -0400)]
Rollup merge of #28443 - GuillaumeGomez:error_codes, r=Manishearth

r? @Manishearth

8 years agoRollup merge of #28430 - apasel422:issue-14698, r=alexcrichton
Steve Klabnik [Sat, 19 Sep 2015 15:15:47 +0000 (11:15 -0400)]
Rollup merge of #28430 - apasel422:issue-14698, r=alexcrichton

Emit an error upon failing to create a temp dir instead of panicking

Closes #14698.

8 years agoRollup merge of #28400 - badboy:disable-browser-history-on-file, r=steveklabnik
Steve Klabnik [Sat, 19 Sep 2015 15:15:47 +0000 (11:15 -0400)]
Rollup merge of #28400 - badboy:disable-browser-history-on-file, r=steveklabnik

history.pushState is defined, but not working whenever document.origin is "null"
(literally that string, not just the null object).
This is due to some security considerations and is unlikely to be ever working.

For now just disable the usage of the history API when the documentation
is accessed through a file:/// URL.

See https://code.google.com/p/chromium/issues/detail?id=301210 for a
Chrome-specific issue on the history API on file:/// URLs

Closes #25953

8 years agoAdd librustc_trans error codes
Guillaume Gomez [Fri, 18 Sep 2015 22:42:57 +0000 (00:42 +0200)]
Add librustc_trans error codes

8 years agoAuto merge of #28494 - bluss:vecdeque-zst, r=eddyb
bors [Sat, 19 Sep 2015 14:23:46 +0000 (14:23 +0000)]
Auto merge of #28494 - bluss:vecdeque-zst, r=eddyb

VecDeque: Use power of two capacity even for zero sized types

VecDeque depends on using a power of two capacity. Use the largest
possible power of two capacity for ZSTs.

Fixes #28488

8 years agoAuto merge of #28495 - semarie:stdcpp-name, r=alexcrichton
bors [Sat, 19 Sep 2015 12:35:23 +0000 (12:35 +0000)]
Auto merge of #28495 - semarie:stdcpp-name, r=alexcrichton

it makes rustc compatible with gcc installation that are using
`--program-transform-name' configure flag (on OpenBSD for example).

- detects at configure the name of stdc++ library on the system

- use the detected name in llvm makefile (with enable-static-stdcpp),
  and pass it to mklldeps.py

- generate mklldeps.rs using this detected name

note that CFG_STDCPP_NAME is about stdc++ name, not about libc++. If
using libc++, the default name will be `stdc++', but it won't be used
when linking.

r? @alexcrichton

I added this support globally instead of just for OpenBSD as it isn't specially related to OpenBSD (except OpenBSD use it for gcc-4.9). And as I would had to change `llvm.mk', having just a default value in `configure' for others platforms won't be very useful.

8 years agoFixed an apparent typo
Alex Gaynor [Sat, 19 Sep 2015 12:10:54 +0000 (08:10 -0400)]
Fixed an apparent typo

Repertory is a real world, but it doesn't really make sense in that context.

8 years agochange back to anchors; divs break md
David Szotten [Sat, 19 Sep 2015 11:06:36 +0000 (12:06 +0100)]
change back to anchors; divs break md

8 years agoVecDeque: Use power of two capacity even for zero sized types
Ulrik Sverdrup [Fri, 18 Sep 2015 14:32:52 +0000 (16:32 +0200)]
VecDeque: Use power of two capacity even for zero sized types

VecDeque depends on using a power of two capacity. Use the largest
possible power of two capacity for ZSTs.

8 years agomissing punctuation
David Szotten [Sat, 19 Sep 2015 10:45:30 +0000 (11:45 +0100)]
missing punctuation

8 years agoits vs it's
David Szotten [Sat, 19 Sep 2015 10:45:09 +0000 (11:45 +0100)]
its vs it's

8 years agowrap more referenced code blocks in divs
David Szotten [Sat, 19 Sep 2015 10:44:55 +0000 (11:44 +0100)]
wrap more referenced code blocks in divs

8 years agoangle brackets get mis-parsed. bug?
David Szotten [Sat, 19 Sep 2015 10:43:57 +0000 (11:43 +0100)]
angle brackets get mis-parsed. bug?

8 years agolink needs puncuation
David Szotten [Sat, 19 Sep 2015 10:43:32 +0000 (11:43 +0100)]
link needs puncuation

8 years agoAuto merge of #28491 - dotdash:noadjust, r=nikomatsakis
bors [Sat, 19 Sep 2015 08:26:55 +0000 (08:26 +0000)]
Auto merge of #28491 - dotdash:noadjust, r=nikomatsakis

That allows us to keep using trans_into() in case of adjustments that
may actually be ignored in trans because they are a plain deref/ref pair
with no overloaded deref or unsizing.

Unoptimized(!) benchmarks from servo/servo#7638

Before
```
test goser::bench_clone                          ... bench:      17,701 ns/iter (+/- 58) = 30 MB/s
test goser::bincode::bench_decoder               ... bench:      33,715 ns/iter (+/- 300) = 11 MB/s
test goser::bincode::bench_deserialize           ... bench:      36,804 ns/iter (+/- 329) = 9 MB/s
test goser::bincode::bench_encoder               ... bench:      34,695 ns/iter (+/- 149) = 11 MB/s
test goser::bincode::bench_populate              ... bench:      18,879 ns/iter (+/- 88)
test goser::bincode::bench_serialize             ... bench:      31,668 ns/iter (+/- 156) = 11 MB/s
test goser::capnp::bench_deserialize             ... bench:       2,049 ns/iter (+/- 87) = 218 MB/s
test goser::capnp::bench_deserialize_packed      ... bench:      10,707 ns/iter (+/- 258) = 31 MB/s
test goser::capnp::bench_populate                ... bench:         635 ns/iter (+/- 5)
test goser::capnp::bench_serialize               ... bench:      35,657 ns/iter (+/- 155) = 12 MB/s
test goser::capnp::bench_serialize_packed        ... bench:      37,881 ns/iter (+/- 146) = 8 MB/s
test goser::msgpack::bench_decoder               ... bench:      50,634 ns/iter (+/- 307) = 5 MB/s
test goser::msgpack::bench_encoder               ... bench:      25,738 ns/iter (+/- 90) = 11 MB/s
test goser::msgpack::bench_populate              ... bench:      18,900 ns/iter (+/- 138)
test goser::protobuf::bench_decoder              ... bench:       2,791 ns/iter (+/- 29) = 102 MB/s
test goser::protobuf::bench_encoder              ... bench:      75,414 ns/iter (+/- 358) = 3 MB/s
test goser::protobuf::bench_populate             ... bench:      19,248 ns/iter (+/- 92)
test goser::rustc_serialize_json::bench_decoder  ... bench:     109,999 ns/iter (+/- 797) = 5 MB/s
test goser::rustc_serialize_json::bench_encoder  ... bench:      58,777 ns/iter (+/- 418) = 10 MB/s
test goser::rustc_serialize_json::bench_populate ... bench:      18,887 ns/iter (+/- 76)
test goser::serde_json::bench_deserializer       ... bench:     104,803 ns/iter (+/- 770) = 5 MB/s
test goser::serde_json::bench_populate           ... bench:      18,890 ns/iter (+/- 69)
test goser::serde_json::bench_serializer         ... bench:      75,046 ns/iter (+/- 435) = 8 MB/s
```

After
```
test goser::bench_clone                          ... bench:      16,052 ns/iter (+/- 188) = 34 MB/s
test goser::bincode::bench_decoder               ... bench:      31,194 ns/iter (+/- 941) = 12 MB/s
test goser::bincode::bench_deserialize           ... bench:      33,934 ns/iter (+/- 352) = 10 MB/s
test goser::bincode::bench_encoder               ... bench:      30,737 ns/iter (+/- 1,969) = 13 MB/s
test goser::bincode::bench_populate              ... bench:      17,234 ns/iter (+/- 176)
test goser::bincode::bench_serialize             ... bench:      28,269 ns/iter (+/- 452) = 12 MB/s
test goser::capnp::bench_deserialize             ... bench:       2,019 ns/iter (+/- 85) = 221 MB/s
test goser::capnp::bench_deserialize_packed      ... bench:      10,662 ns/iter (+/- 527) = 31 MB/s
test goser::capnp::bench_populate                ... bench:         607 ns/iter (+/- 2)
test goser::capnp::bench_serialize               ... bench:      30,488 ns/iter (+/- 219) = 14 MB/s
test goser::capnp::bench_serialize_packed        ... bench:      33,731 ns/iter (+/- 201) = 9 MB/s
test goser::msgpack::bench_decoder               ... bench:      46,921 ns/iter (+/- 461) = 6 MB/s
test goser::msgpack::bench_encoder               ... bench:      22,315 ns/iter (+/- 96) = 12 MB/s
test goser::msgpack::bench_populate              ... bench:      17,268 ns/iter (+/- 73)
test goser::protobuf::bench_decoder              ... bench:       2,658 ns/iter (+/- 44) = 107 MB/s
test goser::protobuf::bench_encoder              ... bench:      71,024 ns/iter (+/- 359) = 4 MB/s
test goser::protobuf::bench_populate             ... bench:      17,704 ns/iter (+/- 104)
test goser::rustc_serialize_json::bench_decoder  ... bench:     107,867 ns/iter (+/- 759) = 5 MB/s
test goser::rustc_serialize_json::bench_encoder  ... bench:      52,327 ns/iter (+/- 479) = 11 MB/s
test goser::rustc_serialize_json::bench_populate ... bench:      17,262 ns/iter (+/- 68)
test goser::serde_json::bench_deserializer       ... bench:      99,156 ns/iter (+/- 657) = 6 MB/s
test goser::serde_json::bench_populate           ... bench:      17,264 ns/iter (+/- 77)
test goser::serde_json::bench_serializer         ... bench:      66,135 ns/iter (+/- 392) = 9 MB/s

```

8 years agoDon't include *.pyc files in source tarball
Chris Wong [Sat, 19 Sep 2015 07:42:21 +0000 (19:42 +1200)]
Don't include *.pyc files in source tarball

Closes #28508

8 years agoadded panic docs for print\! and println\! macros
llogiq [Sat, 19 Sep 2015 07:04:12 +0000 (09:04 +0200)]
added panic docs for print\! and println\! macros

8 years agoAuto merge of #28489 - kud1ing:patch-1, r=alexcrichton
bors [Sat, 19 Sep 2015 06:38:55 +0000 (06:38 +0000)]
Auto merge of #28489 - kud1ing:patch-1, r=alexcrichton

As of http://blog.rust-lang.org/2015/09/17/Rust-1.3.html

8 years agoAuto merge of #28486 - nrc:pub-extern-crate, r=alexcrichton
bors [Sat, 19 Sep 2015 04:51:13 +0000 (04:51 +0000)]
Auto merge of #28486 - nrc:pub-extern-crate, r=alexcrichton

Temporary 'fix' for #26775

r? @brson

8 years agoRemove check_mac
Manish Goregaokar [Sat, 19 Sep 2015 03:00:00 +0000 (08:30 +0530)]
Remove check_mac

8 years agoaddress Niko's comments
Jorge Aparicio [Thu, 17 Sep 2015 05:29:26 +0000 (00:29 -0500)]
address Niko's comments

8 years agoOverloaded augmented assignments
Jorge Aparicio [Fri, 11 Sep 2015 00:16:57 +0000 (19:16 -0500)]
Overloaded augmented assignments

8 years agoAuto merge of #28468 - nagisa:revert-negate-unsigned-warning, r=alexcrichton
bors [Sat, 19 Sep 2015 01:59:56 +0000 (01:59 +0000)]
Auto merge of #28468 - nagisa:revert-negate-unsigned-warning, r=alexcrichton

This reverts commit 0ca8e4994ee43ba9dfbded6e129b30ff5fe7a994.

Fixes #27141

8 years agoAuto merge of #28484 - nrc:fix-save, r=alexcrichton
bors [Sat, 19 Sep 2015 00:08:38 +0000 (00:08 +0000)]
Auto merge of #28484 - nrc:fix-save, r=alexcrichton

Should be lowering ast expressions to HIR expressions, not cheating via the hir map. That goes wrong now that there is not a 1:1 mapping between ast and hir (in the case of the crash due to ExprParen).

8 years agoInclude visibility modifier in span of foreign item
Marcus Klaas [Fri, 18 Sep 2015 22:27:51 +0000 (00:27 +0200)]
Include visibility modifier in span of foreign item

8 years agoremove preceeding blank line
David Szotten [Fri, 18 Sep 2015 21:16:31 +0000 (22:16 +0100)]
remove preceeding blank line

8 years agofix anchor link
David Szotten [Fri, 18 Sep 2015 16:21:30 +0000 (17:21 +0100)]
fix anchor link

8 years agoAuto merge of #28465 - apasel422:tidy, r=alexcrichton
bors [Fri, 18 Sep 2015 20:43:34 +0000 (20:43 +0000)]
Auto merge of #28465 - apasel422:tidy, r=alexcrichton

It is likely that these were committed by mistake.

8 years agoAvoid zero-sized leaf allocations in `BTreeMap`
Andrew Paseltiner [Fri, 18 Sep 2015 18:15:02 +0000 (14:15 -0400)]
Avoid zero-sized leaf allocations in `BTreeMap`

When both the key and value types were zero-sized, `BTreeMap` previously
called `heap::allocate` with `size == 0` for leaf nodes, which is
undefined behavior, and jemalloc would attempt to read invalid memory,
crashing the process.

This avoids undefined behavior by allocating enough space to store one
edge in leaf nodes that would otherwise have `size == 0`. Although this
uses extra memory, maps with zero-sized key types that have sensible
implementations of the ordering traits can only contain a single
key-value pair (and therefore only a single leaf node), and maps with
key and value types that are both zero-sized have few uses, if any.

Furthermore, this is a temporary fix that will likely be unnecessary
once the `BTreeMap` implementation is rewritten to use parent pointers.

Closes #28493.

8 years agoAuto merge of #28442 - nagisa:remove-enum-vis-field, r=alexcrichton
bors [Fri, 18 Sep 2015 18:51:04 +0000 (18:51 +0000)]
Auto merge of #28442 - nagisa:remove-enum-vis-field, r=alexcrichton

Followup on #28440

Do not merge before the referenced PR is merged. I will fix the PR once that is merged (or close if it is not)

8 years agoRevert "Convert negate_unsigned feature gate to a warning"
Simonas Kazlauskas [Thu, 17 Sep 2015 20:09:28 +0000 (23:09 +0300)]
Revert "Convert negate_unsigned feature gate to a warning"

This reverts commit 0ca8e4994ee43ba9dfbded6e129b30ff5fe7a994 and fixes the code to work with
current rustc.

Fixes #27141

8 years agoAdd url to rust-book
Guillaume Gomez [Fri, 18 Sep 2015 17:12:27 +0000 (19:12 +0200)]
Add url to rust-book

8 years agoAuto merge of #28336 - petrochenkov:empstr, r=pnkfelix
bors [Fri, 18 Sep 2015 16:57:21 +0000 (16:57 +0000)]
Auto merge of #28336 - petrochenkov:empstr, r=pnkfelix

Closes https://github.com/rust-lang/rust/issues/24266
Closes https://github.com/rust-lang/rust/issues/16819

8 years agoadd support for non-standard name of stdc++ library
Sébastien Marie [Fri, 18 Sep 2015 14:30:45 +0000 (16:30 +0200)]
add support for non-standard name of stdc++ library

it makes rustc compatible with gcc installation that are using
`--program-transform-name' configure flag (on OpenBSD for example).

- detects at configure the name of stdc++ library on the system

- use the detected name in llvm makefile (with enable-static-stdcpp),
  and pass it to mklldeps.py

- generate mklldeps.rs using this detected name

note that CFG_STDCPP_NAME is about stdc++ name, not about libc++. If
using libc++, the default name will be `stdc++', but it won't be used
when linking.

8 years agoAuto merge of #28492 - Ms2ger:a-name, r=steveklabnik
bors [Fri, 18 Sep 2015 14:06:51 +0000 (14:06 +0000)]
Auto merge of #28492 - Ms2ger:a-name, r=steveklabnik

The id attribute has been an official part of HTML since 1997. There is no
reason not to use it.

8 years agoUse divs with ids rather than as with names.
Ms2ger [Fri, 18 Sep 2015 13:52:19 +0000 (15:52 +0200)]
Use divs with ids rather than as with names.

The id attribute has been an official part of HTML since 1997. There is no
reason not to use it.

8 years agoSkip no-op adjustments in trans
Björn Steinbrink [Fri, 18 Sep 2015 13:46:58 +0000 (15:46 +0200)]
Skip no-op adjustments in trans

That allows us to keep using trans_into() in case of adjustments that
may actually be ignored in trans because they are a plain deref/ref pair
with no overloaded deref or unsizing.

Unoptimized(!) benchmarks from servo/servo#7638

Before
```
test goser::bench_clone                          ... bench:      17,701 ns/iter (+/- 58) = 30 MB/s
test goser::bincode::bench_decoder               ... bench:      33,715 ns/iter (+/- 300) = 11 MB/s
test goser::bincode::bench_deserialize           ... bench:      36,804 ns/iter (+/- 329) = 9 MB/s
test goser::bincode::bench_encoder               ... bench:      34,695 ns/iter (+/- 149) = 11 MB/s
test goser::bincode::bench_populate              ... bench:      18,879 ns/iter (+/- 88)
test goser::bincode::bench_serialize             ... bench:      31,668 ns/iter (+/- 156) = 11 MB/s
test goser::capnp::bench_deserialize             ... bench:       2,049 ns/iter (+/- 87) = 218 MB/s
test goser::capnp::bench_deserialize_packed      ... bench:      10,707 ns/iter (+/- 258) = 31 MB/s
test goser::capnp::bench_populate                ... bench:         635 ns/iter (+/- 5)
test goser::capnp::bench_serialize               ... bench:      35,657 ns/iter (+/- 155) = 12 MB/s
test goser::capnp::bench_serialize_packed        ... bench:      37,881 ns/iter (+/- 146) = 8 MB/s
test goser::msgpack::bench_decoder               ... bench:      50,634 ns/iter (+/- 307) = 5 MB/s
test goser::msgpack::bench_encoder               ... bench:      25,738 ns/iter (+/- 90) = 11 MB/s
test goser::msgpack::bench_populate              ... bench:      18,900 ns/iter (+/- 138)
test goser::protobuf::bench_decoder              ... bench:       2,791 ns/iter (+/- 29) = 102 MB/s
test goser::protobuf::bench_encoder              ... bench:      75,414 ns/iter (+/- 358) = 3 MB/s
test goser::protobuf::bench_populate             ... bench:      19,248 ns/iter (+/- 92)
test goser::rustc_serialize_json::bench_decoder  ... bench:     109,999 ns/iter (+/- 797) = 5 MB/s
test goser::rustc_serialize_json::bench_encoder  ... bench:      58,777 ns/iter (+/- 418) = 10 MB/s
test goser::rustc_serialize_json::bench_populate ... bench:      18,887 ns/iter (+/- 76)
test goser::serde_json::bench_deserializer       ... bench:     104,803 ns/iter (+/- 770) = 5 MB/s
test goser::serde_json::bench_populate           ... bench:      18,890 ns/iter (+/- 69)
test goser::serde_json::bench_serializer         ... bench:      75,046 ns/iter (+/- 435) = 8 MB/s
```

After
```
test goser::bench_clone                          ... bench:      16,052 ns/iter (+/- 188) = 34 MB/s
test goser::bincode::bench_decoder               ... bench:      31,194 ns/iter (+/- 941) = 12 MB/s
test goser::bincode::bench_deserialize           ... bench:      33,934 ns/iter (+/- 352) = 10 MB/s
test goser::bincode::bench_encoder               ... bench:      30,737 ns/iter (+/- 1,969) = 13 MB/s
test goser::bincode::bench_populate              ... bench:      17,234 ns/iter (+/- 176)
test goser::bincode::bench_serialize             ... bench:      28,269 ns/iter (+/- 452) = 12 MB/s
test goser::capnp::bench_deserialize             ... bench:       2,019 ns/iter (+/- 85) = 221 MB/s
test goser::capnp::bench_deserialize_packed      ... bench:      10,662 ns/iter (+/- 527) = 31 MB/s
test goser::capnp::bench_populate                ... bench:         607 ns/iter (+/- 2)
test goser::capnp::bench_serialize               ... bench:      30,488 ns/iter (+/- 219) = 14 MB/s
test goser::capnp::bench_serialize_packed        ... bench:      33,731 ns/iter (+/- 201) = 9 MB/s
test goser::msgpack::bench_decoder               ... bench:      46,921 ns/iter (+/- 461) = 6 MB/s
test goser::msgpack::bench_encoder               ... bench:      22,315 ns/iter (+/- 96) = 12 MB/s
test goser::msgpack::bench_populate              ... bench:      17,268 ns/iter (+/- 73)
test goser::protobuf::bench_decoder              ... bench:       2,658 ns/iter (+/- 44) = 107 MB/s
test goser::protobuf::bench_encoder              ... bench:      71,024 ns/iter (+/- 359) = 4 MB/s
test goser::protobuf::bench_populate             ... bench:      17,704 ns/iter (+/- 104)
test goser::rustc_serialize_json::bench_decoder  ... bench:     107,867 ns/iter (+/- 759) = 5 MB/s
test goser::rustc_serialize_json::bench_encoder  ... bench:      52,327 ns/iter (+/- 479) = 11 MB/s
test goser::rustc_serialize_json::bench_populate ... bench:      17,262 ns/iter (+/- 68)
test goser::serde_json::bench_deserializer       ... bench:      99,156 ns/iter (+/- 657) = 6 MB/s
test goser::serde_json::bench_populate           ... bench:      17,264 ns/iter (+/- 77)
test goser::serde_json::bench_serializer         ... bench:      66,135 ns/iter (+/- 392) = 9 MB/s

```

8 years agoAdd feature gate
Vadim Petrochenkov [Fri, 18 Sep 2015 10:36:45 +0000 (13:36 +0300)]
Add feature gate

8 years agoAdd some more tests
Vadim Petrochenkov [Fri, 11 Sep 2015 11:03:38 +0000 (14:03 +0300)]
Add some more tests

8 years agoImplement empty struct with braces (RFC 218)
Vadim Petrochenkov [Thu, 10 Sep 2015 19:46:52 +0000 (22:46 +0300)]
Implement empty struct with braces (RFC 218)

8 years agoAdd 1.3 release date
kud1ing [Fri, 18 Sep 2015 07:19:20 +0000 (09:19 +0200)]
Add 1.3 release date

As of http://blog.rust-lang.org/2015/09/17/Rust-1.3.html

8 years agoWarn on `pub extern crate`.
Nick Cameron [Fri, 18 Sep 2015 06:07:05 +0000 (18:07 +1200)]
Warn on `pub extern crate`.

Temporary 'fix' for #26775

8 years agoFix crash with --save-analysis
Nick Cameron [Fri, 18 Sep 2015 04:41:11 +0000 (16:41 +1200)]
Fix crash with --save-analysis

Should be lowering ast expressions to HIR expressions, not cheating via the hir map. That goes wrong now that there is not a 1:1 mapping between ast and hir (in the case of the crash due to ExprParen).

8 years agoClarify where let accepts a pattern, spatially
Colin Wallace [Fri, 18 Sep 2015 04:39:19 +0000 (21:39 -0700)]
Clarify where let accepts a pattern, spatially

8 years agoFix spelling and remove weirdly placed comma.
Dongie Agnir [Fri, 18 Sep 2015 03:43:33 +0000 (23:43 -0400)]
Fix spelling and remove weirdly placed comma.

8 years agoAuto merge of #28476 - steveklabnik:rollup, r=steveklabnik
bors [Thu, 17 Sep 2015 21:34:34 +0000 (21:34 +0000)]
Auto merge of #28476 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #28276, #28314, #28422, #28435, #28451, #28466, #28470, #28471, #28473, #28474
- Failed merges:

8 years agoAdd span_err_with_code method for BorrowckCtxt struct
Guillaume Gomez [Thu, 17 Sep 2015 21:31:37 +0000 (23:31 +0200)]
Add span_err_with_code method for BorrowckCtxt struct

8 years agoRollup merge of #28474 - tshepang:repetition, r=steveklabnik
Steve Klabnik [Thu, 17 Sep 2015 21:06:56 +0000 (17:06 -0400)]
Rollup merge of #28474 - tshepang:repetition, r=steveklabnik

It's clear it's the one being documented

8 years agoRollup merge of #28473 - tshepang:lowercase, r=steveklabnik
Steve Klabnik [Thu, 17 Sep 2015 21:06:56 +0000 (17:06 -0400)]
Rollup merge of #28473 - tshepang:lowercase, r=steveklabnik

8 years agoRollup merge of #28471 - tshepang:markup, r=steveklabnik
Steve Klabnik [Thu, 17 Sep 2015 21:06:56 +0000 (17:06 -0400)]
Rollup merge of #28471 - tshepang:markup, r=steveklabnik

8 years agoRollup merge of #28470 - tshepang:idiom, r=steveklabnik
Steve Klabnik [Thu, 17 Sep 2015 21:06:56 +0000 (17:06 -0400)]
Rollup merge of #28470 - tshepang:idiom, r=steveklabnik

8 years agoRollup merge of #28466 - baskerville:trpl-heap-highest-addr, r=steveklabnik
Steve Klabnik [Thu, 17 Sep 2015 21:06:55 +0000 (17:06 -0400)]
Rollup merge of #28466 - baskerville:trpl-heap-highest-addr, r=steveklabnik

r? @steveklabnik

8 years agoRollup merge of #28451 - dagnir:osx-req-wording, r=steveklabnik
Steve Klabnik [Thu, 17 Sep 2015 21:06:55 +0000 (17:06 -0400)]
Rollup merge of #28451 - dagnir:osx-req-wording, r=steveklabnik

Using "later" in this context makes more sense than "greater" so it's been changed to match the Linux requirement above it rather than the other way around.

8 years agoRollup merge of #28435 - apasel422:issue-24533, r=nikomatsakis
Steve Klabnik [Thu, 17 Sep 2015 21:06:55 +0000 (17:06 -0400)]
Rollup merge of #28435 - apasel422:issue-24533, r=nikomatsakis

Closes #24533.

8 years agoRollup merge of #28422 - christopherdumas:label_code, r=steveklabnik
Steve Klabnik [Thu, 17 Sep 2015 21:06:54 +0000 (17:06 -0400)]
Rollup merge of #28422 - christopherdumas:label_code, r=steveklabnik

8 years agoRollup merge of #28314 - tbu-:pr_atomics_are_send, r=brson
Steve Klabnik [Thu, 17 Sep 2015 21:06:54 +0000 (17:06 -0400)]
Rollup merge of #28314 - tbu-:pr_atomics_are_send, r=brson

8 years agoRollup merge of #28276 - jackwilsonv:patch-5, r=Manishearth
Steve Klabnik [Thu, 17 Sep 2015 21:06:54 +0000 (17:06 -0400)]
Rollup merge of #28276 - jackwilsonv:patch-5, r=Manishearth

8 years agoreference: actual keywords feel more appropriate
Tshepang Lekhonkhobe [Thu, 17 Sep 2015 20:24:15 +0000 (22:24 +0200)]
reference: actual keywords feel more appropriate