-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[MCP 723] Rename astconv::AstConv
and related items
#120926
Conversation
This comment has been minimized.
This comment has been minimized.
3e1e308
to
201c622
Compare
201c622
to
f50fbe5
Compare
This comment was marked as resolved.
This comment was marked as resolved.
f50fbe5
to
3815e2d
Compare
This comment was marked as resolved.
This comment was marked as resolved.
3815e2d
to
3afdd34
Compare
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
astconv::AstConv
and related itemsastconv::AstConv
and related items
This makes it easier to read the trait definition for newcomers: Sorted from least “complex” to most “complex” followed by trivial “plumbing” and grouped by area. * Move `allow_infer` above all `*_infer` methods * It's the least complex method of those * Allows the `*_infer` to be placed right next to each other * Move `probe_ty_param_bounds` further down right next to `lower_assoc_ty` and `probe_adt` * It's more complex than the `infer` methods, it should come “later” * Now all required lowering functions are grouped together * Move the “plumbing” function `set_tainted_by_errors` further down below any actual lowering methods. * Provided method should come last
Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor
|
Alrighty, the renaming of items and the updating of all relevant (doc) comments has been completed at last! Best reviewed commit by commit. Some commits contain a short explainer outlining the motivation for the respective changes if not entirely obvious. Please consult the following exhaustive & normative list of changes here: Feel free to suggest better names for individual items but keep in mind that most of the name changes are well motivated and are part of a cohesive naming scheme. If you do please double-check first if there's an explainer for the name change in question over at the linked web page. Ping @oli-obk @compiler-errors |
astconv::AstConv
and related itemsastconv::AstConv
and related items
<3 Thanks for doing this. The html doc is amazing. Still reading the doc, then will give this PR a review @bors p=10 bitrotty |
/// **A note on binders:** there is an implied binder around | ||
/// `param_ty` and `ast_bounds`. See `instantiate_poly_trait_ref` | ||
/// for more details. | ||
/// There is an implied binder around `param_ty` and `ast_bounds`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "implied binder" mean here? If no binder is specified, you get an empty binder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just means that param_ty: Ty<'tcx>
may contain late-bound vars even though it's not wrapped in a Binder<'tcx, ·>
(rendering them escaping I guess). Neither is ast_bounds
/hir_bounds
but well that param is of a HIR data type, so obviously it can't be wrapped in a Binder
.
Wording is a bit poor, I guess I could've adjusted it.
@@ -37,6 +37,7 @@ pub use crate::traits::{MethodViolationCode, ObjectSafetyViolation}; | |||
/// Currently that is `Self` in supertraits. This is needed | |||
/// because `object_safety_violations` can't be used during | |||
/// type collection. | |||
#[instrument(level = "debug", skip(tcx))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could also use ret
here
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (eff958c): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 669.305s -> 669.088s (-0.03%) |
See rust-lang/compiler-team#723.
Corresponding rustc-dev-guide PR: rust-lang/rustc-dev-guide#1916.
Please consult the following normative list of changes here:
https://fmease.dev/rustc-dev/astconv-no-mo.html (2024-03-22 archive link).