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

tutorial: documentation on mut #5721

Closed
wants to merge 4 commits into from
Closed

tutorial: documentation on mut #5721

wants to merge 4 commits into from

Conversation

dhardy
Copy link
Contributor

@dhardy dhardy commented Apr 4, 2013

This is some stuff which seemed to be missing to me (though I haven't read everything yet so hope I haven't missed the relevant section).

A similar addition for borrowing handles is needed, but #5720 stumped me.

Comments welcome.

@dhardy
Copy link
Contributor Author

dhardy commented Apr 5, 2013

Pushed another commit which should fix the spelling and failing test (I hope).

So example code is automatically tested... is there any way of running just the relevant tests before committing? (Running the whole lot takes too long.)

@graydon
Copy link
Contributor

graydon commented Apr 5, 2013

Re running a subset of tests: yes. make check-stage[N]-doc, as mentioned in https://github.com/mozilla/rust/wiki/Note-testsuite

bors added a commit that referenced this pull request Apr 6, 2013
This is some stuff which seemed to be missing to me (though I haven't read everything yet so hope I haven't missed the relevant section).

A similar addition for borrowing handles is needed, but #5720 stumped me.

Comments welcome.
@bors bors closed this Apr 6, 2013
djkoloski pushed a commit to djkoloski/rust that referenced this pull request Sep 21, 2022
Migrate write.rs to a late pass

changelog: Migrates write.rs from a pre expansion pass to a late pass
changelog: [`positional_named_format_parameters`] is renamed in favour of the rustc lint `named_arguments_used_positionally`

- Macros are now identified by diagnostic items, so will no longer lint user defined macros named, e.g. a custom `print!`
- `print_literal`/`write_literal` no longer lint no longer lint literals that come from macro expansions, e.g. `env!("FOO")`
- `print_with_newline`/`write_with_newline` no longer lint strings with any internal `\r` or `\n`s

~~A false negative, `print_literal`/`write_literal` don't lint format strings that produce `FormatSpec`s, e.g. ones containing pretty print/width/align specifiers~~

Suggestion changes:
- ~~`print_literal`/`write_literal` no longer have suggestions, as the spans for the `{}`s were not easily obtainable~~
-  `print_with_newline`/`write_with_newline` has a better suggestion for a sole literal newline, but no longer has suggestions for len > 1 strings that end in a literal newline
- ~~`use_debug` spans are less precise, now point to the whole format string~~

The diff for write.rs is pretty unwieldy, other than for the `declare_clippy_lint!`s I think you'd be better off viewing it as a brand new file rather than looking at the diff, as it's mostly written from scratch

cc rust-lang#6610, fixes rust-lang#5721, fixes rust-lang#7195, fixes rust-lang#8615
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.

3 participants