Skip to content

Provide context_def_id from FunctionData#140

Closed
JonasAlaif wants to merge 1 commit intomainfrom
function-data-context
Closed

Provide context_def_id from FunctionData#140
JonasAlaif wants to merge 1 commit intomainfrom
function-data-context

Conversation

@JonasAlaif
Copy link
Contributor

@JonasAlaif JonasAlaif commented Mar 1, 2026

Prusti would incorrectly use FunctionData::substs as an argument to construct GParams. However, the GParams only define the generic parameters of e.g. a DefId (that is the fn foo<'a, T, U> thing). The GArgs in Prusti are for generic args (i.e. substs, such as foo::<'static, (i32, bool), &'l i32>).

This PR exposes a way to get the DefId for which we can get the parameters to construct a GParams.

@JonasAlaif JonasAlaif force-pushed the function-data-context branch from 691a979 to 3d2c174 Compare March 1, 2026 11:20
@zgrannan zgrannan force-pushed the function-data-context branch from a1b6e5f to 945f2d4 Compare March 2, 2026 23:18
@JonasAlaif
Copy link
Contributor Author

Ah so caller_def_id has been removed in the latest version? That's fine then, no need for this PR - we can just use the def_id function that's there already

@JonasAlaif JonasAlaif closed this Mar 3, 2026
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.

1 participant