Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Make dataflow-based const qualification the canonical one #66385

Merged
merged 17 commits into from Nov 17, 2019

Conversation

@ecstatic-morse
Copy link
Contributor

ecstatic-morse commented Nov 13, 2019

For over a month, dataflow-based const qualification has been running in parallel with qualify_consts to check the bodies of const and statics. This PR removes the old qualification pass completely in favor of the dataflow-based one.

edit:
This PR also stops checking QUALIF_ERROR_BIT during promotion. This check appears to no longer serve a purpose now that the CTFE engine is more robust.

As a side-effect, this resolves #66167.

r? @eddyb

@rust-highfive

This comment was marked as spam.

Copy link
Collaborator

rust-highfive commented Nov 13, 2019

Some changes occurred in diagnostic error codes

cc @GuillaumeGomez

@ecstatic-morse

This comment was marked as outdated.

Copy link
Contributor Author

ecstatic-morse commented Nov 13, 2019

Marking as draft since this depends on #66170, and includes all the commits from that PR.

@rust-highfive

This comment was marked as outdated.

Copy link
Collaborator

rust-highfive commented Nov 13, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-11-13T21:01:39.2189350Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-13T21:01:39.9941145Z ##[command]git config gc.auto 0
2019-11-13T21:01:39.9945513Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-13T21:01:39.9949477Z ##[command]git config --get-all http.proxy
2019-11-13T21:01:39.9952946Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66385/merge:refs/remotes/pull/66385/merge
---
2019-11-13T22:00:36.4127090Z .................................................................................................... 1500/9239
2019-11-13T22:00:42.0827223Z .................................................................................................... 1600/9239
2019-11-13T22:00:50.7962573Z .................................................................................................... 1700/9239
2019-11-13T22:00:58.8414971Z ....i............................................................................................... 1800/9239
2019-11-13T22:01:05.1416842Z ........................................................................................iiiii....... 1900/9239
2019-11-13T22:01:25.5130430Z .................................................................................................... 2100/9239
2019-11-13T22:01:27.6570302Z .................................................................................................... 2200/9239
2019-11-13T22:01:29.9643268Z .................................................................................................... 2300/9239
2019-11-13T22:01:36.4529356Z .................................................................................................... 2400/9239
---
2019-11-13T22:04:21.8011313Z .......................................................................................i............ 4700/9239
2019-11-13T22:04:28.1041664Z ...i................................................................................................ 4800/9239
2019-11-13T22:04:36.9297027Z .................................................................................................... 4900/9239
2019-11-13T22:04:41.8953179Z .................................................................................................... 5000/9239
2019-11-13T22:04:52.3207071Z ..........................................................................................ii.ii..... 5100/9239
2019-11-13T22:05:00.2334857Z .........................i.......................................................................... 5300/9239
2019-11-13T22:05:08.4053552Z .................................................................................................... 5400/9239
2019-11-13T22:05:16.6923788Z ........................................................................i........................... 5500/9239
2019-11-13T22:05:23.6617888Z .................................................................................................... 5600/9239
2019-11-13T22:05:23.6617888Z .................................................................................................... 5600/9239
2019-11-13T22:05:30.3608720Z .................................................................................................... 5700/9239
2019-11-13T22:05:39.8176486Z ..........................................................ii...i..ii...........i.................... 5800/9239
2019-11-13T22:06:00.9889955Z .................................................................................................... 6000/9239
2019-11-13T22:06:08.8532248Z .................................................................................................... 6100/9239
2019-11-13T22:06:08.8532248Z .................................................................................................... 6100/9239
2019-11-13T22:06:13.5810112Z .............................................................................i..ii.................. 6200/9239
2019-11-13T22:06:40.8735799Z .................................................................................................... 6400/9239
2019-11-13T22:06:43.5940289Z .............................................i...................................................... 6500/9239
2019-11-13T22:06:45.6330862Z .................................................................................................... 6600/9239
2019-11-13T22:06:47.8021106Z .............................i...................................................................... 6700/9239
---
2019-11-13T22:11:23.0549559Z failures:
2019-11-13T22:11:23.0549807Z 
2019-11-13T22:11:23.0550399Z ---- [compile-fail] compile-fail/consts/const-fn-error.rs stdout ----
2019-11-13T22:11:23.0550648Z 
2019-11-13T22:11:23.0556079Z error: /checkout/src/test/compile-fail/consts/const-fn-error.rs:7: unexpected error: '7:9: 7:10: constant function contains unimplemented expression type [E0019]'
2019-11-13T22:11:23.0557156Z error: 1 unexpected errors found, 0 expected errors not found
2019-11-13T22:11:23.0557230Z status: exit code: 1
2019-11-13T22:11:23.0557230Z status: exit code: 1
2019-11-13T22:11:23.0558192Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/consts/const-fn-error.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/consts/const-fn-error" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/consts/const-fn-error/auxiliary" "-A" "unused"
2019-11-13T22:11:23.0559858Z unexpected errors (from JSON output): [
2019-11-13T22:11:23.0565412Z         line_num: 7,
2019-11-13T22:11:23.0565454Z         kind: Some(
2019-11-13T22:11:23.0565493Z             Error,
2019-11-13T22:11:23.0565550Z         ),
2019-11-13T22:11:23.0565550Z         ),
2019-11-13T22:11:23.0565594Z         msg: "7:9: 7:10: constant function contains unimplemented expression type [E0019]",
2019-11-13T22:11:23.0565690Z ]
2019-11-13T22:11:23.0565715Z 
2019-11-13T22:11:23.0566180Z thread '[compile-fail] compile-fail/consts/const-fn-error.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:1520:13
2019-11-13T22:11:23.0566260Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-11-13T22:11:23.0566260Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-11-13T22:11:23.0566293Z 
2019-11-13T22:11:23.0566514Z ---- [compile-fail] compile-fail/issue-52443.rs stdout ----
2019-11-13T22:11:23.0566544Z 
2019-11-13T22:11:23.0566848Z error: /checkout/src/test/compile-fail/issue-52443.rs:9: unexpected error: '9:16: 9:17: constant contains unimplemented expression type [E0019]'
2019-11-13T22:11:23.0566932Z error: 1 unexpected errors found, 0 expected errors not found
2019-11-13T22:11:23.0566993Z status: exit code: 1
2019-11-13T22:11:23.0566993Z status: exit code: 1
2019-11-13T22:11:23.0567668Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/issue-52443.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-52443" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-52443/auxiliary" "-A" "unused"
2019-11-13T22:11:23.0567771Z unexpected errors (from JSON output): [
2019-11-13T22:11:23.0567851Z         line_num: 9,
2019-11-13T22:11:23.0567906Z         kind: Some(
2019-11-13T22:11:23.0567951Z             Error,
2019-11-13T22:11:23.0567988Z         ),
2019-11-13T22:11:23.0567988Z         ),
2019-11-13T22:11:23.0568049Z         msg: "9:16: 9:17: constant contains unimplemented expression type [E0019]",
2019-11-13T22:11:23.0568126Z ]
2019-11-13T22:11:23.0568149Z 
2019-11-13T22:11:23.0568442Z thread '[compile-fail] compile-fail/issue-52443.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:1520:13
2019-11-13T22:11:23.0568478Z 
---
2019-11-13T22:11:23.0569451Z 
2019-11-13T22:11:23.0569677Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-11-13T22:11:23.0569804Z 
2019-11-13T22:11:23.0569826Z 
2019-11-13T22:11:23.0571874Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/compile-fail" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "compile-fail" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-11-13T22:11:23.0572171Z 
2019-11-13T22:11:23.0572201Z 
2019-11-13T22:11:23.0628945Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-11-13T22:11:23.0629228Z Build completed unsuccessfully in 1:03:34
2019-11-13T22:11:23.0629228Z Build completed unsuccessfully in 1:03:34
2019-11-13T22:11:23.0638831Z == clock drift check ==
2019-11-13T22:11:23.0651143Z   local time: Wed Nov 13 22:11:23 UTC 2019
2019-11-13T22:11:23.3450962Z   network time: Wed, 13 Nov 2019 22:11:23 GMT
2019-11-13T22:11:23.3451039Z == end clock drift check ==
2019-11-13T22:11:24.1436197Z 
2019-11-13T22:11:24.1525955Z ##[error]Bash exited with code '1'.
2019-11-13T22:11:24.1579407Z ##[section]Starting: Checkout
2019-11-13T22:11:24.1580855Z ==============================================================================
2019-11-13T22:11:24.1580898Z Task         : Get sources
2019-11-13T22:11:24.1581459Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@ecstatic-morse ecstatic-morse force-pushed the ecstatic-morse:check-only-pass2 branch from 8e40d60 to ebebc65 Nov 13, 2019
@ecstatic-morse ecstatic-morse marked this pull request as ready for review Nov 13, 2019
@ecstatic-morse ecstatic-morse force-pushed the ecstatic-morse:check-only-pass2 branch from ebebc65 to 236b96d Nov 13, 2019

impl QualifSet {
fn contains<Q: ?Sized + Qualif>(self) -> bool {
pub const UNPROMOTABLE: Self = QualifSet(1 << Unpromotable::IDX);

This comment has been minimized.

Copy link
@eddyb

eddyb Nov 13, 2019

Member

Can we stop using this hack, btw?

This comment has been minimized.

Copy link
@ecstatic-morse

ecstatic-morse Nov 14, 2019

Author Contributor

There's only two places it can appear now. One is where you left a comment below, which doesn't seem to break anything. The other is when a const panics unconditionally, which is just a hack to approximate the existing behavior. I'll try removing it completely.

This comment has been minimized.

Copy link
@ecstatic-morse

ecstatic-morse Nov 14, 2019

Author Contributor

I've removed UNPROMOTABLE. Let's see what happens with CI.

This comment has been minimized.

Copy link
@ecstatic-morse

ecstatic-morse Nov 14, 2019

Author Contributor

We pass all the tests, and I've tried the following example locally and no ICE occurs, just an error pointing to X saying that const evaluation failed.

#![feature(const_panic)]
#![allow(const_err)]

const X: u32 = panic!();

fn main() {
    let x: &'static _ = &X;
}

if body.return_ty().references_error() {
tcx.sess.delay_span_bug(body.span, "mir_const_qualif: MIR had errors");
return check_consts::QualifSet::UNPROMOTABLE.into();

This comment has been minimized.

Copy link
@eddyb

eddyb Nov 14, 2019

Member

Does anything break if you use QualifSet::default() here?

This comment has been minimized.

Copy link
@ecstatic-morse

ecstatic-morse Nov 14, 2019

Author Contributor

Apparently not 😃

@ecstatic-morse ecstatic-morse force-pushed the ecstatic-morse:check-only-pass2 branch from 236b96d to 059856e Nov 14, 2019
@@ -185,6 +185,41 @@ pub fn run_passes(
body.phase = mir_phase;
}

fn mir_const_qualif(tcx: TyCtxt<'_>, def_id: DefId) -> u8 {

This comment has been minimized.

Copy link
@Centril

Centril Nov 14, 2019

Member

A doc comment would be good especially for the return type.

This comment has been minimized.

Copy link
@eddyb

eddyb Nov 14, 2019

Member

I think we can replace it now with:

struct ConstQualif {
    has_mut_interior: bool,
    needs_drop: bool,
}

This comment has been minimized.

Copy link
@ecstatic-morse

ecstatic-morse Nov 14, 2019

Author Contributor

This change was made in the latest version.

// These blocks often drop locals that would otherwise be returned from the function.
//
// FIXME: This shouldn't be unsound since a panic at compile time will cause a compiler
// error anyway, but maybe we should do more here?

This comment has been minimized.

Copy link
@Centril

Centril Nov 14, 2019

Member

"If you have to ask..."? ;)

This comment has been minimized.

Copy link
@ecstatic-morse

ecstatic-morse Nov 15, 2019

Author Contributor

@eddyb I was hoping someone could authoritatively tell me we don't need to do anything for cleanup blocks. I'm pretty sure we don't.

@@ -1,6 +1,9 @@
// compile-flags: -Zunleash-the-miri-inside-of-you
// compile-flags: -Zunleash-the-miri-inside-of-you -Awarnings

This comment has been minimized.

Copy link
@Centril

Centril Nov 14, 2019

Member

I would prefer not to do this so that we can see changes in diffs and whatnot.

This comment has been minimized.

Copy link
@ecstatic-morse

ecstatic-morse Nov 14, 2019

Author Contributor

The "skipping const checks" annotations were only added last week since they are now mandatory in all UI tests (see #66213). They are unrelated to the actual purpose of the test; they just add noise (to both the test itself and PRs that work on const qualification). Ignoring warnings was explicitly mentioned as an opt-out path for tests like this.

Interestingly, #![allow(warnings)] did not work for this purpose. Not sure why?

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 14, 2019

☔️ The latest upstream changes (presumably #66233) made this pull request unmergeable. Please resolve the merge conflicts.

@ecstatic-morse ecstatic-morse force-pushed the ecstatic-morse:check-only-pass2 branch from 059856e to 910ae81 Nov 14, 2019
@ecstatic-morse

This comment has been minimized.

Copy link
Contributor Author

ecstatic-morse commented Nov 14, 2019

Rebased to fix merge conflicts. The latest version moves QualifSet into rustc::mir and uses it everywhere.

@@ -2769,6 +2769,13 @@ pub struct BorrowCheckResult<'tcx> {
pub used_mut_upvars: SmallVec<[Field; 8]>,
}

/// The result of the `mir_const_qualif` query.
#[derive(Clone, Copy, Debug, Default, RustcEncodable, RustcDecodable, HashStable)]
pub struct QualifSet {

This comment has been minimized.

Copy link
@eddyb

eddyb Nov 14, 2019

Member

I don't think "set" is relevant anymore, the bitset was really just an optimization.
ConstQualifs might be better. Or ValueQualifs?

This comment has been minimized.

Copy link
@ecstatic-morse

ecstatic-morse Nov 14, 2019

Author Contributor

I would lean towards ConstQualifs since IsNotPromotable is no longer, but either is fine.

#[derive(Clone, Copy, Debug, Default, RustcEncodable, RustcDecodable, HashStable)]
pub struct QualifSet {
pub has_mut_interior: bool,
pub needs_drop: bool,

This comment has been minimized.

Copy link
@eddyb

eddyb Nov 14, 2019

Member

I wonder if these two fields should have similar doc comments to the HasMutInterior and NeedsDrop types in rustc_mir::transform::check_consts.

This comment has been minimized.

Copy link
@ecstatic-morse

ecstatic-morse Nov 14, 2019

Author Contributor

Would a link to the Qualif implementers suffice? I don't wanna copy-paste lest they get out of sync.

This comment has been minimized.

Copy link
@eddyb

eddyb Nov 14, 2019

Member

Oh I wasn't thinking copy-pasting, maybe a few words and a link (or even just the rustc_mir::...::HasMutInterior etc. path).

This comment has been minimized.

Copy link
@ecstatic-morse

ecstatic-morse Nov 14, 2019

Author Contributor

I added a note on ConstQualifs that points the user to librustc_mir/transform/check_consts/qualifs.rs. Lemme know if you want something more here.

@@ -93,7 +93,7 @@ rustc_queries! {
/// Maps DefId's that have an associated `mir::Body` to the result
/// of the MIR qualify_consts pass. The actual meaning of
/// the value isn't known except to the pass itself.

This comment has been minimized.

Copy link
@eddyb

eddyb Nov 14, 2019

Member

This doc comment should be updated.

@@ -295,7 +295,7 @@ enum EntryKind<'tcx> {
/// Additional data for EntryKind::Const and EntryKind::AssocConst
#[derive(Clone, Copy, RustcEncodable, RustcDecodable)]
struct ConstQualif {

This comment has been minimized.

Copy link
@eddyb

eddyb Nov 14, 2019

Member

I don't think there's a point in having this newtype.

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 15, 2019

☔️ The latest upstream changes (presumably #66438) made this pull request unmergeable. Please resolve the merge conflicts.

Now `mir_const_qualif` must be called for `static`s and `const fn`s as
well as `const`s since it is responsible for const-checking. We return
the qualifs in the return place for everything, even though they will
only be used for `const`s.
Unlike the original pass, we check *every* non-cleanup basic block
instead of stopping at `SwitchInt`. We use the `is_cfg_cyclic` function
to check for loops unlike the original checker which could not differentiate
between true cycles and basic blocks with more than two predecessors.

The last three functions are all copied verbatim from `qualify_consts`.
@ecstatic-morse ecstatic-morse force-pushed the ecstatic-morse:check-only-pass2 branch from 93eac78 to a1135cc Nov 15, 2019
@ecstatic-morse

This comment has been minimized.

Copy link
Contributor Author

ecstatic-morse commented Nov 15, 2019

@eddyb I believe I've resolved all your posted concerns. Let me know what else needs to be done.

@eddyb
eddyb approved these changes Nov 15, 2019
@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Nov 15, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 15, 2019

📌 Commit a1135cc has been approved by eddyb

@Centril

This comment has been minimized.

Copy link
Member

Centril commented Nov 16, 2019

@bors rollup=never

@ecstatic-morse ecstatic-morse mentioned this pull request Nov 16, 2019
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 17, 2019

⌛️ Testing commit a1135cc with merge 0f0c640...

bors added a commit that referenced this pull request Nov 17, 2019
Make dataflow-based const qualification the canonical one

For over a month, dataflow-based const qualification has been running in parallel with `qualify_consts` to check the bodies of `const` and `static`s. This PR removes the old qualification pass completely in favor of the dataflow-based one.

**edit:**
This PR also stops checking `QUALIF_ERROR_BIT` during promotion. This check appears to no longer serve a purpose now that the CTFE engine is more robust.

As a side-effect, this resolves #66167.

r? @eddyb
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 17, 2019

☀️ Test successful - checks-azure
Approved by: eddyb
Pushing 0f0c640 to master...

@bors bors added the merged-by-bors label Nov 17, 2019
@bors bors merged commit a1135cc into rust-lang:master Nov 17, 2019
5 checks passed
5 checks passed
homu Test successful
Details
pr Build #20191115.40 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Nov 17, 2019

📣 Toolstate changed by #66385!

Tested on commit 0f0c640.
Direct link to PR: #66385

💔 rustc-guide on linux: test-pass → test-fail (cc @amanjeev @spastorino @mark-i-m, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Nov 17, 2019
Tested on commit rust-lang/rust@0f0c640.
Direct link to PR: <rust-lang/rust#66385>

💔 rustc-guide on linux: test-pass → test-fail (cc @amanjeev @spastorino @mark-i-m, @rust-lang/infra).
bors added a commit that referenced this pull request Nov 23, 2019
Enable `if` and `match` in constants behind a feature flag

This PR is an initial implementation of #49146. It introduces a `const_if_match` feature flag and does the following if it is enabled:
- Allows `Downcast` projections, `SwitchInt` terminators and `FakeRead`s for matched places through the MIR const-checker.
- Allows `if` and `match` expressions through the HIR const-checker.
- Stops converting `&&` to `&` and `||` to `|` in `const` and `static` items.

As a result, the following operations are now allowed in a const context behind the feature flag:
- `if` and `match`
- short circuiting logic operators (`&&` and `||`)
- the `assert` and `debug_assert` macros (if the `const_panic` feature flag is also enabled)

However, the following operations remain forbidden:
- `while`, `loop` and `for` (see #52000)
- the `?` operator (calls `From::from` on its error variant)
- the `assert_eq` and `assert_ne` macros, along with their `debug` variants (calls `fmt::Debug`)

This PR is possible now that we use dataflow for const qualification (see #64470 and #66385).

r? @oli-obk
cc @rust-lang/wg-const-eval @eddyb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.