fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: docs for function which may panic missing `# Panics` section 2 --> $DIR/missing_panics_doc.rs:13:1 3 | 4LL | pub fn unwrap() { 5 | ^^^^^^^^^^^^^^^ 6 | 7note: first possible panic found here 8 --> $DIR/missing_panics_doc.rs:15:5 9 | 10LL | result.unwrap() 11 | ^^^^^^^^^^^^^^^ 12 = note: `-D clippy::missing-panics-doc` implied by `-D warnings` 13 = help: to override `-D warnings` add `#[allow(clippy::missing_panics_doc)]` 14 15error: docs for function which may panic missing `# Panics` section 16 --> $DIR/missing_panics_doc.rs:19:1 17 | 18LL | pub fn panic() { 19 | ^^^^^^^^^^^^^^ 20 | 21note: first possible panic found here 22 --> $DIR/missing_panics_doc.rs:20:5 23 | 24LL | panic!("This function panics") 25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 26 27error: docs for function which may panic missing `# Panics` section 28 --> $DIR/missing_panics_doc.rs:24:1 29 | 30LL | pub fn inner_body(opt: Option<u32>) { 31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 32 | 33note: first possible panic found here 34 --> $DIR/missing_panics_doc.rs:27:13 35 | 36LL | panic!() 37 | ^^^^^^^^ 38 39error: docs for function which may panic missing `# Panics` section 40 --> $DIR/missing_panics_doc.rs:33:1 41 | 42LL | pub fn unreachable_and_panic() { 43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 44 | 45note: first possible panic found here 46 --> $DIR/missing_panics_doc.rs:34:39 47 | 48LL | if true { unreachable!() } else { panic!() } 49 | ^^^^^^^^ 50 51error: docs for function which may panic missing `# Panics` section 52 --> $DIR/missing_panics_doc.rs:38:1 53 | 54LL | pub fn assert_eq() { 55 | ^^^^^^^^^^^^^^^^^^ 56 | 57note: first possible panic found here 58 --> $DIR/missing_panics_doc.rs:40:5 59 | 60LL | assert_eq!(x, 0); 61 | ^^^^^^^^^^^^^^^^ 62 63error: docs for function which may panic missing `# Panics` section 64 --> $DIR/missing_panics_doc.rs:44:1 65 | 66LL | pub fn assert_ne() { 67 | ^^^^^^^^^^^^^^^^^^ 68 | 69note: first possible panic found here 70 --> $DIR/missing_panics_doc.rs:46:5 71 | 72LL | assert_ne!(x, 0); 73 | ^^^^^^^^^^^^^^^^ 74 75error: docs for function which may panic missing `# Panics` section 76 --> $DIR/missing_panics_doc.rs:151:5 77 | 78LL | pub fn option_unwrap<T>(v: &[T]) -> &T { 79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 80 | 81note: first possible panic found here 82 --> $DIR/missing_panics_doc.rs:153:9 83 | 84LL | o.unwrap() 85 | ^^^^^^^^^^ 86 87error: docs for function which may panic missing `# Panics` section 88 --> $DIR/missing_panics_doc.rs:156:5 89 | 90LL | pub fn option_expect<T>(v: &[T]) -> &T { 91 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 92 | 93note: first possible panic found here 94 --> $DIR/missing_panics_doc.rs:158:9 95 | 96LL | o.expect("passed an empty thing") 97 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 98 99error: docs for function which may panic missing `# Panics` section 100 --> $DIR/missing_panics_doc.rs:161:5 101 | 102LL | pub fn result_unwrap<T>(v: &[T]) -> &T { 103 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 104 | 105note: first possible panic found here 106 --> $DIR/missing_panics_doc.rs:163:9 107 | 108LL | res.unwrap() 109 | ^^^^^^^^^^^^ 110 111error: docs for function which may panic missing `# Panics` section 112 --> $DIR/missing_panics_doc.rs:166:5 113 | 114LL | pub fn result_expect<T>(v: &[T]) -> &T { 115 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 116 | 117note: first possible panic found here 118 --> $DIR/missing_panics_doc.rs:168:9 119 | 120LL | res.expect("passed an empty thing") 121 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 122 123error: docs for function which may panic missing `# Panics` section 124 --> $DIR/missing_panics_doc.rs:171:5 125 | 126LL | pub fn last_unwrap(v: &[u32]) -> u32 { 127 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 128 | 129note: first possible panic found here 130 --> $DIR/missing_panics_doc.rs:172:10 131 | 132LL | *v.last().unwrap() 133 | ^^^^^^^^^^^^^^^^^ 134 135error: docs for function which may panic missing `# Panics` section 136 --> $DIR/missing_panics_doc.rs:175:5 137 | 138LL | pub fn last_expect(v: &[u32]) -> u32 { 139 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 140 | 141note: first possible panic found here 142 --> $DIR/missing_panics_doc.rs:176:10 143 | 144LL | *v.last().expect("passed an empty thing") 145 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 146 147error: aborting due to 12 previous errors 148