File tree 2 files changed +48
-0
lines changed
tests/ui/pattern/usefulness
2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ fn main ( ) { }
2
+
3
+ fn foo ( ) {
4
+ #[ derive( Copy , Clone ) ]
5
+ struct Foo ( [ u8 ; S ] ) ;
6
+ //~^ ERROR cannot find value `S`
7
+ //~| ERROR cannot find value `S`
8
+
9
+ type U = impl Copy ;
10
+ //~^ ERROR `impl Trait` in type aliases is unstable
11
+ let foo: U = Foo ( ( ) ) ;
12
+ let Foo ( ( ) ) = foo;
13
+ }
Original file line number Diff line number Diff line change
1
+ error[E0425]: cannot find value `S` in this scope
2
+ --> $DIR/issue-119778-type-error-ice.rs:5:21
3
+ |
4
+ LL | struct Foo([u8; S]);
5
+ | ^ not found in this scope
6
+ |
7
+ help: you might be missing a const parameter
8
+ |
9
+ LL | struct Foo<const S: /* Type */>([u8; S]);
10
+ | +++++++++++++++++++++
11
+
12
+ error[E0425]: cannot find value `S` in this scope
13
+ --> $DIR/issue-119778-type-error-ice.rs:5:21
14
+ |
15
+ LL | struct Foo([u8; S]);
16
+ | ^ not found in this scope
17
+ |
18
+ help: you might be missing a const parameter
19
+ |
20
+ LL | struct Foo<const S: /* Type */>([u8; S]);
21
+ | +++++++++++++++++++++
22
+
23
+ error[E0658]: `impl Trait` in type aliases is unstable
24
+ --> $DIR/issue-119778-type-error-ice.rs:9:14
25
+ |
26
+ LL | type U = impl Copy;
27
+ | ^^^^^^^^^
28
+ |
29
+ = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
30
+ = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
31
+
32
+ error: aborting due to 3 previous errors
33
+
34
+ Some errors have detailed explanations: E0425, E0658.
35
+ For more information about an error, try `rustc --explain E0425`.
You can’t perform that action at this time.
0 commit comments