Commit Graph

83610 Commits

Author SHA1 Message Date
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
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
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
bors
f2302daef3 Auto merge of #53409 - GuillaumeGomez:associated-const-value, r=QuietMisdreavus
Don't show associated const value anymore

Part of #44348.

Before:

<img width="1440" alt="screen shot 2018-08-16 at 00 48 30" src="https://user-images.githubusercontent.com/3050060/44177414-20ef1480-a0ee-11e8-80d4-7caf082cf0de.png">

After:

<img width="1440" alt="screen shot 2018-08-16 at 00 48 23" src="https://user-images.githubusercontent.com/3050060/44177417-251b3200-a0ee-11e8-956a-4229275e3342.png">

cc @nox

r? @QuietMisdreavus
2018-09-12 21:20:05 +00:00
Andy Russell
d871b8ad4a
use structured suggestion for "missing mut" label
Fixes #54133.
2018-09-12 17:16:18 -04:00
Mark Rousskov
9681e13bb2 Add check build dependencies 2018-09-12 13:33:17 -06:00
Mark Rousskov
b58589352e Do not print checking messages in dry run mode 2018-09-12 13:31:54 -06:00
Collins Abitekaniza
e792d1d96a remove struct CleanTools 2018-09-12 13:31:53 -06:00
Collins Abitekaniza
de3ec8dd1a nit: rearrange and make match exhaustive
also indicate difference between out_dir and my_out
2018-09-12 13:31:51 -06:00
Collins Abitekaniza
86e34cdd1b clear_if_dirty with self.rustc(compiler) for Mode::Rustc 2018-09-12 13:31:50 -06:00
Collins Abitekaniza
c22c7098ca use stage 1 compiler only for stamps 2018-09-12 13:31:49 -06:00
Collins Abitekaniza
c0af0b0213 clear_if_dirty in Builder::cargo with passed mode 2018-09-12 13:31:47 -06:00
bors
06d2448f1f Auto merge of #54152 - michaelwoerister:cgu-name-fix, r=alexcrichton
Really make CGU names unique across crates.

This will hopefully fix issue #53794.

r? @alexcrichton
2018-09-12 18:30:17 +00:00
Jordan Rhee
fd41c39053 Expand comments in thumbv7a-pc-windows-msvc target spec 2018-09-12 11:28:02 -07:00
Esteban Küber
63cd81c7d6 Add comment explaining reasoning 2018-09-12 10:47:55 -07:00
ljedrz
2919ecdb5c A few cleanups for hir 2018-09-12 17:07:00 +02:00
kenta7777
26dbf56196 Merge branch 'master' into kenta7777#53719 2018-09-12 21:36:31 +09:00
bors
6810f5286b Auto merge of #53793 - toidiu:ak-stabalize, r=nikomatsakis
stabilize outlives requirements

https://github.com/rust-lang/rust/issues/44493

r? @nikomatsakis
2018-09-12 11:27:48 +00:00
Michael Woerister
3beb762dcf Really make CGU names unique across crates. 2018-09-12 12:46:48 +02:00
Aaron Power
3c1efcd6a7 Updated 1.29 release notes with --document-private-items flag 2018-09-12 11:19:23 +01:00
bors
8586ec6980 Auto merge of #54146 - kennytm:rollup, r=kennytm
Rollup of 15 pull requests

Successful merges:

 - #52514 (Fix a few AMDGPU related issues)
 - #53703 (Document .0 to unpack integer from Wrapping)
 - #53777 (Implemented map_or_else for Result<T, E>)
 - #54031 (A few cleanups and minor improvements to rustc_passes)
 - #54046 (Update documentation for fill_buf in std::io::BufRead)
 - #54064 (`&CStr`, not `CStr`, is the counterpart of `&str`)
 - #54072 (Stabilization change for mod.rs)
 - #54073 (docs: Use dollar sign for all bash prompts)
 - #54074 (simplify ordering for Kind)
 - #54085 (Remove documentation about proc_macro being bare-bones)
 - #54087 (rustdoc: Remove generated blanket impls from trait pages)
 - #54106 (Reexport CheckLintNameResult)
 - #54107 (Fix typos in libstd hash map)
 - #54136 (Update LLVM to fix GlobalISel dbg.declare)
 - #54142 (Recover proper regression test for issue #16278.)

Failed merges:

r? @ghost
2018-09-12 08:08:13 +00:00
Andrew Xu
3d6c2606a4 Add a test that tries to modify static memory at compile-time 2018-09-12 12:27:28 +08:00
kennytm
1fed251927
Rollup merge of #54142 - pnkfelix:fix-regression-test-for-16278, r=wesleywiser
Recover proper regression test for issue #16278.

Spawned from my note https://github.com/rust-lang/rust/pull/19955#issuecomment-420430761
2018-09-12 12:17:40 +08:00
kennytm
ac66146d8c
Rollup merge of #54136 - cuviper:global-isel-dbg.declare, r=alexcrichton
Update LLVM to fix GlobalISel dbg.declare

Fixes #49807.
2018-09-12 12:17:39 +08:00
kennytm
13ec061df4
Rollup merge of #54107 - thevaleriemack:master, r=Mark-Simulacrum
Fix typos in libstd hash map

modified growth algo description to read "the first table overflows into the second, and the second into the first." plus smaller typos
2018-09-12 12:17:38 +08:00
kennytm
28890152fe
Rollup merge of #54106 - flip1995:pub_checklintnameresult, r=Manishearth
Reexport CheckLintNameResult

Make the enum `CheckLintNameResult` public, so that lint tools (aka Clippy) can use it together with [`LintStore::check_lint_name`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/lint/struct.LintStore.html#method.check_lint_name), to handle the case that a scoped `tool_lint` doesn't exist in the tool.

This is currently not handled by the compiler:
595345419d/src/librustc/lint/levels.rs (L309-L314)

Needed for rust-lang-nursery/rust-clippy#3161

r? @Manishearth
2018-09-12 12:17:37 +08:00
kennytm
40d9740fe8
Rollup merge of #54087 - ollie27:rustdoc_blanket_impl, r=QuietMisdreavus
rustdoc: Remove generated blanket impls from trait pages

#53801 only deduped the generated blanket impls but they shouldn't be displayed at all because the original blanket impl is already in the "Implementors" section. This also removes the impls from the sidebar.

Fixes #53689

r? @QuietMisdreavus
2018-09-12 12:17:35 +08:00
kennytm
85b6bf9ace
Rollup merge of #54085 - dtolnay:bare, r=alexcrichton
Remove documentation about proc_macro being bare-bones

A large chunk of useful API surface area is stabilizing in Rust 1.29. We no longer have a commitment to expand the API over time as much as implied by these comments.

r? @alexcrichton
2018-09-12 12:17:34 +08:00
kennytm
74b8188af7
Rollup merge of #54074 - toidiu:ak-spimplifyOrd, r=eddyb
simplify ordering for Kind

Missed from https://github.com/rust-lang/rust/pull/50930

r? @eddyb
2018-09-12 12:17:33 +08:00