Commit Graph

228643 Commits

Author SHA1 Message Date
David Wood
2227422920
lint: refactor to make logic a bit cleaner
Signed-off-by: David Wood <david@davidtw.co>
2023-07-03 14:29:04 +01:00
David Wood
f1e287948b
lint: stop normalizing types to avoid recur limits
This was causing compilation failures in the
performance benchmarking as diesel hit recursion
limits.

Signed-off-by: David Wood <david@davidtw.co>
2023-07-03 14:12:20 +01:00
David Wood
9137fea30d
lint/ctypes: check other types for ext. fn-ptr ty
Extend previous checks for external ABI fn-ptrs to use in internal
statics, constants, type aliases and algebraic data types.

Signed-off-by: David Wood <david.wood@huawei.com>
2023-07-03 13:40:20 +01:00
David Wood
c75b080d7d
lint/ctypes: multiple external fn-ptrs in ty
Extend previous commit's support for checking for external fn-ptrs in
internal fn types to report errors for multiple found fn-ptrs.

Signed-off-by: David Wood <david.wood@huawei.com>
2023-07-03 13:40:20 +01:00
David Wood
eddfce53c1
abi: avoid ice for non-ffi-safe fn ptrs
Remove an `unwrap` that assumed FFI-safe types in foreign fn-ptr types.

Signed-off-by: David Wood <david.wood@huawei.com>
2023-07-03 13:40:20 +01:00
David Wood
e3f90bca50
lint/ctypes: ext. abi fn-ptr in internal abi fn
Instead of skipping functions with internal ABIs, check that the
signature doesn't contain any fn-ptr types with external ABIs that
aren't FFI-safe.

Signed-off-by: David Wood <david.wood@huawei.com>
2023-07-03 13:40:20 +01:00
bors
737b461555 Auto merge of #113086 - lcnr:rust8, r=compiler-errors
implement deep normalization via the new solver

together with #112869 this should remove all uses of the old solver with `-Ztrait-solver=next`.

see https://hackmd.io/V0qsUB_fTxexfQO_pcOcrg for a description of this PR. Will move that doc to the `rustc-dev-guide` after merging this.

r? `@compiler-errors`
2023-07-03 07:38:26 +00:00
lcnr
be6a344365 rebase 2023-07-03 09:24:02 +02:00
lcnr
30ed152330 update tests 2023-07-03 09:12:15 +02:00
lcnr
412c6e0b07 review 2023-07-03 09:12:15 +02:00
lcnr
a2dfed6711 deeply_normalize pass in fulfill cx for old solver 2023-07-03 09:12:15 +02:00
lcnr
5378f07d64 use deeply_normalize for assumed_wf_types 2023-07-03 09:12:14 +02:00
lcnr
d2c7449189 add a try_structurally_resolve_type in coerce 2023-07-03 09:12:14 +02:00
lcnr
42067596c2 add deep normalization via the new solver 2023-07-03 09:12:14 +02:00
lcnr
4d42de6d1b add instrument to register_predicate_obligation 2023-07-03 09:12:14 +02:00
lcnr
bd0d533d23 fix structurally relate for weak aliases 2023-07-03 09:12:14 +02:00
lcnr
8ebb3d49e4 rename structurally_resolved_type 2023-07-03 09:12:14 +02:00
bors
1623634aa5 Auto merge of #113271 - matthiaskrgr:rollup-2ik4vaj, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #113253 (Fixed documentation of from<CString> for Rc<CStr>: Arc -> Rc)
 - #113258 (Migrate GUI colors test to original CSS color format)
 - #113259 (Suggest `x build library` for a custom toolchain that fails to load `core`)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-07-03 05:07:26 +00:00
bors
d5a74249c8 Auto merge of #112882 - DrMeepster:new_un_derefer, r=oli-obk
Rewrite `UnDerefer`

Currently, `UnDerefer` is used by drop elaboration to undo the effects of the `Derefer` pass. However, it just recreates the original places with derefs in the middle of the projection. Because `ProjectionElem::Deref` is intended to be removed completely in the future, this will not work forever.

This PR introduces a `deref_chain` method that returns the places behind `DerefTemp` locals in a place and rewrites the move path code to use this. In the process, `UnDerefer` was merged into `MovePathLookup`. Now that move paths use the same places as in the MIR, the other uses of `UnDerefer` no longer require it.

See #98145
cc `@ouz-a`
r? `@oli-obk`
2023-07-03 02:46:39 +00:00
bors
571c9fc8a9 Auto merge of #113176 - workingjubilee:backtrace-0.3.68, r=thomcc
Backtrace 0.3.68

Uptakes these releases:
- https://github.com/rust-lang/backtrace-rs/releases/tag/0.3.68

r? `@thomcc`
2023-07-03 00:21:29 +00:00
Jubilee Young
079949da8e Update std to backtrace 0.3.68
Dedup addr2line, miniz_oxide, object in .lock
2023-07-02 17:02:45 -07:00
Matthias Krüger
1366ad36a6
Rollup merge of #113259 - MU001999:diag/add-std, r=Nilstrieb
Suggest `x build library` for a custom toolchain that fails to load `core`

Fixes #113222

r? `@jyn514`
2023-07-02 23:30:47 +02:00
Matthias Krüger
0aac35db10
Rollup merge of #113258 - GuillaumeGomez:migrate-gui-test-color-19, r=notriddle
Migrate GUI colors test to original CSS color format

Follow-up of https://github.com/rust-lang/rust/pull/111459.

r? `@notriddle`
2023-07-02 23:30:46 +02:00
Matthias Krüger
023f72ad5b
Rollup merge of #113253 - nurmukhametdaniyar:rc_from_cstr_doc_fix, r=Nilstrieb
Fixed documentation of from<CString> for Rc<CStr>: Arc -> Rc

Fix #113131
2023-07-02 23:30:46 +02:00
bors
839e9a6e12 Auto merge of #113046 - Nilstrieb:update, r=Mark-Simulacrum
cargo update

#112865 with the tidy exemptions and tracing and syn 2 not upgraded

Additional deps:
equivalent: indexmap
errno: through rustix
errno-dragonfly: errno
nu-ansi-term: tracing
overload: nu-ansi-term

r? Mark-Simulacrum
2023-07-02 21:24:26 +00:00
Nilstrieb
1e5d8fbcc9 downgrade compiler_builtins
The outline-atomics support in compiler_builtins messed up and wasn't limited to linux only.
https://github.com/rust-lang/compiler-builtins/pull/532/files#r1249354225
2023-07-02 21:02:31 +02:00
Nilstrieb
fd49b1d37f Downgrade rustix
See https://github.com/rust-lang/rust/pull/113046#issuecomment-1616094626.
2023-07-02 21:02:31 +02:00
Nilstrieb
171be8ce94 Downgrade tracing and syn
There's currently a deadlock with tracing when RUSTC_LOG is enabled.
Downgrade tracing-core for now to avoid blocking the other updates.

syns upgrades cause some nontrivial changes in the diagnostics derive tests,
which are best dealt with in another PR.
2023-07-02 21:02:31 +02:00
bors
bf0e22b298 Auto merge of #108537 - GuillaumeGomez:rustdoc-search-whitespace-as-separator, r=notriddle
rustdoc: Allow whitespace as path separator like double colon

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

I think it makes sense since it allows more common cases, however it also makes the syntax heavier. Not sure what the rest of the team thinks about it. In any case we'll need to go through FCP.

Full explanation for the changes is available [here](https://github.com/rust-lang/rust/pull/108537#issuecomment-1589480564).

r? `@notriddle`
2023-07-02 18:49:29 +00:00
Nilstrieb
3295cdfff4 cargo update
Additional deps:
equivalent: indexmap
nu-ansi-term: tracing
overload: nu-ansi-term
2023-07-02 20:41:03 +02:00
bors
32d81eccd6 Auto merge of #113260 - flip1995:clippyup, r=Manishearth
Update Clippy

r? `@Manishearth`

cc `@oli-obk` (for the ui-test changes in de69d556eb and the valtree fix in 0cbe963e51)

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

This must've been the most involved Clippy sync ever.
2023-07-02 15:14:59 +00:00
Philipp Krones
a6d3c82360
Update Cargo.lock 2023-07-02 15:07:47 +02:00
Philipp Krones
de69d556eb
Fix compile-test tests to work with the new ui_test crate 2023-07-02 15:07:39 +02:00
Philipp Krones
0cbe963e51
Fix valtree changes 2023-07-02 14:59:44 +02:00
Philipp Krones
beb0e731de
Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
bors
131a03664e Auto merge of #113040 - Kobzol:llvm-remark-streamer, r=tmiasko
Add `-Zremark-dir` unstable flag to write LLVM optimization remarks to YAML

This PR adds an option for `rustc` to emit LLVM optimization remarks to a set of YAML files, which can then be digested by existing tools, like https://github.com/OfekShilon/optview2. When `-Cremark-dir` is passed, and remarks are enabled (`-Cremark=all`), the remarks will be now written to the specified directory, **instead** of being printed to standard error output.  The files are named based on the CGU from which they are being generated.

Currently, the remarks are written using the LLVM streaming machinery, directly in the diagnostics handler. It seemed easier than going back to Rust and then form there back to C++ to use the streamer from the diagnostics handler. But there are many ways to implement this, of course, so I'm open to suggestions :)

I included some comments with questions into the code. Also, I'm not sure how to test this.

r? `@tmiasko`
2023-07-02 12:48:44 +00:00
Jakub Beránek
62728c7aaf
Add rustc option to output LLVM optimization remarks to YAML files 2023-07-02 13:41:36 +02:00
bors
4c3f8c728b Auto merge of #113256 - matthiaskrgr:rollup-poex8w2, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #113147 (Fix document examples of Vec::from_raw_parts and Vec::from_raw_parts_in)
 - #113202 (std docs: factorize literal in Barrier example)
 - #113228 (Migrate GUI colors test to original CSS color format)
 - #113231 (Fix `dropping_copy_types` lint from linting in match-arm with side-effects)
 - #113233 (Update chalk)
 - #113234 (Don't pass --test-args to `python -m unitest`)
 - #113244 (Make Rust Analyzer tests faster by compiling less code)
 - #113249 (Document tracking issue for rustdoc `show-type-layout`)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-07-02 10:22:49 +00:00
Mu001999
b913f5593d Suggest x build library for a custom toolchain that fails to load core 2023-07-02 17:53:44 +08:00
Guillaume Gomez
c7847e991a Migrate GUI colors test to original CSS color format 2023-07-02 11:15:23 +02:00
Matthias Krüger
fde41023db
Rollup merge of #113249 - tgross35:patch-2, r=jyn514
Document tracking issue for rustdoc `show-type-layout`

Tracking issue: https://github.com/rust-lang/rust/issues/113248

``@rustbot`` label +T-rustdoc +A-docs
2023-07-02 10:27:23 +02:00
Matthias Krüger
efd2739ac4
Rollup merge of #113244 - Kobzol:bootstrap-rust-analyzer-tests, r=jyn514
Make Rust Analyzer tests faster by compiling less code

This should bring down the test duration of RA significantly.
2023-07-02 10:27:22 +02:00
Matthias Krüger
a353cb0cd8
Rollup merge of #113234 - jyn514:revert-python-test-args, r=clubby789
Don't pass --test-args to `python -m unitest`

The args for unittest and cargo test are mutually incompatible. Suggest that people use `python -m unittest ...` manually instead.

This also changes `bootstrap_test.py` to be easier to run standalone; see the commit for details.

r? `@clubby789` cc https://github.com/rust-lang/rust/pull/112281#discussion_r1248849172
2023-07-02 10:27:22 +02:00
Matthias Krüger
fda22efbf0
Rollup merge of #113233 - Nilstrieb:chaaalk, r=jackh726
Update chalk

For #109302

r? jackh726
2023-07-02 10:27:21 +02:00
Matthias Krüger
74a272d3d7
Rollup merge of #113231 - Urgau:fix_false_positive_drop_copy, r=Nilstrieb
Fix `dropping_copy_types` lint from linting in match-arm with side-effects

This PR fixes an issue with the `dropping_copy_types` and `dropping_references` lints when not all patterns that can have side-effects were detected and ignored.

Nearly _fixes_ https://github.com/rust-lang/rust/issues/112653 (will need beta-backport to completely fix the issue)
r? ``@Nilstrieb``
2023-07-02 10:27:21 +02:00
Matthias Krüger
37c50653fe
Rollup merge of #113228 - GuillaumeGomez:migrate-gui-test-color-18, r=notriddle
Migrate GUI colors test to original CSS color format

Follow-up of https://github.com/rust-lang/rust/pull/111459.

r? ``@notriddle``
2023-07-02 10:27:20 +02:00
Matthias Krüger
c4ba0a6912
Rollup merge of #113202 - guilliamxavier:patch-1, r=workingjubilee
std docs: factorize literal in Barrier example

Motivated by https://www.reddit.com/r/rust/comments/rnh5hu/barrier_question_barrier_does_not_sync_many/ (but maybe not worth it?)
2023-07-02 10:27:20 +02:00
Matthias Krüger
2a3766e7fe
Rollup merge of #113147 - lizhanhui:fix_vec_from_raw_parts_doc_example, r=Mark-Simulacrum
Fix document examples of Vec::from_raw_parts and Vec::from_raw_parts_in

These two examples are misplaced.
2023-07-02 10:27:20 +02:00
bors
72b2101434 Auto merge of #112718 - oli-obk:SIMD-destructure_mir_const, r=cjgillot
Make simd_shuffle_indices use valtrees

This removes the second-to-last user of the `destructure_mir_constant` query. So in a follow-up we can remove the query and just move the query provider function directly into pretty printing (which is the last user).

cc `@rust-lang/clippy` there's a small functional change, but I think it is correct?
2023-07-02 07:43:36 +00:00
bors
be6e38c617 Auto merge of #112756 - hi-rustin:rustin-patch-bootstrap, r=clubby789
Use RustOptimize to set optimize

close https://github.com/rust-lang/rust/issues/112678

Use RustOptimize to set optimize.
2023-07-02 04:54:15 +00:00