Auto merge of #117171 - fee1-dead-contrib:deny-explicit-effect-params… · rust-lang/rust@698db85 (original) (raw)
``
1
`+
error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
`
``
2
`+
--> $DIR/no-explicit-const-params.rs:22:5
`
``
3
`+
|
`
``
4
`+
LL | foo::();
`
``
5
`+
| ^^^--------- help: remove these generics
`
``
6
`+
| |
`
``
7
`+
| expected 0 generic arguments
`
``
8
`+
|
`
``
9
`+
note: function defined here, with 0 generic parameters
`
``
10
`+
--> $DIR/no-explicit-const-params.rs:3:10
`
``
11
`+
|
`
``
12
`+
LL | const fn foo() {}
`
``
13
`+
| ^^^
`
``
14
+
``
15
`+
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
`
``
16
`+
--> $DIR/no-explicit-const-params.rs:24:12
`
``
17
`+
|
`
``
18
`+
LL | <() as Bar>::bar();
`
``
19
`+
| ^^^------- help: remove these generics
`
``
20
`+
| |
`
``
21
`+
| expected 0 generic arguments
`
``
22
`+
|
`
``
23
`+
note: trait defined here, with 0 generic parameters
`
``
24
`+
--> $DIR/no-explicit-const-params.rs:6:7
`
``
25
`+
|
`
``
26
`+
LL | trait Bar {
`
``
27
`+
| ^^^
`
``
28
+
``
29
`+
error[E0308]: mismatched types
`
``
30
`+
--> $DIR/no-explicit-const-params.rs:24:5
`
``
31
`+
|
`
``
32
`+
LL | <() as Bar>::bar();
`
``
33
`` +
| ^^^^^^^^^^^^^^^^^^^^^^^^^ expected false
, found true
``
``
34
`+
|
`
``
35
`` +
= note: expected constant false
``
``
36
`` +
found constant true
``
``
37
+
``
38
`+
error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
`
``
39
`+
--> $DIR/no-explicit-const-params.rs:15:5
`
``
40
`+
|
`
``
41
`+
LL | foo::();
`
``
42
`+
| ^^^-------- help: remove these generics
`
``
43
`+
| |
`
``
44
`+
| expected 0 generic arguments
`
``
45
`+
|
`
``
46
`+
note: function defined here, with 0 generic parameters
`
``
47
`+
--> $DIR/no-explicit-const-params.rs:3:10
`
``
48
`+
|
`
``
49
`+
LL | const fn foo() {}
`
``
50
`+
| ^^^
`
``
51
+
``
52
`+
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
`
``
53
`+
--> $DIR/no-explicit-const-params.rs:17:12
`
``
54
`+
|
`
``
55
`+
LL | <() as Bar>::bar();
`
``
56
`+
| ^^^------ help: remove these generics
`
``
57
`+
| |
`
``
58
`+
| expected 0 generic arguments
`
``
59
`+
|
`
``
60
`+
note: trait defined here, with 0 generic parameters
`
``
61
`+
--> $DIR/no-explicit-const-params.rs:6:7
`
``
62
`+
|
`
``
63
`+
LL | trait Bar {
`
``
64
`+
| ^^^
`
``
65
+
``
66
`+
error: aborting due to 5 previous errors
`
``
67
+
``
68
`+
Some errors have detailed explanations: E0107, E0308.
`
``
69
`` +
For more information about an error, try rustc --explain E0107
.
``