Skip to content

start to document MIR borrow check #190

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

Merged
merged 6 commits into from
Sep 11, 2018

Conversation

nikomatsakis
Copy link
Contributor

Make an effort to start documenting the MIR borrow checker. In this first pass, all I managed to do was to write about move-paths and how they work.

Also, promote the borrow checker to its own top-level section.

Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reads well from a semi-outsiders perspective; very nice high level explanation.

Copy link
Member

@mark-i-m mark-i-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nikomatsakis!

LGTM :)

I left a few minor comments/nits below.

this type-check, we also uncover the region constraints that apply to
the program.


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intend to write more here? Could you leave a TODO?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if I did or not.

@nikomatsakis
Copy link
Contributor Author

I have to say, I also find our "long line" check pretty annoying.

@nikomatsakis
Copy link
Contributor Author

Seems like it should be more like a max limit of 90 or 100 or something.

@nikomatsakis
Copy link
Contributor Author

Or, at minimum, less annoying for me to check locally (there isn't a convenient command).

@nikomatsakis
Copy link
Contributor Author

ok, passes locally anyway...

@mark-i-m
Copy link
Member

mark-i-m commented Sep 7, 2018

@nikomatsakis

Or, at minimum, less annoying for me to check locally (there isn't a convenient command).

MAX_LINE_LENGTH=80 ./ci/check_line_lengths.sh src/**/*.md

I'm fine with making the line length longer.

@mark-i-m
Copy link
Member

mark-i-m commented Sep 7, 2018

If you want to make it 100 in this PR to make travis pass, I think that would be ok too...

@mark-i-m
Copy link
Member

@nikomatsakis I would like to merge #184, but this will require you to fix a bunch of links in this PR and in others. Would you prefer for me to wait?

@nikomatsakis
Copy link
Contributor Author

@mark-i-m ok I bumped to 100 so that summary.md can be committed (and just so that things are less irritating)

As for the upgrade, I guess it could go in any order, but I'd like to land these PRs, yes. What is the new link format?

@mark-i-m
Copy link
Member

New: Relative to the current file
Old: Absolute paths

For example, if you are editing appendix/glossary.md and you want to link to traits/lowering-rules.md:

New: ../traits/lowering-rules.md
Old: ./traits/lowering-rules.md

@nikomatsakis
Copy link
Contributor Author

@mark-i-m ah, nice. that confuses me all the time.

@nikomatsakis
Copy link
Contributor Author

well I'm game for either order. I would say this PR is ready to land.

@nikomatsakis nikomatsakis force-pushed the mir-borrow-check-1 branch 2 times, most recently from ca77bd5 to 7b9dcc4 Compare September 11, 2018 16:00
@nikomatsakis nikomatsakis merged commit d253f98 into rust-lang:master Sep 11, 2018
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.

5 participants