diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/traits/pointee-tail-is-generic-errors.stderr | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/traits/pointee-tail-is-generic-errors.stderr')
-rw-r--r-- | src/test/ui/traits/pointee-tail-is-generic-errors.stderr | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/test/ui/traits/pointee-tail-is-generic-errors.stderr b/src/test/ui/traits/pointee-tail-is-generic-errors.stderr new file mode 100644 index 000000000..8456f8456 --- /dev/null +++ b/src/test/ui/traits/pointee-tail-is-generic-errors.stderr @@ -0,0 +1,40 @@ +error[E0271]: type mismatch resolving `<T as Pointee>::Metadata == ()` + --> $DIR/pointee-tail-is-generic-errors.rs:13:5 + | +LL | is_thin::<T>(); + | ^^^^^^^^^^^^ expected `()`, found associated type + | + = note: expected unit type `()` + found associated type `<T as Pointee>::Metadata` + = help: consider constraining the associated type `<T as Pointee>::Metadata` to `()` + = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html +note: required by a bound in `is_thin` + --> $DIR/pointee-tail-is-generic-errors.rs:20:33 + | +LL | fn is_thin<T: std::ptr::Pointee<Metadata = ()> + ?Sized>() {} + | ^^^^^^^^^^^^^ required by this bound in `is_thin` + +error[E0271]: type mismatch resolving `<Opaque as Pointee>::Metadata == ()` + --> $DIR/pointee-tail-is-generic-errors.rs:16:5 + | +LL | type Opaque = impl std::fmt::Debug + ?Sized; + | ----------------------------- the found opaque type +... +LL | is_thin::<Opaque>(); + | ^^^^^^^^^^^^^^^^^ expected `()`, found associated type + | + = note: expected unit type `()` + found associated type `<Opaque as Pointee>::Metadata` +note: required by a bound in `is_thin` + --> $DIR/pointee-tail-is-generic-errors.rs:20:33 + | +LL | fn is_thin<T: std::ptr::Pointee<Metadata = ()> + ?Sized>() {} + | ^^^^^^^^^^^^^ required by this bound in `is_thin` +help: consider constraining the associated type `<Opaque as Pointee>::Metadata` to `()` + | +LL | type Opaque = impl std::fmt::Debug<Metadata = ()> + ?Sized; + | +++++++++++++++ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0271`. |