2024-05-06 15:38:18 -05:00
|
|
|
#![warn(clippy::doc_lazy_continuation)]
|
|
|
|
|
|
|
|
/// 1. nest here
|
|
|
|
/// lazy continuation
|
2024-06-27 18:35:43 -05:00
|
|
|
//~^ ERROR: doc list item without indentation
|
2024-05-06 15:38:18 -05:00
|
|
|
fn one() {}
|
|
|
|
|
|
|
|
/// 1. first line
|
|
|
|
/// lazy list continuations don't make warnings with this lint
|
2024-06-27 18:35:43 -05:00
|
|
|
///
|
|
|
|
//~^ ERROR: doc list item without indentation
|
|
|
|
/// because they don't have the
|
|
|
|
//~^ ERROR: doc list item without indentation
|
2024-05-06 15:38:18 -05:00
|
|
|
fn two() {}
|
|
|
|
|
|
|
|
/// - nest here
|
|
|
|
/// lazy continuation
|
2024-06-27 18:35:43 -05:00
|
|
|
//~^ ERROR: doc list item without indentation
|
2024-05-06 15:38:18 -05:00
|
|
|
fn three() {}
|
|
|
|
|
|
|
|
/// - first line
|
|
|
|
/// lazy list continuations don't make warnings with this lint
|
2024-06-27 18:35:43 -05:00
|
|
|
///
|
|
|
|
//~^ ERROR: doc list item without indentation
|
|
|
|
/// because they don't have the
|
|
|
|
//~^ ERROR: doc list item without indentation
|
2024-05-06 15:38:18 -05:00
|
|
|
fn four() {}
|
|
|
|
|
|
|
|
/// - nest here
|
|
|
|
/// lazy continuation
|
2024-06-27 18:35:43 -05:00
|
|
|
//~^ ERROR: doc list item without indentation
|
2024-05-06 15:38:18 -05:00
|
|
|
fn five() {}
|
|
|
|
|
|
|
|
/// - - first line
|
|
|
|
/// this will warn on the lazy continuation
|
2024-06-27 18:35:43 -05:00
|
|
|
///
|
|
|
|
//~^ ERROR: doc list item without indentation
|
|
|
|
/// and so should this
|
|
|
|
//~^ ERROR: doc list item without indentation
|
2024-05-06 15:38:18 -05:00
|
|
|
fn six() {}
|
|
|
|
|
|
|
|
/// - - first line
|
|
|
|
///
|
|
|
|
/// this is not a lazy continuation
|
|
|
|
fn seven() {}
|
2024-05-18 16:34:52 -05:00
|
|
|
|
|
|
|
#[rustfmt::skip]
|
|
|
|
// https://github.com/rust-lang/rust-clippy/pull/12770#issuecomment-2118601768
|
|
|
|
/// Returns a list of ProtocolDescriptors from a Serde JSON input.
|
|
|
|
///
|
|
|
|
/// Defined Protocol Identifiers for the Protocol Descriptor
|
|
|
|
/// We intentionally omit deprecated profile identifiers.
|
|
|
|
/// From Bluetooth Assigned Numbers:
|
|
|
|
/// https://www.bluetooth.com/specifications/assigned-numbers/service-discovery
|
|
|
|
///
|
|
|
|
/// # Arguments
|
|
|
|
/// * `protocol_descriptors`: A Json Representation of the ProtocolDescriptors
|
|
|
|
/// to set up. Example:
|
|
|
|
/// 'protocol_descriptors': [
|
2024-06-27 18:35:43 -05:00
|
|
|
//~^ ERROR: doc list item without indentation
|
2024-05-18 16:34:52 -05:00
|
|
|
/// {
|
|
|
|
/// 'protocol': 25, # u64 Representation of ProtocolIdentifier::AVDTP
|
|
|
|
/// 'params': [
|
|
|
|
/// {
|
|
|
|
/// 'data': 0x0103 # to indicate 1.3
|
|
|
|
/// },
|
|
|
|
/// {
|
|
|
|
/// 'data': 0x0105 # to indicate 1.5
|
|
|
|
/// }
|
|
|
|
/// ]
|
|
|
|
/// },
|
|
|
|
/// {
|
|
|
|
/// 'protocol': 1, # u64 Representation of ProtocolIdentifier::SDP
|
|
|
|
/// 'params': [{
|
|
|
|
/// 'data': 0x0019
|
|
|
|
/// }]
|
|
|
|
/// }
|
|
|
|
/// ]
|
2024-06-27 18:35:43 -05:00
|
|
|
//~^ ERROR: doc list item without indentation
|
2024-05-18 16:34:52 -05:00
|
|
|
fn eight() {}
|