-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-HIRArea: The high-level intermediate representation (HIR)Area: The high-level intermediate representation (HIR)A-prettyArea: Pretty printing (including `-Z unpretty`)Area: Pretty printing (including `-Z unpretty`)C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Code
trait A<'x> {}
trait B<'x> {}
struct Foo<'b> {
pub bar: &'b dyn for<'a> A<'a>,
}
impl<'a> B<'a> for dyn for<'b> A<'b> {}
impl<'a> A<'a> for Foo<'a> {}
Output
(From the Playground.)
#[prelude_import]
use std::prelude::rust_2018::*;
#[macro_use]
extern crate std;
trait A<'x> { }
trait B<'x> { }
struct Foo<'b> {
pub bar: &'b dyn for<'a> A,
}
impl <'a> B for dyn for<'b> A { }
impl <'a> A for Foo { }
Note that the uses of A
, B
, and Foo
don't include their lifetimes.
Metadata
Metadata
Assignees
Labels
A-HIRArea: The high-level intermediate representation (HIR)Area: The high-level intermediate representation (HIR)A-prettyArea: Pretty printing (including `-Z unpretty`)Area: Pretty printing (including `-Z unpretty`)C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.