Skip to content

Activate checking code for ASM feature gate. Fix tests #10009

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 22, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/librustc/front/feature_gate.rs
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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