about summary refs log tree commit diff
path: root/tests/ui/missing
diff options
context:
space:
mode:
authorAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-01-05 09:13:28 +0100
committerAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-01-11 09:32:08 +0000
commitcf2dff2b1e3fa55fa5415d524200070d0d7aacfe (patch)
tree40a88d9a46aaf3e8870676eb2538378b75a263eb /tests/ui/missing
parentca855e6e42787ecd062d81d53336fe6788ef51a9 (diff)
downloadrust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.tar.gz
rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.zip
Move /src/test to /tests
Diffstat (limited to 'tests/ui/missing')
-rw-r--r--tests/ui/missing/auxiliary/two_macros.rs5
-rw-r--r--tests/ui/missing/missing-allocator.rs18
-rw-r--r--tests/ui/missing/missing-allocator.stderr4
-rw-r--r--tests/ui/missing/missing-block-hint.rs9
-rw-r--r--tests/ui/missing/missing-block-hint.stderr30
-rw-r--r--tests/ui/missing/missing-comma-in-match.fixed11
-rw-r--r--tests/ui/missing/missing-comma-in-match.rs11
-rw-r--r--tests/ui/missing/missing-comma-in-match.stderr10
-rw-r--r--tests/ui/missing/missing-derivable-attr.rs16
-rw-r--r--tests/ui/missing/missing-derivable-attr.stderr12
-rw-r--r--tests/ui/missing/missing-fields-in-struct-pattern.rs8
-rw-r--r--tests/ui/missing/missing-fields-in-struct-pattern.stderr14
-rw-r--r--tests/ui/missing/missing-items/auxiliary/m1.rs9
-rw-r--r--tests/ui/missing/missing-items/m2.rs12
-rw-r--r--tests/ui/missing/missing-items/m2.stderr17
-rw-r--r--tests/ui/missing/missing-items/missing-type-parameter.rs5
-rw-r--r--tests/ui/missing/missing-items/missing-type-parameter.stderr14
-rw-r--r--tests/ui/missing/missing-items/missing-type-parameter2.rs19
-rw-r--r--tests/ui/missing/missing-items/missing-type-parameter2.stderr121
-rw-r--r--tests/ui/missing/missing-macro-use.rs8
-rw-r--r--tests/ui/missing/missing-macro-use.stderr11
-rw-r--r--tests/ui/missing/missing-main.rs2
-rw-r--r--tests/ui/missing/missing-main.stderr9
-rw-r--r--tests/ui/missing/missing-return.rs5
-rw-r--r--tests/ui/missing/missing-return.stderr11
-rw-r--r--tests/ui/missing/missing-stability.rs24
-rw-r--r--tests/ui/missing/missing-stability.stderr17
27 files changed, 432 insertions, 0 deletions
diff --git a/tests/ui/missing/auxiliary/two_macros.rs b/tests/ui/missing/auxiliary/two_macros.rs
new file mode 100644
index 00000000000..2330c75c8e0
--- /dev/null
+++ b/tests/ui/missing/auxiliary/two_macros.rs
@@ -0,0 +1,5 @@
+#[macro_export]
+macro_rules! macro_one { () => ("one") }
+
+#[macro_export]
+macro_rules! macro_two { () => ("two") }
diff --git a/tests/ui/missing/missing-allocator.rs b/tests/ui/missing/missing-allocator.rs
new file mode 100644
index 00000000000..2dc509f2c63
--- /dev/null
+++ b/tests/ui/missing/missing-allocator.rs
@@ -0,0 +1,18 @@
+// compile-flags: -C panic=abort
+// no-prefer-dynamic
+
+#![no_std]
+#![crate_type = "staticlib"]
+#![feature(alloc_error_handler)]
+
+#[panic_handler]
+fn panic(_: &core::panic::PanicInfo) -> ! {
+    loop {}
+}
+
+#[alloc_error_handler]
+fn oom(_: core::alloc::Layout) -> ! {
+    loop {}
+}
+
+extern crate alloc;
diff --git a/tests/ui/missing/missing-allocator.stderr b/tests/ui/missing/missing-allocator.stderr
new file mode 100644
index 00000000000..0da5651c18c
--- /dev/null
+++ b/tests/ui/missing/missing-allocator.stderr
@@ -0,0 +1,4 @@
+error: no global memory allocator found but one is required; link to std or add `#[global_allocator]` to a static item that implements the GlobalAlloc trait
+
+error: aborting due to previous error
+
diff --git a/tests/ui/missing/missing-block-hint.rs b/tests/ui/missing/missing-block-hint.rs
new file mode 100644
index 00000000000..89db02a9cba
--- /dev/null
+++ b/tests/ui/missing/missing-block-hint.rs
@@ -0,0 +1,9 @@
+fn main() {
+    {
+        if (foo) => {} //~ ERROR expected `{`, found `=>`
+    }
+    {
+        if (foo)
+            bar; //~ ERROR expected `{`, found `bar`
+    }
+}
diff --git a/tests/ui/missing/missing-block-hint.stderr b/tests/ui/missing/missing-block-hint.stderr
new file mode 100644
index 00000000000..16954223a45
--- /dev/null
+++ b/tests/ui/missing/missing-block-hint.stderr
@@ -0,0 +1,30 @@
+error: expected `{`, found `=>`
+  --> $DIR/missing-block-hint.rs:3:18
+   |
+LL |         if (foo) => {}
+   |                  ^^ expected `{`
+   |
+note: the `if` expression is missing a block after this condition
+  --> $DIR/missing-block-hint.rs:3:12
+   |
+LL |         if (foo) => {}
+   |            ^^^^^
+
+error: expected `{`, found `bar`
+  --> $DIR/missing-block-hint.rs:7:13
+   |
+LL |             bar;
+   |             ^^^ expected `{`
+   |
+note: the `if` expression is missing a block after this condition
+  --> $DIR/missing-block-hint.rs:6:12
+   |
+LL |         if (foo)
+   |            ^^^^^
+help: try placing this code inside a block
+   |
+LL |             { bar; }
+   |             +      +
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/missing/missing-comma-in-match.fixed b/tests/ui/missing/missing-comma-in-match.fixed
new file mode 100644
index 00000000000..f091082f35f
--- /dev/null
+++ b/tests/ui/missing/missing-comma-in-match.fixed
@@ -0,0 +1,11 @@
+// run-rustfix
+
+fn main() {
+    match &Some(3) {
+        &None => 1,
+        &Some(2) => { 3 }
+        //~^ ERROR expected one of `,`, `.`, `?`, `}`, or an operator, found `=>`
+        //~| NOTE expected one of `,`, `.`, `?`, `}`, or an operator
+        _ => 2
+    };
+}
diff --git a/tests/ui/missing/missing-comma-in-match.rs b/tests/ui/missing/missing-comma-in-match.rs
new file mode 100644
index 00000000000..54dab4e9750
--- /dev/null
+++ b/tests/ui/missing/missing-comma-in-match.rs
@@ -0,0 +1,11 @@
+// run-rustfix
+
+fn main() {
+    match &Some(3) {
+        &None => 1
+        &Some(2) => { 3 }
+        //~^ ERROR expected one of `,`, `.`, `?`, `}`, or an operator, found `=>`
+        //~| NOTE expected one of `,`, `.`, `?`, `}`, or an operator
+        _ => 2
+    };
+}
diff --git a/tests/ui/missing/missing-comma-in-match.stderr b/tests/ui/missing/missing-comma-in-match.stderr
new file mode 100644
index 00000000000..fe210f697c4
--- /dev/null
+++ b/tests/ui/missing/missing-comma-in-match.stderr
@@ -0,0 +1,10 @@
+error: expected one of `,`, `.`, `?`, `}`, or an operator, found `=>`
+  --> $DIR/missing-comma-in-match.rs:6:18
+   |
+LL |         &None => 1
+   |                   - help: missing a comma here to end this `match` arm
+LL |         &Some(2) => { 3 }
+   |                  ^^ expected one of `,`, `.`, `?`, `}`, or an operator
+
+error: aborting due to previous error
+
diff --git a/tests/ui/missing/missing-derivable-attr.rs b/tests/ui/missing/missing-derivable-attr.rs
new file mode 100644
index 00000000000..58c94de5059
--- /dev/null
+++ b/tests/ui/missing/missing-derivable-attr.rs
@@ -0,0 +1,16 @@
+trait MyEq {
+    fn eq(&self, other: &Self) -> bool;
+}
+
+struct A {
+    x: isize
+}
+
+impl MyEq for isize {
+    fn eq(&self, other: &isize) -> bool { *self == *other }
+}
+
+impl MyEq for A {}  //~ ERROR not all trait items implemented, missing: `eq`
+
+fn main() {
+}
diff --git a/tests/ui/missing/missing-derivable-attr.stderr b/tests/ui/missing/missing-derivable-attr.stderr
new file mode 100644
index 00000000000..9b8c0c583a1
--- /dev/null
+++ b/tests/ui/missing/missing-derivable-attr.stderr
@@ -0,0 +1,12 @@
+error[E0046]: not all trait items implemented, missing: `eq`
+  --> $DIR/missing-derivable-attr.rs:13:1
+   |
+LL |     fn eq(&self, other: &Self) -> bool;
+   |     ----------------------------------- `eq` from trait
+...
+LL | impl MyEq for A {}
+   | ^^^^^^^^^^^^^^^ missing `eq` in implementation
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/missing/missing-fields-in-struct-pattern.rs b/tests/ui/missing/missing-fields-in-struct-pattern.rs
new file mode 100644
index 00000000000..40304a674a6
--- /dev/null
+++ b/tests/ui/missing/missing-fields-in-struct-pattern.rs
@@ -0,0 +1,8 @@
+struct S(usize, usize, usize, usize);
+
+fn main() {
+    if let S { a, b, c, d } = S(1, 2, 3, 4) {
+    //~^ ERROR tuple variant `S` written as struct variant
+        println!("hi");
+    }
+}
diff --git a/tests/ui/missing/missing-fields-in-struct-pattern.stderr b/tests/ui/missing/missing-fields-in-struct-pattern.stderr
new file mode 100644
index 00000000000..1fe9f5299aa
--- /dev/null
+++ b/tests/ui/missing/missing-fields-in-struct-pattern.stderr
@@ -0,0 +1,14 @@
+error[E0769]: tuple variant `S` written as struct variant
+  --> $DIR/missing-fields-in-struct-pattern.rs:4:12
+   |
+LL |     if let S { a, b, c, d } = S(1, 2, 3, 4) {
+   |            ^^^^^^^^^^^^^^^^
+   |
+help: use the tuple variant pattern syntax instead
+   |
+LL |     if let S(a, b, c, d) = S(1, 2, 3, 4) {
+   |             ~~~~~~~~~~~~
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0769`.
diff --git a/tests/ui/missing/missing-items/auxiliary/m1.rs b/tests/ui/missing/missing-items/auxiliary/m1.rs
new file mode 100644
index 00000000000..fcf52c9e887
--- /dev/null
+++ b/tests/ui/missing/missing-items/auxiliary/m1.rs
@@ -0,0 +1,9 @@
+pub trait X {
+    const CONSTANT: u32;
+    type Type;
+    fn method(&self, s: String) -> Self::Type;
+    fn method2(self: Box<Self>, s: String) -> Self::Type;
+    fn method3(other: &Self, s: String) -> Self::Type;
+    fn method4(&self, other: &Self) -> Self::Type;
+    fn method5(self: &Box<Self>) -> Self::Type;
+}
diff --git a/tests/ui/missing/missing-items/m2.rs b/tests/ui/missing/missing-items/m2.rs
new file mode 100644
index 00000000000..c2a6914abc9
--- /dev/null
+++ b/tests/ui/missing/missing-items/m2.rs
@@ -0,0 +1,12 @@
+// aux-build:m1.rs
+
+
+extern crate m1;
+
+struct X {
+}
+
+impl m1::X for X { //~ ERROR not all trait items implemented
+}
+
+fn main() {}
diff --git a/tests/ui/missing/missing-items/m2.stderr b/tests/ui/missing/missing-items/m2.stderr
new file mode 100644
index 00000000000..d18fb443aa4
--- /dev/null
+++ b/tests/ui/missing/missing-items/m2.stderr
@@ -0,0 +1,17 @@
+error[E0046]: not all trait items implemented, missing: `CONSTANT`, `Type`, `method`, `method2`, `method3`, `method4`, `method5`
+  --> $DIR/m2.rs:9:1
+   |
+LL | impl m1::X for X {
+   | ^^^^^^^^^^^^^^^^ missing `CONSTANT`, `Type`, `method`, `method2`, `method3`, `method4`, `method5` in implementation
+   |
+   = help: implement the missing item: `const CONSTANT: u32 = 42;`
+   = help: implement the missing item: `type Type = Type;`
+   = help: implement the missing item: `fn method(&self, _: String) -> <Self as m1::X>::Type { todo!() }`
+   = help: implement the missing item: `fn method2(self: Box<Self>, _: String) -> <Self as m1::X>::Type { todo!() }`
+   = help: implement the missing item: `fn method3(_: &Self, _: String) -> <Self as m1::X>::Type { todo!() }`
+   = help: implement the missing item: `fn method4(&self, _: &Self) -> <Self as m1::X>::Type { todo!() }`
+   = help: implement the missing item: `fn method5(self: &Box<Self>) -> <Self as m1::X>::Type { todo!() }`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/missing/missing-items/missing-type-parameter.rs b/tests/ui/missing/missing-items/missing-type-parameter.rs
new file mode 100644
index 00000000000..8a64053a4f0
--- /dev/null
+++ b/tests/ui/missing/missing-items/missing-type-parameter.rs
@@ -0,0 +1,5 @@
+fn foo<X>() { }
+
+fn main() {
+    foo(); //~ ERROR type annotations needed
+}
diff --git a/tests/ui/missing/missing-items/missing-type-parameter.stderr b/tests/ui/missing/missing-items/missing-type-parameter.stderr
new file mode 100644
index 00000000000..722539fca6b
--- /dev/null
+++ b/tests/ui/missing/missing-items/missing-type-parameter.stderr
@@ -0,0 +1,14 @@
+error[E0282]: type annotations needed
+  --> $DIR/missing-type-parameter.rs:4:5
+   |
+LL |     foo();
+   |     ^^^ cannot infer type of the type parameter `X` declared on the function `foo`
+   |
+help: consider specifying the generic argument
+   |
+LL |     foo::<X>();
+   |        +++++
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/missing/missing-items/missing-type-parameter2.rs b/tests/ui/missing/missing-items/missing-type-parameter2.rs
new file mode 100644
index 00000000000..e9b32fb7198
--- /dev/null
+++ b/tests/ui/missing/missing-items/missing-type-parameter2.rs
@@ -0,0 +1,19 @@
+struct X<const N: u8>();
+
+impl X<N> {}
+//~^ ERROR cannot find type `N` in this scope
+//~| ERROR unresolved item provided when a constant was expected
+impl<T, const A: u8 = 2> X<N> {}
+//~^ ERROR cannot find type `N` in this scope
+//~| ERROR defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+//~| ERROR unresolved item provided when a constant was expected
+
+fn foo(_: T) where T: Send {}
+//~^ ERROR cannot find type `T` in this scope
+//~| ERROR cannot find type `T` in this scope
+
+fn bar<const N: u8>(_: A) {}
+//~^ ERROR cannot find type `A` in this scope
+
+fn main() {
+}
diff --git a/tests/ui/missing/missing-items/missing-type-parameter2.stderr b/tests/ui/missing/missing-items/missing-type-parameter2.stderr
new file mode 100644
index 00000000000..f33951c98bf
--- /dev/null
+++ b/tests/ui/missing/missing-items/missing-type-parameter2.stderr
@@ -0,0 +1,121 @@
+error[E0412]: cannot find type `N` in this scope
+  --> $DIR/missing-type-parameter2.rs:3:8
+   |
+LL | struct X<const N: u8>();
+   | ------------------------ similarly named struct `X` defined here
+LL |
+LL | impl X<N> {}
+   |        ^
+   |
+help: a struct with a similar name exists
+   |
+LL | impl X<X> {}
+   |        ~
+help: you might be missing a type parameter
+   |
+LL | impl<N> X<N> {}
+   |     +++
+
+error[E0412]: cannot find type `N` in this scope
+  --> $DIR/missing-type-parameter2.rs:6:28
+   |
+LL | impl<T, const A: u8 = 2> X<N> {}
+   |      -                     ^
+   |      |
+   |      similarly named type parameter `T` defined here
+   |
+help: a type parameter with a similar name exists
+   |
+LL | impl<T, const A: u8 = 2> X<T> {}
+   |                            ~
+help: you might be missing a type parameter
+   |
+LL | impl<T, const A: u8 = 2, N> X<N> {}
+   |                        +++
+
+error[E0412]: cannot find type `T` in this scope
+  --> $DIR/missing-type-parameter2.rs:11:20
+   |
+LL | struct X<const N: u8>();
+   | ------------------------ similarly named struct `X` defined here
+...
+LL | fn foo(_: T) where T: Send {}
+   |                    ^
+   |
+help: a struct with a similar name exists
+   |
+LL | fn foo(_: T) where X: Send {}
+   |                    ~
+help: you might be missing a type parameter
+   |
+LL | fn foo<T>(_: T) where T: Send {}
+   |       +++
+
+error[E0412]: cannot find type `T` in this scope
+  --> $DIR/missing-type-parameter2.rs:11:11
+   |
+LL | struct X<const N: u8>();
+   | ------------------------ similarly named struct `X` defined here
+...
+LL | fn foo(_: T) where T: Send {}
+   |           ^
+   |
+help: a struct with a similar name exists
+   |
+LL | fn foo(_: X) where T: Send {}
+   |           ~
+help: you might be missing a type parameter
+   |
+LL | fn foo<T>(_: T) where T: Send {}
+   |       +++
+
+error[E0412]: cannot find type `A` in this scope
+  --> $DIR/missing-type-parameter2.rs:15:24
+   |
+LL | struct X<const N: u8>();
+   | ------------------------ similarly named struct `X` defined here
+...
+LL | fn bar<const N: u8>(_: A) {}
+   |                        ^
+   |
+help: a struct with a similar name exists
+   |
+LL | fn bar<const N: u8>(_: X) {}
+   |                        ~
+help: you might be missing a type parameter
+   |
+LL | fn bar<const N: u8, A>(_: A) {}
+   |                   +++
+
+error[E0747]: unresolved item provided when a constant was expected
+  --> $DIR/missing-type-parameter2.rs:3:8
+   |
+LL | impl X<N> {}
+   |        ^
+   |
+help: if this generic argument was intended as a const parameter, surround it with braces
+   |
+LL | impl X<{ N }> {}
+   |        +   +
+
+error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
+  --> $DIR/missing-type-parameter2.rs:6:9
+   |
+LL | impl<T, const A: u8 = 2> X<N> {}
+   |         ^^^^^^^^^^^^^^^
+
+error[E0747]: unresolved item provided when a constant was expected
+  --> $DIR/missing-type-parameter2.rs:6:28
+   |
+LL | impl<T, const A: u8 = 2> X<N> {}
+   |                            ^
+   |
+help: if this generic argument was intended as a const parameter, surround it with braces
+   |
+LL | impl<T, const A: u8 = 2> X<{ N }> {}
+   |                            +   +
+
+error: aborting due to 8 previous errors
+
+Some errors have detailed explanations: E0412, E0747.
+For more information about an error, try `rustc --explain E0412`.
diff --git a/tests/ui/missing/missing-macro-use.rs b/tests/ui/missing/missing-macro-use.rs
new file mode 100644
index 00000000000..d494c4471a3
--- /dev/null
+++ b/tests/ui/missing/missing-macro-use.rs
@@ -0,0 +1,8 @@
+// aux-build:two_macros.rs
+
+extern crate two_macros;
+
+pub fn main() {
+    macro_two!();
+    //~^ ERROR cannot find macro `macro_two` in this scope
+}
diff --git a/tests/ui/missing/missing-macro-use.stderr b/tests/ui/missing/missing-macro-use.stderr
new file mode 100644
index 00000000000..ced062269df
--- /dev/null
+++ b/tests/ui/missing/missing-macro-use.stderr
@@ -0,0 +1,11 @@
+error: cannot find macro `macro_two` in this scope
+  --> $DIR/missing-macro-use.rs:6:5
+   |
+LL |     macro_two!();
+   |     ^^^^^^^^^
+   |
+   = note: consider importing this macro:
+           two_macros::macro_two
+
+error: aborting due to previous error
+
diff --git a/tests/ui/missing/missing-main.rs b/tests/ui/missing/missing-main.rs
new file mode 100644
index 00000000000..6ad54453309
--- /dev/null
+++ b/tests/ui/missing/missing-main.rs
@@ -0,0 +1,2 @@
+// error-pattern: `main` function not found
+fn mian() { }
diff --git a/tests/ui/missing/missing-main.stderr b/tests/ui/missing/missing-main.stderr
new file mode 100644
index 00000000000..5113dc6ec08
--- /dev/null
+++ b/tests/ui/missing/missing-main.stderr
@@ -0,0 +1,9 @@
+error[E0601]: `main` function not found in crate `missing_main`
+  --> $DIR/missing-main.rs:2:14
+   |
+LL | fn mian() { }
+   |              ^ consider adding a `main` function to `$DIR/missing-main.rs`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0601`.
diff --git a/tests/ui/missing/missing-return.rs b/tests/ui/missing/missing-return.rs
new file mode 100644
index 00000000000..6a171753d9e
--- /dev/null
+++ b/tests/ui/missing/missing-return.rs
@@ -0,0 +1,5 @@
+// error-pattern: return
+
+fn f() -> isize { }
+
+fn main() { f(); }
diff --git a/tests/ui/missing/missing-return.stderr b/tests/ui/missing/missing-return.stderr
new file mode 100644
index 00000000000..ff7f261e03c
--- /dev/null
+++ b/tests/ui/missing/missing-return.stderr
@@ -0,0 +1,11 @@
+error[E0308]: mismatched types
+  --> $DIR/missing-return.rs:3:11
+   |
+LL | fn f() -> isize { }
+   |    -      ^^^^^ expected `isize`, found `()`
+   |    |
+   |    implicitly returns `()` as its body has no tail or `return` expression
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/missing/missing-stability.rs b/tests/ui/missing/missing-stability.rs
new file mode 100644
index 00000000000..0da5808b47d
--- /dev/null
+++ b/tests/ui/missing/missing-stability.rs
@@ -0,0 +1,24 @@
+// Checks that exported items without stability attributes cause an error
+
+#![crate_type="lib"]
+#![feature(staged_api)]
+
+#![stable(feature = "stable_test_feature", since = "1.0.0")]
+
+pub fn unmarked() {
+    //~^ ERROR function has missing stability attribute
+    ()
+}
+
+#[unstable(feature = "unstable_test_feature", issue = "none")]
+pub mod foo {
+    // #[unstable] is inherited
+    pub fn unmarked() {}
+}
+
+#[stable(feature = "stable_test_feature", since="1.0.0")]
+pub mod bar {
+    // #[stable] is not inherited
+    pub fn unmarked() {}
+    //~^ ERROR function has missing stability attribute
+}
diff --git a/tests/ui/missing/missing-stability.stderr b/tests/ui/missing/missing-stability.stderr
new file mode 100644
index 00000000000..659f8c78cae
--- /dev/null
+++ b/tests/ui/missing/missing-stability.stderr
@@ -0,0 +1,17 @@
+error: function has missing stability attribute
+  --> $DIR/missing-stability.rs:8:1
+   |
+LL | / pub fn unmarked() {
+LL | |
+LL | |     ()
+LL | | }
+   | |_^
+
+error: function has missing stability attribute
+  --> $DIR/missing-stability.rs:22:5
+   |
+LL |     pub fn unmarked() {}
+   |     ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+