Commit Graph

57166 Commits

Author SHA1 Message Date
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
Eduard Burtescu
8341f6451b Fix run-pass/signal-exit-status to not trigger UB by writing to NULL. 2016-08-30 05:34:21 +03:00
bors
addb753762 Auto merge of #36117 - eddyb:llvm-hoist-meta, r=alexcrichton
llvm: backport "[SimplifyCFG] Hoisting invalidates metadata".

Fixes #36023 by backporting @majnemer's LLVM patch fixing [the LLVM bug](https://llvm.org/bugs/show_bug.cgi?id=29163.) where SimplifyCFG hoisted instructions andkept their metadata (conditional `!nonnull` loads could kill a null check later if hoisted).

r? @alexcrichton
2016-08-29 17:01:09 -07:00
Gavin Baker
2967dcc4d7 E0184 Update error format #35275
- Fixes #35275
- Part of #35233

r? @jonathandturner
2016-08-30 09:51:03 +10:00
Gavin Baker
28c5edb9f6 E0165 Update error format #35270
- Fixes #35270
- Part of #35233

r? @jonathandturner
2016-08-30 09:50:55 +10:00
Gavin Baker
6355528ffd E0164 Update error format #35269
- Fixes #35269
- Part of #35233

r? @jonathandturner
2016-08-30 09:50:46 +10:00
Simonas Kazlauskas
f53415fe0d Unignore the json tests on 32-bit platforms
cc #14064
2016-08-30 02:16:18 +03:00
arthurprs
175d434c99 Remove BinaryHeap bounds checking 2016-08-29 23:12:08 +02:00
Simonas Kazlauskas
987ef784fd Fix the test_variadic_ptr fn on printf-less sys
Fixes #36076
2016-08-29 22:58:05 +03:00
Eduard Burtescu
61a639ec4e llvm: backport "[SimplifyCFG] Hoisting invalidates metadata". 2016-08-29 22:53:18 +03:00
bors
77d2cd28fd Auto merge of #36080 - japaric:systemz, r=alexcrichton
build llvm with systemz backend enabled, and link to related libraries

when building rust against system llvm

closes #36077

r? @alexcrichton
2016-08-29 12:48:21 -07:00
Michael Woerister
bcd2f905c4 incr.comp.: Canonicalize path to session directory before deleteing it. 2016-08-29 14:27:40 -04:00
Michael Woerister
50b008ae3b compiletest: Canonicalize paths when remove incr.comp. dir, enabling longer paths 2016-08-29 14:27:40 -04:00
Michael Woerister
68d2275a97 Fix tidy-errors 2016-08-29 14:27:40 -04:00
Michael Woerister
9d110685e7 incr.comp.: Make compiletest generate shorter cache directory names. 2016-08-29 14:27:40 -04:00
Michael Woerister
a3dc5f95aa incr.comp.: Make path's of session directories slightly shorter.
By using "s-" instead of "sess-" as a prefix and encoding numbers as base36 instead of base16.
2016-08-29 14:27:40 -04:00
Michael Woerister
b67f57afdd incr. comp.: Fix test_timestamp_serialization so it does not overflow on some 32bit systems. 2016-08-29 14:27:40 -04:00
Michael Woerister
004a7eb127 Fix rustbuild 2016-08-29 14:27:40 -04:00
Michael Woerister
794fd315ad incr.comp.: Move lock files out of directory being locked 2016-08-29 14:27:40 -04:00
Michael Woerister
3e9bed92da Implement copy-on-write scheme for managing the incremental compilation cache. 2016-08-29 14:27:40 -04:00
Michael Woerister
206e7b6fc7 Add some features to flock. 2016-08-29 14:27:40 -04:00
Michael Woerister
6ef8198406 Move flock.rs from librustdoc to librustc_data_structures. 2016-08-29 14:27:40 -04:00
philipp
5928be1d9b Changed issue number to 36105 2016-08-29 19:43:18 +02:00
zjhmale
01083baec2 Update E0089 to new error format 2016-08-30 01:36:58 +08:00
Oliver Middleton
b56d61cfd7 rustdoc: Fix associated consts in search results
Associated consts can appear in none trait impls so need to be treated
like methods when generating the search index.
2016-08-29 18:36:57 +01:00
Keith Yeung
899c2891e6 Fix illegal instruction caused by overflow in channel cloning 2016-08-29 10:27:59 -07:00
Jorge Aparicio
bbf2c3c31f update libc submodule 2016-08-29 12:25:06 -05:00
Paul Fanelli
58ced1635b Update E0463 error message to new format 2016-08-29 15:44:05 +00:00
Simon Sapin
f040208d53 Implement TryFrom<u32> for char
For symmetry with From<char> for u32.
2016-08-29 17:34:02 +02:00
Simon Sapin
41d0a89e3a Implement From<char> for u32, and From<u8> for char
These fit with other From implementations between integer types.

This helps the coding style of avoiding the 'as' operator that sometimes
silently truncates, and signals that these specific conversions are
lossless and infaillible.
2016-08-29 17:34:02 +02:00
Matthew Piziak
89f7e92698 demonstrate RHS != Self use cases for Add and Sub
remove extra `../`s
2016-08-29 11:24:22 -04:00
Andre Bogus
a87b4d88fb removed unneeded test, also compiletest vs. rustfmt 2016-08-29 16:45:22 +02:00
Andre Bogus
e95f119d68 rustfmt tests 2016-08-29 14:03:57 +02:00
Mohit Agarwal
d6fc2baa11
Update E0260 to new error format
Updates #35515.
Part of #35233.

r? @jonathandturner
2016-08-29 16:20:08 +05:30