Commit Graph

233379 Commits

Author SHA1 Message Date
Zalathar
004db4728b Add test suite coverage-map to test coverage mappings emitted by LLVM
We compile each test file to LLVM IR assembly, and then pass that IR to a
dedicated program that can decode LLVM coverage maps and print them in a more
human-readable format. We can then check that output against known-good
snapshots.

This test suite has some advantages over the existing `run-coverage` tests:

- We can test coverage instrumentation without needing to run target binaries.

- We can observe subtle improvements/regressions in the underlying coverage
mappings that don't make a visible difference to coverage reports.
2023-09-05 11:55:17 +10:00
Zalathar
1367104cb2 Add tool src/tools/coverage-dump for use by some new coverage tests 2023-09-05 11:11:48 +10:00
bors
9c609ae158 Auto merge of #115467 - compiler-errors:assoc-ty-object-safety, r=oli-obk
Do not require associated types with Self: Sized to uphold bounds when confirming object candidate

RPITITs and associated types that have `Self: Sized` bounds are opted out of the `dyn Trait` well-formedness check that happens during confirmation. This ensures that we can actually *use* `dyn Trait`s that have associated types that, e.g., have GATs and RPITITs and other naughty things as long as those are opted-out of object safety via a `Self: Sized` bound.

Fixes #115464

This seems like a natural part of https://github.com/rust-lang/rust/pull/112319#issuecomment-1592574451, and I don't think needs re-litigation.

r? `@oli-obk`
2023-09-05 01:09:48 +00:00
bors
04374cd742 Auto merge of #114089 - Urgau:allow-with-implied-by, r=petrochenkov
Add an allow attribute suggestion along with the implied by suggestion

This PR adds an `#[allow(...)]` attribute hep suggestion along with the implied by suggestion:
```diff
  note: `-W dead-code` implied by `-W unused`
+ help: to override `-W unused` add `#[allow(dead_code)]`
```

This PR also adds the `OnceHelp` lint level (similar to `OnceNote`) to only put the help message one time, like the implied note.

Related to https://github.com/rust-lang/rust/issues/114030
2023-09-04 23:09:56 +00:00
Jakub Beránek
c98455fe87
Retry download of rustc-perf in opt-dist
This should help resolving spurious network errors. It also increases the timeout for the archive download.
2023-09-04 22:17:35 +02:00
bors
ec08a0337f Auto merge of #115541 - Mark-Simulacrum:mirror-rustc-perf-source, r=ehuss
Mirror the rustc-perf source

This avoids issues with the GitHub /archive/ links which can be somewhat unreliable and are currently causing CI issues.
2023-09-04 17:30:38 +00:00
Mark Rousskov
fe6c863f0b Mirror the rustc-perf source
This avoids issues with the GitHub /archive/ links which can be somewhat
unreliable and are currently causing CI issues.
2023-09-04 13:21:05 -04:00
Ralf Jung
7093903ba7 read_via_copy: don't prematurely optimize away the read 2023-09-04 18:27:34 +02:00
Ben Kimock
94fe18f84b Use a specialized varint + bitpacking scheme for DepGraph encoding 2023-09-04 12:16:50 -04:00
ouz-a
56d10a883e provide more useful info for DefId Debug 2023-09-04 19:13:43 +03:00
Camille GILLOT
3edeac06a5 Pass StableSourceFileId. 2023-09-04 16:02:46 +00:00
Camille GILLOT
4b417c1b8d Remove always-zero field. 2023-09-04 16:02:46 +00:00
Camille GILLOT
7a183806a9 Update doc. 2023-09-04 15:57:00 +00:00
Ralf Jung
fa5f13775a interpret: make MemPlace, Place, Operand types private to the interpreter 2023-09-04 17:53:38 +02:00
Urgau
9190e960e1 Adjust clippy tests with new rustc help suggestion for lints 2023-09-04 14:22:02 +02:00
Urgau
efbe445ba7 Add help to allow lint for the implied by suggestion 2023-09-04 14:21:38 +02:00
mojave2
f404990eb0
improve AttrTokenStream 2023-09-04 20:07:28 +08:00
Urgau
eba5b44729 Add OnceHelp lint level (same as OnceNote, except for help) 2023-09-04 13:54:20 +02:00
bors
bf1e3f31f9 Auto merge of #115513 - Urgau:normalize-msg-after-translate, r=petrochenkov
Don't forget to normalize the translated message

This PR adds a missing call to `normalize_whitespace` after translating an label.

Fixes https://github.com/rust-lang/rust/issues/115498
2023-09-04 10:02:57 +00:00
bors
ce798a52c3 Auto merge of #115493 - Ayush1325:raw-os-error, r=workingjubilee
Move RawOsError defination to sys

This was originally a part of https://github.com/rust-lang/rust/pull/105861, but I feel it should be its own PR since the raw os error is still unstable.
2023-09-04 08:04:00 +00:00
bors
b14b0745ad Auto merge of #115391 - saethlin:depkind-discrim, r=nnethercote
Encode DepKind as u16

The derived Encodable/Decodable impls serialize/deserialize as a varint, which results in a lot of code size around the encoding/decoding of these types which isn't justified: The full range of values here is rather small but doesn't quite fit in to a `u8`. Growing _all_ serialized `DepKind` to 2 bytes costs us on average 1% size in the incr comp dep graph, which I plan to recoup in https://github.com/rust-lang/rust/pull/110050 by taking advantage of the unused bits in all the serialized `DepKind`.

r? `@nnethercote`
2023-09-04 04:27:00 +00:00
bors
abfc6c4438 Auto merge of #115491 - Zoxc:refcell-tweak, r=Mark-Simulacrum
Outline panicking code for `RefCell::borrow` and `RefCell::borrow_mut`

This outlines panicking code for `RefCell::borrow` and `RefCell::borrow_mut` to reduce code size.
2023-09-03 23:03:03 +00:00
Ben Kimock
9867023f4f Encode DepKind as u16 2023-09-03 18:48:23 -04:00
bors
58e967a9cc Auto merge of #115518 - matthiaskrgr:rollup-vksprou, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #115279 (RangeFull: Remove parens around .. in documentation snippet)
 - #115318 (Reference uplifted clippy lints' rustc name in the release notes)
 - #115445 (remove some unused crate deps)
 - #115489 (Use std::io::Error::is_interrupted everywhere)
 - #115512 (Command::spawn: Fix STARTUPINFOW.cb being initialized with the address of size_of)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-09-03 21:15:12 +00:00
Michael Goulet
8c667febbd Don't ICE on associated type projection without feature gate 2023-09-03 19:43:58 +00:00
Matthias Krüger
487fe2e5ad
Rollup merge of #115512 - Fulgen301:startupinfow, r=ChrisDenton
Command::spawn: Fix STARTUPINFOW.cb being initialized with the address of size_of

Fixes #115511.
2023-09-03 21:38:43 +02:00
Matthias Krüger
33e2e71502
Rollup merge of #115489 - saethlin:is-interrupted, r=thomcc
Use std::io::Error::is_interrupted everywhere

In https://github.com/rust-lang/rust/pull/115228 I introduced this helper and started using it, this PR uses it to replace all applicable uses of `std::io::Error::kind`. The justification is the same; for whatever reason LLVM totally flops optimizing `Error::kind` so it's nice to use it less.

FYI ``@mkroening`` I swear the hermit changes look good, but I was so sure about the previous PR.
2023-09-03 21:38:43 +02:00
Matthias Krüger
d22043c27c
Rollup merge of #115445 - klensy:less-deps, r=Mark-Simulacrum
remove some unused crate deps
2023-09-03 21:38:42 +02:00
Matthias Krüger
545560a2f6
Rollup merge of #115318 - integer32llc:improve-release-notes, r=Mark-Simulacrum
Reference uplifted clippy lints' rustc name in the release notes

I updated to Rust 1.72.0, got a new warning from rustc, wanted to read more about it, so I went to RELEASES.md and searched for the new lint's name as shown in the warning I got.

I found no results because the relevant entry in RELEASES only contained the lint's old Clippy name, not its new rustc name.

This adds the rustc name for lints so that someone doing the same thing I did will have more success.

Some of the uplifted lints didn't have a name change, so I didn't add the rustc name as a search for it will succeed.
2023-09-03 21:38:42 +02:00
Matthias Krüger
50aea927f5
Rollup merge of #115279 - schuelermine:patch/doc/RangeFull/remote-parens, r=Mark-Simulacrum
RangeFull: Remove parens around .. in documentation snippet

I’ve removed unnecessary parentheses in a documentation snippet documenting `RangeFull`. It could’ve lead people to believe the parentheses were necessary.
2023-09-03 21:38:41 +02:00
bors
21305f4d5f Auto merge of #115270 - sebastiantoh:issue-105479, r=Nadrieril
Add note on non-exhaustiveness when matching on str and nested non-exhaustive enums

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

r? `@Nadrieril`
2023-09-03 19:31:47 +00:00
Urgau
ec0975dd6b Don't forget to normalize the translated message 2023-09-03 17:10:42 +02:00
Fulgen301
a8b0e44e86
Command::spawn: Fix STARTUPINFOW.cb being initialized with the address of size_of 2023-09-03 17:04:42 +02:00
Camille GILLOT
8ae337e128 Fix clippy. 2023-09-03 15:02:47 +00:00
Camille GILLOT
4a87a44451 Compute address space from previous file. 2023-09-03 15:02:47 +00:00
Camille GILLOT
548ba13265 Register the file while computing its start position. 2023-09-03 15:02:46 +00:00
bors
2a1af898b2 Auto merge of #115510 - GuillaumeGomez:rollup-wh719bn, r=GuillaumeGomez
Rollup of 3 pull requests

Successful merges:

 - #115478 (Emit unused doc comment warnings for pat and expr fields)
 - #115490 (rustdoc: update comment in search.js for #107629)
 - #115503 (Migrate GUI colors test to original CSS color format)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-09-03 14:44:09 +00:00
Guillaume Gomez
38a2d5f435
Rollup merge of #115503 - GuillaumeGomez:migrate-gui-test-color-38, 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-09-03 15:42:12 +02:00
Guillaume Gomez
dbeef4590a
Rollup merge of #115490 - pitaj:rustdoc-searchjs-comment, r=GuillaumeGomez
rustdoc: update comment in search.js for #107629

Addressing https://github.com/rust-lang/rust/pull/107629#issuecomment-1693460106

r? `@jsha`
2023-09-03 15:42:12 +02:00
Guillaume Gomez
3db7fc1481
Rollup merge of #115478 - gurry:115462-exprfield-no-warn, r=compiler-errors
Emit unused doc comment warnings for pat and expr fields

Fixes #115462
2023-09-03 15:42:11 +02:00
Ben Kimock
642251b71f Use std::io::Error::is_interrupted everywhere 2023-09-03 09:21:10 -04:00
Camille GILLOT
61a0b77e17 Use relative positions inside a SourceFile. 2023-09-03 12:56:10 +00:00
Camille GILLOT
258ace613d Use relative positions inside a SourceFile. 2023-09-03 12:56:10 +00:00
bors
49523e3360 Auto merge of #115448 - onur-ozkan:optimize-bootstrap-dep-tree, r=albertlarsan68
optimize bootstrap dep tree

bumped `pretty_assertations` in favor of removing duplicated `syn`, and bumped `hermit-abi` from the yanked version.
2023-09-03 12:55:10 +00:00
Sebastian Toh
d87b87d10e Improve clarity of diagnostic message on non-exhaustive matches 2023-09-03 19:55:11 +08:00
bors
53a03978a7 Auto merge of #115361 - compiler-errors:param, r=cjgillot
Don't manually compute param indices when adding implicit `Sized` and `ConstParamHasTy`

We can just use resolve_bound_vars to compute these indices faithfully.

This also makes the code easier to support where clauses on `non_lifetime_binders` (like `where for<T: Debug> ...`, etc, which I've got a [WIP implementation of](https://github.com/rust-lang/rust/compare/master...compiler-errors:rust:non-lifetime-binder-where-clauses)).

r? `@cjgillot`
2023-09-03 11:12:20 +00:00
Guillaume Gomez
8e5dff1d38 Migrate GUI colors test to original CSS color format 2023-09-03 12:49:22 +02:00
Guillaume Gomez
7e648f0d72 Use named arguments in code-color.goml GUI test 2023-09-03 12:46:56 +02:00
bors
b89d7d6882 Auto merge of #115496 - RalfJung:miri, r=RalfJung
update Miri

There were conflicts on the last pull, so make sure it's all in sync both ways

r? `@ghost`
2023-09-03 09:23:39 +00:00
bors
7cc5ac267f Auto merge of #115470 - ericmarkmartin:stable-prov, r=oli-obk
add stable provenance

r? `@spastorino`

implements rust-lang/project-stable-mir#22
2023-09-03 07:38:55 +00:00