Skip to content

Commit 6a3ef93

Browse files
authored
remove unnecessary notations (#13801)
fix #13799 changelog: none
2 parents c4aeb32 + d5059d8 commit 6a3ef93

File tree

5 files changed

+0
-14
lines changed

5 files changed

+0
-14
lines changed

clippy_lints/src/disallowed_macros.rs

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ declare_clippy_lint! {
4343
/// ```no_run
4444
/// use serde::Serialize;
4545
///
46-
/// // Example code where clippy issues a warning
4746
/// println!("warns");
4847
///
4948
/// // The diagnostic will contain the message "no serializing"

clippy_lints/src/disallowed_methods.rs

-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ declare_clippy_lint! {
3535
/// ```
3636
///
3737
/// ```rust,ignore
38-
/// // Example code where clippy issues a warning
3938
/// let xs = vec![1, 2, 3, 4];
4039
/// xs.leak(); // Vec::leak is disallowed in the config.
4140
/// // The diagnostic contains the message "no leaking memory".
@@ -47,7 +46,6 @@ declare_clippy_lint! {
4746
///
4847
/// Use instead:
4948
/// ```rust,ignore
50-
/// // Example code which does not raise clippy warning
5149
/// let mut xs = Vec::new(); // Vec::new is _not_ disallowed in the config.
5250
/// xs.push(123); // Vec::push is _not_ disallowed in the config.
5351
/// ```

clippy_lints/src/methods/mod.rs

-5
Original file line numberDiff line numberDiff line change
@@ -1864,7 +1864,6 @@ declare_clippy_lint! {
18641864
///
18651865
/// ### Example
18661866
/// ```no_run
1867-
/// // example code where clippy issues a warning
18681867
/// let opt: Option<u32> = None;
18691868
///
18701869
/// opt.unwrap_or_else(|| 42);
@@ -3839,13 +3838,11 @@ declare_clippy_lint! {
38393838
///
38403839
/// ### Example
38413840
/// ```no_run
3842-
/// // example code where clippy issues a warning
38433841
/// vec![Some(1)].into_iter().filter(Option::is_some);
38443842
///
38453843
/// ```
38463844
/// Use instead:
38473845
/// ```no_run
3848-
/// // example code which does not raise clippy warning
38493846
/// vec![Some(1)].into_iter().flatten();
38503847
/// ```
38513848
#[clippy::version = "1.77.0"]
@@ -3865,13 +3862,11 @@ declare_clippy_lint! {
38653862
///
38663863
/// ### Example
38673864
/// ```no_run
3868-
/// // example code where clippy issues a warning
38693865
/// vec![Ok::<i32, String>(1)].into_iter().filter(Result::is_ok);
38703866
///
38713867
/// ```
38723868
/// Use instead:
38733869
/// ```no_run
3874-
/// // example code which does not raise clippy warning
38753870
/// vec![Ok::<i32, String>(1)].into_iter().flatten();
38763871
/// ```
38773872
#[clippy::version = "1.77.0"]

clippy_lints/src/missing_const_for_thread_local.rs

-2
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,12 @@ declare_clippy_lint! {
2727
///
2828
/// ### Example
2929
/// ```no_run
30-
/// // example code where clippy issues a warning
3130
/// thread_local! {
3231
/// static BUF: String = String::new();
3332
/// }
3433
/// ```
3534
/// Use instead:
3635
/// ```no_run
37-
/// // example code which does not raise clippy warning
3836
/// thread_local! {
3937
/// static BUF: String = const { String::new() };
4038
/// }

clippy_lints/src/strings.rs

-4
Original file line numberDiff line numberDiff line change
@@ -370,12 +370,10 @@ declare_clippy_lint! {
370370
///
371371
/// ### Example
372372
/// ```no_run
373-
/// // example code where clippy issues a warning
374373
/// let _ = "str".to_string();
375374
/// ```
376375
/// Use instead:
377376
/// ```no_run
378-
/// // example code which does not raise clippy warning
379377
/// let _ = "str".to_owned();
380378
/// ```
381379
#[clippy::version = "pre 1.29.0"]
@@ -424,13 +422,11 @@ declare_clippy_lint! {
424422
///
425423
/// ### Example
426424
/// ```no_run
427-
/// // example code where clippy issues a warning
428425
/// let msg = String::from("Hello World");
429426
/// let _ = msg.to_string();
430427
/// ```
431428
/// Use instead:
432429
/// ```no_run
433-
/// // example code which does not raise clippy warning
434430
/// let msg = String::from("Hello World");
435431
/// let _ = msg.clone();
436432
/// ```

0 commit comments

Comments
 (0)