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

Be slightly more precise about any::type_name()'s guarantees. #71870

Merged
merged 4 commits into from
May 14, 2020
Merged

Be slightly more precise about any::type_name()'s guarantees. #71870

merged 4 commits into from
May 14, 2020

Conversation

ltratt
Copy link
Contributor

@ltratt ltratt commented May 4, 2020

The first commit in this PR rephrases the current documentation for any::type_name() to be a little more specific about the guarantees (or lack thereof) that this function makes. The second commit explicitly documents that lifetimes are currently not included in the output (since this bit me particularly hard recently).

ltratt added 2 commits May 4, 2020 11:04
This attempts to be a little clearer (including in terminology) about the lack
of guarantees that any::type_name provides.
@rust-highfive
Copy link
Collaborator

r? @kennytm

(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 May 4, 2020
/// `"Option<String>"` or `"std::option::Option<std::string::String>"`, but not
/// `"foobar"`. In addition, the output may change between versions of the
/// compiler.
/// string retrned are not specified, other than being a best-effort description
Copy link
Contributor

Choose a reason for hiding this comment

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

returned?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mea culpa! Fixed in 876001c.

@joelpalmer joelpalmer added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 12, 2020
@ltratt
Copy link
Contributor Author

ltratt commented May 12, 2020

@kennytm I wondered if you've had a chance to have a look at this yet? [I appreciate that I will need to, at a minimum, squash away my typo before this could be merged, but that's probably looking ahead a little too far!]

src/libcore/any.rs Outdated Show resolved Hide resolved
@kennytm
Copy link
Member

kennytm commented May 12, 2020

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 12, 2020

📌 Commit 003ed80 has been approved by kennytm

@bors bors 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 May 12, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request May 13, 2020
… r=kennytm

Be slightly more precise about any::type_name()'s guarantees.

The first commit in this PR rephrases the current documentation for `any::type_name()` to be a little more specific about the guarantees (or lack thereof) that this function makes. The second commit explicitly documents that lifetimes are currently not included in the output (since this bit me particularly hard recently).
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request May 13, 2020
… r=kennytm

Be slightly more precise about any::type_name()'s guarantees.

The first commit in this PR rephrases the current documentation for `any::type_name()` to be a little more specific about the guarantees (or lack thereof) that this function makes. The second commit explicitly documents that lifetimes are currently not included in the output (since this bit me particularly hard recently).
bors added a commit to rust-lang-ci/rust that referenced this pull request May 14, 2020
Rollup of 12 pull requests

Successful merges:

 - rust-lang#71525 (`prefix` should not be mutable.)
 - rust-lang#71741 (Pointer printing: do not print 0 offset)
 - rust-lang#71870 (Be slightly more precise about any::type_name()'s guarantees.)
 - rust-lang#71909 (Document From trait for Option implementations)
 - rust-lang#71964 (Fix bootstrap failing on win32)
 - rust-lang#72137 (Clean up E0581 explanation)
 - rust-lang#72138 (Add doc comment for `rustc_middle::mir::mono::Linkage`)
 - rust-lang#72150 (Remove UnnormalizedProjection)
 - rust-lang#72151 (Update books)
 - rust-lang#72163 (docs: remove comment referencing non-existent method)
 - rust-lang#72169 (Clean up E0582 explanation)
 - rust-lang#72183 (Fix Arc::decr_strong_count doc test)

Failed merges:

r? @ghost
@bors bors merged commit 720ec68 into rust-lang:master May 14, 2020
@ltratt ltratt deleted the more_specific_type_name_doc branch April 11, 2021 08:51
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

6 participants