oxalica
10f870eff4
Impl entry-API for la_arena::ArenaMap
...
We enforce integral and `Copy` key, so some key-related functions are
not necessary since user can just reuse the index for the `entry` call.
2022-08-03 18:31:52 +08: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
f232402057
Warn about dead tuple struct fields
2022-08-03 12:17:23 +02: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
oxalica
c203ac2cf5
Add more constructors for la-arena
2022-08-03 17:44:06 +08: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
bors
5dc90a1b6d
Auto merge of #9282 - macovedj:clone-on-copy-try-precedence, r=flip1995
...
add paren before '?' when suggesting deref for clone_on_copy
changelog: none
fixes #9277
2022-08-03 07:37:43 +00:00
Michael Goulet
603ffebd37
Skip over structs with no private fields that impl Deref
2022-08-03 07:02:56 +00:00
Michael Goulet
2a3fd5053f
Don't suggest field method if it's just missing some bounds
2022-08-03 07:01:49 +00:00
Michael Goulet
4df6cbe96f
Consider privacy more carefully when suggesting accessing fields
2022-08-03 06:51:26 +00:00
bors
a02b042ae7
Auto merge of #12930 - lnicola:subtree-branch, r=lnicola
...
minor: Use the release branch in xtask promote
2022-08-03 06:49:13 +00:00
Laurențiu Nicola
9a447c04f6
Use the release branch in xtask promote
2022-08-03 09:48:44 +03:00
Michael Goulet
9cf570995c
Suggest expressions' fields even if they're not ADTs
2022-08-03 06:28:45 +00:00
Jack Huey
955fcad758
Add bound_impl_subject and bound_return_ty
2022-08-03 01:02:46 -04:00
lengyijun
b50ba06a83
fix typo in tests/ui/redundant_allocation.rs
2022-08-03 04:57:36 +00: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
Theodore Dubois
53a870c506
Stabilize backtrace
2022-08-02 16:21:20 -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
Matthias Krüger
82feb4996c
Rollup merge of #99958 - PrestonFrom:issue_99907, r=compiler-errors
...
Improve position named arguments lint underline and formatting names
For named arguments used as implicit position arguments, underline both
the opening curly brace and either:
* if there is formatting, the next character (which will either be the
closing curl brace or the `:` denoting the start of formatting args)
* if there is no formatting, the entire arg span (important if there is
whitespace like `{ }`)
This should make it more obvious where the named argument should be.
Additionally, in the lint message, emit the formatting argument names
without a dollar sign to avoid potentially confusion.
Fixes #99907
2022-08-02 23:07:45 +02:00