Commit graph

70273 commits

Author SHA1 Message Date
Steven Fackler
1e42d5f2e1 Add process::parent_id
I have this as a Unix-only API since it seems like Windows doesn't have
a similar API.
2017-11-19 12:36:55 -08:00
Basile Desloges
2285e35919 mir-borrowck: Use Field instead of usize for field index in user description functions 2017-11-19 20:19:11 +01:00
Basile Desloges
e5d291afbf mir-borrowck: Use bool for autoderef in append_lvalue_to_string() 2017-11-19 20:19:11 +01:00
Basile Desloges
094d67ee37 mir-borrowck: Remove parens in the lvalue description of a deref 2017-11-19 20:19:10 +01:00
Eduard-Mihai Burtescu
89e437354a rustc_trans: remove primitive_align optimization. 2017-11-19 20:33:46 +02:00
Zack M. Davis
1a9dc2e902 dead code lint to say "never constructed" for variants
As reported in #19140, #44083, and #44565, some users were confused when
the dead-code lint reported an enum variant to be "unused" when it was
matched on (but not constructed). This wording change makes it clearer
that the lint is in fact checking for construction.

We continue to say "used" for all other items (it's tempting to say
"called" for functions and methods, but this turns out not to be
correct: functions can be passed as arguments and the dead-code lint
isn't special-casing that or anything).

Resolves #19140.
2017-11-19 10:15:36 -08:00
bors
5041b3bb3d Auto merge of #45454 - Aaronepower:master, r=alexcrichton
Updated Release notes for 1.22.0

[rendered](https://github.com/Aaronepower/rust/blob/master/RELEASES.md)
2017-11-19 17:23:01 +00:00
Michael Woerister
8d6f869c98
Remove some trailing whitespace. 2017-11-19 17:26:19 +01:00
Michael Woerister
a4ad5dbcb7
Fix tidy line-length issue. 2017-11-19 17:12:04 +01:00
Eduard-Mihai Burtescu
88e4d2c291 rustc_trans: work around i686-pc-windows-msvc byval align LLVM bug. 2017-11-19 17:58:38 +02:00
bors
d8d5b6180f Auto merge of #46074 - scottmcm:unspecialize-nth, r=bluss
Undo the Sized specialization from Iterator::nth

I just added this as part of https://github.com/rust-lang/rust/pull/45595, but I'm now afraid there's a specialization issue with it, since I tried to add [another similar specialization](https://github.com/rust-lang/rust/compare/master...scottmcm:faster-iter-by-ref?expand=1#diff-1398f322bc563592215b583e9b0ba936R2390), and ended up getting really disturbing test failures like
```
thread 'iter::test_by_ref_folds' panicked at 'assertion failed: `(left == right)`
  left: `15`,
 right: `15`', src\libcore\../libcore/tests\iter.rs:1720:4
```

So since this wasn't the most critical part of the change and a new beta is branching within a week, I think putting this part back to what it was before is the best option.
2017-11-19 12:20:14 +00:00
Guillaume Gomez
ad6324f6f7 Fix path search in docs 2017-11-19 12:14:56 +01:00
Niko Matsakis
df6fdbc9ae fix closure inlining by spilling arguments to a temporary 2017-11-19 05:36:56 -05:00
Eduard-Mihai Burtescu
b0812de556 cargotest: temporarily use eddyb/servo to include servo/servo#19285. 2017-11-19 11:48:12 +02:00
Eduard-Mihai Burtescu
fb832833e2 Don't glob-import overlapping variant names in test/codegen/match-optimizes-away.rs. 2017-11-19 09:12:10 +02:00
Scott McMurray
57c0801e33 Add a MIR pass to lower 128-bit operators to lang item calls
Runs only with `-Z lower_128bit_ops` since it's not hooked into targets yet.
2017-11-18 21:51:14 -08:00
bors
c5c70ef723 Auto merge of #46064 - Keruspe:master, r=sfackler
update openssl{,-sys} to fix build with libressl 2.6.x
2017-11-19 05:19:10 +00:00
bors
8703e7d0e3 Auto merge of #46048 - cramertj:update-libc-2, r=alexcrichton
Update libc to include Fuchsia changes

This is an update of libc to include the updated Fuchsia "open" flags added in https://github.com/rust-lang/libc/pull/849.

cc @smklein
r? @alexcrichton
2017-11-19 03:02:15 +00:00
Eduard-Mihai Burtescu
95687bfe27 rustc_trans: (hack) use preferred alignment for atomic loads/stores. 2017-11-19 03:56:37 +02:00
Eduard-Mihai Burtescu
753d582f62 rustc: rename CachedLayout to LayoutDetails. 2017-11-19 02:43:56 +02:00
Eduard-Mihai Burtescu
8437d7c0f1 rustc: extend the niche-filling enum optimization past 2 variants. 2017-11-19 02:43:56 +02:00
Eduard-Mihai Burtescu
d893285b65 rustc: use layout::Abi::ScalarPair for structs in more cases. 2017-11-19 02:43:56 +02:00
Eduard-Mihai Burtescu
801a1a0fc1 rustc_trans: remove type_is_fat_ptr and its uses. 2017-11-19 02:43:56 +02:00
Eduard-Mihai Burtescu
fa67abd127 rustc: don't special-case Box<T> as having a pointer layout. 2017-11-19 02:43:55 +02:00
Eduard-Mihai Burtescu
18ecc564f2 rustc_trans: support scalar pairs directly in the Rust ABI. 2017-11-19 02:43:55 +02:00
Eduard-Mihai Burtescu
7a36141465 rustc: unpack scalar pair newtype layout ABIs. 2017-11-19 02:43:55 +02:00
Eduard-Mihai Burtescu
37a7521ef9 rustc: unpack scalar newtype layout ABIs. 2017-11-19 02:43:55 +02:00
Eduard-Mihai Burtescu
0b8697241f rustc_trans: be more relaxed with non-lvalue consumes, especially ZSTs. 2017-11-19 02:43:55 +02:00
Eduard-Mihai Burtescu
c4d9ada701 rustc: place ZSTs first during struct field reordering. 2017-11-19 02:43:55 +02:00
Eduard-Mihai Burtescu
cdeb4b0d25 rustc: encode scalar pairs in layout ABI. 2017-11-19 02:43:32 +02:00
Eduard-Mihai Burtescu
f1b7cd9925 rustc_trans: restrict "immediate pairs" to pairs of scalars. 2017-11-19 02:14:33 +02:00
Eduard-Mihai Burtescu
ac60872077 rustc_trans: generate LLVM pointee types based on alignment. 2017-11-19 02:14:33 +02:00
Eduard-Mihai Burtescu
f8d5d0c30c rustc_trans: compute better align/dereferenceable attributes from pointees. 2017-11-19 02:14:33 +02:00
Eduard-Mihai Burtescu
ced5e04e8b rustc: optimize out uninhabited types and variants. 2017-11-19 02:14:33 +02:00
Eduard-Mihai Burtescu
f62e43da28 rustc: track validity ranges for layout::Abi::Scalar values. 2017-11-19 02:14:33 +02:00
Eduard-Mihai Burtescu
5df25c4aed rustc: remove redundant/unused fields from layout::Abi::Vector. 2017-11-19 02:14:33 +02:00
Eduard-Mihai Burtescu
b203a26efb rustc: generalize layout::Variants::NicheFilling to niches other than 0. 2017-11-19 02:14:33 +02:00
Eduard-Mihai Burtescu
0190f270c1 rustc_trans: check for layout::I1 instead of TyBool. 2017-11-19 02:14:33 +02:00
Eduard-Mihai Burtescu
abbc1ddbd0 rustc: make TyLayout::field(NonZero<*T>, 0) return &T. 2017-11-19 02:14:33 +02:00
Eduard-Mihai Burtescu
de3e581e29 rustc: support u128 discriminant ranges. 2017-11-19 02:14:32 +02:00
Eduard-Mihai Burtescu
018323ffc2 rustc: collapse the remains of Layout into Variants (enums vs everything else). 2017-11-19 02:14:32 +02:00
Eduard-Mihai Burtescu
b28f668e26 rustc: move size, align & primitive_align from Abi::Aggregate to layout. 2017-11-19 02:14:32 +02:00
Eduard-Mihai Burtescu
b723af284a rustc_trans: go through layouts uniformly for fat pointers and variants. 2017-11-19 02:14:32 +02:00
Eduard-Mihai Burtescu
026214c858 rustc: collapse Layout::FatPointer into Layout::Univariant. 2017-11-19 02:14:32 +02:00
Eduard-Mihai Burtescu
3fd6b00082 rustc_trans: query LLVM types from a layout instead of a Ty. 2017-11-19 02:14:32 +02:00
Eduard-Mihai Burtescu
1477119344 rustc_trans: keep a layout instead of a type in {Lvalue,Operand}Ref. 2017-11-19 02:14:32 +02:00
Eduard-Mihai Burtescu
88f70323e4 rustc_trans: nest abi::ArgType's for fat pointers instead of eagerly flattening. 2017-11-19 02:14:31 +02:00
Eduard-Mihai Burtescu
f2e7e17d9e rustc_trans: pass OperandRef arguments to trans_intrinsic_call. 2017-11-19 02:14:31 +02:00
Eduard-Mihai Burtescu
b2d52d2132 rustc: do not pub use Layout::* in layout. 2017-11-19 02:14:31 +02:00
Eduard-Mihai Burtescu
d0ab6e8644 rustc_trans: compute LLVM types from type layouts, not Rust types. 2017-11-19 02:14:31 +02:00