Skip to content

Commit

Permalink
Add tests to make sure intrinsicck doesn't apply to non-intrinsic fn's.
Browse files Browse the repository at this point in the history
  • Loading branch information
luqmana committed Aug 25, 2014
1 parent 6ad0346 commit 395ef8b
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/test/auxiliary/issue-15562.rs
@@ -0,0 +1,15 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![crate_type = "lib"]

extern {
pub fn transmute();
}
29 changes: 29 additions & 0 deletions src/test/run-pass/issue-15562.rs
@@ -0,0 +1,29 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// aux-build:issue-15562.rs

extern crate i = "issue-15562";

pub fn main() {
extern {
fn transmute();
}
unsafe {
transmute();
i::transmute();
}
}

// We declare this so we don't run into unresolved symbol errors
// The above extern is NOT `extern "rust-intrinsic"` and thus
// means it'll try to find a corresponding symbol to link to.
#[no_mangle]
pub extern fn transmute() {}

13 comments on commit 395ef8b

@bors
Copy link
Contributor

@bors bors commented on 395ef8b Aug 26, 2014

Choose a reason for hiding this comment

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

saw approval from alexcrichton
at luqmana@395ef8b

@bors
Copy link
Contributor

@bors bors commented on 395ef8b Aug 26, 2014

Choose a reason for hiding this comment

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

merging luqmana/rust/tr = 395ef8b into auto

@bors
Copy link
Contributor

@bors bors commented on 395ef8b Aug 26, 2014

Choose a reason for hiding this comment

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

luqmana/rust/tr = 395ef8b merged ok, testing candidate = 959954d4

@bors
Copy link
Contributor

@bors bors commented on 395ef8b Aug 26, 2014

Choose a reason for hiding this comment

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

@bors
Copy link
Contributor

@bors bors commented on 395ef8b Aug 26, 2014

Choose a reason for hiding this comment

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

saw approval from alexcrichton
at luqmana@395ef8b

@bors
Copy link
Contributor

@bors bors commented on 395ef8b Aug 26, 2014

Choose a reason for hiding this comment

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

merging luqmana/rust/tr = 395ef8b into auto

@bors
Copy link
Contributor

@bors bors commented on 395ef8b Aug 26, 2014

Choose a reason for hiding this comment

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

luqmana/rust/tr = 395ef8b merged ok, testing candidate = 06282da5

@bors
Copy link
Contributor

@bors bors commented on 395ef8b Aug 27, 2014

Choose a reason for hiding this comment

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

saw approval from alexcrichton
at luqmana@395ef8b

@bors
Copy link
Contributor

@bors bors commented on 395ef8b Aug 27, 2014

Choose a reason for hiding this comment

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

merging luqmana/rust/tr = 395ef8b into auto

@bors
Copy link
Contributor

@bors bors commented on 395ef8b Aug 27, 2014

Choose a reason for hiding this comment

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

luqmana/rust/tr = 395ef8b merged ok, testing candidate = c73ab0c

@bors
Copy link
Contributor

@bors bors commented on 395ef8b Aug 27, 2014

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 = c73ab0c

Please sign in to comment.