Closures inherit #[optimize] from the enclosing function by default.#158901
Closures inherit #[optimize] from the enclosing function by default.#158901veluca93 wants to merge 1 commit into
Conversation
|
r? @fee1-dead rustbot has assigned @fee1-dead. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Waiting on t-lang per #157273 (comment) |
|
The lang team discussed this change today and was in favor: #157562 (comment) |
|
I don't believe this is blocked on lang anymore, but I don't think I can remove the tag myself. |
|
Reminder, once the PR becomes ready for a review, use |
3c5ebd5 to
f24fa6f
Compare
|
@rustbot ready |
| #![crate_type = "lib"] | ||
|
|
||
| // CHECK-DAG: define{{.*}}void {{.*}}test_none{{.*}}call_once{{.*}}#[[ATTR_NONE:[0-9]+]] | ||
| // CHECK-DAG: define{{.*}}void {{.*}}test_none{{.*}}B{{[0-9]+}}_() {{.*}}#[[ATTR_NONE]] |
There was a problem hiding this comment.
Possibly a silly question: what's that B from?
(I get worried about anything too specific in name checks because we've been bitten before by people doing things like %[[FOO]].0 and depending on the exact internal LLVM naming of SRoA results and such. This is probably not that bad, but I'm confused what it is, so...)
There was a problem hiding this comment.
I personally don't know, but $LLM seems to think it comes from "Rust's v0 symbol mangling specification (specifically compression back-references for path components, e.g. B3_)". However with no-prepopulate-passes this doesn't seem needed anymore, so ... :-)
(I don't really understand FileCheck)
f24fa6f to
cca3d28
Compare
|
@bors r=wesleywiser,scottmcm |
Tracking issue: #54882
Stabilization PR: #157273