diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-07-16 16:54:47 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-09-01 20:13:16 +0200 |
| commit | 74fb87e3a0bb88cd3bd9857bedc236bda52a8af7 (patch) | |
| tree | 0d0cb93dccd8dabac1ebbc365c6122b99f4332b3 /src/test | |
| parent | ad3407f482d29f26c67700974d86f89b3f2ab993 (diff) | |
| download | rust-74fb87e3a0bb88cd3bd9857bedc236bda52a8af7.tar.gz rust-74fb87e3a0bb88cd3bd9857bedc236bda52a8af7.zip | |
Stop sorting bodies by span.
The definition order is already close to the span order, and only differs in corner cases.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/asm/type-check-1.stderr | 30 | ||||
| -rw-r--r-- | src/test/ui/borrowck/issue-64453.stderr | 12 | ||||
| -rw-r--r-- | src/test/ui/const-generics/type_mismatch.stderr | 12 | ||||
| -rw-r--r-- | src/test/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.mir.stderr | 12 | ||||
| -rw-r--r-- | src/test/ui/consts/issue-66693.stderr | 16 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-47486.stderr | 12 | ||||
| -rw-r--r-- | src/test/ui/liveness/liveness-return-last-stmt-semi.stderr | 28 | ||||
| -rw-r--r-- | src/test/ui/proc-macro/attribute-with-error.stderr | 16 | ||||
| -rw-r--r-- | src/test/ui/repeat_count.stderr | 12 | ||||
| -rw-r--r-- | src/test/ui/suggestions/impl-trait-with-missing-bounds.stderr | 34 | ||||
| -rw-r--r-- | src/test/ui/suggestions/suggest-ref-macro.stderr | 16 | ||||
| -rw-r--r-- | src/test/ui/union/union-derive-clone.mirunsafeck.stderr | 26 | ||||
| -rw-r--r-- | src/test/ui/union/union-derive-clone.thirunsafeck.stderr | 26 |
13 files changed, 126 insertions, 126 deletions
diff --git a/src/test/ui/asm/type-check-1.stderr b/src/test/ui/asm/type-check-1.stderr index ad981d93d51..5edbcf4a2a7 100644 --- a/src/test/ui/asm/type-check-1.stderr +++ b/src/test/ui/asm/type-check-1.stderr @@ -25,6 +25,21 @@ LL | let x = 0; LL | asm!("{}", const const_bar(x)); | ^ non-constant value +error[E0308]: mismatched types + --> $DIR/type-check-1.rs:48:26 + | +LL | asm!("{}", const 0f32); + | ^^^^ expected integer, found `f32` + +error[E0308]: mismatched types + --> $DIR/type-check-1.rs:50:26 + | +LL | asm!("{}", const 0 as *mut u8); + | ^^^^^^^^^^^^ expected integer, found *-ptr + | + = note: expected type `{integer}` + found raw pointer `*mut u8` + error: invalid asm output --> $DIR/type-check-1.rs:10:29 | @@ -65,21 +80,6 @@ LL | asm!("{}", inout(reg) v[..]); = note: all inline asm arguments must have a statically known size error[E0308]: mismatched types - --> $DIR/type-check-1.rs:48:26 - | -LL | asm!("{}", const 0f32); - | ^^^^ expected integer, found `f32` - -error[E0308]: mismatched types - --> $DIR/type-check-1.rs:50:26 - | -LL | asm!("{}", const 0 as *mut u8); - | ^^^^^^^^^^^^ expected integer, found *-ptr - | - = note: expected type `{integer}` - found raw pointer `*mut u8` - -error[E0308]: mismatched types --> $DIR/type-check-1.rs:60:25 | LL | global_asm!("{}", const 0f32); diff --git a/src/test/ui/borrowck/issue-64453.stderr b/src/test/ui/borrowck/issue-64453.stderr index 5513c3d217e..14e16670389 100644 --- a/src/test/ui/borrowck/issue-64453.stderr +++ b/src/test/ui/borrowck/issue-64453.stderr @@ -1,9 +1,3 @@ -error[E0507]: cannot move out of static item `settings_dir` - --> $DIR/issue-64453.rs:14:37 - | -LL | let settings_data = from_string(settings_dir); - | ^^^^^^^^^^^^ move occurs because `settings_dir` has type `String`, which does not implement the `Copy` trait - error: `Arguments::<'a>::new_v1` is not yet stable as a const fn --> $DIR/issue-64453.rs:4:31 | @@ -21,6 +15,12 @@ LL | static settings_dir: String = format!(""); | = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) +error[E0507]: cannot move out of static item `settings_dir` + --> $DIR/issue-64453.rs:14:37 + | +LL | let settings_data = from_string(settings_dir); + | ^^^^^^^^^^^^ move occurs because `settings_dir` has type `String`, which does not implement the `Copy` trait + error: aborting due to 3 previous errors Some errors have detailed explanations: E0015, E0507. diff --git a/src/test/ui/const-generics/type_mismatch.stderr b/src/test/ui/const-generics/type_mismatch.stderr index f5053e4c8c8..8d779bee265 100644 --- a/src/test/ui/const-generics/type_mismatch.stderr +++ b/src/test/ui/const-generics/type_mismatch.stderr @@ -5,12 +5,6 @@ LL | bar::<N>() | ^ expected `u8`, found `usize` error[E0308]: mismatched types - --> $DIR/type_mismatch.rs:5:31 - | -LL | fn bar<const N: u8>() -> [u8; N] {} - | ^ expected `usize`, found `u8` - -error[E0308]: mismatched types --> $DIR/type_mismatch.rs:5:26 | LL | fn bar<const N: u8>() -> [u8; N] {} @@ -18,6 +12,12 @@ LL | fn bar<const N: u8>() -> [u8; N] {} | | | implicitly returns `()` as its body has no tail or `return` expression +error[E0308]: mismatched types + --> $DIR/type_mismatch.rs:5:31 + | +LL | fn bar<const N: u8>() -> [u8; N] {} + | ^ expected `usize`, found `u8` + error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.mir.stderr b/src/test/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.mir.stderr index b643ecc0ce8..33014a1500c 100644 --- a/src/test/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.mir.stderr +++ b/src/test/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.mir.stderr @@ -1,16 +1,16 @@ error[E0133]: call to unsafe function is unsafe and requires unsafe function or block - --> $DIR/const-extern-fn-requires-unsafe.rs:11:5 + --> $DIR/const-extern-fn-requires-unsafe.rs:9:17 | -LL | foo(); - | ^^^^^ call to unsafe function +LL | let a: [u8; foo()]; + | ^^^^^ call to unsafe function | = note: consult the function's documentation for information on how to avoid undefined behavior error[E0133]: call to unsafe function is unsafe and requires unsafe function or block - --> $DIR/const-extern-fn-requires-unsafe.rs:9:17 + --> $DIR/const-extern-fn-requires-unsafe.rs:11:5 | -LL | let a: [u8; foo()]; - | ^^^^^ call to unsafe function +LL | foo(); + | ^^^^^ call to unsafe function | = note: consult the function's documentation for information on how to avoid undefined behavior diff --git a/src/test/ui/consts/issue-66693.stderr b/src/test/ui/consts/issue-66693.stderr index 50c95c89e0b..3349e9813a8 100644 --- a/src/test/ui/consts/issue-66693.stderr +++ b/src/test/ui/consts/issue-66693.stderr @@ -1,12 +1,4 @@ error: argument to `panic!()` in a const context must have type `&str` - --> $DIR/issue-66693.rs:13:5 - | -LL | panic!(&1); - | ^^^^^^^^^^^ - | - = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: argument to `panic!()` in a const context must have type `&str` --> $DIR/issue-66693.rs:6:15 | LL | const _: () = panic!(1); @@ -22,5 +14,13 @@ LL | static _FOO: () = panic!(true); | = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info) +error: argument to `panic!()` in a const context must have type `&str` + --> $DIR/issue-66693.rs:13:5 + | +LL | panic!(&1); + | ^^^^^^^^^^^ + | + = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info) + error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-47486.stderr b/src/test/ui/issues/issue-47486.stderr index cf95d309c63..a029948ca3b 100644 --- a/src/test/ui/issues/issue-47486.stderr +++ b/src/test/ui/issues/issue-47486.stderr @@ -1,15 +1,15 @@ +error[E0282]: type annotations needed + --> $DIR/issue-47486.rs:3:31 + | +LL | [0u8; std::mem::size_of::<_>()]; + | ^ cannot infer type + error[E0308]: mismatched types --> $DIR/issue-47486.rs:2:10 | LL | () < std::mem::size_of::<_>(); | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found `usize` -error[E0282]: type annotations needed - --> $DIR/issue-47486.rs:3:11 - | -LL | [0u8; std::mem::size_of::<_>()]; - | ^^^^^^^^^^^^^^^^^^^^^^ cannot infer type - error: aborting due to 2 previous errors Some errors have detailed explanations: E0282, E0308. diff --git a/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr b/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr index d08fbac0bca..d9dac5de622 100644 --- a/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr +++ b/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr @@ -1,18 +1,4 @@ error[E0308]: mismatched types - --> $DIR/liveness-return-last-stmt-semi.rs:4:41 - | -LL | macro_rules! test { () => { fn foo() -> i32 { 1; } } } - | --- ^^^ - help: consider removing this semicolon - | | | - | | expected `i32`, found `()` - | implicitly returns `()` as its body has no tail or `return` expression -... -LL | test!(); - | -------- in this macro invocation - | - = note: this error originates in the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0308]: mismatched types --> $DIR/liveness-return-last-stmt-semi.rs:7:19 | LL | fn no_return() -> i32 {} @@ -38,6 +24,20 @@ LL | fn baz(x: u64) -> u32 { | | | implicitly returns `()` as its body has no tail or `return` expression +error[E0308]: mismatched types + --> $DIR/liveness-return-last-stmt-semi.rs:4:41 + | +LL | macro_rules! test { () => { fn foo() -> i32 { 1; } } } + | --- ^^^ - help: consider removing this semicolon + | | | + | | expected `i32`, found `()` + | implicitly returns `()` as its body has no tail or `return` expression +... +LL | test!(); + | -------- in this macro invocation + | + = note: this error originates in the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info) + error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/proc-macro/attribute-with-error.stderr b/src/test/ui/proc-macro/attribute-with-error.stderr index 7f3a7e670b9..127c49957c1 100644 --- a/src/test/ui/proc-macro/attribute-with-error.stderr +++ b/src/test/ui/proc-macro/attribute-with-error.stderr @@ -1,4 +1,12 @@ error[E0308]: mismatched types + --> $DIR/attribute-with-error.rs:25:22 + | +LL | let a: i32 = "foo"; + | --- ^^^^^ expected `i32`, found `&str` + | | + | expected due to this + +error[E0308]: mismatched types --> $DIR/attribute-with-error.rs:10:18 | LL | let a: i32 = "foo"; @@ -15,14 +23,6 @@ LL | let b: i32 = "f'oo"; | expected due to this error[E0308]: mismatched types - --> $DIR/attribute-with-error.rs:25:22 - | -LL | let a: i32 = "foo"; - | --- ^^^^^ expected `i32`, found `&str` - | | - | expected due to this - -error[E0308]: mismatched types --> $DIR/attribute-with-error.rs:35:22 | LL | let a: i32 = "foo"; diff --git a/src/test/ui/repeat_count.stderr b/src/test/ui/repeat_count.stderr index cd07e5b8935..c85f0572031 100644 --- a/src/test/ui/repeat_count.stderr +++ b/src/test/ui/repeat_count.stderr @@ -31,12 +31,6 @@ LL | let e = [0; "foo"]; | ^^^^^ expected `usize`, found `&str` error[E0308]: mismatched types - --> $DIR/repeat_count.rs:31:17 - | -LL | let g = [0; G { g: () }]; - | ^^^^^^^^^^^ expected `usize`, found struct `G` - -error[E0308]: mismatched types --> $DIR/repeat_count.rs:19:17 | LL | let f = [0; -4_isize]; @@ -63,6 +57,12 @@ help: change the type of the numeric literal from `u8` to `usize` LL | let f = [0; 4usize]; | ~~~~~~ +error[E0308]: mismatched types + --> $DIR/repeat_count.rs:31:17 + | +LL | let g = [0; G { g: () }]; + | ^^^^^^^^^^^ expected `usize`, found struct `G` + error: aborting due to 9 previous errors Some errors have detailed explanations: E0308, E0435. diff --git a/src/test/ui/suggestions/impl-trait-with-missing-bounds.stderr b/src/test/ui/suggestions/impl-trait-with-missing-bounds.stderr index 1cde42ff2cb..bb7919ebb79 100644 --- a/src/test/ui/suggestions/impl-trait-with-missing-bounds.stderr +++ b/src/test/ui/suggestions/impl-trait-with-missing-bounds.stderr @@ -1,21 +1,4 @@ error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug` - --> $DIR/impl-trait-with-missing-bounds.rs:6:13 - | -LL | qux(constraint); - | ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug` - | - = help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item` -note: required by a bound in `qux` - --> $DIR/impl-trait-with-missing-bounds.rs:50:16 - | -LL | fn qux(_: impl std::fmt::Debug) {} - | ^^^^^^^^^^^^^^^ required by this bound in `qux` -help: introduce a type parameter with a trait bound instead of using `impl Trait` - | -LL | fn foo<I: Iterator>(constraints: I) where <I as Iterator>::Item: Debug { - | +++++++++++++ ~ ++++++++++++++++++++++++++++++++++ - -error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug` --> $DIR/impl-trait-with-missing-bounds.rs:14:13 | LL | qux(constraint); @@ -84,6 +67,23 @@ LL | fn bak<I: Iterator + std::fmt::Debug>(constraints: I) where <I as Iterator> | +++++++++++++++++++++++++++++++ ~ ++++++++++++++++++++++++++++++++++ error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug` + --> $DIR/impl-trait-with-missing-bounds.rs:6:13 + | +LL | qux(constraint); + | ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug` + | + = help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item` +note: required by a bound in `qux` + --> $DIR/impl-trait-with-missing-bounds.rs:50:16 + | +LL | fn qux(_: impl std::fmt::Debug) {} + | ^^^^^^^^^^^^^^^ required by this bound in `qux` +help: introduce a type parameter with a trait bound instead of using `impl Trait` + | +LL | fn foo<I: Iterator>(constraints: I) where <I as Iterator>::Item: Debug { + | +++++++++++++ ~ ++++++++++++++++++++++++++++++++++ + +error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug` --> $DIR/impl-trait-with-missing-bounds.rs:45:13 | LL | qux(constraint); diff --git a/src/test/ui/suggestions/suggest-ref-macro.stderr b/src/test/ui/suggestions/suggest-ref-macro.stderr index 147001f0c94..1f41d2329ee 100644 --- a/src/test/ui/suggestions/suggest-ref-macro.stderr +++ b/src/test/ui/suggestions/suggest-ref-macro.stderr @@ -1,12 +1,4 @@ error[E0308]: mismatched types - --> $DIR/suggest-ref-macro.rs:8:1 - | -LL | #[hello] - | ^^^^^^^^ expected `&mut i32`, found integer - | - = note: this error originates in the attribute macro `hello` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0308]: mismatched types --> $DIR/suggest-ref-macro.rs:15:11 | LL | x(123); @@ -29,6 +21,14 @@ LL | bla!(456); | expected `&mut i32`, found integer | help: consider mutably borrowing here: `&mut 456` +error[E0308]: mismatched types + --> $DIR/suggest-ref-macro.rs:8:1 + | +LL | #[hello] + | ^^^^^^^^ expected `&mut i32`, found integer + | + = note: this error originates in the attribute macro `hello` (in Nightly builds, run with -Z macro-backtrace for more info) + error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/union/union-derive-clone.mirunsafeck.stderr b/src/test/ui/union/union-derive-clone.mirunsafeck.stderr index 414d2759a47..b52117cd19c 100644 --- a/src/test/ui/union/union-derive-clone.mirunsafeck.stderr +++ b/src/test/ui/union/union-derive-clone.mirunsafeck.stderr @@ -1,16 +1,3 @@ -error[E0277]: the trait bound `U1: Copy` is not satisfied - --> $DIR/union-derive-clone.rs:6:10 - | -LL | #[derive(Clone)] - | ^^^^^ the trait `Copy` is not implemented for `U1` - | -note: required by a bound in `AssertParamIsCopy` - --> $SRC_DIR/core/src/clone.rs:LL:COL - | -LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> { - | ^^^^ required by this bound in `AssertParamIsCopy` - = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) - error[E0599]: the method `clone` exists for union `U5<CloneNoCopy>`, but its trait bounds were not satisfied --> $DIR/union-derive-clone.rs:38:15 | @@ -30,6 +17,19 @@ LL | let w = u.clone(); `CloneNoCopy: Copy` which is required by `U5<CloneNoCopy>: Clone` +error[E0277]: the trait bound `U1: Copy` is not satisfied + --> $DIR/union-derive-clone.rs:6:10 + | +LL | #[derive(Clone)] + | ^^^^^ the trait `Copy` is not implemented for `U1` + | +note: required by a bound in `AssertParamIsCopy` + --> $SRC_DIR/core/src/clone.rs:LL:COL + | +LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> { + | ^^^^ required by this bound in `AssertParamIsCopy` + = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) + error: aborting due to 2 previous errors Some errors have detailed explanations: E0277, E0599. diff --git a/src/test/ui/union/union-derive-clone.thirunsafeck.stderr b/src/test/ui/union/union-derive-clone.thirunsafeck.stderr index 414d2759a47..b52117cd19c 100644 --- a/src/test/ui/union/union-derive-clone.thirunsafeck.stderr +++ b/src/test/ui/union/union-derive-clone.thirunsafeck.stderr @@ -1,16 +1,3 @@ -error[E0277]: the trait bound `U1: Copy` is not satisfied - --> $DIR/union-derive-clone.rs:6:10 - | -LL | #[derive(Clone)] - | ^^^^^ the trait `Copy` is not implemented for `U1` - | -note: required by a bound in `AssertParamIsCopy` - --> $SRC_DIR/core/src/clone.rs:LL:COL - | -LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> { - | ^^^^ required by this bound in `AssertParamIsCopy` - = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) - error[E0599]: the method `clone` exists for union `U5<CloneNoCopy>`, but its trait bounds were not satisfied --> $DIR/union-derive-clone.rs:38:15 | @@ -30,6 +17,19 @@ LL | let w = u.clone(); `CloneNoCopy: Copy` which is required by `U5<CloneNoCopy>: Clone` +error[E0277]: the trait bound `U1: Copy` is not satisfied + --> $DIR/union-derive-clone.rs:6:10 + | +LL | #[derive(Clone)] + | ^^^^^ the trait `Copy` is not implemented for `U1` + | +note: required by a bound in `AssertParamIsCopy` + --> $SRC_DIR/core/src/clone.rs:LL:COL + | +LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> { + | ^^^^ required by this bound in `AssertParamIsCopy` + = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) + error: aborting due to 2 previous errors Some errors have detailed explanations: E0277, E0599. |
