Commit Graph

82092 Commits

Author SHA1 Message Date
Ralf Jung
25db84206b missed one 2018-08-08 18:14:06 +02:00
Ralf Jung
31bec788f4 avoid using the word 'initialized' to talk about that non-reentrant-capable state of the mutex 2018-08-08 18:12:33 +02:00
bors
376b60da8b Auto merge of #53192 - oli-obk:clippyup, r=kennytm
Update clippy submodule

r? @kennytm

fixes breakage from https://github.com/rust-lang/rust/pull/53053#issuecomment-411364171
2018-08-08 15:10:34 +00:00
bors
63fe441db8 Auto merge of #53088 - matthewjasper:closure-region-spans, r=nikomatsakis
[NLL] Use span of the closure args in free region errors

Also adds a note when one of the free regions is BrEnv.
In a future PR I'll change these messages to say "return requires", which should improve them a bit more.

r? @nikomatsakis
2018-08-08 12:48:32 +00:00
Michael Woerister
3a70050377 Address review comments for #53031 and fix some merge fallout. 2018-08-08 13:40:23 +02:00
Oliver Schneider
dac12f1f96 Update clippy submodule 2018-08-08 13:19:30 +02:00
bors
ebe8df41d7 Auto merge of #52872 - faern:use-modern-alignment-libc, r=TimNN
Make IpvXAddr::new const fns and the well known addresses associated constants

Implements/fixes https://github.com/rust-lang/rust/issues/44582

I just got a PR towards libc (https://github.com/rust-lang/libc/pull/1044) merged. With the new feature added in that PR it is now possible to create `in6_addr` instances as consts. This enables us to finally make the constructors of the IP structs const fns and to make the localhost/unspecified addresses associated constants, as agreed in the above mentioned tracking issue.

I also added a BROADCAST constant. Personally this is the well known address I tend to need the most often.
2018-08-08 10:42:04 +00:00
Linus Färnstrand
c0041f4a17 Use repr(align(x)) for redox in6_addr 2018-08-08 10:52:10 +02:00
Linus Färnstrand
e96b760757 Update libc to 0.2.43 in Cargo.lock 2018-08-08 10:52:10 +02:00
Linus Färnstrand
83464591ed Simplify Ipv6Addr::from(octets) to not use unsafe 2018-08-08 10:52:10 +02:00
Linus Färnstrand
d45a703a74 Simplify is_broadcast 2018-08-08 10:52:10 +02:00
Linus Färnstrand
7167a065d1 Add Ipv4Addr BROADCAST assoc const 2018-08-08 10:52:10 +02:00
Linus Färnstrand
e9a96c0433 Move IPs to assoc consts 2018-08-08 10:52:10 +02:00
Linus Färnstrand
02c272db2d Make Ipv{4,6}Addr::new const fns 2018-08-08 10:52:10 +02:00
Linus Färnstrand
6f943c0697 Update libc and activate align feature 2018-08-08 10:52:10 +02:00
Niko Matsakis
1bae4f5aec optimize redundant borrows 2018-08-08 04:51:50 -04:00
bors
ffb09dfb3a Auto merge of #53053 - petrochenkov:custattr, r=alexcrichton
resolve:  Support custom attributes when macro modularization is enabled

Basically, if resolution of a single-segment attribute is a determined error, then we interpret it as a custom attribute.

Since custom attributes are integrated into general macro resolution, `feature(custom_attribute)` now requires and implicitly enables macro modularization (`feature(use_extern_macros)`).
Actually, a few other "advanced" macro features now implicitly enable macro modularization too (and one bug was found and fixed in process of enabling it).

The first two commits are preliminary cleanups/refactorings.
2018-08-08 08:37:56 +00:00
Mikhail Modin
ffe336d07b Fixes #53119. 2018-08-08 08:02:47 +01:00
bors
52c785bfc2 Auto merge of #53141 - nrc:update, r=nrc
Update RLS, Rustfmt, and Clippy

Fixes bustage due to https://github.com/rust-lang/rust/pull/52332

r? @kennytm
2018-08-08 06:38:13 +00:00
Nick Cameron
ae5a1fdae8 Prevent duplication of rust-ap-syntax
author: alexcrichton
2018-08-08 18:09:36 +12:00
Nick Cameron
b6d0514492 Update RLS and Rustfmt 2018-08-08 18:06:58 +12:00
Esteban Küber
f4039affa3 Suggest comma when missing in macro call
When missing a comma in a macro call, suggest it, regardless of
position. When a macro call doesn't match any of the patterns, check
if the call's token stream could be missing a comma between two idents,
and if so, create a new token stream containing the comma and try to
match against the macro patterns. If successful, emit the suggestion.
2018-08-07 22:31:57 -07:00
bors
26d7b64237 Auto merge of #52993 - alexcrichton:fix-some-vis, r=michaelwoerister
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-08 01:24:15 +00:00
gnzlbg
2cdaf3bae5 add feature-gate test 2018-08-08 02:10:06 +02:00
gnzlbg
020b0731fb add wasm_target_feature feature gate 2018-08-08 01:43:00 +02:00
gnzlbg
5ce865e1c4
Add wasm32 simd128 target feature 2018-08-08 01:39:52 +02:00
Lukas Kalbertodt
24abef3689
Add and update tests for IndexMut help message 2018-08-08 00:30:17 +02:00
bors
3f4f18f098 Auto merge of #52397 - estebank:println-comma, r=oli-obk
Suggest comma when writing `println!("{}" a);`

Fix #49370.
2018-08-07 22:15:25 +00:00
Lukas Kalbertodt
764d472b1f
Make IndexMut note apply to more cases
Previously it was only emitted for assigments, which was an
unnecessary restriction. Now it doesn't care where the mutability
comes from.

This commit also adds `` quotes around the printed type.
2018-08-07 23:08:34 +02:00
bors
e90dc6f80d Auto merge of #52911 - Mark-Simulacrum:visibility-hirid, r=oli-obk
Add HirId to VisibilityKind::Restricted

I'm not confident that these changes are correct -- mostly just tried to copy previous PRs.

Specifically, it's unclear to me if/how to remove the NodeId now that we have HirIds in more structs; is that a all-at-once change that'll happen later?
2018-08-07 19:10:17 +00:00
Niko Matsakis
3b7989d1df avoid computing liveness when a variable doesn't need it
In particular, we skip computing liveness for a variable X if all the
regions in its type are known to outlive free regions.
2018-08-07 15:05:16 -04:00
Niko Matsakis
887296e8c3 make it possible to customize the RegionGraph direction 2018-08-07 14:52:59 -04:00
Niko Matsakis
a92bf8dd29 liveness_map: rustfmt 2018-08-07 14:52:59 -04:00
Niko Matsakis
d1ce8e846b move liveness_map into the liveness module 2018-08-07 14:52:59 -04:00
Niko Matsakis
5147d383d3 promote liveness to a directory module 2018-08-07 14:52:59 -04:00
Niko Matsakis
db7a07cfc6 update comment to more accurately describe the limitations 2018-08-07 14:52:59 -04:00
Niko Matsakis
fb1702f301 compute liveness later 2018-08-07 14:52:59 -04:00
Oliver Schneider
8935f99833
Fix tidy 2018-08-07 19:51:38 +02:00
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