Skip to content
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

Move the (duplicate) lists of rules to the reference #279

Open
JohnTitor opened this issue Jun 16, 2021 · 4 comments
Open

Move the (duplicate) lists of rules to the reference #279

JohnTitor opened this issue Jun 16, 2021 · 4 comments
Labels

Comments

@JohnTitor
Copy link
Member

As noted in #230 (comment), we have some duplicate lists of the rules between the nomicon and the reference, and Eric and I would like to defer them to the reference.

So, we should:

  • Collects the current lists
  • Checks if the reference has it
    • If not, prepares a PR for it
  • Removes it from the nomicon and adds a link to the reference

@ehuss is the above what you meant?

cc @rust-lang/lang-docs feel free to drop your thoughts, any suggestions are welcome!

@ehuss
Copy link
Contributor

ehuss commented Jun 17, 2021

Yea, that's probably reasonable, though I'm uncertain. I don't think it's terribly bad if there is some duplication, the main concern is that we don't have the resources to keep things in sync, and in general that is a hassle for people contributing. Unfortunately, removing it from the nomicon can make reading it a little harder since you would need to head over to the reference to find the actual information.

I would suggest if removing stuff to do it carefully. Make sure the information is complete in the reference, and that it doesn't gut the nomicon too much. For example, the coercions page could remove the list of rules, but keep a high-level discussion and a good suite of examples. A rule of thumb is that the reference generally doesn't explain the "why" of anything in the language. It doesn't explain why you would want to coerce, or when it is useful or important or necessary. That seems like a better fit for the nomicon.

Some of the duplication I see is:

@JohnTitor
Copy link
Member Author

Yeah, I agree with removing may overdo cleanup. So, adding a note saying "this list may be outdated, see the reference for a more accurate list" is enough here?

@Gankra
Copy link
Contributor

Gankra commented Jun 22, 2021

Coercions and Casting were both originally written in the context of "the reference is dead, I need to be the reference", so they can be happily moved to the reference. The list of unsafe/UB things I think is definitely worth mirroring in the nomicon, since it's kind of a fundamental pretext for everything we're doing, although that page is getting a bit unwieldy as we more precisely define things.

@JohnTitor JohnTitor changed the title Move the lists of rules to the reference Move the (duplicate) lists of rules to the reference Aug 30, 2021
@JohnTitor
Copy link
Member Author

Another one about lifetime elision: #306 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants