Use special DefIds for aliases#155981
Conversation
| Err(TypeError::ProjectionMismatched(ExpectedFound::new( | ||
| a.def_id.into(), | ||
| b.def_id.into(), | ||
| ))) |
There was a problem hiding this comment.
can you update TypeError instead?
There was a problem hiding this comment.
I can't because unlike the name the def id can be any alias; see <AliasTy as Relate>::relate().
There was a problem hiding this comment.
ah, we also need to update the Relate<I> for AliasTy impl 👍 #154758
81000a1 to
5e8cb76
Compare
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.
This comment has been minimized.
This comment has been minimized.
Use special DefIds for aliases
|
❗ There is currently no auto build in progress on this PR. Hint: There is a pending try build on this PR. Maybe you meant to cancel it? You can do that using |
|
@bors try cancel |
|
Try build cancelled. Cancelled workflows: |
|
How do I request a perf run with |
|
Seems like there is no way to do that, so at least... @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Use special DefIds for aliases
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (a2fdd5d): 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. @rustbot label: -S-waiting-on-perf -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 (secondary 3.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -5.1%)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: 494.198s -> 495.332s (0.23%) |
|
@bors r=lcnr rollup |
This comment has been minimized.
This comment has been minimized.
Like we do for other things for better experience in rust-analyzer. It's possible now that the `AliasTyKind` and `AliasTermKind` contains the DefId. It does require a few `try_into().unwrap()`s since in the solver's `consider_X_candidate()` only get an untyped `DefId`. It's possible to reduce that considerably if we'd pass them the typed def id as a parameter, but I don't know what will be the impact on perf.
7a798fd to
ff25d8a
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. |
|
@bors r=lcnr rollup |
Use special DefIds for aliases Renewal of rust-lang#155025, after `AliasTermKind` was also ported. Like we do for other things for better experience in rust-analyzer. It's possible now that the `AliasTyKind` and `AliasTermKind` contains the DefId. It does require a few `try_into().unwrap()`s since in the solver's `consider_X_candidate()` only get an untyped `DefId`. It's possible to reduce that considerably if we'd pass them the typed def id as a parameter, but I don't know what will be the impact on perf. Should I try to pursue that? r? lcnr
Use special DefIds for aliases Renewal of rust-lang#155025, after `AliasTermKind` was also ported. Like we do for other things for better experience in rust-analyzer. It's possible now that the `AliasTyKind` and `AliasTermKind` contains the DefId. It does require a few `try_into().unwrap()`s since in the solver's `consider_X_candidate()` only get an untyped `DefId`. It's possible to reduce that considerably if we'd pass them the typed def id as a parameter, but I don't know what will be the impact on perf. Should I try to pursue that? r? lcnr
…uwer Rollup of 9 pull requests Successful merges: - #156061 (Support `-Cpanic=unwind` on WASI targets) - #146273 (lint ImproperCTypes: refactor linting architecture (part 2)) - #149509 (Lint unused pub items in binary crates) - #156173 (Fewer global node_id_to_def_id lookups) - #155961 (Deny warnings in the test for crates that are available on stable) - #155981 (Use special DefIds for aliases) - #156130 (Fold/visit tweaks) - #156131 (Metadata macro/query cleanups) - #156202 (llvm: Use correct type for splat mask) Failed merges: - #156236 (resolve: Remove `MacroData`)
Use special DefIds for aliases Renewal of rust-lang#155025, after `AliasTermKind` was also ported. Like we do for other things for better experience in rust-analyzer. It's possible now that the `AliasTyKind` and `AliasTermKind` contains the DefId. It does require a few `try_into().unwrap()`s since in the solver's `consider_X_candidate()` only get an untyped `DefId`. It's possible to reduce that considerably if we'd pass them the typed def id as a parameter, but I don't know what will be the impact on perf. Should I try to pursue that? r? lcnr
Use special DefIds for aliases Renewal of rust-lang#155025, after `AliasTermKind` was also ported. Like we do for other things for better experience in rust-analyzer. It's possible now that the `AliasTyKind` and `AliasTermKind` contains the DefId. It does require a few `try_into().unwrap()`s since in the solver's `consider_X_candidate()` only get an untyped `DefId`. It's possible to reduce that considerably if we'd pass them the typed def id as a parameter, but I don't know what will be the impact on perf. Should I try to pursue that? r? lcnr
Use special DefIds for aliases Renewal of rust-lang#155025, after `AliasTermKind` was also ported. Like we do for other things for better experience in rust-analyzer. It's possible now that the `AliasTyKind` and `AliasTermKind` contains the DefId. It does require a few `try_into().unwrap()`s since in the solver's `consider_X_candidate()` only get an untyped `DefId`. It's possible to reduce that considerably if we'd pass them the typed def id as a parameter, but I don't know what will be the impact on perf. Should I try to pursue that? r? lcnr
Rollup of 14 pull requests Successful merges: - #146273 (lint ImproperCTypes: refactor linting architecture (part 2)) - #149509 (Lint unused pub items in binary crates) - #156173 (Fewer global node_id_to_def_id lookups) - #156177 (windows/time: avoid being too close to 0) - #155961 (Deny warnings in the test for crates that are available on stable) - #155981 (Use special DefIds for aliases) - #156109 (Migrate libraries from ptr::slice_from_raw_parts to .cast_slice) - #156130 (Fold/visit tweaks) - #156131 (Metadata macro/query cleanups) - #156202 (llvm: Use correct type for splat mask) - #156227 (Add Trusty OS to the generic error implementation.) - #156237 (compiletest: prevent directives from having multiple revisions) - #156241 (Move tests coercion) - #156258 (Document wasi-sdk minimum versions for WASI targets)
Use special DefIds for aliases Renewal of rust-lang#155025, after `AliasTermKind` was also ported. Like we do for other things for better experience in rust-analyzer. It's possible now that the `AliasTyKind` and `AliasTermKind` contains the DefId. It does require a few `try_into().unwrap()`s since in the solver's `consider_X_candidate()` only get an untyped `DefId`. It's possible to reduce that considerably if we'd pass them the typed def id as a parameter, but I don't know what will be the impact on perf. Should I try to pursue that? r? lcnr
Rollup of 12 pull requests Successful merges: - #156173 (Fewer global node_id_to_def_id lookups) - #156177 (windows/time: avoid being too close to 0) - #155961 (Deny warnings in the test for crates that are available on stable) - #155981 (Use special DefIds for aliases) - #156130 (Fold/visit tweaks) - #156131 (Metadata macro/query cleanups) - #156202 (llvm: Use correct type for splat mask) - #156223 (Refactor `Type::size` field to `TypeId::size` method for `type_info`) - #156227 (Add Trusty OS to the generic error implementation.) - #156237 (compiletest: prevent directives from having multiple revisions) - #156241 (Move tests coercion) - #156258 (Document wasi-sdk minimum versions for WASI targets)
View all comments
Renewal of #155025, after
AliasTermKindwas also ported.Like we do for other things for better experience in rust-analyzer.
It's possible now that the
AliasTyKindandAliasTermKindcontains the DefId.It does require a few
try_into().unwrap()s since in the solver'sconsider_X_candidate()only get an untypedDefId. It's possible to reduce that considerably if we'd pass them the typed def id as a parameter, but I don't know what will be the impact on perf. Should I try to pursue that?r? lcnr