summaryrefslogtreecommitdiffstats
path: root/src/test/ui/borrowck/suggest-assign-rvalue.rs
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 /src/test/ui/borrowck/suggest-assign-rvalue.rs
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 'src/test/ui/borrowck/suggest-assign-rvalue.rs')
-rw-r--r--src/test/ui/borrowck/suggest-assign-rvalue.rs57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/test/ui/borrowck/suggest-assign-rvalue.rs b/src/test/ui/borrowck/suggest-assign-rvalue.rs
deleted file mode 100644
index aaca9d47f..000000000
--- a/src/test/ui/borrowck/suggest-assign-rvalue.rs
+++ /dev/null
@@ -1,57 +0,0 @@
-#![allow(dead_code)]
-#![feature(never_type)]
-
-#[derive(Debug, Default)]
-struct Demo {}
-
-#[derive(Debug)]
-struct DemoNoDef {}
-
-fn apple(_: u32) {}
-
-fn banana() {
- let chaenomeles;
- apple(chaenomeles);
- //~^ ERROR used binding `chaenomeles` isn't initialized [E0381]
-}
-
-fn main() {
- let my_bool: bool = bool::default();
- println!("my_bool: {}", my_bool);
-
- let my_float: f32;
- println!("my_float: {}", my_float);
- //~^ ERROR used binding `my_float` isn't initialized
- let demo: Demo;
- println!("demo: {:?}", demo);
- //~^ ERROR used binding `demo` isn't initialized
-
- let demo_no: DemoNoDef;
- println!("demo_no: {:?}", demo_no);
- //~^ ERROR used binding `demo_no` isn't initialized
-
- let arr: [i32; 5];
- println!("arr: {:?}", arr);
- //~^ ERROR used binding `arr` isn't initialized
- let foo: Vec<&str>;
- println!("foo: {:?}", foo);
- //~^ ERROR used binding `foo` isn't initialized
-
- let my_string: String;
- println!("my_string: {}", my_string);
- //~^ ERROR used binding `my_string` isn't initialized
-
- let my_int: &i32;
- println!("my_int: {}", *my_int);
- //~^ ERROR used binding `my_int` isn't initialized
-
- let hello: &str;
- println!("hello: {}", hello);
- //~^ ERROR used binding `hello` isn't initialized
-
- let never: !;
- println!("never: {}", never);
- //~^ ERROR used binding `never` isn't initialized [E0381]
-
- banana();
-}