about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2020-11-25 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2020-11-25 00:00:00 +0000
commit22d3431221df2e9136d303d1762ea7afdded1b5e (patch)
tree7968a31ba31fa97d8e9c569a39268f7654f1e560 /compiler/rustc_interface/src
parent773ddbada7183b57928a1d2f5e0722b7f53a3bf7 (diff)
downloadrust-22d3431221df2e9136d303d1762ea7afdded1b5e.tar.gz
rust-22d3431221df2e9136d303d1762ea7afdded1b5e.zip
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.
Diffstat (limited to 'compiler/rustc_interface/src')
-rw-r--r--compiler/rustc_interface/src/passes.rs1
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);
                 });