-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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_evaluatable_checked: deal with unused nodes + div #78272
Conversation
self.error(None, "unused node")?; | ||
} | ||
|
||
return Ok(self |
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.
if you use a separate map for metadata not needed for the result, you can use alloc_slice
which is cheaper than alloc_from_iter
(though that will probably need a method to get a slice from an IndexVec
, too)
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 don't think perf is too important here and prefer to prevent accidents where we forget to update one of the vecs, will add spans though
@bors r+ |
📌 Commit 47cb871 has been approved by |
…as-schievink Rollup of 12 pull requests Successful merges: - rust-lang#75115 (`#[deny(unsafe_op_in_unsafe_fn)]` in sys/cloudabi) - rust-lang#76614 (change the order of type arguments on ControlFlow) - rust-lang#77610 (revise Hermit's mutex interface to support the behaviour of StaticMutex) - rust-lang#77830 (Simplify query proc-macros) - rust-lang#77930 (Do not ICE with TraitPredicates containing [type error]) - rust-lang#78069 (Fix const core::panic!(non_literal_str).) - rust-lang#78072 (Cleanup constant matching in exhaustiveness checking) - rust-lang#78119 (Throw core::panic!("message") as &str instead of String.) - rust-lang#78191 (Introduce a temporary for discriminant value in MatchBranchSimplification) - rust-lang#78272 (const_evaluatable_checked: deal with unused nodes + div) - rust-lang#78318 (TyCtxt: generate single impl block with `slice_interners` macro) - rust-lang#78327 (resolve: Relax macro resolution consistency check to account for any errors) Failed merges: r? `@ghost`
r? @oli-obk