summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/bound-suggestions.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/ui/suggestions/bound-suggestions.stderr
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/suggestions/bound-suggestions.stderr')
-rw-r--r--tests/ui/suggestions/bound-suggestions.stderr140
1 files changed, 140 insertions, 0 deletions
diff --git a/tests/ui/suggestions/bound-suggestions.stderr b/tests/ui/suggestions/bound-suggestions.stderr
new file mode 100644
index 000000000..cd27947f0
--- /dev/null
+++ b/tests/ui/suggestions/bound-suggestions.stderr
@@ -0,0 +1,140 @@
+error[E0277]: `impl Sized` doesn't implement `Debug`
+ --> $DIR/bound-suggestions.rs:9:22
+ |
+LL | println!("{:?}", t);
+ | ^ `impl Sized` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+ |
+ = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: consider further restricting this bound
+ |
+LL | fn test_impl(t: impl Sized + std::fmt::Debug) {
+ | +++++++++++++++++
+
+error[E0277]: `T` doesn't implement `Debug`
+ --> $DIR/bound-suggestions.rs:15:22
+ |
+LL | println!("{:?}", t);
+ | ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+ |
+ = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: consider restricting type parameter `T`
+ |
+LL | fn test_no_bounds<T: std::fmt::Debug>(t: T) {
+ | +++++++++++++++++
+
+error[E0277]: `T` doesn't implement `Debug`
+ --> $DIR/bound-suggestions.rs:21:22
+ |
+LL | println!("{:?}", t);
+ | ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+ |
+ = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: consider further restricting this bound
+ |
+LL | fn test_one_bound<T: Sized + std::fmt::Debug>(t: T) {
+ | +++++++++++++++++
+
+error[E0277]: `Y` doesn't implement `Debug`
+ --> $DIR/bound-suggestions.rs:27:30
+ |
+LL | println!("{:?} {:?}", x, y);
+ | ^ `Y` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+ |
+ = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: consider further restricting type parameter `Y`
+ |
+LL | fn test_no_bounds_where<X, Y>(x: X, y: Y) where X: std::fmt::Debug, Y: std::fmt::Debug {
+ | ~~~~~~~~~~~~~~~~~~~~
+
+error[E0277]: `X` doesn't implement `Debug`
+ --> $DIR/bound-suggestions.rs:33:22
+ |
+LL | println!("{:?}", x);
+ | ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+ |
+ = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: consider further restricting this bound
+ |
+LL | fn test_one_bound_where<X>(x: X) where X: Sized + std::fmt::Debug {
+ | +++++++++++++++++
+
+error[E0277]: `X` doesn't implement `Debug`
+ --> $DIR/bound-suggestions.rs:39:22
+ |
+LL | println!("{:?}", x);
+ | ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+ |
+ = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: consider further restricting this bound
+ |
+LL | fn test_many_bounds_where<X>(x: X) where X: Sized + std::fmt::Debug, X: Sized {
+ | +++++++++++++++++
+
+error[E0277]: the size for values of type `Self` cannot be known at compilation time
+ --> $DIR/bound-suggestions.rs:44:46
+ |
+LL | const SIZE: usize = core::mem::size_of::<Self>();
+ | ^^^^ doesn't have a size known at compile-time
+ |
+note: required by a bound in `std::mem::size_of`
+ --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+help: consider further restricting `Self`
+ |
+LL | trait Foo<T>: Sized {
+ | +++++++
+
+error[E0277]: the size for values of type `Self` cannot be known at compilation time
+ --> $DIR/bound-suggestions.rs:49:46
+ |
+LL | const SIZE: usize = core::mem::size_of::<Self>();
+ | ^^^^ doesn't have a size known at compile-time
+ |
+note: required by a bound in `std::mem::size_of`
+ --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+help: consider further restricting `Self`
+ |
+LL | trait Bar: std::fmt::Display + Sized {
+ | +++++++
+
+error[E0277]: the size for values of type `Self` cannot be known at compilation time
+ --> $DIR/bound-suggestions.rs:54:46
+ |
+LL | const SIZE: usize = core::mem::size_of::<Self>();
+ | ^^^^ doesn't have a size known at compile-time
+ |
+note: required by a bound in `std::mem::size_of`
+ --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+help: consider further restricting `Self`
+ |
+LL | trait Baz: Sized where Self: std::fmt::Display {
+ | +++++++
+
+error[E0277]: the size for values of type `Self` cannot be known at compilation time
+ --> $DIR/bound-suggestions.rs:59:46
+ |
+LL | const SIZE: usize = core::mem::size_of::<Self>();
+ | ^^^^ doesn't have a size known at compile-time
+ |
+note: required by a bound in `std::mem::size_of`
+ --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+help: consider further restricting `Self`
+ |
+LL | trait Qux<T>: Sized where Self: std::fmt::Display {
+ | +++++++
+
+error[E0277]: the size for values of type `Self` cannot be known at compilation time
+ --> $DIR/bound-suggestions.rs:64:46
+ |
+LL | const SIZE: usize = core::mem::size_of::<Self>();
+ | ^^^^ doesn't have a size known at compile-time
+ |
+note: required by a bound in `std::mem::size_of`
+ --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+help: consider further restricting `Self`
+ |
+LL | trait Bat<T>: std::fmt::Display + Sized {
+ | +++++++
+
+error: aborting due to 11 previous errors
+
+For more information about this error, try `rustc --explain E0277`.