-
Notifications
You must be signed in to change notification settings - Fork 13k
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
const_generics: assert resolve hack causes an error #79236
Conversation
compiler/rustc_resolve/src/lib.rs
Outdated
} else { | ||
self.session.delay_span_bug(span, CG_BUG_STR); |
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.
You don't need this in an else
, delay_span_bug
will early exit if an error has already been emitted.
(same for the other case)
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.
i personally prefer delay span in an else branch if the other branch "obviously" emits an error.
That's just a stylistic preference though. Changed it.
16e8287
to
34ea5d0
Compare
@bors r+ |
📌 Commit c85af74 has been approved by |
…as-schievink Rollup of 10 pull requests Successful merges: - rust-lang#76829 (stabilize const_int_pow) - rust-lang#79080 (MIR visitor: Don't treat debuginfo field access as a use of the struct) - rust-lang#79236 (const_generics: assert resolve hack causes an error) - rust-lang#79287 (Allow using generic trait methods in `const fn`) - rust-lang#79324 (Use Option::and_then instead of open-coding it) - rust-lang#79325 (Reduce boilerplate with the `?` operator) - rust-lang#79330 (Fix typo in comment) - rust-lang#79333 (doc typo) - rust-lang#79337 (Use Option::map instead of open coding it) - rust-lang#79343 (Add my (`@flip1995)` work mail to the mailmap) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
prevent the min_const_generics
HACK
s in resolve from triggering a fallback path which successfully compiles so that we don't have to worry about future compat issues when removing itr? @eddyb cc @varkor