Commit Graph

241793 Commits

Author SHA1 Message Date
Matthias Krüger 418ae3e9a0
Rollup merge of #118852 - Zalathar:no-spans, r=cjgillot
coverage: Skip instrumenting a function if no spans were extracted from MIR

The immediate symptoms of #118643 were fixed by #118666, but some users reported that their builds now encounter another coverage-related ICE:

```
error: internal compiler error: compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs:98:17: A used function should have had coverage mapping data but did not: (...)
```

I was able to reproduce at least one cause of this error: if no relevant spans could be extracted from a function, but the function contains `CoverageKind::SpanMarker` statements, then codegen still thinks the function is instrumented and complains about the fact that it has no coverage spans.

This PR prevents that from happening in two ways:
- If we didn't extract any relevant spans from MIR, skip instrumenting the entire function and don't create a `FunctionCoverateInfo` for it.
- If coverage codegen sees a `CoverageKind::SpanMarker` statement, skip it early and avoid creating `func_coverage`.

---

Fixes #118850.
2023-12-18 08:08:22 +01:00
Mark Rousskov 03d0ac62aa
copy 1.74.1 release notes to master 2023-12-18 15:45:07 +09:00
bors cda4736f1e Auto merge of #119063 - nnethercote:dcx, r=compiler-errors
Consistent `Handler` naming

This PR implements the renaming described in https://github.com/rust-lang/compiler-team/issues/699.

r? `@compiler-errors`
2023-12-18 06:03:53 +00:00
Nicholas Nethercote eeb3db1130 Rename many `DiagCtxt` and `EarlyDiagCtxt` locals. 2023-12-18 16:06:22 +11:00
Nicholas Nethercote 1e831e38ce Fix up some `ui-fulldeps` tests. 2023-12-18 16:06:22 +11:00
Nicholas Nethercote 8b5a5daad4 Rename many `DiagCtxt` arguments. 2023-12-18 16:06:22 +11:00
Nicholas Nethercote f6aa418c9f Rename many `DiagCtxt` and `EarlyDiagCtxt` locals. 2023-12-18 16:06:22 +11:00
Nicholas Nethercote d58e372853 Rename many `EarlyDiagCtxt` arguments. 2023-12-18 16:06:22 +11:00
Nicholas Nethercote f422dca3ae Rename many `DiagCtxt` arguments. 2023-12-18 16:06:22 +11:00
Nicholas Nethercote 4dc7fab56f Rename `__diagnostic_handler_sess` as `_sess`. 2023-12-18 16:06:22 +11:00
Nicholas Nethercote e97d353359 Rename `default_handler` as `default_dcx`. 2023-12-18 16:06:22 +11:00
Nicholas Nethercote e13b5c8efb Rename `new_handler` as `new_dcx`. 2023-12-18 16:06:22 +11:00
Nicholas Nethercote 7b8644e5cf Rename `DiagnosticDeriveKind::Diagnostic::handler` as `DiagnosticDeriveKind::Diagnostic::dcx`. 2023-12-18 16:06:22 +11:00
Nicholas Nethercote f7125f1f66 Rename `CollectProcMacros::handler` as `CollectProcMacros::dcx`. 2023-12-18 16:06:22 +11:00
Nicholas Nethercote b107ab81ad Rename `EarlyDiagCtxt::handler` as `EarlyDiagCtxt::dcx`. 2023-12-18 16:06:22 +11:00
Nicholas Nethercote 20cb12ede1 Rename `SilentEmitter::fatal_handler` as `SilentEmitter::fatal_dcx`. 2023-12-18 16:06:22 +11:00
Nicholas Nethercote b60e208549 Rename `Session::span_diagnostic` as `Session::dcx`. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 55bafab566 Rename `UnstableOptions::diagnostic_handler_flags` as `UnstableOptions::dcx_flags`. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote b44315c34c Rename `EarlyErrorHandler` as `EarlyDiagCtxt`. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 7c656bc05b Rename `CodegenContext::create_diag_handler` as `CodegenContext::create_dcx`. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote dea752e53d Rename `ShowSpanVisitor::span_diagnostic` as `ShowSpanVisitor::dcx`. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 5ad7144d1b Rename `AstValidator::err_handler` as `AstValidator::dcx`. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 9f3f1ca8c4 Rename `DiagnosticBuilder::handler` as `DiagnosticBuilder::dcx`. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote d1d0896c40 Rename `ParseSess::with_span_handler` as `ParseSess::with_dcx`. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 73bac456d4 Rename `Parser::span_diagnostic` as `Parser::dcx`. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 09af8a667c Rename `Session::span_diagnostic` as `Session::dcx`. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 9df1576e1d Rename `ParseSess::span_diagnostic` as `ParseSess::dcx`. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 9b1f87c7e8 Rename `HandlerFlags` as `DiagCtxtFlags`. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote cce1701c4c Rename `EarlyErrorHandler` as `EarlyDiagCtxt`. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 45f347681d Rename `HandlerInner` as `DiagCtxtInner`. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 576b9213b3 Rename `Handler` as `DiagCtxt`. 2023-12-18 16:06:19 +11:00
Nicholas Nethercote cde19c016e Rename `Handler` as `DiagCtxt`. 2023-12-18 16:06:19 +11:00
bors 8681e077b8 Auto merge of #119007 - weihanglo:update-cargo, r=weihanglo
Update cargo

11 commits in 1aa9df1a5be205cce621f0bc0ea6062a5e22a98c..1a2666ddd14cf0a255d4ddb61c63531c259a7b39
2023-12-12 14:52:31 +0000 to 2023-12-17 17:53:53 +0000
- chore: downgrade to openssl v1.1.1 (rust-lang/cargo#13179)
- docs(home): prepare the changelog for 0.5.9 (rust-lang/cargo#13177)
- refactor: Pull name validation into `util_schemas` (rust-lang/cargo#13166)
- chore(deps): bump zerocopy from 0.7.29 to 0.7.31 (rust-lang/cargo#13174)
- Replace SHGetFolderPathW with SHGetKnownFolderPath (rust-lang/cargo#13173)
- chore(bump-check): dont check `home` against beta/stable branches (rust-lang/cargo#13167)
- fix: Fill in more empty name holes (rust-lang/cargo#13164)
- Do not allow empty name in package ID spec (rust-lang/cargo#13152)
- chore(deps): update rust crate openssl to 0.10.61 (rust-lang/cargo#13159)
- `all-static` feature should include `vendored-libgit2` (rust-lang/cargo#13134)
- doc/registry-web-api: Adjust success response code documentation (rust-lang/cargo#13160)

r? ghost
2023-12-18 04:04:55 +00:00
Caleb Zulawski d655dd6dca Add new intrinsics 2023-12-17 23:00:29 -05:00
Caleb Zulawski 4767aaf826 Further explain semantics 2023-12-17 21:17:00 -05:00
Caleb Zulawski e245bafa9c Apply suggestions from code review
Co-authored-by: Ralf Jung <post@ralfj.de>
2023-12-17 21:17:00 -05:00
Caleb Zulawski 71a5698989 Improve simd_bitmask documentation and other minor fixes 2023-12-17 21:17:00 -05:00
Caleb Zulawski 560ac23b70 State type requirements first 2023-12-17 21:17:00 -05:00
Caleb Zulawski 1fd7de062e Clarify UB and improve grammar
Co-authored-by: Ralf Jung <post@ralfj.de>
2023-12-17 21:17:00 -05:00
Caleb Zulawski ef4cf01542 Add core::intrinsics::simd 2023-12-17 21:16:59 -05:00
bors 321b6565a5 Auto merge of #118657 - petrochenkov:feedvis, r=cjgillot
resolve: Replace visibility table in resolver outputs with query feeding

Also feed missing visibilities for import stems and trait impl items, which were previously evaluated lazily.

I suspect that in general this approach should work for queries that are 1) executed for most keys and 2) have results that are cheap to hash (do not have spans, in particular).
Visibility query matches that description.
2023-12-18 02:06:02 +00:00
Michael Goulet bb33200047 Make sure all kinds of generators only return unit 2023-12-18 01:45:42 +00:00
Michael Goulet 454bff7682 Ensure `yield` expressions desugar correctly in async generators 2023-12-18 01:42:19 +00:00
Kai Luo a8e1da3171 Address comment 2023-12-18 09:41:36 +08:00
León Orell Valerian Liehr 4a5dd169f7
Deny ~const trait bounds in inherent impl headers 2023-12-18 01:48:49 +01:00
Camille GILLOT 503af0deb2 Fortify test. 2023-12-17 23:31:58 +00:00
Vadim Petrochenkov be321aa473 resolve: Replace visibility table in resolver outputs with query feeding
Also feed missing visibilities for import stems and trait impl items, which were previously evaluated lazily.
2023-12-18 02:26:55 +03:00
bors 43dcc9b786 Auto merge of #114962 - darklyspaced:debug, r=est31
adds a column number to `dbg!()`

this would be very nice to have for a few reasons:
1. the rfc, when deciding not to add column numbers to macro, failed to acknowledge any potential ambiguous cases -- such as the one provided in #114910 -- which do exist
2. would be able to consistently and easily jump directly to the `dbg!()` regardless of the sutation
3. takes up, at a maximum, 3 characters of _horizontal_ screen space

fixes #114910
2023-12-17 23:01:18 +00:00
Weihang Lo 8ed5b293f4
Update cargo 2023-12-17 17:58:57 -05:00
Camille GILLOT 3ea5cfaa11 Tolerate overaligned MIR constants for codegen. 2023-12-17 22:56:42 +00:00