Rust-quiz 2024 version

I'm not related to it. It's just fun to see new quizzes/quirks, though there have been already many in daily discussions from forums/zuplichat/issues.

The solutions/explanations to some quizzes are incomplete, but there is an ongoing PR by @Nilstrieb .

For each Trait Solver Solution, I came up with these to try to make code compile:

  1. Rust Playground
  2. https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=b0a4bd525e14dc260bae8ed61fba274c
  3. unsolvable by user
  4. https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=a19d52f2feda107c8e703e44328b6e70
  5. unsolvable by user (possibly could be solved with negative_impls in the future)
  6. Rust Playground
  7. Rust Playground

I loved these quizzes, I'm happy to see there are people still working on them. Thank you everyone!

I remember seeing https://rust-lang.zulipchat.com/#narrow/stream/144729-t-types/topic/Method.20resolution.20non-idempotence and https://rust-lang.zulipchat.com/#narrow/stream/144729-t-types/topic/candidate.20winnowing.20quiz.20.3A3. Are there others too?

1 Like

Yeah, the linked zulipchat discussions are good candidates for rust-quiz.

I didn't intentionally collect any of them. I think some example codes from stack-borrows and tree-borrows desgin are also worth considering.

Issues from unsafe-code-guidelines and rust-lang repo usually provide specific topics with code. Like this one Document current justification for not requiring recursive reference validity (in particular, `&mut uninit` not being immediate UB) · Issue #346 · rust-lang/unsafe-code-guidelines · GitHub (though it's for two years)

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.