about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2022-02-13 16:27:59 +0100
committerCamille GILLOT <gillot.camille@gmail.com>2022-07-01 17:39:19 +0200
commit42e4eee8931479a02c11c88ddaddb3a494e136c6 (patch)
treea1b3bade4e24fbe6bbcff84376aed94bc6505257 /src/test/ui/error-codes
parentca1e68b3229e710c3948a361ee770d846a88e6da (diff)
downloadrust-42e4eee8931479a02c11c88ddaddb3a494e136c6.tar.gz
rust-42e4eee8931479a02c11c88ddaddb3a494e136c6.zip
Shorten def_span for more items.
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0004-2.stderr19
-rw-r--r--src/test/ui/error-codes/E0005.stderr15
-rw-r--r--src/test/ui/error-codes/E0017.stderr4
-rw-r--r--src/test/ui/error-codes/E0075.stderr2
-rw-r--r--src/test/ui/error-codes/E0076.stderr2
-rw-r--r--src/test/ui/error-codes/E0077.stderr2
-rw-r--r--src/test/ui/error-codes/E0152.stderr2
-rw-r--r--src/test/ui/error-codes/E0191.stderr2
-rw-r--r--src/test/ui/error-codes/E0201.stderr4
-rw-r--r--src/test/ui/error-codes/E0220.stderr2
-rw-r--r--src/test/ui/error-codes/E0221.stderr6
-rw-r--r--src/test/ui/error-codes/E0264.stderr2
-rw-r--r--src/test/ui/error-codes/E0297.stderr15
-rw-r--r--src/test/ui/error-codes/E0374.stderr5
-rw-r--r--src/test/ui/error-codes/E0376.stderr2
-rw-r--r--src/test/ui/error-codes/E0388.stderr4
-rw-r--r--src/test/ui/error-codes/E0393.stderr2
-rw-r--r--src/test/ui/error-codes/E0445.stderr4
-rw-r--r--src/test/ui/error-codes/E0446.stderr2
-rw-r--r--src/test/ui/error-codes/E0520.stderr10
20 files changed, 45 insertions, 61 deletions
diff --git a/src/test/ui/error-codes/E0004-2.stderr b/src/test/ui/error-codes/E0004-2.stderr
index d4519af5408..6f5bb4309c3 100644
--- a/src/test/ui/error-codes/E0004-2.stderr
+++ b/src/test/ui/error-codes/E0004-2.stderr
@@ -7,17 +7,14 @@ LL |     match x { }
 note: `Option<i32>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL | / pub enum Option<T> {
-LL | |     /// No value.
-LL | |     #[lang = "None"]
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     None,
-   | |     ^^^^ not covered
-...  |
-LL | |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
-   | |     ^^^^ not covered
-LL | | }
-   | |_-
+LL | pub enum Option<T> {
+   | ------------------
+...
+LL |     None,
+   |     ^^^^ not covered
+...
+LL |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+   |     ^^^^ not covered
    = note: the matched value is of type `Option<i32>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
diff --git a/src/test/ui/error-codes/E0005.stderr b/src/test/ui/error-codes/E0005.stderr
index 55b1112b5f8..f01a77bd374 100644
--- a/src/test/ui/error-codes/E0005.stderr
+++ b/src/test/ui/error-codes/E0005.stderr
@@ -9,16 +9,11 @@ LL |     let Some(y) = x;
 note: `Option<i32>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL | / pub enum Option<T> {
-LL | |     /// No value.
-LL | |     #[lang = "None"]
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     None,
-   | |     ^^^^ not covered
-...  |
-LL | |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
-LL | | }
-   | |_-
+LL | pub enum Option<T> {
+   | ------------------
+...
+LL |     None,
+   |     ^^^^ not covered
    = note: the matched value is of type `Option<i32>`
 help: you might want to use `if let` to ignore the variant that isn't matched
    |
diff --git a/src/test/ui/error-codes/E0017.stderr b/src/test/ui/error-codes/E0017.stderr
index 7d959b6d148..830e4db345a 100644
--- a/src/test/ui/error-codes/E0017.stderr
+++ b/src/test/ui/error-codes/E0017.stderr
@@ -11,7 +11,7 @@ note: `const` item defined here
   --> $DIR/E0017.rs:2:1
    |
 LL | const C: i32 = 2;
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0764]: mutable references are not allowed in the final value of constants
   --> $DIR/E0017.rs:5:30
@@ -52,7 +52,7 @@ note: `const` item defined here
   --> $DIR/E0017.rs:2:1
    |
 LL | const C: i32 = 2;
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0764]: mutable references are not allowed in the final value of statics
   --> $DIR/E0017.rs:11:38
diff --git a/src/test/ui/error-codes/E0075.stderr b/src/test/ui/error-codes/E0075.stderr
index d8b90d0691d..3f927726a03 100644
--- a/src/test/ui/error-codes/E0075.stderr
+++ b/src/test/ui/error-codes/E0075.stderr
@@ -2,7 +2,7 @@ error[E0075]: SIMD vector cannot be empty
   --> $DIR/E0075.rs:4:1
    |
 LL | struct Bad;
-   | ^^^^^^^^^^^
+   | ^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0076.stderr b/src/test/ui/error-codes/E0076.stderr
index 2c2842d152b..7d4ff879816 100644
--- a/src/test/ui/error-codes/E0076.stderr
+++ b/src/test/ui/error-codes/E0076.stderr
@@ -2,7 +2,7 @@ error[E0076]: SIMD vector should be homogeneous
   --> $DIR/E0076.rs:4:1
    |
 LL | struct Bad(u16, u32, u32);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ SIMD elements must have the same type
+   | ^^^^^^^^^^ SIMD elements must have the same type
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0077.stderr b/src/test/ui/error-codes/E0077.stderr
index 1938a9a272a..9a84b2ec406 100644
--- a/src/test/ui/error-codes/E0077.stderr
+++ b/src/test/ui/error-codes/E0077.stderr
@@ -2,7 +2,7 @@ error[E0077]: SIMD vector element type should be a primitive scalar (integer/flo
   --> $DIR/E0077.rs:4:1
    |
 LL | struct Bad(String);
-   | ^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0152.stderr b/src/test/ui/error-codes/E0152.stderr
index 5cdfe1cc556..29f7e4ad683 100644
--- a/src/test/ui/error-codes/E0152.stderr
+++ b/src/test/ui/error-codes/E0152.stderr
@@ -2,7 +2,7 @@ error[E0152]: found duplicate lang item `owned_box`
   --> $DIR/E0152.rs:5:1
    |
 LL | struct Foo<T>(T);
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^
    |
    = note: the lang item is first defined in crate `alloc` (which `std` depends on)
    = note: first definition in `alloc` loaded from SYSROOT/liballoc-*.rlib
diff --git a/src/test/ui/error-codes/E0191.stderr b/src/test/ui/error-codes/E0191.stderr
index d69a14916e1..cf80c9c46ca 100644
--- a/src/test/ui/error-codes/E0191.stderr
+++ b/src/test/ui/error-codes/E0191.stderr
@@ -2,7 +2,7 @@ error[E0191]: the value of the associated type `Bar` (from trait `Trait`) must b
   --> $DIR/E0191.rs:5:16
    |
 LL |     type Bar;
-   |     --------- `Bar` defined here
+   |     -------- `Bar` defined here
 ...
 LL | type Foo = dyn Trait;
    |                ^^^^^ help: specify the associated type: `Trait<Bar = Type>`
diff --git a/src/test/ui/error-codes/E0201.stderr b/src/test/ui/error-codes/E0201.stderr
index af029603fa1..94e06894144 100644
--- a/src/test/ui/error-codes/E0201.stderr
+++ b/src/test/ui/error-codes/E0201.stderr
@@ -18,10 +18,10 @@ error[E0201]: duplicate definitions with name `Quux`:
   --> $DIR/E0201.rs:18:5
    |
 LL |     type Quux = u32;
-   |     ---------------- previous definition of `Quux` here
+   |     --------- previous definition of `Quux` here
 ...
 LL |     type Quux = u32;
-   |     ^^^^^^^^^^^^^^^^ duplicate definition
+   |     ^^^^^^^^^ duplicate definition
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/error-codes/E0220.stderr b/src/test/ui/error-codes/E0220.stderr
index 4fa83d8bf6e..11763ce788d 100644
--- a/src/test/ui/error-codes/E0220.stderr
+++ b/src/test/ui/error-codes/E0220.stderr
@@ -8,7 +8,7 @@ error[E0191]: the value of the associated type `Bar` (from trait `Trait`) must b
   --> $DIR/E0220.rs:5:16
    |
 LL |     type Bar;
-   |     --------- `Bar` defined here
+   |     -------- `Bar` defined here
 ...
 LL | type Foo = dyn Trait<F=i32>;
    |                ^^^^^^^^^^^^ help: specify the associated type: `Trait<F=i32, Bar = Type>`
diff --git a/src/test/ui/error-codes/E0221.stderr b/src/test/ui/error-codes/E0221.stderr
index f3dbf122de3..5414d77ad7c 100644
--- a/src/test/ui/error-codes/E0221.stderr
+++ b/src/test/ui/error-codes/E0221.stderr
@@ -2,10 +2,10 @@ error[E0221]: ambiguous associated type `A` in bounds of `Self`
   --> $DIR/E0221.rs:11:16
    |
 LL |     type A: T1;
-   |     ----------- ambiguous `A` from `Foo`
+   |     ---------- ambiguous `A` from `Foo`
 ...
 LL |     type A: T2;
-   |     ----------- ambiguous `A` from `Bar`
+   |     ---------- ambiguous `A` from `Bar`
 LL |     fn do_something() {
 LL |         let _: Self::A;
    |                ^^^^^^^ ambiguous associated type `A`
@@ -23,7 +23,7 @@ error[E0221]: ambiguous associated type `Err` in bounds of `Self`
   --> $DIR/E0221.rs:21:16
    |
 LL |     type Err: T3;
-   |     ------------- ambiguous `Err` from `My`
+   |     ------------ ambiguous `Err` from `My`
 LL |     fn test() {
 LL |         let _: Self::Err;
    |                ^^^^^^^^^ ambiguous associated type `Err`
diff --git a/src/test/ui/error-codes/E0264.stderr b/src/test/ui/error-codes/E0264.stderr
index 403c0aa4146..e8e35a12cbb 100644
--- a/src/test/ui/error-codes/E0264.stderr
+++ b/src/test/ui/error-codes/E0264.stderr
@@ -2,7 +2,7 @@ error[E0264]: unknown external lang item: `cake`
   --> $DIR/E0264.rs:5:5
    |
 LL |     fn cake();
-   |     ^^^^^^^^^^
+   |     ^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0297.stderr b/src/test/ui/error-codes/E0297.stderr
index 95d95003c61..693b079238d 100644
--- a/src/test/ui/error-codes/E0297.stderr
+++ b/src/test/ui/error-codes/E0297.stderr
@@ -7,16 +7,11 @@ LL |     for Some(x) in xs {}
 note: `Option<i32>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL | / pub enum Option<T> {
-LL | |     /// No value.
-LL | |     #[lang = "None"]
-LL | |     #[stable(feature = "rust1", since = "1.0.0")]
-LL | |     None,
-   | |     ^^^^ not covered
-...  |
-LL | |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
-LL | | }
-   | |_-
+LL | pub enum Option<T> {
+   | ------------------
+...
+LL |     None,
+   |     ^^^^ not covered
    = note: the matched value is of type `Option<i32>`
 
 error: aborting due to previous error
diff --git a/src/test/ui/error-codes/E0374.stderr b/src/test/ui/error-codes/E0374.stderr
index 7ab0f82fc23..68e15e6f8fe 100644
--- a/src/test/ui/error-codes/E0374.stderr
+++ b/src/test/ui/error-codes/E0374.stderr
@@ -1,9 +1,8 @@
 error[E0374]: the trait `CoerceUnsized` may only be implemented for a coercion between structures with one field being coerced, none found
   --> $DIR/E0374.rs:8:1
    |
-LL | / impl<T, U> CoerceUnsized<Foo<U>> for Foo<T>
-LL | |     where T: CoerceUnsized<U> {}
-   | |________________________________^
+LL | impl<T, U> CoerceUnsized<Foo<U>> for Foo<T>
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0376.stderr b/src/test/ui/error-codes/E0376.stderr
index 015448c39ea..e91efb045c1 100644
--- a/src/test/ui/error-codes/E0376.stderr
+++ b/src/test/ui/error-codes/E0376.stderr
@@ -2,7 +2,7 @@ error[E0376]: the trait `CoerceUnsized` may only be implemented for a coercion b
   --> $DIR/E0376.rs:8:1
    |
 LL | impl<T, U> CoerceUnsized<U> for Foo<T> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0388.stderr b/src/test/ui/error-codes/E0388.stderr
index 4886a156d2e..106efc19ac9 100644
--- a/src/test/ui/error-codes/E0388.stderr
+++ b/src/test/ui/error-codes/E0388.stderr
@@ -11,7 +11,7 @@ note: `const` item defined here
   --> $DIR/E0388.rs:2:1
    |
 LL | const C: i32 = 2;
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0764]: mutable references are not allowed in the final value of constants
   --> $DIR/E0388.rs:4:30
@@ -52,7 +52,7 @@ note: `const` item defined here
   --> $DIR/E0388.rs:2:1
    |
 LL | const C: i32 = 2;
-   | ^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^
 
 error[E0764]: mutable references are not allowed in the final value of statics
   --> $DIR/E0388.rs:10:38
diff --git a/src/test/ui/error-codes/E0393.stderr b/src/test/ui/error-codes/E0393.stderr
index 8aadf5c8b47..d9f70b72930 100644
--- a/src/test/ui/error-codes/E0393.stderr
+++ b/src/test/ui/error-codes/E0393.stderr
@@ -2,7 +2,7 @@ error[E0393]: the type parameter `T` must be explicitly specified
   --> $DIR/E0393.rs:3:47
    |
 LL | trait A<T=Self> {}
-   | ------------------ type parameter `T` must be specified for this
+   | --------------- type parameter `T` must be specified for this
 LL |
 LL | fn together_we_will_rule_the_galaxy(son: &dyn A) {}
    |                                               ^ help: set the type parameter to the desired type: `A<T>`
diff --git a/src/test/ui/error-codes/E0445.stderr b/src/test/ui/error-codes/E0445.stderr
index 1a66e0a2f97..23b7a335047 100644
--- a/src/test/ui/error-codes/E0445.stderr
+++ b/src/test/ui/error-codes/E0445.stderr
@@ -5,7 +5,7 @@ LL | trait Foo {
    | --------- `Foo` declared as private
 ...
 LL | pub trait Bar : Foo {}
-   | ^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
+   | ^^^^^^^^^^^^^^^^^^^ can't leak private trait
 
 error[E0445]: private trait `Foo` in public interface
   --> $DIR/E0445.rs:7:1
@@ -14,7 +14,7 @@ LL | trait Foo {
    | --------- `Foo` declared as private
 ...
 LL | pub struct Bar2<T: Foo>(pub T);
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
+   | ^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
 
 error[E0445]: private trait `Foo` in public interface
   --> $DIR/E0445.rs:9:1
diff --git a/src/test/ui/error-codes/E0446.stderr b/src/test/ui/error-codes/E0446.stderr
index 35e79e448d5..b6a195c40a9 100644
--- a/src/test/ui/error-codes/E0446.stderr
+++ b/src/test/ui/error-codes/E0446.stderr
@@ -2,7 +2,7 @@ error[E0446]: private type `Bar` in public interface
   --> $DIR/E0446.rs:4:5
    |
 LL |     struct Bar(u32);
-   |     ---------------- `Bar` declared as private
+   |     ---------- `Bar` declared as private
 LL |
 LL |     pub fn bar() -> Bar {
    |     ^^^^^^^^^^^^^^^^^^^ can't leak private type
diff --git a/src/test/ui/error-codes/E0520.stderr b/src/test/ui/error-codes/E0520.stderr
index be7b95465a5..65ebfcdbe32 100644
--- a/src/test/ui/error-codes/E0520.stderr
+++ b/src/test/ui/error-codes/E0520.stderr
@@ -11,13 +11,11 @@ LL | #![feature(specialization)]
 error[E0520]: `fly` specializes an item from a parent `impl`, but that item is not marked `default`
   --> $DIR/E0520.rs:17:5
    |
-LL | / impl<T: Clone> SpaceLlama for T {
-LL | |     fn fly(&self) {}
-LL | | }
-   | |_- parent `impl` is here
+LL | impl<T: Clone> SpaceLlama for T {
+   | ------------------------------- parent `impl` is here
 ...
-LL |       default fn fly(&self) {}
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `fly`
+LL |     default fn fly(&self) {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `fly`
    |
    = note: to specialize, `fly` in the parent `impl` must be marked `default`