Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visit type parameter in lifetime suggestion #13112

Merged
merged 1 commit into from
Apr 5, 2014

Conversation

ktt3ja
Copy link
Contributor

@ktt3ja ktt3ja commented Mar 24, 2014

Previously, Rebuilder did not visit type parameters when rebuilding
generics and path, so in some cases the suggestion turns out to be
erroneous.

@pnkfelix
Copy link
Member

Could you add a test marked xfail to work around the ICE?

@ktt3ja
Copy link
Contributor Author

ktt3ja commented Mar 24, 2014

@pnkfelix: I added a test with example from #13058. I originally marked it with ignore, but then I realized that the ICE doesn't occur on the wrong function declaration. It only occurs on the right one, so the test can still be ran.

That said, it would fail some of the time unless #13071 is landed first to make the span note deterministic.

EDIT: On second thought, I'll just rebase this on top of #13071.

Previously, Rebuilder did not visit type parameters when rebuilding
generics and path, so in some cases the suggestion turns out to be
erroneous.
bors added a commit that referenced this pull request Apr 5, 2014
Previously, Rebuilder did not visit type parameters when rebuilding
generics and path, so in some cases the suggestion turns out to be
erroneous.
@bors bors merged commit 1d99d37 into rust-lang:master Apr 5, 2014
@ktt3ja ktt3ja deleted the issue-13058 branch April 6, 2014 19:52
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 25, 2024
Setup infra for handling auto trait bounds disabled due to perf problems

This patch updates some of the partially-implemented functions of `ChalkContext as RustIrDatabase`, namely `adt_datum()` and `impl_provided_for()`. With those, we can now correctly work with auto trait bounds and distinguish methods based on them.

Resolves rust-lang#7856 (the second code; the first one is resolved by rust-lang#13074)

**IMPORTANT**: I don't think we want to merge this until rust-lang#7637 is resolved. Currently this patch introduces A LOT of unknown types and type mismtaches as shown below. This is because we cannot resolve items like `hashbrown::HashMap` in `std` modules, leading to auto trait bounds on them and their dependents unprovable.

|crate (from `rustc-perf@c52ee6` except for r-a)|e3dc5a588f07d6f1d3a0f33051d4af26190abe9e|HEAD of this branch|
|---|---|---|
|rust-analyzer @ e3dc5a5 |exprs: 417528, ??ty: 907 (0%), ?ty: 114 (0%), !ty: 1|exprs: 417528, ??ty: 1704 (0%), ?ty: 403 (0%), !ty: 20|
|ripgrep|exprs: 62120, ??ty: 2 (0%), ?ty: 0 (0%), !ty: 0|exprs: 62120, ??ty: 132 (0%), ?ty: 58 (0%), !ty: 11|
|webrender/webrender|exprs: 94355, ??ty: 49 (0%), ?ty: 16 (0%), !ty: 2|exprs: 94355, ??ty: 429 (0%), ?ty: 130 (0%), !ty: 7|
|diesel|exprs: 132591, ??ty: 401 (0%), ?ty: 5129 (3%), !ty: 31|exprs: 132591, ??ty: 401 (0%), ?ty: 5129 (3%), !ty: 31|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants