Auto merge of #79411 - tmiasko:naked-params, r=Amanieu
Validate use of parameters in naked functions * Reject use of parameters inside naked function body. * Reject use of patterns inside function parameters, to emphasize role of parameters a signature declaration (mirroring existing behaviour for function declarations) and avoid generating code introducing specified bindings. Closes issues below by considering input to be ill-formed. Closes #75922. Closes #77848. Closes #79350.
This commit is contained in:
commit
b48cafd9eb
7 changed files with 221 additions and 49 deletions
|
@ -816,6 +816,7 @@ fn analysis(tcx: TyCtxt<'_>, cnum: CrateNum) -> Result<()> {
|
|||
let local_def_id = tcx.hir().local_def_id(module);
|
||||
tcx.ensure().check_mod_loops(local_def_id);
|
||||
tcx.ensure().check_mod_attrs(local_def_id);
|
||||
tcx.ensure().check_mod_naked_functions(local_def_id);
|
||||
tcx.ensure().check_mod_unstable_api_usage(local_def_id);
|
||||
tcx.ensure().check_mod_const_bodies(local_def_id);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue