File tree 2 files changed +9
-15
lines changed
2 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -6,4 +6,6 @@ fn main() {
6
6
test ( & || 0 ) ; //~ ERROR the trait bound
7
7
}
8
8
9
- fn test < T > ( arg : & impl Fn ( ) -> T ) where for < ' a > & ' a T : Default { }
9
+ trait Trait { }
10
+
11
+ fn test < T > ( arg : & impl Fn ( ) -> T ) where for < ' a > & ' a T : Trait { }
Original file line number Diff line number Diff line change 1
- error[E0277]: the trait bound `for<'a> &'a {integer}: Default ` is not satisfied
2
- --> $DIR/issue-89333.rs:6:10
1
+ error[E0277]: the trait bound `for<'a> &'a _: Trait ` is not satisfied
2
+ --> $DIR/issue-89333.rs:6:5
3
3
|
4
4
LL | test(&|| 0);
5
- | ---- ^^^^^ the trait `for<'a> Default` is not implemented for `&'a {integer}`
6
- | |
7
- | required by a bound introduced by this call
5
+ | ^^^^ the trait `for<'a> Trait` is not implemented for `&'a _`
8
6
|
9
- = help: the following implementations were found:
10
- <&CStr as Default>
11
- <&OsStr as Default>
12
- <&[T] as Default>
13
- <&mut [T] as Default>
14
- and 217 others
15
7
note: required by a bound in `test`
16
- --> $DIR/issue-89333.rs:9 :55
8
+ --> $DIR/issue-89333.rs:11 :55
17
9
|
18
- LL | fn test<T>(arg: &impl Fn() -> T) where for<'a> &'a T: Default {}
19
- | ^^^^^^^ required by this bound in `test`
10
+ LL | fn test<T>(arg: &impl Fn() -> T) where for<'a> &'a T: Trait {}
11
+ | ^^^^^ required by this bound in `test`
20
12
21
13
error: aborting due to previous error
22
14
You can’t perform that action at this time.
0 commit comments