Skip to content

Commit

Permalink
Auto merge of #90754 - matthiaskrgr:rollup-v0483m5, r=matthiaskrgr
Browse files Browse the repository at this point in the history
Rollup of 3 pull requests

Successful merges:

 - #90690 (kmc-solid: Avoid the use of `asm_const`)
 - #90748 (Add a real tracking issue for `CommandExt::groups`)
 - #90751 (Update books)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Nov 10, 2021
2 parents f2f55e8 + e737501 commit 493ea77
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion library/std/src/keyword_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ mod break_keyword {}
/// T` and `*mut T`. More about `const` as used in raw pointers can be read at the Rust docs for the [pointer primitive].
///
/// [pointer primitive]: pointer
/// [Rust Book]: ../book/ch03-01-variables-and-mutability.html#differences-between-variables-and-constants
/// [Rust Book]: ../book/ch03-01-variables-and-mutability.html#constants
/// [Reference]: ../reference/items/constant-items.html
/// [const-eval]: ../reference/const_eval.html
mod const_keyword {}
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/os/unix/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub trait CommandExt: Sealed {

/// Sets the supplementary group IDs for the calling process. Translates to
/// a `setgroups` call in the child process.
#[unstable(feature = "setgroups", issue = "38527", reason = "")]
#[unstable(feature = "setgroups", issue = "90747")]
fn groups(
&mut self,
#[cfg(not(target_os = "vxworks"))] groups: &[u32],
Expand Down
13 changes: 6 additions & 7 deletions library/std/src/sys/solid/abi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@ mod fs;
pub mod sockets;
pub use self::fs::*;

pub const SOLID_BP_PROGRAM_EXITED: usize = 15;
pub const SOLID_BP_CSABORT: usize = 16;

#[inline(always)]
pub fn breakpoint_program_exited(tid: usize) {
unsafe {
match () {
// SOLID_BP_PROGRAM_EXITED = 15
#[cfg(target_arch = "arm")]
() => asm!("bkpt #{}", const SOLID_BP_PROGRAM_EXITED, in("r0") tid),
() => asm!("bkpt #15", in("r0") tid),
#[cfg(target_arch = "aarch64")]
() => asm!("hlt #{}", const SOLID_BP_PROGRAM_EXITED, in("x0") tid),
() => asm!("hlt #15", in("x0") tid),
}
}
}
Expand All @@ -23,10 +21,11 @@ pub fn breakpoint_program_exited(tid: usize) {
pub fn breakpoint_abort() {
unsafe {
match () {
// SOLID_BP_CSABORT = 16
#[cfg(target_arch = "arm")]
() => asm!("bkpt #{}", const SOLID_BP_CSABORT),
() => asm!("bkpt #16"),
#[cfg(target_arch = "aarch64")]
() => asm!("hlt #{}", const SOLID_BP_CSABORT),
() => asm!("hlt #16"),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/doc/book
Submodule book updated 31 files
+1 −78 listings/ch09-error-handling/listing-09-10/Cargo.lock
+1 −2 listings/ch09-error-handling/listing-09-10/Cargo.toml
+0 −0 listings/ch09-error-handling/listing-09-10/output.txt
+2 −52 listings/ch09-error-handling/listing-09-10/src/main.rs
+2 −1 listings/ch09-error-handling/listing-09-11/Cargo.lock
+0 −0 listings/ch09-error-handling/listing-09-11/Cargo.toml
+15 −0 listings/ch09-error-handling/listing-09-11/src/main.rs
+0 −0 listings/ch09-error-handling/listing-09-12/Cargo.lock
+0 −0 listings/ch09-error-handling/listing-09-12/Cargo.toml
+0 −0 listings/ch09-error-handling/listing-09-12/src/main.rs
+83 −0 listings/ch09-error-handling/listing-09-13/Cargo.lock
+7 −0 listings/ch09-error-handling/listing-09-13/Cargo.toml
+55 −0 listings/ch09-error-handling/listing-09-13/src/main.rs
+0 −5 listings/ch09-error-handling/no-listing-06-question-mark-in-main/src/main.rs
+228 −218 nostarch/chapter03.md
+1,042 −0 nostarch/chapter09.md
+1 −1 redirects/const-and-static.md
+20 −18 src/ch02-00-guessing-game-tutorial.md
+58 −65 src/ch03-01-variables-and-mutability.md
+58 −60 src/ch03-02-data-types.md
+34 −35 src/ch03-03-how-functions-work.md
+3 −3 src/ch03-04-comments.md
+63 −66 src/ch03-05-control-flow.md
+103 −26 src/ch09-02-recoverable-errors-with-result.md
+3 −3 src/ch09-03-to-panic-or-not-to-panic.md
+1 −1 src/ch11-01-writing-tests.md
+1 −1 src/ch12-03-improving-error-handling-and-modularity.md
+1 −1 src/ch17-03-oo-design-patterns.md
+1 −1 src/ch19-01-unsafe-rust.md
+1 −1 src/ch19-06-macros.md
+1 −1 tools/convert-quotes.sh
2 changes: 1 addition & 1 deletion src/doc/edition-guide
2 changes: 1 addition & 1 deletion src/doc/nomicon
2 changes: 1 addition & 1 deletion src/doc/rust-by-example

0 comments on commit 493ea77

Please sign in to comment.