]> git.lizzy.rs Git - rust.git/blob - src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/test_data/clippy_pass_by_ref.txt
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[rust.git] / src / tools / rust-analyzer / crates / rust-analyzer / src / diagnostics / test_data / clippy_pass_by_ref.txt
1 [
2     MappedRustDiagnostic {
3         url: Url {
4             scheme: "file",
5             cannot_be_a_base: false,
6             username: "",
7             password: None,
8             host: None,
9             port: None,
10             path: "/test/compiler/mir/tagset.rs",
11             query: None,
12             fragment: None,
13         },
14         diagnostic: Diagnostic {
15             range: Range {
16                 start: Position {
17                     line: 41,
18                     character: 23,
19                 },
20                 end: Position {
21                     line: 41,
22                     character: 28,
23                 },
24             },
25             severity: Some(
26                 Warning,
27             ),
28             code: Some(
29                 String(
30                     "trivially_copy_pass_by_ref",
31                 ),
32             ),
33             code_description: Some(
34                 CodeDescription {
35                     href: Url {
36                         scheme: "https",
37                         cannot_be_a_base: false,
38                         username: "",
39                         password: None,
40                         host: Some(
41                             Domain(
42                                 "rust-lang.github.io",
43                             ),
44                         ),
45                         port: None,
46                         path: "/rust-clippy/master/index.html",
47                         query: None,
48                         fragment: Some(
49                             "trivially_copy_pass_by_ref",
50                         ),
51                     },
52                 },
53             ),
54             source: Some(
55                 "clippy",
56             ),
57             message: "this argument is passed by reference, but would be more efficient if passed by value\n#[warn(clippy::trivially_copy_pass_by_ref)] implied by #[warn(clippy::all)]\nfor further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref",
58             related_information: Some(
59                 [
60                     DiagnosticRelatedInformation {
61                         location: Location {
62                             uri: Url {
63                                 scheme: "file",
64                                 cannot_be_a_base: false,
65                                 username: "",
66                                 password: None,
67                                 host: None,
68                                 port: None,
69                                 path: "/test/compiler/lib.rs",
70                                 query: None,
71                                 fragment: None,
72                             },
73                             range: Range {
74                                 start: Position {
75                                     line: 0,
76                                     character: 8,
77                                 },
78                                 end: Position {
79                                     line: 0,
80                                     character: 19,
81                                 },
82                             },
83                         },
84                         message: "lint level defined here",
85                     },
86                     DiagnosticRelatedInformation {
87                         location: Location {
88                             uri: Url {
89                                 scheme: "file",
90                                 cannot_be_a_base: false,
91                                 username: "",
92                                 password: None,
93                                 host: None,
94                                 port: None,
95                                 path: "/test/compiler/mir/tagset.rs",
96                                 query: None,
97                                 fragment: None,
98                             },
99                             range: Range {
100                                 start: Position {
101                                     line: 41,
102                                     character: 23,
103                                 },
104                                 end: Position {
105                                     line: 41,
106                                     character: 28,
107                                 },
108                             },
109                         },
110                         message: "consider passing by value instead: `self`",
111                     },
112                 ],
113             ),
114             tags: None,
115             data: None,
116         },
117         fix: None,
118     },
119     MappedRustDiagnostic {
120         url: Url {
121             scheme: "file",
122             cannot_be_a_base: false,
123             username: "",
124             password: None,
125             host: None,
126             port: None,
127             path: "/test/compiler/lib.rs",
128             query: None,
129             fragment: None,
130         },
131         diagnostic: Diagnostic {
132             range: Range {
133                 start: Position {
134                     line: 0,
135                     character: 8,
136                 },
137                 end: Position {
138                     line: 0,
139                     character: 19,
140                 },
141             },
142             severity: Some(
143                 Hint,
144             ),
145             code: Some(
146                 String(
147                     "trivially_copy_pass_by_ref",
148                 ),
149             ),
150             code_description: Some(
151                 CodeDescription {
152                     href: Url {
153                         scheme: "https",
154                         cannot_be_a_base: false,
155                         username: "",
156                         password: None,
157                         host: Some(
158                             Domain(
159                                 "rust-lang.github.io",
160                             ),
161                         ),
162                         port: None,
163                         path: "/rust-clippy/master/index.html",
164                         query: None,
165                         fragment: Some(
166                             "trivially_copy_pass_by_ref",
167                         ),
168                     },
169                 },
170             ),
171             source: Some(
172                 "clippy",
173             ),
174             message: "lint level defined here",
175             related_information: Some(
176                 [
177                     DiagnosticRelatedInformation {
178                         location: Location {
179                             uri: Url {
180                                 scheme: "file",
181                                 cannot_be_a_base: false,
182                                 username: "",
183                                 password: None,
184                                 host: None,
185                                 port: None,
186                                 path: "/test/compiler/mir/tagset.rs",
187                                 query: None,
188                                 fragment: None,
189                             },
190                             range: Range {
191                                 start: Position {
192                                     line: 41,
193                                     character: 23,
194                                 },
195                                 end: Position {
196                                     line: 41,
197                                     character: 28,
198                                 },
199                             },
200                         },
201                         message: "original diagnostic",
202                     },
203                 ],
204             ),
205             tags: None,
206             data: None,
207         },
208         fix: None,
209     },
210     MappedRustDiagnostic {
211         url: Url {
212             scheme: "file",
213             cannot_be_a_base: false,
214             username: "",
215             password: None,
216             host: None,
217             port: None,
218             path: "/test/compiler/mir/tagset.rs",
219             query: None,
220             fragment: None,
221         },
222         diagnostic: Diagnostic {
223             range: Range {
224                 start: Position {
225                     line: 41,
226                     character: 23,
227                 },
228                 end: Position {
229                     line: 41,
230                     character: 28,
231                 },
232             },
233             severity: Some(
234                 Hint,
235             ),
236             code: Some(
237                 String(
238                     "trivially_copy_pass_by_ref",
239                 ),
240             ),
241             code_description: Some(
242                 CodeDescription {
243                     href: Url {
244                         scheme: "https",
245                         cannot_be_a_base: false,
246                         username: "",
247                         password: None,
248                         host: Some(
249                             Domain(
250                                 "rust-lang.github.io",
251                             ),
252                         ),
253                         port: None,
254                         path: "/rust-clippy/master/index.html",
255                         query: None,
256                         fragment: Some(
257                             "trivially_copy_pass_by_ref",
258                         ),
259                     },
260                 },
261             ),
262             source: Some(
263                 "clippy",
264             ),
265             message: "consider passing by value instead: `self`",
266             related_information: Some(
267                 [
268                     DiagnosticRelatedInformation {
269                         location: Location {
270                             uri: Url {
271                                 scheme: "file",
272                                 cannot_be_a_base: false,
273                                 username: "",
274                                 password: None,
275                                 host: None,
276                                 port: None,
277                                 path: "/test/compiler/mir/tagset.rs",
278                                 query: None,
279                                 fragment: None,
280                             },
281                             range: Range {
282                                 start: Position {
283                                     line: 41,
284                                     character: 23,
285                                 },
286                                 end: Position {
287                                     line: 41,
288                                     character: 28,
289                                 },
290                             },
291                         },
292                         message: "original diagnostic",
293                     },
294                 ],
295             ),
296             tags: None,
297             data: None,
298         },
299         fix: None,
300     },
301 ]