Stream: t-compiler

Topic: rfc-2091


Adam Perry (Oct 03 2019 at 02:00, on Zulip):

@oli btw https://github.com/rust-lang/rust/pull/65037

Adam Perry (Oct 03 2019 at 02:02, on Zulip):

nothing to do there, just giving the heads up that i'm doing it

centril (Oct 03 2019 at 02:27, on Zulip):

Added some comments :slight_smile:

Adam Perry (Oct 03 2019 at 02:37, on Zulip):

:heart:

Adam Perry (Oct 03 2019 at 02:37, on Zulip):

i think at this point you've read ayosec's code more closely than i have :sweat_smile:

centril (Oct 03 2019 at 02:38, on Zulip):

:joy:

centril (Oct 03 2019 at 02:39, on Zulip):

@Adam Perry btw, we can implement this in several steps (PRs)

centril (Oct 03 2019 at 02:39, on Zulip):

e.g. the AST + gating parts, MIR, etc.

Adam Perry (Oct 03 2019 at 02:39, on Zulip):

sure, wfm

centril (Oct 03 2019 at 05:10, on Zulip):

@anp btw, personally I just dispense with error codes and use struct_span_err

centril (Oct 03 2019 at 05:10, on Zulip):

much less hassle

anp (Oct 03 2019 at 05:10, on Zulip):

cool, i'm not sure how to act on this advice :P

anp (Oct 03 2019 at 05:11, on Zulip):

eli5?

centril (Oct 03 2019 at 05:11, on Zulip):

basically: error codes are not required, it's "extra" if you do it

anp (Oct 03 2019 at 05:15, on Zulip):

ok, i think i'll put a little time into doing it and bail if i turn out to be lazy

anp (Oct 03 2019 at 05:15, on Zulip):

only semi related, i'm seeing these tests failing locally:

failures:
    [ui] ui/consts/miri_unleashed/mutable_references_ice.rs
    [ui] ui/pattern/const-pat-ice.rs
    [ui] ui/traits/cycle-cache-err-60010.rs

is this normal?

centril (Oct 03 2019 at 05:16, on Zulip):

what are the failures?

anp (Oct 03 2019 at 05:21, on Zulip):

here's one:

---- [ui] ui/traits/cycle-cache-err-60010.rs stdout ----
diff of stderr:

6      |
7      = note: required because of the requirements on the impl of `Query<RootDatabase>` for `ParseQuery`
8
-   error[E0275]: overflow evaluating the requirement `RootDatabase: SourceDatabase`
-     --> $DIR/cycle-cache-err-60010.rs:30:6
-      |
-   LL | impl Database for RootDatabase {
-      |      ^^^^^^^^
-      |
-      = note: required because of the requirements on the impl of `Query<RootDatabase>` for `ParseQuery`
-      = note: required because it appears within the type `SalsaStorage`
-
-   error: aborting due to 2 previous errors
+   error: aborting due to previous error
19
20  For more information about this error, try `rustc --explain E0275`.
21


The actual stderr differed from the expected stderr.
centril (Oct 03 2019 at 05:23, on Zulip):

did you rebase atop master?

centril (Oct 03 2019 at 05:23, on Zulip):

might be a non-determinism issue otherwise

anp (Oct 03 2019 at 05:38, on Zulip):

yeah i'm at top of tree

anp (Oct 03 2019 at 05:38, on Zulip):

hm yeah cleaning seems to get rid of it for now

anp (Oct 03 2019 at 06:16, on Zulip):

ok two of them are thread names being unnamed on my machine instead of <rustc>

anp (Oct 03 2019 at 06:16, on Zulip):

the third is the one i pasted

anp (Oct 03 2019 at 06:16, on Zulip):

and they're still here after cleaning :confused:

anp (Oct 03 2019 at 06:57, on Zulip):

repro'ing on master and will file an issue once i figure out more detail

anp (Oct 04 2019 at 02:06, on Zulip):

@oli i think this is ready for re-review https://github.com/rust-lang/rust/pull/65037

anp (Oct 04 2019 at 23:07, on Zulip):

actually, just realized that the patch i started from didn't cover an important case. i pushed a failing test to the PR and am looking at how to fix it now

the issue is that the #[track_caller] attribute must be prohibited in traits, but https://github.com/anp/rust/blob/track-caller/src/librustc_typeck/check/wfcheck.rs#L176-L186 only covers items within the trait item itself, not in impl blocks for traits

i think what i want to do is add something here: https://github.com/anp/rust/blob/track-caller/src/librustc_typeck/check/wfcheck.rs#L193, like

if method_sig.is_some() && has_attr(impl_item.attrs, sym::track_caller) {
    // TODO figure out if the owning Item has a TraitRef?
}

i'm not sure how to find out about the owning Item from the ImplItem. i think i see a path like let owning_item = tcx.expect_item(tcx.hir().def_index_to_hir_id(impl_item.hir.owner));, is that the "right" way to look that up? it seems also possible that this information should be passed down in a different way, or that this check should occur elsewhere?

anp (Oct 05 2019 at 16:13, on Zulip):

(figured this out)

anp (Oct 11 2019 at 17:55, on Zulip):

ya i'm definitely misunderstanding something

Taylor Cramer (Oct 11 2019 at 17:56, on Zulip):

Look at the macros in this file for an example: https://github.com/rust-lang/rust/blob/master/src/libstd/macros.rs#L56

Taylor Cramer (Oct 11 2019 at 17:56, on Zulip):

#[allow_internal_unstable(whatever_unstable_feature_you_want_to_use_from_inside_the_expanded_macro)] is what you want

anp (Oct 11 2019 at 17:57, on Zulip):

sweeet

Taylor Cramer (Oct 11 2019 at 17:57, on Zulip):

rfc-2091 topic btw

oh, sorry, I didn't see that. We can move there if you have more q's

Taylor Cramer (Oct 11 2019 at 17:58, on Zulip):

actually, IIRC there's some way to merge streams?

anp (Oct 11 2019 at 17:58, on Zulip):

https://github.com/rust-lang/rust/issues/47809#issuecomment-541163961

Taylor Cramer (Oct 11 2019 at 17:59, on Zulip):

there we go

anp (Oct 11 2019 at 17:59, on Zulip):

i dont think there is, also insert ghostbusters reference here

Taylor Cramer (Oct 11 2019 at 17:59, on Zulip):

I just did it

anp (Oct 11 2019 at 17:59, on Zulip):

merge != cross
you set me up for it

anp (Oct 11 2019 at 17:59, on Zulip):

:P

anp (Oct 11 2019 at 18:00, on Zulip):

oh wait these are actually called topics not streams

anp (Oct 11 2019 at 18:00, on Zulip):

nmlol

anp (Oct 11 2019 at 18:00, on Zulip):

i'm a very proficient zulip user.

anp (Oct 27 2019 at 19:33, on Zulip):

@Centril you around to r+ this now that CI is passing again? https://github.com/rust-lang/rust/pull/65664
think i have all of @eddyb's nits addressed and fixed the query hashing issue

anp (Oct 27 2019 at 19:33, on Zulip):

@centril apparently i dont know how to tag in zulip

centril (Oct 27 2019 at 19:34, on Zulip):

@anp I would prefer for eddyb to do the approving

centril (Oct 27 2019 at 19:35, on Zulip):

they are easier to reach on discord

anp (Oct 27 2019 at 19:38, on Zulip):

kk

anp (Oct 27 2019 at 20:27, on Zulip):

they were still awake!

anp (Oct 27 2019 at 20:27, on Zulip):

miracle.

Last update: Nov 20 2019 at 01:10UTC