about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-08-11 21:30:07 +0000
committerbors <bors@rust-lang.org>2022-08-11 21:30:07 +0000
commit2ed0f29168f5bc116e747152be600519b5d78bfd (patch)
treec90db3ddda1c65dc26527c7d60fc06f6f94040d2 /library/std/src
parent20ffea6938b5839c390252e07940b99e3b6a889a (diff)
parentc7578b4e65df9ede839fe94063e09961b82e6ade (diff)
downloadrust-2ed0f29168f5bc116e747152be600519b5d78bfd.tar.gz
rust-2ed0f29168f5bc116e747152be600519b5d78bfd.zip
Auto merge of #100426 - matthiaskrgr:rollup-0ks4dou, r=matthiaskrgr
Rollup of 13 pull requests

Successful merges:

 - #93896 (rustdoc: make item-infos dimmer on dark theme)
 - #99337 (rustdoc: simplify highlight.rs)
 - #99421 (add crt-static for android)
 - #99500 (Fix flags when using clang as linker for Fuchsia)
 - #99511 (make raw_eq precondition more restrictive)
 - #99992 (Add `x.sh` and `x.ps1` shell scripts)
 - #100112 (Fix test: chunks_mut_are_send_and_sync)
 - #100203 (provide correct size hint for unsupported platform `CommandArgs`)
 - #100307 (Fix #96847)
 - #100350 (Stringify non-shorthand visibility correctly)
 - #100374 (Improve crate selection on rustdoc search results page)
 - #100392 (Simplify visitors)
 - #100418 (Add stability attributes to BacktraceStatus variants)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/backtrace.rs3
-rw-r--r--library/std/src/lib.rs1
-rw-r--r--library/std/src/sys/unix/mod.rs6
-rw-r--r--library/std/src/sys/unsupported/process.rs3
4 files changed, 11 insertions, 2 deletions
diff --git a/library/std/src/backtrace.rs b/library/std/src/backtrace.rs
index b91db03a3d5..5cf6ec81789 100644
--- a/library/std/src/backtrace.rs
+++ b/library/std/src/backtrace.rs
@@ -118,12 +118,15 @@ pub struct Backtrace {
 pub enum BacktraceStatus {
     /// Capturing a backtrace is not supported, likely because it's not
     /// implemented for the current platform.
+    #[stable(feature = "backtrace", since = "1.65.0")]
     Unsupported,
     /// Capturing a backtrace has been disabled through either the
     /// `RUST_LIB_BACKTRACE` or `RUST_BACKTRACE` environment variables.
+    #[stable(feature = "backtrace", since = "1.65.0")]
     Disabled,
     /// A backtrace has been captured and the `Backtrace` should print
     /// reasonable information when rendered.
+    #[stable(feature = "backtrace", since = "1.65.0")]
     Captured,
 }
 
diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs
index 6b0c0ad7c21..ebe0ccbdc0b 100644
--- a/library/std/src/lib.rs
+++ b/library/std/src/lib.rs
@@ -246,6 +246,7 @@
 #![cfg_attr(bootstrap, feature(let_chains))]
 #![feature(let_else)]
 #![feature(linkage)]
+#![feature(link_cfg)]
 #![feature(min_specialization)]
 #![feature(must_not_suspend)]
 #![feature(needs_panic_runtime)]
diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs
index 3d0d91460f7..3a375093099 100644
--- a/library/std/src/sys/unix/mod.rs
+++ b/library/std/src/sys/unix/mod.rs
@@ -295,8 +295,10 @@ pub fn abort_internal() -> ! {
 
 cfg_if::cfg_if! {
     if #[cfg(target_os = "android")] {
-        #[link(name = "dl")]
-        #[link(name = "log")]
+        #[link(name = "dl", kind = "static", modifiers = "-bundle",
+            cfg(target_feature = "crt-static"))]
+        #[link(name = "dl", cfg(not(target_feature = "crt-static")))]
+        #[link(name = "log", cfg(not(target_feature = "crt-static")))]
         extern "C" {}
     } else if #[cfg(target_os = "freebsd")] {
         #[link(name = "execinfo")]
diff --git a/library/std/src/sys/unsupported/process.rs b/library/std/src/sys/unsupported/process.rs
index 42a1ff730e3..633f17c054b 100644
--- a/library/std/src/sys/unsupported/process.rs
+++ b/library/std/src/sys/unsupported/process.rs
@@ -200,6 +200,9 @@ impl<'a> Iterator for CommandArgs<'a> {
     fn next(&mut self) -> Option<&'a OsStr> {
         None
     }
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        (0, Some(0))
+    }
 }
 
 impl<'a> ExactSizeIterator for CommandArgs<'a> {}