Skip to content

Commit

Permalink
Rollup merge of #97478 - JohnTitor:fixme-fn-decl, r=compiler-errors
Browse files Browse the repository at this point in the history
Remove FIXME on `ExtCtxt::fn_decl()`

`ExtCtxt::fn_decl()` is used like `self.fn_decl(..)` or `self.cx.fn_decl(..)`, coverting it to an assoc fn, for example, makes it inconvenience (e.g. `self.cx.fn_decl(..)` would be longer to represent). Given that, it doesn't seem a "FIXME" thing and unused `self` is okay, I think.
  • Loading branch information
GuillaumeGomez authored May 28, 2022
2 parents 239287f + 643c508 commit a777d50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_expand/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ impl<'a> ExtCtxt<'a> {
}
}

// FIXME: unused `self`
// `self` is unused but keep it as method for the convenience use.
pub fn fn_decl(&self, inputs: Vec<ast::Param>, output: ast::FnRetTy) -> P<ast::FnDecl> {
P(ast::FnDecl { inputs, output })
}
Expand Down

0 comments on commit a777d50

Please sign in to comment.