Michael Goulet
6f27876f62
Use OpaqueTypeKey in query response
2023-05-10 23:41:06 +00:00
Michael Goulet
6509c42d16
Use proper impl self type for alias impl in rustdoc
2023-05-10 22:49:05 +00:00
bors
c56dd3d4c0
Auto merge of #10766 - samueltardieu:issue-10710, r=Manishearth
...
needless_bool: do not simplify code if it loses comments
Fix #10710
changelog: [`needless_bool`]: do not simplify code if it loses comments
2023-05-10 21:20:33 +00:00
bors
9a767b6b9e
Auto merge of #110820 - cjgillot:faster-dcp, r=oli-obk
...
Optimize dataflow-const-prop place-tracking infra
Optimization opportunities found while investigating https://github.com/rust-lang/rust/pull/110719
Computing places breadth-first ensures that we create short projections before deep projections, since the former are more likely to be propagated.
The most relevant is the pre-computation of flooded places. Callgrind showed `flood_*` methods and especially `preorder_preinvoke` were especially hot. This PR attempts to pre-compute the set of `ValueIndex` that `preorder_invoke` would visit.
Using this information, we make some `PlaceIndex` inaccessible when they contain no `ValueIndex`, allowing to skip computations for those places.
cc `@jachris` as original author
2023-05-10 20:54:31 +00:00
clubby789
a348f8aea5
Generate shell completions for bootstrap with Clap
2023-05-10 21:41:38 +01:00
Scott McMurray
15aa7fad7e
Simplify the implementation of iterators over slices of ZSTs
...
Currently, slice iterators over ZSTs store `end = start.wrapping_byte_add(len)`.
That's slightly convenient for `is_empty`, but kinda annoying for pretty much everything else -- see bugs like 42789, for example.
This PR instead changes it to just `end = ptr::invalid(len)` instead.
That's easier to think about (IMHO, at least) as well as easier to represent.
2023-05-10 13:01:43 -07:00
Camille GILLOT
a2fe9935ea
Only warn single-use lifetime when the binders match.
2023-05-10 19:49:02 +00:00
Camille GILLOT
9fb1c73a73
Avoid shadowing.
2023-05-10 19:23:01 +00:00
Camille GILLOT
aeac555578
Do not see through copies of mutable pointers.
2023-05-10 19:22:57 +00:00
Camille GILLOT
d0d4e0237f
Iteratively replace pointers.
2023-05-10 19:22:54 +00:00
Samuel "Sam" Tardieu
c5d4b04dd5
needless_bool: do not simplify code if it loses comments
2023-05-10 21:19:24 +02:00
bors
d2ea42fad3
Auto merge of #2879 - saethlin:measureme, r=RalfJung
...
Include the current Crate name in the measureme output name
See https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/measureme.20flamegraph.20panics/near/356367013
cc `@andjo403`
Currently, attempting to use `MIRIFLAGS=-Zmiri-measureme=miri cargo miri test` on a crate with multiple test targets (which is very common) will produce a corrupted measureme output file, because the various interpreter processes will stomp each other's output.
This change does not entirely prevent this, but the various test targets seem to always have different crate names, so if nothing else this will make the broken measureme files much harder to encounter by accident, while also making it clear what they are all for.
2023-05-10 19:03:17 +00:00
Urgau
35e5aac5c8
Drop uplifted clippy::forget_copy
2023-05-10 19:36:02 +02:00
Urgau
e280df556d
Add note to suggest using let _ = x
to ignore the value
2023-05-10 19:36:02 +02:00
Urgau
d23f8957ae
Improve warning message by saying that it "does nothing"
2023-05-10 19:36:02 +02:00
Urgau
457fa953a2
Use label instead of note to be more consistent with other lints
2023-05-10 19:36:02 +02:00
Urgau
77773ad002
Allow the drop_copy lint in some library examples
2023-05-10 19:36:02 +02:00
Urgau
61ff2718f7
Adjust tests for new drop and forget lints
2023-05-10 19:36:02 +02:00
Urgau
3f81b6b8a2
Drop uplifted clippy::forget_copy
2023-05-10 19:36:02 +02:00
Urgau
22688fc91f
Drop uplifted clippy::forget_ref
2023-05-10 19:36:01 +02:00
Urgau
971b9b23b5
Uplift clippy::forget_copy to rustc
2023-05-10 19:36:01 +02:00
Urgau
551f6e6154
Drop uplifted clippy::drop_copy
2023-05-10 19:36:01 +02:00
Urgau
cf6d2272c5
Drop uplifted clippy::forget_ref
2023-05-10 19:36:01 +02:00
Urgau
6af0359f2a
Drop uplifted clippy::drop_ref
2023-05-10 19:36:01 +02:00
Urgau
1ef9c163aa
Uplift clippy::forget_ref to rustc
2023-05-10 19:36:01 +02:00
Urgau
bbb24ce3da
Drop uplifted clippy::drop_copy
2023-05-10 19:36:01 +02:00
Urgau
156f5563c7
Uplift clippy::drop_copy to rustc
2023-05-10 19:36:01 +02:00
Urgau
3d1940d02e
Drop uplifted clippy::drop_ref
2023-05-10 19:36:01 +02:00
Urgau
28cdbc2a64
Uplift clippy::drop_ref to rustc
2023-05-10 19:36:01 +02:00
Urgau
7dab6094bb
Remove useless drop of copy type
2023-05-10 19:36:01 +02:00
Urgau
d36e390d81
Remove and fix useless drop of reference
2023-05-10 19:36:01 +02:00
Ben Kimock
f9a4213968
Explain the padding
2023-05-10 13:27:31 -04:00
Camille GILLOT
b64e9113e2
Add test.
2023-05-10 17:21:35 +00:00
b-naber
e7a2f52ba1
don't inline polymorphic adt instances whose fields contain projections
...
in DropGlue.
2023-05-10 16:03:52 +00:00
b-naber
7871bec7aa
add test
2023-05-10 16:03:46 +00:00
Camille GILLOT
6ad0497cc0
Use visit_assign to detect SSA locals.
2023-05-10 15:26:51 +00:00
bohan
7c1bc0353b
refactor(resolve): clean up the early error return caused by non-call
2023-05-10 22:35:01 +08:00
Jubilee Young
852762563a
Temp fix for swizzle_dyn
...
- disable the AVX512 variant for now (flaky)
- tell Clippy to knock it off
2023-05-10 06:49:00 -07:00
Jubilee Young
d361e4335f
Drop const_ptr_read feature gate
2023-05-10 06:49:00 -07:00
Jubilee Young
8f50a17c37
Fixups for sync
...
- Fix LANES over-replace
- Bring in traits
- Use less inference-heavy types
2023-05-10 06:49:00 -07:00
Augie Fackler
fbe479558c
vec-shrink-panik: update expectations to work on LLVM 17
...
For some reason, the called function is `cleanup` on LLVM 17 instead of
`filter`.
r? @Amanieu
2023-05-10 09:31:33 -04:00
bors
cba14074bb
Auto merge of #111401 - ChrisDenton:no-windows-allowed, r=workingjubilee
...
Don't force include Windows goop when documenting
Why do we need to include all the windows bits on non-windows platforms? Let's try not doing that.
Possible alternative to #111394 , if it works.
2023-05-10 10:28:38 +00:00
bors
7a41eacf17
Auto merge of #2885 - RalfJung:rustup, r=RalfJung
...
Rustup
2023-05-10 07:39:31 +00:00
Ralf Jung
68c7d2083f
disable opt-level 4 tests for now
2023-05-10 09:39:13 +02:00
Obei Sideg
2198faeee2
Make NonUseContext::AscribeUserTy
carry ty::Variance
2023-05-10 09:54:56 +03:00
bors
25444e5a2e
Auto merge of #111414 - matthiaskrgr:rollup-q0qoc47, r=matthiaskrgr
...
Rollup of 6 pull requests
Successful merges:
- #110673 (Make alias bounds sound in the new solver (take 2))
- #110747 (Encode types in SMIR)
- #111095 (Correctly handle associated items of a trait inside a `#[doc(hidden)]` item)
- #111381 (Keep encoding attributes for closures)
- #111408 (Fix incorrect implication of transmuting slices)
- #111410 (Switch to `EarlyBinder` for `thir_abstract_const` query)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2023-05-10 06:53:47 +00:00
Ralf Jung
96491a9c57
fmt
2023-05-10 08:53:06 +02:00
Ralf Jung
efa68d02d2
Merge from rustc
2023-05-10 08:31:30 +02:00
Ralf Jung
53801d3f08
Preparing for merge from rustc
2023-05-10 08:31:22 +02:00
bors
7fb4332ce4
Auto merge of #2865 - Vanille-N:tb-perf, r=RalfJung
...
Thorough merge after GC: fix of #2863
Context: #2863 .
`perf report`s of `MIRIFLAGS=-Zmiri-tree-borrows cargo +miri miri test test_invalid_name_lengths` in crate `http`:
### Pre
```
91.06% rustc miri [.] miri::borrow_tracker::tree_borrows::tree::Tree::keep_only_needed
2.99% rustc miri [.] miri::borrow_tracker::tree_borrows::tree::TreeVisitor::traverse_parents_this
0.91% rustc miri [.] miri::borrow_tracker::tree_borrows::tree::Tree::perform_access
0.62% rustc miri [.] miri::range_map::RangeMap<T>::iter_mut
0.17% rustc libc.so.6 [.] realloc
0.14% rustc miri [.] miri::concurrency:🧵 :EvalContextExt::run_threads
0.13% rustc miri [.] rustc_const_eval::interpret::operand::<impl rustc_const_eval::interpret::eva
0.13% rustc miri [.] hashbrown::raw::RawTable<T,A>::remove_entry
0.10% rustc miri [.] miri::intptrcast::GlobalStateInner::alloc_base_addr
0.08% rustc librustc_driver-c82c1dc22c817a10.so [.] <rustc_middle::mir::Body>::source_info
```
Interrupted after 3min 30s.
### Post
```
20.75% rustc miri [.] miri::borrow_tracker::tree_borrows::tree::TreeVisitor::traverse_parents_this
18.50% rustc miri [.] miri::borrow_tracker::tree_borrows::tree::Tree::keep_only_needed
6.49% rustc miri [.] miri::borrow_tracker::tree_borrows::tree::Tree::perform_access
4.25% rustc miri [.] miri::range_map::RangeMap<T>::iter_mut
1.91% rustc libc.so.6 [.] realloc
1.79% rustc miri [.] miri::concurrency:🧵 :EvalContextExt::run_threads
1.40% rustc miri [.] rustc_const_eval::interpret::operand::<impl rustc_const_eval::interpret::eva
1.40% rustc miri [.] miri::range_map::RangeMap<T>::merge_adjacent_thorough
1.34% rustc miri [.] miri::intptrcast::GlobalStateInner::alloc_base_addr
0.90% rustc librustc_driver-c82c1dc22c817a10.so [.] <rustc_middle::ty::context::CtxtInterners>::intern_ty
```
Terminates after 1min 13s.
No significant changes to `./miri bench` in either direction: on small benches not enough garbage accumulates for this to be relevant.
2023-05-10 06:30:26 +00:00