Skip to content

Commit facdb86

Browse files
committed
Re-enable test
1 parent ec592a9 commit facdb86

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

src/librustc/middle/astencode.rs

+14-13
Original file line numberDiff line numberDiff line change
@@ -1835,29 +1835,31 @@ fn decode_item_ast(par_doc: rbml::Doc) -> ast::Item {
18351835
}
18361836

18371837
#[cfg(test)]
1838-
trait fake_ext_ctxt {
1838+
trait FakeExtCtxt {
1839+
fn call_site(&self) -> codemap::Span;
18391840
fn cfg(&self) -> ast::CrateConfig;
1840-
fn parse_sess<'a>(&'a self) -> &'a parse::ParseSess;
1841-
fn call_site(&self) -> Span;
18421841
fn ident_of(&self, st: &str) -> ast::Ident;
1842+
fn name_of(&self, st: &str) -> ast::Name;
1843+
fn parse_sess(&self) -> &parse::ParseSess;
18431844
}
18441845

18451846
#[cfg(test)]
1846-
impl fake_ext_ctxt for parse::ParseSess {
1847-
fn cfg(&self) -> ast::CrateConfig {
1848-
Vec::new()
1849-
}
1850-
fn parse_sess<'a>(&'a self) -> &'a parse::ParseSess { self }
1851-
fn call_site(&self) -> Span {
1847+
impl FakeExtCtxt for parse::ParseSess {
1848+
fn call_site(&self) -> codemap::Span {
18521849
codemap::Span {
18531850
lo: codemap::BytePos(0),
18541851
hi: codemap::BytePos(0),
1855-
expn_id: codemap::NO_EXPANSION
1852+
expn_id: codemap::NO_EXPANSION,
18561853
}
18571854
}
1855+
fn cfg(&self) -> ast::CrateConfig { Vec::new() }
18581856
fn ident_of(&self, st: &str) -> ast::Ident {
1859-
token::str_to_ident(st)
1857+
parse::token::str_to_ident(st)
1858+
}
1859+
fn name_of(&self, st: &str) -> ast::Name {
1860+
parse::token::intern(st)
18601861
}
1862+
fn parse_sess(&self) -> &parse::ParseSess { self }
18611863
}
18621864

18631865
#[cfg(test)]
@@ -1883,15 +1885,14 @@ fn test_basic() {
18831885
fn foo() {}
18841886
));
18851887
}
1886-
/* NOTE: When there's a snapshot, update this (yay quasiquoter!)
1888+
18871889
#[test]
18881890
fn test_smalltalk() {
18891891
let cx = mk_ctxt();
18901892
roundtrip(quote_item!(&cx,
18911893
fn foo() -> isize { 3 + 4 } // first smalltalk program ever executed.
18921894
));
18931895
}
1894-
*/
18951896

18961897
#[test]
18971898
fn test_more() {

0 commit comments

Comments
 (0)