]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoMake item sections match item EBNF
Carol (Nichols || Goulding) [Tue, 28 Apr 2015 02:02:16 +0000 (22:02 -0400)]
Make item sections match item EBNF

`enum_item` appeared in the `item` list but did not have an associated section;
`const_item` had a section but did not appear in the list.

9 years agoAuto merge of #24701 - Stebalien:slice, r=alexcrichton
bors [Mon, 27 Apr 2015 22:46:48 +0000 (22:46 +0000)]
Auto merge of #24701 - Stebalien:slice, r=alexcrichton

Instead of using the O(n) defaults, define O(1) shortcuts. I also copied (and slightly modified) the relevant tests from the iter tests into the slice tests just in case someone comes along and changes them in the future.

Partially implements  #24214.

9 years agoAuto merge of #24765 - pnkfelix:fsk-enum-swapindrop, r=nikomatsakis
bors [Mon, 27 Apr 2015 20:46:48 +0000 (20:46 +0000)]
Auto merge of #24765 - pnkfelix:fsk-enum-swapindrop, r=nikomatsakis

Inspect enum discriminant *after* calling its destructor

Includes some drive-by cleanup (e.g. changed some field and method names to reflect fill-on-drop; added comments about zero-variant enums being classified as `_match::Single`).

Probably the most invasive change was the expansion of the maps `available_drop_glues` and `drop_glues` to now hold two different kinds of drop glues; there is the (old) normal drop glue, and there is (new) drop-contents glue that jumps straight to dropping the contents of a struct or enum, skipping its destructor.

 * For all types that do not have user-defined Drop implementations, the normal glue is generated as usual (i.e. recursively dropping the fields of the data structure).

  (And this actually is exactly what the newly-added drop-contents glue does as well.)

 * For types that have user-defined Drop implementations, the "normal" drop glue now schedules a cleanup before invoking the `Drop::drop` method that will call the drop-contents glue after that invocation returns.

Fix #23611.

----

Is this a breaking change?  The prior behavior was totally unsound, and it seems unreasonable that anyone was actually relying on it.

Nonetheless, since there is a user-visible change to the language semantics, I guess I will conservatively mark this as a:

[breaking-change]

(To see an example of what sort of user-visible change this causes, see the comments in the regression test.)

9 years agoAuto merge of #23606 - quantheory:associated_const, r=nikomatsakis
bors [Mon, 27 Apr 2015 16:45:21 +0000 (16:45 +0000)]
Auto merge of #23606 - quantheory:associated_const, r=nikomatsakis

Closes #17841.

The majority of the work should be done, e.g. trait and inherent impls, different forms of UFCS syntax, defaults, and cross-crate usage. It's probably enough to replace the constants in `f32`, `i8`, and so on, or close to good enough.

There is still some significant functionality missing from this commit:

 - ~~Associated consts can't be used in match patterns at all. This is simply because I haven't updated the relevant bits in the parser or `resolve`, but it's *probably* not hard to get working.~~
 - Since you can't select an impl for trait-associated consts until partway through type-checking, there are some problems with code that assumes that you can check constants earlier. Associated consts that are not in inherent impls cause ICEs if you try to use them in array sizes or match ranges. For similar reasons, `check_static_recursion` doesn't check them properly, so the stack goes ka-blooey if you use an associated constant that's recursively defined. That's a bit trickier to solve; I'm not entirely sure what the best approach is yet.
 - Dealing with consts associated with type parameters will raise some new issues (e.g. if you have a `T: Int` type parameter and want to use `<T>::ZERO`). See rust-lang/rfcs#865.
 - ~~Unused associated consts don't seem to trigger the `dead_code` lint when they should. Probably easy to fix.~~

Also, this is the first time I've been spelunking in rustc to such a large extent, so I've probably done some silly things in a couple of places.

9 years agoAuto merge of #24869 - steveklabnik:rollup, r=steveklabnik
bors [Mon, 27 Apr 2015 14:45:43 +0000 (14:45 +0000)]
Auto merge of #24869 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #24797, #24804, #24848, #24854, #24855, #24860, #24863, #24866, #24867, #24868
- Failed merges:

9 years agoRollup merge of #24868 - tshepang:fix-vec-remove-doc, r=steveklabnik
Steve Klabnik [Mon, 27 Apr 2015 14:26:20 +0000 (10:26 -0400)]
Rollup merge of #24868 - tshepang:fix-vec-remove-doc, r=steveklabnik

9 years agoRollup merge of #24867 - tshepang:patch-3, r=steveklabnik
Steve Klabnik [Mon, 27 Apr 2015 14:26:20 +0000 (10:26 -0400)]
Rollup merge of #24867 - tshepang:patch-3, r=steveklabnik

9 years agoRollup merge of #24866 - tshepang:vec-intro, r=steveklabnik
Steve Klabnik [Mon, 27 Apr 2015 14:26:20 +0000 (10:26 -0400)]
Rollup merge of #24866 - tshepang:vec-intro, r=steveklabnik

9 years agoRollup merge of #24863 - dhardy:patch-1, r=steveklabnik
Steve Klabnik [Mon, 27 Apr 2015 14:26:19 +0000 (10:26 -0400)]
Rollup merge of #24863 - dhardy:patch-1, r=steveklabnik

Remove the name "multi-line string literal" since the rule appears to affect each line-break individually rather than the whole string literal. Re-word, and remove the stray reference to raw strings.

9 years agoRollup merge of #24860 - Manishearth:cargo-doc, r=steveklabnik
Steve Klabnik [Mon, 27 Apr 2015 14:26:19 +0000 (10:26 -0400)]
Rollup merge of #24860 - Manishearth:cargo-doc, r=steveklabnik

A user in IRC was having trouble because they used `main.rs` when they were trying
to migrate a library. The `[[lib]]` key is not easily found, and the `main.rs`/`lib.rs`
distinction doesn't seem to exist in trpl

r? @steveklabnik

9 years agoRollup merge of #24855 - richo:thread-doc, r=alexcrichton
Steve Klabnik [Mon, 27 Apr 2015 14:26:19 +0000 (10:26 -0400)]
Rollup merge of #24855 - richo:thread-doc, r=alexcrichton

9 years agoRollup merge of #24854 - frewsxcv:patch-19, r=alexcrichton
Steve Klabnik [Mon, 27 Apr 2015 14:26:19 +0000 (10:26 -0400)]
Rollup merge of #24854 - frewsxcv:patch-19, r=alexcrichton

9 years agoRollup merge of #24848 - bluss:deref-string, r=alexcrichton
Steve Klabnik [Mon, 27 Apr 2015 14:26:18 +0000 (10:26 -0400)]
Rollup merge of #24848 - bluss:deref-string, r=alexcrichton

Improve example for as_string and add example for as_vec

Provide a better example of `as_string` / `DerefString`'s unique capabilities.
Use an example where (for an unspecified reason) you need a &String, and
show how `as_string` solves the problem without needing an allocation.

9 years agoRollup merge of #24804 - liigo:new-trait-color, r=steveklabnik
Steve Klabnik [Mon, 27 Apr 2015 14:26:18 +0000 (10:26 -0400)]
Rollup merge of #24804 - liigo:new-trait-color, r=steveklabnik

Fixes #24441

Preview:
![new-trait-color](https://cloud.githubusercontent.com/assets/346530/7331922/d6cbcf72-eb58-11e4-8a1d-4ca5e3683ed2.png)

9 years agoRollup merge of #24797 - roryokane:patch-1, r=nikomatsakis
Steve Klabnik [Mon, 27 Apr 2015 14:26:18 +0000 (10:26 -0400)]
Rollup merge of #24797 - roryokane:patch-1, r=nikomatsakis

The minus sign ‘−’ is the same width as the plus sign ‘+’, so the button’s transition between the two symbols will look slightly smoother.

If you don’t want to use literal Unicode characters, I can change ‘−’ to `\u2212`. I’m not starting with that suggestion because ‘−’ is easier to read and understand, and if I used `\u2212`, it would probably be necessary to also comment the usage on each line to explain what character is being used.

9 years agoBug fix: `Rvalue(ByRef)` will issue a lifetime_end as its post_store, which is wrong.
Felix S. Klock II [Mon, 27 Apr 2015 14:21:51 +0000 (16:21 +0200)]
Bug fix: `Rvalue(ByRef)` will issue a lifetime_end as its post_store, which is wrong.

Kudos to dotdash for tracking down this fix.

Presumably the use of `ByRef` was because this value is a reference to
the drop-flag; but an Lvalue will serve just as well for that. dotdash
argues:

> since the drop_flag is in its "final home", Lvalue seems to be the
> correct choice.

9 years agodoc: it is 'index', not 'i'
Tshepang Lekhonkhobe [Mon, 27 Apr 2015 14:11:46 +0000 (16:11 +0200)]
doc: it is 'index', not 'i'

9 years agodrive-by fix: scheduled drops are executed in reverse order.
Felix S. Klock II [Mon, 27 Apr 2015 14:08:30 +0000 (16:08 +0200)]
drive-by fix: scheduled drops are executed in reverse order.

That is, scheduled drops are executed in reverse order, so for
correctness, we *schedule* the lifetime end before we schedule the
drop, so that when they are executed, the drop will be executed
*before* the lifetime end.

9 years agoreference: block-comment -> block comment
Tshepang Lekhonkhobe [Mon, 27 Apr 2015 13:42:46 +0000 (15:42 +0200)]
reference: block-comment -> block comment

9 years agotrpl: clarify lib.rs vs main.rs
Manish Goregaokar [Mon, 27 Apr 2015 08:52:15 +0000 (14:22 +0530)]
trpl: clarify lib.rs vs main.rs

9 years agoAuto merge of #24834 - shepmaster:default-atomic-ptr, r=alexcrichton
bors [Mon, 27 Apr 2015 12:45:38 +0000 (12:45 +0000)]
Auto merge of #24834 - shepmaster:default-atomic-ptr, r=alexcrichton

Closes #24613

9 years agobook: improve Vec intro
Tshepang Lekhonkhobe [Mon, 27 Apr 2015 12:09:38 +0000 (14:09 +0200)]
book: improve Vec intro

9 years agoUpdate reference.md: floating-point section
Diggory Hardy [Mon, 27 Apr 2015 11:24:47 +0000 (12:24 +0100)]
Update reference.md: floating-point section

Clarify type inference of floating-point literals

9 years agoAuto merge of #24820 - bradking:fix-windows-process-spawn-command-line, r=alexcrichton
bors [Mon, 27 Apr 2015 10:49:11 +0000 (10:49 +0000)]
Auto merge of #24820 - bradking:fix-windows-process-spawn-command-line, r=alexcrichton

Fix `make_command_line` for the case of backslashes at the end of an
argument requiring quotes.  We must encode the command and arguments
such that `CommandLineToArgvW` recovers them in the spawned process.
Simplify the logic by using a running count of backslashes as they
are encountered instead of looking ahead for quotes following them.

Extend `test_make_command_line` to additionally cover:

* a leading quote in an argument that requires quotes,
* a backslash before a quote in an argument that requires quotes,
* a backslash at the end of an argument that requires quotes, and
* a backslash at the end of an argument that does not require quotes.

9 years agoUpdate reference.md: string literals section
Diggory Hardy [Mon, 27 Apr 2015 10:39:42 +0000 (11:39 +0100)]
Update reference.md: string literals section

Remove the name "multi-line string literal" since the rule appears to affect each line-break individually rather than the whole string literal. Re-word, and remove the stray reference to raw strings.

9 years agoChange literal minus ‘−’ to HTML entity ‘&minus;’
Rory O’Kane [Mon, 27 Apr 2015 06:41:45 +0000 (02:41 -0400)]
Change literal minus ‘−’ to HTML entity ‘&minus;’

So that if people accidentally delete the character, they won’t re-type it as a hyphen, which would cause bugs.

I changed ‘&plus;’ too, even though it won’t be re-typed incorrectly, so that it is easier to see when plus is used as a symbol for the button, and when it is used as an operator in code. It also makes it clearer that the use of an entity for minus is on purpose, so people won’t be tempted to replace the entity incorrectly with a hyphen character.

9 years agoChange hyphen to minus in HTML template too
Rory O’Kane [Mon, 27 Apr 2015 06:26:58 +0000 (02:26 -0400)]
Change hyphen to minus in HTML template too

9 years agoAuto merge of #24849 - gareins:master, r=steveklabnik
bors [Mon, 27 Apr 2015 04:35:27 +0000 (04:35 +0000)]
Auto merge of #24849 - gareins:master, r=steveklabnik

Previous borrow() is enough to make borrow_mut() panic, no need to have borrow_mut() twice. [This](http://is.gd/woKKAW)

9 years agothread: right now you can't actually set those printers
Richo Healey [Mon, 27 Apr 2015 04:17:14 +0000 (21:17 -0700)]
thread: right now you can't actually set those printers

9 years agoMake From::from example more idiomatic / simpler
Corey Farwell [Mon, 27 Apr 2015 03:18:19 +0000 (23:18 -0400)]
Make From::from example more idiomatic / simpler

9 years agoAuto merge of #24844 - diwic:patch-1, r=steveklabnik
bors [Mon, 27 Apr 2015 02:35:32 +0000 (02:35 +0000)]
Auto merge of #24844 - diwic:patch-1, r=steveklabnik

I figure I'd start easy with fixing a simple documentation bug. This is also a test to see that I got everything right w r t the fork/pull request process.

9 years agocollections: Improve example for as_string and as_vec
Ulrik Sverdrup [Sun, 26 Apr 2015 20:13:58 +0000 (22:13 +0200)]
collections: Improve example for as_string and as_vec

9 years agoAuto merge of #24850 - frewsxcv:patch-18, r=steveklabnik
bors [Sun, 26 Apr 2015 23:25:37 +0000 (23:25 +0000)]
Auto merge of #24850 - frewsxcv:patch-18, r=steveklabnik

9 years agoIndicate function call is code-like in doc-comment
Corey Farwell [Sun, 26 Apr 2015 21:41:16 +0000 (17:41 -0400)]
Indicate function call is code-like in doc-comment

9 years agoIMO better borrow_mut() documentation on RefCell
gareins [Sun, 26 Apr 2015 21:16:49 +0000 (23:16 +0200)]
IMO better borrow_mut() documentation on RefCell

Previous borrow() is enough to make borrow_mut() panic, no need to have borrow_mut() twice. [This](http://is.gd/woKKAW)

9 years agoAuto merge of #24839 - frewsxcv:patch-17, r=steveklabnik
bors [Sun, 26 Apr 2015 21:07:41 +0000 (21:07 +0000)]
Auto merge of #24839 - frewsxcv:patch-17, r=steveklabnik

9 years agoAuto merge of #24829 - jooert:fix22673, r=pnkfelix
bors [Sun, 26 Apr 2015 19:06:38 +0000 (19:06 +0000)]
Auto merge of #24829 - jooert:fix22673, r=pnkfelix

9 years agobook: Fix broken link to unsafe chapter
diwic [Sun, 26 Apr 2015 18:32:14 +0000 (20:32 +0200)]
book: Fix broken link to unsafe chapter

9 years agoAuto merge of #24828 - jooert:fix23253, r=pnkfelix
bors [Sun, 26 Apr 2015 17:04:24 +0000 (17:04 +0000)]
Auto merge of #24828 - jooert:fix23253, r=pnkfelix

r? @alexcrichton

9 years agoAuto merge of #24679 - tamird:enable-debug, r=pnkfelix
bors [Sun, 26 Apr 2015 15:04:33 +0000 (15:04 +0000)]
Auto merge of #24679 - tamird:enable-debug, r=pnkfelix

r? @alexcrichton

9 years agoUtilize `while let` instead of `loop` with `break` in doc-comment
Corey Farwell [Sun, 26 Apr 2015 14:10:51 +0000 (10:10 -0400)]
Utilize `while let` instead of `loop` with `break` in doc-comment

9 years agoAuto merge of #24807 - luqmana:nullable-enum-opt-dst-raw-pointers, r=jakub-
bors [Sun, 26 Apr 2015 13:03:31 +0000 (13:03 +0000)]
Auto merge of #24807 - luqmana:nullable-enum-opt-dst-raw-pointers, r=jakub-

Fixes #23433.

9 years agoAuto merge of #23085 - goffrie:interpolating-quote, r=huonw
bors [Sun, 26 Apr 2015 09:52:28 +0000 (09:52 +0000)]
Auto merge of #23085 - goffrie:interpolating-quote, r=huonw

This changes the `ToTokens` implementations for expressions, statements, etc. with almost-trivial ones that produce `Interpolated(*Nt(...))` pseudo-tokens. In this way, quasiquote now works the same way as macros do: already-parsed AST fragments are used as-is, not reparsed.

The `ToSource` trait is removed. Quasiquote no longer involves pretty-printing at all, which removes the need for the `encode_with_hygiene` hack. All associated machinery is removed.

New `Nonterminal`s are added: NtArm, NtImplItem, and NtTraitItem. These are just for quasiquote, not macros.

`ToTokens` is no longer implemented for `Arg` (although this could be added again) and `Generics` (which I don't think makes sense).

This breaks any compiler extensions that relied on the ability of `ToTokens` to turn AST fragments back into inspectable token trees. For this reason, this closes #16987.

As such, this is a [breaking-change].

Fixes #16472.
Fixes #15962.
Fixes #17397.
Fixes #16617.

9 years agoAuto merge of #24367 - ebfull:fix_ice_cat_expr, r=pnkfelix
bors [Sun, 26 Apr 2015 05:32:16 +0000 (05:32 +0000)]
Auto merge of #24367 - ebfull:fix_ice_cat_expr, r=pnkfelix

An actual typeck error is the cause of many failed compilations but an
unrelated bug is being reported instead. It is triggered because a typeck
error is presumably not yet identified during compiler execution, which
would normally bypass an invariant in the presence of other errors. In
this particular situation, we delay the reporting of the bug until
abort_if_errors().

Closes #23827, closes #24356, closes #23041, closes #22897, closes #23966,
closes #24013, and closes #23729

**There is at least one situation where this bug may still be genuinely
triggered (#23437).**

9 years agoRemove FakeExtCtxt from qquote tests.
Geoffry Song [Sun, 26 Apr 2015 05:09:36 +0000 (01:09 -0400)]
Remove FakeExtCtxt from qquote tests.

Instead create an ExtCtxt structure.

9 years agoAuto merge of #24825 - rkruppe:reference-audit, r=steveklabnik
bors [Sun, 26 Apr 2015 03:34:38 +0000 (03:34 +0000)]
Auto merge of #24825 - rkruppe:reference-audit, r=steveklabnik

Transplant the relevant changes (turns out to be all of them) to `grammar.md`, and remove all grammar talk from `reference.md`. Sorry for the chaos.

The second commit, further below, goes over the comments and whitespace sections.

r? @steveklabnik

9 years agoProvide a Default implementation for AtomicPtr
Jake Goulding [Sun, 26 Apr 2015 02:55:15 +0000 (22:55 -0400)]
Provide a Default implementation for AtomicPtr

Closes #24613

9 years agoRemove remaining tests for hygiene-encoded identifiers.
Geoffry Song [Sun, 8 Mar 2015 18:41:08 +0000 (14:41 -0400)]
Remove remaining tests for hygiene-encoded identifiers.

Such things no longer exist.

9 years agoInterpolate AST nodes in quasiquote.
Geoffry Song [Thu, 5 Mar 2015 20:06:49 +0000 (15:06 -0500)]
Interpolate AST nodes in quasiquote.

This changes the `ToTokens` implementations for expressions, statements,
etc. with almost-trivial ones that produce `Interpolated(*Nt(...))`
pseudo-tokens. In this way, quasiquote now works the same way as macros
do: already-parsed AST fragments are used as-is, not reparsed.

The `ToSource` trait is removed. Quasiquote no longer involves
pretty-printing at all, which removes the need for the
`encode_with_hygiene` hack. All associated machinery is removed.

A new `Nonterminal` is added, NtArm, which the parser now interpolates.
This is just for quasiquote, not macros (although it could be in the
future).

`ToTokens` is no longer implemented for `Arg` (although this could be
added again) and `Generics` (which I don't think makes sense).

This breaks any compiler extensions that relied on the ability of
`ToTokens` to turn AST fragments back into inspectable token trees. For
this reason, this closes #16987.

As such, this is a [breaking-change].

Fixes #16472.
Fixes #15962.
Fixes #17397.
Fixes #16617.

9 years agoAuto merge of #24815 - heejongahn:master, r=steveklabnik
bors [Sun, 26 Apr 2015 01:37:58 +0000 (01:37 +0000)]
Auto merge of #24815 - heejongahn:master, r=steveklabnik

At https://doc.rust-lang.org/book/vectors.html, there should be a link to
Generics page but the link address is ommitted and thus link is not functioning
well. So I added a link definition to the vectors.md.

r? @steveklabnik

9 years agoReference audit: comments and whitespace sections
Robin Kruppe [Sat, 25 Apr 2015 22:03:59 +0000 (00:03 +0200)]
Reference audit: comments and whitespace sections

9 years agoAuto merge of #24718 - tamird:fix-quote-tests, r=alexcrichton
bors [Sat, 25 Apr 2015 23:40:10 +0000 (23:40 +0000)]
Auto merge of #24718 - tamird:fix-quote-tests, r=alexcrichton

Sniped from @rprichard's work in #24537. r? @alexcrichton

9 years agoAdd regression test for #22673.
Johannes Oertel [Sat, 25 Apr 2015 23:28:13 +0000 (01:28 +0200)]
Add regression test for #22673.

9 years agoAdd regression test for #23253.
Johannes Oertel [Sat, 25 Apr 2015 22:52:19 +0000 (00:52 +0200)]
Add regression test for #23253.

9 years agoAuto merge of #24547 - bombless:comma, r=pnkfelix
bors [Sat, 25 Apr 2015 21:44:50 +0000 (21:44 +0000)]
Auto merge of #24547 - bombless:comma, r=pnkfelix

Closes #20616
It breaks code such as <https://github.com/rust-lang/rust/blob/c64feb63418fd05bd6e5adc6f9ad763aa6a594b1/src/librustc_typeck/check/method/suggest.rs#L367>, so this is a [breaking-change], you have to add missing comma after the last lifetime arguement now.

9 years ago`qquote-2.rs` -> `run-fail/qquote.rs`
Tamir Duberstein [Thu, 23 Apr 2015 16:33:53 +0000 (09:33 -0700)]
`qquote-2.rs` -> `run-fail/qquote.rs`

Re-enables the test.

9 years ago`qquote-1.rs` -> `compile-fail-fulldeps/qquote.rs`
Tamir Duberstein [Thu, 23 Apr 2015 16:32:51 +0000 (09:32 -0700)]
`qquote-1.rs` -> `compile-fail-fulldeps/qquote.rs`

Re-enables the test.

9 years agoRe-enable test
Tamir Duberstein [Thu, 23 Apr 2015 16:24:55 +0000 (09:24 -0700)]
Re-enable test

9 years agoUnrot and re-enable `run-pass-fulldeps/qquote.rs`
Tamir Duberstein [Thu, 23 Apr 2015 06:08:04 +0000 (23:08 -0700)]
Unrot and re-enable `run-pass-fulldeps/qquote.rs`

9 years agoRedo PR #24811 properly
Robin Kruppe [Sat, 25 Apr 2015 20:56:00 +0000 (22:56 +0200)]
Redo PR #24811 properly

Transplant the grammar-related changes to grammar.md,
and remove all grammar talk from reference.md

9 years agostd: Fix process spawn for arguments ending in backslashes on Windows
Brad King [Sat, 25 Apr 2015 19:35:22 +0000 (15:35 -0400)]
std: Fix process spawn for arguments ending in backslashes on Windows

Fix `make_command_line` for the case of backslashes at the end of an
argument requiring quotes.  We must encode the command and arguments
such that `CommandLineToArgvW` recovers them in the spawned process.
Simplify the logic by using a running count of backslashes as they
are encountered instead of looking ahead for quotes following them.

Extend `test_make_command_line` to additionally cover:

* a leading quote in an argument that requires quotes,
* a backslash before a quote in an argument that requires quotes,
* a backslash at the end of an argument that requires quotes, and
* a backslash at the end of an argument that does not require quotes.

9 years agoAuto merge of #24813 - Manishearth:rollup, r=Manishearth
bors [Sat, 25 Apr 2015 17:06:48 +0000 (17:06 +0000)]
Auto merge of #24813 - Manishearth:rollup, r=Manishearth

- Successful merges: #24649, #24806, #24809, #24811
- Manual merges: #24812

9 years agoAdded a link address to Vectors page of the book
Heejong Ahn [Sat, 25 Apr 2015 17:04:38 +0000 (02:04 +0900)]
Added a link address to Vectors page of the book

At https://doc.rust-lang.org/book/vectors.html, there should be a link to
Generics page but the link address is ommitted and thus link is not functioning
well. So I added a link definition to the vectors.md.

r? @steveklabnik

9 years agoadd import (fixup #24649)
Manish Goregaokar [Sat, 25 Apr 2015 17:03:19 +0000 (22:33 +0530)]
add import (fixup #24649)

9 years agoRollup merge of #24812 - jest:master, r=steveklabnik
Manish Goregaokar [Sat, 25 Apr 2015 15:52:03 +0000 (21:22 +0530)]
Rollup merge of #24812 - jest:master, r=steveklabnik

Conflicts:
src/doc/trpl/variable-bindings.md

9 years agoRollup merge of #24811 - rkruppe:reference-audit, r=steveklabnik
Manish Goregaokar [Sat, 25 Apr 2015 15:48:47 +0000 (21:18 +0530)]
Rollup merge of #24811 - rkruppe:reference-audit, r=steveklabnik

Mention `non_ascii_idents` feature gate and remove unused productions.

r? @steveklabnik

9 years agoRollup merge of #24809 - conradkleinespel:master, r=Manishearth
Manish Goregaokar [Sat, 25 Apr 2015 15:48:47 +0000 (21:18 +0530)]
Rollup merge of #24809 - conradkleinespel:master, r=Manishearth

The reference has broken links. This should fix it.

9 years agoRollup merge of #24806 - FuGangqiang:doc, r=Manishearth
Manish Goregaokar [Sat, 25 Apr 2015 15:48:47 +0000 (21:18 +0530)]
Rollup merge of #24806 - FuGangqiang:doc, r=Manishearth

9 years agoRollup merge of #24649 - nham:path_new_examples, r=steveklabnik
Manish Goregaokar [Sat, 25 Apr 2015 15:48:47 +0000 (21:18 +0530)]
Rollup merge of #24649 - nham:path_new_examples, r=steveklabnik

9 years agoA number of spell-checking corrections.
Przemysław Wesołek [Sat, 25 Apr 2015 14:46:34 +0000 (16:46 +0200)]
A number of spell-checking corrections.

9 years agoAuto merge of #24803 - SkylerLipthay:patch-2, r=huonw
bors [Sat, 25 Apr 2015 13:10:33 +0000 (13:10 +0000)]
Auto merge of #24803 - SkylerLipthay:patch-2, r=huonw

The description of the syntax for single byte literals is missing the preceding `b` distinction.

9 years agoAudit reference manual: 3.2 Special unicode productions
Robin Kruppe [Sat, 25 Apr 2015 12:37:18 +0000 (14:37 +0200)]
Audit reference manual: 3.2 Special unicode productions

Mention non_ascii_idents feature gate and remove unused productions

9 years agolibrustc_trans: Don't ICE on unsized type behind raw pointer in nullable pointer...
Luqman Aden [Sat, 25 Apr 2015 08:20:08 +0000 (04:20 -0400)]
librustc_trans: Don't ICE on unsized type behind raw pointer in nullable pointer opt.

9 years agofix compiler plugins path in doc/reference.md
Conrad Kleinespel [Sat, 25 Apr 2015 11:43:26 +0000 (13:43 +0200)]
fix compiler plugins path in doc/reference.md

9 years agoAuto merge of #24783 - jooert:unittestguidelines, r=alexcrichton
bors [Sat, 25 Apr 2015 09:55:06 +0000 (09:55 +0000)]
Auto merge of #24783 - jooert:unittestguidelines, r=alexcrichton

Changes the style guidelines regarding unit tests to recommend using a sub-module named "tests" instead of "test" for unit tests as "test" might clash with imports of libtest (see #23870, #24030 and http://users.rust-lang.org/t/guidelines-naming-of-unit-test-module/1078 for previous discussions).

r? @alexcrichton

9 years agofix doc
FuGangqiang [Fri, 24 Apr 2015 15:56:02 +0000 (23:56 +0800)]
fix doc

9 years agoReference manual 3.5.2.3.1
Skyler [Sat, 25 Apr 2015 06:26:56 +0000 (23:26 -0700)]
Reference manual 3.5.2.3.1

The description of the syntax for single byte literals is missing the preceding `b` distinction.

9 years agoAuto merge of #24724 - alexcrichton:symlink-stable, r=aturon
bors [Sat, 25 Apr 2015 05:43:39 +0000 (05:43 +0000)]
Auto merge of #24724 - alexcrichton:symlink-stable, r=aturon

These functions were intended to be introduced as `#[stable]` as a stable API
was deprecated in favor of them, but they just erroneously forgot the stability
attributes.

9 years agoRemove obsolete "MarkerTrait" from tests.
Sean Patrick Santos [Sat, 25 Apr 2015 04:58:40 +0000 (22:58 -0600)]
Remove obsolete "MarkerTrait" from tests.

9 years agoAuto merge of #24798 - steveklabnik:rollup, r=steveklabnik
bors [Sat, 25 Apr 2015 03:43:31 +0000 (03:43 +0000)]
Auto merge of #24798 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #24662, #24722, #24725, #24729, #24736, #24749, #24751, #24766, #24769, #24772, #24775, #24790
- Failed merges: #24760

9 years agoFix #20616
York Xiang [Sat, 18 Apr 2015 01:18:46 +0000 (09:18 +0800)]
Fix #20616

9 years agoMore small syntax changes in reference.md
Michael Rosenberg [Fri, 24 Apr 2015 04:54:11 +0000 (00:54 -0400)]
More small syntax changes in reference.md

9 years agoRollup merge of #24790 - jooert:fix24774, r=steveklabnik
Steve Klabnik [Sat, 25 Apr 2015 02:54:27 +0000 (22:54 -0400)]
Rollup merge of #24790 - jooert:fix24774, r=steveklabnik

Fixes #24774.

r? @steveklabnik

9 years agoRollup merge of #24775 - mbrubeck:reference, r=steveklabnik
Steve Klabnik [Sat, 25 Apr 2015 02:54:27 +0000 (22:54 -0400)]
Rollup merge of #24775 - mbrubeck:reference, r=steveklabnik

Update 7.2.20 (`for` expressions):

* `for` loops now use `IntoIterator` instead of just `Iterator`
* Simplify the example by removing unnecessary `Vec::iter` call.

...and a fix for a minor formatting error.

r? @steveklabnik

9 years agoRollup merge of #24772 - steveklabnik:gh24712, r=alexcrichton
Steve Klabnik [Sat, 25 Apr 2015 02:54:26 +0000 (22:54 -0400)]
Rollup merge of #24772 - steveklabnik:gh24712, r=alexcrichton

FIxes #24712

9 years agoRollup merge of #24769 - SkylerLipthay:patch-1, r=steveklabnik
Steve Klabnik [Sat, 25 Apr 2015 02:54:26 +0000 (22:54 -0400)]
Rollup merge of #24769 - SkylerLipthay:patch-1, r=steveklabnik

`is` and `us` suffixes are deprecated in favor of `isize` and `usize`.

9 years agoRollup merge of #24766 - nwin:patch-1, r=steveklabnik
Steve Klabnik [Sat, 25 Apr 2015 02:54:26 +0000 (22:54 -0400)]
Rollup merge of #24766 - nwin:patch-1, r=steveklabnik

Changed in #22838.

audited (raw) byte string literals @ #16676

9 years agoRollup merge of #24751 - lstat:feature-gate-22820-dups, r=brson
Steve Klabnik [Sat, 25 Apr 2015 02:54:25 +0000 (22:54 -0400)]
Rollup merge of #24751 - lstat:feature-gate-22820-dups, r=brson

As part of the audit for #22820 the following duplicate feature
gate tests were removed:

* `box_patterns`
* `simd_ffi`

These tests for `box_patterns` and `simd_ffi` were added in #23578,
however there were existing tests in #20723 and #21233 respectively.

r? @nrc

9 years agoRollup merge of #24749 - lstat:feature-gate-22820, r=nrc
Steve Klabnik [Sat, 25 Apr 2015 02:54:25 +0000 (22:54 -0400)]
Rollup merge of #24749 - lstat:feature-gate-22820, r=nrc

As part of the audit for #22820 the following feature gate tests have been
added:

* `negate_unsigned`
* `on_unimplemented`
* `optin_builtin_traits`
* `plugin`
* `rustc_attrs`
* `rustc_diagnostic_macros`
* `slice_patterns`

In addition some feature gate error message typos fixed.

9 years agoRollup merge of #24736 - steveklabnik:doc_mutability, r=alexcrichton
Steve Klabnik [Sat, 25 Apr 2015 02:54:25 +0000 (22:54 -0400)]
Rollup merge of #24736 - steveklabnik:doc_mutability, r=alexcrichton

Okay, last chapter other than ownership stuff. :confetti_ball:

9 years agoRollup merge of #24729 - mdinger:reference_grammar, r=steveklabnik
Steve Klabnik [Sat, 25 Apr 2015 02:54:25 +0000 (22:54 -0400)]
Rollup merge of #24729 - mdinger:reference_grammar, r=steveklabnik

From https://github.com/rust-lang/rust/issues/24723#issuecomment-95636827 :

> Yes, I've been meaning to just remove it in favor of GRAMMAR.md
> - steveklabnik

9 years agoRollup merge of #24725 - steveklabnik:doc_operators_and_overloading, r=alexcrichton
Steve Klabnik [Sat, 25 Apr 2015 02:54:25 +0000 (22:54 -0400)]
Rollup merge of #24725 - steveklabnik:doc_operators_and_overloading, r=alexcrichton

I forgot these heavily use associated types, so move it after that
as well.

9 years agoRollup merge of #24722 - steveklabnik:doc_deref, r=alexcrichton
Steve Klabnik [Sat, 25 Apr 2015 02:54:24 +0000 (22:54 -0400)]
Rollup merge of #24722 - steveklabnik:doc_deref, r=alexcrichton

r? @alexcrichton

9 years agoRollup merge of #24662 - steveklabnik:gh24656, r=steveklabnik
Steve Klabnik [Sat, 25 Apr 2015 02:54:24 +0000 (22:54 -0400)]
Rollup merge of #24662 - steveklabnik:gh24656, r=steveklabnik

Fixes #24656

r? @pnkfelix

I just added the examples, but if the wording needs expanded too, let me know what you think should be added :)

9 years agoIn [-] doc buttons, change hyphen ‘-’ to minus ‘−’
Rory O’Kane [Sat, 25 Apr 2015 00:29:28 +0000 (20:29 -0400)]
In [-] doc buttons, change hyphen ‘-’ to minus ‘−’

The minus sign ‘−’ is the same width as the plus sign ‘+’, so the button’s transition between the two symbols will look more smooth.

9 years agoWhoops, please tidy
Steve Klabnik [Fri, 24 Apr 2015 22:59:47 +0000 (18:59 -0400)]
Whoops, please tidy

9 years agorustdoc: change color of trait types
Liigo Zhuang [Fri, 24 Apr 2015 22:57:18 +0000 (06:57 +0800)]
rustdoc: change color of trait types

Fixes #24441

9 years agoTRPL: deref coercions
Steve Klabnik [Thu, 23 Apr 2015 15:35:37 +0000 (11:35 -0400)]
TRPL: deref coercions

9 years agoAdd examples by @pnkfelix to fmt precision
Steve Klabnik [Tue, 21 Apr 2015 15:10:56 +0000 (11:10 -0400)]
Add examples by @pnkfelix to fmt precision

Fixes #24656

9 years agorustbook: Fixes display of navigation links in README.html.
Johannes Oertel [Fri, 24 Apr 2015 22:21:13 +0000 (00:21 +0200)]
rustbook: Fixes display of navigation links in README.html.