Stream: t-compiler

Topic: nll-regression


Zoxc (Nov 30 2019 at 18:41, on Zulip):

Why is this code an error now? https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=35bb12de17c51e5eeb6193ae8dfbf40f
And where does the 'static bound come from?
cc @nikomatsakis

simulacrum (Nov 30 2019 at 19:05, on Zulip):

@Zoxc fwiw, this works instead of the existing -- I suspect the closure getting generated for the map perhaps isn't quite accepting enough (e.g., coerces the 'hir and '_ to be the same or something?)

            let mut a = &mut *this;
            let p = None.map(|x: u32| a.lower_int());
Matthew Jasper (Nov 30 2019 at 20:12, on Zulip):

The 'static bound comes from how we approximate for<'a> 'hir: 'a as 'hir: 'static. This specific case is arguably a bug.

Last update: Dec 12 2019 at 00:45UTC