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

Rename Span::default -> Span::def_site #45999

Merged
merged 1 commit into from
Nov 18, 2017
Merged

Conversation

jseyfried
Copy link
Contributor

I think the explicitness here is warranted.
c.f. #45934
r? @nrc

@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 15, 2017
@gereeter
Copy link
Contributor

Bikeshedding: I think the expanded default_site is more clear than def_site.

@Mark-Simulacrum
Copy link
Member

I thought def_site expanded to definition_site?

@gereeter
Copy link
Contributor

Oh. Well, I don't know what I'm talking about, clearly, but I think that confusion is itself evidence that it should be the longer name.

@Mark-Simulacrum
Copy link
Member

To be clear, I don't either -- I do agree that longer names would be helpful.

@nrc
Copy link
Member

nrc commented Nov 16, 2017

def_site seems fine to me, definition_site is kinda better but it is pretty unwieldy. I expect we'll re-visit these names before stabilising and either we'll use def_site widely so that it will be a well-known term for macro authors, or we'll change the name

Copy link
Member

@nrc nrc left a comment

Choose a reason for hiding this comment

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

@bors r+

@nrc nrc added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 16, 2017
@nrc
Copy link
Member

nrc commented Nov 16, 2017

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 16, 2017

📌 Commit 74cc1fd has been approved by nrc

@bors
Copy link
Contributor

bors commented Nov 18, 2017

⌛ Testing commit 74cc1fd with merge 859c716...

bors added a commit that referenced this pull request Nov 18, 2017
Rename `Span::default` -> `Span::def_site`

I think the explicitness here is warranted.
c.f. #45934
r? @nrc
@bors
Copy link
Contributor

bors commented Nov 18, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: nrc
Pushing 859c716 to master...

@bors bors merged commit 74cc1fd into rust-lang:master Nov 18, 2017
@jseyfried jseyfried deleted the def_site_span branch November 19, 2017 06:55
@lambda-fairy
Copy link
Contributor

I expect we'll re-visit these names before stabilising and either we'll use def_site widely so that it will be a well-known term for macro authors, or we'll change the name

As a data point: my 616-line proc macro uses Span::def_site exactly once.

My suspicion is that most users will use Span::def_site indirectly through quote!, rather than calling it themselves. So using a longer name would be okay.

I'm happy to wait for stabilization before bikeshedding that though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants