diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-03-22 14:00:15 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-03-22 22:24:35 -0700 |
| commit | 85c9fc6f8f59c146c44aacb4b9abfb2c35e16089 (patch) | |
| tree | 888af920d60f200086d9362c5f8dccd24b928ae9 /src/libsyntax | |
| parent | eba3367404e9ca6abf84199b5c2dbe51ce6cdbde (diff) | |
| download | rust-85c9fc6f8f59c146c44aacb4b9abfb2c35e16089.tar.gz rust-85c9fc6f8f59c146c44aacb4b9abfb2c35e16089.zip | |
librustc: Remove the `const` declaration form everywhere
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/prec.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/token.rs | 76 | ||||
| -rw-r--r-- | src/libsyntax/print/pp.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 6 |
6 files changed, 47 insertions, 47 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index c37d9d1c1c4..bef88e58a17 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -132,8 +132,8 @@ pub struct def_id { node: node_id, } -pub const local_crate: crate_num = 0; -pub const crate_node_id: node_id = 0; +pub static local_crate: crate_num = 0; +pub static crate_node_id: node_id = 0; #[auto_encode] #[auto_decode] diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index 46ded7ecf3d..a69b3e20eb1 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -493,7 +493,7 @@ pub fn core_macros() -> ~str { mod $c { fn key(_x: @::core::condition::Handler<$in,$out>) { } - pub const cond : + pub static cond : ::core::condition::Condition/&static<$in,$out> = ::core::condition::Condition { name: stringify!($c), diff --git a/src/libsyntax/parse/prec.rs b/src/libsyntax/parse/prec.rs index e2a89d2a28c..79adabec9b7 100644 --- a/src/libsyntax/parse/prec.rs +++ b/src/libsyntax/parse/prec.rs @@ -16,13 +16,13 @@ use parse::token::Token; use core::prelude::*; /// Unary operators have higher precedence than binary -pub const unop_prec: uint = 100u; +pub static unop_prec: uint = 100u; /** * Precedence of the `as` operator, which is a binary operator * but is not represented in the precedence table. */ -pub const as_prec: uint = 11u; +pub static as_prec: uint = 11u; /** * Maps a token to a record specifying the corresponding binary diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 8b78087e16f..074bb13e199 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -309,50 +309,50 @@ pub fn is_bar(t: &Token) -> bool { pub mod special_idents { use ast::ident; - pub const underscore : ident = ident { repr: 0u }; - pub const anon : ident = ident { repr: 1u }; - pub const dtor : ident = ident { repr: 2u }; // 'drop', but that's + pub static underscore : ident = ident { repr: 0u }; + pub static anon : ident = ident { repr: 1u }; + pub static dtor : ident = ident { repr: 2u }; // 'drop', but that's // reserved - pub const invalid : ident = ident { repr: 3u }; // '' - pub const unary : ident = ident { repr: 4u }; - pub const not_fn : ident = ident { repr: 5u }; - pub const idx_fn : ident = ident { repr: 6u }; - pub const unary_minus_fn : ident = ident { repr: 7u }; - pub const clownshoes_extensions : ident = ident { repr: 8u }; + pub static invalid : ident = ident { repr: 3u }; // '' + pub static unary : ident = ident { repr: 4u }; + pub static not_fn : ident = ident { repr: 5u }; + pub static idx_fn : ident = ident { repr: 6u }; + pub static unary_minus_fn : ident = ident { repr: 7u }; + pub static clownshoes_extensions : ident = ident { repr: 8u }; - pub const self_ : ident = ident { repr: 9u }; // 'self' + pub static self_ : ident = ident { repr: 9u }; // 'self' /* for matcher NTs */ - pub const item : ident = ident { repr: 10u }; - pub const block : ident = ident { repr: 11u }; - pub const stmt : ident = ident { repr: 12u }; - pub const pat : ident = ident { repr: 13u }; - pub const expr : ident = ident { repr: 14u }; - pub const ty : ident = ident { repr: 15u }; - pub const ident : ident = ident { repr: 16u }; - pub const path : ident = ident { repr: 17u }; - pub const tt : ident = ident { repr: 18u }; - pub const matchers : ident = ident { repr: 19u }; - - pub const str : ident = ident { repr: 20u }; // for the type + pub static item : ident = ident { repr: 10u }; + pub static block : ident = ident { repr: 11u }; + pub static stmt : ident = ident { repr: 12u }; + pub static pat : ident = ident { repr: 13u }; + pub static expr : ident = ident { repr: 14u }; + pub static ty : ident = ident { repr: 15u }; + pub static ident : ident = ident { repr: 16u }; + pub static path : ident = ident { repr: 17u }; + pub static tt : ident = ident { repr: 18u }; + pub static matchers : ident = ident { repr: 19u }; + + pub static str : ident = ident { repr: 20u }; // for the type /* outside of libsyntax */ - pub const ty_visitor : ident = ident { repr: 21u }; - pub const arg : ident = ident { repr: 22u }; - pub const descrim : ident = ident { repr: 23u }; - pub const clownshoe_abi : ident = ident { repr: 24u }; - pub const clownshoe_stack_shim : ident = ident { repr: 25u }; - pub const tydesc : ident = ident { repr: 26u }; - pub const literally_dtor : ident = ident { repr: 27u }; - pub const main : ident = ident { repr: 28u }; - pub const opaque : ident = ident { repr: 29u }; - pub const blk : ident = ident { repr: 30u }; - pub const static : ident = ident { repr: 31u }; - pub const intrinsic : ident = ident { repr: 32u }; - pub const clownshoes_foreign_mod: ident = ident { repr: 33 }; - pub const unnamed_field: ident = ident { repr: 34 }; - pub const c_abi: ident = ident { repr: 35 }; - pub const type_self: ident = ident { repr: 36 }; // `Self` + pub static ty_visitor : ident = ident { repr: 21u }; + pub static arg : ident = ident { repr: 22u }; + pub static descrim : ident = ident { repr: 23u }; + pub static clownshoe_abi : ident = ident { repr: 24u }; + pub static clownshoe_stack_shim : ident = ident { repr: 25u }; + pub static tydesc : ident = ident { repr: 26u }; + pub static literally_dtor : ident = ident { repr: 27u }; + pub static main : ident = ident { repr: 28u }; + pub static opaque : ident = ident { repr: 29u }; + pub static blk : ident = ident { repr: 30u }; + pub static static : ident = ident { repr: 31u }; + pub static intrinsic : ident = ident { repr: 32u }; + pub static clownshoes_foreign_mod: ident = ident { repr: 33 }; + pub static unnamed_field: ident = ident { repr: 34 }; + pub static c_abi: ident = ident { repr: 35 }; + pub static type_self: ident = ident { repr: 36 }; // `Self` } pub struct ident_interner { diff --git a/src/libsyntax/print/pp.rs b/src/libsyntax/print/pp.rs index d0022675473..af9cb7b841e 100644 --- a/src/libsyntax/print/pp.rs +++ b/src/libsyntax/print/pp.rs @@ -139,7 +139,7 @@ pub struct print_stack_elt { pbreak: print_stack_break } -pub const size_infinity: int = 0xffff; +pub static size_infinity: int = 0xffff; pub fn mk_printer(out: @io::Writer, linewidth: uint) -> @mut Printer { // Yes 3, it makes the ring buffers big enough to never diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index ce12e0a7b87..9b061faa2ab 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -92,10 +92,10 @@ pub fn rust_printer(writer: @io::Writer, intr: @ident_interner) -> @ps { }; } -pub const indent_unit: uint = 4u; -pub const match_indent_unit: uint = 2u; +pub static indent_unit: uint = 4u; +pub static match_indent_unit: uint = 2u; -pub const default_columns: uint = 78u; +pub static default_columns: uint = 78u; // Requires you to pass an input filename and reader so that // it can scan the input text for comments and literals to |
