Skip to content

insignificant fix to rust manual and tutorial #12362

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

Closed
wants to merge 1 commit into from

Conversation

liigo
Copy link
Contributor

@liigo liigo commented Feb 18, 2014

change extern mod to extern crate, package id to crate id, and some lines wrapping fix, etc.

@@ -1627,7 +1627,7 @@ pub mod submodule {
fn my_implementation() {}

#[cfg(test)]
mod test {
mod tests {
Copy link
Member

Choose a reason for hiding this comment

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

Any particular reason for this? mod test seems to be more common in the source tree.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sfackler After #12343 landed, there is a libtest, I worries it maybe conflict with local mod test. Anyhow, mod tests is a great name too, it was used 75 times in the source tree, while the number of mod test is 74. Yes, mod tests is more commonly used.

@alexcrichton
Copy link
Member

This diff is a little convoluted with things like mod test => mod tests and lots of line wrapping changes, could you rebase out all the unassociated changes from what's actually being modified as part of this PR?

@liigo
Copy link
Contributor Author

liigo commented Feb 18, 2014

All the changes in this PR are "insignificant fix", as the title described. I don't think we need another "insignificant fix" PR to just rename a word or change lines wrapping.

@pnkfelix
Copy link
Member

I don't know what "mirror fix" means. (Googling "mirror fix" was ... interesting...)

update: did you mean to say "minor fix" ? I was honestly confused.

@liigo
Copy link
Contributor Author

liigo commented Feb 19, 2014

@pnkfelix Sorry! My fault. I means "insignificant fix". Updated and rebased.

@liigo
Copy link
Contributor Author

liigo commented Feb 21, 2014

@alexcrichton I've changed back mod test. And for the line wrapping changes, I think they really need to be fixed. r?

bors added a commit that referenced this pull request Feb 21, 2014
change `extern mod` to `extern crate`, `package id` to `crate id`, and some lines wrapping fix, etc.
@bors bors closed this Feb 21, 2014
flip1995 pushed a commit to flip1995/rust that referenced this pull request Mar 7, 2024
[`map_entry`]: Check insert expression for map use

The lint makes sure that the map is not used (borrowed) before the call to `insert`. Since the lint creates a mutable borrow on the map with the `Entry`, it wouldn't be possible to replace such code with `Entry`. However, expressions up to the `insert` call are checked, but not expressions for the arguments of the `insert` call itself. This commit fixes that.

Fixes rust-lang#11935

----

changelog: [`map_entry`]: Fix false positive when borrowing the map in the `insert` call
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