Commit Graph

81795 Commits

Author SHA1 Message Date
memoryruins
4aced68e18 [nll] librustdoc: enable feature(nll) for bootstrap 2018-08-09 15:35:06 -04:00
memoryruins
ac9b7be50b [nll] librustc_typeck: enable feature(nll) for bootstrap 2018-08-09 15:34:54 -04:00
memoryruins
58407351dd [nll] librustc_platform_intrinsics: enable feature(nll) for bootstrap 2018-08-09 15:34:31 -04:00
memoryruins
d9f2b51a89 [nll] librustc_msan: enable feature(nll) for bootstrap 2018-08-09 15:34:05 -04:00
memoryruins
588dbed392 [nll] librustc_lsan: enable feature(nll) for bootstrap 2018-08-09 15:33:50 -04:00
memoryruins
8172485b4d [nll] librustc_llvm: enable feature(nll) for bootstrap 2018-08-09 15:33:24 -04:00
memoryruins
4b42a2100b [nll] librustc_codegen_utils: enable feature(nll) for bootstrap 2018-08-09 15:33:06 -04:00
memoryruins
48616432ba [nll] libproc_macro: enable feature(nll) for bootstrap 2018-08-09 15:32:45 -04:00
memoryruins
ce5b9c662f [nll] libsyntax_ext: remove unnecessary mut annotation on variable
Pointed out by nll. It is correct that the mut annotation is not needed.
2018-08-09 15:32:23 -04:00
memoryruins
2cb91dad9f [nll] libsyntax_ext: enable feature(nll) for bootstrap 2018-08-09 15:28:39 -04:00
memoryruins
9d2c4a3acd [nll] libtest: enable feature(nll) for bootstrap 2018-08-09 09:22:45 -04:00
memoryruins
6858bd890a [nll] libsyntax: enable feature(nll) for bootstrap 2018-08-09 09:22:33 -04:00
memoryruins
75fa16bc60 [nll] libserialize: enable feature(nll) for bootstrap 2018-08-09 09:22:08 -04:00
memoryruins
c556cff96f [nll] librustc_data_structures: enable feature(nll) for bootstrap 2018-08-09 09:21:23 -04:00
memoryruins
9207cc9bd9 [nll] librustc_allocator: enable feature(nll) for bootstrap 2018-08-09 09:21:01 -04:00
memoryruins
ed55520371 [nll] librustc: enable feature(nll) for bootstrap 2018-08-09 09:20:41 -04:00
memoryruins
26991eb8bf [nll] libprofiler_builtins: enable feature(nll) for bootstrap 2018-08-09 09:20:20 -04:00
memoryruins
bf089a1ac1 [nll] libcore: enable feature(nll) for bootstrap 2018-08-09 09:19:53 -04: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
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
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
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
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
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
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
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
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
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