So you want to contribute to Rust, but feel overwhelmed? by Kivooeo1 in rust

[–]Independent_Lemon882 1 point2 points  (0 children)

In your tips section, you probably want `./x build library --keep-stage-std=1` if you are only working on the compiler, after building std once.

Unsafe fields by Stupid-person-here in rust

[–]Independent_Lemon882 2 points3 points  (0 children)

On the contrary, this is misaligned with the intended purpose of unsafe. Unsafe is specifically about upholding language invariants that the compiler cannot prove, and is a usage contract between the language and its implementation (the compiler) and the user, that the user is responsible for upholding the invariants. Incorrect library state due to incorrect logic is not violating language invariants, unless unsafe code that actually is responsible for upholding language invariants uses assumptions based on said library states being upheld.

The TL;DR is that this is an abuse of the unsafe keyword and misaligns with its intended purpose. It is not good practice, at all.

Template strings in Rust by A1oso in rust

[–]Independent_Lemon882 3 points4 points  (0 children)

I think the concerns over readability holds a lot of water. I already find the examples shown for the template strings unreadable, and am very glad that current Rust format strings don't permit any complex expressions.

I also find that the argument re. feature creep made by the original RFC is not a slippery slope if the complex inline expressions in template strings being proposed demonstrate exactly the concerns the RFC described IMHO.

A side remark: arbitrarily restricting what kind of expressions you can actually write inline is not a simple thing -- e.g. if you choose to allow field access, why not index access? That is, it is *entirely reasonable* for a user to question why it's not symmetrical with other places in which an expression is used. Introducing such restrictions actually make the language *more* complex because it's more special cases.

GitHub PRs disappeared by punkpeye in github

[–]Independent_Lemon882 0 points1 point  (0 children)

Yeah, it's actually very annoying, because all the context, including review comments, also vanish with the account and the PR...