-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 type_of for constants #70478
Conversation
src/librustc_ast/ast.rs
Outdated
@@ -194,6 +194,9 @@ pub enum GenericArg { | |||
/// `'a` in `Foo<'a>` | |||
Lifetime(Lifetime), | |||
/// `Bar` in `Foo<Bar>` | |||
/// | |||
/// This is also used for const parameters | |||
/// which are either `()` or a path. |
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.
This is actually not correct rn, as ()
currently requires braces
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.
r=me after comment change and CI passes.
src/librustc_ast/ast.rs
Outdated
/// This is also used for const parameters | ||
/// which are either `()` or a path. |
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.
/// This is also used for const parameters | |
/// which are either `()` or a path. | |
/// This is also used for const parameters that are either `()` or a path, | |
/// since we can't tell until type-checking (or sometimes name | |
/// resolution), whether they refer to types or consts. This will be | |
/// converted to consts later if we find out that's what they should have | |
/// been all along. |
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.
@bors r+ rollup |
📌 Commit c339b2e has been approved by |
Refactor type_of for constants If I have to look at this function for a few hours I want it to at least look good. r? @varkor
Rollup of 5 pull requests Successful merges: - rust-lang#70345 (Remove `no_integrated_as` mode.) - rust-lang#70434 (suggest `;` on expr `mac!()` which is good as stmt `mac!()`) - rust-lang#70457 (non-exhastive diagnostic: add note re. scrutinee type) - rust-lang#70478 (Refactor type_of for constants) - rust-lang#70480 (clarify hir_id <-> node_id method names) Failed merges: r? @ghost
If I have to look at this function for a few hours I want it to at least look good.
r? @varkor