-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rollup of 6 pull requests #68852
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
Rollup of 6 pull requests #68852
Conversation
It became unnecessary since a06baa5 reformatted the file.
This function has a variable `changed` that is erroneously used for two related-but-different purpose: - to detect if the current element has changed; - to detect if any elements have changed. As a result, its use for the first purpose is broken, because if any prior element changed then the code always thinks the current element has changed. This is only a performance bug, not a correctness bug, because we frequently end up calling `assign_unpacked` unnecessarily to overwrite the element with itself. This commit adds `any_changed` to correctly distinguish between the two purposes. This is a small perf win for some benchmarks.
This is a small perf win.
also refactor `FnKind` and `visit_assoc_item` visitors
Account for HR lifetimes when suggesting introduction of named lifetime ``` error[E0106]: missing lifetime specifier --> src/test/ui/suggestions/fn-missing-lifetime-in-item.rs:2:32 | 2 | struct S2<F: Fn(&i32, &i32) -> &i32>(F); | ---- ---- ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2 = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html help: consider making the bound lifetime-generic with a new `'a` lifetime | 2 | struct S2<F: for<'a> Fn(&'a i32, &'a i32) -> &'a i32>(F); | ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^ help: consider introducing a named lifetime parameter | 2 | struct S2<'a, F: Fn(&'a i32, &'a i32) -> &'a i32>(F);= | ^^^ ^^^^^^^ ^^^^^^^ ^^^ ``` Follow up to rust-lang#68267. Addresses the diagnostics part of rust-lang#49287.
Strip unnecessary subexpression It became unnecessary since a06baa5 reformatted the file. The comment is currently a bit misleading.
…henkov Towards unified `fn` grammar Part of rust-lang#68728. - Syntactically, `fn` items in `extern { ... }` blocks can now have bodies (`fn foo() { ... }` as opposed to `fn foo();`). As above, we use semantic restrictions instead. - Syntactically, `fn` items in free contexts (directly in a file or a module) can now be without bodies (`fn foo();` as opposed to `fn foo() { ... }`. As above, we use semantic restrictions instead, including for non-ident parameter patterns. - We move towards unifying the `fn` front matter; this is fully realized in rust-lang#68728. r? @petrochenkov
…, r=nikomatsakis Improve `merge_from_succ` A couple of small performance wins. r? @nikomatsakis
…, r=estebank Clean up E0264, E0267 and E0268 explanations r? @Dylan-DPC
On suggesting `#![recursion_limit = "X"]`, note current crate name This would have saved me much confusion e.g. when reading the log output in rust-lang#68788 (comment). r? @estebank
@bors r+ p=6 rollup=never |
📌 Commit d6f2935 has been approved by |
⌛ Testing commit d6f2935 with merge c2f1940ccea36d74c6d8c1d421cb6061b0c6cd58... |
Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
💔 Test failed - checks-azure |
@bors retry |
⌛ Testing commit d6f2935 with merge 9a5b1d46a5b9a3c3d063246bc897ce9bf89f110c... |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
💔 Test failed - checks-azure |
Successful merges:
fn
grammar #68788 (Towards unifiedfn
grammar)merge_from_succ
#68790 (Improvemerge_from_succ
)#![recursion_limit = "X"]
, note current crate name #68840 (On suggesting#![recursion_limit = "X"]
, note current crate name)Failed merges:
r? @ghost