Skip to content

add the const_evaluatable_checked feature - #76559

Merged
bors merged 2 commits into
rust-lang:masterfrom
lcnr:const-evaluatable
Sep 10, 2020
Merged

add the const_evaluatable_checked feature#76559
bors merged 2 commits into
rust-lang:masterfrom
lcnr:const-evaluatable

Conversation

@lcnr

@lcnrlcnr commented Sep 10, 2020

Copy link
Copy Markdown
Contributor

Implements a rather small subset of rust-lang/compiler-team#340

Unlike the MCP, this does not try to compare different constant, but instead only adds the constants found in where clauses
to the predicates of a function. This PR adds the feature gate const_evaluatable_checked, without which nothing should change.

r? @oli-obk@eddyb

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 10, 2020
@lcnrlcnr added the A-const-generics Area: const generics (parameters and arguments) label Sep 10, 2020
Comment threadcompiler/rustc_trait_selection/src/traits/const_evaluatable.rs Outdated
@oli-obk

Copy link
Copy Markdown
Contributor

You have some CI failures

@oli-obk

Copy link
Copy Markdown
Contributor

cc #76560

@bors r+

@bors

bors commented Sep 10, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 300b0ac 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 Sep 10, 2020
@lcnr

lcnr commented Sep 10, 2020

Copy link
Copy Markdown
ContributorAuthor

@bors rollup

@tmandrytmandry mentioned this pull request Sep 10, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 10, 2020
Rollup of 11 pull requests
Successful merges:
- rust-lang#75857 (Syntactically permit unsafety on mods)
- rust-lang#76289 (Add docs about crate level documentation support)
- rust-lang#76514 (Add revisions to const generic issue UI tests.)
- rust-lang#76524 (typeck: don't suggest inaccessible private fields)
- rust-lang#76548 (Validate removal of AscribeUserType, FakeRead, and Shallow borrow)
- rust-lang#76555 (Reword `trivial_casts` lint in rustc book to better explain what it does.)
- rust-lang#76559 (add the `const_evaluatable_checked` feature)
- rust-lang#76563 (small typo fix in rustc_parse docs)
- rust-lang#76565 (take reference to Place directly instead of taking reference to Box<Place>)
- rust-lang#76567 (use push(char) to add chars (single-char &strs) to strings instead of push_str(&str))
- rust-lang#76568 (Add missing examples on core traits' method)
Failed merges:
r? `@ghost`
@bors
bors merged commit ac85a4d into rust-lang:masterSep 10, 2020
@rustbotrustbot added this to the 1.48.0 milestone Sep 10, 2020
@lcnr
lcnr deleted the const-evaluatable branch September 11, 2020 06:33
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 18, 2020
compare generic constants using `AbstractConst`s
This is a MVP of rust-lang/compiler-team#340. The changes in this PR should only be relevant if `feature(const_evaluatable_checked)` is enabled.
~~currently based on top of rust-lang#76559, so blocked on that.~~
r? `@oli-obk` cc `@varkor` `@eddyb`
@lcnrlcnr added F-generic_const_exprs `#![feature(generic_const_exprs)]` F-const_generics `#![feature(const_generics)]` labels Nov 14, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-const-genericsArea: const generics (parameters and arguments)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