Skip to content

Commit 1006811

Browse files
committed
---
yaml --- r: 47213 b: refs/heads/try c: 5b9e110 h: refs/heads/master i: 47211: 600a393 v: v3
1 parent d2b78e3 commit 1006811

File tree

16 files changed

+43
-37
lines changed

16 files changed

+43
-37
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: 3bbcac322669cff3abde5be937cc4ec3860f3985
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d9689399d091c3265f00434a69c551a61c28dc
5-
refs/heads/try: 4bf94a7b30eeebd820a341890f05e5b709a6d2f2
5+
refs/heads/try: 5b9e110eab9c30428e99995a0adbec82857e3a1a
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/etc/emacs/rust-mode.el

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,22 @@
6666
"trait" "struct" "fn" "enum"
6767
"impl"))
6868
(puthash word 'def table))
69-
(dolist (word '("as" "break"
70-
"copy" "do" "drop" "else"
71-
"extern" "for" "if" "let" "log"
72-
"loop" "once" "priv" "pub" "pure"
73-
"ref" "return" "static" "unsafe" "use"
74-
"while" "while"
75-
"assert"
76-
"mut"))
69+
(dolist (word '("again" "assert"
70+
"break"
71+
"copy"
72+
"do" "drop"
73+
"else" "export" "extern"
74+
"fail" "for"
75+
"if" "use"
76+
"let" "log" "loop"
77+
"move" "new"
78+
"pure" "pub" "priv"
79+
"ref" "return" "static"
80+
"unchecked" "unsafe"
81+
"while"))
7782
(puthash word t table))
7883
(puthash "match" 'alt table)
79-
(dolist (word '("self" "true" "false")) (puthash word 'atom table))
84+
(dolist (word '("true" "false")) (puthash word 'atom table))
8085
table))
8186
;; FIXME type-context keywords
8287

branches/try/src/librustc/driver/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ pub mod test {
358358
pub fn make_crate_type_attr(+t: ~str) -> ast::attribute {
359359
codemap::respan(codemap::dummy_sp(), ast::attribute_ {
360360
style: ast::attr_outer,
361-
value: codemap::respan(codemap::dummy_sp(),
361+
value: @codemap::respan(codemap::dummy_sp(),
362362
ast::meta_name_value(
363363
@~"crate_type",
364364
codemap::respan(codemap::dummy_sp(),

branches/try/src/librustc/front/core_inject.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn inject_libcore_ref(sess: Session,
5050
attrs: ~[
5151
spanned(ast::attribute_ {
5252
style: ast::attr_inner,
53-
value: spanned(ast::meta_name_value(
53+
value: @spanned(ast::meta_name_value(
5454
@~"vers",
5555
spanned(ast::lit_str(@CORE_VERSION.to_str()))
5656
)),

branches/try/src/librustc/metadata/decoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ fn get_attributes(md: ebml::Doc) -> ~[ast::attribute] {
994994
codemap::spanned {
995995
node: ast::attribute_ {
996996
style: ast::attr_outer,
997-
value: /*bad*/copy *meta_item,
997+
value: meta_item,
998998
is_sugared_doc: false,
999999
},
10001000
span: codemap::dummy_sp()

branches/try/src/librustc/metadata/encoder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@ fn write_int(writer: io::Writer, &&n: int) {
10201020
writer.write_be_u32(n as u32);
10211021
}
10221022
1023-
fn encode_meta_item(ebml_w: writer::Encoder, mi: meta_item) {
1023+
fn encode_meta_item(ebml_w: writer::Encoder, mi: @meta_item) {
10241024
match mi.node {
10251025
meta_word(name) => {
10261026
ebml_w.start_tag(tag_meta_item_word);
@@ -1050,7 +1050,7 @@ fn encode_meta_item(ebml_w: writer::Encoder, mi: meta_item) {
10501050
ebml_w.writer.write(str::to_bytes(*name));
10511051
ebml_w.end_tag();
10521052
for items.each |inner_item| {
1053-
encode_meta_item(ebml_w, **inner_item);
1053+
encode_meta_item(ebml_w, *inner_item);
10541054
}
10551055
ebml_w.end_tag();
10561056
}

branches/try/src/librustc/middle/lang_items.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ struct LanguageItemCollector {
316316

317317
impl LanguageItemCollector {
318318
fn match_and_collect_meta_item(&self, item_def_id: def_id,
319-
meta_item: meta_item) {
319+
meta_item: @meta_item) {
320320
match meta_item.node {
321321
meta_name_value(key, literal) => {
322322
match literal.node {
@@ -368,10 +368,10 @@ impl LanguageItemCollector {
368368
visit_item: |item| {
369369
for item.attrs.each |attribute| {
370370
unsafe {
371-
(*this).match_and_collect_meta_item(local_def(item
372-
.id),
373-
attribute.node
374-
.value);
371+
(*this).match_and_collect_meta_item(
372+
local_def(item.id),
373+
attribute.node.value
374+
);
375375
}
376376
}
377377
},

branches/try/src/libsyntax/ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ pub enum attr_style { attr_outer, attr_inner, }
11421142
#[deriving_eq]
11431143
pub struct attribute_ {
11441144
style: attr_style,
1145-
value: meta_item,
1145+
value: @meta_item,
11461146
is_sugared_doc: bool,
11471147
}
11481148

branches/try/src/libsyntax/attr.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,17 @@ pub fn mk_word_item(name: @~str) -> @ast::meta_item {
5151

5252
pub fn mk_attr(item: @ast::meta_item) -> ast::attribute {
5353
dummy_spanned(ast::attribute_ { style: ast::attr_inner,
54-
value: *item,
54+
value: item,
5555
is_sugared_doc: false })
5656
}
5757

58-
pub fn mk_sugared_doc_attr(text: ~str,
58+
pub fn mk_sugared_doc_attr(+text: ~str,
5959
+lo: BytePos, +hi: BytePos) -> ast::attribute {
60+
let style = doc_comment_style(text);
6061
let lit = spanned(lo, hi, ast::lit_str(@text));
6162
let attr = ast::attribute_ {
62-
style: doc_comment_style(text),
63-
value: spanned(lo, hi, ast::meta_name_value(@~"doc", lit)),
63+
style: style,
64+
value: @spanned(lo, hi, ast::meta_name_value(@~"doc", lit)),
6465
is_sugared_doc: true
6566
};
6667
spanned(lo, hi, attr)
@@ -69,7 +70,7 @@ pub fn mk_sugared_doc_attr(text: ~str,
6970
/* Conversion */
7071

7172
pub fn attr_meta(attr: ast::attribute) -> @ast::meta_item {
72-
@attr.node.value
73+
attr.node.value
7374
}
7475

7576
// Get the meta_items from inside a vector of attributes
@@ -79,7 +80,7 @@ pub fn attr_metas(attrs: ~[ast::attribute]) -> ~[@ast::meta_item] {
7980

8081
pub fn desugar_doc_attr(attr: &ast::attribute) -> ast::attribute {
8182
if attr.node.is_sugared_doc {
82-
let comment = get_meta_item_value_str(@attr.node.value).get();
83+
let comment = get_meta_item_value_str(attr.node.value).get();
8384
let meta = mk_name_value_item_str(@~"doc",
8485
@strip_doc_comment_decoration(*comment));
8586
mk_attr(meta)
@@ -91,7 +92,7 @@ pub fn desugar_doc_attr(attr: &ast::attribute) -> ast::attribute {
9192
/* Accessors */
9293

9394
pub pure fn get_attr_name(attr: &ast::attribute) -> @~str {
94-
get_meta_item_name(@attr.node.value)
95+
get_meta_item_name(attr.node.value)
9596
}
9697

9798
pub pure fn get_meta_item_name(meta: @ast::meta_item) -> @~str {

branches/try/src/libsyntax/ext/auto_encode.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ mod syntax {
110110
pub fn expand_auto_encode(
111111
cx: ext_ctxt,
112112
span: span,
113-
_mitem: ast::meta_item,
113+
_mitem: @ast::meta_item,
114114
in_items: ~[@ast::item]
115115
) -> ~[@ast::item] {
116116
fn is_auto_encode(a: &ast::attribute) -> bool {
@@ -165,7 +165,7 @@ pub fn expand_auto_encode(
165165
pub fn expand_auto_decode(
166166
cx: ext_ctxt,
167167
span: span,
168-
_mitem: ast::meta_item,
168+
_mitem: @ast::meta_item,
169169
in_items: ~[@ast::item]
170170
) -> ~[@ast::item] {
171171
fn is_auto_decode(a: &ast::attribute) -> bool {

branches/try/src/libsyntax/ext/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub struct MacroDef {
3838
}
3939

4040
pub type ItemDecorator =
41-
fn@(ext_ctxt, span, ast::meta_item, ~[@ast::item]) -> ~[@ast::item];
41+
fn@(ext_ctxt, span, @ast::meta_item, ~[@ast::item]) -> ~[@ast::item];
4242

4343
pub struct SyntaxExpanderTT {
4444
expander: SyntaxExpanderTTFun,

branches/try/src/libsyntax/ext/deriving.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ type ExpandDerivingEnumDefFn = &fn(ext_ctxt,
5858

5959
pub fn expand_deriving_eq(cx: ext_ctxt,
6060
span: span,
61-
_mitem: meta_item,
61+
_mitem: @meta_item,
6262
in_items: ~[@item])
6363
-> ~[@item] {
6464
expand_deriving(cx,
@@ -70,7 +70,7 @@ pub fn expand_deriving_eq(cx: ext_ctxt,
7070

7171
pub fn expand_deriving_iter_bytes(cx: ext_ctxt,
7272
span: span,
73-
_mitem: meta_item,
73+
_mitem: @meta_item,
7474
in_items: ~[@item])
7575
-> ~[@item] {
7676
expand_deriving(cx,

branches/try/src/libsyntax/ext/pipes/ast_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ pub impl ext_ctxt_ast_builder for ext_ctxt {
227227
// Rust coding conventions
228228
let non_camel_case_attribute = respan(dummy_sp(), ast::attribute_ {
229229
style: ast::attr_outer,
230-
value: respan(dummy_sp(),
230+
value: @respan(dummy_sp(),
231231
ast::meta_list(@~"allow", ~[
232232
@respan(dummy_sp(),
233233
ast::meta_word(

branches/try/src/libsyntax/fold.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ fn fold_attribute_(at: attribute, fld: ast_fold) -> attribute {
9898
spanned {
9999
node: ast::attribute_ {
100100
style: at.node.style,
101-
value: *fold_meta_item_(@at.node.value, fld),
101+
value: fold_meta_item_(at.node.value, fld),
102102
is_sugared_doc: at.node.is_sugared_doc,
103103
},
104104
span: fld.new_span(at.span),

branches/try/src/libsyntax/parse/attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl parser_attr for Parser {
7272
self.expect(token::RBRACKET);
7373
let mut hi = self.span.hi;
7474
return spanned(lo, hi, ast::attribute_ { style: style,
75-
value: *meta_item,
75+
value: meta_item,
7676
is_sugared_doc: false });
7777
}
7878

branches/try/src/libsyntax/print/pprust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ pub fn print_attribute(s: @ps, attr: ast::attribute) {
904904
word(s.s, *comment);
905905
} else {
906906
word(s.s, ~"#[");
907-
print_meta_item(s, @attr.node.value);
907+
print_meta_item(s, attr.node.value);
908908
word(s.s, ~"]");
909909
}
910910
}

0 commit comments

Comments
 (0)