Coder Social home page Coder Social logo

Trait coherency regression in 1.78 about rust HOT 3 CLOSED

w4 avatar w4 commented on May 30, 2024
Trait coherency regression in 1.78

from rust.

Comments (3)

lqd avatar lqd commented on May 30, 2024

This is from #120584, I think it was expected because of existing brokenness but I may be wrong and see no FCP, so will cc its author @compiler-errors.

from rust.

compiler-errors avatar compiler-errors commented on May 30, 2024

Yeah, this is a legitimate bug in the code sample that was shared. Downstream crates can implement Vendor with a Processor type that implements VendorProcessor<EventGroup = MyEvent>. Coherence doesn't take into account the privacy of the items, so privacy here doesn't really matter.

For the record, this also would have begun to fail when we land the new trait solver for coherence (#121848) which will ideally happen soon.

from rust.

w4 avatar w4 commented on May 30, 2024

Thanks guys. It is clear now that this code sample only compiled because of the HRTB, but it was nice because the trait solver did actually work correctly here for our particular use case, as it was able to disambiguate between our usages of VendorProcessor<MyEvent> and VendorProcessor<Group> but I understand other 99% of use cases where this is broken. Closing.

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.