From 922dcfdc6950f4d68d3334199de5572eef52b75a Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 31 Mar 2014 19:01:01 -0700 Subject: 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). --- src/libsyntax/ast_map.rs | 2 +- src/libsyntax/codemap.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libsyntax') 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 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 for Values<'a, T> { fn next(&mut self) -> Option { 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 -- cgit 1.4.1-3-g733a5