Move track_caller on closures gating to attribute parsing - #162075
Conversation
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. Some changes occurred in compiler/rustc_attr_parsing |
|
r? @TaKO8Ki rustbot has assigned @TaKO8Ki. Use Why was this reviewer chosen?The reviewer was selected based on:
|
| } | ||
| if is_closure | ||
| && !tcx.features().closure_track_caller() | ||
| && !attr_span.allows_unstable(sym::closure_track_caller) |
There was a problem hiding this comment.
This does technically make the feature gate slightly stricter, since we were previously checking for attr_span.allows_unstable(sym::closure_track_caller).
I think that's fine though, I'm not expecting anyone to be relying on this, and we can add it back if anyone complains :)
| if self.tcx.features().async_fn_track_caller() | ||
| && let Some(attrs) = self.attrs.get(&outer_hir_id.local_id) | ||
| && find_attr!(*attrs, TrackCaller(_)) | ||
| && let Some(t) = attrs.iter().find(|a| { |
There was a problem hiding this comment.
Kinda sad that we need to expand the find_attr! here but this code is so much better than whatever was going on before, so thanks!
… r=JonathanBrouwer Move track_caller on closures gating to attribute parsing I noticed this while reviewing rust-lang#161958
… r=JonathanBrouwer Move track_caller on closures gating to attribute parsing I noticed this while reviewing rust-lang#161958
… r=JonathanBrouwer Move track_caller on closures gating to attribute parsing I noticed this while reviewing rust-lang#161958
…uwer Rollup of 12 pull requests Successful merges: - #162045 (`rust-analyzer` subtree update) - #162077 (compiler-builtins subtree update) - #137720 (support `#[target_feature(enable = ...)]` on `#[naked]` functions) - #160534 (stabilize smart pointer map functions) - #160551 (mir_build: Clearly distinguish or/refutable/irrefutable patterns during match lowering) - #161929 (explicitly track inherent const generic args kind) - #162063 (Switch dist-aarch64-linux to EC2 and update dist-x86_64-linux) - #161937 (A series of Polonius Alpha refactors) - #162014 (Move more `rustdoc-html` tests using `--test` into the right folder) - #162051 (`rustc_feature` cleanups) - #162055 (remove `_{style}` recovery for diagnostic structs) - #162075 (Move track_caller on closures gating to attribute parsing)
… r=JonathanBrouwer Move track_caller on closures gating to attribute parsing I noticed this while reviewing rust-lang#161958
… r=JonathanBrouwer Move track_caller on closures gating to attribute parsing I noticed this while reviewing rust-lang#161958
… r=JonathanBrouwer Move track_caller on closures gating to attribute parsing I noticed this while reviewing rust-lang#161958
… r=JonathanBrouwer Move track_caller on closures gating to attribute parsing I noticed this while reviewing rust-lang#161958
… r=JonathanBrouwer Move track_caller on closures gating to attribute parsing I noticed this while reviewing rust-lang#161958
… r=JonathanBrouwer Move track_caller on closures gating to attribute parsing I noticed this while reviewing rust-lang#161958
… r=JonathanBrouwer Move track_caller on closures gating to attribute parsing I noticed this while reviewing rust-lang#161958
… r=JonathanBrouwer Move track_caller on closures gating to attribute parsing I noticed this while reviewing rust-lang#161958
… r=JonathanBrouwer Move track_caller on closures gating to attribute parsing I noticed this while reviewing rust-lang#161958
…uwer Rollup of 16 pull requests Successful merges: - #137720 (support `#[target_feature(enable = ...)]` on `#[naked]` functions) - #160534 (stabilize smart pointer map functions) - #160551 (mir_build: Clearly distinguish or/refutable/irrefutable patterns during match lowering) - #160989 (Make sin, cos, exp, exp2, log, log2, log10 generic) - #161861 (mir_build: Clarify parts of if-condition lowering) - #161929 (explicitly track inherent const generic args kind) - #162040 (bootstrap: stage0 to cbae9b4) - #162063 (Switch dist-aarch64-linux to EC2 and update dist-x86_64-linux) - #161353 (Add test for parallel compiler reproducible build) - #161937 (A series of Polonius Alpha refactors) - #162051 (`rustc_feature` cleanups) - #162055 (remove `_{style}` recovery for diagnostic structs) - #162075 (Move track_caller on closures gating to attribute parsing) - #162079 (std: implement `File::fsync` for Hermit) - #162097 (Deduplicate `InstrumentFnAttr`) - #162115 (fix typo in feature documentation)
I noticed this while reviewing #161958