]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoRollup merge of #26891 - steveklabnik:gh26552, r=huonw
Steve Klabnik [Wed, 8 Jul 2015 14:34:27 +0000 (10:34 -0400)]
Rollup merge of #26891 - steveklabnik:gh26552, r=huonw

Added a proper Unsafety header, as well as mentioning that
the pointer shouldn't be null.

Fixes #26552

9 years agoFix up unsafe section of slice::from_raw_parts
Steve Klabnik [Wed, 8 Jul 2015 17:04:41 +0000 (13:04 -0400)]
Fix up unsafe section of slice::from_raw_parts

Added a proper Unsafety header, as well as mentioning that
the pointer shouldn't be null.

Fixes #26552

9 years agoRollup merge of #26889 - sanxiyn:fixme, r=alexcrichton
Steve Klabnik [Wed, 8 Jul 2015 14:34:26 +0000 (10:34 -0400)]
Rollup merge of #26889 - sanxiyn:fixme, r=alexcrichton

Fix #4951.

9 years agoRollup merge of #26850 - steveklabnik:more_format_docs, r=alexcrichton
Steve Klabnik [Wed, 8 Jul 2015 14:34:26 +0000 (10:34 -0400)]
Rollup merge of #26850 - steveklabnik:more_format_docs, r=alexcrichton

https://www.reddit.com/r/rust/comments/3ceaui/psa_produces_prettyprinted_debug_output/

9 years agoMake mention of alternate flags in std::fmt traits
Steve Klabnik [Tue, 7 Jul 2015 13:07:05 +0000 (09:07 -0400)]
Make mention of alternate flags in std::fmt traits

https://www.reddit.com/r/rust/comments/3ceaui/psa_produces_prettyprinted_debug_output/

9 years agoRollup merge of #26784 - birkenfeld:patch-2, r=steveklabnik
Steve Klabnik [Wed, 8 Jul 2015 14:34:26 +0000 (10:34 -0400)]
Rollup merge of #26784 - birkenfeld:patch-2, r=steveklabnik

* fix probable copy-paste error in BufWriter.get_mut()
* more consistent punctuation

9 years agoRollup merge of #26687 - christianweinz:patch-1, r=huonw
Steve Klabnik [Wed, 8 Jul 2015 14:34:26 +0000 (10:34 -0400)]
Rollup merge of #26687 - christianweinz:patch-1, r=huonw

The ‘_‘ wildcard does exactly not handle specific cases but all not specified ones.

9 years agoRemove a FIXME
Seo Sanghyeon [Wed, 8 Jul 2015 14:30:19 +0000 (23:30 +0900)]
Remove a FIXME

9 years agoAuto merge of #26863 - brson:revert-stageversion, r=alexcrichton
bors [Wed, 8 Jul 2015 07:26:42 +0000 (07:26 +0000)]
Auto merge of #26863 - brson:revert-stageversion, r=alexcrichton

This reverts https://github.com/rust-lang/rust/pull/26599, which puts the stage number in the output of `--version -v`, but is not supposed to put it in the 'stage2' compiler, which is what most people refer to the binary we deploy.

The picture is not so clear though because of how stage 'promotions' happen in the build and also because the windows build deploys stage3, not stage2.

cc @richo

9 years agoAuto merge of #26859 - arielb1:const-deref-again, r=eddyb
bors [Wed, 8 Jul 2015 03:11:36 +0000 (03:11 +0000)]
Auto merge of #26859 - arielb1:const-deref-again, r=eddyb

Fixes #25901

r? @eddyb

9 years agoAuto merge of #26861 - steveklabnik:rollup, r=steveklabnik
bors [Tue, 7 Jul 2015 21:28:54 +0000 (21:28 +0000)]
Auto merge of #26861 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #26742, #26852, #26853, #26854, #26855, #26857
- Failed merges: #26796

9 years agoRevert "rustc_driver: Print stage info in --version --verbose"
Brian Anderson [Tue, 7 Jul 2015 17:54:06 +0000 (10:54 -0700)]
Revert "rustc_driver: Print stage info in --version --verbose"

This reverts commit 555b021c6e531fc375c62160a176dcc4fe77b798.

9 years agoRevert "rustc_driver: Omit stage info for stage2+"
Brian Anderson [Tue, 7 Jul 2015 17:53:54 +0000 (10:53 -0700)]
Revert "rustc_driver: Omit stage info for stage2+"

This reverts commit e66ac43ea4ca489486c5c5dc59974577449fad44.

9 years agoAuto merge of #26747 - huonw:stability-issue, r=alexcrichton
bors [Tue, 7 Jul 2015 17:41:43 +0000 (17:41 +0000)]
Auto merge of #26747 - huonw:stability-issue, r=alexcrichton

This takes an issue number and points people to it in the printed error
message. This commit does not make it an error to have no `issue` field.

9 years agomark user-defined derefs as non-constant
Ariel Ben-Yehuda [Tue, 7 Jul 2015 15:45:52 +0000 (18:45 +0300)]
mark user-defined derefs as non-constant

Fixes #25901

9 years agouse is_method_call rather than directly accessing the method_map
Ariel Ben-Yehuda [Tue, 7 Jul 2015 15:45:21 +0000 (18:45 +0300)]
use is_method_call rather than directly accessing the method_map

9 years agoRollup merge of #26857 - GuillaumeGomez:patch-1, r=steveklabnik
Steve Klabnik [Tue, 7 Jul 2015 13:49:56 +0000 (09:49 -0400)]
Rollup merge of #26857 - GuillaumeGomez:patch-1, r=steveklabnik

9 years agoAdd missing "```"
Guillaume Gomez [Tue, 7 Jul 2015 15:01:32 +0000 (17:01 +0200)]
Add missing "```"

9 years agoRollup merge of #26855 - steveklabnik:gh26344, r=alexcrichton
Steve Klabnik [Tue, 7 Jul 2015 13:49:56 +0000 (09:49 -0400)]
Rollup merge of #26855 - steveklabnik:gh26344, r=alexcrichton

Fixes #26344

9 years agoRollup merge of #26854 - steveklabnik:gh26345, r=alexcrichton
Steve Klabnik [Tue, 7 Jul 2015 13:49:56 +0000 (09:49 -0400)]
Rollup merge of #26854 - steveklabnik:gh26345, r=alexcrichton

I am not mentioning #[unsafe_drop_flag] because it should go away
eventually, and also because it's just an attribute, it's not
really a use of the `unsafe` keyword.

Fixes #26345

9 years agoRollup merge of #26853 - steveklabnik:gh26346, r=Gankro
Steve Klabnik [Tue, 7 Jul 2015 13:49:55 +0000 (09:49 -0400)]
Rollup merge of #26853 - steveklabnik:gh26346, r=Gankro

This incorrectly implied that doing things is fine in unsafe code

Fixes #26346

9 years agoRe-word UB in unsafe guide
Steve Klabnik [Tue, 7 Jul 2015 13:23:07 +0000 (09:23 -0400)]
Re-word UB in unsafe guide

This incorrectly implied that doing things is fine in unsafe code

Fixes #26346

9 years agoRollup merge of #26852 - steveklabnik:gh26375, r=alexcrichton
Steve Klabnik [Tue, 7 Jul 2015 13:49:55 +0000 (09:49 -0400)]
Rollup merge of #26852 - steveklabnik:gh26375, r=alexcrichton

Fixes #26375

9 years agoRollup merge of #26742 - GuillaumeGomez:patch-2, r=arielb1
Steve Klabnik [Tue, 7 Jul 2015 13:49:55 +0000 (09:49 -0400)]
Rollup merge of #26742 - GuillaumeGomez:patch-2, r=arielb1

Part of #24407.
r? @Manishearth

9 years agoNot literally all of concurrency is a library
Steve Klabnik [Tue, 7 Jul 2015 13:29:04 +0000 (09:29 -0400)]
Not literally all of concurrency is a library

Fixes #26344

9 years agoThere are four uses of unsafe, actually
Steve Klabnik [Tue, 7 Jul 2015 13:26:23 +0000 (09:26 -0400)]
There are four uses of unsafe, actually

I am not mentioning #[unsafe_drop_flag] because it should go away
eventually, and also because it's just an attribute, it's not
really a use of the `unsafe` keyword.

Fixes #26345

9 years agoDescribe lifetime syntax for impl
Steve Klabnik [Tue, 7 Jul 2015 13:19:26 +0000 (09:19 -0400)]
Describe lifetime syntax for impl

Fixes #26375

9 years agoAuto merge of #26699 - eddyb:unstable-prelude_import, r=huonw
bors [Tue, 7 Jul 2015 07:34:56 +0000 (07:34 +0000)]
Auto merge of #26699 - eddyb:unstable-prelude_import, r=huonw

Closes #26690.

9 years agoAuto merge of #26844 - steveklabnik:rollup, r=steveklabnik
bors [Tue, 7 Jul 2015 02:26:31 +0000 (02:26 +0000)]
Auto merge of #26844 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #26599, #26761, #26807, #26809, #26825, #26827, #26828, #26832, #26834, #26835
- Failed merges: #26796

9 years agoAuto merge of #26599 - richo:richo-stage-info, r=brson
bors [Mon, 6 Jul 2015 22:55:07 +0000 (22:55 +0000)]
Auto merge of #26599 - richo:richo-stage-info, r=brson

This will add information about the stage that a rustc was built with to the verbose version info

I have symlinks into $(HOST)/stage{0,1,2} into the rust version switcher thing I use, and occasionally need to know which stage a given rustc is.

9 years agoRollup merge of #26835 - tshepang:copy-or-not, r=steveklabnik
Steve Klabnik [Mon, 6 Jul 2015 22:06:31 +0000 (18:06 -0400)]
Rollup merge of #26835 - tshepang:copy-or-not, r=steveklabnik

9 years agoRollup merge of #26834 - tshepang:space, r=brson
Steve Klabnik [Mon, 6 Jul 2015 22:06:31 +0000 (18:06 -0400)]
Rollup merge of #26834 - tshepang:space, r=brson

9 years agoRollup merge of #26832 - steveklabnik:doc_rustc_cycle_time, r=huonw
Steve Klabnik [Mon, 6 Jul 2015 22:06:30 +0000 (18:06 -0400)]
Rollup merge of #26832 - steveklabnik:doc_rustc_cycle_time, r=huonw

9 years agoRollup merge of #26828 - steveklabnik:gh25765, r=bluss
Steve Klabnik [Mon, 6 Jul 2015 22:06:30 +0000 (18:06 -0400)]
Rollup merge of #26828 - steveklabnik:gh25765, r=bluss

Each formatting trait now has an example of implementation, as well as a
fuller description of what it's supposed to output.

It also contains a link to the module-level documentation which

Fixes #25765

9 years agoRollup merge of #26827 - steveklabnik:gh25786, r=alexcrichton
Steve Klabnik [Mon, 6 Jul 2015 22:06:30 +0000 (18:06 -0400)]
Rollup merge of #26827 - steveklabnik:gh25786, r=alexcrichton

Fixes #25786

9 years agoRollup merge of #26825 - steveklabnik:gh24802, r=alexcrichton
Steve Klabnik [Mon, 6 Jul 2015 22:06:30 +0000 (18:06 -0400)]
Rollup merge of #26825 - steveklabnik:gh24802, r=alexcrichton

Fixes #24802

9 years agoRollup merge of #26809 - cmr:libc-ioctl, r=alexcrichton
Steve Klabnik [Mon, 6 Jul 2015 22:06:29 +0000 (18:06 -0400)]
Rollup merge of #26809 - cmr:libc-ioctl, r=alexcrichton

None

9 years agoRollup merge of #26807 - eddyb:trans-normalize, r=cmr
Steve Klabnik [Mon, 6 Jul 2015 22:06:29 +0000 (18:06 -0400)]
Rollup merge of #26807 - eddyb:trans-normalize, r=cmr

Fixes #26805. f? @jroesch.

9 years agoRollup merge of #26761 - steveklabnik:actually_ub, r=alexcrichton
Steve Klabnik [Mon, 6 Jul 2015 22:06:29 +0000 (18:06 -0400)]
Rollup merge of #26761 - steveklabnik:actually_ub, r=alexcrichton

I incorrectly stated that it's an abort.

r? @Gankro

9 years agoRollup merge of #26599 - richo:richo-stage-info, r=brson
Steve Klabnik [Mon, 6 Jul 2015 22:06:29 +0000 (18:06 -0400)]
Rollup merge of #26599 - richo:richo-stage-info, r=brson

This will add information about the stage that a rustc was built with to the verbose version info

I have symlinks into $(HOST)/stage{0,1,2} into the rust version switcher thing I use, and occasionally need to know which stage a given rustc is.

9 years agoSignificantly improve formatter trait docs
Steve Klabnik [Mon, 6 Jul 2015 17:39:03 +0000 (13:39 -0400)]
Significantly improve formatter trait docs

Each formatting trait now has an example of implementation, as well as a
fuller description of what it's supposed to output.

It also contains a link to the module-level documentation which

Fixes #25765

9 years agoAuto merge of #26757 - oli-obk:style_fixes, r=brson
bors [Mon, 6 Jul 2015 21:22:20 +0000 (21:22 +0000)]
Auto merge of #26757 - oli-obk:style_fixes, r=brson

the indentation has always been a thorn in my eye.

If it's preferred I'll leave the `unsafe` where it was and change it to

```rust
unsafe { match e.node {
    ...
} } // unsafe { match e.node {
```

so there's no unnecessary indent

9 years agoAdd note about special make targets
Steve Klabnik [Mon, 6 Jul 2015 18:46:21 +0000 (14:46 -0400)]
Add note about special make targets

9 years agorustc_driver: Omit stage info for stage2+
Richo Healey [Mon, 6 Jul 2015 19:43:01 +0000 (12:43 -0700)]
rustc_driver: Omit stage info for stage2+

9 years agoreference: make 'Move and copied types' section more simple
Tshepang Lekhonkhobe [Mon, 6 Jul 2015 20:10:21 +0000 (22:10 +0200)]
reference: make 'Move and copied types' section more simple

9 years agoreference: do not display the extra space
Tshepang Lekhonkhobe [Mon, 6 Jul 2015 20:01:20 +0000 (22:01 +0200)]
reference: do not display the extra space

9 years agoFFI panic is UB
Steve Klabnik [Fri, 3 Jul 2015 16:56:51 +0000 (12:56 -0400)]
FFI panic is UB

I incorrectly stated that it's an abort.

9 years agoAuto merge of #26741 - alexcrichton:noinline-destructors, r=brson
bors [Mon, 6 Jul 2015 19:49:16 +0000 (19:49 +0000)]
Auto merge of #26741 - alexcrichton:noinline-destructors, r=brson

This PR was originally going to be a "let's start running tests on MSVC" PR, but it didn't quite get to that point. It instead gets us ~80% of the way there! The steps taken in this PR are:

* Landing pads are turned on by default for 64-bit MSVC. The LLVM support is "good enough" with the caveat the destructor glue is now marked noinline. This was recommended [on the associated bug](https://llvm.org/bugs/show_bug.cgi?id=23884) as a stopgap until LLVM has a better representation for exception handling in MSVC. The consequence of this is that MSVC will have a bit of a perf hit, but there are possible routes we can take if this workaround sticks around for too long.
* The linker (`link.exe`) is now looked up in the Windows Registry if it's not otherwise available in the environment. This improves using the compiler outside of a VS shell (e.g. in a MSYS shell or in a vanilla cmd.exe shell). This also makes cross compiles via Cargo "just work" when crossing between 32 and 64 bit!
* TLS destructors were fixed to start running on MSVC (they previously weren't running at all)
* A few assorted `run-pass` tests were fixed.
* The dependency on the `rust_builtin` library was removed entirely for MSVC to try to prevent any `cl.exe` compiled objects get into the standard library. This should help us later remove any dependence on the CRT by the standard library.
* I re-added `rust_try_msvc_32.ll` for 32-bit MSVC and ensured that landing pads were turned off by default there as well.

Despite landing pads being enabled, there are still *many* failing tests on MSVC. The two major classes I've identified so far are:

* Spurious aborts. It appears that when optimizations are enabled that landing pads aren't always lined up properly, and sometimes an exception being thrown can't find the catch block down the stack, causing the program to abort. I've been working to reduce this test case but haven't been met with great success just yet.
* Parallel codegen does not work on MSVC. Our current strategy is to take the N object files emitted by the N codegen threads and use `ld -r` to assemble them into *one* object file. The MSVC linker, however, does not have this ability, and this will need to be rearchitected to work on MSVC.

I will fix parallel codegen in a future PR, and I'll also be watching LLVM closely to see if the aborts... disappear!

9 years agorustc_driver: Print stage info in --version --verbose
Richo Healey [Fri, 26 Jun 2015 17:32:42 +0000 (10:32 -0700)]
rustc_driver: Print stage info in --version --verbose

9 years agorustc: implement `unstable(issue = "nnn")`.
Huon Wilson [Fri, 3 Jul 2015 04:00:59 +0000 (21:00 -0700)]
rustc: implement `unstable(issue = "nnn")`.

This takes an issue number and points people to it in the printed error
message. This commit does not make it an error to have no `issue` field.

9 years agoAuto merge of #26824 - arielb1:fix-26812, r=eddyb
bors [Mon, 6 Jul 2015 18:15:46 +0000 (18:15 +0000)]
Auto merge of #26824 - arielb1:fix-26812, r=eddyb

Fixes #26812.

r? @eddyb

9 years agoDocument _ in bindings
Steve Klabnik [Mon, 6 Jul 2015 16:27:32 +0000 (12:27 -0400)]
Document _ in bindings

Fixes #25786

9 years agoAuto merge of #26822 - tamird:llvm-config, r=alexcrichton
bors [Mon, 6 Jul 2015 16:22:47 +0000 (16:22 +0000)]
Auto merge of #26822 - tamird:llvm-config, r=alexcrichton

Minor stuff.

9 years agoLink to test suite information from CONTRIBUTING.md
Steve Klabnik [Mon, 6 Jul 2015 16:14:49 +0000 (12:14 -0400)]
Link to test suite information from CONTRIBUTING.md

Fixes #24802

9 years agodon't use type_parameter_def during astconv
Ariel Ben-Yehuda [Mon, 6 Jul 2015 15:46:03 +0000 (18:46 +0300)]
don't use type_parameter_def during astconv

astconv is called when converting the type-parameter, which leads to
a crash.

Fixes #26812.

9 years agoAuto merge of #26820 - liigo:patch-2, r=steveklabnik
bors [Mon, 6 Jul 2015 14:49:52 +0000 (14:49 +0000)]
Auto merge of #26820 - liigo:patch-2, r=steveklabnik

Closes #26801

9 years agoRemove unused variable
Tamir Duberstein [Sat, 30 May 2015 13:35:34 +0000 (09:35 -0400)]
Remove unused variable

9 years ago`llconfig` is `llvm-config`
Tamir Duberstein [Fri, 29 May 2015 16:36:13 +0000 (12:36 -0400)]
`llconfig` is `llvm-config`

9 years agoSimplify
Tamir Duberstein [Fri, 29 May 2015 16:36:02 +0000 (12:36 -0400)]
Simplify

9 years agoAuto merge of #26821 - oli-obk:patch-1, r=sanxiyn
bors [Mon, 6 Jul 2015 12:20:23 +0000 (12:20 +0000)]
Auto merge of #26821 - oli-obk:patch-1, r=sanxiyn

9 years agotypo "struct has is 0-sized"
Oliver Schneider [Mon, 6 Jul 2015 11:58:37 +0000 (13:58 +0200)]
typo "struct has is 0-sized"

9 years agolower blanket unsafe block to actual cases of unsafe and adjust indents
Oliver Schneider [Fri, 3 Jul 2015 09:34:19 +0000 (11:34 +0200)]
lower blanket unsafe block to actual cases of unsafe and adjust indents

9 years agobook: introduce `//!` doc comment in comments section
Liigo Zhuang [Mon, 6 Jul 2015 06:55:06 +0000 (14:55 +0800)]
book: introduce `//!` doc comment in comments section

Closes #26801

9 years agoAuto merge of #26817 - cmr:vecdeque-docs, r=Gankro
bors [Mon, 6 Jul 2015 05:01:21 +0000 (05:01 +0000)]
Auto merge of #26817 - cmr:vecdeque-docs, r=Gankro

None

9 years agoAuto merge of #26811 - steveklabnik:rollup, r=steveklabnik
bors [Sun, 5 Jul 2015 23:42:50 +0000 (23:42 +0000)]
Auto merge of #26811 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #26464, #26789, #26800, #26806, #26808
- Failed merges: #26796

9 years agoAuto merge of #26464 - Gankro:send, r=alexcrichton
bors [Sun, 5 Jul 2015 22:10:21 +0000 (22:10 +0000)]
Auto merge of #26464 - Gankro:send, r=alexcrichton

Vec contains `Unique<T>` and some usizes, this is already derived.

9 years agoAuto merge of #26473 - Eljay:missing_docs, r=alexcrichton
bors [Sun, 5 Jul 2015 20:37:26 +0000 (20:37 +0000)]
Auto merge of #26473 - Eljay:missing_docs, r=alexcrichton

Fixes #24249

I've tagged all items that were missing docs to allow them to compile for now, the ones in core/num should probably be documented at least.

This is also a breaking change for any crates using `#[deny(missing_docs)]` that have undocumented constants, not sure there is any way to avoid this without making it a separate lint?

9 years agorustc_trans: always use normalizing_infer_ctxt.
Eduard Burtescu [Sun, 5 Jul 2015 19:41:23 +0000 (22:41 +0300)]
rustc_trans: always use normalizing_infer_ctxt.

9 years agoFeature-gate #[prelude_import].
Eduard Burtescu [Wed, 1 Jul 2015 03:05:17 +0000 (06:05 +0300)]
Feature-gate #[prelude_import].

9 years agoliblibc: correct Linux ioctl request type
Corey Richardson [Sun, 5 Jul 2015 10:40:49 +0000 (06:40 -0400)]
liblibc: correct Linux ioctl request type

9 years agoRollup merge of #26808 - tshepang:closures, r=steveklabnik
Steve Klabnik [Sun, 5 Jul 2015 19:12:21 +0000 (15:12 -0400)]
Rollup merge of #26808 - tshepang:closures, r=steveklabnik

9 years agoreference: 'inherits' is more clear than 'implies'
Tshepang Lekhonkhobe [Sun, 5 Jul 2015 19:43:28 +0000 (21:43 +0200)]
reference: 'inherits' is more clear than 'implies'

9 years agoRollup merge of #26806 - cmr:stabilize-drain, r=Gankro
Steve Klabnik [Sun, 5 Jul 2015 19:12:20 +0000 (15:12 -0400)]
Rollup merge of #26806 - cmr:stabilize-drain, r=Gankro

None

9 years agoRollup merge of #26800 - tshepang:comma, r=Gankro
Steve Klabnik [Sun, 5 Jul 2015 19:12:20 +0000 (15:12 -0400)]
Rollup merge of #26800 - tshepang:comma, r=Gankro

9 years agoRollup merge of #26789 - tshepang:improve-array-examples, r=alexcrichton
Steve Klabnik [Sun, 5 Jul 2015 19:12:20 +0000 (15:12 -0400)]
Rollup merge of #26789 - tshepang:improve-array-examples, r=alexcrichton

9 years agoRollup merge of #26464 - Gankro:send, r=alexcrichton
Steve Klabnik [Sun, 5 Jul 2015 19:12:19 +0000 (15:12 -0400)]
Rollup merge of #26464 - Gankro:send, r=alexcrichton

Vec contains `Unique<T>` and some usizes, this is already derived.

9 years agoAuto merge of #25754 - geofft:remove-compiletest-jit, r=alexcrichton
bors [Sun, 5 Jul 2015 19:05:14 +0000 (19:05 +0000)]
Auto merge of #25754 - geofft:remove-compiletest-jit, r=alexcrichton

jit support was removed from rustc in 6b34ba242d7372b779bf50682b9401b61183828e
(December 2013), so passing `--jit` wouldn't even work.

9 years agoAuto merge of #26798 - steveklabnik:rollup, r=steveklabnik
bors [Sun, 5 Jul 2015 17:31:11 +0000 (17:31 +0000)]
Auto merge of #26798 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #26785, #26787, #26788, #26791, #26792, #26795
- Failed merges: #26796

9 years agocollections: vec_deque: add some notes on how to use VecDeque as a queue effectively
Corey Richardson [Sun, 5 Jul 2015 16:18:57 +0000 (12:18 -0400)]
collections: vec_deque: add some notes on how to use VecDeque as a queue effectively

9 years agoreference: remove stray comma
Tshepang Lekhonkhobe [Sun, 5 Jul 2015 15:58:46 +0000 (17:58 +0200)]
reference: remove stray comma

9 years agoRollup merge of #26795 - tshepang:typo, r=steveklabnik
Steve Klabnik [Sun, 5 Jul 2015 11:35:16 +0000 (07:35 -0400)]
Rollup merge of #26795 - tshepang:typo, r=steveklabnik

9 years agoreference: fix typo
Tshepang Lekhonkhobe [Sun, 5 Jul 2015 14:36:43 +0000 (16:36 +0200)]
reference: fix typo

9 years agoRollup merge of #26792 - tshepang:follow-idiom, r=steveklabnik
Steve Klabnik [Sun, 5 Jul 2015 11:35:15 +0000 (07:35 -0400)]
Rollup merge of #26792 - tshepang:follow-idiom, r=steveklabnik

9 years agoreference: improve lambda example
Tshepang Lekhonkhobe [Sun, 5 Jul 2015 12:49:08 +0000 (14:49 +0200)]
reference: improve lambda example

9 years agoRollup merge of #26791 - tshepang:misc-ref-fixes, r=steveklabnik
Steve Klabnik [Sun, 5 Jul 2015 11:35:15 +0000 (07:35 -0400)]
Rollup merge of #26791 - tshepang:misc-ref-fixes, r=steveklabnik

One is for grammar, and the other is for clarity

9 years agoreference: tiny fixes
Tshepang Lekhonkhobe [Sun, 5 Jul 2015 12:45:24 +0000 (14:45 +0200)]
reference: tiny fixes

One is for grammar, and the other is for clarity

9 years agoRollup merge of #26788 - tshepang:not-exclamation-marks, r=steveklabnik
Steve Klabnik [Sun, 5 Jul 2015 11:35:15 +0000 (07:35 -0400)]
Rollup merge of #26788 - tshepang:not-exclamation-marks, r=steveklabnik

The sentences are also so short that they don't need periods at the end

9 years agoRollup merge of #26787 - tshepang:tuple-usage, r=steveklabnik
Steve Klabnik [Sun, 5 Jul 2015 11:35:15 +0000 (07:35 -0400)]
Rollup merge of #26787 - tshepang:tuple-usage, r=steveklabnik

9 years agoRollup merge of #26785 - tshepang:inference, r=steveklabnik
Steve Klabnik [Sun, 5 Jul 2015 11:35:14 +0000 (07:35 -0400)]
Rollup merge of #26785 - tshepang:inference, r=steveklabnik

…at and integer types

9 years agoreference: improve examples of the different array types
Tshepang Lekhonkhobe [Sun, 5 Jul 2015 11:30:46 +0000 (13:30 +0200)]
reference: improve examples of the different array types

9 years agoreference: that looks like exclamations marks for some fonts
Tshepang Lekhonkhobe [Sun, 5 Jul 2015 11:11:26 +0000 (13:11 +0200)]
reference: that looks like exclamations marks for some fonts

The sentences are also so short that they don't need periods at the end

9 years agoreference: make tuple usage examples more meaningful
Tshepang Lekhonkhobe [Sun, 5 Jul 2015 11:01:42 +0000 (13:01 +0200)]
reference: make tuple usage examples more meaningful

9 years agoreference: improve readability of type inference explanations for float and integer...
Tshepang Lekhonkhobe [Sun, 5 Jul 2015 10:31:44 +0000 (12:31 +0200)]
reference: improve readability of type inference explanations for float and integer types

9 years agostd: small doc fixes for BufReader and BufWriter
Georg Brandl [Sun, 5 Jul 2015 09:59:33 +0000 (11:59 +0200)]
std: small doc fixes for BufReader and BufWriter

* fix probable copy-paste error in BufWriter.get_mut()
* more consistent punctuation

9 years agocollections: vec_deque: rename "ringbuf" to "VecDeque" in doc comments
Corey Richardson [Sun, 5 Jul 2015 07:49:36 +0000 (03:49 -0400)]
collections: vec_deque: rename "ringbuf" to "VecDeque" in doc comments

9 years agoAuto merge of #26776 - bluss:num-inline, r=eddyb
bors [Sat, 4 Jul 2015 20:59:56 +0000 (20:59 +0000)]
Auto merge of #26776 - bluss:num-inline, r=eddyb

Add missing #[inline] to min_value/max_value on integers

Spotted a compiled function call to num::usize::min_value, I'd prefer
the 0 to be inlined.

9 years agoAdd missing #[inline] to min_value/max_value on integers
Ulrik Sverdrup [Sat, 4 Jul 2015 20:54:59 +0000 (22:54 +0200)]
Add missing #[inline] to min_value/max_value on integers

Spotted a compiled function call to num::usize::min_value, I'd prefer
the 0 to be inlined.

9 years agoAuto merge of #26694 - eddyb:method-nan, r=arielb1
bors [Sat, 4 Jul 2015 18:49:28 +0000 (18:49 +0000)]
Auto merge of #26694 - eddyb:method-nan, r=arielb1

`MethodCallee` now has no information about the method, other than its `DefId`.
The previous bits of information can be recovered as follows:
```rust
let method_item = tcx.impl_or_trait_item(callee.def_id);
let container = method_item.container();
```
The method is inherent if `container` is a `ty::ImplContainer`:
* the `impl` the method comes from is `container.id()`

The method is a trait method if `container` is a `ty::TraitContainer:
* the `trait` the method is part of is `container.id()`
* a `ty::TraitRef` can be constructed by putting together:
 * `container.id()` as the `trait` ID
 * `callee.substs.clone().method_to_trait()` as the `trait` substs (including `Self`)
* the above `trait_ref` is a valid `T: Trait<A, B, C>` predicate
* selecting `trait_ref` could result in one of the following:
 * `traits::VtableImpl(data)`: static dispatch to `data.impl_def_id`
 * `traits::VtableObject(data)`: dynamic dispatch, with the vtable index:
`traits::get_vtable_index_of_object_method(tcx, data, callee.def_id)`
 * other variants of `traits::Vtable`: various other `impl` sources

9 years agoAuto merge of #26771 - bluss:str-prefix, r=Gankro
bors [Sat, 4 Jul 2015 17:16:51 +0000 (17:16 +0000)]
Auto merge of #26771 - bluss:str-prefix, r=Gankro

core: Use memcmp in is_prefix_of / is_suffix_of

The basic str equality in core::str calls memcmp, re-use the same
function in StrSearcher's is_prefix_of, is_suffix_of.

9 years agoRemove E0134 and E0135 error explanation
Guillaume Gomez [Sat, 4 Jul 2015 16:35:21 +0000 (18:35 +0200)]
Remove E0134 and E0135 error explanation