Stream: t-compiler/wg-prioritization/alerts

Topic: I-prioritize #74282 ICE(expected defining type in borrowck)…


triagebot (Dec 20 2020 at 19:34, on Zulip):

@WG-prioritization/alerts issue #74282 has been requested for prioritization.

Procedure

Camelid (Dec 20 2020 at 21:21, on Zulip):

This code uses a nightly feature, but it's so simple and the bug is so weird that I feel it should be P-high.

Camelid (Dec 20 2020 at 21:21, on Zulip):

Also it's a regression from 1.43.

Camelid (Dec 20 2020 at 21:22, on Zulip):

Specifically, this part is really weird:

error[E0308]: mismatched types
  --> src/lib.rs:8:15
   |
3  |   type Closure = impl Fn() -> u64;
   |                  ---------------- the expected opaque type
...
8  |       Anonymous(|| {
   |  _______________^
9  | |         3
10 | |     })
   | |_____^ expected opaque type, found closure
   |
   = note: expected opaque type `impl Fn<()>`
                  found closure `[closure@src/lib.rs:8:15: 10:6]`

The compiler says it expected impl Fn<()>, but the actual type is impl Fn() -> u64 – it's missing the return type?

lcnr (Dec 20 2020 at 21:22, on Zulip):

we deactive parts of our opaque types handling without the feature gate

lcnr (Dec 20 2020 at 21:23, on Zulip):

ah, the impl Fn<()> part is a bit weird

Camelid (Dec 20 2020 at 21:23, on Zulip):

Yeah, and the feature gate (#![feature(type_alias_impl_trait)]) is enabled here.

Camelid (Dec 20 2020 at 21:23, on Zulip):

It also seems like it's rendering the impl trait wrong: it should be impl Fn()

Camelid (Dec 20 2020 at 21:24, on Zulip):

(Or something like that)

lcnr (Dec 20 2020 at 21:24, on Zulip):

do we have a policy here? I don't think that it makes sense to prioritize errors which require feature gates

Joshua Nelson (Dec 20 2020 at 21:24, on Zulip):

Camelid said:

It also seems like it's rendering the impl trait wrong: it should be impl Fn()

Fn<()> is how the trait is defined: https://doc.rust-lang.org/std/ops/trait.Fn.html

lcnr (Dec 20 2020 at 21:24, on Zulip):

or would say that all of them are P-low

lcnr (Dec 20 2020 at 21:25, on Zulip):

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=c8dde47313b03c4c2b7c6b33d14869af is more interesting imo

Joshua Nelson (Dec 20 2020 at 21:25, on Zulip):

Joshua Nelson said:

Camelid said:

It also seems like it's rendering the impl trait wrong: it should be impl Fn()

Fn<()> is how the trait is defined: https://doc.rust-lang.org/std/ops/trait.Fn.html

which is an unstable implementation detail, so maybe still a bug, but an understandable one

lcnr (Dec 20 2020 at 21:25, on Zulip):

but probably also close to P-low imo

Camelid (Dec 20 2020 at 21:26, on Zulip):

Since you and Joshua Nelson both seem to think P-low, I'll go with that :)

We have a big queue of issues to prioritize from matthiaskrgr's work identifying regressions.

triagebot (Dec 20 2020 at 21:27, on Zulip):

Issue #74282's prioritization request has been removed.

Last update: Apr 11 2021 at 17:45UTC