Commit Graph

56397 Commits

Author SHA1 Message Date
Jonathan Turner
6631d8e9c6 Rollup merge of #36147 - mikhail-m1:master, r=jonathandturner
update E0265 to new format

Fixes #35309 as part of #35233.
I've describe partially bonus achieve in #35309

r? @jonathandturner
2016-08-31 06:29:11 -07:00
Jonathan Turner
93c5d6cfd7 Rollup merge of #36141 - GuillaumeGomez:err_codes, r=jonathandturner
Err codes

r? @jonathandturner
2016-08-31 06:29:11 -07:00
Jonathan Turner
ad5430f397 Rollup merge of #36140 - cristicbz:test-14875, r=nagisa
Add test for #14875

You can check this out in the playground https://is.gd/oVKC2T . It will fail on stable, but pass on nightly as @nagisa suggested on the issue.

Fixes #14875
2016-08-31 06:29:11 -07:00
Jonathan Turner
d18f14854a Rollup merge of #36136 - athulappadan:E0034, r=jonathandturner
Update compiler error 0034 to use new format.

Part of #35233
Addresses #35205

r? @jonathandturner
2016-08-31 06:29:10 -07:00
Jonathan Turner
f3ce9fd5a7 Rollup merge of #36135 - 0xmohit:pr/error-code-E0520, r=jonathandturner
Update E0520 to new error format

Fixes #36112.
Part of #35233.

r? @jonathandturner
2016-08-31 06:29:10 -07:00
Jonathan Turner
422305af7b Rollup merge of #36134 - tshepang:more-simple, r=steveklabnik
doc: make TcpListener example more simple
2016-08-31 06:29:10 -07:00
Jonathan Turner
668a34d08e Rollup merge of #36130 - frewsxcv:patch-32, r=steveklabnik
rustbook chapters/sections should be an ordered list.
2016-08-31 06:29:10 -07:00
Jonathan Turner
1048ea24e1 Rollup merge of #36101 - frewsxcv:debug-path-components, r=alexcrichton
Implement `Debug` for `std::path::{Components,Iter}`.

None
2016-08-31 06:29:09 -07:00
Jonathan Turner
18b5ae3019 Rollup merge of #36089 - apasel422:issue-24204, r=alexcrichton
Add test for #24204

Closes #24204
2016-08-31 06:29:09 -07:00
Jonathan Turner
44113e603b Rollup merge of #36085 - apasel422:issue-34053, r=brson
Add test for #34053

Closes #34053
2016-08-31 06:29:09 -07:00
Jonathan Turner
c4602288d2 Rollup merge of #36079 - acrrd:new_format_E0318, r=GuillaumeGomez
Update E0318 to new format

Fixes #35322.
Part of #35233.

r? @GuillaumeGomez
2016-08-31 06:29:09 -07:00
Jonathan Turner
051685b2bc Rollup merge of #36050 - abhiQmar:e0076-formatting, r=jonathandturner
Update compiler error E0076 to use new error format

Fixes #35221 part of #35233

r? @jonathandturner
2016-08-31 06:29:09 -07:00
Jonathan Turner
2bfb20f392 Rollup merge of #35926 - matthew-piziak:bit-or-xor-examples, r=GuillaumeGomez
add evocative examples for `BitOr` and `BitXor`

These are exactly equivalent to PR #35809, with one caveat: I do not believe there is a non-bitwise binary XOR operator in Rust, so here it's expressed as `(a || b) && !(a && b)`.

Alternative decompositions are `(a && !b) || (!a && b)` and `(a || b) && (!a || !b)`.  Let me know if you think one of those would be clearer.

r? @GuillaumeGomez
2016-08-31 06:29:08 -07:00
Jonathan Turner
45ca620383 Rollup merge of #35758 - matthew-piziak:vec-assert-over-println-remaining, r=GuillaumeGomez
accumulate vector and assert for RangeFrom and RangeInclusive examples

PR #35695 for `Range` was merged, so it seems that this side-effect-free style is preferred for Range* examples. This PR performs the same translation for `RangeFrom` and `RangeInclusive`. It also removes what looks to be an erroneously commented line for `#![feature(step_by)]`, and an unnecessary primitive-type annotation in `0u8..`.
2016-08-31 06:29:08 -07:00
bors
603d9ccfbe Auto merge of #34623 - lfairy:repr-conflict, r=Aatch
Warn about multiple conflicting #[repr] hints

Closes #34622
2016-08-31 00:40:42 -07:00
Chris Wong
42b75a5c18 Warn about multiple conflicting #[repr] hints
Closes #34622
2016-08-31 18:54:19 +12:00
Corey Farwell
268b3f5818 Implement Debug for std::path::Iter. 2016-08-30 19:57:20 -04:00
bors
eac41469d7 Auto merge of #35048 - tmiasko:monotonic-wait-timeout, r=alexcrichton
Use monotonic time in condition variables.

Configure condition variables to use monotonic time using
pthread_condattr_setclock on systems where this is possible.
This fixes the issue when thread waiting on condition variable is
woken up too late when system time is moved backwards.
2016-08-30 16:28:32 -07:00
Abhishek Kumar
d3a6ea52d7 Update compiler error E0076 to use new error format
Fixes #35221 part of #35233
2016-08-31 02:05:48 +05:30
Mikhail Modin
507fe14637 update E0265 to new format 2016-08-30 22:46:52 +03:00
Matthew Piziak
8ca9fa11f9 add evocative examples for BitOr and BitXor
These are exactly equivalent to PR #35809, with one caveat: I do not believe there is a non-bitwise binary "xor" operator in Rust, so here it's expressed as (a || b) && !(a && b).

r? @GuillaumeGomez

improved documentation a la PR #35993
2016-08-30 15:45:37 -04:00
Andrea Corradi
bdfcd782bc Update E0318 to new format 2016-08-30 21:24:21 +02:00
Corey Farwell
f48d3859bc Implement Debug for std::path::Components. 2016-08-30 12:40:44 -04:00
ggomez
37bf449de4 Add new error code tests 2016-08-30 18:20:18 +02:00
ggomez
150599d01d Add E0530 error explanation 2016-08-30 18:20:14 +02:00
Mohit Agarwal
77cd09a88c
Update E0520 to new error format
Fixes #36112.
Part of #35233.

r? @jonathandturner
2016-08-30 20:20:01 +05:30
bors
4473130f4e Auto merge of #36126 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 16 pull requests

- Successful merges: #35418, #35759, #35862, #35863, #35895, #35962, #35977, #35993, #35997, #36054, #36056, #36060, #36086, #36100, #36103, #36125
- Failed merges: #35771, #35810
2016-08-30 06:01:39 -07:00
Cristi Cobzarenco
34e1817576 add test for #14875 2016-08-30 11:04:14 +01:00
Guillaume Gomez
1d2308f2ed Rollup merge of #36125 - gavinb:error_msgs_p1, r=jonathandturner
Update Error format for E0164, E0165, E0184

Part of #35233

r? @jonathandturner
2016-08-30 10:39:08 +02:00
Guillaume Gomez
9a3cfe9129 Rollup merge of #36103 - zjhmale:fix-E0089, r=jonathandturner
Update E0089 to new error format

Fixes #35227.
Part of #35233.

r? @jonathandturner
2016-08-30 10:39:08 +02:00
Guillaume Gomez
eb33044449 Rollup merge of #36100 - 0xmohit:pr/error-code-E0260, r=jonathandturner
Update E0260 to new error format

Updates #35515.
Part of #35233.

r? @jonathandturner
2016-08-30 10:39:08 +02:00
Guillaume Gomez
ab8499785c Rollup merge of #36086 - apasel422:issue-35423, r=alexcrichton
Add test for #35423

Closes #35423
2016-08-30 10:39:07 +02:00
Guillaume Gomez
3ee2c9d0a4 Rollup merge of #36060 - paulfanelli:update-e0463-error-msg, r=jonathandturner
Update E0463 error message to new format

Fixes #35934 as part of #35233

r? @jonathandturner
2016-08-30 10:39:07 +02:00
Guillaume Gomez
751e4db2f4 Rollup merge of #36056 - birryree:E0194_new_error_format, r=jonathandturner
Update E0194 to new error format

Fixes #35280 to update E0194 to support new error message format. Part of #35233.

A separate Github issue #36057 tracks the bonus portion of the original ticket.

r? @jonathandturner
2016-08-30 10:39:07 +02:00
Guillaume Gomez
5185bd05c9 Rollup merge of #36054 - mikhail-m1:master2, r=jonathandturner
update error E0451 to new format

Fixes #35928 as part of #35233.

r? @jonathandturner
2016-08-30 10:39:07 +02:00
Guillaume Gomez
23f769881a Rollup merge of #35997 - matthew-piziak:thread-current-example, r=GuillaumeGomez
add a simple example for `thread::current()`

r? @GuillaumeGomez
2016-08-30 10:39:07 +02:00
Guillaume Gomez
0c33197b90 Rollup merge of #35993 - matthew-piziak:bitwise-and-redux, r=GuillaumeGomez
improve `BitAnd` trait documentation

This pull request is based on the discussion in PR #35927.

Add a module-level note that `&&` and `||` are short-circuiting operators and not overloadable.

Add a simple `Scalar` example that lifts the `&` operator to a trivial struct tuple.

Make `BooleanVector` a struct tuple.

Derive `PartialEq` for `BooleanVector` instead of implementing it.

Adds a `fn main` wrapper so that the example can integrate with Rust Playground.
2016-08-30 10:39:06 +02:00
Guillaume Gomez
67949a3a01 Rollup merge of #35977 - frewsxcv:usize-isize, r=eddyb
Rename {int,uint} methods to {isize,usize}.

None
2016-08-30 10:39:06 +02:00
Guillaume Gomez
8d808a2df6 Rollup merge of #35962 - regexident:compiler-plugin-docs, r=steveklabnik
Updated code sample in chapter on syntax extensions.

The affected API apparently had changed with commit d59accfb06.

---

Further more I had to add

```toml
[lib]
name = "roman_numerals"
crate-type = ["dylib"]
```

to `Cargo.toml` as I otherwise got this compiler error (despite `#![crate_type="dylib"]`):

    [E0457]: plugin `roman_numerals` only found in rlib format, but must be available in dylib format

Might be worth adding a note about that?
2016-08-30 10:39:06 +02:00
Guillaume Gomez
325b7111c2 Rollup merge of #35895 - F001:patch-1, r=steveklabnik
Fix documentation in cell mod

The implementation of Rc type in this doc is outdated.
2016-08-30 10:39:06 +02:00
Guillaume Gomez
b4a6b6bd9e Rollup merge of #35863 - matthew-piziak:shl-example, r=steveklabnik
add evocative examples for `Shl` and `Shr`

r? @steveklabnik
2016-08-30 10:39:06 +02:00
Guillaume Gomez
d33e1916ce Rollup merge of #35862 - Stebalien:fmt-docs, r=steveklabnik
Clarify/fix formatting docs concerning fmt::Result/fmt::Error

1. `fmt::Result` != `io::Result<()>`
2. Formatters should only propagate errors, not return their own.

Confusion on reddit: https://www.reddit.com/r/rust/comments/4yorxr/is_implt_tostring_for_t_where_t_display_sized_a/
2016-08-30 10:39:05 +02:00
Guillaume Gomez
aa3ee1d05e Rollup merge of #35810 - matthew-piziak:fn-trait-example, r=steveklabnik
improve documentation for `Fn*` traits

This PR is not yet a serious attempt at contribution. Rather, I'm opening this for discussion. I can think of a few things we may want to accomplish with the documentation of the `Fn`, `FnMut`, and `FnOnce` traits:
- the relationship between these traits and the closures that implement them
- examples of non-closure implementations
- the relationship between these traits and Rust's ownership semantics
2016-08-30 10:39:05 +02:00
Guillaume Gomez
ff45e6195b Rollup merge of #35771 - matthew-piziak:range-inclusive-example-error, r=steveklabnik
show how iterating over `RangeTo` and `RangeToInclusive` fails

Feedback on PR #35701 seems to be positive, so this does the same thing for `RangeTo` and `RangeToInclusive`.
2016-08-30 10:39:05 +02:00
Guillaume Gomez
f60cb177aa Rollup merge of #35418 - birkenfeld:patch-1, r=aturon
Doc: explain why Box/Rc/Arc methods do not take self

This can be confusing for newcomers, especially due to the argument name `this` that is used for Rc and Arc.
2016-08-30 10:39:05 +02:00
bors
71ee82a8aa Auto merge of #36066 - jseyfried:rollup, r=Manishearth
Batch up libsyntax breaking changes

Batch of the following syntax-[breaking-change] changes:
 - #35591: Add a field `span: Span` to `ast::Generics`.
 - #35618: Remove variant `Mod` of `ast::PathListItemKind` and refactor the remaining variant `ast::PathListKind::Ident` to a struct `ast::PathListKind_`.
 - #35480: Change uses of `Constness` in the AST to `Spanned<Constness>`.
  - c.f. `MethodSig`, `ItemKind`
 - #35728: Refactor `cx.pat_enum()` into `cx.pat_tuple_struct()` and `cx.pat_path()`.
 - #35850: Generalize the elements of lists in attributes from `MetaItem` to a new type `NestedMetaItem` that can represent a `MetaItem` or a literal.
 - #35917: Remove traits `AttrMetaMethods`, `AttributeMethods`, and `AttrNestedMetaItemMethods`.
  - Besides removing imports of these traits, this won't cause fallout.
 - Add a variant `Union` to `ItemKind` to future proof for `union` (c.f. #36016).
 - Remove inherent methods `attrs` and `fold_attrs` of `Annotatable`.
  - Use methods `attrs` and `map_attrs` of `HasAttrs` instead.

r? @Manishearth
2016-08-30 00:36:19 -07:00
Jeffrey Seyfried
02f081c0b5 Future proof libsyntax_ext for union. 2016-08-30 05:53:33 +00:00
athulappadan
fb65fe95eb Update compiler error 0034 to use new format. 2016-08-30 10:29:24 +05:30
Tshepang Lekhonkhobe
c36ccf7912 doc: make TcpListener example more simple 2016-08-30 06:42:56 +02:00
Corey Farwell
10b8e0ed67 rustbook chapters/sections should be an ordered list. 2016-08-29 23:35:50 -04:00