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 @@ -409,10 +409,7 @@ crate fn name_from_pat(p: &hir::Pat<'_>) -> Symbol {
409409 ) ;
410410 return Symbol :: intern ( "()" ) ;
411411 }
412- PatKind :: Range ( ..) => panic ! (
413- "tried to get argument name from PatKind::Range, \
414- which is not allowed in function arguments"
415- ) ,
412+ PatKind :: Range ( ..) => return kw:: Underscore ,
416413 PatKind :: Slice ( ref begin, ref mid, ref end) => {
417414 let begin = begin. iter ( ) . map ( |p| name_from_pat ( & * * p) . to_string ( ) ) ;
418415 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