Giter VIP home page Giter VIP logo

Comments (4)

danielhenrymantilla avatar danielhenrymantilla commented on July 25, 2024 3

Thanks for improving my poor issue title 😄 @fmease 🙏

from rust.

fmease avatar fmease commented on July 25, 2024 2

NB By the way, lazy_type_alias implements the desired semantics. See its tracking issue: #112792.

CC #21903.

from rust.

fmease avatar fmease commented on July 25, 2024 1

Right, that makes sense (I just had to do some advertising :P).

Yeah, the lint isn't super smart atm. This isn't the only case where bounds on type parameters of (eager) type aliases actually have a user-visible effect. Outlives-bounds for example may affect trait object lifetime defaults (we have an A-lint issue for that somewhere).

from rust.

danielhenrymantilla avatar danielhenrymantilla commented on July 25, 2024

Good to know there is progress on the "make type aliases work as expected" front 🙂.

But to avoid confusion, I do want to clarify that this is not what this issue is about, this one is a diagnostics issue, w.r.t. how type aliases currently work. That is, when using <T as Trait>::Assoc in the rhs of a type alias, this already, currently, enforces that T : ?Sized + Trait be true (and when Trait : Sized, we end up with T : Trait).
Given that, we should be allowed to add such bounds without having Rust warn us about our bounds being ignored, because given the rhs, they cannot be.

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.