This repository was archived by the owner on Oct 9, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -61,34 +61,30 @@ Type name | Text in methods
61
61
` *const T ` | ` ptr `
62
62
` *mut T ` | ` mut_ptr `
63
63
64
- ### Avoid redundant prefixes [ FIXME: needs RFC]
64
+ ### Avoid redundant prefixes [ RFC 356 ]
65
65
66
- Names of items within a module should not be prefixed with that module's name,
67
- since clients can always reference the item qualified by the module name.
66
+ > The guidelines below were approved by [ RFC #356 ] ( https://github.com/rust-lang/rfcs/pull/356 ) .
67
+
68
+ Names of items within a module should not be prefixed with that module's name:
68
69
69
70
Prefer
70
71
71
72
``` rust
72
73
mod foo {
73
- pub struct Bar { ... }
74
+ pub struct Error { ... }
74
75
}
75
76
```
76
77
77
78
over
78
79
79
80
``` rust
80
81
mod foo {
81
- pub struct FooBar { ... }
82
+ pub struct FooError { ... }
82
83
}
83
84
```
84
85
85
-
86
- ### Fallible functions [ FIXME]
87
-
88
- > ** [ FIXME] ** Should we have a standard marker for functions that can
89
- > cause task failure?
90
-
91
- > See https://github.com/rust-lang/rust/issues/13159
86
+ This convention avoids stuttering (like ` io::IoError ` ). Library clients can
87
+ rename on import to avoid clashes.
92
88
93
89
### Getter/setter methods [ FIXME]
94
90
You can’t perform that action at this time.
0 commit comments