This issue affects how we treat the function/method names supplied in kani::stub(<original>, <replacement>) attributes. We currently treat <original> and <replacement> verbatim as strings, so that they have to exactly match a name we find in the HIR. This means that we are unable to find many functions/methods in foreign crates, that we do not support relative paths, and that we are unable to take into account use ... as ... statements.
We should instead correctly resolve names during stubbing, as well as support path constructs like self and super.
This issue affects how we treat the function/method names supplied in
kani::stub(<original>, <replacement>)attributes. We currently treat<original>and<replacement>verbatim as strings, so that they have to exactly match a name we find in the HIR. This means that we are unable to find many functions/methods in foreign crates, that we do not support relative paths, and that we are unable to take into accountuse ... as ...statements.We should instead correctly resolve names during stubbing, as well as support path constructs like
selfandsuper.