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

Trigger use_self lint in local macros #3627

Merged
merged 1 commit into from
Jan 5, 2019

Conversation

detrumi
Copy link
Member

@detrumi detrumi commented Jan 4, 2019

Closes #2098

The test currently only covers local macros. #2098 suggested this:

You could add the macro in question into the mini_macro subcrate

But that doesn't work for a macro_rules:

error: cannot export macro_rules! macros from a `proc-macro` crate type currently

So I suggest leaving out the test for external macros, as using in_external_macro seems straigtforward enough. Alternatives would be to use to add an additional crate (overkill if you ask me), or test with a proc-macro.

@flip1995 flip1995 added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jan 4, 2019
@phansch
Copy link
Member

phansch commented Jan 4, 2019

@bors r+ thanks!

@bors
Copy link
Contributor

bors commented Jan 4, 2019

📌 Commit 407ff74 has been approved by phansch

@bors
Copy link
Contributor

bors commented Jan 4, 2019

⌛ Testing commit 407ff74 with merge 546c0ba...

bors added a commit that referenced this pull request Jan 4, 2019
Trigger `use_self` lint in local macros

Closes #2098

The test currently only covers local macros. #2098 suggested this:
> You could add the macro in question into the `mini_macro` subcrate

But that doesn't work for a `macro_rules`:
```
error: cannot export macro_rules! macros from a `proc-macro` crate type currently
```

So I suggest leaving out the test for external macros, as using `in_external_macro` seems straigtforward enough. Alternatives would be to use to add an additional crate (overkill if you ask me), or test with a `proc-macro`.
@bors
Copy link
Contributor

bors commented Jan 4, 2019

💔 Test failed - status-travis

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

This should re-r+'ed after #3633 is merged

@phansch
Copy link
Member

phansch commented Jan 5, 2019

@bors retry

@bors
Copy link
Contributor

bors commented Jan 5, 2019

⌛ Testing commit 407ff74 with merge 1da1602...

bors added a commit that referenced this pull request Jan 5, 2019
Trigger `use_self` lint in local macros

Closes #2098

The test currently only covers local macros. #2098 suggested this:
> You could add the macro in question into the `mini_macro` subcrate

But that doesn't work for a `macro_rules`:
```
error: cannot export macro_rules! macros from a `proc-macro` crate type currently
```

So I suggest leaving out the test for external macros, as using `in_external_macro` seems straigtforward enough. Alternatives would be to use to add an additional crate (overkill if you ask me), or test with a `proc-macro`.
@bors
Copy link
Contributor

bors commented Jan 5, 2019

💔 Test failed - status-appveyor

@matthiaskrgr
Copy link
Member

@bors retry

@bors
Copy link
Contributor

bors commented Jan 5, 2019

⌛ Testing commit 407ff74 with merge d264e40...

bors added a commit that referenced this pull request Jan 5, 2019
Trigger `use_self` lint in local macros

Closes #2098

The test currently only covers local macros. #2098 suggested this:
> You could add the macro in question into the `mini_macro` subcrate

But that doesn't work for a `macro_rules`:
```
error: cannot export macro_rules! macros from a `proc-macro` crate type currently
```

So I suggest leaving out the test for external macros, as using `in_external_macro` seems straigtforward enough. Alternatives would be to use to add an additional crate (overkill if you ask me), or test with a `proc-macro`.
@bors
Copy link
Contributor

bors commented Jan 5, 2019

☀️ Test successful - status-appveyor, status-travis
Approved by: phansch
Pushing d264e40 to master...

@bors bors merged commit 407ff74 into rust-lang:master Jan 5, 2019
@detrumi detrumi deleted the use_self_local_macro branch January 5, 2019 09:44
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants