Commit Graph

83756 Commits

Author SHA1 Message Date
Nicholas Nethercote
efae70c736 Split Liveness::users into three.
This reduces memory usage on some benchmarks because no space is wasted
for padding. For a `check-clean` build of `keccak` it reduces `max-rss`
by 20%.
2018-09-14 12:55:57 +10:00
Alex Crichton
7a1eed73be Update Cargo
Should bring in some nice progress bars for compilations!
2018-09-13 18:35:17 -07:00
bors
e7f1880921 Auto merge of #52962 - GuillaumeGomez:few-things, r=QuietMisdreavus
Fix trait item doc setting, add new setting, start hiding elements by default and then showing them up

r? @QuietMisdreavus
2018-09-14 01:07:21 +00:00
Vadim Petrochenkov
0a0d642f38 Partially revert 674a5db "Fix undesirable fallout [from macro modularization]" 2018-09-14 02:49:21 +03:00
Nicholas Nethercote
56be2afec5 Remove Iter and SparseIter in indexed_set.rs.
Because they're just thin wrappers around `BitIter` and `slice::Iter`.
2018-09-14 08:51:31 +10:00
bors
4f921d7a8d Auto merge of #54168 - kennytm:rollup, r=kennytm
Rollup of 11 pull requests

Successful merges:

 - #53371 (Do not emit E0277 on incorrect tuple destructured binding)
 - #53829 (Add rustc SHA to released DWARF debuginfo)
 - #53950 (Allow for opting out of ThinLTO and clean up LTO related cli flag handling.)
 - #53976 (Replace unwrap calls in example by expect)
 - #54070 (Add Error::description soft-deprecation to RELEASES)
 - #54076 (miri loop detector hashing)
 - #54119 (Add some unit tests for find_best_match_for_name)
 - #54147 (Add a test that tries to modify static memory at compile-time)
 - #54150 (Updated 1.29 release notes with --document-private-items flag)
 - #54163 (Update stage 0 to latest beta)
 - #54170 (COMPILER_TESTS.md has been moved)
2018-09-13 22:40:35 +00:00
QuietMisdreavus
dda7e0dec6 re-mark the never docs as unstable 2018-09-13 17:31:56 -05:00
Josh Stone
2e75b07eee Fix the stable release of os_str_str_ref_eq
This was added and stabilized in commit 02503029b8, but while that
claimed to be for 1.28.0, it didn't actually make it until 1.29.0.
2018-09-13 14:25:43 -07:00
Guillaume Gomez
fab6b06b89 Add treat-err-as-bug flag in rustdoc 2018-09-13 23:00:10 +02:00
Jonathan Behrens
e9583628b2
Eliminate unused variable warning 2018-09-13 16:48:09 -04:00
Eduard-Mihai Burtescu
514c6b6fe3 rustc_resolve: don't treat uniform_paths canaries as ambiguities unless they resolve to distinct Def's. 2018-09-13 23:28:55 +03:00
Philipp Hansch
7249a1b1ae
Suggest valid crate type if invalid
This adds a suggestion to the `invalid_crate_types` lint.

The suggestion is based on the Levenshtein distance to existing crate
types. If no suggestion is found it will show the lint without any
suggestions.
2018-09-13 21:26:45 +02:00
Jonathan Behrens
1ad0919fa9
Remove println!() statement from HashMap unit test 2018-09-13 14:58:13 -04:00
Eduard-Mihai Burtescu
84c36a1333 rustc_resolve: ignore uniform_paths canaries with no module scopes. 2018-09-13 21:11:31 +03:00
Vitaly _Vi Shukela
79919a7ed6
Add "while" tests for issue 54109 2018-09-13 20:51:29 +03:00
Eduard-Mihai Burtescu
4394238347 rustc_resolve: only process uniform_paths canaries in namespaces they're present in. 2018-09-13 20:47:47 +03:00
Vitaly _Vi Shukela
acc44e40cc
Use span_suggestion_with_applicability for "and/or" hinter
Advised by @estebank.
2018-09-13 20:44:07 +03:00
kennytm
07dc4b3759
Rollup merge of #53950 - michaelwoerister:more-lto-cli, r=alexcrichton
Allow for opting out of ThinLTO and clean up LTO related cli flag handling.

It turns out that there currently is no way to explicitly disable ThinLTO (except for the nightly-only `-Zthinlto` flag). This PR extends `-C lto` to take `yes` and `no` in addition to `thin` and `fat`. It should be backwards compatible.

It also cleans up how LTO mode selection is handled.

Note that merging the PR in the current state would make the new values for `-C lto` available on the stable channel. I think that would be fine but maybe some team should vote on it.
2018-09-14 00:46:45 +08:00
kennytm
5db68bae9a
Rollup merge of #53829 - alexcrichton:release-debuginfo, r=michaelwoerister
Add rustc SHA to released DWARF debuginfo

This commit updates the debuginfo that is encoded in all of our released
artifacts by default. Currently it has paths like `/checkout/src/...` but these
are a little inconsistent and have changed over time. This commit instead
attempts to actually define the file paths in our debuginfo to be consistent
between releases.

All debuginfo paths are now intended to be `/rustc/$sha` where `$sha` is the git
sha of the released compiler. Sub-paths are all paths into the git repo at that
`$sha`.
2018-09-14 00:46:22 +08:00
kennytm
e92f1b94ae
Rollup merge of #54170 - kzys:contrib-md, r=zackmdavis
COMPILER_TESTS.md has been moved

The document is now hosted at rust-lang-nursery.github.io.
2018-09-14 00:41:57 +08:00
kennytm
67efb395c4
Rollup merge of #54163 - parched:stage0, r=Mark-Simulacrum
Update stage 0 to latest beta

Fixes bootstrap on AArch64 by pulling in https://github.com/rust-lang/rust/pull/53939
2018-09-14 00:41:55 +08:00
kennytm
73a7482244
Rollup merge of #54150 - Aaronepower:master, r=Mark-Simulacrum
Updated 1.29 release notes with --document-private-items flag

[Rendered](https://github.com/Aaronepower/rust/blob/master/RELEASES.md#cargo)
2018-09-14 00:41:53 +08:00
kennytm
d6421c7b0c
Rollup merge of #54147 - agnxy:const-eval-test, r=oli-obk
Add a test that tries to modify static memory at compile-time

Attempt to fix #53818
cc @oli-obk
2018-09-14 00:41:48 +08:00
kennytm
8018d63808
Rollup merge of #54119 - phansch:unit_test_find_best_match_for_name, r=nikomatsakis
Add some unit tests for find_best_match_for_name

There were only some UI tests that covered this function.
Since there's more diagnostic work going on, I think it makes
sense to have this unit tested.
2018-09-14 00:41:44 +08:00
kennytm
344dc53bc9
Rollup merge of #54076 - RalfJung:miri-snapshot, r=oli-obk
miri loop detector hashing

* fix enum hashing to also consider discriminant
* do not hash extra machine state
* standalone miri is not interested in loop detection, so let it opt-out

In the future I think we want to move the hashing logic out of the miri engine, this is CTFE-only.

r? @oli-obk
2018-09-14 00:41:40 +08:00
kennytm
74cf0746e0
Rollup merge of #54070 - passcod:patch-1, r=steveklabnik
Add Error::description soft-deprecation to RELEASES
2018-09-14 00:41:37 +08:00
kennytm
2882119feb
Rollup merge of #53976 - GuillaumeGomez:expect-world, r=steveklabnik
Replace unwrap calls in example by expect

Part of #51668.

r? @steveklabnik
2018-09-14 00:41:34 +08:00
bors
90d36fb590 Auto merge of #53621 - jordanrh1:windows-arm, r=alexcrichton
Add target thumbv7a-pc-windows-msvc

This is an early draft of support for Windows/ARM. To test it,

1. Install Visual Studio 2017 and Windows SDK version 17134.
1. Obtain alexcrichton/xz2-rs#35, rust-lang-nursery/compiler-builtins#256, and the fix for [LLVM Bug 38620](https://bugs.llvm.org/show_bug.cgi?id=38620).
2. Open a command prompt and run
```
set CC_thumbv7a-pc-windows-msvc=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.11.25503\bin\HostX64\arm\CL.exe
set CFLAGS_thumbv7a-pc-windows-msvc=/D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1 /nologo
c:\python27\python.exe x.py build --host x86_64-pc-windows-msvc --build x86_64-pc-windows-msvc --target thumbv7a-pc-windows-msvc
```

It will build the stage 2 compiler, but fail building stage 2 test. To build an executable targeting windows/arm,
1. Copy `build\x86_64-pc-windows-msvc\stage0\bin\cargo.exe` to `build\x86_64-pc-windows-msvc\stage2\bin`
2. Open a command prompt and run
```
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set PATH=build\x86_64-pc-windows-msvc\stage2\bin;%PATH%
cargo new hello
cd hello
cargo build --target thumbv7a-pc-windows-msvc –release
```

Copy target\thumbv7a-pc-windows-msvc\release\hello.exe to your platform and run.

There are a number of open issues that I'm hoping to get help with:

 - Error when compiling the `test` crate: `error: cannot link together two panic runtimes: panic_abort and panic_unwind`
 - Warnings when building the compiler_builtins crate: `warning: cl : Command line warning D9002 : ignoring unknown option '-fvisibility=hidden'`. It looks like the build system is passing GCC-style flags to MSVC.
 - How to specify the LIBPATH entries for ARM. Right now they are hardcoded as absolute paths in the target spec.

This pull request depends on
 - alexcrichton/xz2-rs#35 - update vcxproj to Visual Studio 2017
 - rust-lang-nursery/compiler-builtins#256 - fix compile errors when building for windows/arm
 - [Bug 38620 - ARM: Incorrect COFF relocation type for thumb bl instruction](https://bugs.llvm.org/show_bug.cgi?id=38620)

This PR updates #52659
2018-09-13 15:22:05 +00:00
Vitaly _Vi Shukela
888b8c9451
Add tests for issue 54109 2018-09-13 15:54:25 +03:00
Vitaly _Vi Shukela
636f518aac
Suggest && and || instead of 'and' and 'or'
Closes #54109.
2018-09-13 15:54:12 +03:00
Vadim Petrochenkov
beb3b5d22c resolve: Introduce two sub-namespaces in macro namespace 2018-09-13 14:48:50 +03:00
David Wood
18c1374bf8
Update from TyKind::Anon to TyKind::Opaque 2018-09-13 12:07:23 +02:00
Nicholas Nethercote
b697409f10 Remove bitslice.rs.
This requires the following changes.

- It moves parts of bitslice.rs into bitvec.rs: `bitwise()`,
  `BitwiseOperator`, `bits_to_string()`.

- It changes `IdxSet` to just be a wrapper around `BitArray`.

- It changes `BitArray` and `BitVec` to use `usize` words instead of
  `u128` words. (`BitSlice` and `IdxSet` already use `usize`.) Local
  profiling showed `usize` was better.

- It moves some operations from `IdxSet` into `BitArray`:
  `new_filled()`, `clear()`, `set_up_to()`, `trim_to()` (renamed
  `clear_above()`), `words()` and `words_mut()`, `encode()` and
  `decode(). The `IdxSet` operations now just call the `BitArray`
  operations.

- It replaces `BitArray`'s iterator implementation with `IdxSet`'s,
  because the latter is more concise. It also removes the buggy
  `size_hint` function from `BitArray`'s iterator, which counted the
  number of *words* rather than the number of *bits*. `IdxSet`'s
  iterator is now just a thin wrapper around `BitArray`'s iterator.

- It moves some unit tests from `indexed_set.rs` to `bitvec.rs`.
2018-09-13 19:36:03 +10:00
Sergio Benitez
10bb5edb19 Add multispan support to proc-macro diagnostics.
Also updates the issue number for 'proc_macro_diagnostic'.
2018-09-13 01:19:48 -07:00
David Wood
37e18b1c51
Updated suggestion/help messages. 2018-09-13 10:01:18 +02:00
David Wood
7a89e93519
Emit appropriate suggestion when there's already 'static bound on the return type. 2018-09-13 10:01:18 +02:00
David Wood
65e2539666
Don't suggest adding a synthesized region name. 2018-09-13 10:01:18 +02:00
David Wood
6bf131f3f4
Added help message for impl trait static constraint. 2018-09-13 10:01:18 +02:00
David Wood
78b21643a8
Moved helper functions from NiceRegionError to TyCtxt. 2018-09-13 10:01:14 +02:00
Sergio Benitez
50d869333b Add inspection and setter methods to proc_macro::Diagnostic. 2018-09-12 23:34:12 -07:00
F001
2157958b27 introduce SelfCtor 2018-09-13 12:27:29 +08:00
Kazuyoshi Kato
f656fe3b5d COMPILER_TESTS.md has been moved
The document is now hosted at rust-lang-nursery.github.io.
2018-09-12 21:21:43 -07:00
Kazuyoshi Kato
3dbb741a4b rustdoc: Sort implementors
Fixes #53812
2018-09-12 21:01:14 -07:00
bors
994cdd9185 Auto merge of #54086 - petrochenkov:derhelp, r=alexcrichton
resolve: Future proof derive helper attributes

Derive helpers no longer require going through recovery mode (fixes https://github.com/rust-lang/rust/issues/53481).
They also report an error if they are ambiguous with any other macro in scope, so we can resolve the question about their exact priority sometime later (cc https://github.com/rust-lang/rust/issues/52226).
2018-09-13 03:36:15 +00:00
Nicholas Nethercote
755fcae75e Reorder bitvec.rs.
So that the `BitArray` code is all together and before the `BitVector`
code, instead of being awkwardly interleaved.
2018-09-13 13:27:56 +10:00
F001
a489169912 implement feature tuple_struct_self_ctor 2018-09-13 10:57:28 +08:00
Vadim Petrochenkov
2b3e98f4e3 resolve: Future proof derive helper attributes 2018-09-13 05:11:13 +03:00
Vadim Petrochenkov
1b6be5a1ca resolve: Put different parent scopes into a single structure 2018-09-13 05:10:45 +03:00
kennytm
9af125d248
Rollup merge of #53371 - estebank:tuple, r=nikomatsakis
Do not emit E0277 on incorrect tuple destructured binding

Fix #50333.
2018-09-13 10:02:14 +08:00
Artyom Pavlov
2aca69757f
add panics section to method docs 2018-09-13 01:47:08 +00:00