Commit Graph

246287 Commits

Author SHA1 Message Date
Zalathar e67db4c3b8 coverage: Simplify code for adding `prev` to pending dups
If we only check for duplicate spans when `prev` is unmodified, we reduce the
number of situations that `update_pending_dups` needs to handle.

This could potentially change the coverage spans we produce in some unknown
corner cases, but none of our current coverage tests indicate any change.
2024-02-13 21:48:03 +11:00
Zalathar 499609d8a4 coverage: Move `prev_original_span` into `PrevCovspan`
Now that `prev` has its own dedicated struct, we can store the original span in
that struct, instead of in a separate field in the refiner.
2024-02-13 21:48:03 +11:00
Zalathar a6183216d8 coverage: Split `CoverageSpan` into several distinct structs
This requires some extra boilerplate, but in exchange it becomes much easier to
see how each field and method is actually used.
2024-02-13 21:48:03 +11:00
Guillaume Gomez 1392f60dfd Extend intra-doc link chapter in the rustdoc book 2024-02-13 11:46:28 +01:00
Oli Scherer d3a89cd214 Avoid an ICE in diagnostics 2024-02-13 10:44:54 +00:00
Oli Scherer 7320623f3a Just pass the checker instead of individual fields 2024-02-13 10:23:06 +00:00
Oli Scherer 251c33ce2a Remove an `impl_polarity` call where the information is already available in the header 2024-02-13 10:18:05 +00:00
Zalathar 5a569b1b80 coverage: Don't track `curr_original_span` explicitly
Now that we never mutate `curr.span`, we don't need to store its original span
separately.
2024-02-13 21:01:17 +11:00
Zalathar 412c86cf03 coverage: When merging spans, keep `prev` and merge `curr` into it
Swapping the direction of this merge produces the same results, but means that
we never need to mutate `curr`.
2024-02-13 21:01:17 +11:00
Oli Scherer 75de6cf9a3 Avoid using the HIR span in the happy path 2024-02-13 09:49:08 +00:00
bors bc1b9e0e9a Auto merge of #120867 - weihanglo:update-cargo, r=weihanglo
Update cargo

8 commits in ccc84ccec4b7340eb916aefda1cb3e2fe17d8e7b..fc1d58fd0531a57a6b942a14cdcdbcb82ece16f3
2024-02-07 15:37:49 +0000 to 2024-02-09 15:54:29 +0000
- docs(changelog): Clarify lints in virtual workspace error (rust-lang/cargo#13425)
- fix(compiler): Clarify Finished message (rust-lang/cargo#13422)
- fix(test-support): remove special case for `$message_type` (rust-lang/cargo#13424)
- chore(deps): update msrv (1 version) to v1.76.0 (rust-lang/cargo#13420)
- chore(bump-check): include rustfix and cargo-util-schemas (rust-lang/cargo#13421)
- chore: update to `jobserver` 0.1.28 (rust-lang/cargo#13419)
- feat: Add hint for adding members to workspace (rust-lang/cargo#13411)
- fix: Don't duplicate comments when editing TOML (rust-lang/cargo#13402)

r? weihanglo
2024-02-13 09:46:34 +00:00
Oli Scherer 40b3cb0eb1 Don't reinvoke `trait_header` query twice 2024-02-13 09:38:13 +00:00
Augie Fackler a6ee72df91 tests: LLVM 18 infers an extra noalias here
This test started failing on LLVM 18 after change
61118ffd04. As far as I can tell, it's
just good fortune that LLVM is able to sniff out the new noalias here,
and it's correct.
2024-02-13 10:33:40 +01:00
Nikita Popov a47834ef80 Use system clang for wasm32_unknown_unknown on x86-gnu-integration
Fuchsia clang does not include the wasm32 target, so instead install
and use system clang for this purpose.
2024-02-13 10:33:40 +01:00
Nikita Popov 41a9cd4810 Set wasm32_unknown_unknown compiler in test-various 2024-02-13 10:33:40 +01:00
Nikita Popov 1ea7db8a54 Add missing riscv32imafc_unknown_none_elf env vars to dist-various-1
These are necessary now that compiler-builtins requires a working
C compiler for riscv.
2024-02-13 10:33:40 +01:00
Nikita Popov 48748804e0 Use CMAKE_MSVC_RUNTIME_LIBRARY instead of LLVM_USE_CRT_*
This cmake option has been removed in:
618e5d2c2d
2024-02-13 10:33:40 +01:00
Nikita Popov edfbe6351d Update compiler-builtins
This is necessary to pull in a number of compiler-rt build fixes.
2024-02-13 10:33:40 +01:00
Nikita Popov a911c8ce23 Use MCSubtargetInfo::getAllProcessorFeatures()
This method is now available in upstream LLVM \o/
2024-02-13 10:33:40 +01:00
Nikita Popov 85eaadfc01 Update to LLVM 18 2024-02-13 10:33:40 +01:00
Oli Scherer 55bbb054c9 Invoke `trait_def` query only once
This may be a small performance boost as we have to hash less to lookup the value
2024-02-13 09:29:31 +00:00
Oli Scherer 11a73f6d4d Store impl unsafety in impl trait header 2024-02-13 09:21:34 +00:00
Ayush Singh dee2d0f333
Implement Instant for UEFI
- Uses Timestamp Protocol if present. Else use rdtsc for x86 and x86-64

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-02-13 14:13:02 +05:30
bors 41555ab4a3 Auto merge of #3298 - rust-lang:rustup-2024-02-13, r=oli-obk
Automatic Rustup
2024-02-13 08:33:04 +00:00
Oli Scherer 43e9411db8 Prevent rustfmt from messing up experimental syntax 2024-02-13 08:31:45 +00:00
bors fd9bb7fdde Auto merge of #121003 - matthiaskrgr:rollup-u5wyztn, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #120696 (Properly handle `async` block and `async fn` in `if` exprs without `else`)
 - #120751 (Provide more suggestions on invalid equality where bounds)
 - #120802 (Bail out of drop elaboration when encountering error types)
 - #120967 (docs: mention round-to-even in precision formatting)
 - #120973 (allow static_mut_ref in some tests that specifically test mutable statics)
 - #120974 (llvm-wrapper: adapt for LLVM API change: Add support for EXPORTAS name types)
 - #120986 (iterator.rs: remove "Basic usage" text)
 - #120987 (remove redundant logic)
 - #120988 (fix comment)
 - #120995 (PassWrapper: adapt for llvm/llvm-project@93cdd1b5cf)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-02-13 07:19:39 +00:00
León Orell Valerian Liehr 622b5a5cee
Remove jsha from the rustdoc review rotation 2024-02-13 06:35:19 +01:00
Matthias Krüger 70ea26d349
Rollup merge of #120995 - durin42:llvm-19-pgo-coldfuncopt, r=cuviper
PassWrapper: adapt for llvm/llvm-project@93cdd1b5cf

Should be no functional change.

`@rustbot` label: +llvm-main
2024-02-13 06:27:41 +01:00
Matthias Krüger 21d8fb272b
Rollup merge of #120988 - tshepang:fix-comment, r=cjgillot
fix comment
2024-02-13 06:27:41 +01:00
Matthias Krüger 7427460ea9
Rollup merge of #120987 - tshepang:redundant, r=compiler-errors
remove redundant logic

Made redundant in 3f697b85f2
2024-02-13 06:27:40 +01:00
Matthias Krüger 5d1e919db4
Rollup merge of #120986 - tshepang:extraneous, r=cuviper
iterator.rs: remove "Basic usage" text

Only one example is given (for each method)
2024-02-13 06:27:40 +01:00
Matthias Krüger fa3ec02057
Rollup merge of #120974 - zmodem:exportas, r=durin42
llvm-wrapper: adapt for LLVM API change: Add support for EXPORTAS name types

Adapt for llvm/llvm-project@8f23464.
2024-02-13 06:27:39 +01:00
Matthias Krüger d95f0000fb
Rollup merge of #120973 - RalfJung:static_mut_ref, r=compiler-errors
allow static_mut_ref in some tests that specifically test mutable statics

The lint just distracts from what these tests are about.
2024-02-13 06:27:39 +01:00
Matthias Krüger 134de26337
Rollup merge of #120967 - LeoDog896:master, r=cuviper
docs: mention round-to-even in precision formatting

_Note_: Not quite sure exactly how to format this documentation.

Mentions round-to-even usage in precision formatting. (should this also be mentioned in `f64::round`?)

From https://github.com/rust-lang/rust/issues/70336
2024-02-13 06:27:38 +01:00
Matthias Krüger 30057f0266
Rollup merge of #120802 - oli-obk:drop_elab_ice, r=compiler-errors
Bail out of drop elaboration when encountering error types

fixes  #120788
2024-02-13 06:27:38 +01:00
Matthias Krüger 1b396913a9
Rollup merge of #120751 - estebank:issue-68982, r=nnethercote
Provide more suggestions on invalid equality where bounds

```
error: equality constraints are not yet supported in `where` clauses
  --> $DIR/equality-bound.rs:50:9
   |
LL |         IntoIterator::Item = A
   |         ^^^^^^^^^^^^^^^^^^^^^^ not supported
   |
   = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
help: if `IntoIterator::Item` is an associated type you're trying to set, use the associated type binding syntax
   |
LL ~     fn from_iter<T: IntoIterator<Item = A>>(_: T) -> Self
LL ~
   |

error: equality constraints are not yet supported in `where` clauses
  --> $DIR/equality-bound.rs:63:9
   |
LL |         T::Item = A
   |         ^^^^^^^^^^^ not supported
   |
   = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
help: if `IntoIterator::Item` is an associated type you're trying to set, use the associated type binding syntax
   |
LL ~     fn from_iter<T: IntoIterator<Item = A>>(_: T) -> Self
LL ~
   |
```

Fix #68982.
2024-02-13 06:27:37 +01:00
Matthias Krüger 020e84652d
Rollup merge of #120696 - estebank:issue-115405, r=oli-obk
Properly handle `async` block and `async fn` in `if` exprs without `else`

When encountering a tail expression in the then arm of an `if` expression without an `else` arm, account for `async fn` and `async` blocks to suggest `return`ing the value and pointing at the return type of the `async fn`.

We now also account for AFIT when looking for the return type to point at.

Fix #115405.
2024-02-13 06:27:37 +01:00
The Miri Conjob Bot 893615fb5f Merge from rustc 2024-02-13 05:21:26 +00:00
The Miri Conjob Bot 760e8d2842 Preparing for merge from rustc 2024-02-13 05:14:22 +00:00
bors 09d73fab08 Auto merge of #120938 - Ayush1325:uefi-thread, r=joboet,Nilstrieb
Implement sys/thread for UEFI

Since UEFI has no concept of threads, most of this module can be ignored. However, implementing parts that make sense.

- Implement sleep
- Implement available_parallelism
2024-02-13 05:04:55 +00:00
lcnr ae92334c0f remove questionable calls to `commit_if_ok` 2024-02-13 05:44:46 +01:00
lcnr 51a1000cda one must imagine ci happy 2024-02-13 05:08:53 +01:00
lcnr e5541cf895 add revisions 2024-02-13 05:08:53 +01:00
lcnr 3e3e207ad7 use alias-relate to structurally normalize in the solver 2024-02-13 05:08:51 +01:00
León Orell Valerian Liehr 36d7f763f0
Replace clean::InstantiationParam with clean::GenericArg 2024-02-13 05:06:28 +01:00
lcnr bbe2f6c0b2 also try to normalize opaque types in alias-relate
with this, alias-relate treats all aliases the same way
and it can be used for structural normalization.
2024-02-13 04:47:32 +01:00
bors d26b417112 Auto merge of #120919 - oli-obk:impl_polarity, r=compiler-errors
Merge `impl_polarity` and `impl_trait_ref` queries

Hopefully this is perf neutral. I want to finish https://github.com/rust-lang/rust/pull/120835 and stop using the HIR in `coherent_trait`, which should then give us a perf improvement.
2024-02-13 02:48:49 +00:00
Tristan F 0f53e720a8 docs: use correct link, use secondary example 2024-02-12 20:17:47 -05:00
bors 0a5b998c57 Auto merge of #120991 - matthiaskrgr:rollup-f8kw2st, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #118983 (Warn on references casting to bigger memory layout)
 - #119451 (Gate PR CI on clippy correctness lints)
 - #120273 (compiletest: few naive improvements)
 - #120950 (Fix async closures in CTFE)
 - #120958 (Dejargonize `subst`)
 - #120965 (Add lahfsahf and prfchw target feature)
 - #120970 (add another test for promoteds-in-static)
 - #120979 (Update books)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-02-13 00:31:53 +00:00
Augie Fackler 9d1bd2e067 PassWrapper: adapt for llvm/llvm-project@93cdd1b5cf
Should be no functional change.

@rustbot label: +llvm-main
2024-02-12 19:13:09 -05:00