Rollup of 9 pull requests#155720
Conversation
… a correctness regression
Over time the landscape for myself has changed, and I no longer would like to be officially listed as a maintainer of this target in Rust, so I'm going to step down. There are still a number of others listed on this target, however, so I'm sure they can address issues should they come up.
There are a number of things I dislike about `CrateMetadataRef`. - It contains two fields `cstore` and `cdata`. The latter points to data within the former. It's like having an `Elem` type that has a reference to a vec element and also a reference to the vec itself. Weird. - The `cdata` field gets a lot of use, and the `Deref` impl just derefs that field. The `cstore` field is rarely used. - `CrateMetadataRef` is not a good name. - Variables named `cdata` sometimes refer to values of this type and sometimes to values of type `CrateMetadata`, which is confusing. The good news is that `CrateMetadataRef` is not necessary and can be replaced with `&CrateMetadata`. Why? Everywhere that `CrateMetadataRef` is used, a `TyCtxt` is also present, and the `CStore` is accessible from the `TyCtxt` with `CStore::from_tcx`. So this commit removes `CrateMetadataRef` and replaces all its uses with `&CrateMetadata`. Notes: - This requires adding only two uses of `CStore::from_tcx`, which shows how rarely the `cstore` field was used. - `get_crate_data` now matches `get_crate_data_mut` more closely. - A few variables are renamed for consistency, e.g. `data`/`cmeta` -> `cdata`. - An unnecessary local variable (`local_cdata`) in `decode_expn_id` is removed. - All the `CrateMetadataRef` methods become `CrateMetadata` methods, and their receiver changes from `self` to `&self`. - `RawDefId::decode_from_cdata` is inlined and removed, because it has a single call site.
Similar to the existing `Receiver` item, it will be used in Clippy to detect uses of `is_disconnected` that are racy.
Crash tests are always expected to crash during compilation, so there is no sensible meaning for specifying a pass/fail expectation in a crash test.
* Avoid query cycles in DataflowConstProp * Add -Zmir-opt-level=0 to the test
Added a marker trait `IoHandle` which can be used by the standard library to opt-in types to a blanket implementation of the various IO traits on `Arc<T>` where `&T: IoTrait` for some `IoTrait`. The marker is required to avoid types like `Arc<[u8]>` being included, since they don't have interior mutability and would not give expected results.
…ref, r=jhpratt Generalize IO Traits for `Arc<T>` where `&T: IoTrait` ACP: rust-lang/libs-team#755 Tracking issue: rust-lang#154046 Related: rust-lang#94744 ## Description After experimenting with rust-lang#155625, I noticed `Seek` and `SeekFrom` can almost be moved to `core::io`. Unfortunately, the implementation of `Seek` for `Arc<File>` is a blocker for such a move, since `Arc` is not a fundamental type. This PR attempts to resolve this potential blocker by replacing the implementation with a more general alternative. An internal trait `IoHandle` has been added which types can implement to opt-in to `Read`/`Write`/`Seek` implementations for `Arc<Self>` as long as `&Self` implements said trait. Note that `BufRead` is excluded as the signature for `fill_buf` would require returning from a temporary. Since this "blanket" implementation only applies to a single type which already implements the same traits, I believe this should have no user-facing impact. If this PR was merged, rust-lang#134190 could be replaced with a 2 line PR: ```rust impl IoHandle for TcpStream {} impl IoHandle for UnixStream {} ``` Likewise for any other types, a table of which can be found [here](rust-lang/libs-team#504 (comment)). This is out of scope for this PR to avoid the need for an ACP. --- ## Notes * See [this comment](rust-lang#154046 (comment)) for further details. * No AI tooling of any kind was used during the creation of this PR.
Move and clean up some ui test `ui/reserved` -> `ui/keyword` `ui/deref-patterns` -> `ui/pattern/deref-patterns` `ui/unknown-unstable-lints` -> `ui/lint/unknown-lints` Tests related to unknown_lints that were located above lint have also been moved to a subdirectory, and duplicate tests have been deleted. And delete unnecessary `//@ check-fail` r? Kivooeo
…thlin Avoid query cycles in DataflowConstProp Fixes rust-lang#155376 by skipping coroutines.
…aRef, r=mejrs,petrochenkov Eliminate `CrateMetadataRef`. There are a number of things I dislike about `CrateMetadataRef`. - It contains two fields `cstore` and `cdata`. The latter points to data within the former. It's like having an `Elem` type that has a reference to a vec element and also a reference to the vec itself. Weird. - The `cdata` field gets a lot of use, and the `Deref` impl just derefs that field. The `cstore` field is rarely used. - `CrateMetadataRef` is not a good name. - Variables named `cdata` sometimes refer to values of this type and sometimes to values of type `CrateMetadata`, which is confusing. The good news is that `CrateMetadataRef` is not necessary and can be replaced with `&CrateMetadata`. Why? Everywhere that `CrateMetadataRef` is used, a `TyCtxt` is also present, and the `CStore` is accessible from the `TyCtxt` with `CStore::from_tcx`. So this commit removes `CrateMetadataRef` and replaces all its uses with `&CrateMetadata`. Notes: - This requires adding only two uses of `CStore::from_tcx`, which shows how rarely the `cstore` field was used. - `get_crate_data` now matches `get_crate_data_mut` more closely. - A few variables are renamed for consistency, e.g. `data`/`cmeta` -> `cdata`. - An unnecessary local variable (`local_cdata`) in `decode_expn_id` is removed. - All the `CrateMetadataRef` methods become `CrateMetadata` methods, and their receiver changes from `self` to `&self`. - `RawDefId::decode_from_cdata` is inlined and removed, because it has a single call site. r? @mejrs
…mejrs Add `Sender` diagnostic item for `std::sync::mpsc::Sender` Similar to the existing `Receiver` item, it will be used in Clippy to detect uses of `is_disconnected` that are racy. Tracking issue: rust-lang#153668 Suggested: rust-lang/libs-team#748 (comment)
…horthand, r=mu001999 Syntactically reject tuple index shorthands in struct patterns to fix a correctness regression Split out of PR rust-lang#154492. This fixes a correctness regression introduced in PR rust-lang#81235 from 2021. Crater was run in my other PR and didn't report any real regressions (rust-lang#154492 (comment)); a rerun has been issued for a few spurious builds (rust-lang#154492 (comment)) but I'm certain it won't find anything either. This is a theoretical breaking change that doesn't need any T-lang input IMHO since it's such a minute, niche and crystal clear bug that's not worth bothering them with (such a decision is not unprecedented). I'm adding it to the compatibility section of the release notes as is customary. The Reference doesn't need updating since it didn't adopt this bug and thus accurately describes this part of the grammar as it used to be before 2021-02-23 and as it's meant to be. The majority of the diff is doc comment additions & necessary UI test restructurings.
…sm32-wasip1-threads, r=jieyouxu Remove myself as a maintainer of `wasm32-wasip1-threads` Over time the landscape for myself has changed, and I no longer would like to be officially listed as a maintainer of this target in Rust, so I'm going to step down. There are still a number of others listed on this target, however, so I'm sure they can address issues should they come up.
…d, r=JonathanBrouwer Remove `AttributeLintKind` variants - part 7 Part of rust-lang#153099. It's the last easy one. Next one will require to get the crate name and to pass `Session` to the remaining lints. Fun times ahead. :) r? @JonathanBrouwer
Forbid `*-pass` and `*-fail` directives in tests/crashes Crash tests are always expected to crash during compilation, so there is no sensible meaning for specifying a pass expectation or a run-fail expectation in a crash test. It could conceivably be useful to use failure expectations to specify whether a crash test requires codegen in order to crash, but currently none of the crash tests try to do that. If that functionality is desired in the future, we can always look into re-adding it after the internals of pass/fail expectations have been cleaned up a bit. --- After this change, pass/fail directives are only allowed in UI tests, which should make it easier to overhaul and simplify their implementation. r? jieyouxu
|
@bors r+ rollup=never p=5 |
This comment has been minimized.
This comment has been minimized.
|
📌 Perf builds for each rolled up PR:
previous master: d493b7c5ac In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing d493b7c (parent) -> cf79d03 (this PR) Test differencesShow 544 test diffsStage 1
Stage 2
Additionally, 460 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard cf79d034aa3d8f396d407aafce6f1ccd818e710e --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (cf79d03): comparison URL. Overall result: ❌✅ regressions and improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -2.7%, secondary -2.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis perf run didn't have relevant results for this metric. Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 491.485s -> 493.065s (0.32%) |
Successful merges:
Arc<T>where&T: IoTrait#155684 (Generalize IO Traits forArc<T>where&T: IoTrait)CrateMetadataRef. #155663 (EliminateCrateMetadataRef.)Senderdiagnostic item forstd::sync::mpsc::Sender#155669 (AddSenderdiagnostic item forstd::sync::mpsc::Sender)wasm32-wasip1-threads#155703 (Remove myself as a maintainer ofwasm32-wasip1-threads)AttributeLintKindvariants - part 7 #155706 (RemoveAttributeLintKindvariants - part 7)*-passand*-faildirectives in tests/crashes #155712 (Forbid*-passand*-faildirectives in tests/crashes)r? @ghost
Create a similar rollup