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)
- ICE: `None` in trait codegen HOT 1
- ICE: `expanded a dummy bang macro` HOT 1
- ICE: `Unexpected type for 'Ref' constructor: *const &'{erased} ()` HOT 2
- Inconsistent handling of `#[coverage(..)]` attributes that are malformed or misplaced HOT 1
- Bad codegen using `u8/u16::leading_ones`
- Infinite loop in type inference HOT 3
- ICE: `assertion left == right failed` in `rustc_const_eval/src/interpret/cast.rs` HOT 1
- ICE: `OpaqueCast unexpected because it isn't captured` in `rustc_middle/src/ty/closure.rs` HOT 1
- ICE: `encountered errors when checking RPITIT refinement (resolution)` in `rustc_hir_analysis/src/check/compare_impl_item/refine.rs` HOT 2
- MC/DC LLVM 19 intrinsics changes HOT 6
- mut in slice pattern: `[_, mut @ ..] = &[...]` is not needed? HOT 2
- ICE: `unhandled type: Alias(...)` in `rustc_mir_transform/src/validate.rs` when `[mir_built]` HOT 2
- `-Zoom=panic` double panic due to panicking allocating HOT 3
- Regression in type inference between stable 1.79.0 and nightly-2024-06-19 HOT 5
- std::ptr::copy_nonoverlapping failing on windows HOT 3
- Should we make lint against fallback affecting unsafe code a hard error in Rust 2024?
- Confusing error when name for macro definition (`macro_rules!`) is missing
- Tracking Issue for `array::repeat`
- ICE: `collection encountered polymorphic constant: Ty(..)` HOT 4
- Dead code pass no longer considers enum used in `pub extern "C" fn` as used HOT 1
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.