Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package teleport for openSUSE:Factory 
checked in at 2024-09-29 18:10:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/teleport (Old)
 and      /work/SRC/openSUSE:Factory/.teleport.new.29891 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "teleport"

Sun Sep 29 18:10:19 2024 rev:117 rq:1204248 version:16.4.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/teleport/teleport.changes        2024-09-26 
18:55:01.893421442 +0200
+++ /work/SRC/openSUSE:Factory/.teleport.new.29891/teleport.changes     
2024-09-29 18:11:11.326996302 +0200
@@ -1,0 +2,13 @@
+Fri Sep 27 20:35:28 UTC 2024 - Johannes Kastl 
<opensuse_buildserv...@ojkastl.de>
+
+- update to 16.4.2:
+  * Fixed a panic when using the self-hosted PagerDuty plugin.
+    #46925
+  * A user joining a session will now see available controls for
+    terminating & leaving the session. #46901
+  * Fixed a regression in the SAML IdP service which prevented
+    cache from initializing in a cluster that may have a service
+    provider configured with unsupported acs_url and relay_state
+    values. #46845
+
+-------------------------------------------------------------------

Old:
----
  teleport-16.4.1.obscpio

New:
----
  teleport-16.4.2.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ teleport.spec ++++++
--- /var/tmp/diff_new_pack.pMaEsF/_old  2024-09-29 18:11:14.039108351 +0200
+++ /var/tmp/diff_new_pack.pMaEsF/_new  2024-09-29 18:11:14.043108517 +0200
@@ -19,7 +19,7 @@
 %define __arch_install_post export NO_BRP_STRIP_DEBUG=true
 
 Name:           teleport
-Version:        16.4.1
+Version:        16.4.2
 Release:        0
 Summary:        Identity-aware, multi-protocol access proxy
 License:        AGPL-3.0-only

++++++ _service ++++++
--- /var/tmp/diff_new_pack.pMaEsF/_old  2024-09-29 18:11:14.087110334 +0200
+++ /var/tmp/diff_new_pack.pMaEsF/_new  2024-09-29 18:11:14.091110500 +0200
@@ -4,7 +4,7 @@
     <param name="scm">git</param>
     <param name="submodules">disable</param>
     <param name="exclude">.git</param>
-    <param name="revision">v16.4.1</param>
+    <param name="revision">v16.4.2</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="changesgenerate">disable</param>
     <param name="versionrewrite-pattern">v(.*)</param>

++++++ teleport-16.4.1.obscpio -> teleport-16.4.2.obscpio ++++++
/work/SRC/openSUSE:Factory/teleport/teleport-16.4.1.obscpio 
/work/SRC/openSUSE:Factory/.teleport.new.29891/teleport-16.4.2.obscpio differ: 
char 50, line 1

++++++ teleport.obsinfo ++++++
--- /var/tmp/diff_new_pack.pMaEsF/_old  2024-09-29 18:11:14.175113970 +0200
+++ /var/tmp/diff_new_pack.pMaEsF/_new  2024-09-29 18:11:14.179114136 +0200
@@ -1,5 +1,5 @@
 name: teleport
-version: 16.4.1
-mtime: 1727231711
-commit: 03a20fdbabea61949bdd09405ca423fcaee32db4
+version: 16.4.2
+mtime: 1727309599
+commit: e414b8fcd479f71ec62f2c8daf498d2c7b8dec8d
 

++++++ vendor.tar.gz ++++++
/work/SRC/openSUSE:Factory/teleport/vendor.tar.gz 
/work/SRC/openSUSE:Factory/.teleport.new.29891/vendor.tar.gz differ: char 5, 
line 1

++++++ vendor.tar.zst ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Cargo.lock new/Cargo.lock
--- old/Cargo.lock      1970-01-01 01:00:00.000000000 +0100
+++ new/Cargo.lock      1970-01-01 01:00:00.000000000 +0100
@@ -4,9 +4,9 @@
 
 [[package]]
 name = "autocfg"
-version = "1.3.0"
+version = "1.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
+checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
 
 [[package]]
 name = "bitflags"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/autocfg/.cargo-checksum.json 
new/vendor/autocfg/.cargo-checksum.json
--- old/vendor/autocfg/.cargo-checksum.json     1970-01-01 01:00:00.000000000 
+0100
+++ new/vendor/autocfg/.cargo-checksum.json     1970-01-01 01:00:00.000000000 
+0100
@@ -1 +1 @@
-{"files":{"Cargo.lock":"8e60b691c883629c1e19c8dad7c4c18cded1a85c2e8f2e2a77e7a96957f865a7","Cargo.toml":"f8c2d5675773b7ddff8801c3c17ff9d26e9632fe2027a6b81ceb7bda67d71bfd","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"27995d58ad5c1145c1a8cd86244ce844886958a35eb2b78c6b772748669999ac","README.md":"51238410cbbb06b149a794d954ff4d5943da566a97e71dc3aa8b5fa5a9b538b6","examples/integers.rs":"589ff4271566dfa322becddf3e2c7b592e6e0bc97b02892ce75619b7e452e930","examples/nightly.rs":"ac8b5a9aa1e04465e44f5053b3c899b635e07af058c73aa8b45176bf4b5912f9","examples/paths.rs":"1b30e466b824ce8df7ad0a55334424131d9d2573d6cf9f7d5d50c09c8901d526","examples/traits.rs":"cbee6a3e1f7db60b02ae25b714926517144a77cb492021f492774cf0e1865a9e","examples/versions.rs":"38535e6d9f5bfae0de474a3db79a40e8f5da8ba9334c5ff4c363de9bc99d4d12","src/error.rs":"fd8ff67c64f7cd1b9f81325a81de4baa34c39d6ae298bdb33f9829cc91acac39","src/lib.rs":"7b00cd501b52bab797bf047ada2a446e16fc2b8b055
 
67670d8b8b7ada3179f55","src/rustc.rs":"a8a213ddb64a05c1a1af933bcb331a98879e942b167c33d8f94f9f60ebb14e29","src/tests.rs":"594a1cff6fef4a0f8b5f962a668fda4030db5005f37f01eeb06d692fc48a60df","src/version.rs":"4f7d23b36f01c7be1871be86c038d6cb4689e145d67c82d3793690e9aa05b133","tests/no_std.rs":"cc5619466c6e955552f30ed2f80ba8ddf45c3d5d257f628f54dedc0da978f6aa","tests/rustflags.rs":"5c8169b88216055019db61b5d7baf4abdf675e3b14b54f5037bb1e3acd0a5d3f","tests/wrap_ignored":"a9e241edf584a0702066b25bc15c5bbfd8a1019e14fb655fc4f47a67360065ca","tests/wrappers.rs":"e8eb0eb5ac28ecd9e3473b5ddc321b1d4d523a6fb0c072255ac37d40674aa35c"},"package":"0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"}
\ No newline at end of file
+{"files":{"Cargo.lock":"c53e68eabea3d0b6dbc762cdc0c0bd105a7ac97c76e0b8c5f492d0b94074469c","Cargo.toml":"624e428251fce7244aa71fe7764c1556bc8077ee4579ad7e5803cc8a74061673","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"27995d58ad5c1145c1a8cd86244ce844886958a35eb2b78c6b772748669999ac","README.md":"21308cfaaea9e841e01a43b7ec77304c1daeea8d0e3ec8fe5022d8e56acc4eb2","examples/integers.rs":"589ff4271566dfa322becddf3e2c7b592e6e0bc97b02892ce75619b7e452e930","examples/nightly.rs":"ac8b5a9aa1e04465e44f5053b3c899b635e07af058c73aa8b45176bf4b5912f9","examples/paths.rs":"1b30e466b824ce8df7ad0a55334424131d9d2573d6cf9f7d5d50c09c8901d526","examples/traits.rs":"cbee6a3e1f7db60b02ae25b714926517144a77cb492021f492774cf0e1865a9e","examples/versions.rs":"38535e6d9f5bfae0de474a3db79a40e8f5da8ba9334c5ff4c363de9bc99d4d12","src/error.rs":"fd8ff67c64f7cd1b9f81325a81de4baa34c39d6ae298bdb33f9829cc91acac39","src/lib.rs":"b40828305eb18bcaad11608fbbf82d97fe381803fbf
 
1b89a1511f0675ba49e6c","src/rustc.rs":"a8a213ddb64a05c1a1af933bcb331a98879e942b167c33d8f94f9f60ebb14e29","src/tests.rs":"b39f4d880ad343e65307a9e0c381954ea27adce4732f825516ce7952e2e5a91d","src/version.rs":"4f7d23b36f01c7be1871be86c038d6cb4689e145d67c82d3793690e9aa05b133","tests/no_std.rs":"18859dc4992fe1769887bde05f03d28f1ce524eafd17646d3fbcb4379422761a","tests/rustflags.rs":"e8ded4d57ba25379a38ab48456d67df14f82abbbb5f6bb66221c6decbcb517a3","tests/support/mod.rs":"32087d365b438ac3f62df9bb066d8d648b80cb130a5c777afcb2f21fbb68d88e","tests/tests.rs":"abd41a6a937ee58d7dcb541384705f87ec47294f6af6dab821441d50fd66ee7d","tests/wrap_ignored":"a9e241edf584a0702066b25bc15c5bbfd8a1019e14fb655fc4f47a67360065ca","tests/wrappers.rs":"b5137fe36768eaef277fb8650b0fe45b2c675d9e60b1b49d39f2ec95082c285b"},"package":"ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/autocfg/Cargo.lock 
new/vendor/autocfg/Cargo.lock
--- old/vendor/autocfg/Cargo.lock       1970-01-01 01:00:00.000000000 +0100
+++ new/vendor/autocfg/Cargo.lock       1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +1,6 @@
 # This file is automatically @generated by Cargo.
 # It is not intended for manual editing.
-version = 3
-
 [[package]]
 name = "autocfg"
-version = "1.3.0"
+version = "1.4.0"
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/autocfg/Cargo.toml 
new/vendor/autocfg/Cargo.toml
--- old/vendor/autocfg/Cargo.toml       1970-01-01 01:00:00.000000000 +0100
+++ new/vendor/autocfg/Cargo.toml       1970-01-01 01:00:00.000000000 +0100
@@ -12,9 +12,14 @@
 [package]
 rust-version = "1.0"
 name = "autocfg"
-version = "1.3.0"
+version = "1.4.0"
 authors = ["Josh Stone <cuvi...@gmail.com>"]
+build = false
 exclude = ["/.github/**"]
+autobins = false
+autoexamples = false
+autotests = false
+autobenches = false
 description = "Automatic cfg for Rust compiler features"
 documentation = "https://docs.rs/autocfg/";
 readme = "README.md"
@@ -27,4 +32,44 @@
 license = "Apache-2.0 OR MIT"
 repository = "https://github.com/cuviper/autocfg";
 
+[lib]
+name = "autocfg"
+path = "src/lib.rs"
+
+[[example]]
+name = "integers"
+path = "examples/integers.rs"
+
+[[example]]
+name = "nightly"
+path = "examples/nightly.rs"
+
+[[example]]
+name = "paths"
+path = "examples/paths.rs"
+
+[[example]]
+name = "traits"
+path = "examples/traits.rs"
+
+[[example]]
+name = "versions"
+path = "examples/versions.rs"
+
+[[test]]
+name = "no_std"
+path = "tests/no_std.rs"
+
+[[test]]
+name = "rustflags"
+path = "tests/rustflags.rs"
+
+[[test]]
+name = "tests"
+path = "tests/tests.rs"
+
+[[test]]
+name = "wrappers"
+path = "tests/wrappers.rs"
+
 [dependencies]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/autocfg/README.md new/vendor/autocfg/README.md
--- old/vendor/autocfg/README.md        1970-01-01 01:00:00.000000000 +0100
+++ new/vendor/autocfg/README.md        1970-01-01 01:00:00.000000000 +0100
@@ -43,6 +43,13 @@
 
 ## Release Notes
 
+- 1.4.0 (2024-09-26)
+
+  - Add `emit_possibility` for Rust 1.80's [checked cfgs], and call that
+    automatically for methods that conditionally `emit`, by @Techcable.
+
+[checked cfgs]: https://blog.rust-lang.org/2024/05/06/check-cfg.html
+
 - 1.3.0 (2024-05-03)
 
   - Add `probe_raw` for direct control of the code that will be test-compiled.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/autocfg/src/lib.rs 
new/vendor/autocfg/src/lib.rs
--- old/vendor/autocfg/src/lib.rs       1970-01-01 01:00:00.000000000 +0100
+++ new/vendor/autocfg/src/lib.rs       1970-01-01 01:00:00.000000000 +0100
@@ -20,7 +20,8 @@
 //!
 //! fn main() {
 //! #   // Normally, cargo will set `OUT_DIR` for build scripts.
-//! #   std::env::set_var("OUT_DIR", "target");
+//! #   let exe = std::env::current_exe().unwrap();
+//! #   std::env::set_var("OUT_DIR", exe.parent().unwrap());
 //!     let ac = autocfg::new();
 //!     ac.emit_has_type("i128");
 //!
@@ -91,6 +92,7 @@
     target: Option<OsString>,
     no_std: bool,
     rustflags: Vec<String>,
+    uuid: u64,
 }
 
 /// Writes a config flag for rustc on standard out.
@@ -98,6 +100,12 @@
 /// This looks like: `cargo:rustc-cfg=CFG`
 ///
 /// Cargo will use this in arguments to rustc, like `--cfg CFG`.
+///
+/// This does not automatically call [`emit_possibility`]
+/// so the compiler my generate an [`unexpected_cfgs` 
warning][check-cfg-flags].
+/// However, all the builtin emit methods on [`AutoCfg`] call 
[`emit_possibility`] automatically.
+///
+/// [check-cfg-flags]: https://blog.rust-lang.org/2024/05/06/check-cfg.html
 pub fn emit(cfg: &str) {
     println!("cargo:rustc-cfg={}", cfg);
 }
@@ -123,6 +131,25 @@
     println!("cargo:rerun-if-env-changed={}", var);
 }
 
+/// Indicates to rustc that a config flag should not generate an 
[`unexpected_cfgs` warning][check-cfg-flags]
+///
+/// This looks like `cargo:rustc-check-cfg=cfg(VAR)`
+///
+/// As of rust 1.80, the compiler does [automatic checking of cfgs at compile 
time][check-cfg-flags].
+/// All custom configuration flags must be known to rustc, or they will 
generate a warning.
+/// This is done automatically when calling the builtin emit methods on 
[`AutoCfg`],
+/// but not when calling [`autocfg::emit`](crate::emit) directly.
+///
+/// Versions before rust 1.80 will simply ignore this directive.
+///
+/// This function indicates to the compiler that the config flag never has a 
value.
+/// If this is not desired, see [the blog post][check-cfg].
+///
+/// [check-cfg-flags]: https://blog.rust-lang.org/2024/05/06/check-cfg.html
+pub fn emit_possibility(cfg: &str) {
+    println!("cargo:rustc-check-cfg=cfg({})", cfg);
+}
+
 /// Creates a new `AutoCfg` instance.
 ///
 /// # Panics
@@ -176,6 +203,7 @@
             rustc_version: rustc_version,
             target: target,
             no_std: false,
+            uuid: new_uuid(),
         };
 
         // Sanity check with and without `std`.
@@ -227,21 +255,27 @@
     /// Sets a `cfg` value of the form `rustc_major_minor`, like `rustc_1_29`,
     /// if the current `rustc` is at least that version.
     pub fn emit_rustc_version(&self, major: usize, minor: usize) {
+        let cfg_flag = format!("rustc_{}_{}", major, minor);
+        emit_possibility(&cfg_flag);
         if self.probe_rustc_version(major, minor) {
-            emit(&format!("rustc_{}_{}", major, minor));
+            emit(&cfg_flag);
         }
     }
 
-    fn probe_fmt<'a>(&self, source: Arguments<'a>) -> Result<(), Error> {
+    /// Returns a new (hopefully unique) crate name for probes.
+    fn new_crate_name(&self) -> String {
         #[allow(deprecated)]
         static ID: AtomicUsize = ATOMIC_USIZE_INIT;
 
         let id = ID.fetch_add(1, Ordering::Relaxed);
+        format!("autocfg_{:016x}_{}", self.uuid, id)
+    }
 
+    fn probe_fmt<'a>(&self, source: Arguments<'a>) -> Result<(), Error> {
         let mut command = self.rustc.command();
         command
             .arg("--crate-name")
-            .arg(format!("probe{}", id))
+            .arg(self.new_crate_name())
             .arg("--crate-type=lib")
             .arg("--out-dir")
             .arg(&self.out_dir)
@@ -291,7 +325,8 @@
     /// ```
     /// # extern crate autocfg;
     /// # // Normally, cargo will set `OUT_DIR` for build scripts.
-    /// # std::env::set_var("OUT_DIR", "target");
+    /// # let exe = std::env::current_exe().unwrap();
+    /// # std::env::set_var("OUT_DIR", exe.parent().unwrap());
     /// let ac = autocfg::new();
     /// assert!(ac.probe_raw("#![no_builtins]").is_ok());
     /// ```
@@ -306,7 +341,8 @@
     /// ```
     /// # extern crate autocfg;
     /// # // Normally, cargo will set `OUT_DIR` for build scripts.
-    /// # std::env::set_var("OUT_DIR", "target");
+    /// # let exe = std::env::current_exe().unwrap();
+    /// # std::env::set_var("OUT_DIR", exe.parent().unwrap());
     /// let ac = autocfg::new();
     /// let code = r#"
     ///     #![feature(slice_group_by)]
@@ -336,8 +372,10 @@
 
     /// Emits a config value `has_CRATE` if `probe_sysroot_crate` returns true.
     pub fn emit_sysroot_crate(&self, name: &str) {
+        let cfg_flag = format!("has_{}", mangle(name));
+        emit_possibility(&cfg_flag);
         if self.probe_sysroot_crate(name) {
-            emit(&format!("has_{}", mangle(name)));
+            emit(&cfg_flag);
         }
     }
 
@@ -357,13 +395,12 @@
     /// Any non-identifier characters in the `path` will be replaced with
     /// `_` in the generated config value.
     pub fn emit_has_path(&self, path: &str) {
-        if self.probe_path(path) {
-            emit(&format!("has_{}", mangle(path)));
-        }
+        self.emit_path_cfg(path, &format!("has_{}", mangle(path)));
     }
 
     /// Emits the given `cfg` value if `probe_path` returns true.
     pub fn emit_path_cfg(&self, path: &str, cfg: &str) {
+        emit_possibility(cfg);
         if self.probe_path(path) {
             emit(cfg);
         }
@@ -385,13 +422,12 @@
     /// Any non-identifier characters in the trait `name` will be replaced with
     /// `_` in the generated config value.
     pub fn emit_has_trait(&self, name: &str) {
-        if self.probe_trait(name) {
-            emit(&format!("has_{}", mangle(name)));
-        }
+        self.emit_trait_cfg(name, &format!("has_{}", mangle(name)));
     }
 
     /// Emits the given `cfg` value if `probe_trait` returns true.
     pub fn emit_trait_cfg(&self, name: &str, cfg: &str) {
+        emit_possibility(cfg);
         if self.probe_trait(name) {
             emit(cfg);
         }
@@ -413,13 +449,12 @@
     /// Any non-identifier characters in the type `name` will be replaced with
     /// `_` in the generated config value.
     pub fn emit_has_type(&self, name: &str) {
-        if self.probe_type(name) {
-            emit(&format!("has_{}", mangle(name)));
-        }
+        self.emit_type_cfg(name, &format!("has_{}", mangle(name)));
     }
 
     /// Emits the given `cfg` value if `probe_type` returns true.
     pub fn emit_type_cfg(&self, name: &str, cfg: &str) {
+        emit_possibility(cfg);
         if self.probe_type(name) {
             emit(cfg);
         }
@@ -438,6 +473,7 @@
 
     /// Emits the given `cfg` value if `probe_expression` returns true.
     pub fn emit_expression_cfg(&self, expr: &str, cfg: &str) {
+        emit_possibility(cfg);
         if self.probe_expression(expr) {
             emit(cfg);
         }
@@ -456,6 +492,7 @@
 
     /// Emits the given `cfg` value if `probe_constant` returns true.
     pub fn emit_constant_cfg(&self, expr: &str, cfg: &str) {
+        emit_possibility(cfg);
         if self.probe_constant(expr) {
             emit(cfg);
         }
@@ -533,3 +570,21 @@
 
     Vec::new()
 }
+
+/// Generates a numeric ID to use in probe crate names.
+///
+/// This attempts to be random, within the constraints of Rust 1.0 and no 
dependencies.
+fn new_uuid() -> u64 {
+    const FNV_OFFSET_BASIS: u64 = 0xcbf2_9ce4_8422_2325;
+    const FNV_PRIME: u64 = 0x100_0000_01b3;
+
+    // This set should have an actual random hasher.
+    let set: std::collections::HashSet<u64> = (0..256).collect();
+
+    // Feed the `HashSet`-shuffled order into FNV-1a.
+    let mut hash: u64 = FNV_OFFSET_BASIS;
+    for x in set {
+        hash = (hash ^ x).wrapping_mul(FNV_PRIME);
+    }
+    hash
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/autocfg/src/tests.rs 
new/vendor/autocfg/src/tests.rs
--- old/vendor/autocfg/src/tests.rs     1970-01-01 01:00:00.000000000 +0100
+++ new/vendor/autocfg/src/tests.rs     1970-01-01 01:00:00.000000000 +0100
@@ -1,36 +1,5 @@
-use super::AutoCfg;
-use std::env;
 use std::path::Path;
 
-impl AutoCfg {
-    fn core_std(&self, path: &str) -> String {
-        let krate = if self.no_std { "core" } else { "std" };
-        format!("{}::{}", krate, path)
-    }
-
-    fn assert_std(&self, probe_result: bool) {
-        assert_eq!(!self.no_std, probe_result);
-    }
-
-    fn assert_min(&self, major: usize, minor: usize, probe_result: bool) {
-        assert_eq!(self.probe_rustc_version(major, minor), probe_result);
-    }
-
-    fn for_test() -> Result<Self, super::error::Error> {
-        match env::var_os("TESTS_TARGET_DIR") {
-            Some(d) => Self::with_dir(d),
-            None => Self::with_dir("target"),
-        }
-    }
-}
-
-#[test]
-fn autocfg_version() {
-    let ac = AutoCfg::for_test().unwrap();
-    println!("version: {:?}", ac.rustc_version);
-    assert!(ac.probe_rustc_version(1, 0));
-}
-
 #[test]
 fn version_cmp() {
     use super::version::Version;
@@ -45,111 +14,6 @@
 }
 
 #[test]
-fn probe_add() {
-    let ac = AutoCfg::for_test().unwrap();
-    let add = ac.core_std("ops::Add");
-    let add_rhs = add.clone() + "<i32>";
-    let add_rhs_output = add.clone() + "<i32, Output = i32>";
-    let dyn_add_rhs_output = "dyn ".to_string() + &*add_rhs_output;
-    assert!(ac.probe_path(&add));
-    assert!(ac.probe_trait(&add));
-    assert!(ac.probe_trait(&add_rhs));
-    assert!(ac.probe_trait(&add_rhs_output));
-    ac.assert_min(1, 27, ac.probe_type(&dyn_add_rhs_output));
-}
-
-#[test]
-fn probe_as_ref() {
-    let ac = AutoCfg::for_test().unwrap();
-    let as_ref = ac.core_std("convert::AsRef");
-    let as_ref_str = as_ref.clone() + "<str>";
-    let dyn_as_ref_str = "dyn ".to_string() + &*as_ref_str;
-    assert!(ac.probe_path(&as_ref));
-    assert!(ac.probe_trait(&as_ref_str));
-    assert!(ac.probe_type(&as_ref_str));
-    ac.assert_min(1, 27, ac.probe_type(&dyn_as_ref_str));
-}
-
-#[test]
-fn probe_i128() {
-    let ac = AutoCfg::for_test().unwrap();
-    let i128_path = ac.core_std("i128");
-    ac.assert_min(1, 26, ac.probe_path(&i128_path));
-    ac.assert_min(1, 26, ac.probe_type("i128"));
-}
-
-#[test]
-fn probe_sum() {
-    let ac = AutoCfg::for_test().unwrap();
-    let sum = ac.core_std("iter::Sum");
-    let sum_i32 = sum.clone() + "<i32>";
-    let dyn_sum_i32 = "dyn ".to_string() + &*sum_i32;
-    ac.assert_min(1, 12, ac.probe_path(&sum));
-    ac.assert_min(1, 12, ac.probe_trait(&sum));
-    ac.assert_min(1, 12, ac.probe_trait(&sum_i32));
-    ac.assert_min(1, 12, ac.probe_type(&sum_i32));
-    ac.assert_min(1, 27, ac.probe_type(&dyn_sum_i32));
-}
-
-#[test]
-fn probe_std() {
-    let ac = AutoCfg::for_test().unwrap();
-    ac.assert_std(ac.probe_sysroot_crate("std"));
-}
-
-#[test]
-fn probe_alloc() {
-    let ac = AutoCfg::for_test().unwrap();
-    ac.assert_min(1, 36, ac.probe_sysroot_crate("alloc"));
-}
-
-#[test]
-fn probe_bad_sysroot_crate() {
-    let ac = AutoCfg::for_test().unwrap();
-    assert!(!ac.probe_sysroot_crate("doesnt_exist"));
-}
-
-#[test]
-fn probe_no_std() {
-    let ac = AutoCfg::for_test().unwrap();
-    assert!(ac.probe_type("i32"));
-    assert!(ac.probe_type("[i32]"));
-    ac.assert_std(ac.probe_type("Vec<i32>"));
-}
-
-#[test]
-fn probe_expression() {
-    let ac = AutoCfg::for_test().unwrap();
-    assert!(ac.probe_expression(r#""test".trim_left()"#));
-    ac.assert_min(1, 30, ac.probe_expression(r#""test".trim_start()"#));
-    ac.assert_std(ac.probe_expression("[1, 2, 3].to_vec()"));
-}
-
-#[test]
-fn probe_constant() {
-    let ac = AutoCfg::for_test().unwrap();
-    assert!(ac.probe_constant("1 + 2 + 3"));
-    ac.assert_min(1, 33, ac.probe_constant("{ let x = 1 + 2 + 3; x * x }"));
-    ac.assert_min(1, 39, ac.probe_constant(r#""test".len()"#));
-}
-
-#[test]
-fn probe_raw() {
-    let ac = AutoCfg::for_test().unwrap();
-    let prefix = if ac.no_std { "#![no_std]\n" } else { "" };
-    let f = |s| format!("{}{}", prefix, s);
-
-    // This attribute **must** be used at the crate level.
-    assert!(ac.probe_raw(&f("#![no_builtins]")).is_ok());
-
-    assert!(ac.probe_raw(&f("#![deny(dead_code)] fn x() {}")).is_err());
-    assert!(ac.probe_raw(&f("#![allow(dead_code)] fn x() {}")).is_ok());
-    assert!(ac
-        .probe_raw(&f("#![deny(dead_code)] pub fn x() {}"))
-        .is_ok());
-}
-
-#[test]
 fn dir_does_not_contain_target() {
     assert!(!super::dir_contains_target(
         &Some("x86_64-unknown-linux-gnu".into()),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/autocfg/tests/no_std.rs 
new/vendor/autocfg/tests/no_std.rs
--- old/vendor/autocfg/tests/no_std.rs  1970-01-01 01:00:00.000000000 +0100
+++ new/vendor/autocfg/tests/no_std.rs  1970-01-01 01:00:00.000000000 +0100
@@ -2,6 +2,8 @@
 
 use std::env;
 
+mod support;
+
 /// Tests that we can control the use of `#![no_std]`.
 #[test]
 fn no_std() {
@@ -10,10 +12,9 @@
     env::remove_var("TARGET");
 
     // Use the same path as this test binary.
-    let dir = env::current_exe().unwrap().parent().unwrap().to_path_buf();
-    env::set_var("OUT_DIR", &format!("{}", dir.display()));
+    let out = support::out_dir();
 
-    let mut ac = autocfg::AutoCfg::new().unwrap();
+    let mut ac = autocfg::AutoCfg::with_dir(out.as_ref()).unwrap();
     assert!(!ac.no_std());
     assert!(ac.probe_path("std::mem"));
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/autocfg/tests/rustflags.rs 
new/vendor/autocfg/tests/rustflags.rs
--- old/vendor/autocfg/tests/rustflags.rs       1970-01-01 01:00:00.000000000 
+0100
+++ new/vendor/autocfg/tests/rustflags.rs       1970-01-01 01:00:00.000000000 
+0100
@@ -2,18 +2,19 @@
 
 use std::env;
 
+mod support;
+
 /// Tests that autocfg uses the RUSTFLAGS or CARGO_ENCODED_RUSTFLAGS
 /// environment variables when running rustc.
 #[test]
 fn test_with_sysroot() {
-    // Use the same path as this test binary.
-    let dir = env::current_exe().unwrap().parent().unwrap().to_path_buf();
-    env::set_var("OUT_DIR", &format!("{}", dir.display()));
+    let dir = support::exe_dir();
+    let out = support::out_dir();
 
     // If we have encoded rustflags, they take precedence, even if empty.
     env::set_var("CARGO_ENCODED_RUSTFLAGS", "");
     env::set_var("RUSTFLAGS", &format!("-L {}", dir.display()));
-    let ac = autocfg::AutoCfg::new().unwrap();
+    let ac = autocfg::AutoCfg::with_dir(out.as_ref()).unwrap();
     assert!(ac.probe_sysroot_crate("std"));
     assert!(!ac.probe_sysroot_crate("autocfg"));
 
@@ -22,12 +23,12 @@
         "CARGO_ENCODED_RUSTFLAGS",
         &format!("-L\x1f{}", dir.display()),
     );
-    let ac = autocfg::AutoCfg::new().unwrap();
+    let ac = autocfg::AutoCfg::with_dir(out.as_ref()).unwrap();
     assert!(ac.probe_sysroot_crate("autocfg"));
 
     // Try the old-style RUSTFLAGS, ensuring HOST != TARGET.
     env::remove_var("CARGO_ENCODED_RUSTFLAGS");
     env::set_var("HOST", "lol");
-    let ac = autocfg::AutoCfg::new().unwrap();
+    let ac = autocfg::AutoCfg::with_dir(out.as_ref()).unwrap();
     assert!(ac.probe_sysroot_crate("autocfg"));
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/autocfg/tests/support/mod.rs 
new/vendor/autocfg/tests/support/mod.rs
--- old/vendor/autocfg/tests/support/mod.rs     1970-01-01 01:00:00.000000000 
+0100
+++ new/vendor/autocfg/tests/support/mod.rs     1970-01-01 01:00:00.000000000 
+0100
@@ -0,0 +1,21 @@
+use std::borrow::Cow;
+use std::env;
+use std::path::{Path, PathBuf};
+
+/// The directory containing this test binary.
+pub fn exe_dir() -> PathBuf {
+    let exe = env::current_exe().unwrap();
+    exe.parent().unwrap().to_path_buf()
+}
+
+/// The directory to use for test probes.
+pub fn out_dir() -> Cow<'static, Path> {
+    if let Some(tmpdir) = option_env!("CARGO_TARGET_TMPDIR") {
+        Cow::Borrowed(tmpdir.as_ref())
+    } else if let Some(tmpdir) = env::var_os("TESTS_TARGET_DIR") {
+        Cow::Owned(tmpdir.into())
+    } else {
+        // Use the same path as this test binary.
+        Cow::Owned(exe_dir())
+    }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/autocfg/tests/tests.rs 
new/vendor/autocfg/tests/tests.rs
--- old/vendor/autocfg/tests/tests.rs   1970-01-01 01:00:00.000000000 +0100
+++ new/vendor/autocfg/tests/tests.rs   1970-01-01 01:00:00.000000000 +0100
@@ -0,0 +1,138 @@
+extern crate autocfg;
+
+use autocfg::AutoCfg;
+
+mod support;
+
+fn core_std(ac: &AutoCfg, path: &str) -> String {
+    let krate = if ac.no_std() { "core" } else { "std" };
+    format!("{}::{}", krate, path)
+}
+
+fn assert_std(ac: &AutoCfg, probe_result: bool) {
+    assert_eq!(!ac.no_std(), probe_result);
+}
+
+fn assert_min(ac: &AutoCfg, major: usize, minor: usize, probe_result: bool) {
+    assert_eq!(ac.probe_rustc_version(major, minor), probe_result);
+}
+
+fn autocfg_for_test() -> AutoCfg {
+    AutoCfg::with_dir(support::out_dir().as_ref()).unwrap()
+}
+
+#[test]
+fn autocfg_version() {
+    let ac = autocfg_for_test();
+    assert!(ac.probe_rustc_version(1, 0));
+}
+
+#[test]
+fn probe_add() {
+    let ac = autocfg_for_test();
+    let add = core_std(&ac, "ops::Add");
+    let add_rhs = add.clone() + "<i32>";
+    let add_rhs_output = add.clone() + "<i32, Output = i32>";
+    let dyn_add_rhs_output = "dyn ".to_string() + &*add_rhs_output;
+    assert!(ac.probe_path(&add));
+    assert!(ac.probe_trait(&add));
+    assert!(ac.probe_trait(&add_rhs));
+    assert!(ac.probe_trait(&add_rhs_output));
+    assert_min(&ac, 1, 27, ac.probe_type(&dyn_add_rhs_output));
+}
+
+#[test]
+fn probe_as_ref() {
+    let ac = autocfg_for_test();
+    let as_ref = core_std(&ac, "convert::AsRef");
+    let as_ref_str = as_ref.clone() + "<str>";
+    let dyn_as_ref_str = "dyn ".to_string() + &*as_ref_str;
+    assert!(ac.probe_path(&as_ref));
+    assert!(ac.probe_trait(&as_ref_str));
+    assert!(ac.probe_type(&as_ref_str));
+    assert_min(&ac, 1, 27, ac.probe_type(&dyn_as_ref_str));
+}
+
+#[test]
+fn probe_i128() {
+    let ac = autocfg_for_test();
+    let i128_path = core_std(&ac, "i128");
+    assert_min(&ac, 1, 26, ac.probe_path(&i128_path));
+    assert_min(&ac, 1, 26, ac.probe_type("i128"));
+}
+
+#[test]
+fn probe_sum() {
+    let ac = autocfg_for_test();
+    let sum = core_std(&ac, "iter::Sum");
+    let sum_i32 = sum.clone() + "<i32>";
+    let dyn_sum_i32 = "dyn ".to_string() + &*sum_i32;
+    assert_min(&ac, 1, 12, ac.probe_path(&sum));
+    assert_min(&ac, 1, 12, ac.probe_trait(&sum));
+    assert_min(&ac, 1, 12, ac.probe_trait(&sum_i32));
+    assert_min(&ac, 1, 12, ac.probe_type(&sum_i32));
+    assert_min(&ac, 1, 27, ac.probe_type(&dyn_sum_i32));
+}
+
+#[test]
+fn probe_std() {
+    let ac = autocfg_for_test();
+    assert_std(&ac, ac.probe_sysroot_crate("std"));
+}
+
+#[test]
+fn probe_alloc() {
+    let ac = autocfg_for_test();
+    assert_min(&ac, 1, 36, ac.probe_sysroot_crate("alloc"));
+}
+
+#[test]
+fn probe_bad_sysroot_crate() {
+    let ac = autocfg_for_test();
+    assert!(!ac.probe_sysroot_crate("doesnt_exist"));
+}
+
+#[test]
+fn probe_no_std() {
+    let ac = autocfg_for_test();
+    assert!(ac.probe_type("i32"));
+    assert!(ac.probe_type("[i32]"));
+    assert_std(&ac, ac.probe_type("Vec<i32>"));
+}
+
+#[test]
+fn probe_expression() {
+    let ac = autocfg_for_test();
+    assert!(ac.probe_expression(r#""test".trim_left()"#));
+    assert_min(&ac, 1, 30, ac.probe_expression(r#""test".trim_start()"#));
+    assert_std(&ac, ac.probe_expression("[1, 2, 3].to_vec()"));
+}
+
+#[test]
+fn probe_constant() {
+    let ac = autocfg_for_test();
+    assert!(ac.probe_constant("1 + 2 + 3"));
+    assert_min(
+        &ac,
+        1,
+        33,
+        ac.probe_constant("{ let x = 1 + 2 + 3; x * x }"),
+    );
+    assert_min(&ac, 1, 39, ac.probe_constant(r#""test".len()"#));
+}
+
+#[test]
+fn probe_raw() {
+    let ac = autocfg_for_test();
+    let prefix = if ac.no_std() { "#![no_std]\n" } else { "" };
+    let f = |s| format!("{}{}", prefix, s);
+
+    // This attribute **must** be used at the crate level.
+    assert!(ac.probe_raw(&f("#![no_builtins]")).is_ok());
+
+    assert!(ac.probe_raw(&f("#![deny(dead_code)] fn x() {}")).is_err());
+    assert!(ac.probe_raw(&f("#![allow(dead_code)] fn x() {}")).is_ok());
+    assert!(ac
+        .probe_raw(&f("#![deny(dead_code)] pub fn x() {}"))
+        .is_ok());
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/autocfg/tests/wrappers.rs 
new/vendor/autocfg/tests/wrappers.rs
--- old/vendor/autocfg/tests/wrappers.rs        1970-01-01 01:00:00.000000000 
+0100
+++ new/vendor/autocfg/tests/wrappers.rs        1970-01-01 01:00:00.000000000 
+0100
@@ -2,6 +2,8 @@
 
 use std::env;
 
+mod support;
+
 /// Tests that autocfg uses the RUSTC_WRAPPER and/or RUSTC_WORKSPACE_WRAPPER
 /// environment variables when running rustc.
 #[test]
@@ -15,9 +17,7 @@
         }
     }
 
-    // Use the same path as this test binary.
-    let dir = env::current_exe().unwrap().parent().unwrap().to_path_buf();
-    env::set_var("OUT_DIR", &format!("{}", dir.display()));
+    let out = support::out_dir();
 
     // This is used as a heuristic to detect rust-lang/cargo#9601.
     env::set_var("CARGO_ENCODED_RUSTFLAGS", "");
@@ -30,7 +30,7 @@
             set("RUSTC_WRAPPER", rustc);
             set("RUSTC_WORKSPACE_WRAPPER", workspace);
 
-            let ac = autocfg::AutoCfg::new().unwrap();
+            let ac = autocfg::AutoCfg::with_dir(out.as_ref()).unwrap();
             if rustc == Some(false) || workspace == Some(false) {
                 // Everything should fail with bad wrappers.
                 assert!(!ac.probe_type("usize"));
@@ -48,7 +48,7 @@
     // by using something that doesn't pass through at all.
     env::set_var("RUSTC_WRAPPER", "./tests/wrap_ignored");
     env::set_var("RUSTC_WORKSPACE_WRAPPER", "/bin/false");
-    let ac = autocfg::AutoCfg::new().unwrap();
+    let ac = autocfg::AutoCfg::with_dir(out.as_ref()).unwrap();
     assert!(ac.probe_type("mesize")); // anything goes!
 
     // Make sure we also got the version from that wrapper.

Reply via email to