15 // Perhaps this should introduce braces?
17 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
18 Pattern1 | Pattern2 | Pattern3 => false,
19 Paternnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn |
20 Paternnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn => {
23 Patternnnnnnnnnnnnnnnnnnn |
24 Patternnnnnnnnnnnnnnnnnnn |
25 Patternnnnnnnnnnnnnnnnnnn |
26 Patternnnnnnnnnnnnnnnnnnn => meh,
28 Patternnnnnnnnnnnnnnnnnnn |
29 Patternnnnnnnnnnnnnnnnnnn if looooooooooooooooooong_guard => meh,
31 Patternnnnnnnnnnnnnnnnnnnnnnnnn |
32 Patternnnnnnnnnnnnnnnnnnnnnnnnn if looooooooooooooooooooooooooooooooooooooooong_guard =>
35 // Test that earlier patterns can take the guard space
46 Patternnnnnnnnnnnnnnnnnnnnnnnnn if loooooooooooooooooooooooooooooooooooooooooong_guard => {}
49 ast::PathParameters::AngleBracketedParameters(ref data) if data.lifetimes.len() > 0 ||
50 data.types.len() > 0 ||
51 data.bindings.len() > 0 => {}
54 let whatever = match something {
57 // Comment on an attribute.
59 // Comment after an attribute.
66 // Test that a match on an overflow line is laid out properly.
69 match xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx {
70 Some(sub_span) => Some(sub_span),
75 // Test that one-line bodies align.
78 Variableeeeeeeeeeeeeeeeee => ("variable",
79 vec!["id", "name", "qualname", "value", "type", "scopeid"],
82 Enummmmmmmmmmmmmmmmmmmmm => ("enum",
83 vec!["id", "qualname", "scopeid", "value"],
86 Variantttttttttttttttttttttttt =>
88 vec!["id", "name", "qualname", "type", "value", "scopeid"],
111 // collapsing here is safe
112 ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff => {}
113 // collapsing here exceeds line length
114 ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffg => {
117 // comment above block
119 i => {} // comment below block
121 // comment inside block
124 // comments inside...
126 // TODO uncomment when vertical whitespace is handled better
129 // // comment with WS above
132 // // comment with ws below
147 // TODO uncomment when block-support exists
157 a => println!("a", b),
169 h => println!("a", b), // h comment
170 i => vec![1, 2], // i comment
171 j => vec!(3; 4), // j comment
173 k => println!("a", b),
178 // Rewrite splits macro
179 nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn =>
181 // Rewrite splits macro
182 oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo =>
184 // Macro support fails to recognise this macro as splitable
185 // We push the whole expr to a new line, TODO split this macro as well
186 pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp =>
188 // q, r and s: Rewrite splits match arm
189 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq =>
191 rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr =>
193 ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss =>
195 // Funky bracketing styles
196 t => println!{"a", b},
199 w => println!["a", b],
202 // Brackets with comments
203 tc => println!{"a", b}, // comment
204 uc => vec![1, 2], // comment
205 vc => vec!{3; 4}, // comment
206 wc => println!["a", b], // comment
207 xc => vec![1, 2], // comment
208 yc => vec![3; 4], // comment
209 yd => looooooooooooooooooooooooooooooooooooooooooooooooooooooooong_func(aaaaaaaaaa,
219 CompressionMode::DiscardNewline | CompressionMode::CompressWhitespaceNewline =>
221 ast::ItemConst(ref typ, ref expr) =>
222 self.process_static_or_const_item(item, &typ, &expr),
228 match resolution.last_private {
229 LastImport{..} => false,
236 1 => unsafe { std::intrinsics::abort() },
243 Some(NodeTypeId::Element(ElementTypeId::HTMLElement(
244 HTMLElementTypeId::HTMLCanvasElement))) => true,
245 Some(NodeTypeId::Element(ElementTypeId::HTMLElement(
246 HTMLElementTypeId::HTMLObjectElement))) => s.has_object_data(),
247 Some(NodeTypeId::Element(_)) => false,