File tree 6 files changed +67
-48
lines changed
6 files changed +67
-48
lines changed Original file line number Diff line number Diff line change @@ -107,32 +107,32 @@ lazy_static = "1.0.0"
107
107
108
108
[dependencies .rustc_ast ]
109
109
package = " rustc-ap-rustc_ast"
110
- version = " 666 .0.0"
110
+ version = " 667 .0.0"
111
111
112
112
[dependencies .rustc_ast_pretty ]
113
113
package = " rustc-ap-rustc_ast_pretty"
114
- version = " 666 .0.0"
114
+ version = " 667 .0.0"
115
115
116
116
[dependencies .rustc_data_structures ]
117
117
package = " rustc-ap-rustc_data_structures"
118
- version = " 666 .0.0"
118
+ version = " 667 .0.0"
119
119
120
120
[dependencies .rustc_errors ]
121
121
package = " rustc-ap-rustc_errors"
122
- version = " 666 .0.0"
122
+ version = " 667 .0.0"
123
123
124
124
[dependencies .rustc_expand ]
125
125
package = " rustc-ap-rustc_expand"
126
- version = " 666 .0.0"
126
+ version = " 667 .0.0"
127
127
128
128
[dependencies .rustc_parse ]
129
129
package = " rustc-ap-rustc_parse"
130
- version = " 666 .0.0"
130
+ version = " 667 .0.0"
131
131
132
132
[dependencies .rustc_session ]
133
133
package = " rustc-ap-rustc_session"
134
- version = " 666 .0.0"
134
+ version = " 667 .0.0"
135
135
136
136
[dependencies .rustc_span ]
137
137
package = " rustc-ap-rustc_span"
138
- version = " 666 .0.0"
138
+ version = " 667 .0.0"
Original file line number Diff line number Diff line change @@ -117,7 +117,9 @@ impl Spanned for ast::Param {
117
117
118
118
impl Spanned for ast:: GenericParam {
119
119
fn span ( & self ) -> Span {
120
- let lo = if self . attrs . is_empty ( ) {
120
+ let lo = if let ast:: GenericParamKind :: Const { ty : _, kw_span } = self . kind {
121
+ kw_span. lo ( )
122
+ } else if self . attrs . is_empty ( ) {
121
123
self . ident . span . lo ( )
122
124
} else {
123
125
self . attrs [ 0 ] . span . lo ( )
Original file line number Diff line number Diff line change @@ -559,7 +559,7 @@ impl Rewrite for ast::GenericParam {
559
559
_ => { }
560
560
}
561
561
562
- if let rustc_ast :: ast:: GenericParamKind :: Const { ref ty } = & self . kind {
562
+ if let ast:: GenericParamKind :: Const { ref ty, kw_span : _ } = & self . kind {
563
563
result. push_str ( "const " ) ;
564
564
result. push_str ( rewrite_ident ( context, self . ident ) ) ;
565
565
result. push_str ( ": " ) ;
Original file line number Diff line number Diff line change @@ -34,3 +34,11 @@ type Foo<const N: usize> = [i32; N + 1];
34
34
pub trait Foo : Bar < { Baz :: COUNT } > {
35
35
const ASD : usize ;
36
36
}
37
+
38
+ // #4263
39
+ fn const_generics_on_params <
40
+ // AAAA
41
+ const BBBB : usize ,
42
+ /* CCCC */
43
+ const DDDD : usize ,
44
+ > ( ) { }
Original file line number Diff line number Diff line change @@ -26,3 +26,12 @@ type Foo<const N: usize> = [i32; N + 1];
26
26
pub trait Foo : Bar < { Baz :: COUNT } > {
27
27
const ASD : usize ;
28
28
}
29
+
30
+ // #4263
31
+ fn const_generics_on_params <
32
+ // AAAA
33
+ const BBBB : usize ,
34
+ /* CCCC */
35
+ const DDDD : usize ,
36
+ > ( ) {
37
+ }
You can’t perform that action at this time.
0 commit comments