-
Notifications
You must be signed in to change notification settings - Fork 13.7k
add span to struct pattern rest (..) #145783
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
base: master
Are you sure you want to change the base?
Conversation
r? @spastorino rustbot has assigned @spastorino. Use |
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt |
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
It looks like this might be good for consistency, but the span doesn't seem to be used anywhere (except through |
I assume this is "needed" for rust-lang/rust-clippy#15000 (comment)? Would probably be useful to put this in the PR body for context/motivation if that's the case |
Yeah that was my main motivation, looking throught the changes I made here I can at least spot one other location in Clippy where it could be useful to make better lints ( I will add the motivation to the main body above as well. |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
add span to struct pattern rest (..)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (bb08434): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 1.3%, secondary 1.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 468.355s -> 466.756s (-0.34%) |
Please squash into one commit |
I'm fine with adding this new span to the AST + HIR. The size changes don't look significant. @bors r+ rollup |
…rors add span to struct pattern rest (..) Struct pattern rest (`..`) did not retain span information compared to normal fields. This patch adds span information for it. The motivation of this patch comes from when I implemented this PR for Clippy: rust-lang/rust-clippy#15000 (comment) It is possible to get the span of the Et cetera in a bit roundabout way, but I thought this would be nicer.
…rors add span to struct pattern rest (..) Struct pattern rest (`..`) did not retain span information compared to normal fields. This patch adds span information for it. The motivation of this patch comes from when I implemented this PR for Clippy: rust-lang/rust-clippy#15000 (comment) It is possible to get the span of the Et cetera in a bit roundabout way, but I thought this would be nicer.
Rollup of 6 pull requests Successful merges: - #135761 (Dial down detail of B-tree description) - #144373 (remove deprecated Error::description in impls) - #145620 (Account for impossible bounds making seemingly unsatisfyable dyn-to-dyn casts) - #145783 (add span to struct pattern rest (..)) - #145817 (cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype) - #145820 (raw-dylib-elf: set correct `DT_VERDEFNUM`) r? `@ghost` `@rustbot` modify labels: rollup
Changes to the size of AST and/or HIR nodes. cc @nnethercote |
Struct pattern rest (
..
) did not retain span information compared to normal fields. This patch adds span information for it.The motivation of this patch comes from when I implemented this PR for Clippy: rust-lang/rust-clippy#15000 (comment)
It is possible to get the span of the Et cetera in a bit roundabout way, but I thought this would be nicer.