kennytm
kennytm
the byte position is already stored in the `Utf8Error` has shown in OP's example code...
@EFanZh It is a known design that `x` and `{x}` behaves differently (esp. regarding borrow-check), but `x` and `(x)` always behaved the same until your proposed syntax.
the keyword `if` is currently in the follow-set of a `$:pat`: ```rust macro_rules! check_pat { ($p:pat) => { 1 }; ($p:pat if $e:expr) => { 2 }; } fn main()...
> There are other situations where it's useful, not involving if guards, for example > > ```rust > match foo { > A(_want_to_name_this_binding_explicitly_for_exhaustiveness_even_if_it_is_not_used) => { > // same logic >...
I don't see why this RFC and #3573 have to be put into an exclusive relationship. They can be both accepted or both rejected/postponed.
> should you write `plan is Plan::Regular(credits) if credits >= 100)` or `plan is Plan::Regular(credits) && credits >= 100`? How should parentheses be applied here? What does that mean? Easy,...
what functions besides `std::thread::sleep()` can be reliably marked as `#[diagnostic::blocking]`? * rust-lang/rust-clippy#4377 mentioned `println!()`. Though in general the std::io can be put into [non-blocking](https://doc.rust-lang.org/std/net/struct.TcpListener.html#method.set_nonblocking) [mode](https://doc.rust-lang.org/std/os/wasi/fs/trait.OpenOptionsExt.html#tymethod.nonblock). * `to_socket_addrs()` is also mentioned,...
> Using Read::read is perfectly non-blocking if you're doing polled IO. It's even explicitly supported in tokio via AsyncFd. I don't think you'll run the poll loop directly inside `async`context...
> one place where blocking should be allowed is in things like genawaiter, which is a library for making generators built on top of the async/await mechanism, where it's like...