Skip to content

Add doc for checking if type defines specific method #5674

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

Merged
merged 1 commit into from
Jun 6, 2020

Conversation

ThibsG
Copy link
Contributor

@ThibsG ThibsG commented Jun 1, 2020

This PR adds documentation on how:

  • check if a type defines a specific method
  • check an expr is calling a specific method

closes: #3843

changelog: none

@rust-highfive
Copy link

r? @yaahc

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 1, 2020
Copy link
Member

@yaahc yaahc left a comment

Choose a reason for hiding this comment

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

LGTM, just some minor lints.

cc @flip1995

@ThibsG ThibsG force-pushed the DocTypeDefinesMethod branch from 04b029c to 9e89ba9 Compare June 1, 2020 17:10
Copy link
Member

@yaahc yaahc left a comment

Choose a reason for hiding this comment

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

Comment on lines +108 to +110
# Checking if a type defines a specific method

To check if our type defines a method called `some_method`:
Copy link
Member

Choose a reason for hiding this comment

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

r? @phansch

Was this what you had in mind for this part of the documentation?

Copy link
Member

Choose a reason for hiding this comment

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

Yup, LGTM!

@phansch
Copy link
Member

phansch commented Jun 6, 2020

@bors r=yaahc,phansch,flip1995

@bors
Copy link
Contributor

bors commented Jun 6, 2020

📌 Commit 9e89ba9 has been approved by yaahc,phansch,flip1995

@bors
Copy link
Contributor

bors commented Jun 6, 2020

⌛ Testing commit 9e89ba9 with merge 5699672...

@bors
Copy link
Contributor

bors commented Jun 6, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: yaahc,phansch,flip1995
Pushing 5699672 to master...

@bors bors merged commit 5699672 into rust-lang:master Jun 6, 2020
@ThibsG ThibsG deleted the DocTypeDefinesMethod branch June 6, 2020 11:12
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.

Docs: Create a page with info on how to do common things
6 participants