rust/tests/ui/rfc-2632-const-trait-impl
Dylan DPC 8c135eecac
Rollup merge of #106541 - fee1-dead-contrib:no-const-check-no, r=thomcc
implement const iterator using `rustc_do_not_const_check`

Previous experiment: #102225.

Explanation: rather than making all default methods work under `const` all at once, this uses `rustc_do_not_const_check` as a workaround to "trick" the compiler to not run any checks on those other default methods. Any const implementations are only required to implement the `next` method. Any actual calls to the trait methods other than `next` will either error in compile time (at CTFE runs), or run the methods correctly if they do not have any non-const operations. This is extremely easy to maintain, remove, or improve.
2023-02-24 12:02:40 +05:30
..
auxiliary Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const_derives Add ~const bounds trait bounds when using derive_const 2023-02-07 21:00:12 +00:00
specialization Move /src/test to /tests 2023-01-11 09:32:08 +00:00
assoc-type-const-bound-usage.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
assoc-type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
assoc-type.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
attr-misuse.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
attr-misuse.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
call-const-trait-method-fail.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
call-const-trait-method-fail.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
call-const-trait-method-pass.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
call-generic-in-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
call-generic-method-chain.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
call-generic-method-dup-bound.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
call-generic-method-fail.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
call-generic-method-fail.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
call-generic-method-nonconst-bound.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
call-generic-method-nonconst.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
call-generic-method-nonconst.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
call-generic-method-pass.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
call.rs move to correct test 2023-01-12 04:20:00 +00:00
const-and-non-const-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-and-non-const-impl.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-check-fns-in-const-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-check-fns-in-const-impl.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-closure-parse-not-item.rs fix parser mistaking const closures for const item 2023-02-01 06:44:30 +00:00
const-closure-trait-method-fail.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-closure-trait-method-fail.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-closure-trait-method.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-closures.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-default-method-bodies.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-default-method-bodies.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-drop-bound.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-drop-fail.precise.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-drop-fail.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-drop-fail.stock.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-drop.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-impl-norecover.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-impl-norecover.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-impl-recovery.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-impl-recovery.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-impl-requires-const-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-impl-requires-const-trait.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-impl-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cross-crate-default-method-body-is-const.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cross-crate.gatednc.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cross-crate.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cross-crate.stock.stderr fix fmt and bless 2023-01-12 02:28:38 +00:00
cross-crate.stocknc.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
default-method-body-is-const-body-checking.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
default-method-body-is-const-body-checking.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
default-method-body-is-const-same-trait-ck.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
default-method-body-is-const-same-trait-ck.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
default-method-body-is-const-with-staged-api.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
do-not-const-check-override.rs add and bless tests 2023-01-31 17:26:06 +00:00
do-not-const-check.rs implement const iterator using rustc_do_not_const_check 2023-01-31 17:09:30 +00:00
feature-gate.gated.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
feature-gate.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
feature-gate.stock.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
gate.rs move to correct test 2023-01-12 04:20:00 +00:00
gate.stderr move to correct test 2023-01-12 04:20:00 +00:00
generic-bound.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
hir-const-check.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
hir-const-check.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-tilde-const-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-tilde-const-trait.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-with-default-fn-fail.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-with-default-fn-fail.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-with-default-fn-pass.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
inherent-impl-const-bounds.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
inherent-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
inherent-impl.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-79450.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-79450.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-88155.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-88155.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-90052.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-90052.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-92111.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-92230-wf-super-trait-env.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-100222.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-102156.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-102156.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-102985.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-102985.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-103677.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested-closure.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
non-const-op-const-closure-non-const-outer.rs move to correct test 2023-01-12 04:20:00 +00:00
non-const-op-const-closure-non-const-outer.stderr move to correct test 2023-01-12 04:20:00 +00:00
non-const-op-in-closure-in-const.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
specializing-constness-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
specializing-constness-2.stderr Note predicate span on ImplDerivedObligation 2023-01-11 19:46:45 +00:00
specializing-constness.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
specializing-constness.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
staged-api-user-crate.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
staged-api-user-crate.stderr fix fmt and bless 2023-01-12 02:28:38 +00:00
staged-api.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
staged-api.stable.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
staged-api.unstable.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
static-const-trait-bound.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
std-impl-gate.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
std-impl-gate.stock.stderr fix fmt and bless 2023-01-12 02:28:38 +00:00
super-traits-fail-2.nn.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
super-traits-fail-2.ny.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
super-traits-fail-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
super-traits-fail-2.yn.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
super-traits-fail-2.yy.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
super-traits-fail-3.nn.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
super-traits-fail-3.ny.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
super-traits-fail-3.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
super-traits-fail-3.yn.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
super-traits-fail.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
super-traits-fail.stderr Point at impl self type for impl wf obligations 2023-01-12 20:44:47 +00:00
super-traits.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
syntax.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
tilde_const_on_impl_bound.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
tilde-const-and-const-params.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
tilde-const-and-const-params.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
tilde-const-invalid-places.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
tilde-const-invalid-places.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
tilde-const-syntax.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
tilde-twice.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
tilde-twice.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
trait-default-body-stability.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
trait-where-clause-const.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
trait-where-clause-const.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
trait-where-clause-run.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
trait-where-clause-self-referential.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
trait-where-clause.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
trait-where-clause.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
without-tilde.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
without-tilde.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00