File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -289,10 +289,7 @@ crate fn name_from_pat(p: &hir::Pat<'_>) -> Symbol {
289289 ) ;
290290 return Symbol :: intern ( "()" ) ;
291291 }
292- PatKind :: Range ( ..) => panic ! (
293- "tried to get argument name from PatKind::Range, \
294- which is not allowed in function arguments"
295- ) ,
292+ PatKind :: Range ( ..) => return kw:: Underscore ,
296293 PatKind :: Slice ( ref begin, ref mid, ref end) => {
297294 let begin = begin. iter ( ) . map ( |p| name_from_pat ( & * * p) . to_string ( ) ) ;
298295 let mid = mid. as_ref ( ) . map ( |p| format ! ( "..{}" , name_from_pat( & * * p) ) ) . into_iter ( ) ;
Original file line number Diff line number Diff line change 11#![ crate_name = "foo" ]
22
33// @has foo/fn.f.html
4- // @has - '//*[@class="rust fn"]' 'pub fn f(0u8 ...255 : u8)'
4+ // @has - '//*[@class="rust fn"]' 'pub fn f(_ : u8)'
55pub fn f ( 0u8 ...255 : u8 ) { }
You can’t perform that action at this time.
0 commit comments