]> git.proxmox.com Git - rustc.git/blob - compiler/rustc_error_codes/src/error_codes/E0429.md
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / compiler / rustc_error_codes / src / 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 ```