Skip to content

docs: clarify AsRef and AsMut exercise - #2435

Closed
fuentez145 wants to merge 1 commit into
rust-lang:mainfrom
fuentez145:docs/clarify-as-ref-as-mut-exercise
Closed

docs: clarify AsRef and AsMut exercise#2435
fuentez145 wants to merge 1 commit into
rust-lang:mainfrom
fuentez145:docs/clarify-as-ref-as-mut-exercise

Conversation

@fuentez145

Copy link
Copy Markdown

Summary

  • Clarify how AsRef and AsMut let functions accept different input types.
  • Explain the AsRef<str> and AsMut<u32> bounds in conversions5.
  • Add a short practical explanation to the conversions README.
  • Keep the exercise comments synchronized with the solution.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy -- --deny warnings
  • cargo test --workspace
  • cargo dev check --require-solutions
  • git diff --check

Closes #2199

@senekor

senekor commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Please clarify your use of LLMs when creating this PR.

@fuentez145

Copy link
Copy Markdown
Author

I used GPT Luna to help me investigate issue #2199 and draft the documentation changes. I reviewed the suggestions myself, made the final edits, and verified the changes with the local Rustlings checks. All GitHub Actions checks also passed.

@mo8it mo8it closed this Aug 11, 2026
@mo8it

mo8it commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

I prefer documentation to be written by humans. I don't like the explanation provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Confusion about as_ref_mut

3 participants