Skip to content

Commit de306d7

Browse files
authored
Rollup merge of #90078 - JohnTitor:test-83479, r=Mark-Simulacrum
Add a regression test for issue-83479 Add a regression test for #83479 (comment), but not close the issue, see #83479 (comment).
2 parents a656bc5 + 396a4f4 commit de306d7

File tree

3 files changed

+61
-1
lines changed

3 files changed

+61
-1
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`.

src/tools/tidy/src/ui_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::path::Path;
77

88
const ENTRY_LIMIT: usize = 1000;
99
// FIXME: The following limits should be reduced eventually.
10-
const ROOT_ENTRY_LIMIT: usize = 1330;
10+
const ROOT_ENTRY_LIMIT: usize = 1331;
1111
const ISSUES_ENTRY_LIMIT: usize = 2488;
1212

1313
fn check_entries(path: &Path, bad: &mut bool) {

0 commit comments

Comments
 (0)