From b52a4b33183877bf531a412498bd66fb91387d74 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 2 Mar 2016 17:47:08 -0600 Subject: [PATCH] make struct-out leave behind a disappeared use for its argument closes PR 15263 --- racket/collects/racket/private/reqprov.rkt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/racket/collects/racket/private/reqprov.rkt b/racket/collects/racket/private/reqprov.rkt index 2ce62e5325..0f369f7eeb 100644 --- a/racket/collects/racket/private/reqprov.rkt +++ b/racket/collects/racket/private/reqprov.rkt @@ -1074,7 +1074,18 @@ #f "identifier is not bound to struct type information" stx - id))))])))) + id))))])) + (λ (stx modes) + (syntax-case stx () + [(_ id) + (and (identifier? #'id) + (struct-info? (syntax-local-value #'id (lambda () #f)))) + (syntax-local-lift-expression + (syntax-property #'(void) + 'disappeared-use + (syntax-local-introduce #'id)))] + [whatevs (void)]) + stx))) (define-syntax combine-out (make-provide-transformer