Skip to content

Closing over an outer function arg is not caught by capture pass #364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
marijnh opened this issue May 12, 2011 · 1 comment
Closed

Closing over an outer function arg is not caught by capture pass #364

marijnh opened this issue May 12, 2011 · 1 comment

Comments

@marijnh
Copy link
Contributor

marijnh commented May 12, 2011

This currently crashes the compiler (Map.get miss in ty_param_count_and_ty_for_def in typeck.rs when looking up outer_arg):

fn foo(int outer_arg) {
    fn local() -> int {
        ret outer_arg;
    }
}
@marijnh
Copy link
Contributor Author

marijnh commented May 13, 2011

This is handled by 58ec5d1

@marijnh marijnh closed this as completed May 13, 2011
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
dlrobertson pushed a commit to dlrobertson/rust that referenced this issue Nov 29, 2018
Aaron1011 pushed a commit to Aaron1011/rust that referenced this issue Oct 26, 2020
antoyo added a commit to antoyo/rust that referenced this issue Oct 26, 2023
Fix to be able to use a target specification JSON file and document the process
carolynzech pushed a commit to carolynzech/rust that referenced this issue Jun 13, 2025
This is an automated PR to merge library subtree updates from 2025-05-20
(rust-lang/rust@60dabef) to 2025-05-22
(rust-lang/rust@bf64d66) (inclusive)
into main. `git merge` resulted in conflicts, which require manual
resolution. Files were commited with merge conflict markers. **Do not
remove or edit the following annotations:**
git-subtree-dir: library
git-subtree-split: 02d9329

---------

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Signed-off-by: Sean Cross <sean@xobs.io>
Signed-off-by: Vladimir Krivopalov <vladimir.krivopalov@gmail.com>
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Co-authored-by: Hegui Dai <natural_selection_@outlook.com>
Co-authored-by: Urgau <urgau@numericable.fr>
Co-authored-by: Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com>
Co-authored-by: bendn <bend.n@outlook.com>
Co-authored-by: Ralf Jung <post@ralfj.de>
Co-authored-by: bors <bors@rust-lang.org>
Co-authored-by: Trevor Gross <tmgross@umich.edu>
Co-authored-by: The Miri Cronjob Bot <miri@cron.bot>
Co-authored-by: ismailarilik <arilik.ismail@gmail.com>
Co-authored-by: Tobias <206408826+t5kd@users.noreply.github.com>
Co-authored-by: Ethan Wu <ethanwu10@gmail.com>
Co-authored-by: Ayush Singh <ayush@beagleboard.org>
Co-authored-by: Jake Goulding <jake.goulding@gmail.com>
Co-authored-by: Michael Howell <michael@notriddle.com>
Co-authored-by: Christopher Durham <cad97@cad97.com>
Co-authored-by: Pavel Grigorenko <GrigorenkoPV@ya.ru>
Co-authored-by: LemonJ <1632798336@qq.com>
Co-authored-by: SabrinaJewson <sejewson@gmail.com>
Co-authored-by: Nicholas Nethercote <n.nethercote@gmail.com>
Co-authored-by: Chris Denton <chris@chrisdenton.dev>
Co-authored-by: joboet <jonasboettiger@icloud.com>
Co-authored-by: Andrew Zhogin <andrew.zhogin@gmail.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: Lieselotte <52315535+she3py@users.noreply.github.com>
Co-authored-by: Sean Cross <sean@xobs.io>
Co-authored-by: Trevor Gross <t.gross35@gmail.com>
Co-authored-by: Jon Bauman <baumanj@users.noreply.github.com>
Co-authored-by: binarycat <binarycat@envs.net>
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
Co-authored-by: Mathis B <mathis.bottinelli@student-cs.fr>
Co-authored-by: Zachary S <zasample18+github@gmail.com>
Co-authored-by: Thalia Archibald <thalia@archibald.dev>
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
Co-authored-by: sayantn <sayantn05@gmail.com>
Co-authored-by: Artur Roos <artur.roos@ktnlvr.dev>
Co-authored-by: Eyal Kalderon <ebkalderon@gmail.com>
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
Co-authored-by: Lynnesbian <lynne@bune.city>
Co-authored-by: Christopher Berner <me@cberner.com>
Co-authored-by: Stuart Cook <Zalathar@users.noreply.github.com>
Co-authored-by: Paolo Barbolini <paolo.barbolini@m4ss.net>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: The 8472 <git@infinite-source.de>
Co-authored-by: Nick Kocharhook <nick@kocharhook.com>
Co-authored-by: Vladimir Krivopalov <vladimir@krivopalov.ru>
Co-authored-by: Vilim Lendvaj <vilim.lendvaj@sk.t-com.hr>
Co-authored-by: David Tolnay <dtolnay@gmail.com>
Co-authored-by: Marijn Schouten <hkBst@users.noreply.github.com>
Co-authored-by: Jacob Pratt <jacob@jhpratt.dev>
Co-authored-by: 王宇逸 <Strawberry_Str@hotmail.com>
Co-authored-by: ivmarkov <ivan.markov@gmail.com>
Co-authored-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
Co-authored-by: Daniel Paoliello <danpao@microsoft.com>
Co-authored-by: Luca Versari <veluca93@gmail.com>
Co-authored-by: xizheyin <xizheyin@smail.nju.edu.cn>
Co-authored-by: Ben Kimock <kimockb@gmail.com>
Co-authored-by: Dietrich Daroch <Dietrich@Daroch.me>
Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
Co-authored-by: Pietro Albini <pietro@pietroalbini.org>
Co-authored-by: Julian Knodt <julianknodt@gmail.com>
Co-authored-by: Michael Goulet <michael@errs.io>
Co-authored-by: Michał Łowicki <michal.lowicki@datadoghq.com>
Co-authored-by: Samuel Tardieu <sam@rfc1149.net>
Co-authored-by: B I Mohammed Abbas <bimohammadabbas@gmail.com>
Co-authored-by: Federico Terzi <federicoterzi96@gmail.com>
Co-authored-by: sam skeoch <djscythe@noreply.codeberg.org>
Co-authored-by: est31 <MTest31@outlook.com>
Co-authored-by: Fluid <90795031+fluiderson@users.noreply.github.com>
Co-authored-by: Speedy_Lex <alex.ciocildau@gmail.com>
Co-authored-by: Mario Pastorelli <pastorelli.mario@gmail.com>
Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
Co-authored-by: gitbot <git@bot>
Co-authored-by: Michael Tautschnig <tautschn@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant