about summary refs log tree commit diff
path: root/src/libcore/convert/mod.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-760/+0
2020-07-23Rollup merge of #74141 - euclio:typos, r=steveklabnikManish Goregaokar-1/+1
libstd/libcore: fix various typos
2020-07-16Rollup merge of #73421 - janikrabe:master, r=joshtriplettManish Goregaokar-4/+7
Clarify effect of orphan rule changes on From/Into Updated documentation for `std::convert` and `std::convert::From` to reflect changes to orphan rule in Rust 1.41. It should no longer be necessary to implement `Into` directly, unless targeting an older version. r? @steveklabnik
2020-07-15Clarify effect of orphan rule changes on From/IntoJanik Rabe-4/+7
Updated documentation for `std::convert` and `std::convert::From` to reflect changes to orphan rule in Rust 1.41. It should no longer be necessary to implement Into directly, unless targeting an older version.
2020-07-09libstd/libcore: fix various typosAndy Russell-1/+1
2020-06-15Tweak "non-primitive cast" errorEsteban Küber-0/+1
- Suggest borrowing expression if it would allow cast to work. - Suggest using `<Type>::from(<expr>)` when appropriate. - Minor tweak to `;` typo suggestion. Partily address #47136.
2020-03-22Implement Hash for InfallibleKonrad Borowski-0/+8
2020-03-07Correct version that relaxed orphan rulesJonathan Giddy-1/+1
2019-12-18Propagate cfg bootstrapMark Rousskov-1/+1
2019-12-14Auto merge of #67224 - nikomatsakis:revert-stabilization-of-never-type, ↵bors-7/+88
r=centril Revert stabilization of never type Fixes https://github.com/rust-lang/rust/issues/66757 I decided to keep the separate `never-type-fallback` feature gate, but tried to otherwise revert https://github.com/rust-lang/rust/pull/65355. Seemed pretty clean. ( cc @Centril, author of #65355, you may want to check this over briefly )
2019-12-14Revert "Redefine `core::convert::Infallible` as `!`."Niko Matsakis-7/+88
This reverts commit 089229a1935fa9795cfdefa518c8f8c3beb66db8.
2019-12-14Auto merge of #67136 - oli-obk:const_stability, r=Centrilbors-0/+1
Require stable/unstable annotations for the constness of all stable fns with a const modifier r? @RalfJung @Centril Every `#[stable]` const fn now needs either a `#[rustc_const_unstable]` attribute or a `#[rustc_const_stable]` attribute. You can't silently stabilize the constness of a function anymore.
2019-12-13docs: std::convert::From: Fix typoShaleen Jain-1/+1
Fix a minor typo
2019-12-13Require stable/unstable annotations for the constness of all stable ↵Oliver Scherer-0/+1
functions with a `const` modifier
2019-12-08leave a FIXMEMazdak Farrokhzad-1/+1
2019-12-08use `#[allow(unused_attributes)]` to paper over incr.comp problemMazdak Farrokhzad-0/+1
2019-12-06Add `{f32,f64}::approx_unchecked_to<Int>` unsafe methodsSimon Sapin-0/+5
As discussed in https://github.com/rust-lang/rust/issues/10184 Currently, casting a floating point number to an integer with `as` is Undefined Behavior if the value is out of range. `-Z saturating-float-casts` fixes this soundness hole by making `as` “saturate” to the maximum or minimum value of the integer type (or zero for `NaN`), but has measurable negative performance impact in some benchmarks. There is some consensus in that thread for enabling saturation by default anyway, but provide an `unsafe fn` alternative for users who know through some other mean that their values are in range.
2019-12-06Make `core::convert` a directory-module with `mod.rs`Simon Sapin-0/+660