Giter VIP home page Giter VIP logo

Comments (6)

estebank avatar estebank commented on June 20, 2024 1

I could have sworn there was a similar report about using to_string within an impl Display for from maybe 2017/2018, but can't find it 😅

@workingjubilee in the wild I've seen that simple cases where the chain repeats after just one or two jumps represent the bulk of them, so beyond the obfuscation issues, I'm convincing myself that a very limited call-graph analysis to look for unconditional recursivity is warranted. It's funny that it's always involving Display or Debug though 😄

Edit: found it #45838

from rust.

gftea avatar gftea commented on June 20, 2024 1

there is no use case for using : as standalone formatter, and it is better the compiler to emit error to use : as standalone formatter because it is likely user want to use :? but miss ? by mistake,

Unlikely to work, there's probably a crate out there that uses it, so it can't be removed due to backward compatibility guarantees.

can be a warnings?

from rust.

workingjubilee avatar workingjubilee commented on June 20, 2024

Macros, like the one you call there, are pretty good at obscuring these impl details, but yeah we should probably warn.

from rust.

so-schen avatar so-schen commented on June 20, 2024

And regarding the 2nd suggestion, what is your view

there is no use case for using : as standalone formatter, and it is better the compiler to emit error to use : as standalone formatter because it is likely user want to use :? but miss ? by mistake,

from rust.

tbu- avatar tbu- commented on June 20, 2024

there is no use case for using : as standalone formatter, and it is better the compiler to emit error to use : as standalone formatter because it is likely user want to use :? but miss ? by mistake,

Unlikely to work, there's probably a crate out there that uses it, so it can't be removed due to backward compatibility guarantees.

from rust.

workingjubilee avatar workingjubilee commented on June 20, 2024

Yes, we can lint on that. In fact we already lint on a few bad format_args! inputs.

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.