Skip to content

Commit 5fc5b04

Browse files
nikomatsakisflaper87
authored andcommitted
---
yaml --- r: 112428 b: refs/heads/try c: 6fa1f48 h: refs/heads/master v: v3
1 parent a4f2937 commit 5fc5b04

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
@@ -2,7 +2,7 @@
22
refs/heads/master: a72a6ec897e1b8d7e125be9bb4b60d89c79aa4c0
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: b5dd3f05fe95168b5569d0f519636149479eb6ac
5-
refs/heads/try: 2e358672f8aba3d844df4c744199ace4a309f707
5+
refs/heads/try: 6fa1f48237bc61cabcb63f75700ad7303f152c1f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/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/try/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)