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

Allow printing lifetime placeholders #557

Merged

Conversation

detrumi
Copy link
Member

@detrumi detrumi commented Jul 4, 2020

rust-analyzer currently doesn't implement lifetimes, but inserts placeholders instead: https://github.com/rust-analyzer/rust-analyzer/blob/9f754e0518e7f2860891079a117a3e4bc6f4a8fd/crates/ra_hir_ty/src/traits/chalk/mapping.rs#L141

To avoid crashing when displaying programs coming from rust-analyzer, we should just write out the placeholder for now.

Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
@flodiebold
Copy link
Member

flodiebold commented Jul 4, 2020

I think it makes sense to not rely on these kinds of invariants anyway in the printer -- its whole purpose is debugging, so it should be somewhat resilient to wrong inputs. (For the same reason, I think it'd be a good idea to replace the todo!s in the file by just printing something, no matter whether it's valid or not.)

@detrumi detrumi force-pushed the chalk-writer-integration-workarounds branch from a54d73c to 85d0d72 Compare July 4, 2020 15:59
@jackh726 jackh726 merged commit cd5a0d8 into rust-lang:master Jul 4, 2020
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

4 participants