File tree 2 files changed +34
-6
lines changed
2 files changed +34
-6
lines changed Original file line number Diff line number Diff line change @@ -341,12 +341,26 @@ mod issue2843 {
341
341
trait Foo {
342
342
type Bar;
343
343
}
344
-
344
+
345
345
impl Foo for usize {
346
346
type Bar = u8;
347
347
}
348
-
348
+
349
349
impl<T: Foo> Foo for Option<T> {
350
350
type Bar = Option<T::Bar>;
351
351
}
352
- }
352
+ }
353
+
354
+ mod issue3859 {
355
+ pub struct Foo;
356
+ pub struct Bar([usize; 3]);
357
+
358
+ impl Foo {
359
+ pub const BAR: usize = 3;
360
+
361
+ pub fn foo() {
362
+ const _X: usize = Foo::BAR;
363
+ // const _Y: usize = Self::BAR;
364
+ }
365
+ }
366
+ }
Original file line number Diff line number Diff line change @@ -341,12 +341,26 @@ mod issue2843 {
341
341
trait Foo {
342
342
type Bar ;
343
343
}
344
-
344
+
345
345
impl Foo for usize {
346
346
type Bar = u8 ;
347
347
}
348
-
348
+
349
349
impl < T : Foo > Foo for Option < T > {
350
350
type Bar = Option < T :: Bar > ;
351
351
}
352
- }
352
+ }
353
+
354
+ mod issue3859 {
355
+ pub struct Foo ;
356
+ pub struct Bar ( [ usize ; 3 ] ) ;
357
+
358
+ impl Foo {
359
+ pub const BAR : usize = 3 ;
360
+
361
+ pub fn foo ( ) {
362
+ const _X: usize = Foo :: BAR ;
363
+ // const _Y: usize = Self::BAR;
364
+ }
365
+ }
366
+ }
You can’t perform that action at this time.
0 commit comments