Comments (6)
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.
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.
Macros, like the one you call there, are pretty good at obscuring these impl details, but yeah we should probably warn.
from rust.
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.
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.
Yes, we can lint on that. In fact we already lint on a few bad format_args!
inputs.
from rust.
Related Issues (20)
- fatal runtime error: assertion failed: output.write(&bytes).is_ok() HOT 6
- With submodules=true, using `./x.py fmt` as a git hook makes bootstrap delete all submodules
- ICE: `unexpected type encountered in variance inference` in `rustc_hir_analysis/src/variance/constraints.rs` HOT 2
- Tracking Issue for `const_binary_heap_new_in`
- Tracking Issue for `core::iter::chain`
- Tracking Issue for `os_string_pathbuf_leak`
- Compiler error while compiling iroh HOT 1
- bulid panic HOT 2
- `dropping_references` lint triggers even for mutable references HOT 11
- rustdoc-json-types: Use different repr for Constant in Item and Type position HOT 3
- ConstContext::Maybe must have host effect param HOT 1
- Stabilization PR HOT 1
- Tracking Issue for XXX
- Expand list of trait implementers in E0277 when calling `rustc` with `--verbose` HOT 2
- keyword-idents-2024 unable to migrate loop labels or lifetimes HOT 1
- rustdoc: Consider ways to make UI development cycle faster HOT 7
- ICE: `polonius loan scopes differ from NLL borrow scopes` HOT 6
- rustdoc: search for type alias says "type X not found, showing type X instead"
- Very bad performance of `cargo check` on generic code HOT 5
- Suggest changing `main`s return type on E0277 (`?` / `from_residual`)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.