Skip to content

add the const_evaluatable_checked feature #76559

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Sep 10, 2020
Merged

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Sep 10, 2020

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-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 10, 2020
@lcnr lcnr added the A-const-generics Area: const generics (parameters and arguments) label Sep 10, 2020
@oli-obk
Copy link
Contributor

oli-obk commented Sep 10, 2020

You have some CI failures

@oli-obk
Copy link
Contributor

oli-obk commented Sep 10, 2020

cc #76560

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 10, 2020

📌 Commit 300b0ac has been approved by oli-obk

@bors bors 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
Copy link
Contributor Author

lcnr commented Sep 10, 2020

@bors rollup

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:master Sep 10, 2020
@rustbot rustbot 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`
@lcnr lcnr added F-generic_const_exprs `#![feature(generic_const_exprs)]` F-const_generics `#![feature(const_generics)]` labels Nov 14, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-const-generics Area: const generics (parameters and arguments) F-const_generics `#![feature(const_generics)]` F-generic_const_exprs `#![feature(generic_const_exprs)]` S-waiting-on-bors Status: 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