summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/result_large_err.stderr
blob: c386edfd21571ed56b329118d9f714432811386e (plain)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
error: the `Err`-variant returned from this function is very large
  --> $DIR/result_large_err.rs:8:23
   |
LL | pub fn large_err() -> Result<(), [u8; 512]> {
   |                       ^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 512 bytes
   |
   = help: try reducing the size of `[u8; 512]`, for example by boxing large elements or replacing it with `Box<[u8; 512]>`
   = note: `-D clippy::result-large-err` implied by `-D warnings`

error: the `Err`-variant returned from this function is very large
  --> $DIR/result_large_err.rs:19:21
   |
LL |     pub fn ret() -> Result<(), Self> {
   |                     ^^^^^^^^^^^^^^^^ the `Err`-variant is at least 240 bytes
   |
   = help: try reducing the size of `FullyDefinedLargeError`, for example by boxing large elements or replacing it with `Box<FullyDefinedLargeError>`

error: the `Err`-variant returned from this function is very large
  --> $DIR/result_large_err.rs:24:26
   |
LL | pub fn struct_error() -> Result<(), FullyDefinedLargeError> {
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 240 bytes
   |
   = help: try reducing the size of `FullyDefinedLargeError`, for example by boxing large elements or replacing it with `Box<FullyDefinedLargeError>`

error: the `Err`-variant returned from this function is very large
  --> $DIR/result_large_err.rs:29:45
   |
LL | pub fn large_err_via_type_alias<T>(x: T) -> Fdlr<T> {
   |                                             ^^^^^^^ the `Err`-variant is at least 240 bytes
   |
   = help: try reducing the size of `FullyDefinedLargeError`, for example by boxing large elements or replacing it with `Box<FullyDefinedLargeError>`

error: the `Err`-variant returned from this function is very large
  --> $DIR/result_large_err.rs:37:34
   |
LL | pub fn param_large_error<R>() -> Result<(), (u128, R, FullyDefinedLargeError)> {
   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 256 bytes
   |
   = help: try reducing the size of `(u128, R, FullyDefinedLargeError)`, for example by boxing large elements or replacing it with `Box<(u128, R, FullyDefinedLargeError)>`

error: the `Err`-variant returned from this function is very large
  --> $DIR/result_large_err.rs:48:34
   |
LL |     _Omg([u8; 512]),
   |     --------------- the largest variant contains at least 512 bytes
...
LL |     pub fn large_enum_error() -> Result<(), Self> {
   |                                  ^^^^^^^^^^^^^^^^
   |
   = help: try reducing the size of `LargeErrorVariants<()>`, for example by boxing large elements or replacing it with `Box<LargeErrorVariants<()>>`

error: the `Err`-variant returned from this function is very large
  --> $DIR/result_large_err.rs:60:30
   |
LL |     _Biggest([u8; 1024]),
   |     -------------------- the largest variant contains at least 1024 bytes
LL |     _AlsoBig([u8; 512]),
   |     ------------------- the variant `_AlsoBig` contains at least 512 bytes
...
LL |     fn large_enum_error() -> Result<(), Self> {
   |                              ^^^^^^^^^^^^^^^^
   |
   = help: try reducing the size of `MultipleLargeVariants`, for example by boxing large elements or replacing it with `Box<MultipleLargeVariants>`

error: the `Err`-variant returned from this function is very large
  --> $DIR/result_large_err.rs:66:25
   |
LL |     fn large_error() -> Result<(), [u8; 512]> {
   |                         ^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 512 bytes
   |
   = help: try reducing the size of `[u8; 512]`, for example by boxing large elements or replacing it with `Box<[u8; 512]>`

error: the `Err`-variant returned from this function is very large
  --> $DIR/result_large_err.rs:85:29
   |
LL | pub fn large_union_err() -> Result<(), FullyDefinedUnionError> {
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 512 bytes
   |
   = help: try reducing the size of `FullyDefinedUnionError`, for example by boxing large elements or replacing it with `Box<FullyDefinedUnionError>`

error: the `Err`-variant returned from this function is very large
  --> $DIR/result_large_err.rs:94:40
   |
LL | pub fn param_large_union<T: Copy>() -> Result<(), UnionError<T>> {
   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 512 bytes
   |
   = help: try reducing the size of `UnionError<T>`, for example by boxing large elements or replacing it with `Box<UnionError<T>>`

error: the `Err`-variant returned from this function is very large
  --> $DIR/result_large_err.rs:103:34
   |
LL | pub fn array_error_subst<U>() -> Result<(), ArrayError<i32, U>> {
   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 128 bytes
   |
   = help: try reducing the size of `ArrayError<i32, U>`, for example by boxing large elements or replacing it with `Box<ArrayError<i32, U>>`

error: the `Err`-variant returned from this function is very large
  --> $DIR/result_large_err.rs:107:31
   |
LL | pub fn array_error<T, U>() -> Result<(), ArrayError<(i32, T), U>> {
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 128 bytes
   |
   = help: try reducing the size of `ArrayError<(i32, T), U>`, for example by boxing large elements or replacing it with `Box<ArrayError<(i32, T), U>>`

error: aborting due to 12 previous errors