diff options
| author | bors <bors@rust-lang.org> | 2020-11-25 21:22:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-11-25 21:22:46 +0000 |
| commit | b48cafd9eb658b5d74015ddbe5335c3842a03a63 (patch) | |
| tree | 1f5c6c21bb595b79533e20daf7c8496baabdb30a /compiler/rustc_interface/src | |
| parent | 192c7dbb6dbd0b2c176101ed2fe785901b2a457d (diff) | |
| parent | 22d3431221df2e9136d303d1762ea7afdded1b5e (diff) | |
| download | rust-b48cafd9eb658b5d74015ddbe5335c3842a03a63.tar.gz rust-b48cafd9eb658b5d74015ddbe5335c3842a03a63.zip | |
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.
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/passes.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 5fd560d7eff..1f820024f77 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -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); }); |
