-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Add tests for lint on type dependent on consts #97105
Conversation
e9d3f7b
to
ba8835e
Compare
96ae797
to
c03b357
Compare
c03b357
to
edae6ed
Compare
This comment has been minimized.
This comment has been minimized.
2fb723c
to
814f18c
Compare
Err(ErrorHandled::TooGeneric) => Err(if uv.has_infer_types_or_consts() { | ||
NotConstEvaluatable::MentionsInfer | ||
} else { | ||
NotConstEvaluatable::MentionsParam | ||
}), |
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.
should be unreachable.
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.
hm I tried it with unreachable!()
and this branch actually gets hit
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.
ah alright, can you because infcx.const_eval_resolve
returns TooGeneric
even if the inference vars are unused. Please change this to
Err(ErrorHandled::TooGeneric) => {
assert!(uv.has_infer_types_or_consts(), "unexpected `TooGeneric` for {:?}", uv);
NotConstEvaluatable::MentionsInfer
}
This comment has been minimized.
This comment has been minimized.
@bors delegate+ please fix my last nit and squash your commits, then r=me 👍 |
✌️ @JulianKnodt can now approve this pull request |
335b2ac
to
dd64482
Compare
This comment has been minimized.
This comment has been minimized.
cc9d5c3
to
031f4f4
Compare
This comment has been minimized.
This comment has been minimized.
uh that's just a bug with inconsistent where-clauses xx maybe change the assert to an |
031f4f4
to
ed89b85
Compare
Move a bunch of branches together into one if block, for easier reading. Resolve comments Attempt to make some branches unreachable [tmp] Revert unreachable branches
ed89b85
to
ee8efc5
Compare
@bors r=lcnr |
📌 Commit ee8efc5 has been approved by |
Rollup of 5 pull requests Successful merges: - rust-lang#93604 (Make llvm-libunwind a per-target option) - rust-lang#97026 (Change orderings of `Debug` for the Atomic types to `Relaxed`.) - rust-lang#97105 (Add tests for lint on type dependent on consts) - rust-lang#97323 (Introduce stricter checks for might_permit_raw_init under a debug flag ) - rust-lang#97379 (Add aliases for `current_dir`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
r? @lcnr