Rollup merge of #133726 - joshtriplett:breakpoint, r=oli-obk
Add `core::arch::breakpoint` and test Approved in [ACP 491](https://github.com/rust-lang/libs-team/issues/491).
This commit is contained in:
@@ -7,10 +7,11 @@ Erroneous code example:
|
||||
#![allow(internal_features)]
|
||||
|
||||
extern "rust-intrinsic" {
|
||||
pub static breakpoint: fn(); // error: intrinsic must be a function
|
||||
pub static atomic_singlethreadfence_seqcst: fn();
|
||||
// error: intrinsic must be a function
|
||||
}
|
||||
|
||||
fn main() { unsafe { breakpoint(); } }
|
||||
fn main() { unsafe { atomic_singlethreadfence_seqcst(); } }
|
||||
```
|
||||
|
||||
An intrinsic is a function available for use in a given programming language
|
||||
@@ -22,8 +23,8 @@ error, just declare a function. Example:
|
||||
#![allow(internal_features)]
|
||||
|
||||
extern "rust-intrinsic" {
|
||||
pub fn breakpoint(); // ok!
|
||||
pub fn atomic_singlethreadfence_seqcst(); // ok!
|
||||
}
|
||||
|
||||
fn main() { unsafe { breakpoint(); } }
|
||||
fn main() { unsafe { atomic_singlethreadfence_seqcst(); } }
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user