PLSysSec / cargo-scan

A tool for auditing Rust crates
MIT License
15 stars 3 forks source link

resolver quickfixes #22

Closed cdstanford closed 1 year ago

cdstanford commented 1 year ago

@lzoghbi take a look at the function resolve::resolve_core -- I've put in two temporary fixes for the minor issues we discussed, to get the tests passing.

Please go ahead and remove these lines when resolved!

    fn resolve_core(&self, i: &syn::Ident) -> Result<CanonicalPath> {
        let mut s = SrcLoc::from_span(self.filepath, i);
        // TODO Lydia remove
        s.add1();
        let i = Ident::from_syn(i);
        let mut result = self.resolver.resolve_ident(s, i)?;
        // TODO Lydia remove
        result.replace_empty_idents();
        Ok(result)
    }