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

Fix example in 13.3 #4262

Closed
wants to merge 1 commit into from

Conversation

ejholmes
Copy link
Contributor

Before this fix, compiling produced the following error:

main.rs:3:24: 3:52 error: binary operation + cannot be applied to type `&static/str`
main.rs:3 fn main() { io::println("hello " + world::explore()); }
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error

@catamorphism
Copy link
Contributor

Thanks! can you remove the {.xfail-test} directive as well? (That was keeping this test from being compiled when the build process extracts tests from the docs, but now we don't need it since you've fixed the example.)

@ejholmes
Copy link
Contributor Author

Will do, do you want this on the incoming branch as well?

@catamorphism
Copy link
Contributor

Yes, see https://github.com/mozilla/rust/wiki/Note-development-policy (though we could do a better job of making that page easier to find...)

@ejholmes
Copy link
Contributor Author

Indeed, might I suggest adding a CONTRIBUTING.md file in the root? GitHub will make it visible in the header when someone starts opening a new PR.

@ejholmes ejholmes closed this Dec 23, 2012
@ejholmes ejholmes mentioned this pull request Dec 23, 2012
@catamorphism
Copy link
Contributor

Good idea -- I opened #4273 to do that.

calebcartwright pushed a commit to calebcartwright/rust that referenced this pull request Mar 30, 2022
* Fix newlines in JSON output

This changes the JSON output to be more consistent about where newlines are included. Previously it only included them between lines in a multiline diff. That meant single line changes were treated a bit weirdly. This changes it to append a newline to every line.

When feeding the results into `arc lint` this behaves correctly. I have only done limited testing though, in particular there's a possibility it might not work with files with `\r\n` endings (though that would have been the case before too).

Fixes rust-lang#4259

* Update tests
# Conflicts:
#	tests/writemode/target/output.json
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.

2 participants