dtolnay / dtolnay/rust-quiz

Infinitely recursive `dyn`

Open
#90 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.9k
Forks
68
PR merge metrics
No merged PRs in 30d

Description

As discovered by @theemathas at https://github.com/rust-lang/rust/issues/142900#issuecomment-2994854291, the following compiles:

```rust
trait Trait: Sync {}

impl Trait for &dyn Trait {}

static X: &dyn Trait = &X;
```

Perhaps this is too obscure even for the quiz, but I’m sure it’s possible to make a fun question based on this trick.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by compiling the Rust example from the issue and reviewing the repository's existing quiz questions and explanations for their format and difficulty. Develop a question around the infinitely recursive dyn behavior, with an explanation that makes the trick understandable; done means a suitable quiz entry is proposed or added.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
content
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.