forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#103080 - ohno418:fix-hir-pretty-print-lifet…
…imes, r=cjgillot pretty: fix to print some lifetimes on HIR pretty-print HIR pretty-printer doesn't seem to print some lifetimes in types. This PR fixes that. Closes rust-lang#85089
- Loading branch information
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#[prelude_import] | ||
use ::std::prelude::rust_2015::*; | ||
#[macro_use] | ||
extern crate std; | ||
// Test to print lifetimes on HIR pretty-printing. | ||
|
||
// pretty-compare-only | ||
// pretty-mode:hir | ||
// pp-exact:issue-85089.pp | ||
|
||
trait A<'x> { } | ||
trait B<'x> { } | ||
|
||
struct Foo<'b> { | ||
bar: &'b dyn for<'a> A<'a>, | ||
} | ||
|
||
impl <'a> B<'a> for dyn for<'b> A<'b> { } | ||
|
||
impl <'a> A<'a> for Foo<'a> { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Test to print lifetimes on HIR pretty-printing. | ||
|
||
// pretty-compare-only | ||
// pretty-mode:hir | ||
// pp-exact:issue-85089.pp | ||
|
||
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> {} |