1
- error[E0412]: cannot find type `S` in this scope
2
- --> $DIR/issue-118510.rs:2:19
3
- |
4
- LL | Ident(&'a mut S),
5
- | ^ not found in this scope
6
- |
7
- help: you might be missing a type parameter
8
- |
9
- LL | pub enum Sexpr<'a, S> {
10
- | +++
11
-
12
- error[E0412]: cannot find type `Foo` in this scope
13
- --> $DIR/issue-118510.rs:6:23
14
- |
15
- LL | fn map<'a, F: FnOnce(&Foo<'a>) -> T>(f: F) {}
16
- | ^^^ not found in this scope
17
-
18
- error[E0412]: cannot find type `T` in this scope
19
- --> $DIR/issue-118510.rs:6:35
20
- |
21
- LL | fn map<'a, F: FnOnce(&Foo<'a>) -> T>(f: F) {}
22
- | - ^ help: a type parameter with a similar name exists: `F`
23
- | |
24
- | similarly named type parameter `F` defined here
25
-
26
1
error[E0631]: type mismatch in function arguments
27
- --> $DIR/issue-118510.rs:11 :9
2
+ --> $DIR/issue-118510.rs:8 :9
28
3
|
29
4
LL | Ident(&'a mut S),
30
5
| ----- found signature defined here
@@ -34,19 +9,18 @@ LL | map(Sexpr::Ident);
34
9
| |
35
10
| required by a bound introduced by this call
36
11
|
37
- = note: expected function signature `for<'a> fn(&'a {type error} ) -> _`
38
- found function signature `fn(&mut {type error} ) -> _`
12
+ = note: expected function signature `for<'a> fn(&'a _ ) -> _`
13
+ found function signature `fn(&mut _ ) -> _`
39
14
note: required by a bound in `map`
40
- --> $DIR/issue-118510.rs:6:15
15
+ --> $DIR/issue-118510.rs:5:19
41
16
|
42
- LL | fn map<'a, F: FnOnce(&Foo<'a> ) -> T>(f: F) {}
43
- | ^^^^ ^^^^^^^^^^^^^^^^^ required by this bound in `map`
17
+ LL | fn map<Foo, T, F: FnOnce(&Foo) -> T>(f: F) {}
18
+ | ^^^^^^^^^^^^^^^^^ required by this bound in `map`
44
19
help: consider wrapping the function in a closure
45
20
|
46
- LL | map(|arg0: &{type error} | Sexpr::Ident(&mut *arg0));
47
- | +++++++++++++++++++++ ++++++++++++
21
+ LL | map(|arg0| Sexpr::Ident(&mut *arg0));
22
+ | ++++++ ++++++++++++
48
23
49
- error: aborting due to 4 previous errors
24
+ error: aborting due to 1 previous error
50
25
51
- Some errors have detailed explanations: E0412, E0631.
52
- For more information about an error, try `rustc --explain E0412`.
26
+ For more information about this error, try `rustc --explain E0631`.
0 commit comments