Skip to content

Commit

Permalink
Activate checking code for ASM feature gate. Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoTestard committed Oct 22, 2013
1 parent ece5028 commit c4bcf77
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 8 deletions.
7 changes: 2 additions & 5 deletions src/librustc/front/feature_gate.rs
Expand Up @@ -124,11 +124,8 @@ impl Visitor<()> for Context {
}

else if path.segments.last().identifier == self.sess.ident_of("asm") {
// NOTE: remove the false once the ASM feature is in the next snapshot
if false {
self.gate_feature("asm", path.span, "inline assembly is not \
stable enough for use and is subject to change");
}
self.gate_feature("asm", path.span, "inline assembly is not \
stable enough for use and is subject to change");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/libstd/std.rs
Expand Up @@ -61,7 +61,7 @@ they contained the following prologue:
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://static.rust-lang.org/doc/master")];

#[feature(macro_rules, globs)];
#[feature(macro_rules, globs, asm)];

// Don't link to std. We are std.
#[no_std];
Expand Down
2 changes: 0 additions & 2 deletions src/test/compile-fail/asm-gated.rs
Expand Up @@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// xfail-test

fn main() {
unsafe {
asm!(""); //~ ERROR inline assembly is not stable enough
Expand Down
3 changes: 3 additions & 0 deletions src/test/compile-fail/asm-in-bad-modifier.rs
Expand Up @@ -8,6 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// xfail-fast #[feature] doesn't work with check-fast
#[feature(asm)];

fn foo(x: int) { info2!("{}", x); }

#[cfg(target_arch = "x86")]
Expand Down
3 changes: 3 additions & 0 deletions src/test/compile-fail/asm-out-assign-imm.rs
Expand Up @@ -8,6 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// xfail-fast #[feature] doesn't work with check-fast
#[feature(asm)];

fn foo(x: int) { info2!("{}", x); }

#[cfg(target_arch = "x86")]
Expand Down
3 changes: 3 additions & 0 deletions src/test/compile-fail/asm-out-no-modifier.rs
Expand Up @@ -8,6 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// xfail-fast #[feature] doesn't work with check-fast
#[feature(asm)];

fn foo(x: int) { info2!("{}", x); }

#[cfg(target_arch = "x86")]
Expand Down
3 changes: 3 additions & 0 deletions src/test/compile-fail/asm-out-read-uninit.rs
Expand Up @@ -8,6 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// xfail-fast #[feature] doesn't work with check-fast
#[feature(asm)];

fn foo(x: int) { info2!("{}", x); }

#[cfg(target_arch = "x86")]
Expand Down
3 changes: 3 additions & 0 deletions src/test/pretty/raw-str-nonexpr.rs
Expand Up @@ -8,8 +8,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// xfail-fast #[feature] doesn't work with check-fast
// pp-exact

#[feature(asm)];

#[cfg = r#"just parse this"#]
extern mod blah = r##"blah"##;

Expand Down
3 changes: 3 additions & 0 deletions src/test/run-pass/asm-out-assign.rs
Expand Up @@ -8,6 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// xfail-fast #[feature] doesn't work with check-fast
#[feature(asm)];

#[cfg(target_arch = "x86")]
#[cfg(target_arch = "x86_64")]
pub fn main() {
Expand Down

5 comments on commit c4bcf77

@bors
Copy link
Contributor

@bors bors commented on c4bcf77 Oct 22, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from huonw
at LeoTestard@c4bcf77

@bors
Copy link
Contributor

@bors bors commented on c4bcf77 Oct 22, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging LeoTestard/rust/asm-feature-gated = c4bcf77 into auto

@bors
Copy link
Contributor

@bors bors commented on c4bcf77 Oct 22, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LeoTestard/rust/asm-feature-gated = c4bcf77 merged ok, testing candidate = 15a6bde

@bors
Copy link
Contributor

@bors bors commented on c4bcf77 Oct 22, 2013

@bors
Copy link
Contributor

@bors bors commented on c4bcf77 Oct 22, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 15a6bde

Please sign in to comment.