Skip to content

Commit 75894bf

Browse files
authored
Merge pull request #1086 from tyilo/patch-2
Use `const fn` consistently before `?const fn` is introduced
2 parents ebc9821 + 25140a2 commit 75894bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

posts/inside-rust/2023-02-23-keyword-generics-progress-report-feb-2023.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ trait ?const ?async Read {
183183
}
184184

185185
/// Read from a reader into a string.
186-
?const ?async fn read_to_string(reader: &mut impl ?const ?async Read) -> io::Result<String> {
186+
const ?async fn read_to_string(reader: &mut impl ?const ?async Read) -> io::Result<String> {
187187
let mut string = String::new();
188188
reader.read_to_string(&mut string).await?;
189189
Ok(string)
@@ -192,7 +192,7 @@ trait ?const ?async Read {
192192

193193
That's sure starting to feel like a lot of keywords, right? We've accurately
194194
described exactly what's going on, but there's a lot of repetition. We know that
195-
if we're dealing with a `?const ?async fn`, most arguments probably will also
195+
if we're dealing with a `const ?async fn`, most arguments probably will
196196
want to be `?const ?async`. But under the syntax rules we've proposed so far,
197197
you'd end up repeating that everywhere. And it probably gets worse once we start
198198
adding in more keywords. Not ideal!

0 commit comments

Comments
 (0)