]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoRollup merge of #25556 - mdinger:patch-1, r=alexcrichton
Manish Goregaokar [Tue, 19 May 2015 13:17:14 +0000 (18:47 +0530)]
Rollup merge of #25556 - mdinger:patch-1, r=alexcrichton

9 years agoRollup merge of #25551 - cllns:add-active-class-to-rustbook-toc, r=alexcrichton
Manish Goregaokar [Tue, 19 May 2015 13:17:14 +0000 (18:47 +0530)]
Rollup merge of #25551 - cllns:add-active-class-to-rustbook-toc, r=alexcrichton

Currently the table of contents for `rustbook` doesn't signify which page you are on.

This PR adds an 'active' class to the link for the current page, and defines the CSS rule for that class to make the link underlined and bold.

Not sure about two things:
1) Is `current_page` is a good name for the function parameter? At first I thought `current_item` would be good, but then in the `walk_item` function, you'd have `item` and `current_item`.

2) For the CSS, is both bold and underline too much? At first I had it just be underlined, but that's also how the links look when they're hovered over.

9 years agoRollup merge of #25512 - peferron:doc-traits-error-fix, r=alexcrichton
Manish Goregaokar [Tue, 19 May 2015 13:17:13 +0000 (18:47 +0530)]
Rollup merge of #25512 - peferron:doc-traits-error-fix, r=alexcrichton

The source code snippet uses `"whatever".as_bytes()` but the compilation error message uses `b"whatever"`. Both should be consistent with each other.

r? @steveklabnik

9 years agoRollup merge of #25452 - jimblandy:master, r=steveklabnik
Manish Goregaokar [Tue, 19 May 2015 13:17:13 +0000 (18:47 +0530)]
Rollup merge of #25452 - jimblandy:master, r=steveklabnik

Minor tweak: the text explaining the Borrow trait talks about slices, but the example immediately following just uses a simple reference; there are no slices involved.

r? @steveklabnik

9 years agoAuto merge of #25548 - sfackler:debug-builders-by-ref, r=alexcrichton
bors [Tue, 19 May 2015 05:39:29 +0000 (05:39 +0000)]
Auto merge of #25548 - sfackler:debug-builders-by-ref, r=alexcrichton

Based on feedback from https://internals.rust-lang.org/t/final-comment-period-for-debug-builders-stabilization/2007/2

9 years agoFix debug builder examples examples
Steven Fackler [Tue, 19 May 2015 03:57:11 +0000 (20:57 -0700)]
Fix debug builder examples examples

9 years agoAuto merge of #25496 - alexcrichton:stabilize-cloned, r=aturon
bors [Tue, 19 May 2015 03:41:23 +0000 (03:41 +0000)]
Auto merge of #25496 - alexcrichton:stabilize-cloned, r=aturon

The method was stabilized but the structure was forgotten to be stabilized.

Closes #25480

9 years agoAuto merge of #25441 - alexcrichton:debug-panic-neg, r=aturon
bors [Tue, 19 May 2015 01:08:54 +0000 (01:08 +0000)]
Auto merge of #25441 - alexcrichton:debug-panic-neg, r=aturon

Debug overflow checks for arithmetic negation landed in #24500, at which time
the `abs` method on signed integers was changed to using `wrapping_neg` to
ensure that the function never panicked. This implied that `abs` of `INT_MIN`
would return `INT_MIN`, another negative value. When this change was back-ported
to beta, however, in #24708, the `wrapping_neg` function had not yet been
backported, so the implementation was changed in #24785 to `!self + 1`. This
change had the unintended side effect of enabling debug overflow checks for the
`abs` function. Consequently, the current state of affairs is that the beta
branch checks for overflow in debug mode for `abs` and the nightly branch does
not.

This commit alters the behavior of nightly to have `abs` always check for
overflow in debug mode. This change is more consistent with the way the standard
library treats overflow as well, and it is also not a breaking change as it's
what the beta branch currently does (albeit if by accident).

cc #25378

9 years agostd: Make abs() panic on overflow in debug mode
Alex Crichton [Fri, 15 May 2015 16:18:14 +0000 (09:18 -0700)]
std: Make abs() panic on overflow in debug mode

Debug overflow checks for arithmetic negation landed in #24500, at which time
the `abs` method on signed integers was changed to using `wrapping_neg` to
ensure that the function never panicked. This implied that `abs` of `INT_MIN`
would return `INT_MIN`, another negative value. When this change was back-ported
to beta, however, in #24708, the `wrapping_neg` function had not yet been
backported, so the implementation was changed in #24785 to `!self + 1`. This
change had the unintended side effect of enabling debug overflow checks for the
`abs` function. Consequently, the current state of affairs is that the beta
branch checks for overflow in debug mode for `abs` and the nightly branch does
not.

This commit alters the behavior of nightly to have `abs` always check for
overflow in debug mode. This change is more consistent with the way the standard
library treats overflow as well, and it is also not a breaking change as it's
what the beta branch currently does (albeit if by accident).

cc #25378

9 years agoAuto merge of #25337 - bleibig:update-grammar, r=nikomatsakis
bors [Mon, 18 May 2015 23:29:26 +0000 (23:29 +0000)]
Auto merge of #25337 - bleibig:update-grammar, r=nikomatsakis

* Correctly lex CRLF in string literals
* Update `extern CRATE as NAME` syntax
* Allow leading `::` in view paths
* Allow TySums in type ascriptions and impls
* Allow macros to have visibility and attributes
* Update syntax for qualified path types and expressions
* Allow block expressions to be called () and indexed []

9 years agoAuto merge of #25230 - rayglover:patch-bitset, r=Gankro
bors [Mon, 18 May 2015 19:54:24 +0000 (19:54 +0000)]
Auto merge of #25230 - rayglover:patch-bitset, r=Gankro

Some modest running-time improvements to `std::collections::BitSet` on bit-sets of varying set-membership densities. This is work originally from [here](https://github.com/rayglover/alt_collections). (Benchmarks copied below)
```
std::collections::BitSet / alt_collections::BitSet

copy_dense         ... 3.08x
copy_sparse        ... 4.22x
count_dense        ... 11.01x
count_sparse       ... 8.11x
from_bytes         ... 1.47x
intersect_dense    ... 6.54x
intersect_sparse   ... 4.37x
union_dense        ... 5.53x
union_sparse       ... 5.60x
```

The exception is `from_bytes`, which I've left unaltered since the optimization is rather obscure.

Compiling with the cpu feature `popcnt` gave a further ~10% improvement on my machine, but this wasn't factored in to the benchmarks above.

Similar improvements could be made to `BitVec`, although that would probably require more substantial changes.

criticism welcome!

9 years agoAuto merge of #25501 - nham:E0072_E0073, r=alexcrichton
bors [Mon, 18 May 2015 15:39:07 +0000 (15:39 +0000)]
Auto merge of #25501 - nham:E0072_E0073, r=alexcrichton

cc #24407

9 years agoAuto merge of #25560 - Manishearth:rollup, r=Manishearth
bors [Mon, 18 May 2015 04:41:43 +0000 (04:41 +0000)]
Auto merge of #25560 - Manishearth:rollup, r=Manishearth

- Successful merges: #25526, #25530, #25537
- Failed merges:

9 years agoUse byte string literal syntax
peferron [Mon, 18 May 2015 04:18:29 +0000 (21:18 -0700)]
Use byte string literal syntax

The byte string literal syntax `b"whatever"` is more idiomatic than
`"whatever".as_bytes()`.

9 years agoRollup merge of #25537 - carols10cents:grammar-oops, r=alexcrichton
Manish Goregaokar [Mon, 18 May 2015 03:25:38 +0000 (08:55 +0530)]
Rollup merge of #25537 - carols10cents:grammar-oops, r=alexcrichton

Hiiii soooo I'm trying to get the reference grammar and associated tests running again, and I swear I tested before but I must have had multiple things going on when I did, because the change I made in #25137 to verify.rs is totally wrong. The RustLexer.tokens file that antlr generates has two sections:

```
EQ=1
LT=2
LE=3
EQEQ=4
NE=5
...
COMMENT=56
SHEBANG=57
UTF8_BOM=58
'='=1
'<'=2
'<='=3
'=='=4
...
```

and verify.rs is only interested in the first half-- the `continue` is to ignore the second half. In 9c7d5ae, I made it panic instead. I was trying to make sure verify.rs handled everything that might happen in the first half and complain if it didn't. That would mean the reference grammar was out of sync with at least verify.rs, if not the real grammar. But it's totally ok for verify.rs to not handle the entire second half of the file.

I'm sorry for breaking this :( Good thing these tests aren't being run regularly yet...? :flushed:

9 years agoRollup merge of #25530 - peferron:doc-closures-whitespace-fix, r=alexcrichton
Manish Goregaokar [Mon, 18 May 2015 03:25:38 +0000 (08:55 +0530)]
Rollup merge of #25530 - peferron:doc-closures-whitespace-fix, r=alexcrichton

Tiny fixes collected while reading through the Rust book. If they're too nitpicky please let me know and I'll ignore the next ones. :)

The spaces after the function and closure arguments might be intentional, but they do not make much sense: the usual formatting doesn't have such spaces, and they aren't helping align the three lines together either.

r? @steveklabnik (as suggested by [CONTRIBUTING.md](https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md))

9 years agoRollup merge of #25526 - chellmuth:patch-1, r=alexcrichton
Manish Goregaokar [Mon, 18 May 2015 03:25:37 +0000 (08:55 +0530)]
Rollup merge of #25526 - chellmuth:patch-1, r=alexcrichton

9 years agoAuto merge of #25541 - klutzy:remove-packed-attr, r=alexcrichton
bors [Mon, 18 May 2015 01:32:26 +0000 (01:32 +0000)]
Auto merge of #25541 - klutzy:remove-packed-attr, r=alexcrichton

The attribute was removed by #16499.

9 years agoFix finish docs
Steven Fackler [Mon, 18 May 2015 01:09:35 +0000 (18:09 -0700)]
Fix finish docs

9 years agoMake debug builders take &mut self, add entries method
Steven Fackler [Sun, 17 May 2015 20:17:26 +0000 (13:17 -0700)]
Make debug builders take &mut self, add entries method

[breaking-change]

9 years agotypo
mdinger [Mon, 18 May 2015 00:09:11 +0000 (20:09 -0400)]
typo

9 years agoAuto merge of #25527 - inrustwetrust:const-not-overflow, r=alexcrichton
bors [Sun, 17 May 2015 23:53:41 +0000 (23:53 +0000)]
Auto merge of #25527 - inrustwetrust:const-not-overflow, r=alexcrichton

Fixes #23968.
Since the values are stored in a u64 internally, we need to be mask away the
high bits after applying the ! operator. Otherwise, these bits will be set to
one, causing overflow.

9 years agoAuto merge of #25523 - nham:remove_E0068, r=alexcrichton
bors [Sun, 17 May 2015 22:13:30 +0000 (22:13 +0000)]
Auto merge of #25523 - nham:remove_E0068, r=alexcrichton

A built-in feature enabling the dereferencing of newtype structs was removed
in PR https://github.com/rust-lang/rust/pull/11188, and this error (E0068) was added at the same time to warn of
its removal. It seems to make sense to remove the error now, given that
the obsolete feature it is warning about was removed nearly a year and a
half ago.

9 years agoAdd 'active' class to current page in rustbook table of contents
Sean Collins [Sun, 17 May 2015 21:05:23 +0000 (17:05 -0400)]
Add 'active' class to current page in rustbook table of contents

9 years agoAdd error explanations for E0072, E0073, E0121, E0178, E0371, E0372.
Nick Hamann [Thu, 14 May 2015 20:42:35 +0000 (15:42 -0500)]
Add error explanations for E0072, E0073, E0121, E0178, E0371, E0372.

9 years agoAuto merge of #25454 - steveklabnik:r_doc_fix, r=alexcrichton
bors [Sun, 17 May 2015 19:40:50 +0000 (19:40 +0000)]
Auto merge of #25454 - steveklabnik:r_doc_fix, r=alexcrichton

9 years agosyntax: Remove unused `packed` attribute
klutzy [Sun, 17 May 2015 15:25:31 +0000 (00:25 +0900)]
syntax: Remove unused `packed` attribute

The attribute was removed by #16499.

9 years agoRevert "Panic if the grammar verifier sees a token it doesn't recognize"
Carol Nichols [Sat, 16 May 2015 18:31:52 +0000 (14:31 -0400)]
Revert "Panic if the grammar verifier sees a token it doesn't recognize"

This reverts commit 9c7d5ae57c27ebfc019c2c23283bb905d8c3b74f.

This was wrong... the `continue` was to ignore the latter half of the
tokens file. Another mechanism will have to be used to keep the model
grammar's tokens in sync with the actual grammar's tokens :-/

9 years agoFix doc whitespace issues
peferron [Sun, 17 May 2015 09:48:09 +0000 (02:48 -0700)]
Fix doc whitespace issues

9 years agoAuto merge of #25524 - Manishearth:unsafe_derive, r=cmr
bors [Sun, 17 May 2015 09:26:30 +0000 (09:26 +0000)]
Auto merge of #25524 - Manishearth:unsafe_derive, r=cmr

9 years agoAllow #[derive()] to generate unsafe methods
Manish Goregaokar [Sun, 17 May 2015 05:58:19 +0000 (11:28 +0530)]
Allow #[derive()] to generate unsafe methods

9 years agoFix compile-time integer overflow when using ! on unsigned values
inrustwetrust [Sun, 17 May 2015 08:04:15 +0000 (10:04 +0200)]
Fix compile-time integer overflow when using ! on unsigned values

Since the values are stored in a u64 internally, we need to be mask away the
high bits after applying the ! operator. Otherwise, these bits will be set to
one, causing overflow.

9 years agoFix typo in references-and-borrowing docs
Chris Hellmuth [Sun, 17 May 2015 07:19:53 +0000 (00:19 -0700)]
Fix typo in references-and-borrowing docs

9 years agoAuto merge of #25525 - Manishearth:rollup, r=Manishearth
bors [Sun, 17 May 2015 06:25:58 +0000 (06:25 +0000)]
Auto merge of #25525 - Manishearth:rollup, r=Manishearth

- Successful merges: #25465, #25469, #25472, #25474, #25476, #25484, #25490, #25493, #25503, #25506, #25508, #25510, #25516, #25522
- Failed merges:

9 years agoRollup merge of #25522 - alexcrichton:reexport-incoming, r=sfackler
Manish Goregaokar [Sun, 17 May 2015 06:25:40 +0000 (11:55 +0530)]
Rollup merge of #25522 - alexcrichton:reexport-incoming, r=sfackler

This iterator was mistakenly not reexported at the top level, preventing
actually naming the type!

Closes #25519

9 years agoRollup merge of #25516 - bstrie:cstrdoc, r=alexcrichton
Manish Goregaokar [Sun, 17 May 2015 06:25:40 +0000 (11:55 +0530)]
Rollup merge of #25516 - bstrie:cstrdoc, r=alexcrichton

No need for `&b"foo"[..]` to make a CString, `"foo"` will do.

9 years agoRollup merge of #25510 - thelostt:patch-1, r=alexcrichton
Manish Goregaokar [Sun, 17 May 2015 06:25:40 +0000 (11:55 +0530)]
Rollup merge of #25510 - thelostt:patch-1, r=alexcrichton

The same example for ``reverse`` were in the ``reserve_exact``'s example.

9 years agoRollup merge of #25508 - johshoff:visit_dirs_example, r=alexcrichton
Manish Goregaokar [Sun, 17 May 2015 06:25:40 +0000 (11:55 +0530)]
Rollup merge of #25508 - johshoff:visit_dirs_example, r=alexcrichton

The current version of the example won't compile due to unstable features.
This is an attempt to fix that, at the cost of slightly more verbose code.

Using rust 1.0.0 (a59de37e9).

It might be obvious, but I'm not well versed with rust, so feedback is very welcome.

9 years agoRollup merge of #25506 - Wilfred:master, r=alexcrichton
Manish Goregaokar [Sun, 17 May 2015 06:25:39 +0000 (11:55 +0530)]
Rollup merge of #25506 - Wilfred:master, r=alexcrichton

Newcomers to Rust need to learn the distinctinion between `&str` and
`String`, so additonally having `string` in an example risks confusion.

9 years agoRollup merge of #25503 - brson:betafix, r=cmr
Manish Goregaokar [Sun, 17 May 2015 06:25:39 +0000 (11:55 +0530)]
Rollup merge of #25503 - brson:betafix, r=cmr

9 years agoRollup merge of #25493 - coffeejunk:update_installed_rust_version, r=alexcrichton
Manish Goregaokar [Sun, 17 May 2015 06:25:39 +0000 (11:55 +0530)]
Rollup merge of #25493 - coffeejunk:update_installed_rust_version, r=alexcrichton

Rust is out of beta :tada:

r? @steveklabnik

9 years agoRollup merge of #25490 - huachaohuang:patch-1, r=alexcrichton
Manish Goregaokar [Sun, 17 May 2015 06:25:39 +0000 (11:55 +0530)]
Rollup merge of #25490 - huachaohuang:patch-1, r=alexcrichton

9 years agoRollup merge of #25484 - sumito3478:fix-deadlink-in-complement-lang-faq, r=alexcrichton
Manish Goregaokar [Sun, 17 May 2015 06:25:38 +0000 (11:55 +0530)]
Rollup merge of #25484 - sumito3478:fix-deadlink-in-complement-lang-faq, r=alexcrichton

In "The Rust Language FAQ", some of the links to example projects/modules written in Rust are dead links. This PR updates them.

9 years agoRollup merge of #25476 - rpjohnst:master, r=huonw
Manish Goregaokar [Sun, 17 May 2015 06:25:38 +0000 (11:55 +0530)]
Rollup merge of #25476 - rpjohnst:master, r=huonw

Closes #18173

9 years agoRollup merge of #25474 - achanda:fix_email, r=nikomatsakis
Manish Goregaokar [Sun, 17 May 2015 06:25:38 +0000 (11:55 +0530)]
Rollup merge of #25474 - achanda:fix_email, r=nikomatsakis

9 years agoRollup merge of #25472 - WillEngler:book-tiny-typo-fixes, r=alexcrichton
Manish Goregaokar [Sun, 17 May 2015 06:25:38 +0000 (11:55 +0530)]
Rollup merge of #25472 - WillEngler:book-tiny-typo-fixes, r=alexcrichton

This PR fixes two little typos in the Dining Philosophers example.

Also, there are two style points that may have been oversights but may have been deliberate, so I'll just bring them up here:

1) In the last paragraph, you say

> You’ll notice we can introduce a new binding to `table` here, and it will shadow the old one. This is often used so that you don’t need to come up with two unique names.

You already said something similar to this in the Guessing Game, but maybe you intended for this example to be independent of that one.

2) In "Rust Inside Other Languages," you introduce the idea of the "global interpreter lock" and then refer to it as the GIL a few paragraphs later without explicitly stating that GIL == global interpreter lock. It's reasonable to expect readers to make the connection, but maybe that's not what you intended.

Excellent work on the examples! Congrats on 1.0!

r? @steveklabnik

9 years agoRollup merge of #25469 - ecoal95:patch-1, r=alexcrichton
Manish Goregaokar [Sun, 17 May 2015 06:25:38 +0000 (11:55 +0530)]
Rollup merge of #25469 - ecoal95:patch-1, r=alexcrichton

Just detected it while reading.

9 years agoRollup merge of #25465 - Ryman:patch-2, r=alexcrichton
Manish Goregaokar [Sun, 17 May 2015 06:25:37 +0000 (11:55 +0530)]
Rollup merge of #25465 - Ryman:patch-2, r=alexcrichton

r? @steveklabnik

9 years agoRemove error about obsolete dereferencing of newtype structs.
Nick Hamann [Sun, 17 May 2015 06:12:11 +0000 (01:12 -0500)]
Remove error about obsolete dereferencing of newtype structs.

A built-in feature enabling the dereferencing of newtype structs was removed
in PR #11188, and this error (E0068) was added at the same time to warn of
its removal. It seems to make sense to remove the error now, given that
the obsolete feature it is warning about was removed nearly a year and a
half ago.

9 years agostd: Reexport std::net::tcp::Incoming
Alex Crichton [Sun, 17 May 2015 05:24:13 +0000 (22:24 -0700)]
std: Reexport std::net::tcp::Incoming

This iterator was mistakenly not reexported at the top level, preventing
actually naming the type!

Closes #25519

9 years agoSimplify CString doc comment
Ben Striegel [Sun, 17 May 2015 02:30:25 +0000 (22:30 -0400)]
Simplify CString doc comment

No need for `&b"foo"[..]` to make a CString, `"foo"` will do.

9 years agoAuto merge of #25458 - P1start:arc-dst, r=huonw
bors [Sun, 17 May 2015 01:41:52 +0000 (01:41 +0000)]
Auto merge of #25458 - P1start:arc-dst, r=huonw

9 years agoAuto merge of #25387 - eddyb:syn-file-loader, r=nikomatsakis
bors [Sun, 17 May 2015 00:05:34 +0000 (00:05 +0000)]
Auto merge of #25387 - eddyb:syn-file-loader, r=nikomatsakis

This allows compiling entire crates from memory or preprocessing source files before they are tokenized.

Minor API refactoring included, which is a [breaking-change] for libsyntax users:
* `ParseSess::{next_node_id, reserve_node_ids}` moved to rustc's `Session`
* `new_parse_sess` -> `ParseSess::new`
* `new_parse_sess_special_handler` -> `ParseSess::with_span_handler`
* `mk_span_handler` -> `SpanHandler::new`
* `default_handler` -> `Handler::new`
* `mk_handler` -> `Handler::with_emitter`
* `string_to_filemap(sess source, path)` -> `sess.codemap().new_filemap(path, source)`

9 years agoMake error message consistent with source code
peferron [Sun, 17 May 2015 00:01:25 +0000 (17:01 -0700)]
Make error message consistent with source code

The source code uses `"whatever".as_bytes()`, not `b"whatever"`.

9 years agoFixed reserve_exact example
Mário Feroldi [Sat, 16 May 2015 23:59:20 +0000 (20:59 -0300)]
Fixed reserve_exact example

The same example for ``reverse`` were in the ``reserve_exact``'s example.

9 years agoMake `Arc` support DSTs
P1start [Sat, 16 May 2015 23:25:17 +0000 (11:25 +1200)]
Make `Arc` support DSTs

9 years agotest/compile-fail: fix expected error message for non-UTF8 source.
Eduard Burtescu [Sat, 16 May 2015 23:15:00 +0000 (02:15 +0300)]
test/compile-fail: fix expected error message for non-UTF8 source.

9 years agofs::walk_dir example without unstable features
Johannes Hoff [Sat, 16 May 2015 23:07:52 +0000 (16:07 -0700)]
fs::walk_dir example without unstable features

The current version of the example won't compile due to unstable features.
This is an attempt to fix that, at the cost of slightly more verbose code.

9 years agoAvoid calling a variable 'string' when discussing strings.
Wilfred Hughes [Sat, 16 May 2015 22:52:28 +0000 (23:52 +0100)]
Avoid calling a variable 'string' when discussing strings.

Newcomers to Rust need to learn the distinctinion between `&str` and
`String`, so additonally having `string` in an example risks confusion.

9 years agoAuto merge of #25463 - jeremyschlatter:master, r=alexcrichton
bors [Sat, 16 May 2015 22:29:56 +0000 (22:29 +0000)]
Auto merge of #25463 - jeremyschlatter:master, r=alexcrichton

9 years agoMake a test compatible with the beta channel
Brian Anderson [Sat, 16 May 2015 21:53:37 +0000 (14:53 -0700)]
Make a test compatible with the beta channel

9 years agoAuto merge of #25485 - XuefengWu:24968_err_msg_parse_self_type_2, r=nrc
bors [Sat, 16 May 2015 20:53:42 +0000 (20:53 +0000)]
Auto merge of #25485 - XuefengWu:24968_err_msg_parse_self_type_2, r=nrc

fix #24968
report more friendly error message for Self when fn args
copy from https://github.com/rust-lang/rust/pull/25096
r? @nrc  @arielb1

9 years agoAuto merge of #25434 - dotdash:gep, r=alexcrichton
bors [Sat, 16 May 2015 19:17:30 +0000 (19:17 +0000)]
Auto merge of #25434 - dotdash:gep, r=alexcrichton

Using regular pointer arithmetic to iterate collections of zero-sized types
doesn't work, because we'd get the same pointer all the time. Our
current solution is to convert the pointer to an integer, add an offset
and then convert back, but this inhibits certain optimizations.

What we should do instead is to convert the pointer to one that points
to an i8\*, and then use a LLVM GEP instructions without the inbounds
flag to perform the pointer arithmetic. This allows to generate pointers
that point outside allocated objects without causing UB (as long as you
don't dereference them), and it wraps around using two's complement,
i.e. it behaves exactly like the wrapping_* operations we're currently
using, with the added benefit of LLVM being able to better optimize the
resulting IR.

9 years agostd: Fix missing stability on iter::Cloned
Alex Crichton [Sat, 16 May 2015 18:27:08 +0000 (11:27 -0700)]
std: Fix missing stability on iter::Cloned

The method was stabilized but the structure was forgotten to be stabilized.

Closes #25480

9 years agoAuto merge of #25462 - alexcrichton:favicon-https, r=nrc
bors [Sat, 16 May 2015 17:41:28 +0000 (17:41 +0000)]
Auto merge of #25462 - alexcrichton:favicon-https, r=nrc

Helps prevent mixed content warnings if accessing docs over HTTPS.

Closes #25459

9 years agoUpdate windows install links to 1.0
Maximilian Haack [Sat, 16 May 2015 17:18:52 +0000 (19:18 +0200)]
Update windows install links to 1.0

Fixes #25489

9 years agoAuto merge of #25460 - P1start:rc-unsized-impls, r=luqmana
bors [Sat, 16 May 2015 16:06:05 +0000 (16:06 +0000)]
Auto merge of #25460 - P1start:rc-unsized-impls, r=luqmana

Most of `Rc`’s trait implementations were DST-ified in #24619, but not these ones.

9 years agoUpdate the shown installed rust version to 1.0
Maximilian Haack [Sat, 16 May 2015 15:20:07 +0000 (17:20 +0200)]
Update the shown installed rust version to 1.0

:tada: :tada: :tada:

9 years agoUpdate rust-inside-other-languages.md
Huachao Huang [Sat, 16 May 2015 13:44:02 +0000 (21:44 +0800)]
Update rust-inside-other-languages.md

9 years agofix error message in test
Xuefeng Wu [Sat, 16 May 2015 13:39:48 +0000 (21:39 +0800)]
fix error message in test

9 years agoAuto merge of #25444 - nikomatsakis:macro-tt-fix, r=pnkfelix
bors [Sat, 16 May 2015 12:29:31 +0000 (12:29 +0000)]
Auto merge of #25444 - nikomatsakis:macro-tt-fix, r=pnkfelix

Permit token trees, identifiers, and blocks to be following by sequences.

Fixes #25436.

r? @pnkfelix

9 years agoAdd test for two sequence repetitions in a row
Niko Matsakis [Sat, 16 May 2015 12:26:44 +0000 (08:26 -0400)]
Add test for two sequence repetitions in a row

9 years agoAuto merge of #25487 - P1start:extern-crate-unexpected-error, r=huonw
bors [Sat, 16 May 2015 10:53:25 +0000 (10:53 +0000)]
Auto merge of #25487 - P1start:extern-crate-unexpected-error, r=huonw

Closes #25468.

9 years agoClarify the error message for malformed `extern crate` statements
P1start [Sat, 16 May 2015 10:35:59 +0000 (22:35 +1200)]
Clarify the error message for malformed `extern crate` statements

Closes #25468.

9 years agofix trait capitalise typo in test file
Xuefeng Wu [Sat, 16 May 2015 09:37:11 +0000 (17:37 +0800)]
fix trait capitalise typo in test file

9 years agofix typo for copyright year and trait capitalise
Xuefeng Wu [Sat, 16 May 2015 07:36:17 +0000 (15:36 +0800)]
fix typo for copyright year and trait capitalise

9 years agochange Self type error message
XuefengWu [Sun, 10 May 2015 09:09:56 +0000 (17:09 +0800)]
change Self type error message

9 years agomore friend error message for in fn arg
Xuefeng Wu [Mon, 4 May 2015 11:27:02 +0000 (19:27 +0800)]
more friend error message for  in fn arg

9 years agoFix deadlinks in complement-lang-faq.md
sumito3478 [Sat, 16 May 2015 09:06:22 +0000 (18:06 +0900)]
Fix deadlinks in complement-lang-faq.md

9 years agoAuto merge of #25453 - jimblandy:FQA-fiasco-link, r=alexcrichton
bors [Sat, 16 May 2015 08:37:31 +0000 (08:37 +0000)]
Auto merge of #25453 - jimblandy:FQA-fiasco-link, r=alexcrichton

Fix the link to the "static initialization order fiasco" discussion in the C++ Frequently Questioned Answers.

At present the link points to a mail message summarizing the decision not to have resumable exceptions, but the FAQ means to refer to a discussion of the "static initialization order fiasco". I've made my best guess at what it meant to refer to.

9 years agoAuto merge of #25450 - dnaeon:docs, r=alexcrichton
bors [Sat, 16 May 2015 07:01:32 +0000 (07:01 +0000)]
Auto merge of #25450 - dnaeon:docs, r=alexcrichton

9 years agoAuto merge of #25449 - IvanUkhov:std-doc, r=alexcrichton
bors [Sat, 16 May 2015 05:25:44 +0000 (05:25 +0000)]
Auto merge of #25449 - IvanUkhov:std-doc, r=alexcrichton

9 years agoAuto merge of #25447 - brson:version, r=alexcrichton
bors [Sat, 16 May 2015 03:48:24 +0000 (03:48 +0000)]
Auto merge of #25447 - brson:version, r=alexcrichton

9 years agoTest that associated types are not required as type parameters
Russell Johnston [Sat, 16 May 2015 02:49:01 +0000 (20:49 -0600)]
Test that associated types are not required as type parameters

Closes #18173

9 years agoChange my email
Abhishek Chanda [Sat, 16 May 2015 02:18:06 +0000 (19:18 -0700)]
Change my email

9 years agoAuto merge of #25440 - durka:patch-3, r=alexcrichton
bors [Sat, 16 May 2015 02:11:11 +0000 (02:11 +0000)]
Auto merge of #25440 - durka:patch-3, r=alexcrichton

The Traits chapter uses "adding methods to `int`" as an example of "something bad", but there is no such thing as `int` anymore, right? So I changed it to `i32`.

9 years agoCorrect two small typos in the Dining Philosophers example.
Will Engler [Sat, 16 May 2015 01:32:13 +0000 (19:32 -0600)]
Correct two small typos in the Dining Philosophers example.

9 years agofix to size_hint(); documentation for bit-twiddle;
ray glover [Sat, 16 May 2015 00:53:11 +0000 (01:53 +0100)]
fix to size_hint(); documentation for bit-twiddle;

9 years agoAuto merge of #25466 - P1start:move-closure-span, r=alexcrichton
bors [Sat, 16 May 2015 00:32:35 +0000 (00:32 +0000)]
Auto merge of #25466 - P1start:move-closure-span, r=alexcrichton

Closes #24986.

9 years agoSmall typo in the docs
Emilio Cobos Álvarez [Sat, 16 May 2015 00:21:05 +0000 (02:21 +0200)]
Small typo in the docs

Just detected it while reading.

9 years agoFix the spans of `move` closures
P1start [Fri, 15 May 2015 23:24:06 +0000 (11:24 +1200)]
Fix the spans of `move` closures

Closes #24986.

9 years agolibstd: Path docs: `file` is now `file_name`
Ryman [Fri, 15 May 2015 23:16:11 +0000 (00:16 +0100)]
libstd: Path docs: `file` is now `file_name`

9 years agoFix quotation mark in ruby example.
Jeremy Schlatter [Fri, 15 May 2015 23:08:15 +0000 (16:08 -0700)]
Fix quotation mark in ruby example.

9 years agolibs: Move favicon URLs to HTTPS
Alex Crichton [Fri, 15 May 2015 23:04:01 +0000 (16:04 -0700)]
libs: Move favicon URLs to HTTPS

Helps prevent mixed content warnings if accessing docs over HTTPS.

Closes #25459

9 years agoAllow `?Sized` types in `Rc`’s impls of {Partial,}{Ord,Eq} and Borrow
P1start [Fri, 15 May 2015 22:29:35 +0000 (10:29 +1200)]
Allow `?Sized` types in `Rc`’s impls of {Partial,}{Ord,Eq} and Borrow

9 years agoAuto merge of #25432 - killercup:patch-12, r=steveklabnik
bors [Fri, 15 May 2015 22:55:03 +0000 (22:55 +0000)]
Auto merge of #25432 - killercup:patch-12, r=steveklabnik

`[let]` was already defined in line 11. Pandoc shows a warning for this. I'm not sure if it's actually invalid Markdown.

r? @steveklabnik

9 years agoAuto merge of #25437 - MazinZ1:master, r=alexcrichton
bors [Fri, 15 May 2015 21:17:42 +0000 (21:17 +0000)]
Auto merge of #25437 - MazinZ1:master, r=alexcrichton

The download links of Windows installers on the Nightly Rust page are using beta builds instead of nightly builds, which caused some confusions when I was setting up my env. Probably it's better to use the links of nightly builds here.

9 years agoFix link in stdlib main page docs
Andrew Kensler [Fri, 15 May 2015 20:04:42 +0000 (16:04 -0400)]
Fix link in stdlib main page docs

9 years agoMake description of Borrow trait uses match the example.
Jim Blandy [Fri, 15 May 2015 19:44:24 +0000 (12:44 -0700)]
Make description of Borrow trait uses match the example.

9 years agodocs: Typo fix
Marin Atanasov Nikolov [Fri, 15 May 2015 18:46:59 +0000 (21:46 +0300)]
docs: Typo fix