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

unsafe semantic highlighting should only highlight unsafe operations and definitions #19101

Open
Veykril opened this issue Feb 6, 2025 · 0 comments
Labels
A-highlighting (semantic) token highlighting C-bug Category: bug

Comments

@Veykril
Copy link
Member

Veykril commented Feb 6, 2025

Right now we highlight some things as unsafe when they aren't used as such, an example being

unsafe fn f() {}

let _ = f;

here we highlight the f in unsafe fn f which is correct as its the definition, but we also highlight it in let _ = f even though we aren't doing anything unsafe there. There is more instances of this for other constructs like &raw const MUTABLE_STATIC which is a safe operation. We should likely expose our unsafety hir analysis and make use of that for this.

@Veykril Veykril added A-highlighting (semantic) token highlighting C-bug Category: bug labels Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-highlighting (semantic) token highlighting C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

1 participant