]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0429.md
Rollup merge of #66576 - pnkfelix:more-robust-gdb-vec-printer, r=alexcrichton
[rust.git] / src / librustc_error_codes / error_codes / E0429.md
1 The `self` keyword cannot appear alone as the last segment in a `use`
2 declaration.
3
4 Erroneous code example:
5
6 ```compile_fail,E0429
7 use std::fmt::self; // error: `self` imports are only allowed within a { } list
8 ```
9
10 To use a namespace itself in addition to some of its members, `self` may appear
11 as part of a brace-enclosed list of imports:
12
13 ```
14 use std::fmt::{self, Debug};
15 ```
16
17 If you only want to import the namespace, do so directly:
18
19 ```
20 use std::fmt;
21 ```