Commit Graph

88933 Commits

Author SHA1 Message Date
Denys Zariaiev
d3903d5f9c Create nvptx64-nvidia-cuda target specification 2019-01-27 16:04:09 +01:00
bors
01af12008d Auto merge of #57927 - Alexendoo:mem-drop-nll-docs, r=Centril
Remove lexical scope examples from std::mem::drop

The example no longer produces an error in the 2018 edition
2019-01-27 09:19:00 +00:00
bors
1484d0d123 Auto merge of #57907 - euclio:applicability-rename, r=estebank
remove deprecated suggestion functions

This PR removes the (now unused) deprecated suggestion functions and removes `_with_applicability` from their replacements' names.

This PR will break clippy, but I'll open a clippy PR once this is merged.
2019-01-27 06:35:51 +00:00
Andy Russell
0897ffc28f
remove _with_applicability from suggestion fns 2019-01-26 23:07:55 -05:00
Andy Russell
8eaa84c79f
document Applicability 2019-01-26 23:06:08 -05:00
bors
677064b979 Auto merge of #57925 - fintelia:riscv-cas, r=nagisa
Enable RISC-V atomic compare and swap

Fixes #56564
2019-01-27 03:57:54 +00:00
bors
491680114a Auto merge of #57871 - Mark-Simulacrum:fix-compiletest-stamp, r=oli-obk
Correctly set filetime for copied LLVM

This also makes compiletest no longer always retest everything.

Fixes #57864
2019-01-27 00:07:53 +00:00
Alex Macleod
9c9144fc1b Remove lexical scope examples from std::mem::drop
The example no longer produces an error in the 2018 edition
2019-01-26 21:59:17 +00:00
Jonathan Behrens
607c5431ae Enable RISC-V atomic compare and swap 2019-01-26 16:42:42 -05:00
bors
20c2cba61d Auto merge of #57918 - Centril:rollup, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #57407 (Stabilize extern_crate_self)
 - #57703 (Make MutexGuard's Debug implementation more useful.)
 - #57764 (Fix some minor warnings)
 - #57825 (un-deprecate mem::zeroed)
 - #57827 (Ignore aarch64 in simd-intrinsic-generic-reduction)
 - #57908 (resolve: Fix span arithmetics in the import conflict error)
 - #57913 (Change crate-visibility-modifier issue number in The Unstable Book)

Failed merges:

r? @ghost
2019-01-26 18:14:46 +00:00
Mazdak Farrokhzad
97833ee506
Rollup merge of #57913 - h-michael:fix-crate-visibility-modifier-issue-number, r=Centril
Change crate-visibility-modifier issue number in The Unstable Book

#45388 is closed.
Because, it's duplicate issue of #53120.
2019-01-26 18:21:49 +01:00
Mazdak Farrokhzad
bbe8dd9ca3
Rollup merge of #57908 - petrochenkov:errepice, r=estebank
resolve: Fix span arithmetics in the import conflict error

https://github.com/rust-lang/rust/pull/56937 rebased and fixed

Fixes https://github.com/rust-lang/rust/issues/56411
Fixes https://github.com/rust-lang/rust/issues/57071
Fixes https://github.com/rust-lang/rust/issues/57787

r? @estebank
2019-01-26 18:21:47 +01:00
Mazdak Farrokhzad
1206264fb2
Rollup merge of #57827 - parched:ignore, r=nikomatsakis
Ignore aarch64 in simd-intrinsic-generic-reduction

This fails on AArch64 see https://github.com/rust-lang/rust/issues/54510

Disabling it for now until it's fixed/implemented in LLVM

cc @gnzlbg
2019-01-26 18:21:46 +01:00
Mazdak Farrokhzad
5ce3f74096
Rollup merge of #57825 - RalfJung:zeroed, r=nikomatsakis
un-deprecate mem::zeroed

as per the discussion around <https://github.com/rust-lang/rust/issues/53491#issuecomment-451454793>
2019-01-26 18:21:45 +01:00
Mazdak Farrokhzad
51f53687e7
Rollup merge of #57764 - Xanewok:tiny-tweaks, r=nikomatsakis
Fix some minor warnings

Since apparently RLS works when initialized in the root repository (🎉) I decided to fix some of the issues it caught.

There are a lot of unused attribute warnings left on `rustc_on_unimplemented` and `rustc_layout_scalar_valid_range_start` but I imagine we can't do much about it due to 2-stage compilation?
2019-01-26 18:21:44 +01:00
Mazdak Farrokhzad
1e8fde07b6
Rollup merge of #57703 - m-ou-se:mutexguard-debug, r=cramertj
Make MutexGuard's Debug implementation more useful.

Fixes #57702.
2019-01-26 18:21:42 +01:00
Mazdak Farrokhzad
5e6c2f40d0
Rollup merge of #57407 - mehcode:stabilize-extern-crate-self, r=Centril
Stabilize extern_crate_self

Fixes #56409
2019-01-26 18:21:41 +01:00
bors
46a43dc1e9 Auto merge of #57852 - davidtwco:issue-57819, r=estebank
Suggest removing leading left angle brackets.

Fixes #57819.

This PR adds errors and accompanying suggestions as below:

```
bar::<<<<<T as Foo>::Output>();
     ^^^ help: remove extra angle brackets
```

r? @estebank
2019-01-26 15:33:43 +00:00
bors
ccd428befd Auto merge of #57726 - Zoxc:combine-early-lints, r=estebank
Combine all builtin early lints

This also adds a -Z no-interleave-lints option to allow benchmarking lints.

r? @estebank
2019-01-26 12:21:03 +00:00
bors
f95834b2a9 Auto merge of #57425 - alexcrichton:stabilize-atomics, r=sfackler
std: Stabilize fixed-width integer atomics

This commit stabilizes the `Atomic{I,U}{8,16,32,64}` APIs in the
`std::sync::atomic` and `core::sync::atomic` modules. Proposed in #56753
and tracked in #32976 this feature has been unstable for quite some time
and is hopefully ready to go over the finish line now!

The API is being stabilized as-is. The API of `AtomicU8` and friends
mirrors that of `AtomicUsize`. A list of changes made here are:

* A portability documentation section has been added to describe the
  current state of affairs.
* Emulation of smaller-size atomics with larger-size atomics has been
  documented.
* As an added bonus, `ATOMIC_*_INIT` is now scheduled for deprecation
  across the board in 1.34.0 now that `const` functions can be invoked
  in statics.

Note that the 128-bit atomic types are omitted from this stabilization
explicitly. They have far less platform support than the other atomic
types, and will likely require further discussion about their best
location.

Closes #32976
Closes #56753
2019-01-26 09:46:10 +00:00
bors
42eb5ff404 Auto merge of #55641 - nagisa:optimize-attr, r=pnkfelix
Implement optimize(size) and optimize(speed) attributes

This PR implements both `optimize(size)` and `optimize(speed)` attributes.

While the functionality itself works fine now, this PR is not yet complete: the code might be messy in places and, most importantly, the compiletest must be improved with functionality to run tests with custom optimization levels. Otherwise the new attribute cannot be tested properly. Oh, and not all of the RFC is implemented – attribute propagation is not implemented for example.

# TODO

* [x] Improve compiletest so that tests can be written;
* [x] Assign a proper error number (E9999 currently, no idea how to allocate a number properly);
* [ ] Perhaps reduce the duplication in LLVM attribute assignment code…
2019-01-26 07:08:18 +00:00
Hirokazu Hata
b215fbdbb4 Change crate-visibility-modifier issue number in The Unstable Book 2019-01-26 15:50:05 +09:00
bors
9df043b543 Auto merge of #57675 - cuviper:llvm-monorepo, r=alexcrichton
Rebase to the llvm-project monorepo

The new git submodule src/llvm-project is a monorepo replacing src/llvm
and src/tools/{clang,lld,lldb}.  This also serves as a rebase for these
projects to the new 8.x branch from trunk.

The src/llvm-emscripten fork is unchanged for now.

r? @alexcrichton
2019-01-26 02:10:15 +00:00
Alex Crichton
059ed4f21f Update dlmalloc to 0.1.2
Remove usage of an old and removed wasm intrinsic
2019-01-25 15:40:53 -08:00
Josh Stone
15cf179c93 Set LLDB_NO_DEBUGSERVER=ON 2019-01-25 15:39:55 -08:00
Josh Stone
a920ed935c [rust-lldb] Adapt to changes in LLDB APIs 2019-01-25 15:39:54 -08:00
Josh Stone
400dec059e librustc_llvm: default to libc++ for darwin 2019-01-25 15:39:54 -08:00
Josh Stone
8b88324c56 Update LLVM for a CodeView fix 2019-01-25 15:39:54 -08:00
Josh Stone
cff0750090 Set the DICompileUnit emissionKind 2019-01-25 15:39:54 -08:00
Alex Crichton
75d0bceb0a Add two more wasm-related LLVM commits 2019-01-25 15:39:54 -08:00
Josh Stone
df0466d0bb Rebase to the llvm-project monorepo
The new git submodule src/llvm-project is a monorepo replacing src/llvm
and src/tools/{clang,lld,lldb}.  This also serves as a rebase for these
projects to the new 8.x branch from trunk.

The src/llvm-emscripten fork is unchanged for now.
2019-01-25 15:39:54 -08:00
bors
37d51aa8f3 Auto merge of #57898 - Centril:rollup, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #56233 (Miri and miri-related code contains repetitions of `(n << amt) >> amt`)
 - #57645 (distinguish "no data" from "heterogeneous" in ABI)
 - #57734 (Fix evaluating trivial drop glue in constants)
 - #57886 (Add suggestion for moving type declaration before associated type bindings in generic arguments.)
 - #57890 (Fix wording in diagnostics page)

Failed merges:

r? @ghost
2019-01-25 23:27:20 +00:00
Vadim Petrochenkov
1b659d69bc Address review comments and cleanup code 2019-01-26 01:49:55 +03:00
Mark Rousskov
82fae2be04 Correctly set filetime for copied LLVM
This also makes compiletest no longer always retest everything.
2019-01-25 14:31:38 -07:00
bors
bf669d1e32 Auto merge of #57435 - Dylan-DPC:fi/compiler-builtins-lock, r=alexcrichton
Update Cargo.lock to use the latest `compiler_builtins`

A very tiny PR per the request of @alexcrichton : rust-lang-nursery/compiler-builtins#267 (comment)

Rewrite of #57414

cc @Lokathor

r? @alexcrichton
2019-01-25 20:30:43 +00:00
Alex Crichton
14b36fb15a std: Stabilize fixed-width integer atomics
This commit stabilizes the `Atomic{I,U}{8,16,32,64}` APIs in the
`std::sync::atomic` and `core::sync::atomic` modules. Proposed in #56753
and tracked in #32976 this feature has been unstable for quite some time
and is hopefully ready to go over the finish line now!

The API is being stabilized as-is. The API of `AtomicU8` and friends
mirrors that of `AtomicUsize`. A list of changes made here are:

* A portability documentation section has been added to describe the
  current state of affairs.
* Emulation of smaller-size atomics with larger-size atomics has been
  documented.
* As an added bonus, `ATOMIC_*_INIT` is now scheduled for deprecation
  across the board in 1.34.0 now that `const` functions can be invoked
  in statics.

Note that the 128-bit atomic types are omitted from this stabilization
explicitly. They have far less platform support than the other atomic
types, and will likely require further discussion about their best
location.

Closes #32976
Closes #56753
2019-01-25 11:48:10 -08:00
François Mockers
ac4b685650 #56411 do not suggest a fix for a import conflict in a macro 2019-01-25 22:39:14 +03:00
Simonas Kazlauskas
ce289c6c99 Resolve breakage 2019-01-25 19:20:38 +02:00
Mazdak Farrokhzad
0ae3d87d81
Rollup merge of #57890 - feinorgh:fix-diagnostics-typo, r=zackmdavis
Fix wording in diagnostics page

Fix a tiny wording error in the diagnostics text for E0070.
2019-01-25 16:59:31 +01:00
Mazdak Farrokhzad
7768358e72
Rollup merge of #57886 - davidtwco:issue-57385, r=estebank
Add suggestion for moving type declaration before associated type bindings in generic arguments.

Fixes #57385.

r? @estebank
2019-01-25 16:59:29 +01:00
Mazdak Farrokhzad
141fa859b8
Rollup merge of #57734 - oli-obk:fixes_and_cleanups, r=pnkfelix
Fix evaluating trivial drop glue in constants

```rust
struct A;
impl Drop for A {
    fn drop(&mut self) {}
}

const FOO: Option<A> = None;

const BAR: () = (FOO, ()).1;
```

was erroring with

```
error: any use of this value will cause an error
 --> src/lib.rs:9:1
  |
9 | const BAR: () = (FOO, ()).1;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^-^
  |                           |
  |                           calling non-const function `std::ptr::real_drop_in_place::<(std::option::Option<A>, ())> - shim(Some((std::option::Option<A>, ())))`
  |
  = note: #[deny(const_err)] on by default

error: aborting due to previous error
```

before this PR. According to godbolt this last compiled successfully in 1.27
2019-01-25 16:59:27 +01:00
Mazdak Farrokhzad
7779bb9907
Rollup merge of #57645 - nikomatsakis:issue-56877-abi-aggregates, r=eddyb
distinguish "no data" from "heterogeneous" in ABI

Ignore zero-sized types when computing whether something is a homogeneous aggregate, except be careful of VLA.

cc #56877

r? @arielb1
cc @eddyb
2019-01-25 16:59:26 +01:00
Mazdak Farrokhzad
ef5a5bab7a
Rollup merge of #56233 - kenta7777:kenta7777#49937, r=oli-obk
Miri and miri-related code contains repetitions of `(n << amt) >> amt`

I reduced some code repetitions contains `(n << amt) >> amt`.
This pull request is related to #49937.
2019-01-25 16:59:25 +01:00
Niko Matsakis
8e4c57fca2 distinguish "no data" from "heterogeneous" for ABI purposes
Also, add a testing infrastructure and tests that lets us dump layout.
2019-01-25 10:03:47 -05:00
bors
0b1669d96c Auto merge of #57714 - matthewjasper:wellformed-unreachable, r=pnkfelix
[NLL] Clean up handling of type annotations

* Renames (Canonical)?UserTypeAnnotation -> (Canonical)?UserType so that the name CanonicalUserTypeAnnotation is free.
* Keep the inferred type associated to user type annotations in the MIR, so that it can be compared against the annotated type, even when the annotated expression gets removed from the MIR. (#54943)
* Use the inferred type to allow infallible handling of user type projections (#57531)
* Uses revisions for the tests in #56993
* Check the types of `Unevaluated` constants with no annotations (#46702)
* Some drive-by cleanup

Closes #46702
Closes #54943
Closes #57531
Closes #57731
cc #56993 leaving this open to track the underlying issue: we are not running tests with full NLL enabled on CI at the moment

r? @nikomatsakis
2019-01-25 14:25:37 +00:00
Felix S. Klock II
620a03f5aa Unit test from #57866. 2019-01-25 15:19:37 +01:00
bors
7187db619c Auto merge of #57891 - michaelwoerister:no-default-incr-bootstrap, r=pietroalbini
bootstrap: Don't rely on any default settings regarding incr. comp. in Cargo

https://github.com/rust-lang/cargo/pull/6564 (temporarily) makes incremental compilation the default for release builds. We don't want this default to apply to building the compiler itself, that is, `bootstrap`'s `incremental` flag should always be respected. Otherwise we'll get incrementally build releases, which we really don't want `:)`.

r? @Mark-Simulacrum

Anybody else from @rust-lang/release should feel free to r+ this too if they get around to it earlier.
2019-01-25 11:25:14 +00:00
David Wood
7a0abbff8b
Combining move lifetime and type suggestions.
This commit combines the move lifetime and move type suggestions so that
when rustfix applies them they don't conflict with each other.
2019-01-25 11:54:21 +01:00
Michael Woerister
f4fe8085f8 bootstrap: Don't rely on any default settings regarding incr. comp. in Cargo. 2019-01-25 11:23:08 +01:00
David Wood
463e623ca9
Suggestion moving types before associated types.
This commit extends existing suggestions to move lifetimes before types
in generic arguments to also suggest moving types behind associated type
bindings.
2019-01-25 11:15:16 +01:00