Commit Graph

21 Commits

Author SHA1 Message Date
Michael Goulet bec7193072 Don't use implied trait predicates in gather_explicit_predicates_of 2023-05-01 15:45:28 +00:00
bors 3a5c8e91f0 Auto merge of #110393 - fee1-dead-contrib:rm-const-traits, r=oli-obk
Rm const traits in libcore

See [zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/.60const.20Trait.60.20removal.20or.20rework)

* [x] Bless ui tests
* [ ] Re constify some unstable functions with workarounds if they are needed
2023-04-19 13:03:40 +00:00
Deadbeef 4c6ddc036b fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
fee1-dead a5136f14ae
Rollup merge of #109665 - fee1-dead-contrib:rm-remap-queries, r=oli-obk
Remove `remap_env_constness` in queries

This removes some of the complexities with const traits. #88119 used to be caused by this but was fixed by `param_env = param_env.without_const()`.
2023-04-16 18:55:38 +08:00
Esteban Küber 5b40aa5eb4 Tweak output for 'add line' suggestion 2023-04-12 22:50:10 +00:00
Deadbeef 886c0e6388 fix ICE 2023-04-08 10:18:48 +00:00
Trevor Gross dc4ba57566 Stabilize a portion of 'once_cell'
Move items not part of this stabilization to 'lazy_cell' or 'once_cell_try'
2023-03-29 18:04:44 -04:00
Deadbeef 054009d17e fix long line 2023-03-28 08:52:46 +00:00
Deadbeef b17e6680d6 Move const trait bounds checks to MIR constck
Fixes #109543. When checking paths in HIR typeck, we don't want to check
for const predicates since all we want might just be a function pointer.
Therefore we move this to MIR constck and check that bounds are met
during MIR constck.
2023-03-28 08:39:55 +00:00
Michael Goulet c3159b851a Gate const closures even when they appear in macros 2023-03-11 21:29:28 +00:00
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
Michael Goulet 7a4505900d Add ~const bounds trait bounds when using derive_const 2023-02-07 21:00:12 +00:00
Deadbeef 679dde7338 fix parser mistaking const closures for const item 2023-02-01 06:44:30 +00:00
Deadbeef 3aeb43cb78 add and bless tests 2023-01-31 17:26:06 +00:00
Deadbeef 6bf2c4d739 implement const iterator using `rustc_do_not_const_check` 2023-01-31 17:09:30 +00:00
Yuki Okushi 5adc7a5e37
Rollup merge of #106785 - compiler-errors:better-impl-wf-spans, r=estebank
Make blame spans better for impl wfcheck

r? types
2023-01-13 16:54:24 +09:00
Michael Goulet 2aabb0fd5d Point at impl self type for impl wf obligations 2023-01-12 20:44:47 +00:00
Deadbeef 42a50bac31 move to correct test 2023-01-12 04:20:00 +00:00
Deadbeef b0aa859c24 fix fmt and bless 2023-01-12 02:28:38 +00:00
Michael Goulet 9a39d7e441 Note predicate span on ImplDerivedObligation 2023-01-11 19:46:45 +00:00
Albert Larsan cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00