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

Type not inferred to &T for .borrow() on an impl Borrow<T> #11346

Closed
rben01 opened this issue Jan 26, 2022 · 1 comment
Closed

Type not inferred to &T for .borrow() on an impl Borrow<T> #11346

rben01 opened this issue Jan 26, 2022 · 1 comment

Comments

@rben01
Copy link

rben01 commented Jan 26, 2022

rust-analyzer version: 17afa2e77 2022-01-24 stable
rustc version: rustc 1.58.1 (db9d1b20b 2022-01-20)

Bug: if s implements Borrow<T>, then RA does not infer that the type of s.borrow() is &T.
image

@jonas-schievink
Copy link
Contributor

This might be a duplicate of #5514

@rben01 rben01 closed this as completed Jan 26, 2022
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

No branches or pull requests

2 participants