You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE/CODING-GUIDELINE.yml
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -155,22 +155,24 @@ body:
155
155
attributes:
156
156
label: Non-Compliant Example - Code
157
157
description: |
158
-
Code example showcasing the unintended or consequential behavior. Non-normative.
158
+
Code example showcasing the unintended or consequential behavior. Non-normative. Please wrap your code in a fenced code block with the `rust` language specifier.
159
159
160
160
**Hidden lines:** If your code needs `use` statements, a `fn main()` wrapper, or other boilerplate to compile, but you don't want them shown in the documentation, prefix those lines with `# ` (hash + space). These lines will be compiled but hidden in the rendered docs.
161
161
162
162
Example with hidden lines:
163
-
```
163
+
```rust
164
164
# use std::mem::MaybeUninit;
165
165
# fn main() {
166
166
let x: u32 = unsafe { MaybeUninit::uninit().assume_init() }; // UB
167
167
# }
168
168
```
169
169
placeholder: |
170
+
```rust
170
171
# use std::collections::HashMap;
171
172
# fn main() {
172
173
let map = HashMap::new();
173
174
# }
175
+
```
174
176
validations:
175
177
required: true
176
178
- type: textarea
@@ -186,21 +188,23 @@ body:
186
188
attributes:
187
189
label: Compliant Example - Code
188
190
description: |
189
-
Code example showcasing we avoid unintended or consequential behavior by following the Coding Guideline.
191
+
Code example showcasing we avoid unintended or consequential behavior by following the Coding Guideline. Please wrap your code in a fenced code block with the `rust` language specifier.
190
192
191
193
**Hidden lines:** If your code needs `use` statements, a `fn main()` wrapper, or other boilerplate to compile, but you don't want them shown in the documentation, prefix those lines with `# ` (hash + space). These lines will be compiled but hidden in the rendered docs.
0 commit comments