Skip to content

Add 'db to NavigationTarget and beyond#22470

Open
ada4a wants to merge 14 commits into
rust-lang:masterfrom
ada4a:add-lt-to-nav-target
Open

Add 'db to NavigationTarget and beyond#22470
ada4a wants to merge 14 commits into
rust-lang:masterfrom
ada4a:add-lt-to-nav-target

Conversation

@ada4a
Copy link
Copy Markdown
Contributor

@ada4a ada4a commented May 27, 2026

This addresses the FIXME on

// FIXME: Use the database lifetime here.
pub docs: Option<Documentation<'static>>,

(cc @ChayimFriedman2 since you were the one who added it)

To be completely honest, I'm not sure if this is worth it, since NavigationTarget ends up appearing inside of a lot of structs which in turn are returned by queries in lsp, requiring all of them to be turned into their 'static versions anyway. One could argue that all the remaining uses of NavigationTarget benefit from this change, though it's unclear how many of those there are.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 27, 2026
@Veykril
Copy link
Copy Markdown
Member

Veykril commented May 29, 2026

Hm, yea I am not sure we can even return these ever with a 'db lifetime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants