Commit Graph

82581 Commits

Author SHA1 Message Date
Jonathan A. Kollasch
1dd53f73b2 Add aarch64-unknown-netbsd target 2018-08-07 12:03:42 -05:00
Oliver Schneider
afcbc2e90f Remove an overly pedantic and wrong assertion 2018-08-07 18:37:50 +02:00
Mark Rousskov
3baec3cdd7 Add HirId to VisibilityKind::Restricted 2018-08-07 10:13:17 -06:00
bors
ccb550fb45 Auto merge of #53109 - nikomatsakis:nll-escaping-into-return-revert, r=nikomatsakis
revert #52991

Reverts https://github.com/rust-lang/rust/pull/52991 which is flawed. I have an idea how to fix it but might as well revert first since it is so wildly flawed. That's what I get for opening PRs while on PTO =)

r? @pnkfelix
2018-08-07 16:01:27 +00:00
Alex Crichton
7c58ab671f rustc: Tweak visibility of some lang items
This commit tweaks the linker-level visibility of some lang items that rustc
uses and defines. Notably this means that `#[panic_implementation]` and
`#[alloc_error_handler]` functions are never marked as `internal`. It's up to
the linker to eliminate these, not rustc.

Additionally `#[global_allocator]` generated symbols are no longer forced to
`Default` visibility (fully exported), but rather they're relaxed to `Hidden`
visibility). This symbols are *not* needed across DLL boundaries, only as a
local implementation detail of the compiler-injected allocator symbols, so
`Hidden` should suffice.

Closes #51342
Closes #52795
2018-08-07 08:42:38 -07:00
Felix Rabe
025f41f4c0
"Panics" -> "Known Issues"; rm trailing WS 2018-08-07 17:34:34 +02:00
Felix Rabe
6e2051cd08
Less words better than moar words 2018-08-07 16:39:09 +02:00
Felix Rabe
c574720d88
Rephrase 2018-08-07 16:38:02 +02:00
Felix Rabe
b1f47aa838
Document panic in mpsc::Receiver::recv_timeout 2018-08-07 16:35:03 +02:00
Alex Crichton
38eeebdfed rustc: Refactor MonoItem linkage/visibility calculation
The previous iteration was a large `match` which was quite heavily indented,
making it slightly difficult to read and see what was going on. This iteration
is a refactoring (no functional change intended) to make it a bit easier on the
eyes and a bit easier to modify over time.
2018-08-07 07:12:23 -07:00
bors
39e9516532 Auto merge of #51990 - oli-obk:unstable_union, r=nikomatsakis
Place unions, pointer casts and pointer derefs behind extra feature gates

To ensure we don't stabilize these things together with const fn stabilization (or any other stabilization)

This PR moves union field accesses inside `const fn` behind a feature gate. It was possible without a feature gate before, but since `const fn` was behind a feature gate we can do this change.

While "dereferencing raw pointers" and "casting raw pointers to usize" were hard errors before this PR, one could work around them by abusing unions:

```rust
// deref
union Foo<T> {
    x: &'static T,
    y: *const T,
}
const FOO: u32 = unsafe { *Foo { y: 42 as *const T }.x };

// as usize cast
union Bar<T> {
    x: usize,
    y: *const T,
}
const BAR: usize = unsafe { Bar { y: &1u8 }.x };
```

r? @eddyb

cc @nikomatsakis
2018-08-07 13:14:37 +00:00
fukatani
73436a7233 add gdb test for std::collections 2018-08-07 22:05:32 +09:00
Michael Woerister
b27a161939 Annotate functions in LLVM with target-cpu, same as Clang does. 2018-08-07 14:48:20 +02:00
Michael Woerister
f2969ed6c3 Set 'PrepareForThinLTO' whenever doing cross-language LTO. 2018-08-07 14:48:20 +02:00
Michael Woerister
3742f4d9f6 Add test case for including upstream object files in staticlibs when doing cross-lang LTO. 2018-08-07 14:44:48 +02:00
Michael Woerister
386e000c5f Add test case for omitting dllimport during cross-lang LTO. 2018-08-07 14:44:48 +02:00
Michael Woerister
54fba3ac1a Run cross-lang-lto tests also for MSVC (since there's no reason not to) 2018-08-07 14:44:48 +02:00
Michael Woerister
aa9eeff263 Make sure upstream object files are added to staticlibs when compiling
with ThinLTO and cross-lang-lto.

Normally, when compiling with whole-crate-graph ThinLTO, we expect
rustc's LTO step to "uplift" upstream object files/LLVM modules to
the current set of compilation artifacts. Therefore the staticlib
creation code skips this uplifting. However, when compiling with
"cross-language LTO" (i.e. defer LTO to the actual linker), the LTO
step in rustc is not performed, so we have to take care of copying
upstream object files during archive creation (like we already do
when compiling without any LTO).
2018-08-07 14:44:48 +02:00
Michael Woerister
3a3b3317d9 Fix issue around dllimport and ThinLTO as LLD runs it. 2018-08-07 14:44:48 +02:00
Michael Woerister
d5f8edfa10 Fix outdated description of -Zcross-lang-lto. 2018-08-07 14:44:48 +02:00
Oliver Schneider
4b731a908b Fix tidy 2018-08-07 14:41:33 +02:00
Oliver Schneider
a091a6567c Make sure the feature gate actually works and never allows promoting these operations 2018-08-07 14:41:33 +02:00
Oliver Schneider
aa0884ecc1 Add feature gate test 2018-08-07 14:41:33 +02:00
Oliver Schneider
36907fc18d Also put comparing raw pointers behind a feature gate 2018-08-07 14:41:33 +02:00
Oliver Schneider
1fc7580a8e Rebase fallout: new tests need updated ui output 2018-08-07 14:41:33 +02:00
Oliver Schneider
07e2dd7d96 Don't accidentally promote union access in MIR 2018-08-07 14:41:33 +02:00
Oliver Schneider
c0aedc0b6a Use the correct feature gate name 2018-08-07 14:41:33 +02:00
Oliver Schneider
fee07534bb Add feature gate checks 2018-08-07 14:41:33 +02:00
Oliver Schneider
3ef863bfdf Place unions, pointer casts and pointer derefs behind extra feature gates 2018-08-07 14:41:33 +02:00
bors
18925dee25 Auto merge of #53150 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests

Successful merges:

 - #52885 (Remove some unused method arguments from typeck)
 - #52886 (cleanup: Remove `Def::GlobalAsm`)
 - #53028 (Building librustc_codegen_llvm in a separate directory)
 - #53052 (fixed broken links to char)
 - #53060 (Change rustdoc style so fully qualified name does not overlap src link)
 - #53068 (Rename Executor trait to Spawn)
 - #53093 (Enable macros to pass $:literal to another macro)
 - #53107 (Remove references to `StaticMutex` which got removed a while ago)
 - #53135 (Rust 2018: Disable catch_expr, not targeted for 2018 edition)
 - #53139 (set emit_debug_gdb_scripts: false for riscv32imac-unknown-none target)
2018-08-07 11:00:07 +00:00
kennytm
d9e9230b1d
Rollup merge of #53139 - danc86:riscv-no-gdb-scripts, r=petrochenkov
set emit_debug_gdb_scripts: false for riscv32imac-unknown-none target

Same as the other embedded targets, see:
https://github.com/rust-lang/rust/pull/49728

This is a temporary workaround for #44993.
2018-08-07 18:52:20 +08:00
kennytm
9da780dcc7
Rollup merge of #53135 - joshtriplett:remove-catch-from-2018-preview, r=Mark-Simulacrum
Rust 2018: Disable catch_expr, not targeted for 2018 edition

Fixes #52604
2018-08-07 18:51:51 +08:00
David Wood
43850e0bee
Special case error message for thread-local statics. 2018-08-07 12:08:52 +02:00
Ralf Jung
6a018a03df document mode possibilities for all RMW operations 2018-08-07 11:57:43 +02:00
Ralf Jung
1733bd3cbd list possible orderings for load and store 2018-08-07 11:33:20 +02:00
Ralf Jung
110bcc9798 forgot to add comment for some atomic types 2018-08-07 11:26:05 +02:00
Ralf Jung
e9a86a2e1a fix link label; use more https 2018-08-07 11:23:30 +02:00
kennytm
a5cd4b5607
Rollup merge of #53107 - RalfJung:static-mutex, r=alexcrichton
Remove references to `StaticMutex` which got removed a while ago

`StaticMutex` got removed two years ago with https://github.com/rust-lang/rust/pull/34705, but still got referenced in some comments and even an error explanation.
2018-08-07 16:55:44 +08:00
kennytm
c1220610ef
Rollup merge of #53093 - 0e4ef622:issue-52169-fix, r=petrochenkov
Enable macros to pass $:literal to another macro

Fixes #52169.
2018-08-07 16:55:43 +08:00
kennytm
3385cae74a
Rollup merge of #53068 - MajorBreakfast:spawn, r=cramertj
Rename Executor trait to Spawn

Renames the `Executor` trait to `Spawn` and the method on `Context` to `spawner`.

Note: Best only merge this after we've the alpha 3 announcement post ready.

r? @cramertj
2018-08-07 16:55:42 +08:00
kennytm
25e32903ef
Rollup merge of #53060 - iliekturtles:rustdoc-style, r=GuillaumeGomez
Change rustdoc style so fully qualified name does not overlap src link

A type's fully qualified name will now wrap once it gets to the
`[-][src]` link aligned against the right edge of the content area.
Previously the two would overlap and the name would only wrap when
hitting the edge of the content area.

Before:
![image](https://user-images.githubusercontent.com/5081378/43676506-cf548758-97c0-11e8-80a0-a812d8ea0eef.png)

After:
![image](https://user-images.githubusercontent.com/5081378/43676509-e78810a6-97c0-11e8-8cd4-b90bd5858a5f.png)
2018-08-07 16:55:41 +08:00
kennytm
b1ca710c5d
Rollup merge of #53052 - redroc:master, r=QuietMisdreavus
fixed broken links to char

fixes https://github.com/rust-lang/rust/issues/32129
2018-08-07 16:55:40 +08:00
kennytm
35d752f130
Rollup merge of #53028 - Mark-Simulacrum:split-out-codegen, r=alexcrichton
Building librustc_codegen_llvm in a separate directory

This allows clearing it out and building it separately from the
compiler. Since it's essentially a different and separate crate this
makes sense to do, each cargo invocation should generally happen in its
own directory.

r? @alexcrichton
2018-08-07 16:55:38 +08:00
kennytm
2c388e0e9f
Rollup merge of #52886 - petrochenkov:noga, r=alexcrichton
cleanup: Remove `Def::GlobalAsm`

Global asm is not something that needs to have a `Def` or `DefId`.
2018-08-07 16:55:37 +08:00
kennytm
4176888c98
Rollup merge of #52885 - Mark-Simulacrum:cleanup-typeck, r=nikomatsakis
Remove some unused method arguments from typeck

None
2018-08-07 16:55:36 +08:00
bors
9e472c2ace Auto merge of #52450 - PramodBisht:issue/52413, r=estebank
Closes #52413: Provide structured suggestion instead of label

Provide structured suggestion instead of label
r? @estebank
2018-08-07 08:50:12 +00:00
ljedrz
44d32d4413 Avoid unnecessary pattern matching against Option and Result 2018-08-07 10:24:27 +02:00
Esteban Küber
daa5bd35a8 fix typo 2018-08-06 23:46:28 -07:00
Esteban Küber
cce4ea5149 Point at correct span when missing comma in println 2018-08-06 20:54:51 -07:00
Esteban Küber
4862eee8b7 Suggest comma when writing println!("{}" a); 2018-08-06 20:26:21 -07:00