Stream: t-compiler

Topic: StringReader::with_str_from_to


matklad (Jun 18 2019 at 13:58, on Zulip):

@Vadim Petrochenkov am I correct that the closure-based API of with_str_from_to is a historical accident, and we should just change that to

fn str_from_to<T, F>(&self) -> &str

?

matklad (Jun 18 2019 at 13:58, on Zulip):

This one: https://github.com/rust-lang/rust/blob/03769411561f3d282bfeb0e86ca38d898f02cbdb/src/libsyntax/parse/lexer/mod.rs#L345-L351

matklad (Jun 18 2019 at 13:59, on Zulip):

(I am back to hacking on that lexer-rewrite PR)

Vadim Petrochenkov (Jun 18 2019 at 14:06, on Zulip):

Yes, it should be able to just return a &str.

Vadim Petrochenkov (Jun 18 2019 at 14:07, on Zulip):

I remember I've seen it before, but for forgot to put it into the list of things to fix.

Last update: Nov 22 2019 at 04:55UTC