Skip to content

Minor grammatical edits; use preferred nomenclature consistently. - #3947

Closed
catseye wants to merge 1 commit into
rust-lang:masterfrom
catseye:tutorial-grammar-fixes
Closed

Minor grammatical edits; use preferred nomenclature consistently.#3947
catseye wants to merge 1 commit into
rust-lang:masterfrom
catseye:tutorial-grammar-fixes

Conversation

@catseye

Copy link
Copy Markdown

This change fixes a few things in the tutorial. Aside from the obvious minor grammatical edits:

  • It seems odd to list curl as a dependency and then recommend using wget to grab the tarball. Changed the command to curl -O.
  • The list of basic arithmetic operations was a mix of parts of speech; they are now all imperative verbs.
  • The tutorial has a section about the preferred terminology for the kinds of pointers, but subsequently occasionally uses the non-preferred terms "shared box" and "unique box"; these have been changed to "managed box" and "owned box".

@vertexclique

Copy link
Copy Markdown
Contributor

Yes I saw the wget think and I forgot the fix.

Mahmut Bulut
11 Kas 2012 18:29 tarihinde "catseye" notifications@github.com yazdý:

This change fixes a few things in the tutorial. Aside from the obvious
minor grammatical edits:

  • It seems odd to list curl as a dependency and then recommend using
    wget to grab the tarball. Changed the command to curl -O.
  • The list of basic arithmetic operations was a mix of parts of
    speech; they are now all imperative verbs.
  • The tutorial has a section about the preferred terminology for the
    kinds of pointers, but subsequently occasionally uses the non-preferred
    terms "shared box" and "unique box"; these have been changed to "managed
    box" and "owned box".

You can merge this Pull Request by running:

git pull https://github.com/catseye/rust tutorial-grammar-fixes

Or view, comment on, or merge it at:

#3947
Commit Summary

  • Minor grammatical edits; use preferred nomenclature consistently.

File Changes

  • M doc/tutorial.md (34)

Patch Links

@brson

Copy link
Copy Markdown
Contributor

Thanks! Is 'Cat's Eye Technologies' how you want to be listed in AUTHORS.txt?

@catseye

Copy link
Copy Markdown
Author

Please list me as Chris Pressey. (I should probably convert this account to an organization at some point...) Thanks.

@brsonbrson closed this Nov 13, 2012
@graydon

Copy link
Copy Markdown
Contributor

Thanks! Landing on incoming (in the future, please target changes at incoming branch, not master)

What email adress should we put next to your name?

@catseye

Copy link
Copy Markdown
Author

Thanks, I'll remember that. Please use the email address in the commit.

U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
5935: Rewrite import insertion r=matklad a=Veykril
This is my attempt at refactoring the import insertion rust-lang#3947. I hope what I created here is somewhat in line with what was requested, it wouldn't surprise me .
`common_prefix` is a copy from `merge_imports.rs` so those should be unified somewhere, `try_merge_trees` is also copied from there but slighly modified to take the `MergeBehaviour` enum into account.
`MergeBehaviour` should in the end become a configuration option, and the order if `ImportGroup` probably as well?
I'm not too familiar with the assist stuff and the like which is why I dont know what i have to do with `insert_use_statement` and `find_insert_use_container` for now.
I will most likely add more test cases in the end as well as I currently only tried to hit every path in `find_insert_position`. Some of the merge tests also fail atm due to them not sorting what they insert. There is also this test case I'm not sure if we want to support it. I would assume we want to? https://github.com/rust-analyzer/rust-analyzer/pull/5935/files#diff-6923916dd8bdd2f1ab4b984adacd265fR540-R547
The entire module was rewritten so looking at the the file itself is probably better than looking at the diff.
Regarding the sub issues of rust-lang#3947:
- rust-lang#3301: This is fixed with the rewrite, what this implementation does is that it scans through the first occurence of groupings and picks the appropriate one out. This means the user can actually rearrange the groupings on a per file basis to their liking. If a group isnt being found it is inserted according to the `ImportGroup` variant order(Would be nice if this was configurable I imagine).
- rust-lang#3831: This should be fixed with the introduced `MergeBehaviour` enum and it's `Last` variant.
- rust-lang#3946: This should also be [fixed](https://github.com/rust-analyzer/rust-analyzer/pull/5935/files#diff-6923916dd8bdd2f1ab4b984adacd265fR87)
- rust-lang#5795: This is fixed in the sense that the grouping search picks the first group that is of the same kind as the import that is being added. So if there is a random import in the middle of the program it should only be considered if there is no group of the same kind in the file already present.
- the last point in the list I havent checked yet, tho I got the feeling that it's not gonna be too simple as that will require knowledge of whether in this example `ast` is a crate or the module that is already imported.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Sign up for freeto 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

@catseye@vertexclique@brson@graydon@cpressey