summary refs log tree commit diff
path: root/library/std/src/primitive_docs.rs
AgeCommit message (Collapse)AuthorLines
2021-04-29Ignore doctests in bootstrapest31-1/+2
On bootstrap the IntoIterator trait is not implemented yet for arrays.
2021-04-28Add a paragraph with possible alternatives on older editionsest31-0/+42
2021-04-26Point out that behavior might be switched on 2015 and 2018 editions too one dayest31-2/+4
2021-04-25Auto merge of #84147 - cuviper:array-method-dispatch, r=nikomatsakis,m-ou-sebors-20/+57
Cautiously add IntoIterator for arrays by value Add the attribute described in #84133, `#[rustc_skip_array_during_method_dispatch]`, which effectively hides a trait from method dispatch when the receiver type is an array. Then cherry-pick `IntoIterator for [T; N]` from #65819 and gate it with that attribute. Arrays can now be used as `IntoIterator` normally, but `array.into_iter()` has edition-dependent behavior, returning `slice::Iter` for 2015 and 2018 editions, or `array::IntoIter` for 2021 and later. r? `@nikomatsakis` cc `@LukasKalbertodt` `@rust-lang/libs`
2021-04-24Ignore array IntoIterator tests in bootstrapJosh Stone-2/+4
2021-04-19Update library/std/src/primitive_docs.rsTrevor Spiteri-2/+2
Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
2021-04-16doc: use U+2212 for minus sign in floating-point -0.0 remarksTrevor Spiteri-4/+4
Also remove plus sign in `-0.0 == +0.0` to make it a valid expression.
2021-04-16Document the edition behavior for array.into_iter()Josh Stone-0/+50
2021-04-16Adjust docs and tests for new `IntoIterator` impl for arraysLukas Kalbertodt-19/+4
2021-03-22Rephrase -0.0 docsJubilee Young-4/+4
2021-03-22Update signed fmt/-0f32 docsJubilee Young-3/+5
"semantic equivalence" is too strong a phrasing here, which is why actually explaining what kind of circumstances might produce a -0 was chosen instead.
2021-02-25Convert primitives to use intra-doc linksJoshua Nelson-3/+3
2021-01-03Auto merge of #80590 - camelid:bool-never-docs, r=nagisabors-6/+7
Update `bool` and `!` docs
2021-01-01always demands -> requiresCamelid-1/+1
2021-01-01Update `bool` and `!` docsCamelid-6/+7
2020-12-31Remove many unnecessary manual link resolves from libraryCamelid-3/+0
Now that #76934 has merged, we can remove a lot of these! E.g, this is no longer necessary: [`Vec<T>`]: Vec
2020-12-21Rollup merge of #80159 - jyn514:array, r=m-ou-seDylan DPC-1/+3
Add array search aliases Missed this in https://github.com/rust-lang/rust/pull/80068. This one will really fix https://github.com/rust-lang/rust/issues/46075. The last alias especially I'm a little unsure about - maybe fuzzy search should be fixed in rustdoc instead? Happy to make that change although I'd have to figure out how. r? ``@m-ou-se`` although cc ``@GuillaumeGomez`` for the search issue.
2020-12-19Rollup merge of #80068 - jyn514:mut-reference, r=m-ou-seYuki Okushi-0/+1
Add `&mut` as an alias for 'reference' primitive Closes https://github.com/rust-lang/rust/issues/46075.
2020-12-18Add array search aliasesJoshua Nelson-1/+3
2020-12-15Add `&mut` as an alias for 'reference' primitiveJoshua Nelson-0/+1
2020-12-11doc: apply suggestionsWilliam Woodruff-2/+3
2020-12-10doc(array,vec): add notes about side effects when empty-initializingWilliam Woodruff-0/+3
2020-12-02Use more std:: instead of core:: in docs for consistency, add more intra doc ↵Alexis Bourget-2/+2
links
2020-11-05Rollup merge of #78757 - camelid:crate-link-text, r=jyn514Mara Bos-6/+6
Improve and clean up some intra-doc links
2020-11-04Add missing commaCamelid-1/+1
'Note however,' -> 'Note, however,'
2020-11-04Clean up some intra-doc linksCamelid-5/+5
2020-11-04Move Copy and Clone into the list of traits implemented for all sizesest31-6/+3
2020-10-15Fix link to foreign calling conventionsMatthew Kraai-0/+2
2020-09-26Add doc alias for pointer primitiveGuillaume Gomez-0/+1
2020-09-03Rollup merge of #76164 - lzutao:slice-array, r=ehussDylan DPC-3/+3
Link to slice pattern in array docs Fix a todo in https://github.com/rust-lang/reference/issues/739#issuecomment-578408449
2020-08-31Break line at 100 charactersCamelid-2/+2
2020-08-31Improve `assert!` section in `bool` docsCamelid-2/+2
2020-08-31Improve wordingCamelid-2/+2
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-08-31Remove empty commentCamelid-1/+0
2020-08-31Redefine `Debug` instead of importing itCamelid-1/+4
This reverts commit 7e2548fe69ff5ec4e5e06c8c28351cbf2ebf7eee. Now I know why it was redefined: it seems like it's potentially because of the orphan rule. Here are the error messages: error[E0119]: conflicting implementations of trait `std::fmt::Debug` for type `!`: --> src/primitive_docs.rs:236:1 | 6 | impl Debug for ! { | ^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: - impl std::fmt::Debug for !; error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> src/primitive_docs.rs:236:1 | 6 | impl Debug for ! { | ^^^^^^^^^^^^^^^- | | | | | `!` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead
2020-08-31Link to slice pattern in array docsLzu Tao-3/+3
2020-08-30Explain why the `0` is a `u32`Camelid-2/+3
2020-08-30Import `Debug` instead of redefining itCamelid-4/+1
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