Skip to content

Commit 184c8a9

Browse files
committed
Use ast::AsmDialect's variants qualified, and drop the pointless prefix.
1 parent 22fa1aa commit 184c8a9

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/librustc_front/print/pprust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1539,7 +1539,7 @@ impl<'a> State<'a> {
15391539
if a.alignstack {
15401540
options.push("alignstack");
15411541
}
1542-
if a.dialect == ast::AsmDialect::AsmIntel {
1542+
if a.dialect == ast::AsmDialect::Intel {
15431543
options.push("intel");
15441544
}
15451545

src/librustc_trans/trans/asm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ pub fn trans_inline_asm<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, ia: &ast::InlineAsm)
106106
};
107107

108108
let dialect = match ia.dialect {
109-
AsmDialect::AsmAtt => llvm::AD_ATT,
110-
AsmDialect::AsmIntel => llvm::AD_Intel
109+
AsmDialect::Att => llvm::AD_ATT,
110+
AsmDialect::Intel => llvm::AD_Intel
111111
};
112112

113113
let asm = CString::new(ia.asm.as_bytes()).unwrap();

src/libsyntax/ast.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
// The Rust abstract syntax tree.
1212

13-
pub use self::AsmDialect::*;
1413
pub use self::AttrStyle::*;
1514
pub use self::BindingMode::*;
1615
pub use self::BinOp_::*;
@@ -1440,8 +1439,8 @@ pub enum Ty_ {
14401439

14411440
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
14421441
pub enum AsmDialect {
1443-
AsmAtt,
1444-
AsmIntel
1442+
Att,
1443+
Intel,
14451444
}
14461445

14471446
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]

src/libsyntax/ext/asm.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use feature_gate;
2222
use parse::token::{intern, InternedString};
2323
use parse::token;
2424
use ptr::P;
25+
use syntax::ast::AsmDialect;
2526

2627
enum State {
2728
Asm,
@@ -65,7 +66,7 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
6566
let mut clobs = Vec::new();
6667
let mut volatile = false;
6768
let mut alignstack = false;
68-
let mut dialect = ast::AsmAtt;
69+
let mut dialect = AsmDialect::Att;
6970

7071
let mut state = Asm;
7172

@@ -178,7 +179,7 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
178179
} else if option == "alignstack" {
179180
alignstack = true;
180181
} else if option == "intel" {
181-
dialect = ast::AsmIntel;
182+
dialect = AsmDialect::Intel;
182183
} else {
183184
cx.span_warn(p.last_span, "unrecognized option");
184185
}

src/libsyntax/print/pprust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2209,7 +2209,7 @@ impl<'a> State<'a> {
22092209
if a.alignstack {
22102210
options.push("alignstack");
22112211
}
2212-
if a.dialect == ast::AsmDialect::AsmIntel {
2212+
if a.dialect == ast::AsmDialect::Intel {
22132213
options.push("intel");
22142214
}
22152215

0 commit comments

Comments
 (0)