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

Span note for last semicolon points at one space after the last expression rather than at the semicolon #11714

Closed
ktt3ja opened this issue Jan 22, 2014 · 2 comments · Fixed by #17199
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.

Comments

@ktt3ja
Copy link
Contributor

ktt3ja commented Jan 22, 2014

This function

fn blah() -> int {
    1  ;
}

yields the following messages:

test2.rs:2:6: 2:6 note: consider removing this semicolon:
test2.rs:2     1  ;
                ^
test2.rs:1:1: 3:2 error: not all control paths return a value
test2.rs:1 fn blah() -> int {
test2.rs:2     1  ;
test2.rs:3 }
error: aborting due to previous error
@huonw
Copy link
Member

huonw commented Jan 22, 2014

Mostly off-topic, but it seems like the note should go after the error. (e: filed as #13279)

@ftxqxd
Copy link
Contributor

ftxqxd commented Sep 12, 2014

I think this issue is fixed: the test case works as expected.

@alexcrichton alexcrichton added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Sep 12, 2014
bors added a commit that referenced this issue Sep 15, 2014
…hton

Closes #7813.
Closes #10902.
Closes #11374.
Closes #11714.
Closes #12920.
Closes #13202.
Closes #13624.
Closes #14039.
Closes #15730.
Closes #15783.
flip1995 pushed a commit to flip1995/rust that referenced this issue Nov 16, 2023
Fixes: rust-lang#11714
changelog: [`arc_with_non_send_sync`]: Suggest RC over unsafe impl

Co-authored-by: Alejandra González <[email protected]>
flip1995 pushed a commit to flip1995/rust that referenced this issue Nov 16, 2023
[arc_with_non_send_sync] Improve suggested resolution

Fixes: rust-lang#11714

Improved the lint message for [`arc_with_non_send_sync`] to suggest using `RC` unless user needs an Arc, then suggests wrapping in a mutex, and then suggests implementing `Sync` and `Send`.

---

changelog: [`arc_with_non_send_sync`]: Suggest RC over unsafe impl of Send and Sync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants