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

false positives fixes of implicit_return #4274

Merged
merged 3 commits into from
Jul 18, 2019
Merged

false positives fixes of implicit_return #4274

merged 3 commits into from
Jul 18, 2019

Conversation

daxpedda
Copy link
Contributor

@daxpedda daxpedda commented Jul 15, 2019

  • Handle returning macro statements properly (remove "this error originates in a macro outside of the current crate")
  • Handle functions that return never type
  • Handle functions that panic but do not return never type

changelog: Fix false positives in implicit_return lint pertaining to macros and panics

-  Handle returning macro statements properly
-  Handle functions that return never type
-  Handle functions that panic but do not return never type
Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

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

LGTM. Is there a specific issue for this or is this something you found and immediately fixed?

I'm just concerned about the return panic!(), see below.

tests/ui/implicit_return.stderr Outdated Show resolved Hide resolved
@daxpedda
Copy link
Contributor Author

Is there a specific issue for this or is this something you found and immediately fixed?

No issue as far as I've seen, just fixed it.

@matthiaskrgr matthiaskrgr added the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label Jul 16, 2019
Abstracted repeating strings into statics.
@flip1995 flip1995 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Jul 17, 2019
@flip1995
Copy link
Member

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Jul 18, 2019

📌 Commit 9e5e0f8 has been approved by flip1995

@bors
Copy link
Contributor

bors commented Jul 18, 2019

⌛ Testing commit 9e5e0f8 with merge 5f6593f...

bors added a commit that referenced this pull request Jul 18, 2019
false positives fixes of `implicit_return`

-  Handle returning macro statements properly (remove "this error originates in a macro outside of the current crate")
-  Handle functions that return never type
-  Handle functions that panic but do not return never type

changelog: Fix false positives in `implicit_return` lint pertaining to macros, panics and never return type
@bors
Copy link
Contributor

bors commented Jul 18, 2019

💔 Test failed - status-appveyor

@phansch
Copy link
Member

phansch commented Jul 18, 2019

@bors retry

@bors
Copy link
Contributor

bors commented Jul 18, 2019

⌛ Testing commit 9e5e0f8 with merge d509b5a...

bors added a commit that referenced this pull request Jul 18, 2019
false positives fixes of `implicit_return`

-  Handle returning macro statements properly (remove "this error originates in a macro outside of the current crate")
-  Handle functions that return never type
-  Handle functions that panic but do not return never type

changelog: Fix false positives in `implicit_return` lint pertaining to macros and panics
@bors
Copy link
Contributor

bors commented Jul 18, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: flip1995
Pushing d509b5a to master...

@bors bors merged commit 9e5e0f8 into rust-lang:master Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants