Auto merge of #95960 - jhpratt:remove-rustc_deprecated, r=compiler-errors
Remove `#[rustc_deprecated]` This removes `#[rustc_deprecated]` and introduces diagnostics to help users to the right direction (that being `#[deprecated]`). All uses of `#[rustc_deprecated]` have been converted. CI is expected to fail initially; this requires #95958, which includes converting `stdarch`. I plan on following up in a short while (maybe a bootstrap cycle?) removing the diagnostics, as they're only intended to be short-term.
This commit is contained in:
commit
8a2fe75d0e
98 changed files with 406 additions and 437 deletions
|
@ -679,12 +679,12 @@ where
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some((_, span)) = &depr {
|
// FIXME(jhpratt) remove this eventually
|
||||||
struct_span_err!(diagnostic, attr.span, E0550, "multiple deprecated attributes")
|
if attr.has_name(sym::rustc_deprecated) {
|
||||||
.span_label(attr.span, "repeated deprecation attribute")
|
diagnostic
|
||||||
.span_label(*span, "first deprecation attribute")
|
.struct_span_err(attr.span, "`#[rustc_deprecated]` has been removed")
|
||||||
|
.help("use `#[deprecated]` instead")
|
||||||
.emit();
|
.emit();
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let Some(meta) = attr.meta() else {
|
let Some(meta) = attr.meta() else {
|
||||||
|
@ -742,12 +742,24 @@ where
|
||||||
continue 'outer;
|
continue 'outer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// FIXME(jhpratt) remove this after a bootstrap occurs. Emitting an
|
// FIXME(jhpratt) remove this eventually
|
||||||
// error specific to the renaming would be a good idea as well.
|
|
||||||
sym::reason if attr.has_name(sym::rustc_deprecated) => {
|
sym::reason if attr.has_name(sym::rustc_deprecated) => {
|
||||||
if !get(mi, &mut note) {
|
if !get(mi, &mut note) {
|
||||||
continue 'outer;
|
continue 'outer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let mut diag = diagnostic
|
||||||
|
.struct_span_err(mi.span, "`reason` has been renamed");
|
||||||
|
match note {
|
||||||
|
Some(note) => diag.span_suggestion(
|
||||||
|
mi.span,
|
||||||
|
"use `note` instead",
|
||||||
|
format!("note = \"{note}\""),
|
||||||
|
Applicability::MachineApplicable,
|
||||||
|
),
|
||||||
|
None => diag.span_help(mi.span, "use `note` instead"),
|
||||||
|
};
|
||||||
|
diag.emit();
|
||||||
}
|
}
|
||||||
sym::suggestion => {
|
sym::suggestion => {
|
||||||
if !sess.features_untracked().deprecated_suggestion {
|
if !sess.features_untracked().deprecated_suggestion {
|
||||||
|
|
|
@ -6,7 +6,7 @@ Erroneous code example:
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
#![stable(since = "1.0.0", feature = "test")]
|
#![stable(since = "1.0.0", feature = "test")]
|
||||||
|
|
||||||
#[rustc_deprecated(reason)] // error!
|
#[deprecated(note)] // error!
|
||||||
#[unstable(feature = "deprecated_fn", issue = "123")]
|
#[unstable(feature = "deprecated_fn", issue = "123")]
|
||||||
fn deprecated() {}
|
fn deprecated() {}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ To fix these issues you need to give required key-value pairs.
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
#![stable(since = "1.0.0", feature = "test")]
|
#![stable(since = "1.0.0", feature = "test")]
|
||||||
|
|
||||||
#[rustc_deprecated(since = "1.39.0", reason = "reason")] // ok!
|
#[deprecated(since = "1.39.0", note = "reason")] // ok!
|
||||||
#[unstable(feature = "deprecated_fn", issue = "123")]
|
#[unstable(feature = "deprecated_fn", issue = "123")]
|
||||||
fn deprecated() {}
|
fn deprecated() {}
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,8 @@ fn _stable_fn() {}
|
||||||
const fn _stable_const_fn() {}
|
const fn _stable_const_fn() {}
|
||||||
|
|
||||||
#[stable(feature = "_deprecated_fn", since = "0.1.0")]
|
#[stable(feature = "_deprecated_fn", since = "0.1.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
reason = "explanation for deprecation"
|
note = "explanation for deprecation"
|
||||||
)] // invalid
|
)] // invalid
|
||||||
fn _deprecated_fn() {}
|
fn _deprecated_fn() {}
|
||||||
```
|
```
|
||||||
|
@ -32,9 +32,9 @@ fn _stable_fn() {}
|
||||||
const fn _stable_const_fn() {}
|
const fn _stable_const_fn() {}
|
||||||
|
|
||||||
#[stable(feature = "_deprecated_fn", since = "0.1.0")]
|
#[stable(feature = "_deprecated_fn", since = "0.1.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.0.0",
|
since = "1.0.0",
|
||||||
reason = "explanation for deprecation"
|
note = "explanation for deprecation"
|
||||||
)] // ok!
|
)] // ok!
|
||||||
fn _deprecated_fn() {}
|
fn _deprecated_fn() {}
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
The `reason` value is missing in a stability attribute.
|
The `note` value is missing in a stability attribute.
|
||||||
|
|
||||||
Erroneous code example:
|
Erroneous code example:
|
||||||
|
|
||||||
|
@ -7,22 +7,22 @@ Erroneous code example:
|
||||||
#![stable(since = "1.0.0", feature = "test")]
|
#![stable(since = "1.0.0", feature = "test")]
|
||||||
|
|
||||||
#[stable(since = "0.1.0", feature = "_deprecated_fn")]
|
#[stable(since = "0.1.0", feature = "_deprecated_fn")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.0.0"
|
since = "1.0.0"
|
||||||
)] // invalid
|
)] // invalid
|
||||||
fn _deprecated_fn() {}
|
fn _deprecated_fn() {}
|
||||||
```
|
```
|
||||||
|
|
||||||
To fix this issue, you need to provide the `reason` field. Example:
|
To fix this issue, you need to provide the `note` field. Example:
|
||||||
|
|
||||||
```
|
```
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
#![stable(since = "1.0.0", feature = "test")]
|
#![stable(since = "1.0.0", feature = "test")]
|
||||||
|
|
||||||
#[stable(since = "0.1.0", feature = "_deprecated_fn")]
|
#[stable(since = "0.1.0", feature = "_deprecated_fn")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.0.0",
|
since = "1.0.0",
|
||||||
reason = "explanation for deprecation"
|
note = "explanation for deprecation"
|
||||||
)] // ok!
|
)] // ok!
|
||||||
fn _deprecated_fn() {}
|
fn _deprecated_fn() {}
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
A `rustc_deprecated` attribute wasn't paired with a `stable`/`unstable`
|
A `deprecated` attribute wasn't paired with a `stable`/`unstable` attribute with
|
||||||
attribute.
|
`#![feature(staged_api)]` enabled.
|
||||||
|
|
||||||
Erroneous code example:
|
Erroneous code example:
|
||||||
|
|
||||||
|
@ -7,9 +7,9 @@ Erroneous code example:
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
#![stable(since = "1.0.0", feature = "test")]
|
#![stable(since = "1.0.0", feature = "test")]
|
||||||
|
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.0.1",
|
since = "1.0.1",
|
||||||
reason = "explanation for deprecation"
|
note = "explanation for deprecation"
|
||||||
)] // invalid
|
)] // invalid
|
||||||
fn _deprecated_fn() {}
|
fn _deprecated_fn() {}
|
||||||
```
|
```
|
||||||
|
@ -22,9 +22,9 @@ Example:
|
||||||
#![stable(since = "1.0.0", feature = "test")]
|
#![stable(since = "1.0.0", feature = "test")]
|
||||||
|
|
||||||
#[stable(since = "1.0.0", feature = "test")]
|
#[stable(since = "1.0.0", feature = "test")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.0.1",
|
since = "1.0.1",
|
||||||
reason = "explanation for deprecation"
|
note = "explanation for deprecation"
|
||||||
)] // ok!
|
)] // ok!
|
||||||
fn _deprecated_fn() {}
|
fn _deprecated_fn() {}
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
|
#### Note: this error code is no longer emitted by the compiler
|
||||||
|
|
||||||
More than one `deprecated` attribute has been put on an item.
|
More than one `deprecated` attribute has been put on an item.
|
||||||
|
|
||||||
Erroneous code example:
|
Erroneous code example:
|
||||||
|
|
||||||
```compile_fail,E0550
|
```compile_fail
|
||||||
#[deprecated(note = "because why not?")]
|
#[deprecated(note = "because why not?")]
|
||||||
#[deprecated(note = "right?")] // error!
|
#[deprecated(note = "right?")] // error!
|
||||||
fn the_banished() {}
|
fn the_banished() {}
|
||||||
|
|
|
@ -3,7 +3,6 @@ A stability attribute has been used outside of the standard library.
|
||||||
Erroneous code example:
|
Erroneous code example:
|
||||||
|
|
||||||
```compile_fail,E0734
|
```compile_fail,E0734
|
||||||
#[rustc_deprecated(since = "b", reason = "text")] // invalid
|
|
||||||
#[stable(feature = "a", since = "b")] // invalid
|
#[stable(feature = "a", since = "b")] // invalid
|
||||||
#[unstable(feature = "b", issue = "none")] // invalid
|
#[unstable(feature = "b", issue = "none")] // invalid
|
||||||
fn foo(){}
|
fn foo(){}
|
||||||
|
|
|
@ -304,8 +304,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
|
||||||
List: r#"/*opt*/ since = "version", /*opt*/ note = "reason""#,
|
List: r#"/*opt*/ since = "version", /*opt*/ note = "reason""#,
|
||||||
NameValueStr: "reason"
|
NameValueStr: "reason"
|
||||||
),
|
),
|
||||||
// This has special duplicate handling in E0550 to handle duplicates with rustc_deprecated
|
ErrorFollowing
|
||||||
DuplicatesOk
|
|
||||||
),
|
),
|
||||||
|
|
||||||
// Crate properties:
|
// Crate properties:
|
||||||
|
@ -469,10 +468,10 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
ungated!(feature, CrateLevel, template!(List: "name1, name2, ..."), DuplicatesOk),
|
ungated!(feature, CrateLevel, template!(List: "name1, name2, ..."), DuplicatesOk),
|
||||||
// DuplicatesOk since it has its own validation
|
// FIXME(jhpratt) remove this eventually
|
||||||
ungated!(
|
ungated!(
|
||||||
rustc_deprecated, Normal,
|
rustc_deprecated, Normal,
|
||||||
template!(List: r#"since = "version", note = "...""#), DuplicatesOk // See E0550
|
template!(List: r#"since = "version", note = "...""#), ErrorFollowing
|
||||||
),
|
),
|
||||||
// DuplicatesOk since it has its own validation
|
// DuplicatesOk since it has its own validation
|
||||||
ungated!(
|
ungated!(
|
||||||
|
|
|
@ -2201,13 +2201,12 @@ declare_lint! {
|
||||||
/// used by user code.
|
/// used by user code.
|
||||||
///
|
///
|
||||||
/// This lint is only enabled in the standard library. It works with the
|
/// This lint is only enabled in the standard library. It works with the
|
||||||
/// use of `#[rustc_deprecated]` with a `since` field of a version in the
|
/// use of `#[deprecated]` with a `since` field of a version in the future.
|
||||||
/// future. This allows something to be marked as deprecated in a future
|
/// This allows something to be marked as deprecated in a future version,
|
||||||
/// version, and then this lint will ensure that the item is no longer
|
/// and then this lint will ensure that the item is no longer used in the
|
||||||
/// used in the standard library. See the [stability documentation] for
|
/// standard library. See the [stability documentation] for more details.
|
||||||
/// more details.
|
|
||||||
///
|
///
|
||||||
/// [stability documentation]: https://rustc-dev-guide.rust-lang.org/stability.html#rustc_deprecated
|
/// [stability documentation]: https://rustc-dev-guide.rust-lang.org/stability.html#deprecated
|
||||||
pub DEPRECATED_IN_FUTURE,
|
pub DEPRECATED_IN_FUTURE,
|
||||||
Allow,
|
Allow,
|
||||||
"detects use of items that will be deprecated in a future version",
|
"detects use of items that will be deprecated in a future version",
|
||||||
|
|
|
@ -118,8 +118,7 @@ pub fn deprecation_in_effect(depr: &Deprecation) -> bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
if !is_since_rustc_version {
|
if !is_since_rustc_version {
|
||||||
// The `since` field doesn't have semantic purpose in the stable `deprecated`
|
// The `since` field doesn't have semantic purpose without `#![staged_api]`.
|
||||||
// attribute, only in `rustc_deprecated`.
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,7 +335,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||||
// topmost deprecation. For example, if a struct is deprecated,
|
// topmost deprecation. For example, if a struct is deprecated,
|
||||||
// the use of a field won't be linted.
|
// the use of a field won't be linted.
|
||||||
//
|
//
|
||||||
// #[rustc_deprecated] however wants to emit down the whole
|
// With #![staged_api], we want to emit down the whole
|
||||||
// hierarchy.
|
// hierarchy.
|
||||||
let depr_attr = &depr_entry.attr;
|
let depr_attr = &depr_entry.attr;
|
||||||
if !skip || depr_attr.is_since_rustc_version {
|
if !skip || depr_attr.is_since_rustc_version {
|
||||||
|
|
|
@ -657,7 +657,7 @@ impl<T> [T] {
|
||||||
/// ```
|
/// ```
|
||||||
#[rustc_allow_incoherent_impl]
|
#[rustc_allow_incoherent_impl]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "1.3.0", reason = "renamed to join")]
|
#[deprecated(since = "1.3.0", note = "renamed to join")]
|
||||||
pub fn connect<Separator>(&self, sep: Separator) -> <Self as Join<Separator>>::Output
|
pub fn connect<Separator>(&self, sep: Separator) -> <Self as Join<Separator>>::Output
|
||||||
where
|
where
|
||||||
Self: Join<Separator>,
|
Self: Join<Separator>,
|
||||||
|
|
|
@ -419,9 +419,9 @@ impl Layout {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "alloc_layout", since = "1.28.0")]
|
#[stable(feature = "alloc_layout", since = "1.28.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.52.0",
|
since = "1.52.0",
|
||||||
reason = "Name does not follow std convention, use LayoutError",
|
note = "Name does not follow std convention, use LayoutError",
|
||||||
suggestion = "LayoutError"
|
suggestion = "LayoutError"
|
||||||
)]
|
)]
|
||||||
pub type LayoutErr = LayoutError;
|
pub type LayoutErr = LayoutError;
|
||||||
|
|
|
@ -10,9 +10,9 @@ pub use self::global::GlobalAlloc;
|
||||||
#[stable(feature = "alloc_layout", since = "1.28.0")]
|
#[stable(feature = "alloc_layout", since = "1.28.0")]
|
||||||
pub use self::layout::Layout;
|
pub use self::layout::Layout;
|
||||||
#[stable(feature = "alloc_layout", since = "1.28.0")]
|
#[stable(feature = "alloc_layout", since = "1.28.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.52.0",
|
since = "1.52.0",
|
||||||
reason = "Name does not follow std convention, use LayoutError",
|
note = "Name does not follow std convention, use LayoutError",
|
||||||
suggestion = "LayoutError"
|
suggestion = "LayoutError"
|
||||||
)]
|
)]
|
||||||
#[allow(deprecated, deprecated_in_future)]
|
#[allow(deprecated, deprecated_in_future)]
|
||||||
|
|
|
@ -79,7 +79,7 @@ impl<T, const N: usize> IntoIterator for [T; N] {
|
||||||
impl<T, const N: usize> IntoIter<T, N> {
|
impl<T, const N: usize> IntoIter<T, N> {
|
||||||
/// Creates a new iterator over the given `array`.
|
/// Creates a new iterator over the given `array`.
|
||||||
#[stable(feature = "array_value_iter", since = "1.51.0")]
|
#[stable(feature = "array_value_iter", since = "1.51.0")]
|
||||||
#[rustc_deprecated(since = "1.59.0", reason = "use `IntoIterator::into_iter` instead")]
|
#[deprecated(since = "1.59.0", note = "use `IntoIterator::into_iter` instead")]
|
||||||
pub fn new(array: [T; N]) -> Self {
|
pub fn new(array: [T; N]) -> Self {
|
||||||
IntoIterator::into_iter(array)
|
IntoIterator::into_iter(array)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1653,10 +1653,10 @@ impl<'a> Formatter<'a> {
|
||||||
/// Flags for formatting
|
/// Flags for formatting
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.24.0",
|
since = "1.24.0",
|
||||||
reason = "use the `sign_plus`, `sign_minus`, `alternate`, \
|
note = "use the `sign_plus`, `sign_minus`, `alternate`, \
|
||||||
or `sign_aware_zero_pad` methods instead"
|
or `sign_aware_zero_pad` methods instead"
|
||||||
)]
|
)]
|
||||||
pub fn flags(&self) -> u32 {
|
pub fn flags(&self) -> u32 {
|
||||||
self.flags
|
self.flags
|
||||||
|
|
|
@ -14,10 +14,7 @@ use crate::ptr;
|
||||||
///
|
///
|
||||||
/// See: <https://131002.net/siphash>
|
/// See: <https://131002.net/siphash>
|
||||||
#[unstable(feature = "hashmap_internals", issue = "none")]
|
#[unstable(feature = "hashmap_internals", issue = "none")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "1.13.0", note = "use `std::collections::hash_map::DefaultHasher` instead")]
|
||||||
since = "1.13.0",
|
|
||||||
reason = "use `std::collections::hash_map::DefaultHasher` instead"
|
|
||||||
)]
|
|
||||||
#[derive(Debug, Clone, Default)]
|
#[derive(Debug, Clone, Default)]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub struct SipHasher13 {
|
pub struct SipHasher13 {
|
||||||
|
@ -28,10 +25,7 @@ pub struct SipHasher13 {
|
||||||
///
|
///
|
||||||
/// See: <https://131002.net/siphash/>
|
/// See: <https://131002.net/siphash/>
|
||||||
#[unstable(feature = "hashmap_internals", issue = "none")]
|
#[unstable(feature = "hashmap_internals", issue = "none")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "1.13.0", note = "use `std::collections::hash_map::DefaultHasher` instead")]
|
||||||
since = "1.13.0",
|
|
||||||
reason = "use `std::collections::hash_map::DefaultHasher` instead"
|
|
||||||
)]
|
|
||||||
#[derive(Debug, Clone, Default)]
|
#[derive(Debug, Clone, Default)]
|
||||||
struct SipHasher24 {
|
struct SipHasher24 {
|
||||||
hasher: Hasher<Sip24Rounds>,
|
hasher: Hasher<Sip24Rounds>,
|
||||||
|
@ -50,10 +44,7 @@ struct SipHasher24 {
|
||||||
/// it is not intended for cryptographic purposes. As such, all
|
/// it is not intended for cryptographic purposes. As such, all
|
||||||
/// cryptographic uses of this implementation are _strongly discouraged_.
|
/// cryptographic uses of this implementation are _strongly discouraged_.
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "1.13.0", note = "use `std::collections::hash_map::DefaultHasher` instead")]
|
||||||
since = "1.13.0",
|
|
||||||
reason = "use `std::collections::hash_map::DefaultHasher` instead"
|
|
||||||
)]
|
|
||||||
#[derive(Debug, Clone, Default)]
|
#[derive(Debug, Clone, Default)]
|
||||||
pub struct SipHasher(SipHasher24);
|
pub struct SipHasher(SipHasher24);
|
||||||
|
|
||||||
|
@ -153,9 +144,9 @@ impl SipHasher {
|
||||||
/// Creates a new `SipHasher` with the two initial keys set to 0.
|
/// Creates a new `SipHasher` with the two initial keys set to 0.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.13.0",
|
since = "1.13.0",
|
||||||
reason = "use `std::collections::hash_map::DefaultHasher` instead"
|
note = "use `std::collections::hash_map::DefaultHasher` instead"
|
||||||
)]
|
)]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn new() -> SipHasher {
|
pub fn new() -> SipHasher {
|
||||||
|
@ -165,9 +156,9 @@ impl SipHasher {
|
||||||
/// Creates a `SipHasher` that is keyed off the provided keys.
|
/// Creates a `SipHasher` that is keyed off the provided keys.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.13.0",
|
since = "1.13.0",
|
||||||
reason = "use `std::collections::hash_map::DefaultHasher` instead"
|
note = "use `std::collections::hash_map::DefaultHasher` instead"
|
||||||
)]
|
)]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher {
|
pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher {
|
||||||
|
@ -179,9 +170,9 @@ impl SipHasher13 {
|
||||||
/// Creates a new `SipHasher13` with the two initial keys set to 0.
|
/// Creates a new `SipHasher13` with the two initial keys set to 0.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "hashmap_internals", issue = "none")]
|
#[unstable(feature = "hashmap_internals", issue = "none")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.13.0",
|
since = "1.13.0",
|
||||||
reason = "use `std::collections::hash_map::DefaultHasher` instead"
|
note = "use `std::collections::hash_map::DefaultHasher` instead"
|
||||||
)]
|
)]
|
||||||
pub fn new() -> SipHasher13 {
|
pub fn new() -> SipHasher13 {
|
||||||
SipHasher13::new_with_keys(0, 0)
|
SipHasher13::new_with_keys(0, 0)
|
||||||
|
@ -190,9 +181,9 @@ impl SipHasher13 {
|
||||||
/// Creates a `SipHasher13` that is keyed off the provided keys.
|
/// Creates a `SipHasher13` that is keyed off the provided keys.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "hashmap_internals", issue = "none")]
|
#[unstable(feature = "hashmap_internals", issue = "none")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.13.0",
|
since = "1.13.0",
|
||||||
reason = "use `std::collections::hash_map::DefaultHasher` instead"
|
note = "use `std::collections::hash_map::DefaultHasher` instead"
|
||||||
)]
|
)]
|
||||||
pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher13 {
|
pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher13 {
|
||||||
SipHasher13 { hasher: Hasher::new_with_keys(key0, key1) }
|
SipHasher13 { hasher: Hasher::new_with_keys(key0, key1) }
|
||||||
|
|
|
@ -63,10 +63,7 @@ use crate::mem;
|
||||||
use crate::sync::atomic::{self, AtomicBool, AtomicI32, AtomicIsize, AtomicU32, Ordering};
|
use crate::sync::atomic::{self, AtomicBool, AtomicI32, AtomicIsize, AtomicU32, Ordering};
|
||||||
|
|
||||||
#[stable(feature = "drop_in_place", since = "1.8.0")]
|
#[stable(feature = "drop_in_place", since = "1.8.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(note = "no longer an intrinsic - use `ptr::drop_in_place` directly", since = "1.52.0")]
|
||||||
reason = "no longer an intrinsic - use `ptr::drop_in_place` directly",
|
|
||||||
since = "1.52.0"
|
|
||||||
)]
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
|
pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
|
||||||
// SAFETY: see `ptr::drop_in_place`
|
// SAFETY: see `ptr::drop_in_place`
|
||||||
|
|
|
@ -410,7 +410,7 @@ macro_rules! matches {
|
||||||
/// ```
|
/// ```
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "1.39.0", reason = "use the `?` operator instead")]
|
#[deprecated(since = "1.39.0", note = "use the `?` operator instead")]
|
||||||
#[doc(alias = "?")]
|
#[doc(alias = "?")]
|
||||||
macro_rules! r#try {
|
macro_rules! r#try {
|
||||||
($expr:expr $(,)?) => {
|
($expr:expr $(,)?) => {
|
||||||
|
@ -1536,10 +1536,7 @@ pub(crate) mod builtin {
|
||||||
#[rustc_builtin_macro]
|
#[rustc_builtin_macro]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[allow_internal_unstable(core_intrinsics, libstd_sys_internals)]
|
#[allow_internal_unstable(core_intrinsics, libstd_sys_internals)]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "1.52.0", note = "rustc-serialize is deprecated and no longer supported")]
|
||||||
since = "1.52.0",
|
|
||||||
reason = "rustc-serialize is deprecated and no longer supported"
|
|
||||||
)]
|
|
||||||
#[doc(hidden)] // While technically stable, using it is unstable, and deprecated. Hide it.
|
#[doc(hidden)] // While technically stable, using it is unstable, and deprecated. Hide it.
|
||||||
pub macro RustcDecodable($item:item) {
|
pub macro RustcDecodable($item:item) {
|
||||||
/* compiler built-in */
|
/* compiler built-in */
|
||||||
|
@ -1549,10 +1546,7 @@ pub(crate) mod builtin {
|
||||||
#[rustc_builtin_macro]
|
#[rustc_builtin_macro]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[allow_internal_unstable(core_intrinsics)]
|
#[allow_internal_unstable(core_intrinsics)]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "1.52.0", note = "rustc-serialize is deprecated and no longer supported")]
|
||||||
since = "1.52.0",
|
|
||||||
reason = "rustc-serialize is deprecated and no longer supported"
|
|
||||||
)]
|
|
||||||
#[doc(hidden)] // While technically stable, using it is unstable, and deprecated. Hide it.
|
#[doc(hidden)] // While technically stable, using it is unstable, and deprecated. Hide it.
|
||||||
pub macro RustcEncodable($item:item) {
|
pub macro RustcEncodable($item:item) {
|
||||||
/* compiler built-in */
|
/* compiler built-in */
|
||||||
|
|
|
@ -408,7 +408,7 @@ pub const unsafe fn size_of_val_raw<T: ?Sized>(val: *const T) -> usize {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(reason = "use `align_of` instead", since = "1.2.0")]
|
#[deprecated(note = "use `align_of` instead", since = "1.2.0")]
|
||||||
pub fn min_align_of<T>() -> usize {
|
pub fn min_align_of<T>() -> usize {
|
||||||
intrinsics::min_align_of::<T>()
|
intrinsics::min_align_of::<T>()
|
||||||
}
|
}
|
||||||
|
@ -431,7 +431,7 @@ pub fn min_align_of<T>() -> usize {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(reason = "use `align_of_val` instead", since = "1.2.0")]
|
#[deprecated(note = "use `align_of_val` instead", since = "1.2.0")]
|
||||||
pub fn min_align_of_val<T: ?Sized>(val: &T) -> usize {
|
pub fn min_align_of_val<T: ?Sized>(val: &T) -> usize {
|
||||||
// SAFETY: val is a reference, so it's a valid raw pointer
|
// SAFETY: val is a reference, so it's a valid raw pointer
|
||||||
unsafe { intrinsics::min_align_of_val(val) }
|
unsafe { intrinsics::min_align_of_val(val) }
|
||||||
|
@ -673,7 +673,7 @@ pub unsafe fn zeroed<T>() -> T {
|
||||||
/// [inv]: MaybeUninit#initialization-invariant
|
/// [inv]: MaybeUninit#initialization-invariant
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[rustc_deprecated(since = "1.39.0", reason = "use `mem::MaybeUninit` instead")]
|
#[deprecated(since = "1.39.0", note = "use `mem::MaybeUninit` instead")]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[allow(deprecated_in_future)]
|
#[allow(deprecated_in_future)]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
|
|
|
@ -31,7 +31,7 @@ use crate::num::FpCategory;
|
||||||
/// let r = f32::RADIX;
|
/// let r = f32::RADIX;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "TBD", reason = "replaced by the `RADIX` associated constant on `f32`")]
|
#[deprecated(since = "TBD", note = "replaced by the `RADIX` associated constant on `f32`")]
|
||||||
pub const RADIX: u32 = f32::RADIX;
|
pub const RADIX: u32 = f32::RADIX;
|
||||||
|
|
||||||
/// Number of significant digits in base 2.
|
/// Number of significant digits in base 2.
|
||||||
|
@ -48,9 +48,9 @@ pub const RADIX: u32 = f32::RADIX;
|
||||||
/// let d = f32::MANTISSA_DIGITS;
|
/// let d = f32::MANTISSA_DIGITS;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "TBD",
|
since = "TBD",
|
||||||
reason = "replaced by the `MANTISSA_DIGITS` associated constant on `f32`"
|
note = "replaced by the `MANTISSA_DIGITS` associated constant on `f32`"
|
||||||
)]
|
)]
|
||||||
pub const MANTISSA_DIGITS: u32 = f32::MANTISSA_DIGITS;
|
pub const MANTISSA_DIGITS: u32 = f32::MANTISSA_DIGITS;
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ pub const MANTISSA_DIGITS: u32 = f32::MANTISSA_DIGITS;
|
||||||
/// let d = f32::DIGITS;
|
/// let d = f32::DIGITS;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "TBD", reason = "replaced by the `DIGITS` associated constant on `f32`")]
|
#[deprecated(since = "TBD", note = "replaced by the `DIGITS` associated constant on `f32`")]
|
||||||
pub const DIGITS: u32 = f32::DIGITS;
|
pub const DIGITS: u32 = f32::DIGITS;
|
||||||
|
|
||||||
/// [Machine epsilon] value for `f32`.
|
/// [Machine epsilon] value for `f32`.
|
||||||
|
@ -89,10 +89,7 @@ pub const DIGITS: u32 = f32::DIGITS;
|
||||||
/// let e = f32::EPSILON;
|
/// let e = f32::EPSILON;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "TBD", note = "replaced by the `EPSILON` associated constant on `f32`")]
|
||||||
since = "TBD",
|
|
||||||
reason = "replaced by the `EPSILON` associated constant on `f32`"
|
|
||||||
)]
|
|
||||||
pub const EPSILON: f32 = f32::EPSILON;
|
pub const EPSILON: f32 = f32::EPSILON;
|
||||||
|
|
||||||
/// Smallest finite `f32` value.
|
/// Smallest finite `f32` value.
|
||||||
|
@ -109,7 +106,7 @@ pub const EPSILON: f32 = f32::EPSILON;
|
||||||
/// let min = f32::MIN;
|
/// let min = f32::MIN;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "TBD", reason = "replaced by the `MIN` associated constant on `f32`")]
|
#[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on `f32`")]
|
||||||
pub const MIN: f32 = f32::MIN;
|
pub const MIN: f32 = f32::MIN;
|
||||||
|
|
||||||
/// Smallest positive normal `f32` value.
|
/// Smallest positive normal `f32` value.
|
||||||
|
@ -126,10 +123,7 @@ pub const MIN: f32 = f32::MIN;
|
||||||
/// let min = f32::MIN_POSITIVE;
|
/// let min = f32::MIN_POSITIVE;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "TBD", note = "replaced by the `MIN_POSITIVE` associated constant on `f32`")]
|
||||||
since = "TBD",
|
|
||||||
reason = "replaced by the `MIN_POSITIVE` associated constant on `f32`"
|
|
||||||
)]
|
|
||||||
pub const MIN_POSITIVE: f32 = f32::MIN_POSITIVE;
|
pub const MIN_POSITIVE: f32 = f32::MIN_POSITIVE;
|
||||||
|
|
||||||
/// Largest finite `f32` value.
|
/// Largest finite `f32` value.
|
||||||
|
@ -146,7 +140,7 @@ pub const MIN_POSITIVE: f32 = f32::MIN_POSITIVE;
|
||||||
/// let max = f32::MAX;
|
/// let max = f32::MAX;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "TBD", reason = "replaced by the `MAX` associated constant on `f32`")]
|
#[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on `f32`")]
|
||||||
pub const MAX: f32 = f32::MAX;
|
pub const MAX: f32 = f32::MAX;
|
||||||
|
|
||||||
/// One greater than the minimum possible normal power of 2 exponent.
|
/// One greater than the minimum possible normal power of 2 exponent.
|
||||||
|
@ -163,10 +157,7 @@ pub const MAX: f32 = f32::MAX;
|
||||||
/// let min = f32::MIN_EXP;
|
/// let min = f32::MIN_EXP;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "TBD", note = "replaced by the `MIN_EXP` associated constant on `f32`")]
|
||||||
since = "TBD",
|
|
||||||
reason = "replaced by the `MIN_EXP` associated constant on `f32`"
|
|
||||||
)]
|
|
||||||
pub const MIN_EXP: i32 = f32::MIN_EXP;
|
pub const MIN_EXP: i32 = f32::MIN_EXP;
|
||||||
|
|
||||||
/// Maximum possible power of 2 exponent.
|
/// Maximum possible power of 2 exponent.
|
||||||
|
@ -183,10 +174,7 @@ pub const MIN_EXP: i32 = f32::MIN_EXP;
|
||||||
/// let max = f32::MAX_EXP;
|
/// let max = f32::MAX_EXP;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "TBD", note = "replaced by the `MAX_EXP` associated constant on `f32`")]
|
||||||
since = "TBD",
|
|
||||||
reason = "replaced by the `MAX_EXP` associated constant on `f32`"
|
|
||||||
)]
|
|
||||||
pub const MAX_EXP: i32 = f32::MAX_EXP;
|
pub const MAX_EXP: i32 = f32::MAX_EXP;
|
||||||
|
|
||||||
/// Minimum possible normal power of 10 exponent.
|
/// Minimum possible normal power of 10 exponent.
|
||||||
|
@ -203,10 +191,7 @@ pub const MAX_EXP: i32 = f32::MAX_EXP;
|
||||||
/// let min = f32::MIN_10_EXP;
|
/// let min = f32::MIN_10_EXP;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "TBD", note = "replaced by the `MIN_10_EXP` associated constant on `f32`")]
|
||||||
since = "TBD",
|
|
||||||
reason = "replaced by the `MIN_10_EXP` associated constant on `f32`"
|
|
||||||
)]
|
|
||||||
pub const MIN_10_EXP: i32 = f32::MIN_10_EXP;
|
pub const MIN_10_EXP: i32 = f32::MIN_10_EXP;
|
||||||
|
|
||||||
/// Maximum possible power of 10 exponent.
|
/// Maximum possible power of 10 exponent.
|
||||||
|
@ -223,10 +208,7 @@ pub const MIN_10_EXP: i32 = f32::MIN_10_EXP;
|
||||||
/// let max = f32::MAX_10_EXP;
|
/// let max = f32::MAX_10_EXP;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "TBD", note = "replaced by the `MAX_10_EXP` associated constant on `f32`")]
|
||||||
since = "TBD",
|
|
||||||
reason = "replaced by the `MAX_10_EXP` associated constant on `f32`"
|
|
||||||
)]
|
|
||||||
pub const MAX_10_EXP: i32 = f32::MAX_10_EXP;
|
pub const MAX_10_EXP: i32 = f32::MAX_10_EXP;
|
||||||
|
|
||||||
/// Not a Number (NaN).
|
/// Not a Number (NaN).
|
||||||
|
@ -243,7 +225,7 @@ pub const MAX_10_EXP: i32 = f32::MAX_10_EXP;
|
||||||
/// let nan = f32::NAN;
|
/// let nan = f32::NAN;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "TBD", reason = "replaced by the `NAN` associated constant on `f32`")]
|
#[deprecated(since = "TBD", note = "replaced by the `NAN` associated constant on `f32`")]
|
||||||
pub const NAN: f32 = f32::NAN;
|
pub const NAN: f32 = f32::NAN;
|
||||||
|
|
||||||
/// Infinity (∞).
|
/// Infinity (∞).
|
||||||
|
@ -260,10 +242,7 @@ pub const NAN: f32 = f32::NAN;
|
||||||
/// let inf = f32::INFINITY;
|
/// let inf = f32::INFINITY;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "TBD", note = "replaced by the `INFINITY` associated constant on `f32`")]
|
||||||
since = "TBD",
|
|
||||||
reason = "replaced by the `INFINITY` associated constant on `f32`"
|
|
||||||
)]
|
|
||||||
pub const INFINITY: f32 = f32::INFINITY;
|
pub const INFINITY: f32 = f32::INFINITY;
|
||||||
|
|
||||||
/// Negative infinity (−∞).
|
/// Negative infinity (−∞).
|
||||||
|
@ -280,10 +259,7 @@ pub const INFINITY: f32 = f32::INFINITY;
|
||||||
/// let ninf = f32::NEG_INFINITY;
|
/// let ninf = f32::NEG_INFINITY;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "TBD", note = "replaced by the `NEG_INFINITY` associated constant on `f32`")]
|
||||||
since = "TBD",
|
|
||||||
reason = "replaced by the `NEG_INFINITY` associated constant on `f32`"
|
|
||||||
)]
|
|
||||||
pub const NEG_INFINITY: f32 = f32::NEG_INFINITY;
|
pub const NEG_INFINITY: f32 = f32::NEG_INFINITY;
|
||||||
|
|
||||||
/// Basic mathematical constants.
|
/// Basic mathematical constants.
|
||||||
|
|
|
@ -31,7 +31,7 @@ use crate::num::FpCategory;
|
||||||
/// let r = f64::RADIX;
|
/// let r = f64::RADIX;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "TBD", reason = "replaced by the `RADIX` associated constant on `f64`")]
|
#[deprecated(since = "TBD", note = "replaced by the `RADIX` associated constant on `f64`")]
|
||||||
pub const RADIX: u32 = f64::RADIX;
|
pub const RADIX: u32 = f64::RADIX;
|
||||||
|
|
||||||
/// Number of significant digits in base 2.
|
/// Number of significant digits in base 2.
|
||||||
|
@ -48,9 +48,9 @@ pub const RADIX: u32 = f64::RADIX;
|
||||||
/// let d = f64::MANTISSA_DIGITS;
|
/// let d = f64::MANTISSA_DIGITS;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "TBD",
|
since = "TBD",
|
||||||
reason = "replaced by the `MANTISSA_DIGITS` associated constant on `f64`"
|
note = "replaced by the `MANTISSA_DIGITS` associated constant on `f64`"
|
||||||
)]
|
)]
|
||||||
pub const MANTISSA_DIGITS: u32 = f64::MANTISSA_DIGITS;
|
pub const MANTISSA_DIGITS: u32 = f64::MANTISSA_DIGITS;
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ pub const MANTISSA_DIGITS: u32 = f64::MANTISSA_DIGITS;
|
||||||
/// let d = f64::DIGITS;
|
/// let d = f64::DIGITS;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "TBD", reason = "replaced by the `DIGITS` associated constant on `f64`")]
|
#[deprecated(since = "TBD", note = "replaced by the `DIGITS` associated constant on `f64`")]
|
||||||
pub const DIGITS: u32 = f64::DIGITS;
|
pub const DIGITS: u32 = f64::DIGITS;
|
||||||
|
|
||||||
/// [Machine epsilon] value for `f64`.
|
/// [Machine epsilon] value for `f64`.
|
||||||
|
@ -89,10 +89,7 @@ pub const DIGITS: u32 = f64::DIGITS;
|
||||||
/// let e = f64::EPSILON;
|
/// let e = f64::EPSILON;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "TBD", note = "replaced by the `EPSILON` associated constant on `f64`")]
|
||||||
since = "TBD",
|
|
||||||
reason = "replaced by the `EPSILON` associated constant on `f64`"
|
|
||||||
)]
|
|
||||||
pub const EPSILON: f64 = f64::EPSILON;
|
pub const EPSILON: f64 = f64::EPSILON;
|
||||||
|
|
||||||
/// Smallest finite `f64` value.
|
/// Smallest finite `f64` value.
|
||||||
|
@ -109,7 +106,7 @@ pub const EPSILON: f64 = f64::EPSILON;
|
||||||
/// let min = f64::MIN;
|
/// let min = f64::MIN;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "TBD", reason = "replaced by the `MIN` associated constant on `f64`")]
|
#[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on `f64`")]
|
||||||
pub const MIN: f64 = f64::MIN;
|
pub const MIN: f64 = f64::MIN;
|
||||||
|
|
||||||
/// Smallest positive normal `f64` value.
|
/// Smallest positive normal `f64` value.
|
||||||
|
@ -126,10 +123,7 @@ pub const MIN: f64 = f64::MIN;
|
||||||
/// let min = f64::MIN_POSITIVE;
|
/// let min = f64::MIN_POSITIVE;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "TBD", note = "replaced by the `MIN_POSITIVE` associated constant on `f64`")]
|
||||||
since = "TBD",
|
|
||||||
reason = "replaced by the `MIN_POSITIVE` associated constant on `f64`"
|
|
||||||
)]
|
|
||||||
pub const MIN_POSITIVE: f64 = f64::MIN_POSITIVE;
|
pub const MIN_POSITIVE: f64 = f64::MIN_POSITIVE;
|
||||||
|
|
||||||
/// Largest finite `f64` value.
|
/// Largest finite `f64` value.
|
||||||
|
@ -146,7 +140,7 @@ pub const MIN_POSITIVE: f64 = f64::MIN_POSITIVE;
|
||||||
/// let max = f64::MAX;
|
/// let max = f64::MAX;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "TBD", reason = "replaced by the `MAX` associated constant on `f64`")]
|
#[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on `f64`")]
|
||||||
pub const MAX: f64 = f64::MAX;
|
pub const MAX: f64 = f64::MAX;
|
||||||
|
|
||||||
/// One greater than the minimum possible normal power of 2 exponent.
|
/// One greater than the minimum possible normal power of 2 exponent.
|
||||||
|
@ -163,10 +157,7 @@ pub const MAX: f64 = f64::MAX;
|
||||||
/// let min = f64::MIN_EXP;
|
/// let min = f64::MIN_EXP;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "TBD", note = "replaced by the `MIN_EXP` associated constant on `f64`")]
|
||||||
since = "TBD",
|
|
||||||
reason = "replaced by the `MIN_EXP` associated constant on `f64`"
|
|
||||||
)]
|
|
||||||
pub const MIN_EXP: i32 = f64::MIN_EXP;
|
pub const MIN_EXP: i32 = f64::MIN_EXP;
|
||||||
|
|
||||||
/// Maximum possible power of 2 exponent.
|
/// Maximum possible power of 2 exponent.
|
||||||
|
@ -183,10 +174,7 @@ pub const MIN_EXP: i32 = f64::MIN_EXP;
|
||||||
/// let max = f64::MAX_EXP;
|
/// let max = f64::MAX_EXP;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "TBD", note = "replaced by the `MAX_EXP` associated constant on `f64`")]
|
||||||
since = "TBD",
|
|
||||||
reason = "replaced by the `MAX_EXP` associated constant on `f64`"
|
|
||||||
)]
|
|
||||||
pub const MAX_EXP: i32 = f64::MAX_EXP;
|
pub const MAX_EXP: i32 = f64::MAX_EXP;
|
||||||
|
|
||||||
/// Minimum possible normal power of 10 exponent.
|
/// Minimum possible normal power of 10 exponent.
|
||||||
|
@ -203,10 +191,7 @@ pub const MAX_EXP: i32 = f64::MAX_EXP;
|
||||||
/// let min = f64::MIN_10_EXP;
|
/// let min = f64::MIN_10_EXP;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "TBD", note = "replaced by the `MIN_10_EXP` associated constant on `f64`")]
|
||||||
since = "TBD",
|
|
||||||
reason = "replaced by the `MIN_10_EXP` associated constant on `f64`"
|
|
||||||
)]
|
|
||||||
pub const MIN_10_EXP: i32 = f64::MIN_10_EXP;
|
pub const MIN_10_EXP: i32 = f64::MIN_10_EXP;
|
||||||
|
|
||||||
/// Maximum possible power of 10 exponent.
|
/// Maximum possible power of 10 exponent.
|
||||||
|
@ -223,10 +208,7 @@ pub const MIN_10_EXP: i32 = f64::MIN_10_EXP;
|
||||||
/// let max = f64::MAX_10_EXP;
|
/// let max = f64::MAX_10_EXP;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "TBD", note = "replaced by the `MAX_10_EXP` associated constant on `f64`")]
|
||||||
since = "TBD",
|
|
||||||
reason = "replaced by the `MAX_10_EXP` associated constant on `f64`"
|
|
||||||
)]
|
|
||||||
pub const MAX_10_EXP: i32 = f64::MAX_10_EXP;
|
pub const MAX_10_EXP: i32 = f64::MAX_10_EXP;
|
||||||
|
|
||||||
/// Not a Number (NaN).
|
/// Not a Number (NaN).
|
||||||
|
@ -243,7 +225,7 @@ pub const MAX_10_EXP: i32 = f64::MAX_10_EXP;
|
||||||
/// let nan = f64::NAN;
|
/// let nan = f64::NAN;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "TBD", reason = "replaced by the `NAN` associated constant on `f64`")]
|
#[deprecated(since = "TBD", note = "replaced by the `NAN` associated constant on `f64`")]
|
||||||
pub const NAN: f64 = f64::NAN;
|
pub const NAN: f64 = f64::NAN;
|
||||||
|
|
||||||
/// Infinity (∞).
|
/// Infinity (∞).
|
||||||
|
@ -260,10 +242,7 @@ pub const NAN: f64 = f64::NAN;
|
||||||
/// let inf = f64::INFINITY;
|
/// let inf = f64::INFINITY;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "TBD", note = "replaced by the `INFINITY` associated constant on `f64`")]
|
||||||
since = "TBD",
|
|
||||||
reason = "replaced by the `INFINITY` associated constant on `f64`"
|
|
||||||
)]
|
|
||||||
pub const INFINITY: f64 = f64::INFINITY;
|
pub const INFINITY: f64 = f64::INFINITY;
|
||||||
|
|
||||||
/// Negative infinity (−∞).
|
/// Negative infinity (−∞).
|
||||||
|
@ -280,10 +259,7 @@ pub const INFINITY: f64 = f64::INFINITY;
|
||||||
/// let ninf = f64::NEG_INFINITY;
|
/// let ninf = f64::NEG_INFINITY;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "TBD", note = "replaced by the `NEG_INFINITY` associated constant on `f64`")]
|
||||||
since = "TBD",
|
|
||||||
reason = "replaced by the `NEG_INFINITY` associated constant on `f64`"
|
|
||||||
)]
|
|
||||||
pub const NEG_INFINITY: f64 = f64::NEG_INFINITY;
|
pub const NEG_INFINITY: f64 = f64::NEG_INFINITY;
|
||||||
|
|
||||||
/// Basic mathematical constants.
|
/// Basic mathematical constants.
|
||||||
|
@ -658,7 +634,7 @@ impl f64 {
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "1.0.0", reason = "renamed to is_sign_positive")]
|
#[deprecated(since = "1.0.0", note = "renamed to is_sign_positive")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub fn is_positive(self) -> bool {
|
pub fn is_positive(self) -> bool {
|
||||||
|
@ -688,7 +664,7 @@ impl f64 {
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "1.0.0", reason = "renamed to is_sign_negative")]
|
#[deprecated(since = "1.0.0", note = "renamed to is_sign_negative")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub fn is_negative(self) -> bool {
|
pub fn is_negative(self) -> bool {
|
||||||
|
|
|
@ -2717,7 +2717,7 @@ macro_rules! int_impl {
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[rustc_promotable]
|
#[rustc_promotable]
|
||||||
#[rustc_const_stable(feature = "const_min_value", since = "1.32.0")]
|
#[rustc_const_stable(feature = "const_min_value", since = "1.32.0")]
|
||||||
#[rustc_deprecated(since = "TBD", reason = "replaced by the `MIN` associated constant on this type")]
|
#[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
|
||||||
pub const fn min_value() -> Self {
|
pub const fn min_value() -> Self {
|
||||||
Self::MIN
|
Self::MIN
|
||||||
}
|
}
|
||||||
|
@ -2730,7 +2730,7 @@ macro_rules! int_impl {
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[rustc_promotable]
|
#[rustc_promotable]
|
||||||
#[rustc_const_stable(feature = "const_max_value", since = "1.32.0")]
|
#[rustc_const_stable(feature = "const_max_value", since = "1.32.0")]
|
||||||
#[rustc_deprecated(since = "TBD", reason = "replaced by the `MAX` associated constant on this type")]
|
#[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
|
||||||
pub const fn max_value() -> Self {
|
pub const fn max_value() -> Self {
|
||||||
Self::MAX
|
Self::MAX
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
//! New code should use the associated constants directly on the primitive type.
|
//! New code should use the associated constants directly on the primitive type.
|
||||||
|
|
||||||
#![stable(feature = "i128", since = "1.26.0")]
|
#![stable(feature = "i128", since = "1.26.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "TBD",
|
since = "TBD",
|
||||||
reason = "all constants in this module replaced by associated constants on `i128`"
|
note = "all constants in this module replaced by associated constants on `i128`"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
int_module! { i128, #[stable(feature = "i128", since="1.26.0")] }
|
int_module! { i128, #[stable(feature = "i128", since="1.26.0")] }
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
//! New code should use the associated constants directly on the primitive type.
|
//! New code should use the associated constants directly on the primitive type.
|
||||||
|
|
||||||
#![stable(feature = "rust1", since = "1.0.0")]
|
#![stable(feature = "rust1", since = "1.0.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "TBD",
|
since = "TBD",
|
||||||
reason = "all constants in this module replaced by associated constants on `i16`"
|
note = "all constants in this module replaced by associated constants on `i16`"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
int_module! { i16 }
|
int_module! { i16 }
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
//! New code should use the associated constants directly on the primitive type.
|
//! New code should use the associated constants directly on the primitive type.
|
||||||
|
|
||||||
#![stable(feature = "rust1", since = "1.0.0")]
|
#![stable(feature = "rust1", since = "1.0.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "TBD",
|
since = "TBD",
|
||||||
reason = "all constants in this module replaced by associated constants on `i32`"
|
note = "all constants in this module replaced by associated constants on `i32`"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
int_module! { i32 }
|
int_module! { i32 }
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
//! New code should use the associated constants directly on the primitive type.
|
//! New code should use the associated constants directly on the primitive type.
|
||||||
|
|
||||||
#![stable(feature = "rust1", since = "1.0.0")]
|
#![stable(feature = "rust1", since = "1.0.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "TBD",
|
since = "TBD",
|
||||||
reason = "all constants in this module replaced by associated constants on `i64`"
|
note = "all constants in this module replaced by associated constants on `i64`"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
int_module! { i64 }
|
int_module! { i64 }
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
//! New code should use the associated constants directly on the primitive type.
|
//! New code should use the associated constants directly on the primitive type.
|
||||||
|
|
||||||
#![stable(feature = "rust1", since = "1.0.0")]
|
#![stable(feature = "rust1", since = "1.0.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "TBD",
|
since = "TBD",
|
||||||
reason = "all constants in this module replaced by associated constants on `i8`"
|
note = "all constants in this module replaced by associated constants on `i8`"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
int_module! { i8 }
|
int_module! { i8 }
|
||||||
|
|
|
@ -19,7 +19,7 @@ macro_rules! int_module {
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
#[$attr]
|
#[$attr]
|
||||||
#[rustc_deprecated(since = "TBD", reason = "replaced by the `MIN` associated constant on this type")]
|
#[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
|
||||||
pub const MIN: $T = $T::MIN;
|
pub const MIN: $T = $T::MIN;
|
||||||
|
|
||||||
#[doc = concat!(
|
#[doc = concat!(
|
||||||
|
@ -38,7 +38,7 @@ macro_rules! int_module {
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
#[$attr]
|
#[$attr]
|
||||||
#[rustc_deprecated(since = "TBD", reason = "replaced by the `MAX` associated constant on this type")]
|
#[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
|
||||||
pub const MAX: $T = $T::MAX;
|
pub const MAX: $T = $T::MAX;
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
//! New code should use the associated constants directly on the primitive type.
|
//! New code should use the associated constants directly on the primitive type.
|
||||||
|
|
||||||
#![stable(feature = "rust1", since = "1.0.0")]
|
#![stable(feature = "rust1", since = "1.0.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "TBD",
|
since = "TBD",
|
||||||
reason = "all constants in this module replaced by associated constants on `isize`"
|
note = "all constants in this module replaced by associated constants on `isize`"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
int_module! { isize }
|
int_module! { isize }
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
//! New code should use the associated constants directly on the primitive type.
|
//! New code should use the associated constants directly on the primitive type.
|
||||||
|
|
||||||
#![stable(feature = "i128", since = "1.26.0")]
|
#![stable(feature = "i128", since = "1.26.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "TBD",
|
since = "TBD",
|
||||||
reason = "all constants in this module replaced by associated constants on `u128`"
|
note = "all constants in this module replaced by associated constants on `u128`"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
int_module! { u128, #[stable(feature = "i128", since="1.26.0")] }
|
int_module! { u128, #[stable(feature = "i128", since="1.26.0")] }
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
//! New code should use the associated constants directly on the primitive type.
|
//! New code should use the associated constants directly on the primitive type.
|
||||||
|
|
||||||
#![stable(feature = "rust1", since = "1.0.0")]
|
#![stable(feature = "rust1", since = "1.0.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "TBD",
|
since = "TBD",
|
||||||
reason = "all constants in this module replaced by associated constants on `u16`"
|
note = "all constants in this module replaced by associated constants on `u16`"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
int_module! { u16 }
|
int_module! { u16 }
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
//! New code should use the associated constants directly on the primitive type.
|
//! New code should use the associated constants directly on the primitive type.
|
||||||
|
|
||||||
#![stable(feature = "rust1", since = "1.0.0")]
|
#![stable(feature = "rust1", since = "1.0.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "TBD",
|
since = "TBD",
|
||||||
reason = "all constants in this module replaced by associated constants on `u32`"
|
note = "all constants in this module replaced by associated constants on `u32`"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
int_module! { u32 }
|
int_module! { u32 }
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
//! New code should use the associated constants directly on the primitive type.
|
//! New code should use the associated constants directly on the primitive type.
|
||||||
|
|
||||||
#![stable(feature = "rust1", since = "1.0.0")]
|
#![stable(feature = "rust1", since = "1.0.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "TBD",
|
since = "TBD",
|
||||||
reason = "all constants in this module replaced by associated constants on `u64`"
|
note = "all constants in this module replaced by associated constants on `u64`"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
int_module! { u64 }
|
int_module! { u64 }
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
//! New code should use the associated constants directly on the primitive type.
|
//! New code should use the associated constants directly on the primitive type.
|
||||||
|
|
||||||
#![stable(feature = "rust1", since = "1.0.0")]
|
#![stable(feature = "rust1", since = "1.0.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "TBD",
|
since = "TBD",
|
||||||
reason = "all constants in this module replaced by associated constants on `u8`"
|
note = "all constants in this module replaced by associated constants on `u8`"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
int_module! { u8 }
|
int_module! { u8 }
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
//! New code should use the associated constants directly on the primitive type.
|
//! New code should use the associated constants directly on the primitive type.
|
||||||
|
|
||||||
#![stable(feature = "rust1", since = "1.0.0")]
|
#![stable(feature = "rust1", since = "1.0.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "TBD",
|
since = "TBD",
|
||||||
reason = "all constants in this module replaced by associated constants on `usize`"
|
note = "all constants in this module replaced by associated constants on `usize`"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
int_module! { usize }
|
int_module! { usize }
|
||||||
|
|
|
@ -2431,7 +2431,7 @@ macro_rules! uint_impl {
|
||||||
#[rustc_promotable]
|
#[rustc_promotable]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[rustc_const_stable(feature = "const_max_value", since = "1.32.0")]
|
#[rustc_const_stable(feature = "const_max_value", since = "1.32.0")]
|
||||||
#[rustc_deprecated(since = "TBD", reason = "replaced by the `MIN` associated constant on this type")]
|
#[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
|
||||||
pub const fn min_value() -> Self { Self::MIN }
|
pub const fn min_value() -> Self { Self::MIN }
|
||||||
|
|
||||||
/// New code should prefer to use
|
/// New code should prefer to use
|
||||||
|
@ -2442,7 +2442,7 @@ macro_rules! uint_impl {
|
||||||
#[rustc_promotable]
|
#[rustc_promotable]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[rustc_const_stable(feature = "const_max_value", since = "1.32.0")]
|
#[rustc_const_stable(feature = "const_max_value", since = "1.32.0")]
|
||||||
#[rustc_deprecated(since = "TBD", reason = "replaced by the `MAX` associated constant on this type")]
|
#[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
|
||||||
pub const fn max_value() -> Self { Self::MAX }
|
pub const fn max_value() -> Self { Self::MAX }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1129,7 +1129,7 @@ impl FusedIterator for Lines<'_> {}
|
||||||
///
|
///
|
||||||
/// [`lines_any`]: str::lines_any
|
/// [`lines_any`]: str::lines_any
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "1.4.0", reason = "use lines()/Lines instead now")]
|
#[deprecated(since = "1.4.0", note = "use lines()/Lines instead now")]
|
||||||
#[must_use = "iterators are lazy and do nothing unless consumed"]
|
#[must_use = "iterators are lazy and do nothing unless consumed"]
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
|
|
|
@ -591,7 +591,7 @@ impl str {
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "1.29.0", reason = "use `get_unchecked(begin..end)` instead")]
|
#[deprecated(since = "1.29.0", note = "use `get_unchecked(begin..end)` instead")]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub unsafe fn slice_unchecked(&self, begin: usize, end: usize) -> &str {
|
pub unsafe fn slice_unchecked(&self, begin: usize, end: usize) -> &str {
|
||||||
|
@ -625,7 +625,7 @@ impl str {
|
||||||
/// * `begin` and `end` must be byte positions within the string slice.
|
/// * `begin` and `end` must be byte positions within the string slice.
|
||||||
/// * `begin` and `end` must lie on UTF-8 sequence boundaries.
|
/// * `begin` and `end` must lie on UTF-8 sequence boundaries.
|
||||||
#[stable(feature = "str_slice_mut", since = "1.5.0")]
|
#[stable(feature = "str_slice_mut", since = "1.5.0")]
|
||||||
#[rustc_deprecated(since = "1.29.0", reason = "use `get_unchecked_mut(begin..end)` instead")]
|
#[deprecated(since = "1.29.0", note = "use `get_unchecked_mut(begin..end)` instead")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub unsafe fn slice_mut_unchecked(&mut self, begin: usize, end: usize) -> &mut str {
|
pub unsafe fn slice_mut_unchecked(&mut self, begin: usize, end: usize) -> &mut str {
|
||||||
// SAFETY: the caller must uphold the safety contract for `get_unchecked_mut`;
|
// SAFETY: the caller must uphold the safety contract for `get_unchecked_mut`;
|
||||||
|
@ -1000,7 +1000,7 @@ impl str {
|
||||||
|
|
||||||
/// An iterator over the lines of a string.
|
/// An iterator over the lines of a string.
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "1.4.0", reason = "use lines() instead now")]
|
#[deprecated(since = "1.4.0", note = "use lines() instead now")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
pub fn lines_any(&self) -> LinesAny<'_> {
|
pub fn lines_any(&self) -> LinesAny<'_> {
|
||||||
|
@ -1964,11 +1964,7 @@ impl str {
|
||||||
without modifying the original"]
|
without modifying the original"]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "1.33.0", note = "superseded by `trim_start`", suggestion = "trim_start")]
|
||||||
since = "1.33.0",
|
|
||||||
reason = "superseded by `trim_start`",
|
|
||||||
suggestion = "trim_start"
|
|
||||||
)]
|
|
||||||
pub fn trim_left(&self) -> &str {
|
pub fn trim_left(&self) -> &str {
|
||||||
self.trim_start()
|
self.trim_start()
|
||||||
}
|
}
|
||||||
|
@ -2008,11 +2004,7 @@ impl str {
|
||||||
without modifying the original"]
|
without modifying the original"]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "1.33.0", note = "superseded by `trim_end`", suggestion = "trim_end")]
|
||||||
since = "1.33.0",
|
|
||||||
reason = "superseded by `trim_end`",
|
|
||||||
suggestion = "trim_end"
|
|
||||||
)]
|
|
||||||
pub fn trim_right(&self) -> &str {
|
pub fn trim_right(&self) -> &str {
|
||||||
self.trim_end()
|
self.trim_end()
|
||||||
}
|
}
|
||||||
|
@ -2240,9 +2232,9 @@ impl str {
|
||||||
/// assert_eq!("12foo1bar12".trim_left_matches(x), "foo1bar12");
|
/// assert_eq!("12foo1bar12".trim_left_matches(x), "foo1bar12");
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.33.0",
|
since = "1.33.0",
|
||||||
reason = "superseded by `trim_start_matches`",
|
note = "superseded by `trim_start_matches`",
|
||||||
suggestion = "trim_start_matches"
|
suggestion = "trim_start_matches"
|
||||||
)]
|
)]
|
||||||
pub fn trim_left_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &'a str {
|
pub fn trim_left_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &'a str {
|
||||||
|
@ -2283,9 +2275,9 @@ impl str {
|
||||||
/// assert_eq!("1fooX".trim_right_matches(|c| c == '1' || c == 'X'), "1foo");
|
/// assert_eq!("1fooX".trim_right_matches(|c| c == '1' || c == 'X'), "1foo");
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.33.0",
|
since = "1.33.0",
|
||||||
reason = "superseded by `trim_end_matches`",
|
note = "superseded by `trim_end_matches`",
|
||||||
suggestion = "trim_end_matches"
|
suggestion = "trim_end_matches"
|
||||||
)]
|
)]
|
||||||
pub fn trim_right_matches<'a, P>(&'a self, pat: P) -> &'a str
|
pub fn trim_right_matches<'a, P>(&'a self, pat: P) -> &'a str
|
||||||
|
|
|
@ -271,9 +271,9 @@ pub enum Ordering {
|
||||||
/// An [`AtomicBool`] initialized to `false`.
|
/// An [`AtomicBool`] initialized to `false`.
|
||||||
#[cfg(target_has_atomic_load_store = "8")]
|
#[cfg(target_has_atomic_load_store = "8")]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.34.0",
|
since = "1.34.0",
|
||||||
reason = "the `new` function is now preferred",
|
note = "the `new` function is now preferred",
|
||||||
suggestion = "AtomicBool::new(false)"
|
suggestion = "AtomicBool::new(false)"
|
||||||
)]
|
)]
|
||||||
pub const ATOMIC_BOOL_INIT: AtomicBool = AtomicBool::new(false);
|
pub const ATOMIC_BOOL_INIT: AtomicBool = AtomicBool::new(false);
|
||||||
|
@ -551,9 +551,9 @@ impl AtomicBool {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.50.0",
|
since = "1.50.0",
|
||||||
reason = "Use `compare_exchange` or `compare_exchange_weak` instead"
|
note = "Use `compare_exchange` or `compare_exchange_weak` instead"
|
||||||
)]
|
)]
|
||||||
#[cfg(target_has_atomic = "8")]
|
#[cfg(target_has_atomic = "8")]
|
||||||
pub fn compare_and_swap(&self, current: bool, new: bool, order: Ordering) -> bool {
|
pub fn compare_and_swap(&self, current: bool, new: bool, order: Ordering) -> bool {
|
||||||
|
@ -1235,9 +1235,9 @@ impl<T> AtomicPtr<T> {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.50.0",
|
since = "1.50.0",
|
||||||
reason = "Use `compare_exchange` or `compare_exchange_weak` instead"
|
note = "Use `compare_exchange` or `compare_exchange_weak` instead"
|
||||||
)]
|
)]
|
||||||
#[cfg(target_has_atomic = "ptr")]
|
#[cfg(target_has_atomic = "ptr")]
|
||||||
pub fn compare_and_swap(&self, current: *mut T, new: *mut T, order: Ordering) -> *mut T {
|
pub fn compare_and_swap(&self, current: *mut T, new: *mut T, order: Ordering) -> *mut T {
|
||||||
|
@ -1490,9 +1490,9 @@ macro_rules! atomic_int {
|
||||||
|
|
||||||
/// An atomic integer initialized to `0`.
|
/// An atomic integer initialized to `0`.
|
||||||
#[$stable_init_const]
|
#[$stable_init_const]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.34.0",
|
since = "1.34.0",
|
||||||
reason = "the `new` function is now preferred",
|
note = "the `new` function is now preferred",
|
||||||
suggestion = $atomic_new,
|
suggestion = $atomic_new,
|
||||||
)]
|
)]
|
||||||
pub const $atomic_init: $atomic_type = $atomic_type::new(0);
|
pub const $atomic_init: $atomic_type = $atomic_type::new(0);
|
||||||
|
@ -1812,9 +1812,9 @@ macro_rules! atomic_int {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[$stable]
|
#[$stable]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.50.0",
|
since = "1.50.0",
|
||||||
reason = "Use `compare_exchange` or `compare_exchange_weak` instead")
|
note = "Use `compare_exchange` or `compare_exchange_weak` instead")
|
||||||
]
|
]
|
||||||
#[$cfg_cas]
|
#[$cfg_cas]
|
||||||
pub fn compare_and_swap(&self,
|
pub fn compare_and_swap(&self,
|
||||||
|
@ -3023,7 +3023,7 @@ impl<T> fmt::Pointer for AtomicPtr<T> {
|
||||||
/// [`hint::spin_loop`]: crate::hint::spin_loop
|
/// [`hint::spin_loop`]: crate::hint::spin_loop
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "spin_loop_hint", since = "1.24.0")]
|
#[stable(feature = "spin_loop_hint", since = "1.24.0")]
|
||||||
#[rustc_deprecated(since = "1.51.0", reason = "use hint::spin_loop instead")]
|
#[deprecated(since = "1.51.0", note = "use hint::spin_loop instead")]
|
||||||
pub fn spin_loop_hint() {
|
pub fn spin_loop_hint() {
|
||||||
spin_loop()
|
spin_loop()
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ pub use core::ascii::{escape_default, EscapeDefault};
|
||||||
///
|
///
|
||||||
/// [combining character]: https://en.wikipedia.org/wiki/Combining_character
|
/// [combining character]: https://en.wikipedia.org/wiki/Combining_character
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "1.26.0", reason = "use inherent methods instead")]
|
#[deprecated(since = "1.26.0", note = "use inherent methods instead")]
|
||||||
pub trait AsciiExt {
|
pub trait AsciiExt {
|
||||||
/// Container type for copied ASCII characters.
|
/// Container type for copied ASCII characters.
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
|
|
@ -402,7 +402,7 @@
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
// FIXME(#82080) The deprecation here is only theoretical, and does not actually produce a warning.
|
// FIXME(#82080) The deprecation here is only theoretical, and does not actually produce a warning.
|
||||||
#[rustc_deprecated(reason = "moved to `std::ops::Bound`", since = "1.26.0")]
|
#[deprecated(note = "moved to `std::ops::Bound`", since = "1.26.0")]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub use crate::ops::Bound;
|
pub use crate::ops::Bound;
|
||||||
|
|
||||||
|
|
|
@ -577,10 +577,10 @@ impl Error for JoinPathsError {
|
||||||
/// None => println!("Impossible to get your home dir!"),
|
/// None => println!("Impossible to get your home dir!"),
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.29.0",
|
since = "1.29.0",
|
||||||
reason = "This function's behavior is unexpected and probably not what you want. \
|
note = "This function's behavior is unexpected and probably not what you want. \
|
||||||
Consider using a crate from crates.io instead."
|
Consider using a crate from crates.io instead."
|
||||||
)]
|
)]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[stable(feature = "env", since = "1.0.0")]
|
#[stable(feature = "env", since = "1.0.0")]
|
||||||
|
|
|
@ -145,15 +145,15 @@ pub trait Error: Debug + Display {
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "1.42.0", reason = "use the Display impl or to_string()")]
|
#[deprecated(since = "1.42.0", note = "use the Display impl or to_string()")]
|
||||||
fn description(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"description() is deprecated; use Display"
|
"description() is deprecated; use Display"
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.33.0",
|
since = "1.33.0",
|
||||||
reason = "replaced by Error::source, which can support downcasting"
|
note = "replaced by Error::source, which can support downcasting"
|
||||||
)]
|
)]
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
fn cause(&self) -> Option<&dyn Error> {
|
fn cause(&self) -> Option<&dyn Error> {
|
||||||
|
|
|
@ -511,15 +511,15 @@ impl f32 {
|
||||||
#[must_use = "method returns a new number and does not mutate the original value"]
|
#[must_use = "method returns a new number and does not mutate the original value"]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.10.0",
|
since = "1.10.0",
|
||||||
reason = "you probably meant `(self - other).abs()`: \
|
note = "you probably meant `(self - other).abs()`: \
|
||||||
this operation is `(self - other).max(0.0)` \
|
this operation is `(self - other).max(0.0)` \
|
||||||
except that `abs_sub` also propagates NaNs (also \
|
except that `abs_sub` also propagates NaNs (also \
|
||||||
known as `fdimf` in C). If you truly need the positive \
|
known as `fdimf` in C). If you truly need the positive \
|
||||||
difference, consider using that expression or the C function \
|
difference, consider using that expression or the C function \
|
||||||
`fdimf`, depending on how you wish to handle NaN (please consider \
|
`fdimf`, depending on how you wish to handle NaN (please consider \
|
||||||
filing an issue describing your use-case too)."
|
filing an issue describing your use-case too)."
|
||||||
)]
|
)]
|
||||||
pub fn abs_sub(self, other: f32) -> f32 {
|
pub fn abs_sub(self, other: f32) -> f32 {
|
||||||
unsafe { cmath::fdimf(self, other) }
|
unsafe { cmath::fdimf(self, other) }
|
||||||
|
|
|
@ -513,15 +513,15 @@ impl f64 {
|
||||||
#[must_use = "method returns a new number and does not mutate the original value"]
|
#[must_use = "method returns a new number and does not mutate the original value"]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.10.0",
|
since = "1.10.0",
|
||||||
reason = "you probably meant `(self - other).abs()`: \
|
note = "you probably meant `(self - other).abs()`: \
|
||||||
this operation is `(self - other).max(0.0)` \
|
this operation is `(self - other).max(0.0)` \
|
||||||
except that `abs_sub` also propagates NaNs (also \
|
except that `abs_sub` also propagates NaNs (also \
|
||||||
known as `fdim` in C). If you truly need the positive \
|
known as `fdim` in C). If you truly need the positive \
|
||||||
difference, consider using that expression or the C function \
|
difference, consider using that expression or the C function \
|
||||||
`fdim`, depending on how you wish to handle NaN (please consider \
|
`fdim`, depending on how you wish to handle NaN (please consider \
|
||||||
filing an issue describing your use-case too)."
|
filing an issue describing your use-case too)."
|
||||||
)]
|
)]
|
||||||
pub fn abs_sub(self, other: f64) -> f64 {
|
pub fn abs_sub(self, other: f64) -> f64 {
|
||||||
unsafe { cmath::fdim(self, other) }
|
unsafe { cmath::fdim(self, other) }
|
||||||
|
|
|
@ -1851,10 +1851,10 @@ pub fn hard_link<P: AsRef<Path>, Q: AsRef<Path>>(original: P, link: Q) -> io::Re
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.1.0",
|
since = "1.1.0",
|
||||||
reason = "replaced with std::os::unix::fs::symlink and \
|
note = "replaced with std::os::unix::fs::symlink and \
|
||||||
std::os::windows::fs::{symlink_file, symlink_dir}"
|
std::os::windows::fs::{symlink_file, symlink_dir}"
|
||||||
)]
|
)]
|
||||||
pub fn soft_link<P: AsRef<Path>, Q: AsRef<Path>>(original: P, link: Q) -> io::Result<()> {
|
pub fn soft_link<P: AsRef<Path>, Q: AsRef<Path>>(original: P, link: Q) -> io::Result<()> {
|
||||||
fs_imp::symlink(original.as_ref(), link.as_ref())
|
fs_imp::symlink(original.as_ref(), link.as_ref())
|
||||||
|
|
|
@ -915,20 +915,14 @@ impl TcpListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "net2_mutators", since = "1.9.0")]
|
#[stable(feature = "net2_mutators", since = "1.9.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "1.16.0", note = "this option can only be set before the socket is bound")]
|
||||||
since = "1.16.0",
|
|
||||||
reason = "this option can only be set before the socket is bound"
|
|
||||||
)]
|
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
pub fn set_only_v6(&self, only_v6: bool) -> io::Result<()> {
|
pub fn set_only_v6(&self, only_v6: bool) -> io::Result<()> {
|
||||||
self.0.set_only_v6(only_v6)
|
self.0.set_only_v6(only_v6)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable(feature = "net2_mutators", since = "1.9.0")]
|
#[stable(feature = "net2_mutators", since = "1.9.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(since = "1.16.0", note = "this option can only be set before the socket is bound")]
|
||||||
since = "1.16.0",
|
|
||||||
reason = "this option can only be set before the socket is bound"
|
|
||||||
)]
|
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
pub fn only_v6(&self) -> io::Result<bool> {
|
pub fn only_v6(&self) -> io::Result<bool> {
|
||||||
self.0.only_v6()
|
self.0.only_v6()
|
||||||
|
|
|
@ -18,10 +18,10 @@ pub trait MetadataExt {
|
||||||
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
||||||
/// cross-Unix abstractions contained within the raw stat.
|
/// cross-Unix abstractions contained within the raw stat.
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "deprecated in favor of the accessor \
|
note = "deprecated in favor of the accessor \
|
||||||
methods of this trait"
|
methods of this trait"
|
||||||
)]
|
)]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
fn as_raw_stat(&self) -> &raw::stat;
|
fn as_raw_stat(&self) -> &raw::stat;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
//! Android-specific raw type definitions
|
//! Android-specific raw type definitions
|
||||||
|
|
||||||
#![stable(feature = "raw_ext", since = "1.1.0")]
|
#![stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "these type aliases are no longer supported by \
|
note = "these type aliases are no longer supported by \
|
||||||
the standard library, the `libc` crate on \
|
the standard library, the `libc` crate on \
|
||||||
crates.io should be used instead for the correct \
|
crates.io should be used instead for the correct \
|
||||||
definitions"
|
definitions"
|
||||||
)]
|
)]
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@ pub trait MetadataExt {
|
||||||
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
||||||
/// cross-Unix abstractions contained within the raw stat.
|
/// cross-Unix abstractions contained within the raw stat.
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "deprecated in favor of the accessor \
|
note = "deprecated in favor of the accessor \
|
||||||
methods of this trait"
|
methods of this trait"
|
||||||
)]
|
)]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
fn as_raw_stat(&self) -> &raw::stat;
|
fn as_raw_stat(&self) -> &raw::stat;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
//! Dragonfly-specific raw type definitions
|
//! Dragonfly-specific raw type definitions
|
||||||
|
|
||||||
#![stable(feature = "raw_ext", since = "1.1.0")]
|
#![stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "these type aliases are no longer supported by \
|
note = "these type aliases are no longer supported by \
|
||||||
the standard library, the `libc` crate on \
|
the standard library, the `libc` crate on \
|
||||||
crates.io should be used instead for the correct \
|
crates.io should be used instead for the correct \
|
||||||
definitions"
|
definitions"
|
||||||
)]
|
)]
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@ pub trait MetadataExt {
|
||||||
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
||||||
/// cross-Unix abstractions contained within the raw stat.
|
/// cross-Unix abstractions contained within the raw stat.
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "deprecated in favor of the accessor \
|
note = "deprecated in favor of the accessor \
|
||||||
methods of this trait"
|
methods of this trait"
|
||||||
)]
|
)]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
fn as_raw_stat(&self) -> &raw::stat;
|
fn as_raw_stat(&self) -> &raw::stat;
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
//! except using the musl-specific stat64 structure in liblibc.
|
//! except using the musl-specific stat64 structure in liblibc.
|
||||||
|
|
||||||
#![stable(feature = "raw_ext", since = "1.1.0")]
|
#![stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "these type aliases are no longer supported by \
|
note = "these type aliases are no longer supported by \
|
||||||
the standard library, the `libc` crate on \
|
the standard library, the `libc` crate on \
|
||||||
crates.io should be used instead for the correct \
|
crates.io should be used instead for the correct \
|
||||||
definitions"
|
definitions"
|
||||||
)]
|
)]
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
||||||
|
|
|
@ -12,10 +12,10 @@ use crate::os::espidf::raw;
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
pub trait MetadataExt {
|
pub trait MetadataExt {
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "deprecated in favor of the accessor \
|
note = "deprecated in favor of the accessor \
|
||||||
methods of this trait"
|
methods of this trait"
|
||||||
)]
|
)]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
fn as_raw_stat(&self) -> &raw::stat;
|
fn as_raw_stat(&self) -> &raw::stat;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
//! Raw type definitions for the ESP-IDF framework.
|
//! Raw type definitions for the ESP-IDF framework.
|
||||||
|
|
||||||
#![stable(feature = "raw_ext", since = "1.1.0")]
|
#![stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "these type aliases are no longer supported by \
|
note = "these type aliases are no longer supported by \
|
||||||
the standard library, the `libc` crate on \
|
the standard library, the `libc` crate on \
|
||||||
crates.io should be used instead for the correct \
|
crates.io should be used instead for the correct \
|
||||||
definitions"
|
definitions"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
use crate::os::raw::c_long;
|
use crate::os::raw::c_long;
|
||||||
|
|
|
@ -18,10 +18,10 @@ pub trait MetadataExt {
|
||||||
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
||||||
/// cross-Unix abstractions contained within the raw stat.
|
/// cross-Unix abstractions contained within the raw stat.
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "deprecated in favor of the accessor \
|
note = "deprecated in favor of the accessor \
|
||||||
methods of this trait"
|
methods of this trait"
|
||||||
)]
|
)]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
fn as_raw_stat(&self) -> &raw::stat;
|
fn as_raw_stat(&self) -> &raw::stat;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
//! FreeBSD-specific raw type definitions
|
//! FreeBSD-specific raw type definitions
|
||||||
|
|
||||||
#![stable(feature = "raw_ext", since = "1.1.0")]
|
#![stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "these type aliases are no longer supported by \
|
note = "these type aliases are no longer supported by \
|
||||||
the standard library, the `libc` crate on \
|
the standard library, the `libc` crate on \
|
||||||
crates.io should be used instead for the correct \
|
crates.io should be used instead for the correct \
|
||||||
definitions"
|
definitions"
|
||||||
)]
|
)]
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
//! Fuchsia-specific raw type definitions
|
//! Fuchsia-specific raw type definitions
|
||||||
|
|
||||||
#![stable(feature = "raw_ext", since = "1.1.0")]
|
#![stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "these type aliases are no longer supported by \
|
note = "these type aliases are no longer supported by \
|
||||||
the standard library, the `libc` crate on \
|
the standard library, the `libc` crate on \
|
||||||
crates.io should be used instead for the correct \
|
crates.io should be used instead for the correct \
|
||||||
definitions"
|
definitions"
|
||||||
)]
|
)]
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@ pub trait MetadataExt {
|
||||||
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
||||||
/// cross-Unix abstractions contained within the raw stat.
|
/// cross-Unix abstractions contained within the raw stat.
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "deprecated in favor of the accessor \
|
note = "deprecated in favor of the accessor \
|
||||||
methods of this trait"
|
methods of this trait"
|
||||||
)]
|
)]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
fn as_raw_stat(&self) -> &raw::stat;
|
fn as_raw_stat(&self) -> &raw::stat;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
//! Haiku-specific raw type definitions
|
//! Haiku-specific raw type definitions
|
||||||
|
|
||||||
#![stable(feature = "raw_ext", since = "1.1.0")]
|
#![stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "1.53.0",
|
since = "1.53.0",
|
||||||
reason = "these type aliases are no longer supported by \
|
note = "these type aliases are no longer supported by \
|
||||||
the standard library, the `libc` crate on \
|
the standard library, the `libc` crate on \
|
||||||
crates.io should be used instead for the correct \
|
crates.io should be used instead for the correct \
|
||||||
definitions"
|
definitions"
|
||||||
)]
|
)]
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,9 @@ pub trait MetadataExt {
|
||||||
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
||||||
/// cross-Unix abstractions contained within the raw stat.
|
/// cross-Unix abstractions contained within the raw stat.
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "deprecated in favor of the accessor methods of this trait"
|
note = "deprecated in favor of the accessor methods of this trait"
|
||||||
)]
|
)]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
fn as_raw_stat(&self) -> &raw::stat;
|
fn as_raw_stat(&self) -> &raw::stat;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
//! illumos-specific raw type definitions
|
//! illumos-specific raw type definitions
|
||||||
|
|
||||||
#![stable(feature = "raw_ext", since = "1.1.0")]
|
#![stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "these type aliases are no longer supported by the standard library, the `libc` \
|
note = "these type aliases are no longer supported by the standard library, the `libc` \
|
||||||
crate on crates.io should be used instead for the correct definitions"
|
crate on crates.io should be used instead for the correct definitions"
|
||||||
)]
|
)]
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
|
@ -18,10 +18,10 @@ pub trait MetadataExt {
|
||||||
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
||||||
/// cross-Unix abstractions contained within the raw stat.
|
/// cross-Unix abstractions contained within the raw stat.
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "deprecated in favor of the accessor \
|
note = "deprecated in favor of the accessor \
|
||||||
methods of this trait"
|
methods of this trait"
|
||||||
)]
|
)]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
fn as_raw_stat(&self) -> &raw::stat;
|
fn as_raw_stat(&self) -> &raw::stat;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
//! iOS-specific raw type definitions
|
//! iOS-specific raw type definitions
|
||||||
|
|
||||||
#![stable(feature = "raw_ext", since = "1.1.0")]
|
#![stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "these type aliases are no longer supported by \
|
note = "these type aliases are no longer supported by \
|
||||||
the standard library, the `libc` crate on \
|
the standard library, the `libc` crate on \
|
||||||
crates.io should be used instead for the correct \
|
crates.io should be used instead for the correct \
|
||||||
definitions"
|
definitions"
|
||||||
)]
|
)]
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ pub trait MetadataExt {
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
#[rustc_deprecated(since = "1.8.0", reason = "other methods of this trait are now preferred")]
|
#[deprecated(since = "1.8.0", note = "other methods of this trait are now preferred")]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
fn as_raw_stat(&self) -> &raw::stat;
|
fn as_raw_stat(&self) -> &raw::stat;
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
//! L4Re-specific raw type definitions.
|
//! L4Re-specific raw type definitions.
|
||||||
|
|
||||||
#![stable(feature = "raw_ext", since = "1.1.0")]
|
#![stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "these type aliases are no longer supported by \
|
note = "these type aliases are no longer supported by \
|
||||||
the standard library, the `libc` crate on \
|
the standard library, the `libc` crate on \
|
||||||
crates.io should be used instead for the correct \
|
crates.io should be used instead for the correct \
|
||||||
definitions"
|
definitions"
|
||||||
)]
|
)]
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ pub trait MetadataExt {
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
#[rustc_deprecated(since = "1.8.0", reason = "other methods of this trait are now preferred")]
|
#[deprecated(since = "1.8.0", note = "other methods of this trait are now preferred")]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
fn as_raw_stat(&self) -> &raw::stat;
|
fn as_raw_stat(&self) -> &raw::stat;
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
//! Linux-specific raw type definitions.
|
//! Linux-specific raw type definitions.
|
||||||
|
|
||||||
#![stable(feature = "raw_ext", since = "1.1.0")]
|
#![stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "these type aliases are no longer supported by \
|
note = "these type aliases are no longer supported by \
|
||||||
the standard library, the `libc` crate on \
|
the standard library, the `libc` crate on \
|
||||||
crates.io should be used instead for the correct \
|
crates.io should be used instead for the correct \
|
||||||
definitions"
|
definitions"
|
||||||
)]
|
)]
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@ pub trait MetadataExt {
|
||||||
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
||||||
/// cross-Unix abstractions contained within the raw stat.
|
/// cross-Unix abstractions contained within the raw stat.
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "deprecated in favor of the accessor \
|
note = "deprecated in favor of the accessor \
|
||||||
methods of this trait"
|
methods of this trait"
|
||||||
)]
|
)]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
fn as_raw_stat(&self) -> &raw::stat;
|
fn as_raw_stat(&self) -> &raw::stat;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
//! macOS-specific raw type definitions
|
//! macOS-specific raw type definitions
|
||||||
|
|
||||||
#![stable(feature = "raw_ext", since = "1.1.0")]
|
#![stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "these type aliases are no longer supported by \
|
note = "these type aliases are no longer supported by \
|
||||||
the standard library, the `libc` crate on \
|
the standard library, the `libc` crate on \
|
||||||
crates.io should be used instead for the correct \
|
crates.io should be used instead for the correct \
|
||||||
definitions"
|
definitions"
|
||||||
)]
|
)]
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@ pub trait MetadataExt {
|
||||||
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
||||||
/// cross-Unix abstractions contained within the raw stat.
|
/// cross-Unix abstractions contained within the raw stat.
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "deprecated in favor of the accessor \
|
note = "deprecated in favor of the accessor \
|
||||||
methods of this trait"
|
methods of this trait"
|
||||||
)]
|
)]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
fn as_raw_stat(&self) -> &raw::stat;
|
fn as_raw_stat(&self) -> &raw::stat;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
//! NetBSD-specific raw type definitions
|
//! NetBSD-specific raw type definitions
|
||||||
|
|
||||||
#![stable(feature = "raw_ext", since = "1.1.0")]
|
#![stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "these type aliases are no longer supported by \
|
note = "these type aliases are no longer supported by \
|
||||||
the standard library, the `libc` crate on \
|
the standard library, the `libc` crate on \
|
||||||
crates.io should be used instead for the correct \
|
crates.io should be used instead for the correct \
|
||||||
definitions"
|
definitions"
|
||||||
)]
|
)]
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@ pub trait MetadataExt {
|
||||||
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
||||||
/// cross-Unix abstractions contained within the raw stat.
|
/// cross-Unix abstractions contained within the raw stat.
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "deprecated in favor of the accessor \
|
note = "deprecated in favor of the accessor \
|
||||||
methods of this trait"
|
methods of this trait"
|
||||||
)]
|
)]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
fn as_raw_stat(&self) -> &raw::stat;
|
fn as_raw_stat(&self) -> &raw::stat;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
//! OpenBSD-specific raw type definitions
|
//! OpenBSD-specific raw type definitions
|
||||||
|
|
||||||
#![stable(feature = "raw_ext", since = "1.1.0")]
|
#![stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "these type aliases are no longer supported by \
|
note = "these type aliases are no longer supported by \
|
||||||
the standard library, the `libc` crate on \
|
the standard library, the `libc` crate on \
|
||||||
crates.io should be used instead for the correct \
|
crates.io should be used instead for the correct \
|
||||||
definitions"
|
definitions"
|
||||||
)]
|
)]
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
||||||
|
|
|
@ -34,10 +34,10 @@ pub trait MetadataExt {
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "deprecated in favor of the accessor \
|
note = "deprecated in favor of the accessor \
|
||||||
methods of this trait"
|
methods of this trait"
|
||||||
)]
|
)]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
fn as_raw_stat(&self) -> &raw::stat;
|
fn as_raw_stat(&self) -> &raw::stat;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
//! Redox-specific raw type definitions
|
//! Redox-specific raw type definitions
|
||||||
|
|
||||||
#![stable(feature = "raw_ext", since = "1.1.0")]
|
#![stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "these type aliases are no longer supported by \
|
note = "these type aliases are no longer supported by \
|
||||||
the standard library, the `libc` crate on \
|
the standard library, the `libc` crate on \
|
||||||
crates.io should be used instead for the correct \
|
crates.io should be used instead for the correct \
|
||||||
definitions"
|
definitions"
|
||||||
)]
|
)]
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@ pub trait MetadataExt {
|
||||||
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
||||||
/// cross-Unix abstractions contained within the raw stat.
|
/// cross-Unix abstractions contained within the raw stat.
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "deprecated in favor of the accessor \
|
note = "deprecated in favor of the accessor \
|
||||||
methods of this trait"
|
methods of this trait"
|
||||||
)]
|
)]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
fn as_raw_stat(&self) -> &raw::stat;
|
fn as_raw_stat(&self) -> &raw::stat;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
//! Solaris-specific raw type definitions
|
//! Solaris-specific raw type definitions
|
||||||
|
|
||||||
#![stable(feature = "raw_ext", since = "1.1.0")]
|
#![stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "these type aliases are no longer supported by \
|
note = "these type aliases are no longer supported by \
|
||||||
the standard library, the `libc` crate on \
|
the standard library, the `libc` crate on \
|
||||||
crates.io should be used instead for the correct \
|
crates.io should be used instead for the correct \
|
||||||
definitions"
|
definitions"
|
||||||
)]
|
)]
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ pub trait CommandExt: Sealed {
|
||||||
///
|
///
|
||||||
/// [`pre_exec`]: CommandExt::pre_exec
|
/// [`pre_exec`]: CommandExt::pre_exec
|
||||||
#[stable(feature = "process_exec", since = "1.15.0")]
|
#[stable(feature = "process_exec", since = "1.15.0")]
|
||||||
#[rustc_deprecated(since = "1.37.0", reason = "should be unsafe, use `pre_exec` instead")]
|
#[deprecated(since = "1.37.0", note = "should be unsafe, use `pre_exec` instead")]
|
||||||
fn before_exec<F>(&mut self, f: F) -> &mut process::Command
|
fn before_exec<F>(&mut self, f: F) -> &mut process::Command
|
||||||
where
|
where
|
||||||
F: FnMut() -> io::Result<()> + Send + Sync + 'static,
|
F: FnMut() -> io::Result<()> + Send + Sync + 'static,
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
//! Unix-specific primitives available on all unix platforms.
|
//! Unix-specific primitives available on all unix platforms.
|
||||||
|
|
||||||
#![stable(feature = "raw_ext", since = "1.1.0")]
|
#![stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
#![rustc_deprecated(
|
#![deprecated(
|
||||||
since = "1.8.0",
|
since = "1.8.0",
|
||||||
reason = "these type aliases are no longer supported by \
|
note = "these type aliases are no longer supported by \
|
||||||
the standard library, the `libc` crate on \
|
the standard library, the `libc` crate on \
|
||||||
crates.io should be used instead for the correct \
|
crates.io should be used instead for the correct \
|
||||||
definitions"
|
definitions"
|
||||||
)]
|
)]
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
||||||
|
|
|
@ -303,7 +303,7 @@ impl Condvar {
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "1.6.0", reason = "replaced by `std::sync::Condvar::wait_timeout`")]
|
#[deprecated(since = "1.6.0", note = "replaced by `std::sync::Condvar::wait_timeout`")]
|
||||||
pub fn wait_timeout_ms<'a, T>(
|
pub fn wait_timeout_ms<'a, T>(
|
||||||
&self,
|
&self,
|
||||||
guard: MutexGuard<'a, T>,
|
guard: MutexGuard<'a, T>,
|
||||||
|
|
|
@ -152,9 +152,9 @@ pub struct OnceState {
|
||||||
/// static START: Once = ONCE_INIT;
|
/// static START: Once = ONCE_INIT;
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(
|
#[deprecated(
|
||||||
since = "1.38.0",
|
since = "1.38.0",
|
||||||
reason = "the `new` function is now preferred",
|
note = "the `new` function is now preferred",
|
||||||
suggestion = "Once::new()"
|
suggestion = "Once::new()"
|
||||||
)]
|
)]
|
||||||
pub const ONCE_INIT: Once = Once::new();
|
pub const ONCE_INIT: Once = Once::new();
|
||||||
|
|
|
@ -789,7 +789,7 @@ pub fn panicking() -> bool {
|
||||||
/// thread::sleep_ms(2000);
|
/// thread::sleep_ms(2000);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "1.6.0", reason = "replaced by `std::thread::sleep`")]
|
#[deprecated(since = "1.6.0", note = "replaced by `std::thread::sleep`")]
|
||||||
pub fn sleep_ms(ms: u32) {
|
pub fn sleep_ms(ms: u32) {
|
||||||
sleep(Duration::from_millis(ms as u64))
|
sleep(Duration::from_millis(ms as u64))
|
||||||
}
|
}
|
||||||
|
@ -943,7 +943,7 @@ pub fn park() {
|
||||||
///
|
///
|
||||||
/// See the [park documentation][`park`] for more detail.
|
/// See the [park documentation][`park`] for more detail.
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_deprecated(since = "1.6.0", reason = "replaced by `std::thread::park_timeout`")]
|
#[deprecated(since = "1.6.0", note = "replaced by `std::thread::park_timeout`")]
|
||||||
pub fn park_timeout_ms(ms: u32) {
|
pub fn park_timeout_ms(ms: u32) {
|
||||||
park_timeout(Duration::from_millis(ms as u64))
|
park_timeout(Duration::from_millis(ms as u64))
|
||||||
}
|
}
|
||||||
|
|
|
@ -531,8 +531,8 @@ fn short_item_info(
|
||||||
if let Some(depr @ Deprecation { note, since, is_since_rustc_version: _, suggestion: _ }) =
|
if let Some(depr @ Deprecation { note, since, is_since_rustc_version: _, suggestion: _ }) =
|
||||||
item.deprecation(cx.tcx())
|
item.deprecation(cx.tcx())
|
||||||
{
|
{
|
||||||
// We display deprecation messages for #[deprecated] and #[rustc_deprecated]
|
// We display deprecation messages for #[deprecated], but only display
|
||||||
// but only display the future-deprecation messages for #[rustc_deprecated].
|
// the future-deprecation messages for rustc versions.
|
||||||
let mut message = if let Some(since) = since {
|
let mut message = if let Some(since) = since {
|
||||||
let since = since.as_str();
|
let since = since.as_str();
|
||||||
if !stability::deprecation_in_effect(&depr) {
|
if !stability::deprecation_in_effect(&depr) {
|
||||||
|
|
18
src/test/rustdoc/deprecated-future-staged-api.rs
Normal file
18
src/test/rustdoc/deprecated-future-staged-api.rs
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#![feature(staged_api)]
|
||||||
|
#![stable(feature = "deprecated-future-staged-api", since = "1.0.0")]
|
||||||
|
|
||||||
|
// @has deprecated_future_staged_api/index.html '//*[@class="stab deprecated"]' \
|
||||||
|
// 'Deprecation planned'
|
||||||
|
// @has deprecated_future_staged_api/struct.S1.html '//*[@class="stab deprecated"]' \
|
||||||
|
// 'Deprecating in 99.99.99: effectively never'
|
||||||
|
#[deprecated(since = "99.99.99", note = "effectively never")]
|
||||||
|
#[stable(feature = "deprecated-future-staged-api", since = "1.0.0")]
|
||||||
|
pub struct S1;
|
||||||
|
|
||||||
|
// @has deprecated_future_staged_api/index.html '//*[@class="stab deprecated"]' \
|
||||||
|
// 'Deprecation planned'
|
||||||
|
// @has deprecated_future_staged_api/struct.S2.html '//*[@class="stab deprecated"]' \
|
||||||
|
// 'Deprecating in a future Rust version: literally never'
|
||||||
|
#[deprecated(since = "TBD", note = "literally never")]
|
||||||
|
#[stable(feature = "deprecated-future-staged-api", since = "1.0.0")]
|
||||||
|
pub struct S2;
|
|
@ -1,11 +1,10 @@
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
|
|
||||||
#![stable(feature = "rust1", since = "1.0.0")]
|
#![stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
|
||||||
/// docs for my_macro
|
/// docs for my_macro
|
||||||
#[unstable(feature = "macro_test", issue = "none")]
|
#[unstable(feature = "macro_test", issue = "none")]
|
||||||
#[rustc_deprecated(since = "1.2.3", reason = "text")]
|
#[deprecated(since = "1.2.3", note = "text")]
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! my_macro {
|
macro_rules! my_macro {
|
||||||
() => ()
|
() => {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
// build-aux-docs
|
// build-aux-docs
|
||||||
|
|
||||||
#![feature(macro_test)]
|
#![feature(macro_test)]
|
||||||
|
|
||||||
#![crate_name = "foo"]
|
#![crate_name = "foo"]
|
||||||
|
|
||||||
extern crate macros;
|
extern crate macros;
|
||||||
|
@ -16,5 +15,5 @@ extern crate macros;
|
||||||
// @has - '//*[@class="docblock"]' 'docs for my_macro'
|
// @has - '//*[@class="docblock"]' 'docs for my_macro'
|
||||||
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.2.3: text'
|
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.2.3: text'
|
||||||
// @has - '//*[@class="stab unstable"]' 'macro_test'
|
// @has - '//*[@class="stab unstable"]' 'macro_test'
|
||||||
// @has - '//a/@href' '../src/macros/macros.rs.html#9-11'
|
// @has - '//a/@href' '../src/macros/macros.rs.html#8-10'
|
||||||
pub use macros::my_macro;
|
pub use macros::my_macro;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
// @matches issue_32374/struct.T.html '//*[@class="stab unstable"]' \
|
// @matches issue_32374/struct.T.html '//*[@class="stab unstable"]' \
|
||||||
// '🔬 This is a nightly-only experimental API. \(test\s#32374\)$'
|
// '🔬 This is a nightly-only experimental API. \(test\s#32374\)$'
|
||||||
/// Docs
|
/// Docs
|
||||||
#[rustc_deprecated(since = "1.0.0", reason = "text")]
|
#[deprecated(since = "1.0.0", note = "text")]
|
||||||
#[unstable(feature = "test", issue = "32374")]
|
#[unstable(feature = "test", issue = "32374")]
|
||||||
pub struct T;
|
pub struct T;
|
||||||
|
|
||||||
|
@ -22,6 +22,6 @@ pub struct T;
|
||||||
// '👎 Deprecated since 1.0.0: deprecated'
|
// '👎 Deprecated since 1.0.0: deprecated'
|
||||||
// @has issue_32374/struct.U.html '//*[@class="stab unstable"]' \
|
// @has issue_32374/struct.U.html '//*[@class="stab unstable"]' \
|
||||||
// '🔬 This is a nightly-only experimental API. (test #32374)'
|
// '🔬 This is a nightly-only experimental API. (test #32374)'
|
||||||
#[rustc_deprecated(since = "1.0.0", reason = "deprecated")]
|
#[deprecated(since = "1.0.0", note = "deprecated")]
|
||||||
#[unstable(feature = "test", issue = "32374", reason = "unstable")]
|
#[unstable(feature = "test", issue = "32374", reason = "unstable")]
|
||||||
pub struct U;
|
pub struct U;
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
#![feature(staged_api)]
|
|
||||||
|
|
||||||
#![stable(feature = "rustc_deprecated-future-test", since = "1.0.0")]
|
|
||||||
|
|
||||||
// @has rustc_deprecated_future/index.html '//*[@class="stab deprecated"]' \
|
|
||||||
// 'Deprecation planned'
|
|
||||||
// @has rustc_deprecated_future/struct.S1.html '//*[@class="stab deprecated"]' \
|
|
||||||
// 'Deprecating in 99.99.99: effectively never'
|
|
||||||
#[rustc_deprecated(since = "99.99.99", reason = "effectively never")]
|
|
||||||
#[stable(feature = "rustc_deprecated-future-test", since = "1.0.0")]
|
|
||||||
pub struct S1;
|
|
||||||
|
|
||||||
// @has rustc_deprecated_future/index.html '//*[@class="stab deprecated"]' \
|
|
||||||
// 'Deprecation planned'
|
|
||||||
// @has rustc_deprecated_future/struct.S2.html '//*[@class="stab deprecated"]' \
|
|
||||||
// 'Deprecating in a future Rust version: literally never'
|
|
||||||
#[rustc_deprecated(since = "TBD", reason = "literally never")]
|
|
||||||
#[stable(feature = "rustc_deprecated-future-test", since = "1.0.0")]
|
|
||||||
pub struct S2;
|
|
|
@ -6,7 +6,7 @@
|
||||||
pub fn deprecated_future() {}
|
pub fn deprecated_future() {}
|
||||||
|
|
||||||
fn test() {
|
fn test() {
|
||||||
deprecated_future(); // ok; deprecated_in_future only applies to rustc_deprecated
|
deprecated_future(); // ok; deprecated_in_future only applies with `#![feature(staged_api)]`
|
||||||
//~^ WARNING use of deprecated function `deprecated_future`: text [deprecated]
|
//~^ WARNING use of deprecated function `deprecated_future`: text [deprecated]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
warning: use of deprecated function `deprecated_future`: text
|
warning: use of deprecated function `deprecated_future`: text
|
||||||
--> $DIR/deprecation-in-future.rs:9:5
|
--> $DIR/deprecation-in-future.rs:9:5
|
||||||
|
|
|
|
||||||
LL | deprecated_future(); // ok; deprecated_in_future only applies to rustc_deprecated
|
LL | deprecated_future(); // ok; deprecated_in_future only applies with `#![feature(staged_api)]`
|
||||||
| ^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= note: `#[warn(deprecated)]` on by default
|
= note: `#[warn(deprecated)]` on by default
|
||||||
|
|
|
@ -260,7 +260,7 @@ mod this_crate {
|
||||||
<Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
|
<Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
|
||||||
<Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
|
<Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
|
||||||
|
|
||||||
// Future deprecations are only permitted for rustc_deprecated.
|
// Future deprecations are only permitted with `#![feature(staged_api)]`
|
||||||
deprecated_future(); //~ ERROR use of deprecated function
|
deprecated_future(); //~ ERROR use of deprecated function
|
||||||
deprecated_future_text(); //~ ERROR use of deprecated function
|
deprecated_future_text(); //~ ERROR use of deprecated function
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ mod bogus_attribute_types_1 {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deprecated(since = "a", note = "b")]
|
#[deprecated(since = "a", note = "b")]
|
||||||
#[deprecated(since = "a", note = "b")] //~ ERROR multiple deprecated attributes
|
#[deprecated(since = "a", note = "b")] //~ ERROR multiple `deprecated` attributes
|
||||||
fn multiple1() { }
|
fn multiple1() { }
|
||||||
|
|
||||||
#[deprecated(since = "a", since = "b", note = "c")] //~ ERROR multiple 'since' items
|
#[deprecated(since = "a", since = "b", note = "c")] //~ ERROR multiple 'since' items
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
|
error: multiple `deprecated` attributes
|
||||||
|
--> $DIR/deprecation-sanity.rs:27:1
|
||||||
|
|
|
||||||
|
LL | #[deprecated(since = "a", note = "b")]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
||||||
|
|
|
||||||
|
note: attribute also specified here
|
||||||
|
--> $DIR/deprecation-sanity.rs:26:1
|
||||||
|
|
|
||||||
|
LL | #[deprecated(since = "a", note = "b")]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0541]: unknown meta item 'reason'
|
error[E0541]: unknown meta item 'reason'
|
||||||
--> $DIR/deprecation-sanity.rs:4:43
|
--> $DIR/deprecation-sanity.rs:4:43
|
||||||
|
|
|
|
||||||
|
@ -40,14 +52,6 @@ error[E0565]: item in `deprecated` must be a key/value pair
|
||||||
LL | #[deprecated("test")]
|
LL | #[deprecated("test")]
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error[E0550]: multiple deprecated attributes
|
|
||||||
--> $DIR/deprecation-sanity.rs:27:1
|
|
||||||
|
|
|
||||||
LL | #[deprecated(since = "a", note = "b")]
|
|
||||||
| -------------------------------------- first deprecation attribute
|
|
||||||
LL | #[deprecated(since = "a", note = "b")]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ repeated deprecation attribute
|
|
||||||
|
|
||||||
error[E0538]: multiple 'since' items
|
error[E0538]: multiple 'since' items
|
||||||
--> $DIR/deprecation-sanity.rs:30:27
|
--> $DIR/deprecation-sanity.rs:30:27
|
||||||
|
|
|
|
||||||
|
@ -64,5 +68,5 @@ LL | #[deprecated = "hello"]
|
||||||
|
|
||||||
error: aborting due to 10 previous errors
|
error: aborting due to 10 previous errors
|
||||||
|
|
||||||
Some errors have detailed explanations: E0538, E0541, E0550, E0551, E0565.
|
Some errors have detailed explanations: E0538, E0541, E0551, E0565.
|
||||||
For more information about an error, try `rustc --explain E0538`.
|
For more information about an error, try `rustc --explain E0538`.
|
||||||
|
|
13
src/test/ui/deprecation/rustc_deprecated.rs
Normal file
13
src/test/ui/deprecation/rustc_deprecated.rs
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
// compile-flags: --crate-type=lib
|
||||||
|
|
||||||
|
#![feature(staged_api)]
|
||||||
|
#![stable(since = "1.0.0", feature = "rust1")]
|
||||||
|
|
||||||
|
#[rustc_deprecated( //~ ERROR `#[rustc_deprecated]` has been removed
|
||||||
|
//~^ HELP use `#[deprecated]` instead
|
||||||
|
since = "1.100.0",
|
||||||
|
reason = "text" //~ ERROR `reason` has been renamed
|
||||||
|
//~^ HELP use `note` instead
|
||||||
|
)]
|
||||||
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
fn foo() {}
|
21
src/test/ui/deprecation/rustc_deprecated.stderr
Normal file
21
src/test/ui/deprecation/rustc_deprecated.stderr
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
error: `#[rustc_deprecated]` has been removed
|
||||||
|
--> $DIR/rustc_deprecated.rs:6:1
|
||||||
|
|
|
||||||
|
LL | / #[rustc_deprecated(
|
||||||
|
LL | |
|
||||||
|
LL | | since = "1.100.0",
|
||||||
|
LL | | reason = "text"
|
||||||
|
LL | |
|
||||||
|
LL | | )]
|
||||||
|
| |__^
|
||||||
|
|
|
||||||
|
= help: use `#[deprecated]` instead
|
||||||
|
|
||||||
|
error: `reason` has been renamed
|
||||||
|
--> $DIR/rustc_deprecated.rs:9:5
|
||||||
|
|
|
||||||
|
LL | reason = "text"
|
||||||
|
| ^^^^^^^^^^^^^^^ help: use `note` instead: `note = "text"`
|
||||||
|
|
||||||
|
error: aborting due to 2 previous errors
|
||||||
|
|
|
@ -59,7 +59,7 @@ fn multiple3() { }
|
||||||
|
|
||||||
#[stable(feature = "a", since = "b")] //~ ERROR invalid stability version found
|
#[stable(feature = "a", since = "b")] //~ ERROR invalid stability version found
|
||||||
#[deprecated(since = "b", note = "text")]
|
#[deprecated(since = "b", note = "text")]
|
||||||
#[deprecated(since = "b", note = "text")] //~ ERROR multiple deprecated attributes
|
#[deprecated(since = "b", note = "text")] //~ ERROR multiple `deprecated` attributes
|
||||||
#[rustc_const_unstable(feature = "c", issue = "none")]
|
#[rustc_const_unstable(feature = "c", issue = "none")]
|
||||||
#[rustc_const_unstable(feature = "d", issue = "none")] //~ ERROR multiple stability levels
|
#[rustc_const_unstable(feature = "d", issue = "none")] //~ ERROR multiple stability levels
|
||||||
pub const fn multiple4() { }
|
pub const fn multiple4() { }
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
|
error: multiple `deprecated` attributes
|
||||||
|
--> $DIR/stability-attribute-sanity.rs:62:1
|
||||||
|
|
|
||||||
|
LL | #[deprecated(since = "b", note = "text")]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
||||||
|
|
|
||||||
|
note: attribute also specified here
|
||||||
|
--> $DIR/stability-attribute-sanity.rs:61:1
|
||||||
|
|
|
||||||
|
LL | #[deprecated(since = "b", note = "text")]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0541]: unknown meta item 'reason'
|
error[E0541]: unknown meta item 'reason'
|
||||||
--> $DIR/stability-attribute-sanity.rs:8:42
|
--> $DIR/stability-attribute-sanity.rs:8:42
|
||||||
|
|
|
|
||||||
|
@ -82,14 +94,6 @@ error[E0544]: multiple stability levels
|
||||||
LL | #[stable(feature = "a", since = "b")]
|
LL | #[stable(feature = "a", since = "b")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0550]: multiple deprecated attributes
|
|
||||||
--> $DIR/stability-attribute-sanity.rs:62:1
|
|
||||||
|
|
|
||||||
LL | #[deprecated(since = "b", note = "text")]
|
|
||||||
| ----------------------------------------- first deprecation attribute
|
|
||||||
LL | #[deprecated(since = "b", note = "text")]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ repeated deprecation attribute
|
|
||||||
|
|
||||||
error[E0544]: multiple stability levels
|
error[E0544]: multiple stability levels
|
||||||
--> $DIR/stability-attribute-sanity.rs:64:1
|
--> $DIR/stability-attribute-sanity.rs:64:1
|
||||||
|
|
|
|
||||||
|
@ -128,5 +132,5 @@ LL | #[stable(feature = "a", since = "1.0.0")]
|
||||||
|
|
||||||
error: aborting due to 20 previous errors
|
error: aborting due to 20 previous errors
|
||||||
|
|
||||||
Some errors have detailed explanations: E0539, E0541, E0542, E0543, E0544, E0546, E0547, E0549, E0550.
|
Some errors have detailed explanations: E0539, E0541, E0542, E0543, E0544, E0546, E0547, E0549.
|
||||||
For more information about an error, try `rustc --explain E0539`.
|
For more information about an error, try `rustc --explain E0539`.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue