Skip to content

Commit d977e5b

Browse files
committed
parse_ty_bare_fn: improve docs
1 parent 0ebd421 commit d977e5b

File tree

1 file changed

+8
-13
lines changed
  • src/librustc_parse/parser

1 file changed

+8
-13
lines changed

src/librustc_parse/parser/ty.rs

+8-13
Original file line numberDiff line numberDiff line change
@@ -250,20 +250,15 @@ impl<'a> Parser<'a> {
250250
self.check_keyword(kw::Extern)
251251
}
252252

253-
/// Parses a `TyKind::BareFn` type.
253+
/// Parses a function pointer type (`TyKind::BareFn`).
254+
/// ```
255+
/// [unsafe] [extern "ABI"] fn (S) -> T
256+
/// ^~~~~^ ^~~~^ ^~^ ^
257+
/// | | | |
258+
/// | | | Return type
259+
/// Function Style ABI Parameter types
260+
/// ```
254261
fn parse_ty_bare_fn(&mut self, generic_params: Vec<GenericParam>) -> PResult<'a, TyKind> {
255-
/*
256-
257-
[unsafe] [extern "ABI"] fn (S) -> T
258-
^~~~^ ^~~~^ ^~^ ^
259-
| | | |
260-
| | | Return type
261-
| | Argument types
262-
| |
263-
| ABI
264-
Function Style
265-
*/
266-
267262
let unsafety = self.parse_unsafety();
268263
let ext = self.parse_extern()?;
269264
self.expect_keyword(kw::Fn)?;

0 commit comments

Comments
 (0)