about summary refs log tree commit diff
path: root/src/libcore/any.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-517/+0
2020-05-12Map to -> return.Laurence Tratt-1/+1
2020-05-04Fix typo.Laurence Tratt-2/+2
2020-05-04Document that lifetimes do not currently appear in any::type_name()'s output.Laurence Tratt-1/+3
2020-05-04Rephrase the any::type_name docs a bit.Laurence Tratt-7/+7
This attempts to be a little clearer (including in terminology) about the lack of guarantees that any::type_name provides.
2020-03-22get rid of ConstPropUnsupported; use ZST marker structs insteadRalf Jung-1/+1
2020-01-28Minor: note why we can rely on Any trait for safetyPeter Todd-2/+6
2020-01-18Rollup merge of #68342 - lcnr:type_name_docs, r=Dylan-DPCMazdak Farrokhzad-1/+5
improve type_name_of_val docs suggested by @Globidev in https://github.com/rust-lang/rust/issues/66359#issuecomment-575016612
2020-01-18improve type_name_of_val docslcnr/Bastian Kauschke-1/+5
2019-12-22Format the worldMark Rousskov-14/+10
2019-12-22Document why Any is not an unsafe traitMark Rousskov-0/+10
2019-12-21use _val to ignore parameter of any::type_name_of_valLzu Tao-2/+1
2019-12-18Propagate cfg bootstrapMark Rousskov-10/+3
2019-12-15fix doc commentlcnr/Bastian Kauschke-1/+1
2019-12-13Require stable/unstable annotations for the constness of all stable ↵Oliver Scherer-3/+6
functions with a `const` modifier
2019-11-29Minor documentation fixMikotochan-1/+1
Fixed the documentation for any as is a trait rather than a type.
2019-11-23Rollup merge of #65961 - lcnr:typename_of, r=Dylan-DPCMazdak Farrokhzad-1/+40
add fn type_name_of_val This function is often useful during testing and mirrors `align_of_val` and `size_of_val`. # Example Showing the default type of integers. ```rust let x = 7; println!("per default, integers have the type: {}", std::any::type_name_of_val(&x)); ``` To my knowledge this can currently not be done without defining a function similar to `type_name_of_val`.
2019-11-19add fn any::type_name_of_vallcnr/Bastian Kauschke-1/+40
2019-11-06Halloween... time to get rid of 👻Oliver Scherer-2/+2
2019-11-06Have tidy ensure that we document all `unsafe` blocks in libcoreOliver Scherer-0/+6
2019-10-16add example for type_nameLzu Tao-0/+9
2019-10-13Added code elementCerberuser-1/+1
Co-Authored-By: Jonas Schievink <jonasschievink@gmail.com>
2019-10-13Add `dyn` to `Any` documentationCerberuser-5/+5
I noticed that in documentation to `Any` trait the old trait object syntax is used, which could be confusing for newcomers, since we generally recommend using `dyn Trait` instead of just `Trait`. This PR changes the documentation comment, so that it uses `&dyn Any`, `&mut dyn Any` and `Box<dyn Any>`, correspondingly.
2019-10-01Remove unneeded `fn main` blocks from docsLzu Tao-56/+34
2019-09-06A few cosmetic improvements to code & comments in liballoc and libcoreAlexander Regueiro-3/+3
2019-08-14Handle cfg(bootstrap) throughoutMark Rousskov-5/+0
2019-07-29Add the necessary changes to any.rsTankhouseAle-1/+2
Specifically the `#[rustc_const_unstable(feature = "const_type_name")]` attribute, as well as marking the actual function as `const`.
2019-07-24Stabilize the type_name intrinsic in core::anySteven Fackler-0/+26
Closes rust-lang/rfcs#1428
2019-04-19libcore: deny more...Mazdak Farrokhzad-3/+3
2019-04-18libcore => 2018Taiki Endo-2/+2
2019-02-10tests: doc commentsAlexander Regueiro-3/+3
2019-01-22Stabilize Any::get_type_id and rename to type_idSimon Sapin-10/+6
FCP: https://github.com/rust-lang/rust/issues/27745#issuecomment-373906749
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-11-19Update any.rs documentation using keyword dyn0xrgb-11/+11
2018-07-25Enforce #![deny(bare_trait_objects)] in src/libcoreljedrz-8/+8
2018-07-03Any docs preposition changeEthan McCue-1/+1
This changes the docs referring to where a user should be wary of depending on "Any" trait impls from warning about relying on them "outside" of their code to warning about relying on them "inside" of their code.
2018-05-31Fix up Any doc examplesJeremy Fitzhardinge-3/+3
Make the Any+Send+Sync examples use the right trait bounds, and fix a small whitespace issue.
2018-05-31Add implementations for Any + Send + SyncJeremy Fitzhardinge-0/+90
Implement `is`, `downcast_ref`, `downcast_mut` and `Debug` for `Any + Send + Sync`.
2018-02-20stage0 cfg cleanupMark Simulacrum-26/+0
2018-02-01Turn `type_id` into a constant intrinsicBadel2-0/+27
Add rustc_const_unstable attribute for `any::TypeId::of` Add test for `const fn TypeId::of`
2017-03-22Various fixes to wording consistency in the docsStjepan Glavina-1/+1
2017-02-14Auto merge of #38981 - sdleffler:patch-1, r=alexcrichtonbors-1/+5
Add PartialOrd, Ord derivations to TypeId I want to be able to sort a `Vec` of types which contain `TypeId`s, so an `Ord` derivation would be very useful to me. `Hash` and `PartialEq`/`Eq` already exist, so the missing `PartialOrd` and `Ord` derivations feel like an oversight to me.
2017-01-17Add warning about varying hashes/orderingsSean Leffler-0/+4
2017-01-13Change `to_owned` to `to_string` in docsStjepan Glavina-8/+8
We should teach conversion from `str` to `String` using `to_string` rather than the legacy `to_owned`.
2017-01-10Add PartialOrd, Ord derivations to TypeIdSean Leffler-1/+1
I want to be able to sort a `Vec` of types which contain `TypeId`s, so an `Ord` derivation would be very useful to me. `Hash` already exists, so the missing `PartialOrd` and `Ord` derivations feel like an oversight to me.
2016-10-17Add stable example to TypeIdJethro Beekman-4/+2
2016-10-12Deprecate `Reflect`Nick Cameron-4/+3
[tracking issue](https://github.com/rust-lang/rust/issues/27749)
2016-08-26Replace unnecessary uses of `TraitObject` with castsAndrew Paseltiner-12/+2
2016-08-24Use `#[prelude_import]` in `libcore`.Jeffrey Seyfried-3/+1