Skip to content

Commit cfd7b9b

Browse files
nikomatsakisflaper87
authored andcommitted
---
yaml --- r: 151089 b: refs/heads/try2 c: 6fa1f48 h: refs/heads/master i: 151087: 8d612c7 v: v3
1 parent 4a435a8 commit cfd7b9b

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 2e358672f8aba3d844df4c744199ace4a309f707
8+
refs/heads/try2: 6fa1f48237bc61cabcb63f75700ad7303f152c1f
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libfourcc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ pub fn expand_syntax_ext(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) ->
9191

9292
let s = match expr.node {
9393
// expression is a literal
94-
ast::ExprLit(lit) => match lit.node {
94+
ast::ExprLit(ref lit) => match lit.node {
9595
// string literal
9696
ast::LitStr(ref s, _) => {
9797
if s.get().char_len() != 4 {

branches/try2/src/librustdoc/clean.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,8 @@ impl Clean<Type> for ast::Ty {
684684
fn clean(&self) -> Type {
685685
use syntax::ast::*;
686686
debug!("cleaning type `{:?}`", self);
687-
let codemap = local_data::get(super::ctxtkey, |x| *x.unwrap()).sess().codemap();
687+
let ctxt = local_data::get(super::ctxtkey, |x| *x.unwrap());
688+
let codemap = ctxt.sess().codemap();
688689
debug!("span corresponds to `{}`", codemap.span_to_str(self.span));
689690
match self.node {
690691
TyNil => Unit,
@@ -866,7 +867,8 @@ pub struct Span {
866867

867868
impl Clean<Span> for syntax::codemap::Span {
868869
fn clean(&self) -> Span {
869-
let cm = local_data::get(super::ctxtkey, |x| *x.unwrap()).sess().codemap();
870+
let ctxt = local_data::get(super::ctxtkey, |x| *x.unwrap());
871+
let cm = ctxt.sess().codemap();
870872
let filename = cm.span_to_filename(*self);
871873
let lo = cm.lookup_char_pos(self.lo);
872874
let hi = cm.lookup_char_pos(self.hi);
@@ -1193,7 +1195,8 @@ trait ToSource {
11931195
impl ToSource for syntax::codemap::Span {
11941196
fn to_src(&self) -> ~str {
11951197
debug!("converting span {:?} to snippet", self.clean());
1196-
let cm = local_data::get(super::ctxtkey, |x| x.unwrap().clone()).sess().codemap().clone();
1198+
let ctxt = local_data::get(super::ctxtkey, |x| x.unwrap().clone());
1199+
let cm = ctxt.sess().codemap().clone();
11971200
let sn = match cm.span_to_snippet(*self) {
11981201
Some(x) => x,
11991202
None => "".to_owned()

0 commit comments

Comments
 (0)