summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/suggest-assign-rvalue.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/borrowck/suggest-assign-rvalue.stderr
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/borrowck/suggest-assign-rvalue.stderr')
-rw-r--r--tests/ui/borrowck/suggest-assign-rvalue.stderr138
1 files changed, 138 insertions, 0 deletions
diff --git a/tests/ui/borrowck/suggest-assign-rvalue.stderr b/tests/ui/borrowck/suggest-assign-rvalue.stderr
new file mode 100644
index 000000000..92acba640
--- /dev/null
+++ b/tests/ui/borrowck/suggest-assign-rvalue.stderr
@@ -0,0 +1,138 @@
+error[E0381]: used binding `chaenomeles` isn't initialized
+ --> $DIR/suggest-assign-rvalue.rs:14:11
+ |
+LL | let chaenomeles;
+ | ----------- binding declared here but left uninitialized
+LL | apple(chaenomeles);
+ | ^^^^^^^^^^^ `chaenomeles` used here but it isn't initialized
+ |
+help: consider assigning a value
+ |
+LL | let chaenomeles = 0;
+ | +++
+
+error[E0381]: used binding `my_float` isn't initialized
+ --> $DIR/suggest-assign-rvalue.rs:23:30
+ |
+LL | let my_float: f32;
+ | -------- binding declared here but left uninitialized
+LL | println!("my_float: {}", my_float);
+ | ^^^^^^^^ `my_float` used here but it isn't initialized
+ |
+ = 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 assigning a value
+ |
+LL | let my_float: f32 = 0.0;
+ | +++++
+
+error[E0381]: used binding `demo` isn't initialized
+ --> $DIR/suggest-assign-rvalue.rs:26:28
+ |
+LL | let demo: Demo;
+ | ---- binding declared here but left uninitialized
+LL | println!("demo: {:?}", demo);
+ | ^^^^ `demo` used here but it isn't initialized
+ |
+ = 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 assigning a value
+ |
+LL | let demo: Demo = Default::default();
+ | ++++++++++++++++++++
+
+error[E0381]: used binding `demo_no` isn't initialized
+ --> $DIR/suggest-assign-rvalue.rs:30:31
+ |
+LL | let demo_no: DemoNoDef;
+ | ------- binding declared here but left uninitialized
+LL | println!("demo_no: {:?}", demo_no);
+ | ^^^^^^^ `demo_no` used here but it isn't initialized
+ |
+ = 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 assigning a value
+ |
+LL | let demo_no: DemoNoDef = todo!();
+ | +++++++++
+
+error[E0381]: used binding `arr` isn't initialized
+ --> $DIR/suggest-assign-rvalue.rs:34:27
+ |
+LL | let arr: [i32; 5];
+ | --- binding declared here but left uninitialized
+LL | println!("arr: {:?}", arr);
+ | ^^^ `arr` used here but it isn't initialized
+ |
+ = 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 assigning a value
+ |
+LL | let arr: [i32; 5] = todo!();
+ | +++++++++
+
+error[E0381]: used binding `foo` isn't initialized
+ --> $DIR/suggest-assign-rvalue.rs:37:27
+ |
+LL | let foo: Vec<&str>;
+ | --- binding declared here but left uninitialized
+LL | println!("foo: {:?}", foo);
+ | ^^^ `foo` used here but it isn't initialized
+ |
+ = 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 assigning a value
+ |
+LL | let foo: Vec<&str> = vec![];
+ | ++++++++
+
+error[E0381]: used binding `my_string` isn't initialized
+ --> $DIR/suggest-assign-rvalue.rs:41:31
+ |
+LL | let my_string: String;
+ | --------- binding declared here but left uninitialized
+LL | println!("my_string: {}", my_string);
+ | ^^^^^^^^^ `my_string` used here but it isn't initialized
+ |
+ = 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 assigning a value
+ |
+LL | let my_string: String = Default::default();
+ | ++++++++++++++++++++
+
+error[E0381]: used binding `my_int` isn't initialized
+ --> $DIR/suggest-assign-rvalue.rs:45:28
+ |
+LL | let my_int: &i32;
+ | ------ binding declared here but left uninitialized
+LL | println!("my_int: {}", *my_int);
+ | ^^^^^^^ `*my_int` used here but it isn't initialized
+ |
+ = 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 assigning a value
+ |
+LL | let my_int: &i32 = todo!();
+ | +++++++++
+
+error[E0381]: used binding `hello` isn't initialized
+ --> $DIR/suggest-assign-rvalue.rs:49:27
+ |
+LL | let hello: &str;
+ | ----- binding declared here but left uninitialized
+LL | println!("hello: {}", hello);
+ | ^^^^^ `hello` used here but it isn't initialized
+ |
+ = 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 assigning a value
+ |
+LL | let hello: &str = todo!();
+ | +++++++++
+
+error[E0381]: used binding `never` isn't initialized
+ --> $DIR/suggest-assign-rvalue.rs:53:27
+ |
+LL | let never: !;
+ | ----- binding declared here but left uninitialized
+LL | println!("never: {}", never);
+ | ^^^^^ `never` used here but it isn't initialized
+ |
+ = 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)
+
+error: aborting due to 10 previous errors
+
+For more information about this error, try `rustc --explain E0381`.