diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-03-31 19:01:01 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-03-31 19:50:51 -0700 |
| commit | 922dcfdc6950f4d68d3334199de5572eef52b75a (patch) | |
| tree | 3d23129fa0af77f5c1c5a6e9b3856a3ddfbffcba /src/libsyntax | |
| parent | 683197975c119e4c03588fa729dee4f87902f534 (diff) | |
| download | rust-922dcfdc6950f4d68d3334199de5572eef52b75a.tar.gz rust-922dcfdc6950f4d68d3334199de5572eef52b75a.zip | |
Switch some tuple structs to pub fields
This commit deals with the fallout of the previous change by making tuples structs have public fields where necessary (now that the fields are private by default).
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast_map.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/codemap.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/ast_map.rs b/src/libsyntax/ast_map.rs index f07b0e71c1c..d380c1aca10 100644 --- a/src/libsyntax/ast_map.rs +++ b/src/libsyntax/ast_map.rs @@ -66,7 +66,7 @@ impl<'a> Iterator<PathElem> for LinkedPath<'a> { // HACK(eddyb) move this into libstd (value wrapper for slice::Items). #[deriving(Clone)] -pub struct Values<'a, T>(slice::Items<'a, T>); +pub struct Values<'a, T>(pub slice::Items<'a, T>); impl<'a, T: Copy> Iterator<T> for Values<'a, T> { fn next(&mut self) -> Option<T> { diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index 0d2492d7fad..7cadce54765 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -33,13 +33,13 @@ pub trait Pos { /// A byte offset. Keep this small (currently 32-bits), as AST contains /// a lot of them. #[deriving(Clone, Eq, TotalEq, Hash, Ord, Show)] -pub struct BytePos(u32); +pub struct BytePos(pub u32); /// A character offset. Because of multibyte utf8 characters, a byte offset /// is not equivalent to a character offset. The CodeMap will convert BytePos /// values to CharPos values as necessary. #[deriving(Eq, Hash, Ord, Show)] -pub struct CharPos(uint); +pub struct CharPos(pub uint); // FIXME: Lots of boilerplate in these impls, but so far my attempts to fix // have been unsuccessful |
