-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Refactor branch Clause:: #107603
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
Refactor branch Clause:: #107603
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @estebank (or someone else) soon. Please see the contribution instructions for more information. |
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
@spastorino @oli-obk I opened a PR with the first part of 2 parts: I was thinking if this commit looks good I can make a second commit with the next part. |
@@ -584,8 +584,8 @@ impl<'a> TraitDef<'a> { | |||
defaultness: ast::Defaultness::Final, | |||
generics: Generics::default(), | |||
where_clauses: ( | |||
ast::TyAliasWhereClause::default(), | |||
ast::TyAliasWhereClause::default(), | |||
ast::TyAliasWhereclause::default(), |
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.
A global "Clause" -> "clause" rename is going to give a ton of mistakes like this. Can you fix those?
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.
Yeah I did not notice that, will be fixing it :)
@@ -2003,9 +2003,9 @@ dependencies = [ | |||
|
|||
[[package]] |
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.
Can you drop the Cargo.lock
change from these changes?
Where is the clause module? |
I was actually searching on how to import this module but I could not find any examples |
It's not a module. You need to make a module called |
@compiler-errors Under which folder do I create this module and where would I get a list of all of the variants. |
@sladyn98 unfortunately most reviewers won't have the time for the kind of hands-on mentoring you're asking for. We cannot teach Rust the language at the same time as teaching how the Rust compiler works. The rust compiler itself is not a good place to learn the language, as it contains a lot of unstable Rust features, complex code for various reasons and old code that we never updated. I would recommend working on smaller projects first to build up Rust expertise and then coming back to working on rustc. We do have smaller, self-contained projects under rust-lang ownership like the I'm sorry for cutting off this PR instead of helping you finish it, but I believe it would not be a good experience for you and the reviewer, so i'll close it now to avoid you putting a lot of work into it only to have it get closed later. Thank you for taking up the work here to do this cleanup and I hope we'll see you again in the future |
Thanks :) No problem |
This PR refactors Clause:: to clause::
reexport Clause's variants from the clause module and change all uses of Clause::Foo to clause::Foo and import the clause module where necessary.
Closes: #105060