Skip to content

const_evaluatable_checked: deal with unused nodes + div - #78272

Merged
bors merged 2 commits into
rust-lang:masterfrom
lcnr:abstract-const-unused-node
Oct 25, 2020
Merged

const_evaluatable_checked: deal with unused nodes + div#78272
bors merged 2 commits into
rust-lang:masterfrom
lcnr:abstract-const-unused-node

Conversation

@lcnr

@lcnrlcnr commented Oct 23, 2020

Copy link
Copy Markdown
Contributor

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 23, 2020
@lcnrlcnr added F-generic_const_exprs `#![feature(generic_const_exprs)]` F-const_generics `#![feature(const_generics)]` labels Oct 23, 2020
Comment threadcompiler/rustc_trait_selection/src/traits/const_evaluatable.rs Outdated
self.error(None, "unused node")?;
}

return Ok(self

Copy link
Copy Markdown
Contributor

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)

Copy link
Copy Markdown
ContributorAuthor

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

Comment threadcompiler/rustc_trait_selection/src/traits/const_evaluatable.rs Outdated
Comment threadcompiler/rustc_trait_selection/src/traits/const_evaluatable.rs Outdated
@oli-obk

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Oct 23, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 47cb871 has been approved by oli-obk

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 23, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 24, 2020
…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`
@bors
bors merged commit 5ed8ac4 into rust-lang:masterOct 25, 2020
@rustbotrustbot added this to the 1.49.0 milestone Oct 25, 2020
@lcnr
lcnr deleted the abstract-const-unused-node branch October 25, 2020 07:04
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-const_generics`#![feature(const_generics)]`F-generic_const_exprs`#![feature(generic_const_exprs)]`S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@lcnr@oli-obk@bors@rust-highfive@rustbot