Skip to content

Commit 183a770

Browse files
Add regression test for rust-lang#105404
1 parent 6806486 commit 183a770

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// This test ensures that it's not crashing rustdoc.
2+
3+
pub struct Foo<'a, 'b, T> {
4+
field1: dyn Bar<'a, 'b,>,
5+
//~^ ERROR
6+
//~^^ ERROR
7+
}
8+
9+
pub trait Bar<'x, 's, U>
10+
where U: 'x,
11+
Self:'x,
12+
Self:'s
13+
{}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
2+
--> $DIR/unable-fulfill-trait.rs:4:17
3+
|
4+
LL | field1: dyn Bar<'a, 'b,>,
5+
| ^^^ expected 1 generic argument
6+
|
7+
note: trait defined here, with 1 generic parameter: `U`
8+
--> $DIR/unable-fulfill-trait.rs:9:11
9+
|
10+
LL | pub trait Bar<'x, 's, U>
11+
| ^^^ -
12+
help: add missing generic argument
13+
|
14+
LL | field1: dyn Bar<'a, 'b, U,>,
15+
| +++
16+
17+
error[E0227]: ambiguous lifetime bound, explicit lifetime bound required
18+
--> $DIR/unable-fulfill-trait.rs:4:13
19+
|
20+
LL | field1: dyn Bar<'a, 'b,>,
21+
| ^^^^^^^^^^^^^^^^
22+
23+
error: aborting due to 2 previous errors
24+
25+
Some errors have detailed explanations: E0107, E0227.
26+
For more information about an error, try `rustc --explain E0107`.

0 commit comments

Comments
 (0)