Commit graph

149507 commits

Author SHA1 Message Date
Guillaume Gomez
0daf8ac41f Replace h3 for notable traits with div 2021-06-02 21:16:33 +02:00
Mara Bos
f717992229 Stabilize VecDeque::partition_point. 2021-06-02 20:55:45 +02:00
Mara Bos
f086f1ec90 Bump vecdeque_binary_search stabilization to 1.54. 2021-06-02 20:51:08 +02:00
SOFe
f51f277d6c Bumped vecdeque_binary_search stabilization version to 1.53.0 2021-06-02 20:50:22 +02:00
SOFe
f7c283c160 Stabilize vecdeque_binary_search 2021-06-02 20:50:15 +02:00
Guillaume Gomez
14fe83f7e4 Update rustdoc tests 2021-06-02 20:30:18 +02:00
Jacob Hoffman-Andrews
fab6814ff3 Remove data-level selectors from CSS. 2021-06-02 20:30:17 +02:00
Jeff Muizelaar
aab854596f Turn off frame pointer elimination on all Apple platforms.
This ends up disabling frame pointer elimination on aarch64_apple_darwin
which matches what clang does by default along with the
aarch64_apple_ios and x86_64_apple_darwin targets.

Further, the Apple docs "Writing ARM64 Code for Apple Platforms" has a section
called "Respect the Purpose of Specific CPU Registers" which
specifically calls out the frame pointer register (x29):

   The frame pointer register (x29) must always address a valid frame
   record. Some functions — such as leaf functions or tail calls — may
   opt not to create an entry in this list As a result, stack traces
   are always meaningful, even without debug information.

Other platforms are updated to not override the default.
2021-06-02 13:49:29 -04:00
Mara Bos
ecebb669d5 Add test for removing &mut for &mut format!(). 2021-06-02 19:06:45 +02:00
Mara Bos
b4524f8bf0 Fix suggestion for removing &mut from &mut macro!(). 2021-06-02 19:06:23 +02:00
Mara Bos
e735f6086d Add test for ref suggestions in macros. 2021-06-02 18:36:05 +02:00
Camille GILLOT
0e71283495 Restrict access to crate_name.
Also remove original_crate_name, which had the exact same implementation
2021-06-02 18:35:32 +02:00
Mara Bos
80828f26bb Improve check_ref suggestions in macros. 2021-06-02 18:11:32 +02:00
Ryan Levick
ab419314e9 Add a page on force-warns in unstable book 2021-06-02 18:07:39 +02:00
Ryan Levick
dc2db73899 Add deny-by-default test 2021-06-02 17:25:24 +02:00
Ryan Levick
e3e31a1912 Add missing stderr file 2021-06-02 17:22:24 +02:00
Ryan Levick
8d4841cf0e Add final test 2021-06-02 17:18:52 +02:00
Tomasz Miąsko
11478bd614 Validate type of locals used as indices 2021-06-02 17:11:07 +02:00
hi-rustin
957e2effc3 Address comment 2021-06-02 23:10:55 +08:00
Tomasz Miąsko
c898681a86 Add Ty::is_union predicate and use it 2021-06-02 17:09:17 +02:00
Tomasz Miąsko
012c323467 Implement Ty::is_enum using matches! 2021-06-02 17:09:13 +02:00
Ryan Levick
3b206b7a70 Force warn on lint groups as well 2021-06-02 17:09:07 +02:00
Wesley Wiser
3127419e2b Respond to review feedback 2021-06-02 10:23:12 -04:00
Wesley Wiser
ef053fd6f0 Change the type name from _enum<..> to enum$<..>
This makes the type name inline with the proposed standard in #85269.
2021-06-02 10:23:12 -04:00
Wesley Wiser
d2d6fa852d Respond to review feedback 2021-06-02 10:23:11 -04:00
Wesley Wiser
d650091117 Make tidy happy 2021-06-02 10:23:11 -04:00
Wesley Wiser
2a9fa202fe Add/update tests 2021-06-02 10:23:11 -04:00
Wesley Wiser
141546c355 Generate better debuginfo for niche-layout enums
Previously, we would generate a single struct with the layout of the
dataful variant plus an extra field whose name contained the value of
the niche (this would only really work for things like `Option<&_>`
where we can determine that the `None` case maps to `0` but for enums
that have multiple tag only variants, this doesn't work).

Now, we generate a union of two structs, one which is the layout of the
dataful variant and one which just has a way of reading the
discriminant. We also generate an enum which maps the discriminant value
to the tag only variants.

We also encode information about the range of values which correspond to
the dataful variant in the type name and then use natvis to determine
which union field we should display to the user.

As a result of this change, all niche-layout enums render correctly in
WinDbg and Visual Studio!
2021-06-02 10:23:10 -04:00
Wesley Wiser
2a025c1a76 Remove fallback for containing scopes
This wasn't necessary for msvc and caused issues where different types
with the same name such as different instantiations of `Option<T>` would
have colliding debuginfo. This confused the debugger which would pick
one of the type definitions and use for all types with that name even
though they had different layout.
2021-06-02 10:23:10 -04:00
Wesley Wiser
b644f06326 Resolve EnumTagInfo FIXME 2021-06-02 10:23:10 -04:00
Wesley Wiser
f353cbf1a1 Generate better debuginfo for directly tagged enums 2021-06-02 10:23:09 -04:00
bors
2f601ef527 Auto merge of #85337 - cjgillot:less-anon, r=michaelwoerister
Avoid creating anonymous nodes with zero or one dependency.

Anonymous nodes are only useful to encode dependencies, and cannot be replayed from one compilation session to another.
As such, anonymous nodes without dependency are always green.
Anonymous nodes with only one dependency are equivalent to this dependency.

cc #45408
cc `@michaelwoerister`
2021-06-02 13:11:41 +00:00
bors
1e13a9bb33 Auto merge of #85892 - tmiasko:i, r=oli-obk
Miscellaneous inlining improvements
2021-06-02 10:47:58 +00:00
bors
7350f655ef Auto merge of #85908 - cjgillot:private-dep-query, r=Aaron1011
Make is_private_dep a query.

Part of #85153

r? `@Aaron1011`
2021-06-02 08:06:45 +00:00
Tomasz Miąsko
c1f6495b8e Miscellaneous inlining improvements 2021-06-02 08:49:58 +02:00
bors
d20b9add05 Auto merge of #85905 - cjgillot:one-trait-map, r=Aaron1011
Only compute the trait map once

Part of #85153

r? `@Aaron1011`
2021-06-02 05:25:41 +00:00
Eric Huss
7852935175 Update cargo 2021-06-01 20:38:39 -07:00
bors
c4f186f0ea Auto merge of #85687 - m-ou-se:new-prelude, r=yaahc
New prelude

RFC: rust-lang/rfcs#3114
Tracking issue: https://github.com/rust-lang/rust/issues/85684
2021-06-02 02:36:44 +00:00
csmoe
521d9ab59a convert Rvalue::threadlocalref assertion to delay bug 2021-06-02 10:19:57 +08:00
Jubilee Young
d03683caf6 Allow raw pointers in SIMD types 2021-06-01 17:00:44 -07:00
bors
153f22a906 Auto merge of #85331 - cjgillot:dirty-dancing, r=Aaron1011
Make rustc_dirty/clean annotations exhaustive by default

Fixes #45009
2021-06-01 23:02:52 +00:00
LingMan
e2b22b56b8 Use pattern matching instead of checking lengths explicitly
This piece of code checks that there are exaclty two variants, one having
exactly one field, the other having exactly zero fields. If any of these
conditions is violated, it returns `None`. Otherwise it assigns that one
field's ty to `field_ty`.

Instead of fiddling with indices and length checks explicitly, use pattern
matching to simplify this.
2021-06-01 22:31:46 +02:00
Rich Kadel
f4f76e60b3 Reland - Report coverage 0 of dead blocks
Fixes: #84018

With `-Z instrument-coverage`, coverage reporting of dead blocks
(for example, blocks dropped because a conditional branch is dropped,
based on const evaluation) is now supported.

Note, this PR relands an earlier, reverted PR that failed when compiling
generators. The prior issues with generators has been resolved and a new
test was added to prevent future regressions.

Check out the resulting changes to test coverage of dead blocks in the
test coverage reports in this PR.
2021-06-01 13:28:59 -07:00
bors
625d5a693e Auto merge of #85829 - bjorn3:simplify_crate_num, r=jackh726
Remove CrateNum::ReservedForIncrCompCache

It's only use is easily replaceable with `Option<CrateNum>`.
2021-06-01 20:09:03 +00:00
Camille GILLOT
93b25bd293 Make trait_map an Option. 2021-06-01 21:59:48 +02:00
Camille GILLOT
b51f24f021 Make the reasoning more explicit. 2021-06-01 21:46:30 +02:00
Camille GILLOT
3a6d5c2beb Avoid creating anonymous nodes with zero or one dependency. 2021-06-01 21:43:30 +02:00
Tilmann Meyer
965997b369
Support Android ndk versions r23-beta3 and up
Since android ndk version `r23-beta3`, `libgcc` has been replaced with
`libunwind`. This moves the linking of `libgcc`/`libunwind` into the
`unwind` crate where we check if the system compiler can find
`libunwind` and fall back to `libgcc` if needed.
2021-06-01 21:37:50 +02:00
Guillaume Gomez
98a9b02e92 Don't generate impl-items div container if there is none 2021-06-01 21:36:03 +02:00
Tilmann Meyer
971a3f15f0
Update compiler_builtins to 0.1.44 2021-06-01 21:32:29 +02:00