Giter Site home page Giter Site logo

Comments (10)

apasel422 avatar apasel422 commented on September 24, 2024

I've been thinking about how to approach this, but it seems like the new rules will make comparators a lot more limited.

from collect-rs.

Gankra avatar Gankra commented on September 24, 2024

@apasel422 Can you elaborate on the problems so I can pester core devs with it?

from collect-rs.

apasel422 avatar apasel422 commented on September 24, 2024

@gankro Sure, let me organize my thoughts.

from collect-rs.

apasel422 avatar apasel422 commented on September 24, 2024

@gankro I may be wrong, actually. I thought there was an issue relating to "early" vs. "late" binding of the types that a comparator can compare, but maybe not. Let me submit a PR with my proposed changes to see how it turns out.

from collect-rs.

Gankra avatar Gankra commented on September 24, 2024

I'm currently trying to port it to associated types as well (need to learn this crap at some point)

from collect-rs.

Gankra avatar Gankra commented on September 24, 2024

(getting walled on TreeMap's Compare<K> + Compare<Q, K> bounds @_@)

from collect-rs.

apasel422 avatar apasel422 commented on September 24, 2024

I actually don't think associated types will work in general -- in particular, I think Borrow will be impossible to write.

from collect-rs.

Gankra avatar Gankra commented on September 24, 2024

How did a type ever satisfy these bounds anyway?

from collect-rs.

apasel422 avatar apasel422 commented on September 24, 2024

Do you mean Compare<K> + Compare<Q, K>? I don't know. It makes sense for it to be legal, but I don't know if rustc "officially" supports bounds like that yet.

In any case, see #76 for a fix.

from collect-rs.

reem avatar reem commented on September 24, 2024

I remember there being problems with doing something like Get<A> + Get<B>, but that was a while ago so it might have been fixed/changed.

from collect-rs.

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.