From 83c9f346cf80575b528349dc8bd8cb02f66fa763 Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Mon, 8 Aug 2022 17:07:46 -0300 Subject: Add another alternative --- 0000-struct-closure.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/0000-struct-closure.md b/0000-struct-closure.md index a2acb6a..938af87 100644 --- a/0000-struct-closure.md +++ b/0000-struct-closure.md @@ -147,7 +147,7 @@ except with `&char` instead of `char`. This proposal intentionally distinguishes closures from other kinds of callables, solely to fix the issue with our beloved `char::is_ascii*` family of functions. Given that the sole reason for this proposal is to fix that issue, -there's actually a huge range of possible alternatives. These are a couple of +there's actually a huge range of possible alternatives. These are a few examples: - We might be able to `impl Pattern for fn(&char) -> bool`. This does raise the @@ -164,6 +164,7 @@ examples: - There have been past discussions about potential "overlapping impls" as a way of solving this, but they never got very far and were quite underspecified. This proposal is much narrower in scope, so it shouldn't have those issues. +- Adding `std::char::is_ascii*` which take `char` is fragile at best. # Prior art [prior-art]: #prior-art -- cgit v1.2.3