Skip to content

Commit 5abb087

Browse files
committed
moved renamed docs stderr formatted | impl-unused-rps-in-assoc-type.rs
1 parent fd50e10 commit 5abb087

File tree

3 files changed

+22
-19
lines changed

3 files changed

+22
-19
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//! Regression test for issue #22077
2+
//! lifetime parameters must be constrained in associated type definitions
3+
4+
trait Fun {
5+
type Output;
6+
fn call<'x>(&'x self) -> Self::Output;
7+
}
8+
9+
struct Holder {
10+
x: String,
11+
}
12+
13+
impl<'a> Fun for Holder {
14+
//~^ ERROR E0207
15+
type Output = &'a str;
16+
fn call<'b>(&'b self) -> &'b str {
17+
&self.x[..]
18+
}
19+
}
20+
21+
fn main() {}

tests/ui/impl-unused-rps-in-assoc-type.stderr renamed to tests/ui/associated-types/unconstrained-lifetime-assoc-type.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
2-
--> $DIR/impl-unused-rps-in-assoc-type.rs:11:6
2+
--> $DIR/unconstrained-lifetime-assoc-type.rs:13:6
33
|
44
LL | impl<'a> Fun for Holder {
55
| ^^ unconstrained lifetime parameter

tests/ui/impl-unused-rps-in-assoc-type.rs

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)