about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2024-02-20 15:13:52 +0100
committerGitHub <noreply@github.com>2024-02-20 15:13:52 +0100
commitf6b4080592920e2148dc853bdb07b08a3fd8dddb (patch)
tree6eda974e2da9fd98ff0c543b5343b9bbf33eb6bf /tests
parent4ff6bb51e24c93c5ad677f4c312104ce0844853b (diff)
parentf12d248a6abeef2a1f8dc28f09344c8cba13d663 (diff)
downloadrust-f6b4080592920e2148dc853bdb07b08a3fd8dddb.tar.gz
rust-f6b4080592920e2148dc853bdb07b08a3fd8dddb.zip
Rollup merge of #121241 - reitermarkus:generic-nonzero-traits, r=dtolnay
Implement `NonZero` traits generically.

Tracking issue: https://github.com/rust-lang/rust/issues/120257

r? ````@dtolnay````
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/did_you_mean/bad-assoc-ty.stderr9
-rw-r--r--tests/ui/fmt/ifmt-unimpl.stderr2
-rw-r--r--tests/ui/traits/issue-77982.stderr1
-rw-r--r--tests/ui/try-trait/bad-interconversion.stderr1
4 files changed, 9 insertions, 4 deletions
diff --git a/tests/ui/did_you_mean/bad-assoc-ty.stderr b/tests/ui/did_you_mean/bad-assoc-ty.stderr
index 4a119f673c8..dc93762c9b1 100644
--- a/tests/ui/did_you_mean/bad-assoc-ty.stderr
+++ b/tests/ui/did_you_mean/bad-assoc-ty.stderr
@@ -191,7 +191,14 @@ error[E0223]: ambiguous associated type
   --> $DIR/bad-assoc-ty.rs:33:10
    |
 LL | type H = Fn(u8) -> (u8)::Output;
-   |          ^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(dyn Fn(u8) -> u8 + 'static) as IntoFuture>::Output`
+   |          ^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL | type H = <(dyn Fn(u8) -> u8 + 'static) as BitOr>::Output;
+   |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL | type H = <(dyn Fn(u8) -> u8 + 'static) as IntoFuture>::Output;
+   |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0223]: ambiguous associated type
   --> $DIR/bad-assoc-ty.rs:39:19
diff --git a/tests/ui/fmt/ifmt-unimpl.stderr b/tests/ui/fmt/ifmt-unimpl.stderr
index 58531c61bbe..3c5428e59fb 100644
--- a/tests/ui/fmt/ifmt-unimpl.stderr
+++ b/tests/ui/fmt/ifmt-unimpl.stderr
@@ -15,7 +15,7 @@ LL |     format!("{:X}", "3");
              i128
              usize
              u8
-           and 20 others
+           and 9 others
    = note: required for `&str` to implement `UpperHex`
 note: required by a bound in `core::fmt::rt::Argument::<'a>::new_upper_hex`
   --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
diff --git a/tests/ui/traits/issue-77982.stderr b/tests/ui/traits/issue-77982.stderr
index bffad037fba..5be8d2f4b32 100644
--- a/tests/ui/traits/issue-77982.stderr
+++ b/tests/ui/traits/issue-77982.stderr
@@ -46,7 +46,6 @@ LL |     let ips: Vec<_> = (0..100_000).map(|_| u32::from(0u32.into())).collect(
    = note: multiple `impl`s satisfying `u32: From<_>` found in the `core` crate:
            - impl From<Char> for u32;
            - impl From<Ipv4Addr> for u32;
-           - impl From<NonZero<u32>> for u32;
            - impl From<bool> for u32;
            - impl From<char> for u32;
            - impl From<u16> for u32;
diff --git a/tests/ui/try-trait/bad-interconversion.stderr b/tests/ui/try-trait/bad-interconversion.stderr
index 80471c0ab1a..817acc8fc99 100644
--- a/tests/ui/try-trait/bad-interconversion.stderr
+++ b/tests/ui/try-trait/bad-interconversion.stderr
@@ -11,7 +11,6 @@ LL |     Ok(Err(123_i32)?)
    = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
    = help: the following other types implement trait `From<T>`:
              <u8 as From<bool>>
-             <u8 as From<NonZero<u8>>>
              <u8 as From<Char>>
    = note: required for `Result<u64, u8>` to implement `FromResidual<Result<Infallible, i32>>`