about summary refs log tree commit diff
path: root/src/comp/syntax
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-11-09 16:04:07 -0800
committerBrian Anderson <banderson@mozilla.com>2011-11-09 16:47:44 -0800
commitd26a96d2bbf78dcb4b5b43bf95137731ad0db286 (patch)
tree36e66273be4a5e4f8f05e6731ee4c961d8ad85fb /src/comp/syntax
parente96342820d0075099d5e3bdf5689c64ad6625a45 (diff)
downloadrust-d26a96d2bbf78dcb4b5b43bf95137731ad0db286.tar.gz
rust-d26a96d2bbf78dcb4b5b43bf95137731ad0db286.zip
Add "cdecl" as synonym for "c-stack-cdecl"
Diffstat (limited to 'src/comp/syntax')
-rw-r--r--src/comp/syntax/parse/parser.rs2
-rw-r--r--src/comp/syntax/print/pprust.rs2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 693625955f1..5ca1e46aaed 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -2010,6 +2010,8 @@ fn parse_item_native_mod(p: parser, attrs: [ast::attribute]) -> @ast::item {
             abi = ast::native_abi_rust_intrinsic;
         } else if str::eq(t, "c-stack-cdecl") {
             abi = ast::native_abi_cdecl;
+        } else if str::eq(t, "cdecl") {
+            abi = ast::native_abi_cdecl;
         } else if str::eq(t, "c-stack-stdcall") {
             abi = ast::native_abi_stdcall;
         } else if str::eq(t, "stdcall") {
diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs
index f10d4f47516..4570b56cba9 100644
--- a/src/comp/syntax/print/pprust.rs
+++ b/src/comp/syntax/print/pprust.rs
@@ -405,7 +405,7 @@ fn print_item(s: ps, &&item: @ast::item) {
             word_nbsp(s, "\"rust-intrinsic\"");
           }
           ast::native_abi_cdecl. {
-            word_nbsp(s, "\"c-stack-cdecl\"");
+            word_nbsp(s, "\"cdecl\"");
           }
           ast::native_abi_stdcall. {
             word_nbsp(s, "\"stdcall\"");