We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c72fd8 commit e621e68Copy full SHA for e621e68
src/libsyntax/codemap.rs
@@ -193,9 +193,6 @@ pub struct MultiByteChar {
193
pos: BytePos,
194
/// The number of bytes, >=2
195
bytes: uint,
196
- /// The complete number of 'extra' bytes through this character in the
197
- /// FileMap
198
- sum: uint
199
}
200
201
/// A single source in the CodeMap
@@ -233,16 +230,9 @@ pub impl FileMap {
233
230
234
231
pub fn record_multibyte_char(&self, pos: BytePos, bytes: uint) {
235
232
assert bytes >=2 && bytes <= 4;
236
- let sum = if self.multibyte_chars.len() > 0 {
237
- self.multibyte_chars.last().sum
238
- } else {
239
- 0
240
- };
241
- let sum = sum + bytes;
242
let mbc = MultiByteChar {
243
pos: pos,
244
bytes: bytes,
245
- sum: sum
246
};
247
self.multibyte_chars.push(mbc);
248
0 commit comments