diff options
| author | Jason Newcomb <jsnewcomb@pm.me> | 2023-09-26 23:56:38 -0400 |
|---|---|---|
| committer | Jason Newcomb <jsnewcomb@pm.me> | 2023-10-05 18:21:47 -0400 |
| commit | d464b72970faf5769c6c02d52f21f8e26eb1727d (patch) | |
| tree | 1357c41f218e1ecc933587e8d654b1f5d7b6e647 /library/alloc/src/borrow.rs | |
| parent | cae0791da47bb01f16885eb233dcd66b0093a6e1 (diff) | |
| download | rust-d464b72970faf5769c6c02d52f21f8e26eb1727d.tar.gz rust-d464b72970faf5769c6c02d52f21f8e26eb1727d.zip | |
Add more diagnostic items for clippy
Diffstat (limited to 'library/alloc/src/borrow.rs')
| -rw-r--r-- | library/alloc/src/borrow.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/alloc/src/borrow.rs b/library/alloc/src/borrow.rs index 84331eba2d4..b6b6246baa6 100644 --- a/library/alloc/src/borrow.rs +++ b/library/alloc/src/borrow.rs @@ -55,6 +55,7 @@ pub trait ToOwned { /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[must_use = "cloning is often expensive and is not expected to have side effects"] + #[cfg_attr(not(test), rustc_diagnostic_item = "to_owned_method")] fn to_owned(&self) -> Self::Owned; /// Uses borrowed data to replace owned data, usually by cloning. |
