Commit Graph

56851 Commits

Author SHA1 Message Date
Andrew Paseltiner
91bfa2c829
Add test for #24204
Closes #24204
2016-08-28 19:45:20 -04:00
Andrew Paseltiner
f740631363
Add test for #28324
Closes #28324
2016-08-28 19:44:17 -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
Andrew Paseltiner
ef4952e739
Address FIXME in libcollectionstest/btree/set.rs 2016-08-28 18:52:21 -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
Andre Bogus
744312754d fixed and extended tests once more 2016-08-28 20:35:48 +02: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
Jorge Aparicio
c70d633e94 rustbuild: skip filecheck check if codegen tests are disabled
to match the behavior of the old Makefile-based build system

closes #35752
2016-08-27 17:13:13 -05:00
Jonathan Turner
d00a89a9ff Rollup merge of #36044 - mikhail-m1:master, r=jonathandturner
update error E0450 to new format

Fixes #35925 as part of #35233.

I've solve the bonus, and I wonder if any simpler way to do this. But may be possible simplify if let expressions?

r? @jonathandturner
2016-08-27 12:43:31 -07:00
Jonathan Turner
3bab26e6f3 Rollup merge of #36003 - GuillaumeGomez:err_codes, r=jonathandturner
Err codes

r? @jonathandturner
2016-08-27 12:43:31 -07:00
Jonathan Turner
1dbd49fc2a Rollup merge of #35989 - 0xmohit:pr/error-code-E0453, r=jonathandturner
Update E0453 to new error format

Fixes #35929.
Part of #35233.

r? @jonathandturner
2016-08-27 12:43:31 -07:00
Jonathan Turner
c8791f1a59 Rollup merge of #35985 - 0xmohit:pr/error-code-E0277, r=jonathandturner
Update E0277 to new error format

Fixes #35311.
Part of #35233.

r? @jonathandturner
2016-08-27 12:43:30 -07:00
Jonathan Turner
965f50dad5 Rollup merge of #35980 - kyrias:E0094-underline, r=jonathandturner
Make E0094 underline better

r? @jonathandturner
2016-08-27 12:43:30 -07:00
Jonathan Turner
dc6ae4b669 Rollup merge of #35657 - ahmedcharles:e0389, r=jonathandturner
Update E0389 to the new format. #35630
2016-08-27 12:43:30 -07:00
bors
a23064af5e Auto merge of #35674 - ahmedcharles:rpass, r=alexcrichton
Fix compiletest so it respects warnings for run-pass.
2016-08-27 12:31:25 -07:00
Keith Yeung
4853456be0 Fix lifetime rules for 'if' conditions 2016-08-27 12:27:34 -07:00
Guillaume Gomez
286ae72fb7 Clean code a bit 2016-08-27 21:01:27 +02:00
Georg Brandl
a068fc70ab Doc: explain why Box/Rc/Arc methods do not take self
This can be confusing for newcomers, especially due to the argument
name "this".
2016-08-27 19:53:02 +02:00
Mikhail Modin
9c07ed2128 update error E0450 to new format 2016-08-27 19:39:22 +03:00
William Lee
eea03f5caa Fixes #35280 to update E0194 to support new error message format. Part of #35233. 2016-08-27 12:23:19 -04:00
Oliver Middleton
a7c671bb90 rustdoc: Add missing item types to page titles
Most pages include the item type in the title such as "Struct
std::vec::Vec". However it is missing from the pages for foreign
functions, type definitions, macros, statics and constants. This adds them
so for example, instead of a title of "std::u32::MAX" it is "Constant
std::u32::MAX" to match the others.
2016-08-27 17:00:36 +01:00
bors
11946956a6 Auto merge of #35969 - bluss:memrchr-alignment, r=nagisa
memrchr: Correct aligned offset computation

The memrchr fallback did not compute the offset correctly. It was
intentioned to land on usize-aligned addresses but did not.
This was suspected to have resulted in a crash on ARMv7!

This bug affected non-linux platforms.

I think like this, if we have a slice with pointer `ptr` and length
`len`, we want to find the last usize-aligned offset in the slice.
The correct computation should be:

For example if ptr = 1 and len = 6, and `size_of::<usize>()` is 4:

```
[ x x x x x x ]
  1 2 3 4 5 6
        ^-- last aligned address at offset 3 from the start.
```

The last aligned address is ptr + len - (ptr + len) % usize_size.

Compute offset from the start as:

offset = len - (ptr + len) % usize_size = 6 - (1 + 6) % 4 = 6 - 3 = 3.

I believe the function's return value was always correct previously, if
the platform supported unaligned addresses.

Fixes #35967
2016-08-27 07:52:20 -07:00
Jonas Schievink
e468ede624 Fix the reproducible-build test 2016-08-27 15:20:45 +02:00
Jonas Schievink
dca01f9443 fix tidy 2016-08-27 15:20:45 +02:00
Jonas Schievink
2eeca3ccd2 Make metadata encoding deterministic
`ty::Predicate` was being used as a key for a hash map, but its hash
implementation indirectly hashed addresses, which vary between each
compiler run. This is fixed by sorting predicates by their ID before
encoding them.

In my tests, rustc is now able to produce deterministic results when
compiling libcore and libstd.

I've beefed up `run-make/reproducible-build` to compare the produced
artifacts bit-by-bit. This doesn't catch everything, but should be a
good start.

cc #34902
2016-08-27 15:20:45 +02:00
Jonas Schievink
5adf003b99 Use deterministic FnvHash{Map,Set} in rustdoc 2016-08-27 15:20:45 +02:00
Jonas Schievink
144e576c87 Use FnvHashMap in more places
* A step towards #34902
* More stable error messages in some places related to crate loading
* Possible slight performance improvements since all `HashMap`s
  replaced had small keys where `FnvHashMap` should be faster
  (although I didn't measure)
2016-08-27 15:20:45 +02:00