Commit Graph

196757 Commits

Author SHA1 Message Date
Matthias Krüger
7b0360e516
Rollup merge of #98771 - Thog:rust-lld-apple-target, r=petrochenkov
Add support for link-flavor rust-lld for iOS, tvOS and watchOS

This adds support for rust-lld for Apple *OS targets.

This was tested against targets ``aarch64-apple-ios`` and ``aarch64-apple-ios-sim`` with [a simple test program](https://github.com/Thog/rust-lld-apple-target_test).

It currently doesn't work with targets ``armv7-apple-ios`` and ``armv7s-apple-ios`` because of ``symbols.o`` not being generated with the correct CPU subtype. This will require changes in the ``object`` crate to expose an API.

As ``ld64.lld`` requires ``-platform_version`` with the minimal version supported and an sdk version, I made ``rustc_target::apple_base`` public to get access to ``*os_deployment_target``  helper functions and also added ``tvos_deployment_target`` as it was missing.
2022-08-03 22:29:25 +02:00
Eric Huss
bc65aaea78 Update cargo 2022-08-03 12:57:28 -07:00
bors
1b57946a40 Auto merge of #100088 - RalfJung:anyhow, r=Mark-Simulacrum
update anyhow

Fixes https://github.com/rust-lang/rust/issues/100062 by incorporating https://github.com/dtolnay/anyhow/pull/249
2022-08-03 19:34:24 +00:00
Ivan Markov
e86c128aa3 FilesTimes support does not build for ESP-IDF 2022-08-03 19:30:23 +00:00
Nicholas Bishop
34537b46be Bump cc version in bootstrap
Among other changes, the newer cc release pulls in this fix:
b2792e33ff

This fixes errors when building compiler_builtins for UEFI targets.
2022-08-03 13:32:27 -04:00
Camille GILLOT
6eb0c89f6b Bless ui tests. 2022-08-03 19:14:29 +02:00
Camille GILLOT
845009d071 Only fetch HIR for naked functions that have the attribute. 2022-08-03 19:14:29 +02:00
Esteban Küber
939c2b6313 Provide suggestion on missing let in binding statement
Fix #78907.
2022-08-03 09:29:29 -07:00
bors
d6b96b61e7 Auto merge of #100064 - RalfJung:disaligned, r=petrochenkov
fix is_disaligned logic for nested packed structs

https://github.com/rust-lang/rust/pull/83605 broke the `is_disaligned` logic by bailing out of the loop in `is_within_packed` early. This PR fixes that problem and adds suitable tests.

Fixes https://github.com/rust-lang/rust/issues/99838
2022-08-03 16:09:56 +00:00
mary
78bbe57c88 Add support for link-flavor rust-lld for iOS, tvOS and watchOS
This adds support for rust-lld for Apple *OS targets.

This was tested against targets "aarch64-apple-ios" and "aarch64-apple-ios-sim".

For targets "armv7-apple-ios" and "armv7s-apple-ios", it doesn't link because of
"symbols.o" not being generated with the correct CPU subtype (changes in
the "object" crate needs to be done to support it).
2022-08-03 15:41:05 +00:00
Ralf Jung
9097ce9054 fix is_disaligned logic for nested packed structs 2022-08-03 09:59:08 -04:00
bors
04f72f9538 Auto merge of #100023 - saethlin:send-sync-chunksmut, r=m-ou-se
Add back Send and Sync impls on ChunksMut iterators

Fixes https://github.com/rust-lang/rust/issues/100014

These were accidentally removed in #94247 because the representation was changed from `&mut [T]` to `*mut T`, which has `!Send + !Sync`.
2022-08-03 13:17:58 +00:00
klensy
0548e8ed06 fix trailing whitespace in error message 2022-08-03 15:46:34 +03:00
bors
7308c22c6a Auto merge of #100100 - Dylan-DPC:rollup-llcaaq8, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #99371 (Remove synchronization from Windows `hashmap_random_keys`)
 - #99614 (do not claim that transmute is like memcpy)
 - #99738 (rustdoc: avoid inlining modules with duplicate names)
 - #99800 (Fix futex module imports on wasm+atomics)
 - #100079 (Replace `* -> vec` with `-> vec` in docs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-08-03 10:26:01 +00:00
Fabian Wolff
e3c7e04a44 Warn about dead tuple struct fields 2022-08-03 12:17:23 +02:00
Takayuki Maeda
b5e1ac721f add regression test for #90871 2022-08-03 18:51:21 +09:00
Ali MJ Al-Nasrawy
78adc0139c cosmetic changes 2022-08-03 12:46:04 +03:00
Guillaume Gomez
3a6093ebca remove Clean trait implementation for hir::IsAuto 2022-08-03 11:39:09 +02:00
Guillaume Gomez
a72e96c427 remove Clean trait implementation for ty::Region 2022-08-03 11:39:05 +02:00
b-naber
1405ce35ac fix typo 2022-08-03 11:04:10 +02:00
topjohnwu
6f87b7500a Set llvm configs when building lld 2022-08-03 01:54:24 -07:00
Dylan DPC
e92b2415aa
Rollup merge of #100079 - camelid:fix-doc-star-search, r=Dylan-DPC
Replace `* -> vec` with `-> vec` in docs

Fixes #100078.

Rustdoc's current syntax is `-> vec`.
2022-08-03 13:45:53 +05:30
Dylan DPC
8d465cc551
Rollup merge of #99800 - sandydoo:bugfix/wasm-futex, r=m-ou-se
Fix futex module imports on wasm+atomics

The futex modules were rearranged a bit in #98707, which meant that wasm+atomics would no longer compile on nightly. I don’t believe any other targets were impacted by this.
2022-08-03 13:45:52 +05:30
Dylan DPC
acf691234f
Rollup merge of #99738 - notriddle:notriddle/multiple-modules-w-same-name, r=camelid
rustdoc: avoid inlining modules with duplicate names

Fixes rust-lang/rust#99734
2022-08-03 13:45:51 +05:30
Dylan DPC
cb9932ea64
Rollup merge of #99614 - RalfJung:transmute-is-not-memcpy, r=thomcc
do not claim that transmute is like memcpy

Saying transmute is like memcpy is not a well-formed statement, since memcpy is by-ref whereas transmute is by-val. The by-val nature of transmute inherently means that padding is lost along the way. (This is not specific to transmute, this is how all by-value operations work.) So adjust the docs to clarify this aspect.

Cc `@workingjubilee`
2022-08-03 13:45:50 +05:30
Dylan DPC
5730f12b37
Rollup merge of #99371 - ChrisDenton:simplify-gen-random-keys, r=thomcc
Remove synchronization from Windows `hashmap_random_keys`

Unfortunately using synchronization when generating hashmap keys can prevent it being used in `DllMain`.

~~Fixes #99341~~
2022-08-03 13:45:49 +05:30
Jack Huey
955fcad758 Add bound_impl_subject and bound_return_ty 2022-08-03 01:02:46 -04:00
bors
e141246cbb Auto merge of #100082 - matthiaskrgr:rollup-ywu4iux, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #99933 (parallelize HTML checking tool)
 - #99958 (Improve position named arguments lint underline and formatting names)
 - #100008 (Update all pre-cloned submodules on startup)
 - #100049 (⬆️ rust-analyzer)
 - #100070 (Clarify Cargo.toml comments)
 - #100074 (rustc-docs: Be less specific about the representation of `+bundle`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-08-03 04:50:42 +00:00
yukang
4a5e83c939 fix tidy 2022-08-03 12:19:21 +08:00
Jack Huey
96a69dce2c Change sized_constraints to return EarlyBinder 2022-08-03 00:14:24 -04:00
yukang
0d1b832667 check link ordinal make sure target is foreign function 2022-08-03 11:30:27 +08:00
hdelc
2be00947bf Add items to DocAliasBadLocation check error match arm
- Added `Impl`, `Closure`, ForeignMod` targets
- `Target::name` changed for `Target::Impl`
- Error output for `Target::ForeignMod` changed to "foreign module"
2022-08-02 23:11:22 -04:00
Eric Huss
39358bf00c Update rls 2022-08-02 20:08:30 -07:00
Jack Huey
e21624dc80 Add bound_predicates_of and bound_explicit_predicates_of 2022-08-02 22:44:08 -04:00
Takayuki Maeda
a0a2ec3326 add tests for Debug formatters and precision formatters 2022-08-03 11:28:00 +09:00
Ralf Jung
2bde0e7bbc update anyhow 2022-08-02 22:14:48 -04:00
Takayuki Maeda
4233a13ceb suggest a positional formatting argument instead of a captured argument 2022-08-03 11:12:31 +09:00
Jakob Degen
efa5eaa5d1 Avoid invalidating the CFG in MirPatch.
As a part of this change, we adjust MirPatch to not needlessly create unnecessary resume blocks.
2022-08-02 18:57:54 -07:00
bors
b759b2efad Auto merge of #99509 - lcnr:commit_unconditionally, r=jackh726
remove `commit_unconditionally`

`commit_unconditionally` is a noop unless we somehow inspect the current state of our snapshot. The only thing which does that is the leak check which was only used in one place where `commit_if_ok` is probably at least as, or even more, correct.

r? rust-lang/types
2022-08-03 01:55:20 +00:00
Michael Goulet
16a3601f62 Delay a bug when failed to normalize trait ref during specialization 2022-08-03 01:37:02 +00:00
Ralf Jung
da3e11fc42 wordsmithing 2022-08-02 20:43:48 -04:00
Eric Huss
c627d402b4 Remove CARGO_TEST_DISABLE_GIT_CLI
This was a leftover from the Appveyor days.
2022-08-02 16:59:35 -07:00
Eric Huss
05bdd9633b Update cargo 2022-08-02 16:59:30 -07:00
Daniel Sommermann
9cf556dca9 Fix backwards-compatibility check for tests with +whole-archive
Fixes #100066
2022-08-02 15:47:18 -07:00
Michael Howell
8724ca3114 rustdoc: avoid inlining foreigns with duplicate names 2022-08-02 14:48:23 -07:00
bors
e4417cf020 Auto merge of #92268 - jswrenn:transmute, r=oli-obk
Initial implementation of transmutability trait.

*T'was the night before Christmas and all through the codebase, not a miri was stirring — no hint of `unsafe`!*

This PR provides an initial, **incomplete** implementation of *[MCP 411: Lang Item for Transmutability](https://github.com/rust-lang/compiler-team/issues/411)*. The `core::mem::BikeshedIntrinsicFrom` trait provided by this PR is implemented on-the-fly by the compiler for types `Src` and `Dst` when the bits of all possible values of type `Src` are safely reinterpretable as a value of type `Dst`.

What this PR provides is:
- [x] [support for transmutations involving primitives](https://github.com/jswrenn/rust/tree/transmute/src/test/ui/transmutability/primitives)
- [x] [support for transmutations involving arrays](https://github.com/jswrenn/rust/tree/transmute/src/test/ui/transmutability/arrays)
- [x] [support for transmutations involving structs](https://github.com/jswrenn/rust/tree/transmute/src/test/ui/transmutability/structs)
- [x] [support for transmutations involving enums](https://github.com/jswrenn/rust/tree/transmute/src/test/ui/transmutability/enums)
- [x] [support for transmutations involving unions](https://github.com/jswrenn/rust/tree/transmute/src/test/ui/transmutability/unions)
- [x] [support for weaker validity checks](https://github.com/jswrenn/rust/blob/transmute/src/test/ui/transmutability/unions/should_permit_intersecting_if_validity_is_assumed.rs) (i.e., `Assume::VALIDITY`)
- [x] visibility checking

What isn't yet implemented:
- [ ] transmutability options passed using the `Assume` struct
- [ ] [support for references](https://github.com/jswrenn/rust/blob/transmute/src/test/ui/transmutability/references.rs)
- [ ] smarter error messages

These features will be implemented in future PRs.
2022-08-02 21:17:31 +00:00
Matthias Krüger
e20f7f83c0
Rollup merge of #100074 - petrochenkov:bundledoc, r=bjorn3
rustc-docs: Be less specific about the representation of `+bundle`

For https://github.com/rust-lang/rust/issues/99429.
r? `@bjorn3`
2022-08-02 23:07:49 +02:00
Matthias Krüger
7a6f461673
Rollup merge of #100070 - mqudsi:99768_revisited, r=RalfJung
Clarify Cargo.toml comments

Existing comments were left in an incoherent state after #99768.

r? `@RalfJung`
2022-08-02 23:07:48 +02:00
Matthias Krüger
a15500cdf0
Rollup merge of #100049 - lnicola:rust-analyzer-2022-08-02, r=lnicola
⬆️ rust-analyzer

r? `@ghost`
2022-08-02 23:07:47 +02:00
Matthias Krüger
4fbe53f70b
Rollup merge of #100008 - jyn514:eager-submodules, r=bjorn3
Update all pre-cloned submodules on startup

Fixes https://github.com/rust-lang/rust/issues/99083
2022-08-02 23:07:46 +02:00