about summary refs log tree commit diff
path: root/library/std/src/primitive_docs.rs
AgeCommit message (Collapse)AuthorLines
2020-08-29other branch -> `else` branchCamelid-1/+1
2020-08-29Be more specific about polymorphic return typesCamelid-4/+4
I no longer say "polymorphic" since it's a bit ambiguous here.
2020-08-29Specify `0` of type `u32`Camelid-2/+2
2020-08-29It's only an issue without an `impl Trait for !`Camelid-4/+4
2020-08-29cannot have divergence -> cannot divergeCamelid-3/+3
2020-08-29Add info about `!` and `impl Trait`Camelid-2/+35
2020-08-26Merge conflict fix: disambiguate f32 -> prim@f32 and u32 -> prim@u32Surya Midatala-0/+2
2020-08-26Fix link to `f32`Joshua Nelson-1/+1
Co-authored-by: Oliver Middleton <olliemail27@gmail.com>
2020-08-26Use crate::mod to disambiguate linksSurya Midatala-4/+4
2020-08-26Add suggestions from code reviewSurya Midatala-6/+6
2020-08-26Add missed links in primitive_docs.rsSurya Midatala-2/+2
2020-08-26Move to intra-doc links for wasi/ext/fs.rs, os_str_bytes.rs, ↵Surya Midatala-115/+63
primitive_docs.rs & poison.rs
2020-08-23Auto merge of #75028 - MrModder:master, r=steveklabnikbors-0/+14
Document that slice refers to any pointer type to a sequence I was recently confused about the way slices are represented in memory. The necessary information was not available in the std-docs directly, but was a mix of different material from the reference and book. This PR should clear up the definition of slices a bit more in the documentation. Especially the fact that the term slice refers to the pointer/reference type, e.g. `&[T]`, and not `[T]`. It also documents that slice pointers are twice the size of pointers to `Sized` types, as this concept may be unfamiliar to users coming from other languages that do not have the concept of "fat pointers" (especially C/C++). I've documented why this was important to me and my findings in [this blog post](https://codecrash.me/understanding-rust-slices). r? @lcnr
2020-08-23Revert changed paragraph about slice definition.Leon Matthes-2/+2
This reverts part of commit e6c83dd57b920d2069797736ae0a1c9fe14a97cb. As requested by @steveklabnik .
2020-08-13Rollup merge of #75477 - RalfJung:fn-ptrs, r=Mark-SimulacrumTyler Mandry-9/+48
Expand function pointer docs Be more explicit in the ABI section, and add a section on how to obtain a function pointer, which can be somewhat confusing. Cc https://github.com/rust-lang/rust/issues/75239
2020-08-13fn type: structure, and talk a bit more about ABIs and how to create themRalf Jung-9/+48
2020-08-11Fix minor things in the `f32` primitive docsLukas Kalbertodt-5/+3
All of these were review comments in #74621 that I first fixed in that PR, but later accidentally overwrote by a force push.
2020-08-01Add missing import to RcLeon Matthes-0/+1
2020-08-01Add missing periodLeon Matthes-1/+1
2020-08-01Document that slice means pointer to a sequenceLeon Matthes-2/+15
Also document that slices are twice as large as pointers to Sized types
2020-07-28Improve `f32` and `f64` primitive documentationLukas Kalbertodt-3/+41
2020-07-27mv std libs to library/mark-0/+1110