]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0260.md
Rollup merge of #62514 - stephaneyfx:box-ffi, r=nikomatsakis
[rust.git] / src / librustc_error_codes / error_codes / E0260.md
1 The name for an item declaration conflicts with an external crate's name.
2
3 Erroneous code example:
4
5 ```compile_fail,E0260
6 extern crate core;
7
8 struct core;
9
10 fn main() {}
11 ```
12
13 There are two possible solutions:
14
15 Solution #1: Rename the item.
16
17 ```
18 extern crate core;
19
20 struct xyz;
21 ```
22
23 Solution #2: Import the crate with a different name.
24
25 ```
26 extern crate core as xyz;
27
28 struct abc;
29 ```
30
31 See the Declaration Statements section of the reference for more information
32 about what constitutes an Item declaration and what does not:
33
34 https://doc.rust-lang.org/reference.html#statements