Skip to content

Commit eeadecc

Browse files
committed
---
yaml --- r: 189823 b: refs/heads/tmp c: d71239f h: refs/heads/master i: 189821: 1d265a8 189819: 2e7ad57 189815: f625603 189807: 65c52a9 189791: 5b94e60 189759: e1c86c8 189695: e52c1fb v: v3
1 parent afde360 commit eeadecc

File tree

4 files changed

+930
-350
lines changed

4 files changed

+930
-350
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 522d09dfecbeca1595f25ac58c6d0178bbd21d7d
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: 45c397d738ac9cbf3d0ea2233142023ca148c893
37+
refs/heads/tmp: d71239f628f0338d042a7f2cd6f5909025cb0509
3838
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3939
refs/tags/homu-tmp: 7ce5a21b274ff53e77b561467177bc34c668f95e

branches/tmp/src/doc/trpl/plugins.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ that implements Roman numeral integer literals.
6363

6464
```ignore
6565
#![crate_type="dylib"]
66-
#![feature(plugin_registrar)]
66+
#![feature(plugin_registrar, rustc_private)]
6767
6868
extern crate syntax;
6969
extern crate rustc;
@@ -92,13 +92,13 @@ fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
9292
}
9393
};
9494
95-
let mut text = &text;
95+
let mut text = &*text;
9696
let mut total = 0;
9797
while !text.is_empty() {
9898
match NUMERALS.iter().find(|&&(rn, _)| text.starts_with(rn)) {
9999
Some(&(rn, val)) => {
100100
total += val;
101-
text = text.slice_from(rn.len());
101+
text = &text[rn.len()..];
102102
}
103103
None => {
104104
cx.span_err(sp, "invalid Roman numeral");
@@ -107,7 +107,7 @@ fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
107107
}
108108
}
109109
110-
MacEager::expr(cx.expr_usize(sp, total))
110+
MacEager::expr(cx.expr_u32(sp, total))
111111
}
112112
113113
#[plugin_registrar]

0 commit comments

Comments
 (0)