JuliaLang/julia — pull request #7780 by timholy (2014-07-29 16:50:52+00:00)
Title: Improve printing of macroexpand(:(@inbounds foo))

More along the lines of #7775. This one is a little scarier, but it seems to work. I'm submitting now, and I'll let others decide whether this should wait.

Before:
```julia
julia> ex = quote
for i = 1:length(a)
@inbounds s += a
end
end
quote # none, line 2:
for i = 1:length(a) # line 3:
@inbounds s += a
end
end

julia> macroexpand(ex)
quote # none, line 2:
for i = 1:length(a) # line 3:
begin
$(Expr(:boundscheck, false))
begin
s += a
$(Expr(:boundscheck, :(Base.pop)))
end
end
end
end
```
Now:
```julia
julia> macroexpand(ex)
quote # none, line 2:
for i = 1:length(a) # line 3:
@inbounds begin
s += a
end
end
end
```