Commit graph

127 commits

Author SHA1 Message Date
bjorn3
52cf01c815 Merge commit 'dbee13661efa269cb4cd57bb4c6b99a19732b484' into sync_cg_clif-2020-12-27 2020-12-27 10:30:38 +01:00
Jack Huey
328fcee4af Make BoundRegion have a kind of BoungRegionKind 2020-12-18 15:27:28 -05:00
bors
eb4fc71dc9 Auto merge of #79945 - jackh726:existential_trait_ref, r=nikomatsakis
Move binder for dyn to each list item

This essentially changes `ty::Binder<&'tcx List<ExistentialTraitRef>>` to `&'tcx List<ty::Binder<ExistentialTraitRef>>`.

This is a first step in moving the `dyn Trait` representation closer to Chalk, which we've talked about in `@rust-lang/wg-traits.`

r? `@nikomatsakis`
2020-12-17 18:21:20 +00:00
David Wood
6c4350dc17
cg_clif: fix build with split dwarf
This commit makes minor changes to the cranelift backend so that it can
build given changes in cg_ssa for Split DWARF.

Signed-off-by: David Wood <david@davidtw.co>
2020-12-16 10:33:48 +00:00
Jack Huey
ed80815bf2 Move binder for dyn to each list item 2020-12-11 15:02:46 -05:00
bors
f0f68778f7 Auto merge of #77611 - oli-obk:atomic_miri_leakage, r=nagisa
Directly use raw pointers in `AtomicPtr` store/load

I was unable to find any reason for this limitation in the latest source of LLVM or in the documentation [here](http://llvm.org/docs/Atomics.html#libcalls-atomic).

fixes https://github.com/rust-lang/miri/issues/1574
2020-12-09 19:53:23 +00:00
oli
41f988e6ae Allow cranelift to handle atomic pointers 2020-11-29 14:56:19 +00:00
bjorn3
477aa67802 Merge commit '5988bbd24aa87732bfa1d111ba00bcdaa22c481a' into sync_cg_clif-2020-11-27 2020-11-27 20:48:53 +01:00
bors
ec039bd075 Auto merge of #79336 - camelid:rename-feature-oibit-to-auto, r=oli-obk
Rename `optin_builtin_traits` to `auto_traits`

They were originally called "opt-in, built-in traits" (OIBITs), but
people realized that the name was too confusing and a mouthful, and so
they were renamed to just "auto traits". The feature flag's name wasn't
updated, though, so that's what this PR does.

There are some other spots in the compiler that still refer to OIBITs,
but I don't think changing those now is worth it since they are internal
and not particularly relevant to this PR.

Also see <https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/opt-in.2C.20built-in.20traits.20(auto.20traits).20feature.20name>.

r? `@oli-obk` (feel free to re-assign if you're not the right reviewer for this)
2020-11-25 07:25:19 +00:00
Camelid
810324d1f3 Rename optin_builtin_traits to auto_traits
They were originally called "opt-in, built-in traits" (OIBITs), but
people realized that the name was too confusing and a mouthful, and so
they were renamed to just "auto traits". The feature flag's name wasn't
updated, though, so that's what this PR does.

There are some other spots in the compiler that still refer to OIBITs,
but I don't think changing those now is worth it since they are internal
and not particularly relevant to this PR.

Also see <https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/opt-in.2C.20built-in.20traits.20(auto.20traits).20feature.20name>.
2020-11-23 14:14:06 -08:00
Lzu Tao
6bfe27a3e0 Drop support for cloudabi targets 2020-11-22 17:11:41 -05:00
Bastian Kauschke
7f45668af6 update cg_clif 2020-11-16 22:42:09 +01:00
Nicholas-Baron
261ca04c92 Changed unwrap_or to unwrap_or_else in some places.
The discussion seems to have resolved that this lint is a bit "noisy" in
that applying it in all places would result in a reduction in
readability.

A few of the trivial functions (like `Path::new`) are fine to leave
outside of closures.

The general rule seems to be that anything that is obviously an
allocation (`Box`, `Vec`, `vec![]`) should be in a closure, even if it
is a 0-sized allocation.
2020-11-10 20:07:47 -08:00
Jonas Schievink
105f4b8792
Rollup merge of #78875 - petrochenkov:cleantarg, r=Mark-Simulacrum
rustc_target: Further cleanup use of target options

Follow up to https://github.com/rust-lang/rust/pull/77729.

Implements items 2 and 4 from the list in https://github.com/rust-lang/rust/pull/77729#issue-500228243.

The first commit collapses uses of `target.options.foo` into `target.foo`.

The second commit renames some target options to avoid tautology:
`target.target_endian` -> `target.endian`
`target.target_c_int_width` -> `target.c_int_width`
`target.target_os` -> `target.os`
`target.target_env` -> `target.env`
`target.target_vendor` -> `target.vendor`
`target.target_family` -> `target.os_family`
`target.target_mcount` -> `target.mcount`

r? `@Mark-Simulacrum`
2020-11-10 14:45:21 +01:00
Dylan DPC
b4589a86cc
Rollup merge of #78674 - tmiasko:inline-substs-for-mir-body, r=oli-obk
inliner: Use substs_for_mir_body

Changes from 68965 extended the kind of instances that are being
inlined. For some of those, the `instance_mir` returns a MIR body that
is already expressed in terms of the types found in substitution array,
and doesn't need further substitution.

Use `substs_for_mir_body` to take that into account.

Resolves #78529.
Resolves #78560.
2020-11-09 01:13:42 +01:00
Vadim Petrochenkov
bf66988aa1 Collapse all uses of target.options.foo into target.foo
with an eye on merging `TargetOptions` into `Target`.

`TargetOptions` as a separate structure is mostly an implementation detail of `Target` construction, all its fields logically belong to `Target` and available from `Target` through `Deref` impls.
2020-11-08 17:29:13 +03:00
Yuki Okushi
7931b2454d
Rollup merge of #78666 - sasurau4:fix/shellcheck-error, r=jyn514
Fix shellcheck error

## Overview

Helps with #77290

This pr fix only errors of shellcheck, the result of `git ls-files '*.sh' | xargs shellcheck --severity=error`.

Fixing error are following.

- https://github.com/koalaman/shellcheck/wiki/SC2148
- https://github.com/koalaman/shellcheck/wiki/SC1008

Disable error following.
- https://github.com/koalaman/shellcheck/wiki/SC2068
2020-11-07 01:02:14 +09:00
Daiki Ihara
a1af001a55 fix shellcheck error of SC2068 2020-11-06 20:33:12 +09:00
Daiki Ihara
f197da655f fix shellcheck error of SC2148 2020-11-06 20:33:12 +09:00
Tomasz Miąsko
8a8ee1a3ed inliner: Use substs_for_mir_body
Changes from 68965 extended the kind of instances that are being
inlined. For some of those, the `instance_mir` returns a MIR body that
is already expressed in terms of the types found in substitution array,
and doesn't need further substitution.

Use `substs_for_mir_body` to take that into account.
2020-11-06 00:00:00 +00:00
Guillaume Gomez
99200f760b Fix even more URLs 2020-11-05 20:11:29 +01:00
oli
6e6c8a86e9 u64::try_from will now fail if ScalarInt isn't exactly 64 bits, thus we use to_bits with the correct size 2020-11-04 13:59:11 +00:00
oli
abacaf2aef u128 truncation and sign extension are not just interpreter related 2020-11-04 13:41:58 +00:00
oli
df4d717d0b s/Scalar::Raw/Scalar::Int 2020-11-04 10:11:31 +00:00
oli
3a7970848c Fix cranelift build 2020-11-04 10:10:44 +00:00
bjorn3
216c4ae463 Merge commit '03f01bbe901d60b71cf2c5ec766aef5e532ab79d' into update_cg_clif-2020-11-01 2020-11-03 11:00:04 +01:00
bjorn3
ac4f7deb2f Add 'compiler/rustc_codegen_cranelift/' from commit '793d26047f994e23415f8f6bb5686ff25d3dda92'
git-subtree-dir: compiler/rustc_codegen_cranelift
git-subtree-mainline: cf798c1ec6
git-subtree-split: 793d26047f
2020-10-26 09:53:27 +01:00