Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unnecessary notations #13801

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion clippy_lints/src/disallowed_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ declare_clippy_lint! {
/// ```no_run
/// use serde::Serialize;
///
/// // Example code where clippy issues a warning
/// println!("warns");
///
/// // The diagnostic will contain the message "no serializing"
Expand Down
2 changes: 0 additions & 2 deletions clippy_lints/src/disallowed_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ declare_clippy_lint! {
/// ```
///
/// ```rust,ignore
/// // Example code where clippy issues a warning
/// let xs = vec![1, 2, 3, 4];
/// xs.leak(); // Vec::leak is disallowed in the config.
/// // The diagnostic contains the message "no leaking memory".
Expand All @@ -47,7 +46,6 @@ declare_clippy_lint! {
///
/// Use instead:
/// ```rust,ignore
/// // Example code which does not raise clippy warning
/// let mut xs = Vec::new(); // Vec::new is _not_ disallowed in the config.
/// xs.push(123); // Vec::push is _not_ disallowed in the config.
/// ```
Expand Down
5 changes: 0 additions & 5 deletions clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1864,7 +1864,6 @@ declare_clippy_lint! {
///
/// ### Example
/// ```no_run
/// // example code where clippy issues a warning
/// let opt: Option<u32> = None;
///
/// opt.unwrap_or_else(|| 42);
Expand Down Expand Up @@ -3839,13 +3838,11 @@ declare_clippy_lint! {
///
/// ### Example
/// ```no_run
/// // example code where clippy issues a warning
/// vec![Some(1)].into_iter().filter(Option::is_some);
///
/// ```
/// Use instead:
/// ```no_run
/// // example code which does not raise clippy warning
/// vec![Some(1)].into_iter().flatten();
/// ```
#[clippy::version = "1.77.0"]
Expand All @@ -3865,13 +3862,11 @@ declare_clippy_lint! {
///
/// ### Example
/// ```no_run
/// // example code where clippy issues a warning
/// vec![Ok::<i32, String>(1)].into_iter().filter(Result::is_ok);
///
/// ```
/// Use instead:
/// ```no_run
/// // example code which does not raise clippy warning
/// vec![Ok::<i32, String>(1)].into_iter().flatten();
/// ```
#[clippy::version = "1.77.0"]
Expand Down
2 changes: 0 additions & 2 deletions clippy_lints/src/missing_const_for_thread_local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@ declare_clippy_lint! {
///
/// ### Example
/// ```no_run
/// // example code where clippy issues a warning
/// thread_local! {
/// static BUF: String = String::new();
/// }
/// ```
/// Use instead:
/// ```no_run
/// // example code which does not raise clippy warning
/// thread_local! {
/// static BUF: String = const { String::new() };
/// }
Expand Down
4 changes: 0 additions & 4 deletions clippy_lints/src/strings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,10 @@ declare_clippy_lint! {
///
/// ### Example
/// ```no_run
/// // example code where clippy issues a warning
/// let _ = "str".to_string();
/// ```
/// Use instead:
/// ```no_run
/// // example code which does not raise clippy warning
/// let _ = "str".to_owned();
/// ```
#[clippy::version = "pre 1.29.0"]
Expand Down Expand Up @@ -424,13 +422,11 @@ declare_clippy_lint! {
///
/// ### Example
/// ```no_run
/// // example code where clippy issues a warning
/// let msg = String::from("Hello World");
/// let _ = msg.to_string();
/// ```
/// Use instead:
/// ```no_run
/// // example code which does not raise clippy warning
/// let msg = String::from("Hello World");
/// let _ = msg.clone();
/// ```
Expand Down
Loading