Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…, r=<try> Fix for implementing copy and drop trait for free alias types
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Issue #157755 doesn't only concern Copy & Drop, those were only the ones I mentioned. I'm relatively sure that most if not all traits listed in rustc_hir_analysis::coherence::builtin::check_trait don't work well with free alias types.
At the time of writing that function checks Drop, AsyncDrop, Copy, Unpin, ConstParamTy, CoerceUnpin, Reborrow, CoerceShared, DispatchFromDyn, CoercePointeeValidated. Note that maybe we don't need to expand_free_alias_tys for all of them, needs investigation, maybe they already normalize the self type or we shouldn't expand for whatever reason..
There was a problem hiding this comment.
Small update but yeah I went through a few of them just now and got the ICE in #159264. I'll go through the others and investigate in the coming days
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (4db5f4d): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @bors rollup=iffy rustc-perf 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 0.5%, secondary 1.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 0.1%, secondary 0.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 488.459s -> 488.836s (0.08%) |
9a6c2d7 to
91abb11
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…ecked type aliases
b4f5ae8 to
230cd59
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
| pub struct AsyncDropLocal; | ||
| pub type AsyncDropAlias = AsyncDropLocal; |
There was a problem hiding this comment.
I tried removing pub here and above to follow the rest of the file but I got the below error
Stack trace
warning: type alias `AsyncDropAlias` is more private than the item `<impl AsyncDrop for AsyncDropAlias>::drop`
--> /rust/tests/ui/checked-type-aliases/builtin-trait-impls.rs:32:5
|
LL | async fn drop(self: Pin<&mut Self>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `<impl AsyncDrop for AsyncDropAlias>::drop` is reachable at visibility `pub`
|
note: but type alias `AsyncDropAlias` is only usable at visibility `pub(crate)`
--> /rust/tests/ui/checked-type-aliases/builtin-trait-impls.rs:29:1
|
LL | type AsyncDropAlias = AsyncDropLocal;
| ^^^^^^^^^^^^^^^^^^^
= note: `#[warn(private_interfaces)]` on by default
which leads me to here but not sure if it's an issue
rust/compiler/rustc_privacy/src/lib.rs
Lines 1475 to 1487 in c884ecf
Fixes #157755
Fixes #159264
r? @fmease