Skip to content

Improve the librustc on-demand/query API ergonomics. #41504

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 3 commits into from
Apr 26, 2017

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Apr 24, 2017

Queries are now performed through these two forms:

  • tcx.type_of(def_id) (the most common usage)
  • tcx.at(span).type_of(def_id) (to provide a more specific location in the cycle stack)

Several queries were renamed to work better as method names, i.e. by suffixing with _of.

r? @nikomatsakis

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 24, 2017

📌 Commit decf759 has been approved by nikomatsakis

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 24, 2017
Improve the librustc on-demand/query API ergonomics.

Queries are now performed through these two forms:
* `tcx.type_of(def_id)` (the most common usage)
* `tcx.at(span).type_of(def_id)` (to provide a more specific location in the cycle stack)

Several queries were renamed to work better as method names, i.e. by suffixing with `_of`.

r? @nikomatsakis
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 24, 2017
Improve the librustc on-demand/query API ergonomics.

Queries are now performed through these two forms:
* `tcx.type_of(def_id)` (the most common usage)
* `tcx.at(span).type_of(def_id)` (to provide a more specific location in the cycle stack)

Several queries were renamed to work better as method names, i.e. by suffixing with `_of`.

r? @nikomatsakis
@eddyb
Copy link
Member Author

eddyb commented Apr 26, 2017

@bors p=1 Let's merge this before it breaks!

@bors
Copy link
Collaborator

bors commented Apr 26, 2017

⌛ Testing commit decf759 with merge b0a4074...

bors added a commit that referenced this pull request Apr 26, 2017
Improve the librustc on-demand/query API ergonomics.

Queries are now performed through these two forms:
* `tcx.type_of(def_id)` (the most common usage)
* `tcx.at(span).type_of(def_id)` (to provide a more specific location in the cycle stack)

Several queries were renamed to work better as method names, i.e. by suffixing with `_of`.

r? @nikomatsakis
@bors
Copy link
Collaborator

bors commented Apr 26, 2017

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants