-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Monomorphization doc fix #83787
Monomorphization doc fix #83787
Conversation
Only public items are monomorphization roots. This can be confirmed by noting that this program compiles: ```rust fn foo<T>() { if true { foo::<Option<T>>() } } fn bar() { foo::<()>() } ```
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @petrochenkov (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
I'm not familiar with this logic in detail. |
Based on looking at the source, this description seems accurate. @bors r+ rollup=always |
📌 Commit 99f3e88 has been approved by |
Monomorphization doc fix Only public items are monomorphization roots. This can be confirmed by noting that this program compiles: ```rust fn foo<T>() { if true { foo::<Option<T>>() } } fn bar() { foo::<()>() } ``` See also the [zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Why.20are.20non.20public.20items.20monomorphization.20roots.3F).
Monomorphization doc fix Only public items are monomorphization roots. This can be confirmed by noting that this program compiles: ```rust fn foo<T>() { if true { foo::<Option<T>>() } } fn bar() { foo::<()>() } ``` See also the [zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Why.20are.20non.20public.20items.20monomorphization.20roots.3F).
Rollup of 7 pull requests Successful merges: - rust-lang#82487 (Constify methods of `std::net::SocketAddr`, `SocketAddrV4` and `SocketAddrV6`) - rust-lang#83756 (rustdoc: Rename internal uses of `spotlight`) - rust-lang#83780 (Document "standard" conventions for error messages) - rust-lang#83787 (Monomorphization doc fix) - rust-lang#83803 (add fp-armv8 for ARM_ALLOWED_FEATURES) - rust-lang#83804 (Remove nightly features in rustc_type_ir) - rust-lang#83810 (Fix rustc_lint_defs documentation typo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Only public items are monomorphization roots. This can be confirmed by noting that this program compiles:
See also the zulip thread.