Commit Graph

56405 Commits

Author SHA1 Message Date
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
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
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
zjhmale
01083baec2 Update E0089 to new error format 2016-08-30 01:36:58 +08:00
Paul Fanelli
58ced1635b Update E0463 error message to new format 2016-08-29 15:44:05 +00: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
Tomasz Miąsko
59e5e0b2db Avoid using pthread_condattr_setclock on Android.
The pthread_condattr_setclock is available only since
Android 5.0 and API level 21.
2016-08-29 10:53:12 +02:00
Mikhail Modin
46fc80c44e update error E0451 to new format 2016-08-29 09:55:16 +03:00
Jeffrey Seyfried
cdde06ea97 Fix merge conflicts. 2016-08-29 05:20:42 +00:00
Jeffrey Seyfried
663caa9ddf Remove inherent methods Annotatable::attrs and Annotatable::fold_attrs. 2016-08-29 05:20:42 +00:00
Jeffrey Seyfried
4fe94e0be6 Future proof the AST for union. 2016-08-29 05:20:40 +00:00
bors
86dde9bbda Auto merge of #36062 - japaric:smarter-submodules, r=alexcrichton
rustbuild: smarter `git submodule`-ing

With this commit, if one bootstraps rust against system llvm then the
src/llvm submodule is not updated/checked-out. This saves considerable
network bandwith when starting from a fresh clone of rust-lang/rust as
the llvm submodule is never cloned.

cc #30107

r? @alexcrichton
cc @petevine

~~We could also avoid updating the jemalloc submodule if --disable-jemalloc is used. It just hasn't been implemented.~~ Done

This probably doesn't handle "recursive" submodules correctly but I think we don't have any of those right now.

I'm still testing a bootstrap but already confirmed that the llvm submodule doesn't get updated when `--llvm-root` is passed to `configure`.
2016-08-28 21:57:51 -07:00
Jorge Aparicio
4b5007a1a2 fix tidy error 2016-08-28 22:13:35 -05:00
Andrew Paseltiner
91bfa2c829
Add test for #24204
Closes #24204
2016-08-28 19:45:20 -04:00
Andrew Paseltiner
9c256ec94b
Add test for #35423
Closes #35423
2016-08-28 19:16:13 -04:00
bors
acd3f796d2 Auto merge of #36059 - CryZe:improved-demangling, r=alexcrichton
Improve Demangling of Rust Symbols

This turns `..` into `::`, handles some more escapes and gets rid of unwanted underscores at the beginning of path elements.

![Image of Diff](http://puu.sh/qQIN3.png)
2016-08-28 16:13:16 -07:00
Andrew Paseltiner
da566aeebf
Add test for #34053
Closes #34053
2016-08-28 19:10:12 -04:00
bors
312734ca42 Auto merge of #36029 - KiChjang:issue-12033, r=arielb1
Fix lifetime rules for 'if' conditions

Fixes #12033.

Changes the temporary scope rules to make the condition of an if-then-else a terminating scope. This is a [breaking-change].
2016-08-28 13:16:47 -07:00
Jorge Aparicio
15d8dfb6a0 build llvm with systemz backend enabled, and link to related libraries
when building rust against system llvm

closes #36077
2016-08-28 13:18:28 -05:00
bors
e4791e086d Auto merge of #35984 - jonas-schievink:reproducible-builds, r=eddyb
Steps towards reproducible builds

cc #34902

Running `make dist` twice will result in a rustc tarball where only `librustc_back.so`, `librustc_llvm.so` and `librustc_trans.so` differ. Building `libstd` and `libcore` twice with the same compiler and flags produces identical artifacts.

The third commit should close #24473
2016-08-28 10:19:52 -07:00
bors
6fd13fad93 Auto merge of #36058 - apasel422:tests, r=alexcrichton
Add tests for #20433, #26251, #28625, #33687

Closes #20433
Closes #26251
Closes #28625
Closes #33687
2016-08-28 07:28:20 -07:00
Jonas Schievink
8766c18473 Revert changes to the reproducible-builds test 2016-08-28 15:37:37 +02:00
Jeffrey Seyfried
c14ff2884d Rollup merge of #35917 - jseyfried:remove_attr_ext_traits, r=nrc
syntax: Remove traits `AttrMetaMethods`, `AttributeMethods`, and `AttrNestedMetaItemMethods`
2016-08-28 10:40:04 +00:00
Jeffrey Seyfried
6303640e85 Rollup merge of #35850 - SergioBenitez:master, r=nrc
Implement RFC#1559: allow all literals in attributes

Implemented rust-lang/rfcs#1559, tracked by #34981.
2016-08-28 10:38:19 +00:00
Jeffrey Seyfried
413ecdee30 Rollup merge of #35728 - petrochenkov:empderive, r=manishearth
Fix #[derive] for empty tuple structs/variants

This was missing from https://github.com/rust-lang/rust/pull/35138
2016-08-28 10:34:50 +00:00
Jeffrey Seyfried
bd38e890ee Rollup merge of #35480 - KiChjang:e0379-bonus, r=nikomatsakis
Move E0379 check from typeck to ast validation

Part of #35233.
Extension of #35338, #35364.
Fixes #35404.
2016-08-28 10:32:52 +00:00
Jeffrey Seyfried
37f30173a0 Rollup merge of #35618 - jseyfried:ast_view_path_refactor, r=eddyb
Refactor `PathListItem`s

This refactors away variant `Mod` of `ast::PathListItemKind` and refactors the remaining variant `Ident` to a struct `ast::PathListItem_`.
2016-08-28 10:31:24 +00:00
Jeffrey Seyfried
b833e8d0a0 Rollup merge of #35591 - GuillaumeGomez:generics_span, r=jntrmr
Add Span field for Generics structs
2016-08-28 10:30:08 +00:00
bors
b17fa8bf01 Auto merge of #36055 - japaric:rustbuild-no-filecheck, r=alexcrichton
rustbuild: skip filecheck check if codegen tests are disabled

to match the behavior of the old Makefile-based build system

closes #35752

r? @alexcrichton
2016-08-28 03:28:38 -07:00
bors
78a0838756 Auto merge of #36028 - japaric:s390x, r=alexcrichton
initial support for s390x

A new target, `s390x-unknown-linux-gnu`, has been added to the compiler
and can be used to build no_core/no_std Rust programs.

Known limitations:

- librustc_trans/cabi_s390x.rs is missing. This means no support for
  `extern "C" fn`.
- No support for this arch in libc. This means std can't be cross
  compiled for this target.

r? @alexcrichton

This time I couldn't test running a binary cross compiled to this target under QEMU because the qemu-s390x that ships with Ubuntu 16.04 SIGABRTs with every s390x binary I run it with.

Change in binary size of `librustc_llvm.so`:

Without this commit (stage1): 41895736 bytes
With this commit (stage1): 42899016 bytes

~2.4% increase
2016-08-28 00:36:16 -07:00
Keith Yeung
e46b09a1f9 Add UI test for E0379 2016-08-27 22:43:51 -07:00
Keith Yeung
aa5c4bb05d Change Constness to Spanned<Constness> 2016-08-27 22:43:51 -07:00
Keith Yeung
1e9e798cce Move E0379 check from typeck to ast validation 2016-08-27 22:43:51 -07:00
bors
aa05a15363 Auto merge of #36027 - eddyb:unsized-prefix, r=nagisa
rustc_trans: don't round up the DST prefix size to its alignment.

Fixes #35815 by using `ty::layout` and `min_size` to compute the size of the DST prefix.
`ty::layout::Struct::min_size` is not rounded up to alignment, which could be smaller for the DST field.
2016-08-27 21:20:28 -07:00
Jorge Aparicio
5683bf9e20 don't update the src/jemalloc submodule is jemalloc has been disabled
i.e. via the --disable-jemalloc configure flag
2016-08-27 22:53:19 -05:00
Jorge Aparicio
b8ebc1347c don't run codegen tests when they have been disabled 2016-08-27 22:14:29 -05:00
Jorge Aparicio
a375799f7a rustbuild: smarter git submodule-ing
With this commit, if one bootstraps rust against system llvm then the
src/llvm submodule is not updated/checked-out. This saves considerable
network bandwith when starting from a fresh clone of rust-lang/rust as
the llvm submodule is never cloned.

cc #30107
2016-08-27 21:44:12 -05:00
Christopher Serr
121b2fe988 Improve Demangling of Rust Symbols
This turns `..` into `::`, handles some more escapes and gets rid of
unwanted underscores at the beginning of path elements.

![Image of Diff](http://puu.sh/qQIN3.png)
2016-08-28 01:40:14 +02:00
Andrew Paseltiner
7b9adfd574
Add tests for #20433, #26251, #28625, #33687
Closes #20433
Closes #26251
Closes #28625
Closes #33687
2016-08-27 18:37:27 -04:00
bors
e17d6db80a Auto merge of #36049 - jonathandturner:rollup, r=jonathandturner
Rollup of 6 pull requests

- Successful merges: #35657, #35980, #35985, #35989, #36003, #36044
- Failed merges:
2016-08-27 15:23:17 -07:00