Skip to content

Commit 21d02bf

Browse files
committed
Add a regression test for issue-83479
1 parent 42983a2 commit 21d02bf

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#![feature(type_alias_impl_trait)]
2+
3+
type PairCoupledTypes: Trait<
4+
//~^ ERROR: bounds on `type`s in this context have no effect
5+
//~| ERROR: cannot find trait `Trait` in this scope
6+
[u32; {
7+
static FOO: usize; //~ ERROR: free static item without body
8+
}],
9+
> = impl Trait<
10+
//~^ ERROR: cannot find trait `Trait` in this scope
11+
[u32; {
12+
static FOO: usize; //~ ERROR: free static item without body
13+
}],
14+
>;
15+
16+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
error: bounds on `type`s in this context have no effect
2+
--> $DIR/issue-83479.rs:3:24
3+
|
4+
LL | type PairCoupledTypes: Trait<
5+
| ________________________^
6+
LL | |
7+
LL | |
8+
LL | | [u32; {
9+
LL | | static FOO: usize;
10+
LL | | }],
11+
LL | | > = impl Trait<
12+
| |_^
13+
14+
error: free static item without body
15+
--> $DIR/issue-83479.rs:7:9
16+
|
17+
LL | static FOO: usize;
18+
| ^^^^^^^^^^^^^^^^^-
19+
| |
20+
| help: provide a definition for the static: `= <expr>;`
21+
22+
error: free static item without body
23+
--> $DIR/issue-83479.rs:12:9
24+
|
25+
LL | static FOO: usize;
26+
| ^^^^^^^^^^^^^^^^^-
27+
| |
28+
| help: provide a definition for the static: `= <expr>;`
29+
30+
error[E0405]: cannot find trait `Trait` in this scope
31+
--> $DIR/issue-83479.rs:3:24
32+
|
33+
LL | type PairCoupledTypes: Trait<
34+
| ^^^^^ not found in this scope
35+
36+
error[E0405]: cannot find trait `Trait` in this scope
37+
--> $DIR/issue-83479.rs:9:10
38+
|
39+
LL | > = impl Trait<
40+
| ^^^^^ not found in this scope
41+
42+
error: aborting due to 5 previous errors
43+
44+
For more information about this error, try `rustc --explain E0405`.

0 commit comments

Comments
 (0)