File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -1418,7 +1418,8 @@ impl Adt {
14181418 }
14191419
14201420 pub fn layout ( self , db : & dyn HirDatabase ) -> Result < Layout , LayoutError > {
1421- if db. generic_params ( self . into ( ) ) . iter ( ) . count ( ) != 0 {
1421+ let generic_params = & db. generic_params ( self . into ( ) ) ;
1422+ if generic_params. iter ( ) . next ( ) . is_some ( ) || generic_params. iter_lt ( ) . next ( ) . is_some ( ) {
14221423 return Err ( LayoutError :: HasPlaceholder ) ;
14231424 }
14241425 let krate = self . krate ( db) . id ;
Original file line number Diff line number Diff line change @@ -7856,3 +7856,25 @@ impl Iterator for S {
78567856 "# ] ] ,
78577857 ) ;
78587858}
7859+
7860+ #[ test]
7861+ fn hover_lifetime_regression_16963 ( ) {
7862+ check (
7863+ r#"
7864+ struct Pedro$0<'a> {
7865+ hola: &'a str
7866+ }
7867+ "# ,
7868+ expect ! [ [ r#"
7869+ *Pedro*
7870+
7871+ ```rust
7872+ test
7873+ ```
7874+
7875+ ```rust
7876+ struct Pedro<'a>
7877+ ```
7878+ "# ] ] ,
7879+ )
7880+ }
You can’t perform that action at this time.
0 commit comments