Stream: t-compiler

Topic: #58894 inferred region bounds in metadata


QuietMisdreavus (Mar 18 2019 at 15:59, on Zulip):

i'm looking at this PR again and wondering if the extra 'env: 'env bound is something the compiler is erroneously generating when exporting the struct

pub struct Scope<'env> {
    _marker: PhantomData<&'env mut &'env ()>,
}

since rustdoc is picking it up when pulling it from another crate

QuietMisdreavus (Mar 18 2019 at 16:00, on Zulip):

the PR as-is just scans the bounds list for trivial bounds like that one but i'm wondering if that's the right place for it

nikomatsakis (Mar 19 2019 at 14:20, on Zulip):

@QuietMisdreavus it could be being added by the code that detects implict bounds from the field types

nikomatsakis (Mar 19 2019 at 14:21, on Zulip):

I thought we were detecting and screen out "trivial" bounds like that that, but maybe not?

nikomatsakis (Mar 19 2019 at 14:21, on Zulip):

though it sounds like @eddyb already pointed you at some of the relevant things

QuietMisdreavus (Mar 19 2019 at 14:21, on Zulip):

i was hoping that that would be something that could be screened out, yeah

nikomatsakis (Mar 19 2019 at 14:22, on Zulip):

well we could certainly screen out the 'env: 'env sort of bounds

QuietMisdreavus (Mar 19 2019 at 14:22, on Zulip):

yeah, i think eddyb's suggestion is a better approach to the issue

QuietMisdreavus (Mar 19 2019 at 14:22, on Zulip):

there's a similar issue where an inferred T: 'a + 'a bound is showing up

nikomatsakis (Mar 19 2019 at 14:24, on Zulip):

I guess two things:

nikomatsakis (Mar 19 2019 at 14:25, on Zulip):

left a comment on the PR

Last update: Nov 21 2019 at 15:00UTC