-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Add example, reference link for type
keyword.
#115053
docs: Add example, reference link for type
keyword.
#115053
Conversation
r? @cuviper (rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
82f4f83
to
0420d0f
Compare
I originally had an additional example with a |
This comment has been minimized.
This comment has been minimized.
0420d0f
to
5324570
Compare
Yeah, fyi, where clauses are not properly supported on type aliases. In a future edition they might be (currently available under |
@fmease Yes, it is slightly confusing after reading https://doc.rust-lang.org/reference/items/type-aliases.html and thinking they exist. :) |
Right, that's only the grammar. Syntactically they are allowed, semantically they are mostly ignored and warned against. I admit that it can be a bit confusing if you are not familiar with them. However the reference is correct, technically speaking ^^ |
Maybe it is better then if my PR doesn't link to the reference since it is more likely to be actively confusing. |
Hmm, I dunno. Personally I quite like it and these pages typically link to the Reference, so I guess it's fine. |
LGTM! @bors r+ rollup |
…d-docs, r=cuviper docs: Add example, reference link for `type` keyword. Fixes rust-lang#114281.
Rollup of 7 pull requests Successful merges: - rust-lang#114930 (Automatically add OS labels to std PRs) - rust-lang#115053 (docs: Add example, reference link for `type` keyword.) - rust-lang#115092 (Add generics_of to smir) - rust-lang#115096 (Add regression test for not `memcpy`ing padding bytes) - rust-lang#115100 (Add support for `ptr::write`s for the `invalid_reference_casting` lint) - rust-lang#115114 (Contents of reachable statics is reachable) - rust-lang#115122 (Fix clippy lint for identical `if`/`else` contraining `?` expressions) r? `@ghost` `@rustbot` modify labels: rollup
Fixes #114281.