diff options
| author | Jack Huey <31162821+jackh726@users.noreply.github.com> | 2021-05-18 22:36:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-18 22:36:18 -0400 |
| commit | e113a4f77bc56db8511f663dd0800ed9c9a27135 (patch) | |
| tree | 80c439b28fe215d33987b2c6388803bde03bb102 | |
| parent | 9b5cf645dc1c70745d84c6a7e4a5e1adaee704f2 (diff) | |
| parent | 18b0e7bf2cc527aae98af62a9d66b26759d84db3 (diff) | |
| download | rust-e113a4f77bc56db8511f663dd0800ed9c9a27135.tar.gz rust-e113a4f77bc56db8511f663dd0800ed9c9a27135.zip | |
Rollup merge of #85425 - mbartlett21:patch-1, r=scottmcm
Fix must_use on `Option::is_none` This fixes the `#[must_use = ...]` on `Option::is_none` to have a working suggestion.
| -rw-r--r-- | library/core/src/option.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/option.rs b/library/core/src/option.rs index c5b1c804ead..cfc1768dee9 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -209,7 +209,7 @@ impl<T> Option<T> { /// assert_eq!(x.is_none(), true); /// ``` #[must_use = "if you intended to assert that this doesn't have a value, consider \ - `.and_then(|| panic!(\"`Option` had a value when expected `None`\"))` instead"] + `.and_then(|_| panic!(\"`Option` had a value when expected `None`\"))` instead"] #[inline] #[rustc_const_stable(feature = "const_option", since = "1.48.0")] #[stable(feature = "rust1", since = "1.0.0")] |
