]> git.lizzy.rs Git - rust.git/commit
Minimize weird spans involving macro context
authorEsteban Küber <esteban@kuber.com.ar>
Thu, 1 Feb 2018 19:51:49 +0000 (11:51 -0800)
committerEsteban Küber <esteban@kuber.com.ar>
Thu, 1 Feb 2018 19:51:49 +0000 (11:51 -0800)
commitaaec60836761da35a8d0cf6179769eb9bc9f63c3
treeba16a12cb639464d40d9a97470ee6afe1bf297b6
parentbacb5c58dfdde7c35e99b2b0d8171238cc33cf6c
Minimize weird spans involving macro context

Sometimes the parser attempts to synthesize spans from within a macro
context with the span for the captured argument, leading to non-sensical
spans with very bad output. Given that an incorrect span is worse than
a partially incomplete span, when detecting this situation return only
one of the spans without mergin them.
src/libsyntax_pos/lib.rs
src/test/ui/macros/span-covering-argument-1.rs [new file with mode: 0644]
src/test/ui/macros/span-covering-argument-1.stderr [new file with mode: 0644]
src/test/ui/span/macro-span-replacement.stderr