forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsuggest-assoc-ty-bound-on-eq-bound.stderr
More file actions
73 lines (67 loc) · 2.31 KB
/
Copy pathsuggest-assoc-ty-bound-on-eq-bound.stderr
File metadata and controls
73 lines (67 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
error[E0782]: expected a type, found a trait
--> $DIR/suggest-assoc-ty-bound-on-eq-bound.rs:4:24
|
LL | fn f(_: impl Trait<T = Copy>) {}
| ^^^^
|
help: you can add the `dyn` keyword if you want a trait object
|
LL | fn f(_: impl Trait<T = dyn Copy>) {}
| +++
help: you might have meant to write a bound here
|
LL - fn f(_: impl Trait<T = Copy>) {}
LL + fn f(_: impl Trait<T: Copy>) {}
|
error[E0782]: expected a type, found a trait
--> $DIR/suggest-assoc-ty-bound-on-eq-bound.rs:9:24
|
LL | fn g(_: impl Trait<T = std::fmt::Debug + Eq>) {}
| ^^^^^^^^^^^^^^^^^^^^
|
help: you can add the `dyn` keyword if you want a trait object
|
LL | fn g(_: impl Trait<T = dyn std::fmt::Debug + Eq>) {}
| +++
help: you might have meant to write a bound here
|
LL - fn g(_: impl Trait<T = std::fmt::Debug + Eq>) {}
LL + fn g(_: impl Trait<T: std::fmt::Debug + Eq>) {}
|
error[E0782]: expected a type, found a trait
--> $DIR/suggest-assoc-ty-bound-on-eq-bound.rs:14:26
|
LL | fn h(_: impl Trait<T<> = 'static + for<'a> Fn(&'a ())>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: you can add the `dyn` keyword if you want a trait object
|
LL | fn h(_: impl Trait<T<> = dyn 'static + for<'a> Fn(&'a ())>) {}
| +++
help: you might have meant to write a bound here
|
LL - fn h(_: impl Trait<T<> = 'static + for<'a> Fn(&'a ())>) {}
LL + fn h(_: impl Trait<T<>: 'static + for<'a> Fn(&'a ())>) {}
|
error[E0782]: expected a type, found a trait
--> $DIR/suggest-assoc-ty-bound-on-eq-bound.rs:20:26
|
LL | type Obj = dyn Trait<T = Clone>;
| ^^^^^
|
help: you can add the `dyn` keyword if you want a trait object
|
LL | type Obj = dyn Trait<T = dyn Clone>;
| +++
error[E0782]: expected a type, found a trait
--> $DIR/suggest-assoc-ty-bound-on-eq-bound.rs:29:22
|
LL | fn i(_: impl Fn() -> std::fmt::Debug) {}
| ^^^^^^^^^^^^^^^
|
help: you can add the `dyn` keyword if you want a trait object
|
LL | fn i(_: impl Fn() -> dyn std::fmt::Debug) {}
| +++
error: aborting due to 5 previous errors
For more information about this error, try `rustc --explain E0782`.