Giter VIP home page Giter VIP logo

Comments (4)

anthonydandrea avatar anthonydandrea commented on July 26, 2024 1

I've never contributed to Rust OSS but if this may be first-time-contributor friendly, I'd be happy to give it a go. Any pointers of where to try changes beyond crate_inherent_impls would be appreciated!

from rust.

workingjubilee avatar workingjubilee commented on July 26, 2024

...huh, the impl Vec<usize> causes a failure to find .split on str...

from rust.

estebank avatar estebank commented on July 26, 2024

This happens because the query crate_inherent_impls returns a Result<&'tcx CrateInherentImpls, ErrorGuaranteed>, which means that when calling that query, if there's any error being propagated, we don't actually get the inherent impls. The options are to modify the existing query to never forward the errors (which would break the query caching mechanism, I believe) or add a second query that always succeeds, as a fallback to the fallible query so that we can get as many of the inherent impls as possible for the later resolutions.

from rust.

estebank avatar estebank commented on July 26, 2024

@anthonydandrea the most esoteric thing you'll have to deal with is the query system, as there's a function crate_inherent_impls with a corresponding query crate_inherent_impls which is a way of encoding the contract of the "providers", so that you can define whether calls should get memoized/cached on-disk. Because we want errors to be properly tracked, you'd have to add a new query that always succeeds that isn't cached, that only gets called if the other query call fails. You probably can put that logic behind a method in TyCtxt which deals with the fall back and then call that new method from everywhere the query gets called today.

from rust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.