diff --git a/src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr b/src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr index d2c4a28ce98..e0e45d55a9e 100644 --- a/src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr +++ b/src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr @@ -1,7 +1,7 @@ error: `[v2]` cannot be resolved, ignoring it... --> $DIR/deny-intra-link-resolution-failure.rs:3:6 | -LL | /// [v2] //~ ERROR +LL | /// [v2] | ^^ cannot be resolved, ignoring | note: lint level defined here diff --git a/src/test/rustdoc-ui/deny-missing-docs-crate.stderr b/src/test/rustdoc-ui/deny-missing-docs-crate.stderr index 4cc0f4b4128..9cd50d26766 100644 --- a/src/test/rustdoc-ui/deny-missing-docs-crate.stderr +++ b/src/test/rustdoc-ui/deny-missing-docs-crate.stderr @@ -1,21 +1,21 @@ error: missing documentation for crate --> $DIR/deny-missing-docs-crate.rs:1:1 | -LL | / #![deny(missing_docs)] //~ ERROR +LL | / #![deny(missing_docs)] LL | | -LL | | pub struct Foo; //~ ERROR +LL | | pub struct Foo; | |_______________^ | note: lint level defined here --> $DIR/deny-missing-docs-crate.rs:1:9 | -LL | #![deny(missing_docs)] //~ ERROR +LL | #![deny(missing_docs)] | ^^^^^^^^^^^^ error: missing documentation for a struct --> $DIR/deny-missing-docs-crate.rs:3:1 | -LL | pub struct Foo; //~ ERROR +LL | pub struct Foo; | ^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/rustdoc-ui/deny-missing-docs-macro.stderr b/src/test/rustdoc-ui/deny-missing-docs-macro.stderr index ce9584a4bb0..ef15bf05d54 100644 --- a/src/test/rustdoc-ui/deny-missing-docs-macro.stderr +++ b/src/test/rustdoc-ui/deny-missing-docs-macro.stderr @@ -1,7 +1,7 @@ error: missing documentation for macro --> $DIR/deny-missing-docs-macro.rs:6:1 | -LL | macro_rules! foo { //~ ERROR +LL | macro_rules! foo { | ^^^^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/rustdoc-ui/intra-doc-alias-ice.stderr b/src/test/rustdoc-ui/intra-doc-alias-ice.stderr index 12a56dcc4a5..d273ec01975 100644 --- a/src/test/rustdoc-ui/intra-doc-alias-ice.stderr +++ b/src/test/rustdoc-ui/intra-doc-alias-ice.stderr @@ -1,7 +1,7 @@ error: `[TypeAlias::hoge]` cannot be resolved, ignoring it... --> $DIR/intra-doc-alias-ice.rs:5:30 | -LL | /// [broken cross-reference](TypeAlias::hoge) //~ ERROR +LL | /// [broken cross-reference](TypeAlias::hoge) | ^^^^^^^^^^^^^^^ cannot be resolved, ignoring | note: lint level defined here diff --git a/src/test/ui-fulldeps/dropck_tarena_cycle_checked.stderr b/src/test/ui-fulldeps/dropck_tarena_cycle_checked.stderr index 34d026e957d..37d8b964c24 100644 --- a/src/test/ui-fulldeps/dropck_tarena_cycle_checked.stderr +++ b/src/test/ui-fulldeps/dropck_tarena_cycle_checked.stderr @@ -3,7 +3,7 @@ error[E0597]: `arena` does not live long enough | LL | f(&arena); | ^^^^^ borrowed value does not live long enough -LL | } //~^ ERROR `arena` does not live long enough +LL | } | - `arena` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui-fulldeps/dropck_tarena_unsound_drop.stderr b/src/test/ui-fulldeps/dropck_tarena_unsound_drop.stderr index 47754da8b78..c791b8b451e 100644 --- a/src/test/ui-fulldeps/dropck_tarena_unsound_drop.stderr +++ b/src/test/ui-fulldeps/dropck_tarena_unsound_drop.stderr @@ -3,7 +3,7 @@ error[E0597]: `arena` does not live long enough | LL | f(&arena); | ^^^^^ borrowed value does not live long enough -LL | } //~^ ERROR `arena` does not live long enough +LL | } | - `arena` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui-fulldeps/issue-15778-fail.stderr b/src/test/ui-fulldeps/issue-15778-fail.stderr index 8eafd1cefa6..d6892861776 100644 --- a/src/test/ui-fulldeps/issue-15778-fail.stderr +++ b/src/test/ui-fulldeps/issue-15778-fail.stderr @@ -1,7 +1,7 @@ error: crate is not marked with #![crate_okay] --> $DIR/issue-15778-fail.rs:5:1 | -LL | / #![feature(plugin)] //~ ERROR crate is not marked with #![crate_okay] +LL | / #![feature(plugin)] LL | | #![plugin(lint_for_crate)] LL | | LL | | pub fn main() { } diff --git a/src/test/ui-fulldeps/lint-group-plugin-deny-cmdline.stderr b/src/test/ui-fulldeps/lint-group-plugin-deny-cmdline.stderr index 9b629ca6778..cd0bff92bf1 100644 --- a/src/test/ui-fulldeps/lint-group-plugin-deny-cmdline.stderr +++ b/src/test/ui-fulldeps/lint-group-plugin-deny-cmdline.stderr @@ -1,7 +1,7 @@ error: item is named 'lintme' --> $DIR/lint-group-plugin-deny-cmdline.rs:8:1 | -LL | fn lintme() { } //~ ERROR item is named 'lintme' +LL | fn lintme() { } | ^^^^^^^^^^^^^^^ | = note: `-D test-lint` implied by `-D lint-me` @@ -9,7 +9,7 @@ LL | fn lintme() { } //~ ERROR item is named 'lintme' error: item is named 'pleaselintme' --> $DIR/lint-group-plugin-deny-cmdline.rs:10:1 | -LL | fn pleaselintme() { } //~ ERROR item is named 'pleaselintme' +LL | fn pleaselintme() { } | ^^^^^^^^^^^^^^^^^^^^^ | = note: `-D please-lint` implied by `-D lint-me` diff --git a/src/test/ui-fulldeps/lint-group-plugin.stderr b/src/test/ui-fulldeps/lint-group-plugin.stderr index b566048c75e..8ccf9700b9f 100644 --- a/src/test/ui-fulldeps/lint-group-plugin.stderr +++ b/src/test/ui-fulldeps/lint-group-plugin.stderr @@ -1,7 +1,7 @@ warning: item is named 'lintme' --> $DIR/lint-group-plugin.rs:9:1 | -LL | fn lintme() { } //~ WARNING item is named 'lintme' +LL | fn lintme() { } | ^^^^^^^^^^^^^^^ | = note: #[warn(test_lint)] on by default @@ -9,7 +9,7 @@ LL | fn lintme() { } //~ WARNING item is named 'lintme' warning: item is named 'pleaselintme' --> $DIR/lint-group-plugin.rs:10:1 | -LL | fn pleaselintme() { } //~ WARNING item is named 'pleaselintme' +LL | fn pleaselintme() { } | ^^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(please_lint)] on by default diff --git a/src/test/ui-fulldeps/lint-plugin-cmdline-load.stderr b/src/test/ui-fulldeps/lint-plugin-cmdline-load.stderr index 1beb5b7816c..0b2dbad884c 100644 --- a/src/test/ui-fulldeps/lint-plugin-cmdline-load.stderr +++ b/src/test/ui-fulldeps/lint-plugin-cmdline-load.stderr @@ -1,7 +1,7 @@ warning: item is named 'lintme' --> $DIR/lint-plugin-cmdline-load.rs:8:1 | -LL | fn lintme() { } //~ WARNING item is named 'lintme' +LL | fn lintme() { } | ^^^^^^^^^^^^^^^ | = note: #[warn(test_lint)] on by default diff --git a/src/test/ui-fulldeps/lint-plugin-deny-attr.stderr b/src/test/ui-fulldeps/lint-plugin-deny-attr.stderr index 81fee10e56f..5bfde8551ed 100644 --- a/src/test/ui-fulldeps/lint-plugin-deny-attr.stderr +++ b/src/test/ui-fulldeps/lint-plugin-deny-attr.stderr @@ -1,7 +1,7 @@ error: item is named 'lintme' --> $DIR/lint-plugin-deny-attr.rs:8:1 | -LL | fn lintme() { } //~ ERROR item is named 'lintme' +LL | fn lintme() { } | ^^^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui-fulldeps/lint-plugin-deny-cmdline.stderr b/src/test/ui-fulldeps/lint-plugin-deny-cmdline.stderr index 9b84abf704c..e4257dfde6f 100644 --- a/src/test/ui-fulldeps/lint-plugin-deny-cmdline.stderr +++ b/src/test/ui-fulldeps/lint-plugin-deny-cmdline.stderr @@ -1,7 +1,7 @@ error: item is named 'lintme' --> $DIR/lint-plugin-deny-cmdline.rs:8:1 | -LL | fn lintme() { } //~ ERROR item is named 'lintme' +LL | fn lintme() { } | ^^^^^^^^^^^^^^^ | = note: requested on the command line with `-D test-lint` diff --git a/src/test/ui-fulldeps/lint-plugin-forbid-attrs.stderr b/src/test/ui-fulldeps/lint-plugin-forbid-attrs.stderr index 11dd75621bf..092d0eb7a81 100644 --- a/src/test/ui-fulldeps/lint-plugin-forbid-attrs.stderr +++ b/src/test/ui-fulldeps/lint-plugin-forbid-attrs.stderr @@ -10,7 +10,7 @@ LL | #[allow(test_lint)] error: item is named 'lintme' --> $DIR/lint-plugin-forbid-attrs.rs:8:1 | -LL | fn lintme() { } //~ ERROR item is named 'lintme' +LL | fn lintme() { } | ^^^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui-fulldeps/lint-plugin-forbid-cmdline.stderr b/src/test/ui-fulldeps/lint-plugin-forbid-cmdline.stderr index b03051250fc..fc2906da5f5 100644 --- a/src/test/ui-fulldeps/lint-plugin-forbid-cmdline.stderr +++ b/src/test/ui-fulldeps/lint-plugin-forbid-cmdline.stderr @@ -1,7 +1,7 @@ error[E0453]: allow(test_lint) overruled by outer forbid(test_lint) --> $DIR/lint-plugin-forbid-cmdline.rs:10:9 | -LL | #[allow(test_lint)] //~ ERROR allow(test_lint) overruled by outer forbid(test_lint) +LL | #[allow(test_lint)] | ^^^^^^^^^ overruled by previous forbid | = note: `forbid` lint level was set on command line @@ -9,7 +9,7 @@ LL | #[allow(test_lint)] //~ ERROR allow(test_lint) overruled by outer forbid(te error: item is named 'lintme' --> $DIR/lint-plugin-forbid-cmdline.rs:8:1 | -LL | fn lintme() { } //~ ERROR item is named 'lintme' +LL | fn lintme() { } | ^^^^^^^^^^^^^^^ | = note: requested on the command line with `-F test-lint` diff --git a/src/test/ui-fulldeps/lint-plugin.stderr b/src/test/ui-fulldeps/lint-plugin.stderr index 11e3222a1a5..94791e369fc 100644 --- a/src/test/ui-fulldeps/lint-plugin.stderr +++ b/src/test/ui-fulldeps/lint-plugin.stderr @@ -1,7 +1,7 @@ warning: item is named 'lintme' --> $DIR/lint-plugin.rs:8:1 | -LL | fn lintme() { } //~ WARNING item is named 'lintme' +LL | fn lintme() { } | ^^^^^^^^^^^^^^^ | = note: #[warn(test_lint)] on by default diff --git a/src/test/ui-fulldeps/lint_tool_test.stderr b/src/test/ui-fulldeps/lint_tool_test.stderr index 95db7ec455d..cec8800a25c 100644 --- a/src/test/ui-fulldeps/lint_tool_test.stderr +++ b/src/test/ui-fulldeps/lint_tool_test.stderr @@ -21,7 +21,7 @@ LL | #[allow(test_group)] warning: unknown lint: `this_lint_does_not_exist` --> $DIR/lint_tool_test.rs:27:8 | -LL | #[deny(this_lint_does_not_exist)] //~ WARNING unknown lint: `this_lint_does_not_exist` +LL | #[deny(this_lint_does_not_exist)] | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(unknown_lints)] on by default @@ -35,7 +35,7 @@ LL | #![cfg_attr(foo, warn(test_lint))] error: item is named 'lintme' --> $DIR/lint_tool_test.rs:14:1 | -LL | fn lintme() { } //~ ERROR item is named 'lintme' +LL | fn lintme() { } | ^^^^^^^^^^^^^^^ | note: lint level defined here @@ -48,7 +48,7 @@ LL | #![deny(clippy_group)] error: item is named 'lintmetoo' --> $DIR/lint_tool_test.rs:22:5 | -LL | fn lintmetoo() { } //~ ERROR item is named 'lintmetoo' +LL | fn lintmetoo() { } | ^^^^^^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui-fulldeps/plugin-as-extern-crate.stderr b/src/test/ui-fulldeps/plugin-as-extern-crate.stderr index 4a5a53980eb..ccc9580a60c 100644 --- a/src/test/ui-fulldeps/plugin-as-extern-crate.stderr +++ b/src/test/ui-fulldeps/plugin-as-extern-crate.stderr @@ -1,7 +1,7 @@ error: compiler plugin used as an ordinary library --> $DIR/plugin-as-extern-crate.rs:10:1 | -LL | extern crate attr_plugin_test; //~ ERROR compiler plugin used as an ordinary library +LL | extern crate attr_plugin_test; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/E0508.stderr b/src/test/ui/E0508.stderr index 1e7b4071d5d..ba6cff80416 100644 --- a/src/test/ui/E0508.stderr +++ b/src/test/ui/E0508.stderr @@ -1,7 +1,7 @@ error[E0508]: cannot move out of type `[NonCopy; 1]`, a non-copy array --> $DIR/E0508.rs:5:18 | -LL | let _value = array[0]; //~ ERROR [E0508] +LL | let _value = array[0]; | ^^^^^^^^ | | | cannot move out of here diff --git a/src/test/ui/E0583.stderr b/src/test/ui/E0583.stderr index 33b584ccefe..ef7a48bc8a4 100644 --- a/src/test/ui/E0583.stderr +++ b/src/test/ui/E0583.stderr @@ -1,7 +1,7 @@ error[E0583]: file not found for module `module_that_doesnt_exist` --> $DIR/E0583.rs:1:5 | -LL | mod module_that_doesnt_exist; //~ ERROR E0583 +LL | mod module_that_doesnt_exist; | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: name the file either module_that_doesnt_exist.rs or module_that_doesnt_exist/mod.rs inside the directory "$DIR" diff --git a/src/test/ui/E0642.stderr b/src/test/ui/E0642.stderr index 4c82a6cbd21..da255143494 100644 --- a/src/test/ui/E0642.stderr +++ b/src/test/ui/E0642.stderr @@ -1,31 +1,31 @@ error[E0642]: patterns aren't allowed in methods without bodies --> $DIR/E0642.rs:5:12 | -LL | fn foo((x, y): (i32, i32)); //~ ERROR patterns aren't allowed in methods without bodies +LL | fn foo((x, y): (i32, i32)); | ^^^^^^ help: give this argument a name or use an underscore to ignore it | -LL | fn foo(_: (i32, i32)); //~ ERROR patterns aren't allowed in methods without bodies +LL | fn foo(_: (i32, i32)); | ^ error[E0642]: patterns aren't allowed in methods without bodies --> $DIR/E0642.rs:7:12 | -LL | fn bar((x, y): (i32, i32)) {} //~ ERROR patterns aren't allowed in methods without bodies +LL | fn bar((x, y): (i32, i32)) {} | ^^^^^^ help: give this argument a name or use an underscore to ignore it | -LL | fn bar(_: (i32, i32)) {} //~ ERROR patterns aren't allowed in methods without bodies +LL | fn bar(_: (i32, i32)) {} | ^ error[E0642]: patterns aren't allowed in methods without bodies --> $DIR/E0642.rs:9:15 | -LL | fn method(S { .. }: S) {} //~ ERROR patterns aren't allowed in methods without bodies +LL | fn method(S { .. }: S) {} | ^^^^^^^^ help: give this argument a name or use an underscore to ignore it | -LL | fn method(_: S) {} //~ ERROR patterns aren't allowed in methods without bodies +LL | fn method(_: S) {} | ^ error: aborting due to 3 previous errors diff --git a/src/test/ui/E0662.stderr b/src/test/ui/E0662.stderr index 2156b43973f..5dea744998d 100644 --- a/src/test/ui/E0662.stderr +++ b/src/test/ui/E0662.stderr @@ -1,7 +1,7 @@ error[E0662]: input operand constraint contains '=' --> $DIR/E0662.rs:6:12 | -LL | : "=test"("a") //~ ERROR E0662 +LL | : "=test"("a") | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/E0663.stderr b/src/test/ui/E0663.stderr index 66667a6dc88..01bf89ec79a 100644 --- a/src/test/ui/E0663.stderr +++ b/src/test/ui/E0663.stderr @@ -1,7 +1,7 @@ error[E0663]: input operand constraint contains '+' --> $DIR/E0663.rs:6:12 | -LL | : "+test"("a") //~ ERROR E0663 +LL | : "+test"("a") | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/E0664.stderr b/src/test/ui/E0664.stderr index 972b10379d4..9c9f65ee6a9 100644 --- a/src/test/ui/E0664.stderr +++ b/src/test/ui/E0664.stderr @@ -1,7 +1,7 @@ error[E0664]: clobber should not be surrounded by braces --> $DIR/E0664.rs:7:12 | -LL | : "{eax}" //~ ERROR E0664 +LL | : "{eax}" | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/E0665.stderr b/src/test/ui/E0665.stderr index e044d606531..2c2b498e39a 100644 --- a/src/test/ui/E0665.stderr +++ b/src/test/ui/E0665.stderr @@ -1,7 +1,7 @@ error[E0665]: `Default` cannot be derived for enums, only structs --> $DIR/E0665.rs:1:10 | -LL | #[derive(Default)] //~ ERROR E0665 +LL | #[derive(Default)] | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/absolute-paths-in-nested-use-groups.stderr b/src/test/ui/absolute-paths-in-nested-use-groups.stderr index 72ad0509e46..e41590ac45e 100644 --- a/src/test/ui/absolute-paths-in-nested-use-groups.stderr +++ b/src/test/ui/absolute-paths-in-nested-use-groups.stderr @@ -1,19 +1,19 @@ error[E0433]: failed to resolve: crate root in paths can only be used in start position --> $DIR/absolute-paths-in-nested-use-groups.rs:6:5 | -LL | ::bar, //~ ERROR crate root in paths can only be used in start position +LL | ::bar, | ^ crate root in paths can only be used in start position error[E0433]: failed to resolve: `super` in paths can only be used in start position --> $DIR/absolute-paths-in-nested-use-groups.rs:7:5 | -LL | super::bar, //~ ERROR `super` in paths can only be used in start position +LL | super::bar, | ^^^^^ `super` in paths can only be used in start position error[E0433]: failed to resolve: `self` in paths can only be used in start position --> $DIR/absolute-paths-in-nested-use-groups.rs:8:5 | -LL | self::bar, //~ ERROR `self` in paths can only be used in start position +LL | self::bar, | ^^^^ `self` in paths can only be used in start position error: aborting due to 3 previous errors diff --git a/src/test/ui/access-mode-in-closures.stderr b/src/test/ui/access-mode-in-closures.stderr index 0423c713531..9976dfe946f 100644 --- a/src/test/ui/access-mode-in-closures.stderr +++ b/src/test/ui/access-mode-in-closures.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of borrowed content --> $DIR/access-mode-in-closures.rs:8:15 | -LL | match *s { S(v) => v } //~ ERROR cannot move out +LL | match *s { S(v) => v } | ^^ - hint: to prevent move, use `ref v` or `ref mut v` | | | cannot move out of borrowed content diff --git a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-1.stderr b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-1.stderr index 8efbf7f78d9..34e09da45ad 100644 --- a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-1.stderr +++ b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-1.stderr @@ -1,13 +1,13 @@ error: return type should be `!` --> $DIR/alloc-error-handler-bad-signature-1.rs:12:6 | -LL | ) -> () //~ ERROR return type should be `!` +LL | ) -> () | ^^ error: argument should be `Layout` --> $DIR/alloc-error-handler-bad-signature-1.rs:11:11 | -LL | info: &Layout, //~ ERROR argument should be `Layout` +LL | info: &Layout, | ^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-2.stderr b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-2.stderr index 95ef9a0522c..85544b0c384 100644 --- a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-2.stderr +++ b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-2.stderr @@ -1,13 +1,13 @@ error: return type should be `!` --> $DIR/alloc-error-handler-bad-signature-2.rs:12:3 | -LL | ) { //~ ERROR return type should be `!` +LL | ) { | ^ error: argument should be `Layout` --> $DIR/alloc-error-handler-bad-signature-2.rs:11:11 | -LL | info: Layout, //~ ERROR argument should be `Layout` +LL | info: Layout, | ^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr index 284802f21b9..8575e7508f1 100644 --- a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr +++ b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr @@ -1,7 +1,7 @@ error: function should have one argument --> $DIR/alloc-error-handler-bad-signature-3.rs:10:1 | -LL | fn oom() -> ! { //~ ERROR function should have one argument +LL | fn oom() -> ! { | ^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/allocator-submodule.stderr b/src/test/ui/allocator-submodule.stderr index 32c7211cd16..26d7aa80eee 100644 --- a/src/test/ui/allocator-submodule.stderr +++ b/src/test/ui/allocator-submodule.stderr @@ -1,7 +1,7 @@ error: `global_allocator` cannot be used in submodules --> $DIR/allocator-submodule.rs:27:5 | -LL | static MY_HEAP: MyAlloc = MyAlloc; //~ ERROR global_allocator +LL | static MY_HEAP: MyAlloc = MyAlloc; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/allocator/function-allocator.stderr b/src/test/ui/allocator/function-allocator.stderr index ecb6e4d4ecd..5e47b0f0cc7 100644 --- a/src/test/ui/allocator/function-allocator.stderr +++ b/src/test/ui/allocator/function-allocator.stderr @@ -1,7 +1,7 @@ error: allocators must be statics --> $DIR/function-allocator.rs:2:1 | -LL | fn foo() {} //~ ERROR: allocators must be statics +LL | fn foo() {} | ^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/anon-params-denied-2018.stderr b/src/test/ui/anon-params-denied-2018.stderr index dd9e933542f..1ec0cf323e9 100644 --- a/src/test/ui/anon-params-denied-2018.stderr +++ b/src/test/ui/anon-params-denied-2018.stderr @@ -1,7 +1,7 @@ error: expected one of `:` or `@`, found `)` --> $DIR/anon-params-denied-2018.rs:6:15 | -LL | fn foo(i32); //~ expected one of `:` or `@`, found `)` +LL | fn foo(i32); | ---^ expected one of `:` or `@` here | | | help: explicitly ignore parameter: `_: i32` diff --git a/src/test/ui/anon-params-deprecated.stderr b/src/test/ui/anon-params-deprecated.stderr index 691c3159a52..e97dbc15f9c 100644 --- a/src/test/ui/anon-params-deprecated.stderr +++ b/src/test/ui/anon-params-deprecated.stderr @@ -1,7 +1,7 @@ warning: anonymous parameters are deprecated and will be removed in the next edition. --> $DIR/anon-params-deprecated.rs:9:12 | -LL | fn foo(i32); //~ WARNING anonymous parameters are deprecated +LL | fn foo(i32); | ^^^ help: Try naming the parameter or explicitly ignoring it: `_: i32` | note: lint level defined here diff --git a/src/test/ui/anonymous-higher-ranked-lifetime.stderr b/src/test/ui/anonymous-higher-ranked-lifetime.stderr index 378f352cb92..9e84b149509 100644 --- a/src/test/ui/anonymous-higher-ranked-lifetime.stderr +++ b/src/test/ui/anonymous-higher-ranked-lifetime.stderr @@ -1,7 +1,7 @@ error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:2:5 | -LL | f1(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f1(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'r, 's> fn(&'r (), &'s ()) -> _` @@ -15,7 +15,7 @@ LL | fn f1(_: F) where F: Fn(&(), &()) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:2:5 | -LL | f1(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f1(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `fn(&(), &()) -> _` @@ -29,7 +29,7 @@ LL | fn f1(_: F) where F: Fn(&(), &()) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:4:5 | -LL | f2(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f2(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'a, 'r> fn(&'a (), &'r ()) -> _` @@ -43,7 +43,7 @@ LL | fn f2(_: F) where F: for<'a> Fn(&'a (), &()) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:4:5 | -LL | f2(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f2(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `fn(&'a (), &()) -> _` @@ -57,7 +57,7 @@ LL | fn f2(_: F) where F: for<'a> Fn(&'a (), &()) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:6:5 | -LL | f3(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f3(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'r> fn(&(), &'r ()) -> _` @@ -71,7 +71,7 @@ LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:6:5 | -LL | f3(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f3(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `fn(&(), &()) -> _` @@ -85,7 +85,7 @@ LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:8:5 | -LL | f4(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f4(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'s, 'r> fn(&'s (), &'r ()) -> _` @@ -99,7 +99,7 @@ LL | fn f4(_: F) where F: for<'r> Fn(&(), &'r ()) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:8:5 | -LL | f4(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f4(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `fn(&(), &'r ()) -> _` @@ -113,7 +113,7 @@ LL | fn f4(_: F) where F: for<'r> Fn(&(), &'r ()) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:10:5 | -LL | f5(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f5(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'r> fn(&'r (), &'r ()) -> _` @@ -127,7 +127,7 @@ LL | fn f5(_: F) where F: for<'r> Fn(&'r (), &'r ()) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:10:5 | -LL | f5(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | f5(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `fn(&'r (), &'r ()) -> _` @@ -141,7 +141,7 @@ LL | fn f5(_: F) where F: for<'r> Fn(&'r (), &'r ()) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5 | -LL | g1(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | g1(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'r> fn(&'r (), std::boxed::Box<(dyn for<'s> std::ops::Fn(&'s ()) + 'static)>) -> _` @@ -155,7 +155,7 @@ LL | fn g1(_: F) where F: Fn(&(), Box) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5 | -LL | g1(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | g1(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _` @@ -169,7 +169,7 @@ LL | fn g1(_: F) where F: Fn(&(), Box) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:14:5 | -LL | g2(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | g2(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'r> fn(&'r (), for<'s> fn(&'s ())) -> _` @@ -183,7 +183,7 @@ LL | fn g2(_: F) where F: Fn(&(), fn(&())) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:14:5 | -LL | g2(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | g2(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `fn(&(), for<'r> fn(&'r ())) -> _` @@ -197,7 +197,7 @@ LL | fn g2(_: F) where F: Fn(&(), fn(&())) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:16:5 | -LL | g3(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | g3(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'s> fn(&'s (), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _` @@ -211,7 +211,7 @@ LL | fn g3(_: F) where F: for<'s> Fn(&'s (), Box) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:16:5 | -LL | g3(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | g3(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `fn(&'s (), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _` @@ -225,7 +225,7 @@ LL | fn g3(_: F) where F: for<'s> Fn(&'s (), Box) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:18:5 | -LL | g4(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | g4(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `for<'s> fn(&'s (), for<'r> fn(&'r ())) -> _` @@ -239,7 +239,7 @@ LL | fn g4(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:18:5 | -LL | g4(|_: (), _: ()| {}); //~ ERROR type mismatch +LL | g4(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | | expected signature of `fn(&(), for<'r> fn(&'r ())) -> _` @@ -253,7 +253,7 @@ LL | fn g4(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:20:5 | -LL | h1(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch +LL | h1(|_: (), _: (), _: (), _: ()| {}); | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _` | | | expected signature of `for<'r, 's> fn(&'r (), std::boxed::Box<(dyn for<'t0> std::ops::Fn(&'t0 ()) + 'static)>, &'s (), for<'t0, 't1> fn(&'t0 (), &'t1 ())) -> _` @@ -267,7 +267,7 @@ LL | fn h1(_: F) where F: Fn(&(), Box, &(), fn(&(), &())) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:20:5 | -LL | h1(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch +LL | h1(|_: (), _: (), _: (), _: ()| {}); | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _` | | | expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>, &(), for<'r, 's> fn(&'r (), &'s ())) -> _` @@ -281,7 +281,7 @@ LL | fn h1(_: F) where F: Fn(&(), Box, &(), fn(&(), &())) {} error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:22:5 | -LL | h2(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch +LL | h2(|_: (), _: (), _: (), _: ()| {}); | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _` | | | expected signature of `for<'r, 't0> fn(&'r (), std::boxed::Box<(dyn for<'s> std::ops::Fn(&'s ()) + 'static)>, &'t0 (), for<'s, 't1> fn(&'s (), &'t1 ())) -> _` @@ -295,7 +295,7 @@ LL | fn h2(_: F) where F: for<'t0> Fn(&(), Box, &'t0 (), fn(&(), &() error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:22:5 | -LL | h2(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch +LL | h2(|_: (), _: (), _: (), _: ()| {}); | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _` | | | expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>, &'t0 (), for<'r, 's> fn(&'r (), &'s ())) -> _` diff --git a/src/test/ui/array-break-length.stderr b/src/test/ui/array-break-length.stderr index bba47530461..1cbf77a99f8 100644 --- a/src/test/ui/array-break-length.stderr +++ b/src/test/ui/array-break-length.stderr @@ -1,13 +1,13 @@ error[E0268]: `break` outside of loop --> $DIR/array-break-length.rs:3:17 | -LL | |_: [_; break]| {} //~ ERROR: `break` outside of loop +LL | |_: [_; break]| {} | ^^^^^ cannot break outside of a loop error[E0268]: `continue` outside of loop --> $DIR/array-break-length.rs:7:17 | -LL | |_: [_; continue]| {} //~ ERROR: `continue` outside of loop +LL | |_: [_; continue]| {} | ^^^^^^^^ cannot break outside of a loop error: aborting due to 2 previous errors diff --git a/src/test/ui/asm/asm-in-bad-modifier.stderr b/src/test/ui/asm/asm-in-bad-modifier.stderr index 33987539018..21e80fb9802 100644 --- a/src/test/ui/asm/asm-in-bad-modifier.stderr +++ b/src/test/ui/asm/asm-in-bad-modifier.stderr @@ -1,13 +1,13 @@ error[E0662]: input operand constraint contains '=' --> $DIR/asm-in-bad-modifier.rs:23:39 | -LL | asm!("mov $1, $0" : "=r"(x) : "=r"(5)); //~ ERROR operand constraint contains '=' +LL | asm!("mov $1, $0" : "=r"(x) : "=r"(5)); | ^^^^ error[E0663]: input operand constraint contains '+' --> $DIR/asm-in-bad-modifier.rs:24:39 | -LL | asm!("mov $1, $0" : "=r"(y) : "+r"(5)); //~ ERROR operand constraint contains '+' +LL | asm!("mov $1, $0" : "=r"(y) : "+r"(5)); | ^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/asm/asm-out-no-modifier.stderr b/src/test/ui/asm/asm-out-no-modifier.stderr index 12a33e451fb..99134ceba33 100644 --- a/src/test/ui/asm/asm-out-no-modifier.stderr +++ b/src/test/ui/asm/asm-out-no-modifier.stderr @@ -1,7 +1,7 @@ error[E0661]: output operand constraint lacks '=' or '+' --> $DIR/asm-out-no-modifier.rs:22:29 | -LL | asm!("mov $1, $0" : "r"(x) : "r"(5)); //~ ERROR output operand constraint lacks '=' +LL | asm!("mov $1, $0" : "r"(x) : "r"(5)); | ^^^ error: aborting due to previous error diff --git a/src/test/ui/asm/asm-parse-errors.stderr b/src/test/ui/asm/asm-parse-errors.stderr index 37b61b80b2b..9fe59d12e12 100644 --- a/src/test/ui/asm/asm-parse-errors.stderr +++ b/src/test/ui/asm/asm-parse-errors.stderr @@ -1,67 +1,67 @@ error: macro requires a string literal as an argument --> $DIR/asm-parse-errors.rs:4:5 | -LL | asm!(); //~ ERROR requires a string literal as an argument +LL | asm!(); | ^^^^^^^ string literal required error: expected string literal --> $DIR/asm-parse-errors.rs:5:18 | -LL | asm!("nop" : struct); //~ ERROR expected string literal +LL | asm!("nop" : struct); | ^^^^^^ expected string literal error: expected string literal --> $DIR/asm-parse-errors.rs:6:30 | -LL | asm!("mov %eax, $$0x2" : struct); //~ ERROR expected string literal +LL | asm!("mov %eax, $$0x2" : struct); | ^^^^^^ expected string literal error: expected `(`, found keyword `struct` --> $DIR/asm-parse-errors.rs:7:39 | -LL | asm!("mov %eax, $$0x2" : "={eax}" struct); //~ ERROR expected `(` +LL | asm!("mov %eax, $$0x2" : "={eax}" struct); | ^^^^^^ expected `(` error: expected expression, found keyword `struct` --> $DIR/asm-parse-errors.rs:8:39 | -LL | asm!("mov %eax, $$0x2" : "={eax}"(struct)); //~ ERROR expected expression +LL | asm!("mov %eax, $$0x2" : "={eax}"(struct)); | ^^^^^^ expected expression error: expected string literal --> $DIR/asm-parse-errors.rs:9:44 | -LL | asm!("in %dx, %al" : "={al}"(result) : struct); //~ ERROR expected string literal +LL | asm!("in %dx, %al" : "={al}"(result) : struct); | ^^^^^^ expected string literal error: expected `(`, found keyword `struct` --> $DIR/asm-parse-errors.rs:10:51 | -LL | asm!("in %dx, %al" : "={al}"(result) : "{dx}" struct); //~ ERROR expected `(` +LL | asm!("in %dx, %al" : "={al}"(result) : "{dx}" struct); | ^^^^^^ expected `(` error: expected expression, found keyword `struct` --> $DIR/asm-parse-errors.rs:11:51 | -LL | asm!("in %dx, %al" : "={al}"(result) : "{dx}"(struct)); //~ ERROR expected expression +LL | asm!("in %dx, %al" : "={al}"(result) : "{dx}"(struct)); | ^^^^^^ expected expression error: expected string literal --> $DIR/asm-parse-errors.rs:12:36 | -LL | asm!("mov $$0x200, %eax" : : : struct); //~ ERROR expected string literal +LL | asm!("mov $$0x200, %eax" : : : struct); | ^^^^^^ expected string literal error: expected string literal --> $DIR/asm-parse-errors.rs:13:45 | -LL | asm!("mov eax, 2" : "={eax}"(foo) : : : struct); //~ ERROR expected string literal +LL | asm!("mov eax, 2" : "={eax}"(foo) : : : struct); | ^^^^^^ expected string literal error: inline assembly must be a string literal --> $DIR/asm-parse-errors.rs:14:10 | -LL | asm!(123); //~ ERROR inline assembly must be a string literal +LL | asm!(123); | ^^^ error: aborting due to 11 previous errors diff --git a/src/test/ui/assign-to-method.stderr b/src/test/ui/assign-to-method.stderr index f79f0750d89..feceadb6722 100644 --- a/src/test/ui/assign-to-method.stderr +++ b/src/test/ui/assign-to-method.stderr @@ -1,7 +1,7 @@ error[E0615]: attempted to take value of method `speak` on type `Cat` --> $DIR/assign-to-method.rs:20:8 | -LL | nyan.speak = || println!("meow"); //~ ERROR attempted to take value of method +LL | nyan.speak = || println!("meow"); | ^^^^^ | = help: methods are immutable and cannot be assigned to @@ -9,7 +9,7 @@ LL | nyan.speak = || println!("meow"); //~ ERROR attempted to take value of me error[E0615]: attempted to take value of method `speak` on type `Cat` --> $DIR/assign-to-method.rs:21:8 | -LL | nyan.speak += || println!("meow"); //~ ERROR attempted to take value of method +LL | nyan.speak += || println!("meow"); | ^^^^^ | = help: methods are immutable and cannot be assigned to diff --git a/src/test/ui/assignment-operator-unimplemented.stderr b/src/test/ui/assignment-operator-unimplemented.stderr index 1d7adb129d0..5304b09de5e 100644 --- a/src/test/ui/assignment-operator-unimplemented.stderr +++ b/src/test/ui/assignment-operator-unimplemented.stderr @@ -1,7 +1,7 @@ error[E0368]: binary assignment operation `+=` cannot be applied to type `Foo` --> $DIR/assignment-operator-unimplemented.rs:6:3 | -LL | a += *b; //~ Error: binary assignment operation `+=` cannot be applied to type `Foo` +LL | a += *b; | -^^^^^^ | | | cannot use `+=` on type `Foo` diff --git a/src/test/ui/assoc-inherent.stderr b/src/test/ui/assoc-inherent.stderr index f438ac8df4a..f9ea3365cb8 100644 --- a/src/test/ui/assoc-inherent.stderr +++ b/src/test/ui/assoc-inherent.stderr @@ -1,7 +1,7 @@ error[E0202]: associated types are not yet supported in inherent impls (see #8995) --> $DIR/assoc-inherent.rs:6:5 | -LL | type Bar = isize; //~ERROR associated types are not yet supported in inherent impls (see #8995) +LL | type Bar = isize; | ^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/associated-const/associated-const-ambiguity-report.stderr b/src/test/ui/associated-const/associated-const-ambiguity-report.stderr index 47748609b16..5f2b9c47e8c 100644 --- a/src/test/ui/associated-const/associated-const-ambiguity-report.stderr +++ b/src/test/ui/associated-const/associated-const-ambiguity-report.stderr @@ -1,7 +1,7 @@ error[E0034]: multiple applicable items in scope --> $DIR/associated-const-ambiguity-report.rs:17:16 | -LL | const X: i32 = ::ID; //~ ERROR E0034 +LL | const X: i32 = ::ID; | ^^^^^^^^^ multiple `ID` found | note: candidate #1 is defined in an impl of the trait `Foo` for the type `i32` diff --git a/src/test/ui/associated-item/associated-item-duplicate-names-2.stderr b/src/test/ui/associated-item/associated-item-duplicate-names-2.stderr index 6cc63de35d7..ea475ffc554 100644 --- a/src/test/ui/associated-item/associated-item-duplicate-names-2.stderr +++ b/src/test/ui/associated-item/associated-item-duplicate-names-2.stderr @@ -3,7 +3,7 @@ error[E0201]: duplicate definitions with name `bar`: | LL | const bar: bool = true; | ----------------------- previous definition of `bar` here -LL | fn bar() {} //~ ERROR duplicate definitions +LL | fn bar() {} | ^^^^^^^^^^^ duplicate definition error: aborting due to previous error diff --git a/src/test/ui/associated-item/associated-item-duplicate-names-3.stderr b/src/test/ui/associated-item/associated-item-duplicate-names-3.stderr index 07ce5e621a6..57495863c98 100644 --- a/src/test/ui/associated-item/associated-item-duplicate-names-3.stderr +++ b/src/test/ui/associated-item/associated-item-duplicate-names-3.stderr @@ -3,7 +3,7 @@ error[E0201]: duplicate definitions with name `Bar`: | LL | type Bar = i16; | --------------- previous definition of `Bar` here -LL | type Bar = u16; //~ ERROR duplicate definitions +LL | type Bar = u16; | ^^^^^^^^^^^^^^^ duplicate definition error: aborting due to previous error diff --git a/src/test/ui/associated-item/associated-item-duplicate-names.stderr b/src/test/ui/associated-item/associated-item-duplicate-names.stderr index 2bbe9125214..f4af9e02939 100644 --- a/src/test/ui/associated-item/associated-item-duplicate-names.stderr +++ b/src/test/ui/associated-item/associated-item-duplicate-names.stderr @@ -3,7 +3,7 @@ error[E0201]: duplicate definitions with name `Ty`: | LL | type Ty = (); | ------------- previous definition of `Ty` here -LL | type Ty = usize; //~ ERROR duplicate definitions +LL | type Ty = usize; | ^^^^^^^^^^^^^^^^ duplicate definition error[E0201]: duplicate definitions with name `BAR`: @@ -11,7 +11,7 @@ error[E0201]: duplicate definitions with name `BAR`: | LL | const BAR: u32 = 7; | ------------------- previous definition of `BAR` here -LL | const BAR: u32 = 8; //~ ERROR duplicate definitions +LL | const BAR: u32 = 8; | ^^^^^^^^^^^^^^^^^^^ duplicate definition error: aborting due to 2 previous errors diff --git a/src/test/ui/associated-path-shl.stderr b/src/test/ui/associated-path-shl.stderr index 3b62b1b01f4..e1a1e636372 100644 --- a/src/test/ui/associated-path-shl.stderr +++ b/src/test/ui/associated-path-shl.stderr @@ -1,37 +1,37 @@ error[E0412]: cannot find type `A` in this scope --> $DIR/associated-path-shl.rs:4:14 | -LL | let _: <::B>::C; //~ ERROR cannot find type `A` in this scope +LL | let _: <::B>::C; | ^ not found in this scope error[E0412]: cannot find type `A` in this scope --> $DIR/associated-path-shl.rs:5:15 | -LL | let _ = <::B>::C; //~ ERROR cannot find type `A` in this scope +LL | let _ = <::B>::C; | ^ not found in this scope error[E0412]: cannot find type `A` in this scope --> $DIR/associated-path-shl.rs:6:11 | -LL | let <::B>::C; //~ ERROR cannot find type `A` in this scope +LL | let <::B>::C; | ^ not found in this scope error[E0412]: cannot find type `A` in this scope --> $DIR/associated-path-shl.rs:7:17 | -LL | let 0 ..= <::B>::C; //~ ERROR cannot find type `A` in this scope +LL | let 0 ..= <::B>::C; | ^ not found in this scope error[E0412]: cannot find type `A` in this scope --> $DIR/associated-path-shl.rs:9:7 | -LL | <::B>::C; //~ ERROR cannot find type `A` in this scope +LL | <::B>::C; | ^ not found in this scope error[E0029]: only char and numeric types are allowed in range patterns --> $DIR/associated-path-shl.rs:7:15 | -LL | let 0 ..= <::B>::C; //~ ERROR cannot find type `A` in this scope +LL | let 0 ..= <::B>::C; | ^^^^^^^^^^^ ranges require char or numeric types | = note: start type: {integer} diff --git a/src/test/ui/associated-type/associated-type-projection-from-supertrait.stderr b/src/test/ui/associated-type/associated-type-projection-from-supertrait.stderr index 8c7b4a1333c..06f1a1cc64c 100644 --- a/src/test/ui/associated-type/associated-type-projection-from-supertrait.stderr +++ b/src/test/ui/associated-type/associated-type-projection-from-supertrait.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/associated-type-projection-from-supertrait.rs:33:23 | -LL | fn b() { dent(ModelT, Blue); } //~ ERROR mismatched types +LL | fn b() { dent(ModelT, Blue); } | ^^^^ expected struct `Black`, found struct `Blue` | = note: expected type `Black` @@ -10,7 +10,7 @@ LL | fn b() { dent(ModelT, Blue); } //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/associated-type-projection-from-supertrait.rs:34:23 | -LL | fn c() { dent(ModelU, Black); } //~ ERROR mismatched types +LL | fn c() { dent(ModelU, Black); } | ^^^^^ expected struct `Blue`, found struct `Black` | = note: expected type `Blue` @@ -19,7 +19,7 @@ LL | fn c() { dent(ModelU, Black); } //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/associated-type-projection-from-supertrait.rs:40:28 | -LL | fn f() { ModelT.chip_paint(Blue); } //~ ERROR mismatched types +LL | fn f() { ModelT.chip_paint(Blue); } | ^^^^ expected struct `Black`, found struct `Blue` | = note: expected type `Black` @@ -28,7 +28,7 @@ LL | fn f() { ModelT.chip_paint(Blue); } //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/associated-type-projection-from-supertrait.rs:41:28 | -LL | fn g() { ModelU.chip_paint(Black); } //~ ERROR mismatched types +LL | fn g() { ModelU.chip_paint(Black); } | ^^^^^ expected struct `Blue`, found struct `Black` | = note: expected type `Blue` diff --git a/src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr b/src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr index 126fb572d99..4b548604983 100644 --- a/src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr +++ b/src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr @@ -1,7 +1,7 @@ error[E0271]: type mismatch resolving `::Color == Blue` --> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:37:10 | -LL | fn b() { blue_car(ModelT); } //~ ERROR type mismatch +LL | fn b() { blue_car(ModelT); } | ^^^^^^^^ expected struct `Black`, found struct `Blue` | = note: expected type `Black` @@ -15,7 +15,7 @@ LL | fn blue_car>(c: C) { error[E0271]: type mismatch resolving `::Color == Black` --> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:38:10 | -LL | fn c() { black_car(ModelU); } //~ ERROR type mismatch +LL | fn c() { black_car(ModelU); } | ^^^^^^^^^ expected struct `Blue`, found struct `Black` | = note: expected type `Blue` diff --git a/src/test/ui/associated-types/associated-types-bound-failure.stderr b/src/test/ui/associated-types/associated-types-bound-failure.stderr index 784a53f106a..502fb4f1c30 100644 --- a/src/test/ui/associated-types/associated-types-bound-failure.stderr +++ b/src/test/ui/associated-types/associated-types-bound-failure.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `::R: ToInt` is not satisfied --> $DIR/associated-types-bound-failure.rs:17:5 | -LL | ToInt::to_int(&g.get()) //~ ERROR E0277 +LL | ToInt::to_int(&g.get()) | ^^^^^^^^^^^^^ the trait `ToInt` is not implemented for `::R` | = help: consider adding a `where ::R: ToInt` bound diff --git a/src/test/ui/associated-types/associated-types-eq-1.stderr b/src/test/ui/associated-types/associated-types-eq-1.stderr index 0935d6ae3e6..aa987316801 100644 --- a/src/test/ui/associated-types/associated-types-eq-1.stderr +++ b/src/test/ui/associated-types/associated-types-eq-1.stderr @@ -1,7 +1,7 @@ error[E0412]: cannot find type `A` in this scope --> $DIR/associated-types-eq-1.rs:10:12 | -LL | let _: A = x.boo(); //~ ERROR cannot find type `A` in this scope +LL | let _: A = x.boo(); | ^ help: a type parameter with a similar name exists: `I` error: aborting due to previous error diff --git a/src/test/ui/associated-types/associated-types-eq-hr.stderr b/src/test/ui/associated-types/associated-types-eq-hr.stderr index 3721b698988..82d15b92b55 100644 --- a/src/test/ui/associated-types/associated-types-eq-hr.stderr +++ b/src/test/ui/associated-types/associated-types-eq-hr.stderr @@ -1,7 +1,7 @@ error[E0271]: type mismatch resolving `for<'x> >::A == &'x isize` --> $DIR/associated-types-eq-hr.rs:82:5 | -LL | foo::(); //~ ERROR type mismatch +LL | foo::(); | ^^^^^^^^^^^^^^^^^ expected usize, found isize | = note: expected type `&usize` @@ -19,7 +19,7 @@ LL | | } error[E0271]: type mismatch resolving `for<'x> >::A == &'x usize` --> $DIR/associated-types-eq-hr.rs:86:5 | -LL | bar::(); //~ ERROR type mismatch +LL | bar::(); | ^^^^^^^^^^^^^^^^ expected isize, found usize | = note: expected type `&isize` diff --git a/src/test/ui/associated-types/associated-types-issue-17359.stderr b/src/test/ui/associated-types/associated-types-issue-17359.stderr index e05da8c4e4e..575a072c558 100644 --- a/src/test/ui/associated-types/associated-types-issue-17359.stderr +++ b/src/test/ui/associated-types/associated-types-issue-17359.stderr @@ -4,7 +4,7 @@ error[E0046]: not all trait items implemented, missing: `Type` LL | type Type; | ---------- `Type` from trait ... -LL | impl Trait for isize {} //~ ERROR missing: `Type` +LL | impl Trait for isize {} | ^^^^^^^^^^^^^^^^^^^^ missing `Type` in implementation error: aborting due to previous error diff --git a/src/test/ui/associated-types/associated-types-issue-20346.stderr b/src/test/ui/associated-types/associated-types-issue-20346.stderr index 27b5b1e00f9..7d5b16c6e62 100644 --- a/src/test/ui/associated-types/associated-types-issue-20346.stderr +++ b/src/test/ui/associated-types/associated-types-issue-20346.stderr @@ -1,7 +1,7 @@ error[E0271]: type mismatch resolving ` as Iterator>::Item == std::option::Option` --> $DIR/associated-types-issue-20346.rs:34:5 | -LL | is_iterator_of::, _>(&adapter); //~ ERROR type mismatch +LL | is_iterator_of::, _>(&adapter); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type parameter, found enum `std::option::Option` | = note: expected type `T` diff --git a/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr b/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr index ec8852d9f18..2926bdae052 100644 --- a/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr +++ b/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr @@ -1,7 +1,7 @@ error[E0271]: type mismatch resolving `::Y == i32` --> $DIR/associated-types-multiple-types-one-trait.rs:13:5 | -LL | want_y(t); //~ ERROR type mismatch +LL | want_y(t); | ^^^^^^ expected associated type, found i32 | = note: expected type `::Y` @@ -15,7 +15,7 @@ LL | fn want_y>(t: &T) { } error[E0271]: type mismatch resolving `::X == u32` --> $DIR/associated-types-multiple-types-one-trait.rs:18:5 | -LL | want_x(t); //~ ERROR type mismatch +LL | want_x(t); | ^^^^^^ expected associated type, found u32 | = note: expected type `::X` diff --git a/src/test/ui/associated-types/associated-types-outlives.stderr b/src/test/ui/associated-types/associated-types-outlives.stderr index 4cf3e473cf1..e35862d718f 100644 --- a/src/test/ui/associated-types/associated-types-outlives.stderr +++ b/src/test/ui/associated-types/associated-types-outlives.stderr @@ -3,7 +3,7 @@ error[E0505]: cannot move out of `x` because it is borrowed | LL | 's: loop { y = denormalise(&x); break } | - borrow of `x` occurs here -LL | drop(x); //~ ERROR cannot move out of `x` because it is borrowed +LL | drop(x); | ^ move out of `x` occurs here error: aborting due to previous error diff --git a/src/test/ui/associated-types/associated-types-overridden-binding.stderr b/src/test/ui/associated-types/associated-types-overridden-binding.stderr index b54d2037f5d..a26ee23894f 100644 --- a/src/test/ui/associated-types/associated-types-overridden-binding.stderr +++ b/src/test/ui/associated-types/associated-types-overridden-binding.stderr @@ -1,7 +1,7 @@ error[E0284]: type annotations required: cannot resolve `::Item == i32` --> $DIR/associated-types-overridden-binding.rs:4:1 | -LL | trait Bar: Foo {} //~ ERROR type annotations required +LL | trait Bar: Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: required by `Foo` diff --git a/src/test/ui/associated-types/associated-types-path-1.stderr b/src/test/ui/associated-types/associated-types-path-1.stderr index 5f5fb7a273b..b6d3b53ba59 100644 --- a/src/test/ui/associated-types/associated-types-path-1.stderr +++ b/src/test/ui/associated-types/associated-types-path-1.stderr @@ -1,7 +1,7 @@ error[E0220]: associated type `A` not found for `T` --> $DIR/associated-types-path-1.rs:10:23 | -LL | pub fn f1(a: T, x: T::A) {} //~ERROR associated type `A` not found +LL | pub fn f1(a: T, x: T::A) {} | ^^^^ associated type `A` not found error[E0221]: ambiguous associated type `A` in bounds of `T` @@ -13,7 +13,7 @@ LL | type A; LL | type A; | ------- ambiguous `A` from `Bar` ... -LL | pub fn f2(a: T, x: T::A) {} //~ERROR ambiguous associated type `A` +LL | pub fn f2(a: T, x: T::A) {} | ^^^^ ambiguous associated type `A` error: aborting due to 2 previous errors diff --git a/src/test/ui/associated-types/associated-types-subtyping-1.stderr b/src/test/ui/associated-types/associated-types-subtyping-1.stderr index 77914dbae79..58ceec9040b 100644 --- a/src/test/ui/associated-types/associated-types-subtyping-1.stderr +++ b/src/test/ui/associated-types/associated-types-subtyping-1.stderr @@ -4,7 +4,7 @@ error[E0623]: lifetime mismatch LL | fn method2<'a,'b,T>(x: &'a T, y: &'b T) | ----- ----- these two types are declared with different lifetimes... ... -LL | let _c: >::Type = a; //~ ERROR E0623 +LL | let _c: >::Type = a; | ^ ...but data from `y` flows into `x` here error[E0623]: lifetime mismatch @@ -13,7 +13,7 @@ error[E0623]: lifetime mismatch LL | fn method3<'a,'b,T>(x: &'a T, y: &'b T) | ----- ----- these two types are declared with different lifetimes... ... -LL | let _c: >::Type = b; //~ ERROR E0623 +LL | let _c: >::Type = b; | ^ ...but data from `y` flows into `x` here error: aborting due to 2 previous errors diff --git a/src/test/ui/associated-types/associated-types-unsized.stderr b/src/test/ui/associated-types/associated-types-unsized.stderr index c83b14374f7..b5db9743932 100644 --- a/src/test/ui/associated-types/associated-types-unsized.stderr +++ b/src/test/ui/associated-types/associated-types-unsized.stderr @@ -1,7 +1,7 @@ error[E0277]: the size for values of type `::Value` cannot be known at compilation time --> $DIR/associated-types-unsized.rs:7:9 | -LL | let x = t.get(); //~ ERROR the size for values of type +LL | let x = t.get(); | ^ doesn't have a size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `::Value` diff --git a/src/test/ui/attempted-access-non-fatal.stderr b/src/test/ui/attempted-access-non-fatal.stderr index 2fee49acdf4..5b7db0e9d6f 100644 --- a/src/test/ui/attempted-access-non-fatal.stderr +++ b/src/test/ui/attempted-access-non-fatal.stderr @@ -1,13 +1,13 @@ error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:4:15 | -LL | let _ = x.foo; //~ `{integer}` is a primitive type and therefore doesn't have fields [E0610] +LL | let _ = x.foo; | ^^^ error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:5:15 | -LL | let _ = x.bar; //~ `{integer}` is a primitive type and therefore doesn't have fields [E0610] +LL | let _ = x.bar; | ^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/attr-eq-token-tree.stderr b/src/test/ui/attr-eq-token-tree.stderr index 57d6a4e0f16..aae25b2721e 100644 --- a/src/test/ui/attr-eq-token-tree.stderr +++ b/src/test/ui/attr-eq-token-tree.stderr @@ -1,7 +1,7 @@ error: unexpected token: `!` --> $DIR/attr-eq-token-tree.rs:3:11 | -LL | #[my_attr = !] //~ ERROR unexpected token: `!` +LL | #[my_attr = !] | ^ error: aborting due to previous error diff --git a/src/test/ui/attr-usage-inline.stderr b/src/test/ui/attr-usage-inline.stderr index 3030a2f8f1d..d8d7f6adb82 100644 --- a/src/test/ui/attr-usage-inline.stderr +++ b/src/test/ui/attr-usage-inline.stderr @@ -1,7 +1,7 @@ error[E0518]: attribute should be applied to function or closure --> $DIR/attr-usage-inline.rs:6:1 | -LL | #[inline] //~ ERROR: attribute should be applied to function or closure +LL | #[inline] | ^^^^^^^^^ LL | struct S; | --------- not a function or closure diff --git a/src/test/ui/attr-usage-repr.stderr b/src/test/ui/attr-usage-repr.stderr index abb8685e4ce..f8ad7eec454 100644 --- a/src/test/ui/attr-usage-repr.stderr +++ b/src/test/ui/attr-usage-repr.stderr @@ -1,7 +1,7 @@ error[E0517]: attribute should be applied to struct, enum or union --> $DIR/attr-usage-repr.rs:4:8 | -LL | #[repr(C)] //~ ERROR: attribute should be applied to struct, enum or union +LL | #[repr(C)] | ^ LL | fn f() {} | --------- not a struct, enum or union @@ -9,7 +9,7 @@ LL | fn f() {} error[E0517]: attribute should be applied to enum --> $DIR/attr-usage-repr.rs:16:8 | -LL | #[repr(i8)] //~ ERROR: attribute should be applied to enum +LL | #[repr(i8)] | ^^ LL | struct SInt(f64, f64); | ---------------------- not an enum @@ -17,7 +17,7 @@ LL | struct SInt(f64, f64); error[E0517]: attribute should be applied to struct or union --> $DIR/attr-usage-repr.rs:25:8 | -LL | #[repr(packed)] //~ ERROR: attribute should be applied to struct +LL | #[repr(packed)] | ^^^^^^ LL | enum EPacked { A, B } | --------------------- not a struct or union @@ -25,7 +25,7 @@ LL | enum EPacked { A, B } error[E0517]: attribute should be applied to struct --> $DIR/attr-usage-repr.rs:28:8 | -LL | #[repr(simd)] //~ ERROR: attribute should be applied to struct +LL | #[repr(simd)] | ^^^^ LL | enum ESimd { A, B } | ------------------- not a struct diff --git a/src/test/ui/attribute-with-no-generics-in-parameter-list.stderr b/src/test/ui/attribute-with-no-generics-in-parameter-list.stderr index f08f107a62f..4c5964715db 100644 --- a/src/test/ui/attribute-with-no-generics-in-parameter-list.stderr +++ b/src/test/ui/attribute-with-no-generics-in-parameter-list.stderr @@ -1,7 +1,7 @@ error: attribute without generic parameters --> $DIR/attribute-with-no-generics-in-parameter-list.rs:1:8 | -LL | fn foo<#[attr]>() {} //~ ERROR attribute without generic parameters +LL | fn foo<#[attr]>() {} | ^^^^^^^ attributes are only permitted when preceding parameters error: aborting due to previous error diff --git a/src/test/ui/augmented-assignments.stderr b/src/test/ui/augmented-assignments.stderr index 73de315e542..e429bf2a594 100644 --- a/src/test/ui/augmented-assignments.stderr +++ b/src/test/ui/augmented-assignments.stderr @@ -4,16 +4,16 @@ error[E0596]: cannot borrow immutable local variable `y` as mutable LL | let y = Int(2); | - help: make this binding mutable: `mut y` ... -LL | y //~ error: cannot borrow immutable local variable `y` as mutable +LL | y | ^ cannot borrow mutably error[E0382]: use of moved value: `x` --> $DIR/augmented-assignments.rs:13:5 | -LL | x //~ error: use of moved value: `x` +LL | x | ^ value used here after move ... -LL | x; //~ value moved here +LL | x; | - value moved here | = note: move occurs because `x` has type `Int`, which does not implement the `Copy` trait diff --git a/src/test/ui/auto-ref-slice-plus-ref.stderr b/src/test/ui/auto-ref-slice-plus-ref.stderr index 356e24d18a7..97b9cd961a0 100644 --- a/src/test/ui/auto-ref-slice-plus-ref.stderr +++ b/src/test/ui/auto-ref-slice-plus-ref.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `test_mut` found for type `std::vec::Vec<{integer}>` in the current scope --> $DIR/auto-ref-slice-plus-ref.rs:7:7 | -LL | a.test_mut(); //~ ERROR no method named `test_mut` found +LL | a.test_mut(); | ^^^^^^^^ help: did you mean: `get_mut` | = help: items from traits can only be used if the trait is implemented and in scope @@ -11,7 +11,7 @@ LL | a.test_mut(); //~ ERROR no method named `test_mut` found error[E0599]: no method named `test` found for type `std::vec::Vec<{integer}>` in the current scope --> $DIR/auto-ref-slice-plus-ref.rs:8:7 | -LL | a.test(); //~ ERROR no method named `test` found +LL | a.test(); | ^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -21,7 +21,7 @@ LL | a.test(); //~ ERROR no method named `test` found error[E0599]: no method named `test` found for type `[{integer}; 1]` in the current scope --> $DIR/auto-ref-slice-plus-ref.rs:10:11 | -LL | ([1]).test(); //~ ERROR no method named `test` found +LL | ([1]).test(); | ^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -31,7 +31,7 @@ LL | ([1]).test(); //~ ERROR no method named `test` found error[E0599]: no method named `test` found for type `&[{integer}; 1]` in the current scope --> $DIR/auto-ref-slice-plus-ref.rs:11:12 | -LL | (&[1]).test(); //~ ERROR no method named `test` found +LL | (&[1]).test(); | ^^^^ | = help: items from traits can only be used if the trait is implemented and in scope diff --git a/src/test/ui/await-keyword/2018-edition-error.stderr b/src/test/ui/await-keyword/2018-edition-error.stderr index 9ddb27916d1..19bf11a67d1 100644 --- a/src/test/ui/await-keyword/2018-edition-error.stderr +++ b/src/test/ui/await-keyword/2018-edition-error.stderr @@ -1,37 +1,37 @@ error[E0721]: `await` is a keyword in the 2018 edition --> $DIR/2018-edition-error.rs:5:13 | -LL | pub mod await { //~ ERROR `await` is a keyword +LL | pub mod await { | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` error[E0721]: `await` is a keyword in the 2018 edition --> $DIR/2018-edition-error.rs:6:20 | -LL | pub struct await; //~ ERROR `await` is a keyword +LL | pub struct await; | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` error[E0721]: `await` is a keyword in the 2018 edition --> $DIR/2018-edition-error.rs:9:22 | -LL | use self::outer_mod::await::await; //~ ERROR `await` is a keyword +LL | use self::outer_mod::await::await; | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` error[E0721]: `await` is a keyword in the 2018 edition --> $DIR/2018-edition-error.rs:9:29 | -LL | use self::outer_mod::await::await; //~ ERROR `await` is a keyword +LL | use self::outer_mod::await::await; | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` error[E0721]: `await` is a keyword in the 2018 edition --> $DIR/2018-edition-error.rs:13:11 | -LL | match await { await => () } //~ ERROR `await` is a keyword +LL | match await { await => () } | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` error[E0721]: `await` is a keyword in the 2018 edition --> $DIR/2018-edition-error.rs:13:19 | -LL | match await { await => () } //~ ERROR `await` is a keyword +LL | match await { await => () } | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` error: aborting due to 6 previous errors diff --git a/src/test/ui/bad/bad-expr-lhs.stderr b/src/test/ui/bad/bad-expr-lhs.stderr index 590d73bc3f5..3e41b7e6585 100644 --- a/src/test/ui/bad/bad-expr-lhs.stderr +++ b/src/test/ui/bad/bad-expr-lhs.stderr @@ -1,31 +1,31 @@ error[E0070]: invalid left-hand side expression --> $DIR/bad-expr-lhs.rs:2:5 | -LL | 1 = 2; //~ ERROR invalid left-hand side expression +LL | 1 = 2; | ^^^^^ left-hand of expression not valid error[E0067]: invalid left-hand side expression --> $DIR/bad-expr-lhs.rs:3:5 | -LL | 1 += 2; //~ ERROR invalid left-hand side expression +LL | 1 += 2; | ^ invalid expression for left-hand side error[E0070]: invalid left-hand side expression --> $DIR/bad-expr-lhs.rs:4:5 | -LL | (1, 2) = (3, 4); //~ ERROR invalid left-hand side expression +LL | (1, 2) = (3, 4); | ^^^^^^^^^^^^^^^ left-hand of expression not valid error[E0070]: invalid left-hand side expression --> $DIR/bad-expr-lhs.rs:7:5 | -LL | (a, b) = (3, 4); //~ ERROR invalid left-hand side expression +LL | (a, b) = (3, 4); | ^^^^^^^^^^^^^^^ left-hand of expression not valid error[E0070]: invalid left-hand side expression --> $DIR/bad-expr-lhs.rs:9:5 | -LL | None = Some(3); //~ ERROR invalid left-hand side expression +LL | None = Some(3); | ^^^^^^^^^^^^^^ left-hand of expression not valid error: aborting due to 5 previous errors diff --git a/src/test/ui/bad/bad-expr-path.stderr b/src/test/ui/bad/bad-expr-path.stderr index 71ac9a16ba6..6dec74efd71 100644 --- a/src/test/ui/bad/bad-expr-path.stderr +++ b/src/test/ui/bad/bad-expr-path.stderr @@ -19,7 +19,7 @@ LL | log(debug, m1::arguments); error[E0580]: main function has wrong type --> $DIR/bad-expr-path.rs:3:1 | -LL | fn main(arguments: Vec) { //~ ERROR main function has wrong type +LL | fn main(arguments: Vec) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters | = note: expected type `fn()` diff --git a/src/test/ui/bad/bad-expr-path2.stderr b/src/test/ui/bad/bad-expr-path2.stderr index 343de94182e..8212b2392c4 100644 --- a/src/test/ui/bad/bad-expr-path2.stderr +++ b/src/test/ui/bad/bad-expr-path2.stderr @@ -19,7 +19,7 @@ LL | log(debug, m1::arguments); error[E0580]: main function has wrong type --> $DIR/bad-expr-path2.rs:5:1 | -LL | fn main(arguments: Vec) { //~ ERROR main function has wrong type +LL | fn main(arguments: Vec) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters | = note: expected type `fn()` diff --git a/src/test/ui/bad/bad-extern-link-attrs.stderr b/src/test/ui/bad/bad-extern-link-attrs.stderr index 6732e8553f3..5baba599e74 100644 --- a/src/test/ui/bad/bad-extern-link-attrs.stderr +++ b/src/test/ui/bad/bad-extern-link-attrs.stderr @@ -1,19 +1,19 @@ error[E0459]: #[link(...)] specified without `name = "foo"` --> $DIR/bad-extern-link-attrs.rs:1:1 | -LL | #[link()] //~ ERROR: specified without `name = +LL | #[link()] | ^^^^^^^^^ missing `name` argument error[E0454]: #[link(name = "")] given with empty name --> $DIR/bad-extern-link-attrs.rs:2:1 | -LL | #[link(name = "")] //~ ERROR: with empty name +LL | #[link(name = "")] | ^^^^^^^^^^^^^^^^^^ empty name given error[E0458]: unknown kind: `bar` --> $DIR/bad-extern-link-attrs.rs:4:1 | -LL | #[link(name = "foo", kind = "bar")] //~ ERROR: unknown kind +LL | #[link(name = "foo", kind = "bar")] | ^^^^^^^^^^^^^^^^^^^^^------------^^ | | | unknown kind diff --git a/src/test/ui/bad/bad-lint-cap2.stderr b/src/test/ui/bad/bad-lint-cap2.stderr index d7ec41489d1..f6e67e6d78d 100644 --- a/src/test/ui/bad/bad-lint-cap2.stderr +++ b/src/test/ui/bad/bad-lint-cap2.stderr @@ -1,7 +1,7 @@ error: unused import: `std::option` --> $DIR/bad-lint-cap2.rs:6:5 | -LL | use std::option; //~ ERROR +LL | use std::option; | ^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/bad/bad-lint-cap3.stderr b/src/test/ui/bad/bad-lint-cap3.stderr index 5bf0b089afa..a1ea3f774b4 100644 --- a/src/test/ui/bad/bad-lint-cap3.stderr +++ b/src/test/ui/bad/bad-lint-cap3.stderr @@ -1,7 +1,7 @@ warning: unused import: `std::option` --> $DIR/bad-lint-cap3.rs:7:5 | -LL | use std::option; //~ WARN +LL | use std::option; | ^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/bad/bad-main.stderr b/src/test/ui/bad/bad-main.stderr index 1a9c11f7b42..c7f15e7a4fa 100644 --- a/src/test/ui/bad/bad-main.stderr +++ b/src/test/ui/bad/bad-main.stderr @@ -1,7 +1,7 @@ error[E0580]: main function has wrong type --> $DIR/bad-main.rs:1:1 | -LL | fn main(x: isize) { } //~ ERROR: main function has wrong type [E0580] +LL | fn main(x: isize) { } | ^^^^^^^^^^^^^^^^^ incorrect number of function parameters | = note: expected type `fn()` diff --git a/src/test/ui/bad/bad-method-typaram-kind.stderr b/src/test/ui/bad/bad-method-typaram-kind.stderr index 8232bdd23a6..c72b9652360 100644 --- a/src/test/ui/bad/bad-method-typaram-kind.stderr +++ b/src/test/ui/bad/bad-method-typaram-kind.stderr @@ -1,7 +1,7 @@ error[E0277]: `T` cannot be sent between threads safely --> $DIR/bad-method-typaram-kind.rs:2:7 | -LL | 1.bar::(); //~ ERROR `T` cannot be sent between threads safely +LL | 1.bar::(); | ^^^ `T` cannot be sent between threads safely | = help: the trait `std::marker::Send` is not implemented for `T` diff --git a/src/test/ui/bad/bad-type-env-capture.stderr b/src/test/ui/bad/bad-type-env-capture.stderr index ce803e96801..a459c00634a 100644 --- a/src/test/ui/bad/bad-type-env-capture.stderr +++ b/src/test/ui/bad/bad-type-env-capture.stderr @@ -3,7 +3,7 @@ error[E0401]: can't use generic parameters from outer function | LL | fn foo() { | - type variable from outer function -LL | fn bar(b: T) { } //~ ERROR can't use generic parameters from outer +LL | fn bar(b: T) { } | --- ^ use of generic parameter from outer function | | | help: try using a local generic parameter instead: `bar` diff --git a/src/test/ui/bind-by-move/bind-by-move-neither-can-live-while-the-other-survives-2.stderr b/src/test/ui/bind-by-move/bind-by-move-neither-can-live-while-the-other-survives-2.stderr index 427b1a722d9..9157fe0b070 100644 --- a/src/test/ui/bind-by-move/bind-by-move-neither-can-live-while-the-other-survives-2.stderr +++ b/src/test/ui/bind-by-move/bind-by-move-neither-can-live-while-the-other-survives-2.stderr @@ -1,7 +1,7 @@ error[E0009]: cannot bind by-move and by-ref in the same pattern --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-2.rs:12:23 | -LL | Some((ref _y, _z)) => { }, //~ ERROR cannot bind by-move and by-ref in the same pattern +LL | Some((ref _y, _z)) => { }, | ------ ^^ by-move pattern here | | | both by-ref and by-move used diff --git a/src/test/ui/bind-by-move/bind-by-move-neither-can-live-while-the-other-survives-4.stderr b/src/test/ui/bind-by-move/bind-by-move-neither-can-live-while-the-other-survives-4.stderr index 9ebbedcfe60..267a9dff926 100644 --- a/src/test/ui/bind-by-move/bind-by-move-neither-can-live-while-the-other-survives-4.stderr +++ b/src/test/ui/bind-by-move/bind-by-move-neither-can-live-while-the-other-survives-4.stderr @@ -1,7 +1,7 @@ error[E0009]: cannot bind by-move and by-ref in the same pattern --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-4.rs:12:15 | -LL | Some((_y, ref _z)) => { }, //~ ERROR cannot bind by-move and by-ref in the same pattern +LL | Some((_y, ref _z)) => { }, | ^^ ------ both by-ref and by-move used | | | by-move pattern here diff --git a/src/test/ui/binop/binop-consume-args.stderr b/src/test/ui/binop/binop-consume-args.stderr index 0b5d2200b9f..9246c116709 100644 --- a/src/test/ui/binop/binop-consume-args.stderr +++ b/src/test/ui/binop/binop-consume-args.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `lhs` | LL | lhs + rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move | = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait @@ -13,8 +13,8 @@ error[E0382]: use of moved value: `rhs` | LL | lhs + rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` -LL | drop(rhs); //~ ERROR use of moved value: `rhs` +LL | drop(lhs); +LL | drop(rhs); | ^^^ value used here after move | = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait @@ -24,7 +24,7 @@ error[E0382]: use of moved value: `lhs` | LL | lhs - rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move | = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait @@ -34,8 +34,8 @@ error[E0382]: use of moved value: `rhs` | LL | lhs - rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` -LL | drop(rhs); //~ ERROR use of moved value: `rhs` +LL | drop(lhs); +LL | drop(rhs); | ^^^ value used here after move | = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait @@ -45,7 +45,7 @@ error[E0382]: use of moved value: `lhs` | LL | lhs * rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move | = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait @@ -55,8 +55,8 @@ error[E0382]: use of moved value: `rhs` | LL | lhs * rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` -LL | drop(rhs); //~ ERROR use of moved value: `rhs` +LL | drop(lhs); +LL | drop(rhs); | ^^^ value used here after move | = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait @@ -66,7 +66,7 @@ error[E0382]: use of moved value: `lhs` | LL | lhs / rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move | = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait @@ -76,8 +76,8 @@ error[E0382]: use of moved value: `rhs` | LL | lhs / rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` -LL | drop(rhs); //~ ERROR use of moved value: `rhs` +LL | drop(lhs); +LL | drop(rhs); | ^^^ value used here after move | = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait @@ -87,7 +87,7 @@ error[E0382]: use of moved value: `lhs` | LL | lhs % rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move | = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait @@ -97,8 +97,8 @@ error[E0382]: use of moved value: `rhs` | LL | lhs % rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` -LL | drop(rhs); //~ ERROR use of moved value: `rhs` +LL | drop(lhs); +LL | drop(rhs); | ^^^ value used here after move | = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait @@ -108,7 +108,7 @@ error[E0382]: use of moved value: `lhs` | LL | lhs & rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move | = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait @@ -118,8 +118,8 @@ error[E0382]: use of moved value: `rhs` | LL | lhs & rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` -LL | drop(rhs); //~ ERROR use of moved value: `rhs` +LL | drop(lhs); +LL | drop(rhs); | ^^^ value used here after move | = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait @@ -129,7 +129,7 @@ error[E0382]: use of moved value: `lhs` | LL | lhs | rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move | = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait @@ -139,8 +139,8 @@ error[E0382]: use of moved value: `rhs` | LL | lhs | rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` -LL | drop(rhs); //~ ERROR use of moved value: `rhs` +LL | drop(lhs); +LL | drop(rhs); | ^^^ value used here after move | = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait @@ -150,7 +150,7 @@ error[E0382]: use of moved value: `lhs` | LL | lhs ^ rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move | = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait @@ -160,8 +160,8 @@ error[E0382]: use of moved value: `rhs` | LL | lhs ^ rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` -LL | drop(rhs); //~ ERROR use of moved value: `rhs` +LL | drop(lhs); +LL | drop(rhs); | ^^^ value used here after move | = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait @@ -171,7 +171,7 @@ error[E0382]: use of moved value: `lhs` | LL | lhs << rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move | = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait @@ -181,8 +181,8 @@ error[E0382]: use of moved value: `rhs` | LL | lhs << rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` -LL | drop(rhs); //~ ERROR use of moved value: `rhs` +LL | drop(lhs); +LL | drop(rhs); | ^^^ value used here after move | = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait @@ -192,7 +192,7 @@ error[E0382]: use of moved value: `lhs` | LL | lhs >> rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move | = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait @@ -202,8 +202,8 @@ error[E0382]: use of moved value: `rhs` | LL | lhs >> rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` -LL | drop(rhs); //~ ERROR use of moved value: `rhs` +LL | drop(lhs); +LL | drop(rhs); | ^^^ value used here after move | = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait diff --git a/src/test/ui/binop/binop-move-semantics.stderr b/src/test/ui/binop/binop-move-semantics.stderr index b1dc70d379d..acc2620681b 100644 --- a/src/test/ui/binop/binop-move-semantics.stderr +++ b/src/test/ui/binop/binop-move-semantics.stderr @@ -4,7 +4,7 @@ error[E0382]: use of moved value: `x` LL | x | - value moved here LL | + -LL | x; //~ ERROR: use of moved value +LL | x; | ^ value used here after move | = note: move occurs because `x` has type `T`, which does not implement the `Copy` trait @@ -15,7 +15,7 @@ error[E0382]: use of moved value: `x` LL | x | - value moved here LL | + -LL | x.clone(); //~ ERROR: use of moved value +LL | x.clone(); | ^ value used here after move | = note: move occurs because `x` has type `T`, which does not implement the `Copy` trait @@ -26,7 +26,7 @@ error[E0505]: cannot move out of `x` because it is borrowed LL | let m = &x; | - borrow of `x` occurs here ... -LL | x //~ ERROR: cannot move out of `x` because it is borrowed +LL | x | ^ move out of `x` occurs here error[E0505]: cannot move out of `y` because it is borrowed @@ -35,19 +35,19 @@ error[E0505]: cannot move out of `y` because it is borrowed LL | let n = &mut y; | - borrow of `y` occurs here ... -LL | y; //~ ERROR: cannot move out of `y` because it is borrowed +LL | y; | ^ move out of `y` occurs here error[E0507]: cannot move out of borrowed content --> $DIR/binop-move-semantics.rs:30:5 | -LL | *m //~ ERROR: cannot move out of borrowed content +LL | *m | ^^ cannot move out of borrowed content error[E0507]: cannot move out of borrowed content --> $DIR/binop-move-semantics.rs:32:5 | -LL | *n; //~ ERROR: cannot move out of borrowed content +LL | *n; | ^^ cannot move out of borrowed content error[E0502]: cannot borrow `f` as immutable because it is also borrowed as mutable @@ -56,7 +56,7 @@ error[E0502]: cannot borrow `f` as immutable because it is also borrowed as muta LL | &mut f | - mutable borrow occurs here LL | + -LL | &f; //~ ERROR: cannot borrow `f` as immutable because it is also borrowed as mutable +LL | &f; | ^ | | | immutable borrow occurs here @@ -68,7 +68,7 @@ error[E0502]: cannot borrow `f` as mutable because it is also borrowed as immuta LL | &f | - immutable borrow occurs here LL | + -LL | &mut f; //~ ERROR: cannot borrow `f` as mutable because it is also borrowed as immutable +LL | &mut f; | ^ | | | mutable borrow occurs here diff --git a/src/test/ui/block-result/block-must-not-have-result-do.stderr b/src/test/ui/block-result/block-must-not-have-result-do.stderr index 151315d34f2..5981b8b6079 100644 --- a/src/test/ui/block-result/block-must-not-have-result-do.stderr +++ b/src/test/ui/block-result/block-must-not-have-result-do.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/block-must-not-have-result-do.rs:3:9 | -LL | true //~ ERROR mismatched types +LL | true | ^^^^ expected (), found bool | = note: expected type `()` diff --git a/src/test/ui/block-result/block-must-not-have-result-res.stderr b/src/test/ui/block-result/block-must-not-have-result-res.stderr index 29885cac234..8a41f8b8e3d 100644 --- a/src/test/ui/block-result/block-must-not-have-result-res.stderr +++ b/src/test/ui/block-result/block-must-not-have-result-res.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | fn drop(&mut self) { | - expected `()` because of default return type -LL | true //~ ERROR mismatched types +LL | true | ^^^^ expected (), found bool | = note: expected type `()` diff --git a/src/test/ui/block-result/block-must-not-have-result-while.stderr b/src/test/ui/block-result/block-must-not-have-result-while.stderr index d41eae1a432..302d2972f7d 100644 --- a/src/test/ui/block-result/block-must-not-have-result-while.stderr +++ b/src/test/ui/block-result/block-must-not-have-result-while.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/block-must-not-have-result-while.rs:3:9 | -LL | true //~ ERROR mismatched types +LL | true | ^^^^ expected (), found bool | = note: expected type `()` diff --git a/src/test/ui/block-result/consider-removing-last-semi.stderr b/src/test/ui/block-result/consider-removing-last-semi.stderr index 1bf17db21ac..618d020ce08 100644 --- a/src/test/ui/block-result/consider-removing-last-semi.stderr +++ b/src/test/ui/block-result/consider-removing-last-semi.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/consider-removing-last-semi.rs:1:11 | -LL | fn f() -> String { //~ ERROR mismatched types +LL | fn f() -> String { | - ^^^^^^ expected struct `std::string::String`, found () | | | this function's body doesn't return @@ -15,7 +15,7 @@ LL | "bla".to_string(); error[E0308]: mismatched types --> $DIR/consider-removing-last-semi.rs:6:11 | -LL | fn g() -> String { //~ ERROR mismatched types +LL | fn g() -> String { | - ^^^^^^ expected struct `std::string::String`, found () | | | this function's body doesn't return diff --git a/src/test/ui/block-result/issue-11714.stderr b/src/test/ui/block-result/issue-11714.stderr index 2c13b287669..d73489a602d 100644 --- a/src/test/ui/block-result/issue-11714.stderr +++ b/src/test/ui/block-result/issue-11714.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-11714.rs:1:14 | -LL | fn blah() -> i32 { //~ ERROR mismatched types +LL | fn blah() -> i32 { | ---- ^^^ expected i32, found () | | | this function's body doesn't return diff --git a/src/test/ui/block-result/issue-13428.stderr b/src/test/ui/block-result/issue-13428.stderr index 91e926eb5a7..18adb15c961 100644 --- a/src/test/ui/block-result/issue-13428.stderr +++ b/src/test/ui/block-result/issue-13428.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-13428.rs:3:13 | -LL | fn foo() -> String { //~ ERROR mismatched types +LL | fn foo() -> String { | --- ^^^^^^ expected struct `std::string::String`, found () | | | this function's body doesn't return @@ -15,7 +15,7 @@ LL | ; error[E0308]: mismatched types --> $DIR/issue-13428.rs:11:13 | -LL | fn bar() -> String { //~ ERROR mismatched types +LL | fn bar() -> String { | --- ^^^^^^ expected struct `std::string::String`, found () | | | this function's body doesn't return diff --git a/src/test/ui/block-result/issue-20862.stderr b/src/test/ui/block-result/issue-20862.stderr index fce06f5b45d..fb4feff3713 100644 --- a/src/test/ui/block-result/issue-20862.stderr +++ b/src/test/ui/block-result/issue-20862.stderr @@ -14,7 +14,7 @@ error[E0618]: expected function, found `()` | LL | / fn foo(x: i32) { LL | | |y| x + y -LL | | //~^ ERROR: mismatched types +LL | | LL | | } | |_- `foo` defined here returns `()` ... diff --git a/src/test/ui/block-result/issue-22645.stderr b/src/test/ui/block-result/issue-22645.stderr index 9cb1a6c5d7d..e1e6428eda2 100644 --- a/src/test/ui/block-result/issue-22645.stderr +++ b/src/test/ui/block-result/issue-22645.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `{integer}: Scalar` is not satisfied --> $DIR/issue-22645.rs:15:5 | -LL | b + 3 //~ ERROR E0277 +LL | b + 3 | ^ the trait `Scalar` is not implemented for `{integer}` | = help: the following implementations were found: @@ -14,7 +14,7 @@ error[E0308]: mismatched types LL | fn main() { | - expected `()` because of default return type LL | let b = Bob + 3.5; -LL | b + 3 //~ ERROR E0277 +LL | b + 3 | ^^^^^ expected (), found struct `Bob` | = note: expected type `()` diff --git a/src/test/ui/block-result/unexpected-return-on-unit.stderr b/src/test/ui/block-result/unexpected-return-on-unit.stderr index 50af4734202..3ceff81ec4d 100644 --- a/src/test/ui/block-result/unexpected-return-on-unit.stderr +++ b/src/test/ui/block-result/unexpected-return-on-unit.stderr @@ -1,14 +1,14 @@ error[E0308]: mismatched types --> $DIR/unexpected-return-on-unit.rs:9:5 | -LL | foo() //~ ERROR mismatched types +LL | foo() | ^^^^^ expected (), found usize | = note: expected type `()` found type `usize` help: try adding a semicolon | -LL | foo(); //~ ERROR mismatched types +LL | foo(); | ^ help: try adding a return type | diff --git a/src/test/ui/borrowck/assign_mutable_fields.stderr b/src/test/ui/borrowck/assign_mutable_fields.stderr index 9024e7cf01c..904d2ed97de 100644 --- a/src/test/ui/borrowck/assign_mutable_fields.stderr +++ b/src/test/ui/borrowck/assign_mutable_fields.stderr @@ -1,19 +1,19 @@ error[E0381]: use of possibly uninitialized variable: `x.0` --> $DIR/assign_mutable_fields.rs:11:10 | -LL | drop(x.0); //~ ERROR +LL | drop(x.0); | ^^^ use of possibly uninitialized `x.0` error[E0381]: use of possibly uninitialized variable: `x.1` --> $DIR/assign_mutable_fields.rs:12:10 | -LL | drop(x.1); //~ ERROR +LL | drop(x.1); | ^^^ use of possibly uninitialized `x.1` error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/assign_mutable_fields.rs:19:10 | -LL | drop(x); //~ ERROR +LL | drop(x); | ^ use of possibly uninitialized `x` error: aborting due to 3 previous errors diff --git a/src/test/ui/borrowck/borrow-immutable-upvar-mutation.stderr b/src/test/ui/borrowck/borrow-immutable-upvar-mutation.stderr index 505604ab597..09adb350e00 100644 --- a/src/test/ui/borrowck/borrow-immutable-upvar-mutation.stderr +++ b/src/test/ui/borrowck/borrow-immutable-upvar-mutation.stderr @@ -1,75 +1,75 @@ error[E0387]: cannot assign to data in a captured outer variable in an `Fn` closure --> $DIR/borrow-immutable-upvar-mutation.rs:15:27 | -LL | let _f = to_fn(|| x = 42); //~ ERROR cannot assign +LL | let _f = to_fn(|| x = 42); | ^^^^^^ | help: consider changing this closure to take self by mutable reference --> $DIR/borrow-immutable-upvar-mutation.rs:15:24 | -LL | let _f = to_fn(|| x = 42); //~ ERROR cannot assign +LL | let _f = to_fn(|| x = 42); | ^^^^^^^^^ error[E0387]: cannot borrow data mutably in a captured outer variable in an `Fn` closure --> $DIR/borrow-immutable-upvar-mutation.rs:18:36 | -LL | let _g = to_fn(|| set(&mut y)); //~ ERROR cannot borrow +LL | let _g = to_fn(|| set(&mut y)); | ^ | help: consider changing this closure to take self by mutable reference --> $DIR/borrow-immutable-upvar-mutation.rs:18:24 | -LL | let _g = to_fn(|| set(&mut y)); //~ ERROR cannot borrow +LL | let _g = to_fn(|| set(&mut y)); | ^^^^^^^^^^^^^^ error[E0387]: cannot assign to data in a captured outer variable in an `Fn` closure --> $DIR/borrow-immutable-upvar-mutation.rs:21:55 | -LL | let _h = to_fn_mut(|| { set(&mut z); to_fn(|| z = 42); }); //~ ERROR cannot assign +LL | let _h = to_fn_mut(|| { set(&mut z); to_fn(|| z = 42); }); | ^^^^^^ | help: consider changing this closure to take self by mutable reference --> $DIR/borrow-immutable-upvar-mutation.rs:21:52 | -LL | let _h = to_fn_mut(|| { set(&mut z); to_fn(|| z = 42); }); //~ ERROR cannot assign +LL | let _h = to_fn_mut(|| { set(&mut z); to_fn(|| z = 42); }); | ^^^^^^^^^ error[E0594]: cannot assign to captured outer variable in an `Fn` closure --> $DIR/borrow-immutable-upvar-mutation.rs:27:32 | -LL | let _f = to_fn(move || x = 42); //~ ERROR cannot assign +LL | let _f = to_fn(move || x = 42); | ^^^^^^ | = note: `Fn` closures cannot capture their enclosing environment for modifications help: consider changing this closure to take self by mutable reference --> $DIR/borrow-immutable-upvar-mutation.rs:27:24 | -LL | let _f = to_fn(move || x = 42); //~ ERROR cannot assign +LL | let _f = to_fn(move || x = 42); | ^^^^^^^^^^^^^^ error[E0596]: cannot borrow captured outer variable in an `Fn` closure as mutable --> $DIR/borrow-immutable-upvar-mutation.rs:30:41 | -LL | let _g = to_fn(move || set(&mut y)); //~ ERROR cannot borrow +LL | let _g = to_fn(move || set(&mut y)); | ^ | help: consider changing this closure to take self by mutable reference --> $DIR/borrow-immutable-upvar-mutation.rs:30:24 | -LL | let _g = to_fn(move || set(&mut y)); //~ ERROR cannot borrow +LL | let _g = to_fn(move || set(&mut y)); | ^^^^^^^^^^^^^^^^^^^ error[E0594]: cannot assign to captured outer variable in an `Fn` closure --> $DIR/borrow-immutable-upvar-mutation.rs:33:65 | -LL | let _h = to_fn_mut(move || { set(&mut z); to_fn(move || z = 42); }); //~ ERROR cannot assign +LL | let _h = to_fn_mut(move || { set(&mut z); to_fn(move || z = 42); }); | ^^^^^^ | = note: `Fn` closures cannot capture their enclosing environment for modifications help: consider changing this closure to take self by mutable reference --> $DIR/borrow-immutable-upvar-mutation.rs:33:57 | -LL | let _h = to_fn_mut(move || { set(&mut z); to_fn(move || z = 42); }); //~ ERROR cannot assign +LL | let _h = to_fn_mut(move || { set(&mut z); to_fn(move || z = 42); }); | ^^^^^^^^^^^^^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/borrowck/borrow-tuple-fields.stderr b/src/test/ui/borrowck/borrow-tuple-fields.stderr index a62e7287e68..f7fc06e1b4f 100644 --- a/src/test/ui/borrowck/borrow-tuple-fields.stderr +++ b/src/test/ui/borrowck/borrow-tuple-fields.stderr @@ -3,7 +3,7 @@ error[E0505]: cannot move out of `x` because it is borrowed | LL | let r = &x.0; | --- borrow of `x.0` occurs here -LL | let y = x; //~ ERROR cannot move out of `x` because it is borrowed +LL | let y = x; | ^ move out of `x` occurs here error[E0502]: cannot borrow `x.0` as mutable because it is also borrowed as immutable @@ -11,7 +11,7 @@ error[E0502]: cannot borrow `x.0` as mutable because it is also borrowed as immu | LL | let a = &x.0; | --- immutable borrow occurs here -LL | let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable because it is also borrowed as +LL | let b = &mut x.0; | ^^^ mutable borrow occurs here ... LL | } @@ -22,7 +22,7 @@ error[E0499]: cannot borrow `x.0` as mutable more than once at a time | LL | let a = &mut x.0; | --- first mutable borrow occurs here -LL | let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable more than once at a time +LL | let b = &mut x.0; | ^^^ second mutable borrow occurs here ... LL | } @@ -33,7 +33,7 @@ error[E0505]: cannot move out of `x` because it is borrowed | LL | let r = &x.0; | --- borrow of `x.0` occurs here -LL | let y = x; //~ ERROR cannot move out of `x` because it is borrowed +LL | let y = x; | ^ move out of `x` occurs here error[E0502]: cannot borrow `x.0` as mutable because it is also borrowed as immutable @@ -41,7 +41,7 @@ error[E0502]: cannot borrow `x.0` as mutable because it is also borrowed as immu | LL | let a = &x.0; | --- immutable borrow occurs here -LL | let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable because it is also borrowed as +LL | let b = &mut x.0; | ^^^ mutable borrow occurs here ... LL | } @@ -52,7 +52,7 @@ error[E0499]: cannot borrow `x.0` as mutable more than once at a time | LL | let a = &mut x.0; | --- first mutable borrow occurs here -LL | let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable more than once at a time +LL | let b = &mut x.0; | ^^^ second mutable borrow occurs here LL | a.use_mut(); LL | } diff --git a/src/test/ui/borrowck/borrowck-and-init.stderr b/src/test/ui/borrowck/borrowck-and-init.stderr index 42b658871df..13696ac8347 100644 --- a/src/test/ui/borrowck/borrowck-and-init.stderr +++ b/src/test/ui/borrowck/borrowck-and-init.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `i` --> $DIR/borrowck-and-init.rs:5:20 | -LL | println!("{}", i); //~ ERROR use of possibly uninitialized variable: `i` +LL | println!("{}", i); | ^ use of possibly uninitialized `i` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-anon-fields-struct.stderr b/src/test/ui/borrowck/borrowck-anon-fields-struct.stderr index 9c36a9fe875..efe94dee2e7 100644 --- a/src/test/ui/borrowck/borrowck-anon-fields-struct.stderr +++ b/src/test/ui/borrowck/borrowck-anon-fields-struct.stderr @@ -4,7 +4,7 @@ error[E0499]: cannot borrow `y.0` as mutable more than once at a time LL | Y(ref mut a, _) => a | --------- first mutable borrow occurs here ... -LL | Y(ref mut b, _) => b //~ ERROR cannot borrow +LL | Y(ref mut b, _) => b | ^^^^^^^^^ second mutable borrow occurs here ... LL | } diff --git a/src/test/ui/borrowck/borrowck-anon-fields-tuple.stderr b/src/test/ui/borrowck/borrowck-anon-fields-tuple.stderr index 4b823f396af..40f96cb712c 100644 --- a/src/test/ui/borrowck/borrowck-anon-fields-tuple.stderr +++ b/src/test/ui/borrowck/borrowck-anon-fields-tuple.stderr @@ -4,7 +4,7 @@ error[E0499]: cannot borrow `y.0` as mutable more than once at a time LL | (ref mut a, _) => a | --------- first mutable borrow occurs here ... -LL | (ref mut b, _) => b //~ ERROR cannot borrow +LL | (ref mut b, _) => b | ^^^^^^^^^ second mutable borrow occurs here ... LL | } diff --git a/src/test/ui/borrowck/borrowck-anon-fields-variant.stderr b/src/test/ui/borrowck/borrowck-anon-fields-variant.stderr index 1e94cdebaec..2835cab9092 100644 --- a/src/test/ui/borrowck/borrowck-anon-fields-variant.stderr +++ b/src/test/ui/borrowck/borrowck-anon-fields-variant.stderr @@ -4,7 +4,7 @@ error[E0499]: cannot borrow `y.0` as mutable more than once at a time LL | Foo::Y(ref mut a, _) => a, | --------- first mutable borrow occurs here ... -LL | Foo::Y(ref mut b, _) => b, //~ ERROR cannot borrow +LL | Foo::Y(ref mut b, _) => b, | ^^^^^^^^^ second mutable borrow occurs here ... LL | } diff --git a/src/test/ui/borrowck/borrowck-argument.stderr b/src/test/ui/borrowck/borrowck-argument.stderr index fa82b1c00cc..6c9c411cbcf 100644 --- a/src/test/ui/borrowck/borrowck-argument.stderr +++ b/src/test/ui/borrowck/borrowck-argument.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow immutable argument `arg` as mutable | LL | fn func(arg: S) { | --- help: make this binding mutable: `mut arg` -LL | arg.mutate(); //~ ERROR: cannot borrow immutable argument +LL | arg.mutate(); | ^^^ cannot borrow mutably error[E0596]: cannot borrow immutable argument `arg` as mutable @@ -11,7 +11,7 @@ error[E0596]: cannot borrow immutable argument `arg` as mutable | LL | fn method(&self, arg: S) { | --- help: make this binding mutable: `mut arg` -LL | arg.mutate(); //~ ERROR: cannot borrow immutable argument +LL | arg.mutate(); | ^^^ cannot borrow mutably error[E0596]: cannot borrow immutable argument `arg` as mutable @@ -19,13 +19,13 @@ error[E0596]: cannot borrow immutable argument `arg` as mutable | LL | fn default(&self, arg: S) { | --- help: make this binding mutable: `mut arg` -LL | arg.mutate(); //~ ERROR: cannot borrow immutable argument +LL | arg.mutate(); | ^^^ cannot borrow mutably error[E0596]: cannot borrow immutable argument `arg` as mutable --> $DIR/borrowck-argument.rs:32:17 | -LL | (|arg: S| { arg.mutate() })(s); //~ ERROR: cannot borrow immutable argument +LL | (|arg: S| { arg.mutate() })(s); | --- ^^^ cannot borrow mutably | | | help: make this binding mutable: `mut arg` diff --git a/src/test/ui/borrowck/borrowck-assign-comp-idx.stderr b/src/test/ui/borrowck/borrowck-assign-comp-idx.stderr index 9997aa4190e..0d092e6812d 100644 --- a/src/test/ui/borrowck/borrowck-assign-comp-idx.stderr +++ b/src/test/ui/borrowck/borrowck-assign-comp-idx.stderr @@ -4,7 +4,7 @@ error[E0502]: cannot borrow `p` as mutable because it is also borrowed as immuta LL | let q: &isize = &p[0]; | - immutable borrow occurs here LL | -LL | p[0] = 5; //~ ERROR cannot borrow +LL | p[0] = 5; | ^ mutable borrow occurs here ... LL | } @@ -15,7 +15,7 @@ error[E0502]: cannot borrow `p` as mutable because it is also borrowed as immuta | LL | &p, | - immutable borrow occurs here -LL | || p[0] = 5); //~ ERROR cannot borrow `p` as mutable +LL | || p[0] = 5); | ^^ - - immutable borrow ends here | | | | | borrow occurs due to use of `p` in closure diff --git a/src/test/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.stderr b/src/test/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.stderr index 76e7ee841f8..5ec1ff2c058 100644 --- a/src/test/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.stderr +++ b/src/test/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.stderr @@ -3,7 +3,7 @@ error[E0389]: cannot assign to data in a `&` reference | LL | fn a(s: &S) { | -- use `&mut S` here to make mutable -LL | *s.pointer += 1; //~ ERROR cannot assign +LL | *s.pointer += 1; | ^^^^^^^^^^^^^^^ assignment into an immutable reference error[E0389]: cannot assign to data in a `&` reference @@ -11,7 +11,7 @@ error[E0389]: cannot assign to data in a `&` reference | LL | fn c(s: & &mut S) { | -------- use `&mut &mut S` here to make mutable -LL | *s.pointer += 1; //~ ERROR cannot assign +LL | *s.pointer += 1; | ^^^^^^^^^^^^^^^ assignment into an immutable reference error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.stderr b/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.stderr index d4639581223..10d6ac5464d 100644 --- a/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.stderr +++ b/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.stderr @@ -3,7 +3,7 @@ error[E0506]: cannot assign to `*y.pointer` because it is borrowed | LL | let z = copy_borrowed_ptr(&mut y); | - borrow of `*y.pointer` occurs here -LL | *y.pointer += 1; //~ ERROR cannot assign +LL | *y.pointer += 1; | ^^^^^^^^^^^^^^^ assignment to borrowed `*y.pointer` occurs here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.stderr b/src/test/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.stderr index b48473a884c..759b778e35c 100644 --- a/src/test/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.stderr +++ b/src/test/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow immutable local variable `x` as mutable | LL | let x = Foo { x: 3 }; | - help: make this binding mutable: `mut x` -LL | x.printme(); //~ ERROR cannot borrow +LL | x.printme(); | ^ cannot borrow mutably error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-autoref-3261.stderr b/src/test/ui/borrowck/borrowck-autoref-3261.stderr index 7a5430ac15c..280704a2715 100644 --- a/src/test/ui/borrowck/borrowck-autoref-3261.stderr +++ b/src/test/ui/borrowck/borrowck-autoref-3261.stderr @@ -3,7 +3,7 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time | LL | (&mut x).with( | - first mutable borrow occurs here -LL | |opt| { //~ ERROR cannot borrow `x` as mutable more than once at a time +LL | |opt| { | ^^^^^ second mutable borrow occurs here ... LL | x = X(Either::Left((0, 0))); diff --git a/src/test/ui/borrowck/borrowck-bad-nested-calls-free.stderr b/src/test/ui/borrowck/borrowck-bad-nested-calls-free.stderr index 165530d270a..06ec2bdac71 100644 --- a/src/test/ui/borrowck/borrowck-bad-nested-calls-free.stderr +++ b/src/test/ui/borrowck/borrowck-bad-nested-calls-free.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `a` as mutable because `*a` is also borrowed as immu | LL | &*a, | -- immutable borrow occurs here -LL | rewrite(&mut a)); //~ ERROR cannot borrow +LL | rewrite(&mut a)); | ^ - immutable borrow ends here | | | mutable borrow occurs here @@ -13,7 +13,7 @@ error[E0502]: cannot borrow `a` as mutable because `*a` is also borrowed as immu | LL | &*a, | -- immutable borrow occurs here -LL | rewrite(&mut a)); //~ ERROR cannot borrow +LL | rewrite(&mut a)); | ^ - immutable borrow ends here | | | mutable borrow occurs here diff --git a/src/test/ui/borrowck/borrowck-bad-nested-calls-move.stderr b/src/test/ui/borrowck/borrowck-bad-nested-calls-move.stderr index b2c680f3952..3b34a61364a 100644 --- a/src/test/ui/borrowck/borrowck-bad-nested-calls-move.stderr +++ b/src/test/ui/borrowck/borrowck-bad-nested-calls-move.stderr @@ -3,7 +3,7 @@ error[E0505]: cannot move out of `a` because it is borrowed | LL | &*a, | -- borrow of `*a` occurs here -LL | a); //~ ERROR cannot move +LL | a); | ^ move out of `a` occurs here error[E0505]: cannot move out of `a` because it is borrowed @@ -11,7 +11,7 @@ error[E0505]: cannot move out of `a` because it is borrowed | LL | &*a, | -- borrow of `*a` occurs here -LL | a); //~ ERROR cannot move +LL | a); | ^ move out of `a` occurs here error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/borrowck-block-unint.stderr b/src/test/ui/borrowck/borrowck-block-unint.stderr index 6e7af76fc2e..ab55d7994d0 100644 --- a/src/test/ui/borrowck/borrowck-block-unint.stderr +++ b/src/test/ui/borrowck/borrowck-block-unint.stderr @@ -1,7 +1,7 @@ error[E0381]: capture of possibly uninitialized variable: `x` --> $DIR/borrowck-block-unint.rs:4:11 | -LL | force(|| { //~ ERROR capture of possibly uninitialized variable: `x` +LL | force(|| { | ^^ use of possibly uninitialized `x` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.stderr b/src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.stderr index e116cb70c1c..a4fb28d0e81 100644 --- a/src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.stderr @@ -3,7 +3,7 @@ error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time | LL | let bar1 = &mut foo.bar1; | -------- first mutable borrow occurs here -LL | let _bar2 = &mut foo.bar1; //~ ERROR cannot borrow +LL | let _bar2 = &mut foo.bar1; | ^^^^^^^^ second mutable borrow occurs here LL | *bar1; LL | } @@ -14,7 +14,7 @@ error[E0502]: cannot borrow `foo.bar1` as immutable because it is also borrowed | LL | let bar1 = &mut foo.bar1; | -------- mutable borrow occurs here -LL | let _bar2 = &foo.bar1; //~ ERROR cannot borrow +LL | let _bar2 = &foo.bar1; | ^^^^^^^^ immutable borrow occurs here LL | *bar1; LL | } @@ -25,7 +25,7 @@ error[E0502]: cannot borrow `foo.bar1` as mutable because it is also borrowed as | LL | let bar1 = &foo.bar1; | -------- immutable borrow occurs here -LL | let _bar2 = &mut foo.bar1; //~ ERROR cannot borrow +LL | let _bar2 = &mut foo.bar1; | ^^^^^^^^ mutable borrow occurs here LL | *bar1; LL | } @@ -36,7 +36,7 @@ error[E0499]: cannot borrow `foo` (via `foo.bar2`) as mutable more than once at | LL | let bar1 = &mut foo.bar1; | -------- first mutable borrow occurs here (via `foo.bar1`) -LL | let _bar2 = &mut foo.bar2; //~ ERROR cannot borrow +LL | let _bar2 = &mut foo.bar2; | ^^^^^^^^ second mutable borrow occurs here (via `foo.bar2`) LL | *bar1; LL | } @@ -49,7 +49,7 @@ LL | Foo { bar1: ref mut _bar1, bar2: ref mut _bar2 } => {} | ------------- ^^^^^^^^^^^^^ second mutable borrow occurs here (via `foo.bar2`) | | | first mutable borrow occurs here (via `foo.bar1`) -LL | //~^ ERROR cannot borrow +LL | LL | } | - first borrow ends here @@ -70,7 +70,7 @@ error[E0502]: cannot borrow `foo.bar1` as immutable because `foo.bar1.int1` is a | LL | let bar1 = &mut foo.bar1.int1; | ------------- mutable borrow occurs here -LL | let _foo1 = &foo.bar1; //~ ERROR cannot borrow +LL | let _foo1 = &foo.bar1; | ^^^^^^^^ immutable borrow occurs here ... LL | } @@ -81,8 +81,8 @@ error[E0502]: cannot borrow `*foo` as immutable because `foo.bar1.int1` is also | LL | let bar1 = &mut foo.bar1.int1; | ------------- mutable borrow occurs here -LL | let _foo1 = &foo.bar1; //~ ERROR cannot borrow -LL | let _foo2 = &*foo; //~ ERROR cannot borrow +LL | let _foo1 = &foo.bar1; +LL | let _foo2 = &*foo; | ^^^^ immutable borrow occurs here LL | *bar1; LL | } @@ -93,7 +93,7 @@ error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time | LL | let bar1 = &mut foo.bar1.int1; | ------------- first mutable borrow occurs here -LL | let _foo1 = &mut foo.bar1; //~ ERROR cannot borrow +LL | let _foo1 = &mut foo.bar1; | ^^^^^^^^ second mutable borrow occurs here LL | *bar1; LL | } @@ -104,7 +104,7 @@ error[E0499]: cannot borrow `*foo` as mutable more than once at a time | LL | let bar1 = &mut foo.bar1.int1; | ------------- first mutable borrow occurs here -LL | let _foo2 = &mut *foo; //~ ERROR cannot borrow +LL | let _foo2 = &mut *foo; | ^^^^ second mutable borrow occurs here LL | *bar1; LL | } @@ -115,7 +115,7 @@ error[E0502]: cannot borrow `foo.bar1` as mutable because `foo.bar1.int1` is als | LL | let bar1 = &foo.bar1.int1; | ------------- immutable borrow occurs here -LL | let _foo1 = &mut foo.bar1; //~ ERROR cannot borrow +LL | let _foo1 = &mut foo.bar1; | ^^^^^^^^ mutable borrow occurs here LL | *bar1; LL | } @@ -126,7 +126,7 @@ error[E0502]: cannot borrow `*foo` as mutable because `foo.bar1.int1` is also bo | LL | let bar1 = &foo.bar1.int1; | ------------- immutable borrow occurs here -LL | let _foo2 = &mut *foo; //~ ERROR cannot borrow +LL | let _foo2 = &mut *foo; | ^^^^ mutable borrow occurs here LL | *bar1; LL | } @@ -137,7 +137,7 @@ error[E0502]: cannot borrow `foo` (via `foo.bar2`) as immutable because `foo` is | LL | let bar1 = &mut foo.bar1; | -------- mutable borrow occurs here (via `foo.bar1`) -LL | let _foo1 = &foo.bar2; //~ ERROR cannot borrow +LL | let _foo1 = &foo.bar2; | ^^^^^^^^ immutable borrow of `foo.bar2` -- which overlaps with `foo.bar1` -- occurs here LL | *bar1; LL | } @@ -148,7 +148,7 @@ error[E0596]: cannot borrow field `foo.bar1` of immutable binding as mutable | LL | let foo = make_foo(); | --- help: make this binding mutable: `mut foo` -LL | let bar1 = &mut foo.bar1; //~ ERROR cannot borrow +LL | let bar1 = &mut foo.bar1; | ^^^^^^^^ cannot mutably borrow field of immutable binding error[E0499]: cannot borrow `foo` (via `foo.bar2.int2`) as mutable more than once at a time @@ -156,7 +156,7 @@ error[E0499]: cannot borrow `foo` (via `foo.bar2.int2`) as mutable more than onc | LL | let bar1 = &mut foo.bar1.int1; | ------------- first mutable borrow occurs here (via `foo.bar1.int1`) -LL | let foo1 = &mut foo.bar2.int2; //~ ERROR cannot borrow +LL | let foo1 = &mut foo.bar2.int2; | ^^^^^^^^^^^^^ second mutable borrow occurs here (via `foo.bar2.int2`) ... LL | } diff --git a/src/test/ui/borrowck/borrowck-borrow-from-stack-variable.stderr b/src/test/ui/borrowck/borrowck-borrow-from-stack-variable.stderr index 2c446dfee44..fe60d944a44 100644 --- a/src/test/ui/borrowck/borrowck-borrow-from-stack-variable.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-from-stack-variable.stderr @@ -3,7 +3,7 @@ error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time | LL | let bar1 = &mut foo.bar1; | -------- first mutable borrow occurs here -LL | let _bar2 = &mut foo.bar1; //~ ERROR cannot borrow +LL | let _bar2 = &mut foo.bar1; | ^^^^^^^^ second mutable borrow occurs here LL | *bar1; LL | } @@ -14,7 +14,7 @@ error[E0502]: cannot borrow `foo.bar1` as immutable because it is also borrowed | LL | let bar1 = &mut foo.bar1; | -------- mutable borrow occurs here -LL | let _bar2 = &foo.bar1; //~ ERROR cannot borrow +LL | let _bar2 = &foo.bar1; | ^^^^^^^^ immutable borrow occurs here LL | *bar1; LL | } @@ -25,7 +25,7 @@ error[E0502]: cannot borrow `foo.bar1` as mutable because it is also borrowed as | LL | let bar1 = &foo.bar1; | -------- immutable borrow occurs here -LL | let _bar2 = &mut foo.bar1; //~ ERROR cannot borrow +LL | let _bar2 = &mut foo.bar1; | ^^^^^^^^ mutable borrow occurs here LL | *bar1; LL | } @@ -48,7 +48,7 @@ error[E0502]: cannot borrow `foo.bar1` as immutable because `foo.bar1.int1` is a | LL | let bar1 = &mut foo.bar1.int1; | ------------- mutable borrow occurs here -LL | let _foo1 = &foo.bar1; //~ ERROR cannot borrow +LL | let _foo1 = &foo.bar1; | ^^^^^^^^ immutable borrow occurs here ... LL | } @@ -59,8 +59,8 @@ error[E0502]: cannot borrow `foo` as immutable because `foo.bar1.int1` is also b | LL | let bar1 = &mut foo.bar1.int1; | ------------- mutable borrow occurs here -LL | let _foo1 = &foo.bar1; //~ ERROR cannot borrow -LL | let _foo2 = &foo; //~ ERROR cannot borrow +LL | let _foo1 = &foo.bar1; +LL | let _foo2 = &foo; | ^^^ immutable borrow occurs here LL | *bar1; LL | } @@ -71,7 +71,7 @@ error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time | LL | let bar1 = &mut foo.bar1.int1; | ------------- first mutable borrow occurs here -LL | let _foo1 = &mut foo.bar1; //~ ERROR cannot borrow +LL | let _foo1 = &mut foo.bar1; | ^^^^^^^^ second mutable borrow occurs here LL | *bar1; LL | } @@ -82,7 +82,7 @@ error[E0499]: cannot borrow `foo` as mutable more than once at a time | LL | let bar1 = &mut foo.bar1.int1; | ------------- first mutable borrow occurs here -LL | let _foo2 = &mut foo; //~ ERROR cannot borrow +LL | let _foo2 = &mut foo; | ^^^ second mutable borrow occurs here LL | *bar1; LL | } @@ -93,7 +93,7 @@ error[E0502]: cannot borrow `foo.bar1` as mutable because `foo.bar1.int1` is als | LL | let bar1 = &foo.bar1.int1; | ------------- immutable borrow occurs here -LL | let _foo1 = &mut foo.bar1; //~ ERROR cannot borrow +LL | let _foo1 = &mut foo.bar1; | ^^^^^^^^ mutable borrow occurs here LL | *bar1; LL | } @@ -104,7 +104,7 @@ error[E0502]: cannot borrow `foo` as mutable because `foo.bar1.int1` is also bor | LL | let bar1 = &foo.bar1.int1; | ------------- immutable borrow occurs here -LL | let _foo2 = &mut foo; //~ ERROR cannot borrow +LL | let _foo2 = &mut foo; | ^^^ mutable borrow occurs here LL | *bar1; LL | } @@ -115,7 +115,7 @@ error[E0596]: cannot borrow field `foo.bar1` of immutable binding as mutable | LL | let foo = make_foo(); | --- help: make this binding mutable: `mut foo` -LL | let bar1 = &mut foo.bar1; //~ ERROR cannot borrow +LL | let bar1 = &mut foo.bar1; | ^^^^^^^^ cannot mutably borrow field of immutable binding error: aborting due to 11 previous errors diff --git a/src/test/ui/borrowck/borrowck-borrow-from-temporary.stderr b/src/test/ui/borrowck/borrowck-borrow-from-temporary.stderr index 0726e3d5d5e..6f101f690cd 100644 --- a/src/test/ui/borrowck/borrowck-borrow-from-temporary.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-from-temporary.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/borrowck-borrow-from-temporary.rs:9:24 | -LL | let &Foo(ref x) = &id(Foo(3)); //~ ERROR borrowed value does not live long enough +LL | let &Foo(ref x) = &id(Foo(3)); | ^^^^^^^^^^ temporary value does not live long enough LL | x LL | } diff --git a/src/test/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.stderr b/src/test/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.stderr index ff2969f5348..709a797edcb 100644 --- a/src/test/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.stderr @@ -1,7 +1,7 @@ error[E0389]: cannot assign to data in a `&` reference --> $DIR/borrowck-borrow-mut-base-ptr-in-aliasable-loc.rs:9:5 | -LL | **t1 = 22; //~ ERROR cannot assign +LL | **t1 = 22; | ^^^^^^^^^ assignment into an immutable reference error[E0502]: cannot borrow `**t0` as immutable because `*t0` is also borrowed as mutable @@ -9,7 +9,7 @@ error[E0502]: cannot borrow `**t0` as immutable because `*t0` is also borrowed a | LL | let t1 = &mut *t0; | --- mutable borrow occurs here -LL | let p: &isize = &**t0; //~ ERROR cannot borrow +LL | let p: &isize = &**t0; | ^^^^ immutable borrow occurs here LL | **t1 = 22; LL | } @@ -20,7 +20,7 @@ error[E0389]: cannot borrow data mutably in a `&` reference | LL | fn foo4(t0: & &mut isize) { | ------------ use `&mut &mut isize` here to make mutable -LL | let x: &mut isize = &mut **t0; //~ ERROR cannot borrow +LL | let x: &mut isize = &mut **t0; | ^^^^ assignment into an immutable reference error: aborting due to 3 previous errors diff --git a/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.stderr b/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.stderr index abfce9857f7..1b64ad57564 100644 --- a/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.stderr @@ -3,7 +3,7 @@ error[E0499]: cannot borrow `*x` as mutable more than once at a time | LL | let y = x.f1(); | - first mutable borrow occurs here -LL | x.f2(); //~ ERROR cannot borrow `*x` as mutable +LL | x.f2(); | ^ second mutable borrow occurs here LL | y.use_ref(); LL | } diff --git a/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.stderr b/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.stderr index c6f9c655a11..2fe1461a303 100644 --- a/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.stderr @@ -1,85 +1,85 @@ error[E0596]: cannot borrow field of immutable binding as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:47:24 | -LL | let __isize = &mut x.y; //~ ERROR cannot borrow +LL | let __isize = &mut x.y; | ^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field of immutable binding as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:51:24 | -LL | let __isize = &mut x.y; //~ ERROR cannot borrow +LL | let __isize = &mut x.y; | ^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field of immutable binding as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:59:10 | -LL | &mut x.y //~ ERROR cannot borrow +LL | &mut x.y | ^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field of immutable binding as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:63:10 | -LL | &mut x.y //~ ERROR cannot borrow +LL | &mut x.y | ^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to field of immutable binding --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:67:5 | -LL | x.y = 3; //~ ERROR cannot assign +LL | x.y = 3; | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to field of immutable binding --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:71:5 | -LL | x.y = 3; //~ ERROR cannot assign +LL | x.y = 3; | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to field of immutable binding --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:75:5 | -LL | x.y = 3; //~ ERROR cannot assign +LL | x.y = 3; | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow immutable borrowed content as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:83:5 | -LL | x.set(0, 0); //~ ERROR cannot borrow +LL | x.set(0, 0); | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable borrowed content as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:87:5 | -LL | x.set(0, 0); //~ ERROR cannot borrow +LL | x.set(0, 0); | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable borrowed content as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:95:5 | -LL | x.y_mut() //~ ERROR cannot borrow +LL | x.y_mut() | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable borrowed content as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:99:5 | -LL | x.y_mut() //~ ERROR cannot borrow +LL | x.y_mut() | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable borrowed content as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:103:6 | -LL | *x.y_mut() = 3; //~ ERROR cannot borrow +LL | *x.y_mut() = 3; | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable borrowed content as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:107:6 | -LL | *x.y_mut() = 3; //~ ERROR cannot borrow +LL | *x.y_mut() = 3; | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable borrowed content as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:111:6 | -LL | *x.y_mut() = 3; //~ ERROR cannot borrow +LL | *x.y_mut() = 3; | ^ cannot borrow as mutable error: aborting due to 14 previous errors diff --git a/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.stderr b/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.stderr index 41e7cc210c8..fb79ccb701f 100644 --- a/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.stderr @@ -1,43 +1,43 @@ error[E0596]: cannot borrow immutable borrowed content as mutable --> $DIR/borrowck-borrow-overloaded-deref.rs:23:24 | -LL | let __isize = &mut *x; //~ ERROR cannot borrow +LL | let __isize = &mut *x; | ^^ cannot borrow as mutable error[E0596]: cannot borrow immutable borrowed content as mutable --> $DIR/borrowck-borrow-overloaded-deref.rs:27:24 | -LL | let __isize = &mut *x; //~ ERROR cannot borrow +LL | let __isize = &mut *x; | ^^ cannot borrow as mutable error[E0596]: cannot borrow immutable borrowed content as mutable --> $DIR/borrowck-borrow-overloaded-deref.rs:35:10 | -LL | &mut **x //~ ERROR cannot borrow +LL | &mut **x | ^^^ cannot borrow as mutable error[E0596]: cannot borrow immutable borrowed content as mutable --> $DIR/borrowck-borrow-overloaded-deref.rs:39:10 | -LL | &mut **x //~ ERROR cannot borrow +LL | &mut **x | ^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content --> $DIR/borrowck-borrow-overloaded-deref.rs:43:5 | -LL | *x = 3; //~ ERROR cannot assign +LL | *x = 3; | ^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content --> $DIR/borrowck-borrow-overloaded-deref.rs:47:5 | -LL | **x = 3; //~ ERROR cannot assign +LL | **x = 3; | ^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content --> $DIR/borrowck-borrow-overloaded-deref.rs:51:5 | -LL | **x = 3; //~ ERROR cannot assign +LL | **x = 3; | ^^^^^^^ cannot borrow as mutable error: aborting due to 7 previous errors diff --git a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr index b9492695119..d17cf8a6fac 100644 --- a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr +++ b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/borrowck-borrowed-uniq-rvalue-2.rs:20:20 | -LL | let x = defer(&vec!["Goodbye", "world!"]); //~ ERROR borrowed value does not live long enough +LL | let x = defer(&vec!["Goodbye", "world!"]); | ^^^^^^^^^^^^^^^^^^^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough diff --git a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.stderr b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.stderr index bf4674035ea..32a86562da7 100644 --- a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.stderr +++ b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/borrowck-borrowed-uniq-rvalue.rs:10:27 | -LL | buggy_map.insert(42, &*Box::new(1)); //~ ERROR borrowed value does not live long enough +LL | buggy_map.insert(42, &*Box::new(1)); | ^^^^^^^^^^^^ - borrowed value dropped here while still borrowed | | | borrowed value does not live long enough diff --git a/src/test/ui/borrowck/borrowck-break-uninit-2.stderr b/src/test/ui/borrowck/borrowck-break-uninit-2.stderr index e574c0ff8a8..a6c3dfef9e8 100644 --- a/src/test/ui/borrowck/borrowck-break-uninit-2.stderr +++ b/src/test/ui/borrowck/borrowck-break-uninit-2.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/borrowck-break-uninit-2.rs:9:20 | -LL | println!("{}", x); //~ ERROR use of possibly uninitialized variable: `x` +LL | println!("{}", x); | ^ use of possibly uninitialized `x` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-break-uninit.stderr b/src/test/ui/borrowck/borrowck-break-uninit.stderr index 1a853c35d00..dcb024a3e1a 100644 --- a/src/test/ui/borrowck/borrowck-break-uninit.stderr +++ b/src/test/ui/borrowck/borrowck-break-uninit.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/borrowck-break-uninit.rs:9:20 | -LL | println!("{}", x); //~ ERROR use of possibly uninitialized variable: `x` +LL | println!("{}", x); | ^ use of possibly uninitialized `x` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-closures-mut-of-imm.stderr b/src/test/ui/borrowck/borrowck-closures-mut-of-imm.stderr index f529247b1b6..2f7c6a1a56a 100644 --- a/src/test/ui/borrowck/borrowck-closures-mut-of-imm.stderr +++ b/src/test/ui/borrowck/borrowck-closures-mut-of-imm.stderr @@ -5,7 +5,7 @@ LL | let mut c1 = || set(&mut *x); | -- - previous borrow occurs due to use of `x` in closure | | | first closure is constructed here -LL | //~^ ERROR cannot borrow +LL | LL | let mut c2 = || set(&mut *x); | ^^ - borrow occurs due to use of `x` in closure | | diff --git a/src/test/ui/borrowck/borrowck-closures-two-mut-fail.stderr b/src/test/ui/borrowck/borrowck-closures-two-mut-fail.stderr index cb8f5b4366b..7399f8360dc 100644 --- a/src/test/ui/borrowck/borrowck-closures-two-mut-fail.stderr +++ b/src/test/ui/borrowck/borrowck-closures-two-mut-fail.stderr @@ -5,7 +5,7 @@ LL | let c1 = to_fn_mut(|| x = 4); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| x = 5); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| x = 5); | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here @@ -20,7 +20,7 @@ LL | let c1 = to_fn_mut(|| set(&mut x)); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| set(&mut x)); | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here @@ -35,7 +35,7 @@ LL | let c1 = to_fn_mut(|| x = 5); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| set(&mut x)); | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here diff --git a/src/test/ui/borrowck/borrowck-closures-two-mut.stderr b/src/test/ui/borrowck/borrowck-closures-two-mut.stderr index bfb70694615..e881201ddfc 100644 --- a/src/test/ui/borrowck/borrowck-closures-two-mut.stderr +++ b/src/test/ui/borrowck/borrowck-closures-two-mut.stderr @@ -5,7 +5,7 @@ LL | let c1 = to_fn_mut(|| x = 4); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| x = 5); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| x = 5); | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here @@ -20,7 +20,7 @@ LL | let c1 = to_fn_mut(|| set(&mut x)); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| set(&mut x)); | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here @@ -35,7 +35,7 @@ LL | let c1 = to_fn_mut(|| x = 5); | -- - previous borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| set(&mut x)); | ^^ - borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here @@ -80,11 +80,11 @@ LL | let c1 = to_fn_mut(|| x = 4); | -- - first borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| x = 5); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| x = 5); | ^^ - second borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -LL | //~| ERROR cannot borrow `x` as mutable more than once +LL | LL | drop((c1, c2)); | -- first borrow later used here @@ -95,11 +95,11 @@ LL | let c1 = to_fn_mut(|| set(&mut x)); | -- - first borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| set(&mut x)); | ^^ - second borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -LL | //~| ERROR cannot borrow `x` as mutable more than once +LL | LL | drop((c1, c2)); | -- first borrow later used here @@ -110,11 +110,11 @@ LL | let c1 = to_fn_mut(|| x = 5); | -- - first borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -LL | let c2 = to_fn_mut(|| set(&mut x)); //~ ERROR cannot borrow `x` as mutable more than once +LL | let c2 = to_fn_mut(|| set(&mut x)); | ^^ - second borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here -LL | //~| ERROR cannot borrow `x` as mutable more than once +LL | LL | drop((c1, c2)); | -- first borrow later used here diff --git a/src/test/ui/borrowck/borrowck-closures-unique-imm.stderr b/src/test/ui/borrowck/borrowck-closures-unique-imm.stderr index 1b661b70d7f..3cdc9b9d4fd 100644 --- a/src/test/ui/borrowck/borrowck-closures-unique-imm.stderr +++ b/src/test/ui/borrowck/borrowck-closures-unique-imm.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `this.x` as mutable because it is also borrowed as i | LL | let p = &this.x; | ------ immutable borrow occurs here -LL | &mut this.x; //~ ERROR cannot borrow +LL | &mut this.x; | ^^^^^^ mutable borrow occurs here LL | p.use_ref(); LL | }; diff --git a/src/test/ui/borrowck/borrowck-closures-unique.stderr b/src/test/ui/borrowck/borrowck-closures-unique.stderr index 94181ad2400..238b16f654e 100644 --- a/src/test/ui/borrowck/borrowck-closures-unique.stderr +++ b/src/test/ui/borrowck/borrowck-closures-unique.stderr @@ -5,7 +5,7 @@ LL | let c1 = || get(x); | -- - previous borrow occurs due to use of `x` in closure | | | borrow occurs here -LL | let c2 = || set(x); //~ ERROR closure requires unique access to `x` +LL | let c2 = || set(x); | ^^ - borrow occurs due to use of `x` in closure | | | closure construction occurs here @@ -20,7 +20,7 @@ LL | let c1 = || get(x); | -- - previous borrow occurs due to use of `x` in closure | | | borrow occurs here -LL | let c2 = || { get(x); set(x); }; //~ ERROR closure requires unique access to `x` +LL | let c2 = || { get(x); set(x); }; | ^^ - borrow occurs due to use of `x` in closure | | | closure construction occurs here @@ -35,7 +35,7 @@ LL | let c1 = || set(x); | -- - previous borrow occurs due to use of `x` in closure | | | first closure is constructed here -LL | let c2 = || set(x); //~ ERROR two closures require unique access to `x` at the same time +LL | let c2 = || set(x); | ^^ - borrow occurs due to use of `x` in closure | | | second closure is constructed here @@ -46,21 +46,21 @@ LL | } error[E0595]: closure cannot assign to immutable argument `x` --> $DIR/borrowck-closures-unique.rs:47:14 | -LL | let c1 = |y: &'static mut isize| x = y; //~ ERROR closure cannot assign to immutable argument +LL | let c1 = |y: &'static mut isize| x = y; | ^^^^^^^^^^^^^^^^^^^^^^^ cannot borrow mutably help: consider removing the `&mut`, as it is an immutable binding to a mutable reference | -LL | x //~ ERROR closure cannot assign to immutable argument +LL | x | ^ error[E0595]: closure cannot assign to immutable argument `x` --> $DIR/borrowck-closures-unique.rs:52:14 | -LL | let c1 = || x = panic!(); //~ ERROR closure cannot assign to immutable argument +LL | let c1 = || x = panic!(); | ^^ cannot borrow mutably help: consider removing the `&mut`, as it is an immutable binding to a mutable reference | -LL | x //~ ERROR closure cannot assign to immutable argument +LL | x | ^ error: aborting due to 5 previous errors diff --git a/src/test/ui/borrowck/borrowck-closures-use-after-free.stderr b/src/test/ui/borrowck/borrowck-closures-use-after-free.stderr index b41a4a0c676..9e77d8ce188 100644 --- a/src/test/ui/borrowck/borrowck-closures-use-after-free.stderr +++ b/src/test/ui/borrowck/borrowck-closures-use-after-free.stderr @@ -6,7 +6,7 @@ LL | let mut test = |foo: &Foo| { LL | ptr = box Foo { x: ptr.x + 1 }; | --- previous borrow occurs due to use of `ptr` in closure LL | }; -LL | test(&*ptr); //~ ERROR cannot borrow `*ptr` +LL | test(&*ptr); | ^^^^ immutable borrow occurs here LL | } | - mutable borrow ends here diff --git a/src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr b/src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr index 2fc2248000f..02644b82f57 100644 --- a/src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr +++ b/src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `b` | LL | consume(b); | - value moved here -LL | consume(b); //~ ERROR use of moved value +LL | consume(b); | ^ value used here after move | = note: move occurs because `b` has type `std::boxed::Box<[i32; 5]>`, which does not implement the `Copy` trait diff --git a/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr b/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr index aef1671342e..7267a99b869 100644 --- a/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr +++ b/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `b` | LL | consume(b); | - value moved here -LL | consume(b); //~ ERROR use of moved value +LL | consume(b); | ^ value used here after move | = note: move occurs because `b` has type `std::boxed::Box<(dyn Foo + std::marker::Send + 'static)>`, which does not implement the `Copy` trait diff --git a/src/test/ui/borrowck/borrowck-drop-from-guard.stderr b/src/test/ui/borrowck/borrowck-drop-from-guard.stderr index 07b597f480f..a2b42fa495e 100644 --- a/src/test/ui/borrowck/borrowck-drop-from-guard.stderr +++ b/src/test/ui/borrowck/borrowck-drop-from-guard.stderr @@ -7,7 +7,7 @@ LL | match Some(42) { LL | Some(_) if { drop(my_str); false } => {} | ------ value moved here LL | Some(_) => {} -LL | None => { foo(my_str); } //~ ERROR [E0382] +LL | None => { foo(my_str); } | ^^^^^^ value used here after move error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-field-sensitivity.stderr b/src/test/ui/borrowck/borrowck-field-sensitivity.stderr index bfab5cbe536..0cf6f3f2182 100644 --- a/src/test/ui/borrowck/borrowck-field-sensitivity.stderr +++ b/src/test/ui/borrowck/borrowck-field-sensitivity.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `*x.b` | LL | drop(x.b); | --- value moved here -LL | drop(*x.b); //~ ERROR use of moved value: `*x.b` +LL | drop(*x.b); | ^^^^ value used here after move | = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -13,7 +13,7 @@ error[E0382]: use of moved value: `*x.b` | LL | let y = A { a: 3, .. x }; | - value moved here -LL | drop(*x.b); //~ ERROR use of moved value: `*x.b` +LL | drop(*x.b); | ^^^^ value used here after move | = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -23,7 +23,7 @@ error[E0382]: use of moved value: `x.b` | LL | drop(x.b); | --- value moved here -LL | let p = &x.b; //~ ERROR use of moved value: `x.b` +LL | let p = &x.b; | ^^^ value used here after move | = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -33,7 +33,7 @@ error[E0382]: use of moved value: `x.b` | LL | let _y = A { a: 3, .. x }; | - value moved here -LL | let p = &x.b; //~ ERROR use of moved value: `x.b` +LL | let p = &x.b; | ^^^ value used here after move | = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -43,7 +43,7 @@ error[E0505]: cannot move out of `x.b` because it is borrowed | LL | let p = &x.b; | --- borrow of `x.b` occurs here -LL | drop(x.b); //~ ERROR cannot move out of `x.b` because it is borrowed +LL | drop(x.b); | ^^^ move out of `x.b` occurs here error[E0505]: cannot move out of `x.b` because it is borrowed @@ -51,7 +51,7 @@ error[E0505]: cannot move out of `x.b` because it is borrowed | LL | let p = &x.b; | --- borrow of `x.b` occurs here -LL | let _y = A { a: 3, .. x }; //~ ERROR cannot move out of `x.b` because it is borrowed +LL | let _y = A { a: 3, .. x }; | ^ move out of `x.b` occurs here error[E0499]: cannot borrow `x.a` as mutable more than once at a time @@ -59,7 +59,7 @@ error[E0499]: cannot borrow `x.a` as mutable more than once at a time | LL | let p = &mut x.a; | --- first mutable borrow occurs here -LL | let q = &mut x.a; //~ ERROR cannot borrow `x.a` as mutable more than once at a time +LL | let q = &mut x.a; | ^^^ second mutable borrow occurs here ... LL | } @@ -70,7 +70,7 @@ error[E0382]: use of moved value: `x.b` | LL | drop(x.b); | --- value moved here -LL | drop(x.b); //~ ERROR use of moved value: `x.b` +LL | drop(x.b); | ^^^ value used here after move | = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -80,7 +80,7 @@ error[E0382]: use of moved value: `x.b` | LL | let _y = A { a: 3, .. x }; | - value moved here -LL | drop(x.b); //~ ERROR use of moved value: `x.b` +LL | drop(x.b); | ^^^ value used here after move | = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -90,7 +90,7 @@ error[E0382]: use of moved value: `x.b` | LL | drop(x.b); | --- value moved here -LL | let _z = A { a: 3, .. x }; //~ ERROR use of moved value: `x.b` +LL | let _z = A { a: 3, .. x }; | ^ value used here after move | = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -100,7 +100,7 @@ error[E0382]: use of moved value: `x.b` | LL | let _y = A { a: 3, .. x }; | - value moved here -LL | let _z = A { a: 4, .. x }; //~ ERROR use of moved value: `x.b` +LL | let _z = A { a: 4, .. x }; | ^ value used here after move | = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -108,19 +108,19 @@ LL | let _z = A { a: 4, .. x }; //~ ERROR use of moved value: `x.b` error[E0381]: use of possibly uninitialized variable: `x.a` --> $DIR/borrowck-field-sensitivity.rs:82:10 | -LL | drop(x.a); //~ ERROR use of possibly uninitialized variable: `x.a` +LL | drop(x.a); | ^^^ use of possibly uninitialized `x.a` error[E0381]: use of possibly uninitialized variable: `x.a` --> $DIR/borrowck-field-sensitivity.rs:88:14 | -LL | let p = &x.a; //~ ERROR use of possibly uninitialized variable: `x.a` +LL | let p = &x.a; | ^^^ use of possibly uninitialized `x.a` error[E0381]: use of possibly uninitialized variable: `x.b` --> $DIR/borrowck-field-sensitivity.rs:95:10 | -LL | drop(x.b); //~ ERROR use of possibly uninitialized variable: `x.b` +LL | drop(x.b); | ^^^ use of possibly uninitialized `x.b` error: aborting due to 14 previous errors diff --git a/src/test/ui/borrowck/borrowck-fn-in-const-c.stderr b/src/test/ui/borrowck/borrowck-fn-in-const-c.stderr index f6e7e99393c..d2ddf808d11 100644 --- a/src/test/ui/borrowck/borrowck-fn-in-const-c.stderr +++ b/src/test/ui/borrowck/borrowck-fn-in-const-c.stderr @@ -1,7 +1,7 @@ error[E0597]: `local.inner` does not live long enough --> $DIR/borrowck-fn-in-const-c.rs:17:17 | -LL | return &local.inner; //~ ERROR does not live long enough +LL | return &local.inner; | ^^^^^^^^^^^ borrowed value does not live long enough LL | } | - borrowed value only lives until here diff --git a/src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.stderr b/src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.stderr index 1a7e2cb6963..fb53b13a58d 100644 --- a/src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.stderr +++ b/src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of borrowed content --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:12:9 | -LL | for &a in x.iter() { //~ ERROR cannot move out +LL | for &a in x.iter() { | ^- | || | |hint: to prevent move, use `ref a` or `ref mut a` @@ -10,7 +10,7 @@ LL | for &a in x.iter() { //~ ERROR cannot move out error[E0507]: cannot move out of borrowed content --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:18:9 | -LL | for &a in &f.a { //~ ERROR cannot move out +LL | for &a in &f.a { | ^- | || | |hint: to prevent move, use `ref a` or `ref mut a` @@ -19,7 +19,7 @@ LL | for &a in &f.a { //~ ERROR cannot move out error[E0507]: cannot move out of borrowed content --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:22:9 | -LL | for &a in x.iter() { //~ ERROR cannot move out +LL | for &a in x.iter() { | ^- | || | |hint: to prevent move, use `ref a` or `ref mut a` diff --git a/src/test/ui/borrowck/borrowck-for-loop-head-linkage.stderr b/src/test/ui/borrowck/borrowck-for-loop-head-linkage.stderr index 85008948a1c..a2d8908c4dd 100644 --- a/src/test/ui/borrowck/borrowck-for-loop-head-linkage.stderr +++ b/src/test/ui/borrowck/borrowck-for-loop-head-linkage.stderr @@ -7,7 +7,7 @@ LL | for &x in &vector { | | immutable borrow ends here | immutable borrow occurs here LL | let cap = vector.capacity(); -LL | vector.extend(repeat(0)); //~ ERROR cannot borrow +LL | vector.extend(repeat(0)); | ^^^^^^ mutable borrow occurs here error[E0502]: cannot borrow `vector` as mutable because it is also borrowed as immutable @@ -19,7 +19,7 @@ LL | for &x in &vector { | | immutable borrow ends here | immutable borrow occurs here ... -LL | vector[1] = 5; //~ ERROR cannot borrow +LL | vector[1] = 5; | ^^^^^^ mutable borrow occurs here error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/borrowck-if-no-else.stderr b/src/test/ui/borrowck/borrowck-if-no-else.stderr index f6d199d788b..1223e409d4d 100644 --- a/src/test/ui/borrowck/borrowck-if-no-else.stderr +++ b/src/test/ui/borrowck/borrowck-if-no-else.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/borrowck-if-no-else.rs:5:9 | -LL | foo(x); //~ ERROR use of possibly uninitialized variable: `x` +LL | foo(x); | ^ use of possibly uninitialized `x` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-if-with-else.stderr b/src/test/ui/borrowck/borrowck-if-with-else.stderr index e569fbdeca1..d11f29b05f5 100644 --- a/src/test/ui/borrowck/borrowck-if-with-else.stderr +++ b/src/test/ui/borrowck/borrowck-if-with-else.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/borrowck-if-with-else.rs:10:9 | -LL | foo(x); //~ ERROR use of possibly uninitialized variable: `x` +LL | foo(x); | ^ use of possibly uninitialized `x` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-in-static.stderr b/src/test/ui/borrowck/borrowck-in-static.stderr index 400f3cd1c3e..6eeaf428c5f 100644 --- a/src/test/ui/borrowck/borrowck-in-static.stderr +++ b/src/test/ui/borrowck/borrowck-in-static.stderr @@ -3,7 +3,7 @@ error[E0507]: cannot move out of captured outer variable in an `Fn` closure | LL | let x = Box::new(0); | - captured outer variable -LL | Box::new(|| x) //~ ERROR cannot move out of captured outer variable +LL | Box::new(|| x) | ^ cannot move out of captured outer variable in an `Fn` closure error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-init-in-called-fn-expr.stderr b/src/test/ui/borrowck/borrowck-init-in-called-fn-expr.stderr index 0195dc60eb3..82a602c6359 100644 --- a/src/test/ui/borrowck/borrowck-init-in-called-fn-expr.stderr +++ b/src/test/ui/borrowck/borrowck-init-in-called-fn-expr.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `i` --> $DIR/borrowck-init-in-called-fn-expr.rs:4:9 | -LL | i //~ ERROR use of possibly uninitialized variable: `i` +LL | i | ^ use of possibly uninitialized `i` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-init-in-fn-expr.stderr b/src/test/ui/borrowck/borrowck-init-in-fn-expr.stderr index dfa63f71c69..89973937852 100644 --- a/src/test/ui/borrowck/borrowck-init-in-fn-expr.stderr +++ b/src/test/ui/borrowck/borrowck-init-in-fn-expr.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `i` --> $DIR/borrowck-init-in-fn-expr.rs:4:9 | -LL | i //~ ERROR use of possibly uninitialized variable: `i` +LL | i | ^ use of possibly uninitialized `i` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-init-op-equal.stderr b/src/test/ui/borrowck/borrowck-init-op-equal.stderr index 414124040aa..9863ceb1424 100644 --- a/src/test/ui/borrowck/borrowck-init-op-equal.stderr +++ b/src/test/ui/borrowck/borrowck-init-op-equal.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `v` --> $DIR/borrowck-init-op-equal.rs:3:5 | -LL | v += 1; //~ ERROR use of possibly uninitialized variable: `v` +LL | v += 1; | ^^^^^^ use of possibly uninitialized `v` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-init-plus-equal.stderr b/src/test/ui/borrowck/borrowck-init-plus-equal.stderr index 124a60b8a50..80c4e0c8048 100644 --- a/src/test/ui/borrowck/borrowck-init-plus-equal.stderr +++ b/src/test/ui/borrowck/borrowck-init-plus-equal.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `v` --> $DIR/borrowck-init-plus-equal.rs:3:9 | -LL | v = v + 1; //~ ERROR use of possibly uninitialized variable: `v` +LL | v = v + 1; | ^ use of possibly uninitialized `v` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-insert-during-each.stderr b/src/test/ui/borrowck/borrowck-insert-during-each.stderr index 021b5b27ae7..3b6339757c9 100644 --- a/src/test/ui/borrowck/borrowck-insert-during-each.stderr +++ b/src/test/ui/borrowck/borrowck-insert-during-each.stderr @@ -3,7 +3,7 @@ error[E0500]: closure requires unique access to `f` but `*f` is already borrowed | LL | f.foo( | - borrow occurs here -LL | |a| { //~ ERROR closure requires unique access to `f` +LL | |a| { | ^^^ closure construction occurs here LL | f.n.insert(*a); | - borrow occurs due to use of `f` in closure diff --git a/src/test/ui/borrowck/borrowck-issue-2657-1.stderr b/src/test/ui/borrowck/borrowck-issue-2657-1.stderr index 7663822094d..d9ad86b4f88 100644 --- a/src/test/ui/borrowck/borrowck-issue-2657-1.stderr +++ b/src/test/ui/borrowck/borrowck-issue-2657-1.stderr @@ -3,7 +3,7 @@ error[E0505]: cannot move out of `x` because it is borrowed | LL | Some(ref _y) => { | ------ borrow of `x.0` occurs here -LL | let _a = x; //~ ERROR cannot move +LL | let _a = x; | ^^ move out of `x` occurs here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-issue-2657-2.stderr b/src/test/ui/borrowck/borrowck-issue-2657-2.stderr index 7e718786caa..1314b1a14f4 100644 --- a/src/test/ui/borrowck/borrowck-issue-2657-2.stderr +++ b/src/test/ui/borrowck/borrowck-issue-2657-2.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of borrowed content --> $DIR/borrowck-issue-2657-2.rs:7:18 | -LL | let _b = *y; //~ ERROR cannot move out +LL | let _b = *y; | ^^ | | | cannot move out of borrowed content diff --git a/src/test/ui/borrowck/borrowck-issue-48962.stderr b/src/test/ui/borrowck/borrowck-issue-48962.stderr index de4894d5b52..a5462b41396 100644 --- a/src/test/ui/borrowck/borrowck-issue-48962.stderr +++ b/src/test/ui/borrowck/borrowck-issue-48962.stderr @@ -5,7 +5,7 @@ LL | let mut src = &mut node; | ------- move occurs because `src` has type `&mut Node`, which does not implement the `Copy` trait LL | {src}; | --- value moved here -LL | src.next = None; //~ ERROR use of moved value: `src` [E0382] +LL | src.next = None; | ^^^^^^^^ value used here after move error[E0382]: use of moved value: `src` @@ -15,7 +15,7 @@ LL | let mut src = &mut (22, 44); | ------- move occurs because `src` has type `&mut (i32, i32)`, which does not implement the `Copy` trait LL | {src}; | --- value moved here -LL | src.0 = 66; //~ ERROR use of moved value: `src` [E0382] +LL | src.0 = 66; | ^^^^^^^^^^ value used here after move error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/borrowck-lend-flow-if.stderr b/src/test/ui/borrowck/borrowck-lend-flow-if.stderr index d1b6bb0c7c9..1acd47ce58b 100644 --- a/src/test/ui/borrowck/borrowck-lend-flow-if.stderr +++ b/src/test/ui/borrowck/borrowck-lend-flow-if.stderr @@ -4,7 +4,7 @@ error[E0502]: cannot borrow `*v` as mutable because `v` is also borrowed as immu LL | _w = &v; | - immutable borrow occurs here LL | } -LL | borrow_mut(&mut *v); //~ ERROR cannot borrow +LL | borrow_mut(&mut *v); | ^^ mutable borrow occurs here LL | _w.use_ref(); LL | } diff --git a/src/test/ui/borrowck/borrowck-lend-flow.stderr b/src/test/ui/borrowck/borrowck-lend-flow.stderr index d9080d00553..e39fb6c8600 100644 --- a/src/test/ui/borrowck/borrowck-lend-flow.stderr +++ b/src/test/ui/borrowck/borrowck-lend-flow.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `*v` as mutable because `v` is also borrowed as immu | LL | let _w = &v; | - immutable borrow occurs here -LL | borrow_mut(&mut *v); //~ ERROR cannot borrow +LL | borrow_mut(&mut *v); | ^^ mutable borrow occurs here LL | _w.use_ref(); LL | } diff --git a/src/test/ui/borrowck/borrowck-loan-blocks-move.stderr b/src/test/ui/borrowck/borrowck-loan-blocks-move.stderr index ba6e34c2ec8..e6f0a691eca 100644 --- a/src/test/ui/borrowck/borrowck-loan-blocks-move.stderr +++ b/src/test/ui/borrowck/borrowck-loan-blocks-move.stderr @@ -3,7 +3,7 @@ error[E0505]: cannot move out of `v` because it is borrowed | LL | let w = &v; | - borrow of `v` occurs here -LL | take(v); //~ ERROR cannot move out of `v` because it is borrowed +LL | take(v); | ^ move out of `v` occurs here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.stderr b/src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.stderr index 6aa2d5d189d..c916b7efc08 100644 --- a/src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.stderr +++ b/src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `v` as mutable because `*v` is also borrowed as immu | LL | borrow(&*v, | -- immutable borrow occurs here -LL | |w| { //~ ERROR cannot borrow `v` as mutable +LL | |w| { | ^^^ mutable borrow occurs here LL | v = box 4; | - borrow occurs due to use of `v` in closure diff --git a/src/test/ui/borrowck/borrowck-loan-of-static-data-issue-27616.stderr b/src/test/ui/borrowck/borrowck-loan-of-static-data-issue-27616.stderr index eceb923e776..c9d36a7f938 100644 --- a/src/test/ui/borrowck/borrowck-loan-of-static-data-issue-27616.stderr +++ b/src/test/ui/borrowck/borrowck-loan-of-static-data-issue-27616.stderr @@ -4,7 +4,7 @@ error[E0506]: cannot assign to `*s` because it is borrowed LL | let alias: &'static mut String = s; | - borrow of `*s` occurs here ... -LL | *s = String::new(); //~ ERROR cannot assign +LL | *s = String::new(); | ^^^^^^^^^^^^^^^^^^ assignment to borrowed `*s` occurs here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-loan-rcvr-overloaded-op.stderr b/src/test/ui/borrowck/borrowck-loan-rcvr-overloaded-op.stderr index b4f7a9af666..d180e3e701c 100644 --- a/src/test/ui/borrowck/borrowck-loan-rcvr-overloaded-op.stderr +++ b/src/test/ui/borrowck/borrowck-loan-rcvr-overloaded-op.stderr @@ -4,7 +4,7 @@ error[E0503]: cannot use `p` because it was mutably borrowed LL | let q = &mut p; | - borrow of `p` occurs here LL | -LL | p + 3; //~ ERROR cannot use `p` +LL | p + 3; | ^ use of borrowed `p` error[E0502]: cannot borrow `p` as immutable because it is also borrowed as mutable @@ -13,7 +13,7 @@ error[E0502]: cannot borrow `p` as immutable because it is also borrowed as muta LL | let q = &mut p; | - mutable borrow occurs here ... -LL | p.times(3); //~ ERROR cannot borrow `p` +LL | p.times(3); | ^ immutable borrow occurs here ... LL | } diff --git a/src/test/ui/borrowck/borrowck-loan-rcvr.stderr b/src/test/ui/borrowck/borrowck-loan-rcvr.stderr index eb0bbec0bc7..56d33eff73f 100644 --- a/src/test/ui/borrowck/borrowck-loan-rcvr.stderr +++ b/src/test/ui/borrowck/borrowck-loan-rcvr.stderr @@ -1,7 +1,7 @@ error[E0502]: cannot borrow `p` as mutable because it is also borrowed as immutable --> $DIR/borrowck-loan-rcvr.rs:23:14 | -LL | p.blockm(|| { //~ ERROR cannot borrow `p` as mutable +LL | p.blockm(|| { | - ^^ mutable borrow occurs here | | | immutable borrow occurs here @@ -15,7 +15,7 @@ error[E0502]: cannot borrow `p` as immutable because it is also borrowed as muta | LL | let l = &mut p; | - mutable borrow occurs here -LL | p.impurem(); //~ ERROR cannot borrow +LL | p.impurem(); | ^ immutable borrow occurs here ... LL | } diff --git a/src/test/ui/borrowck/borrowck-loan-vec-content.stderr b/src/test/ui/borrowck/borrowck-loan-vec-content.stderr index 6a565ff2f10..eea6a09f0fc 100644 --- a/src/test/ui/borrowck/borrowck-loan-vec-content.stderr +++ b/src/test/ui/borrowck/borrowck-loan-vec-content.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immuta | LL | &v[0], | - immutable borrow occurs here -LL | || { //~ ERROR cannot borrow `v` as mutable +LL | || { | ^^ mutable borrow occurs here LL | v[1] = 4; | - borrow occurs due to use of `v` in closure diff --git a/src/test/ui/borrowck/borrowck-move-by-capture.stderr b/src/test/ui/borrowck/borrowck-move-by-capture.stderr index 9c485fb48ca..d845a576b3d 100644 --- a/src/test/ui/borrowck/borrowck-move-by-capture.stderr +++ b/src/test/ui/borrowck/borrowck-move-by-capture.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of captured outer variable in an `FnMut` closure LL | let bar: Box<_> = box 3; | --- captured outer variable LL | let _g = to_fn_mut(|| { -LL | let _h = to_fn_once(move || -> isize { *bar }); //~ ERROR cannot move out of +LL | let _h = to_fn_once(move || -> isize { *bar }); | ^^^^^^^^^^^^^^^^ cannot move out of captured outer variable in an `FnMut` closure error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-move-error-with-note.stderr b/src/test/ui/borrowck/borrowck-move-error-with-note.stderr index 07009b42e4d..8b0722916db 100644 --- a/src/test/ui/borrowck/borrowck-move-error-with-note.stderr +++ b/src/test/ui/borrowck/borrowck-move-error-with-note.stderr @@ -1,9 +1,9 @@ error[E0507]: cannot move out of borrowed content --> $DIR/borrowck-move-error-with-note.rs:11:11 | -LL | match *f { //~ ERROR cannot move out of +LL | match *f { | ^^ cannot move out of borrowed content -LL | //~| cannot move out +LL | LL | Foo::Foo1(num1, | ---- hint: to prevent move, use `ref num1` or `ref mut num1` LL | num2) => (), @@ -14,8 +14,8 @@ LL | Foo::Foo2(num) => (), error[E0509]: cannot move out of type `S`, which implements the `Drop` trait --> $DIR/borrowck-move-error-with-note.rs:30:9 | -LL | / S { //~ ERROR cannot move out of type `S`, which implements the `Drop` trait -LL | | //~| cannot move out of here +LL | / S { +LL | | LL | | f: _s, | | -- hint: to prevent move, use `ref _s` or `ref mut _s` LL | | g: _t @@ -26,9 +26,9 @@ LL | | } => {} error[E0507]: cannot move out of borrowed content --> $DIR/borrowck-move-error-with-note.rs:47:11 | -LL | match a.a { //~ ERROR cannot move out of +LL | match a.a { | ^ cannot move out of borrowed content -LL | //~| cannot move out +LL | LL | n => { | - hint: to prevent move, use `ref n` or `ref mut n` diff --git a/src/test/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.stderr b/src/test/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.stderr index 2ed888051f6..5e2428ef4a3 100644 --- a/src/test/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.stderr +++ b/src/test/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.stderr @@ -4,7 +4,7 @@ error[E0505]: cannot move out of `*a` because it is borrowed LL | let b = &a; | - borrow of `a` occurs here LL | -LL | let z = *a; //~ ERROR: cannot move out of `*a` because it is borrowed +LL | let z = *a; | ^ move out of `*a` occurs here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.stderr b/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.stderr index 62a52260038..c23c5bb9c4c 100644 --- a/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.stderr +++ b/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of dereference of raw pointer --> $DIR/borrowck-move-from-unsafe-ptr.rs:2:13 | -LL | let y = *x; //~ ERROR cannot move out of dereference of raw pointer +LL | let y = *x; | ^^ | | | cannot move out of dereference of raw pointer diff --git a/src/test/ui/borrowck/borrowck-move-mut-base-ptr.stderr b/src/test/ui/borrowck/borrowck-move-mut-base-ptr.stderr index 224bf0fded8..d3853832c92 100644 --- a/src/test/ui/borrowck/borrowck-move-mut-base-ptr.stderr +++ b/src/test/ui/borrowck/borrowck-move-mut-base-ptr.stderr @@ -3,7 +3,7 @@ error[E0505]: cannot move out of `t0` because it is borrowed | LL | let p: &isize = &*t0; // Freezes `*t0` | --- borrow of `*t0` occurs here -LL | let t1 = t0; //~ ERROR cannot move out of `t0` +LL | let t1 = t0; | ^^ move out of `t0` occurs here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr b/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr index 156ba0d4d7b..5ec0dabfde5 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr @@ -5,9 +5,9 @@ LL | &[Foo { string: a }, | ^ - hint: to prevent move, use `ref a` or `ref mut a` | __________________| | | -LL | | //~^ ERROR cannot move out of type `[Foo]` -LL | | //~| cannot move out -LL | | //~| to prevent move +LL | | +LL | | +LL | | LL | | Foo { string: b }] => { | |_________________________________-__^ cannot move out of here | | diff --git a/src/test/ui/borrowck/borrowck-move-subcomponent.stderr b/src/test/ui/borrowck/borrowck-move-subcomponent.stderr index 187cdbbf815..fd3deef6df5 100644 --- a/src/test/ui/borrowck/borrowck-move-subcomponent.stderr +++ b/src/test/ui/borrowck/borrowck-move-subcomponent.stderr @@ -3,7 +3,7 @@ error[E0505]: cannot move out of `a.x` because it is borrowed | LL | let pb = &a; | - borrow of `a` occurs here -LL | let S { x: ax } = a; //~ ERROR cannot move out +LL | let S { x: ax } = a; | ^^ move out of `a.x` occurs here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-multiple-captures.stderr b/src/test/ui/borrowck/borrowck-multiple-captures.stderr index 3cdd0942608..f25b19e3d2e 100644 --- a/src/test/ui/borrowck/borrowck-multiple-captures.stderr +++ b/src/test/ui/borrowck/borrowck-multiple-captures.stderr @@ -4,7 +4,7 @@ error[E0504]: cannot move `x1` into closure because it is borrowed LL | let p1 = &x1; | -- borrow of `x1` occurs here ... -LL | drop(x1); //~ ERROR cannot move `x1` into closure because it is borrowed +LL | drop(x1); | ^^ move into closure occurs here error[E0504]: cannot move `x2` into closure because it is borrowed @@ -13,7 +13,7 @@ error[E0504]: cannot move `x2` into closure because it is borrowed LL | let p2 = &x2; | -- borrow of `x2` occurs here ... -LL | drop(x2); //~ ERROR cannot move `x2` into closure because it is borrowed +LL | drop(x2); | ^^ move into closure occurs here error[E0382]: capture of moved value: `x1` @@ -22,7 +22,7 @@ error[E0382]: capture of moved value: `x1` LL | drop(x1); | -- value moved here ... -LL | drop(x1); //~ ERROR capture of moved value: `x1` +LL | drop(x1); | ^^ value captured here after move | = note: move occurs because `x1` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -33,7 +33,7 @@ error[E0382]: capture of moved value: `x2` LL | drop(x2); | -- value moved here ... -LL | drop(x2); //~ ERROR capture of moved value: `x2` +LL | drop(x2); | ^^ value captured here after move | = note: move occurs because `x2` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -44,15 +44,15 @@ error[E0504]: cannot move `x` into closure because it is borrowed LL | let p = &x; | - borrow of `x` occurs here LL | thread::spawn(move|| { -LL | drop(x); //~ ERROR cannot move `x` into closure because it is borrowed +LL | drop(x); | ^ move into closure occurs here error[E0382]: use of moved value: `x` --> $DIR/borrowck-multiple-captures.rs:36:14 | -LL | drop(x); //~ ERROR cannot move `x` into closure because it is borrowed +LL | drop(x); | - value moved here -LL | drop(x); //~ ERROR use of moved value: `x` +LL | drop(x); | ^ value used here after move | = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -63,7 +63,7 @@ error[E0382]: capture of moved value: `x` LL | drop(x); | - value moved here LL | thread::spawn(move|| { -LL | drop(x); //~ ERROR capture of moved value: `x` +LL | drop(x); | ^ value captured here after move | = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -71,9 +71,9 @@ LL | drop(x); //~ ERROR capture of moved value: `x` error[E0382]: use of moved value: `x` --> $DIR/borrowck-multiple-captures.rs:46:14 | -LL | drop(x); //~ ERROR capture of moved value: `x` +LL | drop(x); | - value moved here -LL | drop(x); //~ ERROR use of moved value: `x` +LL | drop(x); | ^ value used here after move | = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait diff --git a/src/test/ui/borrowck/borrowck-mut-addr-of-imm-var.stderr b/src/test/ui/borrowck/borrowck-mut-addr-of-imm-var.stderr index 95635f7f670..aa3b39c395d 100644 --- a/src/test/ui/borrowck/borrowck-mut-addr-of-imm-var.stderr +++ b/src/test/ui/borrowck/borrowck-mut-addr-of-imm-var.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow immutable local variable `x` as mutable | LL | let x: isize = 3; | - help: make this binding mutable: `mut x` -LL | let y: &mut isize = &mut x; //~ ERROR cannot borrow +LL | let y: &mut isize = &mut x; | ^ cannot borrow mutably error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-mut-borrow-of-mut-base-ptr.stderr b/src/test/ui/borrowck/borrowck-mut-borrow-of-mut-base-ptr.stderr index 154a283b43b..fb73dbd4510 100644 --- a/src/test/ui/borrowck/borrowck-mut-borrow-of-mut-base-ptr.stderr +++ b/src/test/ui/borrowck/borrowck-mut-borrow-of-mut-base-ptr.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `t0` as mutable because `*t0` is also borrowed as im | LL | let p: &isize = &*t0; // Freezes `*t0` | --- immutable borrow occurs here -LL | let mut t2 = &mut t0; //~ ERROR cannot borrow `t0` +LL | let mut t2 = &mut t0; | ^^ mutable borrow occurs here ... LL | } @@ -14,7 +14,7 @@ error[E0499]: cannot borrow `t0` as mutable more than once at a time | LL | let p: &mut isize = &mut *t0; // Claims `*t0` | --- first mutable borrow occurs here -LL | let mut t2 = &mut t0; //~ ERROR cannot borrow `t0` +LL | let mut t2 = &mut t0; | ^^ second mutable borrow occurs here ... LL | } diff --git a/src/test/ui/borrowck/borrowck-mut-slice-of-imm-vec.stderr b/src/test/ui/borrowck/borrowck-mut-slice-of-imm-vec.stderr index 41ee2adf8aa..416091920ad 100644 --- a/src/test/ui/borrowck/borrowck-mut-slice-of-imm-vec.stderr +++ b/src/test/ui/borrowck/borrowck-mut-slice-of-imm-vec.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow immutable local variable `v` as mutable | LL | let v = vec![1, 2, 3]; | - help: make this binding mutable: `mut v` -LL | write(&mut v); //~ ERROR cannot borrow +LL | write(&mut v); | ^ cannot borrow mutably error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.stderr b/src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.stderr index 5aaf825a3c3..5fc169490c7 100644 --- a/src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.stderr +++ b/src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.stderr @@ -3,7 +3,7 @@ error[E0505]: cannot move out of `x` because it is borrowed | LL | Cycle::Node(ref mut y) => { | --------- borrow of `x.0` occurs here -LL | y.a = x; //~ ERROR cannot move out of +LL | y.a = x; | ^ move out of `x` occurs here error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-object-lifetime.stderr b/src/test/ui/borrowck/borrowck-object-lifetime.stderr index b22d05b8a2a..8f6c8e072e5 100644 --- a/src/test/ui/borrowck/borrowck-object-lifetime.stderr +++ b/src/test/ui/borrowck/borrowck-object-lifetime.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `*x` as mutable because it is also borrowed as immut | LL | let y = x.borrowed(); | - immutable borrow occurs here -LL | let z = x.mut_borrowed(); //~ ERROR cannot borrow +LL | let z = x.mut_borrowed(); | ^ mutable borrow occurs here LL | y.use_ref(); LL | } @@ -14,7 +14,7 @@ error[E0502]: cannot borrow `x` as mutable because `*x` is also borrowed as immu | LL | let y = x.borrowed(); | - immutable borrow occurs here -LL | let z = &mut x; //~ ERROR cannot borrow +LL | let z = &mut x; | ^ mutable borrow occurs here LL | y.use_ref(); LL | } diff --git a/src/test/ui/borrowck/borrowck-or-init.stderr b/src/test/ui/borrowck/borrowck-or-init.stderr index 60024c08303..a2b69b187b9 100644 --- a/src/test/ui/borrowck/borrowck-or-init.stderr +++ b/src/test/ui/borrowck/borrowck-or-init.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `i` --> $DIR/borrowck-or-init.rs:5:20 | -LL | println!("{}", i); //~ ERROR use of possibly uninitialized variable: `i` +LL | println!("{}", i); | ^ use of possibly uninitialized `i` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-overloaded-call.stderr b/src/test/ui/borrowck/borrowck-overloaded-call.stderr index 04292261306..97223a2307c 100644 --- a/src/test/ui/borrowck/borrowck-overloaded-call.stderr +++ b/src/test/ui/borrowck/borrowck-overloaded-call.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `s` as immutable because it is also borrowed as muta | LL | let sp = &mut s; | - mutable borrow occurs here -LL | s(3); //~ ERROR cannot borrow `s` as immutable because it is also borrowed as mutable +LL | s(3); | ^ immutable borrow occurs here LL | use_mut(sp); LL | } @@ -15,7 +15,7 @@ error[E0596]: cannot borrow immutable local variable `s` as mutable LL | let s = SFnMut { | - help: make this binding mutable: `mut s` ... -LL | s(3); //~ ERROR cannot borrow immutable local variable `s` as mutable +LL | s(3); | ^ cannot borrow mutably error[E0382]: use of moved value: `s` @@ -23,7 +23,7 @@ error[E0382]: use of moved value: `s` | LL | s(" world".to_string()); | - value moved here -LL | s(" world".to_string()); //~ ERROR use of moved value: `s` +LL | s(" world".to_string()); | ^ value used here after move | = note: move occurs because `s` has type `SFnOnce`, which does not implement the `Copy` trait diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-autoderef.stderr b/src/test/ui/borrowck/borrowck-overloaded-index-autoderef.stderr index 9bc83f84339..73cab8868ea 100644 --- a/src/test/ui/borrowck/borrowck-overloaded-index-autoderef.stderr +++ b/src/test/ui/borrowck/borrowck-overloaded-index-autoderef.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `*f` as immutable because it is also borrowed as mut | LL | let p = &mut f[&s]; | - mutable borrow occurs here -LL | let q = &f[&s]; //~ ERROR cannot borrow +LL | let q = &f[&s]; | ^ immutable borrow occurs here LL | p.use_mut(); LL | } @@ -14,7 +14,7 @@ error[E0499]: cannot borrow `*f` as mutable more than once at a time | LL | let p = &mut f[&s]; | - first mutable borrow occurs here -LL | let q = &mut f[&s]; //~ ERROR cannot borrow +LL | let q = &mut f[&s]; | ^ second mutable borrow occurs here LL | p.use_mut(); LL | } @@ -25,7 +25,7 @@ error[E0499]: cannot borrow `f.foo` as mutable more than once at a time | LL | let p = &mut f.foo[&s]; | ----- first mutable borrow occurs here -LL | let q = &mut f.foo[&s]; //~ ERROR cannot borrow +LL | let q = &mut f.foo[&s]; | ^^^^^ second mutable borrow occurs here LL | p.use_mut(); LL | } @@ -36,7 +36,7 @@ error[E0502]: cannot borrow `f.foo` as mutable because it is also borrowed as im | LL | let p = &f.foo[&s]; | ----- immutable borrow occurs here -LL | let q = &mut f.foo[&s]; //~ ERROR cannot borrow +LL | let q = &mut f.foo[&s]; | ^^^^^ mutable borrow occurs here LL | p.use_ref(); LL | } @@ -47,7 +47,7 @@ error[E0506]: cannot assign to `f.foo` because it is borrowed | LL | let p = &f.foo[&s]; | ----- borrow of `f.foo` occurs here -LL | f.foo = g; //~ ERROR cannot assign +LL | f.foo = g; | ^^^^^^^^^ assignment to borrowed `f.foo` occurs here error[E0506]: cannot assign to `*f` because it is borrowed @@ -55,7 +55,7 @@ error[E0506]: cannot assign to `*f` because it is borrowed | LL | let p = &f.foo[&s]; | ----- borrow of `*f` occurs here -LL | *f = g; //~ ERROR cannot assign +LL | *f = g; | ^^^^^^ assignment to borrowed `*f` occurs here error[E0506]: cannot assign to `f.foo` because it is borrowed @@ -63,7 +63,7 @@ error[E0506]: cannot assign to `f.foo` because it is borrowed | LL | let p = &mut f.foo[&s]; | ----- borrow of `f.foo` occurs here -LL | f.foo = g; //~ ERROR cannot assign +LL | f.foo = g; | ^^^^^^^^^ assignment to borrowed `f.foo` occurs here error[E0506]: cannot assign to `*f` because it is borrowed @@ -71,7 +71,7 @@ error[E0506]: cannot assign to `*f` because it is borrowed | LL | let p = &mut f.foo[&s]; | ----- borrow of `*f` occurs here -LL | *f = g; //~ ERROR cannot assign +LL | *f = g; | ^^^^^^ assignment to borrowed `*f` occurs here error: aborting due to 8 previous errors diff --git a/src/test/ui/borrowck/borrowck-reborrow-from-mut.stderr b/src/test/ui/borrowck/borrowck-reborrow-from-mut.stderr index c20df9f5ff3..ea624018ad4 100644 --- a/src/test/ui/borrowck/borrowck-reborrow-from-mut.stderr +++ b/src/test/ui/borrowck/borrowck-reborrow-from-mut.stderr @@ -3,7 +3,7 @@ error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time | LL | let _bar1 = &mut foo.bar1; | -------- first mutable borrow occurs here -LL | let _bar2 = &mut foo.bar1; //~ ERROR cannot borrow +LL | let _bar2 = &mut foo.bar1; | ^^^^^^^^ second mutable borrow occurs here LL | use_mut(_bar1); LL | } @@ -14,7 +14,7 @@ error[E0502]: cannot borrow `foo.bar1` as immutable because it is also borrowed | LL | let _bar1 = &mut foo.bar1; | -------- mutable borrow occurs here -LL | let _bar2 = &foo.bar1; //~ ERROR cannot borrow +LL | let _bar2 = &foo.bar1; | ^^^^^^^^ immutable borrow occurs here LL | use_mut(_bar1); LL | } @@ -25,7 +25,7 @@ error[E0502]: cannot borrow `foo.bar1` as mutable because it is also borrowed as | LL | let _bar1 = &foo.bar1; | -------- immutable borrow occurs here -LL | let _bar2 = &mut foo.bar1; //~ ERROR cannot borrow +LL | let _bar2 = &mut foo.bar1; | ^^^^^^^^ mutable borrow occurs here LL | use_imm(_bar1); LL | } @@ -48,7 +48,7 @@ error[E0502]: cannot borrow `foo.bar1` as immutable because `foo.bar1.int1` is a | LL | let _bar1 = &mut foo.bar1.int1; | ------------- mutable borrow occurs here -LL | let _foo1 = &foo.bar1; //~ ERROR cannot borrow +LL | let _foo1 = &foo.bar1; | ^^^^^^^^ immutable borrow occurs here ... LL | } @@ -59,8 +59,8 @@ error[E0502]: cannot borrow `*foo` as immutable because `foo.bar1.int1` is also | LL | let _bar1 = &mut foo.bar1.int1; | ------------- mutable borrow occurs here -LL | let _foo1 = &foo.bar1; //~ ERROR cannot borrow -LL | let _foo2 = &*foo; //~ ERROR cannot borrow +LL | let _foo1 = &foo.bar1; +LL | let _foo2 = &*foo; | ^^^^ immutable borrow occurs here LL | use_mut(_bar1); LL | } @@ -71,7 +71,7 @@ error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time | LL | let _bar1 = &mut foo.bar1.int1; | ------------- first mutable borrow occurs here -LL | let _foo1 = &mut foo.bar1; //~ ERROR cannot borrow +LL | let _foo1 = &mut foo.bar1; | ^^^^^^^^ second mutable borrow occurs here LL | use_mut(_bar1); LL | } @@ -82,7 +82,7 @@ error[E0499]: cannot borrow `*foo` as mutable more than once at a time | LL | let _bar1 = &mut foo.bar1.int1; | ------------- first mutable borrow occurs here -LL | let _foo2 = &mut *foo; //~ ERROR cannot borrow +LL | let _foo2 = &mut *foo; | ^^^^ second mutable borrow occurs here LL | use_mut(_bar1); LL | } @@ -93,7 +93,7 @@ error[E0502]: cannot borrow `foo.bar1` as mutable because `foo.bar1.int1` is als | LL | let _bar1 = &foo.bar1.int1; | ------------- immutable borrow occurs here -LL | let _foo1 = &mut foo.bar1; //~ ERROR cannot borrow +LL | let _foo1 = &mut foo.bar1; | ^^^^^^^^ mutable borrow occurs here LL | use_imm(_bar1); LL | } @@ -104,7 +104,7 @@ error[E0502]: cannot borrow `*foo` as mutable because `foo.bar1.int1` is also bo | LL | let _bar1 = &foo.bar1.int1; | ------------- immutable borrow occurs here -LL | let _foo2 = &mut *foo; //~ ERROR cannot borrow +LL | let _foo2 = &mut *foo; | ^^^^ mutable borrow occurs here LL | use_imm(_bar1); LL | } @@ -115,7 +115,7 @@ error[E0596]: cannot borrow field `foo.bar1` of immutable binding as mutable | LL | fn borrow_mut_from_imm(foo: &Foo) { | ---- use `&mut Foo` here to make mutable -LL | let _bar1 = &mut foo.bar1; //~ ERROR cannot borrow +LL | let _bar1 = &mut foo.bar1; | ^^^^^^^^ cannot mutably borrow field of immutable binding error: aborting due to 11 previous errors diff --git a/src/test/ui/borrowck/borrowck-ref-mut-of-imm.stderr b/src/test/ui/borrowck/borrowck-ref-mut-of-imm.stderr index 4eb41758fc1..6e0d2f69945 100644 --- a/src/test/ui/borrowck/borrowck-ref-mut-of-imm.stderr +++ b/src/test/ui/borrowck/borrowck-ref-mut-of-imm.stderr @@ -4,7 +4,7 @@ error[E0596]: cannot borrow field `(x as std::prelude::v1::Some).0` of immutable LL | fn destructure(x: Option) -> isize { | - help: make this binding mutable: `mut x` ... -LL | Some(ref mut v) => *v //~ ERROR cannot borrow +LL | Some(ref mut v) => *v | ^^^^^^^^^ cannot mutably borrow field of immutable binding error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-reinit.stderr b/src/test/ui/borrowck/borrowck-reinit.stderr index 96f3981ac2f..3618a7cb2cd 100644 --- a/src/test/ui/borrowck/borrowck-reinit.stderr +++ b/src/test/ui/borrowck/borrowck-reinit.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `x` (Ast) | LL | drop(x); | - value moved here -LL | let _ = (1,x); //~ ERROR use of moved value: `x` (Ast) +LL | let _ = (1,x); | ^ value used here after move | = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -16,7 +16,7 @@ LL | let mut x = Box::new(0); ... LL | drop(x); | - value moved here -LL | let _ = (1,x); //~ ERROR use of moved value: `x` (Ast) +LL | let _ = (1,x); | ^ value used here after move error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr b/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr index cb65ea11205..79aec6c2eda 100644 --- a/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr +++ b/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.stderr @@ -3,8 +3,8 @@ error[E0502]: cannot borrow `x` as immutable because it is also borrowed as muta | LL | let y = &mut x; | - mutable borrow occurs here -LL | //~^ mutable borrow occurs here -LL | let z = &x; //~ ERROR cannot borrow +LL | +LL | let z = &x; | ^ immutable borrow occurs here ... LL | } @@ -15,8 +15,8 @@ error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immuta | LL | let y = &x; | - immutable borrow occurs here -LL | //~^ immutable borrow occurs here -LL | let z = &mut x; //~ ERROR cannot borrow +LL | +LL | let z = &mut x; | ^ mutable borrow occurs here ... LL | } @@ -27,8 +27,8 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time | LL | let y = &mut x; | - first mutable borrow occurs here -LL | //~^ first mutable borrow occurs here -LL | let z = &mut x; //~ ERROR cannot borrow +LL | +LL | let z = &mut x; | ^ second mutable borrow occurs here ... LL | }; diff --git a/src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.stderr b/src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.stderr index b54941eed1b..4d4244ba5ef 100644 --- a/src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.stderr +++ b/src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.stderr @@ -1,7 +1,7 @@ error[E0597]: `x` does not live long enough --> $DIR/borrowck-return-variable-on-stack-via-clone.rs:7:7 | -LL | (&x).clone() //~ ERROR `x` does not live long enough +LL | (&x).clone() | ^ borrowed value does not live long enough LL | } | - borrowed value only lives until here diff --git a/src/test/ui/borrowck/borrowck-return.stderr b/src/test/ui/borrowck/borrowck-return.stderr index b8a5ce8dc99..a2b65af5dbf 100644 --- a/src/test/ui/borrowck/borrowck-return.stderr +++ b/src/test/ui/borrowck/borrowck-return.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/borrowck-return.rs:3:12 | -LL | return x; //~ ERROR use of possibly uninitialized variable: `x` +LL | return x; | ^ use of possibly uninitialized `x` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-slice-pattern-element-loan.stderr b/src/test/ui/borrowck/borrowck-slice-pattern-element-loan.stderr index b1629c0e056..f716ee68b00 100644 --- a/src/test/ui/borrowck/borrowck-slice-pattern-element-loan.stderr +++ b/src/test/ui/borrowck/borrowck-slice-pattern-element-loan.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `s[..]` as mutable because it is also borrowed as im | LL | if let [ref first, ref second, ..] = *s { | ---------- immutable borrow occurs here -LL | if let [_, ref mut second2, ref mut third, ..] = *s { //~ERROR +LL | if let [_, ref mut second2, ref mut third, ..] = *s { | ^^^^^^^^^^^^^^^^ mutable borrow occurs here LL | nop(&[first, second, second2, third]); | ------ immutable borrow later used here @@ -13,7 +13,7 @@ error[E0502]: cannot borrow `s[..]` as mutable because it is also borrowed as im | LL | if let [.., ref fourth, ref third, _, ref first] = *s { | --------- immutable borrow occurs here -LL | if let [.., ref mut third2, _, _] = *s { //~ERROR +LL | if let [.., ref mut third2, _, _] = *s { | ^^^^^^^^^^^^^^ mutable borrow occurs here LL | nop(&[first, third, third2, fourth]); | ----- immutable borrow later used here @@ -24,7 +24,7 @@ error[E0502]: cannot borrow `s[..]` as mutable because it is also borrowed as im LL | if let [.., _, ref from_end4, ref from_end3, _, ref from_end1] = *s { | ------------- immutable borrow occurs here ... -LL | if let [_, ref mut from_begin1, ..] = *s { //~ERROR +LL | if let [_, ref mut from_begin1, ..] = *s { | ^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here LL | nop(&[from_begin1, from_end1, from_end3, from_end4]); | --------- immutable borrow later used here @@ -35,7 +35,7 @@ error[E0502]: cannot borrow `s[..]` as mutable because it is also borrowed as im LL | if let [.., _, ref from_end4, ref from_end3, _, ref from_end1] = *s { | ------------- immutable borrow occurs here ... -LL | if let [_, _, ref mut from_begin2, ..] = *s { //~ERROR +LL | if let [_, _, ref mut from_begin2, ..] = *s { | ^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here LL | nop(&[from_begin2, from_end1, from_end3, from_end4]); | --------- immutable borrow later used here @@ -46,7 +46,7 @@ error[E0502]: cannot borrow `s[..]` as mutable because it is also borrowed as im LL | if let [.., _, ref from_end4, ref from_end3, _, ref from_end1] = *s { | ------------- immutable borrow occurs here ... -LL | if let [_, _, _, ref mut from_begin3, ..] = *s { //~ERROR +LL | if let [_, _, _, ref mut from_begin3, ..] = *s { | ^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here LL | nop(&[from_begin3, from_end1, from_end3, from_end4]); | --------- immutable borrow later used here @@ -57,7 +57,7 @@ error[E0502]: cannot borrow `s[..]` as mutable because it is also borrowed as im LL | if let [ref from_begin0, ref from_begin1, _, ref from_begin3, _, ..] = *s { | --------------- immutable borrow occurs here ... -LL | if let [.., ref mut from_end2, _] = *s { //~ERROR +LL | if let [.., ref mut from_end2, _] = *s { | ^^^^^^^^^^^^^^^^^ mutable borrow occurs here LL | nop(&[from_begin0, from_begin1, from_begin3, from_end2]); | ----------- immutable borrow later used here @@ -68,7 +68,7 @@ error[E0502]: cannot borrow `s[..]` as mutable because it is also borrowed as im LL | if let [ref from_begin0, ref from_begin1, _, ref from_begin3, _, ..] = *s { | --------------- immutable borrow occurs here ... -LL | if let [.., ref mut from_end3, _, _] = *s { //~ERROR +LL | if let [.., ref mut from_end3, _, _] = *s { | ^^^^^^^^^^^^^^^^^ mutable borrow occurs here LL | nop(&[from_begin0, from_begin1, from_begin3, from_end3]); | ----------- immutable borrow later used here @@ -79,7 +79,7 @@ error[E0502]: cannot borrow `s[..]` as mutable because it is also borrowed as im LL | if let [ref from_begin0, ref from_begin1, _, ref from_begin3, _, ..] = *s { | --------------- immutable borrow occurs here ... -LL | if let [.., ref mut from_end4, _, _, _] = *s { //~ERROR +LL | if let [.., ref mut from_end4, _, _, _] = *s { | ^^^^^^^^^^^^^^^^^ mutable borrow occurs here LL | nop(&[from_begin0, from_begin1, from_begin3, from_end4]); | ----------- immutable borrow later used here @@ -89,7 +89,7 @@ error[E0502]: cannot borrow `s[..]` as mutable because it is also borrowed as im | LL | if let [ref first, ref second, ..] = *s { | ---------- immutable borrow occurs here -LL | if let [_, ref mut tail..] = *s { //~ERROR +LL | if let [_, ref mut tail..] = *s { | ^^^^^^^^^^^^ mutable borrow occurs here LL | nop(&[first, second]); | ------ immutable borrow later used here @@ -99,7 +99,7 @@ error[E0502]: cannot borrow `s[..]` as mutable because it is also borrowed as im | LL | if let [.., ref second, ref first] = *s { | ---------- immutable borrow occurs here -LL | if let [ref mut tail.., _] = *s { //~ERROR +LL | if let [ref mut tail.., _] = *s { | ^^^^^^^^^^^^ mutable borrow occurs here LL | nop(&[first, second]); | ------ immutable borrow later used here @@ -109,7 +109,7 @@ error[E0502]: cannot borrow `s[..]` as mutable because it is also borrowed as im | LL | if let [_, _, _, ref s1..] = *s { | ------ immutable borrow occurs here -LL | if let [ref mut s2.., _, _, _] = *s { //~ERROR +LL | if let [ref mut s2.., _, _, _] = *s { | ^^^^^^^^^^ mutable borrow occurs here LL | nop_subslice(s1); | -- immutable borrow later used here diff --git a/src/test/ui/borrowck/borrowck-storage-dead.stderr b/src/test/ui/borrowck/borrowck-storage-dead.stderr index 057d40d74cf..c291ed224eb 100644 --- a/src/test/ui/borrowck/borrowck-storage-dead.stderr +++ b/src/test/ui/borrowck/borrowck-storage-dead.stderr @@ -1,13 +1,13 @@ error[E0381]: use of possibly uninitialized variable: `x` (Ast) --> $DIR/borrowck-storage-dead.rs:18:17 | -LL | let _ = x + 1; //~ERROR (Ast) [E0381] +LL | let _ = x + 1; | ^ use of possibly uninitialized `x` error[E0381]: use of possibly uninitialized variable: `x` (Mir) --> $DIR/borrowck-storage-dead.rs:18:17 | -LL | let _ = x + 1; //~ERROR (Ast) [E0381] +LL | let _ = x + 1; | ^ use of possibly uninitialized `x` error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/borrowck-swap-mut-base-ptr.stderr b/src/test/ui/borrowck/borrowck-swap-mut-base-ptr.stderr index 35007216dac..9efd249caf8 100644 --- a/src/test/ui/borrowck/borrowck-swap-mut-base-ptr.stderr +++ b/src/test/ui/borrowck/borrowck-swap-mut-base-ptr.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `t0` as mutable because `*t0` is also borrowed as im | LL | let p: &isize = &*t0; // Freezes `*t0` | --- immutable borrow occurs here -LL | swap(&mut t0, &mut t1); //~ ERROR cannot borrow `t0` +LL | swap(&mut t0, &mut t1); | ^^ mutable borrow occurs here ... LL | } diff --git a/src/test/ui/borrowck/borrowck-unboxed-closures.stderr b/src/test/ui/borrowck/borrowck-unboxed-closures.stderr index 044119f5089..2e0773aebc4 100644 --- a/src/test/ui/borrowck/borrowck-unboxed-closures.stderr +++ b/src/test/ui/borrowck/borrowck-unboxed-closures.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `f` as immutable because it is also borrowed as muta | LL | let g = &mut f; | - mutable borrow occurs here -LL | f(1, 2); //~ ERROR cannot borrow `f` as immutable +LL | f(1, 2); | ^ immutable borrow occurs here LL | use_mut(g); LL | } @@ -14,7 +14,7 @@ error[E0596]: cannot borrow immutable argument `f` as mutable | LL | fn b isize>(f: F) { | - help: make this binding mutable: `mut f` -LL | f(1, 2); //~ ERROR cannot borrow immutable argument +LL | f(1, 2); | ^ cannot borrow mutably error[E0382]: use of moved value: `f` @@ -22,7 +22,7 @@ error[E0382]: use of moved value: `f` | LL | f(1, 2); | - value moved here -LL | f(1, 2); //~ ERROR use of moved value +LL | f(1, 2); | ^ value used here after move | = note: move occurs because `f` has type `F`, which does not implement the `Copy` trait diff --git a/src/test/ui/borrowck/borrowck-uninit-after-item.stderr b/src/test/ui/borrowck/borrowck-uninit-after-item.stderr index f658b64f11f..2d0b21dd0d6 100644 --- a/src/test/ui/borrowck/borrowck-uninit-after-item.stderr +++ b/src/test/ui/borrowck/borrowck-uninit-after-item.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `bar` --> $DIR/borrowck-uninit-after-item.rs:4:9 | -LL | baz(bar); //~ ERROR use of possibly uninitialized variable: `bar` +LL | baz(bar); | ^^^ use of possibly uninitialized `bar` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-uninit-in-assignop.stderr b/src/test/ui/borrowck/borrowck-uninit-in-assignop.stderr index a685f0ecf3c..163395e42d2 100644 --- a/src/test/ui/borrowck/borrowck-uninit-in-assignop.stderr +++ b/src/test/ui/borrowck/borrowck-uninit-in-assignop.stderr @@ -1,61 +1,61 @@ error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/borrowck-uninit-in-assignop.rs:6:5 | -LL | x += 1; //~ ERROR use of possibly uninitialized variable: `x` +LL | x += 1; | ^^^^^^ use of possibly uninitialized `x` error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/borrowck-uninit-in-assignop.rs:9:5 | -LL | x -= 1; //~ ERROR use of possibly uninitialized variable: `x` +LL | x -= 1; | ^^^^^^ use of possibly uninitialized `x` error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/borrowck-uninit-in-assignop.rs:12:5 | -LL | x *= 1; //~ ERROR use of possibly uninitialized variable: `x` +LL | x *= 1; | ^^^^^^ use of possibly uninitialized `x` error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/borrowck-uninit-in-assignop.rs:15:5 | -LL | x /= 1; //~ ERROR use of possibly uninitialized variable: `x` +LL | x /= 1; | ^^^^^^ use of possibly uninitialized `x` error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/borrowck-uninit-in-assignop.rs:18:5 | -LL | x %= 1; //~ ERROR use of possibly uninitialized variable: `x` +LL | x %= 1; | ^^^^^^ use of possibly uninitialized `x` error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/borrowck-uninit-in-assignop.rs:21:5 | -LL | x ^= 1; //~ ERROR use of possibly uninitialized variable: `x` +LL | x ^= 1; | ^^^^^^ use of possibly uninitialized `x` error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/borrowck-uninit-in-assignop.rs:24:5 | -LL | x &= 1; //~ ERROR use of possibly uninitialized variable: `x` +LL | x &= 1; | ^^^^^^ use of possibly uninitialized `x` error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/borrowck-uninit-in-assignop.rs:27:5 | -LL | x |= 1; //~ ERROR use of possibly uninitialized variable: `x` +LL | x |= 1; | ^^^^^^ use of possibly uninitialized `x` error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/borrowck-uninit-in-assignop.rs:30:5 | -LL | x <<= 1; //~ ERROR use of possibly uninitialized variable: `x` +LL | x <<= 1; | ^^^^^^^ use of possibly uninitialized `x` error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/borrowck-uninit-in-assignop.rs:33:5 | -LL | x >>= 1; //~ ERROR use of possibly uninitialized variable: `x` +LL | x >>= 1; | ^^^^^^^ use of possibly uninitialized `x` error: aborting due to 10 previous errors diff --git a/src/test/ui/borrowck/borrowck-uninit.stderr b/src/test/ui/borrowck/borrowck-uninit.stderr index 5e3428e20b1..5db9c1b250c 100644 --- a/src/test/ui/borrowck/borrowck-uninit.stderr +++ b/src/test/ui/borrowck/borrowck-uninit.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/borrowck-uninit.rs:5:9 | -LL | foo(x); //~ ERROR use of possibly uninitialized variable: `x` +LL | foo(x); | ^ use of possibly uninitialized `x` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-union-borrow-nested.stderr b/src/test/ui/borrowck/borrowck-union-borrow-nested.stderr index 199a13352c4..71fae6f8d63 100644 --- a/src/test/ui/borrowck/borrowck-union-borrow-nested.stderr +++ b/src/test/ui/borrowck/borrowck-union-borrow-nested.stderr @@ -3,7 +3,7 @@ error[E0503]: cannot use `u.c` because it was mutably borrowed | LL | let ra = &mut u.s.a; | ----- borrow of `u.s.a` occurs here -LL | let b = u.c; //~ ERROR cannot use `u.c` because it was mutably borrowed +LL | let b = u.c; | ^ use of borrowed `u.s.a` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-union-borrow.stderr b/src/test/ui/borrowck/borrowck-union-borrow.stderr index ef6a331eda0..1cda7e49929 100644 --- a/src/test/ui/borrowck/borrowck-union-borrow.stderr +++ b/src/test/ui/borrowck/borrowck-union-borrow.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `u.a` as mutable because it is also borrowed as immu | LL | let ra = &u.a; | --- immutable borrow occurs here -LL | let rma = &mut u.a; //~ ERROR cannot borrow `u.a` as mutable because it is also borrowed as immutable +LL | let rma = &mut u.a; | ^^^ mutable borrow occurs here LL | drop(ra); LL | } @@ -14,7 +14,7 @@ error[E0506]: cannot assign to `u.a` because it is borrowed | LL | let ra = &u.a; | --- borrow of `u.a` occurs here -LL | u.a = 1; //~ ERROR cannot assign to `u.a` because it is borrowed +LL | u.a = 1; | ^^^^^^^ assignment to borrowed `u.a` occurs here error[E0502]: cannot borrow `u` (via `u.b`) as mutable because `u` is also borrowed as immutable (via `u.a`) @@ -22,7 +22,7 @@ error[E0502]: cannot borrow `u` (via `u.b`) as mutable because `u` is also borro | LL | let ra = &u.a; | --- immutable borrow occurs here (via `u.a`) -LL | let rmb = &mut u.b; //~ ERROR cannot borrow `u` (via `u.b`) as mutable because `u` is also borrowed as immutable (via `u.a`) +LL | let rmb = &mut u.b; | ^^^ mutable borrow of `u.b` -- which overlaps with `u.a` -- occurs here LL | drop(ra); LL | } @@ -33,7 +33,7 @@ error[E0506]: cannot assign to `u.b` because it is borrowed | LL | let ra = &u.a; | --- borrow of `u.b` occurs here -LL | u.b = 1; //~ ERROR cannot assign to `u.b` because it is borrowed +LL | u.b = 1; | ^^^^^^^ assignment to borrowed `u.b` occurs here error[E0502]: cannot borrow `u.a` as immutable because it is also borrowed as mutable @@ -41,7 +41,7 @@ error[E0502]: cannot borrow `u.a` as immutable because it is also borrowed as mu | LL | let rma = &mut u.a; | --- mutable borrow occurs here -LL | let ra = &u.a; //~ ERROR cannot borrow `u.a` as immutable because it is also borrowed as mutable +LL | let ra = &u.a; | ^^^ immutable borrow occurs here LL | drop(rma); LL | } @@ -52,7 +52,7 @@ error[E0503]: cannot use `u.a` because it was mutably borrowed | LL | let ra = &mut u.a; | --- borrow of `u.a` occurs here -LL | let a = u.a; //~ ERROR cannot use `u.a` because it was mutably borrowed +LL | let a = u.a; | ^ use of borrowed `u.a` error[E0499]: cannot borrow `u.a` as mutable more than once at a time @@ -60,7 +60,7 @@ error[E0499]: cannot borrow `u.a` as mutable more than once at a time | LL | let rma = &mut u.a; | --- first mutable borrow occurs here -LL | let rma2 = &mut u.a; //~ ERROR cannot borrow `u.a` as mutable more than once at a time +LL | let rma2 = &mut u.a; | ^^^ second mutable borrow occurs here LL | drop(rma); LL | } @@ -71,7 +71,7 @@ error[E0506]: cannot assign to `u.a` because it is borrowed | LL | let rma = &mut u.a; | --- borrow of `u.a` occurs here -LL | u.a = 1; //~ ERROR cannot assign to `u.a` because it is borrowed +LL | u.a = 1; | ^^^^^^^ assignment to borrowed `u.a` occurs here error[E0502]: cannot borrow `u` (via `u.b`) as immutable because `u` is also borrowed as mutable (via `u.a`) @@ -79,7 +79,7 @@ error[E0502]: cannot borrow `u` (via `u.b`) as immutable because `u` is also bor | LL | let rma = &mut u.a; | --- mutable borrow occurs here (via `u.a`) -LL | let rb = &u.b; //~ ERROR cannot borrow `u` (via `u.b`) as immutable because `u` is also borrowed as mutable (via `u.a`) +LL | let rb = &u.b; | ^^^ immutable borrow of `u.b` -- which overlaps with `u.a` -- occurs here LL | drop(rma); LL | } @@ -90,7 +90,7 @@ error[E0503]: cannot use `u.b` because it was mutably borrowed | LL | let ra = &mut u.a; | --- borrow of `u.a` occurs here -LL | let b = u.b; //~ ERROR cannot use `u.b` because it was mutably borrowed +LL | let b = u.b; | ^ use of borrowed `u.a` error[E0499]: cannot borrow `u` (via `u.b`) as mutable more than once at a time @@ -98,7 +98,7 @@ error[E0499]: cannot borrow `u` (via `u.b`) as mutable more than once at a time | LL | let rma = &mut u.a; | --- first mutable borrow occurs here (via `u.a`) -LL | let rmb2 = &mut u.b; //~ ERROR cannot borrow `u` (via `u.b`) as mutable more than once at a time +LL | let rmb2 = &mut u.b; | ^^^ second mutable borrow occurs here (via `u.b`) LL | drop(rma); LL | } @@ -109,7 +109,7 @@ error[E0506]: cannot assign to `u.b` because it is borrowed | LL | let rma = &mut u.a; | --- borrow of `u.b` occurs here -LL | u.b = 1; //~ ERROR cannot assign to `u.b` because it is borrowed +LL | u.b = 1; | ^^^^^^^ assignment to borrowed `u.b` occurs here error: aborting due to 12 previous errors diff --git a/src/test/ui/borrowck/borrowck-union-move-assign.stderr b/src/test/ui/borrowck/borrowck-union-move-assign.stderr index f304dc3a124..04e67fcb929 100644 --- a/src/test/ui/borrowck/borrowck-union-move-assign.stderr +++ b/src/test/ui/borrowck/borrowck-union-move-assign.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `u.a` | LL | let a = u.a; | - value moved here -LL | let a = u.a; //~ ERROR use of moved value: `u.a` +LL | let a = u.a; | ^ value used here after move | = note: move occurs because `u.a` has type `A`, which does not implement the `Copy` trait diff --git a/src/test/ui/borrowck/borrowck-union-move.stderr b/src/test/ui/borrowck/borrowck-union-move.stderr index ebd8bdc69c0..4ce372aedc3 100644 --- a/src/test/ui/borrowck/borrowck-union-move.stderr +++ b/src/test/ui/borrowck/borrowck-union-move.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `u.n1` | LL | let a = u.n1; | - value moved here -LL | let a = u.n1; //~ ERROR use of moved value: `u.n1` +LL | let a = u.n1; | ^ value used here after move | = note: move occurs because `u.n1` has type `NonCopy`, which does not implement the `Copy` trait @@ -13,7 +13,7 @@ error[E0382]: use of partially moved value: `u` | LL | let a = u.n1; | - value moved here -LL | let a = u; //~ ERROR use of partially moved value: `u` +LL | let a = u; | ^ value used here after move | = note: move occurs because `u.n2` has type `[type error]`, which does not implement the `Copy` trait @@ -23,7 +23,7 @@ error[E0382]: use of moved value: `u.n2` | LL | let a = u.n1; | - value moved here -LL | let a = u.n2; //~ ERROR use of moved value: `u.n2` +LL | let a = u.n2; | ^ value used here after move | = note: move occurs because `u.n2` has type `[type error]`, which does not implement the `Copy` trait @@ -33,7 +33,7 @@ error[E0382]: use of moved value: `u.n` | LL | let a = u.n; | - value moved here -LL | let a = u.n; //~ ERROR use of moved value: `u.n` +LL | let a = u.n; | ^ value used here after move | = note: move occurs because `u.n` has type `NonCopy`, which does not implement the `Copy` trait @@ -43,7 +43,7 @@ error[E0382]: use of moved value: `u.c` | LL | let a = u.n; | - value moved here -LL | let a = u.c; //~ ERROR use of moved value: `u.c` +LL | let a = u.c; | ^ value used here after move | = note: move occurs because `u.c` has type `[type error]`, which does not implement the `Copy` trait @@ -53,7 +53,7 @@ error[E0382]: use of partially moved value: `u` | LL | let a = u.n; | - value moved here -LL | let a = u; //~ ERROR use of partially moved value: `u` +LL | let a = u; | ^ value used here after move | = note: move occurs because `u.c` has type `[type error]`, which does not implement the `Copy` trait diff --git a/src/test/ui/borrowck/borrowck-union-uninitialized.stderr b/src/test/ui/borrowck/borrowck-union-uninitialized.stderr index c8b22dd1c9e..6a1401ff32b 100644 --- a/src/test/ui/borrowck/borrowck-union-uninitialized.stderr +++ b/src/test/ui/borrowck/borrowck-union-uninitialized.stderr @@ -1,13 +1,13 @@ error[E0381]: use of possibly uninitialized variable: `s.a` --> $DIR/borrowck-union-uninitialized.rs:15:13 | -LL | let sa = s.a; //~ ERROR use of possibly uninitialized variable: `s.a` +LL | let sa = s.a; | ^^ use of possibly uninitialized `s.a` error[E0381]: use of possibly uninitialized variable: `u.a` --> $DIR/borrowck-union-uninitialized.rs:16:13 | -LL | let ua = u.a; //~ ERROR use of possibly uninitialized variable: `u.a` +LL | let ua = u.a; | ^^ use of possibly uninitialized `u.a` error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/borrowck-uniq-via-lend.stderr b/src/test/ui/borrowck/borrowck-uniq-via-lend.stderr index 14a9551acc6..00fd77ed718 100644 --- a/src/test/ui/borrowck/borrowck-uniq-via-lend.stderr +++ b/src/test/ui/borrowck/borrowck-uniq-via-lend.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `*v` as immutable because `v` is also borrowed as mu | LL | let w = &mut v; | - mutable borrow occurs here -LL | borrow(&*v); //~ ERROR cannot borrow `*v` +LL | borrow(&*v); | ^^ immutable borrow occurs here LL | w.use_mut(); LL | } @@ -14,7 +14,7 @@ error[E0502]: cannot borrow `*v` as immutable because `v` is also borrowed as mu | LL | x = &mut v; | - mutable borrow occurs here -LL | borrow(&*v); //~ ERROR cannot borrow `*v` +LL | borrow(&*v); | ^^ immutable borrow occurs here LL | x.use_mut(); LL | } diff --git a/src/test/ui/borrowck/borrowck-use-mut-borrow.stderr b/src/test/ui/borrowck/borrowck-use-mut-borrow.stderr index b6b09f008a4..5c1d7269176 100644 --- a/src/test/ui/borrowck/borrowck-use-mut-borrow.stderr +++ b/src/test/ui/borrowck/borrowck-use-mut-borrow.stderr @@ -3,7 +3,7 @@ error[E0503]: cannot use `x` because it was mutably borrowed | LL | let p = &mut x; | - borrow of `x` occurs here -LL | drop(x); //~ ERROR cannot use `x` because it was mutably borrowed +LL | drop(x); | ^ use of borrowed `x` error[E0503]: cannot use `x` because it was mutably borrowed @@ -11,7 +11,7 @@ error[E0503]: cannot use `x` because it was mutably borrowed | LL | let p = &mut x.a; | --- borrow of `x.a` occurs here -LL | drop(x); //~ ERROR cannot use `x` because it was mutably borrowed +LL | drop(x); | ^ use of borrowed `x.a` error[E0503]: cannot use `x.a` because it was mutably borrowed @@ -19,7 +19,7 @@ error[E0503]: cannot use `x.a` because it was mutably borrowed | LL | let p = &mut x; | - borrow of `x` occurs here -LL | drop(x.a); //~ ERROR cannot use `x.a` because it was mutably borrowed +LL | drop(x.a); | ^^^ use of borrowed `x` error[E0503]: cannot use `x.a` because it was mutably borrowed @@ -27,7 +27,7 @@ error[E0503]: cannot use `x.a` because it was mutably borrowed | LL | let p = &mut x.a; | --- borrow of `x.a` occurs here -LL | drop(x.a); //~ ERROR cannot use `x.a` because it was mutably borrowed +LL | drop(x.a); | ^^^ use of borrowed `x.a` error[E0503]: cannot use `x.a` because it was mutably borrowed @@ -35,7 +35,7 @@ error[E0503]: cannot use `x.a` because it was mutably borrowed | LL | let p = &mut x; | - borrow of `x` occurs here -LL | let y = A { b: 3, .. x }; //~ ERROR cannot use `x.a` because it was mutably borrowed +LL | let y = A { b: 3, .. x }; | ^ use of borrowed `x` error[E0503]: cannot use `x.a` because it was mutably borrowed @@ -43,7 +43,7 @@ error[E0503]: cannot use `x.a` because it was mutably borrowed | LL | let p = &mut x.a; | --- borrow of `x.a` occurs here -LL | let y = A { b: 3, .. x }; //~ ERROR cannot use `x.a` because it was mutably borrowed +LL | let y = A { b: 3, .. x }; | ^ use of borrowed `x.a` error[E0503]: cannot use `*x` because it was mutably borrowed @@ -51,7 +51,7 @@ error[E0503]: cannot use `*x` because it was mutably borrowed | LL | let p = &mut x; | - borrow of `x` occurs here -LL | drop(*x); //~ ERROR cannot use `*x` because it was mutably borrowed +LL | drop(*x); | ^^ use of borrowed `x` error[E0503]: cannot use `*x.b` because it was mutably borrowed @@ -59,7 +59,7 @@ error[E0503]: cannot use `*x.b` because it was mutably borrowed | LL | let p = &mut x; | - borrow of `x` occurs here -LL | drop(*x.b); //~ ERROR cannot use `*x.b` because it was mutably borrowed +LL | drop(*x.b); | ^^^^ use of borrowed `x` error[E0503]: cannot use `*x.b` because it was mutably borrowed @@ -67,7 +67,7 @@ error[E0503]: cannot use `*x.b` because it was mutably borrowed | LL | let p = &mut x.b; | --- borrow of `x.b` occurs here -LL | drop(*x.b); //~ ERROR cannot use `*x.b` because it was mutably borrowed +LL | drop(*x.b); | ^^^^ use of borrowed `x.b` error: aborting due to 9 previous errors diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-element-loan.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-element-loan.stderr index b2fcb2f8cd1..b0eaee79074 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-element-loan.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-element-loan.stderr @@ -1,7 +1,7 @@ error[E0597]: `vec` does not live long enough --> $DIR/borrowck-vec-pattern-element-loan.rs:5:26 | -LL | let vec: &[isize] = &vec; //~ ERROR does not live long enough +LL | let vec: &[isize] = &vec; | ^^^ borrowed value does not live long enough ... LL | } @@ -16,7 +16,7 @@ LL | fn a<'a>() -> &'a [isize] { error[E0597]: `vec` does not live long enough --> $DIR/borrowck-vec-pattern-element-loan.rs:15:26 | -LL | let vec: &[isize] = &vec; //~ ERROR does not live long enough +LL | let vec: &[isize] = &vec; | ^^^ borrowed value does not live long enough ... LL | } @@ -31,7 +31,7 @@ LL | fn b<'a>() -> &'a [isize] { error[E0597]: `vec` does not live long enough --> $DIR/borrowck-vec-pattern-element-loan.rs:25:26 | -LL | let vec: &[isize] = &vec; //~ ERROR does not live long enough +LL | let vec: &[isize] = &vec; | ^^^ borrowed value does not live long enough ... LL | } diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-loan-from-mut.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-loan-from-mut.stderr index caadcb36115..1ce6a3bddce 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-loan-from-mut.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-loan-from-mut.stderr @@ -4,7 +4,7 @@ error[E0499]: cannot borrow `v` as mutable more than once at a time LL | let vb: &mut [isize] = &mut v; | - first mutable borrow occurs here ... -LL | v.push(tail[0] + tail[1]); //~ ERROR cannot borrow +LL | v.push(tail[0] + tail[1]); | ^ second mutable borrow occurs here ... LL | } diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr index 25825fea158..0e3f514c662 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr @@ -3,8 +3,8 @@ error[E0506]: cannot assign to `vec[..]` because it is borrowed | LL | [box ref _a, _, _] => { | ------ borrow of `vec[..]` occurs here -LL | //~^ borrow of `vec[..]` occurs here -LL | vec[0] = box 4; //~ ERROR cannot assign +LL | +LL | vec[0] = box 4; | ^^^^^^^^^^^^^^ assignment to borrowed `vec[..]` occurs here error[E0506]: cannot assign to `vec[..]` because it is borrowed @@ -12,19 +12,19 @@ error[E0506]: cannot assign to `vec[..]` because it is borrowed | LL | &mut [ref _b..] => { | ------ borrow of `vec[..]` occurs here -LL | //~^ borrow of `vec[..]` occurs here -LL | vec[0] = box 4; //~ ERROR cannot assign +LL | +LL | vec[0] = box 4; | ^^^^^^^^^^^^^^ assignment to borrowed `vec[..]` occurs here error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:34:14 | -LL | &mut [_a, //~ ERROR cannot move out +LL | &mut [_a, | ^-- hint: to prevent move, use `ref _a` or `ref mut _a` | ______________| | | -LL | | //~| cannot move out -LL | | //~| to prevent move +LL | | +LL | | LL | | .. LL | | ] => { | |_________^ cannot move out of here @@ -32,7 +32,7 @@ LL | | ] => { error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:47:13 | -LL | let a = vec[0]; //~ ERROR cannot move out +LL | let a = vec[0]; | ^^^^^^ | | | cannot move out of here @@ -41,9 +41,9 @@ LL | let a = vec[0]; //~ ERROR cannot move out error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:55:14 | -LL | &mut [ //~ ERROR cannot move out +LL | &mut [ | ______________^ -LL | | //~^ cannot move out +LL | | LL | | _b] => {} | |__________--^ cannot move out of here | | @@ -52,7 +52,7 @@ LL | | _b] => {} error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:60:13 | -LL | let a = vec[0]; //~ ERROR cannot move out +LL | let a = vec[0]; | ^^^^^^ | | | cannot move out of here @@ -61,7 +61,7 @@ LL | let a = vec[0]; //~ ERROR cannot move out error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:68:14 | -LL | &mut [_a, _b, _c] => {} //~ ERROR cannot move out +LL | &mut [_a, _b, _c] => {} | ^--^^--^^--^ | || | | | || | ...and here (use `ref _c` or `ref mut _c`) @@ -72,7 +72,7 @@ LL | &mut [_a, _b, _c] => {} //~ ERROR cannot move out error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:72:13 | -LL | let a = vec[0]; //~ ERROR cannot move out +LL | let a = vec[0]; | ^^^^^^ | | | cannot move out of here diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.stderr index a4584aac0e8..0a5f773159f 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.stderr @@ -1,7 +1,7 @@ error[E0597]: `vec` does not live long enough --> $DIR/borrowck-vec-pattern-tail-element-loan.rs:5:26 | -LL | let vec: &[isize] = &vec; //~ ERROR `vec` does not live long enough +LL | let vec: &[isize] = &vec; | ^^^ borrowed value does not live long enough ... LL | } diff --git a/src/test/ui/borrowck/borrowck-while-break.stderr b/src/test/ui/borrowck/borrowck-while-break.stderr index f35d43162b2..55969b8fb1f 100644 --- a/src/test/ui/borrowck/borrowck-while-break.stderr +++ b/src/test/ui/borrowck/borrowck-while-break.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `v` --> $DIR/borrowck-while-break.rs:7:20 | -LL | println!("{}", v); //~ ERROR use of possibly uninitialized variable: `v` +LL | println!("{}", v); | ^ use of possibly uninitialized `v` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-while-cond.stderr b/src/test/ui/borrowck/borrowck-while-cond.stderr index 2b5414b42cd..06deae345ab 100644 --- a/src/test/ui/borrowck/borrowck-while-cond.stderr +++ b/src/test/ui/borrowck/borrowck-while-cond.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/borrowck-while-cond.rs:3:11 | -LL | while x { } //~ ERROR use of possibly uninitialized variable: `x` +LL | while x { } | ^ use of possibly uninitialized `x` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-while.stderr b/src/test/ui/borrowck/borrowck-while.stderr index e8aff0d22c2..60622d648dd 100644 --- a/src/test/ui/borrowck/borrowck-while.stderr +++ b/src/test/ui/borrowck/borrowck-while.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/borrowck-while.rs:4:12 | -LL | return x; //~ ERROR use of possibly uninitialized variable: `x` +LL | return x; | ^ use of possibly uninitialized `x` error: aborting due to previous error diff --git a/src/test/ui/borrowck/index-mut-help-with-impl.stderr b/src/test/ui/borrowck/index-mut-help-with-impl.stderr index 260ef7c92d0..6e6efc67061 100644 --- a/src/test/ui/borrowck/index-mut-help-with-impl.stderr +++ b/src/test/ui/borrowck/index-mut-help-with-impl.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable borrowed content as mutable --> $DIR/index-mut-help-with-impl.rs:9:5 | -LL | Index::index(&v, 1..2).make_ascii_uppercase(); //~ ERROR +LL | Index::index(&v, 1..2).make_ascii_uppercase(); | ^^^^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/borrowck/index-mut-help.stderr b/src/test/ui/borrowck/index-mut-help.stderr index 985fa9f0361..434dd11eea2 100644 --- a/src/test/ui/borrowck/index-mut-help.stderr +++ b/src/test/ui/borrowck/index-mut-help.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable indexed content as mutable --> $DIR/index-mut-help.rs:11:5 | -LL | map["peter"].clear(); //~ ERROR +LL | map["peter"].clear(); | ^^^^^^^^^^^^ cannot borrow as mutable | = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `std::collections::HashMap<&str, std::string::String>` @@ -9,7 +9,7 @@ LL | map["peter"].clear(); //~ ERROR error[E0594]: cannot assign to immutable indexed content --> $DIR/index-mut-help.rs:12:5 | -LL | map["peter"] = "0".to_string(); //~ ERROR +LL | map["peter"] = "0".to_string(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable | = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `std::collections::HashMap<&str, std::string::String>` @@ -17,7 +17,7 @@ LL | map["peter"] = "0".to_string(); //~ ERROR error[E0596]: cannot borrow immutable indexed content as mutable --> $DIR/index-mut-help.rs:13:18 | -LL | let _ = &mut map["peter"]; //~ ERROR +LL | let _ = &mut map["peter"]; | ^^^^^^^^^^^^ cannot borrow as mutable | = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `std::collections::HashMap<&str, std::string::String>` diff --git a/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.stderr b/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.stderr index 219a1fd2e77..b09028e6c7c 100644 --- a/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.stderr +++ b/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of thread-local static item --> $DIR/issue-47215-ice-from-drop-elab.rs:17:21 | -LL | let mut x = X; //~ ERROR cannot move out of thread-local static item [E0507] +LL | let mut x = X; | ^ | | | cannot move out of thread-local static item diff --git a/src/test/ui/borrowck/issue-51117.stderr b/src/test/ui/borrowck/issue-51117.stderr index 783ba8df1a6..8f2a78672c6 100644 --- a/src/test/ui/borrowck/issue-51117.stderr +++ b/src/test/ui/borrowck/issue-51117.stderr @@ -3,7 +3,7 @@ error[E0499]: cannot borrow `*bar` as mutable more than once at a time | LL | Some(baz) => { | --- first mutable borrow occurs here -LL | bar.take(); //~ ERROR cannot borrow +LL | bar.take(); | ^^^ second mutable borrow occurs here ... LL | } diff --git a/src/test/ui/borrowck/issue-52713-bug.stderr b/src/test/ui/borrowck/issue-52713-bug.stderr index 4e6d0d45bf0..e3216f5d33f 100644 --- a/src/test/ui/borrowck/issue-52713-bug.stderr +++ b/src/test/ui/borrowck/issue-52713-bug.stderr @@ -4,7 +4,7 @@ error[E0506]: cannot assign to `x` because it is borrowed LL | let y = &x; | -- borrow of `x` occurs here ... -LL | x += 1; //~ ERROR +LL | x += 1; | ^^^^^^ assignment to borrowed `x` occurs here LL | println!("{}", y); | - borrow later used here diff --git a/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr b/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr index d1d7d13088b..6a12016b2a5 100644 --- a/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr +++ b/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of borrowed content --> $DIR/issue-54597-reject-move-out-of-borrow-via-pat.rs:16:13 | -LL | *array //~ ERROR cannot move out of borrowed content +LL | *array | ^^^^^^ | | | cannot move out of borrowed content diff --git a/src/test/ui/borrowck/issue-7573.stderr b/src/test/ui/borrowck/issue-7573.stderr index fed79ef4f55..32b3ef72d8b 100644 --- a/src/test/ui/borrowck/issue-7573.stderr +++ b/src/test/ui/borrowck/issue-7573.stderr @@ -3,7 +3,7 @@ error: borrowed data cannot be stored outside of its closure | LL | let mut lines_to_use: Vec<&CrateId> = Vec::new(); | - cannot infer an appropriate lifetime... -LL | //~^ NOTE cannot infer an appropriate lifetime +LL | LL | let push_id = |installed_id: &CrateId| { | ------- ------------------------ borrowed data cannot outlive this closure | | diff --git a/src/test/ui/borrowck/mut-borrow-in-loop.stderr b/src/test/ui/borrowck/mut-borrow-in-loop.stderr index 749e0e172f7..478d586d03e 100644 --- a/src/test/ui/borrowck/mut-borrow-in-loop.stderr +++ b/src/test/ui/borrowck/mut-borrow-in-loop.stderr @@ -1,7 +1,7 @@ error[E0499]: cannot borrow `*arg` as mutable more than once at a time --> $DIR/mut-borrow-in-loop.rs:10:25 | -LL | (self.func)(arg) //~ ERROR cannot borrow +LL | (self.func)(arg) | ^^^ mutable borrow starts here in previous iteration of loop LL | } LL | } @@ -10,7 +10,7 @@ LL | } error[E0499]: cannot borrow `*arg` as mutable more than once at a time --> $DIR/mut-borrow-in-loop.rs:16:25 | -LL | (self.func)(arg) //~ ERROR cannot borrow +LL | (self.func)(arg) | ^^^ mutable borrow starts here in previous iteration of loop LL | } LL | } @@ -19,7 +19,7 @@ LL | } error[E0499]: cannot borrow `*arg` as mutable more than once at a time --> $DIR/mut-borrow-in-loop.rs:23:25 | -LL | (self.func)(arg) //~ ERROR cannot borrow +LL | (self.func)(arg) | ^^^ mutable borrow starts here in previous iteration of loop LL | } LL | } diff --git a/src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr b/src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr index 5278056ac0f..4653c353cad 100644 --- a/src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr +++ b/src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr @@ -1,11 +1,11 @@ error[E0596]: cannot borrow immutable argument `b` as mutable --> $DIR/mut-borrow-of-mut-ref.rs:8:12 | -LL | g(&mut b) //~ ERROR cannot borrow +LL | g(&mut b) | ^ cannot borrow mutably help: consider removing the `&mut`, as it is an immutable binding to a mutable reference | -LL | g(b) //~ ERROR cannot borrow +LL | g(b) | ^ error: aborting due to previous error diff --git a/src/test/ui/borrowck/mut-borrow-outside-loop.stderr b/src/test/ui/borrowck/mut-borrow-outside-loop.stderr index 1b32d8589b5..45db962fbd0 100644 --- a/src/test/ui/borrowck/mut-borrow-outside-loop.stderr +++ b/src/test/ui/borrowck/mut-borrow-outside-loop.stderr @@ -3,7 +3,7 @@ error[E0499]: cannot borrow `void` as mutable more than once at a time | LL | let first = &mut void; | ---- first mutable borrow occurs here -LL | let second = &mut void; //~ ERROR cannot borrow +LL | let second = &mut void; | ^^^^ second mutable borrow occurs here ... LL | } @@ -14,7 +14,7 @@ error[E0499]: cannot borrow `inner_void` as mutable more than once at a time | LL | let inner_first = &mut inner_void; | ---------- first mutable borrow occurs here -LL | let inner_second = &mut inner_void; //~ ERROR cannot borrow +LL | let inner_second = &mut inner_void; | ^^^^^^^^^^ second mutable borrow occurs here ... LL | } diff --git a/src/test/ui/borrowck/mutability-errors.stderr b/src/test/ui/borrowck/mutability-errors.stderr index b7fd6ee7214..cf4f37edde0 100644 --- a/src/test/ui/borrowck/mutability-errors.stderr +++ b/src/test/ui/borrowck/mutability-errors.stderr @@ -3,7 +3,7 @@ error[E0594]: cannot assign to immutable borrowed content `*x` | LL | fn named_ref(x: &(i32,)) { | ------- use `&mut (i32,)` here to make mutable -LL | *x = (1,); //~ ERROR +LL | *x = (1,); | ^^^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to field `x.0` of immutable binding @@ -11,8 +11,8 @@ error[E0594]: cannot assign to field `x.0` of immutable binding | LL | fn named_ref(x: &(i32,)) { | ------- use `&mut (i32,)` here to make mutable -LL | *x = (1,); //~ ERROR -LL | x.0 = 1; //~ ERROR +LL | *x = (1,); +LL | x.0 = 1; | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow immutable borrowed content `*x` as mutable @@ -21,7 +21,7 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable LL | fn named_ref(x: &(i32,)) { | ------- use `&mut (i32,)` here to make mutable ... -LL | &mut *x; //~ ERROR +LL | &mut *x; | ^^ cannot borrow as mutable error[E0596]: cannot borrow field `x.0` of immutable binding as mutable @@ -30,85 +30,85 @@ error[E0596]: cannot borrow field `x.0` of immutable binding as mutable LL | fn named_ref(x: &(i32,)) { | ------- use `&mut (i32,)` here to make mutable ... -LL | &mut x.0; //~ ERROR +LL | &mut x.0; | ^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to immutable borrowed content --> $DIR/mutability-errors.rs:16:5 | -LL | *f() = (1,); //~ ERROR +LL | *f() = (1,); | ^^^^^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to field of immutable binding --> $DIR/mutability-errors.rs:17:5 | -LL | f().0 = 1; //~ ERROR +LL | f().0 = 1; | ^^^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow immutable borrowed content as mutable --> $DIR/mutability-errors.rs:18:10 | -LL | &mut *f(); //~ ERROR +LL | &mut *f(); | ^^^^ cannot borrow as mutable error[E0596]: cannot borrow field of immutable binding as mutable --> $DIR/mutability-errors.rs:19:10 | -LL | &mut f().0; //~ ERROR +LL | &mut f().0; | ^^^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to immutable dereference of raw pointer `*x` --> $DIR/mutability-errors.rs:23:5 | -LL | *x = (1,); //~ ERROR +LL | *x = (1,); | ^^^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to field `x.0` of immutable binding --> $DIR/mutability-errors.rs:24:5 | -LL | (*x).0 = 1; //~ ERROR +LL | (*x).0 = 1; | ^^^^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow immutable dereference of raw pointer `*x` as mutable --> $DIR/mutability-errors.rs:25:10 | -LL | &mut *x; //~ ERROR +LL | &mut *x; | ^^ cannot borrow as mutable error[E0596]: cannot borrow field `x.0` of immutable binding as mutable --> $DIR/mutability-errors.rs:26:10 | -LL | &mut (*x).0; //~ ERROR +LL | &mut (*x).0; | ^^^^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to immutable dereference of raw pointer --> $DIR/mutability-errors.rs:30:5 | -LL | *f() = (1,); //~ ERROR +LL | *f() = (1,); | ^^^^^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to field of immutable binding --> $DIR/mutability-errors.rs:31:5 | -LL | (*f()).0 = 1; //~ ERROR +LL | (*f()).0 = 1; | ^^^^^^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow immutable dereference of raw pointer as mutable --> $DIR/mutability-errors.rs:32:10 | -LL | &mut *f(); //~ ERROR +LL | &mut *f(); | ^^^^ cannot borrow as mutable error[E0596]: cannot borrow field of immutable binding as mutable --> $DIR/mutability-errors.rs:33:10 | -LL | &mut (*f()).0; //~ ERROR +LL | &mut (*f()).0; | ^^^^^^^^ cannot mutably borrow field of immutable binding error[E0387]: cannot assign to data in a captured outer variable in an `Fn` closure --> $DIR/mutability-errors.rs:40:9 | -LL | x = (1,); //~ ERROR +LL | x = (1,); | ^^^^^^^^ | help: consider changing this closure to take self by mutable reference @@ -116,17 +116,17 @@ help: consider changing this closure to take self by mutable reference | LL | fn_ref(|| { | ____________^ -LL | | x = (1,); //~ ERROR -LL | | x.0 = 1; //~ ERROR -LL | | &mut x; //~ ERROR -LL | | &mut x.0; //~ ERROR +LL | | x = (1,); +LL | | x.0 = 1; +LL | | &mut x; +LL | | &mut x.0; LL | | }); | |_____^ error[E0387]: cannot assign to data in a captured outer variable in an `Fn` closure --> $DIR/mutability-errors.rs:41:9 | -LL | x.0 = 1; //~ ERROR +LL | x.0 = 1; | ^^^^^^^ | help: consider changing this closure to take self by mutable reference @@ -134,17 +134,17 @@ help: consider changing this closure to take self by mutable reference | LL | fn_ref(|| { | ____________^ -LL | | x = (1,); //~ ERROR -LL | | x.0 = 1; //~ ERROR -LL | | &mut x; //~ ERROR -LL | | &mut x.0; //~ ERROR +LL | | x = (1,); +LL | | x.0 = 1; +LL | | &mut x; +LL | | &mut x.0; LL | | }); | |_____^ error[E0387]: cannot borrow data mutably in a captured outer variable in an `Fn` closure --> $DIR/mutability-errors.rs:42:14 | -LL | &mut x; //~ ERROR +LL | &mut x; | ^ | help: consider changing this closure to take self by mutable reference @@ -152,17 +152,17 @@ help: consider changing this closure to take self by mutable reference | LL | fn_ref(|| { | ____________^ -LL | | x = (1,); //~ ERROR -LL | | x.0 = 1; //~ ERROR -LL | | &mut x; //~ ERROR -LL | | &mut x.0; //~ ERROR +LL | | x = (1,); +LL | | x.0 = 1; +LL | | &mut x; +LL | | &mut x.0; LL | | }); | |_____^ error[E0387]: cannot borrow data mutably in a captured outer variable in an `Fn` closure --> $DIR/mutability-errors.rs:43:14 | -LL | &mut x.0; //~ ERROR +LL | &mut x.0; | ^^^ | help: consider changing this closure to take self by mutable reference @@ -170,17 +170,17 @@ help: consider changing this closure to take self by mutable reference | LL | fn_ref(|| { | ____________^ -LL | | x = (1,); //~ ERROR -LL | | x.0 = 1; //~ ERROR -LL | | &mut x; //~ ERROR -LL | | &mut x.0; //~ ERROR +LL | | x = (1,); +LL | | x.0 = 1; +LL | | &mut x; +LL | | &mut x.0; LL | | }); | |_____^ error[E0594]: cannot assign to captured outer variable in an `Fn` closure --> $DIR/mutability-errors.rs:46:9 | -LL | x = (1,); //~ ERROR +LL | x = (1,); | ^^^^^^^^ | = note: `Fn` closures cannot capture their enclosing environment for modifications @@ -189,23 +189,23 @@ help: consider changing this closure to take self by mutable reference | LL | fn_ref(move || { | ____________^ -LL | | x = (1,); //~ ERROR -LL | | x.0 = 1; //~ ERROR -LL | | &mut x; //~ ERROR -LL | | &mut x.0; //~ ERROR +LL | | x = (1,); +LL | | x.0 = 1; +LL | | &mut x; +LL | | &mut x.0; LL | | }); | |_____^ error[E0594]: cannot assign to field `x.0` of immutable binding --> $DIR/mutability-errors.rs:47:9 | -LL | x.0 = 1; //~ ERROR +LL | x.0 = 1; | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow captured outer variable in an `Fn` closure as mutable --> $DIR/mutability-errors.rs:48:14 | -LL | &mut x; //~ ERROR +LL | &mut x; | ^ | help: consider changing this closure to take self by mutable reference @@ -213,17 +213,17 @@ help: consider changing this closure to take self by mutable reference | LL | fn_ref(move || { | ____________^ -LL | | x = (1,); //~ ERROR -LL | | x.0 = 1; //~ ERROR -LL | | &mut x; //~ ERROR -LL | | &mut x.0; //~ ERROR +LL | | x = (1,); +LL | | x.0 = 1; +LL | | &mut x; +LL | | &mut x.0; LL | | }); | |_____^ error[E0596]: cannot borrow field `x.0` of immutable binding as mutable --> $DIR/mutability-errors.rs:49:14 | -LL | &mut x.0; //~ ERROR +LL | &mut x.0; | ^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow immutable argument `x` as mutable @@ -231,7 +231,7 @@ error[E0596]: cannot borrow immutable argument `x` as mutable | LL | fn imm_local(x: (i32,)) { | - help: make this binding mutable: `mut x` -LL | &mut x; //~ ERROR +LL | &mut x; | ^ cannot borrow mutably error[E0596]: cannot borrow field `x.0` of immutable binding as mutable @@ -239,8 +239,8 @@ error[E0596]: cannot borrow field `x.0` of immutable binding as mutable | LL | fn imm_local(x: (i32,)) { | - help: make this binding mutable: `mut x` -LL | &mut x; //~ ERROR -LL | &mut x.0; //~ ERROR +LL | &mut x; +LL | &mut x.0; | ^^^ cannot mutably borrow field of immutable binding error[E0595]: closure cannot assign to immutable argument `x` @@ -248,7 +248,7 @@ error[E0595]: closure cannot assign to immutable argument `x` | LL | fn imm_capture(x: (i32,)) { | - help: make this binding mutable: `mut x` -LL | || { //~ ERROR +LL | || { | ^^ cannot borrow mutably error[E0594]: cannot assign to captured outer variable in an `FnMut` closure @@ -257,49 +257,49 @@ error[E0594]: cannot assign to captured outer variable in an `FnMut` closure LL | fn imm_capture(x: (i32,)) { | - help: consider making `x` mutable: `mut x` ... -LL | x = (1,); //~ ERROR +LL | x = (1,); | ^^^^^^^^ error[E0594]: cannot assign to field `x.0` of immutable binding --> $DIR/mutability-errors.rs:67:9 | -LL | x.0 = 1; //~ ERROR +LL | x.0 = 1; | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow captured outer variable in an `FnMut` closure as mutable --> $DIR/mutability-errors.rs:68:14 | -LL | &mut x; //~ ERROR +LL | &mut x; | ^ error[E0596]: cannot borrow field `x.0` of immutable binding as mutable --> $DIR/mutability-errors.rs:69:14 | -LL | &mut x.0; //~ ERROR +LL | &mut x.0; | ^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to immutable static item --> $DIR/mutability-errors.rs:76:5 | -LL | X = (1,); //~ ERROR +LL | X = (1,); | ^^^^^^^^ error[E0594]: cannot assign to field of immutable binding --> $DIR/mutability-errors.rs:77:5 | -LL | X.0 = 1; //~ ERROR +LL | X.0 = 1; | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow immutable static item as mutable --> $DIR/mutability-errors.rs:78:10 | -LL | &mut X; //~ ERROR +LL | &mut X; | ^ error[E0596]: cannot borrow field of immutable binding as mutable --> $DIR/mutability-errors.rs:79:10 | -LL | &mut X.0; //~ ERROR +LL | &mut X.0; | ^^^ cannot mutably borrow field of immutable binding error: aborting due to 35 previous errors diff --git a/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.stderr b/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.stderr index 51e47fd44d9..ae68df72aa7 100644 --- a/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.stderr +++ b/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/promote-ref-mut-in-let-issue-46557.rs:5:9 | -LL | let ref mut x = 1234543; //~ ERROR +LL | let ref mut x = 1234543; | ^^^^^^^^^ temporary value does not live long enough LL | x LL | } @@ -12,7 +12,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/promote-ref-mut-in-let-issue-46557.rs:10:10 | -LL | let (ref mut x, ) = (1234543, ); //~ ERROR +LL | let (ref mut x, ) = (1234543, ); | ^^^^^^^^^ borrowed value does not live long enough LL | x LL | } @@ -23,7 +23,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/promote-ref-mut-in-let-issue-46557.rs:16:9 | -LL | ref mut x => x //~ ERROR +LL | ref mut x => x | ^^^^^^^^^ temporary value does not live long enough LL | } LL | } @@ -34,7 +34,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/promote-ref-mut-in-let-issue-46557.rs:22:10 | -LL | (ref mut x,) => x, //~ ERROR +LL | (ref mut x,) => x, | ^^^^^^^^^ borrowed value does not live long enough LL | } LL | } @@ -45,7 +45,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/promote-ref-mut-in-let-issue-46557.rs:27:10 | -LL | &mut 1234543 //~ ERROR +LL | &mut 1234543 | ^^^^^^^ temporary value does not live long enough LL | } | - temporary value only lives until here diff --git a/src/test/ui/borrowck/reassignment_immutable_fields.stderr b/src/test/ui/borrowck/reassignment_immutable_fields.stderr index c63f56702ab..74f0217ef8a 100644 --- a/src/test/ui/borrowck/reassignment_immutable_fields.stderr +++ b/src/test/ui/borrowck/reassignment_immutable_fields.stderr @@ -3,7 +3,7 @@ error[E0594]: cannot assign to field `x.0` of immutable binding | LL | let x: (u32, u32); | - help: make this binding mutable: `mut x` -LL | x.0 = 1; //~ ERROR +LL | x.0 = 1; | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to field `x.1` of immutable binding @@ -11,20 +11,20 @@ error[E0594]: cannot assign to field `x.1` of immutable binding | LL | let x: (u32, u32); | - help: make this binding mutable: `mut x` -LL | x.0 = 1; //~ ERROR -LL | x.1 = 22; //~ ERROR +LL | x.0 = 1; +LL | x.1 = 22; | ^^^^^^^^ cannot mutably borrow field of immutable binding error[E0381]: use of possibly uninitialized variable: `x.0` --> $DIR/reassignment_immutable_fields.rs:9:10 | -LL | drop(x.0); //~ ERROR +LL | drop(x.0); | ^^^ use of possibly uninitialized `x.0` error[E0381]: use of possibly uninitialized variable: `x.1` --> $DIR/reassignment_immutable_fields.rs:10:10 | -LL | drop(x.1); //~ ERROR +LL | drop(x.1); | ^^^ use of possibly uninitialized `x.1` error[E0594]: cannot assign to field `x.0` of immutable binding @@ -32,7 +32,7 @@ error[E0594]: cannot assign to field `x.0` of immutable binding | LL | let x: (u32, u32); | - help: make this binding mutable: `mut x` -LL | x.0 = 1; //~ ERROR +LL | x.0 = 1; | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to field `x.1` of immutable binding @@ -40,14 +40,14 @@ error[E0594]: cannot assign to field `x.1` of immutable binding | LL | let x: (u32, u32); | - help: make this binding mutable: `mut x` -LL | x.0 = 1; //~ ERROR -LL | x.1 = 22; //~ ERROR +LL | x.0 = 1; +LL | x.1 = 22; | ^^^^^^^^ cannot mutably borrow field of immutable binding error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/reassignment_immutable_fields.rs:17:10 | -LL | drop(x); //~ ERROR +LL | drop(x); | ^ use of possibly uninitialized `x` error: aborting due to 7 previous errors diff --git a/src/test/ui/borrowck/reassignment_immutable_fields_overlapping.stderr b/src/test/ui/borrowck/reassignment_immutable_fields_overlapping.stderr index e34024736c6..673c1572ca5 100644 --- a/src/test/ui/borrowck/reassignment_immutable_fields_overlapping.stderr +++ b/src/test/ui/borrowck/reassignment_immutable_fields_overlapping.stderr @@ -3,7 +3,7 @@ error[E0594]: cannot assign to field `x.a` of immutable binding | LL | let x: Foo; | - help: make this binding mutable: `mut x` -LL | x.a = 1; //~ ERROR +LL | x.a = 1; | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to field `x.b` of immutable binding @@ -11,8 +11,8 @@ error[E0594]: cannot assign to field `x.b` of immutable binding | LL | let x: Foo; | - help: make this binding mutable: `mut x` -LL | x.a = 1; //~ ERROR -LL | x.b = 22; //~ ERROR +LL | x.a = 1; +LL | x.b = 22; | ^^^^^^^^ cannot mutably borrow field of immutable binding error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/reassignment_immutable_fields_twice.stderr b/src/test/ui/borrowck/reassignment_immutable_fields_twice.stderr index 75d7f99ed0c..db1c74d94af 100644 --- a/src/test/ui/borrowck/reassignment_immutable_fields_twice.stderr +++ b/src/test/ui/borrowck/reassignment_immutable_fields_twice.stderr @@ -4,7 +4,7 @@ error[E0594]: cannot assign to field `x.0` of immutable binding LL | let x: (u32, u32); | - help: make this binding mutable: `mut x` LL | x = (22, 44); -LL | x.0 = 1; //~ ERROR +LL | x.0 = 1; | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to field `x.0` of immutable binding @@ -12,7 +12,7 @@ error[E0594]: cannot assign to field `x.0` of immutable binding | LL | let x: (u32, u32); | - help: make this binding mutable: `mut x` -LL | x.0 = 1; //~ ERROR +LL | x.0 = 1; | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to field `x.0` of immutable binding @@ -20,8 +20,8 @@ error[E0594]: cannot assign to field `x.0` of immutable binding | LL | let x: (u32, u32); | - help: make this binding mutable: `mut x` -LL | x.0 = 1; //~ ERROR -LL | x.0 = 22; //~ ERROR +LL | x.0 = 1; +LL | x.0 = 22; | ^^^^^^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to field `x.1` of immutable binding @@ -30,7 +30,7 @@ error[E0594]: cannot assign to field `x.1` of immutable binding LL | let x: (u32, u32); | - help: make this binding mutable: `mut x` ... -LL | x.1 = 44; //~ ERROR +LL | x.1 = 44; | ^^^^^^^^ cannot mutably borrow field of immutable binding error: aborting due to 4 previous errors diff --git a/src/test/ui/borrowck/two-phase-across-loop.stderr b/src/test/ui/borrowck/two-phase-across-loop.stderr index 10ff0ca604c..933d3eb7111 100644 --- a/src/test/ui/borrowck/two-phase-across-loop.stderr +++ b/src/test/ui/borrowck/two-phase-across-loop.stderr @@ -1,7 +1,7 @@ error[E0499]: cannot borrow `foo` as mutable more than once at a time --> $DIR/two-phase-across-loop.rs:19:22 | -LL | strings.push(foo.get_string()); //~ ERROR cannot borrow `foo` as mutable +LL | strings.push(foo.get_string()); | ^^^ mutable borrow starts here in previous iteration of loop error: aborting due to previous error diff --git a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.stderr b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.stderr index ad4636a4a91..bcd743f47c5 100644 --- a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.stderr +++ b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.stderr @@ -1,7 +1,7 @@ error: compilation successful --> $DIR/two-phase-reservation-sharing-interference-2.rs:17:1 | -LL | / fn main() { //~ ERROR compilation successful +LL | / fn main() { LL | | let mut v = vec![0, 1, 2]; LL | | let shared = &v; LL | | diff --git a/src/test/ui/bounds-lifetime.stderr b/src/test/ui/bounds-lifetime.stderr index d57cb40b2a8..21a78146267 100644 --- a/src/test/ui/bounds-lifetime.stderr +++ b/src/test/ui/bounds-lifetime.stderr @@ -1,31 +1,31 @@ error: lifetime bounds cannot be used in this context --> $DIR/bounds-lifetime.rs:1:22 | -LL | type A = for<'b, 'a: 'b> fn(); //~ ERROR lifetime bounds cannot be used in this context +LL | type A = for<'b, 'a: 'b> fn(); | ^^ error: lifetime bounds cannot be used in this context --> $DIR/bounds-lifetime.rs:2:22 | -LL | type B = for<'b, 'a: 'b,> fn(); //~ ERROR lifetime bounds cannot be used in this context +LL | type B = for<'b, 'a: 'b,> fn(); | ^^ error: lifetime bounds cannot be used in this context --> $DIR/bounds-lifetime.rs:3:22 | -LL | type C = for<'b, 'a: 'b +> fn(); //~ ERROR lifetime bounds cannot be used in this context +LL | type C = for<'b, 'a: 'b +> fn(); | ^^ error: only lifetime parameters can be used in this context --> $DIR/bounds-lifetime.rs:4:18 | -LL | type D = for<'a, T> fn(); //~ ERROR only lifetime parameters can be used in this context +LL | type D = for<'a, T> fn(); | ^ error: only lifetime parameters can be used in this context --> $DIR/bounds-lifetime.rs:5:14 | -LL | type E = for Fn(); //~ ERROR only lifetime parameters can be used in this context +LL | type E = for Fn(); | ^ error: aborting due to 5 previous errors diff --git a/src/test/ui/break-outside-loop.stderr b/src/test/ui/break-outside-loop.stderr index 5e008a06477..c1aa580f89e 100644 --- a/src/test/ui/break-outside-loop.stderr +++ b/src/test/ui/break-outside-loop.stderr @@ -1,31 +1,31 @@ error[E0268]: `break` outside of loop --> $DIR/break-outside-loop.rs:10:15 | -LL | let pth = break; //~ ERROR: `break` outside of loop +LL | let pth = break; | ^^^^^ cannot break outside of a loop error[E0268]: `continue` outside of loop --> $DIR/break-outside-loop.rs:11:17 | -LL | if cond() { continue } //~ ERROR: `continue` outside of loop +LL | if cond() { continue } | ^^^^^^^^ cannot break outside of a loop error[E0267]: `break` inside of a closure --> $DIR/break-outside-loop.rs:17:25 | -LL | if cond() { break } //~ ERROR: `break` inside of a closure +LL | if cond() { break } | ^^^^^ cannot break inside of a closure error[E0267]: `continue` inside of a closure --> $DIR/break-outside-loop.rs:18:25 | -LL | if cond() { continue } //~ ERROR: `continue` inside of a closure +LL | if cond() { continue } | ^^^^^^^^ cannot break inside of a closure error[E0268]: `break` outside of loop --> $DIR/break-outside-loop.rs:24:25 | -LL | let unconstrained = break; //~ ERROR: `break` outside of loop +LL | let unconstrained = break; | ^^^^^ cannot break outside of a loop error: aborting due to 5 previous errors diff --git a/src/test/ui/break-while-condition.stderr b/src/test/ui/break-while-condition.stderr index 3e81753a410..a08edee07ea 100644 --- a/src/test/ui/break-while-condition.stderr +++ b/src/test/ui/break-while-condition.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/break-while-condition.rs:9:20 | -LL | let _: ! = { //~ ERROR mismatched types +LL | let _: ! = { | ____________________^ LL | | 'a: while break 'a {}; LL | | }; @@ -13,7 +13,7 @@ LL | | }; error[E0308]: mismatched types --> $DIR/break-while-condition.rs:16:13 | -LL | / while false { //~ ERROR mismatched types +LL | / while false { LL | | break LL | | } | |_____________^ expected !, found () @@ -24,7 +24,7 @@ LL | | } error[E0308]: mismatched types --> $DIR/break-while-condition.rs:24:13 | -LL | / while false { //~ ERROR mismatched types +LL | / while false { LL | | return LL | | } | |_____________^ expected !, found () diff --git a/src/test/ui/by-move-pattern-binding.stderr b/src/test/ui/by-move-pattern-binding.stderr index d3c5e2caa42..5135e0dadaf 100644 --- a/src/test/ui/by-move-pattern-binding.stderr +++ b/src/test/ui/by-move-pattern-binding.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of borrowed content --> $DIR/by-move-pattern-binding.rs:16:9 | -LL | &E::Bar(identifier) => f(identifier.clone()) //~ ERROR cannot move +LL | &E::Bar(identifier) => f(identifier.clone()) | ^^^^^^^^----------^ | | | | | hint: to prevent move, use `ref identifier` or `ref mut identifier` diff --git a/src/test/ui/c-variadic/variadic-ffi-1.stderr b/src/test/ui/c-variadic/variadic-ffi-1.stderr index 61d55ce0d3e..1a2bb4419b5 100644 --- a/src/test/ui/c-variadic/variadic-ffi-1.stderr +++ b/src/test/ui/c-variadic/variadic-ffi-1.stderr @@ -1,7 +1,7 @@ error[E0045]: C-variadic function must have C or cdecl calling convention --> $DIR/variadic-ffi-1.rs:5:5 | -LL | fn printf(_: *const u8, ...); //~ ERROR: variadic function must have C or cdecl calling +LL | fn printf(_: *const u8, ...); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadics require C or cdecl calling convention error: aborting due to previous error diff --git a/src/test/ui/c-variadic/variadic-ffi-3.stderr b/src/test/ui/c-variadic/variadic-ffi-3.stderr index 82e3c6cd06f..6e19fc12621 100644 --- a/src/test/ui/c-variadic/variadic-ffi-3.stderr +++ b/src/test/ui/c-variadic/variadic-ffi-3.stderr @@ -4,7 +4,7 @@ error[E0060]: this function takes at least 2 parameters but 0 parameters were su LL | fn foo(f: isize, x: u8, ...); | ----------------------------- defined here ... -LL | foo(); //~ ERROR: this function takes at least 2 parameters but 0 parameters were supplied +LL | foo(); | ^^^^^ expected at least 2 parameters error[E0060]: this function takes at least 2 parameters but 1 parameter was supplied @@ -13,7 +13,7 @@ error[E0060]: this function takes at least 2 parameters but 1 parameter was supp LL | fn foo(f: isize, x: u8, ...); | ----------------------------- defined here ... -LL | foo(1); //~ ERROR: this function takes at least 2 parameters but 1 parameter was supplied +LL | foo(1); | ^^^^^^ expected at least 2 parameters error[E0308]: mismatched types @@ -37,37 +37,37 @@ LL | let y: extern "C" fn(f: isize, x: u8, ...) = bar; error[E0617]: can't pass `f32` to variadic function --> $DIR/variadic-ffi-3.rs:22:19 | -LL | foo(1, 2, 3f32); //~ ERROR can't pass `f32` to variadic function +LL | foo(1, 2, 3f32); | ^^^^ help: cast the value to `c_double`: `3f32 as c_double` error[E0617]: can't pass `bool` to variadic function --> $DIR/variadic-ffi-3.rs:23:19 | -LL | foo(1, 2, true); //~ ERROR can't pass `bool` to variadic function +LL | foo(1, 2, true); | ^^^^ help: cast the value to `c_int`: `true as c_int` error[E0617]: can't pass `i8` to variadic function --> $DIR/variadic-ffi-3.rs:24:19 | -LL | foo(1, 2, 1i8); //~ ERROR can't pass `i8` to variadic function +LL | foo(1, 2, 1i8); | ^^^ help: cast the value to `c_int`: `1i8 as c_int` error[E0617]: can't pass `u8` to variadic function --> $DIR/variadic-ffi-3.rs:25:19 | -LL | foo(1, 2, 1u8); //~ ERROR can't pass `u8` to variadic function +LL | foo(1, 2, 1u8); | ^^^ help: cast the value to `c_uint`: `1u8 as c_uint` error[E0617]: can't pass `i16` to variadic function --> $DIR/variadic-ffi-3.rs:26:19 | -LL | foo(1, 2, 1i16); //~ ERROR can't pass `i16` to variadic function +LL | foo(1, 2, 1i16); | ^^^^ help: cast the value to `c_int`: `1i16 as c_int` error[E0617]: can't pass `u16` to variadic function --> $DIR/variadic-ffi-3.rs:27:19 | -LL | foo(1, 2, 1u16); //~ ERROR can't pass `u16` to variadic function +LL | foo(1, 2, 1u16); | ^^^^ help: cast the value to `c_uint`: `1u16 as c_uint` error: aborting due to 10 previous errors diff --git a/src/test/ui/c-variadic/variadic-ffi-4.stderr b/src/test/ui/c-variadic/variadic-ffi-4.stderr index 1d752be065c..a3e3f81b73d 100644 --- a/src/test/ui/c-variadic/variadic-ffi-4.stderr +++ b/src/test/ui/c-variadic/variadic-ffi-4.stderr @@ -3,7 +3,7 @@ error[E0621]: explicit lifetime required in the type of `ap` | LL | pub unsafe extern "C" fn no_escape0<'a>(_: usize, ap: ...) -> VaList<'a> { | --- help: add explicit lifetime `'a` to the type of `ap`: `core::ffi::VaList<'a>` -LL | ap //~ ERROR: explicit lifetime required +LL | ap | ^^ lifetime `'a` required error[E0621]: explicit lifetime required in the type of `ap` @@ -11,19 +11,19 @@ error[E0621]: explicit lifetime required in the type of `ap` | LL | pub unsafe extern "C" fn no_escape1(_: usize, ap: ...) -> VaList<'static> { | --- help: add explicit lifetime `'static` to the type of `ap`: `core::ffi::VaList<'static>` -LL | ap //~ ERROR: explicit lifetime required +LL | ap | ^^ lifetime `'static` required error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements --> $DIR/variadic-ffi-4.rs:16:28 | -LL | let _ = ap.copy(|ap| { ap }); //~ ERROR: cannot infer an appropriate lifetime +LL | let _ = ap.copy(|ap| { ap }); | ^^ | note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 16:21... --> $DIR/variadic-ffi-4.rs:16:21 | -LL | let _ = ap.copy(|ap| { ap }); //~ ERROR: cannot infer an appropriate lifetime +LL | let _ = ap.copy(|ap| { ap }); | ^^^^^^^^^^^ = note: ...so that the expression is assignable: expected core::ffi::VaList<'_> @@ -31,18 +31,18 @@ LL | let _ = ap.copy(|ap| { ap }); //~ ERROR: cannot infer an appropriate li note: but, the lifetime must be valid for the method call at 16:13... --> $DIR/variadic-ffi-4.rs:16:13 | -LL | let _ = ap.copy(|ap| { ap }); //~ ERROR: cannot infer an appropriate lifetime +LL | let _ = ap.copy(|ap| { ap }); | ^^^^^^^^^^^^^^^^^^^^ note: ...so type `core::ffi::VaList<'_>` of expression is valid during the expression --> $DIR/variadic-ffi-4.rs:16:13 | -LL | let _ = ap.copy(|ap| { ap }); //~ ERROR: cannot infer an appropriate lifetime +LL | let _ = ap.copy(|ap| { ap }); | ^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/variadic-ffi-4.rs:20:12 | -LL | *ap0 = ap1; //~ ERROR: mismatched types +LL | *ap0 = ap1; | ^^^ lifetime mismatch | = note: expected type `core::ffi::VaList<'_>` @@ -51,14 +51,14 @@ note: the anonymous lifetime #3 defined on the function body at 19:1... --> $DIR/variadic-ffi-4.rs:19:1 | LL | / pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaList, mut ap1: ...) { -LL | | *ap0 = ap1; //~ ERROR: mismatched types +LL | | *ap0 = ap1; LL | | } | |_^ note: ...does not necessarily outlive the anonymous lifetime #2 defined on the function body at 19:1 --> $DIR/variadic-ffi-4.rs:19:1 | LL | / pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaList, mut ap1: ...) { -LL | | *ap0 = ap1; //~ ERROR: mismatched types +LL | | *ap0 = ap1; LL | | } | |_^ @@ -73,10 +73,10 @@ note: the type is valid for the anonymous lifetime #1 defined on the function bo | LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaList, mut ap1: ...) { LL | | ap0 = &mut ap1; -LL | | //~^ ERROR: a value of type `core::ffi::VaList<'_>` is borrowed for too long -LL | | //~^^ ERROR: mismatched types -LL | | //~^^^ ERROR: mismatched types -LL | | //~^^^^ ERROR: cannot infer an appropriate lifetime +LL | | +LL | | +LL | | +LL | | LL | | } | |_^ note: but the borrow lasts for the anonymous lifetime #3 defined on the function body at 23:1 @@ -84,10 +84,10 @@ note: but the borrow lasts for the anonymous lifetime #3 defined on the function | LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaList, mut ap1: ...) { LL | | ap0 = &mut ap1; -LL | | //~^ ERROR: a value of type `core::ffi::VaList<'_>` is borrowed for too long -LL | | //~^^ ERROR: mismatched types -LL | | //~^^^ ERROR: mismatched types -LL | | //~^^^^ ERROR: cannot infer an appropriate lifetime +LL | | +LL | | +LL | | +LL | | LL | | } | |_^ @@ -104,10 +104,10 @@ note: the anonymous lifetime #3 defined on the function body at 23:1... | LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaList, mut ap1: ...) { LL | | ap0 = &mut ap1; -LL | | //~^ ERROR: a value of type `core::ffi::VaList<'_>` is borrowed for too long -LL | | //~^^ ERROR: mismatched types -LL | | //~^^^ ERROR: mismatched types -LL | | //~^^^^ ERROR: cannot infer an appropriate lifetime +LL | | +LL | | +LL | | +LL | | LL | | } | |_^ note: ...does not necessarily outlive the anonymous lifetime #2 defined on the function body at 23:1 @@ -115,10 +115,10 @@ note: ...does not necessarily outlive the anonymous lifetime #2 defined on the f | LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaList, mut ap1: ...) { LL | | ap0 = &mut ap1; -LL | | //~^ ERROR: a value of type `core::ffi::VaList<'_>` is borrowed for too long -LL | | //~^^ ERROR: mismatched types -LL | | //~^^^ ERROR: mismatched types -LL | | //~^^^^ ERROR: cannot infer an appropriate lifetime +LL | | +LL | | +LL | | +LL | | LL | | } | |_^ @@ -135,10 +135,10 @@ note: the anonymous lifetime #2 defined on the function body at 23:1... | LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaList, mut ap1: ...) { LL | | ap0 = &mut ap1; -LL | | //~^ ERROR: a value of type `core::ffi::VaList<'_>` is borrowed for too long -LL | | //~^^ ERROR: mismatched types -LL | | //~^^^ ERROR: mismatched types -LL | | //~^^^^ ERROR: cannot infer an appropriate lifetime +LL | | +LL | | +LL | | +LL | | LL | | } | |_^ note: ...does not necessarily outlive the anonymous lifetime #3 defined on the function body at 23:1 @@ -146,10 +146,10 @@ note: ...does not necessarily outlive the anonymous lifetime #3 defined on the f | LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaList, mut ap1: ...) { LL | | ap0 = &mut ap1; -LL | | //~^ ERROR: a value of type `core::ffi::VaList<'_>` is borrowed for too long -LL | | //~^^ ERROR: mismatched types -LL | | //~^^^ ERROR: mismatched types -LL | | //~^^^^ ERROR: cannot infer an appropriate lifetime +LL | | +LL | | +LL | | +LL | | LL | | } | |_^ @@ -164,10 +164,10 @@ note: first, the lifetime cannot outlive the anonymous lifetime #3 defined on th | LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaList, mut ap1: ...) { LL | | ap0 = &mut ap1; -LL | | //~^ ERROR: a value of type `core::ffi::VaList<'_>` is borrowed for too long -LL | | //~^^ ERROR: mismatched types -LL | | //~^^^ ERROR: mismatched types -LL | | //~^^^^ ERROR: cannot infer an appropriate lifetime +LL | | +LL | | +LL | | +LL | | LL | | } | |_^ note: ...so that the type `core::ffi::VaList<'_>` is not borrowed for too long @@ -180,10 +180,10 @@ note: but, the lifetime must be valid for the anonymous lifetime #1 defined on t | LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaList, mut ap1: ...) { LL | | ap0 = &mut ap1; -LL | | //~^ ERROR: a value of type `core::ffi::VaList<'_>` is borrowed for too long -LL | | //~^^ ERROR: mismatched types -LL | | //~^^^ ERROR: mismatched types -LL | | //~^^^^ ERROR: cannot infer an appropriate lifetime +LL | | +LL | | +LL | | +LL | | LL | | } | |_^ note: ...so that reference does not outlive borrowed content diff --git a/src/test/ui/c-variadic/variadic-ffi-5.stderr b/src/test/ui/c-variadic/variadic-ffi-5.stderr index 2d452872baf..2ad1964b6fc 100644 --- a/src/test/ui/c-variadic/variadic-ffi-5.stderr +++ b/src/test/ui/c-variadic/variadic-ffi-5.stderr @@ -3,7 +3,7 @@ error[E0621]: explicit lifetime required in the type of `ap` | LL | pub unsafe extern "C" fn no_escape0<'a>(_: usize, ap: ...) -> VaList<'a> { | --- help: add explicit lifetime `'a` to the type of `ap`: `core::ffi::VaList<'a>` -LL | ap //~ ERROR: explicit lifetime required +LL | ap | ^^ lifetime `'a` required error[E0621]: explicit lifetime required in the type of `ap` @@ -11,13 +11,13 @@ error[E0621]: explicit lifetime required in the type of `ap` | LL | pub unsafe extern "C" fn no_escape1(_: usize, ap: ...) -> VaList<'static> { | --- help: add explicit lifetime `'static` to the type of `ap`: `core::ffi::VaList<'static>` -LL | ap //~ ERROR: explicit lifetime required +LL | ap | ^^ lifetime `'static` required error: lifetime may not live long enough --> $DIR/variadic-ffi-5.rs:19:28 | -LL | let _ = ap.copy(|ap| { ap }); //~ ERROR: lifetime may not live long enough +LL | let _ = ap.copy(|ap| { ap }); | --- ^^ returning this value requires that `'1` must outlive `'2` | | | | | return type of closure is core::ffi::VaList<'2> @@ -30,7 +30,7 @@ LL | pub unsafe extern "C" fn no_escape3(_: usize, ap0: &mut VaList, mut ap1: .. | --- ------- has type `core::ffi::VaList<'1>` | | | has type `&mut core::ffi::VaList<'2>` -LL | *ap0 = ap1; //~ ERROR: lifetime may not live long enough +LL | *ap0 = ap1; | ^^^^^^^^^^ assignment requires that `'1` must outlive `'2` error: lifetime may not live long enough diff --git a/src/test/ui/c-variadic/variadic-ffi-6.stderr b/src/test/ui/c-variadic/variadic-ffi-6.stderr index 76bd18959a5..882e7f89f2a 100644 --- a/src/test/ui/c-variadic/variadic-ffi-6.stderr +++ b/src/test/ui/c-variadic/variadic-ffi-6.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/variadic-ffi-6.rs:7:6 | -LL | ) -> &usize { //~ ERROR missing lifetime specifier +LL | ) -> &usize { | ^ help: consider giving it an explicit bounded or 'static lifetime: `&'static` | = help: this function's return type contains a borrowed value with an elided lifetime, but the lifetime cannot be derived from the arguments diff --git a/src/test/ui/call-fn-never-arg-wrong-type.stderr b/src/test/ui/call-fn-never-arg-wrong-type.stderr index 602963ee89c..7a50fd367d2 100644 --- a/src/test/ui/call-fn-never-arg-wrong-type.stderr +++ b/src/test/ui/call-fn-never-arg-wrong-type.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/call-fn-never-arg-wrong-type.rs:10:9 | -LL | foo("wow"); //~ ERROR mismatched types +LL | foo("wow"); | ^^^^^ expected !, found reference | = note: expected type `!` diff --git a/src/test/ui/can-begin-expr-check.stderr b/src/test/ui/can-begin-expr-check.stderr index f25b348816b..676c2cb661e 100644 --- a/src/test/ui/can-begin-expr-check.stderr +++ b/src/test/ui/can-begin-expr-check.stderr @@ -1,7 +1,7 @@ error: expected one of `.`, `;`, `?`, `}`, or an operator, found `enum` --> $DIR/can-begin-expr-check.rs:19:12 | -LL | return enum; //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `enum` +LL | return enum; | ^^^^ expected one of `.`, `;`, `?`, `}`, or an operator here error: aborting due to previous error diff --git a/src/test/ui/cast/cast-as-bool.stderr b/src/test/ui/cast/cast-as-bool.stderr index 6099a4195b3..30f8459c2e1 100644 --- a/src/test/ui/cast/cast-as-bool.stderr +++ b/src/test/ui/cast/cast-as-bool.stderr @@ -1,19 +1,19 @@ error[E0054]: cannot cast as `bool` --> $DIR/cast-as-bool.rs:2:13 | -LL | let u = 5 as bool; //~ ERROR cannot cast as `bool` +LL | let u = 5 as bool; | ^^^^^^^^^ help: compare with zero instead: `5 != 0` error[E0054]: cannot cast as `bool` --> $DIR/cast-as-bool.rs:5:13 | -LL | let t = (1 + 2) as bool; //~ ERROR cannot cast as `bool` +LL | let t = (1 + 2) as bool; | ^^^^^^^^^^^^^^^ help: compare with zero instead: `(1 + 2) != 0` error[E0054]: cannot cast as `bool` --> $DIR/cast-as-bool.rs:8:13 | -LL | let v = "hello" as bool; //~ ERROR cannot cast as `bool` +LL | let v = "hello" as bool; | ^^^^^^^^^^^^^^^ unsupported cast error: aborting due to 3 previous errors diff --git a/src/test/ui/cast/cast-errors-issue-43825.stderr b/src/test/ui/cast/cast-errors-issue-43825.stderr index cfd1ca25a96..1e77f5dbdc6 100644 --- a/src/test/ui/cast/cast-errors-issue-43825.stderr +++ b/src/test/ui/cast/cast-errors-issue-43825.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `error` in this scope --> $DIR/cast-errors-issue-43825.rs:2:17 | -LL | let error = error; //~ ERROR cannot find value `error` +LL | let error = error; | ^^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/cast/cast-ptr-to-int-const.stderr b/src/test/ui/cast/cast-ptr-to-int-const.stderr index d04595ee4e8..0d4397c2e2d 100644 --- a/src/test/ui/cast/cast-ptr-to-int-const.stderr +++ b/src/test/ui/cast/cast-ptr-to-int-const.stderr @@ -1,7 +1,7 @@ error[E0658]: casting pointers to integers in constants is unstable (see issue #51910) --> $DIR/cast-ptr-to-int-const.rs:5:9 | -LL | main as u32 //~ ERROR casting pointers to integers in constants is unstable +LL | main as u32 | ^^^^^^^^^^^ | = help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | main as u32 //~ ERROR casting pointers to integers in constants is error[E0658]: casting pointers to integers in constants is unstable (see issue #51910) --> $DIR/cast-ptr-to-int-const.rs:9:9 | -LL | &Y as *const u32 as u32 //~ ERROR is unstable +LL | &Y as *const u32 as u32 | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable diff --git a/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr b/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr index 37c6ba1b909..bd7a0e1834a 100644 --- a/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr +++ b/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr @@ -1,7 +1,7 @@ error[E0620]: cast to unsized type: `&{integer}` as `dyn std::marker::Send` --> $DIR/cast-to-unsized-trait-object-suggestion.rs:2:5 | -LL | &1 as Send; //~ ERROR cast to unsized +LL | &1 as Send; | ^^^^^^---- | | | help: try casting to a reference instead: `&Send` @@ -9,7 +9,7 @@ LL | &1 as Send; //~ ERROR cast to unsized error[E0620]: cast to unsized type: `std::boxed::Box<{integer}>` as `dyn std::marker::Send` --> $DIR/cast-to-unsized-trait-object-suggestion.rs:3:5 | -LL | Box::new(1) as Send; //~ ERROR cast to unsized +LL | Box::new(1) as Send; | ^^^^^^^^^^^^^^^---- | | | help: try casting to a `Box` instead: `Box` diff --git a/src/test/ui/casts-differing-anon.stderr b/src/test/ui/casts-differing-anon.stderr index 8e09a7cd83b..fbbb8e3bb33 100644 --- a/src/test/ui/casts-differing-anon.stderr +++ b/src/test/ui/casts-differing-anon.stderr @@ -1,7 +1,7 @@ error[E0606]: casting `*mut impl std::fmt::Debug+?Sized` as `*mut impl std::fmt::Debug+?Sized` is invalid --> $DIR/casts-differing-anon.rs:21:13 | -LL | b_raw = f_raw as *mut _; //~ ERROR is invalid +LL | b_raw = f_raw as *mut _; | ^^^^^^^^^^^^^^^ | = note: vtable kinds may not match diff --git a/src/test/ui/casts-issue-46365.stderr b/src/test/ui/casts-issue-46365.stderr index 91edfaf410e..84175473696 100644 --- a/src/test/ui/casts-issue-46365.stderr +++ b/src/test/ui/casts-issue-46365.stderr @@ -1,7 +1,7 @@ error[E0412]: cannot find type `Ipsum` in this scope --> $DIR/casts-issue-46365.rs:2:12 | -LL | ipsum: Ipsum //~ ERROR cannot find type `Ipsum` +LL | ipsum: Ipsum | ^^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/chalkify/lower_env1.stderr b/src/test/ui/chalkify/lower_env1.stderr index f4d16a09a36..bc426e0707b 100644 --- a/src/test/ui/chalkify/lower_env1.stderr +++ b/src/test/ui/chalkify/lower_env1.stderr @@ -1,7 +1,7 @@ error: program clause dump --> $DIR/lower_env1.rs:6:1 | -LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump +LL | #[rustc_dump_program_clauses] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: forall { FromEnv(Self: Foo) :- FromEnv(Self: Bar). } @@ -11,7 +11,7 @@ LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump error: program clause dump --> $DIR/lower_env1.rs:9:1 | -LL | #[rustc_dump_env_program_clauses] //~ ERROR program clause dump +LL | #[rustc_dump_env_program_clauses] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: forall { FromEnv(Self: Foo) :- FromEnv(Self: Bar). } diff --git a/src/test/ui/chalkify/lower_env2.stderr b/src/test/ui/chalkify/lower_env2.stderr index f05b91c674d..2a71fa9df5e 100644 --- a/src/test/ui/chalkify/lower_env2.stderr +++ b/src/test/ui/chalkify/lower_env2.stderr @@ -1,7 +1,7 @@ error: program clause dump --> $DIR/lower_env2.rs:6:1 | -LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump +LL | #[rustc_dump_program_clauses] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: forall<'a, T> { FromEnv(T: Foo) :- FromEnv(S<'a, T>). } @@ -11,7 +11,7 @@ LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump error: program clause dump --> $DIR/lower_env2.rs:11:1 | -LL | #[rustc_dump_env_program_clauses] //~ ERROR program clause dump +LL | #[rustc_dump_env_program_clauses] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: forall<'a, T> { FromEnv(T: Foo) :- FromEnv(S<'a, T>). } diff --git a/src/test/ui/chalkify/lower_env3.stderr b/src/test/ui/chalkify/lower_env3.stderr index e602a8fcdaf..46e08368689 100644 --- a/src/test/ui/chalkify/lower_env3.stderr +++ b/src/test/ui/chalkify/lower_env3.stderr @@ -1,7 +1,7 @@ error: program clause dump --> $DIR/lower_env3.rs:5:5 | -LL | #[rustc_dump_env_program_clauses] //~ ERROR program clause dump +LL | #[rustc_dump_env_program_clauses] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: forall<'^0, ^1> { TypeOutlives(^1: '^0) :- FromEnv(&^1). } @@ -10,7 +10,7 @@ LL | #[rustc_dump_env_program_clauses] //~ ERROR program clause dump error: program clause dump --> $DIR/lower_env3.rs:10:5 | -LL | #[rustc_dump_env_program_clauses] //~ ERROR program clause dump +LL | #[rustc_dump_env_program_clauses] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: forall<'^0, ^1> { TypeOutlives(^1: '^0) :- FromEnv(&^1). } diff --git a/src/test/ui/chalkify/lower_impl.stderr b/src/test/ui/chalkify/lower_impl.stderr index 48af37edec4..d6827fbff3d 100644 --- a/src/test/ui/chalkify/lower_impl.stderr +++ b/src/test/ui/chalkify/lower_impl.stderr @@ -1,7 +1,7 @@ error: program clause dump --> $DIR/lower_impl.rs:5:1 | -LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump +LL | #[rustc_dump_program_clauses] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: forall { Implemented(T: Foo) :- ProjectionEq(::Item == i32), TypeOutlives(T: 'static), Implemented(T: std::iter::Iterator), Implemented(T: std::marker::Sized). } @@ -9,7 +9,7 @@ LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump error: program clause dump --> $DIR/lower_impl.rs:13:5 | -LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump +LL | #[rustc_dump_program_clauses] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: forall { Normalize(::Assoc -> std::vec::Vec) :- Implemented(T: Bar). } diff --git a/src/test/ui/chalkify/lower_struct.stderr b/src/test/ui/chalkify/lower_struct.stderr index e75e71450fb..91525c3ba55 100644 --- a/src/test/ui/chalkify/lower_struct.stderr +++ b/src/test/ui/chalkify/lower_struct.stderr @@ -1,7 +1,7 @@ error: program clause dump --> $DIR/lower_struct.rs:3:1 | -LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump +LL | #[rustc_dump_program_clauses] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: forall<'a, T> { FromEnv(T: std::marker::Sized) :- FromEnv(Foo<'a, T>). } diff --git a/src/test/ui/chalkify/lower_trait.stderr b/src/test/ui/chalkify/lower_trait.stderr index 4546d2ede82..423c5573083 100644 --- a/src/test/ui/chalkify/lower_trait.stderr +++ b/src/test/ui/chalkify/lower_trait.stderr @@ -1,7 +1,7 @@ error: program clause dump --> $DIR/lower_trait.rs:5:1 | -LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump +LL | #[rustc_dump_program_clauses] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: forall { FromEnv(>::Assoc: Bar) :- FromEnv(Self: Foo). } @@ -12,7 +12,7 @@ LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump error: program clause dump --> $DIR/lower_trait.rs:7:5 | -LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump +LL | #[rustc_dump_program_clauses] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: forall { ProjectionEq(>::Assoc == ^3) :- Normalize(>::Assoc -> ^3). } diff --git a/src/test/ui/chalkify/lower_trait_higher_rank.stderr b/src/test/ui/chalkify/lower_trait_higher_rank.stderr index d7e18596a7d..79bbc9fa6b3 100644 --- a/src/test/ui/chalkify/lower_trait_higher_rank.stderr +++ b/src/test/ui/chalkify/lower_trait_higher_rank.stderr @@ -1,7 +1,7 @@ error: program clause dump --> $DIR/lower_trait_higher_rank.rs:3:1 | -LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump +LL | #[rustc_dump_program_clauses] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: forall<'a, Self, F> { FromEnv(F: std::ops::Fn<(&'a (u8, u16),)>) :- FromEnv(Self: Foo). } diff --git a/src/test/ui/chalkify/lower_trait_where_clause.stderr b/src/test/ui/chalkify/lower_trait_where_clause.stderr index 5400224bdf4..408f3712a70 100644 --- a/src/test/ui/chalkify/lower_trait_where_clause.stderr +++ b/src/test/ui/chalkify/lower_trait_where_clause.stderr @@ -1,7 +1,7 @@ error: program clause dump --> $DIR/lower_trait_where_clause.rs:5:1 | -LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump +LL | #[rustc_dump_program_clauses] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: forall<'a, 'b, Self, T, U> { FromEnv(T: std::borrow::Borrow) :- FromEnv(Self: Foo<'a, 'b, T, U>). } diff --git a/src/test/ui/chalkify/type_inference.stderr b/src/test/ui/chalkify/type_inference.stderr index d65b701307b..d1d56d3d4a2 100644 --- a/src/test/ui/chalkify/type_inference.stderr +++ b/src/test/ui/chalkify/type_inference.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/type_inference.rs:21:14 | -LL | only_foo(x); //~ ERROR mismatched types +LL | only_foo(x); | ^ expected i32, found floating-point number | = note: expected type `i32` @@ -10,7 +10,7 @@ LL | only_foo(x); //~ ERROR mismatched types error[E0277]: the trait bound `{float}: Bar` is not satisfied --> $DIR/type_inference.rs:25:5 | -LL | only_bar(x); //~ ERROR the trait bound `{float}: Bar` is not satisfied +LL | only_bar(x); | ^^^^^^^^ the trait `Bar` is not implemented for `{float}` | = help: the following implementations were found: diff --git a/src/test/ui/changing-crates.stderr b/src/test/ui/changing-crates.stderr index a8b986d67f8..63393090498 100644 --- a/src/test/ui/changing-crates.stderr +++ b/src/test/ui/changing-crates.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/changing-crates.rs:10:1 | -LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/check-static-values-constraints.stderr b/src/test/ui/check-static-values-constraints.stderr index 5b1f265c34a..91fe0feb1bc 100644 --- a/src/test/ui/check-static-values-constraints.stderr +++ b/src/test/ui/check-static-values-constraints.stderr @@ -3,7 +3,7 @@ error[E0493]: destructors cannot be evaluated at compile-time | LL | ..SafeStruct{field1: SafeEnum::Variant3(WithDtor), | ___________________________________________^ -LL | | //~^ ERROR destructors cannot be evaluated at compile-time +LL | | LL | | field2: SafeEnum::Variant1}}; | |________________________________________________________________________________^ statics cannot evaluate destructors @@ -28,49 +28,49 @@ LL | field2: SafeEnum::Variant4("str".to_string()) error[E0010]: allocations are not allowed in statics --> $DIR/check-static-values-constraints.rs:95:5 | -LL | box MyOwned, //~ ERROR allocations are not allowed in statics +LL | box MyOwned, | ^^^^^^^^^^^ allocation not allowed in statics error[E0019]: static contains unimplemented expression type --> $DIR/check-static-values-constraints.rs:95:9 | -LL | box MyOwned, //~ ERROR allocations are not allowed in statics +LL | box MyOwned, | ^^^^^^^ error[E0010]: allocations are not allowed in statics --> $DIR/check-static-values-constraints.rs:97:5 | -LL | box MyOwned, //~ ERROR allocations are not allowed in statics +LL | box MyOwned, | ^^^^^^^^^^^ allocation not allowed in statics error[E0019]: static contains unimplemented expression type --> $DIR/check-static-values-constraints.rs:97:9 | -LL | box MyOwned, //~ ERROR allocations are not allowed in statics +LL | box MyOwned, | ^^^^^^^ error[E0010]: allocations are not allowed in statics --> $DIR/check-static-values-constraints.rs:102:6 | -LL | &box MyOwned, //~ ERROR allocations are not allowed in statics +LL | &box MyOwned, | ^^^^^^^^^^^ allocation not allowed in statics error[E0019]: static contains unimplemented expression type --> $DIR/check-static-values-constraints.rs:102:10 | -LL | &box MyOwned, //~ ERROR allocations are not allowed in statics +LL | &box MyOwned, | ^^^^^^^ error[E0010]: allocations are not allowed in statics --> $DIR/check-static-values-constraints.rs:104:6 | -LL | &box MyOwned, //~ ERROR allocations are not allowed in statics +LL | &box MyOwned, | ^^^^^^^^^^^ allocation not allowed in statics error[E0019]: static contains unimplemented expression type --> $DIR/check-static-values-constraints.rs:104:10 | -LL | &box MyOwned, //~ ERROR allocations are not allowed in statics +LL | &box MyOwned, | ^^^^^^^ error[E0010]: allocations are not allowed in statics diff --git a/src/test/ui/check_match/issue-35609.stderr b/src/test/ui/check_match/issue-35609.stderr index 54e5c988f8c..af22535c55e 100644 --- a/src/test/ui/check_match/issue-35609.stderr +++ b/src/test/ui/check_match/issue-35609.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `(B, _)`, `(C, _)`, `(D, _)` and 2 more not covered --> $DIR/issue-35609.rs:10:11 | -LL | match (A, ()) { //~ ERROR non-exhaustive +LL | match (A, ()) { | ^^^^^^^ patterns `(B, _)`, `(C, _)`, `(D, _)` and 2 more not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -9,7 +9,7 @@ LL | match (A, ()) { //~ ERROR non-exhaustive error[E0004]: non-exhaustive patterns: `(_, B)`, `(_, C)`, `(_, D)` and 2 more not covered --> $DIR/issue-35609.rs:14:11 | -LL | match (A, A) { //~ ERROR non-exhaustive +LL | match (A, A) { | ^^^^^^ patterns `(_, B)`, `(_, C)`, `(_, D)` and 2 more not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -17,7 +17,7 @@ LL | match (A, A) { //~ ERROR non-exhaustive error[E0004]: non-exhaustive patterns: `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered --> $DIR/issue-35609.rs:18:11 | -LL | match ((A, ()), ()) { //~ ERROR non-exhaustive +LL | match ((A, ()), ()) { | ^^^^^^^^^^^^^ patterns `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -25,7 +25,7 @@ LL | match ((A, ()), ()) { //~ ERROR non-exhaustive error[E0004]: non-exhaustive patterns: `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered --> $DIR/issue-35609.rs:22:11 | -LL | match ((A, ()), A) { //~ ERROR non-exhaustive +LL | match ((A, ()), A) { | ^^^^^^^^^^^^ patterns `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -33,7 +33,7 @@ LL | match ((A, ()), A) { //~ ERROR non-exhaustive error[E0004]: non-exhaustive patterns: `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered --> $DIR/issue-35609.rs:26:11 | -LL | match ((A, ()), ()) { //~ ERROR non-exhaustive +LL | match ((A, ()), ()) { | ^^^^^^^^^^^^^ patterns `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -44,7 +44,7 @@ error[E0004]: non-exhaustive patterns: `S(B, _)`, `S(C, _)`, `S(D, _)` and 2 mor LL | struct S(Enum, ()); | ------------------- `S` defined here ... -LL | match S(A, ()) { //~ ERROR non-exhaustive +LL | match S(A, ()) { | ^^^^^^^^ patterns `S(B, _)`, `S(C, _)`, `S(D, _)` and 2 more not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -55,7 +55,7 @@ error[E0004]: non-exhaustive patterns: `Sd { x: B, .. }`, `Sd { x: C, .. }`, `Sd LL | struct Sd { x: Enum, y: () } | ---------------------------- `Sd` defined here ... -LL | match (Sd { x: A, y: () }) { //~ ERROR non-exhaustive +LL | match (Sd { x: A, y: () }) { | ^^^^^^^^^^^^^^^^^^^^ patterns `Sd { x: B, .. }`, `Sd { x: C, .. }`, `Sd { x: D, .. }` and 2 more not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -63,7 +63,7 @@ LL | match (Sd { x: A, y: () }) { //~ ERROR non-exhaustive error[E0004]: non-exhaustive patterns: `Some(B)`, `Some(C)`, `Some(D)` and 2 more not covered --> $DIR/issue-35609.rs:39:11 | -LL | match Some(A) { //~ ERROR non-exhaustive +LL | match Some(A) { | ^^^^^^^ patterns `Some(B)`, `Some(C)`, `Some(D)` and 2 more not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/class-cast-to-trait.stderr b/src/test/ui/class-cast-to-trait.stderr index f5bd7a13aa4..39f308cdfd4 100644 --- a/src/test/ui/class-cast-to-trait.stderr +++ b/src/test/ui/class-cast-to-trait.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `eat` found for type `std::boxed::Box` in the current scope --> $DIR/class-cast-to-trait.rs:53:8 | -LL | nyan.eat(); //~ ERROR no method named `eat` found +LL | nyan.eat(); | ^^^ error: aborting due to previous error diff --git a/src/test/ui/class-missing-self.stderr b/src/test/ui/class-missing-self.stderr index 484778f83ec..ec11f125399 100644 --- a/src/test/ui/class-missing-self.stderr +++ b/src/test/ui/class-missing-self.stderr @@ -1,13 +1,13 @@ error[E0425]: cannot find value `meows` in this scope --> $DIR/class-missing-self.rs:9:7 | -LL | meows += 1; //~ ERROR cannot find value `meows` in this scope +LL | meows += 1; | ^^^^^ help: try: `self.meows` error[E0425]: cannot find function `sleep` in this scope --> $DIR/class-missing-self.rs:10:7 | -LL | sleep(); //~ ERROR cannot find function `sleep` in this scope +LL | sleep(); | ^^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | diff --git a/src/test/ui/cleanup-rvalue-scopes-cf.stderr b/src/test/ui/cleanup-rvalue-scopes-cf.stderr index 561403d1b42..e35e71ce6e2 100644 --- a/src/test/ui/cleanup-rvalue-scopes-cf.stderr +++ b/src/test/ui/cleanup-rvalue-scopes-cf.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/cleanup-rvalue-scopes-cf.rs:28:19 | -LL | let _x = arg(&AddFlags(1)); //~ ERROR value does not live long enough +LL | let _x = arg(&AddFlags(1)); | ^^^^^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough @@ -14,7 +14,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/cleanup-rvalue-scopes-cf.rs:29:14 | -LL | let _x = AddFlags(1).get(); //~ ERROR value does not live long enough +LL | let _x = AddFlags(1).get(); | ^^^^^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough @@ -27,7 +27,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/cleanup-rvalue-scopes-cf.rs:30:21 | -LL | let _x = &*arg(&AddFlags(1)); //~ ERROR value does not live long enough +LL | let _x = &*arg(&AddFlags(1)); | ^^^^^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough @@ -40,7 +40,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/cleanup-rvalue-scopes-cf.rs:31:24 | -LL | let ref _x = *arg(&AddFlags(1)); //~ ERROR value does not live long enough +LL | let ref _x = *arg(&AddFlags(1)); | ^^^^^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough @@ -53,7 +53,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/cleanup-rvalue-scopes-cf.rs:32:24 | -LL | let &ref _x = arg(&AddFlags(1)); //~ ERROR value does not live long enough +LL | let &ref _x = arg(&AddFlags(1)); | ^^^^^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough @@ -66,11 +66,11 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/cleanup-rvalue-scopes-cf.rs:33:14 | -LL | let _x = AddFlags(1).get(); //~ ERROR value does not live long enough +LL | let _x = AddFlags(1).get(); | ^^^^^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough -LL | let Box { f: _x } = Box { f: AddFlags(1).get() }; //~ ERROR value does not live long enough +LL | let Box { f: _x } = Box { f: AddFlags(1).get() }; LL | } | - temporary value needs to live until here | @@ -79,7 +79,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/cleanup-rvalue-scopes-cf.rs:34:34 | -LL | let Box { f: _x } = Box { f: AddFlags(1).get() }; //~ ERROR value does not live long enough +LL | let Box { f: _x } = Box { f: AddFlags(1).get() }; | ^^^^^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough diff --git a/src/test/ui/closure-expected-type/expect-two-infer-vars-supply-ty-with-bound-region.stderr b/src/test/ui/closure-expected-type/expect-two-infer-vars-supply-ty-with-bound-region.stderr index 7dd996cce5d..2005bd4dd5c 100644 --- a/src/test/ui/closure-expected-type/expect-two-infer-vars-supply-ty-with-bound-region.stderr +++ b/src/test/ui/closure-expected-type/expect-two-infer-vars-supply-ty-with-bound-region.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/expect-two-infer-vars-supply-ty-with-bound-region.rs:8:27 | -LL | with_closure(|x: u32, y| {}); //~ ERROR E0282 +LL | with_closure(|x: u32, y| {}); | ^ consider giving this closure parameter a type error: aborting due to previous error diff --git a/src/test/ui/closure_context/issue-26046-fn-mut.stderr b/src/test/ui/closure_context/issue-26046-fn-mut.stderr index bdfd26f6871..74d3c4977ee 100644 --- a/src/test/ui/closure_context/issue-26046-fn-mut.stderr +++ b/src/test/ui/closure_context/issue-26046-fn-mut.stderr @@ -1,7 +1,7 @@ error[E0525]: expected a closure that implements the `Fn` trait, but this closure only implements `FnMut` --> $DIR/issue-26046-fn-mut.rs:4:19 | -LL | let closure = || { //~ ERROR expected a closure that +LL | let closure = || { | ^^ this closure implements `FnMut`, not `Fn` LL | num += 1; | --- closure is `FnMut` because it mutates the variable `num` here diff --git a/src/test/ui/closure_context/issue-26046-fn-once.stderr b/src/test/ui/closure_context/issue-26046-fn-once.stderr index e7bcbb9e630..473e8e8417e 100644 --- a/src/test/ui/closure_context/issue-26046-fn-once.stderr +++ b/src/test/ui/closure_context/issue-26046-fn-once.stderr @@ -1,7 +1,7 @@ error[E0525]: expected a closure that implements the `Fn` trait, but this closure only implements `FnOnce` --> $DIR/issue-26046-fn-once.rs:4:19 | -LL | let closure = move || { //~ ERROR expected a closure +LL | let closure = move || { | ^^^^^^^ this closure implements `FnOnce`, not `Fn` LL | vec | --- closure is `FnOnce` because it moves the variable `vec` out of its environment diff --git a/src/test/ui/closure_promotion.stderr b/src/test/ui/closure_promotion.stderr index 7b901e30117..475e28309cf 100644 --- a/src/test/ui/closure_promotion.stderr +++ b/src/test/ui/closure_promotion.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/closure_promotion.rs:7:26 | -LL | let x: &'static _ = &|| { let z = 3; z }; //~ ERROR does not live long enough +LL | let x: &'static _ = &|| { let z = 3; z }; | ^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough LL | } | - temporary value only lives until here diff --git a/src/test/ui/closures/closure-array-break-length.stderr b/src/test/ui/closures/closure-array-break-length.stderr index fa7a63b642e..9b78aa16a58 100644 --- a/src/test/ui/closures/closure-array-break-length.stderr +++ b/src/test/ui/closures/closure-array-break-length.stderr @@ -1,19 +1,19 @@ error[E0268]: `continue` outside of loop --> $DIR/closure-array-break-length.rs:2:13 | -LL | |_: [_; continue]| {}; //~ ERROR: `continue` outside of loop +LL | |_: [_; continue]| {}; | ^^^^^^^^ cannot break outside of a loop error[E0268]: `continue` outside of loop --> $DIR/closure-array-break-length.rs:4:19 | -LL | while |_: [_; continue]| {} {} //~ ERROR: `continue` outside of loop +LL | while |_: [_; continue]| {} {} | ^^^^^^^^ cannot break outside of a loop error[E0268]: `break` outside of loop --> $DIR/closure-array-break-length.rs:6:19 | -LL | while |_: [_; break]| {} {} //~ ERROR: `break` outside of loop +LL | while |_: [_; break]| {} {} | ^^^^^ cannot break outside of a loop error: aborting due to 3 previous errors diff --git a/src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr b/src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr index 7d637fed8ab..81c4f4e00ab 100644 --- a/src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr +++ b/src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr @@ -2,7 +2,7 @@ error[E0277]: `F` cannot be sent between threads safely --> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:5:1 | LL | / fn foo(blk: F) -> X where F: FnOnce() + 'static { -LL | | //~^ ERROR `F` cannot be sent between threads safely +LL | | LL | | return X { field: blk }; LL | | } | |_^ `F` cannot be sent between threads safely diff --git a/src/test/ui/closures/closure-bounds-subtype.stderr b/src/test/ui/closures/closure-bounds-subtype.stderr index d018956d026..3b9fd10af38 100644 --- a/src/test/ui/closures/closure-bounds-subtype.stderr +++ b/src/test/ui/closures/closure-bounds-subtype.stderr @@ -1,7 +1,7 @@ error[E0277]: `F` cannot be shared between threads safely --> $DIR/closure-bounds-subtype.rs:13:5 | -LL | take_const_owned(f); //~ ERROR `F` cannot be shared between threads safely [E0277] +LL | take_const_owned(f); | ^^^^^^^^^^^^^^^^ `F` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `F` diff --git a/src/test/ui/closures/closure-expected-type/expect-region-supply-region.stderr b/src/test/ui/closures/closure-expected-type/expect-region-supply-region.stderr index 633dd4f5c62..e3b623d5524 100644 --- a/src/test/ui/closures/closure-expected-type/expect-region-supply-region.stderr +++ b/src/test/ui/closures/closure-expected-type/expect-region-supply-region.stderr @@ -5,7 +5,7 @@ LL | let mut f: Option<&u32> = None; | ----- borrowed data cannot be stored into here... LL | closure_expecting_bound(|x| { | --- ...because it cannot outlive this closure -LL | f = Some(x); //~ ERROR borrowed data cannot be stored outside of its closure +LL | f = Some(x); | ^ cannot be stored outside of its closure error: borrowed data cannot be stored outside of its closure @@ -15,7 +15,7 @@ LL | let mut f: Option<&u32> = None; | ----- borrowed data cannot be stored into here... LL | closure_expecting_bound(|x: &u32| { | --------- ...because it cannot outlive this closure -LL | f = Some(x); //~ ERROR borrowed data cannot be stored outside of its closure +LL | f = Some(x); | ^ cannot be stored outside of its closure error[E0308]: mismatched types @@ -31,11 +31,11 @@ note: the anonymous lifetime #2 defined on the body at 37:29... | LL | closure_expecting_bound(|x: &'x u32| { | _____________________________^ -LL | | //~^ ERROR mismatched types -LL | | //~| ERROR mismatched types +LL | | +LL | | LL | | ... | -LL | | //~^ ERROR borrowed data cannot be stored outside of its closure +LL | | LL | | }); | |_____^ note: ...does not necessarily outlive the lifetime 'x as defined on the function body at 32:30 @@ -62,11 +62,11 @@ note: ...does not necessarily outlive the anonymous lifetime #2 defined on the b | LL | closure_expecting_bound(|x: &'x u32| { | _____________________________^ -LL | | //~^ ERROR mismatched types -LL | | //~| ERROR mismatched types +LL | | +LL | | LL | | ... | -LL | | //~^ ERROR borrowed data cannot be stored outside of its closure +LL | | LL | | }); | |_____^ diff --git a/src/test/ui/closures/closure-immutable-outer-variable.stderr b/src/test/ui/closures/closure-immutable-outer-variable.stderr index c6a6ebd931c..332320791d4 100644 --- a/src/test/ui/closures/closure-immutable-outer-variable.stderr +++ b/src/test/ui/closures/closure-immutable-outer-variable.stderr @@ -3,7 +3,7 @@ error[E0594]: cannot assign to captured outer variable in an `FnMut` closure | LL | let y = true; | - help: consider making `y` mutable: `mut y` -LL | foo(Box::new(move || y = false) as Box<_>); //~ ERROR cannot assign to captured outer variable +LL | foo(Box::new(move || y = false) as Box<_>); | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/closures/closure-referencing-itself-issue-25954.stderr b/src/test/ui/closures/closure-referencing-itself-issue-25954.stderr index f60be43bba8..8ca43cd1cff 100644 --- a/src/test/ui/closures/closure-referencing-itself-issue-25954.stderr +++ b/src/test/ui/closures/closure-referencing-itself-issue-25954.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/closure-referencing-itself-issue-25954.rs:15:13 | -LL | let q = || p.b.set(5i32); //~ ERROR mismatched types +LL | let q = || p.b.set(5i32); | ^^^^^^^^^^^^^^^^ cyclic type of infinite size error: aborting due to previous error diff --git a/src/test/ui/closures/closure-reform-bad.stderr b/src/test/ui/closures/closure-reform-bad.stderr index 76f88d04907..5c5480912be 100644 --- a/src/test/ui/closures/closure-reform-bad.stderr +++ b/src/test/ui/closures/closure-reform-bad.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/closure-reform-bad.rs:11:15 | -LL | call_bare(f) //~ ERROR mismatched types +LL | call_bare(f) | ^ expected fn pointer, found closure | = note: expected type `for<'r> fn(&'r str)` diff --git a/src/test/ui/closures/closure-wrong-kind.stderr b/src/test/ui/closures/closure-wrong-kind.stderr index b289ea29644..65026128ae6 100644 --- a/src/test/ui/closures/closure-wrong-kind.stderr +++ b/src/test/ui/closures/closure-wrong-kind.stderr @@ -1,7 +1,7 @@ error[E0525]: expected a closure that implements the `Fn` trait, but this closure only implements `FnOnce` --> $DIR/closure-wrong-kind.rs:10:19 | -LL | let closure = |_| foo(x); //~ ERROR E0525 +LL | let closure = |_| foo(x); | ^^^^^^^^-^ | | | | | closure is `FnOnce` because it moves the variable `x` out of its environment diff --git a/src/test/ui/codemap_tests/bad-format-args.stderr b/src/test/ui/codemap_tests/bad-format-args.stderr index 38320416b45..c424eb08a7a 100644 --- a/src/test/ui/codemap_tests/bad-format-args.stderr +++ b/src/test/ui/codemap_tests/bad-format-args.stderr @@ -1,7 +1,7 @@ error: requires at least a format string argument --> $DIR/bad-format-args.rs:2:5 | -LL | format!(); //~ ERROR requires at least a format string argument +LL | format!(); | ^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) @@ -9,13 +9,13 @@ LL | format!(); //~ ERROR requires at least a format string argument error: expected token: `,` --> $DIR/bad-format-args.rs:3:16 | -LL | format!("" 1); //~ ERROR expected token: `,` +LL | format!("" 1); | ^ error: expected token: `,` --> $DIR/bad-format-args.rs:4:19 | -LL | format!("", 1 1); //~ ERROR expected token: `,` +LL | format!("", 1 1); | ^ error: aborting due to 3 previous errors diff --git a/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr b/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr index 5f8bc387a3d..087084ae5da 100644 --- a/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr +++ b/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr @@ -1,7 +1,7 @@ error[E0592]: duplicate definitions with name `f` --> $DIR/coherence-overlapping-inherent-impl-trait.rs:4:10 | -LL | impl C { fn f() {} } //~ ERROR duplicate +LL | impl C { fn f() {} } | ^^^^^^^^^ duplicate definitions for `f` LL | impl C { fn f() {} } | --------- other definition for `f` diff --git a/src/test/ui/codemap_tests/empty_span.stderr b/src/test/ui/codemap_tests/empty_span.stderr index f5285677097..1dd99cfd64f 100644 --- a/src/test/ui/codemap_tests/empty_span.stderr +++ b/src/test/ui/codemap_tests/empty_span.stderr @@ -1,7 +1,7 @@ error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static main::Foo` --> $DIR/empty_span.rs:7:5 | -LL | unsafe impl Send for &'static Foo { } //~ ERROR cross-crate traits with a default impl +LL | unsafe impl Send for &'static Foo { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/huge_multispan_highlight.stderr b/src/test/ui/codemap_tests/huge_multispan_highlight.stderr index 41df802b503..13bd666a507 100644 --- a/src/test/ui/codemap_tests/huge_multispan_highlight.stderr +++ b/src/test/ui/codemap_tests/huge_multispan_highlight.stderr @@ -4,7 +4,7 @@ error[E0596]: cannot borrow immutable local variable `x` as mutable LL | let x = "foo"; | - help: make this binding mutable: `mut x` ... -LL | let y = &mut x; //~ ERROR cannot borrow +LL | let y = &mut x; | ^ cannot borrow mutably error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/issue-11715.stderr b/src/test/ui/codemap_tests/issue-11715.stderr index 8f320a4e19b..c37e6b34727 100644 --- a/src/test/ui/codemap_tests/issue-11715.stderr +++ b/src/test/ui/codemap_tests/issue-11715.stderr @@ -3,7 +3,7 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time | LL | let y = &mut x; | - first mutable borrow occurs here -LL | let z = &mut x; //~ ERROR cannot borrow +LL | let z = &mut x; | ^ second mutable borrow occurs here ... LL | } diff --git a/src/test/ui/codemap_tests/one_line.stderr b/src/test/ui/codemap_tests/one_line.stderr index 2ea793c0969..9dcaba8748e 100644 --- a/src/test/ui/codemap_tests/one_line.stderr +++ b/src/test/ui/codemap_tests/one_line.stderr @@ -1,7 +1,7 @@ error[E0499]: cannot borrow `v` as mutable more than once at a time --> $DIR/one_line.rs:3:12 | -LL | v.push(v.pop().unwrap()); //~ ERROR cannot borrow +LL | v.push(v.pop().unwrap()); | - ^ - first borrow ends here | | | | | second mutable borrow occurs here diff --git a/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr b/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr index 1b20b699d9f..70c1093e9ed 100644 --- a/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr +++ b/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr @@ -1,7 +1,7 @@ error[E0592]: duplicate definitions with name `id` --> $DIR/overlapping_inherent_impls.rs:9:5 | -LL | fn id() {} //~ ERROR duplicate definitions +LL | fn id() {} | ^^^^^^^^^^ duplicate definitions for `id` ... LL | fn id() {} @@ -10,7 +10,7 @@ LL | fn id() {} error[E0592]: duplicate definitions with name `bar` --> $DIR/overlapping_inherent_impls.rs:19:5 | -LL | fn bar(&self) {} //~ ERROR duplicate definitions +LL | fn bar(&self) {} | ^^^^^^^^^^^^^^^^ duplicate definitions for `bar` ... LL | fn bar(&self) {} @@ -19,7 +19,7 @@ LL | fn bar(&self) {} error[E0592]: duplicate definitions with name `baz` --> $DIR/overlapping_inherent_impls.rs:29:5 | -LL | fn baz(&self) {} //~ ERROR duplicate definitions +LL | fn baz(&self) {} | ^^^^^^^^^^^^^^^^ duplicate definitions for `baz` ... LL | fn baz(&self) {} diff --git a/src/test/ui/codemap_tests/tab.stderr b/src/test/ui/codemap_tests/tab.stderr index 80b5773fda3..bcc21e9c7ad 100644 --- a/src/test/ui/codemap_tests/tab.stderr +++ b/src/test/ui/codemap_tests/tab.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `bar` in this scope --> $DIR/tab.rs:4:2 | -LL | bar; //~ ERROR cannot find value `bar` +LL | bar; | ^^^ not found in this scope error[E0308]: mismatched types @@ -9,7 +9,7 @@ error[E0308]: mismatched types | LL | fn foo() { | - help: try adding a return type: `-> &'static str` -LL | "bar boo" //~ ERROR mismatched types +LL | "bar boo" | ^^^^^^^^^^^^^^^^^^^^ expected (), found reference | = note: expected type `()` diff --git a/src/test/ui/codemap_tests/tab_2.stderr b/src/test/ui/codemap_tests/tab_2.stderr index f7eec3eb8da..70414bbd953 100644 --- a/src/test/ui/codemap_tests/tab_2.stderr +++ b/src/test/ui/codemap_tests/tab_2.stderr @@ -1,7 +1,7 @@ error: unterminated double quote string --> $DIR/tab_2.rs:4:7 | -LL | """; //~ ERROR unterminated double quote +LL | """; | ___________________^ LL | | } | |__^ diff --git a/src/test/ui/codemap_tests/tab_3.stderr b/src/test/ui/codemap_tests/tab_3.stderr index 6e93ae13069..4b550dbf9ee 100644 --- a/src/test/ui/codemap_tests/tab_3.stderr +++ b/src/test/ui/codemap_tests/tab_3.stderr @@ -4,7 +4,7 @@ error[E0382]: use of moved value: `some_vec` LL | some_vec.into_iter(); | -------- value moved here LL | { -LL | println!("{:?}", some_vec); //~ ERROR use of moved +LL | println!("{:?}", some_vec); | ^^^^^^^^ value used here after move | = note: move occurs because `some_vec` has type `std::vec::Vec<&str>`, which does not implement the `Copy` trait diff --git a/src/test/ui/codemap_tests/two_files.stderr b/src/test/ui/codemap_tests/two_files.stderr index 65df3f382c0..5027b78b38e 100644 --- a/src/test/ui/codemap_tests/two_files.stderr +++ b/src/test/ui/codemap_tests/two_files.stderr @@ -1,7 +1,7 @@ error[E0404]: expected trait, found type alias `Bar` --> $DIR/two_files.rs:5:6 | -LL | impl Bar for Baz { } //~ ERROR expected trait, found type alias +LL | impl Bar for Baz { } | ^^^ type aliases cannot be used as traits | = note: did you mean to use a trait alias? diff --git a/src/test/ui/codemap_tests/unicode.stderr b/src/test/ui/codemap_tests/unicode.stderr index 1ba6ac44788..7aadeb7dfc9 100644 --- a/src/test/ui/codemap_tests/unicode.stderr +++ b/src/test/ui/codemap_tests/unicode.stderr @@ -1,7 +1,7 @@ error[E0703]: invalid ABI: found `路濫狼á́́` --> $DIR/unicode.rs:1:8 | -LL | extern "路濫狼á́́" fn foo() {} //~ ERROR invalid ABI +LL | extern "路濫狼á́́" fn foo() {} | ^^^^^^^^^ invalid ABI | = help: valid ABIs: cdecl, stdcall, fastcall, vectorcall, thiscall, aapcs, win64, sysv64, ptx-kernel, msp430-interrupt, x86-interrupt, amdgpu-kernel, Rust, C, system, rust-intrinsic, rust-call, platform-intrinsic, unadjusted diff --git a/src/test/ui/codemap_tests/unicode_2.stderr b/src/test/ui/codemap_tests/unicode_2.stderr index 1bc7452b9f2..92634d8e5f9 100644 --- a/src/test/ui/codemap_tests/unicode_2.stderr +++ b/src/test/ui/codemap_tests/unicode_2.stderr @@ -1,7 +1,7 @@ error: invalid width `7` for integer literal --> $DIR/unicode_2.rs:4:25 | -LL | let _ = ("a̐éö̲", 0u7); //~ ERROR invalid width +LL | let _ = ("a̐éö̲", 0u7); | ^^^ | = help: valid widths are 8, 16, 32, 64 and 128 @@ -9,7 +9,7 @@ LL | let _ = ("a̐éö̲", 0u7); //~ ERROR invalid width error: invalid width `42` for integer literal --> $DIR/unicode_2.rs:5:20 | -LL | let _ = ("아あ", 1i42); //~ ERROR invalid width +LL | let _ = ("아あ", 1i42); | ^^^^ | = help: valid widths are 8, 16, 32, 64 and 128 @@ -17,7 +17,7 @@ LL | let _ = ("아あ", 1i42); //~ ERROR invalid width error[E0425]: cannot find value `a̐é` in this scope --> $DIR/unicode_2.rs:6:13 | -LL | let _ = a̐é; //~ ERROR cannot find +LL | let _ = a̐é; | ^^ not found in this scope error: aborting due to 3 previous errors diff --git a/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr b/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr index 5ad3889666b..be362c9a78b 100644 --- a/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr +++ b/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:9:13 | -LL | let _ = box { [1, 2, 3] }: Box<[i32]>; //~ ERROR mismatched types +LL | let _ = box { [1, 2, 3] }: Box<[i32]>; | ^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements | = note: expected type `std::boxed::Box<[i32]>` @@ -10,7 +10,7 @@ LL | let _ = box { [1, 2, 3] }: Box<[i32]>; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:10:13 | -LL | let _ = box if true { [1, 2, 3] } else { [1, 3, 4] }: Box<[i32]>; //~ ERROR mismatched types +LL | let _ = box if true { [1, 2, 3] } else { [1, 3, 4] }: Box<[i32]>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements | = note: expected type `std::boxed::Box<[i32]>` @@ -28,7 +28,7 @@ LL | let _ = box match true { true => [1, 2, 3], false => [1, 3, 4] }: Box<[ error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:13:13 | -LL | let _ = box { |x| (x as u8) }: Box _>; //~ ERROR mismatched types +LL | let _ = box { |x| (x as u8) }: Box _>; | ^^^^^^^^^^^^^^^^^^^^^ expected trait std::ops::Fn, found closure | = note: expected type `std::boxed::Box u8>` @@ -37,7 +37,7 @@ LL | let _ = box { |x| (x as u8) }: Box _>; //~ ERROR mismatched error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:14:13 | -LL | let _ = box if true { false } else { true }: Box; //~ ERROR mismatched types +LL | let _ = box if true { false } else { true }: Box; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found bool | = note: expected type `std::boxed::Box` @@ -46,7 +46,7 @@ LL | let _ = box if true { false } else { true }: Box; //~ ERROR mism error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:15:13 | -LL | let _ = box match true { true => 'a', false => 'b' }: Box; //~ ERROR mismatched types +LL | let _ = box match true { true => 'a', false => 'b' }: Box; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found char | = note: expected type `std::boxed::Box` @@ -55,7 +55,7 @@ LL | let _ = box match true { true => 'a', false => 'b' }: Box; //~ E error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:17:13 | -LL | let _ = &{ [1, 2, 3] }: &[i32]; //~ ERROR mismatched types +LL | let _ = &{ [1, 2, 3] }: &[i32]; | ^^^^^^^^^^^^^^ expected slice, found array of 3 elements | = note: expected type `&[i32]` @@ -64,7 +64,7 @@ LL | let _ = &{ [1, 2, 3] }: &[i32]; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:18:13 | -LL | let _ = &if true { [1, 2, 3] } else { [1, 3, 4] }: &[i32]; //~ ERROR mismatched types +LL | let _ = &if true { [1, 2, 3] } else { [1, 3, 4] }: &[i32]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements | = note: expected type `&[i32]` @@ -82,7 +82,7 @@ LL | let _ = &match true { true => [1, 2, 3], false => [1, 3, 4] }: &[i32]; error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:21:13 | -LL | let _ = &{ |x| (x as u8) }: &Fn(i32) -> _; //~ ERROR mismatched types +LL | let _ = &{ |x| (x as u8) }: &Fn(i32) -> _; | ^^^^^^^^^^^^^^^^^^ expected trait std::ops::Fn, found closure | = note: expected type `&dyn std::ops::Fn(i32) -> u8` @@ -91,7 +91,7 @@ LL | let _ = &{ |x| (x as u8) }: &Fn(i32) -> _; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:22:13 | -LL | let _ = &if true { false } else { true }: &Debug; //~ ERROR mismatched types +LL | let _ = &if true { false } else { true }: &Debug; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found bool | = note: expected type `&dyn std::fmt::Debug` @@ -100,7 +100,7 @@ LL | let _ = &if true { false } else { true }: &Debug; //~ ERROR mismatched error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:23:13 | -LL | let _ = &match true { true => 'a', false => 'b' }: &Debug; //~ ERROR mismatched types +LL | let _ = &match true { true => 'a', false => 'b' }: &Debug; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found char | = note: expected type `&dyn std::fmt::Debug` @@ -109,7 +109,7 @@ LL | let _ = &match true { true => 'a', false => 'b' }: &Debug; //~ ERROR mi error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:25:13 | -LL | let _ = Box::new([1, 2, 3]): Box<[i32]>; //~ ERROR mismatched types +LL | let _ = Box::new([1, 2, 3]): Box<[i32]>; | ^^^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements | = note: expected type `std::boxed::Box<[i32]>` @@ -118,7 +118,7 @@ LL | let _ = Box::new([1, 2, 3]): Box<[i32]>; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:26:13 | -LL | let _ = Box::new(|x| (x as u8)): Box _>; //~ ERROR mismatched types +LL | let _ = Box::new(|x| (x as u8)): Box _>; | ^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::ops::Fn, found closure | = note: expected type `std::boxed::Box _>` diff --git a/src/test/ui/coercion/coerce-to-bang-cast.stderr b/src/test/ui/coercion/coerce-to-bang-cast.stderr index 2982801f461..ff30ebc09c6 100644 --- a/src/test/ui/coercion/coerce-to-bang-cast.stderr +++ b/src/test/ui/coercion/coerce-to-bang-cast.stderr @@ -9,7 +9,7 @@ LL | let y = {return; 22} as !; error[E0605]: non-primitive cast: `i32` as `!` --> $DIR/coerce-to-bang-cast.rs:11:13 | -LL | let y = 22 as !; //~ ERROR non-primitive cast +LL | let y = 22 as !; | ^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait diff --git a/src/test/ui/coercion/coerce-to-bang.stderr b/src/test/ui/coercion/coerce-to-bang.stderr index 72e7211de7a..a46e97da815 100644 --- a/src/test/ui/coercion/coerce-to-bang.stderr +++ b/src/test/ui/coercion/coerce-to-bang.stderr @@ -10,7 +10,7 @@ LL | foo(return, 22, 44); error[E0308]: mismatched types --> $DIR/coerce-to-bang.rs:18:13 | -LL | foo(22, 44, return); //~ ERROR mismatched types +LL | foo(22, 44, return); | ^^ expected !, found integer | = note: expected type `!` @@ -28,7 +28,7 @@ LL | foo(a, b, c); // ... and hence a reference to `a` is expected to diverg error[E0308]: mismatched types --> $DIR/coerce-to-bang.rs:36:12 | -LL | foo(a, b, c); //~ ERROR mismatched types +LL | foo(a, b, c); | ^ expected !, found integer | = note: expected type `!` @@ -37,7 +37,7 @@ LL | foo(a, b, c); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/coerce-to-bang.rs:45:12 | -LL | foo(a, b, c); //~ ERROR mismatched types +LL | foo(a, b, c); | ^ expected !, found integer | = note: expected type `!` @@ -46,7 +46,7 @@ LL | foo(a, b, c); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/coerce-to-bang.rs:50:21 | -LL | let x: [!; 2] = [return, 22]; //~ ERROR mismatched types +LL | let x: [!; 2] = [return, 22]; | ^^^^^^^^^^^^ expected !, found integer | = note: expected type `[!; 2]` @@ -55,7 +55,7 @@ LL | let x: [!; 2] = [return, 22]; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/coerce-to-bang.rs:55:22 | -LL | let x: [!; 2] = [22, return]; //~ ERROR mismatched types +LL | let x: [!; 2] = [22, return]; | ^^ expected !, found integer | = note: expected type `!` @@ -64,7 +64,7 @@ LL | let x: [!; 2] = [22, return]; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/coerce-to-bang.rs:60:37 | -LL | let x: (usize, !, usize) = (22, 44, 66); //~ ERROR mismatched types +LL | let x: (usize, !, usize) = (22, 44, 66); | ^^ expected !, found integer | = note: expected type `!` @@ -82,7 +82,7 @@ LL | let x: (usize, !, usize) = (return, 44, 66); error[E0308]: mismatched types --> $DIR/coerce-to-bang.rs:76:37 | -LL | let x: (usize, !, usize) = (22, 44, return); //~ ERROR mismatched types +LL | let x: (usize, !, usize) = (22, 44, return); | ^^ expected !, found integer | = note: expected type `!` diff --git a/src/test/ui/coercion/coercion-missing-tail-expected-type.stderr b/src/test/ui/coercion/coercion-missing-tail-expected-type.stderr index c8ec2f0545e..057de5b625e 100644 --- a/src/test/ui/coercion/coercion-missing-tail-expected-type.stderr +++ b/src/test/ui/coercion/coercion-missing-tail-expected-type.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/coercion-missing-tail-expected-type.rs:3:24 | -LL | fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types +LL | fn plus_one(x: i32) -> i32 { | -------- ^^^ expected i32, found () | | | this function's body doesn't return @@ -14,7 +14,7 @@ LL | x + 1; error[E0308]: mismatched types --> $DIR/coercion-missing-tail-expected-type.rs:7:13 | -LL | fn foo() -> Result { //~ ERROR mismatched types +LL | fn foo() -> Result { | --- ^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found () | | | this function's body doesn't return diff --git a/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-negative.stderr b/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-negative.stderr index c8a146cdd44..86a63eb5699 100644 --- a/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-negative.stderr +++ b/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-negative.stderr @@ -1,19 +1,19 @@ error[E0371]: the object type `(dyn Object + Marker2 + 'static)` automatically implements the trait `Marker1` --> $DIR/coherence-impl-trait-for-marker-trait-negative.rs:14:1 | -LL | impl !Marker1 for dyn Object + Marker2 { } //~ ERROR E0371 +LL | impl !Marker1 for dyn Object + Marker2 { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Object + Marker2 + 'static)` automatically implements trait `Marker1` error[E0371]: the object type `(dyn Object + Marker2 + 'static)` automatically implements the trait `Marker2` --> $DIR/coherence-impl-trait-for-marker-trait-negative.rs:16:1 | -LL | impl !Marker2 for dyn Object + Marker2 { } //~ ERROR E0371 +LL | impl !Marker2 for dyn Object + Marker2 { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Object + Marker2 + 'static)` automatically implements trait `Marker2` error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/coherence-impl-trait-for-marker-trait-negative.rs:22:1 | -LL | impl !Send for dyn Marker2 {} //~ ERROR E0117 +LL | impl !Send for dyn Marker2 {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | = note: the impl does not reference only types defined in this crate @@ -22,13 +22,13 @@ LL | impl !Send for dyn Marker2 {} //~ ERROR E0117 error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `(dyn Object + 'static)` --> $DIR/coherence-impl-trait-for-marker-trait-negative.rs:26:1 | -LL | impl !Send for dyn Object {} //~ ERROR E0321 +LL | impl !Send for dyn Object {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `(dyn Object + Marker2 + 'static)` --> $DIR/coherence-impl-trait-for-marker-trait-negative.rs:27:1 | -LL | impl !Send for dyn Object + Marker2 {} //~ ERROR E0321 +LL | impl !Send for dyn Object + Marker2 {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type error: aborting due to 5 previous errors diff --git a/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-positive.stderr b/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-positive.stderr index 78ca2f5279d..536b4625aee 100644 --- a/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-positive.stderr +++ b/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-positive.stderr @@ -1,19 +1,19 @@ error[E0371]: the object type `(dyn Object + Marker2 + 'static)` automatically implements the trait `Marker1` --> $DIR/coherence-impl-trait-for-marker-trait-positive.rs:14:1 | -LL | impl Marker1 for dyn Object + Marker2 { } //~ ERROR E0371 +LL | impl Marker1 for dyn Object + Marker2 { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Object + Marker2 + 'static)` automatically implements trait `Marker1` error[E0371]: the object type `(dyn Object + Marker2 + 'static)` automatically implements the trait `Marker2` --> $DIR/coherence-impl-trait-for-marker-trait-positive.rs:16:1 | -LL | impl Marker2 for dyn Object + Marker2 { } //~ ERROR E0371 +LL | impl Marker2 for dyn Object + Marker2 { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Object + Marker2 + 'static)` automatically implements trait `Marker2` error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/coherence-impl-trait-for-marker-trait-positive.rs:22:1 | -LL | unsafe impl Send for dyn Marker2 {} //~ ERROR E0117 +LL | unsafe impl Send for dyn Marker2 {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | = note: the impl does not reference only types defined in this crate @@ -22,13 +22,13 @@ LL | unsafe impl Send for dyn Marker2 {} //~ ERROR E0117 error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `(dyn Object + 'static)` --> $DIR/coherence-impl-trait-for-marker-trait-positive.rs:26:1 | -LL | unsafe impl Send for dyn Object {} //~ ERROR E0321 +LL | unsafe impl Send for dyn Object {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `(dyn Object + Marker2 + 'static)` --> $DIR/coherence-impl-trait-for-marker-trait-positive.rs:27:1 | -LL | unsafe impl Send for dyn Object + Marker2 {} //~ ERROR E0321 +LL | unsafe impl Send for dyn Object + Marker2 {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type error: aborting due to 5 previous errors diff --git a/src/test/ui/compare-method/proj-outlives-region.stderr b/src/test/ui/compare-method/proj-outlives-region.stderr index ba0b04dca9d..e5f5c5ed20d 100644 --- a/src/test/ui/compare-method/proj-outlives-region.stderr +++ b/src/test/ui/compare-method/proj-outlives-region.stderr @@ -4,7 +4,7 @@ error[E0276]: impl has stricter requirements than trait LL | fn foo() where T: 'a; | --------------------- definition of `foo` from trait ... -LL | fn foo() where U: 'a { } //~ ERROR E0276 +LL | fn foo() where U: 'a { } | ^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `U: 'a` error: aborting due to previous error diff --git a/src/test/ui/compare-method/region-extra.stderr b/src/test/ui/compare-method/region-extra.stderr index 48ca690f425..5a584c7d6ed 100644 --- a/src/test/ui/compare-method/region-extra.stderr +++ b/src/test/ui/compare-method/region-extra.stderr @@ -4,7 +4,7 @@ error[E0276]: impl has stricter requirements than trait LL | fn foo(); | --------- definition of `foo` from trait ... -LL | fn foo() where 'a: 'b { } //~ ERROR impl has stricter +LL | fn foo() where 'a: 'b { } | ^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `'a: 'b` error: aborting due to previous error diff --git a/src/test/ui/compare-method/reordered-type-param.stderr b/src/test/ui/compare-method/reordered-type-param.stderr index c162c720a48..a33908c01c8 100644 --- a/src/test/ui/compare-method/reordered-type-param.stderr +++ b/src/test/ui/compare-method/reordered-type-param.stderr @@ -4,7 +4,7 @@ error[E0053]: method `b` has an incompatible type for trait LL | fn b(&self, x: C) -> C; | - type in trait ... -LL | fn b(&self, _x: G) -> G { panic!() } //~ ERROR method `b` has an incompatible type +LL | fn b(&self, _x: G) -> G { panic!() } | ^ expected type parameter, found a different type parameter | = note: expected type `fn(&E, F) -> F` diff --git a/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr b/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr index 07f5a0a6cec..5d09038076f 100644 --- a/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr +++ b/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr @@ -4,7 +4,7 @@ error[E0276]: impl has stricter requirements than trait LL | fn b(&self, x: C) -> C; | ---------------------------- definition of `b` from trait ... -LL | fn b(&self, _x: F) -> F { panic!() } //~ ERROR E0276 +LL | fn b(&self, _x: F) -> F { panic!() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `F: std::marker::Sync` error: aborting due to previous error diff --git a/src/test/ui/compile_error_macro.stderr b/src/test/ui/compile_error_macro.stderr index 9e11db68315..8aa1878c5d7 100644 --- a/src/test/ui/compile_error_macro.stderr +++ b/src/test/ui/compile_error_macro.stderr @@ -1,7 +1,7 @@ error: a very descriptive error message --> $DIR/compile_error_macro.rs:2:5 | -LL | compile_error!("a very descriptive error message"); //~ ERROR: a very descriptive error message +LL | compile_error!("a very descriptive error message"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/concat.stderr b/src/test/ui/concat.stderr index b6024972c74..61fb9de1ef9 100644 --- a/src/test/ui/concat.stderr +++ b/src/test/ui/concat.stderr @@ -1,19 +1,19 @@ error: cannot concatenate a byte string literal --> $DIR/concat.rs:2:13 | -LL | concat!(b'f'); //~ ERROR: cannot concatenate a byte string literal +LL | concat!(b'f'); | ^^^^ error: cannot concatenate a byte string literal --> $DIR/concat.rs:3:13 | -LL | concat!(b"foo"); //~ ERROR: cannot concatenate a byte string literal +LL | concat!(b"foo"); | ^^^^^^ error: expected a literal --> $DIR/concat.rs:4:13 | -LL | concat!(foo); //~ ERROR: expected a literal +LL | concat!(foo); | ^^^ | = note: only literals (like `"foo"`, `42` and `3.14`) can be passed to `concat!()` @@ -21,7 +21,7 @@ LL | concat!(foo); //~ ERROR: expected a literal error: expected a literal --> $DIR/concat.rs:5:13 | -LL | concat!(foo()); //~ ERROR: expected a literal +LL | concat!(foo()); | ^^^^^ | = note: only literals (like `"foo"`, `42` and `3.14`) can be passed to `concat!()` diff --git a/src/test/ui/conditional-compilation/cfg-attr-crate-2.stderr b/src/test/ui/conditional-compilation/cfg-attr-crate-2.stderr index 37c7a571d0f..8d308f0c96f 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-crate-2.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-crate-2.stderr @@ -1,7 +1,7 @@ error[E0658]: no_core is experimental (see issue #29639) --> $DIR/cfg-attr-crate-2.rs:6:21 | -LL | #![cfg_attr(broken, no_core)] //~ ERROR no_core is experimental +LL | #![cfg_attr(broken, no_core)] | ^^^^^^^ | = help: add #![feature(no_core)] to the crate attributes to enable diff --git a/src/test/ui/conditional-compilation/cfg-attr-invalid-predicate.stderr b/src/test/ui/conditional-compilation/cfg-attr-invalid-predicate.stderr index d75a0389851..96c571ebebd 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-invalid-predicate.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-invalid-predicate.stderr @@ -1,7 +1,7 @@ error[E0537]: invalid predicate `foo` --> $DIR/cfg-attr-invalid-predicate.rs:1:7 | -LL | #[cfg(foo(bar))] //~ ERROR invalid predicate `foo` +LL | #[cfg(foo(bar))] | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/conditional-compilation/cfg-attr-multi-invalid-1.stderr b/src/test/ui/conditional-compilation/cfg-attr-multi-invalid-1.stderr index 8cdf4ec31e7..8485459ca6b 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-multi-invalid-1.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-multi-invalid-1.stderr @@ -1,7 +1,7 @@ error[E0658]: no_core is experimental (see issue #29639) --> $DIR/cfg-attr-multi-invalid-1.rs:4:21 | -LL | #![cfg_attr(broken, no_core, no_std)] //~ ERROR no_core is experimental +LL | #![cfg_attr(broken, no_core, no_std)] | ^^^^^^^ | = help: add #![feature(no_core)] to the crate attributes to enable diff --git a/src/test/ui/conditional-compilation/cfg-attr-multi-invalid-2.stderr b/src/test/ui/conditional-compilation/cfg-attr-multi-invalid-2.stderr index b3a3b0c0f97..2a673ea8131 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-multi-invalid-2.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-multi-invalid-2.stderr @@ -1,7 +1,7 @@ error[E0658]: no_core is experimental (see issue #29639) --> $DIR/cfg-attr-multi-invalid-2.rs:4:29 | -LL | #![cfg_attr(broken, no_std, no_core)] //~ ERROR no_core is experimental +LL | #![cfg_attr(broken, no_std, no_core)] | ^^^^^^^ | = help: add #![feature(no_core)] to the crate attributes to enable diff --git a/src/test/ui/conditional-compilation/cfg-attr-multi-true.stderr b/src/test/ui/conditional-compilation/cfg-attr-multi-true.stderr index 3d14c197397..64e9570773a 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-multi-true.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-multi-true.stderr @@ -1,7 +1,7 @@ warning: use of deprecated item 'MustUseDeprecated' --> $DIR/cfg-attr-multi-true.rs:12:6 | -LL | impl MustUseDeprecated { //~ warning: use of deprecated item +LL | impl MustUseDeprecated { | ^^^^^^^^^^^^^^^^^ | = note: #[warn(deprecated)] on by default @@ -9,25 +9,25 @@ LL | impl MustUseDeprecated { //~ warning: use of deprecated item warning: use of deprecated item 'MustUseDeprecated' --> $DIR/cfg-attr-multi-true.rs:19:5 | -LL | MustUseDeprecated::new(); //~ warning: use of deprecated item +LL | MustUseDeprecated::new(); | ^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'MustUseDeprecated' --> $DIR/cfg-attr-multi-true.rs:13:17 | -LL | fn new() -> MustUseDeprecated { //~ warning: use of deprecated item +LL | fn new() -> MustUseDeprecated { | ^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'MustUseDeprecated' --> $DIR/cfg-attr-multi-true.rs:14:9 | -LL | MustUseDeprecated {} //~ warning: use of deprecated item +LL | MustUseDeprecated {} | ^^^^^^^^^^^^^^^^^ warning: unused `MustUseDeprecated` that must be used --> $DIR/cfg-attr-multi-true.rs:19:5 | -LL | MustUseDeprecated::new(); //~ warning: use of deprecated item +LL | MustUseDeprecated::new(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/conditional-compilation/cfg-attr-parse.stderr b/src/test/ui/conditional-compilation/cfg-attr-parse.stderr index 36c7c817cb3..3dfbd6df256 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-parse.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-parse.stderr @@ -1,31 +1,31 @@ error: expected identifier, found `)` --> $DIR/cfg-attr-parse.rs:4:12 | -LL | #[cfg_attr()] //~ error: expected identifier, found `)` +LL | #[cfg_attr()] | ^ expected identifier error: expected `,`, found `)` --> $DIR/cfg-attr-parse.rs:8:17 | -LL | #[cfg_attr(all())] //~ error: expected `,`, found `)` +LL | #[cfg_attr(all())] | ^ expected `,` error: expected identifier, found `,` --> $DIR/cfg-attr-parse.rs:16:18 | -LL | #[cfg_attr(all(),,)] //~ ERROR expected identifier +LL | #[cfg_attr(all(),,)] | ^ expected identifier error: expected identifier, found `,` --> $DIR/cfg-attr-parse.rs:28:28 | -LL | #[cfg_attr(all(), must_use,,)] //~ ERROR expected identifier +LL | #[cfg_attr(all(), must_use,,)] | ^ expected identifier error: expected identifier, found `,` --> $DIR/cfg-attr-parse.rs:40:40 | -LL | #[cfg_attr(all(), must_use, deprecated,,)] //~ ERROR expected identifier +LL | #[cfg_attr(all(), must_use, deprecated,,)] | ^ expected identifier error: aborting due to 5 previous errors diff --git a/src/test/ui/conditional-compilation/cfg-attr-syntax-validation.stderr b/src/test/ui/conditional-compilation/cfg-attr-syntax-validation.stderr index 7dab2b2b53f..ae37461cab8 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-syntax-validation.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-syntax-validation.stderr @@ -1,55 +1,55 @@ error: `cfg` is not followed by parentheses --> $DIR/cfg-attr-syntax-validation.rs:1:1 | -LL | #[cfg] //~ ERROR `cfg` is not followed by parentheses +LL | #[cfg] | ^^^^^^ help: expected syntax is: `cfg(/* predicate */)` error: `cfg` is not followed by parentheses --> $DIR/cfg-attr-syntax-validation.rs:4:1 | -LL | #[cfg = 10] //~ ERROR `cfg` is not followed by parentheses +LL | #[cfg = 10] | ^^^^^^^^^^^ help: expected syntax is: `cfg(/* predicate */)` error: `cfg` predicate is not specified --> $DIR/cfg-attr-syntax-validation.rs:7:1 | -LL | #[cfg()] //~ ERROR `cfg` predicate is not specified +LL | #[cfg()] | ^^^^^^^^ error: multiple `cfg` predicates are specified --> $DIR/cfg-attr-syntax-validation.rs:10:10 | -LL | #[cfg(a, b)] //~ ERROR multiple `cfg` predicates are specified +LL | #[cfg(a, b)] | ^ error: `cfg` predicate key cannot be a literal --> $DIR/cfg-attr-syntax-validation.rs:13:7 | -LL | #[cfg("str")] //~ ERROR `cfg` predicate key cannot be a literal +LL | #[cfg("str")] | ^^^^^ error: `cfg` predicate key must be an identifier --> $DIR/cfg-attr-syntax-validation.rs:16:7 | -LL | #[cfg(a::b)] //~ ERROR `cfg` predicate key must be an identifier +LL | #[cfg(a::b)] | ^^^^ error[E0537]: invalid predicate `a` --> $DIR/cfg-attr-syntax-validation.rs:19:7 | -LL | #[cfg(a())] //~ ERROR invalid predicate `a` +LL | #[cfg(a())] | ^^^ error[E0565]: literal in `cfg` predicate value must be a string --> $DIR/cfg-attr-syntax-validation.rs:22:11 | -LL | #[cfg(a = 10)] //~ ERROR literal in `cfg` predicate value must be a string +LL | #[cfg(a = 10)] | ^^ error[E0565]: literal in `cfg` predicate value must be a string --> $DIR/cfg-attr-syntax-validation.rs:25:11 | -LL | #[cfg(a = b"hi")] //~ ERROR literal in `cfg` predicate value must be a string +LL | #[cfg(a = b"hi")] | ^^^^^ help: consider removing the prefix: `"hi"` error: expected unsuffixed literal or identifier, found `concat!("nonexistent")` diff --git a/src/test/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.stderr b/src/test/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.stderr index c5097c15c3c..d0b59c3994c 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.stderr @@ -1,7 +1,7 @@ error[E0658]: The attribute `unknown` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/cfg-attr-unknown-attribute-macro-expansion.rs:3:27 | -LL | #[cfg_attr(all(), unknown)] //~ ERROR `unknown` is currently unknown +LL | #[cfg_attr(all(), unknown)] | ^^^^^^^ ... LL | foo!(); diff --git a/src/test/ui/conflicting-repr-hints.stderr b/src/test/ui/conflicting-repr-hints.stderr index 148f1211b08..c39055f0172 100644 --- a/src/test/ui/conflicting-repr-hints.stderr +++ b/src/test/ui/conflicting-repr-hints.stderr @@ -1,49 +1,49 @@ warning[E0566]: conflicting representation hints --> $DIR/conflicting-repr-hints.rs:9:8 | -LL | #[repr(C, u64)] //~ WARNING conflicting representation hints +LL | #[repr(C, u64)] | ^ ^^^ warning[E0566]: conflicting representation hints --> $DIR/conflicting-repr-hints.rs:12:8 | -LL | #[repr(u32, u64)] //~ WARNING conflicting representation hints +LL | #[repr(u32, u64)] | ^^^ ^^^ error[E0587]: type has conflicting packed and align representation hints --> $DIR/conflicting-repr-hints.rs:19:1 | -LL | struct F(i32); //~ ERROR type has conflicting packed and align representation hints +LL | struct F(i32); | ^^^^^^^^^^^^^^ error[E0587]: type has conflicting packed and align representation hints --> $DIR/conflicting-repr-hints.rs:23:1 | -LL | struct G(i32); //~ ERROR type has conflicting packed and align representation hints +LL | struct G(i32); | ^^^^^^^^^^^^^^ error[E0587]: type has conflicting packed and align representation hints --> $DIR/conflicting-repr-hints.rs:27:1 | -LL | struct H(i32); //~ ERROR type has conflicting packed and align representation hints +LL | struct H(i32); | ^^^^^^^^^^^^^^ error[E0634]: type has conflicting packed representation hints --> $DIR/conflicting-repr-hints.rs:30:1 | -LL | struct I(i32); //~ ERROR type has conflicting packed representation hints +LL | struct I(i32); | ^^^^^^^^^^^^^^ error[E0634]: type has conflicting packed representation hints --> $DIR/conflicting-repr-hints.rs:34:1 | -LL | struct J(i32); //~ ERROR type has conflicting packed representation hints +LL | struct J(i32); | ^^^^^^^^^^^^^^ error[E0587]: type has conflicting packed and align representation hints --> $DIR/conflicting-repr-hints.rs:40:1 | -LL | / union X { //~ ERROR type has conflicting packed and align representation hints +LL | / union X { LL | | i: i32 LL | | } | |_^ @@ -51,7 +51,7 @@ LL | | } error[E0587]: type has conflicting packed and align representation hints --> $DIR/conflicting-repr-hints.rs:46:1 | -LL | / union Y { //~ ERROR type has conflicting packed and align representation hints +LL | / union Y { LL | | i: i32 LL | | } | |_^ @@ -59,7 +59,7 @@ LL | | } error[E0587]: type has conflicting packed and align representation hints --> $DIR/conflicting-repr-hints.rs:52:1 | -LL | / union Z { //~ ERROR type has conflicting packed and align representation hints +LL | / union Z { LL | | i: i32 LL | | } | |_^ diff --git a/src/test/ui/confuse-field-and-method/issue-2392.stderr b/src/test/ui/confuse-field-and-method/issue-2392.stderr index 0c09bd2284b..7cd1941d80e 100644 --- a/src/test/ui/confuse-field-and-method/issue-2392.stderr +++ b/src/test/ui/confuse-field-and-method/issue-2392.stderr @@ -4,7 +4,7 @@ error[E0599]: no method named `closure` found for type `Obj<[closure@$DIR/issue- LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this ... -LL | o_closure.closure(); //~ ERROR no method named `closure` found +LL | o_closure.closure(); | ^^^^^^^ field, not a method | = help: use `(o_closure.closure)(...)` if you meant to call the function stored in the `closure` field @@ -26,7 +26,7 @@ error[E0599]: no method named `closure` found for type `Obj u32 {func}>` LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this ... -LL | o_func.closure(); //~ ERROR no method named `closure` found +LL | o_func.closure(); | ^^^^^^^ field, not a method | = help: use `(o_func.closure)(...)` if you meant to call the function stored in the `closure` field @@ -37,7 +37,7 @@ error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the c LL | struct BoxedObj { | --------------- method `boxed_closure` not found for this ... -LL | boxed_fn.boxed_closure();//~ ERROR no method named `boxed_closure` found +LL | boxed_fn.boxed_closure(); | ^^^^^^^^^^^^^ field, not a method | = help: use `(boxed_fn.boxed_closure)(...)` if you meant to call the function stored in the `boxed_closure` field @@ -48,7 +48,7 @@ error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the c LL | struct BoxedObj { | --------------- method `boxed_closure` not found for this ... -LL | boxed_closure.boxed_closure();//~ ERROR no method named `boxed_closure` found +LL | boxed_closure.boxed_closure(); | ^^^^^^^^^^^^^ field, not a method | = help: use `(boxed_closure.boxed_closure)(...)` if you meant to call the function stored in the `boxed_closure` field @@ -59,7 +59,7 @@ error[E0599]: no method named `closure` found for type `Obj u32 {func}>` LL | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this ... -LL | w.wrap.closure();//~ ERROR no method named `closure` found +LL | w.wrap.closure(); | ^^^^^^^ field, not a method | = help: use `(w.wrap.closure)(...)` if you meant to call the function stored in the `closure` field @@ -81,7 +81,7 @@ error[E0599]: no method named `closure` found for type `Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this ... -LL | check_expression().closure();//~ ERROR no method named `closure` found +LL | check_expression().closure(); | ^^^^^^^ field, not a method | = help: use `(check_expression().closure)(...)` if you meant to call the function stored in the `closure` field @@ -92,7 +92,7 @@ error[E0599]: no method named `f1` found for type `FuncContainer` in the current LL | struct FuncContainer { | -------------------- method `f1` not found for this ... -LL | (*self.container).f1(1); //~ ERROR no method named `f1` found +LL | (*self.container).f1(1); | ^^ field, not a method | = help: use `((*self.container).f1)(...)` if you meant to call the function stored in the `f1` field @@ -103,7 +103,7 @@ error[E0599]: no method named `f2` found for type `FuncContainer` in the current LL | struct FuncContainer { | -------------------- method `f2` not found for this ... -LL | (*self.container).f2(1); //~ ERROR no method named `f2` found +LL | (*self.container).f2(1); | ^^ field, not a method | = help: use `((*self.container).f2)(...)` if you meant to call the function stored in the `f2` field @@ -114,7 +114,7 @@ error[E0599]: no method named `f3` found for type `FuncContainer` in the current LL | struct FuncContainer { | -------------------- method `f3` not found for this ... -LL | (*self.container).f3(1); //~ ERROR no method named `f3` found +LL | (*self.container).f3(1); | ^^ field, not a method | = help: use `((*self.container).f3)(...)` if you meant to call the function stored in the `f3` field diff --git a/src/test/ui/confuse-field-and-method/issue-33784.stderr b/src/test/ui/confuse-field-and-method/issue-33784.stderr index 73bcf0fd9c0..cce961f1e4e 100644 --- a/src/test/ui/confuse-field-and-method/issue-33784.stderr +++ b/src/test/ui/confuse-field-and-method/issue-33784.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `closure` found for type `&Obj<[closure@$DIR/issue-33784.rs:25:43: 25:48]>` in the current scope --> $DIR/issue-33784.rs:27:7 | -LL | p.closure(); //~ ERROR no method named `closure` found +LL | p.closure(); | ^^^^^^^ field, not a method | = help: use `(p.closure)(...)` if you meant to call the function stored in the `closure` field @@ -9,7 +9,7 @@ LL | p.closure(); //~ ERROR no method named `closure` found error[E0599]: no method named `fn_ptr` found for type `&&Obj<[closure@$DIR/issue-33784.rs:25:43: 25:48]>` in the current scope --> $DIR/issue-33784.rs:29:7 | -LL | q.fn_ptr(); //~ ERROR no method named `fn_ptr` found +LL | q.fn_ptr(); | ^^^^^^ field, not a method | = help: use `(q.fn_ptr)(...)` if you meant to call the function stored in the `fn_ptr` field @@ -17,7 +17,7 @@ LL | q.fn_ptr(); //~ ERROR no method named `fn_ptr` found error[E0599]: no method named `c_fn_ptr` found for type `&D` in the current scope --> $DIR/issue-33784.rs:32:7 | -LL | s.c_fn_ptr(); //~ ERROR no method named `c_fn_ptr` found +LL | s.c_fn_ptr(); | ^^^^^^^^ field, not a method | = help: use `(s.c_fn_ptr)(...)` if you meant to call the function stored in the `c_fn_ptr` field diff --git a/src/test/ui/confuse-field-and-method/private-field.stderr b/src/test/ui/confuse-field-and-method/private-field.stderr index e3058ad0a9e..97c949e32e3 100644 --- a/src/test/ui/confuse-field-and-method/private-field.stderr +++ b/src/test/ui/confuse-field-and-method/private-field.stderr @@ -4,7 +4,7 @@ error[E0599]: no method named `dog_age` found for type `animal::Dog` in the curr LL | pub struct Dog { | -------------- method `dog_age` not found for this ... -LL | let dog_age = dog.dog_age(); //~ ERROR no method +LL | let dog_age = dog.dog_age(); | ^^^^^^^ private field, not a method error: aborting due to previous error diff --git a/src/test/ui/const-generics/const-expression-parameter.stderr b/src/test/ui/const-generics/const-expression-parameter.stderr index 2741d621256..2f7a80f0c8f 100644 --- a/src/test/ui/const-generics/const-expression-parameter.stderr +++ b/src/test/ui/const-generics/const-expression-parameter.stderr @@ -1,13 +1,13 @@ error: expected identifier, found `<-` --> $DIR/const-expression-parameter.rs:9:19 | -LL | i32_identity::<-1>(); //~ ERROR expected identifier, found `<-` +LL | i32_identity::<-1>(); | ^^ expected identifier error: expected one of `,` or `>`, found `+` --> $DIR/const-expression-parameter.rs:13:22 | -LL | i32_identity::<1 + 2>(); //~ ERROR expected one of `,` or `>`, found `+` +LL | i32_identity::<1 + 2>(); | ^ expected one of `,` or `>` here warning: the feature `const_generics` is incomplete and may cause the compiler to crash diff --git a/src/test/ui/const-generics/const-fn-with-const-param.stderr b/src/test/ui/const-generics/const-fn-with-const-param.stderr index 94d2afa25b4..c0cd7bace47 100644 --- a/src/test/ui/const-generics/const-fn-with-const-param.stderr +++ b/src/test/ui/const-generics/const-fn-with-const-param.stderr @@ -8,7 +8,7 @@ error: const parameters are not permitted in `const fn` --> $DIR/const-fn-with-const-param.rs:4:1 | LL | / const fn const_u32_identity() -> u32 { -LL | | //~^ ERROR const parameters are not permitted in `const fn` +LL | | LL | | X LL | | } | |_^ diff --git a/src/test/ui/const-generics/const-param-from-outer-fn.stderr b/src/test/ui/const-generics/const-param-from-outer-fn.stderr index f40b527d716..e37b34fac33 100644 --- a/src/test/ui/const-generics/const-param-from-outer-fn.stderr +++ b/src/test/ui/const-generics/const-param-from-outer-fn.stderr @@ -11,7 +11,7 @@ LL | fn foo() { | - const variable from outer function LL | fn bar() -> u32 { | --- try adding a local generic parameter in this method instead -LL | X //~ ERROR can't use generic parameters from outer function +LL | X | ^ use of generic parameter from outer function error: aborting due to previous error diff --git a/src/test/ui/const-generics/invalid-constant-in-args.stderr b/src/test/ui/const-generics/invalid-constant-in-args.stderr index 1623f645124..b9f874ff18b 100644 --- a/src/test/ui/const-generics/invalid-constant-in-args.stderr +++ b/src/test/ui/const-generics/invalid-constant-in-args.stderr @@ -1,7 +1,7 @@ error[E0107]: wrong number of const arguments: expected 0, found 1 --> $DIR/invalid-constant-in-args.rs:2:22 | -LL | let _: Vec<&str, "a"> = Vec::new(); //~ ERROR wrong number of const arguments +LL | let _: Vec<&str, "a"> = Vec::new(); | ^^^ unexpected const argument error: aborting due to previous error diff --git a/src/test/ui/consts/const-array-oob-arith.stderr b/src/test/ui/consts/const-array-oob-arith.stderr index edd3095b0fc..00286b0b0e0 100644 --- a/src/test/ui/consts/const-array-oob-arith.stderr +++ b/src/test/ui/consts/const-array-oob-arith.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/const-array-oob-arith.rs:7:45 | -LL | const BLUB: [i32; (ARR[0] - 40) as usize] = [5]; //~ ERROR: mismatched types +LL | const BLUB: [i32; (ARR[0] - 40) as usize] = [5]; | ^^^ expected an array with a fixed size of 2 elements, found one with 1 elements | = note: expected type `[i32; 2]` @@ -10,7 +10,7 @@ LL | const BLUB: [i32; (ARR[0] - 40) as usize] = [5]; //~ ERROR: mismatched type error[E0308]: mismatched types --> $DIR/const-array-oob-arith.rs:8:44 | -LL | const BOO: [i32; (ARR[0] - 41) as usize] = [5, 99]; //~ ERROR: mismatched types +LL | const BOO: [i32; (ARR[0] - 41) as usize] = [5, 99]; | ^^^^^^^ expected an array with a fixed size of 1 elements, found one with 2 elements | = note: expected type `[i32; 1]` diff --git a/src/test/ui/consts/const-cast-different-types.stderr b/src/test/ui/consts/const-cast-different-types.stderr index ced9b9fb3c7..9960ccb4166 100644 --- a/src/test/ui/consts/const-cast-different-types.stderr +++ b/src/test/ui/consts/const-cast-different-types.stderr @@ -1,13 +1,13 @@ error[E0606]: casting `&'static str` as `*const u8` is invalid --> $DIR/const-cast-different-types.rs:2:23 | -LL | static b: *const u8 = a as *const u8; //~ ERROR casting +LL | static b: *const u8 = a as *const u8; | ^^^^^^^^^^^^^^ error[E0606]: casting `&&'static str` as `*const u8` is invalid --> $DIR/const-cast-different-types.rs:3:23 | -LL | static c: *const u8 = &a as *const u8; //~ ERROR casting +LL | static c: *const u8 = &a as *const u8; | ^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/consts/const-cast-wrong-type.stderr b/src/test/ui/consts/const-cast-wrong-type.stderr index 7684822d939..ad816d9297b 100644 --- a/src/test/ui/consts/const-cast-wrong-type.stderr +++ b/src/test/ui/consts/const-cast-wrong-type.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/const-cast-wrong-type.rs:2:23 | -LL | static b: *const i8 = &a as *const i8; //~ ERROR mismatched types +LL | static b: *const i8 = &a as *const i8; | ^^^^^^^^^^^^^^^ expected u8, found i8 error: aborting due to previous error diff --git a/src/test/ui/consts/const-err-early.stderr b/src/test/ui/consts/const-err-early.stderr index a64f0e25949..a61f9b303aa 100644 --- a/src/test/ui/consts/const-err-early.stderr +++ b/src/test/ui/consts/const-err-early.stderr @@ -1,7 +1,7 @@ error: any use of this value will cause an error --> $DIR/const-err-early.rs:3:1 | -LL | pub const A: i8 = -std::i8::MIN; //~ ERROR const_err +LL | pub const A: i8 = -std::i8::MIN; | ^^^^^^^^^^^^^^^^^^-------------^ | | | attempt to negate with overflow @@ -15,7 +15,7 @@ LL | #![deny(const_err)] error: any use of this value will cause an error --> $DIR/const-err-early.rs:4:1 | -LL | pub const B: u8 = 200u8 + 200u8; //~ ERROR const_err +LL | pub const B: u8 = 200u8 + 200u8; | ^^^^^^^^^^^^^^^^^^-------------^ | | | attempt to add with overflow @@ -23,7 +23,7 @@ LL | pub const B: u8 = 200u8 + 200u8; //~ ERROR const_err error: any use of this value will cause an error --> $DIR/const-err-early.rs:5:1 | -LL | pub const C: u8 = 200u8 * 4; //~ ERROR const_err +LL | pub const C: u8 = 200u8 * 4; | ^^^^^^^^^^^^^^^^^^---------^ | | | attempt to multiply with overflow @@ -31,7 +31,7 @@ LL | pub const C: u8 = 200u8 * 4; //~ ERROR const_err error: any use of this value will cause an error --> $DIR/const-err-early.rs:6:1 | -LL | pub const D: u8 = 42u8 - (42u8 + 1); //~ ERROR const_err +LL | pub const D: u8 = 42u8 - (42u8 + 1); | ^^^^^^^^^^^^^^^^^^-----------------^ | | | attempt to subtract with overflow @@ -39,7 +39,7 @@ LL | pub const D: u8 = 42u8 - (42u8 + 1); //~ ERROR const_err error: any use of this value will cause an error --> $DIR/const-err-early.rs:7:1 | -LL | pub const E: u8 = [5u8][1]; //~ ERROR const_err +LL | pub const E: u8 = [5u8][1]; | ^^^^^^^^^^^^^^^^^^--------^ | | | index out of bounds: the len is 1 but the index is 1 diff --git a/src/test/ui/consts/const-eval/assign-to-static-within-other-static-2.stderr b/src/test/ui/consts/const-eval/assign-to-static-within-other-static-2.stderr index be1be6c0600..148b1210d39 100644 --- a/src/test/ui/consts/const-eval/assign-to-static-within-other-static-2.stderr +++ b/src/test/ui/consts/const-eval/assign-to-static-within-other-static-2.stderr @@ -1,7 +1,7 @@ error[E0019]: static contains unimplemented expression type --> $DIR/assign-to-static-within-other-static-2.rs:16:5 | -LL | *FOO.0.get() = 5; //~ ERROR contains unimplemented expression type +LL | *FOO.0.get() = 5; | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/consts/const-eval/assign-to-static-within-other-static.stderr b/src/test/ui/consts/const-eval/assign-to-static-within-other-static.stderr index 31e49dc10ca..02b72765b37 100644 --- a/src/test/ui/consts/const-eval/assign-to-static-within-other-static.stderr +++ b/src/test/ui/consts/const-eval/assign-to-static-within-other-static.stderr @@ -1,7 +1,7 @@ error: cannot mutate statics in the initializer of another static --> $DIR/assign-to-static-within-other-static.rs:10:5 | -LL | FOO = 5; //~ ERROR cannot mutate statics in the initializer of another static +LL | FOO = 5; | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/consts/const-eval/const-eval-overflow2.stderr b/src/test/ui/consts/const-eval/const-eval-overflow2.stderr index 5ec2a2feb09..44ee8b336c8 100644 --- a/src/test/ui/consts/const-eval/const-eval-overflow2.stderr +++ b/src/test/ui/consts/const-eval/const-eval-overflow2.stderr @@ -1,7 +1,7 @@ error: any use of this value will cause an error --> $DIR/const-eval-overflow2.rs:14:1 | -LL | / const VALS_I8: (i8,) = //~ ERROR any use of this value will cause an error +LL | / const VALS_I8: (i8,) = LL | | ( LL | | i8::MIN - 1, | | ----------- attempt to subtract with overflow @@ -17,7 +17,7 @@ LL | #![deny(const_err)] error: any use of this value will cause an error --> $DIR/const-eval-overflow2.rs:19:1 | -LL | / const VALS_I16: (i16,) = //~ ERROR any use of this value will cause an error +LL | / const VALS_I16: (i16,) = LL | | ( LL | | i16::MIN - 1, | | ------------ attempt to subtract with overflow @@ -27,7 +27,7 @@ LL | | ); error: any use of this value will cause an error --> $DIR/const-eval-overflow2.rs:24:1 | -LL | / const VALS_I32: (i32,) = //~ ERROR any use of this value will cause an error +LL | / const VALS_I32: (i32,) = LL | | ( LL | | i32::MIN - 1, | | ------------ attempt to subtract with overflow @@ -37,7 +37,7 @@ LL | | ); error: any use of this value will cause an error --> $DIR/const-eval-overflow2.rs:29:1 | -LL | / const VALS_I64: (i64,) = //~ ERROR any use of this value will cause an error +LL | / const VALS_I64: (i64,) = LL | | ( LL | | i64::MIN - 1, | | ------------ attempt to subtract with overflow @@ -47,7 +47,7 @@ LL | | ); error: any use of this value will cause an error --> $DIR/const-eval-overflow2.rs:34:1 | -LL | / const VALS_U8: (u8,) = //~ ERROR any use of this value will cause an error +LL | / const VALS_U8: (u8,) = LL | | ( LL | | u8::MIN - 1, | | ----------- attempt to subtract with overflow @@ -57,7 +57,7 @@ LL | | ); error: any use of this value will cause an error --> $DIR/const-eval-overflow2.rs:39:1 | -LL | / const VALS_U16: (u16,) = ( //~ ERROR any use of this value will cause an error +LL | / const VALS_U16: (u16,) = ( LL | | u16::MIN - 1, | | ------------ attempt to subtract with overflow LL | | ); @@ -66,7 +66,7 @@ LL | | ); error: any use of this value will cause an error --> $DIR/const-eval-overflow2.rs:43:1 | -LL | / const VALS_U32: (u32,) = ( //~ ERROR any use of this value will cause an error +LL | / const VALS_U32: (u32,) = ( LL | | u32::MIN - 1, | | ------------ attempt to subtract with overflow LL | | ); @@ -75,7 +75,7 @@ LL | | ); error: any use of this value will cause an error --> $DIR/const-eval-overflow2.rs:47:1 | -LL | / const VALS_U64: (u64,) = //~ ERROR any use of this value will cause an error +LL | / const VALS_U64: (u64,) = LL | | ( LL | | u64::MIN - 1, | | ------------ attempt to subtract with overflow diff --git a/src/test/ui/consts/const-eval/const-eval-overflow2b.stderr b/src/test/ui/consts/const-eval/const-eval-overflow2b.stderr index 7866b6c30c3..69e165bef4a 100644 --- a/src/test/ui/consts/const-eval/const-eval-overflow2b.stderr +++ b/src/test/ui/consts/const-eval/const-eval-overflow2b.stderr @@ -1,7 +1,7 @@ error: any use of this value will cause an error --> $DIR/const-eval-overflow2b.rs:14:1 | -LL | / const VALS_I8: (i8,) = //~ ERROR any use of this value will cause an error +LL | / const VALS_I8: (i8,) = LL | | ( LL | | i8::MAX + 1, | | ----------- attempt to add with overflow @@ -17,7 +17,7 @@ LL | #![deny(const_err)] error: any use of this value will cause an error --> $DIR/const-eval-overflow2b.rs:19:1 | -LL | / const VALS_I16: (i16,) = //~ ERROR any use of this value will cause an error +LL | / const VALS_I16: (i16,) = LL | | ( LL | | i16::MAX + 1, | | ------------ attempt to add with overflow @@ -27,7 +27,7 @@ LL | | ); error: any use of this value will cause an error --> $DIR/const-eval-overflow2b.rs:24:1 | -LL | / const VALS_I32: (i32,) = //~ ERROR any use of this value will cause an error +LL | / const VALS_I32: (i32,) = LL | | ( LL | | i32::MAX + 1, | | ------------ attempt to add with overflow @@ -37,7 +37,7 @@ LL | | ); error: any use of this value will cause an error --> $DIR/const-eval-overflow2b.rs:29:1 | -LL | / const VALS_I64: (i64,) = //~ ERROR any use of this value will cause an error +LL | / const VALS_I64: (i64,) = LL | | ( LL | | i64::MAX + 1, | | ------------ attempt to add with overflow @@ -47,7 +47,7 @@ LL | | ); error: any use of this value will cause an error --> $DIR/const-eval-overflow2b.rs:34:1 | -LL | / const VALS_U8: (u8,) = //~ ERROR any use of this value will cause an error +LL | / const VALS_U8: (u8,) = LL | | ( LL | | u8::MAX + 1, | | ----------- attempt to add with overflow @@ -57,7 +57,7 @@ LL | | ); error: any use of this value will cause an error --> $DIR/const-eval-overflow2b.rs:39:1 | -LL | / const VALS_U16: (u16,) = ( //~ ERROR any use of this value will cause an error +LL | / const VALS_U16: (u16,) = ( LL | | u16::MAX + 1, | | ------------ attempt to add with overflow LL | | ); @@ -66,7 +66,7 @@ LL | | ); error: any use of this value will cause an error --> $DIR/const-eval-overflow2b.rs:43:1 | -LL | / const VALS_U32: (u32,) = ( //~ ERROR any use of this value will cause an error +LL | / const VALS_U32: (u32,) = ( LL | | u32::MAX + 1, | | ------------ attempt to add with overflow LL | | ); @@ -75,7 +75,7 @@ LL | | ); error: any use of this value will cause an error --> $DIR/const-eval-overflow2b.rs:47:1 | -LL | / const VALS_U64: (u64,) = //~ ERROR any use of this value will cause an error +LL | / const VALS_U64: (u64,) = LL | | ( LL | | u64::MAX + 1, | | ------------ attempt to add with overflow diff --git a/src/test/ui/consts/const-eval/const-eval-overflow2c.stderr b/src/test/ui/consts/const-eval/const-eval-overflow2c.stderr index 5370fdd25d8..ba606f6d09d 100644 --- a/src/test/ui/consts/const-eval/const-eval-overflow2c.stderr +++ b/src/test/ui/consts/const-eval/const-eval-overflow2c.stderr @@ -1,7 +1,7 @@ error: any use of this value will cause an error --> $DIR/const-eval-overflow2c.rs:14:1 | -LL | / const VALS_I8: (i8,) = //~ ERROR any use of this value will cause an error +LL | / const VALS_I8: (i8,) = LL | | ( LL | | i8::MIN * 2, | | ----------- attempt to multiply with overflow @@ -17,7 +17,7 @@ LL | #![deny(const_err)] error: any use of this value will cause an error --> $DIR/const-eval-overflow2c.rs:19:1 | -LL | / const VALS_I16: (i16,) = //~ ERROR any use of this value will cause an error +LL | / const VALS_I16: (i16,) = LL | | ( LL | | i16::MIN * 2, | | ------------ attempt to multiply with overflow @@ -27,7 +27,7 @@ LL | | ); error: any use of this value will cause an error --> $DIR/const-eval-overflow2c.rs:24:1 | -LL | / const VALS_I32: (i32,) = //~ ERROR any use of this value will cause an error +LL | / const VALS_I32: (i32,) = LL | | ( LL | | i32::MIN * 2, | | ------------ attempt to multiply with overflow @@ -37,7 +37,7 @@ LL | | ); error: any use of this value will cause an error --> $DIR/const-eval-overflow2c.rs:29:1 | -LL | / const VALS_I64: (i64,) = //~ ERROR any use of this value will cause an error +LL | / const VALS_I64: (i64,) = LL | | ( LL | | i64::MIN * 2, | | ------------ attempt to multiply with overflow @@ -47,7 +47,7 @@ LL | | ); error: any use of this value will cause an error --> $DIR/const-eval-overflow2c.rs:34:1 | -LL | / const VALS_U8: (u8,) = //~ ERROR any use of this value will cause an error +LL | / const VALS_U8: (u8,) = LL | | ( LL | | u8::MAX * 2, | | ----------- attempt to multiply with overflow @@ -57,7 +57,7 @@ LL | | ); error: any use of this value will cause an error --> $DIR/const-eval-overflow2c.rs:39:1 | -LL | / const VALS_U16: (u16,) = ( //~ ERROR any use of this value will cause an error +LL | / const VALS_U16: (u16,) = ( LL | | u16::MAX * 2, | | ------------ attempt to multiply with overflow LL | | ); @@ -66,7 +66,7 @@ LL | | ); error: any use of this value will cause an error --> $DIR/const-eval-overflow2c.rs:43:1 | -LL | / const VALS_U32: (u32,) = ( //~ ERROR any use of this value will cause an error +LL | / const VALS_U32: (u32,) = ( LL | | u32::MAX * 2, | | ------------ attempt to multiply with overflow LL | | ); @@ -75,7 +75,7 @@ LL | | ); error: any use of this value will cause an error --> $DIR/const-eval-overflow2c.rs:47:1 | -LL | / const VALS_U64: (u64,) = //~ ERROR any use of this value will cause an error +LL | / const VALS_U64: (u64,) = LL | | ( LL | | u64::MAX * 2, | | ------------ attempt to multiply with overflow diff --git a/src/test/ui/consts/const-eval/const_raw_ptr_ops.stderr b/src/test/ui/consts/const-eval/const_raw_ptr_ops.stderr index 6be54c0bad4..773441182b4 100644 --- a/src/test/ui/consts/const-eval/const_raw_ptr_ops.stderr +++ b/src/test/ui/consts/const-eval/const_raw_ptr_ops.stderr @@ -1,7 +1,7 @@ error: any use of this value will cause an error --> $DIR/const_raw_ptr_ops.rs:6:1 | -LL | const X: bool = unsafe { &1 as *const i32 == &2 as *const i32 }; //~ ERROR any use of this +LL | const X: bool = unsafe { &1 as *const i32 == &2 as *const i32 }; | ^^^^^^^^^^^^^^^^^^^^^^^^^------------------------------------^^^ | | | "pointer arithmetic or comparison" needs an rfc before being allowed inside constants @@ -11,7 +11,7 @@ LL | const X: bool = unsafe { &1 as *const i32 == &2 as *const i32 }; //~ ERROR error: any use of this value will cause an error --> $DIR/const_raw_ptr_ops.rs:12:1 | -LL | const Y2: usize = unsafe { &1 as *const i32 as usize + 1 }; //~ ERROR any use of this +LL | const Y2: usize = unsafe { &1 as *const i32 as usize + 1 }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^-----------------------------^^^ | | | "pointer arithmetic or comparison" needs an rfc before being allowed inside constants @@ -19,7 +19,7 @@ LL | const Y2: usize = unsafe { &1 as *const i32 as usize + 1 }; //~ ERROR any u error: any use of this value will cause an error --> $DIR/const_raw_ptr_ops.rs:16:1 | -LL | const Z2: i32 = unsafe { *(42 as *const i32) }; //~ ERROR any use of this value will cause +LL | const Z2: i32 = unsafe { *(42 as *const i32) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^-------------------^^^ | | | a memory access tried to interpret some bytes as a pointer @@ -27,7 +27,7 @@ LL | const Z2: i32 = unsafe { *(42 as *const i32) }; //~ ERROR any use of this v error: any use of this value will cause an error --> $DIR/const_raw_ptr_ops.rs:17:1 | -LL | const Z3: i32 = unsafe { *(44 as *const i32) }; //~ ERROR any use of this value will cause +LL | const Z3: i32 = unsafe { *(44 as *const i32) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^-------------------^^^ | | | a memory access tried to interpret some bytes as a pointer diff --git a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr index fdbc4cb0c8d..d79666688fa 100644 --- a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr +++ b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr @@ -1,7 +1,7 @@ error: `foo` is not yet stable as a const fn --> $DIR/dont_promote_unstable_const_fn.rs:15:25 | -LL | const fn bar() -> u32 { foo() } //~ ERROR `foo` is not yet stable as a const fn +LL | const fn bar() -> u32 { foo() } | ^^^^^ | = help: add `#![feature(foo)]` to the crate attributes to enable @@ -9,7 +9,7 @@ LL | const fn bar() -> u32 { foo() } //~ ERROR `foo` is not yet stable as a cons error[E0597]: borrowed value does not live long enough --> $DIR/dont_promote_unstable_const_fn.rs:18:28 | -LL | let _: &'static u32 = &foo(); //~ ERROR does not live long enough +LL | let _: &'static u32 = &foo(); | ^^^^^ temporary value does not live long enough LL | } | - temporary value only lives until here @@ -19,7 +19,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/dont_promote_unstable_const_fn.rs:22:28 | -LL | let _: &'static u32 = &meh(); //~ ERROR does not live long enough +LL | let _: &'static u32 = &meh(); | ^^^^^ temporary value does not live long enough ... LL | } @@ -32,7 +32,7 @@ error[E0597]: borrowed value does not live long enough | LL | let x: &'static _ = &std::time::Duration::from_millis(42).subsec_millis(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | //~^ ERROR does not live long enough +LL | LL | } | - temporary value only lives until here | diff --git a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.stderr b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.stderr index 8be7add2200..516c008e720 100644 --- a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.stderr +++ b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.stderr @@ -1,9 +1,9 @@ error[E0597]: borrowed value does not live long enough --> $DIR/dont_promote_unstable_const_fn_cross_crate.rs:8:28 | -LL | let _: &'static u32 = &foo(); //~ ERROR does not live long enough +LL | let _: &'static u32 = &foo(); | ^^^^^ temporary value does not live long enough -LL | let _x: &'static u32 = &foo(); //~ ERROR does not live long enough +LL | let _x: &'static u32 = &foo(); LL | } | - temporary value only lives until here | @@ -12,7 +12,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/dont_promote_unstable_const_fn_cross_crate.rs:9:29 | -LL | let _x: &'static u32 = &foo(); //~ ERROR does not live long enough +LL | let _x: &'static u32 = &foo(); | ^^^^^ temporary value does not live long enough LL | } | - temporary value only lives until here diff --git a/src/test/ui/consts/const-eval/double_check2.stderr b/src/test/ui/consts/const-eval/double_check2.stderr index 06b38bf7103..2b61d33852c 100644 --- a/src/test/ui/consts/const-eval/double_check2.stderr +++ b/src/test/ui/consts/const-eval/double_check2.stderr @@ -1,7 +1,7 @@ error[E0080]: it is undefined behavior to use this value --> $DIR/double_check2.rs:15:1 | -LL | / static FOO: (&Foo, &Bar) = unsafe {( //~ undefined behavior +LL | / static FOO: (&Foo, &Bar) = unsafe {( LL | | Union { u8: &BAR }.foo, LL | | Union { u8: &BAR }.bar, LL | | )}; diff --git a/src/test/ui/consts/const-eval/feature-gate-const_fn_union.stderr b/src/test/ui/consts/const-eval/feature-gate-const_fn_union.stderr index c562c66389f..5a72c8205b6 100644 --- a/src/test/ui/consts/const-eval/feature-gate-const_fn_union.stderr +++ b/src/test/ui/consts/const-eval/feature-gate-const_fn_union.stderr @@ -1,7 +1,7 @@ error[E0658]: unions in const fn are unstable (see issue #51909) --> $DIR/feature-gate-const_fn_union.rs:11:5 | -LL | Foo { u }.i //~ ERROR unions in const fn are unstable +LL | Foo { u }.i | ^^^^^^^^^^^ | = help: add #![feature(const_fn_union)] to the crate attributes to enable diff --git a/src/test/ui/consts/const-eval/index_out_of_bounds_propagated.stderr b/src/test/ui/consts/const-eval/index_out_of_bounds_propagated.stderr index 1a9e1b0ae85..ac045f29b11 100644 --- a/src/test/ui/consts/const-eval/index_out_of_bounds_propagated.stderr +++ b/src/test/ui/consts/const-eval/index_out_of_bounds_propagated.stderr @@ -1,7 +1,7 @@ error: index out of bounds: the len is 1 but the index is 1 --> $DIR/index_out_of_bounds_propagated.rs:3:5 | -LL | array[1]; //~ ERROR index out of bounds +LL | array[1]; | ^^^^^^^^ | = note: #[deny(const_err)] on by default diff --git a/src/test/ui/consts/const-eval/infinite_loop.stderr b/src/test/ui/consts/const-eval/infinite_loop.stderr index 422c2bab6ea..ee696c5439f 100644 --- a/src/test/ui/consts/const-eval/infinite_loop.stderr +++ b/src/test/ui/consts/const-eval/infinite_loop.stderr @@ -1,9 +1,9 @@ error[E0019]: constant contains unimplemented expression type --> $DIR/infinite_loop.rs:7:9 | -LL | / while n != 0 { //~ ERROR constant contains unimplemented expression type +LL | / while n != 0 { LL | | n = if n % 2 == 0 { n/2 } else { 3*n + 1 }; -LL | | //~^ ERROR evaluation of constant value failed +LL | | LL | | } | |_________^ @@ -12,9 +12,9 @@ warning: Constant evaluating a complex constant, this might take some time | LL | let _ = [(); { | __________________^ -LL | | //~^ WARNING Constant evaluating a complex constant, this might take some time +LL | | LL | | let mut n = 113383; // #20 in https://oeis.org/A006884 -LL | | while n != 0 { //~ ERROR constant contains unimplemented expression type +LL | | while n != 0 { ... | LL | | n LL | | }]; diff --git a/src/test/ui/consts/const-eval/issue-50814-2.stderr b/src/test/ui/consts/const-eval/issue-50814-2.stderr index 7c2cd7c5ca0..29ebc31b634 100644 --- a/src/test/ui/consts/const-eval/issue-50814-2.stderr +++ b/src/test/ui/consts/const-eval/issue-50814-2.stderr @@ -1,7 +1,7 @@ error: any use of this value will cause an error --> $DIR/issue-50814-2.rs:12:5 | -LL | const BAR: usize = [5, 6, 7][T::BOO]; //~ ERROR any use of this value will cause an error +LL | const BAR: usize = [5, 6, 7][T::BOO]; | ^^^^^^^^^^^^^^^^^^^-----------------^ | | | index out of bounds: the len is 3 but the index is 42 @@ -11,7 +11,7 @@ LL | const BAR: usize = [5, 6, 7][T::BOO]; //~ ERROR any use of this value w error[E0080]: evaluation of constant expression failed --> $DIR/issue-50814-2.rs:16:5 | -LL | & as Foo>::BAR //~ ERROR E0080 +LL | & as Foo>::BAR | ^--------------------- | | | referenced constant has errors diff --git a/src/test/ui/consts/const-eval/issue-50814.stderr b/src/test/ui/consts/const-eval/issue-50814.stderr index 757e55fe31d..6fbfb4d11fe 100644 --- a/src/test/ui/consts/const-eval/issue-50814.stderr +++ b/src/test/ui/consts/const-eval/issue-50814.stderr @@ -1,7 +1,7 @@ error: any use of this value will cause an error --> $DIR/issue-50814.rs:13:5 | -LL | const MAX: u8 = A::MAX + B::MAX; //~ ERROR any use of this value will cause an error +LL | const MAX: u8 = A::MAX + B::MAX; | ^^^^^^^^^^^^^^^^---------------^ | | | attempt to add with overflow @@ -11,7 +11,7 @@ LL | const MAX: u8 = A::MAX + B::MAX; //~ ERROR any use of this value will c error[E0080]: evaluation of constant expression failed --> $DIR/issue-50814.rs:17:5 | -LL | &Sum::::MAX //~ ERROR E0080 +LL | &Sum::::MAX | ^----------------- | | | referenced constant has errors diff --git a/src/test/ui/consts/const-eval/issue-52442.stderr b/src/test/ui/consts/const-eval/issue-52442.stderr index 516796c1a42..2352ecba689 100644 --- a/src/test/ui/consts/const-eval/issue-52442.stderr +++ b/src/test/ui/consts/const-eval/issue-52442.stderr @@ -1,13 +1,13 @@ error[E0019]: constant contains unimplemented expression type --> $DIR/issue-52442.rs:2:14 | -LL | [(); { &loop { break } as *const _ as usize } ]; //~ ERROR unimplemented expression type +LL | [(); { &loop { break } as *const _ as usize } ]; | ^^^^^^^^^^^^^^ error[E0080]: it is undefined behavior to use this value --> $DIR/issue-52442.rs:2:11 | -LL | [(); { &loop { break } as *const _ as usize } ]; //~ ERROR unimplemented expression type +LL | [(); { &loop { break } as *const _ as usize } ]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a pointer, but expected initialized plain (non-pointer) bytes | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior diff --git a/src/test/ui/consts/const-eval/issue-52475.stderr b/src/test/ui/consts/const-eval/issue-52475.stderr index 4f1b2ab4c8f..605c71d5a6b 100644 --- a/src/test/ui/consts/const-eval/issue-52475.stderr +++ b/src/test/ui/consts/const-eval/issue-52475.stderr @@ -1,8 +1,8 @@ error[E0019]: constant contains unimplemented expression type --> $DIR/issue-52475.rs:6:9 | -LL | / while n < 5 { //~ ERROR constant contains unimplemented expression type -LL | | n = (n + 1) % 5; //~ ERROR evaluation of constant value failed +LL | / while n < 5 { +LL | | n = (n + 1) % 5; LL | | x = &0; // Materialize a new AllocId LL | | } | |_________^ @@ -12,7 +12,7 @@ warning: Constant evaluating a complex constant, this might take some time | LL | let _ = [(); { | __________________^ -LL | | //~^ WARNING Constant evaluating a complex constant, this might take some time +LL | | LL | | let mut x = &0; LL | | let mut n = 0; ... | @@ -23,7 +23,7 @@ LL | | }]; error[E0080]: evaluation of constant value failed --> $DIR/issue-52475.rs:7:17 | -LL | n = (n + 1) % 5; //~ ERROR evaluation of constant value failed +LL | n = (n + 1) % 5; | ^^^^^^^^^^^ duplicate interpreter state observed here, const evaluation will never terminate error: aborting due to 2 previous errors diff --git a/src/test/ui/consts/const-eval/match-test-ptr-null.stderr b/src/test/ui/consts/const-eval/match-test-ptr-null.stderr index 94615c019fe..fd5647c9af3 100644 --- a/src/test/ui/consts/const-eval/match-test-ptr-null.stderr +++ b/src/test/ui/consts/const-eval/match-test-ptr-null.stderr @@ -1,7 +1,7 @@ error[E0658]: casting pointers to integers in constants is unstable (see issue #51910) --> $DIR/match-test-ptr-null.rs:6:15 | -LL | match &1 as *const i32 as usize { //~ ERROR casting pointers to integers in constants +LL | match &1 as *const i32 as usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable @@ -9,13 +9,13 @@ LL | match &1 as *const i32 as usize { //~ ERROR casting pointers to int error[E0019]: constant contains unimplemented expression type --> $DIR/match-test-ptr-null.rs:7:13 | -LL | 0 => 42, //~ ERROR constant contains unimplemented expression type +LL | 0 => 42, | ^ error[E0080]: evaluation of constant value failed --> $DIR/match-test-ptr-null.rs:7:13 | -LL | 0 => 42, //~ ERROR constant contains unimplemented expression type +LL | 0 => 42, | ^ "pointer arithmetic or comparison" needs an rfc before being allowed inside constants error: aborting due to 3 previous errors diff --git a/src/test/ui/consts/const-eval/promoted_const_fn_fail.stderr b/src/test/ui/consts/const-eval/promoted_const_fn_fail.stderr index 9316d48ab43..c9a357d0f1b 100644 --- a/src/test/ui/consts/const-eval/promoted_const_fn_fail.stderr +++ b/src/test/ui/consts/const-eval/promoted_const_fn_fail.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/promoted_const_fn_fail.rs:20:27 | -LL | let x: &'static u8 = &(bar() + 1); //~ ERROR does not live long enough +LL | let x: &'static u8 = &(bar() + 1); | ^^^^^^^^^^^ temporary value does not live long enough ... LL | } diff --git a/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.stderr b/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.stderr index 9d1dcfafa63..5a0654cc0c1 100644 --- a/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.stderr +++ b/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.stderr @@ -12,7 +12,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/promoted_raw_ptr_ops.rs:6:30 | -LL | let y: &'static usize = &(&1 as *const i32 as usize + 1); //~ ERROR does not live long enough +LL | let y: &'static usize = &(&1 as *const i32 as usize + 1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough ... LL | } @@ -23,9 +23,9 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/promoted_raw_ptr_ops.rs:7:28 | -LL | let z: &'static i32 = &(unsafe { *(42 as *const i32) }); //~ ERROR does not live long enough +LL | let z: &'static i32 = &(unsafe { *(42 as *const i32) }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | let a: &'static bool = &(main as fn() == main as fn()); //~ ERROR does not live long enough +LL | let a: &'static bool = &(main as fn() == main as fn()); LL | } | - temporary value only lives until here | @@ -34,7 +34,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/promoted_raw_ptr_ops.rs:8:29 | -LL | let a: &'static bool = &(main as fn() == main as fn()); //~ ERROR does not live long enough +LL | let a: &'static bool = &(main as fn() == main as fn()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough LL | } | - temporary value only lives until here diff --git a/src/test/ui/consts/const-eval/ref_to_int_match.stderr b/src/test/ui/consts/const-eval/ref_to_int_match.stderr index 888fe065a62..f8eafed68e4 100644 --- a/src/test/ui/consts/const-eval/ref_to_int_match.stderr +++ b/src/test/ui/consts/const-eval/ref_to_int_match.stderr @@ -1,7 +1,7 @@ error[E0080]: it is undefined behavior to use this value --> $DIR/ref_to_int_match.rs:23:1 | -LL | const BAR: Int = unsafe { Foo { r: &42 }.f }; //~ ERROR it is undefined behavior to use this value +LL | const BAR: Int = unsafe { Foo { r: &42 }.f }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a pointer, but expected initialized plain (non-pointer) bytes | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior @@ -9,7 +9,7 @@ LL | const BAR: Int = unsafe { Foo { r: &42 }.f }; //~ ERROR it is undefined beh error: could not evaluate constant pattern --> $DIR/ref_to_int_match.rs:7:14 | -LL | 10..=BAR => {}, //~ ERROR could not evaluate constant pattern +LL | 10..=BAR => {}, | ^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/consts/const-eval/shift_overflow.stderr b/src/test/ui/consts/const-eval/shift_overflow.stderr index e5c34f94d2c..5db231cd5b0 100644 --- a/src/test/ui/consts/const-eval/shift_overflow.stderr +++ b/src/test/ui/consts/const-eval/shift_overflow.stderr @@ -1,7 +1,7 @@ error[E0080]: evaluation of constant value failed --> $DIR/shift_overflow.rs:3:9 | -LL | X = 1 << ((u32::max_value() as u64) + 1), //~ ERROR E0080 +LL | X = 1 << ((u32::max_value() as u64) + 1), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to shift left with overflow error: aborting due to previous error diff --git a/src/test/ui/consts/const-eval/transmute-const-promotion.stderr b/src/test/ui/consts/const-eval/transmute-const-promotion.stderr index 996e84de06d..5829a1772d6 100644 --- a/src/test/ui/consts/const-eval/transmute-const-promotion.stderr +++ b/src/test/ui/consts/const-eval/transmute-const-promotion.stderr @@ -3,7 +3,7 @@ error[E0597]: borrowed value does not live long enough | LL | let x: &'static u32 = unsafe { &mem::transmute(3.0f32) }; | ^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | //~^ ERROR value does not live long enough +LL | LL | } | - temporary value only lives until here | diff --git a/src/test/ui/consts/const-eval/ub-upvars.stderr b/src/test/ui/consts/const-eval/ub-upvars.stderr index d18339f2434..21d2847db1e 100644 --- a/src/test/ui/consts/const-eval/ub-upvars.stderr +++ b/src/test/ui/consts/const-eval/ub-upvars.stderr @@ -1,7 +1,7 @@ error[E0080]: it is undefined behavior to use this value --> $DIR/ub-upvars.rs:6:1 | -LL | / const BAD_UPVAR: &FnOnce() = &{ //~ ERROR it is undefined behavior to use this value +LL | / const BAD_UPVAR: &FnOnce() = &{ LL | | let bad_ref: &'static u16 = unsafe { mem::transmute(0usize) }; LL | | let another_var = 13; LL | | move || { let _ = bad_ref; let _ = another_var; } diff --git a/src/test/ui/consts/const-eval/union-ice.stderr b/src/test/ui/consts/const-eval/union-ice.stderr index 3edc5241571..b25cb8c5aa0 100644 --- a/src/test/ui/consts/const-eval/union-ice.stderr +++ b/src/test/ui/consts/const-eval/union-ice.stderr @@ -1,7 +1,7 @@ error[E0080]: it is undefined behavior to use this value --> $DIR/union-ice.rs:13:1 | -LL | const FIELD3: Field3 = unsafe { UNION.field3 }; //~ ERROR it is undefined behavior to use this value +LL | const FIELD3: Field3 = unsafe { UNION.field3 }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized bytes, but expected initialized plain (non-pointer) bytes | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior @@ -9,7 +9,7 @@ LL | const FIELD3: Field3 = unsafe { UNION.field3 }; //~ ERROR it is undefined b error[E0080]: it is undefined behavior to use this value --> $DIR/union-ice.rs:15:1 | -LL | / const FIELD_PATH: Struct = Struct { //~ ERROR it is undefined behavior to use this value +LL | / const FIELD_PATH: Struct = Struct { LL | | a: 42, LL | | b: unsafe { UNION.field3 }, LL | | }; @@ -20,7 +20,7 @@ LL | | }; error[E0080]: it is undefined behavior to use this value --> $DIR/union-ice.rs:25:1 | -LL | / const FIELD_PATH2: Struct2 = Struct2 { //~ ERROR it is undefined behavior to use this value +LL | / const FIELD_PATH2: Struct2 = Struct2 { LL | | b: [ LL | | 21, LL | | unsafe { UNION.field3 }, diff --git a/src/test/ui/consts/const-eval/union_promotion.stderr b/src/test/ui/consts/const-eval/union_promotion.stderr index 643c784ca08..c60f6718183 100644 --- a/src/test/ui/consts/const-eval/union_promotion.stderr +++ b/src/test/ui/consts/const-eval/union_promotion.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/union_promotion.rs:9:29 | -LL | let x: &'static bool = &unsafe { //~ borrowed value does not live long enough +LL | let x: &'static bool = &unsafe { | _____________________________^ LL | | Foo { a: &1 }.b == Foo { a: &2 }.b LL | | }; diff --git a/src/test/ui/consts/const-fn-not-safe-for-const.stderr b/src/test/ui/consts/const-fn-not-safe-for-const.stderr index 2003b137c27..a5e48074f70 100644 --- a/src/test/ui/consts/const-fn-not-safe-for-const.stderr +++ b/src/test/ui/consts/const-fn-not-safe-for-const.stderr @@ -1,7 +1,7 @@ error[E0015]: calls in constant functions are limited to constant functions, tuple structs and tuple variants --> $DIR/const-fn-not-safe-for-const.rs:14:5 | -LL | random() //~ ERROR E0015 +LL | random() | ^^^^^^^^ error[E0013]: constant functions cannot refer to statics, use a constant instead diff --git a/src/test/ui/consts/const-int-conversion.stderr b/src/test/ui/consts/const-int-conversion.stderr index b216d41727b..ddb1a75f1b7 100644 --- a/src/test/ui/consts/const-int-conversion.stderr +++ b/src/test/ui/consts/const-int-conversion.stderr @@ -69,7 +69,7 @@ error[E0597]: borrowed value does not live long enough | LL | let d: &'static [u8] = &(i32::min_value().to_be().to_ne_bytes()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | //~^ ERROR does not live long enough +LL | LL | } | - temporary value only lives until here | diff --git a/src/test/ui/consts/const-int-overflowing.stderr b/src/test/ui/consts/const-int-overflowing.stderr index 736909e0932..7228b5dbd4b 100644 --- a/src/test/ui/consts/const-int-overflowing.stderr +++ b/src/test/ui/consts/const-int-overflowing.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/const-int-overflowing.rs:2:36 | -LL | let x: &'static (i32, bool) = &(5_i32.overflowing_add(3)); //~ ERROR does not live long enough +LL | let x: &'static (i32, bool) = &(5_i32.overflowing_add(3)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough ... LL | } @@ -12,9 +12,9 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/const-int-overflowing.rs:3:36 | -LL | let y: &'static (i32, bool) = &(5_i32.overflowing_sub(3)); //~ ERROR does not live long enough +LL | let y: &'static (i32, bool) = &(5_i32.overflowing_sub(3)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | let z: &'static (i32, bool) = &(5_i32.overflowing_mul(3)); //~ ERROR does not live long enough +LL | let z: &'static (i32, bool) = &(5_i32.overflowing_mul(3)); LL | } | - temporary value only lives until here | @@ -23,7 +23,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/const-int-overflowing.rs:4:36 | -LL | let z: &'static (i32, bool) = &(5_i32.overflowing_mul(3)); //~ ERROR does not live long enough +LL | let z: &'static (i32, bool) = &(5_i32.overflowing_mul(3)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough LL | } | - temporary value only lives until here diff --git a/src/test/ui/consts/const-int-rotate.stderr b/src/test/ui/consts/const-int-rotate.stderr index c15727961f9..ec08e0a3f57 100644 --- a/src/test/ui/consts/const-int-rotate.stderr +++ b/src/test/ui/consts/const-int-rotate.stderr @@ -1,9 +1,9 @@ error[E0597]: borrowed value does not live long enough --> $DIR/const-int-rotate.rs:2:28 | -LL | let x: &'static i32 = &(5_i32.rotate_left(3)); //~ ERROR does not live long enough +LL | let x: &'static i32 = &(5_i32.rotate_left(3)); | ^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | let y: &'static i32 = &(5_i32.rotate_right(3)); //~ ERROR does not live long enough +LL | let y: &'static i32 = &(5_i32.rotate_right(3)); LL | } | - temporary value only lives until here | @@ -12,7 +12,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/const-int-rotate.rs:3:28 | -LL | let y: &'static i32 = &(5_i32.rotate_right(3)); //~ ERROR does not live long enough +LL | let y: &'static i32 = &(5_i32.rotate_right(3)); | ^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough LL | } | - temporary value only lives until here diff --git a/src/test/ui/consts/const-int-sign.stderr b/src/test/ui/consts/const-int-sign.stderr index 5a9a23af9d6..ffe09a0cfec 100644 --- a/src/test/ui/consts/const-int-sign.stderr +++ b/src/test/ui/consts/const-int-sign.stderr @@ -1,9 +1,9 @@ error[E0597]: borrowed value does not live long enough --> $DIR/const-int-sign.rs:2:29 | -LL | let x: &'static bool = &(5_i32.is_negative()); //~ ERROR does not live long enough +LL | let x: &'static bool = &(5_i32.is_negative()); | ^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | let y: &'static bool = &(5_i32.is_positive()); //~ ERROR does not live long enough +LL | let y: &'static bool = &(5_i32.is_positive()); LL | } | - temporary value only lives until here | @@ -12,7 +12,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/const-int-sign.rs:3:29 | -LL | let y: &'static bool = &(5_i32.is_positive()); //~ ERROR does not live long enough +LL | let y: &'static bool = &(5_i32.is_positive()); | ^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough LL | } | - temporary value only lives until here diff --git a/src/test/ui/consts/const-int-wrapping.stderr b/src/test/ui/consts/const-int-wrapping.stderr index ec9776b8211..478a6d80838 100644 --- a/src/test/ui/consts/const-int-wrapping.stderr +++ b/src/test/ui/consts/const-int-wrapping.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/const-int-wrapping.rs:2:28 | -LL | let x: &'static i32 = &(5_i32.wrapping_add(3)); //~ ERROR does not live long enough +LL | let x: &'static i32 = &(5_i32.wrapping_add(3)); | ^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough ... LL | } @@ -12,7 +12,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/const-int-wrapping.rs:3:28 | -LL | let y: &'static i32 = &(5_i32.wrapping_sub(3)); //~ ERROR does not live long enough +LL | let y: &'static i32 = &(5_i32.wrapping_sub(3)); | ^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough ... LL | } @@ -23,7 +23,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/const-int-wrapping.rs:4:28 | -LL | let z: &'static i32 = &(5_i32.wrapping_mul(3)); //~ ERROR does not live long enough +LL | let z: &'static i32 = &(5_i32.wrapping_mul(3)); | ^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough ... LL | } @@ -34,9 +34,9 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/const-int-wrapping.rs:5:28 | -LL | let a: &'static i32 = &(5_i32.wrapping_shl(3)); //~ ERROR does not live long enough +LL | let a: &'static i32 = &(5_i32.wrapping_shl(3)); | ^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | let b: &'static i32 = &(5_i32.wrapping_shr(3)); //~ ERROR does not live long enough +LL | let b: &'static i32 = &(5_i32.wrapping_shr(3)); LL | } | - temporary value only lives until here | @@ -45,7 +45,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/const-int-wrapping.rs:6:28 | -LL | let b: &'static i32 = &(5_i32.wrapping_shr(3)); //~ ERROR does not live long enough +LL | let b: &'static i32 = &(5_i32.wrapping_shr(3)); | ^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough LL | } | - temporary value only lives until here diff --git a/src/test/ui/consts/const-pattern-irrefutable.stderr b/src/test/ui/consts/const-pattern-irrefutable.stderr index ee0d4d88374..48fe24df4d0 100644 --- a/src/test/ui/consts/const-pattern-irrefutable.stderr +++ b/src/test/ui/consts/const-pattern-irrefutable.stderr @@ -1,19 +1,19 @@ error[E0005]: refutable pattern in local binding: `0u8..=1u8` not covered --> $DIR/const-pattern-irrefutable.rs:12:9 | -LL | let a = 4; //~ ERROR refutable pattern in local binding: `0u8..=1u8` not covered +LL | let a = 4; | ^ interpreted as a constant pattern, not new variable error[E0005]: refutable pattern in local binding: `0u8..=1u8` not covered --> $DIR/const-pattern-irrefutable.rs:13:9 | -LL | let c = 4; //~ ERROR refutable pattern in local binding: `0u8..=1u8` not covered +LL | let c = 4; | ^ interpreted as a constant pattern, not new variable error[E0005]: refutable pattern in local binding: `0u8..=1u8` not covered --> $DIR/const-pattern-irrefutable.rs:14:9 | -LL | let d = 4; //~ ERROR refutable pattern in local binding: `0u8..=1u8` not covered +LL | let d = 4; | ^ interpreted as a constant pattern, not new variable error: aborting due to 3 previous errors diff --git a/src/test/ui/consts/const-prop-ice.stderr b/src/test/ui/consts/const-prop-ice.stderr index 749ef952b5d..8ec54b4438d 100644 --- a/src/test/ui/consts/const-prop-ice.stderr +++ b/src/test/ui/consts/const-prop-ice.stderr @@ -1,7 +1,7 @@ error: index out of bounds: the len is 3 but the index is 3 --> $DIR/const-prop-ice.rs:2:5 | -LL | [0; 3][3u64 as usize]; //~ ERROR the len is 3 but the index is 3 +LL | [0; 3][3u64 as usize]; | ^^^^^^^^^^^^^^^^^^^^^ | = note: #[deny(const_err)] on by default diff --git a/src/test/ui/consts/const-prop-ice2.stderr b/src/test/ui/consts/const-prop-ice2.stderr index 4febd0ee1e3..68a7164da3d 100644 --- a/src/test/ui/consts/const-prop-ice2.stderr +++ b/src/test/ui/consts/const-prop-ice2.stderr @@ -1,7 +1,7 @@ error: index out of bounds: the len is 1 but the index is 1 --> $DIR/const-prop-ice2.rs:4:20 | -LL | println!("{}", xs[Enum::One as usize]); //~ ERROR the len is 1 but the index is 1 +LL | println!("{}", xs[Enum::One as usize]); | ^^^^^^^^^^^^^^^^^^^^^^ | = note: #[deny(const_err)] on by default diff --git a/src/test/ui/consts/const-ptr-nonnull.stderr b/src/test/ui/consts/const-ptr-nonnull.stderr index a9476dda6d3..a606bed1782 100644 --- a/src/test/ui/consts/const-ptr-nonnull.stderr +++ b/src/test/ui/consts/const-ptr-nonnull.stderr @@ -14,7 +14,7 @@ error[E0597]: borrowed value does not live long enough | LL | let x: &'static NonNull = &(non_null.cast()); | ^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | //~^ ERROR borrowed value does not live long enough +LL | LL | } | - temporary value only lives until here | diff --git a/src/test/ui/consts/const-ptr-unique.stderr b/src/test/ui/consts/const-ptr-unique.stderr index 141465bf184..482b78b2386 100644 --- a/src/test/ui/consts/const-ptr-unique.stderr +++ b/src/test/ui/consts/const-ptr-unique.stderr @@ -3,7 +3,7 @@ error[E0597]: borrowed value does not live long enough | LL | let x: &'static *mut u32 = &(unique.as_ptr()); | ^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | //~^ ERROR borrowed value does not live long enough +LL | LL | } | - temporary value only lives until here | diff --git a/src/test/ui/consts/const_let_assign3.stderr b/src/test/ui/consts/const_let_assign3.stderr index 6649fb997cc..c0e978a0ab7 100644 --- a/src/test/ui/consts/const_let_assign3.stderr +++ b/src/test/ui/consts/const_let_assign3.stderr @@ -7,7 +7,7 @@ LL | self.state = x; error[E0017]: references in constants may only refer to immutable values --> $DIR/const_let_assign3.rs:16:5 | -LL | s.foo(3); //~ ERROR references in constants may only refer to immutable values +LL | s.foo(3); | ^ constants require immutable values error[E0017]: references in constants may only refer to immutable values diff --git a/src/test/ui/consts/const_let_refutable.stderr b/src/test/ui/consts/const_let_refutable.stderr index c5d2ba02a70..155c858af37 100644 --- a/src/test/ui/consts/const_let_refutable.stderr +++ b/src/test/ui/consts/const_let_refutable.stderr @@ -1,7 +1,7 @@ error[E0005]: refutable pattern in function argument: `&[]` not covered --> $DIR/const_let_refutable.rs:3:16 | -LL | const fn slice([a, b]: &[i32]) -> i32 { //~ ERROR refutable pattern in function argument +LL | const fn slice([a, b]: &[i32]) -> i32 { | ^^^^^^ pattern `&[]` not covered error: aborting due to previous error diff --git a/src/test/ui/consts/dangling-alloc-id-ice.stderr b/src/test/ui/consts/dangling-alloc-id-ice.stderr index 2cd8711f03d..87f84480bf6 100644 --- a/src/test/ui/consts/dangling-alloc-id-ice.stderr +++ b/src/test/ui/consts/dangling-alloc-id-ice.stderr @@ -1,7 +1,7 @@ error: any use of this value will cause an error --> $DIR/dangling-alloc-id-ice.rs:8:1 | -LL | / const FOO: &() = { //~ ERROR any use of this value will cause an error +LL | / const FOO: &() = { LL | | let y = (); LL | | unsafe { Foo { y: &y }.long_live_the_unit } LL | | }; diff --git a/src/test/ui/consts/dangling_raw_ptr.stderr b/src/test/ui/consts/dangling_raw_ptr.stderr index 091f1f785cb..0168c08f011 100644 --- a/src/test/ui/consts/dangling_raw_ptr.stderr +++ b/src/test/ui/consts/dangling_raw_ptr.stderr @@ -1,7 +1,7 @@ error: any use of this value will cause an error --> $DIR/dangling_raw_ptr.rs:1:1 | -LL | / const FOO: *const u32 = { //~ ERROR any use of this value will cause an error +LL | / const FOO: *const u32 = { LL | | let x = 42; LL | | &x LL | | }; diff --git a/src/test/ui/consts/issue-54224.stderr b/src/test/ui/consts/issue-54224.stderr index 451f49c1cb5..9b6638b228e 100644 --- a/src/test/ui/consts/issue-54224.stderr +++ b/src/test/ui/consts/issue-54224.stderr @@ -1,7 +1,7 @@ error[E0716]: temporary value dropped while borrowed --> $DIR/issue-54224.rs:3:39 | -LL | const FOO: Option<&[[u8; 3]]> = Some(&[*b"foo"]); //~ ERROR temporary value dropped while borrowed +LL | const FOO: Option<&[[u8; 3]]> = Some(&[*b"foo"]); | ------^^^^^^^^^- | | | | | | | temporary value is freed at the end of this statement diff --git a/src/test/ui/consts/match_ice.stderr b/src/test/ui/consts/match_ice.stderr index d9840231695..e238fad4318 100644 --- a/src/test/ui/consts/match_ice.stderr +++ b/src/test/ui/consts/match_ice.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `&S` not covered --> $DIR/match_ice.rs:7:11 | -LL | match C { //~ ERROR non-exhaustive +LL | match C { | ^ pattern `&S` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr b/src/test/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr index 62f678790d2..b0cd57ba2eb 100644 --- a/src/test/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr +++ b/src/test/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr @@ -1,7 +1,7 @@ error[E0723]: heap allocations are not allowed in const fn (see issue #57563) --> $DIR/bad_const_fn_body_ice.rs:2:5 | -LL | vec![1, 2, 3] //~ ERROR heap allocations are not allowed in const fn +LL | vec![1, 2, 3] | ^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable diff --git a/src/test/ui/consts/min_const_fn/cmp_fn_pointers.stderr b/src/test/ui/consts/min_const_fn/cmp_fn_pointers.stderr index d84e2651d4f..0de41c65bec 100644 --- a/src/test/ui/consts/min_const_fn/cmp_fn_pointers.stderr +++ b/src/test/ui/consts/min_const_fn/cmp_fn_pointers.stderr @@ -1,7 +1,7 @@ error[E0723]: function pointers in const fn are unstable (see issue #57563) --> $DIR/cmp_fn_pointers.rs:1:14 | -LL | const fn cmp(x: fn(), y: fn()) -> bool { //~ ERROR function pointers in const fn are unstable +LL | const fn cmp(x: fn(), y: fn()) -> bool { | ^ | = help: add #![feature(const_fn)] to the crate attributes to enable diff --git a/src/test/ui/consts/min_const_fn/loop_ice.stderr b/src/test/ui/consts/min_const_fn/loop_ice.stderr index 716e8380c45..0d35e363541 100644 --- a/src/test/ui/consts/min_const_fn/loop_ice.stderr +++ b/src/test/ui/consts/min_const_fn/loop_ice.stderr @@ -1,7 +1,7 @@ error[E0723]: loops are not allowed in const fn (see issue #57563) --> $DIR/loop_ice.rs:2:5 | -LL | loop {} //~ ERROR loops are not allowed in const fn +LL | loop {} | ^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable diff --git a/src/test/ui/consts/min_const_fn/min_const_fn.stderr b/src/test/ui/consts/min_const_fn/min_const_fn.stderr index e095ccaf20e..cdf6b1016b4 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn.stderr +++ b/src/test/ui/consts/min_const_fn/min_const_fn.stderr @@ -1,7 +1,7 @@ error[E0493]: destructors cannot be evaluated at compile-time --> $DIR/min_const_fn.rs:37:25 | -LL | const fn into_inner(self) -> T { self.0 } //~ destructors cannot be evaluated +LL | const fn into_inner(self) -> T { self.0 } | ^^^^ constant functions cannot evaluate destructors error[E0723]: mutable references in const fn are unstable (see issue #57563) @@ -15,7 +15,7 @@ LL | const fn get_mut(&mut self) -> &mut T { &mut self.0 } error[E0493]: destructors cannot be evaluated at compile-time --> $DIR/min_const_fn.rs:44:28 | -LL | const fn into_inner_lt(self) -> T { self.0 } //~ destructors cannot be evaluated +LL | const fn into_inner_lt(self) -> T { self.0 } | ^^^^ constant functions cannot evaluate destructors error[E0723]: mutable references in const fn are unstable (see issue #57563) @@ -29,7 +29,7 @@ LL | const fn get_mut_lt(&'a mut self) -> &mut T { &mut self.0 } error[E0493]: destructors cannot be evaluated at compile-time --> $DIR/min_const_fn.rs:51:27 | -LL | const fn into_inner_s(self) -> T { self.0 } //~ ERROR destructors +LL | const fn into_inner_s(self) -> T { self.0 } | ^^^^ constant functions cannot evaluate destructors error[E0723]: mutable references in const fn are unstable (see issue #57563) @@ -99,7 +99,7 @@ LL | const fn foo19_4(f: f32, g: f32) -> f32 { f / g } error[E0723]: cannot access `static` items in const fn (see issue #57563) --> $DIR/min_const_fn.rs:90:27 | -LL | const fn foo25() -> u32 { BAR } //~ ERROR cannot access `static` items in const fn +LL | const fn foo25() -> u32 { BAR } | ^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -107,7 +107,7 @@ LL | const fn foo25() -> u32 { BAR } //~ ERROR cannot access `static` items in c error[E0723]: cannot access `static` items in const fn (see issue #57563) --> $DIR/min_const_fn.rs:91:36 | -LL | const fn foo26() -> &'static u32 { &BAR } //~ ERROR cannot access `static` items +LL | const fn foo26() -> &'static u32 { &BAR } | ^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -155,7 +155,7 @@ LL | const fn foo30_4(b: bool) -> usize { if b { 1 } else { 42 } } error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn (see issue #57563) --> $DIR/min_const_fn.rs:102:29 | -LL | const fn foo30_5(b: bool) { while b { } } //~ ERROR not stable in const fn +LL | const fn foo30_5(b: bool) { while b { } } | ^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -227,7 +227,7 @@ LL | const fn no_apit2(_x: AlanTuring) {} error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) --> $DIR/min_const_fn.rs:133:22 | -LL | const fn no_apit(_x: impl std::fmt::Debug) {} //~ ERROR trait bounds other than `Sized` +LL | const fn no_apit(_x: impl std::fmt::Debug) {} | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -235,7 +235,7 @@ LL | const fn no_apit(_x: impl std::fmt::Debug) {} //~ ERROR trait bounds other error[E0723]: `impl Trait` in const fn is unstable (see issue #57563) --> $DIR/min_const_fn.rs:134:23 | -LL | const fn no_rpit() -> impl std::fmt::Debug {} //~ ERROR `impl Trait` in const fn is unstable +LL | const fn no_rpit() -> impl std::fmt::Debug {} | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -243,7 +243,7 @@ LL | const fn no_rpit() -> impl std::fmt::Debug {} //~ ERROR `impl Trait` in con error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable (see issue #57563) --> $DIR/min_const_fn.rs:135:23 | -LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {} //~ ERROR trait bounds other than `Sized` +LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {} | ^^ | = help: add #![feature(const_fn)] to the crate attributes to enable diff --git a/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr b/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr index 1e6f698b3c8..a8d0dc37e40 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr +++ b/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr @@ -1,7 +1,7 @@ error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563) --> $DIR/min_const_fn_libstd_stability.rs:15:25 | -LL | const fn bar() -> u32 { foo() } //~ ERROR can only call other `min_const_fn` +LL | const fn bar() -> u32 { foo() } | ^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | const fn bar() -> u32 { foo() } //~ ERROR can only call other `min_const_fn error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563) --> $DIR/min_const_fn_libstd_stability.rs:22:26 | -LL | const fn bar2() -> u32 { foo2() } //~ ERROR can only call other `min_const_fn` +LL | const fn bar2() -> u32 { foo2() } | ^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | const fn bar2() -> u32 { foo2() } //~ ERROR can only call other `min_const_ error[E0723]: only int, `bool` and `char` operations are stable in const fn (see issue #57563) --> $DIR/min_const_fn_libstd_stability.rs:26:26 | -LL | const fn bar3() -> u32 { (5f32 + 6f32) as u32 } //~ ERROR only int, `bool` and `char` operations +LL | const fn bar3() -> u32 { (5f32 + 6f32) as u32 } | ^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -25,7 +25,7 @@ LL | const fn bar3() -> u32 { (5f32 + 6f32) as u32 } //~ ERROR only int, `bool` error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563) --> $DIR/min_const_fn_libstd_stability.rs:34:32 | -LL | const fn bar2_gated() -> u32 { foo2_gated() } //~ ERROR can only call other `min_const_fn` +LL | const fn bar2_gated() -> u32 { foo2_gated() } | ^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable diff --git a/src/test/ui/consts/min_const_fn/min_const_fn_unsafe.stderr b/src/test/ui/consts/min_const_fn/min_const_fn_unsafe.stderr index 95871749365..48c260644a7 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn_unsafe.stderr +++ b/src/test/ui/consts/min_const_fn/min_const_fn_unsafe.stderr @@ -1,7 +1,7 @@ error[E0658]: dereferencing raw pointers in constant functions is unstable (see issue #51911) --> $DIR/min_const_fn_unsafe.rs:50:77 | -LL | const fn bad_const_fn_deref_raw(x: *mut usize) -> &'static usize { unsafe { &*x } } //~ is unsafe +LL | const fn bad_const_fn_deref_raw(x: *mut usize) -> &'static usize { unsafe { &*x } } | ^^^ | = help: add #![feature(const_raw_ptr_deref)] to the crate attributes to enable @@ -33,7 +33,7 @@ LL | Foo { x: () }.y error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block --> $DIR/min_const_fn_unsafe.rs:50:77 | -LL | const fn bad_const_fn_deref_raw(x: *mut usize) -> &'static usize { unsafe { &*x } } //~ is unsafe +LL | const fn bad_const_fn_deref_raw(x: *mut usize) -> &'static usize { unsafe { &*x } } | ^^^ dereference of raw pointer | = note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior diff --git a/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr b/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr index 07d10984392..5b2bee19acf 100644 --- a/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr +++ b/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr @@ -1,7 +1,7 @@ error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563) --> $DIR/min_const_unsafe_fn_libstd_stability.rs:15:41 | -LL | const unsafe fn bar() -> u32 { unsafe { foo() } } //~ ERROR can only call other `min_const_fn` +LL | const unsafe fn bar() -> u32 { unsafe { foo() } } | ^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | const unsafe fn bar() -> u32 { unsafe { foo() } } //~ ERROR can only call o error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563) --> $DIR/min_const_unsafe_fn_libstd_stability.rs:22:42 | -LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } } //~ ERROR can only call other `min_const_fn` +LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } } | ^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } } //~ ERROR can only call error[E0723]: only int, `bool` and `char` operations are stable in const fn (see issue #57563) --> $DIR/min_const_unsafe_fn_libstd_stability.rs:26:33 | -LL | const unsafe fn bar3() -> u32 { (5f32 + 6f32) as u32 } //~ ERROR only int, `bool` and `char` op +LL | const unsafe fn bar3() -> u32 { (5f32 + 6f32) as u32 } | ^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -25,7 +25,7 @@ LL | const unsafe fn bar3() -> u32 { (5f32 + 6f32) as u32 } //~ ERROR only int, error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563) --> $DIR/min_const_unsafe_fn_libstd_stability.rs:34:48 | -LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } } //~ ERROR can only call other +LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } } | ^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable diff --git a/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr b/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr index 7cb8c6e62ec..f7f630c9ae3 100644 --- a/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr +++ b/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr @@ -1,7 +1,7 @@ error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563) --> $DIR/min_const_unsafe_fn_libstd_stability2.rs:15:32 | -LL | const unsafe fn bar() -> u32 { foo() } //~ ERROR can only call other `min_const_fn` +LL | const unsafe fn bar() -> u32 { foo() } | ^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | const unsafe fn bar() -> u32 { foo() } //~ ERROR can only call other `min_c error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563) --> $DIR/min_const_unsafe_fn_libstd_stability2.rs:22:33 | -LL | const unsafe fn bar2() -> u32 { foo2() } //~ ERROR can only call other `min_const_fn` +LL | const unsafe fn bar2() -> u32 { foo2() } | ^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | const unsafe fn bar2() -> u32 { foo2() } //~ ERROR can only call other `min error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563) --> $DIR/min_const_unsafe_fn_libstd_stability2.rs:30:39 | -LL | const unsafe fn bar2_gated() -> u32 { foo2_gated() } //~ ERROR can only call other `min_const_fn` +LL | const unsafe fn bar2_gated() -> u32 { foo2_gated() } | ^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable diff --git a/src/test/ui/consts/min_const_fn/mutable_borrow.stderr b/src/test/ui/consts/min_const_fn/mutable_borrow.stderr index e5a3502a3dc..a2d67a04170 100644 --- a/src/test/ui/consts/min_const_fn/mutable_borrow.stderr +++ b/src/test/ui/consts/min_const_fn/mutable_borrow.stderr @@ -1,7 +1,7 @@ error[E0723]: mutable references in const fn are unstable (see issue #57563) --> $DIR/mutable_borrow.rs:3:9 | -LL | let b = &mut a; //~ ERROR mutable references in const fn +LL | let b = &mut a; | ^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | let b = &mut a; //~ ERROR mutable references in const fn error[E0723]: mutable references in const fn are unstable (see issue #57563) --> $DIR/mutable_borrow.rs:12:13 | -LL | let b = &mut a; //~ ERROR mutable references in const fn +LL | let b = &mut a; | ^ | = help: add #![feature(const_fn)] to the crate attributes to enable diff --git a/src/test/ui/consts/min_const_fn/promotion.stderr b/src/test/ui/consts/min_const_fn/promotion.stderr index 7052f68c3ec..92d60f0c585 100644 --- a/src/test/ui/consts/min_const_fn/promotion.stderr +++ b/src/test/ui/consts/min_const_fn/promotion.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/promotion.rs:11:27 | -LL | let x: &'static () = &foo1(); //~ ERROR does not live long enough +LL | let x: &'static () = &foo1(); | ^^^^^^ temporary value does not live long enough ... LL | } @@ -12,7 +12,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/promotion.rs:12:28 | -LL | let y: &'static i32 = &foo2(42); //~ ERROR does not live long enough +LL | let y: &'static i32 = &foo2(42); | ^^^^^^^^ temporary value does not live long enough ... LL | } @@ -23,7 +23,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/promotion.rs:13:28 | -LL | let z: &'static i32 = &foo3(); //~ ERROR does not live long enough +LL | let z: &'static i32 = &foo3(); | ^^^^^^ temporary value does not live long enough ... LL | } @@ -34,7 +34,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/promotion.rs:14:34 | -LL | let a: &'static Cell = &foo4(); //~ ERROR does not live long enough +LL | let a: &'static Cell = &foo4(); | ^^^^^^ temporary value does not live long enough ... LL | } @@ -45,9 +45,9 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/promotion.rs:15:42 | -LL | let a: &'static Option> = &foo5(); //~ ERROR does not live long enough +LL | let a: &'static Option> = &foo5(); | ^^^^^^ temporary value does not live long enough -LL | let a: &'static Option> = &foo6(); //~ ERROR does not live long enough +LL | let a: &'static Option> = &foo6(); LL | } | - temporary value only lives until here | @@ -56,7 +56,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/promotion.rs:16:42 | -LL | let a: &'static Option> = &foo6(); //~ ERROR does not live long enough +LL | let a: &'static Option> = &foo6(); | ^^^^^^ temporary value does not live long enough LL | } | - temporary value only lives until here diff --git a/src/test/ui/consts/miri_unleashed/assoc_const.stderr b/src/test/ui/consts/miri_unleashed/assoc_const.stderr index a40f8d46d0a..e814303923e 100644 --- a/src/test/ui/consts/miri_unleashed/assoc_const.stderr +++ b/src/test/ui/consts/miri_unleashed/assoc_const.stderr @@ -1,13 +1,13 @@ warning: skipping const checks --> $DIR/assoc_const.rs:12:31 | -LL | const F: u32 = (U::X, 42).1; //~ WARN skipping const checks +LL | const F: u32 = (U::X, 42).1; | ^ error[E0080]: erroneous constant used --> $DIR/assoc_const.rs:29:13 | -LL | let y = , String>>::F; //~ ERROR erroneous constant +LL | let y = , String>>::F; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors error: aborting due to previous error diff --git a/src/test/ui/consts/miri_unleashed/assoc_const_2.stderr b/src/test/ui/consts/miri_unleashed/assoc_const_2.stderr index 77aab31d26e..dbfe1d93aa4 100644 --- a/src/test/ui/consts/miri_unleashed/assoc_const_2.stderr +++ b/src/test/ui/consts/miri_unleashed/assoc_const_2.stderr @@ -1,7 +1,7 @@ error[E0080]: erroneous constant used --> $DIR/assoc_const_2.rs:27:13 | -LL | let y = >::F; //~ ERROR erroneous constant +LL | let y = >::F; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors error: aborting due to previous error diff --git a/src/test/ui/consts/miri_unleashed/feature-gate-unleash_the_miri_inside_of_you.stderr b/src/test/ui/consts/miri_unleashed/feature-gate-unleash_the_miri_inside_of_you.stderr index e23ed1c6206..1fe3d33322f 100644 --- a/src/test/ui/consts/miri_unleashed/feature-gate-unleash_the_miri_inside_of_you.stderr +++ b/src/test/ui/consts/miri_unleashed/feature-gate-unleash_the_miri_inside_of_you.stderr @@ -1,13 +1,13 @@ error[E0493]: destructors cannot be evaluated at compile-time --> $DIR/feature-gate-unleash_the_miri_inside_of_you.rs:11:20 | -LL | const F: u32 = (U::X, 42).1; //~ ERROR destructors cannot be evaluated at compile-time +LL | const F: u32 = (U::X, 42).1; | ^^^^^^^^^^ constants cannot evaluate destructors error: `>::new` is not yet stable as a const fn --> $DIR/feature-gate-unleash_the_miri_inside_of_you.rs:18:25 | -LL | const X: Vec = Vec::new(); //~ ERROR not yet stable as a const fn +LL | const X: Vec = Vec::new(); | ^^^^^^^^^^ | = help: add `#![feature(const_vec_new)]` to the crate attributes to enable diff --git a/src/test/ui/consts/partial_qualif.stderr b/src/test/ui/consts/partial_qualif.stderr index 967fb83b78b..221e449b6f9 100644 --- a/src/test/ui/consts/partial_qualif.stderr +++ b/src/test/ui/consts/partial_qualif.stderr @@ -1,7 +1,7 @@ error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead --> $DIR/partial_qualif.rs:6:5 | -LL | &{a} //~ ERROR cannot borrow a constant which may contain interior mutability +LL | &{a} | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/consts/projection_qualif.stderr b/src/test/ui/consts/projection_qualif.stderr index 410c51c4b54..45679e3b962 100644 --- a/src/test/ui/consts/projection_qualif.stderr +++ b/src/test/ui/consts/projection_qualif.stderr @@ -1,19 +1,19 @@ error[E0017]: references in constants may only refer to immutable values --> $DIR/projection_qualif.rs:6:27 | -LL | let b: *mut u32 = &mut a; //~ ERROR may only refer to immutable values +LL | let b: *mut u32 = &mut a; | ^^^^^^ constants require immutable values error[E0019]: constant contains unimplemented expression type --> $DIR/projection_qualif.rs:7:18 | -LL | unsafe { *b = 5; } //~ ERROR dereferencing raw pointers in constants +LL | unsafe { *b = 5; } | ^^^^^^ error[E0658]: dereferencing raw pointers in constants is unstable (see issue #51911) --> $DIR/projection_qualif.rs:7:18 | -LL | unsafe { *b = 5; } //~ ERROR dereferencing raw pointers in constants +LL | unsafe { *b = 5; } | ^^^^^^ | = help: add #![feature(const_raw_ptr_deref)] to the crate attributes to enable diff --git a/src/test/ui/consts/promote_const_let.stderr b/src/test/ui/consts/promote_const_let.stderr index d37bd491860..c4295776d0a 100644 --- a/src/test/ui/consts/promote_const_let.stderr +++ b/src/test/ui/consts/promote_const_let.stderr @@ -1,7 +1,7 @@ error[E0597]: `y` does not live long enough --> $DIR/promote_const_let.rs:4:10 | -LL | &y //~ ERROR does not live long enough +LL | &y | ^ borrowed value does not live long enough LL | }; | - borrowed value only lives until here @@ -11,7 +11,7 @@ LL | }; error[E0597]: borrowed value does not live long enough --> $DIR/promote_const_let.rs:6:28 | -LL | let x: &'static u32 = &{ //~ ERROR does not live long enough +LL | let x: &'static u32 = &{ | ____________________________^ LL | | let y = 42; LL | | y diff --git a/src/test/ui/consts/qualif_overwrite.stderr b/src/test/ui/consts/qualif_overwrite.stderr index 30479139e31..fbaae711d7c 100644 --- a/src/test/ui/consts/qualif_overwrite.stderr +++ b/src/test/ui/consts/qualif_overwrite.stderr @@ -1,7 +1,7 @@ error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead --> $DIR/qualif_overwrite.rs:10:5 | -LL | &{a} //~ ERROR cannot borrow a constant which may contain interior mutability +LL | &{a} | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/consts/qualif_overwrite_2.stderr b/src/test/ui/consts/qualif_overwrite_2.stderr index 8276db99a12..a393c4e336d 100644 --- a/src/test/ui/consts/qualif_overwrite_2.stderr +++ b/src/test/ui/consts/qualif_overwrite_2.stderr @@ -1,7 +1,7 @@ error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead --> $DIR/qualif_overwrite_2.rs:8:5 | -LL | &{a.0} //~ ERROR cannot borrow a constant which may contain interior mutability +LL | &{a.0} | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/consts/single_variant_match_ice.stderr b/src/test/ui/consts/single_variant_match_ice.stderr index 5272062ccfc..bc80de4ce04 100644 --- a/src/test/ui/consts/single_variant_match_ice.stderr +++ b/src/test/ui/consts/single_variant_match_ice.stderr @@ -1,19 +1,19 @@ error[E0019]: constant contains unimplemented expression type --> $DIR/single_variant_match_ice.rs:6:5 | -LL | Foo::Prob => 42, //~ ERROR unimplemented expression type +LL | Foo::Prob => 42, | ^^^^^^^^^ error[E0019]: constant contains unimplemented expression type --> $DIR/single_variant_match_ice.rs:10:5 | -LL | x => 42, //~ ERROR unimplemented expression type +LL | x => 42, | ^ error[E0723]: `if`, `match`, `&&` and `||` are not stable in const fn (see issue #57563) --> $DIR/single_variant_match_ice.rs:18:13 | -LL | Prob => 0x1, //~ ERROR `if`, `match`, `&&` and `||` are not stable in const fn +LL | Prob => 0x1, | ^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable diff --git a/src/test/ui/consts/validate_never_arrays.stderr b/src/test/ui/consts/validate_never_arrays.stderr index b9d181a76dd..7a7d8168733 100644 --- a/src/test/ui/consts/validate_never_arrays.stderr +++ b/src/test/ui/consts/validate_never_arrays.stderr @@ -1,7 +1,7 @@ error[E0080]: it is undefined behavior to use this value --> $DIR/validate_never_arrays.rs:3:1 | -LL | const FOO: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR undefined behavior +LL | const FOO: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of an uninhabited type at . | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior diff --git a/src/test/ui/conversion-methods.stderr b/src/test/ui/conversion-methods.stderr index 33fff4a0f68..b9662e76074 100644 --- a/src/test/ui/conversion-methods.stderr +++ b/src/test/ui/conversion-methods.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/conversion-methods.rs:5:41 | -LL | let _tis_an_instants_play: String = "'Tis a fond Ambush—"; //~ ERROR mismatched types +LL | let _tis_an_instants_play: String = "'Tis a fond Ambush—"; | ^^^^^^^^^^^^^^^^^^^^^ | | | expected struct `std::string::String`, found reference @@ -37,7 +37,7 @@ LL | let _but_should_the_play: String = 2; // Perhaps surprisingly, we sugge error[E0308]: mismatched types --> $DIR/conversion-methods.rs:12:47 | -LL | let _prove_piercing_earnest: Vec = &[1, 2, 3]; //~ ERROR mismatched types +LL | let _prove_piercing_earnest: Vec = &[1, 2, 3]; | ^^^^^^^^^^ | | | expected struct `std::vec::Vec`, found reference diff --git a/src/test/ui/cross/cross-borrow-trait.stderr b/src/test/ui/cross/cross-borrow-trait.stderr index 949b63ffbde..b35f59658c0 100644 --- a/src/test/ui/cross/cross-borrow-trait.stderr +++ b/src/test/ui/cross/cross-borrow-trait.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/cross-borrow-trait.rs:10:22 | -LL | let _y: &Trait = x; //~ ERROR E0308 +LL | let _y: &Trait = x; | ^ | | | expected &dyn Trait, found struct `std::boxed::Box` diff --git a/src/test/ui/cross/cross-fn-cache-hole.stderr b/src/test/ui/cross/cross-fn-cache-hole.stderr index 2cd57e363d0..3bedd0dac23 100644 --- a/src/test/ui/cross/cross-fn-cache-hole.stderr +++ b/src/test/ui/cross/cross-fn-cache-hole.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `i32: Bar` is not satisfied --> $DIR/cross-fn-cache-hole.rs:15:1 | -LL | / fn vacuous() //~ ERROR the trait bound `i32: Bar` is not satisfied +LL | / fn vacuous() LL | | where i32: Foo LL | | { LL | | // ... the original intention was to check that we don't use that diff --git a/src/test/ui/custom-attribute-multisegment.stderr b/src/test/ui/custom-attribute-multisegment.stderr index 6f6a87dd159..9ba9c00e55b 100644 --- a/src/test/ui/custom-attribute-multisegment.stderr +++ b/src/test/ui/custom-attribute-multisegment.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve: could not find `nonexistent` in `existent` --> $DIR/custom-attribute-multisegment.rs:7:13 | -LL | #[existent::nonexistent] //~ ERROR failed to resolve: could not find `nonexistent` in `existent` +LL | #[existent::nonexistent] | ^^^^^^^^^^^ could not find `nonexistent` in `existent` error: aborting due to previous error diff --git a/src/test/ui/custom-derive/helper-attr-blocked-by-import-ambig.stderr b/src/test/ui/custom-derive/helper-attr-blocked-by-import-ambig.stderr index 2c9d226cc9e..e83c291c9bf 100644 --- a/src/test/ui/custom-derive/helper-attr-blocked-by-import-ambig.stderr +++ b/src/test/ui/custom-derive/helper-attr-blocked-by-import-ambig.stderr @@ -1,7 +1,7 @@ error[E0659]: `helper` is ambiguous (derive helper attribute vs any other name) --> $DIR/helper-attr-blocked-by-import-ambig.rs:9:3 | -LL | #[helper] //~ ERROR `helper` is ambiguous +LL | #[helper] | ^^^^^^ ambiguous name | note: `helper` could refer to the derive helper attribute defined here diff --git a/src/test/ui/custom-derive/issue-36935.stderr b/src/test/ui/custom-derive/issue-36935.stderr index d4c91546329..2875bc5fce9 100644 --- a/src/test/ui/custom-derive/issue-36935.stderr +++ b/src/test/ui/custom-derive/issue-36935.stderr @@ -1,7 +1,7 @@ error: proc-macro derive panicked --> $DIR/issue-36935.rs:6:15 | -LL | #[derive(Foo, Bar)] //~ ERROR proc-macro derive panicked +LL | #[derive(Foo, Bar)] | ^^^ | = help: message: lolnope diff --git a/src/test/ui/custom_attribute.stderr b/src/test/ui/custom_attribute.stderr index 1100d82f840..6608fb53c30 100644 --- a/src/test/ui/custom_attribute.stderr +++ b/src/test/ui/custom_attribute.stderr @@ -1,7 +1,7 @@ error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/custom_attribute.rs:3:3 | -LL | #[foo] //~ ERROR The attribute `foo` +LL | #[foo] | ^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | #[foo] //~ ERROR The attribute `foo` error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/custom_attribute.rs:5:7 | -LL | #[foo] //~ ERROR The attribute `foo` +LL | #[foo] | ^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | #[foo] //~ ERROR The attribute `foo` error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/custom_attribute.rs:7:7 | -LL | #[foo] //~ ERROR The attribute `foo` +LL | #[foo] | ^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable diff --git a/src/test/ui/dep-graph/dep-graph-assoc-type-codegen.stderr b/src/test/ui/dep-graph/dep-graph-assoc-type-codegen.stderr index a25a1786e81..db6ee98bb7b 100644 --- a/src/test/ui/dep-graph/dep-graph-assoc-type-codegen.stderr +++ b/src/test/ui/dep-graph/dep-graph-assoc-type-codegen.stderr @@ -1,7 +1,7 @@ error: OK --> $DIR/dep-graph-assoc-type-codegen.rs:28:5 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/dep-graph/dep-graph-caller-callee.stderr b/src/test/ui/dep-graph/dep-graph-caller-callee.stderr index d7bf6382257..2b1b7fe9a56 100644 --- a/src/test/ui/dep-graph/dep-graph-caller-callee.stderr +++ b/src/test/ui/dep-graph/dep-graph-caller-callee.stderr @@ -1,13 +1,13 @@ error: OK --> $DIR/dep-graph-caller-callee.rs:20:5 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: no path from `x::x` to `TypeckTables` --> $DIR/dep-graph-caller-callee.rs:31:5 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR no path +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/dep-graph/dep-graph-struct-signature.stderr b/src/test/ui/dep-graph/dep-graph-struct-signature.stderr index d7d56f219b4..8736d156247 100644 --- a/src/test/ui/dep-graph/dep-graph-struct-signature.stderr +++ b/src/test/ui/dep-graph/dep-graph-struct-signature.stderr @@ -1,133 +1,133 @@ error: no path from `WillChange` to `TypeOfItem` --> $DIR/dep-graph-struct-signature.rs:27:5 | -LL | #[rustc_then_this_would_need(TypeOfItem)] //~ ERROR no path +LL | #[rustc_then_this_would_need(TypeOfItem)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: no path from `WillChange` to `AssociatedItems` --> $DIR/dep-graph-struct-signature.rs:28:5 | -LL | #[rustc_then_this_would_need(AssociatedItems)] //~ ERROR no path +LL | #[rustc_then_this_would_need(AssociatedItems)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: no path from `WillChange` to `TraitDefOfItem` --> $DIR/dep-graph-struct-signature.rs:29:5 | -LL | #[rustc_then_this_would_need(TraitDefOfItem)] //~ ERROR no path +LL | #[rustc_then_this_would_need(TraitDefOfItem)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-struct-signature.rs:35:5 | -LL | #[rustc_then_this_would_need(FnSignature)] //~ ERROR OK +LL | #[rustc_then_this_would_need(FnSignature)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-struct-signature.rs:36:5 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-struct-signature.rs:39:5 | -LL | #[rustc_then_this_would_need(FnSignature)] //~ ERROR OK +LL | #[rustc_then_this_would_need(FnSignature)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-struct-signature.rs:40:5 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-struct-signature.rs:45:5 | -LL | #[rustc_then_this_would_need(TypeOfItem)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeOfItem)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-struct-signature.rs:52:5 | -LL | #[rustc_then_this_would_need(TypeOfItem)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeOfItem)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-struct-signature.rs:60:9 | -LL | #[rustc_then_this_would_need(TypeOfItem)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeOfItem)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-struct-signature.rs:62:9 | -LL | #[rustc_then_this_would_need(TypeOfItem)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeOfItem)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: no path from `WillChange` to `TypeOfItem` --> $DIR/dep-graph-struct-signature.rs:67:5 | -LL | #[rustc_then_this_would_need(TypeOfItem)] //~ ERROR no path +LL | #[rustc_then_this_would_need(TypeOfItem)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: no path from `WillChange` to `TypeOfItem` --> $DIR/dep-graph-struct-signature.rs:74:5 | -LL | #[rustc_then_this_would_need(TypeOfItem)] //~ ERROR no path +LL | #[rustc_then_this_would_need(TypeOfItem)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: no path from `WillChange` to `FnSignature` --> $DIR/dep-graph-struct-signature.rs:80:5 | -LL | #[rustc_then_this_would_need(FnSignature)] //~ ERROR no path +LL | #[rustc_then_this_would_need(FnSignature)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: no path from `WillChange` to `FnSignature` --> $DIR/dep-graph-struct-signature.rs:83:5 | -LL | #[rustc_then_this_would_need(FnSignature)] //~ ERROR no path from `WillChange` +LL | #[rustc_then_this_would_need(FnSignature)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: no path from `WillChange` to `TypeckTables` --> $DIR/dep-graph-struct-signature.rs:84:5 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR no path from `WillChange` +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-struct-signature.rs:31:9 | -LL | #[rustc_then_this_would_need(FnSignature)] //~ ERROR OK +LL | #[rustc_then_this_would_need(FnSignature)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: no path from `WillChange` to `FnSignature` --> $DIR/dep-graph-struct-signature.rs:76:9 | -LL | #[rustc_then_this_would_need(FnSignature)] //~ ERROR no path +LL | #[rustc_then_this_would_need(FnSignature)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-struct-signature.rs:47:9 | -LL | #[rustc_then_this_would_need(FnSignature)] //~ ERROR OK +LL | #[rustc_then_this_would_need(FnSignature)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-struct-signature.rs:48:9 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-struct-signature.rs:54:9 | -LL | #[rustc_then_this_would_need(FnSignature)] //~ ERROR OK +LL | #[rustc_then_this_would_need(FnSignature)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-struct-signature.rs:55:9 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 22 previous errors diff --git a/src/test/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.stderr b/src/test/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.stderr index 2fa1e1edc87..2df4b9ec39d 100644 --- a/src/test/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.stderr +++ b/src/test/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.stderr @@ -1,13 +1,13 @@ error: OK --> $DIR/dep-graph-trait-impl-two-traits-same-method.rs:32:5 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: no path from `x::` to `TypeckTables` --> $DIR/dep-graph-trait-impl-two-traits-same-method.rs:41:5 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR no path +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/dep-graph/dep-graph-trait-impl-two-traits.stderr b/src/test/ui/dep-graph/dep-graph-trait-impl-two-traits.stderr index 8670e7deb4c..54125367f90 100644 --- a/src/test/ui/dep-graph/dep-graph-trait-impl-two-traits.stderr +++ b/src/test/ui/dep-graph/dep-graph-trait-impl-two-traits.stderr @@ -1,13 +1,13 @@ error: no path from `x::` to `TypeckTables` --> $DIR/dep-graph-trait-impl-two-traits.rs:31:5 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR no path +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: no path from `x::` to `TypeckTables` --> $DIR/dep-graph-trait-impl-two-traits.rs:40:5 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR no path +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/dep-graph/dep-graph-trait-impl.stderr b/src/test/ui/dep-graph/dep-graph-trait-impl.stderr index fe97846d6cc..97072e74f42 100644 --- a/src/test/ui/dep-graph/dep-graph-trait-impl.stderr +++ b/src/test/ui/dep-graph/dep-graph-trait-impl.stderr @@ -1,31 +1,31 @@ error: OK --> $DIR/dep-graph-trait-impl.rs:27:5 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-trait-impl.rs:32:5 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-trait-impl.rs:37:5 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-trait-impl.rs:42:5 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: no path from `x::` to `TypeckTables` --> $DIR/dep-graph-trait-impl.rs:55:5 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR no path +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 5 previous errors diff --git a/src/test/ui/dep-graph/dep-graph-type-alias.stderr b/src/test/ui/dep-graph/dep-graph-type-alias.stderr index 72def33cbcf..f54e511acc1 100644 --- a/src/test/ui/dep-graph/dep-graph-type-alias.stderr +++ b/src/test/ui/dep-graph/dep-graph-type-alias.stderr @@ -1,73 +1,73 @@ error: no path from `TypeAlias` to `TypeOfItem` --> $DIR/dep-graph-type-alias.rs:17:1 | -LL | #[rustc_then_this_would_need(TypeOfItem)] //~ ERROR no path +LL | #[rustc_then_this_would_need(TypeOfItem)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-type-alias.rs:19:5 | -LL | #[rustc_then_this_would_need(TypeOfItem)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeOfItem)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: no path from `TypeAlias` to `TypeOfItem` --> $DIR/dep-graph-type-alias.rs:24:1 | -LL | #[rustc_then_this_would_need(TypeOfItem)] //~ ERROR no path +LL | #[rustc_then_this_would_need(TypeOfItem)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-type-alias.rs:27:9 | -LL | #[rustc_then_this_would_need(TypeOfItem)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeOfItem)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: no path from `TypeAlias` to `TypeOfItem` --> $DIR/dep-graph-type-alias.rs:33:1 | -LL | #[rustc_then_this_would_need(TypeOfItem)] //~ ERROR no path +LL | #[rustc_then_this_would_need(TypeOfItem)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: no path from `TypeAlias` to `TypeOfItem` --> $DIR/dep-graph-type-alias.rs:41:1 | -LL | #[rustc_then_this_would_need(TypeOfItem)] //~ ERROR no path +LL | #[rustc_then_this_would_need(TypeOfItem)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-type-alias.rs:48:1 | -LL | #[rustc_then_this_would_need(TypeOfItem)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeOfItem)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-type-alias.rs:51:1 | -LL | #[rustc_then_this_would_need(FnSignature)] //~ ERROR OK +LL | #[rustc_then_this_would_need(FnSignature)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-type-alias.rs:52:1 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-type-alias.rs:35:5 | -LL | #[rustc_then_this_would_need(FnSignature)] //~ ERROR OK +LL | #[rustc_then_this_would_need(FnSignature)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-type-alias.rs:43:5 | -LL | #[rustc_then_this_would_need(FnSignature)] //~ ERROR OK +LL | #[rustc_then_this_would_need(FnSignature)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: OK --> $DIR/dep-graph-type-alias.rs:44:5 | -LL | #[rustc_then_this_would_need(TypeckTables)] //~ ERROR OK +LL | #[rustc_then_this_would_need(TypeckTables)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 12 previous errors diff --git a/src/test/ui/dep-graph/dep-graph-variance-alias.stderr b/src/test/ui/dep-graph/dep-graph-variance-alias.stderr index f7c7f01020d..86cb0f9fe32 100644 --- a/src/test/ui/dep-graph/dep-graph-variance-alias.stderr +++ b/src/test/ui/dep-graph/dep-graph-variance-alias.stderr @@ -1,7 +1,7 @@ error: OK --> $DIR/dep-graph-variance-alias.rs:19:1 | -LL | #[rustc_then_this_would_need(ItemVariances)] //~ ERROR OK +LL | #[rustc_then_this_would_need(ItemVariances)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/deprecation/deprecated-macro_escape-inner.stderr b/src/test/ui/deprecation/deprecated-macro_escape-inner.stderr index 94229386e5f..a2cd196b21f 100644 --- a/src/test/ui/deprecation/deprecated-macro_escape-inner.stderr +++ b/src/test/ui/deprecation/deprecated-macro_escape-inner.stderr @@ -1,7 +1,7 @@ warning: macro_escape is a deprecated synonym for macro_use --> $DIR/deprecated-macro_escape-inner.rs:4:5 | -LL | #![macro_escape] //~ WARNING macro_escape is a deprecated synonym for macro_use +LL | #![macro_escape] | ^^^^^^^^^^^^^^^^ | = help: consider an outer attribute, #[macro_use] mod ... diff --git a/src/test/ui/deprecation/deprecated-macro_escape.stderr b/src/test/ui/deprecation/deprecated-macro_escape.stderr index f0edd838874..b76d6d73d97 100644 --- a/src/test/ui/deprecation/deprecated-macro_escape.stderr +++ b/src/test/ui/deprecation/deprecated-macro_escape.stderr @@ -1,6 +1,6 @@ warning: macro_escape is a deprecated synonym for macro_use --> $DIR/deprecated-macro_escape.rs:3:1 | -LL | #[macro_escape] //~ WARNING macro_escape is a deprecated synonym for macro_use +LL | #[macro_escape] | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/deprecation/deprecation-in-staged-api.stderr b/src/test/ui/deprecation/deprecation-in-staged-api.stderr index 3e64d756e7e..6a8056ec2d9 100644 --- a/src/test/ui/deprecation/deprecation-in-staged-api.stderr +++ b/src/test/ui/deprecation/deprecation-in-staged-api.stderr @@ -1,7 +1,7 @@ error: `#[deprecated]` cannot be used in staged api, use `#[rustc_deprecated]` instead --> $DIR/deprecation-in-staged-api.rs:8:1 | -LL | fn main() { } //~ERROR `#[deprecated]` cannot be used in staged api +LL | fn main() { } | ^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/deprecation/deprecation-lint-nested.stderr b/src/test/ui/deprecation/deprecation-lint-nested.stderr index b30da349335..206e12cfb3e 100644 --- a/src/test/ui/deprecation/deprecation-lint-nested.stderr +++ b/src/test/ui/deprecation/deprecation-lint-nested.stderr @@ -1,7 +1,7 @@ error: use of deprecated item 'loud::DeprecatedType' --> $DIR/deprecation-lint-nested.rs:55:16 | -LL | struct Foo(DeprecatedType); //~ ERROR use of deprecated item +LL | struct Foo(DeprecatedType); | ^^^^^^^^^^^^^^ | note: lint level defined here @@ -13,31 +13,31 @@ LL | #![deny(deprecated)] error: use of deprecated item 'loud::DeprecatedTrait' --> $DIR/deprecation-lint-nested.rs:57:10 | -LL | impl DeprecatedTrait for Foo {} //~ ERROR use of deprecated item +LL | impl DeprecatedTrait for Foo {} | ^^^^^^^^^^^^^^^ error: use of deprecated item 'loud::DEPRECATED_STATIC' --> $DIR/deprecation-lint-nested.rs:66:9 | -LL | DEPRECATED_STATIC + //~ ERROR use of deprecated item +LL | DEPRECATED_STATIC + | ^^^^^^^^^^^^^^^^^ error: use of deprecated item 'loud::DEPRECATED_CONST' --> $DIR/deprecation-lint-nested.rs:67:9 | -LL | DEPRECATED_CONST //~ ERROR use of deprecated item +LL | DEPRECATED_CONST | ^^^^^^^^^^^^^^^^ error: use of deprecated item 'loud::DeprecatedTrait' --> $DIR/deprecation-lint-nested.rs:60:19 | -LL | fn bar() { //~ ERROR use of deprecated item +LL | fn bar() { | ^^^^^^^^^^^^^^^ error: use of deprecated item 'loud::deprecated_fn' --> $DIR/deprecation-lint-nested.rs:61:13 | -LL | deprecated_fn(); //~ ERROR use of deprecated item +LL | deprecated_fn(); | ^^^^^^^^^^^^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/deprecation/deprecation-lint.stderr b/src/test/ui/deprecation/deprecation-lint.stderr index c48d06e8615..50cbe3846bb 100644 --- a/src/test/ui/deprecation/deprecation-lint.stderr +++ b/src/test/ui/deprecation/deprecation-lint.stderr @@ -1,7 +1,7 @@ error: use of deprecated item 'deprecation_lint::deprecated': text --> $DIR/deprecation-lint.rs:17:9 | -LL | deprecated(); //~ ERROR use of deprecated item 'deprecation_lint::deprecated' +LL | deprecated(); | ^^^^^^^^^^ | note: lint level defined here @@ -13,127 +13,127 @@ LL | #![deny(deprecated)] error: use of deprecated item 'deprecation_lint::Trait::trait_deprecated': text --> $DIR/deprecation-lint.rs:22:9 | -LL | Trait::trait_deprecated(&foo); //~ ERROR use of deprecated item 'deprecation_lint::Trait::trait_deprecated' +LL | Trait::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Trait::trait_deprecated': text --> $DIR/deprecation-lint.rs:24:9 | -LL | ::trait_deprecated(&foo); //~ ERROR use of deprecated item 'deprecation_lint::Trait::trait_deprecated' +LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::deprecated_text': text --> $DIR/deprecation-lint.rs:26:9 | -LL | deprecated_text(); //~ ERROR use of deprecated item 'deprecation_lint::deprecated_text': text +LL | deprecated_text(); | ^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Trait::trait_deprecated_text': text --> $DIR/deprecation-lint.rs:31:9 | -LL | Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated item 'deprecation_lint::Trait::trait_deprecated_text': text +LL | Trait::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Trait::trait_deprecated_text': text --> $DIR/deprecation-lint.rs:33:9 | -LL | ::trait_deprecated_text(&foo); //~ ERROR use of deprecated item 'deprecation_lint::Trait::trait_deprecated_text': text +LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::DeprecatedStruct': text --> $DIR/deprecation-lint.rs:35:17 | -LL | let _ = DeprecatedStruct { //~ ERROR use of deprecated item 'deprecation_lint::DeprecatedStruct': text +LL | let _ = DeprecatedStruct { | ^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::DeprecatedUnitStruct': text --> $DIR/deprecation-lint.rs:39:17 | -LL | let _ = DeprecatedUnitStruct; //~ ERROR use of deprecated item 'deprecation_lint::DeprecatedUnitStruct': text +LL | let _ = DeprecatedUnitStruct; | ^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Enum::DeprecatedVariant': text --> $DIR/deprecation-lint.rs:41:17 | -LL | let _ = Enum::DeprecatedVariant; //~ ERROR use of deprecated item 'deprecation_lint::Enum::DeprecatedVariant': text +LL | let _ = Enum::DeprecatedVariant; | ^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::DeprecatedTupleStruct': text --> $DIR/deprecation-lint.rs:43:17 | -LL | let _ = DeprecatedTupleStruct (1); //~ ERROR use of deprecated item 'deprecation_lint::DeprecatedTupleStruct': text +LL | let _ = DeprecatedTupleStruct (1); | ^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::nested::DeprecatedStruct': text --> $DIR/deprecation-lint.rs:45:17 | -LL | let _ = nested::DeprecatedStruct { //~ ERROR use of deprecated item 'deprecation_lint::nested::DeprecatedStruct': text +LL | let _ = nested::DeprecatedStruct { | ^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::nested::DeprecatedUnitStruct': text --> $DIR/deprecation-lint.rs:49:17 | -LL | let _ = nested::DeprecatedUnitStruct; //~ ERROR use of deprecated item 'deprecation_lint::nested::DeprecatedUnitStruct': text +LL | let _ = nested::DeprecatedUnitStruct; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::nested::Enum::DeprecatedVariant': text --> $DIR/deprecation-lint.rs:51:17 | -LL | let _ = nested::Enum::DeprecatedVariant; //~ ERROR use of deprecated item 'deprecation_lint::nested::Enum::DeprecatedVariant': text +LL | let _ = nested::Enum::DeprecatedVariant; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::nested::DeprecatedTupleStruct': text --> $DIR/deprecation-lint.rs:53:17 | -LL | let _ = nested::DeprecatedTupleStruct (1); //~ ERROR use of deprecated item 'deprecation_lint::nested::DeprecatedTupleStruct': text +LL | let _ = nested::DeprecatedTupleStruct (1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::deprecated_text': text --> $DIR/deprecation-lint.rs:60:25 | -LL | macro_test_arg!(deprecated_text()); //~ ERROR use of deprecated item 'deprecation_lint::deprecated_text': text +LL | macro_test_arg!(deprecated_text()); | ^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::deprecated_text': text --> $DIR/deprecation-lint.rs:61:41 | -LL | macro_test_arg!(macro_test_arg!(deprecated_text())); //~ ERROR use of deprecated item 'deprecation_lint::deprecated_text': text +LL | macro_test_arg!(macro_test_arg!(deprecated_text())); | ^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Trait::trait_deprecated': text --> $DIR/deprecation-lint.rs:66:9 | -LL | Trait::trait_deprecated(&foo); //~ ERROR use of deprecated item 'deprecation_lint::Trait::trait_deprecated' +LL | Trait::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Trait::trait_deprecated': text --> $DIR/deprecation-lint.rs:68:9 | -LL | ::trait_deprecated(&foo); //~ ERROR use of deprecated item 'deprecation_lint::Trait::trait_deprecated' +LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Trait::trait_deprecated_text': text --> $DIR/deprecation-lint.rs:70:9 | -LL | Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated item 'deprecation_lint::Trait::trait_deprecated_text': text +LL | Trait::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Trait::trait_deprecated_text': text --> $DIR/deprecation-lint.rs:72:9 | -LL | ::trait_deprecated_text(&foo); //~ ERROR use of deprecated item 'deprecation_lint::Trait::trait_deprecated_text': text +LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::DeprecatedTrait': text --> $DIR/deprecation-lint.rs:82:10 | -LL | impl DeprecatedTrait for S {} //~ ERROR use of deprecated item 'deprecation_lint::DeprecatedTrait': text +LL | impl DeprecatedTrait for S {} | ^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::DeprecatedTrait': text --> $DIR/deprecation-lint.rs:83:24 | -LL | trait LocalTrait : DeprecatedTrait { } //~ ERROR use of deprecated item 'deprecation_lint::DeprecatedTrait': text +LL | trait LocalTrait : DeprecatedTrait { } | ^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Deprecated': text @@ -175,55 +175,55 @@ LL | let Deprecated2 error: use of deprecated item 'deprecation_lint::deprecated_mod::deprecated': text --> $DIR/deprecation-lint.rs:163:9 | -LL | deprecated_mod::deprecated(); //~ ERROR use of deprecated item 'deprecation_lint::deprecated_mod::deprecated': text +LL | deprecated_mod::deprecated(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::deprecated': text --> $DIR/deprecation-lint.rs:246:9 | -LL | deprecated(); //~ ERROR use of deprecated item 'this_crate::deprecated' +LL | deprecated(); | ^^^^^^^^^^ error: use of deprecated item 'this_crate::Trait::trait_deprecated': text --> $DIR/deprecation-lint.rs:251:9 | -LL | Trait::trait_deprecated(&foo); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated' +LL | Trait::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::Trait::trait_deprecated': text --> $DIR/deprecation-lint.rs:253:9 | -LL | ::trait_deprecated(&foo); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated' +LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::deprecated_text': text --> $DIR/deprecation-lint.rs:255:9 | -LL | deprecated_text(); //~ ERROR use of deprecated item 'this_crate::deprecated_text': text +LL | deprecated_text(); | ^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text --> $DIR/deprecation-lint.rs:260:9 | -LL | Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated_text': text +LL | Trait::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text --> $DIR/deprecation-lint.rs:262:9 | -LL | ::trait_deprecated_text(&foo); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated_text': text +LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::deprecated_future': text --> $DIR/deprecation-lint.rs:265:9 | -LL | deprecated_future(); //~ ERROR use of deprecated item +LL | deprecated_future(); | ^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::deprecated_future_text': text --> $DIR/deprecation-lint.rs:266:9 | -LL | deprecated_future_text(); //~ ERROR use of deprecated item +LL | deprecated_future_text(); | ^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::DeprecatedStruct': text @@ -235,19 +235,19 @@ LL | let _ = DeprecatedStruct { error: use of deprecated item 'this_crate::DeprecatedUnitStruct': text --> $DIR/deprecation-lint.rs:273:17 | -LL | let _ = DeprecatedUnitStruct; //~ ERROR use of deprecated item 'this_crate::DeprecatedUnitStruct': text +LL | let _ = DeprecatedUnitStruct; | ^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::Enum::DeprecatedVariant': text --> $DIR/deprecation-lint.rs:275:17 | -LL | let _ = Enum::DeprecatedVariant; //~ ERROR use of deprecated item 'this_crate::Enum::DeprecatedVariant': text +LL | let _ = Enum::DeprecatedVariant; | ^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::DeprecatedTupleStruct': text --> $DIR/deprecation-lint.rs:277:17 | -LL | let _ = DeprecatedTupleStruct (1); //~ ERROR use of deprecated item 'this_crate::DeprecatedTupleStruct': text +LL | let _ = DeprecatedTupleStruct (1); | ^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::nested::DeprecatedStruct': text @@ -259,61 +259,61 @@ LL | let _ = nested::DeprecatedStruct { error: use of deprecated item 'this_crate::nested::DeprecatedUnitStruct': text --> $DIR/deprecation-lint.rs:284:17 | -LL | let _ = nested::DeprecatedUnitStruct; //~ ERROR use of deprecated item 'this_crate::nested::DeprecatedUnitStruct': text +LL | let _ = nested::DeprecatedUnitStruct; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::nested::Enum::DeprecatedVariant': text --> $DIR/deprecation-lint.rs:286:17 | -LL | let _ = nested::Enum::DeprecatedVariant; //~ ERROR use of deprecated item 'this_crate::nested::Enum::DeprecatedVariant': text +LL | let _ = nested::Enum::DeprecatedVariant; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::nested::DeprecatedTupleStruct': text --> $DIR/deprecation-lint.rs:288:17 | -LL | let _ = nested::DeprecatedTupleStruct (1); //~ ERROR use of deprecated item 'this_crate::nested::DeprecatedTupleStruct': text +LL | let _ = nested::DeprecatedTupleStruct (1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::Trait::trait_deprecated': text --> $DIR/deprecation-lint.rs:293:9 | -LL | Trait::trait_deprecated(&foo); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated' +LL | Trait::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::Trait::trait_deprecated': text --> $DIR/deprecation-lint.rs:295:9 | -LL | ::trait_deprecated(&foo); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated' +LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text --> $DIR/deprecation-lint.rs:297:9 | -LL | Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated_text': text +LL | Trait::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text --> $DIR/deprecation-lint.rs:299:9 | -LL | ::trait_deprecated_text(&foo); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated_text': text +LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::test_fn_closure_body::{{closure}}::bar' --> $DIR/deprecation-lint.rs:317:13 | -LL | bar(); //~ ERROR use of deprecated item 'this_crate::test_fn_closure_body::{{closure}}::bar' +LL | bar(); | ^^^ error: use of deprecated item 'this_crate::DeprecatedTrait': text --> $DIR/deprecation-lint.rs:336:10 | -LL | impl DeprecatedTrait for S { } //~ ERROR use of deprecated item 'this_crate::DeprecatedTrait': text +LL | impl DeprecatedTrait for S { } | ^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::DeprecatedTrait': text --> $DIR/deprecation-lint.rs:338:24 | -LL | trait LocalTrait : DeprecatedTrait { } //~ ERROR use of deprecated item 'this_crate::DeprecatedTrait': text +LL | trait LocalTrait : DeprecatedTrait { } | ^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate2::Deprecated': text @@ -355,109 +355,109 @@ LL | let Deprecated2 error: use of deprecated item 'deprecation_lint::MethodTester::method_deprecated': text --> $DIR/deprecation-lint.rs:18:13 | -LL | foo.method_deprecated(); //~ ERROR use of deprecated item 'deprecation_lint::MethodTester::method_deprecated' +LL | foo.method_deprecated(); | ^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::MethodTester::method_deprecated': text --> $DIR/deprecation-lint.rs:19:9 | -LL | Foo::method_deprecated(&foo); //~ ERROR use of deprecated item 'deprecation_lint::MethodTester::method_deprecated' +LL | Foo::method_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::MethodTester::method_deprecated': text --> $DIR/deprecation-lint.rs:20:9 | -LL | ::method_deprecated(&foo); //~ ERROR use of deprecated item 'deprecation_lint::MethodTester::method_deprecated' +LL | ::method_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Trait::trait_deprecated': text --> $DIR/deprecation-lint.rs:21:13 | -LL | foo.trait_deprecated(); //~ ERROR use of deprecated item 'deprecation_lint::Trait::trait_deprecated' +LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Trait::trait_deprecated': text --> $DIR/deprecation-lint.rs:23:9 | -LL | ::trait_deprecated(&foo); //~ ERROR use of deprecated item 'deprecation_lint::Trait::trait_deprecated' +LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::MethodTester::method_deprecated_text': text --> $DIR/deprecation-lint.rs:27:13 | -LL | foo.method_deprecated_text(); //~ ERROR use of deprecated item 'deprecation_lint::MethodTester::method_deprecated_text': text +LL | foo.method_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::MethodTester::method_deprecated_text': text --> $DIR/deprecation-lint.rs:28:9 | -LL | Foo::method_deprecated_text(&foo); //~ ERROR use of deprecated item 'deprecation_lint::MethodTester::method_deprecated_text': text +LL | Foo::method_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::MethodTester::method_deprecated_text': text --> $DIR/deprecation-lint.rs:29:9 | -LL | ::method_deprecated_text(&foo); //~ ERROR use of deprecated item 'deprecation_lint::MethodTester::method_deprecated_text': text +LL | ::method_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Trait::trait_deprecated_text': text --> $DIR/deprecation-lint.rs:30:13 | -LL | foo.trait_deprecated_text(); //~ ERROR use of deprecated item 'deprecation_lint::Trait::trait_deprecated_text': text +LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Trait::trait_deprecated_text': text --> $DIR/deprecation-lint.rs:32:9 | -LL | ::trait_deprecated_text(&foo); //~ ERROR use of deprecated item 'deprecation_lint::Trait::trait_deprecated_text': text +LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::DeprecatedStruct::i': text --> $DIR/deprecation-lint.rs:36:13 | -LL | i: 0 //~ ERROR use of deprecated item 'deprecation_lint::DeprecatedStruct::i': text +LL | i: 0 | ^^^^ error: use of deprecated item 'deprecation_lint::nested::DeprecatedStruct::i': text --> $DIR/deprecation-lint.rs:46:13 | -LL | i: 0 //~ ERROR use of deprecated item 'deprecation_lint::nested::DeprecatedStruct::i': text +LL | i: 0 | ^^^^ error: use of deprecated item 'deprecation_lint::Trait::trait_deprecated': text --> $DIR/deprecation-lint.rs:65:13 | -LL | foo.trait_deprecated(); //~ ERROR use of deprecated item 'deprecation_lint::Trait::trait_deprecated' +LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Trait::trait_deprecated': text --> $DIR/deprecation-lint.rs:67:9 | -LL | ::trait_deprecated(&foo); //~ ERROR use of deprecated item 'deprecation_lint::Trait::trait_deprecated' +LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Trait::trait_deprecated_text': text --> $DIR/deprecation-lint.rs:69:13 | -LL | foo.trait_deprecated_text(); //~ ERROR use of deprecated item 'deprecation_lint::Trait::trait_deprecated_text': text +LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Trait::trait_deprecated_text': text --> $DIR/deprecation-lint.rs:71:9 | -LL | ::trait_deprecated_text(&foo); //~ ERROR use of deprecated item 'deprecation_lint::Trait::trait_deprecated_text': text +LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Trait::trait_deprecated': text --> $DIR/deprecation-lint.rs:76:13 | -LL | foo.trait_deprecated(); //~ ERROR use of deprecated item 'deprecation_lint::Trait::trait_deprecated' +LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Trait::trait_deprecated_text': text --> $DIR/deprecation-lint.rs:77:13 | -LL | foo.trait_deprecated_text(); //~ ERROR use of deprecated item 'deprecation_lint::Trait::trait_deprecated_text': text +LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'deprecation_lint::Stable::override2': text @@ -547,109 +547,109 @@ LL | _) error: use of deprecated item 'this_crate::MethodTester::method_deprecated': text --> $DIR/deprecation-lint.rs:247:13 | -LL | foo.method_deprecated(); //~ ERROR use of deprecated item 'this_crate::MethodTester::method_deprecated' +LL | foo.method_deprecated(); | ^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::MethodTester::method_deprecated': text --> $DIR/deprecation-lint.rs:248:9 | -LL | Foo::method_deprecated(&foo); //~ ERROR use of deprecated item 'this_crate::MethodTester::method_deprecated' +LL | Foo::method_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::MethodTester::method_deprecated': text --> $DIR/deprecation-lint.rs:249:9 | -LL | ::method_deprecated(&foo); //~ ERROR use of deprecated item 'this_crate::MethodTester::method_deprecated' +LL | ::method_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::Trait::trait_deprecated': text --> $DIR/deprecation-lint.rs:250:13 | -LL | foo.trait_deprecated(); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated' +LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::Trait::trait_deprecated': text --> $DIR/deprecation-lint.rs:252:9 | -LL | ::trait_deprecated(&foo); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated' +LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::MethodTester::method_deprecated_text': text --> $DIR/deprecation-lint.rs:256:13 | -LL | foo.method_deprecated_text(); //~ ERROR use of deprecated item 'this_crate::MethodTester::method_deprecated_text': text +LL | foo.method_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::MethodTester::method_deprecated_text': text --> $DIR/deprecation-lint.rs:257:9 | -LL | Foo::method_deprecated_text(&foo); //~ ERROR use of deprecated item 'this_crate::MethodTester::method_deprecated_text': text +LL | Foo::method_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::MethodTester::method_deprecated_text': text --> $DIR/deprecation-lint.rs:258:9 | -LL | ::method_deprecated_text(&foo); //~ ERROR use of deprecated item 'this_crate::MethodTester::method_deprecated_text': text +LL | ::method_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text --> $DIR/deprecation-lint.rs:259:13 | -LL | foo.trait_deprecated_text(); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated_text': text +LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text --> $DIR/deprecation-lint.rs:261:9 | -LL | ::trait_deprecated_text(&foo); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated_text': text +LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::DeprecatedStruct::i': text --> $DIR/deprecation-lint.rs:270:13 | -LL | i: 0 //~ ERROR use of deprecated item 'this_crate::DeprecatedStruct::i': text +LL | i: 0 | ^^^^ error: use of deprecated item 'this_crate::nested::DeprecatedStruct::i': text --> $DIR/deprecation-lint.rs:281:13 | -LL | i: 0 //~ ERROR use of deprecated item 'this_crate::nested::DeprecatedStruct::i': text +LL | i: 0 | ^^^^ error: use of deprecated item 'this_crate::Trait::trait_deprecated': text --> $DIR/deprecation-lint.rs:292:13 | -LL | foo.trait_deprecated(); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated' +LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::Trait::trait_deprecated': text --> $DIR/deprecation-lint.rs:294:9 | -LL | ::trait_deprecated(&foo); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated' +LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text --> $DIR/deprecation-lint.rs:296:13 | -LL | foo.trait_deprecated_text(); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated_text': text +LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text --> $DIR/deprecation-lint.rs:298:9 | -LL | ::trait_deprecated_text(&foo); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated_text': text +LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::Trait::trait_deprecated': text --> $DIR/deprecation-lint.rs:303:13 | -LL | foo.trait_deprecated(); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated' +LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text --> $DIR/deprecation-lint.rs:304:13 | -LL | foo.trait_deprecated_text(); //~ ERROR use of deprecated item 'this_crate::Trait::trait_deprecated_text': text +LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated item 'this_crate2::Stable::override2': text diff --git a/src/test/ui/deprecation/deprecation-sanity.stderr b/src/test/ui/deprecation/deprecation-sanity.stderr index a071a4fc10d..6d5e3d51363 100644 --- a/src/test/ui/deprecation/deprecation-sanity.stderr +++ b/src/test/ui/deprecation/deprecation-sanity.stderr @@ -1,55 +1,55 @@ error[E0541]: unknown meta item 'reason' --> $DIR/deprecation-sanity.rs:4:43 | -LL | #[deprecated(since = "a", note = "a", reason)] //~ ERROR unknown meta item 'reason' +LL | #[deprecated(since = "a", note = "a", reason)] | ^^^^^^ expected one of `since`, `note` error[E0551]: incorrect meta item --> $DIR/deprecation-sanity.rs:7:31 | -LL | #[deprecated(since = "a", note)] //~ ERROR incorrect meta item +LL | #[deprecated(since = "a", note)] | ^^^^ error[E0551]: incorrect meta item --> $DIR/deprecation-sanity.rs:10:18 | -LL | #[deprecated(since, note = "a")] //~ ERROR incorrect meta item +LL | #[deprecated(since, note = "a")] | ^^^^^ error[E0551]: incorrect meta item --> $DIR/deprecation-sanity.rs:13:31 | -LL | #[deprecated(since = "a", note(b))] //~ ERROR incorrect meta item +LL | #[deprecated(since = "a", note(b))] | ^^^^^^^ error[E0551]: incorrect meta item --> $DIR/deprecation-sanity.rs:16:18 | -LL | #[deprecated(since(b), note = "a")] //~ ERROR incorrect meta item +LL | #[deprecated(since(b), note = "a")] | ^^^^^^^^ error[E0565]: literal in `deprecated` value must be a string --> $DIR/deprecation-sanity.rs:19:25 | -LL | #[deprecated(note = b"test")] //~ ERROR literal in `deprecated` value must be a string +LL | #[deprecated(note = b"test")] | ^^^^^^^ help: consider removing the prefix: `"test"` error[E0565]: item in `deprecated` must be a key/value pair --> $DIR/deprecation-sanity.rs:22:18 | -LL | #[deprecated("test")] //~ ERROR item in `deprecated` must be a key/value pair +LL | #[deprecated("test")] | ^^^^^^ error[E0550]: multiple deprecated attributes --> $DIR/deprecation-sanity.rs:28:1 | -LL | fn multiple1() { } //~ ERROR multiple deprecated attributes +LL | fn multiple1() { } | ^^^^^^^^^^^^^^^^^^ error[E0538]: multiple 'since' items --> $DIR/deprecation-sanity.rs:30:27 | -LL | #[deprecated(since = "a", since = "b", note = "c")] //~ ERROR multiple 'since' items +LL | #[deprecated(since = "a", since = "b", note = "c")] | ^^^^^^^^^^^ error: aborting due to 9 previous errors diff --git a/src/test/ui/deprecation/invalid-literal.stderr b/src/test/ui/deprecation/invalid-literal.stderr index f13d599c0b1..28bc2e2c2d8 100644 --- a/src/test/ui/deprecation/invalid-literal.stderr +++ b/src/test/ui/deprecation/invalid-literal.stderr @@ -1,7 +1,7 @@ error: attribute must be of the form `#[deprecated]` or `#[deprecated(/*opt*/ since = "version", /*opt*/ note = "reason)]` or `#[deprecated = "reason"]` --> $DIR/invalid-literal.rs:1:1 | -LL | #[deprecated = b"test"] //~ ERROR attribute must be of the form +LL | #[deprecated = b"test"] | ^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/deprecation/rustc_deprecation-in-future.stderr b/src/test/ui/deprecation/rustc_deprecation-in-future.stderr index bd8ade16ec0..4bbe79b55b3 100644 --- a/src/test/ui/deprecation/rustc_deprecation-in-future.stderr +++ b/src/test/ui/deprecation/rustc_deprecation-in-future.stderr @@ -1,7 +1,7 @@ error: use of item 'S' that will be deprecated in future version 99.99.99: effectively never --> $DIR/rustc_deprecation-in-future.rs:14:13 | -LL | let _ = S; //~ ERROR use of item 'S' that will be deprecated in future version 99.99.99: effectively never +LL | let _ = S; | ^ | note: lint level defined here diff --git a/src/test/ui/deref-non-pointer.stderr b/src/test/ui/deref-non-pointer.stderr index 0852311b7b1..1297e496bcb 100644 --- a/src/test/ui/deref-non-pointer.stderr +++ b/src/test/ui/deref-non-pointer.stderr @@ -1,7 +1,7 @@ error[E0614]: type `{integer}` cannot be dereferenced --> $DIR/deref-non-pointer.rs:2:9 | -LL | match *1 { //~ ERROR: cannot be dereferenced +LL | match *1 { | ^^ error: aborting due to previous error diff --git a/src/test/ui/deref-suggestion.stderr b/src/test/ui/deref-suggestion.stderr index 99e2b38c3f0..8f061b3416e 100644 --- a/src/test/ui/deref-suggestion.stderr +++ b/src/test/ui/deref-suggestion.stderr @@ -49,7 +49,7 @@ LL | foo(&mut "aaa".to_owned()); error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:2:20 | -LL | ($x:expr) => { &$x } //~ ERROR mismatched types +LL | ($x:expr) => { &$x } | ^^^ expected u32, found &{integer} ... LL | foo3(borrow!(0)); diff --git a/src/test/ui/derive-uninhabited-enum-38885.stderr b/src/test/ui/derive-uninhabited-enum-38885.stderr index 8930b1f1974..941c98b5506 100644 --- a/src/test/ui/derive-uninhabited-enum-38885.stderr +++ b/src/test/ui/derive-uninhabited-enum-38885.stderr @@ -1,7 +1,7 @@ warning: enum is never used: `Void` --> $DIR/derive-uninhabited-enum-38885.rs:8:1 | -LL | enum Void {} //~ WARN never used +LL | enum Void {} | ^^^^^^^^^ | = note: `-W dead-code` implied by `-W unused` @@ -9,6 +9,6 @@ LL | enum Void {} //~ WARN never used warning: enum is never used: `Foo` --> $DIR/derive-uninhabited-enum-38885.rs:11:1 | -LL | enum Foo { //~ WARN never used +LL | enum Foo { | ^^^^^^^^ diff --git a/src/test/ui/derived-errors/issue-30580.stderr b/src/test/ui/derived-errors/issue-30580.stderr index d4829ad2a1a..14c575f2699 100644 --- a/src/test/ui/derived-errors/issue-30580.stderr +++ b/src/test/ui/derived-errors/issue-30580.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `c` on type `&Foo` --> $DIR/issue-30580.rs:12:11 | -LL | b.c; //~ ERROR no field `c` on type `&Foo` +LL | b.c; | ^ error: aborting due to previous error diff --git a/src/test/ui/derived-errors/issue-31997.stderr b/src/test/ui/derived-errors/issue-31997.stderr index 246e6f6465c..dbceba046e2 100644 --- a/src/test/ui/derived-errors/issue-31997.stderr +++ b/src/test/ui/derived-errors/issue-31997.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find function `bar` in this scope --> $DIR/issue-31997.rs:13:21 | -LL | try!(closure(|| bar(0 as *mut _))); //~ ERROR cannot find function `bar` in this scope +LL | try!(closure(|| bar(0 as *mut _))); | ^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/derives/derive-assoc-type-not-impl.stderr b/src/test/ui/derives/derive-assoc-type-not-impl.stderr index 1b25231677c..b9e175e43d1 100644 --- a/src/test/ui/derives/derive-assoc-type-not-impl.stderr +++ b/src/test/ui/derives/derive-assoc-type-not-impl.stderr @@ -4,7 +4,7 @@ error[E0599]: no method named `clone` found for type `Bar` in the curr LL | struct Bar { | ------------------ method `clone` not found for this ... -LL | Bar:: { x: 1 }.clone(); //~ ERROR +LL | Bar:: { x: 1 }.clone(); | ^^^^^ | = note: the method `clone` exists but the following trait bounds were not satisfied: diff --git a/src/test/ui/derives/derives-span-Clone-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Clone-enum-struct-variant.stderr index deb1cbd89b8..7db5fbe3de4 100644 --- a/src/test/ui/derives/derives-span-Clone-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-Clone-enum-struct-variant.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Error: std::clone::Clone` is not satisfied --> $DIR/derives-span-Clone-enum-struct-variant.rs:9:6 | -LL | x: Error //~ ERROR +LL | x: Error | ^^^^^^^^ the trait `std::clone::Clone` is not implemented for `Error` | = note: required by `std::clone::Clone::clone` diff --git a/src/test/ui/derives/derives-span-Clone-enum.stderr b/src/test/ui/derives/derives-span-Clone-enum.stderr index de043cd28aa..4371dc900ac 100644 --- a/src/test/ui/derives/derives-span-Clone-enum.stderr +++ b/src/test/ui/derives/derives-span-Clone-enum.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Error: std::clone::Clone` is not satisfied --> $DIR/derives-span-Clone-enum.rs:9:6 | -LL | Error //~ ERROR +LL | Error | ^^^^^ the trait `std::clone::Clone` is not implemented for `Error` | = note: required by `std::clone::Clone::clone` diff --git a/src/test/ui/derives/derives-span-Clone-struct.stderr b/src/test/ui/derives/derives-span-Clone-struct.stderr index dd6fa9706c2..cc3b602c9c0 100644 --- a/src/test/ui/derives/derives-span-Clone-struct.stderr +++ b/src/test/ui/derives/derives-span-Clone-struct.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Error: std::clone::Clone` is not satisfied --> $DIR/derives-span-Clone-struct.rs:8:5 | -LL | x: Error //~ ERROR +LL | x: Error | ^^^^^^^^ the trait `std::clone::Clone` is not implemented for `Error` | = note: required by `std::clone::Clone::clone` diff --git a/src/test/ui/derives/derives-span-Clone-tuple-struct.stderr b/src/test/ui/derives/derives-span-Clone-tuple-struct.stderr index 5258240fc1f..b2bf3527b0c 100644 --- a/src/test/ui/derives/derives-span-Clone-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Clone-tuple-struct.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Error: std::clone::Clone` is not satisfied --> $DIR/derives-span-Clone-tuple-struct.rs:8:5 | -LL | Error //~ ERROR +LL | Error | ^^^^^ the trait `std::clone::Clone` is not implemented for `Error` | = note: required by `std::clone::Clone::clone` diff --git a/src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr index c981c20b762..ca5bcfe930d 100644 --- a/src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr @@ -1,7 +1,7 @@ error[E0277]: `Error` doesn't implement `std::fmt::Debug` --> $DIR/derives-span-Debug-enum-struct-variant.rs:9:6 | -LL | x: Error //~ ERROR +LL | x: Error | ^^^^^^^^ `Error` cannot be formatted using `{:?}` | = help: the trait `std::fmt::Debug` is not implemented for `Error` diff --git a/src/test/ui/derives/derives-span-Debug-enum.stderr b/src/test/ui/derives/derives-span-Debug-enum.stderr index 02cfe20616c..cd367a334fc 100644 --- a/src/test/ui/derives/derives-span-Debug-enum.stderr +++ b/src/test/ui/derives/derives-span-Debug-enum.stderr @@ -1,7 +1,7 @@ error[E0277]: `Error` doesn't implement `std::fmt::Debug` --> $DIR/derives-span-Debug-enum.rs:9:6 | -LL | Error //~ ERROR +LL | Error | ^^^^^ `Error` cannot be formatted using `{:?}` | = help: the trait `std::fmt::Debug` is not implemented for `Error` diff --git a/src/test/ui/derives/derives-span-Debug-struct.stderr b/src/test/ui/derives/derives-span-Debug-struct.stderr index 5fe7d846b4c..e00695ec0ba 100644 --- a/src/test/ui/derives/derives-span-Debug-struct.stderr +++ b/src/test/ui/derives/derives-span-Debug-struct.stderr @@ -1,7 +1,7 @@ error[E0277]: `Error` doesn't implement `std::fmt::Debug` --> $DIR/derives-span-Debug-struct.rs:8:5 | -LL | x: Error //~ ERROR +LL | x: Error | ^^^^^^^^ `Error` cannot be formatted using `{:?}` | = help: the trait `std::fmt::Debug` is not implemented for `Error` diff --git a/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr b/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr index 9088b9e83b0..37440b59ae7 100644 --- a/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr @@ -1,7 +1,7 @@ error[E0277]: `Error` doesn't implement `std::fmt::Debug` --> $DIR/derives-span-Debug-tuple-struct.rs:8:5 | -LL | Error //~ ERROR +LL | Error | ^^^^^ `Error` cannot be formatted using `{:?}` | = help: the trait `std::fmt::Debug` is not implemented for `Error` diff --git a/src/test/ui/derives/derives-span-Default-struct.stderr b/src/test/ui/derives/derives-span-Default-struct.stderr index 1ad7cd45477..413d4ec8c29 100644 --- a/src/test/ui/derives/derives-span-Default-struct.stderr +++ b/src/test/ui/derives/derives-span-Default-struct.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Error: std::default::Default` is not satisfied --> $DIR/derives-span-Default-struct.rs:8:5 | -LL | x: Error //~ ERROR +LL | x: Error | ^^^^^^^^ the trait `std::default::Default` is not implemented for `Error` | = note: required by `std::default::Default::default` diff --git a/src/test/ui/derives/derives-span-Default-tuple-struct.stderr b/src/test/ui/derives/derives-span-Default-tuple-struct.stderr index 447bc73ceb4..8f4d43daa51 100644 --- a/src/test/ui/derives/derives-span-Default-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Default-tuple-struct.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Error: std::default::Default` is not satisfied --> $DIR/derives-span-Default-tuple-struct.rs:8:5 | -LL | Error //~ ERROR +LL | Error | ^^^^^ the trait `std::default::Default` is not implemented for `Error` | = note: required by `std::default::Default::default` diff --git a/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr index e8bcec46655..52ecce4632d 100644 --- a/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Error: std::cmp::Eq` is not satisfied --> $DIR/derives-span-Eq-enum-struct-variant.rs:9:6 | -LL | x: Error //~ ERROR +LL | x: Error | ^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `Error` | = note: required by `std::cmp::AssertParamIsEq` diff --git a/src/test/ui/derives/derives-span-Eq-enum.stderr b/src/test/ui/derives/derives-span-Eq-enum.stderr index 95ff08a4332..bf91a0edc37 100644 --- a/src/test/ui/derives/derives-span-Eq-enum.stderr +++ b/src/test/ui/derives/derives-span-Eq-enum.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Error: std::cmp::Eq` is not satisfied --> $DIR/derives-span-Eq-enum.rs:9:6 | -LL | Error //~ ERROR +LL | Error | ^^^^^ the trait `std::cmp::Eq` is not implemented for `Error` | = note: required by `std::cmp::AssertParamIsEq` diff --git a/src/test/ui/derives/derives-span-Eq-struct.stderr b/src/test/ui/derives/derives-span-Eq-struct.stderr index 44bbcf73dd7..531e8887cd2 100644 --- a/src/test/ui/derives/derives-span-Eq-struct.stderr +++ b/src/test/ui/derives/derives-span-Eq-struct.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Error: std::cmp::Eq` is not satisfied --> $DIR/derives-span-Eq-struct.rs:8:5 | -LL | x: Error //~ ERROR +LL | x: Error | ^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `Error` | = note: required by `std::cmp::AssertParamIsEq` diff --git a/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr b/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr index 26228b38913..9e21c6c67bf 100644 --- a/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Error: std::cmp::Eq` is not satisfied --> $DIR/derives-span-Eq-tuple-struct.rs:8:5 | -LL | Error //~ ERROR +LL | Error | ^^^^^ the trait `std::cmp::Eq` is not implemented for `Error` | = note: required by `std::cmp::AssertParamIsEq` diff --git a/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr index 324f2f1fd6d..417c720c63e 100644 --- a/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Error: std::hash::Hash` is not satisfied --> $DIR/derives-span-Hash-enum-struct-variant.rs:9:6 | -LL | x: Error //~ ERROR +LL | x: Error | ^^^^^^^^ the trait `std::hash::Hash` is not implemented for `Error` | = note: required by `std::hash::Hash::hash` diff --git a/src/test/ui/derives/derives-span-Hash-enum.stderr b/src/test/ui/derives/derives-span-Hash-enum.stderr index da44a8f498e..25be8794889 100644 --- a/src/test/ui/derives/derives-span-Hash-enum.stderr +++ b/src/test/ui/derives/derives-span-Hash-enum.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Error: std::hash::Hash` is not satisfied --> $DIR/derives-span-Hash-enum.rs:9:6 | -LL | Error //~ ERROR +LL | Error | ^^^^^ the trait `std::hash::Hash` is not implemented for `Error` | = note: required by `std::hash::Hash::hash` diff --git a/src/test/ui/derives/derives-span-Hash-struct.stderr b/src/test/ui/derives/derives-span-Hash-struct.stderr index 17d45e4b0dd..c0574453a7a 100644 --- a/src/test/ui/derives/derives-span-Hash-struct.stderr +++ b/src/test/ui/derives/derives-span-Hash-struct.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Error: std::hash::Hash` is not satisfied --> $DIR/derives-span-Hash-struct.rs:8:5 | -LL | x: Error //~ ERROR +LL | x: Error | ^^^^^^^^ the trait `std::hash::Hash` is not implemented for `Error` | = note: required by `std::hash::Hash::hash` diff --git a/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr b/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr index e0e5cce107f..6339c38578e 100644 --- a/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Error: std::hash::Hash` is not satisfied --> $DIR/derives-span-Hash-tuple-struct.rs:8:5 | -LL | Error //~ ERROR +LL | Error | ^^^^^ the trait `std::hash::Hash` is not implemented for `Error` | = note: required by `std::hash::Hash::hash` diff --git a/src/test/ui/derives/derives-span-Ord-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Ord-enum-struct-variant.stderr index 149a9475f10..5c0d4e4ebe9 100644 --- a/src/test/ui/derives/derives-span-Ord-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-Ord-enum-struct-variant.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Error: std::cmp::Ord` is not satisfied --> $DIR/derives-span-Ord-enum-struct-variant.rs:9:6 | -LL | x: Error //~ ERROR +LL | x: Error | ^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `Error` | = note: required by `std::cmp::Ord::cmp` diff --git a/src/test/ui/derives/derives-span-Ord-enum.stderr b/src/test/ui/derives/derives-span-Ord-enum.stderr index 17ab75549e4..56268a23745 100644 --- a/src/test/ui/derives/derives-span-Ord-enum.stderr +++ b/src/test/ui/derives/derives-span-Ord-enum.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Error: std::cmp::Ord` is not satisfied --> $DIR/derives-span-Ord-enum.rs:9:6 | -LL | Error //~ ERROR +LL | Error | ^^^^^ the trait `std::cmp::Ord` is not implemented for `Error` | = note: required by `std::cmp::Ord::cmp` diff --git a/src/test/ui/derives/derives-span-Ord-struct.stderr b/src/test/ui/derives/derives-span-Ord-struct.stderr index 7088f8fc890..40dc3d09dad 100644 --- a/src/test/ui/derives/derives-span-Ord-struct.stderr +++ b/src/test/ui/derives/derives-span-Ord-struct.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Error: std::cmp::Ord` is not satisfied --> $DIR/derives-span-Ord-struct.rs:8:5 | -LL | x: Error //~ ERROR +LL | x: Error | ^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `Error` | = note: required by `std::cmp::Ord::cmp` diff --git a/src/test/ui/derives/derives-span-Ord-tuple-struct.stderr b/src/test/ui/derives/derives-span-Ord-tuple-struct.stderr index 5c046366993..4a9dea8c12e 100644 --- a/src/test/ui/derives/derives-span-Ord-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Ord-tuple-struct.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Error: std::cmp::Ord` is not satisfied --> $DIR/derives-span-Ord-tuple-struct.rs:8:5 | -LL | Error //~ ERROR +LL | Error | ^^^^^ the trait `std::cmp::Ord` is not implemented for `Error` | = note: required by `std::cmp::Ord::cmp` diff --git a/src/test/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr index 7683402d8aa..ed5468cc4da 100644 --- a/src/test/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `==` cannot be applied to type `Error` --> $DIR/derives-span-PartialEq-enum-struct-variant.rs:9:6 | -LL | x: Error //~ ERROR +LL | x: Error | ^^^^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `Error` @@ -9,7 +9,7 @@ LL | x: Error //~ ERROR error[E0369]: binary operation `!=` cannot be applied to type `Error` --> $DIR/derives-span-PartialEq-enum-struct-variant.rs:9:6 | -LL | x: Error //~ ERROR +LL | x: Error | ^^^^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `Error` diff --git a/src/test/ui/derives/derives-span-PartialEq-enum.stderr b/src/test/ui/derives/derives-span-PartialEq-enum.stderr index 9fa1a2bf17a..06a88c03f58 100644 --- a/src/test/ui/derives/derives-span-PartialEq-enum.stderr +++ b/src/test/ui/derives/derives-span-PartialEq-enum.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `==` cannot be applied to type `Error` --> $DIR/derives-span-PartialEq-enum.rs:9:6 | -LL | Error //~ ERROR +LL | Error | ^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `Error` @@ -9,7 +9,7 @@ LL | Error //~ ERROR error[E0369]: binary operation `!=` cannot be applied to type `Error` --> $DIR/derives-span-PartialEq-enum.rs:9:6 | -LL | Error //~ ERROR +LL | Error | ^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `Error` diff --git a/src/test/ui/derives/derives-span-PartialEq-struct.stderr b/src/test/ui/derives/derives-span-PartialEq-struct.stderr index 4a08c985b4a..b8481048361 100644 --- a/src/test/ui/derives/derives-span-PartialEq-struct.stderr +++ b/src/test/ui/derives/derives-span-PartialEq-struct.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `==` cannot be applied to type `Error` --> $DIR/derives-span-PartialEq-struct.rs:8:5 | -LL | x: Error //~ ERROR +LL | x: Error | ^^^^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `Error` @@ -9,7 +9,7 @@ LL | x: Error //~ ERROR error[E0369]: binary operation `!=` cannot be applied to type `Error` --> $DIR/derives-span-PartialEq-struct.rs:8:5 | -LL | x: Error //~ ERROR +LL | x: Error | ^^^^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `Error` diff --git a/src/test/ui/derives/derives-span-PartialEq-tuple-struct.stderr b/src/test/ui/derives/derives-span-PartialEq-tuple-struct.stderr index 850eab4f088..4398d252125 100644 --- a/src/test/ui/derives/derives-span-PartialEq-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-PartialEq-tuple-struct.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `==` cannot be applied to type `Error` --> $DIR/derives-span-PartialEq-tuple-struct.rs:8:5 | -LL | Error //~ ERROR +LL | Error | ^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `Error` @@ -9,7 +9,7 @@ LL | Error //~ ERROR error[E0369]: binary operation `!=` cannot be applied to type `Error` --> $DIR/derives-span-PartialEq-tuple-struct.rs:8:5 | -LL | Error //~ ERROR +LL | Error | ^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `Error` diff --git a/src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr index 0c359629d78..ac9f4504635 100644 --- a/src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr @@ -1,7 +1,7 @@ error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-enum-struct-variant.rs:9:6 | -LL | x: Error //~ ERROR +LL | x: Error | ^^^^^^^^ no implementation for `Error < Error` and `Error > Error` | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` diff --git a/src/test/ui/derives/derives-span-PartialOrd-enum.stderr b/src/test/ui/derives/derives-span-PartialOrd-enum.stderr index e4036a540db..3e684aef39f 100644 --- a/src/test/ui/derives/derives-span-PartialOrd-enum.stderr +++ b/src/test/ui/derives/derives-span-PartialOrd-enum.stderr @@ -1,7 +1,7 @@ error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-enum.rs:9:6 | -LL | Error //~ ERROR +LL | Error | ^^^^^ no implementation for `Error < Error` and `Error > Error` | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` diff --git a/src/test/ui/derives/derives-span-PartialOrd-struct.stderr b/src/test/ui/derives/derives-span-PartialOrd-struct.stderr index 5c77a05e9d0..10659aac642 100644 --- a/src/test/ui/derives/derives-span-PartialOrd-struct.stderr +++ b/src/test/ui/derives/derives-span-PartialOrd-struct.stderr @@ -1,7 +1,7 @@ error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-struct.rs:8:5 | -LL | x: Error //~ ERROR +LL | x: Error | ^^^^^^^^ no implementation for `Error < Error` and `Error > Error` | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` diff --git a/src/test/ui/derives/derives-span-PartialOrd-tuple-struct.stderr b/src/test/ui/derives/derives-span-PartialOrd-tuple-struct.stderr index e38a0424b3d..cbe05e37840 100644 --- a/src/test/ui/derives/derives-span-PartialOrd-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-PartialOrd-tuple-struct.stderr @@ -1,7 +1,7 @@ error[E0277]: can't compare `Error` with `Error` --> $DIR/derives-span-PartialOrd-tuple-struct.rs:8:5 | -LL | Error //~ ERROR +LL | Error | ^^^^^ no implementation for `Error < Error` and `Error > Error` | = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` diff --git a/src/test/ui/derives/deriving-copyclone.stderr b/src/test/ui/derives/deriving-copyclone.stderr index 0a9fdd34fe2..e6060c269e1 100644 --- a/src/test/ui/derives/deriving-copyclone.stderr +++ b/src/test/ui/derives/deriving-copyclone.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `C: std::marker::Copy` is not satisfied --> $DIR/deriving-copyclone.rs:31:5 | -LL | is_copy(B { a: 1, b: C }); //~ERROR Copy +LL | is_copy(B { a: 1, b: C }); | ^^^^^^^ the trait `std::marker::Copy` is not implemented for `C` | = note: required because of the requirements on the impl of `std::marker::Copy` for `B` @@ -14,7 +14,7 @@ LL | fn is_copy(_: T) {} error[E0277]: the trait bound `C: std::clone::Clone` is not satisfied --> $DIR/deriving-copyclone.rs:32:5 | -LL | is_clone(B { a: 1, b: C }); //~ERROR Clone +LL | is_clone(B { a: 1, b: C }); | ^^^^^^^^ the trait `std::clone::Clone` is not implemented for `C` | = note: required because of the requirements on the impl of `std::clone::Clone` for `B` @@ -27,7 +27,7 @@ LL | fn is_clone(_: T) {} error[E0277]: the trait bound `D: std::marker::Copy` is not satisfied --> $DIR/deriving-copyclone.rs:35:5 | -LL | is_copy(B { a: 1, b: D }); //~ERROR Copy +LL | is_copy(B { a: 1, b: D }); | ^^^^^^^ the trait `std::marker::Copy` is not implemented for `D` | = note: required because of the requirements on the impl of `std::marker::Copy` for `B` diff --git a/src/test/ui/derives/deriving-meta-empty-trait-list.stderr b/src/test/ui/derives/deriving-meta-empty-trait-list.stderr index 191bb780f7e..f8414b6e65e 100644 --- a/src/test/ui/derives/deriving-meta-empty-trait-list.stderr +++ b/src/test/ui/derives/deriving-meta-empty-trait-list.stderr @@ -1,6 +1,6 @@ warning: empty trait list in `derive` --> $DIR/deriving-meta-empty-trait-list.rs:3:1 | -LL | #[derive()] //~ WARNING empty trait list in `derive` +LL | #[derive()] | ^^^^^^^^^^^ diff --git a/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr b/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr index 02ea6321eb8..3206eecbe30 100644 --- a/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr +++ b/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `==` cannot be applied to type `NoCloneOrEq` --> $DIR/deriving-no-inner-impl-error-message.rs:5:5 | -LL | x: NoCloneOrEq //~ ERROR binary operation `==` cannot be applied to type `NoCloneOrEq` +LL | x: NoCloneOrEq | ^^^^^^^^^^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `NoCloneOrEq` @@ -9,7 +9,7 @@ LL | x: NoCloneOrEq //~ ERROR binary operation `==` cannot be applied to typ error[E0369]: binary operation `!=` cannot be applied to type `NoCloneOrEq` --> $DIR/deriving-no-inner-impl-error-message.rs:5:5 | -LL | x: NoCloneOrEq //~ ERROR binary operation `==` cannot be applied to type `NoCloneOrEq` +LL | x: NoCloneOrEq | ^^^^^^^^^^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `NoCloneOrEq` diff --git a/src/test/ui/derives/deriving-non-type.stderr b/src/test/ui/derives/deriving-non-type.stderr index 98594542653..563e76dc609 100644 --- a/src/test/ui/derives/deriving-non-type.stderr +++ b/src/test/ui/derives/deriving-non-type.stderr @@ -1,55 +1,55 @@ error: `derive` may only be applied to structs, enums and unions --> $DIR/deriving-non-type.rs:5:1 | -LL | #[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs, enums and unions +LL | #[derive(PartialEq)] | ^^^^^^^^^^^^^^^^^^^^ error: `derive` may only be applied to structs, enums and unions --> $DIR/deriving-non-type.rs:8:1 | -LL | #[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs, enums and unions +LL | #[derive(PartialEq)] | ^^^^^^^^^^^^^^^^^^^^ error: `derive` may only be applied to structs, enums and unions --> $DIR/deriving-non-type.rs:11:1 | -LL | #[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs, enums and unions +LL | #[derive(PartialEq)] | ^^^^^^^^^^^^^^^^^^^^ error: `derive` may only be applied to structs, enums and unions --> $DIR/deriving-non-type.rs:14:1 | -LL | #[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs, enums and unions +LL | #[derive(PartialEq)] | ^^^^^^^^^^^^^^^^^^^^ error: `derive` may only be applied to structs, enums and unions --> $DIR/deriving-non-type.rs:17:1 | -LL | #[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs, enums and unions +LL | #[derive(PartialEq)] | ^^^^^^^^^^^^^^^^^^^^ error: `derive` may only be applied to structs, enums and unions --> $DIR/deriving-non-type.rs:20:1 | -LL | #[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs, enums and unions +LL | #[derive(PartialEq)] | ^^^^^^^^^^^^^^^^^^^^ error: `derive` may only be applied to structs, enums and unions --> $DIR/deriving-non-type.rs:23:1 | -LL | #[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs, enums and unions +LL | #[derive(PartialEq)] | ^^^^^^^^^^^^^^^^^^^^ error: `derive` may only be applied to structs, enums and unions --> $DIR/deriving-non-type.rs:26:1 | -LL | #[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs, enums and unions +LL | #[derive(PartialEq)] | ^^^^^^^^^^^^^^^^^^^^ error: `derive` may only be applied to structs, enums and unions --> $DIR/deriving-non-type.rs:29:1 | -LL | #[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs, enums and unions +LL | #[derive(PartialEq)] | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to 9 previous errors diff --git a/src/test/ui/derives/deriving-primitive.stderr b/src/test/ui/derives/deriving-primitive.stderr index 377f4e87082..d1b444976dd 100644 --- a/src/test/ui/derives/deriving-primitive.stderr +++ b/src/test/ui/derives/deriving-primitive.stderr @@ -1,7 +1,7 @@ error: cannot find derive macro `FromPrimitive` in this scope --> $DIR/deriving-primitive.rs:1:10 | -LL | #[derive(FromPrimitive)] //~ ERROR cannot find derive macro `FromPrimitive` in this scope +LL | #[derive(FromPrimitive)] | ^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/destructure-trait-ref.stderr b/src/test/ui/destructure-trait-ref.stderr index 4c93a6781ea..8fc2b76eb11 100644 --- a/src/test/ui/destructure-trait-ref.stderr +++ b/src/test/ui/destructure-trait-ref.stderr @@ -1,19 +1,19 @@ error[E0033]: type `&dyn T` cannot be dereferenced --> $DIR/destructure-trait-ref.rs:26:9 | -LL | let &x = &1isize as &T; //~ ERROR type `&dyn T` cannot be dereferenced +LL | let &x = &1isize as &T; | ^^ type `&dyn T` cannot be dereferenced error[E0033]: type `&dyn T` cannot be dereferenced --> $DIR/destructure-trait-ref.rs:27:10 | -LL | let &&x = &(&1isize as &T); //~ ERROR type `&dyn T` cannot be dereferenced +LL | let &&x = &(&1isize as &T); | ^^ type `&dyn T` cannot be dereferenced error[E0033]: type `std::boxed::Box` cannot be dereferenced --> $DIR/destructure-trait-ref.rs:28:9 | -LL | let box x = box 1isize as Box; //~ ERROR type `std::boxed::Box` cannot be dereferenced +LL | let box x = box 1isize as Box; | ^^^^^ type `std::boxed::Box` cannot be dereferenced error[E0308]: mismatched types diff --git a/src/test/ui/did_you_mean/E0178.stderr b/src/test/ui/did_you_mean/E0178.stderr index ad9bb57c922..44e6ddd0eac 100644 --- a/src/test/ui/did_you_mean/E0178.stderr +++ b/src/test/ui/did_you_mean/E0178.stderr @@ -1,25 +1,25 @@ error[E0178]: expected a path on the left-hand side of `+`, not `&'a Foo` --> $DIR/E0178.rs:4:8 | -LL | w: &'a Foo + Copy, //~ ERROR expected a path +LL | w: &'a Foo + Copy, | ^^^^^^^^^^^^^^ help: try adding parentheses: `&'a (Foo + Copy)` error[E0178]: expected a path on the left-hand side of `+`, not `&'a Foo` --> $DIR/E0178.rs:5:8 | -LL | x: &'a Foo + 'a, //~ ERROR expected a path +LL | x: &'a Foo + 'a, | ^^^^^^^^^^^^ help: try adding parentheses: `&'a (Foo + 'a)` error[E0178]: expected a path on the left-hand side of `+`, not `&'a mut Foo` --> $DIR/E0178.rs:6:8 | -LL | y: &'a mut Foo + 'a, //~ ERROR expected a path +LL | y: &'a mut Foo + 'a, | ^^^^^^^^^^^^^^^^ help: try adding parentheses: `&'a mut (Foo + 'a)` error[E0178]: expected a path on the left-hand side of `+`, not `fn() -> Foo` --> $DIR/E0178.rs:7:8 | -LL | z: fn() -> Foo + 'a, //~ ERROR expected a path +LL | z: fn() -> Foo + 'a, | ^^^^^^^^^^^^^^^^ perhaps you forgot parentheses? error: aborting due to 4 previous errors diff --git a/src/test/ui/did_you_mean/issue-31424.stderr b/src/test/ui/did_you_mean/issue-31424.stderr index 1442666ef66..7c351ea9bfe 100644 --- a/src/test/ui/did_you_mean/issue-31424.stderr +++ b/src/test/ui/did_you_mean/issue-31424.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable argument `self` as mutable --> $DIR/issue-31424.rs:7:15 | -LL | (&mut self).bar(); //~ ERROR cannot borrow +LL | (&mut self).bar(); | ^^^^ | | | cannot reborrow mutably @@ -12,8 +12,8 @@ warning: function cannot return without recursing | LL | fn bar(self: &mut Self) { | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing -LL | //~^ WARN function cannot return without recursing -LL | (&mut self).bar(); //~ ERROR cannot borrow +LL | +LL | (&mut self).bar(); | ----------------- recursive call site | = note: #[warn(unconditional_recursion)] on by default @@ -22,11 +22,11 @@ LL | (&mut self).bar(); //~ ERROR cannot borrow error[E0596]: cannot borrow immutable argument `self` as mutable --> $DIR/issue-31424.rs:14:15 | -LL | (&mut self).bar(); //~ ERROR cannot borrow +LL | (&mut self).bar(); | ^^^^ cannot borrow mutably help: consider removing the `&mut`, as it is an immutable binding to a mutable reference | -LL | self.bar(); //~ ERROR cannot borrow +LL | self.bar(); | ^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/did_you_mean/issue-34126.stderr b/src/test/ui/did_you_mean/issue-34126.stderr index 05ea4ef91ce..536e295181a 100644 --- a/src/test/ui/did_you_mean/issue-34126.stderr +++ b/src/test/ui/did_you_mean/issue-34126.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable argument `self` as mutable --> $DIR/issue-34126.rs:6:23 | -LL | self.run(&mut self); //~ ERROR cannot borrow +LL | self.run(&mut self); | ^^^^ | | | cannot reborrow mutably diff --git a/src/test/ui/did_you_mean/issue-34337.stderr b/src/test/ui/did_you_mean/issue-34337.stderr index 4bf988b72cd..353f409b074 100644 --- a/src/test/ui/did_you_mean/issue-34337.stderr +++ b/src/test/ui/did_you_mean/issue-34337.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable local variable `key` as mutable --> $DIR/issue-34337.rs:6:14 | -LL | get(&mut key); //~ ERROR cannot borrow +LL | get(&mut key); | ^^^ | | | cannot reborrow mutably diff --git a/src/test/ui/did_you_mean/issue-35937.stderr b/src/test/ui/did_you_mean/issue-35937.stderr index 7499a9475e8..1e70f986e83 100644 --- a/src/test/ui/did_you_mean/issue-35937.stderr +++ b/src/test/ui/did_you_mean/issue-35937.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow field `f.v` of immutable binding as mutable | LL | let f = Foo { v: Vec::new() }; | - help: make this binding mutable: `mut f` -LL | f.v.push("cat".to_string()); //~ ERROR cannot borrow +LL | f.v.push("cat".to_string()); | ^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to field `s.x` of immutable binding @@ -11,7 +11,7 @@ error[E0594]: cannot assign to field `s.x` of immutable binding | LL | let s = S { x: 42 }; | - help: make this binding mutable: `mut s` -LL | s.x += 1; //~ ERROR cannot assign +LL | s.x += 1; | ^^^^^^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to field `s.x` of immutable binding @@ -19,7 +19,7 @@ error[E0594]: cannot assign to field `s.x` of immutable binding | LL | fn bar(s: S) { | - help: make this binding mutable: `mut s` -LL | s.x += 1; //~ ERROR cannot assign +LL | s.x += 1; | ^^^^^^^^ cannot mutably borrow field of immutable binding error: aborting due to 3 previous errors diff --git a/src/test/ui/did_you_mean/issue-36798.stderr b/src/test/ui/did_you_mean/issue-36798.stderr index 8273fad4764..98876e305ca 100644 --- a/src/test/ui/did_you_mean/issue-36798.stderr +++ b/src/test/ui/did_you_mean/issue-36798.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `baz` on type `Foo` --> $DIR/issue-36798.rs:7:7 | -LL | f.baz; //~ ERROR no field +LL | f.baz; | ^^^ help: a field with a similar name exists: `bar` error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-36798_unknown_field.stderr b/src/test/ui/did_you_mean/issue-36798_unknown_field.stderr index b884d8a53d3..2ed0a092400 100644 --- a/src/test/ui/did_you_mean/issue-36798_unknown_field.stderr +++ b/src/test/ui/did_you_mean/issue-36798_unknown_field.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `zz` on type `Foo` --> $DIR/issue-36798_unknown_field.rs:7:7 | -LL | f.zz; //~ ERROR no field +LL | f.zz; | ^^ unknown field | = note: available fields are: `bar` diff --git a/src/test/ui/did_you_mean/issue-37139.stderr b/src/test/ui/did_you_mean/issue-37139.stderr index 38617fda2af..cd42ee8001a 100644 --- a/src/test/ui/did_you_mean/issue-37139.stderr +++ b/src/test/ui/did_you_mean/issue-37139.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable local variable `x` as mutable --> $DIR/issue-37139.rs:12:23 | -LL | test(&mut x); //~ ERROR cannot borrow immutable +LL | test(&mut x); | ^ | | | cannot reborrow mutably diff --git a/src/test/ui/did_you_mean/issue-38054-do-not-show-unresolved-names.stderr b/src/test/ui/did_you_mean/issue-38054-do-not-show-unresolved-names.stderr index 1f3f7c47570..852abaed724 100644 --- a/src/test/ui/did_you_mean/issue-38054-do-not-show-unresolved-names.stderr +++ b/src/test/ui/did_you_mean/issue-38054-do-not-show-unresolved-names.stderr @@ -1,13 +1,13 @@ error[E0432]: unresolved import `Foo` --> $DIR/issue-38054-do-not-show-unresolved-names.rs:1:5 | -LL | use Foo; //~ ERROR unresolved +LL | use Foo; | ^^^ no `Foo` in the root error[E0432]: unresolved import `Foo1` --> $DIR/issue-38054-do-not-show-unresolved-names.rs:3:5 | -LL | use Foo1; //~ ERROR unresolved +LL | use Foo1; | ^^^^ no `Foo1` in the root error: aborting due to 2 previous errors diff --git a/src/test/ui/did_you_mean/issue-38147-1.stderr b/src/test/ui/did_you_mean/issue-38147-1.stderr index 74c72edd028..4311836be34 100644 --- a/src/test/ui/did_you_mean/issue-38147-1.stderr +++ b/src/test/ui/did_you_mean/issue-38147-1.stderr @@ -3,7 +3,7 @@ error[E0389]: cannot borrow data mutably in a `&` reference | LL | fn f(&self) { | ----- use `&mut self` here to make mutable -LL | self.s.push('x'); //~ ERROR cannot borrow data mutably +LL | self.s.push('x'); | ^^^^^^ assignment into an immutable reference error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-38147-4.stderr b/src/test/ui/did_you_mean/issue-38147-4.stderr index 6dc4f101084..71d44f9abad 100644 --- a/src/test/ui/did_you_mean/issue-38147-4.stderr +++ b/src/test/ui/did_you_mean/issue-38147-4.stderr @@ -3,7 +3,7 @@ error[E0389]: cannot borrow data mutably in a `&` reference | LL | fn f(x: usize, f: &Foo) { | ---- use `&mut Foo` here to make mutable -LL | f.s.push('x'); //~ ERROR cannot borrow data mutably +LL | f.s.push('x'); | ^^^ assignment into an immutable reference error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-39544.stderr b/src/test/ui/did_you_mean/issue-39544.stderr index 7d6a672843a..d86ea896a14 100644 --- a/src/test/ui/did_you_mean/issue-39544.stderr +++ b/src/test/ui/did_you_mean/issue-39544.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow field `z.x` of immutable binding as mutable | LL | let z = Z { x: X::Y }; | - help: make this binding mutable: `mut z` -LL | let _ = &mut z.x; //~ ERROR cannot borrow +LL | let _ = &mut z.x; | ^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `self.x` of immutable binding as mutable @@ -11,7 +11,7 @@ error[E0596]: cannot borrow field `self.x` of immutable binding as mutable | LL | fn foo<'z>(&'z self) { | -------- use `&'z mut self` here to make mutable -LL | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; | ^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `self.x` of immutable binding as mutable @@ -19,7 +19,7 @@ error[E0596]: cannot borrow field `self.x` of immutable binding as mutable | LL | fn foo1(&self, other: &Z) { | ----- use `&mut self` here to make mutable -LL | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; | ^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `other.x` of immutable binding as mutable @@ -27,8 +27,8 @@ error[E0596]: cannot borrow field `other.x` of immutable binding as mutable | LL | fn foo1(&self, other: &Z) { | -- use `&mut Z` here to make mutable -LL | let _ = &mut self.x; //~ ERROR cannot borrow -LL | let _ = &mut other.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; +LL | let _ = &mut other.x; | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `self.x` of immutable binding as mutable @@ -36,7 +36,7 @@ error[E0596]: cannot borrow field `self.x` of immutable binding as mutable | LL | fn foo2<'a>(&'a self, other: &Z) { | -------- use `&'a mut self` here to make mutable -LL | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; | ^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `other.x` of immutable binding as mutable @@ -44,8 +44,8 @@ error[E0596]: cannot borrow field `other.x` of immutable binding as mutable | LL | fn foo2<'a>(&'a self, other: &Z) { | -- use `&mut Z` here to make mutable -LL | let _ = &mut self.x; //~ ERROR cannot borrow -LL | let _ = &mut other.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; +LL | let _ = &mut other.x; | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `self.x` of immutable binding as mutable @@ -53,7 +53,7 @@ error[E0596]: cannot borrow field `self.x` of immutable binding as mutable | LL | fn foo3<'a>(self: &'a Self, other: &Z) { | -------- use `&'a mut Self` here to make mutable -LL | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; | ^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `other.x` of immutable binding as mutable @@ -61,8 +61,8 @@ error[E0596]: cannot borrow field `other.x` of immutable binding as mutable | LL | fn foo3<'a>(self: &'a Self, other: &Z) { | -- use `&mut Z` here to make mutable -LL | let _ = &mut self.x; //~ ERROR cannot borrow -LL | let _ = &mut other.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; +LL | let _ = &mut other.x; | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `other.x` of immutable binding as mutable @@ -70,7 +70,7 @@ error[E0596]: cannot borrow field `other.x` of immutable binding as mutable | LL | fn foo4(other: &Z) { | -- use `&mut Z` here to make mutable -LL | let _ = &mut other.x; //~ ERROR cannot borrow +LL | let _ = &mut other.x; | ^^^^^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `z.x` of immutable binding as mutable @@ -78,7 +78,7 @@ error[E0596]: cannot borrow field `z.x` of immutable binding as mutable | LL | pub fn with_arg(z: Z, w: &Z) { | - help: make this binding mutable: `mut z` -LL | let _ = &mut z.x; //~ ERROR cannot borrow +LL | let _ = &mut z.x; | ^^^ cannot mutably borrow field of immutable binding error[E0596]: cannot borrow field `w.x` of immutable binding as mutable @@ -86,8 +86,8 @@ error[E0596]: cannot borrow field `w.x` of immutable binding as mutable | LL | pub fn with_arg(z: Z, w: &Z) { | -- use `&mut Z` here to make mutable -LL | let _ = &mut z.x; //~ ERROR cannot borrow -LL | let _ = &mut w.x; //~ ERROR cannot borrow +LL | let _ = &mut z.x; +LL | let _ = &mut w.x; | ^^^ cannot mutably borrow field of immutable binding error[E0594]: cannot assign to borrowed content `*x.0` of immutable binding diff --git a/src/test/ui/did_you_mean/issue-39802-show-5-trait-impls.stderr b/src/test/ui/did_you_mean/issue-39802-show-5-trait-impls.stderr index 3411958be62..cfb1da037dc 100644 --- a/src/test/ui/did_you_mean/issue-39802-show-5-trait-impls.stderr +++ b/src/test/ui/did_you_mean/issue-39802-show-5-trait-impls.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `i8: Foo` is not satisfied --> $DIR/issue-39802-show-5-trait-impls.rs:24:5 | -LL | Foo::::bar(&1i8); //~ ERROR is not satisfied +LL | Foo::::bar(&1i8); | ^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i8` | = help: the following implementations were found: @@ -19,7 +19,7 @@ LL | fn bar(&self){} error[E0277]: the trait bound `u8: Foo` is not satisfied --> $DIR/issue-39802-show-5-trait-impls.rs:25:5 | -LL | Foo::::bar(&1u8); //~ ERROR is not satisfied +LL | Foo::::bar(&1u8); | ^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `u8` | = help: the following implementations were found: @@ -36,7 +36,7 @@ LL | fn bar(&self){} error[E0277]: the trait bound `bool: Foo` is not satisfied --> $DIR/issue-39802-show-5-trait-impls.rs:26:5 | -LL | Foo::::bar(&true); //~ ERROR is not satisfied +LL | Foo::::bar(&true); | ^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `bool` | = help: the following implementations were found: diff --git a/src/test/ui/did_you_mean/issue-40006.stderr b/src/test/ui/did_you_mean/issue-40006.stderr index 1b9eecb7769..f6f7fe5fa38 100644 --- a/src/test/ui/did_you_mean/issue-40006.stderr +++ b/src/test/ui/did_you_mean/issue-40006.stderr @@ -1,16 +1,16 @@ error: missing `fn`, `type`, or `const` for impl-item declaration --> $DIR/issue-40006.rs:1:9 | -LL | impl X { //~ ERROR cannot be made into an object +LL | impl X { | _________^ -LL | | //~^ ERROR missing +LL | | LL | | Y | |____^ missing `fn`, `type`, or `const` error: missing `fn`, `type`, or `const` for trait-item declaration --> $DIR/issue-40006.rs:8:10 | -LL | trait X { //~ ERROR missing +LL | trait X { | __________^ LL | | X() {} | |____^ missing `fn`, `type`, or `const` @@ -18,48 +18,48 @@ LL | | X() {} error: expected `[`, found `#` --> $DIR/issue-40006.rs:10:17 | -LL | fn xxx() { ### } //~ ERROR missing +LL | fn xxx() { ### } | ^ expected `[` error: missing `fn`, `type`, or `const` for trait-item declaration --> $DIR/issue-40006.rs:10:21 | -LL | fn xxx() { ### } //~ ERROR missing +LL | fn xxx() { ### } | _____________________^ -LL | | //~^ ERROR expected -LL | | L = M; //~ ERROR missing +LL | | +LL | | L = M; | |____^ missing `fn`, `type`, or `const` error: missing `fn`, `type`, or `const` for trait-item declaration --> $DIR/issue-40006.rs:12:11 | -LL | L = M; //~ ERROR missing +LL | L = M; | ___________^ -LL | | Z = { 2 + 3 }; //~ ERROR expected one of +LL | | Z = { 2 + 3 }; | |____^ missing `fn`, `type`, or `const` error: expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found `;` --> $DIR/issue-40006.rs:13:18 | -LL | Z = { 2 + 3 }; //~ ERROR expected one of +LL | Z = { 2 + 3 }; | ^ expected one of 7 possible tokens here error: expected one of `!` or `::`, found `(` --> $DIR/issue-40006.rs:14:9 | -LL | ::Y (); //~ ERROR expected one of +LL | ::Y (); | ^ expected one of `!` or `::` here error: missing `fn`, `type`, or `const` for impl-item declaration --> $DIR/issue-40006.rs:18:8 | -LL | pub hello_method(&self) { //~ ERROR missing +LL | pub hello_method(&self) { | ^ missing `fn`, `type`, or `const` error[E0038]: the trait `X` cannot be made into an object --> $DIR/issue-40006.rs:1:6 | -LL | impl X { //~ ERROR cannot be made into an object +LL | impl X { | ^ the trait `X` cannot be made into an object | = note: method `xxx` has no receiver diff --git a/src/test/ui/did_you_mean/issue-40823.stderr b/src/test/ui/did_you_mean/issue-40823.stderr index ee64e79ead9..fa2150a8d7f 100644 --- a/src/test/ui/did_you_mean/issue-40823.stderr +++ b/src/test/ui/did_you_mean/issue-40823.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable borrowed content `*buf` as mutable --> $DIR/issue-40823.rs:3:5 | -LL | buf.iter_mut(); //~ ERROR cannot borrow immutable borrowed content +LL | buf.iter_mut(); | ^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.stderr b/src/test/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.stderr index d2d9abee22c..84235ca4d63 100644 --- a/src/test/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.stderr +++ b/src/test/ui/did_you_mean/issue-41679-tilde-bitwise-negation-attempt.stderr @@ -1,7 +1,7 @@ error: `~` cannot be used as a unary operator --> $DIR/issue-41679-tilde-bitwise-negation-attempt.rs:2:13 | -LL | let x = ~1; //~ ERROR cannot be used as a unary operator +LL | let x = ~1; | ^ help: use `!` to perform bitwise negation error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-43871-enum-instead-of-variant.stderr b/src/test/ui/did_you_mean/issue-43871-enum-instead-of-variant.stderr index e6d10ffaae9..8a0d0096acb 100644 --- a/src/test/ui/did_you_mean/issue-43871-enum-instead-of-variant.stderr +++ b/src/test/ui/did_you_mean/issue-43871-enum-instead-of-variant.stderr @@ -1,7 +1,7 @@ error[E0423]: expected function, found enum `Option` --> $DIR/issue-43871-enum-instead-of-variant.rs:4:13 | -LL | let x = Option(1); //~ ERROR expected function, found enum +LL | let x = Option(1); | ^^^^^^ | = note: did you mean to use one of the following variants? @@ -11,7 +11,7 @@ LL | let x = Option(1); //~ ERROR expected function, found enum error[E0532]: expected tuple struct/variant, found enum `Option` --> $DIR/issue-43871-enum-instead-of-variant.rs:6:12 | -LL | if let Option(_) = x { //~ ERROR expected tuple struct/variant, found enum +LL | if let Option(_) = x { | ^^^^^^ | = note: did you mean to use one of the following variants? @@ -21,7 +21,7 @@ LL | if let Option(_) = x { //~ ERROR expected tuple struct/variant, found e error[E0532]: expected tuple struct/variant, found enum `Example` --> $DIR/issue-43871-enum-instead-of-variant.rs:12:12 | -LL | if let Example(_) = y { //~ ERROR expected tuple struct/variant, found enum +LL | if let Example(_) = y { | ^^^^^^^ | = note: did you mean to use one of the following variants? diff --git a/src/test/ui/did_you_mean/multiple-pattern-typo.stderr b/src/test/ui/did_you_mean/multiple-pattern-typo.stderr index 2825ff46825..a29fa584b29 100644 --- a/src/test/ui/did_you_mean/multiple-pattern-typo.stderr +++ b/src/test/ui/did_you_mean/multiple-pattern-typo.stderr @@ -1,7 +1,7 @@ error: unexpected token `||` after pattern --> $DIR/multiple-pattern-typo.rs:4:15 | -LL | 1 | 2 || 3 => (), //~ ERROR unexpected token `||` after pattern +LL | 1 | 2 || 3 => (), | ^^ help: use a single `|` to specify multiple patterns: `|` error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/pub-macro-rules.stderr b/src/test/ui/did_you_mean/pub-macro-rules.stderr index 7e62fc7c4fc..0bde5783b8c 100644 --- a/src/test/ui/did_you_mean/pub-macro-rules.stderr +++ b/src/test/ui/did_you_mean/pub-macro-rules.stderr @@ -1,7 +1,7 @@ error: can't qualify macro_rules invocation with `pub` --> $DIR/pub-macro-rules.rs:2:5 | -LL | pub macro_rules! foo { //~ ERROR can't qualify macro_rules invocation +LL | pub macro_rules! foo { | ^^^ help: try exporting the macro: `#[macro_export]` error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/recursion_limit.stderr b/src/test/ui/did_you_mean/recursion_limit.stderr index 0738c3f65b9..a646d98324e 100644 --- a/src/test/ui/did_you_mean/recursion_limit.stderr +++ b/src/test/ui/did_you_mean/recursion_limit.stderr @@ -1,7 +1,7 @@ error[E0275]: overflow evaluating the requirement `J: std::marker::Send` --> $DIR/recursion_limit.rs:34:5 | -LL | is_send::(); //~ ERROR overflow evaluating the requirement +LL | is_send::(); | ^^^^^^^^^^^^ | = help: consider adding a `#![recursion_limit="20"]` attribute to your crate diff --git a/src/test/ui/did_you_mean/recursion_limit_deref.stderr b/src/test/ui/did_you_mean/recursion_limit_deref.stderr index f8672b20c78..08e32ade3bc 100644 --- a/src/test/ui/did_you_mean/recursion_limit_deref.stderr +++ b/src/test/ui/did_you_mean/recursion_limit_deref.stderr @@ -1,7 +1,7 @@ error[E0055]: reached the recursion limit while auto-dereferencing `I` --> $DIR/recursion_limit_deref.rs:50:22 | -LL | let x: &Bottom = &t; //~ ERROR mismatched types +LL | let x: &Bottom = &t; | ^^ deref recursion limit reached | = help: consider adding a `#![recursion_limit="20"]` attribute to your crate @@ -9,7 +9,7 @@ LL | let x: &Bottom = &t; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/recursion_limit_deref.rs:50:22 | -LL | let x: &Bottom = &t; //~ ERROR mismatched types +LL | let x: &Bottom = &t; | ^^ expected struct `Bottom`, found struct `Top` | = note: expected type `&Bottom` diff --git a/src/test/ui/did_you_mean/recursion_limit_macro.stderr b/src/test/ui/did_you_mean/recursion_limit_macro.stderr index 5941d088f3a..6640ced5c9e 100644 --- a/src/test/ui/did_you_mean/recursion_limit_macro.stderr +++ b/src/test/ui/did_you_mean/recursion_limit_macro.stderr @@ -1,7 +1,7 @@ error: recursion limit reached while expanding the macro `recurse` --> $DIR/recursion_limit_macro.rs:10:31 | -LL | ($t:tt $($tail:tt)*) => { recurse!($($tail)*) }; //~ ERROR recursion limit +LL | ($t:tt $($tail:tt)*) => { recurse!($($tail)*) }; | ^^^^^^^^^^^^^^^^^^^ ... LL | recurse!(0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9); diff --git a/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr b/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr index 85c05274773..a94260dc42d 100644 --- a/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr +++ b/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr @@ -1,19 +1,19 @@ error[E0178]: expected a path on the left-hand side of `+`, not `&Copy` --> $DIR/trait-object-reference-without-parens-suggestion.rs:2:12 | -LL | let _: &Copy + 'static; //~ ERROR expected a path +LL | let _: &Copy + 'static; | ^^^^^^^^^^^^^^^ help: try adding parentheses: `&(Copy + 'static)` error[E0178]: expected a path on the left-hand side of `+`, not `&'static Copy` --> $DIR/trait-object-reference-without-parens-suggestion.rs:4:12 | -LL | let _: &'static Copy + 'static; //~ ERROR expected a path +LL | let _: &'static Copy + 'static; | ^^^^^^^^^^^^^^^^^^^^^^^ help: try adding parentheses: `&'static (Copy + 'static)` error[E0038]: the trait `std::marker::Copy` cannot be made into an object --> $DIR/trait-object-reference-without-parens-suggestion.rs:2:12 | -LL | let _: &Copy + 'static; //~ ERROR expected a path +LL | let _: &Copy + 'static; | ^^^^^ the trait `std::marker::Copy` cannot be made into an object | = note: the trait cannot require that `Self : Sized` diff --git a/src/test/ui/directory_ownership/non-inline-mod-restriction.stderr b/src/test/ui/directory_ownership/non-inline-mod-restriction.stderr index 6ceaa2e346a..46acc7e66d8 100644 --- a/src/test/ui/directory_ownership/non-inline-mod-restriction.stderr +++ b/src/test/ui/directory_ownership/non-inline-mod-restriction.stderr @@ -1,7 +1,7 @@ error: Cannot declare a non-inline module inside a block unless it has a path attribute --> $DIR/non-inline-mod-restriction.rs:4:9 | -LL | mod foo; //~ ERROR Cannot declare a non-inline module inside a block +LL | mod foo; | ^^^ error: aborting due to previous error diff --git a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.stderr b/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.stderr index cb32616d6e6..9984cac7a4a 100644 --- a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.stderr +++ b/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.stderr @@ -1,7 +1,7 @@ error[E0509]: cannot move out of type `X`, which implements the `Drop` trait --> $DIR/disallowed-deconstructing-destructing-struct-let.rs:12:9 | -LL | let X { x: y } = x; //~ ERROR cannot move out of type +LL | let X { x: y } = x; | ^^^^^^^-^^ | | | | | hint: to prevent move, use `ref y` or `ref mut y` diff --git a/src/test/ui/discrim/discrim-overflow-2.stderr b/src/test/ui/discrim/discrim-overflow-2.stderr index c490509142a..744324d1f0f 100644 --- a/src/test/ui/discrim/discrim-overflow-2.stderr +++ b/src/test/ui/discrim/discrim-overflow-2.stderr @@ -1,7 +1,7 @@ error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:17:9 | -LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, | ^^^^ overflowed on value after 127 | = note: explicitly set `OhNo = -128` if that is desired outcome @@ -9,7 +9,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:26:9 | -LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, | ^^^^ overflowed on value after 255 | = note: explicitly set `OhNo = 0` if that is desired outcome @@ -17,7 +17,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:35:9 | -LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, | ^^^^ overflowed on value after 32767 | = note: explicitly set `OhNo = -32768` if that is desired outcome @@ -25,7 +25,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:44:9 | -LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, | ^^^^ overflowed on value after 65535 | = note: explicitly set `OhNo = 0` if that is desired outcome @@ -33,7 +33,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:53:9 | -LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, | ^^^^ overflowed on value after 2147483647 | = note: explicitly set `OhNo = -2147483648` if that is desired outcome @@ -41,7 +41,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:62:9 | -LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, | ^^^^ overflowed on value after 4294967295 | = note: explicitly set `OhNo = 0` if that is desired outcome @@ -49,7 +49,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:71:9 | -LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, | ^^^^ overflowed on value after 9223372036854775807 | = note: explicitly set `OhNo = -9223372036854775808` if that is desired outcome @@ -57,7 +57,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow-2.rs:80:9 | -LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, | ^^^^ overflowed on value after 18446744073709551615 | = note: explicitly set `OhNo = 0` if that is desired outcome diff --git a/src/test/ui/discrim/discrim-overflow.stderr b/src/test/ui/discrim/discrim-overflow.stderr index e71df51e36d..c831fdfe1a3 100644 --- a/src/test/ui/discrim/discrim-overflow.stderr +++ b/src/test/ui/discrim/discrim-overflow.stderr @@ -1,7 +1,7 @@ error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:15:9 | -LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, | ^^^^ overflowed on value after 127 | = note: explicitly set `OhNo = -128` if that is desired outcome @@ -9,7 +9,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:26:9 | -LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, | ^^^^ overflowed on value after 255 | = note: explicitly set `OhNo = 0` if that is desired outcome @@ -17,7 +17,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:37:9 | -LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, | ^^^^ overflowed on value after 32767 | = note: explicitly set `OhNo = -32768` if that is desired outcome @@ -25,7 +25,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:48:9 | -LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, | ^^^^ overflowed on value after 65535 | = note: explicitly set `OhNo = 0` if that is desired outcome @@ -33,7 +33,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:60:9 | -LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, | ^^^^ overflowed on value after 2147483647 | = note: explicitly set `OhNo = -2147483648` if that is desired outcome @@ -41,7 +41,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:72:9 | -LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, | ^^^^ overflowed on value after 4294967295 | = note: explicitly set `OhNo = 0` if that is desired outcome @@ -49,7 +49,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:84:9 | -LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, | ^^^^ overflowed on value after 9223372036854775807 | = note: explicitly set `OhNo = -9223372036854775808` if that is desired outcome @@ -57,7 +57,7 @@ LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] error[E0370]: enum discriminant overflowed --> $DIR/discrim-overflow.rs:96:9 | -LL | OhNo, //~ ERROR enum discriminant overflowed [E0370] +LL | OhNo, | ^^^^ overflowed on value after 18446744073709551615 | = note: explicitly set `OhNo = 0` if that is desired outcome diff --git a/src/test/ui/diverging-tuple-parts-39485.stderr b/src/test/ui/diverging-tuple-parts-39485.stderr index 3457549a752..70eefeb329d 100644 --- a/src/test/ui/diverging-tuple-parts-39485.stderr +++ b/src/test/ui/diverging-tuple-parts-39485.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/diverging-tuple-parts-39485.rs:8:5 | -LL | &panic!() //~ ERROR mismatched types +LL | &panic!() | ^^^^^^^^^ expected (), found reference | = note: expected type `()` @@ -12,7 +12,7 @@ LL | fn g() -> &_ { | ^^^^^ help: consider removing the borrow | -LL | panic!() //~ ERROR mismatched types +LL | panic!() | ^^^^^^^^ error[E0308]: mismatched types @@ -20,7 +20,7 @@ error[E0308]: mismatched types | LL | fn f() -> isize { | ----- expected `isize` because of return type -LL | (return 1, return 2) //~ ERROR mismatched types +LL | (return 1, return 2) | ^^^^^^^^^^^^^^^^^^^^ expected isize, found tuple | = note: expected type `isize` diff --git a/src/test/ui/dollar-crate/dollar-crate-is-keyword-2.stderr b/src/test/ui/dollar-crate/dollar-crate-is-keyword-2.stderr index 206af6757b2..f9de5e14e59 100644 --- a/src/test/ui/dollar-crate/dollar-crate-is-keyword-2.stderr +++ b/src/test/ui/dollar-crate/dollar-crate-is-keyword-2.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve: `$crate` in paths can only be used in start position --> $DIR/dollar-crate-is-keyword-2.rs:6:16 | -LL | use a::$crate::b; //~ ERROR `$crate` in paths can only be used in start position +LL | use a::$crate::b; | ^^^^^^ `$crate` in paths can only be used in start position ... LL | m!(); @@ -10,7 +10,7 @@ LL | m!(); error[E0432]: unresolved import `a::$crate` --> $DIR/dollar-crate-is-keyword-2.rs:5:13 | -LL | use a::$crate; //~ ERROR unresolved import `a::$crate` +LL | use a::$crate; | ^^^^^^^^^ no `$crate` in `a` ... LL | m!(); @@ -19,7 +19,7 @@ LL | m!(); error[E0433]: failed to resolve: `$crate` in paths can only be used in start position --> $DIR/dollar-crate-is-keyword-2.rs:7:21 | -LL | type A = a::$crate; //~ ERROR `$crate` in paths can only be used in start position +LL | type A = a::$crate; | ^^^^^^ `$crate` in paths can only be used in start position ... LL | m!(); diff --git a/src/test/ui/dollar-crate/dollar-crate-is-keyword.stderr b/src/test/ui/dollar-crate/dollar-crate-is-keyword.stderr index e94a5fe96ff..5d4f39086ce 100644 --- a/src/test/ui/dollar-crate/dollar-crate-is-keyword.stderr +++ b/src/test/ui/dollar-crate/dollar-crate-is-keyword.stderr @@ -1,7 +1,7 @@ error: expected identifier, found reserved identifier `$crate` --> $DIR/dollar-crate-is-keyword.rs:6:20 | -LL | struct $crate {} //~ ERROR expected identifier, found reserved identifier `$crate` +LL | struct $crate {} | ^^^^^^ expected identifier, found reserved identifier ... LL | m!(); @@ -10,7 +10,7 @@ LL | m!(); error: expected identifier, found reserved identifier `$crate` --> $DIR/dollar-crate-is-keyword.rs:11:23 | -LL | use $crate as $crate; //~ ERROR expected identifier, found reserved identifier `$crate` +LL | use $crate as $crate; | ^^^^^^ expected identifier, found reserved identifier ... LL | m!(); @@ -30,7 +30,7 @@ LL | m!(); warning: `$crate` may not be imported --> $DIR/dollar-crate-is-keyword.rs:11:9 | -LL | use $crate as $crate; //~ ERROR expected identifier, found reserved identifier `$crate` +LL | use $crate as $crate; | ^^^^^^^^^^^^^^^^^^^^^ ... LL | m!(); diff --git a/src/test/ui/double-import.stderr b/src/test/ui/double-import.stderr index 2fefdc49e9c..7a4e8e5d3b9 100644 --- a/src/test/ui/double-import.stderr +++ b/src/test/ui/double-import.stderr @@ -3,13 +3,13 @@ error[E0252]: the name `foo` is defined multiple times | LL | use sub1::foo; | --------- previous import of the value `foo` here -LL | use sub2::foo; //~ ERROR the name `foo` is defined multiple times +LL | use sub2::foo; | ^^^^^^^^^ `foo` reimported here | = note: `foo` must be defined only once in the value namespace of this module help: you can use `as` to change the binding name of the import | -LL | use sub2::foo as other_foo; //~ ERROR the name `foo` is defined multiple times +LL | use sub2::foo as other_foo; | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/dropck/drop-with-active-borrows-1.stderr b/src/test/ui/dropck/drop-with-active-borrows-1.stderr index a4295f96205..71960fcecb5 100644 --- a/src/test/ui/dropck/drop-with-active-borrows-1.stderr +++ b/src/test/ui/dropck/drop-with-active-borrows-1.stderr @@ -3,7 +3,7 @@ error[E0505]: cannot move out of `a` because it is borrowed | LL | let b: Vec<&str> = a.lines().collect(); | - borrow of `a` occurs here -LL | drop(a); //~ ERROR cannot move out of `a` because it is borrowed +LL | drop(a); | ^ move out of `a` occurs here error: aborting due to previous error diff --git a/src/test/ui/dropck/drop-with-active-borrows-2.stderr b/src/test/ui/dropck/drop-with-active-borrows-2.stderr index 347389cb59d..ef46c9276be 100644 --- a/src/test/ui/dropck/drop-with-active-borrows-2.stderr +++ b/src/test/ui/dropck/drop-with-active-borrows-2.stderr @@ -3,7 +3,7 @@ error[E0597]: `raw_lines` does not live long enough | LL | raw_lines.iter().map(|l| l.trim()).collect() | ^^^^^^^^^ borrowed value does not live long enough -LL | //~^ ERROR `raw_lines` does not live long enough +LL | LL | } | - borrowed value only lives until here | diff --git a/src/test/ui/dropck/dropck-eyepatch-implies-unsafe-impl.stderr b/src/test/ui/dropck/dropck-eyepatch-implies-unsafe-impl.stderr index c3139948a07..49e55be1b49 100644 --- a/src/test/ui/dropck/dropck-eyepatch-implies-unsafe-impl.stderr +++ b/src/test/ui/dropck/dropck-eyepatch-implies-unsafe-impl.stderr @@ -2,7 +2,7 @@ error[E0569]: requires an `unsafe impl` declaration due to `#[may_dangle]` attri --> $DIR/dropck-eyepatch-implies-unsafe-impl.rs:21:1 | LL | / impl<#[may_dangle] A, B: fmt::Debug> Drop for Pt { -LL | | //~^ ERROR requires an `unsafe impl` declaration due to `#[may_dangle]` attribute +LL | | LL | | LL | | // (unsafe to access self.1 due to #[may_dangle] on A) LL | | fn drop(&mut self) { println!("drop {} {:?}", self.0, self.2); } @@ -13,7 +13,7 @@ error[E0569]: requires an `unsafe impl` declaration due to `#[may_dangle]` attri --> $DIR/dropck-eyepatch-implies-unsafe-impl.rs:27:1 | LL | / impl<#[may_dangle] 'a, 'b, B: fmt::Debug> Drop for Pr<'a, 'b, B> { -LL | | //~^ ERROR requires an `unsafe impl` declaration due to `#[may_dangle]` attribute +LL | | LL | | LL | | // (unsafe to access self.1 due to #[may_dangle] on 'a) LL | | fn drop(&mut self) { println!("drop {} {:?}", self.0, self.2); } diff --git a/src/test/ui/dropck/dropck-union.stderr b/src/test/ui/dropck/dropck-union.stderr index 6cb3c139132..4f6cd872449 100644 --- a/src/test/ui/dropck/dropck-union.stderr +++ b/src/test/ui/dropck/dropck-union.stderr @@ -1,7 +1,7 @@ error[E0597]: `v` does not live long enough --> $DIR/dropck-union.rs:39:19 | -LL | v.0.set(Some(&v)); //~ ERROR: `v` does not live long enough +LL | v.0.set(Some(&v)); | ^ borrowed value does not live long enough LL | } | - `v` dropped here while still borrowed diff --git a/src/test/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr b/src/test/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr index 317ac767431..9bf324412c3 100644 --- a/src/test/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr +++ b/src/test/ui/dropck/dropck_no_diverge_on_nonregular_1.stderr @@ -1,7 +1,7 @@ error[E0320]: overflow while adding drop-check rules for FingerTree --> $DIR/dropck_no_diverge_on_nonregular_1.rs:24:9 | -LL | let ft = //~ ERROR overflow while adding drop-check rules for FingerTree +LL | let ft = | ^^ | = note: overflowed on FingerTree>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> diff --git a/src/test/ui/dropck/dropck_no_diverge_on_nonregular_2.stderr b/src/test/ui/dropck/dropck_no_diverge_on_nonregular_2.stderr index b87e7a11149..0a74377ea9f 100644 --- a/src/test/ui/dropck/dropck_no_diverge_on_nonregular_2.stderr +++ b/src/test/ui/dropck/dropck_no_diverge_on_nonregular_2.stderr @@ -1,7 +1,7 @@ error[E0320]: overflow while adding drop-check rules for FingerTree --> $DIR/dropck_no_diverge_on_nonregular_2.rs:23:9 | -LL | let ft = //~ ERROR overflow while adding drop-check rules for FingerTree +LL | let ft = | ^^ | = note: overflowed on FingerTree>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> diff --git a/src/test/ui/dropck/dropck_no_diverge_on_nonregular_3.stderr b/src/test/ui/dropck/dropck_no_diverge_on_nonregular_3.stderr index 799ee45a202..d484e157519 100644 --- a/src/test/ui/dropck/dropck_no_diverge_on_nonregular_3.stderr +++ b/src/test/ui/dropck/dropck_no_diverge_on_nonregular_3.stderr @@ -1,7 +1,7 @@ error[E0320]: overflow while adding drop-check rules for std::option::Option> --> $DIR/dropck_no_diverge_on_nonregular_3.rs:32:9 | -LL | let w = //~ ERROR overflow while adding drop-check rules for std::option +LL | let w = | ^ | = note: overflowed on FingerTree>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> diff --git a/src/test/ui/dropck/dropck_trait_cycle_checked.stderr b/src/test/ui/dropck/dropck_trait_cycle_checked.stderr index 0e4bd829a94..792ef46f244 100644 --- a/src/test/ui/dropck/dropck_trait_cycle_checked.stderr +++ b/src/test/ui/dropck/dropck_trait_cycle_checked.stderr @@ -1,7 +1,7 @@ error[E0597]: `o2` does not live long enough --> $DIR/dropck_trait_cycle_checked.rs:111:14 | -LL | o1.set0(&o2); //~ ERROR `o2` does not live long enough +LL | o1.set0(&o2); | ^^ borrowed value does not live long enough ... LL | } @@ -12,7 +12,7 @@ LL | } error[E0597]: `o3` does not live long enough --> $DIR/dropck_trait_cycle_checked.rs:112:14 | -LL | o1.set1(&o3); //~ ERROR `o3` does not live long enough +LL | o1.set1(&o3); | ^^ borrowed value does not live long enough ... LL | } @@ -23,7 +23,7 @@ LL | } error[E0597]: `o2` does not live long enough --> $DIR/dropck_trait_cycle_checked.rs:113:14 | -LL | o2.set0(&o2); //~ ERROR `o2` does not live long enough +LL | o2.set0(&o2); | ^^ borrowed value does not live long enough ... LL | } @@ -34,7 +34,7 @@ LL | } error[E0597]: `o3` does not live long enough --> $DIR/dropck_trait_cycle_checked.rs:114:14 | -LL | o2.set1(&o3); //~ ERROR `o3` does not live long enough +LL | o2.set1(&o3); | ^^ borrowed value does not live long enough ... LL | } @@ -45,9 +45,9 @@ LL | } error[E0597]: `o1` does not live long enough --> $DIR/dropck_trait_cycle_checked.rs:115:14 | -LL | o3.set0(&o1); //~ ERROR `o1` does not live long enough +LL | o3.set0(&o1); | ^^ borrowed value does not live long enough -LL | o3.set1(&o2); //~ ERROR `o2` does not live long enough +LL | o3.set1(&o2); LL | } | - borrowed value only lives until here | @@ -56,7 +56,7 @@ LL | } error[E0597]: `o2` does not live long enough --> $DIR/dropck_trait_cycle_checked.rs:116:14 | -LL | o3.set1(&o2); //~ ERROR `o2` does not live long enough +LL | o3.set1(&o2); | ^^ borrowed value does not live long enough LL | } | - borrowed value only lives until here diff --git a/src/test/ui/dst/dst-bad-coerce2.stderr b/src/test/ui/dst/dst-bad-coerce2.stderr index 6fb5c4b32ef..cae4ec51c37 100644 --- a/src/test/ui/dst/dst-bad-coerce2.stderr +++ b/src/test/ui/dst/dst-bad-coerce2.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/dst-bad-coerce2.rs:15:33 | -LL | let f3: &mut Fat<[isize]> = f2; //~ ERROR mismatched types +LL | let f3: &mut Fat<[isize]> = f2; | ^^ types differ in mutability | = note: expected type `&mut Fat<[isize]>` @@ -10,7 +10,7 @@ LL | let f3: &mut Fat<[isize]> = f2; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/dst-bad-coerce2.rs:20:29 | -LL | let f3: &mut Fat = f2; //~ ERROR mismatched types +LL | let f3: &mut Fat = f2; | ^^ types differ in mutability | = note: expected type `&mut Fat` @@ -19,7 +19,7 @@ LL | let f3: &mut Fat = f2; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/dst-bad-coerce2.rs:25:31 | -LL | let f3: &mut ([isize],) = f2; //~ ERROR mismatched types +LL | let f3: &mut ([isize],) = f2; | ^^ types differ in mutability | = note: expected type `&mut ([isize],)` @@ -28,7 +28,7 @@ LL | let f3: &mut ([isize],) = f2; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/dst-bad-coerce2.rs:30:27 | -LL | let f3: &mut (Bar,) = f2; //~ ERROR mismatched types +LL | let f3: &mut (Bar,) = f2; | ^^ types differ in mutability | = note: expected type `&mut (dyn Bar,)` diff --git a/src/test/ui/dst/dst-bad-coerce3.stderr b/src/test/ui/dst/dst-bad-coerce3.stderr index 701a869ee91..61473269e50 100644 --- a/src/test/ui/dst/dst-bad-coerce3.stderr +++ b/src/test/ui/dst/dst-bad-coerce3.stderr @@ -1,7 +1,7 @@ error[E0597]: `f1` does not live long enough --> $DIR/dst-bad-coerce3.rs:16:33 | -LL | let f2: &Fat<[isize; 3]> = &f1; //~ ERROR `f1` does not live long enough +LL | let f2: &Fat<[isize; 3]> = &f1; | ^^ borrowed value does not live long enough ... LL | } @@ -16,7 +16,7 @@ LL | fn baz<'a>() { error[E0597]: `f1` does not live long enough --> $DIR/dst-bad-coerce3.rs:21:26 | -LL | let f2: &Fat = &f1; //~ ERROR `f1` does not live long enough +LL | let f2: &Fat = &f1; | ^^ borrowed value does not live long enough ... LL | } @@ -31,7 +31,7 @@ LL | fn baz<'a>() { error[E0597]: `f1` does not live long enough --> $DIR/dst-bad-coerce3.rs:26:31 | -LL | let f2: &([isize; 3],) = &f1; //~ ERROR `f1` does not live long enough +LL | let f2: &([isize; 3],) = &f1; | ^^ borrowed value does not live long enough ... LL | } @@ -46,7 +46,7 @@ LL | fn baz<'a>() { error[E0597]: `f1` does not live long enough --> $DIR/dst-bad-coerce3.rs:31:24 | -LL | let f2: &(Foo,) = &f1; //~ ERROR `f1` does not live long enough +LL | let f2: &(Foo,) = &f1; | ^^ borrowed value does not live long enough LL | let f3: &'a (Bar,) = f2; LL | } diff --git a/src/test/ui/dst/dst-bad-coercions.stderr b/src/test/ui/dst/dst-bad-coercions.stderr index df223b7cb96..27016829a07 100644 --- a/src/test/ui/dst/dst-bad-coercions.stderr +++ b/src/test/ui/dst/dst-bad-coercions.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/dst-bad-coercions.rs:14:17 | -LL | let y: &S = x; //~ ERROR mismatched types +LL | let y: &S = x; | ^ expected &S, found *-ptr | = note: expected type `&S` @@ -10,7 +10,7 @@ LL | let y: &S = x; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/dst-bad-coercions.rs:15:17 | -LL | let y: &T = x; //~ ERROR mismatched types +LL | let y: &T = x; | ^ | | | expected &dyn T, found *-ptr @@ -22,7 +22,7 @@ LL | let y: &T = x; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/dst-bad-coercions.rs:19:17 | -LL | let y: &S = x; //~ ERROR mismatched types +LL | let y: &S = x; | ^ expected &S, found *-ptr | = note: expected type `&S` @@ -31,7 +31,7 @@ LL | let y: &S = x; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/dst-bad-coercions.rs:20:17 | -LL | let y: &T = x; //~ ERROR mismatched types +LL | let y: &T = x; | ^ | | | expected &dyn T, found *-ptr @@ -43,7 +43,7 @@ LL | let y: &T = x; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/dst-bad-coercions.rs:23:21 | -LL | let x: &mut T = &S; //~ ERROR mismatched types +LL | let x: &mut T = &S; | ^^ types differ in mutability | = note: expected type `&mut dyn T` @@ -52,7 +52,7 @@ LL | let x: &mut T = &S; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/dst-bad-coercions.rs:24:21 | -LL | let x: *mut T = &S; //~ ERROR mismatched types +LL | let x: *mut T = &S; | ^^ types differ in mutability | = note: expected type `*mut dyn T` @@ -61,7 +61,7 @@ LL | let x: *mut T = &S; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/dst-bad-coercions.rs:25:21 | -LL | let x: *mut S = &S; //~ ERROR mismatched types +LL | let x: *mut S = &S; | ^^ types differ in mutability | = note: expected type `*mut S` diff --git a/src/test/ui/duplicate/dupe-symbols-1.stderr b/src/test/ui/duplicate/dupe-symbols-1.stderr index 58aa1e433d1..c46ac0c6ed4 100644 --- a/src/test/ui/duplicate/dupe-symbols-1.stderr +++ b/src/test/ui/duplicate/dupe-symbols-1.stderr @@ -2,7 +2,7 @@ error: symbol `fail` is already defined --> $DIR/dupe-symbols-1.rs:10:1 | LL | / pub fn b() { -LL | | //~^ symbol `fail` is already defined +LL | | LL | | } | |_^ diff --git a/src/test/ui/duplicate/dupe-symbols-2.stderr b/src/test/ui/duplicate/dupe-symbols-2.stderr index 65185cd5429..821bdd03392 100644 --- a/src/test/ui/duplicate/dupe-symbols-2.stderr +++ b/src/test/ui/duplicate/dupe-symbols-2.stderr @@ -2,7 +2,7 @@ error: symbol `fail` is already defined --> $DIR/dupe-symbols-2.rs:13:5 | LL | / pub extern fn fail() { -LL | | //~^ symbol `fail` is already defined +LL | | LL | | } | |_____^ diff --git a/src/test/ui/duplicate/dupe-symbols-3.stderr b/src/test/ui/duplicate/dupe-symbols-3.stderr index 5cd618bc9f6..f30c88e4760 100644 --- a/src/test/ui/duplicate/dupe-symbols-3.stderr +++ b/src/test/ui/duplicate/dupe-symbols-3.stderr @@ -2,7 +2,7 @@ error: symbol `fail` is already defined --> $DIR/dupe-symbols-3.rs:10:1 | LL | / pub fn fail() { -LL | | //~^ symbol `fail` is already defined +LL | | LL | | } | |_^ diff --git a/src/test/ui/duplicate/dupe-symbols-5.stderr b/src/test/ui/duplicate/dupe-symbols-5.stderr index 3acfdd22a9a..cee72660e4f 100644 --- a/src/test/ui/duplicate/dupe-symbols-5.stderr +++ b/src/test/ui/duplicate/dupe-symbols-5.stderr @@ -2,7 +2,7 @@ error: symbol `fail` is already defined --> $DIR/dupe-symbols-5.rs:9:1 | LL | / pub fn b() { -LL | | //~^ symbol `fail` is already defined +LL | | LL | | } | |_^ diff --git a/src/test/ui/duplicate/duplicate-check-macro-exports.stderr b/src/test/ui/duplicate/duplicate-check-macro-exports.stderr index 97ee9b9b05f..02f0206c443 100644 --- a/src/test/ui/duplicate/duplicate-check-macro-exports.stderr +++ b/src/test/ui/duplicate/duplicate-check-macro-exports.stderr @@ -4,7 +4,7 @@ error[E0255]: the name `panic` is defined multiple times LL | pub use std::panic; | ---------- previous import of the macro `panic` here ... -LL | macro_rules! panic { () => {} } //~ ERROR the name `panic` is defined multiple times +LL | macro_rules! panic { () => {} } | ^^^^^^^^^^^^^^^^^^ `panic` redefined here | = note: `panic` must be defined only once in the macro namespace of this module diff --git a/src/test/ui/duplicate_entry_error.stderr b/src/test/ui/duplicate_entry_error.stderr index ddb11e19c03..1892ad38a59 100644 --- a/src/test/ui/duplicate_entry_error.stderr +++ b/src/test/ui/duplicate_entry_error.stderr @@ -2,7 +2,7 @@ error[E0152]: duplicate lang item found: `panic_impl`. --> $DIR/duplicate_entry_error.rs:10:1 | LL | / fn panic_impl(info: &PanicInfo) -> ! { -LL | | //~^ ERROR: duplicate lang item found: `panic_impl`. +LL | | LL | | loop {} LL | | } | |_^ diff --git a/src/test/ui/e0119/complex-impl.stderr b/src/test/ui/e0119/complex-impl.stderr index fb0c94dcc3d..f211530dcf4 100644 --- a/src/test/ui/e0119/complex-impl.stderr +++ b/src/test/ui/e0119/complex-impl.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `complex_impl_support::External` for type `(Q, complex_impl_support::M<'_, '_, '_, std::boxed::Box<_>, _, _>)`: --> $DIR/complex-impl.rs:9:1 | -LL | impl External for (Q, R) {} //~ ERROR must be used +LL | impl External for (Q, R) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `complex_impl_support`: @@ -11,7 +11,7 @@ LL | impl External for (Q, R) {} //~ ERROR must be used error[E0210]: type parameter `R` must be used as the type parameter for some local type (e.g., `MyStruct`) --> $DIR/complex-impl.rs:9:1 | -LL | impl External for (Q, R) {} //~ ERROR must be used +LL | impl External for (Q, R) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `R` must be used as the type parameter for some local type | = note: only traits defined in the current crate can be implemented for a type parameter diff --git a/src/test/ui/e0119/conflict-with-std.stderr b/src/test/ui/e0119/conflict-with-std.stderr index 1cfb3c1daba..8c12b3d0bb9 100644 --- a/src/test/ui/e0119/conflict-with-std.stderr +++ b/src/test/ui/e0119/conflict-with-std.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `std::convert::AsRef` for type `std::boxed::Box`: --> $DIR/conflict-with-std.rs:6:1 | -LL | impl AsRef for Box { //~ ERROR conflicting implementations +LL | impl AsRef for Box { | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `alloc`: @@ -11,7 +11,7 @@ LL | impl AsRef for Box { //~ ERROR conflicting implementations error[E0119]: conflicting implementations of trait `std::convert::From` for type `S`: --> $DIR/conflict-with-std.rs:13:1 | -LL | impl From for S { //~ ERROR conflicting implementations +LL | impl From for S { | ^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: @@ -20,7 +20,7 @@ LL | impl From for S { //~ ERROR conflicting implementations error[E0119]: conflicting implementations of trait `std::convert::TryFrom` for type `X`: --> $DIR/conflict-with-std.rs:20:1 | -LL | impl TryFrom for X { //~ ERROR conflicting implementations +LL | impl TryFrom for X { | ^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: diff --git a/src/test/ui/e0119/issue-23563.stderr b/src/test/ui/e0119/issue-23563.stderr index 53f9a5e7064..8011689880d 100644 --- a/src/test/ui/e0119/issue-23563.stderr +++ b/src/test/ui/e0119/issue-23563.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `a::LolFrom<&[_]>` for type `LocalType<_>`: --> $DIR/issue-23563.rs:13:1 | -LL | impl<'a, T> LolFrom<&'a [T]> for LocalType { //~ ERROR conflicting implementations of trait +LL | impl<'a, T> LolFrom<&'a [T]> for LocalType { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `issue_23563_a`: diff --git a/src/test/ui/e0119/issue-27403.stderr b/src/test/ui/e0119/issue-27403.stderr index 76c326fb205..cba10432a93 100644 --- a/src/test/ui/e0119/issue-27403.stderr +++ b/src/test/ui/e0119/issue-27403.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `std::convert::Into<_>` for type `GenX<_>`: --> $DIR/issue-27403.rs:5:1 | -LL | impl Into for GenX { //~ ERROR conflicting implementations +LL | impl Into for GenX { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: diff --git a/src/test/ui/e0119/issue-28981.stderr b/src/test/ui/e0119/issue-28981.stderr index 8b4cd9acac4..e1e07190d8c 100644 --- a/src/test/ui/e0119/issue-28981.stderr +++ b/src/test/ui/e0119/issue-28981.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `std::ops::Deref` for type `&_`: --> $DIR/issue-28981.rs:5:1 | -LL | impl Deref for Foo { } //~ ERROR must be used +LL | impl Deref for Foo { } | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: @@ -11,7 +11,7 @@ LL | impl Deref for Foo { } //~ ERROR must be used error[E0210]: type parameter `Foo` must be used as the type parameter for some local type (e.g., `MyStruct`) --> $DIR/issue-28981.rs:5:1 | -LL | impl Deref for Foo { } //~ ERROR must be used +LL | impl Deref for Foo { } | ^^^^^^^^^^^^^^^^^^^^^^^ type parameter `Foo` must be used as the type parameter for some local type | = note: only traits defined in the current crate can be implemented for a type parameter diff --git a/src/test/ui/e0119/so-37347311.stderr b/src/test/ui/e0119/so-37347311.stderr index eb321668d13..f2166de71f8 100644 --- a/src/test/ui/e0119/so-37347311.stderr +++ b/src/test/ui/e0119/so-37347311.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `std::convert::From>` for type `MyError<_>`: --> $DIR/so-37347311.rs:11:1 | -LL | impl From for MyError { //~ ERROR conflicting implementations +LL | impl From for MyError { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: diff --git a/src/test/ui/editions/edition-deny-async-fns-2015.stderr b/src/test/ui/editions/edition-deny-async-fns-2015.stderr index 1ad907aa7eb..83c8dbc7472 100644 --- a/src/test/ui/editions/edition-deny-async-fns-2015.stderr +++ b/src/test/ui/editions/edition-deny-async-fns-2015.stderr @@ -1,55 +1,55 @@ error[E0670]: `async fn` is not permitted in the 2015 edition --> $DIR/edition-deny-async-fns-2015.rs:5:1 | -LL | async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition +LL | async fn foo() {} | ^^^^^ error[E0670]: `async fn` is not permitted in the 2015 edition --> $DIR/edition-deny-async-fns-2015.rs:7:12 | -LL | fn baz() { async fn foo() {} } //~ ERROR `async fn` is not permitted in the 2015 edition +LL | fn baz() { async fn foo() {} } | ^^^^^ error[E0670]: `async fn` is not permitted in the 2015 edition --> $DIR/edition-deny-async-fns-2015.rs:10:5 | -LL | async fn bar() {} //~ ERROR `async fn` is not permitted in the 2015 edition +LL | async fn bar() {} | ^^^^^ error[E0670]: `async fn` is not permitted in the 2015 edition --> $DIR/edition-deny-async-fns-2015.rs:9:1 | -LL | async fn async_baz() { //~ ERROR `async fn` is not permitted in the 2015 edition +LL | async fn async_baz() { | ^^^^^ error[E0670]: `async fn` is not permitted in the 2015 edition --> $DIR/edition-deny-async-fns-2015.rs:32:9 | -LL | async fn bar() {} //~ ERROR `async fn` is not permitted in the 2015 edition +LL | async fn bar() {} | ^^^^^ error[E0670]: `async fn` is not permitted in the 2015 edition --> $DIR/edition-deny-async-fns-2015.rs:28:9 | -LL | async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition +LL | async fn foo() {} | ^^^^^ error[E0670]: `async fn` is not permitted in the 2015 edition --> $DIR/edition-deny-async-fns-2015.rs:16:5 | -LL | async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition +LL | async fn foo() {} | ^^^^^ error[E0706]: trait fns cannot be declared `async` --> $DIR/edition-deny-async-fns-2015.rs:20:5 | -LL | async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition +LL | async fn foo() {} | ^^^^^^^^^^^^^^^^^ error[E0670]: `async fn` is not permitted in the 2015 edition --> $DIR/edition-deny-async-fns-2015.rs:20:5 | -LL | async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition +LL | async fn foo() {} | ^^^^^ error: aborting due to 9 previous errors diff --git a/src/test/ui/editions/edition-imports-2015.stderr b/src/test/ui/editions/edition-imports-2015.stderr index 816ab21d814..4aba5323cc5 100644 --- a/src/test/ui/editions/edition-imports-2015.stderr +++ b/src/test/ui/editions/edition-imports-2015.stderr @@ -1,7 +1,7 @@ error: cannot glob-import all possible crates --> $DIR/edition-imports-2015.rs:23:5 | -LL | gen_glob!(); //~ ERROR cannot glob-import all possible crates +LL | gen_glob!(); | ^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/editions/edition-imports-2018.stderr b/src/test/ui/editions/edition-imports-2018.stderr index 944f42ee045..6ef49b62560 100644 --- a/src/test/ui/editions/edition-imports-2018.stderr +++ b/src/test/ui/editions/edition-imports-2018.stderr @@ -1,7 +1,7 @@ error: cannot glob-import all possible crates --> $DIR/edition-imports-2018.rs:24:5 | -LL | gen_glob!(); //~ ERROR cannot glob-import all possible crates +LL | gen_glob!(); | ^^^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/editions/edition-imports-virtual-2015-ambiguity.stderr b/src/test/ui/editions/edition-imports-virtual-2015-ambiguity.stderr index ac2bf21c5c0..1f309f5e8f0 100644 --- a/src/test/ui/editions/edition-imports-virtual-2015-ambiguity.stderr +++ b/src/test/ui/editions/edition-imports-virtual-2015-ambiguity.stderr @@ -1,7 +1,7 @@ error[E0659]: `Ambiguous` is ambiguous (name vs any other name during import resolution) --> $DIR/edition-imports-virtual-2015-ambiguity.rs:15:9 | -LL | edition_imports_2015::gen_ambiguous!(); //~ ERROR `Ambiguous` is ambiguous +LL | edition_imports_2015::gen_ambiguous!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ambiguous name | note: `Ambiguous` could refer to the struct defined here @@ -21,7 +21,7 @@ LL | pub struct Ambiguous {} error[E0659]: `edition_imports_2015` is ambiguous (name in the crate root vs extern crate during absolute path resolution) --> $DIR/edition-imports-virtual-2015-ambiguity.rs:15:9 | -LL | edition_imports_2015::gen_ambiguous!(); //~ ERROR `Ambiguous` is ambiguous +LL | edition_imports_2015::gen_ambiguous!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ambiguous name | = note: `edition_imports_2015` could refer to an extern crate passed with `--extern` diff --git a/src/test/ui/editions/edition-keywords-2015-2015-parsing.stderr b/src/test/ui/editions/edition-keywords-2015-2015-parsing.stderr index f2a9da71ca5..3435fdfd725 100644 --- a/src/test/ui/editions/edition-keywords-2015-2015-parsing.stderr +++ b/src/test/ui/editions/edition-keywords-2015-2015-parsing.stderr @@ -1,13 +1,13 @@ error: no rules expected the token `r#async` --> $DIR/edition-keywords-2015-2015-parsing.rs:16:31 | -LL | r#async = consumes_async!(r#async); //~ ERROR no rules expected the token `r#async` +LL | r#async = consumes_async!(r#async); | ^^^^^^^ no rules expected this token in macro call error: no rules expected the token `async` --> $DIR/edition-keywords-2015-2015-parsing.rs:17:35 | -LL | r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async` +LL | r#async = consumes_async_raw!(async); | ^^^^^ no rules expected this token in macro call error: aborting due to 2 previous errors diff --git a/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr b/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr index af1ac19c837..9724f78db66 100644 --- a/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr +++ b/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr @@ -1,7 +1,7 @@ error: expected identifier, found reserved keyword `async` --> $DIR/edition-keywords-2015-2018-expansion.rs:8:5 | -LL | produces_async! {} //~ ERROR expected identifier, found reserved keyword +LL | produces_async! {} | ^^^^^^^^^^^^^^^^^^ expected identifier, found reserved keyword | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/editions/edition-keywords-2015-2018-parsing.stderr b/src/test/ui/editions/edition-keywords-2015-2018-parsing.stderr index fbb3b8bc756..6e86d746f54 100644 --- a/src/test/ui/editions/edition-keywords-2015-2018-parsing.stderr +++ b/src/test/ui/editions/edition-keywords-2015-2018-parsing.stderr @@ -1,13 +1,13 @@ error: no rules expected the token `r#async` --> $DIR/edition-keywords-2015-2018-parsing.rs:16:31 | -LL | r#async = consumes_async!(r#async); //~ ERROR no rules expected the token `r#async` +LL | r#async = consumes_async!(r#async); | ^^^^^^^ no rules expected this token in macro call error: no rules expected the token `async` --> $DIR/edition-keywords-2015-2018-parsing.rs:17:35 | -LL | r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async` +LL | r#async = consumes_async_raw!(async); | ^^^^^ no rules expected this token in macro call error: aborting due to 2 previous errors diff --git a/src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr b/src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr index 52399362482..0d8850c2397 100644 --- a/src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr +++ b/src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr @@ -1,33 +1,33 @@ error: expected identifier, found reserved keyword `async` --> $DIR/edition-keywords-2018-2015-parsing.rs:8:13 | -LL | let mut async = 1; //~ ERROR expected identifier, found reserved keyword `async` +LL | let mut async = 1; | ^^^^^ expected identifier, found reserved keyword help: you can escape reserved keywords to use them as identifiers | -LL | let mut r#async = 1; //~ ERROR expected identifier, found reserved keyword `async` +LL | let mut r#async = 1; | ^^^^^^^ error: expected identifier, found reserved keyword `async` --> $DIR/edition-keywords-2018-2015-parsing.rs:18:13 | -LL | module::async(); //~ ERROR expected identifier, found reserved keyword `async` +LL | module::async(); | ^^^^^ expected identifier, found reserved keyword help: you can escape reserved keywords to use them as identifiers | -LL | module::r#async(); //~ ERROR expected identifier, found reserved keyword `async` +LL | module::r#async(); | ^^^^^^^ error: no rules expected the token `r#async` --> $DIR/edition-keywords-2018-2015-parsing.rs:12:31 | -LL | r#async = consumes_async!(r#async); //~ ERROR no rules expected the token `r#async` +LL | r#async = consumes_async!(r#async); | ^^^^^^^ no rules expected this token in macro call error: no rules expected the token `async` --> $DIR/edition-keywords-2018-2015-parsing.rs:13:35 | -LL | r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async` +LL | r#async = consumes_async_raw!(async); | ^^^^^ no rules expected this token in macro call error: macro expansion ends with an incomplete expression: expected one of `move`, `|`, or `||` diff --git a/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr b/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr index d997c3d8a42..ab601c8d8a7 100644 --- a/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr +++ b/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr @@ -1,7 +1,7 @@ error: expected identifier, found reserved keyword `async` --> $DIR/edition-keywords-2018-2018-expansion.rs:8:5 | -LL | produces_async! {} //~ ERROR expected identifier, found reserved keyword `async` +LL | produces_async! {} | ^^^^^^^^^^^^^^^^^^ expected identifier, found reserved keyword | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr b/src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr index 1621368870a..0604b600d23 100644 --- a/src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr +++ b/src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr @@ -1,33 +1,33 @@ error: expected identifier, found reserved keyword `async` --> $DIR/edition-keywords-2018-2018-parsing.rs:8:13 | -LL | let mut async = 1; //~ ERROR expected identifier, found reserved keyword `async` +LL | let mut async = 1; | ^^^^^ expected identifier, found reserved keyword help: you can escape reserved keywords to use them as identifiers | -LL | let mut r#async = 1; //~ ERROR expected identifier, found reserved keyword `async` +LL | let mut r#async = 1; | ^^^^^^^ error: expected identifier, found reserved keyword `async` --> $DIR/edition-keywords-2018-2018-parsing.rs:18:13 | -LL | module::async(); //~ ERROR expected identifier, found reserved keyword `async` +LL | module::async(); | ^^^^^ expected identifier, found reserved keyword help: you can escape reserved keywords to use them as identifiers | -LL | module::r#async(); //~ ERROR expected identifier, found reserved keyword `async` +LL | module::r#async(); | ^^^^^^^ error: no rules expected the token `r#async` --> $DIR/edition-keywords-2018-2018-parsing.rs:12:31 | -LL | r#async = consumes_async!(r#async); //~ ERROR no rules expected the token `r#async` +LL | r#async = consumes_async!(r#async); | ^^^^^^^ no rules expected this token in macro call error: no rules expected the token `async` --> $DIR/edition-keywords-2018-2018-parsing.rs:13:35 | -LL | r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async` +LL | r#async = consumes_async_raw!(async); | ^^^^^ no rules expected this token in macro call error: macro expansion ends with an incomplete expression: expected one of `move`, `|`, or `||` diff --git a/src/test/ui/empty/empty-comment.stderr b/src/test/ui/empty/empty-comment.stderr index 908d5710c8a..116cc83fa9c 100644 --- a/src/test/ui/empty/empty-comment.stderr +++ b/src/test/ui/empty/empty-comment.stderr @@ -4,7 +4,7 @@ error: unexpected end of macro invocation LL | macro_rules! one_arg_macro { | -------------------------- when calling this macro ... -LL | one_arg_macro!(/**/); //~ ERROR unexpected end +LL | one_arg_macro!(/**/); | ^^^^^^^^^^^^^^^^^^^^^ missing tokens in macro arguments error: aborting due to previous error diff --git a/src/test/ui/empty/empty-linkname.stderr b/src/test/ui/empty/empty-linkname.stderr index a07a4f1c567..df41cb89413 100644 --- a/src/test/ui/empty/empty-linkname.stderr +++ b/src/test/ui/empty/empty-linkname.stderr @@ -1,7 +1,7 @@ error[E0454]: #[link(name = "")] given with empty name --> $DIR/empty-linkname.rs:1:1 | -LL | #[link(name = "")] //~ ERROR: given with empty name +LL | #[link(name = "")] | ^^^^^^^^^^^^^^^^^^ empty name given error: aborting due to previous error diff --git a/src/test/ui/empty/empty-struct-braces-expr.stderr b/src/test/ui/empty/empty-struct-braces-expr.stderr index 19844503a48..a20d7998249 100644 --- a/src/test/ui/empty/empty-struct-braces-expr.stderr +++ b/src/test/ui/empty/empty-struct-braces-expr.stderr @@ -1,7 +1,7 @@ error[E0423]: expected value, found struct `Empty1` --> $DIR/empty-struct-braces-expr.rs:15:14 | -LL | let e1 = Empty1; //~ ERROR expected value, found struct `Empty1` +LL | let e1 = Empty1; | ^^^^^^ | | | did you mean `Empty1 { /* fields */ }`? @@ -10,7 +10,7 @@ LL | let e1 = Empty1; //~ ERROR expected value, found struct `Empty1` error[E0423]: expected function, found struct `Empty1` --> $DIR/empty-struct-braces-expr.rs:16:14 | -LL | let e1 = Empty1(); //~ ERROR expected function, found struct `Empty1` +LL | let e1 = Empty1(); | ^^^^^^ | | | did you mean `Empty1 { /* fields */ }`? @@ -19,19 +19,19 @@ LL | let e1 = Empty1(); //~ ERROR expected function, found struct `Empty1` error[E0423]: expected value, found struct variant `E::Empty3` --> $DIR/empty-struct-braces-expr.rs:17:14 | -LL | let e3 = E::Empty3; //~ ERROR expected value, found struct variant `E::Empty3` +LL | let e3 = E::Empty3; | ^^^^^^^^^ did you mean `E::Empty3 { /* fields */ }`? error[E0423]: expected function, found struct variant `E::Empty3` --> $DIR/empty-struct-braces-expr.rs:18:14 | -LL | let e3 = E::Empty3(); //~ ERROR expected function, found struct variant `E::Empty3` +LL | let e3 = E::Empty3(); | ^^^^^^^^^ did you mean `E::Empty3 { /* fields */ }`? error[E0423]: expected value, found struct `XEmpty1` --> $DIR/empty-struct-braces-expr.rs:20:15 | -LL | let xe1 = XEmpty1; //~ ERROR expected value, found struct `XEmpty1` +LL | let xe1 = XEmpty1; | ^^^^^^^ | | | did you mean `XEmpty1 { /* fields */ }`? @@ -40,7 +40,7 @@ LL | let xe1 = XEmpty1; //~ ERROR expected value, found struct `XEmpty1` error[E0423]: expected function, found struct `XEmpty1` --> $DIR/empty-struct-braces-expr.rs:21:15 | -LL | let xe1 = XEmpty1(); //~ ERROR expected function, found struct `XEmpty1` +LL | let xe1 = XEmpty1(); | ^^^^^^^ | | | did you mean `XEmpty1 { /* fields */ }`? @@ -49,7 +49,7 @@ LL | let xe1 = XEmpty1(); //~ ERROR expected function, found struct `XEmpty1 error[E0599]: no variant named `Empty3` found for type `empty_struct::XE` in the current scope --> $DIR/empty-struct-braces-expr.rs:22:19 | -LL | let xe3 = XE::Empty3; //~ ERROR no variant named `Empty3` found for type +LL | let xe3 = XE::Empty3; | ----^^^^^^ | | | | | help: did you mean: `XEmpty3` @@ -58,7 +58,7 @@ LL | let xe3 = XE::Empty3; //~ ERROR no variant named `Empty3` found for typ error[E0599]: no variant named `Empty3` found for type `empty_struct::XE` in the current scope --> $DIR/empty-struct-braces-expr.rs:23:19 | -LL | let xe3 = XE::Empty3(); //~ ERROR no variant named `Empty3` found for type +LL | let xe3 = XE::Empty3(); | ----^^^^^^ | | | | | help: did you mean: `XEmpty3` diff --git a/src/test/ui/empty/empty-struct-braces-pat-2.stderr b/src/test/ui/empty/empty-struct-braces-pat-2.stderr index fc2ed79bb2e..12047b5880c 100644 --- a/src/test/ui/empty/empty-struct-braces-pat-2.stderr +++ b/src/test/ui/empty/empty-struct-braces-pat-2.stderr @@ -1,7 +1,7 @@ error[E0532]: expected tuple struct/variant, found struct `Empty1` --> $DIR/empty-struct-braces-pat-2.rs:15:9 | -LL | Empty1() => () //~ ERROR expected tuple struct/variant, found struct `Empty1` +LL | Empty1() => () | ^^^^^^ | | | did you mean `Empty1 { /* fields */ }`? @@ -10,7 +10,7 @@ LL | Empty1() => () //~ ERROR expected tuple struct/variant, found struc error[E0532]: expected tuple struct/variant, found struct `XEmpty1` --> $DIR/empty-struct-braces-pat-2.rs:18:9 | -LL | XEmpty1() => () //~ ERROR expected tuple struct/variant, found struct `XEmpty1` +LL | XEmpty1() => () | ^^^^^^^ | | | did you mean `XEmpty1 { /* fields */ }`? @@ -19,7 +19,7 @@ LL | XEmpty1() => () //~ ERROR expected tuple struct/variant, found stru error[E0532]: expected tuple struct/variant, found struct `Empty1` --> $DIR/empty-struct-braces-pat-2.rs:21:9 | -LL | Empty1(..) => () //~ ERROR expected tuple struct/variant, found struct `Empty1` +LL | Empty1(..) => () | ^^^^^^ | | | did you mean `Empty1 { /* fields */ }`? @@ -28,7 +28,7 @@ LL | Empty1(..) => () //~ ERROR expected tuple struct/variant, found str error[E0532]: expected tuple struct/variant, found struct `XEmpty1` --> $DIR/empty-struct-braces-pat-2.rs:24:9 | -LL | XEmpty1(..) => () //~ ERROR expected tuple struct/variant, found struct `XEmpty1` +LL | XEmpty1(..) => () | ^^^^^^^ | | | did you mean `XEmpty1 { /* fields */ }`? diff --git a/src/test/ui/empty/empty-struct-tuple-pat.stderr b/src/test/ui/empty/empty-struct-tuple-pat.stderr index f92c4e5c463..71a8141b8dd 100644 --- a/src/test/ui/empty/empty-struct-tuple-pat.stderr +++ b/src/test/ui/empty/empty-struct-tuple-pat.stderr @@ -4,7 +4,7 @@ error[E0530]: match bindings cannot shadow tuple structs LL | struct Empty2(); | ---------------- the tuple struct `Empty2` is defined here ... -LL | Empty2 => () //~ ERROR match bindings cannot shadow tuple structs +LL | Empty2 => () | ^^^^^^ cannot be named the same as a tuple struct error[E0530]: match bindings cannot shadow tuple structs @@ -13,7 +13,7 @@ error[E0530]: match bindings cannot shadow tuple structs LL | use empty_struct::*; | --------------- the tuple struct `XEmpty6` is imported here ... -LL | XEmpty6 => () //~ ERROR match bindings cannot shadow tuple structs +LL | XEmpty6 => () | ^^^^^^^ cannot be named the same as a tuple struct error[E0532]: expected unit struct/variant or constant, found tuple variant `E::Empty4` diff --git a/src/test/ui/empty/empty-struct-unit-expr.stderr b/src/test/ui/empty/empty-struct-unit-expr.stderr index b3519948f64..696eabe99cf 100644 --- a/src/test/ui/empty/empty-struct-unit-expr.stderr +++ b/src/test/ui/empty/empty-struct-unit-expr.stderr @@ -4,7 +4,7 @@ error[E0618]: expected function, found `Empty2` LL | struct Empty2; | -------------- `Empty2` defined here ... -LL | let e2 = Empty2(); //~ ERROR expected function, found `Empty2` +LL | let e2 = Empty2(); | ^^^^^^-- | | | call expression requires function @@ -27,7 +27,7 @@ LL | let e4 = E::Empty4; error[E0618]: expected function, found `empty_struct::XEmpty2` --> $DIR/empty-struct-unit-expr.rs:18:15 | -LL | let xe2 = XEmpty2(); //~ ERROR expected function, found `empty_struct::XEmpty2` +LL | let xe2 = XEmpty2(); | ^^^^^^^-- | | | call expression requires function diff --git a/src/test/ui/empty/empty-struct-unit-pat.stderr b/src/test/ui/empty/empty-struct-unit-pat.stderr index e62246562be..268fc7a6e0c 100644 --- a/src/test/ui/empty/empty-struct-unit-pat.stderr +++ b/src/test/ui/empty/empty-struct-unit-pat.stderr @@ -1,31 +1,31 @@ error[E0532]: expected tuple struct/variant, found unit struct `Empty2` --> $DIR/empty-struct-unit-pat.rs:21:9 | -LL | Empty2() => () //~ ERROR expected tuple struct/variant, found unit struct `Empty2` +LL | Empty2() => () | ^^^^^^ help: a tuple struct with a similar name exists: `XEmpty6` error[E0532]: expected tuple struct/variant, found unit struct `XEmpty2` --> $DIR/empty-struct-unit-pat.rs:24:9 | -LL | XEmpty2() => () //~ ERROR expected tuple struct/variant, found unit struct `XEmpty2` +LL | XEmpty2() => () | ^^^^^^^ help: a tuple struct with a similar name exists: `XEmpty6` error[E0532]: expected tuple struct/variant, found unit struct `Empty2` --> $DIR/empty-struct-unit-pat.rs:27:9 | -LL | Empty2(..) => () //~ ERROR expected tuple struct/variant, found unit struct `Empty2` +LL | Empty2(..) => () | ^^^^^^ help: a tuple struct with a similar name exists: `XEmpty6` error[E0532]: expected tuple struct/variant, found unit struct `XEmpty2` --> $DIR/empty-struct-unit-pat.rs:30:9 | -LL | XEmpty2(..) => () //~ ERROR expected tuple struct/variant, found unit struct `XEmpty2` +LL | XEmpty2(..) => () | ^^^^^^^ help: a tuple struct with a similar name exists: `XEmpty6` error[E0532]: expected tuple struct/variant, found unit variant `E::Empty4` --> $DIR/empty-struct-unit-pat.rs:34:9 | -LL | E::Empty4() => () //~ ERROR expected tuple struct/variant, found unit variant `E::Empty4` +LL | E::Empty4() => () | ^^^^^^^^^ not a tuple struct/variant error[E0532]: expected tuple struct/variant, found unit variant `XE::XEmpty4` @@ -39,7 +39,7 @@ LL | XE::XEmpty4() => (), error[E0532]: expected tuple struct/variant, found unit variant `E::Empty4` --> $DIR/empty-struct-unit-pat.rs:42:9 | -LL | E::Empty4(..) => () //~ ERROR expected tuple struct/variant, found unit variant `E::Empty4` +LL | E::Empty4(..) => () | ^^^^^^^^^ not a tuple struct/variant error[E0532]: expected tuple struct/variant, found unit variant `XE::XEmpty4` diff --git a/src/test/ui/enable-unstable-lib-feature.stderr b/src/test/ui/enable-unstable-lib-feature.stderr index 51cfe7beade..5b6ebc4c0d9 100644 --- a/src/test/ui/enable-unstable-lib-feature.stderr +++ b/src/test/ui/enable-unstable-lib-feature.stderr @@ -1,7 +1,7 @@ error: function `BOGUS` should have a snake case name --> $DIR/enable-unstable-lib-feature.rs:12:8 | -LL | pub fn BOGUS() { } //~ ERROR +LL | pub fn BOGUS() { } | ^^^^^ help: convert the identifier to snake case: `bogus` | note: lint level defined here diff --git a/src/test/ui/enum/enum-and-module-in-same-scope.stderr b/src/test/ui/enum/enum-and-module-in-same-scope.stderr index 5f42af8f260..538898c2f2a 100644 --- a/src/test/ui/enum/enum-and-module-in-same-scope.stderr +++ b/src/test/ui/enum/enum-and-module-in-same-scope.stderr @@ -4,7 +4,7 @@ error[E0428]: the name `Foo` is defined multiple times LL | enum Foo { | -------- previous definition of the type `Foo` here ... -LL | mod Foo { //~ ERROR the name `Foo` is defined multiple times +LL | mod Foo { | ^^^^^^^ `Foo` redefined here | = note: `Foo` must be defined only once in the type namespace of this module diff --git a/src/test/ui/enum/enum-discrim-autosizing.stderr b/src/test/ui/enum/enum-discrim-autosizing.stderr index 67b0d75d787..8848f984cfb 100644 --- a/src/test/ui/enum/enum-discrim-autosizing.stderr +++ b/src/test/ui/enum/enum-discrim-autosizing.stderr @@ -3,7 +3,7 @@ error[E0081]: discriminant value `0` already exists | LL | Au64 = 0, | - first use of `0` -LL | Bu64 = 0x8000_0000_0000_0000 //~ERROR already exists +LL | Bu64 = 0x8000_0000_0000_0000 | ^^^^^^^^^^^^^^^^^^^^^ enum already has `0` error: aborting due to previous error diff --git a/src/test/ui/enum/enum-discrim-too-small2.stderr b/src/test/ui/enum/enum-discrim-too-small2.stderr index 31ca01b86bd..6340f5a856e 100644 --- a/src/test/ui/enum/enum-discrim-too-small2.stderr +++ b/src/test/ui/enum/enum-discrim-too-small2.stderr @@ -1,7 +1,7 @@ error: literal out of range for i8 --> $DIR/enum-discrim-too-small2.rs:8:11 | -LL | Ci8 = 223, //~ ERROR literal out of range for i8 +LL | Ci8 = 223, | ^^^ | note: lint level defined here @@ -13,19 +13,19 @@ LL | #![deny(overflowing_literals)] error: literal out of range for i16 --> $DIR/enum-discrim-too-small2.rs:15:12 | -LL | Ci16 = 55555, //~ ERROR literal out of range for i16 +LL | Ci16 = 55555, | ^^^^^ error: literal out of range for i32 --> $DIR/enum-discrim-too-small2.rs:22:12 | -LL | Ci32 = 3_000_000_000, //~ ERROR literal out of range for i32 +LL | Ci32 = 3_000_000_000, | ^^^^^^^^^^^^^ error: literal out of range for i64 --> $DIR/enum-discrim-too-small2.rs:29:12 | -LL | Ci64 = 9223372036854775809, //~ ERROR literal out of range for i64 +LL | Ci64 = 9223372036854775809, | ^^^^^^^^^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/enum/enum-in-scope.stderr b/src/test/ui/enum/enum-in-scope.stderr index cd0100ec2fc..49a01abcbd6 100644 --- a/src/test/ui/enum/enum-in-scope.stderr +++ b/src/test/ui/enum/enum-in-scope.stderr @@ -4,7 +4,7 @@ error[E0530]: let bindings cannot shadow tuple structs LL | struct hello(isize); | -------------------- the tuple struct `hello` is defined here ... -LL | let hello = 0; //~ERROR let bindings cannot shadow tuple structs +LL | let hello = 0; | ^^^^^ cannot be named the same as a tuple struct error: aborting due to previous error diff --git a/src/test/ui/enum/enum-size-variance.stderr b/src/test/ui/enum/enum-size-variance.stderr index 5cc0a0d7a8f..1ebd9b6806f 100644 --- a/src/test/ui/enum/enum-size-variance.stderr +++ b/src/test/ui/enum/enum-size-variance.stderr @@ -1,7 +1,7 @@ warning: enum variant is more than three times larger (32 bytes) than the next largest --> $DIR/enum-size-variance.rs:18:5 | -LL | L(i64, i64, i64, i64), //~ WARNING three times larger +LL | L(i64, i64, i64, i64), | ^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/enum/enum-to-float-cast-2.stderr b/src/test/ui/enum/enum-to-float-cast-2.stderr index 42d08a11ed1..2bc414098dc 100644 --- a/src/test/ui/enum/enum-to-float-cast-2.stderr +++ b/src/test/ui/enum/enum-to-float-cast-2.stderr @@ -1,7 +1,7 @@ error[E0606]: casting `E` as `f32` is invalid --> $DIR/enum-to-float-cast-2.rs:14:13 | -LL | let a = E::L0 as f32; //~ ERROR casting +LL | let a = E::L0 as f32; | ^^^^^^^^^^^^ | = help: cast through an integer first @@ -9,7 +9,7 @@ LL | let a = E::L0 as f32; //~ ERROR casting error[E0606]: casting `F` as `f32` is invalid --> $DIR/enum-to-float-cast-2.rs:15:13 | -LL | let c = F::H1 as f32; //~ ERROR casting +LL | let c = F::H1 as f32; | ^^^^^^^^^^^^ | = help: cast through an integer first diff --git a/src/test/ui/enum/enum-to-float-cast.stderr b/src/test/ui/enum/enum-to-float-cast.stderr index e6cd2ed4d0d..191606d8dc5 100644 --- a/src/test/ui/enum/enum-to-float-cast.stderr +++ b/src/test/ui/enum/enum-to-float-cast.stderr @@ -1,7 +1,7 @@ error[E0606]: casting `E` as `f32` is invalid --> $DIR/enum-to-float-cast.rs:13:18 | -LL | static C0: f32 = E::L0 as f32; //~ ERROR casting +LL | static C0: f32 = E::L0 as f32; | ^^^^^^^^^^^^ | = help: cast through an integer first @@ -9,7 +9,7 @@ LL | static C0: f32 = E::L0 as f32; //~ ERROR casting error[E0606]: casting `F` as `f32` is invalid --> $DIR/enum-to-float-cast.rs:14:18 | -LL | static C1: f32 = F::H1 as f32; //~ ERROR casting +LL | static C1: f32 = F::H1 as f32; | ^^^^^^^^^^^^ | = help: cast through an integer first diff --git a/src/test/ui/enum/enum-variant-type-2.stderr b/src/test/ui/enum/enum-variant-type-2.stderr index 3e7a4edd66e..7e8453c61f6 100644 --- a/src/test/ui/enum/enum-variant-type-2.stderr +++ b/src/test/ui/enum/enum-variant-type-2.stderr @@ -1,7 +1,7 @@ error[E0573]: expected type, found variant `Foo::Bar` --> $DIR/enum-variant-type-2.rs:7:11 | -LL | fn foo(x: Foo::Bar) {} //~ ERROR expected type, found variant `Foo::Bar` +LL | fn foo(x: Foo::Bar) {} | ^^^^^^^^ | | | not a type diff --git a/src/test/ui/enums-pats-not-idents.stderr b/src/test/ui/enums-pats-not-idents.stderr index 5e12f3b5ead..6b1e6046260 100644 --- a/src/test/ui/enums-pats-not-idents.stderr +++ b/src/test/ui/enums-pats-not-idents.stderr @@ -1,7 +1,7 @@ error[E0531]: cannot find tuple struct/variant `a` in this scope --> $DIR/enums-pats-not-idents.rs:2:9 | -LL | let a(1) = 13; //~ ERROR cannot find tuple struct/variant `a` in this scope +LL | let a(1) = 13; | ^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0001.stderr b/src/test/ui/error-codes/E0001.stderr index 0b884c54a82..99234515182 100644 --- a/src/test/ui/error-codes/E0001.stderr +++ b/src/test/ui/error-codes/E0001.stderr @@ -1,7 +1,7 @@ error: unreachable pattern --> $DIR/E0001.rs:8:9 | -LL | _ => {/* ... */} //~ ERROR unreachable pattern +LL | _ => {/* ... */} | ^ | note: lint level defined here diff --git a/src/test/ui/error-codes/E0004-2.stderr b/src/test/ui/error-codes/E0004-2.stderr index c8732852a71..db0a2b5a085 100644 --- a/src/test/ui/error-codes/E0004-2.stderr +++ b/src/test/ui/error-codes/E0004-2.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: multiple patterns of type `std::option::Option` are not handled --> $DIR/E0004-2.rs:4:11 | -LL | match x { } //~ ERROR E0004 +LL | match x { } | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/error-codes/E0004.stderr b/src/test/ui/error-codes/E0004.stderr index 123f4b2f1b7..2940ad4bb1e 100644 --- a/src/test/ui/error-codes/E0004.stderr +++ b/src/test/ui/error-codes/E0004.stderr @@ -8,7 +8,7 @@ LL | | TalkToMyHand, LL | | } | |_- `Terminator` defined here ... -LL | match x { //~ ERROR E0004 +LL | match x { | ^ pattern `HastaLaVistaBaby` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/error-codes/E0005.stderr b/src/test/ui/error-codes/E0005.stderr index 2a38aae0873..56a4bcffc81 100644 --- a/src/test/ui/error-codes/E0005.stderr +++ b/src/test/ui/error-codes/E0005.stderr @@ -1,7 +1,7 @@ error[E0005]: refutable pattern in local binding: `None` not covered --> $DIR/E0005.rs:3:9 | -LL | let Some(y) = x; //~ ERROR E0005 +LL | let Some(y) = x; | ^^^^^^^ pattern `None` not covered error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0010-teach.stderr b/src/test/ui/error-codes/E0010-teach.stderr index 77e7b5ec0e8..3e8467fad6f 100644 --- a/src/test/ui/error-codes/E0010-teach.stderr +++ b/src/test/ui/error-codes/E0010-teach.stderr @@ -1,7 +1,7 @@ error[E0010]: allocations are not allowed in constants --> $DIR/E0010-teach.rs:6:24 | -LL | const CON : Box = box 0; //~ ERROR E0010 +LL | const CON : Box = box 0; | ^^^^^ allocation not allowed in constants | = note: The value of statics and constants must be known at compile time, and they live for the entire lifetime of a program. Creating a boxed value allocates memory on the heap at runtime, and therefore cannot be done at compile time. @@ -9,7 +9,7 @@ LL | const CON : Box = box 0; //~ ERROR E0010 error[E0019]: constant contains unimplemented expression type --> $DIR/E0010-teach.rs:6:28 | -LL | const CON : Box = box 0; //~ ERROR E0010 +LL | const CON : Box = box 0; | ^ | = note: A function call isn't allowed in the const's initialization expression because the expression's value must be known at compile-time. diff --git a/src/test/ui/error-codes/E0010.stderr b/src/test/ui/error-codes/E0010.stderr index 1364693109e..285570f755e 100644 --- a/src/test/ui/error-codes/E0010.stderr +++ b/src/test/ui/error-codes/E0010.stderr @@ -1,13 +1,13 @@ error[E0010]: allocations are not allowed in constants --> $DIR/E0010.rs:4:24 | -LL | const CON : Box = box 0; //~ ERROR E0010 +LL | const CON : Box = box 0; | ^^^^^ allocation not allowed in constants error[E0019]: constant contains unimplemented expression type --> $DIR/E0010.rs:4:28 | -LL | const CON : Box = box 0; //~ ERROR E0010 +LL | const CON : Box = box 0; | ^ error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0017.stderr b/src/test/ui/error-codes/E0017.stderr index cc202ec912e..d0bd93eb908 100644 --- a/src/test/ui/error-codes/E0017.stderr +++ b/src/test/ui/error-codes/E0017.stderr @@ -1,31 +1,31 @@ error[E0017]: references in constants may only refer to immutable values --> $DIR/E0017.rs:4:30 | -LL | const CR: &'static mut i32 = &mut C; //~ ERROR E0017 +LL | const CR: &'static mut i32 = &mut C; | ^^^^^^ constants require immutable values error[E0017]: references in statics may only refer to immutable values --> $DIR/E0017.rs:5:39 | -LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 +LL | static STATIC_REF: &'static mut i32 = &mut X; | ^^^^^^ statics require immutable values error: cannot mutate statics in the initializer of another static --> $DIR/E0017.rs:5:39 | -LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 +LL | static STATIC_REF: &'static mut i32 = &mut X; | ^^^^^^ error[E0596]: cannot borrow immutable static item as mutable --> $DIR/E0017.rs:5:44 | -LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 +LL | static STATIC_REF: &'static mut i32 = &mut X; | ^ error[E0017]: references in statics may only refer to immutable values --> $DIR/E0017.rs:8:38 | -LL | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017 +LL | static CONST_REF: &'static mut i32 = &mut C; | ^^^^^^ statics require immutable values error: aborting due to 5 previous errors diff --git a/src/test/ui/error-codes/E0023.stderr b/src/test/ui/error-codes/E0023.stderr index 37704fc3233..1bc90a995fe 100644 --- a/src/test/ui/error-codes/E0023.stderr +++ b/src/test/ui/error-codes/E0023.stderr @@ -1,19 +1,19 @@ error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields --> $DIR/E0023.rs:10:9 | -LL | Fruit::Apple(a) => {}, //~ ERROR E0023 +LL | Fruit::Apple(a) => {}, | ^^^^^^^^^^^^^^^ expected 2 fields, found 1 error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields --> $DIR/E0023.rs:11:9 | -LL | Fruit::Apple(a, b, c) => {}, //~ ERROR E0023 +LL | Fruit::Apple(a, b, c) => {}, | ^^^^^^^^^^^^^^^^^^^^^ expected 2 fields, found 3 error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field --> $DIR/E0023.rs:12:9 | -LL | Fruit::Pear(1, 2) => {}, //~ ERROR E0023 +LL | Fruit::Pear(1, 2) => {}, | ^^^^^^^^^^^^^^^^^ expected 1 field, found 2 error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0034.stderr b/src/test/ui/error-codes/E0034.stderr index 3c5569eb79f..816a48f102d 100644 --- a/src/test/ui/error-codes/E0034.stderr +++ b/src/test/ui/error-codes/E0034.stderr @@ -1,7 +1,7 @@ error[E0034]: multiple applicable items in scope --> $DIR/E0034.rs:20:5 | -LL | Test::foo() //~ ERROR multiple applicable items in scope +LL | Test::foo() | ^^^^^^^^^ multiple `foo` found | note: candidate #1 is defined in an impl of the trait `Trait1` for the type `Test` diff --git a/src/test/ui/error-codes/E0045.stderr b/src/test/ui/error-codes/E0045.stderr index 0ce91f0a401..d163128bc8b 100644 --- a/src/test/ui/error-codes/E0045.stderr +++ b/src/test/ui/error-codes/E0045.stderr @@ -1,7 +1,7 @@ error[E0045]: C-variadic function must have C or cdecl calling convention --> $DIR/E0045.rs:1:17 | -LL | extern "Rust" { fn foo(x: u8, ...); } //~ ERROR E0045 +LL | extern "Rust" { fn foo(x: u8, ...); } | ^^^^^^^^^^^^^^^^^^^ C-variadics require C or cdecl calling convention error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0049.stderr b/src/test/ui/error-codes/E0049.stderr index 0d132bdbbdd..7e9b9e8efb9 100644 --- a/src/test/ui/error-codes/E0049.stderr +++ b/src/test/ui/error-codes/E0049.stderr @@ -4,7 +4,7 @@ error[E0049]: method `foo` has 0 type parameters but its trait declaration has 1 LL | fn foo(x: T) -> Self; | --------------------------------- expected 1 type parameter ... -LL | fn foo(x: bool) -> Self { Bar } //~ ERROR E0049 +LL | fn foo(x: bool) -> Self { Bar } | ^^^^^^^^^^^^^^^^^^^^^^^ found 0 type parameters error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0050.stderr b/src/test/ui/error-codes/E0050.stderr index 2c1fd111d26..fe9ac5e8eb0 100644 --- a/src/test/ui/error-codes/E0050.stderr +++ b/src/test/ui/error-codes/E0050.stderr @@ -4,7 +4,7 @@ error[E0050]: method `foo` has 1 parameter but the declaration in trait `Foo::fo LL | fn foo(&self, x: u8) -> bool; | ------------ trait requires 2 parameters ... -LL | fn foo(&self) -> bool { true } //~ ERROR E0050 +LL | fn foo(&self) -> bool { true } | ^^^^^ expected 2 parameters, found 1 error[E0050]: method `bar` has 1 parameter but the declaration in trait `Foo::bar` has 4 @@ -13,7 +13,7 @@ error[E0050]: method `bar` has 1 parameter but the declaration in trait `Foo::ba LL | fn bar(&self, x: u8, y: u8, z: u8); | -------------------------- trait requires 4 parameters ... -LL | fn bar(&self) { } //~ ERROR E0050 +LL | fn bar(&self) { } | ^^^^^ expected 4 parameters, found 1 error[E0050]: method `less` has 4 parameters but the declaration in trait `Foo::less` has 1 @@ -22,7 +22,7 @@ error[E0050]: method `less` has 4 parameters but the declaration in trait `Foo:: LL | fn less(&self); | ----- trait requires 1 parameter ... -LL | fn less(&self, x: u8, y: u8, z: u8) { } //~ ERROR E0050 +LL | fn less(&self, x: u8, y: u8, z: u8) { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 parameter, found 4 error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0054.stderr b/src/test/ui/error-codes/E0054.stderr index cce32fa2944..6b1092760fb 100644 --- a/src/test/ui/error-codes/E0054.stderr +++ b/src/test/ui/error-codes/E0054.stderr @@ -1,7 +1,7 @@ error[E0054]: cannot cast as `bool` --> $DIR/E0054.rs:3:24 | -LL | let x_is_nonzero = x as bool; //~ ERROR E0054 +LL | let x_is_nonzero = x as bool; | ^^^^^^^^^ help: compare with zero instead: `x != 0` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0057.stderr b/src/test/ui/error-codes/E0057.stderr index 5906a05c32c..6b5890cac36 100644 --- a/src/test/ui/error-codes/E0057.stderr +++ b/src/test/ui/error-codes/E0057.stderr @@ -1,13 +1,13 @@ error[E0057]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/E0057.rs:3:13 | -LL | let a = f(); //~ ERROR E0057 +LL | let a = f(); | ^^^ expected 1 parameter error[E0057]: this function takes 1 parameter but 2 parameters were supplied --> $DIR/E0057.rs:5:13 | -LL | let c = f(2, 3); //~ ERROR E0057 +LL | let c = f(2, 3); | ^^^^^^^ expected 1 parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0059.stderr b/src/test/ui/error-codes/E0059.stderr index a96e1a0beab..a1b8aeaedbb 100644 --- a/src/test/ui/error-codes/E0059.stderr +++ b/src/test/ui/error-codes/E0059.stderr @@ -1,7 +1,7 @@ error[E0059]: cannot use call notation; the first type parameter for the function trait is neither a tuple nor unit --> $DIR/E0059.rs:3:41 | -LL | fn foo>(f: F) -> F::Output { f(3) } //~ ERROR E0059 +LL | fn foo>(f: F) -> F::Output { f(3) } | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0067.stderr b/src/test/ui/error-codes/E0067.stderr index fd4ca7c9f70..024c8681b55 100644 --- a/src/test/ui/error-codes/E0067.stderr +++ b/src/test/ui/error-codes/E0067.stderr @@ -1,7 +1,7 @@ error[E0368]: binary assignment operation `+=` cannot be applied to type `std::collections::LinkedList<_>` --> $DIR/E0067.rs:4:5 | -LL | LinkedList::new() += 1; //~ ERROR E0368 +LL | LinkedList::new() += 1; | -----------------^^^^^ | | | cannot use `+=` on type `std::collections::LinkedList<_>` @@ -11,7 +11,7 @@ LL | LinkedList::new() += 1; //~ ERROR E0368 error[E0067]: invalid left-hand side expression --> $DIR/E0067.rs:4:5 | -LL | LinkedList::new() += 1; //~ ERROR E0368 +LL | LinkedList::new() += 1; | ^^^^^^^^^^^^^^^^^ invalid expression for left-hand side error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0070.stderr b/src/test/ui/error-codes/E0070.stderr index 4c1cfd858e6..6592ad328be 100644 --- a/src/test/ui/error-codes/E0070.stderr +++ b/src/test/ui/error-codes/E0070.stderr @@ -1,19 +1,19 @@ error[E0070]: invalid left-hand side expression --> $DIR/E0070.rs:6:5 | -LL | SOME_CONST = 14; //~ ERROR E0070 +LL | SOME_CONST = 14; | ^^^^^^^^^^^^^^^ left-hand of expression not valid error[E0070]: invalid left-hand side expression --> $DIR/E0070.rs:7:5 | -LL | 1 = 3; //~ ERROR E0070 +LL | 1 = 3; | ^^^^^ left-hand of expression not valid error[E0308]: mismatched types --> $DIR/E0070.rs:8:25 | -LL | some_other_func() = 4; //~ ERROR E0070 +LL | some_other_func() = 4; | ^ expected (), found integer | = note: expected type `()` @@ -22,7 +22,7 @@ LL | some_other_func() = 4; //~ ERROR E0070 error[E0070]: invalid left-hand side expression --> $DIR/E0070.rs:8:5 | -LL | some_other_func() = 4; //~ ERROR E0070 +LL | some_other_func() = 4; | ^^^^^^^^^^^^^^^^^^^^^ left-hand of expression not valid error: aborting due to 4 previous errors diff --git a/src/test/ui/error-codes/E0075.stderr b/src/test/ui/error-codes/E0075.stderr index abf68897096..d8b90d0691d 100644 --- a/src/test/ui/error-codes/E0075.stderr +++ b/src/test/ui/error-codes/E0075.stderr @@ -1,7 +1,7 @@ error[E0075]: SIMD vector cannot be empty --> $DIR/E0075.rs:4:1 | -LL | struct Bad; //~ ERROR E0075 +LL | struct Bad; | ^^^^^^^^^^^ 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 9f3e1fa5c35..4f85d175ce6 100644 --- a/src/test/ui/error-codes/E0077.stderr +++ b/src/test/ui/error-codes/E0077.stderr @@ -1,7 +1,7 @@ error[E0077]: SIMD vector element type should be machine type --> $DIR/E0077.rs:4:1 | -LL | struct Bad(String); //~ ERROR E0077 +LL | struct Bad(String); | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0080.stderr b/src/test/ui/error-codes/E0080.stderr index 4d37881c1e1..3113fd2189b 100644 --- a/src/test/ui/error-codes/E0080.stderr +++ b/src/test/ui/error-codes/E0080.stderr @@ -1,13 +1,13 @@ error[E0080]: evaluation of constant value failed --> $DIR/E0080.rs:2:9 | -LL | X = (1 << 500), //~ ERROR E0080 +LL | X = (1 << 500), | ^^^^^^^^^^ attempt to shift left with overflow error[E0080]: evaluation of constant value failed --> $DIR/E0080.rs:4:9 | -LL | Y = (1 / 0) //~ ERROR E0080 +LL | Y = (1 / 0) | ^^^^^^^ attempt to divide by zero error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0084.stderr b/src/test/ui/error-codes/E0084.stderr index 353c825f528..1f818da25bb 100644 --- a/src/test/ui/error-codes/E0084.stderr +++ b/src/test/ui/error-codes/E0084.stderr @@ -1,7 +1,7 @@ error[E0084]: unsupported representation for zero-variant enum --> $DIR/E0084.rs:1:1 | -LL | #[repr(i32)] //~ ERROR: E0084 +LL | #[repr(i32)] | ^^^^^^^^^^^^ LL | enum Foo {} | ----------- zero-variant enum diff --git a/src/test/ui/error-codes/E0091.stderr b/src/test/ui/error-codes/E0091.stderr index d32960f82cb..a596b75e481 100644 --- a/src/test/ui/error-codes/E0091.stderr +++ b/src/test/ui/error-codes/E0091.stderr @@ -1,13 +1,13 @@ error[E0091]: type parameter `T` is unused --> $DIR/E0091.rs:1:10 | -LL | type Foo = u32; //~ ERROR E0091 +LL | type Foo = u32; | ^ unused type parameter error[E0091]: type parameter `B` is unused --> $DIR/E0091.rs:2:14 | -LL | type Foo2 = Box; //~ ERROR E0091 +LL | type Foo2 = Box; | ^ unused type parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0092.stderr b/src/test/ui/error-codes/E0092.stderr index a4535177526..2d590a8e1d7 100644 --- a/src/test/ui/error-codes/E0092.stderr +++ b/src/test/ui/error-codes/E0092.stderr @@ -1,7 +1,7 @@ error[E0092]: unrecognized atomic operation function: `foo` --> $DIR/E0092.rs:3:5 | -LL | fn atomic_foo(); //~ ERROR E0092 +LL | fn atomic_foo(); | ^^^^^^^^^^^^^^^^ unrecognized atomic operation error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0094.stderr b/src/test/ui/error-codes/E0094.stderr index 97bdbfbe5ab..da97f3a014b 100644 --- a/src/test/ui/error-codes/E0094.stderr +++ b/src/test/ui/error-codes/E0094.stderr @@ -1,7 +1,7 @@ error[E0094]: intrinsic has wrong number of type parameters: found 2, expected 1 --> $DIR/E0094.rs:3:15 | -LL | fn size_of() -> usize; //~ ERROR E0094 +LL | fn size_of() -> usize; | ^^^^^^ expected 1 type parameter error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0109.stderr b/src/test/ui/error-codes/E0109.stderr index a5508f98085..a807f2d44a6 100644 --- a/src/test/ui/error-codes/E0109.stderr +++ b/src/test/ui/error-codes/E0109.stderr @@ -1,7 +1,7 @@ error[E0109]: type arguments are not allowed on this entity --> $DIR/E0109.rs:1:14 | -LL | type X = u32; //~ ERROR E0109 +LL | type X = u32; | ^^^ type argument not allowed error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0110.stderr b/src/test/ui/error-codes/E0110.stderr index a644ac92cef..3bc4775bdc1 100644 --- a/src/test/ui/error-codes/E0110.stderr +++ b/src/test/ui/error-codes/E0110.stderr @@ -1,7 +1,7 @@ error[E0110]: lifetime arguments are not allowed on this entity --> $DIR/E0110.rs:1:14 | -LL | type X = u32<'static>; //~ ERROR E0110 +LL | type X = u32<'static>; | ^^^^^^^ lifetime argument not allowed error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0117.stderr b/src/test/ui/error-codes/E0117.stderr index b007ca05ab2..80b3a4e714a 100644 --- a/src/test/ui/error-codes/E0117.stderr +++ b/src/test/ui/error-codes/E0117.stderr @@ -1,13 +1,13 @@ error[E0120]: the Drop trait may only be implemented on structures --> $DIR/E0117.rs:1:15 | -LL | impl Drop for u32 {} //~ ERROR E0117 +LL | impl Drop for u32 {} | ^^^ implementing Drop requires a struct error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/E0117.rs:1:1 | -LL | impl Drop for u32 {} //~ ERROR E0117 +LL | impl Drop for u32 {} | ^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | = note: the impl does not reference only types defined in this crate diff --git a/src/test/ui/error-codes/E0118.stderr b/src/test/ui/error-codes/E0118.stderr index 787f8caec7f..b0afaeb5c1f 100644 --- a/src/test/ui/error-codes/E0118.stderr +++ b/src/test/ui/error-codes/E0118.stderr @@ -1,7 +1,7 @@ error[E0118]: no base type found for inherent implementation --> $DIR/E0118.rs:1:6 | -LL | impl (u8, u8) { //~ ERROR E0118 +LL | impl (u8, u8) { | ^^^^^^^^ impl requires a base type | = note: either implement a trait on it or create a newtype to wrap it instead diff --git a/src/test/ui/error-codes/E0119.stderr b/src/test/ui/error-codes/E0119.stderr index af9acb294bc..e7690aa30bd 100644 --- a/src/test/ui/error-codes/E0119.stderr +++ b/src/test/ui/error-codes/E0119.stderr @@ -4,7 +4,7 @@ error[E0119]: conflicting implementations of trait `MyTrait` for type `Foo`: LL | impl MyTrait for T { | --------------------- first implementation here ... -LL | impl MyTrait for Foo { //~ ERROR E0119 +LL | impl MyTrait for Foo { | ^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Foo` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0121.stderr b/src/test/ui/error-codes/E0121.stderr index 75e03c659b7..b7f4ce4d230 100644 --- a/src/test/ui/error-codes/E0121.stderr +++ b/src/test/ui/error-codes/E0121.stderr @@ -1,13 +1,13 @@ error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/E0121.rs:1:13 | -LL | fn foo() -> _ { 5 } //~ ERROR E0121 +LL | fn foo() -> _ { 5 } | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/E0121.rs:3:13 | -LL | static BAR: _ = "test"; //~ ERROR E0121 +LL | static BAR: _ = "test"; | ^ not allowed in type signatures error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0128.stderr b/src/test/ui/error-codes/E0128.stderr index 9ea3c09e63f..253aa166bd3 100644 --- a/src/test/ui/error-codes/E0128.stderr +++ b/src/test/ui/error-codes/E0128.stderr @@ -1,7 +1,7 @@ error[E0128]: type parameters with a default cannot use forward declared identifiers --> $DIR/E0128.rs:1:14 | -LL | struct Foo { //~ ERROR E0128 +LL | struct Foo { | ^ defaulted type parameters cannot be forward declared error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0132.stderr b/src/test/ui/error-codes/E0132.stderr index e19b421bfdb..c21363756b3 100644 --- a/src/test/ui/error-codes/E0132.stderr +++ b/src/test/ui/error-codes/E0132.stderr @@ -1,7 +1,7 @@ error[E0132]: start function is not allowed to have type parameters --> $DIR/E0132.rs:4:5 | -LL | fn f< T >() {} //~ ERROR E0132 +LL | fn f< T >() {} | ^^^^^ start function cannot have type parameters 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 401c1755fa8..26e6e2e1bce 100644 --- a/src/test/ui/error-codes/E0152.stderr +++ b/src/test/ui/error-codes/E0152.stderr @@ -1,7 +1,7 @@ error[E0152]: duplicate lang item found: `arc`. --> $DIR/E0152.rs:4:1 | -LL | struct Foo; //~ ERROR E0152 +LL | struct Foo; | ^^^^^^^^^^^ | = note: first defined in crate `alloc`. diff --git a/src/test/ui/error-codes/E0164.stderr b/src/test/ui/error-codes/E0164.stderr index 0debc8092e8..0a153d85b42 100644 --- a/src/test/ui/error-codes/E0164.stderr +++ b/src/test/ui/error-codes/E0164.stderr @@ -1,7 +1,7 @@ error[E0164]: expected tuple struct/variant, found associated constant `::B` --> $DIR/E0164.rs:9:9 | -LL | Foo::B(i) => i, //~ ERROR E0164 +LL | Foo::B(i) => i, | ^^^^^^^^^ not a tuple variant or struct error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0184.stderr b/src/test/ui/error-codes/E0184.stderr index 471ba3870e2..b4128b95606 100644 --- a/src/test/ui/error-codes/E0184.stderr +++ b/src/test/ui/error-codes/E0184.stderr @@ -1,7 +1,7 @@ error[E0184]: the trait `Copy` may not be implemented for this type; the type has a destructor --> $DIR/E0184.rs:1:10 | -LL | #[derive(Copy)] //~ ERROR E0184 +LL | #[derive(Copy)] | ^^^^ Copy not allowed on types with destructors error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0186.stderr b/src/test/ui/error-codes/E0186.stderr index 7fed0426ee8..8971d61fc75 100644 --- a/src/test/ui/error-codes/E0186.stderr +++ b/src/test/ui/error-codes/E0186.stderr @@ -1,10 +1,10 @@ error[E0186]: method `foo` has a `&self` declaration in the trait, but not in the impl --> $DIR/E0186.rs:8:5 | -LL | fn foo(&self); //~ `&self` used in trait +LL | fn foo(&self); | -------------- `&self` used in trait ... -LL | fn foo() {} //~ ERROR E0186 +LL | fn foo() {} | ^^^^^^^^ expected `&self` in impl error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0191.stderr b/src/test/ui/error-codes/E0191.stderr index 570b0ddc313..2d9fdfe5d29 100644 --- a/src/test/ui/error-codes/E0191.stderr +++ b/src/test/ui/error-codes/E0191.stderr @@ -4,7 +4,7 @@ error[E0191]: the value of the associated type `Bar` (from the trait `Trait`) mu LL | type Bar; | --------- `Bar` defined here ... -LL | type Foo = Trait; //~ ERROR E0191 +LL | type Foo = Trait; | ^^^^^ associated type `Bar` must be specified error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0192.stderr b/src/test/ui/error-codes/E0192.stderr index bdfe717afe2..8faa550a509 100644 --- a/src/test/ui/error-codes/E0192.stderr +++ b/src/test/ui/error-codes/E0192.stderr @@ -1,7 +1,7 @@ error[E0192]: negative impls are only allowed for auto traits (e.g., `Send` and `Sync`) --> $DIR/E0192.rs:9:1 | -LL | impl !Trait for Foo { } //~ ERROR E0192 +LL | impl !Trait for Foo { } | ^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0195.stderr b/src/test/ui/error-codes/E0195.stderr index 57032c6b0c8..6eaa1750ee3 100644 --- a/src/test/ui/error-codes/E0195.stderr +++ b/src/test/ui/error-codes/E0195.stderr @@ -4,7 +4,7 @@ error[E0195]: lifetime parameters or bounds on method `bar` do not match the tra LL | fn bar<'a,'b:'a>(x: &'a str, y: &'b str); | ---------- lifetimes in impl do not match this method in trait ... -LL | fn bar<'a,'b>(x: &'a str, y: &'b str) { //~ ERROR E0195 +LL | fn bar<'a,'b>(x: &'a str, y: &'b str) { | ^^^^^^^ lifetimes do not match method in trait error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0197.stderr b/src/test/ui/error-codes/E0197.stderr index f58dcd791da..bb7b6474d3e 100644 --- a/src/test/ui/error-codes/E0197.stderr +++ b/src/test/ui/error-codes/E0197.stderr @@ -1,7 +1,7 @@ error[E0197]: inherent impls cannot be unsafe --> $DIR/E0197.rs:3:1 | -LL | unsafe impl Foo { } //~ ERROR E0197 +LL | unsafe impl Foo { } | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0198.stderr b/src/test/ui/error-codes/E0198.stderr index e182cbd2ec1..0d3706336a9 100644 --- a/src/test/ui/error-codes/E0198.stderr +++ b/src/test/ui/error-codes/E0198.stderr @@ -1,7 +1,7 @@ error[E0198]: negative impls cannot be unsafe --> $DIR/E0198.rs:5:1 | -LL | unsafe impl !Send for Foo { } //~ ERROR E0198 +LL | unsafe impl !Send for Foo { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0199.stderr b/src/test/ui/error-codes/E0199.stderr index ba55c4a58e4..3632d26cd32 100644 --- a/src/test/ui/error-codes/E0199.stderr +++ b/src/test/ui/error-codes/E0199.stderr @@ -1,7 +1,7 @@ error[E0199]: implementing the trait `Bar` is not unsafe --> $DIR/E0199.rs:6:1 | -LL | unsafe impl Bar for Foo { } //~ ERROR implementing the trait `Bar` is not unsafe [E0199] +LL | unsafe impl Bar for Foo { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0200.stderr b/src/test/ui/error-codes/E0200.stderr index f6a8f32d238..677271aad44 100644 --- a/src/test/ui/error-codes/E0200.stderr +++ b/src/test/ui/error-codes/E0200.stderr @@ -1,7 +1,7 @@ error[E0200]: the trait `Bar` requires an `unsafe impl` declaration --> $DIR/E0200.rs:5:1 | -LL | impl Bar for Foo { } //~ ERROR E0200 +LL | impl Bar for Foo { } | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0201.stderr b/src/test/ui/error-codes/E0201.stderr index 5d2f9f3e362..89cfd402423 100644 --- a/src/test/ui/error-codes/E0201.stderr +++ b/src/test/ui/error-codes/E0201.stderr @@ -3,7 +3,7 @@ error[E0201]: duplicate definitions with name `bar`: | LL | fn bar(&self) -> bool { self.0 > 5 } | ------------------------------------ previous definition of `bar` here -LL | fn bar() {} //~ ERROR E0201 +LL | fn bar() {} | ^^^^^^^^^^^ duplicate definition error[E0201]: duplicate definitions with name `baz`: @@ -11,7 +11,7 @@ error[E0201]: duplicate definitions with name `baz`: | LL | fn baz(&self) -> bool { true } | ------------------------------ previous definition of `baz` here -LL | fn baz(&self) -> bool { self.0 > 5 } //~ ERROR E0201 +LL | fn baz(&self) -> bool { self.0 > 5 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definition error[E0201]: duplicate definitions with name `Quux`: @@ -20,7 +20,7 @@ error[E0201]: duplicate definitions with name `Quux`: LL | type Quux = u32; | ---------------- previous definition of `Quux` here ... -LL | type Quux = u32; //~ ERROR E0201 +LL | type Quux = u32; | ^^^^^^^^^^^^^^^^ duplicate definition error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0207.stderr b/src/test/ui/error-codes/E0207.stderr index c82859a9867..5ef51ed8692 100644 --- a/src/test/ui/error-codes/E0207.stderr +++ b/src/test/ui/error-codes/E0207.stderr @@ -1,7 +1,7 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates --> $DIR/E0207.rs:3:6 | -LL | impl Foo { //~ ERROR E0207 +LL | impl Foo { | ^ unconstrained type parameter error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0220.stderr b/src/test/ui/error-codes/E0220.stderr index 0eb812a5ef0..43949833e21 100644 --- a/src/test/ui/error-codes/E0220.stderr +++ b/src/test/ui/error-codes/E0220.stderr @@ -1,7 +1,7 @@ error[E0220]: associated type `F` not found for `Trait` --> $DIR/E0220.rs:5:18 | -LL | type Foo = Trait; //~ ERROR E0220 +LL | type Foo = Trait; | ^^^^^ associated type `F` not found error[E0191]: the value of the associated type `Bar` (from the trait `Trait`) must be specified @@ -10,7 +10,7 @@ error[E0191]: the value of the associated type `Bar` (from the trait `Trait`) mu LL | type Bar; | --------- `Bar` defined here ... -LL | type Foo = Trait; //~ ERROR E0220 +LL | type Foo = Trait; | ^^^^^^^^^^^^ associated type `Bar` must be specified error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0252.stderr b/src/test/ui/error-codes/E0252.stderr index bd06241fc76..8486806c672 100644 --- a/src/test/ui/error-codes/E0252.stderr +++ b/src/test/ui/error-codes/E0252.stderr @@ -3,13 +3,13 @@ error[E0252]: the name `baz` is defined multiple times | LL | use foo::baz; | -------- previous import of the type `baz` here -LL | use bar::baz; //~ ERROR E0252 +LL | use bar::baz; | ^^^^^^^^ `baz` reimported here | = note: `baz` must be defined only once in the type namespace of this module help: you can use `as` to change the binding name of the import | -LL | use bar::baz as other_baz; //~ ERROR E0252 +LL | use bar::baz as other_baz; | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0255.stderr b/src/test/ui/error-codes/E0255.stderr index a47aa7c6592..36e4eeeaeea 100644 --- a/src/test/ui/error-codes/E0255.stderr +++ b/src/test/ui/error-codes/E0255.stderr @@ -4,7 +4,7 @@ error[E0255]: the name `foo` is defined multiple times LL | use bar::foo; | -------- previous import of the value `foo` here LL | -LL | fn foo() {} //~ ERROR E0255 +LL | fn foo() {} | ^^^^^^^^ `foo` redefined here | = note: `foo` must be defined only once in the value namespace of this module diff --git a/src/test/ui/error-codes/E0261.stderr b/src/test/ui/error-codes/E0261.stderr index 9e64f6c3f14..3bf5e9d8154 100644 --- a/src/test/ui/error-codes/E0261.stderr +++ b/src/test/ui/error-codes/E0261.stderr @@ -1,13 +1,13 @@ error[E0261]: use of undeclared lifetime name `'a` --> $DIR/E0261.rs:1:12 | -LL | fn foo(x: &'a str) { } //~ ERROR E0261 +LL | fn foo(x: &'a str) { } | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/E0261.rs:5:9 | -LL | x: &'a str, //~ ERROR E0261 +LL | x: &'a str, | ^^ undeclared lifetime error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0262.stderr b/src/test/ui/error-codes/E0262.stderr index 8f01889a470..ad90b717126 100644 --- a/src/test/ui/error-codes/E0262.stderr +++ b/src/test/ui/error-codes/E0262.stderr @@ -1,7 +1,7 @@ error[E0262]: invalid lifetime parameter name: `'static` --> $DIR/E0262.rs:1:8 | -LL | fn foo<'static>(x: &'static str) { } //~ ERROR E0262 +LL | fn foo<'static>(x: &'static str) { } | ^^^^^^^ 'static is a reserved lifetime name error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0264.stderr b/src/test/ui/error-codes/E0264.stderr index bc6a0d9f96c..403c0aa4146 100644 --- a/src/test/ui/error-codes/E0264.stderr +++ b/src/test/ui/error-codes/E0264.stderr @@ -1,7 +1,7 @@ error[E0264]: unknown external lang item: `cake` --> $DIR/E0264.rs:5:5 | -LL | fn cake(); //~ ERROR E0264 +LL | fn cake(); | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0267.stderr b/src/test/ui/error-codes/E0267.stderr index 3506c1c0f16..b14cfd1a52d 100644 --- a/src/test/ui/error-codes/E0267.stderr +++ b/src/test/ui/error-codes/E0267.stderr @@ -1,7 +1,7 @@ error[E0267]: `break` inside of a closure --> $DIR/E0267.rs:2:18 | -LL | let w = || { break; }; //~ ERROR E0267 +LL | let w = || { break; }; | ^^^^^ cannot break inside of a closure error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0268.stderr b/src/test/ui/error-codes/E0268.stderr index 3e276bd1acb..3c77e7f3df2 100644 --- a/src/test/ui/error-codes/E0268.stderr +++ b/src/test/ui/error-codes/E0268.stderr @@ -1,7 +1,7 @@ error[E0268]: `break` outside of loop --> $DIR/E0268.rs:2:5 | -LL | break; //~ ERROR E0268 +LL | break; | ^^^^^ cannot break outside of a loop error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0271.stderr b/src/test/ui/error-codes/E0271.stderr index 8fcb68e434f..16c3ab9d742 100644 --- a/src/test/ui/error-codes/E0271.stderr +++ b/src/test/ui/error-codes/E0271.stderr @@ -1,7 +1,7 @@ error[E0271]: type mismatch resolving `::AssociatedType == u32` --> $DIR/E0271.rs:10:5 | -LL | foo(3_i8); //~ ERROR E0271 +LL | foo(3_i8); | ^^^ expected reference, found u32 | = note: expected type `&'static str` diff --git a/src/test/ui/error-codes/E0275.stderr b/src/test/ui/error-codes/E0275.stderr index f2b0f392bc8..01a923a53a2 100644 --- a/src/test/ui/error-codes/E0275.stderr +++ b/src/test/ui/error-codes/E0275.stderr @@ -1,7 +1,7 @@ error[E0275]: overflow evaluating the requirement `Bar>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Foo` --> $DIR/E0275.rs:5:1 | -LL | impl Foo for T where Bar: Foo {} //~ ERROR E0275 +LL | impl Foo for T where Bar: Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding a `#![recursion_limit="128"]` attribute to your crate diff --git a/src/test/ui/error-codes/E0276.stderr b/src/test/ui/error-codes/E0276.stderr index 393ad8c81a0..a8b016ebf52 100644 --- a/src/test/ui/error-codes/E0276.stderr +++ b/src/test/ui/error-codes/E0276.stderr @@ -4,7 +4,7 @@ error[E0276]: impl has stricter requirements than trait LL | fn foo(x: T); | ---------------- definition of `foo` from trait ... -LL | fn foo(x: T) where T: Copy {} //~ ERROR E0276 +LL | fn foo(x: T) where T: Copy {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: std::marker::Copy` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0282.stderr b/src/test/ui/error-codes/E0282.stderr index 49165d1e42b..3a5040eb6da 100644 --- a/src/test/ui/error-codes/E0282.stderr +++ b/src/test/ui/error-codes/E0282.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/E0282.rs:2:9 | -LL | let x = "hello".chars().rev().collect(); //~ ERROR E0282 +LL | let x = "hello".chars().rev().collect(); | ^ | | | cannot infer type diff --git a/src/test/ui/error-codes/E0283.stderr b/src/test/ui/error-codes/E0283.stderr index 598ec672ce6..e1f53e592fc 100644 --- a/src/test/ui/error-codes/E0283.stderr +++ b/src/test/ui/error-codes/E0283.stderr @@ -1,7 +1,7 @@ error[E0283]: type annotations required: cannot resolve `_: Generator` --> $DIR/E0283.rs:18:21 | -LL | let cont: u32 = Generator::create(); //~ ERROR E0283 +LL | let cont: u32 = Generator::create(); | ^^^^^^^^^^^^^^^^^ | note: required by `Generator::create` diff --git a/src/test/ui/error-codes/E0301.stderr b/src/test/ui/error-codes/E0301.stderr index 3cfacd5983f..80ee681a517 100644 --- a/src/test/ui/error-codes/E0301.stderr +++ b/src/test/ui/error-codes/E0301.stderr @@ -1,7 +1,7 @@ error[E0301]: cannot mutably borrow in a pattern guard --> $DIR/E0301.rs:4:19 | -LL | option if option.take().is_none() => {}, //~ ERROR E0301 +LL | option if option.take().is_none() => {}, | ^^^^^^ borrowed mutably in pattern guard error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0302.stderr b/src/test/ui/error-codes/E0302.stderr index 66b31361762..69ebb6bb9c9 100644 --- a/src/test/ui/error-codes/E0302.stderr +++ b/src/test/ui/error-codes/E0302.stderr @@ -1,7 +1,7 @@ error[E0302]: cannot assign in a pattern guard --> $DIR/E0302.rs:4:21 | -LL | option if { option = None; false } => { }, //~ ERROR E0302 +LL | option if { option = None; false } => { }, | ^^^^^^^^^^^^^ assignment in pattern guard error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0308-4.stderr b/src/test/ui/error-codes/E0308-4.stderr index f69a3893365..3c51106cae8 100644 --- a/src/test/ui/error-codes/E0308-4.stderr +++ b/src/test/ui/error-codes/E0308-4.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | match x { | - this match expression has type `u8` -LL | 0u8..=3i8 => (), //~ ERROR E0308 +LL | 0u8..=3i8 => (), | ^^^^^^^^^ expected u8, found i8 error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0308.stderr b/src/test/ui/error-codes/E0308.stderr index 8c71747fbcd..bd9834ceb9f 100644 --- a/src/test/ui/error-codes/E0308.stderr +++ b/src/test/ui/error-codes/E0308.stderr @@ -1,7 +1,7 @@ error[E0308]: intrinsic has wrong type --> $DIR/E0308.rs:4:5 | -LL | fn size_of(); //~ ERROR E0308 +LL | fn size_of(); | ^^^^^^^^^^^^^^^^ expected (), found usize | = note: expected type `extern "rust-intrinsic" fn()` diff --git a/src/test/ui/error-codes/E0370.stderr b/src/test/ui/error-codes/E0370.stderr index cd1903bd7e2..7fb622ee80b 100644 --- a/src/test/ui/error-codes/E0370.stderr +++ b/src/test/ui/error-codes/E0370.stderr @@ -1,7 +1,7 @@ error[E0370]: enum discriminant overflowed --> $DIR/E0370.rs:7:5 | -LL | Y, //~ ERROR E0370 +LL | Y, | ^ overflowed on value after 9223372036854775807 | = note: explicitly set `Y = -9223372036854775808` if that is desired outcome diff --git a/src/test/ui/error-codes/E0374.stderr b/src/test/ui/error-codes/E0374.stderr index 9226ca0e478..7ab0f82fc23 100644 --- a/src/test/ui/error-codes/E0374.stderr +++ b/src/test/ui/error-codes/E0374.stderr @@ -1,7 +1,7 @@ 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 CoerceUnsized> for Foo //~ ERROR E0374 +LL | / impl CoerceUnsized> for Foo LL | | where T: CoerceUnsized {} | |________________________________^ diff --git a/src/test/ui/error-codes/E0376.stderr b/src/test/ui/error-codes/E0376.stderr index 2894a919632..015448c39ea 100644 --- a/src/test/ui/error-codes/E0376.stderr +++ b/src/test/ui/error-codes/E0376.stderr @@ -1,7 +1,7 @@ error[E0376]: the trait `CoerceUnsized` may only be implemented for a coercion between structures --> $DIR/E0376.rs:8:1 | -LL | impl CoerceUnsized for Foo {} //~ ERROR E0376 +LL | impl CoerceUnsized for Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 f641830ae9f..3f662459c84 100644 --- a/src/test/ui/error-codes/E0388.stderr +++ b/src/test/ui/error-codes/E0388.stderr @@ -1,31 +1,31 @@ error[E0017]: references in constants may only refer to immutable values --> $DIR/E0388.rs:4:30 | -LL | const CR: &'static mut i32 = &mut C; //~ ERROR E0017 +LL | const CR: &'static mut i32 = &mut C; | ^^^^^^ constants require immutable values error[E0017]: references in statics may only refer to immutable values --> $DIR/E0388.rs:5:39 | -LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 +LL | static STATIC_REF: &'static mut i32 = &mut X; | ^^^^^^ statics require immutable values error: cannot mutate statics in the initializer of another static --> $DIR/E0388.rs:5:39 | -LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 +LL | static STATIC_REF: &'static mut i32 = &mut X; | ^^^^^^ error[E0596]: cannot borrow immutable static item as mutable --> $DIR/E0388.rs:5:44 | -LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017 +LL | static STATIC_REF: &'static mut i32 = &mut X; | ^ error[E0017]: references in statics may only refer to immutable values --> $DIR/E0388.rs:8:38 | -LL | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017 +LL | static CONST_REF: &'static mut i32 = &mut C; | ^^^^^^ statics require immutable values error: aborting due to 5 previous errors diff --git a/src/test/ui/error-codes/E0389.stderr b/src/test/ui/error-codes/E0389.stderr index cc8914ef3a6..927eace727e 100644 --- a/src/test/ui/error-codes/E0389.stderr +++ b/src/test/ui/error-codes/E0389.stderr @@ -1,7 +1,7 @@ error[E0389]: cannot assign to data in a `&` reference --> $DIR/E0389.rs:8:5 | -LL | fancy_ref.num = 6; //~ ERROR E0389 +LL | fancy_ref.num = 6; | ^^^^^^^^^^^^^^^^^ assignment into an immutable reference error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0390.stderr b/src/test/ui/error-codes/E0390.stderr index 7632229360e..3ca3a77c74f 100644 --- a/src/test/ui/error-codes/E0390.stderr +++ b/src/test/ui/error-codes/E0390.stderr @@ -1,13 +1,13 @@ error[E0390]: only a single inherent implementation marked with `#[lang = "mut_ptr"]` is allowed for the `*mut T` primitive --> $DIR/E0390.rs:5:1 | -LL | impl *mut Foo {} //~ ERROR E0390 +LL | impl *mut Foo {} | ^^^^^^^^^^^^^^^^ | help: consider using a trait to implement these methods --> $DIR/E0390.rs:5:1 | -LL | impl *mut Foo {} //~ ERROR E0390 +LL | impl *mut Foo {} | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0392.stderr b/src/test/ui/error-codes/E0392.stderr index 4bb3b87bb4a..18419572233 100644 --- a/src/test/ui/error-codes/E0392.stderr +++ b/src/test/ui/error-codes/E0392.stderr @@ -1,7 +1,7 @@ error[E0392]: parameter `T` is never used --> $DIR/E0392.rs:1:10 | -LL | enum Foo { Bar } //~ ERROR E0392 +LL | enum Foo { Bar } | ^ unused type parameter | = help: consider removing `T` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/error-codes/E0395.stderr b/src/test/ui/error-codes/E0395.stderr index cc7d94e22eb..9d80acb515d 100644 --- a/src/test/ui/error-codes/E0395.stderr +++ b/src/test/ui/error-codes/E0395.stderr @@ -1,7 +1,7 @@ error[E0658]: comparing raw pointers inside static (see issue #53020) --> $DIR/E0395.rs:6:29 | -LL | static BAZ: bool = unsafe { (&FOO as *const i32) == (&BAR as *const i32) }; //~ ERROR issue #53020 +LL | static BAZ: bool = unsafe { (&FOO as *const i32) == (&BAR as *const i32) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_compare_raw_pointers)] to the crate attributes to enable diff --git a/src/test/ui/error-codes/E0401.stderr b/src/test/ui/error-codes/E0401.stderr index 27f281ee437..7c54e5b4edb 100644 --- a/src/test/ui/error-codes/E0401.stderr +++ b/src/test/ui/error-codes/E0401.stderr @@ -3,7 +3,7 @@ error[E0401]: can't use generic parameters from outer function | LL | fn foo(x: T) { | - type variable from outer function -LL | fn bfnr, W: Fn()>(y: T) { //~ ERROR E0401 +LL | fn bfnr, W: Fn()>(y: T) { | --------------------------- ^ use of generic parameter from outer function | | | help: try using a local generic parameter instead: `bfnr, W: Fn(), T>` @@ -17,7 +17,7 @@ LL | fn foo(x: T) { LL | fn baz Iterator for A { | ---- `Self` type implicitly declared here, by this `impl` ... -LL | fn helper(sel: &Self) -> u8 { //~ ERROR E0401 +LL | fn helper(sel: &Self) -> u8 { | ^^^^ | | | use of generic parameter from outer function diff --git a/src/test/ui/error-codes/E0403.stderr b/src/test/ui/error-codes/E0403.stderr index b9246475029..2bd7de6c246 100644 --- a/src/test/ui/error-codes/E0403.stderr +++ b/src/test/ui/error-codes/E0403.stderr @@ -1,7 +1,7 @@ error[E0403]: the name `T` is already used for a generic parameter in this list of generic parameters --> $DIR/E0403.rs:1:11 | -LL | fn foo(s: T, u: T) {} //~ ERROR E0403 +LL | fn foo(s: T, u: T) {} | - ^ already used | | | first use of `T` diff --git a/src/test/ui/error-codes/E0404.stderr b/src/test/ui/error-codes/E0404.stderr index f84fd52c851..4ccb6c5728e 100644 --- a/src/test/ui/error-codes/E0404.stderr +++ b/src/test/ui/error-codes/E0404.stderr @@ -1,13 +1,13 @@ error[E0404]: expected trait, found struct `Foo` --> $DIR/E0404.rs:4:6 | -LL | impl Foo for Bar {} //~ ERROR E0404 +LL | impl Foo for Bar {} | ^^^ not a trait error[E0404]: expected trait, found struct `Foo` --> $DIR/E0404.rs:8:11 | -LL | fn baz(_: T) {} //~ ERROR E0404 +LL | fn baz(_: T) {} | ^^^ not a trait error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0405.stderr b/src/test/ui/error-codes/E0405.stderr index 2f09a525e45..a22afe6f3e8 100644 --- a/src/test/ui/error-codes/E0405.stderr +++ b/src/test/ui/error-codes/E0405.stderr @@ -1,7 +1,7 @@ error[E0405]: cannot find trait `SomeTrait` in this scope --> $DIR/E0405.rs:3:6 | -LL | impl SomeTrait for Foo {} //~ ERROR E0405 +LL | impl SomeTrait for Foo {} | ^^^^^^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0408.stderr b/src/test/ui/error-codes/E0408.stderr index dc0a41e6eb0..132a9432254 100644 --- a/src/test/ui/error-codes/E0408.stderr +++ b/src/test/ui/error-codes/E0408.stderr @@ -1,7 +1,7 @@ error[E0408]: variable `y` is not bound in all patterns --> $DIR/E0408.rs:5:19 | -LL | Some(y) | None => {} //~ ERROR variable `y` is not bound in all patterns +LL | Some(y) | None => {} | - ^^^^ pattern doesn't bind `y` | | | variable not in all patterns diff --git a/src/test/ui/error-codes/E0411.stderr b/src/test/ui/error-codes/E0411.stderr index fe78d8d957e..c1c25e835c1 100644 --- a/src/test/ui/error-codes/E0411.stderr +++ b/src/test/ui/error-codes/E0411.stderr @@ -1,7 +1,7 @@ error[E0411]: cannot find type `Self` in this scope --> $DIR/E0411.rs:2:6 | -LL | ::foo; //~ ERROR E0411 +LL | ::foo; | ^^^^ `Self` is only available in impls, traits, and type definitions error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0412.stderr b/src/test/ui/error-codes/E0412.stderr index 68d636ffae0..7bdaa180730 100644 --- a/src/test/ui/error-codes/E0412.stderr +++ b/src/test/ui/error-codes/E0412.stderr @@ -1,7 +1,7 @@ error[E0412]: cannot find type `Something` in this scope --> $DIR/E0412.rs:1:6 | -LL | impl Something {} //~ ERROR E0412 +LL | impl Something {} | ^^^^^^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0415.stderr b/src/test/ui/error-codes/E0415.stderr index 6e848f9bfd3..c2b8fdc7c55 100644 --- a/src/test/ui/error-codes/E0415.stderr +++ b/src/test/ui/error-codes/E0415.stderr @@ -1,7 +1,7 @@ error[E0415]: identifier `f` is bound more than once in this parameter list --> $DIR/E0415.rs:1:16 | -LL | fn foo(f: i32, f: i32) {} //~ ERROR E0415 +LL | fn foo(f: i32, f: i32) {} | ^ used as parameter more than once error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0416.stderr b/src/test/ui/error-codes/E0416.stderr index 4baf5006cf4..78acac5c661 100644 --- a/src/test/ui/error-codes/E0416.stderr +++ b/src/test/ui/error-codes/E0416.stderr @@ -1,7 +1,7 @@ error[E0416]: identifier `x` is bound more than once in the same pattern --> $DIR/E0416.rs:3:13 | -LL | (x, x) => {} //~ ERROR E0416 +LL | (x, x) => {} | ^ used in a pattern more than once error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0423.stderr b/src/test/ui/error-codes/E0423.stderr index d0deb8ce7ea..bdcfaae60a0 100644 --- a/src/test/ui/error-codes/E0423.stderr +++ b/src/test/ui/error-codes/E0423.stderr @@ -19,7 +19,7 @@ LL | for _ in std::ops::Range { start: 0, end: 10 } {} error[E0423]: expected function, found struct `Foo` --> $DIR/E0423.rs:4:13 | -LL | let f = Foo(); //~ ERROR E0423 +LL | let f = Foo(); | ^^^ | | | did you mean `Foo { /* fields */ }`? diff --git a/src/test/ui/error-codes/E0424.stderr b/src/test/ui/error-codes/E0424.stderr index b91f061db34..d67a2660dac 100644 --- a/src/test/ui/error-codes/E0424.stderr +++ b/src/test/ui/error-codes/E0424.stderr @@ -1,13 +1,13 @@ error[E0424]: expected value, found module `self` --> $DIR/E0424.rs:7:9 | -LL | self.bar(); //~ ERROR E0424 +LL | self.bar(); | ^^^^ `self` value is a keyword only available in methods with `self` parameter error[E0424]: expected unit struct/variant or constant, found module `self` --> $DIR/E0424.rs:12:9 | -LL | let self = "self"; //~ ERROR E0424 +LL | let self = "self"; | ^^^^ `self` value is a keyword and may not be bound to variables or shadowed error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0425.stderr b/src/test/ui/error-codes/E0425.stderr index 391027a5184..9ef4608da7d 100644 --- a/src/test/ui/error-codes/E0425.stderr +++ b/src/test/ui/error-codes/E0425.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `elf` in this scope --> $DIR/E0425.rs:3:9 | -LL | elf; //~ ERROR E0425 +LL | elf; | ^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0428.stderr b/src/test/ui/error-codes/E0428.stderr index 2154cb0ead2..205bcf342f1 100644 --- a/src/test/ui/error-codes/E0428.stderr +++ b/src/test/ui/error-codes/E0428.stderr @@ -1,9 +1,9 @@ error[E0428]: the name `Bar` is defined multiple times --> $DIR/E0428.rs:2:1 | -LL | struct Bar; //~ previous definition of the type `Bar` here +LL | struct Bar; | ----------- previous definition of the type `Bar` here -LL | struct Bar; //~ ERROR E0428 +LL | struct Bar; | ^^^^^^^^^^^ `Bar` redefined here | = note: `Bar` must be defined only once in the type namespace of this module diff --git a/src/test/ui/error-codes/E0429.stderr b/src/test/ui/error-codes/E0429.stderr index 13cdb0d8861..b5f76a1fcd8 100644 --- a/src/test/ui/error-codes/E0429.stderr +++ b/src/test/ui/error-codes/E0429.stderr @@ -1,7 +1,7 @@ error[E0429]: `self` imports are only allowed within a { } list --> $DIR/E0429.rs:1:5 | -LL | use std::fmt::self; //~ ERROR E0429 +LL | use std::fmt::self; | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0430.stderr b/src/test/ui/error-codes/E0430.stderr index 78e4e43ac2f..9f8b053de2c 100644 --- a/src/test/ui/error-codes/E0430.stderr +++ b/src/test/ui/error-codes/E0430.stderr @@ -1,7 +1,7 @@ error[E0430]: `self` import can only appear once in an import list --> $DIR/E0430.rs:1:16 | -LL | use std::fmt::{self, self}; //~ ERROR E0430 +LL | use std::fmt::{self, self}; | ^^^^ ---- another `self` import appears here | | | can only appear once in an import list @@ -9,7 +9,7 @@ LL | use std::fmt::{self, self}; //~ ERROR E0430 error[E0252]: the name `fmt` is defined multiple times --> $DIR/E0430.rs:1:22 | -LL | use std::fmt::{self, self}; //~ ERROR E0430 +LL | use std::fmt::{self, self}; | ------^^^^ | | | | | | | `fmt` reimported here diff --git a/src/test/ui/error-codes/E0431.stderr b/src/test/ui/error-codes/E0431.stderr index 240e6bd4a82..adfd2d923c7 100644 --- a/src/test/ui/error-codes/E0431.stderr +++ b/src/test/ui/error-codes/E0431.stderr @@ -1,7 +1,7 @@ error[E0431]: `self` import can only appear in an import list with a non-empty prefix --> $DIR/E0431.rs:1:6 | -LL | use {self}; //~ ERROR E0431 +LL | use {self}; | ^^^^ can only appear in an import list with a non-empty prefix error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0432.stderr b/src/test/ui/error-codes/E0432.stderr index bb6b31242cb..137a1af6f95 100644 --- a/src/test/ui/error-codes/E0432.stderr +++ b/src/test/ui/error-codes/E0432.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `something` --> $DIR/E0432.rs:1:5 | -LL | use something::Foo; //~ ERROR E0432 +LL | use something::Foo; | ^^^^^^^^^ maybe a missing `extern crate something;`? error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0433.stderr b/src/test/ui/error-codes/E0433.stderr index 7fbb7fa0413..d852e188384 100644 --- a/src/test/ui/error-codes/E0433.stderr +++ b/src/test/ui/error-codes/E0433.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve: use of undeclared type or module `HashMap` --> $DIR/E0433.rs:2:15 | -LL | let map = HashMap::new(); //~ ERROR E0433 +LL | let map = HashMap::new(); | ^^^^^^^ use of undeclared type or module `HashMap` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0434.stderr b/src/test/ui/error-codes/E0434.stderr index 0e2bc701b7f..14508ccbc9a 100644 --- a/src/test/ui/error-codes/E0434.stderr +++ b/src/test/ui/error-codes/E0434.stderr @@ -1,7 +1,7 @@ error[E0434]: can't capture dynamic environment in a fn item --> $DIR/E0434.rs:4:9 | -LL | y //~ ERROR E0434 +LL | y | ^ | = help: use the `|| { ... }` closure form instead diff --git a/src/test/ui/error-codes/E0435.stderr b/src/test/ui/error-codes/E0435.stderr index 09c9d19e114..349aa0d07c5 100644 --- a/src/test/ui/error-codes/E0435.stderr +++ b/src/test/ui/error-codes/E0435.stderr @@ -1,7 +1,7 @@ error[E0435]: attempt to use a non-constant value in a constant --> $DIR/E0435.rs:3:17 | -LL | let _: [u8; foo]; //~ ERROR E0435 +LL | let _: [u8; foo]; | ^^^ non-constant value error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0437.stderr b/src/test/ui/error-codes/E0437.stderr index 9470cbf176a..217b164036f 100644 --- a/src/test/ui/error-codes/E0437.stderr +++ b/src/test/ui/error-codes/E0437.stderr @@ -1,7 +1,7 @@ error[E0437]: type `Bar` is not a member of trait `Foo` --> $DIR/E0437.rs:4:5 | -LL | type Bar = bool; //~ ERROR E0437 +LL | type Bar = bool; | ^^^^^^^^^^^^^^^^ not a member of trait `Foo` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0438.stderr b/src/test/ui/error-codes/E0438.stderr index 6a11577bb0f..853f0c3c239 100644 --- a/src/test/ui/error-codes/E0438.stderr +++ b/src/test/ui/error-codes/E0438.stderr @@ -1,7 +1,7 @@ error[E0438]: const `BAR` is not a member of trait `Bar` --> $DIR/E0438.rs:4:5 | -LL | const BAR: bool = true; //~ ERROR E0438 +LL | const BAR: bool = true; | ^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `Bar` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0439.stderr b/src/test/ui/error-codes/E0439.stderr index e3b8fbfb253..8021f7d3951 100644 --- a/src/test/ui/error-codes/E0439.stderr +++ b/src/test/ui/error-codes/E0439.stderr @@ -1,7 +1,7 @@ error[E0439]: invalid `simd_shuffle`, needs length: `simd_shuffle` --> $DIR/E0439.rs:4:5 | -LL | fn simd_shuffle(a: A, b: A, c: [u32; 8]) -> B; //~ ERROR E0439 +LL | fn simd_shuffle(a: A, b: A, c: [u32; 8]) -> B; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0446.stderr b/src/test/ui/error-codes/E0446.stderr index 9c7399515f4..a0f5f7079b3 100644 --- a/src/test/ui/error-codes/E0446.stderr +++ b/src/test/ui/error-codes/E0446.stderr @@ -4,7 +4,7 @@ error[E0446]: private type `foo::Bar` in public interface LL | struct Bar(u32); | - `foo::Bar` declared as private LL | -LL | / pub fn bar() -> Bar { //~ ERROR E0446 +LL | / pub fn bar() -> Bar { LL | | Bar(0) LL | | } | |_____^ can't leak private type diff --git a/src/test/ui/error-codes/E0449.stderr b/src/test/ui/error-codes/E0449.stderr index d623c8abbd9..8221a5e0ad6 100644 --- a/src/test/ui/error-codes/E0449.stderr +++ b/src/test/ui/error-codes/E0449.stderr @@ -1,7 +1,7 @@ error[E0449]: unnecessary visibility qualifier --> $DIR/E0449.rs:7:1 | -LL | pub impl Bar {} //~ ERROR E0449 +LL | pub impl Bar {} | ^^^ `pub` not permitted here because it's implied | = note: place qualifiers on individual impl items instead @@ -9,13 +9,13 @@ LL | pub impl Bar {} //~ ERROR E0449 error[E0449]: unnecessary visibility qualifier --> $DIR/E0449.rs:9:1 | -LL | pub impl Foo for Bar { //~ ERROR E0449 +LL | pub impl Foo for Bar { | ^^^ `pub` not permitted here because it's implied error[E0449]: unnecessary visibility qualifier --> $DIR/E0449.rs:10:5 | -LL | pub fn foo() {} //~ ERROR E0449 +LL | pub fn foo() {} | ^^^ `pub` not permitted here because it's implied error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0451.stderr b/src/test/ui/error-codes/E0451.stderr index 11f08677246..655f3a98d7f 100644 --- a/src/test/ui/error-codes/E0451.stderr +++ b/src/test/ui/error-codes/E0451.stderr @@ -1,13 +1,13 @@ error[E0451]: field `b` of struct `bar::Foo` is private --> $DIR/E0451.rs:14:21 | -LL | let bar::Foo{a, b} = foo; //~ ERROR E0451 +LL | let bar::Foo{a, b} = foo; | ^ field `b` is private error[E0451]: field `b` of struct `bar::Foo` is private --> $DIR/E0451.rs:18:29 | -LL | let f = bar::Foo{ a: 0, b: 0 }; //~ ERROR E0451 +LL | let f = bar::Foo{ a: 0, b: 0 }; | ^^^^ field `b` is private error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0452.stderr b/src/test/ui/error-codes/E0452.stderr index 62f268cd432..7c3093309f9 100644 --- a/src/test/ui/error-codes/E0452.stderr +++ b/src/test/ui/error-codes/E0452.stderr @@ -1,7 +1,7 @@ error[E0452]: malformed lint attribute --> $DIR/E0452.rs:1:10 | -LL | #![allow(foo = "")] //~ ERROR E0452 +LL | #![allow(foo = "")] | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0458.stderr b/src/test/ui/error-codes/E0458.stderr index 8b071e0b315..9cfe7cccac1 100644 --- a/src/test/ui/error-codes/E0458.stderr +++ b/src/test/ui/error-codes/E0458.stderr @@ -1,7 +1,7 @@ error[E0458]: unknown kind: `wonderful_unicorn` --> $DIR/E0458.rs:1:1 | -LL | #[link(kind = "wonderful_unicorn")] extern {} //~ ERROR E0458 +LL | #[link(kind = "wonderful_unicorn")] extern {} | ^^^^^^^--------------------------^^ | | | unknown kind @@ -9,7 +9,7 @@ LL | #[link(kind = "wonderful_unicorn")] extern {} //~ ERROR E0458 error[E0459]: #[link(...)] specified without `name = "foo"` --> $DIR/E0458.rs:1:1 | -LL | #[link(kind = "wonderful_unicorn")] extern {} //~ ERROR E0458 +LL | #[link(kind = "wonderful_unicorn")] extern {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `name` argument error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0459.stderr b/src/test/ui/error-codes/E0459.stderr index d3591cd5f60..da7069fbb47 100644 --- a/src/test/ui/error-codes/E0459.stderr +++ b/src/test/ui/error-codes/E0459.stderr @@ -1,7 +1,7 @@ error[E0459]: #[link(...)] specified without `name = "foo"` --> $DIR/E0459.rs:1:1 | -LL | #[link(kind = "dylib")] extern {} //~ ERROR E0459 +LL | #[link(kind = "dylib")] extern {} | ^^^^^^^^^^^^^^^^^^^^^^^ missing `name` argument error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0478.stderr b/src/test/ui/error-codes/E0478.stderr index 5147bf24559..71e490364d7 100644 --- a/src/test/ui/error-codes/E0478.stderr +++ b/src/test/ui/error-codes/E0478.stderr @@ -1,7 +1,7 @@ error[E0478]: lifetime bound not satisfied --> $DIR/E0478.rs:4:5 | -LL | child: Box + 'SnowWhite>, //~ ERROR E0478 +LL | child: Box + 'SnowWhite>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lifetime parameter instantiated with the lifetime 'SnowWhite as defined on the struct at 3:22 diff --git a/src/test/ui/error-codes/E0492.stderr b/src/test/ui/error-codes/E0492.stderr index b73db6c975e..5f337dd7f42 100644 --- a/src/test/ui/error-codes/E0492.stderr +++ b/src/test/ui/error-codes/E0492.stderr @@ -1,7 +1,7 @@ error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead --> $DIR/E0492.rs:4:34 | -LL | static B: &'static AtomicUsize = &A; //~ ERROR E0492 +LL | static B: &'static AtomicUsize = &A; | ^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0496.stderr b/src/test/ui/error-codes/E0496.stderr index 515d71ba05e..b0294eef04e 100644 --- a/src/test/ui/error-codes/E0496.stderr +++ b/src/test/ui/error-codes/E0496.stderr @@ -3,7 +3,7 @@ error[E0496]: lifetime name `'a` shadows a lifetime name that is already in scop | LL | impl<'a> Foo<'a> { | -- first declared here -LL | fn f<'a>(x: &'a i32) { //~ ERROR E0496 +LL | fn f<'a>(x: &'a i32) { | ^^ lifetime 'a already in scope error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0499.stderr b/src/test/ui/error-codes/E0499.stderr index 92157e4eba6..82270162b38 100644 --- a/src/test/ui/error-codes/E0499.stderr +++ b/src/test/ui/error-codes/E0499.stderr @@ -3,7 +3,7 @@ error[E0499]: cannot borrow `i` as mutable more than once at a time | LL | let mut x = &mut i; | - first mutable borrow occurs here -LL | let mut a = &mut i; //~ ERROR E0499 +LL | let mut a = &mut i; | ^ second mutable borrow occurs here ... LL | } diff --git a/src/test/ui/error-codes/E0502.stderr b/src/test/ui/error-codes/E0502.stderr index 9193886b009..26a2c3bf353 100644 --- a/src/test/ui/error-codes/E0502.stderr +++ b/src/test/ui/error-codes/E0502.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `*a` as mutable because `a` is also borrowed as immu | LL | let ref y = a; | ----- immutable borrow occurs here -LL | bar(a); //~ ERROR E0502 +LL | bar(a); | ^ mutable borrow occurs here LL | y.use_ref(); LL | } diff --git a/src/test/ui/error-codes/E0503.stderr b/src/test/ui/error-codes/E0503.stderr index 83391146b60..62cb3afca78 100644 --- a/src/test/ui/error-codes/E0503.stderr +++ b/src/test/ui/error-codes/E0503.stderr @@ -3,7 +3,7 @@ error[E0503]: cannot use `value` because it was mutably borrowed | LL | let _borrow = &mut value; | ----- borrow of `value` occurs here -LL | let _sum = value + 1; //~ ERROR E0503 +LL | let _sum = value + 1; | ^^^^^ use of borrowed `value` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0504.stderr b/src/test/ui/error-codes/E0504.stderr index 7f4a611c5d5..a987713a11d 100644 --- a/src/test/ui/error-codes/E0504.stderr +++ b/src/test/ui/error-codes/E0504.stderr @@ -4,7 +4,7 @@ error[E0504]: cannot move `fancy_num` into closure because it is borrowed LL | let fancy_ref = &fancy_num; | --------- borrow of `fancy_num` occurs here ... -LL | println!("child function: {}", fancy_num.num); //~ ERROR E0504 +LL | println!("child function: {}", fancy_num.num); | ^^^^^^^^^ move into closure occurs here error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0505.stderr b/src/test/ui/error-codes/E0505.stderr index 268eb880192..28dfb25986f 100644 --- a/src/test/ui/error-codes/E0505.stderr +++ b/src/test/ui/error-codes/E0505.stderr @@ -3,7 +3,7 @@ error[E0505]: cannot move out of `x` because it is borrowed | LL | let _ref_to_val: &Value = &x; | - borrow of `x` occurs here -LL | eat(x); //~ ERROR E0505 +LL | eat(x); | ^ move out of `x` occurs here error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0507.stderr b/src/test/ui/error-codes/E0507.stderr index c24b8ecf61a..1a596af1572 100644 --- a/src/test/ui/error-codes/E0507.stderr +++ b/src/test/ui/error-codes/E0507.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of borrowed content --> $DIR/E0507.rs:12:5 | -LL | x.borrow().nothing_is_true(); //~ ERROR E0507 +LL | x.borrow().nothing_is_true(); | ^^^^^^^^^^ cannot move out of borrowed content error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0509.stderr b/src/test/ui/error-codes/E0509.stderr index b1f256d2d9e..25b6d8a47d2 100644 --- a/src/test/ui/error-codes/E0509.stderr +++ b/src/test/ui/error-codes/E0509.stderr @@ -1,7 +1,7 @@ error[E0509]: cannot move out of type `DropStruct`, which implements the `Drop` trait --> $DIR/E0509.rs:16:23 | -LL | let fancy_field = drop_struct.fancy; //~ ERROR E0509 +LL | let fancy_field = drop_struct.fancy; | ^^^^^^^^^^^^^^^^^ | | | cannot move out of here diff --git a/src/test/ui/error-codes/E0511.stderr b/src/test/ui/error-codes/E0511.stderr index f1e3c0135bf..1362a3d1f25 100644 --- a/src/test/ui/error-codes/E0511.stderr +++ b/src/test/ui/error-codes/E0511.stderr @@ -1,7 +1,7 @@ error[E0511]: invalid monomorphization of `simd_add` intrinsic: expected SIMD input type, found non-SIMD `i32` --> $DIR/E0511.rs:8:14 | -LL | unsafe { simd_add(0, 1); } //~ ERROR E0511 +LL | unsafe { simd_add(0, 1); } | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0512.stderr b/src/test/ui/error-codes/E0512.stderr index 998f6403f0b..3fecce542ce 100644 --- a/src/test/ui/error-codes/E0512.stderr +++ b/src/test/ui/error-codes/E0512.stderr @@ -1,7 +1,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> $DIR/E0512.rs:4:23 | -LL | unsafe { takes_u8(::std::mem::transmute(0u16)); } //~ ERROR E0512 +LL | unsafe { takes_u8(::std::mem::transmute(0u16)); } | ^^^^^^^^^^^^^^^^^^^^^ | = note: source type: `u16` (16 bits) diff --git a/src/test/ui/error-codes/E0516.stderr b/src/test/ui/error-codes/E0516.stderr index 034c1793364..2e6de5053d5 100644 --- a/src/test/ui/error-codes/E0516.stderr +++ b/src/test/ui/error-codes/E0516.stderr @@ -1,7 +1,7 @@ error[E0516]: `typeof` is a reserved keyword but unimplemented --> $DIR/E0516.rs:2:12 | -LL | let x: typeof(92) = 92; //~ ERROR E0516 +LL | let x: typeof(92) = 92; | ^^^^^^^^^^ reserved keyword error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0517.stderr b/src/test/ui/error-codes/E0517.stderr index 366ab1bca63..e256c07de26 100644 --- a/src/test/ui/error-codes/E0517.stderr +++ b/src/test/ui/error-codes/E0517.stderr @@ -1,7 +1,7 @@ error[E0517]: attribute should be applied to struct, enum or union --> $DIR/E0517.rs:1:8 | -LL | #[repr(C)] //~ ERROR: E0517 +LL | #[repr(C)] | ^ LL | type Foo = u8; | -------------- not a struct, enum or union @@ -9,7 +9,7 @@ LL | type Foo = u8; error[E0517]: attribute should be applied to struct or union --> $DIR/E0517.rs:4:8 | -LL | #[repr(packed)] //~ ERROR: E0517 +LL | #[repr(packed)] | ^^^^^^ LL | enum Foo2 {Bar, Baz} | -------------------- not a struct or union @@ -17,7 +17,7 @@ LL | enum Foo2 {Bar, Baz} error[E0517]: attribute should be applied to enum --> $DIR/E0517.rs:7:8 | -LL | #[repr(u8)] //~ ERROR: E0517 +LL | #[repr(u8)] | ^^ LL | struct Foo3 {bar: bool, baz: bool} | ---------------------------------- not an enum @@ -25,7 +25,7 @@ LL | struct Foo3 {bar: bool, baz: bool} error[E0517]: attribute should be applied to struct, enum or union --> $DIR/E0517.rs:10:8 | -LL | #[repr(C)] //~ ERROR: E0517 +LL | #[repr(C)] | ^ LL | / impl Foo3 { LL | | } diff --git a/src/test/ui/error-codes/E0518.stderr b/src/test/ui/error-codes/E0518.stderr index 6391a69c24e..561446f8175 100644 --- a/src/test/ui/error-codes/E0518.stderr +++ b/src/test/ui/error-codes/E0518.stderr @@ -1,7 +1,7 @@ error[E0518]: attribute should be applied to function or closure --> $DIR/E0518.rs:1:1 | -LL | #[inline(always)] //~ ERROR: E0518 +LL | #[inline(always)] | ^^^^^^^^^^^^^^^^^ LL | struct Foo; | ----------- not a function or closure @@ -9,7 +9,7 @@ LL | struct Foo; error[E0518]: attribute should be applied to function or closure --> $DIR/E0518.rs:4:1 | -LL | #[inline(never)] //~ ERROR: E0518 +LL | #[inline(never)] | ^^^^^^^^^^^^^^^^ LL | / impl Foo { LL | | } diff --git a/src/test/ui/error-codes/E0530.stderr b/src/test/ui/error-codes/E0530.stderr index 2ef80253eaf..c312144132d 100644 --- a/src/test/ui/error-codes/E0530.stderr +++ b/src/test/ui/error-codes/E0530.stderr @@ -4,7 +4,7 @@ error[E0530]: match bindings cannot shadow statics LL | static TEST: i32 = 0; | --------------------- the static `TEST` is defined here ... -LL | TEST => {} //~ ERROR E0530 +LL | TEST => {} | ^^^^ cannot be named the same as a static error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0534.stderr b/src/test/ui/error-codes/E0534.stderr index d2829e1643b..23f9cd7ce2d 100644 --- a/src/test/ui/error-codes/E0534.stderr +++ b/src/test/ui/error-codes/E0534.stderr @@ -1,7 +1,7 @@ error[E0534]: expected one argument --> $DIR/E0534.rs:1:1 | -LL | #[inline()] //~ ERROR E0534 +LL | #[inline()] | ^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0565-1.stderr b/src/test/ui/error-codes/E0565-1.stderr index c320918a3bf..1283a9c5ef6 100644 --- a/src/test/ui/error-codes/E0565-1.stderr +++ b/src/test/ui/error-codes/E0565-1.stderr @@ -1,7 +1,7 @@ error[E0565]: item in `deprecated` must be a key/value pair --> $DIR/E0565-1.rs:2:14 | -LL | #[deprecated("since")] //~ ERROR E0565 +LL | #[deprecated("since")] | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0565-2.stderr b/src/test/ui/error-codes/E0565-2.stderr index 8e2ce09059a..bb30bd7befb 100644 --- a/src/test/ui/error-codes/E0565-2.stderr +++ b/src/test/ui/error-codes/E0565-2.stderr @@ -1,7 +1,7 @@ error[E0565]: literal in `deprecated` value must be a string --> $DIR/E0565-2.rs:2:22 | -LL | #[deprecated(since = b"1.29", note = "hi")] //~ ERROR E0565 +LL | #[deprecated(since = b"1.29", note = "hi")] | ^^^^^^^ help: consider removing the prefix: `"1.29"` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0565.stderr b/src/test/ui/error-codes/E0565.stderr index 2c172f81149..6ed90c0ae4f 100644 --- a/src/test/ui/error-codes/E0565.stderr +++ b/src/test/ui/error-codes/E0565.stderr @@ -1,7 +1,7 @@ error[E0565]: meta item in `repr` must be an identifier --> $DIR/E0565.rs:2:8 | -LL | #[repr("C")] //~ ERROR E0565 +LL | #[repr("C")] | ^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0572.stderr b/src/test/ui/error-codes/E0572.stderr index 295a518c336..36619f8dee4 100644 --- a/src/test/ui/error-codes/E0572.stderr +++ b/src/test/ui/error-codes/E0572.stderr @@ -1,7 +1,7 @@ error[E0572]: return statement outside of function body --> $DIR/E0572.rs:1:18 | -LL | const FOO: u32 = return 0; //~ ERROR E0572 +LL | const FOO: u32 = return 0; | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0586.stderr b/src/test/ui/error-codes/E0586.stderr index 394b4be3340..d1e7e3f4744 100644 --- a/src/test/ui/error-codes/E0586.stderr +++ b/src/test/ui/error-codes/E0586.stderr @@ -1,7 +1,7 @@ error[E0586]: inclusive range with no end --> $DIR/E0586.rs:3:22 | -LL | let x = &tmp[1..=]; //~ ERROR E0586 +LL | let x = &tmp[1..=]; | ^ | = help: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) diff --git a/src/test/ui/error-codes/E0597.stderr b/src/test/ui/error-codes/E0597.stderr index a5b0cc49d0c..cab97858531 100644 --- a/src/test/ui/error-codes/E0597.stderr +++ b/src/test/ui/error-codes/E0597.stderr @@ -3,7 +3,7 @@ error[E0597]: `y` does not live long enough | LL | x.x = Some(&y); | ^ borrowed value does not live long enough -LL | //~^ `y` does not live long enough [E0597] +LL | LL | } | - `y` dropped here while still borrowed | diff --git a/src/test/ui/error-codes/E0599.stderr b/src/test/ui/error-codes/E0599.stderr index 85110889e9a..6fb53e72763 100644 --- a/src/test/ui/error-codes/E0599.stderr +++ b/src/test/ui/error-codes/E0599.stderr @@ -4,7 +4,7 @@ error[E0599]: no associated item named `NotEvenReal` found for type `Foo` in the LL | struct Foo; | ----------- associated item `NotEvenReal` not found for this ... -LL | || if let Foo::NotEvenReal() = Foo {}; //~ ERROR E0599 +LL | || if let Foo::NotEvenReal() = Foo {}; | -----^^^^^^^^^^^-- associated item not found in `Foo` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0600.stderr b/src/test/ui/error-codes/E0600.stderr index 6c6d922290f..95ac4510ca8 100644 --- a/src/test/ui/error-codes/E0600.stderr +++ b/src/test/ui/error-codes/E0600.stderr @@ -1,7 +1,7 @@ error[E0600]: cannot apply unary operator `!` to type `&'static str` --> $DIR/E0600.rs:2:5 | -LL | !"a"; //~ ERROR E0600 +LL | !"a"; | ^^^^ cannot apply unary operator `!` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0603.stderr b/src/test/ui/error-codes/E0603.stderr index ee8fd2809bc..444005e086f 100644 --- a/src/test/ui/error-codes/E0603.stderr +++ b/src/test/ui/error-codes/E0603.stderr @@ -1,7 +1,7 @@ error[E0603]: constant `PRIVATE` is private --> $DIR/E0603.rs:6:17 | -LL | SomeModule::PRIVATE; //~ ERROR E0603 +LL | SomeModule::PRIVATE; | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0604.stderr b/src/test/ui/error-codes/E0604.stderr index 2bd92db86e3..5861bdcb7a9 100644 --- a/src/test/ui/error-codes/E0604.stderr +++ b/src/test/ui/error-codes/E0604.stderr @@ -1,7 +1,7 @@ error[E0604]: only `u8` can be cast as `char`, not `u32` --> $DIR/E0604.rs:2:5 | -LL | 1u32 as char; //~ ERROR E0604 +LL | 1u32 as char; | ^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0605.stderr b/src/test/ui/error-codes/E0605.stderr index 4dc074b222a..95e899db8b7 100644 --- a/src/test/ui/error-codes/E0605.stderr +++ b/src/test/ui/error-codes/E0605.stderr @@ -1,7 +1,7 @@ error[E0605]: non-primitive cast: `u8` as `std::vec::Vec` --> $DIR/E0605.rs:3:5 | -LL | x as Vec; //~ ERROR E0605 +LL | x as Vec; | ^^^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -9,7 +9,7 @@ LL | x as Vec; //~ ERROR E0605 error[E0605]: non-primitive cast: `*const u8` as `&u8` --> $DIR/E0605.rs:6:5 | -LL | v as &u8; //~ ERROR E0605 +LL | v as &u8; | ^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait diff --git a/src/test/ui/error-codes/E0606.stderr b/src/test/ui/error-codes/E0606.stderr index 89ec4896a2b..fce24886eb0 100644 --- a/src/test/ui/error-codes/E0606.stderr +++ b/src/test/ui/error-codes/E0606.stderr @@ -1,7 +1,7 @@ error[E0606]: casting `&u8` as `u8` is invalid --> $DIR/E0606.rs:2:5 | -LL | &0u8 as u8; //~ ERROR E0606 +LL | &0u8 as u8; | ----^^^^^^ | | | cannot cast `&u8` as `u8` diff --git a/src/test/ui/error-codes/E0607.stderr b/src/test/ui/error-codes/E0607.stderr index 1fbe4b9c5bc..a0fe02c1c4d 100644 --- a/src/test/ui/error-codes/E0607.stderr +++ b/src/test/ui/error-codes/E0607.stderr @@ -1,7 +1,7 @@ error[E0607]: cannot cast thin pointer `*const u8` to fat pointer `*const [u8]` --> $DIR/E0607.rs:3:5 | -LL | v as *const [u8]; //~ ERROR E0607 +LL | v as *const [u8]; | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0608.stderr b/src/test/ui/error-codes/E0608.stderr index b228b2eddfd..3aec509934b 100644 --- a/src/test/ui/error-codes/E0608.stderr +++ b/src/test/ui/error-codes/E0608.stderr @@ -1,7 +1,7 @@ error[E0608]: cannot index into a value of type `u8` --> $DIR/E0608.rs:2:5 | -LL | 0u8[2]; //~ ERROR E0608 +LL | 0u8[2]; | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0609.stderr b/src/test/ui/error-codes/E0609.stderr index b5cf09b2201..797e95d02dd 100644 --- a/src/test/ui/error-codes/E0609.stderr +++ b/src/test/ui/error-codes/E0609.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `foo` on type `Foo` --> $DIR/E0609.rs:8:15 | -LL | let _ = x.foo; //~ ERROR E0609 +LL | let _ = x.foo; | ^^^ unknown field | = note: available fields are: `x` @@ -9,7 +9,7 @@ LL | let _ = x.foo; //~ ERROR E0609 error[E0609]: no field `1` on type `Bar` --> $DIR/E0609.rs:11:7 | -LL | y.1; //~ ERROR E0609 +LL | y.1; | ^ unknown field error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0610.stderr b/src/test/ui/error-codes/E0610.stderr index c46b1f2b2d5..a2966eea44c 100644 --- a/src/test/ui/error-codes/E0610.stderr +++ b/src/test/ui/error-codes/E0610.stderr @@ -1,7 +1,7 @@ error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/E0610.rs:3:15 | -LL | let _ = x.foo; //~ ERROR E0610 +LL | let _ = x.foo; | ^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0614.stderr b/src/test/ui/error-codes/E0614.stderr index 5b1a4a93c4c..598117c2b60 100644 --- a/src/test/ui/error-codes/E0614.stderr +++ b/src/test/ui/error-codes/E0614.stderr @@ -1,7 +1,7 @@ error[E0614]: type `u32` cannot be dereferenced --> $DIR/E0614.rs:3:5 | -LL | *y; //~ ERROR E0614 +LL | *y; | ^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0615.stderr b/src/test/ui/error-codes/E0615.stderr index d86ee5b9b4b..772058719ae 100644 --- a/src/test/ui/error-codes/E0615.stderr +++ b/src/test/ui/error-codes/E0615.stderr @@ -1,7 +1,7 @@ error[E0615]: attempted to take value of method `method` on type `Foo` --> $DIR/E0615.rs:11:7 | -LL | f.method; //~ ERROR E0615 +LL | f.method; | ^^^^^^ help: use parentheses to call the method: `method()` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0616.stderr b/src/test/ui/error-codes/E0616.stderr index f600bfa8cd3..556e5db10a9 100644 --- a/src/test/ui/error-codes/E0616.stderr +++ b/src/test/ui/error-codes/E0616.stderr @@ -1,7 +1,7 @@ error[E0616]: field `x` of struct `a::Foo` is private --> $DIR/E0616.rs:13:5 | -LL | f.x; //~ ERROR E0616 +LL | f.x; | ^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0620.stderr b/src/test/ui/error-codes/E0620.stderr index f7319a878c2..65152b2b74d 100644 --- a/src/test/ui/error-codes/E0620.stderr +++ b/src/test/ui/error-codes/E0620.stderr @@ -1,13 +1,13 @@ error[E0620]: cast to unsized type: `&[usize; 2]` as `[usize]` --> $DIR/E0620.rs:2:16 | -LL | let _foo = &[1_usize, 2] as [usize]; //~ ERROR E0620 +LL | let _foo = &[1_usize, 2] as [usize]; | ^^^^^^^^^^^^^^^^^^^^^^^^ | help: consider using an implicit coercion to `&[usize]` instead --> $DIR/E0620.rs:2:16 | -LL | let _foo = &[1_usize, 2] as [usize]; //~ ERROR E0620 +LL | let _foo = &[1_usize, 2] as [usize]; | ^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr b/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr index f763c82eff8..feca7f10b70 100644 --- a/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr +++ b/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr @@ -1,28 +1,28 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements --> $DIR/E0621-does-not-trigger-for-closures.rs:15:5 | -LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 +LL | invoke(&x, |a, b| if a > b { a } else { b }); | ^^^^^^ | note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 15:16... --> $DIR/E0621-does-not-trigger-for-closures.rs:15:16 | -LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 +LL | invoke(&x, |a, b| if a > b { a } else { b }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...so that reference does not outlive borrowed content --> $DIR/E0621-does-not-trigger-for-closures.rs:15:45 | -LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 +LL | invoke(&x, |a, b| if a > b { a } else { b }); | ^ note: but, the lifetime must be valid for the call at 15:5... --> $DIR/E0621-does-not-trigger-for-closures.rs:15:5 | -LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 +LL | invoke(&x, |a, b| if a > b { a } else { b }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...so type `&i32` of expression is valid during the expression --> $DIR/E0621-does-not-trigger-for-closures.rs:15:5 | -LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495 +LL | invoke(&x, |a, b| if a > b { a } else { b }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0624.stderr b/src/test/ui/error-codes/E0624.stderr index 31a2f607e58..01ac24cfbbe 100644 --- a/src/test/ui/error-codes/E0624.stderr +++ b/src/test/ui/error-codes/E0624.stderr @@ -1,7 +1,7 @@ error[E0624]: method `method` is private --> $DIR/E0624.rs:11:9 | -LL | foo.method(); //~ ERROR method `method` is private [E0624] +LL | foo.method(); | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0637.stderr b/src/test/ui/error-codes/E0637.stderr index f744520ef6e..d19ebfd15a5 100644 --- a/src/test/ui/error-codes/E0637.stderr +++ b/src/test/ui/error-codes/E0637.stderr @@ -1,19 +1,19 @@ error[E0637]: `'_` cannot be used here --> $DIR/E0637.rs:1:16 | -LL | struct Foo<'a: '_>(&'a u8); //~ ERROR cannot be used here +LL | struct Foo<'a: '_>(&'a u8); | ^^ `'_` is a reserved lifetime name error[E0637]: `'_` cannot be used here --> $DIR/E0637.rs:2:12 | -LL | fn foo<'a: '_>(_: &'a u8) {} //~ ERROR cannot be used here +LL | fn foo<'a: '_>(_: &'a u8) {} | ^^ `'_` is a reserved lifetime name error[E0637]: `'_` cannot be used here --> $DIR/E0637.rs:5:10 | -LL | impl<'a: '_> Bar<'a> { //~ ERROR cannot be used here +LL | impl<'a: '_> Bar<'a> { | ^^ `'_` is a reserved lifetime name error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/E0646.stderr b/src/test/ui/error-codes/E0646.stderr index 502200c1d00..976cdd45f57 100644 --- a/src/test/ui/error-codes/E0646.stderr +++ b/src/test/ui/error-codes/E0646.stderr @@ -1,7 +1,7 @@ error[E0646]: `main` function is not allowed to have a `where` clause --> $DIR/E0646.rs:1:17 | -LL | fn main() where (): Copy {} //~ ERROR [E0646] +LL | fn main() where (): Copy {} | ^^^^^^^^ `main` cannot have a `where` clause error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0647.stderr b/src/test/ui/error-codes/E0647.stderr index da9ba5bf34b..465cc7702ee 100644 --- a/src/test/ui/error-codes/E0647.stderr +++ b/src/test/ui/error-codes/E0647.stderr @@ -1,7 +1,7 @@ error[E0647]: start function is not allowed to have a `where` clause --> $DIR/E0647.rs:7:56 | -LL | fn start(_: isize, _: *const *const u8) -> isize where (): Copy { //~ ERROR [E0647] +LL | fn start(_: isize, _: *const *const u8) -> isize where (): Copy { | ^^^^^^^^ start function cannot have a `where` clause error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0648.stderr b/src/test/ui/error-codes/E0648.stderr index 090157fb0d7..f682b4f41e5 100644 --- a/src/test/ui/error-codes/E0648.stderr +++ b/src/test/ui/error-codes/E0648.stderr @@ -1,7 +1,7 @@ error[E0648]: `export_name` may not contain null characters --> $DIR/E0648.rs:1:1 | -LL | #[export_name="/0foo"] //~ ERROR E0648 +LL | #[export_name="/0foo"] | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0658.stderr b/src/test/ui/error-codes/E0658.stderr index 58802b23db3..292c49fa84e 100644 --- a/src/test/ui/error-codes/E0658.stderr +++ b/src/test/ui/error-codes/E0658.stderr @@ -1,7 +1,7 @@ error[E0658]: repr with 128-bit type is unstable (see issue #35118) --> $DIR/E0658.rs:2:1 | -LL | / enum Foo { //~ ERROR E0658 +LL | / enum Foo { LL | | Bar(u64), LL | | } | |_^ diff --git a/src/test/ui/error-codes/E0659.stderr b/src/test/ui/error-codes/E0659.stderr index b5aa1b21b09..2f01f54c2d1 100644 --- a/src/test/ui/error-codes/E0659.stderr +++ b/src/test/ui/error-codes/E0659.stderr @@ -1,7 +1,7 @@ error[E0659]: `foo` is ambiguous (glob import vs glob import in the same module) --> $DIR/E0659.rs:15:15 | -LL | collider::foo(); //~ ERROR E0659 +LL | collider::foo(); | ^^^ ambiguous name | note: `foo` could refer to the function imported here diff --git a/src/test/ui/error-codes/E0718.stderr b/src/test/ui/error-codes/E0718.stderr index 4f9734d1acf..412c856ce06 100644 --- a/src/test/ui/error-codes/E0718.stderr +++ b/src/test/ui/error-codes/E0718.stderr @@ -1,7 +1,7 @@ error[E0718]: `arc` language item must be applied to a struct --> $DIR/E0718.rs:4:1 | -LL | #[lang = "arc"] //~ ERROR language item must be applied to a struct +LL | #[lang = "arc"] | ^^^^^^^^^^^^^^^ attribute should be applied to a struct, not a static item error: aborting due to previous error diff --git a/src/test/ui/error-codes/ex-E0611.stderr b/src/test/ui/error-codes/ex-E0611.stderr index f8c7cd8c146..8bd00a392d4 100644 --- a/src/test/ui/error-codes/ex-E0611.stderr +++ b/src/test/ui/error-codes/ex-E0611.stderr @@ -1,7 +1,7 @@ error[E0616]: field `0` of struct `a::Foo` is private --> $DIR/ex-E0611.rs:11:4 | -LL | y.0; //~ ERROR field `0` of struct `a::Foo` is private +LL | y.0; | ^^^ error: aborting due to previous error diff --git a/src/test/ui/error-codes/ex-E0612.stderr b/src/test/ui/error-codes/ex-E0612.stderr index 0f498d16439..b21b6fdfcf1 100644 --- a/src/test/ui/error-codes/ex-E0612.stderr +++ b/src/test/ui/error-codes/ex-E0612.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `1` on type `Foo` --> $DIR/ex-E0612.rs:5:6 | -LL | y.1; //~ ERROR no field `1` on type `Foo` +LL | y.1; | ^ help: a field with a similar name exists: `0` error: aborting due to previous error diff --git a/src/test/ui/error-should-say-copy-not-pod.stderr b/src/test/ui/error-should-say-copy-not-pod.stderr index d42fea70812..7143f8c914d 100644 --- a/src/test/ui/error-should-say-copy-not-pod.stderr +++ b/src/test/ui/error-should-say-copy-not-pod.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied --> $DIR/error-should-say-copy-not-pod.rs:6:5 | -LL | check_bound("nocopy".to_string()); //~ ERROR : std::marker::Copy` is not satisfied +LL | check_bound("nocopy".to_string()); | ^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String` | note: required by `check_bound` diff --git a/src/test/ui/estr-subtyping.stderr b/src/test/ui/estr-subtyping.stderr index 7a7dce98f2d..29f210803dd 100644 --- a/src/test/ui/estr-subtyping.stderr +++ b/src/test/ui/estr-subtyping.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/estr-subtyping.rs:10:15 | -LL | wants_uniq(x); //~ ERROR mismatched types +LL | wants_uniq(x); | ^ | | | expected struct `std::string::String`, found &str diff --git a/src/test/ui/exclusive-drop-and-copy.stderr b/src/test/ui/exclusive-drop-and-copy.stderr index 2fbeaec23a7..9983aac4f9c 100644 --- a/src/test/ui/exclusive-drop-and-copy.stderr +++ b/src/test/ui/exclusive-drop-and-copy.stderr @@ -1,13 +1,13 @@ error[E0184]: the trait `Copy` may not be implemented for this type; the type has a destructor --> $DIR/exclusive-drop-and-copy.rs:3:10 | -LL | #[derive(Copy, Clone)] //~ ERROR the trait `Copy` may not be implemented +LL | #[derive(Copy, Clone)] | ^^^^ Copy not allowed on types with destructors error[E0184]: the trait `Copy` may not be implemented for this type; the type has a destructor --> $DIR/exclusive-drop-and-copy.rs:10:10 | -LL | #[derive(Copy, Clone)] //~ ERROR the trait `Copy` may not be implemented +LL | #[derive(Copy, Clone)] | ^^^^ Copy not allowed on types with destructors error: aborting due to 2 previous errors diff --git a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr index 01c7e881756..03867a8e43b 100644 --- a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr +++ b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr @@ -1,7 +1,7 @@ error: unexpected token: `,` --> $DIR/exclusive_range_pattern_syntax_collision.rs:5:15 | -LL | [_, 99.., _] => {}, //~ ERROR unexpected token: `,` +LL | [_, 99.., _] => {}, | ^^ error: aborting due to previous error diff --git a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr index 91109a64566..5ac435bf011 100644 --- a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr +++ b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr @@ -1,7 +1,7 @@ error: unexpected token: `]` --> $DIR/exclusive_range_pattern_syntax_collision2.rs:5:15 | -LL | [_, 99..] => {}, //~ ERROR unexpected token: `]` +LL | [_, 99..] => {}, | ^^ error: aborting due to previous error diff --git a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr index 9c76a66c265..a09ba3562e0 100644 --- a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr +++ b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr @@ -1,7 +1,7 @@ error: expected one of `,` or `]`, found `9` --> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:12 | -LL | [..9, 99..100, _] => {}, //~ ERROR expected one of `,` or `]`, found `9` +LL | [..9, 99..100, _] => {}, | ^ expected one of `,` or `]` here error: aborting due to previous error diff --git a/src/test/ui/exhaustive_integer_patterns.stderr b/src/test/ui/exhaustive_integer_patterns.stderr index d9513710d44..82b0b484144 100644 --- a/src/test/ui/exhaustive_integer_patterns.stderr +++ b/src/test/ui/exhaustive_integer_patterns.stderr @@ -1,7 +1,7 @@ error: unreachable pattern --> $DIR/exhaustive_integer_patterns.rs:23:9 | -LL | 200 => {} //~ ERROR unreachable pattern +LL | 200 => {} | ^^^ | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![deny(unreachable_patterns)] error[E0004]: non-exhaustive patterns: `128u8..=255u8` not covered --> $DIR/exhaustive_integer_patterns.rs:28:11 | -LL | match x { //~ ERROR non-exhaustive patterns +LL | match x { | ^ pattern `128u8..=255u8` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -21,7 +21,7 @@ LL | match x { //~ ERROR non-exhaustive patterns error[E0004]: non-exhaustive patterns: `11u8..=19u8`, `31u8..=34u8`, `36u8..=69u8` and 1 more not covered --> $DIR/exhaustive_integer_patterns.rs:33:11 | -LL | match x { //~ ERROR non-exhaustive patterns +LL | match x { | ^ patterns `11u8..=19u8`, `31u8..=34u8`, `36u8..=69u8` and 1 more not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -29,13 +29,13 @@ LL | match x { //~ ERROR non-exhaustive patterns error: unreachable pattern --> $DIR/exhaustive_integer_patterns.rs:44:9 | -LL | -2..=20 => {} //~ ERROR unreachable pattern +LL | -2..=20 => {} | ^^^^^^^ error[E0004]: non-exhaustive patterns: `-128i8..=-8i8`, `-6i8`, `121i8..=124i8` and 1 more not covered --> $DIR/exhaustive_integer_patterns.rs:41:11 | -LL | match x { //~ ERROR non-exhaustive patterns +LL | match x { | ^ patterns `-128i8..=-8i8`, `-6i8`, `121i8..=124i8` and 1 more not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -43,7 +43,7 @@ LL | match x { //~ ERROR non-exhaustive patterns error[E0004]: non-exhaustive patterns: `-128i8` not covered --> $DIR/exhaustive_integer_patterns.rs:82:11 | -LL | match 0i8 { //~ ERROR non-exhaustive patterns +LL | match 0i8 { | ^^^ pattern `-128i8` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -51,7 +51,7 @@ LL | match 0i8 { //~ ERROR non-exhaustive patterns error[E0004]: non-exhaustive patterns: `0i16` not covered --> $DIR/exhaustive_integer_patterns.rs:90:11 | -LL | match 0i16 { //~ ERROR non-exhaustive patterns +LL | match 0i16 { | ^^^^ pattern `0i16` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -59,7 +59,7 @@ LL | match 0i16 { //~ ERROR non-exhaustive patterns error[E0004]: non-exhaustive patterns: `128u8..=255u8` not covered --> $DIR/exhaustive_integer_patterns.rs:108:11 | -LL | match 0u8 { //~ ERROR non-exhaustive patterns +LL | match 0u8 { | ^^^ pattern `128u8..=255u8` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -67,7 +67,7 @@ LL | match 0u8 { //~ ERROR non-exhaustive patterns error[E0004]: non-exhaustive patterns: `(0u8, Some(_))` and `(2u8..=255u8, Some(_))` not covered --> $DIR/exhaustive_integer_patterns.rs:120:11 | -LL | match (0u8, Some(())) { //~ ERROR non-exhaustive patterns +LL | match (0u8, Some(())) { | ^^^^^^^^^^^^^^^ patterns `(0u8, Some(_))` and `(2u8..=255u8, Some(_))` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -75,7 +75,7 @@ LL | match (0u8, Some(())) { //~ ERROR non-exhaustive patterns error[E0004]: non-exhaustive patterns: `(126u8..=127u8, false)` not covered --> $DIR/exhaustive_integer_patterns.rs:125:11 | -LL | match (0u8, true) { //~ ERROR non-exhaustive patterns +LL | match (0u8, true) { | ^^^^^^^^^^^ pattern `(126u8..=127u8, false)` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -83,7 +83,7 @@ LL | match (0u8, true) { //~ ERROR non-exhaustive patterns error[E0004]: non-exhaustive patterns: `340282366920938463463374607431768211455u128` not covered --> $DIR/exhaustive_integer_patterns.rs:145:11 | -LL | match 0u128 { //~ ERROR non-exhaustive patterns +LL | match 0u128 { | ^^^^^ pattern `340282366920938463463374607431768211455u128` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -91,7 +91,7 @@ LL | match 0u128 { //~ ERROR non-exhaustive patterns error[E0004]: non-exhaustive patterns: `5u128..=340282366920938463463374607431768211455u128` not covered --> $DIR/exhaustive_integer_patterns.rs:149:11 | -LL | match 0u128 { //~ ERROR non-exhaustive patterns +LL | match 0u128 { | ^^^^^ pattern `5u128..=340282366920938463463374607431768211455u128` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -99,7 +99,7 @@ LL | match 0u128 { //~ ERROR non-exhaustive patterns error[E0004]: non-exhaustive patterns: `0u128..=3u128` not covered --> $DIR/exhaustive_integer_patterns.rs:153:11 | -LL | match 0u128 { //~ ERROR non-exhaustive patterns +LL | match 0u128 { | ^^^^^ pattern `0u128..=3u128` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/existential_types/bound_reduction2.stderr b/src/test/ui/existential_types/bound_reduction2.stderr index f51f1c9a4e5..b8bad7db6b6 100644 --- a/src/test/ui/existential_types/bound_reduction2.stderr +++ b/src/test/ui/existential_types/bound_reduction2.stderr @@ -1,7 +1,7 @@ error: defining existential type use does not fully define existential type --> $DIR/bound_reduction2.rs:17:1 | -LL | / fn foo_desugared(_: T) -> Foo { //~ ERROR does not fully define +LL | / fn foo_desugared(_: T) -> Foo { LL | | () LL | | } | |_^ diff --git a/src/test/ui/existential_types/declared_but_never_defined.stderr b/src/test/ui/existential_types/declared_but_never_defined.stderr index 681b1cf0fa7..7294a074db6 100644 --- a/src/test/ui/existential_types/declared_but_never_defined.stderr +++ b/src/test/ui/existential_types/declared_but_never_defined.stderr @@ -1,7 +1,7 @@ error: could not find defining uses --> $DIR/declared_but_never_defined.rs:6:1 | -LL | existential type Bar: std::fmt::Debug; //~ ERROR could not find defining uses +LL | existential type Bar: std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/existential_types/declared_but_not_defined_in_scope.stderr b/src/test/ui/existential_types/declared_but_not_defined_in_scope.stderr index e9cc92d78ea..a72709f7194 100644 --- a/src/test/ui/existential_types/declared_but_not_defined_in_scope.stderr +++ b/src/test/ui/existential_types/declared_but_not_defined_in_scope.stderr @@ -1,7 +1,7 @@ error: could not find defining uses --> $DIR/declared_but_not_defined_in_scope.rs:7:5 | -LL | pub existential type Boo: ::std::fmt::Debug; //~ ERROR could not find defining uses +LL | pub existential type Boo: ::std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/existential_types/different_defining_uses.stderr b/src/test/ui/existential_types/different_defining_uses.stderr index 3f9ed96400b..fddba584798 100644 --- a/src/test/ui/existential_types/different_defining_uses.stderr +++ b/src/test/ui/existential_types/different_defining_uses.stderr @@ -1,7 +1,7 @@ error: concrete type differs from previous defining existential type use --> $DIR/different_defining_uses.rs:12:1 | -LL | / fn bar() -> Foo { //~ ERROR concrete type differs from previous +LL | / fn bar() -> Foo { LL | | 42i32 LL | | } | |_^ expected `&'static str`, got `i32` diff --git a/src/test/ui/existential_types/different_defining_uses_never_type.stderr b/src/test/ui/existential_types/different_defining_uses_never_type.stderr index e29256a5014..14b7a810be2 100644 --- a/src/test/ui/existential_types/different_defining_uses_never_type.stderr +++ b/src/test/ui/existential_types/different_defining_uses_never_type.stderr @@ -1,7 +1,7 @@ error: concrete type differs from previous defining existential type use --> $DIR/different_defining_uses_never_type.rs:12:1 | -LL | / fn bar() -> Foo { //~ ERROR concrete type differs from previous +LL | / fn bar() -> Foo { LL | | panic!() LL | | } | |_^ expected `&'static str`, got `()` @@ -17,7 +17,7 @@ LL | | } error: concrete type differs from previous defining existential type use --> $DIR/different_defining_uses_never_type.rs:16:1 | -LL | / fn boo() -> Foo { //~ ERROR concrete type differs from previous +LL | / fn boo() -> Foo { LL | | loop {} LL | | } | |_^ expected `&'static str`, got `()` diff --git a/src/test/ui/existential_types/generic_different_defining_uses.stderr b/src/test/ui/existential_types/generic_different_defining_uses.stderr index 3f129658b8f..e5b1539ccbb 100644 --- a/src/test/ui/existential_types/generic_different_defining_uses.stderr +++ b/src/test/ui/existential_types/generic_different_defining_uses.stderr @@ -1,7 +1,7 @@ error: concrete type differs from previous defining existential type use --> $DIR/generic_different_defining_uses.rs:11:1 | -LL | / fn my_iter2(t: T) -> MyIter { //~ ERROR concrete type differs from previous +LL | / fn my_iter2(t: T) -> MyIter { LL | | Some(t).into_iter() LL | | } | |_^ expected `std::iter::Once`, got `std::option::IntoIter` diff --git a/src/test/ui/existential_types/generic_duplicate_lifetime_param.stderr b/src/test/ui/existential_types/generic_duplicate_lifetime_param.stderr index 7b09d3ceab0..29bd252babe 100644 --- a/src/test/ui/existential_types/generic_duplicate_lifetime_param.stderr +++ b/src/test/ui/existential_types/generic_duplicate_lifetime_param.stderr @@ -1,7 +1,7 @@ error: non-defining existential type use in defining scope --> $DIR/generic_duplicate_lifetime_param.rs:7:1 | -LL | / fn one<'a>(t: &'a ()) -> Two<'a, 'a> { //~ ERROR non-defining existential type use +LL | / fn one<'a>(t: &'a ()) -> Two<'a, 'a> { LL | | t LL | | } | |_^ diff --git a/src/test/ui/existential_types/generic_duplicate_param_use.stderr b/src/test/ui/existential_types/generic_duplicate_param_use.stderr index d4deda999da..a3827943b6d 100644 --- a/src/test/ui/existential_types/generic_duplicate_param_use.stderr +++ b/src/test/ui/existential_types/generic_duplicate_param_use.stderr @@ -2,7 +2,7 @@ error: defining existential type use restricts existential type by using the gen --> $DIR/generic_duplicate_param_use.rs:11:1 | LL | / fn one(t: T) -> Two { -LL | | //~^ ERROR defining existential type use restricts existential type +LL | | LL | | t LL | | } | |_^ diff --git a/src/test/ui/existential_types/generic_duplicate_param_use2.stderr b/src/test/ui/existential_types/generic_duplicate_param_use2.stderr index 0a8be3218c7..74f2802449a 100644 --- a/src/test/ui/existential_types/generic_duplicate_param_use2.stderr +++ b/src/test/ui/existential_types/generic_duplicate_param_use2.stderr @@ -2,7 +2,7 @@ error: defining existential type use restricts existential type by using the gen --> $DIR/generic_duplicate_param_use2.rs:10:1 | LL | / fn one(t: T) -> Two { -LL | | //~^ defining existential type use restricts existential type +LL | | LL | | t LL | | } | |_^ diff --git a/src/test/ui/existential_types/generic_duplicate_param_use3.stderr b/src/test/ui/existential_types/generic_duplicate_param_use3.stderr index 1c96c15a769..22d5467c363 100644 --- a/src/test/ui/existential_types/generic_duplicate_param_use3.stderr +++ b/src/test/ui/existential_types/generic_duplicate_param_use3.stderr @@ -2,7 +2,7 @@ error: defining existential type use restricts existential type by using the gen --> $DIR/generic_duplicate_param_use3.rs:10:1 | LL | / fn one(t: T) -> Two { -LL | | //~^ defining existential type use restricts existential type +LL | | LL | | t LL | | } | |_^ @@ -11,7 +11,7 @@ error: concrete type's generic parameters differ from previous defining use --> $DIR/generic_duplicate_param_use3.rs:19:1 | LL | / fn three(_: T, u: U) -> Two { -LL | | //~^ concrete type's generic parameters differ from previous defining use +LL | | LL | | u LL | | } | |_^ expected [`T`], got [`U`] diff --git a/src/test/ui/existential_types/generic_duplicate_param_use4.stderr b/src/test/ui/existential_types/generic_duplicate_param_use4.stderr index 24b1caf7c1b..d7e695578d3 100644 --- a/src/test/ui/existential_types/generic_duplicate_param_use4.stderr +++ b/src/test/ui/existential_types/generic_duplicate_param_use4.stderr @@ -2,7 +2,7 @@ error: defining existential type use restricts existential type by using the gen --> $DIR/generic_duplicate_param_use4.rs:10:1 | LL | / fn one(t: T) -> Two { -LL | | //~^ ERROR defining existential type use restricts existential type +LL | | LL | | t LL | | } | |_^ diff --git a/src/test/ui/existential_types/generic_duplicate_param_use5.stderr b/src/test/ui/existential_types/generic_duplicate_param_use5.stderr index 166623801c2..cf4535d6c2c 100644 --- a/src/test/ui/existential_types/generic_duplicate_param_use5.stderr +++ b/src/test/ui/existential_types/generic_duplicate_param_use5.stderr @@ -2,7 +2,7 @@ error: concrete type differs from previous defining existential type use --> $DIR/generic_duplicate_param_use5.rs:14:1 | LL | / fn three(t: T, u: U) -> Two { -LL | | //~^ concrete type differs from previous +LL | | LL | | (u, t) LL | | } | |_^ expected `(T, U)`, got `(U, T)` diff --git a/src/test/ui/existential_types/generic_duplicate_param_use6.stderr b/src/test/ui/existential_types/generic_duplicate_param_use6.stderr index da49a83be1f..1f767dacea8 100644 --- a/src/test/ui/existential_types/generic_duplicate_param_use6.stderr +++ b/src/test/ui/existential_types/generic_duplicate_param_use6.stderr @@ -2,7 +2,7 @@ error: concrete type differs from previous defining existential type use --> $DIR/generic_duplicate_param_use6.rs:14:1 | LL | / fn three(t: T, u: U) -> Two { -LL | | //~^ concrete type differs from previous +LL | | LL | | (u, t) LL | | } | |_^ expected `(T, T)`, got `(U, T)` diff --git a/src/test/ui/existential_types/generic_duplicate_param_use8.stderr b/src/test/ui/existential_types/generic_duplicate_param_use8.stderr index 80c7441c857..58f4f97b241 100644 --- a/src/test/ui/existential_types/generic_duplicate_param_use8.stderr +++ b/src/test/ui/existential_types/generic_duplicate_param_use8.stderr @@ -2,7 +2,7 @@ error: concrete type differs from previous defining existential type use --> $DIR/generic_duplicate_param_use8.rs:13:1 | LL | / fn three(_: T, u: U) -> Two { -LL | | //~^ concrete type differs from previous +LL | | LL | | (u, 4u32) LL | | } | |_^ expected `(T, u32)`, got `(U, u32)` diff --git a/src/test/ui/existential_types/generic_duplicate_param_use9.stderr b/src/test/ui/existential_types/generic_duplicate_param_use9.stderr index a3ce480d66d..fe4ae6cfdd0 100644 --- a/src/test/ui/existential_types/generic_duplicate_param_use9.stderr +++ b/src/test/ui/existential_types/generic_duplicate_param_use9.stderr @@ -2,7 +2,7 @@ error: concrete type differs from previous defining existential type use --> $DIR/generic_duplicate_param_use9.rs:18:1 | LL | / fn three(t: T, u: U) -> Two { -LL | | (t, u, 42) //~^ ERROR concrete type differs from previous +LL | | (t, u, 42) LL | | } | |_^ expected `(A, B, ::Bar)`, got `(A, B, i32)` | diff --git a/src/test/ui/existential_types/generic_nondefining_use.stderr b/src/test/ui/existential_types/generic_nondefining_use.stderr index 8dd88006be9..ef579260f06 100644 --- a/src/test/ui/existential_types/generic_nondefining_use.stderr +++ b/src/test/ui/existential_types/generic_nondefining_use.stderr @@ -1,7 +1,7 @@ error: defining existential type use does not fully define existential type --> $DIR/generic_nondefining_use.rs:9:1 | -LL | / fn cmp() -> Cmp { //~ ERROR defining existential type use does not fully define +LL | / fn cmp() -> Cmp { LL | | 5u32 LL | | } | |_^ diff --git a/src/test/ui/existential_types/generic_not_used.stderr b/src/test/ui/existential_types/generic_not_used.stderr index b22cffeea28..1ae4ab65929 100644 --- a/src/test/ui/existential_types/generic_not_used.stderr +++ b/src/test/ui/existential_types/generic_not_used.stderr @@ -3,7 +3,7 @@ error: type parameter `V` is part of concrete type but not used in parameter lis | LL | fn wrong_generic(_: U, v: V) -> WrongGeneric { | _________________________________________________________________________^ -LL | | //~^ ERROR type parameter `V` is part of concrete type but not used in parameter list +LL | | LL | | v LL | | } | |_^ diff --git a/src/test/ui/existential_types/generic_type_does_not_live_long_enough.stderr b/src/test/ui/existential_types/generic_type_does_not_live_long_enough.stderr index d9bb37328bd..e3e5481a96c 100644 --- a/src/test/ui/existential_types/generic_type_does_not_live_long_enough.stderr +++ b/src/test/ui/existential_types/generic_type_does_not_live_long_enough.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/generic_type_does_not_live_long_enough.rs:6:18 | -LL | let z: i32 = x; //~ ERROR mismatched types +LL | let z: i32 = x; | ^ expected i32, found opaque type | = note: expected type `i32` diff --git a/src/test/ui/existential_types/generic_underconstrained.stderr b/src/test/ui/existential_types/generic_underconstrained.stderr index 57924e0ce21..8551a939e8e 100644 --- a/src/test/ui/existential_types/generic_underconstrained.stderr +++ b/src/test/ui/existential_types/generic_underconstrained.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `T: Trait` is not satisfied --> $DIR/generic_underconstrained.rs:6:1 | -LL | existential type Underconstrained: 'static; //~ ERROR the trait bound `T: Trait` +LL | existential type Underconstrained: 'static; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `T` | = help: consider adding a `where T: Trait` bound diff --git a/src/test/ui/existential_types/never_reveal_concrete_type.stderr b/src/test/ui/existential_types/never_reveal_concrete_type.stderr index 33a71fc4356..81b6584ae90 100644 --- a/src/test/ui/existential_types/never_reveal_concrete_type.stderr +++ b/src/test/ui/existential_types/never_reveal_concrete_type.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/never_reveal_concrete_type.rs:13:27 | -LL | let _: &'static str = x; //~ mismatched types +LL | let _: &'static str = x; | ^ expected reference, found opaque type | = note: expected type `&'static str` @@ -10,7 +10,7 @@ LL | let _: &'static str = x; //~ mismatched types error[E0605]: non-primitive cast: `NoReveal` as `&'static str` --> $DIR/never_reveal_concrete_type.rs:14:13 | -LL | let _ = x as &'static str; //~ non-primitive cast +LL | let _ = x as &'static str; | ^^^^^^^^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait diff --git a/src/test/ui/existential_types/no_inferrable_concrete_type.stderr b/src/test/ui/existential_types/no_inferrable_concrete_type.stderr index fab61bd9ed0..4605332ef5b 100644 --- a/src/test/ui/existential_types/no_inferrable_concrete_type.stderr +++ b/src/test/ui/existential_types/no_inferrable_concrete_type.stderr @@ -1,7 +1,7 @@ error[E0391]: cycle detected when processing `Foo` --> $DIR/no_inferrable_concrete_type.rs:6:1 | -LL | existential type Foo: Copy; //~ cycle detected +LL | existential type Foo: Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: ...which requires processing `bar`... @@ -15,7 +15,7 @@ note: cycle used when collecting item types in top-level module | LL | / #![feature(existential_type)] LL | | -LL | | existential type Foo: Copy; //~ cycle detected +LL | | existential type Foo: Copy; LL | | ... | LL | | let _: Foo = std::mem::transmute(0u8); diff --git a/src/test/ui/existential_types/no_revealing_outside_defining_module.stderr b/src/test/ui/existential_types/no_revealing_outside_defining_module.stderr index 4ffce58f8de..5e5826978fc 100644 --- a/src/test/ui/existential_types/no_revealing_outside_defining_module.stderr +++ b/src/test/ui/existential_types/no_revealing_outside_defining_module.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/no_revealing_outside_defining_module.rs:15:19 | -LL | let _: &str = bomp(); //~ ERROR mismatched types +LL | let _: &str = bomp(); | ^^^^^^ expected &str, found opaque type | = note: expected type `&str` @@ -12,7 +12,7 @@ error[E0308]: mismatched types | LL | fn bomp() -> boo::Boo { | -------- expected `Boo` because of return type -LL | "" //~ ERROR mismatched types +LL | "" | ^^ expected opaque type, found reference | = note: expected type `Boo` diff --git a/src/test/ui/existential_types/not_a_defining_use.stderr b/src/test/ui/existential_types/not_a_defining_use.stderr index 288a32fc14e..f315811cdb4 100644 --- a/src/test/ui/existential_types/not_a_defining_use.stderr +++ b/src/test/ui/existential_types/not_a_defining_use.stderr @@ -2,7 +2,7 @@ error: defining existential type use does not fully define existential type --> $DIR/not_a_defining_use.rs:9:1 | LL | / fn two(t: T) -> Two { -LL | | //~^ ERROR defining existential type use does not fully define existential type +LL | | LL | | (t, 4i8) LL | | } | |_^ @@ -10,7 +10,7 @@ LL | | } error: concrete type differs from previous defining existential type use --> $DIR/not_a_defining_use.rs:30:1 | -LL | / fn four(t: T) -> Two { //~ concrete type differs from previous +LL | / fn four(t: T) -> Two { LL | | (t, ::FOO) LL | | } | |_^ expected `(T, i8)`, got `(T, ::Blub)` diff --git a/src/test/ui/existential_types/not_well_formed.stderr b/src/test/ui/existential_types/not_well_formed.stderr index 17ea57805d2..05f84d57623 100644 --- a/src/test/ui/existential_types/not_well_formed.stderr +++ b/src/test/ui/existential_types/not_well_formed.stderr @@ -1,7 +1,7 @@ error[E0220]: associated type `Assoc` not found for `V` --> $DIR/not_well_formed.rs:10:32 | -LL | existential type Foo: Trait; //~ associated type `Assoc` not found for `V` +LL | existential type Foo: Trait; | ^^^^^^^^ associated type `Assoc` not found error: aborting due to previous error diff --git a/src/test/ui/explicit/explicit-call-to-dtor.stderr b/src/test/ui/explicit/explicit-call-to-dtor.stderr index db09b23bf26..cbbe967179e 100644 --- a/src/test/ui/explicit/explicit-call-to-dtor.stderr +++ b/src/test/ui/explicit/explicit-call-to-dtor.stderr @@ -1,7 +1,7 @@ error[E0040]: explicit use of destructor method --> $DIR/explicit-call-to-dtor.rs:13:7 | -LL | x.drop(); //~ ERROR explicit use of destructor method +LL | x.drop(); | ^^^^ explicit destructor calls not allowed error: aborting due to previous error diff --git a/src/test/ui/explicit/explicit-call-to-supertrait-dtor.stderr b/src/test/ui/explicit/explicit-call-to-supertrait-dtor.stderr index dfd122b3ea4..0b302e30b64 100644 --- a/src/test/ui/explicit/explicit-call-to-supertrait-dtor.stderr +++ b/src/test/ui/explicit/explicit-call-to-supertrait-dtor.stderr @@ -1,7 +1,7 @@ error[E0040]: explicit use of destructor method --> $DIR/explicit-call-to-supertrait-dtor.rs:17:14 | -LL | self.drop(); //~ ERROR explicit use of destructor method +LL | self.drop(); | ^^^^ explicit destructor calls not allowed error: aborting due to previous error diff --git a/src/test/ui/explore-issue-38412.stderr b/src/test/ui/explore-issue-38412.stderr index e3ce6c1317f..5e5d952bcec 100644 --- a/src/test/ui/explore-issue-38412.stderr +++ b/src/test/ui/explore-issue-38412.stderr @@ -9,7 +9,7 @@ LL | let Record { a_stable_pub: _, a_unstable_declared_pub: _, a_unstable_un error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) --> $DIR/explore-issue-38412.rs:30:5 | -LL | r.a_unstable_undeclared_pub; //~ ERROR use of unstable library feature +LL | r.a_unstable_undeclared_pub; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_undeclared)] to the crate attributes to enable @@ -17,25 +17,25 @@ LL | r.a_unstable_undeclared_pub; //~ ERROR use of unstable library feature error[E0616]: field `b_crate` of struct `pub_and_stability::Record` is private --> $DIR/explore-issue-38412.rs:31:5 | -LL | r.b_crate; //~ ERROR is private +LL | r.b_crate; | ^^^^^^^^^ error[E0616]: field `c_mod` of struct `pub_and_stability::Record` is private --> $DIR/explore-issue-38412.rs:32:5 | -LL | r.c_mod; //~ ERROR is private +LL | r.c_mod; | ^^^^^^^ error[E0616]: field `d_priv` of struct `pub_and_stability::Record` is private --> $DIR/explore-issue-38412.rs:33:5 | -LL | r.d_priv; //~ ERROR is private +LL | r.d_priv; | ^^^^^^^^ error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) --> $DIR/explore-issue-38412.rs:37:5 | -LL | t.2; //~ ERROR use of unstable library feature +LL | t.2; | ^^^ | = help: add #![feature(unstable_undeclared)] to the crate attributes to enable @@ -43,25 +43,25 @@ LL | t.2; //~ ERROR use of unstable library feature error[E0616]: field `3` of struct `pub_and_stability::Tuple` is private --> $DIR/explore-issue-38412.rs:38:5 | -LL | t.3; //~ ERROR is private +LL | t.3; | ^^^ error[E0616]: field `4` of struct `pub_and_stability::Tuple` is private --> $DIR/explore-issue-38412.rs:39:5 | -LL | t.4; //~ ERROR is private +LL | t.4; | ^^^ error[E0616]: field `5` of struct `pub_and_stability::Tuple` is private --> $DIR/explore-issue-38412.rs:40:5 | -LL | t.5; //~ ERROR is private +LL | t.5; | ^^^ error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) --> $DIR/explore-issue-38412.rs:44:7 | -LL | r.unstable_undeclared_trait_method(); //~ ERROR use of unstable library feature +LL | r.unstable_undeclared_trait_method(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_undeclared)] to the crate attributes to enable @@ -69,7 +69,7 @@ LL | r.unstable_undeclared_trait_method(); //~ ERROR use of unstable library error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) --> $DIR/explore-issue-38412.rs:48:7 | -LL | r.unstable_undeclared(); //~ ERROR use of unstable library feature +LL | r.unstable_undeclared(); | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_undeclared)] to the crate attributes to enable @@ -77,25 +77,25 @@ LL | r.unstable_undeclared(); //~ ERROR use of unstable library error[E0624]: method `pub_crate` is private --> $DIR/explore-issue-38412.rs:50:7 | -LL | r.pub_crate(); //~ ERROR `pub_crate` is private +LL | r.pub_crate(); | ^^^^^^^^^ error[E0624]: method `pub_mod` is private --> $DIR/explore-issue-38412.rs:51:7 | -LL | r.pub_mod(); //~ ERROR `pub_mod` is private +LL | r.pub_mod(); | ^^^^^^^ error[E0624]: method `private` is private --> $DIR/explore-issue-38412.rs:52:7 | -LL | r.private(); //~ ERROR `private` is private +LL | r.private(); | ^^^^^^^ error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) --> $DIR/explore-issue-38412.rs:57:7 | -LL | t.unstable_undeclared_trait_method(); //~ ERROR use of unstable library feature +LL | t.unstable_undeclared_trait_method(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_undeclared)] to the crate attributes to enable @@ -103,7 +103,7 @@ LL | t.unstable_undeclared_trait_method(); //~ ERROR use of unstable library error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) --> $DIR/explore-issue-38412.rs:61:7 | -LL | t.unstable_undeclared(); //~ ERROR use of unstable library feature +LL | t.unstable_undeclared(); | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_undeclared)] to the crate attributes to enable @@ -111,19 +111,19 @@ LL | t.unstable_undeclared(); //~ ERROR use of unstable library error[E0624]: method `pub_crate` is private --> $DIR/explore-issue-38412.rs:63:7 | -LL | t.pub_crate(); //~ ERROR `pub_crate` is private +LL | t.pub_crate(); | ^^^^^^^^^ error[E0624]: method `pub_mod` is private --> $DIR/explore-issue-38412.rs:64:7 | -LL | t.pub_mod(); //~ ERROR `pub_mod` is private +LL | t.pub_mod(); | ^^^^^^^ error[E0624]: method `private` is private --> $DIR/explore-issue-38412.rs:65:7 | -LL | t.private(); //~ ERROR `private` is private +LL | t.private(); | ^^^^^^^ error: aborting due to 19 previous errors diff --git a/src/test/ui/export-fully-qualified.stderr b/src/test/ui/export-fully-qualified.stderr index dd7e3219c76..c2ec1600868 100644 --- a/src/test/ui/export-fully-qualified.stderr +++ b/src/test/ui/export-fully-qualified.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve: use of undeclared type or module `foo` --> $DIR/export-fully-qualified.rs:6:20 | -LL | pub fn bar() { foo::baz(); } //~ ERROR failed to resolve: use of undeclared type or module `foo` +LL | pub fn bar() { foo::baz(); } | ^^^ use of undeclared type or module `foo` error: aborting due to previous error diff --git a/src/test/ui/export-tag-variant.stderr b/src/test/ui/export-tag-variant.stderr index eb202b3b31b..b5a2c12c436 100644 --- a/src/test/ui/export-tag-variant.stderr +++ b/src/test/ui/export-tag-variant.stderr @@ -1,7 +1,7 @@ error[E0603]: enum `Y` is private --> $DIR/export-tag-variant.rs:7:26 | -LL | fn main() { let z = foo::Y::Y1; } //~ ERROR: enum `Y` is private +LL | fn main() { let z = foo::Y::Y1; } | ^ error: aborting due to previous error diff --git a/src/test/ui/export.stderr b/src/test/ui/export.stderr index ff7763bbd89..76ec91e181d 100644 --- a/src/test/ui/export.stderr +++ b/src/test/ui/export.stderr @@ -25,7 +25,7 @@ LL | fn z(y: isize) { log(debug, y); } error[E0603]: function `z` is private --> $DIR/export.rs:10:18 | -LL | fn main() { foo::z(10); } //~ ERROR function `z` is private +LL | fn main() { foo::z(10); } | ^ error: aborting due to 5 previous errors diff --git a/src/test/ui/export2.stderr b/src/test/ui/export2.stderr index 6233c6d074e..e0cd4404d37 100644 --- a/src/test/ui/export2.stderr +++ b/src/test/ui/export2.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve: use of undeclared type or module `bar` --> $DIR/export2.rs:2:18 | -LL | pub fn x() { bar::x(); } //~ ERROR failed to resolve: use of undeclared type or module `bar` +LL | pub fn x() { bar::x(); } | ^^^ use of undeclared type or module `bar` error: aborting due to previous error diff --git a/src/test/ui/expr_attr_paren_order.stderr b/src/test/ui/expr_attr_paren_order.stderr index 8155514191c..89f615f53dd 100644 --- a/src/test/ui/expr_attr_paren_order.stderr +++ b/src/test/ui/expr_attr_paren_order.stderr @@ -1,7 +1,7 @@ error: variable `X` should have a snake case name --> $DIR/expr_attr_paren_order.rs:19:17 | -LL | let X = 0; //~ ERROR snake case name +LL | let X = 0; | ^ help: convert the identifier to snake case: `x` | note: lint level defined here diff --git a/src/test/ui/extenv/extenv-arg-2-not-string-literal.stderr b/src/test/ui/extenv/extenv-arg-2-not-string-literal.stderr index 92c04f9fe8a..258e2b347fb 100644 --- a/src/test/ui/extenv/extenv-arg-2-not-string-literal.stderr +++ b/src/test/ui/extenv/extenv-arg-2-not-string-literal.stderr @@ -1,7 +1,7 @@ error: expected string literal --> $DIR/extenv-arg-2-not-string-literal.rs:1:25 | -LL | fn main() { env!("one", 10); } //~ ERROR: expected string literal +LL | fn main() { env!("one", 10); } | ^^ error: aborting due to previous error diff --git a/src/test/ui/extenv/extenv-no-args.stderr b/src/test/ui/extenv/extenv-no-args.stderr index 7ae8a6f1858..acdde84afa4 100644 --- a/src/test/ui/extenv/extenv-no-args.stderr +++ b/src/test/ui/extenv/extenv-no-args.stderr @@ -1,7 +1,7 @@ error: env! takes 1 or 2 arguments --> $DIR/extenv-no-args.rs:1:13 | -LL | fn main() { env!(); } //~ ERROR: env! takes 1 or 2 arguments +LL | fn main() { env!(); } | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/extenv/extenv-not-defined-custom.stderr b/src/test/ui/extenv/extenv-not-defined-custom.stderr index 34e5b7f9f23..523982dd019 100644 --- a/src/test/ui/extenv/extenv-not-defined-custom.stderr +++ b/src/test/ui/extenv/extenv-not-defined-custom.stderr @@ -1,7 +1,7 @@ error: my error message --> $DIR/extenv-not-defined-custom.rs:1:13 | -LL | fn main() { env!("__HOPEFULLY_NOT_DEFINED__", "my error message"); } //~ ERROR: my error message +LL | fn main() { env!("__HOPEFULLY_NOT_DEFINED__", "my error message"); } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/extenv/extenv-not-string-literal.stderr b/src/test/ui/extenv/extenv-not-string-literal.stderr index 66645b24a49..342a9f7096e 100644 --- a/src/test/ui/extenv/extenv-not-string-literal.stderr +++ b/src/test/ui/extenv/extenv-not-string-literal.stderr @@ -1,7 +1,7 @@ error: expected string literal --> $DIR/extenv-not-string-literal.rs:1:18 | -LL | fn main() { env!(10, "two"); } //~ ERROR: expected string literal +LL | fn main() { env!(10, "two"); } | ^^ error: aborting due to previous error diff --git a/src/test/ui/extenv/extenv-too-many-args.stderr b/src/test/ui/extenv/extenv-too-many-args.stderr index 43695d88eaf..3351da0d547 100644 --- a/src/test/ui/extenv/extenv-too-many-args.stderr +++ b/src/test/ui/extenv/extenv-too-many-args.stderr @@ -1,7 +1,7 @@ error: env! takes 1 or 2 arguments --> $DIR/extenv-too-many-args.rs:1:13 | -LL | fn main() { env!("one", "two", "three"); } //~ ERROR: env! takes 1 or 2 arguments +LL | fn main() { env!("one", "two", "three"); } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/extenv/issue-55897.stderr b/src/test/ui/extenv/issue-55897.stderr index 603b29aa989..9f6570ab2a0 100644 --- a/src/test/ui/extenv/issue-55897.stderr +++ b/src/test/ui/extenv/issue-55897.stderr @@ -7,7 +7,7 @@ LL | include!(concat!(env!("NON_EXISTENT"), "/data.rs")); error[E0432]: unresolved import `prelude` --> $DIR/issue-55897.rs:1:5 | -LL | use prelude::*; //~ ERROR unresolved import `prelude` +LL | use prelude::*; | ^^^^^^^ | | | unresolved import diff --git a/src/test/ui/extern/extern-const.stderr b/src/test/ui/extern/extern-const.stderr index 7ebaec0368e..77406be2095 100644 --- a/src/test/ui/extern/extern-const.stderr +++ b/src/test/ui/extern/extern-const.stderr @@ -1,7 +1,7 @@ error: extern items cannot be `const` --> $DIR/extern-const.rs:15:5 | -LL | const rust_dbg_static_mut: libc::c_int; //~ ERROR extern items cannot be `const` +LL | const rust_dbg_static_mut: libc::c_int; | ^^^^^ help: try using a static value: `static` error: aborting due to previous error diff --git a/src/test/ui/extern/extern-crate-rename.stderr b/src/test/ui/extern/extern-crate-rename.stderr index 204e7dd64df..787c11f2a81 100644 --- a/src/test/ui/extern/extern-crate-rename.stderr +++ b/src/test/ui/extern/extern-crate-rename.stderr @@ -3,13 +3,13 @@ error[E0259]: the name `m1` is defined multiple times | LL | extern crate m1; | ---------------- previous import of the extern crate `m1` here -LL | extern crate m2 as m1; //~ ERROR is defined multiple times +LL | extern crate m2 as m1; | ^^^^^^^^^^^^^^^^^^^^^^ `m1` reimported here | = note: `m1` must be defined only once in the type namespace of this module help: you can use `as` to change the binding name of the import | -LL | extern crate m2 as other_m1; //~ ERROR is defined multiple times +LL | extern crate m2 as other_m1; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/extern/extern-crate-visibility.stderr b/src/test/ui/extern/extern-crate-visibility.stderr index 8baac1a902b..8bc9f9a67e7 100644 --- a/src/test/ui/extern/extern-crate-visibility.stderr +++ b/src/test/ui/extern/extern-crate-visibility.stderr @@ -1,13 +1,13 @@ error[E0603]: extern crate `core` is private --> $DIR/extern-crate-visibility.rs:6:10 | -LL | use foo::core::cell; //~ ERROR extern crate `core` is private +LL | use foo::core::cell; | ^^^^ error[E0603]: extern crate `core` is private --> $DIR/extern-crate-visibility.rs:9:10 | -LL | foo::core::cell::Cell::new(0); //~ ERROR extern crate `core` is private +LL | foo::core::cell::Cell::new(0); | ^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/extern/extern-macro.stderr b/src/test/ui/extern/extern-macro.stderr index d70b6ef79ea..5b7a720736a 100644 --- a/src/test/ui/extern/extern-macro.stderr +++ b/src/test/ui/extern/extern-macro.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve: partially resolved path in a macro --> $DIR/extern-macro.rs:5:13 | -LL | let _ = Foo::bar!(); //~ ERROR failed to resolve: partially resolved path in a macro +LL | let _ = Foo::bar!(); | ^^^^^^^^ partially resolved path in a macro error: aborting due to previous error diff --git a/src/test/ui/extern/extern-main-fn.stderr b/src/test/ui/extern/extern-main-fn.stderr index f2134701dee..14f064060a6 100644 --- a/src/test/ui/extern/extern-main-fn.stderr +++ b/src/test/ui/extern/extern-main-fn.stderr @@ -1,7 +1,7 @@ error[E0580]: main function has wrong type --> $DIR/extern-main-fn.rs:1:1 | -LL | extern fn main() {} //~ ERROR: main function has wrong type [E0580] +LL | extern fn main() {} | ^^^^^^^^^^^^^^^^ expected "Rust" fn, found "C" fn | = note: expected type `fn()` diff --git a/src/test/ui/extern/extern-types-distinct-types.stderr b/src/test/ui/extern/extern-types-distinct-types.stderr index b7b6f2cf04a..eb632ee395f 100644 --- a/src/test/ui/extern/extern-types-distinct-types.stderr +++ b/src/test/ui/extern/extern-types-distinct-types.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/extern-types-distinct-types.rs:9:5 | -LL | r //~ ERROR mismatched types +LL | r | ^ expected extern type `B`, found extern type `A` | = note: expected type `&B` diff --git a/src/test/ui/extoption_env-no-args.stderr b/src/test/ui/extoption_env-no-args.stderr index 34fe289cd98..386d517a446 100644 --- a/src/test/ui/extoption_env-no-args.stderr +++ b/src/test/ui/extoption_env-no-args.stderr @@ -1,7 +1,7 @@ error: option_env! takes 1 argument --> $DIR/extoption_env-no-args.rs:1:13 | -LL | fn main() { option_env!(); } //~ ERROR: option_env! takes 1 argument +LL | fn main() { option_env!(); } | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/extoption_env-not-string-literal.stderr b/src/test/ui/extoption_env-not-string-literal.stderr index 8c97b57e0ab..272751916f5 100644 --- a/src/test/ui/extoption_env-not-string-literal.stderr +++ b/src/test/ui/extoption_env-not-string-literal.stderr @@ -1,7 +1,7 @@ error: argument must be a string literal --> $DIR/extoption_env-not-string-literal.rs:1:25 | -LL | fn main() { option_env!(10); } //~ ERROR: argument must be a string literal +LL | fn main() { option_env!(10); } | ^^ error: aborting due to previous error diff --git a/src/test/ui/extoption_env-too-many-args.stderr b/src/test/ui/extoption_env-too-many-args.stderr index 6b5ade6daef..2ec55947032 100644 --- a/src/test/ui/extoption_env-too-many-args.stderr +++ b/src/test/ui/extoption_env-too-many-args.stderr @@ -1,7 +1,7 @@ error: option_env! takes 1 argument --> $DIR/extoption_env-too-many-args.rs:1:13 | -LL | fn main() { option_env!("one", "two"); } //~ ERROR: option_env! takes 1 argument +LL | fn main() { option_env!("one", "two"); } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/fail-no-dead-code-core.stderr b/src/test/ui/fail-no-dead-code-core.stderr index b78aed45683..2540242f9f6 100644 --- a/src/test/ui/fail-no-dead-code-core.stderr +++ b/src/test/ui/fail-no-dead-code-core.stderr @@ -1,7 +1,7 @@ error: function is never used: `foo` --> $DIR/fail-no-dead-code-core.rs:7:1 | -LL | fn foo() { //~ ERROR function is never used +LL | fn foo() { | ^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/fail-no-dead-code.stderr b/src/test/ui/fail-no-dead-code.stderr index a4358295931..8babcffaa8d 100644 --- a/src/test/ui/fail-no-dead-code.stderr +++ b/src/test/ui/fail-no-dead-code.stderr @@ -1,7 +1,7 @@ error: function is never used: `foo` --> $DIR/fail-no-dead-code.rs:4:1 | -LL | fn foo() { //~ ERROR function is never used +LL | fn foo() { | ^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/fail-simple.stderr b/src/test/ui/fail-simple.stderr index 31be4e2c87a..26ed918e94d 100644 --- a/src/test/ui/fail-simple.stderr +++ b/src/test/ui/fail-simple.stderr @@ -1,7 +1,7 @@ error: no rules expected the token `@` --> $DIR/fail-simple.rs:2:12 | -LL | panic!(@); //~ ERROR no rules expected the token `@` +LL | panic!(@); | ^ no rules expected this token in macro call error: aborting due to previous error diff --git a/src/test/ui/fat-ptr-cast.stderr b/src/test/ui/fat-ptr-cast.stderr index 936cdc559bd..fb160242393 100644 --- a/src/test/ui/fat-ptr-cast.stderr +++ b/src/test/ui/fat-ptr-cast.stderr @@ -1,7 +1,7 @@ error[E0606]: casting `&[i32]` as `usize` is invalid --> $DIR/fat-ptr-cast.rs:10:5 | -LL | a as usize; //~ ERROR casting +LL | a as usize; | ^^^^^^^^^^ | = help: cast through a raw pointer first @@ -9,7 +9,7 @@ LL | a as usize; //~ ERROR casting error[E0606]: casting `&[i32]` as `isize` is invalid --> $DIR/fat-ptr-cast.rs:11:5 | -LL | a as isize; //~ ERROR casting +LL | a as isize; | ^^^^^^^^^^ | = help: cast through a raw pointer first @@ -17,7 +17,7 @@ LL | a as isize; //~ ERROR casting error[E0606]: casting `&[i32]` as `i16` is invalid --> $DIR/fat-ptr-cast.rs:12:5 | -LL | a as i16; //~ ERROR casting `&[i32]` as `i16` is invalid +LL | a as i16; | ^^^^^^^^ | = help: cast through a raw pointer first @@ -25,7 +25,7 @@ LL | a as i16; //~ ERROR casting `&[i32]` as `i16` is invalid error[E0606]: casting `&[i32]` as `u32` is invalid --> $DIR/fat-ptr-cast.rs:13:5 | -LL | a as u32; //~ ERROR casting `&[i32]` as `u32` is invalid +LL | a as u32; | ^^^^^^^^ | = help: cast through a raw pointer first @@ -33,7 +33,7 @@ LL | a as u32; //~ ERROR casting `&[i32]` as `u32` is invalid error[E0605]: non-primitive cast: `std::boxed::Box<[i32]>` as `usize` --> $DIR/fat-ptr-cast.rs:14:5 | -LL | b as usize; //~ ERROR non-primitive cast +LL | b as usize; | ^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -49,19 +49,19 @@ LL | p as usize; error[E0607]: cannot cast thin pointer `*const i32` to fat pointer `*const [i32]` --> $DIR/fat-ptr-cast.rs:19:5 | -LL | q as *const [i32]; //~ ERROR cannot cast +LL | q as *const [i32]; | ^^^^^^^^^^^^^^^^^ error[E0606]: casting `usize` as `*mut (dyn Trait + 'static)` is invalid --> $DIR/fat-ptr-cast.rs:22:37 | -LL | let t: *mut (Trait + 'static) = 0 as *mut _; //~ ERROR casting +LL | let t: *mut (Trait + 'static) = 0 as *mut _; | ^^^^^^^^^^^ error[E0606]: casting `usize` as `*const str` is invalid --> $DIR/fat-ptr-cast.rs:23:32 | -LL | let mut fail: *const str = 0 as *const str; //~ ERROR casting +LL | let mut fail: *const str = 0 as *const str; | ^^^^^^^^^^^^^^^ error: aborting due to 9 previous errors diff --git a/src/test/ui/feature-gate-optimize_attribute.stderr b/src/test/ui/feature-gate-optimize_attribute.stderr index ddd4c457d73..7635af6ce46 100644 --- a/src/test/ui/feature-gate-optimize_attribute.stderr +++ b/src/test/ui/feature-gate-optimize_attribute.stderr @@ -1,7 +1,7 @@ error[E0658]: #[optimize] attribute is an unstable feature (see issue #54882) --> $DIR/feature-gate-optimize_attribute.rs:7:1 | -LL | #[optimize(size)] //~ ERROR #54882 +LL | #[optimize(size)] | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(optimize_attribute)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | #[optimize(size)] //~ ERROR #54882 error[E0658]: #[optimize] attribute is an unstable feature (see issue #54882) --> $DIR/feature-gate-optimize_attribute.rs:10:1 | -LL | #[optimize(speed)] //~ ERROR #54882 +LL | #[optimize(speed)] | ^^^^^^^^^^^^^^^^^^ | = help: add #![feature(optimize_attribute)] to the crate attributes to enable @@ -25,7 +25,7 @@ LL | #[optimize(banana)] error[E0658]: #[optimize] attribute is an unstable feature (see issue #54882) --> $DIR/feature-gate-optimize_attribute.rs:4:1 | -LL | #[optimize(size)] //~ ERROR #54882 +LL | #[optimize(size)] | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(optimize_attribute)] to the crate attributes to enable @@ -33,7 +33,7 @@ LL | #[optimize(size)] //~ ERROR #54882 error[E0658]: #[optimize] attribute is an unstable feature (see issue #54882) --> $DIR/feature-gate-optimize_attribute.rs:2:1 | -LL | #![optimize(speed)] //~ ERROR #54882 +LL | #![optimize(speed)] | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(optimize_attribute)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate/duplicate-features.stderr b/src/test/ui/feature-gate/duplicate-features.stderr index 18adf3a880a..dbde806f6cc 100644 --- a/src/test/ui/feature-gate/duplicate-features.stderr +++ b/src/test/ui/feature-gate/duplicate-features.stderr @@ -1,13 +1,13 @@ error[E0636]: the feature `if_let` has already been declared --> $DIR/duplicate-features.rs:7:12 | -LL | #![feature(if_let)] //~ ERROR the feature `if_let` has already been declared +LL | #![feature(if_let)] | ^^^^^^ error[E0636]: the feature `rust1` has already been declared --> $DIR/duplicate-features.rs:4:12 | -LL | #![feature(rust1)] //~ ERROR the feature `rust1` has already been declared +LL | #![feature(rust1)] | ^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr index 4d15ccb300a..c539e24c01b 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr @@ -1,7 +1,7 @@ warning: unknown lint: `x5400` --> $DIR/issue-43106-gating-of-builtin-attrs.rs:38:9 | -LL | #![warn(x5400)] //~ WARN unknown lint: `x5400` +LL | #![warn(x5400)] | ^^^^^ | note: lint level defined here @@ -13,19 +13,19 @@ LL | #![warn(unused_attributes, unknown_lints)] warning: unknown lint: `x5300` --> $DIR/issue-43106-gating-of-builtin-attrs.rs:39:10 | -LL | #![allow(x5300)] //~ WARN unknown lint: `x5300` +LL | #![allow(x5300)] | ^^^^^ warning: unknown lint: `x5200` --> $DIR/issue-43106-gating-of-builtin-attrs.rs:40:11 | -LL | #![forbid(x5200)] //~ WARN unknown lint: `x5200` +LL | #![forbid(x5200)] | ^^^^^ warning: unknown lint: `x5100` --> $DIR/issue-43106-gating-of-builtin-attrs.rs:41:9 | -LL | #![deny(x5100)] //~ WARN unknown lint: `x5100` +LL | #![deny(x5100)] | ^^^^^ warning: unknown lint: `x5400` @@ -1113,25 +1113,25 @@ LL | #[type_length_limit="0100"] warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:43:1 | -LL | #![macro_export] //~ WARN unused attribute +LL | #![macro_export] | ^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:44:1 | -LL | #![plugin_registrar] //~ WARN unused attribute +LL | #![plugin_registrar] | ^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:47:1 | -LL | #![main] //~ WARN unused attribute +LL | #![main] | ^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:48:1 | -LL | #![start] //~ WARN unused attribute +LL | #![start] | ^^^^^^^^^ warning: unused attribute @@ -1143,37 +1143,37 @@ LL | #![repr()] warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:53:1 | -LL | #![path = "3800"] //~ WARN unused attribute +LL | #![path = "3800"] | ^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:54:1 | -LL | #![automatically_derived] //~ WARN unused attribute +LL | #![automatically_derived] | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:56:1 | -LL | #![no_link] //~ WARN unused attribute +LL | #![no_link] | ^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:58:1 | -LL | #![should_panic] //~ WARN unused attribute +LL | #![should_panic] | ^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:59:1 | -LL | #![ignore] //~ WARN unused attribute +LL | #![ignore] | ^^^^^^^^^^ warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:65:1 | -LL | #![proc_macro_derive()] //~ WARN unused attribute +LL | #![proc_macro_derive()] | ^^^^^^^^^^^^^^^^^^^^^^^ error: invalid windows subsystem `1000`, only `windows` and `console` are allowed diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr index 71e8f11ff07..ef89a887fd4 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr @@ -13,13 +13,13 @@ error[E0518]: attribute should be applied to function or closure | LL | #[inline] | ^^^^^^^^^ -LL | //~^ ERROR attribute should be applied to function or closure +LL | LL | / mod inline { LL | | mod inner { #![inline] } -LL | | //~^ ERROR attribute should be applied to function or closure +LL | | LL | | ... | -LL | | //~^ ERROR attribute should be applied to function or closure +LL | | LL | | } | |_- not a function or closure diff --git a/src/test/ui/feature-gate/issue-49983-see-issue-0.stderr b/src/test/ui/feature-gate/issue-49983-see-issue-0.stderr index 22ad8c8b77e..83775322a27 100644 --- a/src/test/ui/feature-gate/issue-49983-see-issue-0.stderr +++ b/src/test/ui/feature-gate/issue-49983-see-issue-0.stderr @@ -1,7 +1,7 @@ error[E0658]: use of unstable library feature 'ptr_internals': use NonNull instead and consider PhantomData (if you also use #[may_dangle]), Send, and/or Sync --> $DIR/issue-49983-see-issue-0.rs:4:30 | -LL | #[allow(unused_imports)] use core::ptr::Unique; //~ ERROR use of unstable library feature +LL | #[allow(unused_imports)] use core::ptr::Unique; | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(ptr_internals)] to the crate attributes to enable diff --git a/src/test/ui/feature-gate/unknown-feature.stderr b/src/test/ui/feature-gate/unknown-feature.stderr index 2f8bf20ce46..e5c05872dbf 100644 --- a/src/test/ui/feature-gate/unknown-feature.stderr +++ b/src/test/ui/feature-gate/unknown-feature.stderr @@ -1,7 +1,7 @@ error[E0635]: unknown feature `unknown_rust_feature` --> $DIR/unknown-feature.rs:1:12 | -LL | #![feature(unknown_rust_feature)] //~ ERROR unknown feature +LL | #![feature(unknown_rust_feature)] | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/feature-gated-feature-in-macro-arg.stderr b/src/test/ui/feature-gated-feature-in-macro-arg.stderr index b262a6f7005..5cbd1023b3c 100644 --- a/src/test/ui/feature-gated-feature-in-macro-arg.stderr +++ b/src/test/ui/feature-gated-feature-in-macro-arg.stderr @@ -1,7 +1,7 @@ error[E0658]: intrinsics are subject to change --> $DIR/feature-gated-feature-in-macro-arg.rs:8:9 | -LL | / extern "rust-intrinsic" { //~ ERROR intrinsics are subject to change +LL | / extern "rust-intrinsic" { LL | | fn atomic_fence(); LL | | } | |_________^ diff --git a/src/test/ui/feature-gates/feature-gate-abi.stderr b/src/test/ui/feature-gates/feature-gate-abi.stderr index d528788f7c2..7417f310921 100644 --- a/src/test/ui/feature-gates/feature-gate-abi.stderr +++ b/src/test/ui/feature-gates/feature-gate-abi.stderr @@ -1,7 +1,7 @@ error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:12:1 | -LL | extern "rust-intrinsic" fn f1() {} //~ ERROR intrinsics are subject to change +LL | extern "rust-intrinsic" fn f1() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | extern "rust-intrinsic" fn f1() {} //~ ERROR intrinsics are subject to chan error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:13:1 | -LL | extern "platform-intrinsic" fn f2() {} //~ ERROR platform intrinsics are experimental +LL | extern "platform-intrinsic" fn f2() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | extern "platform-intrinsic" fn f2() {} //~ ERROR platform intrinsics are ex error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:14:1 | -LL | extern "vectorcall" fn f3() {} //~ ERROR vectorcall is experimental and subject to change +LL | extern "vectorcall" fn f3() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -25,7 +25,7 @@ LL | extern "vectorcall" fn f3() {} //~ ERROR vectorcall is experimental and sub error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:15:1 | -LL | extern "rust-call" fn f4() {} //~ ERROR rust-call ABI is subject to change +LL | extern "rust-call" fn f4() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -33,7 +33,7 @@ LL | extern "rust-call" fn f4() {} //~ ERROR rust-call ABI is subject to change error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:16:1 | -LL | extern "msp430-interrupt" fn f5() {} //~ ERROR msp430-interrupt ABI is experimental +LL | extern "msp430-interrupt" fn f5() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -41,7 +41,7 @@ LL | extern "msp430-interrupt" fn f5() {} //~ ERROR msp430-interrupt ABI is expe error[E0658]: PTX ABIs are experimental and subject to change (see issue #38788) --> $DIR/feature-gate-abi.rs:17:1 | -LL | extern "ptx-kernel" fn f6() {} //~ ERROR PTX ABIs are experimental and subject to change +LL | extern "ptx-kernel" fn f6() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -49,7 +49,7 @@ LL | extern "ptx-kernel" fn f6() {} //~ ERROR PTX ABIs are experimental and subj error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:18:1 | -LL | extern "x86-interrupt" fn f7() {} //~ ERROR x86-interrupt ABI is experimental +LL | extern "x86-interrupt" fn f7() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -57,7 +57,7 @@ LL | extern "x86-interrupt" fn f7() {} //~ ERROR x86-interrupt ABI is experiment error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:19:1 | -LL | extern "thiscall" fn f8() {} //~ ERROR thiscall is experimental and subject to change +LL | extern "thiscall" fn f8() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -65,7 +65,7 @@ LL | extern "thiscall" fn f8() {} //~ ERROR thiscall is experimental and subject error[E0658]: amdgpu-kernel ABI is experimental and subject to change (see issue #51575) --> $DIR/feature-gate-abi.rs:20:1 | -LL | extern "amdgpu-kernel" fn f9() {} //~ ERROR amdgpu-kernel ABI is experimental and subject to change +LL | extern "amdgpu-kernel" fn f9() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_amdgpu_kernel)] to the crate attributes to enable @@ -73,7 +73,7 @@ LL | extern "amdgpu-kernel" fn f9() {} //~ ERROR amdgpu-kernel ABI is experiment error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:24:5 | -LL | extern "rust-intrinsic" fn m1(); //~ ERROR intrinsics are subject to change +LL | extern "rust-intrinsic" fn m1(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -81,7 +81,7 @@ LL | extern "rust-intrinsic" fn m1(); //~ ERROR intrinsics are subject to ch error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:25:5 | -LL | extern "platform-intrinsic" fn m2(); //~ ERROR platform intrinsics are experimental +LL | extern "platform-intrinsic" fn m2(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -89,7 +89,7 @@ LL | extern "platform-intrinsic" fn m2(); //~ ERROR platform intrinsics are error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:26:5 | -LL | extern "vectorcall" fn m3(); //~ ERROR vectorcall is experimental and subject to change +LL | extern "vectorcall" fn m3(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -97,7 +97,7 @@ LL | extern "vectorcall" fn m3(); //~ ERROR vectorcall is experimental and s error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:27:5 | -LL | extern "rust-call" fn m4(); //~ ERROR rust-call ABI is subject to change +LL | extern "rust-call" fn m4(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -105,7 +105,7 @@ LL | extern "rust-call" fn m4(); //~ ERROR rust-call ABI is subject to chang error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:28:5 | -LL | extern "msp430-interrupt" fn m5(); //~ ERROR msp430-interrupt ABI is experimental +LL | extern "msp430-interrupt" fn m5(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -113,7 +113,7 @@ LL | extern "msp430-interrupt" fn m5(); //~ ERROR msp430-interrupt ABI is ex error[E0658]: PTX ABIs are experimental and subject to change (see issue #38788) --> $DIR/feature-gate-abi.rs:29:5 | -LL | extern "ptx-kernel" fn m6(); //~ ERROR PTX ABIs are experimental and subject to change +LL | extern "ptx-kernel" fn m6(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -121,7 +121,7 @@ LL | extern "ptx-kernel" fn m6(); //~ ERROR PTX ABIs are experimental and su error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:30:5 | -LL | extern "x86-interrupt" fn m7(); //~ ERROR x86-interrupt ABI is experimental +LL | extern "x86-interrupt" fn m7(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -129,7 +129,7 @@ LL | extern "x86-interrupt" fn m7(); //~ ERROR x86-interrupt ABI is experime error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:31:5 | -LL | extern "thiscall" fn m8(); //~ ERROR thiscall is experimental and subject to change +LL | extern "thiscall" fn m8(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -137,7 +137,7 @@ LL | extern "thiscall" fn m8(); //~ ERROR thiscall is experimental and subje error[E0658]: amdgpu-kernel ABI is experimental and subject to change (see issue #51575) --> $DIR/feature-gate-abi.rs:32:5 | -LL | extern "amdgpu-kernel" fn m9(); //~ ERROR amdgpu-kernel ABI is experimental and subject to change +LL | extern "amdgpu-kernel" fn m9(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_amdgpu_kernel)] to the crate attributes to enable @@ -145,7 +145,7 @@ LL | extern "amdgpu-kernel" fn m9(); //~ ERROR amdgpu-kernel ABI is experime error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:34:5 | -LL | extern "rust-intrinsic" fn dm1() {} //~ ERROR intrinsics are subject to change +LL | extern "rust-intrinsic" fn dm1() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -153,7 +153,7 @@ LL | extern "rust-intrinsic" fn dm1() {} //~ ERROR intrinsics are subject to error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:35:5 | -LL | extern "platform-intrinsic" fn dm2() {} //~ ERROR platform intrinsics are experimental +LL | extern "platform-intrinsic" fn dm2() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -161,7 +161,7 @@ LL | extern "platform-intrinsic" fn dm2() {} //~ ERROR platform intrinsics a error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:36:5 | -LL | extern "vectorcall" fn dm3() {} //~ ERROR vectorcall is experimental and subject to change +LL | extern "vectorcall" fn dm3() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -169,7 +169,7 @@ LL | extern "vectorcall" fn dm3() {} //~ ERROR vectorcall is experimental an error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:37:5 | -LL | extern "rust-call" fn dm4() {} //~ ERROR rust-call ABI is subject to change +LL | extern "rust-call" fn dm4() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -177,7 +177,7 @@ LL | extern "rust-call" fn dm4() {} //~ ERROR rust-call ABI is subject to ch error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:38:5 | -LL | extern "msp430-interrupt" fn dm5() {} //~ ERROR msp430-interrupt ABI is experimental +LL | extern "msp430-interrupt" fn dm5() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -185,7 +185,7 @@ LL | extern "msp430-interrupt" fn dm5() {} //~ ERROR msp430-interrupt ABI is error[E0658]: PTX ABIs are experimental and subject to change (see issue #38788) --> $DIR/feature-gate-abi.rs:39:5 | -LL | extern "ptx-kernel" fn dm6() {} //~ ERROR PTX ABIs are experimental and subject to change +LL | extern "ptx-kernel" fn dm6() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -193,7 +193,7 @@ LL | extern "ptx-kernel" fn dm6() {} //~ ERROR PTX ABIs are experimental and error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:40:5 | -LL | extern "x86-interrupt" fn dm7() {} //~ ERROR x86-interrupt ABI is experimental +LL | extern "x86-interrupt" fn dm7() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -201,7 +201,7 @@ LL | extern "x86-interrupt" fn dm7() {} //~ ERROR x86-interrupt ABI is exper error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:41:5 | -LL | extern "thiscall" fn dm8() {} //~ ERROR thiscall is experimental and subject to change +LL | extern "thiscall" fn dm8() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -209,7 +209,7 @@ LL | extern "thiscall" fn dm8() {} //~ ERROR thiscall is experimental and su error[E0658]: amdgpu-kernel ABI is experimental and subject to change (see issue #51575) --> $DIR/feature-gate-abi.rs:42:5 | -LL | extern "amdgpu-kernel" fn dm9() {} //~ ERROR amdgpu-kernel ABI is experimental and subject to change +LL | extern "amdgpu-kernel" fn dm9() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_amdgpu_kernel)] to the crate attributes to enable @@ -217,7 +217,7 @@ LL | extern "amdgpu-kernel" fn dm9() {} //~ ERROR amdgpu-kernel ABI is exper error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:49:5 | -LL | extern "rust-intrinsic" fn m1() {} //~ ERROR intrinsics are subject to change +LL | extern "rust-intrinsic" fn m1() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -225,7 +225,7 @@ LL | extern "rust-intrinsic" fn m1() {} //~ ERROR intrinsics are subject to error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:50:5 | -LL | extern "platform-intrinsic" fn m2() {} //~ ERROR platform intrinsics are experimental +LL | extern "platform-intrinsic" fn m2() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -233,7 +233,7 @@ LL | extern "platform-intrinsic" fn m2() {} //~ ERROR platform intrinsics ar error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:51:5 | -LL | extern "vectorcall" fn m3() {} //~ ERROR vectorcall is experimental and subject to change +LL | extern "vectorcall" fn m3() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -241,7 +241,7 @@ LL | extern "vectorcall" fn m3() {} //~ ERROR vectorcall is experimental and error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:52:5 | -LL | extern "rust-call" fn m4() {} //~ ERROR rust-call ABI is subject to change +LL | extern "rust-call" fn m4() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -249,7 +249,7 @@ LL | extern "rust-call" fn m4() {} //~ ERROR rust-call ABI is subject to cha error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:53:5 | -LL | extern "msp430-interrupt" fn m5() {} //~ ERROR msp430-interrupt ABI is experimental +LL | extern "msp430-interrupt" fn m5() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -257,7 +257,7 @@ LL | extern "msp430-interrupt" fn m5() {} //~ ERROR msp430-interrupt ABI is error[E0658]: PTX ABIs are experimental and subject to change (see issue #38788) --> $DIR/feature-gate-abi.rs:54:5 | -LL | extern "ptx-kernel" fn m6() {} //~ ERROR PTX ABIs are experimental and subject to change +LL | extern "ptx-kernel" fn m6() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -265,7 +265,7 @@ LL | extern "ptx-kernel" fn m6() {} //~ ERROR PTX ABIs are experimental and error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:55:5 | -LL | extern "x86-interrupt" fn m7() {} //~ ERROR x86-interrupt ABI is experimental +LL | extern "x86-interrupt" fn m7() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -273,7 +273,7 @@ LL | extern "x86-interrupt" fn m7() {} //~ ERROR x86-interrupt ABI is experi error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:56:5 | -LL | extern "thiscall" fn m8() {} //~ ERROR thiscall is experimental and subject to change +LL | extern "thiscall" fn m8() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -281,7 +281,7 @@ LL | extern "thiscall" fn m8() {} //~ ERROR thiscall is experimental and sub error[E0658]: amdgpu-kernel ABI is experimental and subject to change (see issue #51575) --> $DIR/feature-gate-abi.rs:57:5 | -LL | extern "amdgpu-kernel" fn m9() {} //~ ERROR amdgpu-kernel ABI is experimental and subject to change +LL | extern "amdgpu-kernel" fn m9() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_amdgpu_kernel)] to the crate attributes to enable @@ -289,7 +289,7 @@ LL | extern "amdgpu-kernel" fn m9() {} //~ ERROR amdgpu-kernel ABI is experi error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:62:5 | -LL | extern "rust-intrinsic" fn im1() {} //~ ERROR intrinsics are subject to change +LL | extern "rust-intrinsic" fn im1() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -297,7 +297,7 @@ LL | extern "rust-intrinsic" fn im1() {} //~ ERROR intrinsics are subject to error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:63:5 | -LL | extern "platform-intrinsic" fn im2() {} //~ ERROR platform intrinsics are experimental +LL | extern "platform-intrinsic" fn im2() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -305,7 +305,7 @@ LL | extern "platform-intrinsic" fn im2() {} //~ ERROR platform intrinsics a error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:64:5 | -LL | extern "vectorcall" fn im3() {} //~ ERROR vectorcall is experimental and subject to change +LL | extern "vectorcall" fn im3() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -313,7 +313,7 @@ LL | extern "vectorcall" fn im3() {} //~ ERROR vectorcall is experimental an error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:65:5 | -LL | extern "rust-call" fn im4() {} //~ ERROR rust-call ABI is subject to change +LL | extern "rust-call" fn im4() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -321,7 +321,7 @@ LL | extern "rust-call" fn im4() {} //~ ERROR rust-call ABI is subject to ch error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:66:5 | -LL | extern "msp430-interrupt" fn im5() {} //~ ERROR msp430-interrupt ABI is experimental +LL | extern "msp430-interrupt" fn im5() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -329,7 +329,7 @@ LL | extern "msp430-interrupt" fn im5() {} //~ ERROR msp430-interrupt ABI is error[E0658]: PTX ABIs are experimental and subject to change (see issue #38788) --> $DIR/feature-gate-abi.rs:67:5 | -LL | extern "ptx-kernel" fn im6() {} //~ ERROR PTX ABIs are experimental and subject to change +LL | extern "ptx-kernel" fn im6() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -337,7 +337,7 @@ LL | extern "ptx-kernel" fn im6() {} //~ ERROR PTX ABIs are experimental and error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:68:5 | -LL | extern "x86-interrupt" fn im7() {} //~ ERROR x86-interrupt ABI is experimental +LL | extern "x86-interrupt" fn im7() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -345,7 +345,7 @@ LL | extern "x86-interrupt" fn im7() {} //~ ERROR x86-interrupt ABI is exper error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:69:5 | -LL | extern "thiscall" fn im8() {} //~ ERROR thiscall is experimental and subject to change +LL | extern "thiscall" fn im8() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -353,7 +353,7 @@ LL | extern "thiscall" fn im8() {} //~ ERROR thiscall is experimental and su error[E0658]: amdgpu-kernel ABI is experimental and subject to change (see issue #51575) --> $DIR/feature-gate-abi.rs:70:5 | -LL | extern "amdgpu-kernel" fn im9() {} //~ ERROR amdgpu-kernel ABI is experimental and subject to change +LL | extern "amdgpu-kernel" fn im9() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_amdgpu_kernel)] to the crate attributes to enable @@ -361,7 +361,7 @@ LL | extern "amdgpu-kernel" fn im9() {} //~ ERROR amdgpu-kernel ABI is exper error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:74:11 | -LL | type A1 = extern "rust-intrinsic" fn(); //~ ERROR intrinsics are subject to change +LL | type A1 = extern "rust-intrinsic" fn(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -369,7 +369,7 @@ LL | type A1 = extern "rust-intrinsic" fn(); //~ ERROR intrinsics are subject to error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:75:11 | -LL | type A2 = extern "platform-intrinsic" fn(); //~ ERROR platform intrinsics are experimental +LL | type A2 = extern "platform-intrinsic" fn(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -377,7 +377,7 @@ LL | type A2 = extern "platform-intrinsic" fn(); //~ ERROR platform intrinsics a error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:76:11 | -LL | type A3 = extern "vectorcall" fn(); //~ ERROR vectorcall is experimental and subject to change +LL | type A3 = extern "vectorcall" fn(); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -385,7 +385,7 @@ LL | type A3 = extern "vectorcall" fn(); //~ ERROR vectorcall is experimental an error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:77:11 | -LL | type A4 = extern "rust-call" fn(); //~ ERROR rust-call ABI is subject to change +LL | type A4 = extern "rust-call" fn(); | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -393,7 +393,7 @@ LL | type A4 = extern "rust-call" fn(); //~ ERROR rust-call ABI is subject to ch error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:78:11 | -LL | type A5 = extern "msp430-interrupt" fn(); //~ ERROR msp430-interrupt ABI is experimental +LL | type A5 = extern "msp430-interrupt" fn(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -401,7 +401,7 @@ LL | type A5 = extern "msp430-interrupt" fn(); //~ ERROR msp430-interrupt ABI is error[E0658]: PTX ABIs are experimental and subject to change (see issue #38788) --> $DIR/feature-gate-abi.rs:79:11 | -LL | type A6 = extern "ptx-kernel" fn (); //~ ERROR PTX ABIs are experimental and subject to change +LL | type A6 = extern "ptx-kernel" fn (); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -409,7 +409,7 @@ LL | type A6 = extern "ptx-kernel" fn (); //~ ERROR PTX ABIs are experimental an error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:80:11 | -LL | type A7 = extern "x86-interrupt" fn(); //~ ERROR x86-interrupt ABI is experimental +LL | type A7 = extern "x86-interrupt" fn(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -417,7 +417,7 @@ LL | type A7 = extern "x86-interrupt" fn(); //~ ERROR x86-interrupt ABI is exper error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:81:11 | -LL | type A8 = extern "thiscall" fn(); //~ ERROR thiscall is experimental and subject to change +LL | type A8 = extern "thiscall" fn(); | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -425,7 +425,7 @@ LL | type A8 = extern "thiscall" fn(); //~ ERROR thiscall is experimental and su error[E0658]: amdgpu-kernel ABI is experimental and subject to change (see issue #51575) --> $DIR/feature-gate-abi.rs:82:11 | -LL | type A9 = extern "amdgpu-kernel" fn(); //~ ERROR amdgpu-kernel ABI is experimental and subject to change +LL | type A9 = extern "amdgpu-kernel" fn(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_amdgpu_kernel)] to the crate attributes to enable @@ -433,7 +433,7 @@ LL | type A9 = extern "amdgpu-kernel" fn(); //~ ERROR amdgpu-kernel ABI is exper error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:85:1 | -LL | extern "rust-intrinsic" {} //~ ERROR intrinsics are subject to change +LL | extern "rust-intrinsic" {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -441,7 +441,7 @@ LL | extern "rust-intrinsic" {} //~ ERROR intrinsics are subject to change error[E0658]: platform intrinsics are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-abi.rs:86:1 | -LL | extern "platform-intrinsic" {} //~ ERROR platform intrinsics are experimental +LL | extern "platform-intrinsic" {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(platform_intrinsics)] to the crate attributes to enable @@ -449,7 +449,7 @@ LL | extern "platform-intrinsic" {} //~ ERROR platform intrinsics are experiment error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-abi.rs:87:1 | -LL | extern "vectorcall" {} //~ ERROR vectorcall is experimental and subject to change +LL | extern "vectorcall" {} | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_vectorcall)] to the crate attributes to enable @@ -457,7 +457,7 @@ LL | extern "vectorcall" {} //~ ERROR vectorcall is experimental and subject to error[E0658]: rust-call ABI is subject to change (see issue #29625) --> $DIR/feature-gate-abi.rs:88:1 | -LL | extern "rust-call" {} //~ ERROR rust-call ABI is subject to change +LL | extern "rust-call" {} | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unboxed_closures)] to the crate attributes to enable @@ -465,7 +465,7 @@ LL | extern "rust-call" {} //~ ERROR rust-call ABI is subject to change error[E0658]: msp430-interrupt ABI is experimental and subject to change (see issue #38487) --> $DIR/feature-gate-abi.rs:89:1 | -LL | extern "msp430-interrupt" {} //~ ERROR msp430-interrupt ABI is experimental +LL | extern "msp430-interrupt" {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable @@ -473,7 +473,7 @@ LL | extern "msp430-interrupt" {} //~ ERROR msp430-interrupt ABI is experimental error[E0658]: PTX ABIs are experimental and subject to change (see issue #38788) --> $DIR/feature-gate-abi.rs:90:1 | -LL | extern "ptx-kernel" {} //~ ERROR PTX ABIs are experimental and subject to change +LL | extern "ptx-kernel" {} | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_ptx)] to the crate attributes to enable @@ -481,7 +481,7 @@ LL | extern "ptx-kernel" {} //~ ERROR PTX ABIs are experimental and subject to c error[E0658]: x86-interrupt ABI is experimental and subject to change (see issue #40180) --> $DIR/feature-gate-abi.rs:91:1 | -LL | extern "x86-interrupt" {} //~ ERROR x86-interrupt ABI is experimental +LL | extern "x86-interrupt" {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable @@ -489,7 +489,7 @@ LL | extern "x86-interrupt" {} //~ ERROR x86-interrupt ABI is experimental error[E0658]: thiscall is experimental and subject to change --> $DIR/feature-gate-abi.rs:92:1 | -LL | extern "thiscall" {} //~ ERROR thiscall is experimental and subject to change +LL | extern "thiscall" {} | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_thiscall)] to the crate attributes to enable @@ -497,7 +497,7 @@ LL | extern "thiscall" {} //~ ERROR thiscall is experimental and subject to chan error[E0658]: amdgpu-kernel ABI is experimental and subject to change (see issue #51575) --> $DIR/feature-gate-abi.rs:93:1 | -LL | extern "amdgpu-kernel" {} //~ ERROR amdgpu-kernel ABI is experimental and subject to change +LL | extern "amdgpu-kernel" {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(abi_amdgpu_kernel)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-abi_unadjusted.stderr b/src/test/ui/feature-gates/feature-gate-abi_unadjusted.stderr index 707b6bc75b1..fb32ebb1888 100644 --- a/src/test/ui/feature-gates/feature-gate-abi_unadjusted.stderr +++ b/src/test/ui/feature-gates/feature-gate-abi_unadjusted.stderr @@ -2,7 +2,7 @@ error[E0658]: unadjusted ABI is an implementation detail and perma-unstable --> $DIR/feature-gate-abi_unadjusted.rs:1:1 | LL | / extern "unadjusted" fn foo() { -LL | | //~^ ERROR: unadjusted ABI is an implementation detail and perma-unstable +LL | | LL | | } | |_^ | diff --git a/src/test/ui/feature-gates/feature-gate-alloc-error-handler.stderr b/src/test/ui/feature-gates/feature-gate-alloc-error-handler.stderr index c20b21fa43d..5e64ac50c3c 100644 --- a/src/test/ui/feature-gates/feature-gate-alloc-error-handler.stderr +++ b/src/test/ui/feature-gates/feature-gate-alloc-error-handler.stderr @@ -1,7 +1,7 @@ error[E0658]: #[alloc_error_handler] is an unstable feature (see issue #51540) --> $DIR/feature-gate-alloc-error-handler.rs:8:1 | -LL | #[alloc_error_handler] //~ ERROR #[alloc_error_handler] is an unstable feature (see issue #51540) +LL | #[alloc_error_handler] | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(alloc_error_handler)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-allocator_internals.stderr b/src/test/ui/feature-gates/feature-gate-allocator_internals.stderr index 5103b7214f5..c41dca0ec47 100644 --- a/src/test/ui/feature-gates/feature-gate-allocator_internals.stderr +++ b/src/test/ui/feature-gates/feature-gate-allocator_internals.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[default_lib_allocator]` attribute is an experimental feature --> $DIR/feature-gate-allocator_internals.rs:1:1 | -LL | #![default_lib_allocator] //~ ERROR: attribute is an experimental feature +LL | #![default_lib_allocator] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(allocator_internals)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.stderr b/src/test/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.stderr index 1cadfb28214..27324d703a8 100644 --- a/src/test/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.stderr +++ b/src/test/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.stderr @@ -1,7 +1,7 @@ error[E0658]: allow_internal_unsafe side-steps the unsafe_code lint --> $DIR/feature-gate-allow-internal-unsafe-nested-macro.rs:8:9 | -LL | #[allow_internal_unsafe] //~ ERROR allow_internal_unsafe side-steps +LL | #[allow_internal_unsafe] | ^^^^^^^^^^^^^^^^^^^^^^^^ ... LL | bar!(); diff --git a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr index 802c74239d7..76afd217b81 100644 --- a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr +++ b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr @@ -1,7 +1,7 @@ error[E0658]: allow_internal_unstable side-steps feature gating and stability checks --> $DIR/feature-gate-allow-internal-unstable-nested-macro.rs:8:9 | -LL | #[allow_internal_unstable()] //~ ERROR allow_internal_unstable side-steps +LL | #[allow_internal_unstable()] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... LL | bar!(); diff --git a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-struct.stderr b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-struct.stderr index d619f1e3239..d512e56d0a8 100644 --- a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-struct.stderr +++ b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-struct.stderr @@ -1,7 +1,7 @@ error[E0658]: allow_internal_unstable side-steps feature gating and stability checks --> $DIR/feature-gate-allow-internal-unstable-struct.rs:4:1 | -LL | #[allow_internal_unstable()] //~ ERROR allow_internal_unstable side-steps +LL | #[allow_internal_unstable()] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(allow_internal_unstable)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable.stderr b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable.stderr index aa4f6648c4f..baba7f4bfb5 100644 --- a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable.stderr +++ b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable.stderr @@ -1,7 +1,7 @@ error[E0658]: allow_internal_unstable side-steps feature gating and stability checks --> $DIR/feature-gate-allow-internal-unstable.rs:3:1 | -LL | #[allow_internal_unstable()] //~ ERROR allow_internal_unstable side-steps +LL | #[allow_internal_unstable()] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(allow_internal_unstable)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-allow_fail.stderr b/src/test/ui/feature-gates/feature-gate-allow_fail.stderr index 18c7ac9c3c9..5de1706dd4a 100644 --- a/src/test/ui/feature-gates/feature-gate-allow_fail.stderr +++ b/src/test/ui/feature-gates/feature-gate-allow_fail.stderr @@ -1,7 +1,7 @@ error[E0658]: allow_fail attribute is currently unstable (see issue #46488) --> $DIR/feature-gate-allow_fail.rs:3:1 | -LL | #[allow_fail] //~ ERROR allow_fail attribute is currently unstable +LL | #[allow_fail] | ^^^^^^^^^^^^^ | = help: add #![feature(allow_fail)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.stderr b/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.stderr index 8ec3c682850..e1089bc345e 100644 --- a/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.stderr +++ b/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.stderr @@ -1,7 +1,7 @@ error[E0658]: `Ptr` cannot be used as the type of `self` without the `arbitrary_self_types` feature (see issue #44874) --> $DIR/feature-gate-arbitrary-self-types.rs:16:18 | -LL | fn foo(self: Ptr); //~ ERROR `Ptr` cannot be used as the type of `self` without +LL | fn foo(self: Ptr); | ^^^^^^^^^ | = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable @@ -10,7 +10,7 @@ LL | fn foo(self: Ptr); //~ ERROR `Ptr` cannot be used as the ty error[E0658]: `Ptr` cannot be used as the type of `self` without the `arbitrary_self_types` feature (see issue #44874) --> $DIR/feature-gate-arbitrary-self-types.rs:22:18 | -LL | fn foo(self: Ptr) {} //~ ERROR `Ptr` cannot be used as the type of `self` without +LL | fn foo(self: Ptr) {} | ^^^^^^^^^ | = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable @@ -19,7 +19,7 @@ LL | fn foo(self: Ptr) {} //~ ERROR `Ptr` cannot be used as the t error[E0658]: `std::boxed::Box>` cannot be used as the type of `self` without the `arbitrary_self_types` feature (see issue #44874) --> $DIR/feature-gate-arbitrary-self-types.rs:26:18 | -LL | fn bar(self: Box>) {} //~ ERROR `std::boxed::Box>` cannot be used as the +LL | fn bar(self: Box>) {} | ^^^^^^^^^^^^^^ | = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-asm.stderr b/src/test/ui/feature-gates/feature-gate-asm.stderr index eee38e12c2a..6ad0ea67313 100644 --- a/src/test/ui/feature-gates/feature-gate-asm.stderr +++ b/src/test/ui/feature-gates/feature-gate-asm.stderr @@ -1,7 +1,7 @@ error[E0658]: inline assembly is not stable enough for use and is subject to change (see issue #29722) --> $DIR/feature-gate-asm.rs:3:9 | -LL | asm!(""); //~ ERROR inline assembly is not stable enough +LL | asm!(""); | ^^^^^^^^^ | = help: add #![feature(asm)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-asm2.stderr b/src/test/ui/feature-gates/feature-gate-asm2.stderr index fc4aa57718c..466f2028198 100644 --- a/src/test/ui/feature-gates/feature-gate-asm2.stderr +++ b/src/test/ui/feature-gates/feature-gate-asm2.stderr @@ -1,7 +1,7 @@ error[E0658]: inline assembly is not stable enough for use and is subject to change (see issue #29722) --> $DIR/feature-gate-asm2.rs:5:26 | -LL | println!("{:?}", asm!("")); //~ ERROR inline assembly is not stable +LL | println!("{:?}", asm!("")); | ^^^^^^^^ | = help: add #![feature(asm)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-assoc-type-defaults.stderr b/src/test/ui/feature-gates/feature-gate-assoc-type-defaults.stderr index a23962fe318..fe206d3dfca 100644 --- a/src/test/ui/feature-gates/feature-gate-assoc-type-defaults.stderr +++ b/src/test/ui/feature-gates/feature-gate-assoc-type-defaults.stderr @@ -1,7 +1,7 @@ error[E0658]: associated type defaults are unstable (see issue #29661) --> $DIR/feature-gate-assoc-type-defaults.rs:4:5 | -LL | type Bar = u8; //~ ERROR associated type defaults are unstable +LL | type Bar = u8; | ^^^^^^^^^^^^^^ | = help: add #![feature(associated_type_defaults)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-async-await-2015-edition.stderr b/src/test/ui/feature-gates/feature-gate-async-await-2015-edition.stderr index 58051153e1f..b67949b6155 100644 --- a/src/test/ui/feature-gates/feature-gate-async-await-2015-edition.stderr +++ b/src/test/ui/feature-gates/feature-gate-async-await-2015-edition.stderr @@ -1,25 +1,25 @@ error[E0670]: `async fn` is not permitted in the 2015 edition --> $DIR/feature-gate-async-await-2015-edition.rs:5:1 | -LL | async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition +LL | async fn foo() {} | ^^^^^ error[E0422]: cannot find struct, variant or union type `async` in this scope --> $DIR/feature-gate-async-await-2015-edition.rs:9:13 | -LL | let _ = async {}; //~ ERROR cannot find struct, variant or union type `async` +LL | let _ = async {}; | ^^^^^ not found in this scope error[E0425]: cannot find value `async` in this scope --> $DIR/feature-gate-async-await-2015-edition.rs:10:13 | -LL | let _ = async || { true }; //~ ERROR cannot find value `async` in this scope +LL | let _ = async || { true }; | ^^^^^ not found in this scope error[E0658]: async fn is unstable (see issue #50547) --> $DIR/feature-gate-async-await-2015-edition.rs:5:1 | -LL | async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition +LL | async fn foo() {} | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(async_await)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-async-await.stderr b/src/test/ui/feature-gates/feature-gate-async-await.stderr index 3a3165ba3e6..beec28765c8 100644 --- a/src/test/ui/feature-gates/feature-gate-async-await.stderr +++ b/src/test/ui/feature-gates/feature-gate-async-await.stderr @@ -1,7 +1,7 @@ error[E0658]: async fn is unstable (see issue #50547) --> $DIR/feature-gate-async-await.rs:5:1 | -LL | async fn foo() {} //~ ERROR async fn is unstable +LL | async fn foo() {} | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(async_await)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | async fn foo() {} //~ ERROR async fn is unstable error[E0658]: async blocks are unstable (see issue #50547) --> $DIR/feature-gate-async-await.rs:8:13 | -LL | let _ = async {}; //~ ERROR async blocks are unstable +LL | let _ = async {}; | ^^^^^^^^ | = help: add #![feature(async_await)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | let _ = async {}; //~ ERROR async blocks are unstable error[E0658]: async closures are unstable (see issue #50547) --> $DIR/feature-gate-async-await.rs:9:13 | -LL | let _ = async || {}; //~ ERROR async closures are unstable +LL | let _ = async || {}; | ^^^^^^^^^^^ | = help: add #![feature(async_await)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-box-expr.stderr b/src/test/ui/feature-gates/feature-gate-box-expr.stderr index 9ebff2e044c..7b202042878 100644 --- a/src/test/ui/feature-gates/feature-gate-box-expr.stderr +++ b/src/test/ui/feature-gates/feature-gate-box-expr.stderr @@ -1,7 +1,7 @@ error[E0658]: box expression syntax is experimental; you can call `Box::new` instead. (see issue #49733) --> $DIR/feature-gate-box-expr.rs:12:13 | -LL | let x = box 'c'; //~ ERROR box expression syntax is experimental +LL | let x = box 'c'; | ^^^^^^^ | = help: add #![feature(box_syntax)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-box_patterns.stderr b/src/test/ui/feature-gates/feature-gate-box_patterns.stderr index 1379ba526f5..39404aa39c8 100644 --- a/src/test/ui/feature-gates/feature-gate-box_patterns.stderr +++ b/src/test/ui/feature-gates/feature-gate-box_patterns.stderr @@ -1,7 +1,7 @@ error[E0658]: box pattern syntax is experimental (see issue #29641) --> $DIR/feature-gate-box_patterns.rs:2:9 | -LL | let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental +LL | let box x = Box::new('c'); | ^^^^^ | = help: add #![feature(box_patterns)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-compiler-builtins.stderr b/src/test/ui/feature-gates/feature-gate-compiler-builtins.stderr index 5bda76e2bfe..278a184bae2 100644 --- a/src/test/ui/feature-gates/feature-gate-compiler-builtins.stderr +++ b/src/test/ui/feature-gates/feature-gate-compiler-builtins.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[compiler_builtins]` attribute is used to identify the `compiler_builtins` crate which contains compiler-rt intrinsics and will never be stable --> $DIR/feature-gate-compiler-builtins.rs:1:1 | -LL | #![compiler_builtins] //~ ERROR the `#[compiler_builtins]` attribute is +LL | #![compiler_builtins] | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(compiler_builtins)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-concat_idents.stderr b/src/test/ui/feature-gates/feature-gate-concat_idents.stderr index d465512527a..3f4ce6d3b94 100644 --- a/src/test/ui/feature-gates/feature-gate-concat_idents.stderr +++ b/src/test/ui/feature-gates/feature-gate-concat_idents.stderr @@ -1,7 +1,7 @@ error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) --> $DIR/feature-gate-concat_idents.rs:5:13 | -LL | let a = concat_idents!(X, Y_1); //~ ERROR `concat_idents` is not stable +LL | let a = concat_idents!(X, Y_1); | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(concat_idents)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | let a = concat_idents!(X, Y_1); //~ ERROR `concat_idents` is not stable error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) --> $DIR/feature-gate-concat_idents.rs:6:13 | -LL | let b = concat_idents!(X, Y_2); //~ ERROR `concat_idents` is not stable +LL | let b = concat_idents!(X, Y_2); | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(concat_idents)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-concat_idents2.stderr b/src/test/ui/feature-gates/feature-gate-concat_idents2.stderr index cae409019f7..105b3d5cff5 100644 --- a/src/test/ui/feature-gates/feature-gate-concat_idents2.stderr +++ b/src/test/ui/feature-gates/feature-gate-concat_idents2.stderr @@ -1,7 +1,7 @@ error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) --> $DIR/feature-gate-concat_idents2.rs:4:5 | -LL | concat_idents!(a, b); //~ ERROR `concat_idents` is not stable enough +LL | concat_idents!(a, b); | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(concat_idents)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | concat_idents!(a, b); //~ ERROR `concat_idents` is not stable enough error[E0425]: cannot find value `ab` in this scope --> $DIR/feature-gate-concat_idents2.rs:4:5 | -LL | concat_idents!(a, b); //~ ERROR `concat_idents` is not stable enough +LL | concat_idents!(a, b); | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-concat_idents3.stderr b/src/test/ui/feature-gates/feature-gate-concat_idents3.stderr index e9b9f240e8c..9568b1d8801 100644 --- a/src/test/ui/feature-gates/feature-gate-concat_idents3.stderr +++ b/src/test/ui/feature-gates/feature-gate-concat_idents3.stderr @@ -1,7 +1,7 @@ error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) --> $DIR/feature-gate-concat_idents3.rs:7:20 | -LL | assert_eq!(10, concat_idents!(X, Y_1)); //~ ERROR `concat_idents` is not stable +LL | assert_eq!(10, concat_idents!(X, Y_1)); | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(concat_idents)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | assert_eq!(10, concat_idents!(X, Y_1)); //~ ERROR `concat_idents` is no error[E0658]: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) --> $DIR/feature-gate-concat_idents3.rs:8:20 | -LL | assert_eq!(20, concat_idents!(X, Y_2)); //~ ERROR `concat_idents` is not stable +LL | assert_eq!(20, concat_idents!(X, Y_2)); | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(concat_idents)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-const_fn.stderr b/src/test/ui/feature-gates/feature-gate-const_fn.stderr index be5237fbfcf..7f88d30acc6 100644 --- a/src/test/ui/feature-gates/feature-gate-const_fn.stderr +++ b/src/test/ui/feature-gates/feature-gate-const_fn.stderr @@ -1,25 +1,25 @@ error[E0379]: trait fns cannot be declared const --> $DIR/feature-gate-const_fn.rs:6:5 | -LL | const fn foo() -> u32; //~ ERROR const fn is unstable +LL | const fn foo() -> u32; | ^^^^^ trait fns cannot be const error[E0379]: trait fns cannot be declared const --> $DIR/feature-gate-const_fn.rs:8:5 | -LL | const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable +LL | const fn bar() -> u32 { 0 } | ^^^^^ trait fns cannot be const error[E0379]: trait fns cannot be declared const --> $DIR/feature-gate-const_fn.rs:13:5 | -LL | const fn foo() -> u32 { 0 } //~ ERROR trait fns cannot be declared const +LL | const fn foo() -> u32 { 0 } | ^^^^^ trait fns cannot be const error[E0658]: const fn is unstable (see issue #57563) --> $DIR/feature-gate-const_fn.rs:6:5 | -LL | const fn foo() -> u32; //~ ERROR const fn is unstable +LL | const fn foo() -> u32; | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -27,7 +27,7 @@ LL | const fn foo() -> u32; //~ ERROR const fn is unstable error[E0658]: const fn is unstable (see issue #57563) --> $DIR/feature-gate-const_fn.rs:8:5 | -LL | const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable +LL | const fn bar() -> u32 { 0 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-const_generics.stderr b/src/test/ui/feature-gates/feature-gate-const_generics.stderr index bd86a4197a7..dce40002535 100644 --- a/src/test/ui/feature-gates/feature-gate-const_generics.stderr +++ b/src/test/ui/feature-gates/feature-gate-const_generics.stderr @@ -1,7 +1,7 @@ error[E0658]: const generics are unstable (see issue #44580) --> $DIR/feature-gate-const_generics.rs:1:14 | -LL | fn foo() {} //~ ERROR const generics are unstable +LL | fn foo() {} | ^ | = help: add #![feature(const_generics)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | fn foo() {} //~ ERROR const generics are unstable error[E0658]: const generics are unstable (see issue #44580) --> $DIR/feature-gate-const_generics.rs:3:18 | -LL | struct Foo([(); X]); //~ ERROR const generics are unstable +LL | struct Foo([(); X]); | ^ | = help: add #![feature(const_generics)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-crate_visibility_modifier.stderr b/src/test/ui/feature-gates/feature-gate-crate_visibility_modifier.stderr index 2b28bbca645..25b26de60ef 100644 --- a/src/test/ui/feature-gates/feature-gate-crate_visibility_modifier.stderr +++ b/src/test/ui/feature-gates/feature-gate-crate_visibility_modifier.stderr @@ -1,7 +1,7 @@ error[E0658]: `crate` visibility modifier is experimental (see issue #53120) --> $DIR/feature-gate-crate_visibility_modifier.rs:1:1 | -LL | crate struct Bender { //~ ERROR `crate` visibility modifier is experimental +LL | crate struct Bender { | ^^^^^ | = help: add #![feature(crate_visibility_modifier)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-custom_attribute.stderr b/src/test/ui/feature-gates/feature-gate-custom_attribute.stderr index 51fefcfaff7..8b79c752e45 100644 --- a/src/test/ui/feature-gates/feature-gate-custom_attribute.stderr +++ b/src/test/ui/feature-gates/feature-gate-custom_attribute.stderr @@ -1,7 +1,7 @@ error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:7:3 | -LL | #[fake_attr] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr] | ^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | #[fake_attr] //~ ERROR attribute `fake_attr` is currently unknown error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:8:3 | -LL | #[fake_attr(100)] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(100)] | ^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | #[fake_attr(100)] //~ ERROR attribute `fake_attr` is currently unknown error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:9:3 | -LL | #[fake_attr(1, 2, 3)] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(1, 2, 3)] | ^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -25,7 +25,7 @@ LL | #[fake_attr(1, 2, 3)] //~ ERROR attribute `fake_attr` is currently unknown error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:10:3 | -LL | #[fake_attr("hello")] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr("hello")] | ^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -33,7 +33,7 @@ LL | #[fake_attr("hello")] //~ ERROR attribute `fake_attr` is currently unknown error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:11:3 | -LL | #[fake_attr(name = "hello")] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(name = "hello")] | ^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -41,7 +41,7 @@ LL | #[fake_attr(name = "hello")] //~ ERROR attribute `fake_attr` is currently u error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:12:3 | -LL | #[fake_attr(1, "hi", key = 12, true, false)] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(1, "hi", key = 12, true, false)] | ^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -49,7 +49,7 @@ LL | #[fake_attr(1, "hi", key = 12, true, false)] //~ ERROR attribute `fake_attr error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:13:3 | -LL | #[fake_attr(key = "hello", val = 10)] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(key = "hello", val = 10)] | ^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -57,7 +57,7 @@ LL | #[fake_attr(key = "hello", val = 10)] //~ ERROR attribute `fake_attr` is cu error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:14:3 | -LL | #[fake_attr(key("hello"), val(10))] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(key("hello"), val(10))] | ^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -65,7 +65,7 @@ LL | #[fake_attr(key("hello"), val(10))] //~ ERROR attribute `fake_attr` is curr error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:15:3 | -LL | #[fake_attr(enabled = true, disabled = false)] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(enabled = true, disabled = false)] | ^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -73,7 +73,7 @@ LL | #[fake_attr(enabled = true, disabled = false)] //~ ERROR attribute `fake_at error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:16:3 | -LL | #[fake_attr(true)] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(true)] | ^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -81,7 +81,7 @@ LL | #[fake_attr(true)] //~ ERROR attribute `fake_attr` is currently unknown error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:17:3 | -LL | #[fake_attr(pi = 3.14159)] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(pi = 3.14159)] | ^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -89,7 +89,7 @@ LL | #[fake_attr(pi = 3.14159)] //~ ERROR attribute `fake_attr` is currently unk error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:18:3 | -LL | #[fake_attr(b"hi")] //~ ERROR attribute `fake_attr` is currently unknown +LL | #[fake_attr(b"hi")] | ^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -97,7 +97,7 @@ LL | #[fake_attr(b"hi")] //~ ERROR attribute `fake_attr` is currently unknown error[E0658]: The attribute `fake_doc` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/feature-gate-custom_attribute.rs:19:3 | -LL | #[fake_doc(r"doc")] //~ ERROR attribute `fake_doc` is currently unknown +LL | #[fake_doc(r"doc")] | ^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr b/src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr index 1aec87f0669..bac23b3a60d 100644 --- a/src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr +++ b/src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr @@ -1,7 +1,7 @@ error[E0658]: custom test frameworks are an unstable feature (see issue #50297) --> $DIR/feature-gate-custom_test_frameworks.rs:1:1 | -LL | #![test_runner(main)] //~ ERROR custom test frameworks are an unstable feature +LL | #![test_runner(main)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(custom_test_frameworks)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-decl_macro.stderr b/src/test/ui/feature-gates/feature-gate-decl_macro.stderr index 01ec3d8b2e2..2d4b622843d 100644 --- a/src/test/ui/feature-gates/feature-gate-decl_macro.stderr +++ b/src/test/ui/feature-gates/feature-gate-decl_macro.stderr @@ -1,7 +1,7 @@ error[E0658]: `macro` is experimental (see issue #39412) --> $DIR/feature-gate-decl_macro.rs:3:1 | -LL | macro m() {} //~ ERROR `macro` is experimental (see issue #39412) +LL | macro m() {} | ^^^^^^^^^^^^ | = help: add #![feature(decl_macro)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-doc_alias.stderr b/src/test/ui/feature-gates/feature-gate-doc_alias.stderr index 91845329534..c585a96adf6 100644 --- a/src/test/ui/feature-gates/feature-gate-doc_alias.stderr +++ b/src/test/ui/feature-gates/feature-gate-doc_alias.stderr @@ -1,7 +1,7 @@ error[E0658]: #[doc(alias = "...")] is experimental (see issue #50146) --> $DIR/feature-gate-doc_alias.rs:1:1 | -LL | #[doc(alias = "foo")] //~ ERROR: #[doc(alias = "...")] is experimental +LL | #[doc(alias = "foo")] | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(doc_alias)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-doc_cfg-cfg-rustdoc.stderr b/src/test/ui/feature-gates/feature-gate-doc_cfg-cfg-rustdoc.stderr index 5bc56adb8ad..f018ff4a9d7 100644 --- a/src/test/ui/feature-gates/feature-gate-doc_cfg-cfg-rustdoc.stderr +++ b/src/test/ui/feature-gates/feature-gate-doc_cfg-cfg-rustdoc.stderr @@ -1,7 +1,7 @@ error[E0658]: `cfg(rustdoc)` is experimental and subject to change (see issue #43781) --> $DIR/feature-gate-doc_cfg-cfg-rustdoc.rs:1:7 | -LL | #[cfg(rustdoc)] //~ ERROR: `cfg(rustdoc)` is experimental and subject to change +LL | #[cfg(rustdoc)] | ^^^^^^^ | = help: add #![feature(doc_cfg)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-doc_cfg.stderr b/src/test/ui/feature-gates/feature-gate-doc_cfg.stderr index 20e3a4dbbca..2a0aa4ff3c2 100644 --- a/src/test/ui/feature-gates/feature-gate-doc_cfg.stderr +++ b/src/test/ui/feature-gates/feature-gate-doc_cfg.stderr @@ -1,7 +1,7 @@ error[E0658]: #[doc(cfg(...))] is experimental (see issue #43781) --> $DIR/feature-gate-doc_cfg.rs:1:1 | -LL | #[doc(cfg(unix))] //~ ERROR: #[doc(cfg(...))] is experimental +LL | #[doc(cfg(unix))] | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(doc_cfg)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-doc_keyword.stderr b/src/test/ui/feature-gates/feature-gate-doc_keyword.stderr index 96f165d5a51..c2cc1dceda3 100644 --- a/src/test/ui/feature-gates/feature-gate-doc_keyword.stderr +++ b/src/test/ui/feature-gates/feature-gate-doc_keyword.stderr @@ -1,7 +1,7 @@ error[E0658]: #[doc(keyword = "...")] is experimental (see issue #51315) --> $DIR/feature-gate-doc_keyword.rs:1:1 | -LL | #[doc(keyword = "match")] //~ ERROR: #[doc(keyword = "...")] is experimental +LL | #[doc(keyword = "match")] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(doc_keyword)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-doc_masked.stderr b/src/test/ui/feature-gates/feature-gate-doc_masked.stderr index 044f21a9833..77d3a6f6fb3 100644 --- a/src/test/ui/feature-gates/feature-gate-doc_masked.stderr +++ b/src/test/ui/feature-gates/feature-gate-doc_masked.stderr @@ -1,7 +1,7 @@ error[E0658]: #[doc(masked)] is experimental (see issue #44027) --> $DIR/feature-gate-doc_masked.rs:1:1 | -LL | #[doc(masked)] //~ ERROR: #[doc(masked)] is experimental +LL | #[doc(masked)] | ^^^^^^^^^^^^^^ | = help: add #![feature(doc_masked)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-doc_spotlight.stderr b/src/test/ui/feature-gates/feature-gate-doc_spotlight.stderr index c7101b436e2..60f5c082188 100644 --- a/src/test/ui/feature-gates/feature-gate-doc_spotlight.stderr +++ b/src/test/ui/feature-gates/feature-gate-doc_spotlight.stderr @@ -1,7 +1,7 @@ error[E0658]: #[doc(spotlight)] is experimental (see issue #45040) --> $DIR/feature-gate-doc_spotlight.rs:1:1 | -LL | #[doc(spotlight)] //~ ERROR: #[doc(spotlight)] is experimental +LL | #[doc(spotlight)] | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(doc_spotlight)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-exclusive-range-pattern.stderr b/src/test/ui/feature-gates/feature-gate-exclusive-range-pattern.stderr index 2b43a480c6b..afb402174fb 100644 --- a/src/test/ui/feature-gates/feature-gate-exclusive-range-pattern.stderr +++ b/src/test/ui/feature-gates/feature-gate-exclusive-range-pattern.stderr @@ -1,7 +1,7 @@ error[E0658]: exclusive range pattern syntax is experimental (see issue #37854) --> $DIR/feature-gate-exclusive-range-pattern.rs:3:9 | -LL | 0 .. 3 => {} //~ ERROR exclusive range pattern syntax is experimental +LL | 0 .. 3 => {} | ^^^^^^ | = help: add #![feature(exclusive_range_pattern)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr b/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr index cbe6d567755..dd4ca1f67e3 100644 --- a/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr +++ b/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr @@ -1,7 +1,7 @@ error[E0005]: refutable pattern in local binding: `Err(_)` not covered --> $DIR/feature-gate-exhaustive-patterns.rs:7:9 | -LL | let Ok(_x) = foo(); //~ ERROR refutable pattern in local binding +LL | let Ok(_x) = foo(); | ^^^^^^ pattern `Err(_)` not covered error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-existential-type.stderr b/src/test/ui/feature-gates/feature-gate-existential-type.stderr index e83d5cdbde1..6b8b850b5cc 100644 --- a/src/test/ui/feature-gates/feature-gate-existential-type.stderr +++ b/src/test/ui/feature-gates/feature-gate-existential-type.stderr @@ -1,7 +1,7 @@ error[E0658]: existential types are unstable (see issue #34511) --> $DIR/feature-gate-existential-type.rs:3:1 | -LL | existential type Foo: std::fmt::Debug; //~ ERROR existential types are unstable +LL | existential type Foo: std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(existential_type)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | existential type Foo: std::fmt::Debug; //~ ERROR existential types are unst error[E0658]: existential types are unstable (see issue #34511) --> $DIR/feature-gate-existential-type.rs:11:5 | -LL | existential type Baa: std::fmt::Debug; //~ ERROR existential types are unstable +LL | existential type Baa: std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(existential_type)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-extern_absolute_paths.stderr b/src/test/ui/feature-gates/feature-gate-extern_absolute_paths.stderr index 1629547acb1..e31d888f007 100644 --- a/src/test/ui/feature-gates/feature-gate-extern_absolute_paths.stderr +++ b/src/test/ui/feature-gates/feature-gate-extern_absolute_paths.stderr @@ -1,13 +1,13 @@ error[E0432]: unresolved import `core` --> $DIR/feature-gate-extern_absolute_paths.rs:1:5 | -LL | use core::default; //~ ERROR unresolved import `core` +LL | use core::default; | ^^^^ maybe a missing `extern crate core;`? error[E0433]: failed to resolve: maybe a missing `extern crate core;`? --> $DIR/feature-gate-extern_absolute_paths.rs:4:19 | -LL | let _: u8 = ::core::default::Default(); //~ ERROR failed to resolve +LL | let _: u8 = ::core::default::Default(); | ^^^^ maybe a missing `extern crate core;`? error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-extern_prelude.stderr b/src/test/ui/feature-gates/feature-gate-extern_prelude.stderr index 7a13f61a27e..c15a8b33037 100644 --- a/src/test/ui/feature-gates/feature-gate-extern_prelude.stderr +++ b/src/test/ui/feature-gates/feature-gate-extern_prelude.stderr @@ -1,7 +1,7 @@ error: expected one of `!` or `::`, found `-` --> $DIR/feature-gate-extern_prelude.rs:1:4 | -LL | can-only-test-this-in-run-make-fulldeps //~ ERROR expected one of `!` or `::`, found `-` +LL | can-only-test-this-in-run-make-fulldeps | ^ expected one of `!` or `::` here error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-extern_types.stderr b/src/test/ui/feature-gates/feature-gate-extern_types.stderr index 70ba06cde45..7035d85ec2a 100644 --- a/src/test/ui/feature-gates/feature-gate-extern_types.stderr +++ b/src/test/ui/feature-gates/feature-gate-extern_types.stderr @@ -1,7 +1,7 @@ error[E0658]: extern types are experimental (see issue #43467) --> $DIR/feature-gate-extern_types.rs:2:5 | -LL | type T; //~ ERROR extern types are experimental +LL | type T; | ^^^^^^^ | = help: add #![feature(extern_types)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-external_doc.stderr b/src/test/ui/feature-gates/feature-gate-external_doc.stderr index b5cb9f564a3..16507bf596f 100644 --- a/src/test/ui/feature-gates/feature-gate-external_doc.stderr +++ b/src/test/ui/feature-gates/feature-gate-external_doc.stderr @@ -1,7 +1,7 @@ error[E0658]: #[doc(include = "...")] is experimental (see issue #44732) --> $DIR/feature-gate-external_doc.rs:1:1 | -LL | #[doc(include="asdf.md")] //~ ERROR: #[doc(include = "...")] is experimental +LL | #[doc(include="asdf.md")] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(external_doc)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-feature-gate.stderr b/src/test/ui/feature-gates/feature-gate-feature-gate.stderr index aee4f7ba47d..d79404263e4 100644 --- a/src/test/ui/feature-gates/feature-gate-feature-gate.stderr +++ b/src/test/ui/feature-gates/feature-gate-feature-gate.stderr @@ -1,7 +1,7 @@ error: unstable feature --> $DIR/feature-gate-feature-gate.rs:2:12 | -LL | #![feature(intrinsics)] //~ ERROR unstable feature +LL | #![feature(intrinsics)] | ^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.stderr b/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.stderr index 5c111fe78f4..f85ce8eeeac 100644 --- a/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.stderr +++ b/src/test/ui/feature-gates/feature-gate-ffi_returns_twice.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[ffi_returns_twice]` attribute is an experimental feature (see issue #58314) --> $DIR/feature-gate-ffi_returns_twice.rs:5:5 | -LL | #[ffi_returns_twice] //~ ERROR the `#[ffi_returns_twice]` attribute is an experimental feature (see issue #58314) +LL | #[ffi_returns_twice] | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(ffi_returns_twice)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-format_args_nl.stderr b/src/test/ui/feature-gates/feature-gate-format_args_nl.stderr index 135ec5eb0c0..58d2c790ffe 100644 --- a/src/test/ui/feature-gates/feature-gate-format_args_nl.stderr +++ b/src/test/ui/feature-gates/feature-gate-format_args_nl.stderr @@ -1,7 +1,7 @@ error[E0658]: `format_args_nl` is only for internal language use and is subject to change --> $DIR/feature-gate-format_args_nl.rs:2:5 | -LL | format_args_nl!(""); //~ ERROR `format_args_nl` is only for internal language use +LL | format_args_nl!(""); | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(format_args_nl)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-fundamental.stderr b/src/test/ui/feature-gates/feature-gate-fundamental.stderr index 47cf241cc3f..9faf2a88a6b 100644 --- a/src/test/ui/feature-gates/feature-gate-fundamental.stderr +++ b/src/test/ui/feature-gates/feature-gate-fundamental.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[fundamental]` attribute is an experimental feature (see issue #29635) --> $DIR/feature-gate-fundamental.rs:1:1 | -LL | #[fundamental] //~ ERROR the `#[fundamental]` attribute is an experimental feature +LL | #[fundamental] | ^^^^^^^^^^^^^^ | = help: add #![feature(fundamental)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-generators.stderr b/src/test/ui/feature-gates/feature-gate-generators.stderr index aea1e00d698..554eeae8dec 100644 --- a/src/test/ui/feature-gates/feature-gate-generators.stderr +++ b/src/test/ui/feature-gates/feature-gate-generators.stderr @@ -1,7 +1,7 @@ error[E0658]: yield syntax is experimental (see issue #43122) --> $DIR/feature-gate-generators.rs:2:5 | -LL | yield true; //~ ERROR yield syntax is experimental +LL | yield true; | ^^^^^^^^^^ | = help: add #![feature(generators)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | yield true; //~ ERROR yield syntax is experimental error[E0627]: yield statement outside of generator literal --> $DIR/feature-gate-generators.rs:2:5 | -LL | yield true; //~ ERROR yield syntax is experimental +LL | yield true; | ^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-global_asm.stderr b/src/test/ui/feature-gates/feature-gate-global_asm.stderr index b698777f623..fb9b47bd49c 100644 --- a/src/test/ui/feature-gates/feature-gate-global_asm.stderr +++ b/src/test/ui/feature-gates/feature-gate-global_asm.stderr @@ -1,7 +1,7 @@ error[E0658]: `global_asm!` is not stable enough for use and is subject to change (see issue #35119) --> $DIR/feature-gate-global_asm.rs:1:1 | -LL | global_asm!(""); //~ ERROR `global_asm!` is not stable +LL | global_asm!(""); | ^^^^^^^^^^^^^^^^ | = help: add #![feature(global_asm)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-infer_static_outlives_requirements.stderr b/src/test/ui/feature-gates/feature-gate-infer_static_outlives_requirements.stderr index 9f60a047cb4..689a3757343 100644 --- a/src/test/ui/feature-gates/feature-gate-infer_static_outlives_requirements.stderr +++ b/src/test/ui/feature-gates/feature-gate-infer_static_outlives_requirements.stderr @@ -3,13 +3,13 @@ error[E0310]: the parameter type `U` may not live long enough | LL | struct Foo { | - help: consider adding an explicit lifetime bound `U: 'static`... -LL | bar: Bar //~ ERROR the parameter type `U` may not live long enough [E0310] +LL | bar: Bar | ^^^^^^^^^^^ | note: ...so that the type `U` will meet its required lifetime bounds --> $DIR/feature-gate-infer_static_outlives_requirements.rs:5:5 | -LL | bar: Bar //~ ERROR the parameter type `U` may not live long enough [E0310] +LL | bar: Bar | ^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-intrinsics.stderr b/src/test/ui/feature-gates/feature-gate-intrinsics.stderr index 092cb98a2f9..5b032c6f1ea 100644 --- a/src/test/ui/feature-gates/feature-gate-intrinsics.stderr +++ b/src/test/ui/feature-gates/feature-gate-intrinsics.stderr @@ -1,8 +1,8 @@ error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-intrinsics.rs:1:1 | -LL | / extern "rust-intrinsic" { //~ ERROR intrinsics are subject to change -LL | | fn bar(); //~ ERROR unrecognized intrinsic function: `bar` +LL | / extern "rust-intrinsic" { +LL | | fn bar(); LL | | } | |_^ | @@ -11,7 +11,7 @@ LL | | } error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-intrinsics.rs:5:1 | -LL | extern "rust-intrinsic" fn baz() {} //~ ERROR intrinsics are subject to change +LL | extern "rust-intrinsic" fn baz() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(intrinsics)] to the crate attributes to enable @@ -19,7 +19,7 @@ LL | extern "rust-intrinsic" fn baz() {} //~ ERROR intrinsics are subject to cha error[E0093]: unrecognized intrinsic function: `bar` --> $DIR/feature-gate-intrinsics.rs:2:5 | -LL | fn bar(); //~ ERROR unrecognized intrinsic function: `bar` +LL | fn bar(); | ^^^^^^^^^ unrecognized intrinsic error: aborting due to 3 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-label_break_value.stderr b/src/test/ui/feature-gates/feature-gate-label_break_value.stderr index 347b8a9710e..b23db3c216d 100644 --- a/src/test/ui/feature-gates/feature-gate-label_break_value.stderr +++ b/src/test/ui/feature-gates/feature-gate-label_break_value.stderr @@ -1,7 +1,7 @@ error[E0658]: labels on blocks are unstable (see issue #48594) --> $DIR/feature-gate-label_break_value.rs:2:5 | -LL | 'a: { //~ ERROR labels on blocks are unstable +LL | 'a: { | ^^ | = help: add #![feature(label_break_value)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-lang-items.stderr b/src/test/ui/feature-gates/feature-gate-lang-items.stderr index ccbb711fe6d..f4c238d9f3f 100644 --- a/src/test/ui/feature-gates/feature-gate-lang-items.stderr +++ b/src/test/ui/feature-gates/feature-gate-lang-items.stderr @@ -1,7 +1,7 @@ error[E0658]: language items are subject to change --> $DIR/feature-gate-lang-items.rs:1:1 | -LL | #[lang = "foo"] //~ ERROR language items are subject to change +LL | #[lang = "foo"] | ^^^^^^^^^^^^^^^ | = help: add #![feature(lang_items)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | #[lang = "foo"] //~ ERROR language items are subject to change error[E0522]: definition of an unknown language item: `foo` --> $DIR/feature-gate-lang-items.rs:1:1 | -LL | #[lang = "foo"] //~ ERROR language items are subject to change +LL | #[lang = "foo"] | ^^^^^^^^^^^^^^^ definition of unknown language item `foo` error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-log_syntax.stderr b/src/test/ui/feature-gates/feature-gate-log_syntax.stderr index 33d1f07aa36..f29ee0b5a78 100644 --- a/src/test/ui/feature-gates/feature-gate-log_syntax.stderr +++ b/src/test/ui/feature-gates/feature-gate-log_syntax.stderr @@ -1,7 +1,7 @@ error[E0658]: `log_syntax!` is not stable enough for use and is subject to change (see issue #29598) --> $DIR/feature-gate-log_syntax.rs:2:5 | -LL | log_syntax!() //~ ERROR `log_syntax!` is not stable enough +LL | log_syntax!() | ^^^^^^^^^^^^^ | = help: add #![feature(log_syntax)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-log_syntax2.stderr b/src/test/ui/feature-gates/feature-gate-log_syntax2.stderr index bdcd922c6e1..c5a9b493728 100644 --- a/src/test/ui/feature-gates/feature-gate-log_syntax2.stderr +++ b/src/test/ui/feature-gates/feature-gate-log_syntax2.stderr @@ -1,7 +1,7 @@ error[E0658]: `log_syntax!` is not stable enough for use and is subject to change (see issue #29598) --> $DIR/feature-gate-log_syntax2.rs:4:22 | -LL | println!("{:?}", log_syntax!()); //~ ERROR `log_syntax!` is not stable +LL | println!("{:?}", log_syntax!()); | ^^^^^^^^^^^^^ | = help: add #![feature(log_syntax)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-main.stderr b/src/test/ui/feature-gates/feature-gate-main.stderr index c92887eded6..870cf1aa286 100644 --- a/src/test/ui/feature-gates/feature-gate-main.stderr +++ b/src/test/ui/feature-gates/feature-gate-main.stderr @@ -1,7 +1,7 @@ error[E0658]: declaration of a nonstandard #[main] function may change over time, for now a top-level `fn main()` is required (see issue #29634) --> $DIR/feature-gate-main.rs:2:1 | -LL | fn foo() {} //~ ERROR: declaration of a nonstandard #[main] function may change over time +LL | fn foo() {} | ^^^^^^^^^^^ | = help: add #![feature(main)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-min_const_fn.stderr b/src/test/ui/feature-gates/feature-gate-min_const_fn.stderr index 056e33111f0..f6666b40f3e 100644 --- a/src/test/ui/feature-gates/feature-gate-min_const_fn.stderr +++ b/src/test/ui/feature-gates/feature-gate-min_const_fn.stderr @@ -1,25 +1,25 @@ error[E0379]: trait fns cannot be declared const --> $DIR/feature-gate-min_const_fn.rs:6:5 | -LL | const fn foo() -> u32; //~ ERROR const fn is unstable +LL | const fn foo() -> u32; | ^^^^^ trait fns cannot be const error[E0379]: trait fns cannot be declared const --> $DIR/feature-gate-min_const_fn.rs:8:5 | -LL | const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable +LL | const fn bar() -> u32 { 0 } | ^^^^^ trait fns cannot be const error[E0379]: trait fns cannot be declared const --> $DIR/feature-gate-min_const_fn.rs:13:5 | -LL | const fn foo() -> u32 { 0 } //~ ERROR trait fns cannot be declared const +LL | const fn foo() -> u32 { 0 } | ^^^^^ trait fns cannot be const error[E0658]: const fn is unstable (see issue #57563) --> $DIR/feature-gate-min_const_fn.rs:6:5 | -LL | const fn foo() -> u32; //~ ERROR const fn is unstable +LL | const fn foo() -> u32; | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -27,7 +27,7 @@ LL | const fn foo() -> u32; //~ ERROR const fn is unstable error[E0658]: const fn is unstable (see issue #57563) --> $DIR/feature-gate-min_const_fn.rs:8:5 | -LL | const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable +LL | const fn bar() -> u32 { 0 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_fn)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-needs-allocator.stderr b/src/test/ui/feature-gates/feature-gate-needs-allocator.stderr index 8897f393dbd..012664e9b6b 100644 --- a/src/test/ui/feature-gates/feature-gate-needs-allocator.stderr +++ b/src/test/ui/feature-gates/feature-gate-needs-allocator.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[needs_allocator]` attribute is an experimental feature --> $DIR/feature-gate-needs-allocator.rs:1:1 | -LL | #![needs_allocator] //~ ERROR the `#[needs_allocator]` attribute is +LL | #![needs_allocator] | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(allocator_internals)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-never_type.stderr b/src/test/ui/feature-gates/feature-gate-never_type.stderr index c4f8771171e..13166db213e 100644 --- a/src/test/ui/feature-gates/feature-gate-never_type.stderr +++ b/src/test/ui/feature-gates/feature-gate-never_type.stderr @@ -1,7 +1,7 @@ error[E0658]: The `!` type is experimental (see issue #35121) --> $DIR/feature-gate-never_type.rs:7:17 | -LL | type Ma = (u32, !, i32); //~ ERROR type is experimental +LL | type Ma = (u32, !, i32); | ^ | = help: add #![feature(never_type)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | type Ma = (u32, !, i32); //~ ERROR type is experimental error[E0658]: The `!` type is experimental (see issue #35121) --> $DIR/feature-gate-never_type.rs:8:20 | -LL | type Meeshka = Vec; //~ ERROR type is experimental +LL | type Meeshka = Vec; | ^ | = help: add #![feature(never_type)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | type Meeshka = Vec; //~ ERROR type is experimental error[E0658]: The `!` type is experimental (see issue #35121) --> $DIR/feature-gate-never_type.rs:9:24 | -LL | type Mow = &'static fn(!) -> !; //~ ERROR type is experimental +LL | type Mow = &'static fn(!) -> !; | ^ | = help: add #![feature(never_type)] to the crate attributes to enable @@ -25,7 +25,7 @@ LL | type Mow = &'static fn(!) -> !; //~ ERROR type is experimental error[E0658]: The `!` type is experimental (see issue #35121) --> $DIR/feature-gate-never_type.rs:10:27 | -LL | type Skwoz = &'static mut !; //~ ERROR type is experimental +LL | type Skwoz = &'static mut !; | ^ | = help: add #![feature(never_type)] to the crate attributes to enable @@ -33,7 +33,7 @@ LL | type Skwoz = &'static mut !; //~ ERROR type is experimental error[E0658]: The `!` type is experimental (see issue #35121) --> $DIR/feature-gate-never_type.rs:13:16 | -LL | type Wub = !; //~ ERROR type is experimental +LL | type Wub = !; | ^ | = help: add #![feature(never_type)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-nll.stderr b/src/test/ui/feature-gates/feature-gate-nll.stderr index f7b431d19be..cc004e3a1da 100644 --- a/src/test/ui/feature-gates/feature-gate-nll.stderr +++ b/src/test/ui/feature-gates/feature-gate-nll.stderr @@ -3,7 +3,7 @@ error[E0506]: cannot assign to `x` because it is borrowed | LL | let p = &x; | - borrow of `x` occurs here -LL | x = 22; //~ ERROR cannot assign to `x` because it is borrowed [E0506] +LL | x = 22; | ^^^^^^ assignment to borrowed `x` occurs here error: aborting due to previous error diff --git a/src/test/ui/feature-gates/feature-gate-no-debug-2.stderr b/src/test/ui/feature-gates/feature-gate-no-debug-2.stderr index 9299ac739ce..1f8f114d7da 100644 --- a/src/test/ui/feature-gates/feature-gate-no-debug-2.stderr +++ b/src/test/ui/feature-gates/feature-gate-no-debug-2.stderr @@ -1,7 +1,7 @@ error: use of deprecated attribute `no_debug`: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand. See https://github.com/rust-lang/rust/issues/29721 --> $DIR/feature-gate-no-debug-2.rs:4:1 | -LL | #[no_debug] //~ ERROR use of deprecated attribute `no_debug` +LL | #[no_debug] | ^^^^^^^^^^^ help: remove this attribute | note: lint level defined here diff --git a/src/test/ui/feature-gates/feature-gate-no-debug.stderr b/src/test/ui/feature-gates/feature-gate-no-debug.stderr index bdb732af7d2..1ee2ec3c881 100644 --- a/src/test/ui/feature-gates/feature-gate-no-debug.stderr +++ b/src/test/ui/feature-gates/feature-gate-no-debug.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand (see issue #29721) --> $DIR/feature-gate-no-debug.rs:3:1 | -LL | #[no_debug] //~ ERROR the `#[no_debug]` attribute was +LL | #[no_debug] | ^^^^^^^^^^^ | = help: add #![feature(no_debug)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-no_core.stderr b/src/test/ui/feature-gates/feature-gate-no_core.stderr index 7390051b95d..279f2198a80 100644 --- a/src/test/ui/feature-gates/feature-gate-no_core.stderr +++ b/src/test/ui/feature-gates/feature-gate-no_core.stderr @@ -1,7 +1,7 @@ error[E0658]: no_core is experimental (see issue #29639) --> $DIR/feature-gate-no_core.rs:3:1 | -LL | #![no_core] //~ ERROR no_core is experimental +LL | #![no_core] | ^^^^^^^^^^^ | = help: add #![feature(no_core)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-non_ascii_idents.stderr b/src/test/ui/feature-gates/feature-gate-non_ascii_idents.stderr index 5c441189ea7..5e4c4649d01 100644 --- a/src/test/ui/feature-gates/feature-gate-non_ascii_idents.stderr +++ b/src/test/ui/feature-gates/feature-gate-non_ascii_idents.stderr @@ -1,7 +1,7 @@ error[E0658]: non-ascii idents are not fully supported. (see issue #55467) --> $DIR/feature-gate-non_ascii_idents.rs:1:22 | -LL | extern crate core as bäz; //~ ERROR non-ascii idents +LL | extern crate core as bäz; | ^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | extern crate core as bäz; //~ ERROR non-ascii idents error[E0658]: non-ascii idents are not fully supported. (see issue #55467) --> $DIR/feature-gate-non_ascii_idents.rs:3:5 | -LL | use föö::bar; //~ ERROR non-ascii idents +LL | use föö::bar; | ^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | use föö::bar; //~ ERROR non-ascii idents error[E0658]: non-ascii idents are not fully supported. (see issue #55467) --> $DIR/feature-gate-non_ascii_idents.rs:5:5 | -LL | mod föö { //~ ERROR non-ascii idents +LL | mod föö { | ^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -25,7 +25,7 @@ LL | mod föö { //~ ERROR non-ascii idents error[E0658]: non-ascii idents are not fully supported. (see issue #55467) --> $DIR/feature-gate-non_ascii_idents.rs:9:4 | -LL | fn bär( //~ ERROR non-ascii idents +LL | fn bär( | ^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -33,7 +33,7 @@ LL | fn bär( //~ ERROR non-ascii idents error[E0658]: non-ascii idents are not fully supported. (see issue #55467) --> $DIR/feature-gate-non_ascii_idents.rs:10:5 | -LL | bäz: isize //~ ERROR non-ascii idents +LL | bäz: isize | ^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -41,7 +41,7 @@ LL | bäz: isize //~ ERROR non-ascii idents error[E0658]: non-ascii idents are not fully supported. (see issue #55467) --> $DIR/feature-gate-non_ascii_idents.rs:12:9 | -LL | let _ö: isize; //~ ERROR non-ascii idents +LL | let _ö: isize; | ^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -49,7 +49,7 @@ LL | let _ö: isize; //~ ERROR non-ascii idents error[E0658]: non-ascii idents are not fully supported. (see issue #55467) --> $DIR/feature-gate-non_ascii_idents.rs:15:10 | -LL | (_ä, _) => {} //~ ERROR non-ascii idents +LL | (_ä, _) => {} | ^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -57,7 +57,7 @@ LL | (_ä, _) => {} //~ ERROR non-ascii idents error[E0658]: non-ascii idents are not fully supported. (see issue #55467) --> $DIR/feature-gate-non_ascii_idents.rs:19:8 | -LL | struct Föö { //~ ERROR non-ascii idents +LL | struct Föö { | ^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -65,7 +65,7 @@ LL | struct Föö { //~ ERROR non-ascii idents error[E0658]: non-ascii idents are not fully supported. (see issue #55467) --> $DIR/feature-gate-non_ascii_idents.rs:20:5 | -LL | föö: isize //~ ERROR non-ascii idents +LL | föö: isize | ^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -73,7 +73,7 @@ LL | föö: isize //~ ERROR non-ascii idents error[E0658]: non-ascii idents are not fully supported. (see issue #55467) --> $DIR/feature-gate-non_ascii_idents.rs:23:6 | -LL | enum Bär { //~ ERROR non-ascii idents +LL | enum Bär { | ^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -81,7 +81,7 @@ LL | enum Bär { //~ ERROR non-ascii idents error[E0658]: non-ascii idents are not fully supported. (see issue #55467) --> $DIR/feature-gate-non_ascii_idents.rs:24:5 | -LL | Bäz { //~ ERROR non-ascii idents +LL | Bäz { | ^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -89,7 +89,7 @@ LL | Bäz { //~ ERROR non-ascii idents error[E0658]: non-ascii idents are not fully supported. (see issue #55467) --> $DIR/feature-gate-non_ascii_idents.rs:25:9 | -LL | qüx: isize //~ ERROR non-ascii idents +LL | qüx: isize | ^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -97,7 +97,7 @@ LL | qüx: isize //~ ERROR non-ascii idents error[E0658]: non-ascii idents are not fully supported. (see issue #55467) --> $DIR/feature-gate-non_ascii_idents.rs:30:8 | -LL | fn qüx(); //~ ERROR non-ascii idents +LL | fn qüx(); | ^^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-non_exhaustive.stderr b/src/test/ui/feature-gates/feature-gate-non_exhaustive.stderr index 9b45e19c3a3..524f77902f6 100644 --- a/src/test/ui/feature-gates/feature-gate-non_exhaustive.stderr +++ b/src/test/ui/feature-gates/feature-gate-non_exhaustive.stderr @@ -1,7 +1,7 @@ error[E0658]: non exhaustive is an experimental feature (see issue #44109) --> $DIR/feature-gate-non_exhaustive.rs:3:1 | -LL | #[non_exhaustive] //~ERROR non exhaustive is an experimental feature (see issue #44109) +LL | #[non_exhaustive] | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(non_exhaustive)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr b/src/test/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr index de1f03cc170..683424899a2 100644 --- a/src/test/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr +++ b/src/test/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[omit_gdb_pretty_printer_section]` attribute is just used for the Rust test suite --> $DIR/feature-gate-omit-gdb-pretty-printer-section.rs:1:1 | -LL | #[omit_gdb_pretty_printer_section] //~ ERROR the `#[omit_gdb_pretty_printer_section]` attribute is +LL | #[omit_gdb_pretty_printer_section] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(omit_gdb_pretty_printer_section)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr b/src/test/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr index fd1e5392e69..12b796d2e60 100644 --- a/src/test/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr +++ b/src/test/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `_` not covered --> $DIR/feature-gate-precise_pointer_size_matching.rs:6:11 | -LL | match 0usize { //~ERROR non-exhaustive patterns: `_` not covered +LL | match 0usize { | ^^^^^^ pattern `_` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -9,7 +9,7 @@ LL | match 0usize { //~ERROR non-exhaustive patterns: `_` not covered error[E0004]: non-exhaustive patterns: `_` not covered --> $DIR/feature-gate-precise_pointer_size_matching.rs:10:11 | -LL | match 0isize { //~ERROR non-exhaustive patterns: `_` not covered +LL | match 0isize { | ^^^^^^ pattern `_` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/feature-gates/feature-gate-prelude_import.stderr b/src/test/ui/feature-gates/feature-gate-prelude_import.stderr index c0016d24f35..7501954f904 100644 --- a/src/test/ui/feature-gates/feature-gate-prelude_import.stderr +++ b/src/test/ui/feature-gates/feature-gate-prelude_import.stderr @@ -1,7 +1,7 @@ error[E0658]: `#[prelude_import]` is for use by rustc only --> $DIR/feature-gate-prelude_import.rs:1:1 | -LL | #[prelude_import] //~ ERROR `#[prelude_import]` is for use by rustc only +LL | #[prelude_import] | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(prelude_import)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-profiler-runtime.stderr b/src/test/ui/feature-gates/feature-gate-profiler-runtime.stderr index 2d6ef277572..1f335401f99 100644 --- a/src/test/ui/feature-gates/feature-gate-profiler-runtime.stderr +++ b/src/test/ui/feature-gates/feature-gate-profiler-runtime.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[profiler_runtime]` attribute is used to identify the `profiler_builtins` crate which contains the profiler runtime and will never be stable --> $DIR/feature-gate-profiler-runtime.rs:1:1 | -LL | #![profiler_runtime] //~ ERROR the `#[profiler_runtime]` attribute is +LL | #![profiler_runtime] | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(profiler_runtime)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-repr-simd.stderr b/src/test/ui/feature-gates/feature-gate-repr-simd.stderr index 20cdbceeb68..c47ce70eaae 100644 --- a/src/test/ui/feature-gates/feature-gate-repr-simd.stderr +++ b/src/test/ui/feature-gates/feature-gate-repr-simd.stderr @@ -1,7 +1,7 @@ error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-repr-simd.rs:1:1 | -LL | #[repr(simd)] //~ error: SIMD types are experimental +LL | #[repr(simd)] | ^^^^^^^^^^^^^ | = help: add #![feature(repr_simd)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | #[repr(simd)] //~ error: SIMD types are experimental error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-repr-simd.rs:5:1 | -LL | #[repr(simd)] //~ error: SIMD types are experimental +LL | #[repr(simd)] | ^^^^^^^^^^^^^ | = help: add #![feature(repr_simd)] to the crate attributes to enable @@ -17,9 +17,9 @@ LL | #[repr(simd)] //~ error: SIMD types are experimental warning[E0566]: conflicting representation hints --> $DIR/feature-gate-repr-simd.rs:4:8 | -LL | #[repr(C)] //~ warn: conflicting representation hints +LL | #[repr(C)] | ^ -LL | #[repr(simd)] //~ error: SIMD types are experimental +LL | #[repr(simd)] | ^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-repr128.stderr b/src/test/ui/feature-gates/feature-gate-repr128.stderr index ddd11f6daab..a2fd6593599 100644 --- a/src/test/ui/feature-gates/feature-gate-repr128.stderr +++ b/src/test/ui/feature-gates/feature-gate-repr128.stderr @@ -1,7 +1,7 @@ error[E0658]: repr with 128-bit type is unstable (see issue #35118) --> $DIR/feature-gate-repr128.rs:2:1 | -LL | / enum A { //~ ERROR repr with 128-bit type is unstable +LL | / enum A { LL | | A(u64) LL | | } | |_^ diff --git a/src/test/ui/feature-gates/feature-gate-repr_align_enum.stderr b/src/test/ui/feature-gates/feature-gate-repr_align_enum.stderr index 6def25f9651..ae4066ceb80 100644 --- a/src/test/ui/feature-gates/feature-gate-repr_align_enum.stderr +++ b/src/test/ui/feature-gates/feature-gate-repr_align_enum.stderr @@ -1,7 +1,7 @@ error[E0658]: `#[repr(align(x))]` on enums is experimental (see issue #57996) --> $DIR/feature-gate-repr_align_enum.rs:4:1 | -LL | #[repr(align(8))] //~ ERROR `#[repr(align(x))]` on enums is experimental (see issue #57996) +LL | #[repr(align(8))] | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(repr_align_enum)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-rustc-attrs-1.stderr b/src/test/ui/feature-gates/feature-gate-rustc-attrs-1.stderr index 2b90699384b..73cd28fe749 100644 --- a/src/test/ui/feature-gates/feature-gate-rustc-attrs-1.stderr +++ b/src/test/ui/feature-gates/feature-gate-rustc-attrs-1.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[rustc_variance]` attribute is just used for rustc unit tests and will never be stable (see issue #29642) --> $DIR/feature-gate-rustc-attrs-1.rs:5:1 | -LL | #[rustc_variance] //~ ERROR the `#[rustc_variance]` attribute is just used for rustc unit tests and will never be stable +LL | #[rustc_variance] | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(rustc_attrs)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | #[rustc_variance] //~ ERROR the `#[rustc_variance]` attribute is just used error[E0658]: the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable (see issue #29642) --> $DIR/feature-gate-rustc-attrs-1.rs:6:1 | -LL | #[rustc_error] //~ ERROR the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable +LL | #[rustc_error] | ^^^^^^^^^^^^^^ | = help: add #![feature(rustc_attrs)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-rustc_const_unstable.stderr b/src/test/ui/feature-gates/feature-gate-rustc_const_unstable.stderr index 52d9b8db2fb..8f584c333ac 100644 --- a/src/test/ui/feature-gates/feature-gate-rustc_const_unstable.stderr +++ b/src/test/ui/feature-gates/feature-gate-rustc_const_unstable.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[rustc_const_unstable]` attribute is an internal feature --> $DIR/feature-gate-rustc_const_unstable.rs:8:1 | -LL | #[rustc_const_unstable(feature="fzzzzzt")] //~ERROR internal feature +LL | #[rustc_const_unstable(feature="fzzzzzt")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(rustc_const_unstable)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-sanitizer-runtime.stderr b/src/test/ui/feature-gates/feature-gate-sanitizer-runtime.stderr index 37e9b35c0ba..71d9890cb2c 100644 --- a/src/test/ui/feature-gates/feature-gate-sanitizer-runtime.stderr +++ b/src/test/ui/feature-gates/feature-gate-sanitizer-runtime.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[sanitizer_runtime]` attribute is used to identify crates that contain the runtime of a sanitizer and will never be stable --> $DIR/feature-gate-sanitizer-runtime.rs:1:1 | -LL | #![sanitizer_runtime] //~ ERROR the `#[sanitizer_runtime]` attribute is +LL | #![sanitizer_runtime] | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(sanitizer_runtime)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-simd-ffi.stderr b/src/test/ui/feature-gates/feature-gate-simd-ffi.stderr index 01005138a60..11e095fef3d 100644 --- a/src/test/ui/feature-gates/feature-gate-simd-ffi.stderr +++ b/src/test/ui/feature-gates/feature-gate-simd-ffi.stderr @@ -1,7 +1,7 @@ error: use of SIMD type `LocalSimd` in FFI is highly experimental and may result in invalid code --> $DIR/feature-gate-simd-ffi.rs:9:17 | -LL | fn baz() -> LocalSimd; //~ ERROR use of SIMD type +LL | fn baz() -> LocalSimd; | ^^^^^^^^^ | = help: add #![feature(simd_ffi)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | fn baz() -> LocalSimd; //~ ERROR use of SIMD type error: use of SIMD type `LocalSimd` in FFI is highly experimental and may result in invalid code --> $DIR/feature-gate-simd-ffi.rs:10:15 | -LL | fn qux(x: LocalSimd); //~ ERROR use of SIMD type +LL | fn qux(x: LocalSimd); | ^^^^^^^^^ | = help: add #![feature(simd_ffi)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-simd.stderr b/src/test/ui/feature-gates/feature-gate-simd.stderr index ad5ffa5e785..b37f138fbb5 100644 --- a/src/test/ui/feature-gates/feature-gate-simd.stderr +++ b/src/test/ui/feature-gates/feature-gate-simd.stderr @@ -1,7 +1,7 @@ error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731) --> $DIR/feature-gate-simd.rs:3:1 | -LL | #[repr(simd)] //~ ERROR SIMD types are experimental +LL | #[repr(simd)] | ^^^^^^^^^^^^^ | = help: add #![feature(repr_simd)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-slice-patterns.stderr b/src/test/ui/feature-gates/feature-gate-slice-patterns.stderr index 65dec6e1099..58eb57516eb 100644 --- a/src/test/ui/feature-gates/feature-gate-slice-patterns.stderr +++ b/src/test/ui/feature-gates/feature-gate-slice-patterns.stderr @@ -1,7 +1,7 @@ error[E0658]: syntax for subslices in slice patterns is not yet stabilized (see issue #23121) --> $DIR/feature-gate-slice-patterns.rs:6:16 | -LL | [1, 2, ..] => {} //~ ERROR syntax for subslices in slice patterns is not yet stabilized +LL | [1, 2, ..] => {} | ^^ | = help: add #![feature(slice_patterns)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | [1, 2, ..] => {} //~ ERROR syntax for subslices in slice patterns i error[E0658]: syntax for subslices in slice patterns is not yet stabilized (see issue #23121) --> $DIR/feature-gate-slice-patterns.rs:7:13 | -LL | [1, .., 5] => {} //~ ERROR syntax for subslices in slice patterns is not yet stabilized +LL | [1, .., 5] => {} | ^^ | = help: add #![feature(slice_patterns)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | [1, .., 5] => {} //~ ERROR syntax for subslices in slice patterns i error[E0658]: syntax for subslices in slice patterns is not yet stabilized (see issue #23121) --> $DIR/feature-gate-slice-patterns.rs:8:10 | -LL | [.., 4, 5] => {} //~ ERROR syntax for subslices in slice patterns is not yet stabilized +LL | [.., 4, 5] => {} | ^^ | = help: add #![feature(slice_patterns)] to the crate attributes to enable @@ -25,7 +25,7 @@ LL | [.., 4, 5] => {} //~ ERROR syntax for subslices in slice patterns i error[E0658]: syntax for subslices in slice patterns is not yet stabilized (see issue #23121) --> $DIR/feature-gate-slice-patterns.rs:13:11 | -LL | [ xs.., 4, 5 ] => {} //~ ERROR syntax for subslices in slice patterns is not yet stabilized +LL | [ xs.., 4, 5 ] => {} | ^^ | = help: add #![feature(slice_patterns)] to the crate attributes to enable @@ -33,7 +33,7 @@ LL | [ xs.., 4, 5 ] => {} //~ ERROR syntax for subslices in slice patter error[E0658]: syntax for subslices in slice patterns is not yet stabilized (see issue #23121) --> $DIR/feature-gate-slice-patterns.rs:14:14 | -LL | [ 1, xs.., 5 ] => {} //~ ERROR syntax for subslices in slice patterns is not yet stabilized +LL | [ 1, xs.., 5 ] => {} | ^^ | = help: add #![feature(slice_patterns)] to the crate attributes to enable @@ -41,7 +41,7 @@ LL | [ 1, xs.., 5 ] => {} //~ ERROR syntax for subslices in slice patter error[E0658]: syntax for subslices in slice patterns is not yet stabilized (see issue #23121) --> $DIR/feature-gate-slice-patterns.rs:15:17 | -LL | [ 1, 2, xs.. ] => {} //~ ERROR syntax for subslices in slice patterns is not yet stabilized +LL | [ 1, 2, xs.. ] => {} | ^^ | = help: add #![feature(slice_patterns)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-thread_local.stderr b/src/test/ui/feature-gates/feature-gate-thread_local.stderr index dc7d67a2053..38064a6bc94 100644 --- a/src/test/ui/feature-gates/feature-gate-thread_local.stderr +++ b/src/test/ui/feature-gates/feature-gate-thread_local.stderr @@ -1,7 +1,7 @@ error[E0658]: `#[thread_local]` is an experimental feature, and does not currently handle destructors. (see issue #29594) --> $DIR/feature-gate-thread_local.rs:8:1 | -LL | #[thread_local] //~ ERROR `#[thread_local]` is an experimental feature +LL | #[thread_local] | ^^^^^^^^^^^^^^^ | = help: add #![feature(thread_local)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-trace_macros.stderr b/src/test/ui/feature-gates/feature-gate-trace_macros.stderr index 9f4b01e45b6..ee22bd25091 100644 --- a/src/test/ui/feature-gates/feature-gate-trace_macros.stderr +++ b/src/test/ui/feature-gates/feature-gate-trace_macros.stderr @@ -1,7 +1,7 @@ error[E0658]: `trace_macros` is not stable enough for use and is subject to change (see issue #29598) --> $DIR/feature-gate-trace_macros.rs:2:5 | -LL | trace_macros!(true); //~ ERROR: `trace_macros` is not stable +LL | trace_macros!(true); | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(trace_macros)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr b/src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr index 1f35efa59b6..b04a6e4d671 100644 --- a/src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr +++ b/src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `i32: Foo` is not satisfied --> $DIR/feature-gate-trivial_bounds.rs:10:1 | -LL | enum E where i32: Foo { V } //~ ERROR +LL | enum E where i32: Foo { V } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32` | = help: see issue #48214 @@ -10,7 +10,7 @@ LL | enum E where i32: Foo { V } //~ ERROR error[E0277]: the trait bound `i32: Foo` is not satisfied --> $DIR/feature-gate-trivial_bounds.rs:12:1 | -LL | struct S where i32: Foo; //~ ERROR +LL | struct S where i32: Foo; | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32` | = help: see issue #48214 @@ -19,7 +19,7 @@ LL | struct S where i32: Foo; //~ ERROR error[E0277]: the trait bound `i32: Foo` is not satisfied --> $DIR/feature-gate-trivial_bounds.rs:14:1 | -LL | trait T where i32: Foo {} //~ ERROR +LL | trait T where i32: Foo {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32` | = help: see issue #48214 @@ -28,7 +28,7 @@ LL | trait T where i32: Foo {} //~ ERROR error[E0277]: the trait bound `i32: Foo` is not satisfied --> $DIR/feature-gate-trivial_bounds.rs:16:1 | -LL | union U where i32: Foo { f: i32 } //~ ERROR +LL | union U where i32: Foo { f: i32 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32` | = help: see issue #48214 @@ -37,7 +37,7 @@ LL | union U where i32: Foo { f: i32 } //~ ERROR error[E0277]: the trait bound `i32: Foo` is not satisfied --> $DIR/feature-gate-trivial_bounds.rs:20:1 | -LL | / impl Foo for () where i32: Foo { //~ ERROR +LL | / impl Foo for () where i32: Foo { LL | | fn test(&self) { LL | | 3i32.test(); LL | | Foo::test(&4i32); @@ -52,7 +52,7 @@ LL | | } error[E0277]: the trait bound `i32: Foo` is not satisfied --> $DIR/feature-gate-trivial_bounds.rs:28:1 | -LL | / fn f() where i32: Foo //~ ERROR +LL | / fn f() where i32: Foo LL | | { LL | | let s = S; LL | | 3i32.test(); @@ -67,7 +67,7 @@ LL | | } error[E0277]: the trait bound `std::string::String: std::ops::Neg` is not satisfied --> $DIR/feature-gate-trivial_bounds.rs:36:1 | -LL | / fn use_op(s: String) -> String where String: ::std::ops::Neg { //~ ERROR +LL | / fn use_op(s: String) -> String where String: ::std::ops::Neg { LL | | -s LL | | } | |_^ the trait `std::ops::Neg` is not implemented for `std::string::String` @@ -78,7 +78,7 @@ LL | | } error[E0277]: `i32` is not an iterator --> $DIR/feature-gate-trivial_bounds.rs:40:1 | -LL | / fn use_for() where i32: Iterator { //~ ERROR +LL | / fn use_for() where i32: Iterator { LL | | for _ in 2i32 {} LL | | } | |_^ `i32` is not an iterator @@ -91,7 +91,7 @@ LL | | } error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/feature-gate-trivial_bounds.rs:52:1 | -LL | struct TwoStrs(str, str) where str: Sized; //~ ERROR +LL | struct TwoStrs(str, str) where str: Sized; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` @@ -102,7 +102,7 @@ LL | struct TwoStrs(str, str) where str: Sized; //~ ERROR error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time --> $DIR/feature-gate-trivial_bounds.rs:55:1 | -LL | / fn unsized_local() where Dst: Sized { //~ ERROR +LL | / fn unsized_local() where Dst: Sized { LL | | let x: Dst = *(Box::new(Dst { x: 1 }) as Box>); LL | | } | |_^ doesn't have a size known at compile-time @@ -116,7 +116,7 @@ LL | | } error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/feature-gate-trivial_bounds.rs:59:1 | -LL | / fn return_str() -> str where str: Sized { //~ ERROR +LL | / fn return_str() -> str where str: Sized { LL | | *"Sized".to_string().into_boxed_str() LL | | } | |_^ doesn't have a size known at compile-time diff --git a/src/test/ui/feature-gates/feature-gate-try_blocks.stderr b/src/test/ui/feature-gates/feature-gate-try_blocks.stderr index 209a445194d..74ad0e70c96 100644 --- a/src/test/ui/feature-gates/feature-gate-try_blocks.stderr +++ b/src/test/ui/feature-gates/feature-gate-try_blocks.stderr @@ -1,7 +1,7 @@ error[E0658]: `try` expression is experimental (see issue #31436) --> $DIR/feature-gate-try_blocks.rs:4:33 | -LL | let try_result: Option<_> = try { //~ ERROR `try` expression is experimental +LL | let try_result: Option<_> = try { | _________________________________^ LL | | let x = 5; LL | | x diff --git a/src/test/ui/feature-gates/feature-gate-try_reserve.stderr b/src/test/ui/feature-gates/feature-gate-try_reserve.stderr index 4ced5037f38..61a3249c2ab 100644 --- a/src/test/ui/feature-gates/feature-gate-try_reserve.stderr +++ b/src/test/ui/feature-gates/feature-gate-try_reserve.stderr @@ -1,7 +1,7 @@ error[E0658]: use of unstable library feature 'try_reserve': new API (see issue #48043) --> $DIR/feature-gate-try_reserve.rs:3:7 | -LL | v.try_reserve(10); //~ ERROR: use of unstable library feature 'try_reserve' +LL | v.try_reserve(10); | ^^^^^^^^^^^ | = help: add #![feature(try_reserve)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-type_ascription.stderr b/src/test/ui/feature-gates/feature-gate-type_ascription.stderr index 4cf1f29f1ab..13dbb602967 100644 --- a/src/test/ui/feature-gates/feature-gate-type_ascription.stderr +++ b/src/test/ui/feature-gates/feature-gate-type_ascription.stderr @@ -1,7 +1,7 @@ error[E0658]: type ascription is experimental (see issue #23416) --> $DIR/feature-gate-type_ascription.rs:4:13 | -LL | let a = 10: u8; //~ ERROR type ascription is experimental +LL | let a = 10: u8; | ^^^^^^ | = help: add #![feature(type_ascription)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-unboxed-closures-method-calls.stderr b/src/test/ui/feature-gates/feature-gate-unboxed-closures-method-calls.stderr index 8730bf678fd..519f6528323 100644 --- a/src/test/ui/feature-gates/feature-gate-unboxed-closures-method-calls.stderr +++ b/src/test/ui/feature-gates/feature-gate-unboxed-closures-method-calls.stderr @@ -1,7 +1,7 @@ error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) --> $DIR/feature-gate-unboxed-closures-method-calls.rs:4:7 | -LL | f.call(()); //~ ERROR use of unstable library feature 'fn_traits' +LL | f.call(()); | ^^^^ | = help: add #![feature(fn_traits)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | f.call(()); //~ ERROR use of unstable library feature 'fn_traits' error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) --> $DIR/feature-gate-unboxed-closures-method-calls.rs:5:7 | -LL | f.call_mut(()); //~ ERROR use of unstable library feature 'fn_traits' +LL | f.call_mut(()); | ^^^^^^^^ | = help: add #![feature(fn_traits)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | f.call_mut(()); //~ ERROR use of unstable library feature 'fn_traits' error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) --> $DIR/feature-gate-unboxed-closures-method-calls.rs:6:7 | -LL | f.call_once(()); //~ ERROR use of unstable library feature 'fn_traits' +LL | f.call_once(()); | ^^^^^^^^^ | = help: add #![feature(fn_traits)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.stderr b/src/test/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.stderr index 266775484a9..a49a8b4cdb2 100644 --- a/src/test/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.stderr +++ b/src/test/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.stderr @@ -1,7 +1,7 @@ error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:4:5 | -LL | Fn::call(&f, ()); //~ ERROR use of unstable library feature 'fn_traits' +LL | Fn::call(&f, ()); | ^^^^^^^^ | = help: add #![feature(fn_traits)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | Fn::call(&f, ()); //~ ERROR use of unstable library feature 'fn_traits' error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:5:5 | -LL | FnMut::call_mut(&mut f, ()); //~ ERROR use of unstable library feature 'fn_traits' +LL | FnMut::call_mut(&mut f, ()); | ^^^^^^^^^^^^^^^ | = help: add #![feature(fn_traits)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | FnMut::call_mut(&mut f, ()); //~ ERROR use of unstable library feature error[E0658]: use of unstable library feature 'fn_traits' (see issue #29625) --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:6:5 | -LL | FnOnce::call_once(f, ()); //~ ERROR use of unstable library feature 'fn_traits' +LL | FnOnce::call_once(f, ()); | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(fn_traits)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-underscore_const_names.stderr b/src/test/ui/feature-gates/feature-gate-underscore_const_names.stderr index d608f3d37cf..ef93bb97ab4 100644 --- a/src/test/ui/feature-gates/feature-gate-underscore_const_names.stderr +++ b/src/test/ui/feature-gates/feature-gate-underscore_const_names.stderr @@ -2,7 +2,7 @@ error[E0658]: naming constants with `_` is unstable (see issue #54912) --> $DIR/feature-gate-underscore_const_names.rs:6:1 | LL | / const _ : () = { -LL | | //~^ ERROR is unstable +LL | | LL | | use std::marker::PhantomData; LL | | struct ImplementsTrait(PhantomData); LL | | let _ = ImplementsTrait::(PhantomData); diff --git a/src/test/ui/feature-gates/feature-gate-untagged_unions.stderr b/src/test/ui/feature-gates/feature-gate-untagged_unions.stderr index f9f8cfe9171..6faa0528dc7 100644 --- a/src/test/ui/feature-gates/feature-gate-untagged_unions.stderr +++ b/src/test/ui/feature-gates/feature-gate-untagged_unions.stderr @@ -1,7 +1,7 @@ error[E0658]: unions with non-`Copy` fields are unstable (see issue #32836) --> $DIR/feature-gate-untagged_unions.rs:9:1 | -LL | / union U3 { //~ ERROR unions with non-`Copy` fields are unstable +LL | / union U3 { LL | | a: String, LL | | } | |_^ @@ -11,7 +11,7 @@ LL | | } error[E0658]: unions with non-`Copy` fields are unstable (see issue #32836) --> $DIR/feature-gate-untagged_unions.rs:13:1 | -LL | / union U4 { //~ ERROR unions with non-`Copy` fields are unstable +LL | / union U4 { LL | | a: T, LL | | } | |_^ @@ -21,7 +21,7 @@ LL | | } error[E0658]: unions with `Drop` implementations are unstable (see issue #32836) --> $DIR/feature-gate-untagged_unions.rs:17:1 | -LL | / union U5 { //~ ERROR unions with `Drop` implementations are unstable +LL | / union U5 { LL | | a: u8, LL | | } | |_^ diff --git a/src/test/ui/feature-gates/feature-gate-unwind-attributes.stderr b/src/test/ui/feature-gates/feature-gate-unwind-attributes.stderr index 77f2f13c99e..149ce9e4f82 100644 --- a/src/test/ui/feature-gates/feature-gate-unwind-attributes.stderr +++ b/src/test/ui/feature-gates/feature-gate-unwind-attributes.stderr @@ -1,7 +1,7 @@ error[E0658]: #[unwind] is experimental (see issue #58760) --> $DIR/feature-gate-unwind-attributes.rs:11:5 | -LL | #[unwind(allowed)] //~ ERROR #[unwind] is experimental +LL | #[unwind(allowed)] | ^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unwind_attributes)] to the crate attributes to enable diff --git a/src/test/ui/feature-gates/underscore_const_names_feature_gate.stderr b/src/test/ui/feature-gates/underscore_const_names_feature_gate.stderr index a42b8e579c9..83b3017a4cd 100644 --- a/src/test/ui/feature-gates/underscore_const_names_feature_gate.stderr +++ b/src/test/ui/feature-gates/underscore_const_names_feature_gate.stderr @@ -1,7 +1,7 @@ error[E0658]: naming constants with `_` is unstable (see issue #54912) --> $DIR/underscore_const_names_feature_gate.rs:1:1 | -LL | const _: () = (); //~ ERROR is unstable +LL | const _: () = (); | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(underscore_const_names)] to the crate attributes to enable diff --git a/src/test/ui/ffi_returns_twice.stderr b/src/test/ui/ffi_returns_twice.stderr index c2105ae1dac..e4137c79939 100644 --- a/src/test/ui/ffi_returns_twice.stderr +++ b/src/test/ui/ffi_returns_twice.stderr @@ -1,7 +1,7 @@ error[E0724]: `#[ffi_returns_twice]` may only be used on foreign functions --> $DIR/ffi_returns_twice.rs:5:1 | -LL | #[ffi_returns_twice] //~ ERROR `#[ffi_returns_twice]` may only be used on foreign functions +LL | #[ffi_returns_twice] | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/float-literal-inference-restrictions.stderr b/src/test/ui/float-literal-inference-restrictions.stderr index a69c13507e6..6ac49b7ccd1 100644 --- a/src/test/ui/float-literal-inference-restrictions.stderr +++ b/src/test/ui/float-literal-inference-restrictions.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/float-literal-inference-restrictions.rs:2:18 | -LL | let x: f32 = 1; //~ ERROR mismatched types +LL | let x: f32 = 1; | ^ | | | expected f32, found integer @@ -13,7 +13,7 @@ LL | let x: f32 = 1; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/float-literal-inference-restrictions.rs:3:18 | -LL | let y: f32 = 1f64; //~ ERROR mismatched types +LL | let y: f32 = 1f64; | ^^^^ expected f32, found f64 error: aborting due to 2 previous errors diff --git a/src/test/ui/fmt/send-sync.stderr b/src/test/ui/fmt/send-sync.stderr index 5abe0d0c50b..1f698c90cb9 100644 --- a/src/test/ui/fmt/send-sync.stderr +++ b/src/test/ui/fmt/send-sync.stderr @@ -1,7 +1,7 @@ error[E0277]: `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely --> $DIR/send-sync.rs:8:5 | -LL | send(format_args!("{:?}", c)); //~ ERROR E0277 +LL | send(format_args!("{:?}", c)); | ^^^^ `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely | = help: within `[std::fmt::ArgumentV1<'_>]`, the trait `std::marker::Sync` is not implemented for `*mut (dyn std::ops::Fn() + 'static)` @@ -21,7 +21,7 @@ LL | fn send(_: T) {} error[E0277]: `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely --> $DIR/send-sync.rs:9:5 | -LL | sync(format_args!("{:?}", c)); //~ ERROR E0277 +LL | sync(format_args!("{:?}", c)); | ^^^^ `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely | = help: within `std::fmt::Arguments<'_>`, the trait `std::marker::Sync` is not implemented for `*mut (dyn std::ops::Fn() + 'static)` diff --git a/src/test/ui/fn_must_use.stderr b/src/test/ui/fn_must_use.stderr index 4bba638c4e9..5a1a4e36e06 100644 --- a/src/test/ui/fn_must_use.stderr +++ b/src/test/ui/fn_must_use.stderr @@ -1,7 +1,7 @@ warning: unused return value of `need_to_use_this_value` that must be used --> $DIR/fn_must_use.rs:55:5 | -LL | need_to_use_this_value(); //~ WARN unused return value +LL | need_to_use_this_value(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here @@ -14,7 +14,7 @@ LL | #![warn(unused_must_use)] warning: unused return value of `MyStruct::need_to_use_this_method_value` that must be used --> $DIR/fn_must_use.rs:60:5 | -LL | m.need_to_use_this_method_value(); //~ WARN unused return value +LL | m.need_to_use_this_method_value(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused return value of `EvenNature::is_even` that must be used @@ -34,24 +34,24 @@ LL | MyStruct::need_to_use_this_associated_function_value(); warning: unused return value of `std::cmp::PartialEq::eq` that must be used --> $DIR/fn_must_use.rs:70:5 | -LL | 2.eq(&3); //~ WARN unused return value +LL | 2.eq(&3); | ^^^^^^^^^ warning: unused return value of `std::cmp::PartialEq::eq` that must be used --> $DIR/fn_must_use.rs:71:5 | -LL | m.eq(&n); //~ WARN unused return value +LL | m.eq(&n); | ^^^^^^^^^ warning: unused comparison that must be used --> $DIR/fn_must_use.rs:74:5 | -LL | 2 == 3; //~ WARN unused comparison +LL | 2 == 3; | ^^^^^^ warning: unused comparison that must be used --> $DIR/fn_must_use.rs:75:5 | -LL | m == n; //~ WARN unused comparison +LL | m == n; | ^^^^^^ diff --git a/src/test/ui/for/for-expn.stderr b/src/test/ui/for/for-expn.stderr index b598032e4c9..cdb21155527 100644 --- a/src/test/ui/for/for-expn.stderr +++ b/src/test/ui/for/for-expn.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `foo` in this scope --> $DIR/for-expn.rs:6:7 | -LL | foo //~ ERROR cannot find value `foo` in this scope +LL | foo | ^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/for/for-loop-refutable-pattern-error-message.stderr b/src/test/ui/for/for-loop-refutable-pattern-error-message.stderr index 88d82187716..da2b0dc234f 100644 --- a/src/test/ui/for/for-loop-refutable-pattern-error-message.stderr +++ b/src/test/ui/for/for-loop-refutable-pattern-error-message.stderr @@ -1,7 +1,7 @@ error[E0005]: refutable pattern in `for` loop binding: `&-2147483648i32..=0i32` not covered --> $DIR/for-loop-refutable-pattern-error-message.rs:2:9 | -LL | for &1 in [1].iter() {} //~ ERROR refutable pattern in `for` loop binding +LL | for &1 in [1].iter() {} | ^^ pattern `&-2147483648i32..=0i32` not covered error: aborting due to previous error diff --git a/src/test/ui/for/for-loop-type-error.stderr b/src/test/ui/for/for-loop-type-error.stderr index b5a4a5240d9..f1c1d0a5388 100644 --- a/src/test/ui/for/for-loop-type-error.stderr +++ b/src/test/ui/for/for-loop-type-error.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `+` cannot be applied to type `()` --> $DIR/for-loop-type-error.rs:2:13 | -LL | let x = () + (); //~ ERROR binary operation +LL | let x = () + (); | ^^^^^^^ | = note: an implementation of `std::ops::Add` might be missing for `()` diff --git a/src/test/ui/for/for-loop-unconstrained-element-type.stderr b/src/test/ui/for/for-loop-unconstrained-element-type.stderr index aaaad658de7..02fdb808da4 100644 --- a/src/test/ui/for/for-loop-unconstrained-element-type.stderr +++ b/src/test/ui/for/for-loop-unconstrained-element-type.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/for-loop-unconstrained-element-type.rs:8:14 | -LL | for i in Vec::new() { } //~ ERROR type annotations needed +LL | for i in Vec::new() { } | ^^^^^^^^^^ | | | cannot infer type diff --git a/src/test/ui/foreign-fn-return-lifetime.stderr b/src/test/ui/foreign-fn-return-lifetime.stderr index 00fda5dbd0c..575da18f240 100644 --- a/src/test/ui/foreign-fn-return-lifetime.stderr +++ b/src/test/ui/foreign-fn-return-lifetime.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/foreign-fn-return-lifetime.rs:5:19 | -LL | pub fn f() -> &u8; //~ ERROR missing lifetime specifier +LL | pub fn f() -> &u8; | ^ help: consider giving it a 'static lifetime: `&'static` | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from diff --git a/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.stderr b/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.stderr index a3497c59a52..5549adc8d0e 100644 --- a/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.stderr +++ b/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.stderr @@ -1,7 +1,7 @@ error[E0509]: cannot move out of type `A`, which implements the `Drop` trait --> $DIR/functional-struct-update-noncopyable.rs:12:36 | -LL | let _b = A { y: Arc::new(3), ..a }; //~ ERROR cannot move out of type `A` +LL | let _b = A { y: Arc::new(3), ..a }; | ^ cannot move out of here error: aborting due to previous error diff --git a/src/test/ui/future-incompatible-lint-group.stderr b/src/test/ui/future-incompatible-lint-group.stderr index 79183fca9d3..65c37e01eaa 100644 --- a/src/test/ui/future-incompatible-lint-group.stderr +++ b/src/test/ui/future-incompatible-lint-group.stderr @@ -1,7 +1,7 @@ error: anonymous parameters are deprecated and will be removed in the next edition. --> $DIR/future-incompatible-lint-group.rs:4:10 | -LL | fn f(u8) {} //~ ERROR anonymous parameters are deprecated +LL | fn f(u8) {} | ^^ help: Try naming the parameter or explicitly ignoring it: `_: u8` | note: lint level defined here diff --git a/src/test/ui/gated-bad-feature.stderr b/src/test/ui/gated-bad-feature.stderr index 141c51609b7..b208da3645d 100644 --- a/src/test/ui/gated-bad-feature.stderr +++ b/src/test/ui/gated-bad-feature.stderr @@ -13,19 +13,19 @@ LL | foo = "baz" error[E0557]: feature has been removed --> $DIR/gated-bad-feature.rs:12:12 | -LL | #![feature(test_removed_feature)] //~ ERROR: feature has been removed +LL | #![feature(test_removed_feature)] | ^^^^^^^^^^^^^^^^^^^^ error: attribute must be of the form `#[feature(name1, name1, ...)]` --> $DIR/gated-bad-feature.rs:9:1 | -LL | #![feature] //~ ERROR: attribute must be of the form +LL | #![feature] | ^^^^^^^^^^^ error: attribute must be of the form `#[feature(name1, name1, ...)]` --> $DIR/gated-bad-feature.rs:10:1 | -LL | #![feature = "foo"] //~ ERROR: attribute must be of the form +LL | #![feature = "foo"] | ^^^^^^^^^^^^^^^^^^^ error: aborting due to 5 previous errors diff --git a/src/test/ui/generator/borrowing.stderr b/src/test/ui/generator/borrowing.stderr index 169e4a8561c..38502aa8e0b 100644 --- a/src/test/ui/generator/borrowing.stderr +++ b/src/test/ui/generator/borrowing.stderr @@ -5,7 +5,7 @@ LL | Pin::new(&mut || yield &a).resume() | -- ^ borrowed value does not live long enough | | | capture occurs here -LL | //~^ ERROR: `a` does not live long enough +LL | LL | }; | - borrowed value only lives until here ... diff --git a/src/test/ui/generator/dropck.stderr b/src/test/ui/generator/dropck.stderr index fdaa5cfbae3..977f388a626 100644 --- a/src/test/ui/generator/dropck.stderr +++ b/src/test/ui/generator/dropck.stderr @@ -15,7 +15,7 @@ error[E0597]: `ref_` does not live long enough LL | gen = || { | -- capture occurs here LL | // but the generator can use it to drop a `Ref<'a, i32>`. -LL | let _d = ref_.take(); //~ ERROR `ref_` does not live long enough +LL | let _d = ref_.take(); | ^^^^ borrowed value does not live long enough ... LL | } diff --git a/src/test/ui/generator/generator-with-nll.stderr b/src/test/ui/generator/generator-with-nll.stderr index c683ea1a309..bd5abb20206 100644 --- a/src/test/ui/generator/generator-with-nll.stderr +++ b/src/test/ui/generator/generator-with-nll.stderr @@ -3,7 +3,7 @@ error[E0626]: borrow may still be in use when generator yields | LL | let b = &mut true; | ^^^^^^^^^ -LL | //~^ borrow may still be in use when generator yields +LL | LL | yield (); | -------- possible yield occurs here diff --git a/src/test/ui/generator/issue-48048.stderr b/src/test/ui/generator/issue-48048.stderr index aeea1022509..23423583916 100644 --- a/src/test/ui/generator/issue-48048.stderr +++ b/src/test/ui/generator/issue-48048.stderr @@ -1,7 +1,7 @@ error[E0626]: borrow may still be in use when generator yields --> $DIR/issue-48048.rs:9:9 | -LL | x.0({ //~ ERROR borrow may still be in use when generator yields +LL | x.0({ | ^^^ LL | yield; | ----- possible yield occurs here diff --git a/src/test/ui/generator/no-arguments-on-generators.stderr b/src/test/ui/generator/no-arguments-on-generators.stderr index 521001293af..47a12bbacc0 100644 --- a/src/test/ui/generator/no-arguments-on-generators.stderr +++ b/src/test/ui/generator/no-arguments-on-generators.stderr @@ -1,7 +1,7 @@ error[E0628]: generators cannot have explicit arguments --> $DIR/no-arguments-on-generators.rs:4:15 | -LL | let gen = |start| { //~ ERROR generators cannot have explicit arguments +LL | let gen = |start| { | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/generator/pattern-borrow.stderr b/src/test/ui/generator/pattern-borrow.stderr index 50442828d8d..d78da510491 100644 --- a/src/test/ui/generator/pattern-borrow.stderr +++ b/src/test/ui/generator/pattern-borrow.stderr @@ -1,7 +1,7 @@ error[E0626]: borrow may still be in use when generator yields --> $DIR/pattern-borrow.rs:9:24 | -LL | if let Test::A(ref _a) = test { //~ ERROR borrow may still be in use when generator yields +LL | if let Test::A(ref _a) = test { | ^^^^^^ LL | yield (); | -------- possible yield occurs here diff --git a/src/test/ui/generator/ref-escapes-but-not-over-yield.stderr b/src/test/ui/generator/ref-escapes-but-not-over-yield.stderr index 29299b2405a..20a06abebd6 100644 --- a/src/test/ui/generator/ref-escapes-but-not-over-yield.stderr +++ b/src/test/ui/generator/ref-escapes-but-not-over-yield.stderr @@ -3,7 +3,7 @@ error[E0597]: `b` does not live long enough | LL | a = &b; | ^ borrowed value does not live long enough -LL | //~^ ERROR `b` does not live long enough +LL | LL | }; | - `b` dropped here while still borrowed LL | } diff --git a/src/test/ui/generator/sized-yield.stderr b/src/test/ui/generator/sized-yield.stderr index c98f42e6216..c2caac7ebe2 100644 --- a/src/test/ui/generator/sized-yield.stderr +++ b/src/test/ui/generator/sized-yield.stderr @@ -3,7 +3,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t | LL | let mut gen = move || { | __________________________^ -LL | | //~^ ERROR the size for values of type +LL | | LL | | yield s[..]; LL | | }; | |____^ doesn't have a size known at compile-time diff --git a/src/test/ui/generator/static-not-unpin.stderr b/src/test/ui/generator/static-not-unpin.stderr index caf92f0ec69..404d3069f79 100644 --- a/src/test/ui/generator/static-not-unpin.stderr +++ b/src/test/ui/generator/static-not-unpin.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `[static generator@$DIR/static-not-unpin.rs:11:25: 13:6 _]: std::marker::Unpin` is not satisfied --> $DIR/static-not-unpin.rs:14:5 | -LL | assert_unpin(generator); //~ ERROR std::marker::Unpin` is not satisfied +LL | assert_unpin(generator); | ^^^^^^^^^^^^ the trait `std::marker::Unpin` is not implemented for `[static generator@$DIR/static-not-unpin.rs:11:25: 13:6 _]` | note: required by `assert_unpin` diff --git a/src/test/ui/generator/yield-in-args.stderr b/src/test/ui/generator/yield-in-args.stderr index f53677b5312..2f22dea4e91 100644 --- a/src/test/ui/generator/yield-in-args.stderr +++ b/src/test/ui/generator/yield-in-args.stderr @@ -1,7 +1,7 @@ error[E0626]: borrow may still be in use when generator yields --> $DIR/yield-in-args.rs:8:14 | -LL | foo(&b, yield); //~ ERROR +LL | foo(&b, yield); | ^ ----- possible yield occurs here error: aborting due to previous error diff --git a/src/test/ui/generator/yield-while-iterating.stderr b/src/test/ui/generator/yield-while-iterating.stderr index 1e3e31470e9..bcfe4f64bc3 100644 --- a/src/test/ui/generator/yield-while-iterating.stderr +++ b/src/test/ui/generator/yield-while-iterating.stderr @@ -1,7 +1,7 @@ error[E0626]: borrow may still be in use when generator yields --> $DIR/yield-while-iterating.rs:13:19 | -LL | for p in &x { //~ ERROR +LL | for p in &x { | ^ LL | yield(); | ------- possible yield occurs here @@ -14,7 +14,7 @@ LL | let mut b = || { LL | for p in &mut x { | - previous borrow occurs due to use of `x` in closure ... -LL | println!("{}", x[0]); //~ ERROR +LL | println!("{}", x[0]); | ^ immutable borrow occurs here LL | Pin::new(&mut b).resume(); LL | } diff --git a/src/test/ui/generator/yield-while-ref-reborrowed.stderr b/src/test/ui/generator/yield-while-ref-reborrowed.stderr index 5c9de279c02..155f2770d3d 100644 --- a/src/test/ui/generator/yield-while-ref-reborrowed.stderr +++ b/src/test/ui/generator/yield-while-ref-reborrowed.stderr @@ -6,7 +6,7 @@ LL | let mut b = || { LL | let a = &mut *x; | - previous borrow occurs due to use of `x` in closure ... -LL | println!("{}", x); //~ ERROR +LL | println!("{}", x); | ^ borrow occurs here LL | Pin::new(&mut b).resume(); LL | } diff --git a/src/test/ui/generic/generic-arg-mismatch-recover.stderr b/src/test/ui/generic/generic-arg-mismatch-recover.stderr index 37f6c61f06d..e16ad9120a6 100644 --- a/src/test/ui/generic/generic-arg-mismatch-recover.stderr +++ b/src/test/ui/generic/generic-arg-mismatch-recover.stderr @@ -1,13 +1,13 @@ error[E0107]: wrong number of lifetime arguments: expected 1, found 2 --> $DIR/generic-arg-mismatch-recover.rs:6:20 | -LL | Foo::<'static, 'static, ()>(&0); //~ ERROR wrong number of lifetime arguments +LL | Foo::<'static, 'static, ()>(&0); | ^^^^^^^ unexpected lifetime argument error[E0308]: mismatched types --> $DIR/generic-arg-mismatch-recover.rs:6:33 | -LL | Foo::<'static, 'static, ()>(&0); //~ ERROR wrong number of lifetime arguments +LL | Foo::<'static, 'static, ()>(&0); | ^^ expected (), found integer | = note: expected type `&'static ()` @@ -16,13 +16,13 @@ LL | Foo::<'static, 'static, ()>(&0); //~ ERROR wrong number of lifetime arg error[E0107]: wrong number of lifetime arguments: expected 1, found 2 --> $DIR/generic-arg-mismatch-recover.rs:9:20 | -LL | Bar::<'static, 'static, ()>(&()); //~ ERROR wrong number of lifetime arguments +LL | Bar::<'static, 'static, ()>(&()); | ^^^^^^^ unexpected lifetime argument error[E0107]: wrong number of type arguments: expected 0, found 1 --> $DIR/generic-arg-mismatch-recover.rs:9:29 | -LL | Bar::<'static, 'static, ()>(&()); //~ ERROR wrong number of lifetime arguments +LL | Bar::<'static, 'static, ()>(&()); | ^^ unexpected type argument error: aborting due to 4 previous errors diff --git a/src/test/ui/generic/generic-extern-lifetime.stderr b/src/test/ui/generic/generic-extern-lifetime.stderr index b31d2a88044..39372c93158 100644 --- a/src/test/ui/generic/generic-extern-lifetime.stderr +++ b/src/test/ui/generic/generic-extern-lifetime.stderr @@ -1,19 +1,19 @@ error[E0261]: use of undeclared lifetime name `'a` --> $DIR/generic-extern-lifetime.rs:6:24 | -LL | pub fn life2<'b>(x:&'a i32, y:&'b i32); //~ ERROR use of undeclared lifetime name `'a` +LL | pub fn life2<'b>(x:&'a i32, y:&'b i32); | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/generic-extern-lifetime.rs:8:36 | -LL | pub fn life4<'b>(x: for<'c> fn(&'a i32)); //~ ERROR use of undeclared lifetime name `'a` +LL | pub fn life4<'b>(x: for<'c> fn(&'a i32)); | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/generic-extern-lifetime.rs:11:38 | -LL | pub fn life7<'b>() -> for<'c> fn(&'a i32); //~ ERROR use of undeclared lifetime name `'a` +LL | pub fn life7<'b>() -> for<'c> fn(&'a i32); | ^^ undeclared lifetime error: aborting due to 3 previous errors diff --git a/src/test/ui/generic/generic-extern.stderr b/src/test/ui/generic/generic-extern.stderr index 1c978245f9c..e7625abb1c8 100644 --- a/src/test/ui/generic/generic-extern.stderr +++ b/src/test/ui/generic/generic-extern.stderr @@ -1,7 +1,7 @@ error[E0044]: foreign items may not have type parameters --> $DIR/generic-extern.rs:2:5 | -LL | fn foo(); //~ ERROR foreign items may not have type parameters +LL | fn foo(); | ^^^^^^^^^^^^ can't have type parameters | = help: use specialization instead of type parameters by replacing them with concrete types like `u32` diff --git a/src/test/ui/generic/generic-lifetime-trait-impl.stderr b/src/test/ui/generic/generic-lifetime-trait-impl.stderr index 8f4a0f23670..4ae5098a121 100644 --- a/src/test/ui/generic/generic-lifetime-trait-impl.stderr +++ b/src/test/ui/generic/generic-lifetime-trait-impl.stderr @@ -4,7 +4,7 @@ error[E0195]: lifetime parameters or bounds on method `bar` do not match the tra LL | fn bar<'b, T: Bar<'b>>(self) -> &'b str; | ---------------- lifetimes in impl do not match this method in trait ... -LL | fn bar>(self) -> &'a str { panic!() } //~ ERROR lifetime +LL | fn bar>(self) -> &'a str { panic!() } | ^^^^^^^^^^^^ lifetimes do not match method in trait error: aborting due to previous error diff --git a/src/test/ui/generic/generic-no-mangle.stderr b/src/test/ui/generic/generic-no-mangle.stderr index 3da39f1dc17..f055a3ab83f 100644 --- a/src/test/ui/generic/generic-no-mangle.stderr +++ b/src/test/ui/generic/generic-no-mangle.stderr @@ -3,7 +3,7 @@ error: functions generic over types or consts must be mangled | LL | #[no_mangle] | ------------ help: remove this attribute -LL | pub fn foo() {} //~ ERROR functions generic over types or consts must be mangled +LL | pub fn foo() {} | ^^^^^^^^^^^^^^^^^^ | note: lint level defined here @@ -17,7 +17,7 @@ error: functions generic over types or consts must be mangled | LL | #[no_mangle] | ------------ help: remove this attribute -LL | pub extern fn bar() {} //~ ERROR functions generic over types or consts must be mangled +LL | pub extern fn bar() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/glob-resolve1.stderr b/src/test/ui/glob-resolve1.stderr index 10a57aa6ca6..01730c4d695 100644 --- a/src/test/ui/glob-resolve1.stderr +++ b/src/test/ui/glob-resolve1.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find function `fpriv` in this scope --> $DIR/glob-resolve1.rs:22:5 | -LL | fpriv(); //~ ERROR cannot find function `fpriv` in this scope +LL | fpriv(); | ^^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | @@ -11,7 +11,7 @@ LL | use bar::fpriv; error[E0425]: cannot find function `epriv` in this scope --> $DIR/glob-resolve1.rs:23:5 | -LL | epriv(); //~ ERROR cannot find function `epriv` in this scope +LL | epriv(); | ^^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | @@ -21,7 +21,7 @@ LL | use bar::epriv; error[E0423]: expected value, found enum `B` --> $DIR/glob-resolve1.rs:24:5 | -LL | B; //~ ERROR expected value, found enum `B` +LL | B; | ^ | = note: did you mean to use one of the following variants? @@ -30,7 +30,7 @@ LL | B; //~ ERROR expected value, found enum `B` error[E0425]: cannot find value `C` in this scope --> $DIR/glob-resolve1.rs:25:5 | -LL | C; //~ ERROR cannot find value `C` in this scope +LL | C; | ^ not found in this scope help: possible candidate is found in another module, you can import it into scope | @@ -40,17 +40,17 @@ LL | use bar::C; error[E0425]: cannot find function `import` in this scope --> $DIR/glob-resolve1.rs:26:5 | -LL | import(); //~ ERROR: cannot find function `import` in this scope +LL | import(); | ^^^^^^ not found in this scope error[E0412]: cannot find type `A` in this scope --> $DIR/glob-resolve1.rs:28:11 | -LL | foo::(); //~ ERROR: cannot find type `A` in this scope +LL | foo::(); | ^ help: an enum with a similar name exists | -LL | foo::(); //~ ERROR: cannot find type `A` in this scope +LL | foo::(); | ^ help: possible candidate is found in another module, you can import it into scope | @@ -60,11 +60,11 @@ LL | use bar::A; error[E0412]: cannot find type `C` in this scope --> $DIR/glob-resolve1.rs:29:11 | -LL | foo::(); //~ ERROR: cannot find type `C` in this scope +LL | foo::(); | ^ help: an enum with a similar name exists | -LL | foo::(); //~ ERROR: cannot find type `C` in this scope +LL | foo::(); | ^ help: possible candidate is found in another module, you can import it into scope | @@ -74,11 +74,11 @@ LL | use bar::C; error[E0412]: cannot find type `D` in this scope --> $DIR/glob-resolve1.rs:30:11 | -LL | foo::(); //~ ERROR: cannot find type `D` in this scope +LL | foo::(); | ^ help: an enum with a similar name exists | -LL | foo::(); //~ ERROR: cannot find type `D` in this scope +LL | foo::(); | ^ help: possible candidate is found in another module, you can import it into scope | diff --git a/src/test/ui/hashmap-iter-value-lifetime.stderr b/src/test/ui/hashmap-iter-value-lifetime.stderr index 99761dd1cd7..0f7e04dae0c 100644 --- a/src/test/ui/hashmap-iter-value-lifetime.stderr +++ b/src/test/ui/hashmap-iter-value-lifetime.stderr @@ -4,7 +4,7 @@ error[E0502]: cannot borrow `my_stuff` as mutable because it is also borrowed as LL | let (_, thing) = my_stuff.iter().next().unwrap(); | -------- immutable borrow occurs here LL | -LL | my_stuff.clear(); //~ ERROR cannot borrow +LL | my_stuff.clear(); | ^^^^^^^^ mutable borrow occurs here ... LL | } diff --git a/src/test/ui/hashmap-lifetimes.stderr b/src/test/ui/hashmap-lifetimes.stderr index 81b2304f381..728946ca13a 100644 --- a/src/test/ui/hashmap-lifetimes.stderr +++ b/src/test/ui/hashmap-lifetimes.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `my_stuff` as mutable because it is also borrowed as | LL | let mut it = my_stuff.iter(); | -------- immutable borrow occurs here -LL | my_stuff.insert(1, 43); //~ ERROR cannot borrow +LL | my_stuff.insert(1, 43); | ^^^^^^^^ mutable borrow occurs here LL | it; LL | } diff --git a/src/test/ui/hidden-rt-injection.stderr b/src/test/ui/hidden-rt-injection.stderr index 6d63344882b..3e288b72ec6 100644 --- a/src/test/ui/hidden-rt-injection.stderr +++ b/src/test/ui/hidden-rt-injection.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `native` --> $DIR/hidden-rt-injection.rs:5:9 | -LL | use native; //~ ERROR unresolved import +LL | use native; | ^^^^^^ no `native` in the root error: aborting due to previous error diff --git a/src/test/ui/hidden-rt-injection2.stderr b/src/test/ui/hidden-rt-injection2.stderr index bbb45552f2c..73f89b5856d 100644 --- a/src/test/ui/hidden-rt-injection2.stderr +++ b/src/test/ui/hidden-rt-injection2.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `rt` --> $DIR/hidden-rt-injection2.rs:5:9 | -LL | use rt; //~ ERROR unresolved import +LL | use rt; | ^^ no `rt` in the root error: aborting due to previous error diff --git a/src/test/ui/hrtb/hrtb-cache-issue-54302.stderr b/src/test/ui/hrtb/hrtb-cache-issue-54302.stderr index 21d154eb231..77a5491cb63 100644 --- a/src/test/ui/hrtb/hrtb-cache-issue-54302.stderr +++ b/src/test/ui/hrtb/hrtb-cache-issue-54302.stderr @@ -1,7 +1,7 @@ error: implementation of `Deserialize` is not general enough --> $DIR/hrtb-cache-issue-54302.rs:19:5 | -LL | assert_deserialize_owned::<&'static str>(); //~ ERROR +LL | assert_deserialize_owned::<&'static str>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `&'static str` must implement `Deserialize<'0>`, for any lifetime `'0` diff --git a/src/test/ui/hrtb/hrtb-conflate-regions.stderr b/src/test/ui/hrtb/hrtb-conflate-regions.stderr index 50e1af8f142..3fb6baa35e1 100644 --- a/src/test/ui/hrtb/hrtb-conflate-regions.stderr +++ b/src/test/ui/hrtb/hrtb-conflate-regions.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `for<'a, 'b> SomeStruct: Foo<(&'a isize, &'b isize)>` is not satisfied --> $DIR/hrtb-conflate-regions.rs:28:10 | -LL | fn b() { want_foo2::(); } //~ ERROR +LL | fn b() { want_foo2::(); } | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a, 'b> Foo<(&'a isize, &'b isize)>` is not implemented for `SomeStruct` | = help: the following implementations were found: diff --git a/src/test/ui/hrtb/hrtb-debruijn-in-receiver.stderr b/src/test/ui/hrtb/hrtb-debruijn-in-receiver.stderr index 85bff4ce791..e498a9ad022 100644 --- a/src/test/ui/hrtb/hrtb-debruijn-in-receiver.stderr +++ b/src/test/ui/hrtb/hrtb-debruijn-in-receiver.stderr @@ -3,7 +3,7 @@ error[E0499]: cannot borrow `foo` as mutable more than once at a time | LL | foo.insert(); | --- first mutable borrow occurs here -LL | foo.insert(); //~ ERROR cannot borrow +LL | foo.insert(); | ^^^ second mutable borrow occurs here LL | } | - first borrow ends here diff --git a/src/test/ui/hrtb/hrtb-exists-forall-fn.stderr b/src/test/ui/hrtb/hrtb-exists-forall-fn.stderr index 8e8892552b7..d893cd606f1 100644 --- a/src/test/ui/hrtb/hrtb-exists-forall-fn.stderr +++ b/src/test/ui/hrtb/hrtb-exists-forall-fn.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/hrtb-exists-forall-fn.rs:17:34 | -LL | let _: for<'b> fn(&'b u32) = foo(); //~ ERROR mismatched types +LL | let _: for<'b> fn(&'b u32) = foo(); | ^^^^^ expected concrete lifetime, found bound lifetime parameter 'b | = note: expected type `for<'b> fn(&'b u32)` diff --git a/src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.stderr b/src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.stderr index f56b81759fe..f10e427a545 100644 --- a/src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.stderr +++ b/src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `(): Trait fn(std::cell::Cell<&'b u32>)>` is not satisfied --> $DIR/hrtb-exists-forall-trait-invariant.rs:28:5 | -LL | foo::<()>(); //~ ERROR not satisfied +LL | foo::<()>(); | ^^^^^^^^^ the trait `Trait fn(std::cell::Cell<&'b u32>)>` is not implemented for `()` | = help: the following implementations were found: diff --git a/src/test/ui/hrtb/hrtb-higher-ranker-supertraits-transitive.stderr b/src/test/ui/hrtb/hrtb-higher-ranker-supertraits-transitive.stderr index 77c1789852e..b5d945fe15c 100644 --- a/src/test/ui/hrtb/hrtb-higher-ranker-supertraits-transitive.stderr +++ b/src/test/ui/hrtb/hrtb-higher-ranker-supertraits-transitive.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `for<'ccx> B: Bar<'ccx>` is not satisfied --> $DIR/hrtb-higher-ranker-supertraits-transitive.rs:47:5 | -LL | want_bar_for_any_ccx(b); //~ ERROR +LL | want_bar_for_any_ccx(b); | ^^^^^^^^^^^^^^^^^^^^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B` | = help: consider adding a `where for<'ccx> B: Bar<'ccx>` bound diff --git a/src/test/ui/hrtb/hrtb-higher-ranker-supertraits.stderr b/src/test/ui/hrtb/hrtb-higher-ranker-supertraits.stderr index 5914cb3eaa4..20a8fd459fa 100644 --- a/src/test/ui/hrtb/hrtb-higher-ranker-supertraits.stderr +++ b/src/test/ui/hrtb/hrtb-higher-ranker-supertraits.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `for<'tcx> F: Foo<'tcx>` is not satisfied --> $DIR/hrtb-higher-ranker-supertraits.rs:18:5 | -LL | want_foo_for_any_tcx(f); //~ ERROR not satisfied +LL | want_foo_for_any_tcx(f); | ^^^^^^^^^^^^^^^^^^^^ the trait `for<'tcx> Foo<'tcx>` is not implemented for `F` | = help: consider adding a `where for<'tcx> F: Foo<'tcx>` bound @@ -19,7 +19,7 @@ LL | | } error[E0277]: the trait bound `for<'ccx> B: Bar<'ccx>` is not satisfied --> $DIR/hrtb-higher-ranker-supertraits.rs:35:5 | -LL | want_bar_for_any_ccx(b); //~ ERROR not satisfied +LL | want_bar_for_any_ccx(b); | ^^^^^^^^^^^^^^^^^^^^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B` | = help: consider adding a `where for<'ccx> B: Bar<'ccx>` bound diff --git a/src/test/ui/hrtb/hrtb-just-for-static.stderr b/src/test/ui/hrtb/hrtb-just-for-static.stderr index fe2bc1f2225..115851ddf93 100644 --- a/src/test/ui/hrtb/hrtb-just-for-static.stderr +++ b/src/test/ui/hrtb/hrtb-just-for-static.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `for<'a> StaticInt: Foo<&'a isize>` is not satisfied --> $DIR/hrtb-just-for-static.rs:24:5 | -LL | want_hrtb::() //~ ERROR +LL | want_hrtb::() | ^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Foo<&'a isize>` is not implemented for `StaticInt` | = help: the following implementations were found: @@ -18,7 +18,7 @@ LL | | } error[E0277]: the trait bound `for<'a> &'a u32: Foo<&'a isize>` is not satisfied --> $DIR/hrtb-just-for-static.rs:30:5 | -LL | want_hrtb::<&'a u32>() //~ ERROR +LL | want_hrtb::<&'a u32>() | ^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Foo<&'a isize>` is not implemented for `&'a u32` | = help: the following implementations were found: diff --git a/src/test/ui/hrtb/hrtb-perfect-forwarding.stderr b/src/test/ui/hrtb/hrtb-perfect-forwarding.stderr index ea08af01640..9bc8cd67a82 100644 --- a/src/test/ui/hrtb/hrtb-perfect-forwarding.stderr +++ b/src/test/ui/hrtb/hrtb-perfect-forwarding.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/hrtb-perfect-forwarding.rs:46:5 | -LL | foo_hrtb_bar_not(&mut t); //~ ERROR mismatched types +LL | foo_hrtb_bar_not(&mut t); | ^^^^^^^^^^^^^^^^ one type is more general than the other | = note: expected type `Bar<&'a isize>` diff --git a/src/test/ui/hrtb/issue-58451.stderr b/src/test/ui/hrtb/issue-58451.stderr index 79c24855dc9..4648c0182b9 100644 --- a/src/test/ui/hrtb/issue-58451.stderr +++ b/src/test/ui/hrtb/issue-58451.stderr @@ -8,7 +8,7 @@ LL | | I::Item: for<'a> Into<&'a ()>, LL | | {} | |__- defined here ... -LL | f(&[f()]); //~ ERROR this function takes 1 parameter +LL | f(&[f()]); | ^^^ expected 1 parameter error: aborting due to previous error diff --git a/src/test/ui/hygiene/arguments.stderr b/src/test/ui/hygiene/arguments.stderr index 4cf35be22fa..d072086e086 100644 --- a/src/test/ui/hygiene/arguments.stderr +++ b/src/test/ui/hygiene/arguments.stderr @@ -1,7 +1,7 @@ error[E0412]: cannot find type `S` in this scope --> $DIR/arguments.rs:16:8 | -LL | m!(S, S); //~ ERROR cannot find type `S` in this scope +LL | m!(S, S); | ^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/hygiene/assoc_item_ctxt.stderr b/src/test/ui/hygiene/assoc_item_ctxt.stderr index d89f395d8c1..ebe38b7c41a 100644 --- a/src/test/ui/hygiene/assoc_item_ctxt.stderr +++ b/src/test/ui/hygiene/assoc_item_ctxt.stderr @@ -1,7 +1,7 @@ error[E0407]: method `method` is not a member of trait `Tr` --> $DIR/assoc_item_ctxt.rs:35:13 | -LL | fn method() {} //~ ERROR method `method` is not a member of trait `Tr` +LL | fn method() {} | ^^^^^^^^^^^^^^ not a member of trait `Tr` ... LL | mac_trait_impl!(); @@ -13,7 +13,7 @@ error[E0046]: not all trait items implemented, missing: `method` LL | fn method(); | ------------ `method` from trait ... -LL | impl Tr for u8 { //~ ERROR not all trait items implemented, missing: `method` +LL | impl Tr for u8 { | ^^^^^^^^^^^^^^ missing `method` in implementation ... LL | mac_trait_impl!(); diff --git a/src/test/ui/hygiene/fields-definition.stderr b/src/test/ui/hygiene/fields-definition.stderr index d6d25d7fa0c..a30650d88e2 100644 --- a/src/test/ui/hygiene/fields-definition.stderr +++ b/src/test/ui/hygiene/fields-definition.stderr @@ -3,7 +3,7 @@ error[E0124]: field `a` is already declared | LL | a: u8, | ----- `a` first declared here -LL | $a: u8, //~ ERROR field `a` is already declared +LL | $a: u8, | ^^ field already declared ... LL | legacy!(a); diff --git a/src/test/ui/hygiene/fields-move.stderr b/src/test/ui/hygiene/fields-move.stderr index a5eeadff4dc..43d55fdc68f 100644 --- a/src/test/ui/hygiene/fields-move.stderr +++ b/src/test/ui/hygiene/fields-move.stderr @@ -4,7 +4,7 @@ error[E0382]: use of moved value: `foo.x` LL | $foo.x | ------ value moved here ... -LL | assert_two_copies(copy_modern!(foo), foo.x); //~ ERROR use of moved value: `foo.x` +LL | assert_two_copies(copy_modern!(foo), foo.x); | ^^^^^ value used here after move | = note: move occurs because `foo.x` has type `NonCopy`, which does not implement the `Copy` trait @@ -15,10 +15,10 @@ error[E0382]: use of moved value: `foo.x` LL | $foo.x | ------ value moved here ... -LL | $foo.x //~ ERROR use of moved value: `foo.x` +LL | $foo.x | ^^^^^^ value used here after move ... -LL | assert_two_copies(copy_legacy!(foo), foo.x); //~ ERROR use of moved value: `foo.x` +LL | assert_two_copies(copy_legacy!(foo), foo.x); | ----------------- in this macro invocation | = note: move occurs because `foo.x` has type `NonCopy`, which does not implement the `Copy` trait @@ -29,7 +29,7 @@ error[E0382]: use of moved value: `foo.x` LL | $foo.x | ------ value moved here ... -LL | assert_two_copies(copy_legacy!(foo), foo.x); //~ ERROR use of moved value: `foo.x` +LL | assert_two_copies(copy_legacy!(foo), foo.x); | ^^^^^ value used here after move | = note: move occurs because `foo.x` has type `NonCopy`, which does not implement the `Copy` trait diff --git a/src/test/ui/hygiene/fields.stderr b/src/test/ui/hygiene/fields.stderr index 6d5b60fcb5b..20ea4e91067 100644 --- a/src/test/ui/hygiene/fields.stderr +++ b/src/test/ui/hygiene/fields.stderr @@ -1,7 +1,7 @@ error: type `foo::S` is private --> $DIR/fields.rs:15:17 | -LL | let s = S { x: 0 }; //~ ERROR type `foo::S` is private +LL | let s = S { x: 0 }; | ^^^^^^^^^^ ... LL | let s = foo::m!(S, x); @@ -10,7 +10,7 @@ LL | let s = foo::m!(S, x); error: type `foo::S` is private --> $DIR/fields.rs:16:17 | -LL | let _ = s.x; //~ ERROR type `foo::S` is private +LL | let _ = s.x; | ^ ... LL | let s = foo::m!(S, x); @@ -19,7 +19,7 @@ LL | let s = foo::m!(S, x); error: type `foo::T` is private --> $DIR/fields.rs:18:17 | -LL | let t = T(0); //~ ERROR type `foo::T` is private +LL | let t = T(0); | ^^^^ ... LL | let s = foo::m!(S, x); @@ -28,7 +28,7 @@ LL | let s = foo::m!(S, x); error: type `foo::T` is private --> $DIR/fields.rs:19:17 | -LL | let _ = t.0; //~ ERROR type `foo::T` is private +LL | let _ = t.0; | ^ ... LL | let s = foo::m!(S, x); diff --git a/src/test/ui/hygiene/for-loop.stderr b/src/test/ui/hygiene/for-loop.stderr index 755bf3e55f7..932c951e7a5 100644 --- a/src/test/ui/hygiene/for-loop.stderr +++ b/src/test/ui/hygiene/for-loop.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `iter` in this scope --> $DIR/for-loop.rs:6:9 | -LL | iter.next(); //~ ERROR cannot find value `iter` in this scope +LL | iter.next(); | ^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/hygiene/generate-mod.stderr b/src/test/ui/hygiene/generate-mod.stderr index d9342d91159..5e2c56d4bf4 100644 --- a/src/test/ui/hygiene/generate-mod.stderr +++ b/src/test/ui/hygiene/generate-mod.stderr @@ -1,19 +1,19 @@ error[E0412]: cannot find type `FromOutside` in this scope --> $DIR/generate-mod.rs:35:13 | -LL | genmod!(FromOutside, Outer); //~ ERROR cannot find type `FromOutside` in this scope +LL | genmod!(FromOutside, Outer); | ^^^^^^^^^^^ not found in this scope error[E0412]: cannot find type `Outer` in this scope --> $DIR/generate-mod.rs:35:26 | -LL | genmod!(FromOutside, Outer); //~ ERROR cannot find type `FromOutside` in this scope +LL | genmod!(FromOutside, Outer); | ^^^^^ not found in this scope error[E0412]: cannot find type `FromOutside` in this scope --> $DIR/generate-mod.rs:19:18 | -LL | type A = FromOutside; //~ ERROR cannot find type `FromOutside` in this scope +LL | type A = FromOutside; | ^^^^^^^^^^^ not found in this scope ... LL | genmod_transparent!(); @@ -22,7 +22,7 @@ LL | genmod_transparent!(); error[E0412]: cannot find type `Outer` in this scope --> $DIR/generate-mod.rs:20:22 | -LL | type Inner = Outer; //~ ERROR cannot find type `Outer` in this scope +LL | type Inner = Outer; | ^^^^^ not found in this scope ... LL | genmod_transparent!(); @@ -31,7 +31,7 @@ LL | genmod_transparent!(); error[E0412]: cannot find type `FromOutside` in this scope --> $DIR/generate-mod.rs:28:18 | -LL | type A = FromOutside; //~ ERROR cannot find type `FromOutside` in this scope +LL | type A = FromOutside; | ^^^^^^^^^^^ not found in this scope ... LL | genmod_legacy!(); @@ -40,7 +40,7 @@ LL | genmod_legacy!(); error[E0412]: cannot find type `Outer` in this scope --> $DIR/generate-mod.rs:29:22 | -LL | type Inner = Outer; //~ ERROR cannot find type `Outer` in this scope +LL | type Inner = Outer; | ^^^^^ not found in this scope ... LL | genmod_legacy!(); diff --git a/src/test/ui/hygiene/globs.stderr b/src/test/ui/hygiene/globs.stderr index ad62b976251..7e0f4e4e0b8 100644 --- a/src/test/ui/hygiene/globs.stderr +++ b/src/test/ui/hygiene/globs.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find function `f` in this scope --> $DIR/globs.rs:22:9 | -LL | f(); //~ ERROR cannot find function `f` in this scope +LL | f(); | ^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | @@ -15,13 +15,13 @@ LL | use foo::f; error[E0425]: cannot find function `g` in this scope --> $DIR/globs.rs:15:5 | -LL | g(); //~ ERROR cannot find function `g` in this scope +LL | g(); | ^ not found in this scope ... LL | / m! { LL | | use bar::*; LL | | g(); -LL | | f(); //~ ERROR cannot find function `f` in this scope +LL | | f(); LL | | } | |_____- in this macro invocation help: possible candidates are found in other modules, you can import them into scope @@ -42,7 +42,7 @@ error[E0425]: cannot find function `f` in this scope LL | n!(f); | ------ in this macro invocation ... -LL | n!(f); //~ ERROR cannot find function `f` in this scope +LL | n!(f); | ^ not found in this scope error[E0425]: cannot find function `f` in this scope @@ -51,7 +51,7 @@ error[E0425]: cannot find function `f` in this scope LL | n!(f); | ------ in this macro invocation ... -LL | f //~ ERROR cannot find function `f` in this scope +LL | f | ^ not found in this scope error: aborting due to 4 previous errors diff --git a/src/test/ui/hygiene/hygienic-label-1.stderr b/src/test/ui/hygiene/hygienic-label-1.stderr index 9a55965d85f..80cd1547b45 100644 --- a/src/test/ui/hygiene/hygienic-label-1.stderr +++ b/src/test/ui/hygiene/hygienic-label-1.stderr @@ -1,7 +1,7 @@ error[E0426]: use of undeclared label `'x` --> $DIR/hygienic-label-1.rs:2:19 | -LL | () => { break 'x; } //~ ERROR use of undeclared label `'x` +LL | () => { break 'x; } | ^^ did you mean `'x`? ... LL | 'x: loop { foo!() } diff --git a/src/test/ui/hygiene/hygienic-label-2.stderr b/src/test/ui/hygiene/hygienic-label-2.stderr index b7cb91d94f1..c20cbd9f687 100644 --- a/src/test/ui/hygiene/hygienic-label-2.stderr +++ b/src/test/ui/hygiene/hygienic-label-2.stderr @@ -1,7 +1,7 @@ error[E0426]: use of undeclared label `'x` --> $DIR/hygienic-label-2.rs:6:16 | -LL | foo!(break 'x); //~ ERROR use of undeclared label `'x` +LL | foo!(break 'x); | ^^ did you mean `'x`? error: aborting due to previous error diff --git a/src/test/ui/hygiene/hygienic-label-3.stderr b/src/test/ui/hygiene/hygienic-label-3.stderr index 227a39512b7..b5839fe5c3d 100644 --- a/src/test/ui/hygiene/hygienic-label-3.stderr +++ b/src/test/ui/hygiene/hygienic-label-3.stderr @@ -1,7 +1,7 @@ error[E0426]: use of undeclared label `'x` --> $DIR/hygienic-label-3.rs:2:19 | -LL | () => { break 'x; } //~ ERROR use of undeclared label `'x` +LL | () => { break 'x; } | ^^ did you mean `'x`? ... LL | foo!() diff --git a/src/test/ui/hygiene/hygienic-label-4.stderr b/src/test/ui/hygiene/hygienic-label-4.stderr index 4f9a68ca831..1dd74895746 100644 --- a/src/test/ui/hygiene/hygienic-label-4.stderr +++ b/src/test/ui/hygiene/hygienic-label-4.stderr @@ -1,7 +1,7 @@ error[E0426]: use of undeclared label `'x` --> $DIR/hygienic-label-4.rs:6:16 | -LL | foo!(break 'x); //~ ERROR use of undeclared label `'x` +LL | foo!(break 'x); | ^^ did you mean `'x`? error: aborting due to previous error diff --git a/src/test/ui/hygiene/impl_items.stderr b/src/test/ui/hygiene/impl_items.stderr index cb3705e5513..418c2c73ba1 100644 --- a/src/test/ui/hygiene/impl_items.stderr +++ b/src/test/ui/hygiene/impl_items.stderr @@ -1,7 +1,7 @@ error: type `for<'r> fn(&'r foo::S) {foo::S::f}` is private --> $DIR/impl_items.rs:12:23 | -LL | let _: () = S.f(); //~ ERROR type `for<'r> fn(&'r foo::S) {foo::S::f}` is private +LL | let _: () = S.f(); | ^ ... LL | foo::m!(); diff --git a/src/test/ui/hygiene/nested_macro_privacy.stderr b/src/test/ui/hygiene/nested_macro_privacy.stderr index 4fca86d521b..6e78cb86d80 100644 --- a/src/test/ui/hygiene/nested_macro_privacy.stderr +++ b/src/test/ui/hygiene/nested_macro_privacy.stderr @@ -1,7 +1,7 @@ error[E0616]: field `i` of struct `foo::S` is private --> $DIR/nested_macro_privacy.rs:15:5 | -LL | S::default().i; //~ ERROR field `i` of struct `foo::S` is private +LL | S::default().i; | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/hygiene/no_implicit_prelude-2018.stderr b/src/test/ui/hygiene/no_implicit_prelude-2018.stderr index 370fc9784ad..e7ae7afa02a 100644 --- a/src/test/ui/hygiene/no_implicit_prelude-2018.stderr +++ b/src/test/ui/hygiene/no_implicit_prelude-2018.stderr @@ -1,7 +1,7 @@ error: cannot find macro `print!` in this scope --> $DIR/no_implicit_prelude-2018.rs:7:9 | -LL | print!(); //~ ERROR cannot find macro `print!` in this scope +LL | print!(); | ^^^^^ | = help: have you added the `#[macro_use]` on the module/import? diff --git a/src/test/ui/hygiene/no_implicit_prelude.stderr b/src/test/ui/hygiene/no_implicit_prelude.stderr index b1de7700edb..7948f1667d7 100644 --- a/src/test/ui/hygiene/no_implicit_prelude.stderr +++ b/src/test/ui/hygiene/no_implicit_prelude.stderr @@ -4,13 +4,13 @@ error[E0433]: failed to resolve: use of undeclared type or module `Vec` LL | fn f() { ::bar::m!(); } | ------------ in this macro invocation ... -LL | Vec::new(); //~ ERROR failed to resolve +LL | Vec::new(); | ^^^ use of undeclared type or module `Vec` error: cannot find macro `print!` in this scope --> $DIR/no_implicit_prelude.rs:16:9 | -LL | println!(); //~ ERROR cannot find macro `print!` in this scope +LL | println!(); | ^^^^^^^^^^^ | = help: have you added the `#[macro_use]` on the module/import? @@ -22,7 +22,7 @@ error[E0599]: no method named `clone` found for type `()` in the current scope LL | fn f() { ::bar::m!(); } | ------------ in this macro invocation ... -LL | ().clone() //~ ERROR no method named `clone` found +LL | ().clone() | ^^^^^ | = help: items from traits can only be used if the trait is in scope diff --git a/src/test/ui/hygiene/pattern-macro.stderr b/src/test/ui/hygiene/pattern-macro.stderr index 8a170dccd5c..edd05916ede 100644 --- a/src/test/ui/hygiene/pattern-macro.stderr +++ b/src/test/ui/hygiene/pattern-macro.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `x` in this scope --> $DIR/pattern-macro.rs:5:5 | -LL | x + 1; //~ ERROR cannot find value `x` in this scope +LL | x + 1; | ^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/hygiene/privacy.stderr b/src/test/ui/hygiene/privacy.stderr index bc056c7cf3c..80fb4dd0f31 100644 --- a/src/test/ui/hygiene/privacy.stderr +++ b/src/test/ui/hygiene/privacy.stderr @@ -1,7 +1,7 @@ error[E0603]: function `f` is private --> $DIR/privacy.rs:16:14 | -LL | foo::f() //~ ERROR `f` is private +LL | foo::f() | ^ error: aborting due to previous error diff --git a/src/test/ui/hygiene/trait_items.stderr b/src/test/ui/hygiene/trait_items.stderr index 677bd08b6af..4192b97e750 100644 --- a/src/test/ui/hygiene/trait_items.stderr +++ b/src/test/ui/hygiene/trait_items.stderr @@ -4,7 +4,7 @@ error[E0599]: no method named `f` found for type `()` in the current scope LL | fn f() { ::baz::m!(); } | ------------ in this macro invocation ... -LL | pub macro m() { ().f() } //~ ERROR no method named `f` found for type `()` in the current scope +LL | pub macro m() { ().f() } | ^ | = help: items from traits can only be used if the trait is in scope diff --git a/src/test/ui/if/if-let-arm-types.stderr b/src/test/ui/if/if-let-arm-types.stderr index 6401a62c06b..b986973fe91 100644 --- a/src/test/ui/if/if-let-arm-types.stderr +++ b/src/test/ui/if/if-let-arm-types.stderr @@ -2,7 +2,7 @@ error[E0308]: `if let` arms have incompatible types --> $DIR/if-let-arm-types.rs:6:9 | LL | / if let Some(b) = None { -LL | | //~^ NOTE if let` arms have incompatible types +LL | | LL | | () LL | | } else { LL | | 1 diff --git a/src/test/ui/if/if-let.stderr b/src/test/ui/if/if-let.stderr index b2a104bfacf..04bca1b76a0 100644 --- a/src/test/ui/if/if-let.stderr +++ b/src/test/ui/if/if-let.stderr @@ -4,7 +4,7 @@ warning: irrefutable if-let pattern LL | if let $p = $e $b | ^^ ... -LL | / foo!(a, 1, { //~ WARN irrefutable if-let +LL | / foo!(a, 1, { LL | | println!("irrefutable pattern"); LL | | }); | |_______- in this macro invocation @@ -17,7 +17,7 @@ warning: irrefutable if-let pattern LL | if let $p = $e $b | ^^ ... -LL | / bar!(a, 1, { //~ WARN irrefutable if-let +LL | / bar!(a, 1, { LL | | println!("irrefutable pattern"); LL | | }); | |_______- in this macro invocation @@ -25,7 +25,7 @@ LL | | }); warning: irrefutable if-let pattern --> $DIR/if-let.rs:24:5 | -LL | / if let a = 1 { //~ WARN irrefutable if-let +LL | / if let a = 1 { LL | | println!("irrefutable pattern"); LL | | } | |_____^ @@ -33,7 +33,7 @@ LL | | } warning: irrefutable if-let pattern --> $DIR/if-let.rs:28:5 | -LL | / if let a = 1 { //~ WARN irrefutable if-let +LL | / if let a = 1 { LL | | println!("irrefutable pattern"); LL | | } else if true { LL | | println!("else-if in irrefutable if-let"); @@ -45,7 +45,7 @@ LL | | } warning: irrefutable if-let pattern --> $DIR/if-let.rs:38:12 | -LL | } else if let a = 1 { //~ WARN irrefutable if-let +LL | } else if let a = 1 { | ____________^ LL | | println!("irrefutable pattern"); LL | | } @@ -54,7 +54,7 @@ LL | | } warning: irrefutable if-let pattern --> $DIR/if-let.rs:44:12 | -LL | } else if let a = 1 { //~ WARN irrefutable if-let +LL | } else if let a = 1 { | ____________^ LL | | println!("irrefutable pattern"); LL | | } diff --git a/src/test/ui/if/ifmt-bad-arg.stderr b/src/test/ui/if/ifmt-bad-arg.stderr index d4153ac94ac..65be86eaf25 100644 --- a/src/test/ui/if/ifmt-bad-arg.stderr +++ b/src/test/ui/if/ifmt-bad-arg.stderr @@ -73,13 +73,13 @@ LL | format!("{} {foo} {} {bar} {}", 1, 2, 3); error: there is no argument named `foo` --> $DIR/ifmt-bad-arg.rs:31:14 | -LL | format!("{foo}"); //~ ERROR: no argument named `foo` +LL | format!("{foo}"); | ^^^^^ error: multiple unused formatting arguments --> $DIR/ifmt-bad-arg.rs:32:17 | -LL | format!("", 1, 2); //~ ERROR: multiple unused formatting arguments +LL | format!("", 1, 2); | -- ^ ^ argument never used | | | | | argument never used @@ -88,7 +88,7 @@ LL | format!("", 1, 2); //~ ERROR: multiple unused formatting error: argument never used --> $DIR/ifmt-bad-arg.rs:33:22 | -LL | format!("{}", 1, 2); //~ ERROR: argument never used +LL | format!("{}", 1, 2); | ---- ^ argument never used | | | formatting specifier missing @@ -96,7 +96,7 @@ LL | format!("{}", 1, 2); //~ ERROR: argument never used error: argument never used --> $DIR/ifmt-bad-arg.rs:34:20 | -LL | format!("{1}", 1, 2); //~ ERROR: argument never used +LL | format!("{1}", 1, 2); | ----- ^ argument never used | | | formatting specifier missing @@ -104,7 +104,7 @@ LL | format!("{1}", 1, 2); //~ ERROR: argument never used error: named argument never used --> $DIR/ifmt-bad-arg.rs:35:26 | -LL | format!("{}", 1, foo=2); //~ ERROR: named argument never used +LL | format!("{}", 1, foo=2); | ---- ^ named argument never used | | | formatting specifier missing @@ -112,7 +112,7 @@ LL | format!("{}", 1, foo=2); //~ ERROR: named argument never used error: argument never used --> $DIR/ifmt-bad-arg.rs:36:22 | -LL | format!("{foo}", 1, foo=2); //~ ERROR: argument never used +LL | format!("{foo}", 1, foo=2); | ------- ^ argument never used | | | formatting specifier missing @@ -120,7 +120,7 @@ LL | format!("{foo}", 1, foo=2); //~ ERROR: argument never used error: named argument never used --> $DIR/ifmt-bad-arg.rs:37:21 | -LL | format!("", foo=2); //~ ERROR: named argument never used +LL | format!("", foo=2); | -- ^ named argument never used | | | formatting specifier missing @@ -128,7 +128,7 @@ LL | format!("", foo=2); //~ ERROR: named argument never used error: multiple unused formatting arguments --> $DIR/ifmt-bad-arg.rs:38:32 | -LL | format!("{} {}", 1, 2, foo=1, bar=2); //~ ERROR: multiple unused formatting arguments +LL | format!("{} {}", 1, 2, foo=1, bar=2); | ------- ^ ^ named argument never used | | | | | named argument never used @@ -137,19 +137,19 @@ LL | format!("{} {}", 1, 2, foo=1, bar=2); //~ ERROR: multiple unused forma error: duplicate argument named `foo` --> $DIR/ifmt-bad-arg.rs:40:33 | -LL | format!("{foo}", foo=1, foo=2); //~ ERROR: duplicate argument +LL | format!("{foo}", foo=1, foo=2); | ^ | note: previously here --> $DIR/ifmt-bad-arg.rs:40:26 | -LL | format!("{foo}", foo=1, foo=2); //~ ERROR: duplicate argument +LL | format!("{foo}", foo=1, foo=2); | ^ error: expected ident, positional arguments cannot follow named arguments --> $DIR/ifmt-bad-arg.rs:41:24 | -LL | format!("", foo=1, 2); //~ ERROR: positional arguments cannot follow +LL | format!("", foo=1, 2); | ^ error: there is no argument named `valueb` @@ -169,7 +169,7 @@ LL | format!("{valuea} {valueb}", valuea=5, valuec=7); error: invalid format string: expected `'}'` but string was terminated --> $DIR/ifmt-bad-arg.rs:51:15 | -LL | format!("{"); //~ ERROR: expected `'}'` but string was terminated +LL | format!("{"); | -^ expected `'}'` in format string | | | because of this opening brace @@ -179,7 +179,7 @@ LL | format!("{"); //~ ERROR: expected `'}'` but string was terminated error: invalid format string: unmatched `}` found --> $DIR/ifmt-bad-arg.rs:53:18 | -LL | format!("foo } bar"); //~ ERROR: unmatched `}` found +LL | format!("foo } bar"); | ^ unmatched `}` in format string | = note: if you intended to print `}`, you can escape it using `}}` @@ -187,7 +187,7 @@ LL | format!("foo } bar"); //~ ERROR: unmatched `}` found error: invalid format string: unmatched `}` found --> $DIR/ifmt-bad-arg.rs:54:18 | -LL | format!("foo }"); //~ ERROR: unmatched `}` found +LL | format!("foo }"); | ^ unmatched `}` in format string | = note: if you intended to print `}`, you can escape it using `}}` @@ -195,7 +195,7 @@ LL | format!("foo }"); //~ ERROR: unmatched `}` found error: argument never used --> $DIR/ifmt-bad-arg.rs:56:27 | -LL | format!("foo %s baz", "bar"); //~ ERROR: argument never used +LL | format!("foo %s baz", "bar"); | -- ^^^^^ argument never used | | | help: format specifiers use curly braces: `{}` diff --git a/src/test/ui/if/ifmt-bad-format-args.stderr b/src/test/ui/if/ifmt-bad-format-args.stderr index 966c8d916a3..9dc2b8f9a73 100644 --- a/src/test/ui/if/ifmt-bad-format-args.stderr +++ b/src/test/ui/if/ifmt-bad-format-args.stderr @@ -1,17 +1,17 @@ error: requires at least a format string argument --> $DIR/ifmt-bad-format-args.rs:2:5 | -LL | format_args!(); //~ ERROR: requires at least a format string argument +LL | format_args!(); | ^^^^^^^^^^^^^^^ error: format argument must be a string literal --> $DIR/ifmt-bad-format-args.rs:3:18 | -LL | format_args!(|| {}); //~ ERROR: must be a string literal +LL | format_args!(|| {}); | ^^^^^ help: you might be missing a string literal to format with | -LL | format_args!("{}", || {}); //~ ERROR: must be a string literal +LL | format_args!("{}", || {}); | ^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/illegal-ufcs-drop.stderr b/src/test/ui/illegal-ufcs-drop.stderr index d8e2dc6e870..d35d376962c 100644 --- a/src/test/ui/illegal-ufcs-drop.stderr +++ b/src/test/ui/illegal-ufcs-drop.stderr @@ -1,7 +1,7 @@ error[E0040]: explicit use of destructor method --> $DIR/illegal-ufcs-drop.rs:8:5 | -LL | Drop::drop(&mut Foo) //~ ERROR explicit use of destructor method +LL | Drop::drop(&mut Foo) | ^^^^^^^^^^ explicit destructor calls not allowed error: aborting due to previous error diff --git a/src/test/ui/impl-bounds-checking.stderr b/src/test/ui/impl-bounds-checking.stderr index 618a9f94aa4..b52f3d6b839 100644 --- a/src/test/ui/impl-bounds-checking.stderr +++ b/src/test/ui/impl-bounds-checking.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `isize: Clone2` is not satisfied --> $DIR/impl-bounds-checking.rs:10:6 | -LL | impl Getter for isize { //~ ERROR `isize: Clone2` is not satisfied +LL | impl Getter for isize { | ^^^^^^^^^^^^^ the trait `Clone2` is not implemented for `isize` error: aborting due to previous error diff --git a/src/test/ui/impl-header-lifetime-elision/dyn-trait.stderr b/src/test/ui/impl-header-lifetime-elision/dyn-trait.stderr index 53cd2b14411..af120fa977c 100644 --- a/src/test/ui/impl-header-lifetime-elision/dyn-trait.stderr +++ b/src/test/ui/impl-header-lifetime-elision/dyn-trait.stderr @@ -1,7 +1,7 @@ error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements --> $DIR/dyn-trait.rs:20:16 | -LL | static_val(x); //~ ERROR cannot infer +LL | static_val(x); | ^ | note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 19:26... diff --git a/src/test/ui/impl-trait/extra-item.stderr b/src/test/ui/impl-trait/extra-item.stderr index de3c7ba5d31..728bcc0aa86 100644 --- a/src/test/ui/impl-trait/extra-item.stderr +++ b/src/test/ui/impl-trait/extra-item.stderr @@ -1,7 +1,7 @@ error[E0407]: method `extra` is not a member of trait `extra_item::MyTrait` --> $DIR/extra-item.rs:7:5 | -LL | fn extra() {} //~ ERROR method `extra` is not a member of trait `extra_item::MyTrait` +LL | fn extra() {} | ^^^^^^^^^^^^^ not a member of trait `extra_item::MyTrait` error: aborting due to previous error diff --git a/src/test/ui/impl-trait/infinite-impl-trait-issue-38064.stderr b/src/test/ui/impl-trait/infinite-impl-trait-issue-38064.stderr index 99c8fe35c66..fb48ecd12b6 100644 --- a/src/test/ui/impl-trait/infinite-impl-trait-issue-38064.stderr +++ b/src/test/ui/impl-trait/infinite-impl-trait-issue-38064.stderr @@ -1,7 +1,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/infinite-impl-trait-issue-38064.rs:8:13 | -LL | fn foo() -> impl Quux { //~ opaque type expands to a recursive type +LL | fn foo() -> impl Quux { | ^^^^^^^^^ expands to self-referential type | = note: expanded type is `foo::Foo>` @@ -9,7 +9,7 @@ LL | fn foo() -> impl Quux { //~ opaque type expands to a recursive type error[E0720]: opaque type expands to a recursive type --> $DIR/infinite-impl-trait-issue-38064.rs:14:13 | -LL | fn bar() -> impl Quux { //~ opaque type expands to a recursive type +LL | fn bar() -> impl Quux { | ^^^^^^^^^ expands to self-referential type | = note: expanded type is `bar::Bar>` diff --git a/src/test/ui/impl-trait/issue-55608-captures-empty-region.stderr b/src/test/ui/impl-trait/issue-55608-captures-empty-region.stderr index d1f147834d2..6311a7f0067 100644 --- a/src/test/ui/impl-trait/issue-55608-captures-empty-region.stderr +++ b/src/test/ui/impl-trait/issue-55608-captures-empty-region.stderr @@ -1,7 +1,7 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds --> $DIR/issue-55608-captures-empty-region.rs:6:16 | -LL | fn server() -> impl FilterBase2 { //~ ERROR [E0700] +LL | fn server() -> impl FilterBase2 { | ^^^^^^^^^^^^^^^^ | = note: hidden type `Map2<[closure@$DIR/issue-55608-captures-empty-region.rs:7:36: 7:41]>` captures an empty lifetime diff --git a/src/test/ui/impl-trait/no-method-suggested-traits.stderr b/src/test/ui/impl-trait/no-method-suggested-traits.stderr index a3b118efa62..d980d7cccad 100644 --- a/src/test/ui/impl-trait/no-method-suggested-traits.stderr +++ b/src/test/ui/impl-trait/no-method-suggested-traits.stderr @@ -220,19 +220,19 @@ LL | std::rc::Rc::new(&mut Box::new(&Bar::X)).method3(); error[E0599]: no method named `method3` found for type `usize` in the current scope --> $DIR/no-method-suggested-traits.rs:69:13 | -LL | 1_usize.method3(); //~ ERROR no method named +LL | 1_usize.method3(); | ^^^^^^^ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&usize>>` in the current scope --> $DIR/no-method-suggested-traits.rs:70:47 | -LL | std::rc::Rc::new(&mut Box::new(&1_usize)).method3(); //~ ERROR no method named +LL | std::rc::Rc::new(&mut Box::new(&1_usize)).method3(); | ^^^^^^^ error[E0599]: no method named `method3` found for type `no_method_suggested_traits::Foo` in the current scope --> $DIR/no-method-suggested-traits.rs:71:37 | -LL | no_method_suggested_traits::Foo.method3(); //~ ERROR no method named +LL | no_method_suggested_traits::Foo.method3(); | ^^^^^^^ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope @@ -244,7 +244,7 @@ LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).metho error[E0599]: no method named `method3` found for type `no_method_suggested_traits::Bar` in the current scope --> $DIR/no-method-suggested-traits.rs:74:40 | -LL | no_method_suggested_traits::Bar::X.method3(); //~ ERROR no method named +LL | no_method_suggested_traits::Bar::X.method3(); | ^^^^^^^ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope diff --git a/src/test/ui/impl-trait/no-trait.stderr b/src/test/ui/impl-trait/no-trait.stderr index 84ac1bd5ca4..3a636f2524f 100644 --- a/src/test/ui/impl-trait/no-trait.stderr +++ b/src/test/ui/impl-trait/no-trait.stderr @@ -1,7 +1,7 @@ error: at least one trait must be specified --> $DIR/no-trait.rs:1:11 | -LL | fn f() -> impl 'static {} //~ ERROR at least one trait must be specified +LL | fn f() -> impl 'static {} | ^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/impl-trait/recursive-async-impl-trait-type.stderr b/src/test/ui/impl-trait/recursive-async-impl-trait-type.stderr index acdeabb2f98..abc9ff54bde 100644 --- a/src/test/ui/impl-trait/recursive-async-impl-trait-type.stderr +++ b/src/test/ui/impl-trait/recursive-async-impl-trait-type.stderr @@ -1,7 +1,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-async-impl-trait-type.rs:7:40 | -LL | async fn recursive_async_function() -> () { //~ ERROR +LL | async fn recursive_async_function() -> () { | ^^ expands to self-referential type | = note: expanded type is `std::future::GenFuture<[static generator@$DIR/recursive-async-impl-trait-type.rs:7:43: 9:2 {impl std::future::Future, ()}]>` diff --git a/src/test/ui/impl-trait/recursive-impl-trait-type.stderr b/src/test/ui/impl-trait/recursive-impl-trait-type.stderr index 96494229fd3..fce234eb87c 100644 --- a/src/test/ui/impl-trait/recursive-impl-trait-type.stderr +++ b/src/test/ui/impl-trait/recursive-impl-trait-type.stderr @@ -1,7 +1,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:6:22 | -LL | fn option(i: i32) -> impl Sized { //~ ERROR +LL | fn option(i: i32) -> impl Sized { | ^^^^^^^^^^ expands to self-referential type | = note: expanded type is `std::option::Option<(impl Sized, i32)>` @@ -9,7 +9,7 @@ LL | fn option(i: i32) -> impl Sized { //~ ERROR error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:14:15 | -LL | fn tuple() -> impl Sized { //~ ERROR +LL | fn tuple() -> impl Sized { | ^^^^^^^^^^ expands to self-referential type | = note: expanded type is `(impl Sized,)` @@ -17,7 +17,7 @@ LL | fn tuple() -> impl Sized { //~ ERROR error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:18:15 | -LL | fn array() -> impl Sized { //~ ERROR +LL | fn array() -> impl Sized { | ^^^^^^^^^^ expands to self-referential type | = note: expanded type is `[impl Sized; 1]` @@ -25,7 +25,7 @@ LL | fn array() -> impl Sized { //~ ERROR error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:22:13 | -LL | fn ptr() -> impl Sized { //~ ERROR +LL | fn ptr() -> impl Sized { | ^^^^^^^^^^ expands to self-referential type | = note: expanded type is `*const impl Sized` @@ -33,7 +33,7 @@ LL | fn ptr() -> impl Sized { //~ ERROR error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:26:16 | -LL | fn fn_ptr() -> impl Sized { //~ ERROR +LL | fn fn_ptr() -> impl Sized { | ^^^^^^^^^^ expands to self-referential type | = note: expanded type is `fn() -> impl Sized` @@ -41,7 +41,7 @@ LL | fn fn_ptr() -> impl Sized { //~ ERROR error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:30:25 | -LL | fn closure_capture() -> impl Sized { //~ ERROR +LL | fn closure_capture() -> impl Sized { | ^^^^^^^^^^ expands to self-referential type | = note: expanded type is `[closure@$DIR/recursive-impl-trait-type.rs:32:5: 32:19 x:impl Sized]` @@ -49,7 +49,7 @@ LL | fn closure_capture() -> impl Sized { //~ ERROR error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:35:29 | -LL | fn closure_ref_capture() -> impl Sized { //~ ERROR +LL | fn closure_ref_capture() -> impl Sized { | ^^^^^^^^^^ expands to self-referential type | = note: expanded type is `[closure@$DIR/recursive-impl-trait-type.rs:37:5: 37:20 x:impl Sized]` @@ -57,7 +57,7 @@ LL | fn closure_ref_capture() -> impl Sized { //~ ERROR error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:40:21 | -LL | fn closure_sig() -> impl Sized { //~ ERROR +LL | fn closure_sig() -> impl Sized { | ^^^^^^^^^^ expands to self-referential type | = note: expanded type is `[closure@$DIR/recursive-impl-trait-type.rs:41:5: 41:21]` @@ -65,7 +65,7 @@ LL | fn closure_sig() -> impl Sized { //~ ERROR error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:44:23 | -LL | fn generator_sig() -> impl Sized { //~ ERROR +LL | fn generator_sig() -> impl Sized { | ^^^^^^^^^^ expands to self-referential type | = note: expanded type is `[closure@$DIR/recursive-impl-trait-type.rs:45:5: 45:23]` @@ -73,7 +73,7 @@ LL | fn generator_sig() -> impl Sized { //~ ERROR error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:48:27 | -LL | fn generator_capture() -> impl Sized { //~ ERROR +LL | fn generator_capture() -> impl Sized { | ^^^^^^^^^^ expands to self-referential type | = note: expanded type is `[generator@$DIR/recursive-impl-trait-type.rs:50:5: 50:26 x:impl Sized {()}]` @@ -81,7 +81,7 @@ LL | fn generator_capture() -> impl Sized { //~ ERROR error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:53:26 | -LL | fn substs_change() -> impl Sized { //~ ERROR +LL | fn substs_change() -> impl Sized { | ^^^^^^^^^^ expands to self-referential type | = note: expanded type is `(impl Sized,)` @@ -89,7 +89,7 @@ LL | fn substs_change() -> impl Sized { //~ ERROR error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:57:24 | -LL | fn generator_hold() -> impl Sized { //~ ERROR +LL | fn generator_hold() -> impl Sized { | ^^^^^^^^^^ expands to self-referential type | = note: expanded type is `[generator@$DIR/recursive-impl-trait-type.rs:58:5: 62:6 {impl Sized, ()}]` @@ -97,7 +97,7 @@ LL | fn generator_hold() -> impl Sized { //~ ERROR error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:69:26 | -LL | fn mutual_recursion() -> impl Sync { //~ ERROR +LL | fn mutual_recursion() -> impl Sync { | ^^^^^^^^^ expands to self-referential type | = note: type resolves to itself @@ -105,7 +105,7 @@ LL | fn mutual_recursion() -> impl Sync { //~ ERROR error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:73:28 | -LL | fn mutual_recursion_b() -> impl Sized { //~ ERROR +LL | fn mutual_recursion_b() -> impl Sized { | ^^^^^^^^^^ expands to self-referential type | = note: type resolves to itself diff --git a/src/test/ui/impl-trait/universal-issue-48703.stderr b/src/test/ui/impl-trait/universal-issue-48703.stderr index 920b44fc909..26ed8dbb9c7 100644 --- a/src/test/ui/impl-trait/universal-issue-48703.stderr +++ b/src/test/ui/impl-trait/universal-issue-48703.stderr @@ -1,7 +1,7 @@ error[E0632]: cannot provide explicit type parameters when `impl Trait` is used in argument position. --> $DIR/universal-issue-48703.rs:8:5 | -LL | foo::('a'); //~ ERROR cannot provide explicit type parameters +LL | foo::('a'); | ^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/impl-trait/universal-mismatched-type.stderr b/src/test/ui/impl-trait/universal-mismatched-type.stderr index 55e1216d3a8..d223b9672cf 100644 --- a/src/test/ui/impl-trait/universal-mismatched-type.stderr +++ b/src/test/ui/impl-trait/universal-mismatched-type.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | fn foo(x: impl Debug) -> String { | ------ expected `std::string::String` because of return type -LL | x //~ ERROR mismatched types +LL | x | ^ expected struct `std::string::String`, found type parameter | = note: expected type `std::string::String` diff --git a/src/test/ui/impl-trait/universal-two-impl-traits.stderr b/src/test/ui/impl-trait/universal-two-impl-traits.stderr index 43bf2862fee..145d6a8431b 100644 --- a/src/test/ui/impl-trait/universal-two-impl-traits.stderr +++ b/src/test/ui/impl-trait/universal-two-impl-traits.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/universal-two-impl-traits.rs:5:9 | -LL | a = y; //~ ERROR mismatched +LL | a = y; | ^ expected type parameter, found a different type parameter | = note: expected type `impl Debug` (type parameter) diff --git a/src/test/ui/impl-trait/universal_wrong_bounds.stderr b/src/test/ui/impl-trait/universal_wrong_bounds.stderr index f0b685bd5ee..1fd3ebff62a 100644 --- a/src/test/ui/impl-trait/universal_wrong_bounds.stderr +++ b/src/test/ui/impl-trait/universal_wrong_bounds.stderr @@ -1,7 +1,7 @@ error[E0405]: cannot find trait `Debug` in this scope --> $DIR/universal_wrong_bounds.rs:9:24 | -LL | fn wants_debug(g: impl Debug) { } //~ ERROR cannot find +LL | fn wants_debug(g: impl Debug) { } | ^^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | @@ -11,7 +11,7 @@ LL | use std::fmt::Debug; error[E0405]: cannot find trait `Debug` in this scope --> $DIR/universal_wrong_bounds.rs:10:26 | -LL | fn wants_display(g: impl Debug) { } //~ ERROR cannot find +LL | fn wants_display(g: impl Debug) { } | ^^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | diff --git a/src/test/ui/impl-unused-rps-in-assoc-type.stderr b/src/test/ui/impl-unused-rps-in-assoc-type.stderr index 80fc0504558..c7ad1b4e608 100644 --- a/src/test/ui/impl-unused-rps-in-assoc-type.stderr +++ b/src/test/ui/impl-unused-rps-in-assoc-type.stderr @@ -1,7 +1,7 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates --> $DIR/impl-unused-rps-in-assoc-type.rs:11:6 | -LL | impl<'a> Fun for Holder { //~ ERROR E0207 +LL | impl<'a> Fun for Holder { | ^^ unconstrained lifetime parameter error: aborting due to previous error diff --git a/src/test/ui/implicit-method-bind.stderr b/src/test/ui/implicit-method-bind.stderr index 7c70709c6b9..968272d4d2c 100644 --- a/src/test/ui/implicit-method-bind.stderr +++ b/src/test/ui/implicit-method-bind.stderr @@ -1,7 +1,7 @@ error[E0615]: attempted to take value of method `abs` on type `i32` --> $DIR/implicit-method-bind.rs:2:20 | -LL | let _f = 10i32.abs; //~ ERROR attempted to take value of method +LL | let _f = 10i32.abs; | ^^^ help: use parentheses to call the method: `abs()` error: aborting due to previous error diff --git a/src/test/ui/import.stderr b/src/test/ui/import.stderr index bfbb6560d49..685fff25a14 100644 --- a/src/test/ui/import.stderr +++ b/src/test/ui/import.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `zed::baz` --> $DIR/import.rs:2:5 | -LL | use zed::baz; //~ ERROR unresolved import `zed::baz` [E0432] +LL | use zed::baz; | ^^^^^--- | | | | | help: a similar name exists in the module: `bar` @@ -10,13 +10,13 @@ LL | use zed::baz; //~ ERROR unresolved import `zed::baz` [E0432] error[E0432]: unresolved import `foo` --> $DIR/import.rs:10:9 | -LL | use foo; //~ ERROR unresolved import `foo` [E0432] +LL | use foo; | ^^^ no `foo` in the root error[E0603]: unresolved item `foo` is private --> $DIR/import.rs:15:10 | -LL | zed::foo(); //~ ERROR `foo` is private +LL | zed::foo(); | ^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/import2.stderr b/src/test/ui/import2.stderr index f0509204f2c..da888979c30 100644 --- a/src/test/ui/import2.stderr +++ b/src/test/ui/import2.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `baz::zed` --> $DIR/import2.rs:1:10 | -LL | use baz::zed::bar; //~ ERROR unresolved import `baz::zed` [E0432] +LL | use baz::zed::bar; | ^^^ could not find `zed` in `baz` error: aborting due to previous error diff --git a/src/test/ui/imports/duplicate.stderr b/src/test/ui/imports/duplicate.stderr index 29660d908e4..7c43c642ec3 100644 --- a/src/test/ui/imports/duplicate.stderr +++ b/src/test/ui/imports/duplicate.stderr @@ -3,7 +3,7 @@ error[E0252]: the name `foo` is defined multiple times | LL | use a::foo; | ------ previous import of the value `foo` here -LL | use a::foo; //~ ERROR the name `foo` is defined multiple times +LL | use a::foo; | ----^^^^^^- | | | | | `foo` reimported here @@ -14,7 +14,7 @@ LL | use a::foo; //~ ERROR the name `foo` is defined multiple times error[E0659]: `foo` is ambiguous (glob import vs glob import in the same module) --> $DIR/duplicate.rs:46:15 | -LL | use self::foo::bar; //~ ERROR `foo` is ambiguous +LL | use self::foo::bar; | ^^^ ambiguous name | note: `foo` could refer to the module imported here @@ -33,7 +33,7 @@ LL | use self::m2::*; error[E0659]: `foo` is ambiguous (glob import vs glob import in the same module) --> $DIR/duplicate.rs:35:8 | -LL | f::foo(); //~ ERROR `foo` is ambiguous +LL | f::foo(); | ^^^ ambiguous name | note: `foo` could refer to the function imported here @@ -52,7 +52,7 @@ LL | pub use b::*; error[E0659]: `foo` is ambiguous (glob import vs glob import in the same module) --> $DIR/duplicate.rs:49:9 | -LL | foo::bar(); //~ ERROR `foo` is ambiguous +LL | foo::bar(); | ^^^ ambiguous name | note: `foo` could refer to the module imported here diff --git a/src/test/ui/imports/extern-crate-self/extern-crate-self-fail.stderr b/src/test/ui/imports/extern-crate-self/extern-crate-self-fail.stderr index b47d10343f6..f26bb2f5a0e 100644 --- a/src/test/ui/imports/extern-crate-self/extern-crate-self-fail.stderr +++ b/src/test/ui/imports/extern-crate-self/extern-crate-self-fail.stderr @@ -1,13 +1,13 @@ error: `extern crate self;` requires renaming --> $DIR/extern-crate-self-fail.rs:1:1 | -LL | extern crate self; //~ ERROR `extern crate self;` requires renaming +LL | extern crate self; | ^^^^^^^^^^^^^^^^^^ help: try: `extern crate self as name;` error: `macro_use` is not supported on `extern crate self` --> $DIR/extern-crate-self-fail.rs:3:1 | -LL | #[macro_use] //~ ERROR `macro_use` is not supported on `extern crate self` +LL | #[macro_use] | ^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/imports/extern-crate-used.stderr b/src/test/ui/imports/extern-crate-used.stderr index 3f9aab9dc79..c0783feb794 100644 --- a/src/test/ui/imports/extern-crate-used.stderr +++ b/src/test/ui/imports/extern-crate-used.stderr @@ -1,7 +1,7 @@ error: `extern crate` is not idiomatic in the new edition --> $DIR/extern-crate-used.rs:8:1 | -LL | extern crate core as iso1; //~ ERROR `extern crate` is not idiomatic in the new edition +LL | extern crate core as iso1; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use` | note: lint level defined here @@ -13,25 +13,25 @@ LL | #![deny(unused_extern_crates)] error: `extern crate` is not idiomatic in the new edition --> $DIR/extern-crate-used.rs:9:1 | -LL | extern crate core as iso2; //~ ERROR `extern crate` is not idiomatic in the new edition +LL | extern crate core as iso2; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use` error: `extern crate` is not idiomatic in the new edition --> $DIR/extern-crate-used.rs:10:1 | -LL | extern crate core as iso3; //~ ERROR `extern crate` is not idiomatic in the new edition +LL | extern crate core as iso3; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use` error: `extern crate` is not idiomatic in the new edition --> $DIR/extern-crate-used.rs:11:1 | -LL | extern crate core as iso4; //~ ERROR `extern crate` is not idiomatic in the new edition +LL | extern crate core as iso4; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use` error: unused extern crate --> $DIR/extern-crate-used.rs:14:1 | -LL | extern crate core; //~ ERROR unused extern crate +LL | extern crate core; | ^^^^^^^^^^^^^^^^^^ help: remove it error: aborting due to 5 previous errors diff --git a/src/test/ui/imports/extern-prelude-extern-crate-fail.stderr b/src/test/ui/imports/extern-prelude-extern-crate-fail.stderr index baeed02517d..e067432b392 100644 --- a/src/test/ui/imports/extern-prelude-extern-crate-fail.stderr +++ b/src/test/ui/imports/extern-prelude-extern-crate-fail.stderr @@ -10,7 +10,7 @@ LL | define_std_as_non_existent!(); error[E0433]: failed to resolve: use of undeclared type or module `two_macros` --> $DIR/extern-prelude-extern-crate-fail.rs:10:9 | -LL | two_macros::m!(); //~ ERROR failed to resolve: use of undeclared type or module `two_macros` +LL | two_macros::m!(); | ^^^^^^^^^^ use of undeclared type or module `two_macros` error: aborting due to 2 previous errors diff --git a/src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.stderr b/src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.stderr index 795e1761ccd..24b1b582d1e 100644 --- a/src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.stderr +++ b/src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.stderr @@ -10,7 +10,7 @@ LL | define_other_core!(); error[E0659]: `Vec` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:13:9 | -LL | Vec::panic!(); //~ ERROR `Vec` is ambiguous +LL | Vec::panic!(); | ^^^ ambiguous name | = note: `Vec` could refer to a struct from prelude diff --git a/src/test/ui/imports/glob-conflict-cross-crate.stderr b/src/test/ui/imports/glob-conflict-cross-crate.stderr index f5a82ef1b3b..ad70b7d5b91 100644 --- a/src/test/ui/imports/glob-conflict-cross-crate.stderr +++ b/src/test/ui/imports/glob-conflict-cross-crate.stderr @@ -1,13 +1,13 @@ error[E0425]: cannot find function `f` in module `glob_conflict` --> $DIR/glob-conflict-cross-crate.rs:6:20 | -LL | glob_conflict::f(); //~ ERROR cannot find function `f` in module `glob_conflict` +LL | glob_conflict::f(); | ^ not found in `glob_conflict` error[E0425]: cannot find function `f` in module `glob_conflict::glob` --> $DIR/glob-conflict-cross-crate.rs:7:26 | -LL | glob_conflict::glob::f(); //~ ERROR cannot find function `f` in module `glob_conflict::glob` +LL | glob_conflict::glob::f(); | ^ not found in `glob_conflict::glob` error: aborting due to 2 previous errors diff --git a/src/test/ui/imports/glob-shadowing.stderr b/src/test/ui/imports/glob-shadowing.stderr index c43ab00e718..7962fcb9aec 100644 --- a/src/test/ui/imports/glob-shadowing.stderr +++ b/src/test/ui/imports/glob-shadowing.stderr @@ -1,7 +1,7 @@ error[E0659]: `env` is ambiguous (glob import vs any other name from outer scope during import/macro resolution) --> $DIR/glob-shadowing.rs:11:17 | -LL | let x = env!("PATH"); //~ ERROR `env` is ambiguous +LL | let x = env!("PATH"); | ^^^ ambiguous name | = note: `env` could refer to a built-in macro @@ -16,7 +16,7 @@ LL | use m::*; error[E0659]: `env` is ambiguous (glob import vs any other name from outer scope during import/macro resolution) --> $DIR/glob-shadowing.rs:19:21 | -LL | let x = env!("PATH"); //~ ERROR `env` is ambiguous +LL | let x = env!("PATH"); | ^^^ ambiguous name | = note: `env` could refer to a built-in macro @@ -30,7 +30,7 @@ LL | use m::*; error[E0659]: `fenv` is ambiguous (glob import vs any other name from outer scope during import/macro resolution) --> $DIR/glob-shadowing.rs:29:21 | -LL | let x = fenv!(); //~ ERROR `fenv` is ambiguous +LL | let x = fenv!(); | ^^^^ ambiguous name | note: `fenv` could refer to the macro imported here diff --git a/src/test/ui/imports/import-from-missing.stderr b/src/test/ui/imports/import-from-missing.stderr index 0524b167564..4254bfb5efb 100644 --- a/src/test/ui/imports/import-from-missing.stderr +++ b/src/test/ui/imports/import-from-missing.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `spam::eggs` --> $DIR/import-from-missing.rs:1:17 | -LL | use spam::{ham, eggs}; //~ ERROR unresolved import `spam::eggs` [E0432] +LL | use spam::{ham, eggs}; | ^^^^ no `eggs` in `spam` error: aborting due to previous error diff --git a/src/test/ui/imports/import-glob-0.stderr b/src/test/ui/imports/import-glob-0.stderr index 4fecf80bff2..820ff1bb536 100644 --- a/src/test/ui/imports/import-glob-0.stderr +++ b/src/test/ui/imports/import-glob-0.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find function `f999` in this scope --> $DIR/import-glob-0.rs:14:5 | -LL | f999(); //~ ERROR cannot find function `f999` in this scope +LL | f999(); | ^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/imports/import-glob-circular.stderr b/src/test/ui/imports/import-glob-circular.stderr index 30586132c35..86bbea579ae 100644 --- a/src/test/ui/imports/import-glob-circular.stderr +++ b/src/test/ui/imports/import-glob-circular.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find function `f1066` in this scope --> $DIR/import-glob-circular.rs:16:17 | -LL | fn test() { f1066(); } //~ ERROR cannot find function `f1066` in this scope +LL | fn test() { f1066(); } | ^^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/imports/import-prefix-macro-1.stderr b/src/test/ui/imports/import-prefix-macro-1.stderr index 76e543a9f27..577f1282471 100644 --- a/src/test/ui/imports/import-prefix-macro-1.stderr +++ b/src/test/ui/imports/import-prefix-macro-1.stderr @@ -1,7 +1,7 @@ error: expected one of `::`, `;`, or `as`, found `{` --> $DIR/import-prefix-macro-1.rs:11:27 | -LL | ($p: path) => (use $p {S, Z}); //~ERROR expected one of `::`, `;`, or `as`, found `{` +LL | ($p: path) => (use $p {S, Z}); | ^ expected one of `::`, `;`, or `as` here ... LL | import! { a::b::c } diff --git a/src/test/ui/imports/import-prefix-macro-2.stderr b/src/test/ui/imports/import-prefix-macro-2.stderr index fa3c90d9ed2..8428dce2728 100644 --- a/src/test/ui/imports/import-prefix-macro-2.stderr +++ b/src/test/ui/imports/import-prefix-macro-2.stderr @@ -1,7 +1,7 @@ error: expected identifier, found `a::b::c` --> $DIR/import-prefix-macro-2.rs:11:26 | -LL | ($p: path) => (use ::$p {S, Z}); //~ERROR expected identifier, found `a::b::c` +LL | ($p: path) => (use ::$p {S, Z}); | ^^ expected identifier ... LL | import! { a::b::c } diff --git a/src/test/ui/imports/import-trait-method.stderr b/src/test/ui/imports/import-trait-method.stderr index 00cfb42ddd4..3c26907d3d0 100644 --- a/src/test/ui/imports/import-trait-method.stderr +++ b/src/test/ui/imports/import-trait-method.stderr @@ -1,7 +1,7 @@ error[E0253]: `foo` is not directly importable --> $DIR/import-trait-method.rs:5:5 | -LL | use Foo::foo; //~ ERROR not directly importable +LL | use Foo::foo; | ^^^^^^^^ cannot be imported directly error: aborting due to previous error diff --git a/src/test/ui/imports/issue-53269.stderr b/src/test/ui/imports/issue-53269.stderr index 0163ee8bceb..fc4ca3d0e53 100644 --- a/src/test/ui/imports/issue-53269.stderr +++ b/src/test/ui/imports/issue-53269.stderr @@ -1,13 +1,13 @@ error[E0432]: unresolved import `nonexistent_module` --> $DIR/issue-53269.rs:6:9 | -LL | use nonexistent_module::mac; //~ ERROR unresolved import `nonexistent_module` +LL | use nonexistent_module::mac; | ^^^^^^^^^^^^^^^^^^ maybe a missing `extern crate nonexistent_module;`? error[E0659]: `mac` is ambiguous (`macro_rules` vs non-`macro_rules` from other module) --> $DIR/issue-53269.rs:8:5 | -LL | mac!(); //~ ERROR `mac` is ambiguous +LL | mac!(); | ^^^ ambiguous name | note: `mac` could refer to the macro defined here @@ -18,7 +18,7 @@ LL | macro_rules! mac { () => () } note: `mac` could also refer to the unresolved item imported here --> $DIR/issue-53269.rs:6:9 | -LL | use nonexistent_module::mac; //~ ERROR unresolved import `nonexistent_module` +LL | use nonexistent_module::mac; | ^^^^^^^^^^^^^^^^^^^^^^^ = help: use `self::mac` to refer to this unresolved item unambiguously diff --git a/src/test/ui/imports/issue-53512.stderr b/src/test/ui/imports/issue-53512.stderr index a733013be5f..f902fc48888 100644 --- a/src/test/ui/imports/issue-53512.stderr +++ b/src/test/ui/imports/issue-53512.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `std::assert` --> $DIR/issue-53512.rs:3:5 | -LL | use std::assert; //~ ERROR unresolved import `std::assert` +LL | use std::assert; | ^^^^^^^^^^^ no `assert` in the root error: aborting due to previous error diff --git a/src/test/ui/imports/issue-55457.stderr b/src/test/ui/imports/issue-55457.stderr index a3474b2f7db..86a76c1d89c 100644 --- a/src/test/ui/imports/issue-55457.stderr +++ b/src/test/ui/imports/issue-55457.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `NonExistent` --> $DIR/issue-55457.rs:1:5 | -LL | use NonExistent; //~ ERROR unresolved import `NonExistent` +LL | use NonExistent; | ^^^^^^^^^^^ | | | no `NonExistent` in the root @@ -10,13 +10,13 @@ LL | use NonExistent; //~ ERROR unresolved import `NonExistent` error[E0432]: unresolved import `non_existent` --> $DIR/issue-55457.rs:2:5 | -LL | use non_existent::non_existent; //~ ERROR unresolved import `non_existent` +LL | use non_existent::non_existent; | ^^^^^^^^^^^^ maybe a missing `extern crate non_existent;`? error: cannot determine resolution for the derive macro `NonExistent` --> $DIR/issue-55457.rs:5:10 | -LL | #[derive(NonExistent)] //~ ERROR cannot determine resolution for the derive macro `NonExistent` +LL | #[derive(NonExistent)] | ^^^^^^^^^^^ | = note: import resolution is stuck, try simplifying macro imports @@ -24,7 +24,7 @@ LL | #[derive(NonExistent)] //~ ERROR cannot determine resolution for the derive error: cannot determine resolution for the attribute macro `non_existent` --> $DIR/issue-55457.rs:4:3 | -LL | #[non_existent] //~ ERROR cannot determine resolution for the attribute macro `non_existent` +LL | #[non_existent] | ^^^^^^^^^^^^ | = note: import resolution is stuck, try simplifying macro imports diff --git a/src/test/ui/imports/issue-55884-1.stderr b/src/test/ui/imports/issue-55884-1.stderr index 477e859d081..a7a7cc8879e 100644 --- a/src/test/ui/imports/issue-55884-1.stderr +++ b/src/test/ui/imports/issue-55884-1.stderr @@ -1,7 +1,7 @@ error[E0659]: `S` is ambiguous (glob import vs glob import in the same module) --> $DIR/issue-55884-1.rs:19:12 | -LL | use m::S; //~ ERROR `S` is ambiguous +LL | use m::S; | ^ ambiguous name | note: `S` could refer to the struct imported here diff --git a/src/test/ui/imports/issue-55884-2.stderr b/src/test/ui/imports/issue-55884-2.stderr index f8a6cb4a580..d3b43783ee9 100644 --- a/src/test/ui/imports/issue-55884-2.stderr +++ b/src/test/ui/imports/issue-55884-2.stderr @@ -1,7 +1,7 @@ error[E0603]: struct `ParseOptions` is private --> $DIR/issue-55884-2.rs:12:17 | -LL | pub use parser::ParseOptions; //~ ERROR struct `ParseOptions` is private +LL | pub use parser::ParseOptions; | ^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/imports/issue-56125.stderr b/src/test/ui/imports/issue-56125.stderr index 844962b910a..26d2fa06dd2 100644 --- a/src/test/ui/imports/issue-56125.stderr +++ b/src/test/ui/imports/issue-56125.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `empty::issue_56125` --> $DIR/issue-56125.rs:17:9 | -LL | use empty::issue_56125; //~ ERROR unresolved import `empty::issue_56125` +LL | use empty::issue_56125; | ^^^^^^^^^^^^^^^^^^ no `issue_56125` in `m3::empty` error[E0659]: `issue_56125` is ambiguous (name vs any other name during import resolution) @@ -37,7 +37,7 @@ LL | use issue_56125::non_last_segment::non_last_segment::*; error[E0659]: `issue_56125` is ambiguous (name vs any other name during import resolution) --> $DIR/issue-56125.rs:18:9 | -LL | use issue_56125::*; //~ ERROR `issue_56125` is ambiguous +LL | use issue_56125::*; | ^^^^^^^^^^^ ambiguous name | = note: `issue_56125` could refer to an extern crate passed with `--extern` @@ -45,7 +45,7 @@ LL | use issue_56125::*; //~ ERROR `issue_56125` is ambiguous note: `issue_56125` could also refer to the module imported here --> $DIR/issue-56125.rs:18:9 | -LL | use issue_56125::*; //~ ERROR `issue_56125` is ambiguous +LL | use issue_56125::*; | ^^^^^^^^^^^^^^ = help: use `self::issue_56125` to refer to this module unambiguously diff --git a/src/test/ui/imports/issue-57015.stderr b/src/test/ui/imports/issue-57015.stderr index b0fcf5bec6a..d200d23ab28 100644 --- a/src/test/ui/imports/issue-57015.stderr +++ b/src/test/ui/imports/issue-57015.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `single_err::something` --> $DIR/issue-57015.rs:10:5 | -LL | use single_err::something; //~ ERROR unresolved import `single_err::something` +LL | use single_err::something; | ^^^^^^^^^^^^^^^^^^^^^ no `something` in `single_err` error: aborting due to previous error diff --git a/src/test/ui/imports/issue-57539.stderr b/src/test/ui/imports/issue-57539.stderr index 3f745fd8204..ebf27ca54bc 100644 --- a/src/test/ui/imports/issue-57539.stderr +++ b/src/test/ui/imports/issue-57539.stderr @@ -1,7 +1,7 @@ error[E0659]: `core` is ambiguous (name vs any other name during import resolution) --> $DIR/issue-57539.rs:4:9 | -LL | use core; //~ ERROR `core` is ambiguous +LL | use core; | ^^^^ ambiguous name | = note: `core` could refer to a built-in extern crate diff --git a/src/test/ui/imports/local-modularized-tricky-fail-1.stderr b/src/test/ui/imports/local-modularized-tricky-fail-1.stderr index 21f75afb3f7..d7ae8e6d505 100644 --- a/src/test/ui/imports/local-modularized-tricky-fail-1.stderr +++ b/src/test/ui/imports/local-modularized-tricky-fail-1.stderr @@ -1,7 +1,7 @@ error[E0659]: `exported` is ambiguous (glob import vs macro-expanded name in the same module during import/macro resolution) --> $DIR/local-modularized-tricky-fail-1.rs:28:1 | -LL | exported!(); //~ ERROR `exported` is ambiguous +LL | exported!(); | ^^^^^^^^ ambiguous name | note: `exported` could refer to the macro defined here @@ -24,7 +24,7 @@ LL | use inner1::*; error[E0659]: `include` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/local-modularized-tricky-fail-1.rs:47:1 | -LL | include!(); //~ ERROR `include` is ambiguous +LL | include!(); | ^^^^^^^ ambiguous name | = note: `include` could refer to a built-in macro @@ -43,7 +43,7 @@ LL | define_include!(); error[E0659]: `panic` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/local-modularized-tricky-fail-1.rs:35:5 | -LL | panic!(); //~ ERROR `panic` is ambiguous +LL | panic!(); | ^^^^^ ambiguous name | = note: `panic` could refer to a macro from prelude @@ -62,7 +62,7 @@ LL | define_panic!(); error[E0659]: `panic` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/local-modularized-tricky-fail-1.rs:35:5 | -LL | panic!(); //~ ERROR `panic` is ambiguous +LL | panic!(); | ^^^^^^^^^ ambiguous name | = note: `panic` could refer to a macro from prelude diff --git a/src/test/ui/imports/local-modularized-tricky-fail-2.stderr b/src/test/ui/imports/local-modularized-tricky-fail-2.stderr index 40cb10ced16..a26f0cbec72 100644 --- a/src/test/ui/imports/local-modularized-tricky-fail-2.stderr +++ b/src/test/ui/imports/local-modularized-tricky-fail-2.stderr @@ -4,7 +4,7 @@ error[E0658]: non-ascii idents are not fully supported. (see issue #55467) LL | exported!(); | ------------ in this macro invocation ... -LL | () => ( struct Б; ) //~ ERROR non-ascii idents are not fully supported +LL | () => ( struct Б; ) | ^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -15,7 +15,7 @@ error[E0658]: non-ascii idents are not fully supported. (see issue #55467) LL | panic!(); | --------- in this macro invocation ... -LL | () => ( struct Г; ) //~ ERROR non-ascii idents are not fully supported +LL | () => ( struct Г; ) | ^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -26,7 +26,7 @@ error[E0658]: non-ascii idents are not fully supported. (see issue #55467) LL | include!(); | ----------- in this macro invocation ... -LL | () => ( struct Д; ) //~ ERROR non-ascii idents are not fully supported +LL | () => ( struct Д; ) | ^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable diff --git a/src/test/ui/imports/macro-paths.stderr b/src/test/ui/imports/macro-paths.stderr index 36290b2d93e..a5b90008272 100644 --- a/src/test/ui/imports/macro-paths.stderr +++ b/src/test/ui/imports/macro-paths.stderr @@ -1,7 +1,7 @@ error[E0659]: `bar` is ambiguous (glob import vs macro-expanded name in the same module during import/macro resolution) --> $DIR/macro-paths.rs:13:5 | -LL | bar::m! { //~ ERROR ambiguous +LL | bar::m! { | ^^^ ambiguous name | note: `bar` could refer to the module defined here @@ -19,7 +19,7 @@ LL | use foo::*; error[E0659]: `baz` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/macro-paths.rs:23:5 | -LL | baz::m! { //~ ERROR ambiguous +LL | baz::m! { | ^^^ ambiguous name | note: `baz` could refer to the module defined here diff --git a/src/test/ui/imports/macros.stderr b/src/test/ui/imports/macros.stderr index 5a15bf0ae71..3b9e6feebd7 100644 --- a/src/test/ui/imports/macros.stderr +++ b/src/test/ui/imports/macros.stderr @@ -1,7 +1,7 @@ error[E0659]: `m` is ambiguous (glob import vs macro-expanded name in the same module during import/macro resolution) --> $DIR/macros.rs:16:5 | -LL | m! { //~ ERROR ambiguous +LL | m! { | ^ ambiguous name | note: `m` could refer to the macro imported here @@ -19,7 +19,7 @@ LL | use two_macros::*; error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/macros.rs:29:9 | -LL | m! { //~ ERROR ambiguous +LL | m! { | ^ ambiguous name | note: `m` could refer to the macro imported here diff --git a/src/test/ui/imports/reexports.stderr b/src/test/ui/imports/reexports.stderr index 964e847392a..7726343ba6e 100644 --- a/src/test/ui/imports/reexports.stderr +++ b/src/test/ui/imports/reexports.stderr @@ -1,31 +1,31 @@ error[E0364]: `foo` is private, and cannot be re-exported --> $DIR/reexports.rs:6:17 | -LL | pub use super::foo; //~ ERROR cannot be re-exported +LL | pub use super::foo; | ^^^^^^^^^^ | note: consider marking `foo` as `pub` in the imported module --> $DIR/reexports.rs:6:17 | -LL | pub use super::foo; //~ ERROR cannot be re-exported +LL | pub use super::foo; | ^^^^^^^^^^ error: A non-empty glob must import something with the glob's visibility --> $DIR/reexports.rs:7:17 | -LL | pub use super::*; //~ ERROR must import something with the glob's visibility +LL | pub use super::*; | ^^^^^^^^ error[E0603]: module `foo` is private --> $DIR/reexports.rs:28:15 | -LL | use b::a::foo::S; //~ ERROR `foo` +LL | use b::a::foo::S; | ^^^ error[E0603]: module `foo` is private --> $DIR/reexports.rs:29:15 | -LL | use b::b::foo::S as T; //~ ERROR `foo` +LL | use b::b::foo::S as T; | ^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/imports/rfc-1560-warning-cycle.stderr b/src/test/ui/imports/rfc-1560-warning-cycle.stderr index 16caf68e14f..d79c719d826 100644 --- a/src/test/ui/imports/rfc-1560-warning-cycle.stderr +++ b/src/test/ui/imports/rfc-1560-warning-cycle.stderr @@ -1,7 +1,7 @@ error[E0659]: `Foo` is ambiguous (glob import vs glob import in the same module) --> $DIR/rfc-1560-warning-cycle.rs:9:17 | -LL | fn f(_: Foo) {} //~ ERROR `Foo` is ambiguous +LL | fn f(_: Foo) {} | ^^^ ambiguous name | note: `Foo` could refer to the struct imported here diff --git a/src/test/ui/imports/shadow_builtin_macros.stderr b/src/test/ui/imports/shadow_builtin_macros.stderr index db4ee1128f4..c84226ef313 100644 --- a/src/test/ui/imports/shadow_builtin_macros.stderr +++ b/src/test/ui/imports/shadow_builtin_macros.stderr @@ -1,7 +1,7 @@ error[E0659]: `panic` is ambiguous (glob import vs any other name from outer scope during import/macro resolution) --> $DIR/shadow_builtin_macros.rs:15:14 | -LL | fn f() { panic!(); } //~ ERROR ambiguous +LL | fn f() { panic!(); } | ^^^^^ ambiguous name | = note: `panic` could refer to a macro from prelude @@ -16,7 +16,7 @@ LL | use foo::*; error[E0659]: `panic` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/shadow_builtin_macros.rs:20:14 | -LL | fn f() { panic!(); } //~ ERROR ambiguous +LL | fn f() { panic!(); } | ^^^^^ ambiguous name | = note: `panic` could refer to a macro from prelude @@ -30,7 +30,7 @@ LL | ::two_macros::m!(use foo::panic;); error[E0659]: `panic` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/shadow_builtin_macros.rs:33:5 | -LL | panic!(); //~ ERROR `panic` is ambiguous +LL | panic!(); | ^^^^^ ambiguous name | = note: `panic` could refer to a macro from prelude @@ -46,7 +46,7 @@ LL | m!(); error[E0659]: `n` is ambiguous (glob import vs any other name from outer scope during import/macro resolution) --> $DIR/shadow_builtin_macros.rs:49:5 | -LL | n!(); //~ ERROR ambiguous +LL | n!(); | ^ ambiguous name | note: `n` could refer to the macro imported here diff --git a/src/test/ui/imports/unused-macro-use.stderr b/src/test/ui/imports/unused-macro-use.stderr index 2d20b311442..78683147f7b 100644 --- a/src/test/ui/imports/unused-macro-use.stderr +++ b/src/test/ui/imports/unused-macro-use.stderr @@ -1,7 +1,7 @@ error: unused `#[macro_use]` import --> $DIR/unused-macro-use.rs:3:1 | -LL | #[macro_use] //~ ERROR unused `#[macro_use]` import +LL | #[macro_use] | ^^^^^^^^^^^^ | note: lint level defined here @@ -14,7 +14,7 @@ LL | #![deny(unused)] error: unused `#[macro_use]` import --> $DIR/unused-macro-use.rs:7:5 | -LL | panic //~ ERROR unused `#[macro_use]` import +LL | panic | ^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/imports/unused.stderr b/src/test/ui/imports/unused.stderr index b56e930158c..259ed958696 100644 --- a/src/test/ui/imports/unused.stderr +++ b/src/test/ui/imports/unused.stderr @@ -1,7 +1,7 @@ error: unused import: `super::f` --> $DIR/unused.rs:7:24 | -LL | pub(super) use super::f; //~ ERROR unused +LL | pub(super) use super::f; | ^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/impossible_range.stderr b/src/test/ui/impossible_range.stderr index 1d26030625f..091fe37c7a1 100644 --- a/src/test/ui/impossible_range.stderr +++ b/src/test/ui/impossible_range.stderr @@ -1,7 +1,7 @@ error[E0586]: inclusive range with no end --> $DIR/impossible_range.rs:8:8 | -LL | ..=; //~ERROR inclusive range with no end +LL | ..=; | ^ | = help: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) @@ -9,7 +9,7 @@ LL | ..=; //~ERROR inclusive range with no end error[E0586]: inclusive range with no end --> $DIR/impossible_range.rs:15:9 | -LL | 0..=; //~ERROR inclusive range with no end +LL | 0..=; | ^ | = help: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) diff --git a/src/test/ui/in-band-lifetimes/E0687.stderr b/src/test/ui/in-band-lifetimes/E0687.stderr index 74245e16e7f..7aea2f22046 100644 --- a/src/test/ui/in-band-lifetimes/E0687.stderr +++ b/src/test/ui/in-band-lifetimes/E0687.stderr @@ -1,25 +1,25 @@ error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders --> $DIR/E0687.rs:4:15 | -LL | fn foo(x: fn(&'a u32)) {} //~ ERROR must be explicitly +LL | fn foo(x: fn(&'a u32)) {} | ^^ in-band lifetime definition error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders --> $DIR/E0687.rs:6:16 | -LL | fn bar(x: &Fn(&'a u32)) {} //~ ERROR must be explicitly +LL | fn bar(x: &Fn(&'a u32)) {} | ^^ in-band lifetime definition error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders --> $DIR/E0687.rs:8:15 | -LL | fn baz(x: fn(&'a u32), y: &'a u32) {} //~ ERROR must be explicitly +LL | fn baz(x: fn(&'a u32), y: &'a u32) {} | ^^ in-band lifetime definition error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders --> $DIR/E0687.rs:13:26 | -LL | fn bar(&self, x: fn(&'a u32)) {} //~ ERROR must be explicitly +LL | fn bar(&self, x: fn(&'a u32)) {} | ^^ in-band lifetime definition error: aborting due to 4 previous errors diff --git a/src/test/ui/in-band-lifetimes/E0687_where.stderr b/src/test/ui/in-band-lifetimes/E0687_where.stderr index 4533c3b10f7..af0f9665f5d 100644 --- a/src/test/ui/in-band-lifetimes/E0687_where.stderr +++ b/src/test/ui/in-band-lifetimes/E0687_where.stderr @@ -1,13 +1,13 @@ error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders --> $DIR/E0687_where.rs:4:31 | -LL | fn bar(x: &F) where F: Fn(&'a u32) {} //~ ERROR must be explicitly +LL | fn bar(x: &F) where F: Fn(&'a u32) {} | ^^ in-band lifetime definition error[E0687]: lifetimes used in `fn` or `Fn` syntax must be explicitly declared using `<...>` binders --> $DIR/E0687_where.rs:6:21 | -LL | fn baz(x: &impl Fn(&'a u32)) {} //~ ERROR must be explicitly +LL | fn baz(x: &impl Fn(&'a u32)) {} | ^^ in-band lifetime definition error: aborting due to 2 previous errors diff --git a/src/test/ui/in-band-lifetimes/E0688.stderr b/src/test/ui/in-band-lifetimes/E0688.stderr index f02b8db4669..afefcd9fc2c 100644 --- a/src/test/ui/in-band-lifetimes/E0688.stderr +++ b/src/test/ui/in-band-lifetimes/E0688.stderr @@ -1,7 +1,7 @@ error[E0688]: cannot mix in-band and explicit lifetime definitions --> $DIR/E0688.rs:4:28 | -LL | fn foo<'a>(x: &'a u32, y: &'b u32) {} //~ ERROR cannot mix +LL | fn foo<'a>(x: &'a u32, y: &'b u32) {} | -- ^^ in-band lifetime definition here | | | explicit lifetime definition here @@ -9,7 +9,7 @@ LL | fn foo<'a>(x: &'a u32, y: &'b u32) {} //~ ERROR cannot mix error[E0688]: cannot mix in-band and explicit lifetime definitions --> $DIR/E0688.rs:9:44 | -LL | fn bar<'b>(x: &'a u32, y: &'b u32, z: &'c u32) {} //~ ERROR cannot mix +LL | fn bar<'b>(x: &'a u32, y: &'b u32, z: &'c u32) {} | -- ^^ in-band lifetime definition here | | | explicit lifetime definition here @@ -17,7 +17,7 @@ LL | fn bar<'b>(x: &'a u32, y: &'b u32, z: &'c u32) {} //~ ERROR cannot mix error[E0688]: cannot mix in-band and explicit lifetime definitions --> $DIR/E0688.rs:12:14 | -LL | impl<'b> Foo<'a> { //~ ERROR cannot mix +LL | impl<'b> Foo<'a> { | -- ^^ in-band lifetime definition here | | | explicit lifetime definition here diff --git a/src/test/ui/in-band-lifetimes/mismatched.stderr b/src/test/ui/in-band-lifetimes/mismatched.stderr index abc6d42910f..9d33aaf4c36 100644 --- a/src/test/ui/in-band-lifetimes/mismatched.stderr +++ b/src/test/ui/in-band-lifetimes/mismatched.stderr @@ -1,7 +1,7 @@ error[E0621]: explicit lifetime required in the type of `y` --> $DIR/mismatched.rs:4:42 | -LL | fn foo(x: &'a u32, y: &u32) -> &'a u32 { y } //~ ERROR explicit lifetime required +LL | fn foo(x: &'a u32, y: &u32) -> &'a u32 { y } | ---- ^ lifetime `'a` required | | | help: add explicit lifetime `'a` to the type of `y`: `&'a u32` @@ -9,7 +9,7 @@ LL | fn foo(x: &'a u32, y: &u32) -> &'a u32 { y } //~ ERROR explicit lifetime re error[E0623]: lifetime mismatch --> $DIR/mismatched.rs:6:46 | -LL | fn foo2(x: &'a u32, y: &'b u32) -> &'a u32 { y } //~ ERROR lifetime mismatch +LL | fn foo2(x: &'a u32, y: &'b u32) -> &'a u32 { y } | ------- ------- ^ ...but data from `y` is returned here | | | this parameter and the return type are declared with different lifetimes... diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait.stderr index dd28aa226b7..ac66daa21c7 100644 --- a/src/test/ui/in-band-lifetimes/mismatched_trait.stderr +++ b/src/test/ui/in-band-lifetimes/mismatched_trait.stderr @@ -3,7 +3,7 @@ error[E0621]: explicit lifetime required in the type of `y` | LL | fn baz(&self, x: &'a u32, y: &u32) -> &'a u32 { | ---- help: add explicit lifetime `'a` to the type of `y`: `&'a u32` -LL | y //~ ERROR explicit lifetime required +LL | y | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr b/src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr index 4af991cede4..a80ebaf8dd2 100644 --- a/src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr +++ b/src/test/ui/in-band-lifetimes/mismatched_trait_impl.stderr @@ -1,20 +1,20 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter 'a in generic type due to conflicting requirements --> $DIR/mismatched_trait_impl.rs:9:5 | -LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { //~ ERROR cannot infer +LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the method body at 9:5... --> $DIR/mismatched_trait_impl.rs:9:5 | -LL | / fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { //~ ERROR cannot infer +LL | / fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { LL | | x LL | | } | |_____^ note: ...but the lifetime must also be valid for the lifetime 'a as defined on the method body at 9:32... --> $DIR/mismatched_trait_impl.rs:9:32 | -LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { //~ ERROR cannot infer +LL | fn foo(&self, x: &u32, y: &'a u32) -> &'a u32 { | ^^ = note: ...so that the method type is compatible with trait: expected fn(&i32, &'a u32, &u32) -> &'a u32 diff --git a/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr b/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr index e710986c721..556c15d0edb 100644 --- a/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr +++ b/src/test/ui/in-band-lifetimes/mut_while_borrow.stderr @@ -3,7 +3,7 @@ error[E0506]: cannot assign to `p` because it is borrowed | LL | let r = foo(&p); | - borrow of `p` occurs here -LL | p += 1; //~ ERROR cannot assign to `p` because it is borrowed +LL | p += 1; | ^^^^^^ assignment to borrowed `p` occurs here error: aborting due to previous error diff --git a/src/test/ui/in-band-lifetimes/no_in_band_in_struct.stderr b/src/test/ui/in-band-lifetimes/no_in_band_in_struct.stderr index 9076bdc946a..a270dd03926 100644 --- a/src/test/ui/in-band-lifetimes/no_in_band_in_struct.stderr +++ b/src/test/ui/in-band-lifetimes/no_in_band_in_struct.stderr @@ -1,13 +1,13 @@ error[E0261]: use of undeclared lifetime name `'test` --> $DIR/no_in_band_in_struct.rs:5:9 | -LL | x: &'test u32, //~ ERROR undeclared lifetime +LL | x: &'test u32, | ^^^^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'test` --> $DIR/no_in_band_in_struct.rs:9:10 | -LL | Baz(&'test u32), //~ ERROR undeclared lifetime +LL | Baz(&'test u32), | ^^^^^ undeclared lifetime error: aborting due to 2 previous errors diff --git a/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr b/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr index 932dea5b2a9..c307066be6b 100644 --- a/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr +++ b/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr @@ -1,13 +1,13 @@ error[E0261]: use of undeclared lifetime name `'test` --> $DIR/no_introducing_in_band_in_locals.rs:5:13 | -LL | let y: &'test u32 = x; //~ ERROR use of undeclared lifetime +LL | let y: &'test u32 = x; | ^^^^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'test` --> $DIR/no_introducing_in_band_in_locals.rs:10:16 | -LL | let y: fn(&'test u32) = foo2; //~ ERROR use of undeclared lifetime +LL | let y: fn(&'test u32) = foo2; | ^^^^^ undeclared lifetime error: aborting due to 2 previous errors diff --git a/src/test/ui/in-band-lifetimes/shadow.stderr b/src/test/ui/in-band-lifetimes/shadow.stderr index ac5bd5b5a33..a0a15d3aa88 100644 --- a/src/test/ui/in-band-lifetimes/shadow.stderr +++ b/src/test/ui/in-band-lifetimes/shadow.stderr @@ -3,7 +3,7 @@ error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scop | LL | impl Foo<&'s u8> { | -- first declared here -LL | fn bar<'s>(&self, x: &'s u8) {} //~ ERROR shadows a lifetime name +LL | fn bar<'s>(&self, x: &'s u8) {} | ^^ lifetime 's already in scope error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scope @@ -11,8 +11,8 @@ error[E0496]: lifetime name `'s` shadows a lifetime name that is already in scop | LL | impl Foo<&'s u8> { | -- first declared here -LL | fn bar<'s>(&self, x: &'s u8) {} //~ ERROR shadows a lifetime name -LL | fn baz(x: for<'s> fn(&'s u32)) {} //~ ERROR shadows a lifetime name +LL | fn bar<'s>(&self, x: &'s u8) {} +LL | fn baz(x: for<'s> fn(&'s u32)) {} | ^^ lifetime 's already in scope error: aborting due to 2 previous errors diff --git a/src/test/ui/inaccessible-test-modules.stderr b/src/test/ui/inaccessible-test-modules.stderr index 40f2b7fd2ee..b6a817e6b1d 100644 --- a/src/test/ui/inaccessible-test-modules.stderr +++ b/src/test/ui/inaccessible-test-modules.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `__test` --> $DIR/inaccessible-test-modules.rs:5:5 | -LL | use __test as x; //~ ERROR unresolved import `__test` +LL | use __test as x; | ------^^^^^ | | | no `__test` in the root @@ -10,7 +10,7 @@ LL | use __test as x; //~ ERROR unresolved import `__test` error[E0432]: unresolved import `__test_reexports` --> $DIR/inaccessible-test-modules.rs:6:5 | -LL | use __test_reexports as y; //~ ERROR unresolved import `__test_reexports` +LL | use __test_reexports as y; | ----------------^^^^^ | | | no `__test_reexports` in the root diff --git a/src/test/ui/include-macros/mismatched-types.stderr b/src/test/ui/include-macros/mismatched-types.stderr index 1ee223b23f0..33204f1cfce 100644 --- a/src/test/ui/include-macros/mismatched-types.stderr +++ b/src/test/ui/include-macros/mismatched-types.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/mismatched-types.rs:2:20 | -LL | let b: &[u8] = include_str!("file.txt"); //~ ERROR mismatched types +LL | let b: &[u8] = include_str!("file.txt"); | ^^^^^^^^^^^^^^^^^^^^^^^^ expected slice, found str | = note: expected type `&[u8]` @@ -10,7 +10,7 @@ LL | let b: &[u8] = include_str!("file.txt"); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/mismatched-types.rs:3:19 | -LL | let s: &str = include_bytes!("file.txt"); //~ ERROR mismatched types +LL | let s: &str = include_bytes!("file.txt"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected str, found array of 0 elements | = note: expected type `&str` diff --git a/src/test/ui/index-bot.stderr b/src/test/ui/index-bot.stderr index 2e2a98d1d80..b5d78297505 100644 --- a/src/test/ui/index-bot.stderr +++ b/src/test/ui/index-bot.stderr @@ -1,7 +1,7 @@ error[E0608]: cannot index into a value of type `!` --> $DIR/index-bot.rs:2:5 | -LL | (return)[0]; //~ ERROR cannot index into a value of type `!` +LL | (return)[0]; | ^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/index-help.stderr b/src/test/ui/index-help.stderr index 4c585a958c1..cd4d8356749 100644 --- a/src/test/ui/index-help.stderr +++ b/src/test/ui/index-help.stderr @@ -1,7 +1,7 @@ error[E0277]: the type `[{integer}]` cannot be indexed by `i32` --> $DIR/index-help.rs:3:5 | -LL | x[0i32]; //~ ERROR E0277 +LL | x[0i32]; | ^^^^^^^ slice indices are of type `usize` or ranges of `usize` | = help: the trait `std::slice::SliceIndex<[{integer}]>` is not implemented for `i32` diff --git a/src/test/ui/index_message.stderr b/src/test/ui/index_message.stderr index 62a14523fe9..6c2b126734b 100644 --- a/src/test/ui/index_message.stderr +++ b/src/test/ui/index_message.stderr @@ -1,7 +1,7 @@ error[E0608]: cannot index into a value of type `()` --> $DIR/index_message.rs:3:13 | -LL | let _ = z[0]; //~ ERROR cannot index into a value of type `()` +LL | let _ = z[0]; | ^^^^ help: to access tuple elements, use: `z.0` error: aborting due to previous error diff --git a/src/test/ui/indexing-requires-a-uint.stderr b/src/test/ui/indexing-requires-a-uint.stderr index 363c3d0d458..0b879581ec6 100644 --- a/src/test/ui/indexing-requires-a-uint.stderr +++ b/src/test/ui/indexing-requires-a-uint.stderr @@ -1,7 +1,7 @@ error[E0277]: the type `[{integer}]` cannot be indexed by `u8` --> $DIR/indexing-requires-a-uint.rs:6:5 | -LL | [0][0u8]; //~ ERROR: the type `[{integer}]` cannot be indexed by `u8` +LL | [0][0u8]; | ^^^^^^^^ slice indices are of type `usize` or ranges of `usize` | = help: the trait `std::slice::SliceIndex<[{integer}]>` is not implemented for `u8` diff --git a/src/test/ui/inference/inference_unstable_featured.stderr b/src/test/ui/inference/inference_unstable_featured.stderr index 5f025785127..08cdb8cc688 100644 --- a/src/test/ui/inference/inference_unstable_featured.stderr +++ b/src/test/ui/inference/inference_unstable_featured.stderr @@ -1,7 +1,7 @@ error[E0034]: multiple applicable items in scope --> $DIR/inference_unstable_featured.rs:16:20 | -LL | assert_eq!('x'.ipu_flatten(), 0); //~ ERROR E0034 +LL | assert_eq!('x'.ipu_flatten(), 0); | ^^^^^^^^^^^ multiple `ipu_flatten` found | = note: candidate #1 is defined in an impl of the trait `inference_unstable_iterator::IpuIterator` for the type `char` diff --git a/src/test/ui/inference/inference_unstable_forced.stderr b/src/test/ui/inference/inference_unstable_forced.stderr index 3c07085a648..067bf44bda8 100644 --- a/src/test/ui/inference/inference_unstable_forced.stderr +++ b/src/test/ui/inference/inference_unstable_forced.stderr @@ -1,7 +1,7 @@ error[E0658]: use of unstable library feature 'ipu_flatten' (see issue #99999) --> $DIR/inference_unstable_forced.rs:11:20 | -LL | assert_eq!('x'.ipu_flatten(), 0); //~ ERROR E0658 +LL | assert_eq!('x'.ipu_flatten(), 0); | ^^^^^^^^^^^ | = help: add #![feature(ipu_flatten)] to the crate attributes to enable diff --git a/src/test/ui/infinite/infinite-instantiation.stderr b/src/test/ui/infinite/infinite-instantiation.stderr index 42be1411b68..976b9e36cf8 100644 --- a/src/test/ui/infinite/infinite-instantiation.stderr +++ b/src/test/ui/infinite/infinite-instantiation.stderr @@ -2,7 +2,7 @@ error: reached the recursion limit while instantiating `function:: $DIR/infinite-instantiation.rs:23:1 | LL | / fn function(counter: usize, t: T) { -LL | | //~^ ERROR reached the recursion limit while instantiating `function:: 0 { LL | | function(counter - 1, t.to_option()); ... | diff --git a/src/test/ui/infinite/infinite-macro-expansion.stderr b/src/test/ui/infinite/infinite-macro-expansion.stderr index 9b64fba8b94..0faf29f0b3e 100644 --- a/src/test/ui/infinite/infinite-macro-expansion.stderr +++ b/src/test/ui/infinite/infinite-macro-expansion.stderr @@ -1,7 +1,7 @@ error: recursion limit reached while expanding the macro `recursive` --> $DIR/infinite-macro-expansion.rs:2:12 | -LL | () => (recursive!()) //~ ERROR recursion limit reached while expanding the macro `recursive` +LL | () => (recursive!()) | ^^^^^^^^^^^^ ... LL | recursive!() diff --git a/src/test/ui/infinite/infinite-recursion-const-fn.stderr b/src/test/ui/infinite/infinite-recursion-const-fn.stderr index 3ed7957d14d..9e0530de425 100644 --- a/src/test/ui/infinite/infinite-recursion-const-fn.stderr +++ b/src/test/ui/infinite/infinite-recursion-const-fn.stderr @@ -1,7 +1,7 @@ error[E0080]: evaluation of constant value failed --> $DIR/infinite-recursion-const-fn.rs:3:25 | -LL | const fn a() -> usize { b() } //~ ERROR evaluation of constant value failed +LL | const fn a() -> usize { b() } | ^^^ | | | reached the configured maximum number of stack frames diff --git a/src/test/ui/infinite/infinite-vec-type-recursion.stderr b/src/test/ui/infinite/infinite-vec-type-recursion.stderr index daa18a7e9b1..be0db56f034 100644 --- a/src/test/ui/infinite/infinite-vec-type-recursion.stderr +++ b/src/test/ui/infinite/infinite-vec-type-recursion.stderr @@ -9,7 +9,7 @@ note: cycle used when collecting item types in top-level module --> $DIR/infinite-vec-type-recursion.rs:1:1 | LL | / type X = Vec; -LL | | //~^ ERROR cycle detected +LL | | LL | | LL | | fn main() { let b: X = Vec::new(); } | |____________________________________^ diff --git a/src/test/ui/init-unsafe.stderr b/src/test/ui/init-unsafe.stderr index dba8cc43ff2..857142dff64 100644 --- a/src/test/ui/init-unsafe.stderr +++ b/src/test/ui/init-unsafe.stderr @@ -1,7 +1,7 @@ error[E0133]: call to unsafe function is unsafe and requires unsafe function or block --> $DIR/init-unsafe.rs:7:17 | -LL | let stuff = init::(); //~ ERROR call to unsafe function is unsafe +LL | let stuff = init::(); | ^^^^^^^^^^^^^^^ call to unsafe function | = note: consult the function's documentation for information on how to avoid undefined behavior diff --git a/src/test/ui/inline-asm-bad-constraint.stderr b/src/test/ui/inline-asm-bad-constraint.stderr index 1f63d4c2a48..59066e5e7fc 100644 --- a/src/test/ui/inline-asm-bad-constraint.stderr +++ b/src/test/ui/inline-asm-bad-constraint.stderr @@ -1,19 +1,19 @@ error[E0668]: malformed inline assembly --> $DIR/inline-asm-bad-constraint.rs:21:9 | -LL | asm!("" :"={rax"(rax)) //~ ERROR E0668 +LL | asm!("" :"={rax"(rax)) | ^^^^^^^^^^^^^^^^^^^^^^ error[E0668]: malformed inline assembly --> $DIR/inline-asm-bad-constraint.rs:29:9 | -LL | asm!("callq $0" : : "0"(foo)) //~ ERROR E0668 +LL | asm!("callq $0" : : "0"(foo)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0668]: malformed inline assembly --> $DIR/inline-asm-bad-constraint.rs:36:9 | -LL | asm!("addb $1, $0" : "={rax}"((0i32, rax))); //~ ERROR E0668 +LL | asm!("addb $1, $0" : "={rax}"((0i32, rax))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/inline-asm-bad-operand.stderr b/src/test/ui/inline-asm-bad-operand.stderr index f1de38efc03..3bb1cdda249 100644 --- a/src/test/ui/inline-asm-bad-operand.stderr +++ b/src/test/ui/inline-asm-bad-operand.stderr @@ -1,43 +1,43 @@ error[E0669]: invalid value for constraint in inline assembly --> $DIR/inline-asm-bad-operand.rs:21:24 | -LL | asm!("" :: "r"("")); //~ ERROR E0669 +LL | asm!("" :: "r"("")); | ^^ error[E0669]: invalid value for constraint in inline assembly --> $DIR/inline-asm-bad-operand.rs:26:32 | -LL | asm!("ret" : : "{rdi}"(target)); //~ ERROR E0669 +LL | asm!("ret" : : "{rdi}"(target)); | ^^^^^^ error[E0669]: invalid value for constraint in inline assembly --> $DIR/inline-asm-bad-operand.rs:33:29 | -LL | unsafe { asm!("" :: "i"(hello)) }; //~ ERROR E0669 +LL | unsafe { asm!("" :: "i"(hello)) }; | ^^^^^ error[E0669]: invalid value for constraint in inline assembly --> $DIR/inline-asm-bad-operand.rs:41:38 | -LL | asm!("movups $1, %xmm0"::"m"(arr)); //~ ERROR E0669 +LL | asm!("movups $1, %xmm0"::"m"(arr)); | ^^^ error[E0669]: invalid value for constraint in inline assembly --> $DIR/inline-asm-bad-operand.rs:48:32 | -LL | asm!("mov sp, $0"::"r"(addr)); //~ ERROR E0669 +LL | asm!("mov sp, $0"::"r"(addr)); | ^^^^ error[E0669]: invalid value for constraint in inline assembly --> $DIR/inline-asm-bad-operand.rs:55:32 | -LL | asm!("mov sp, $0"::"r"(addr), //~ ERROR E0669 +LL | asm!("mov sp, $0"::"r"(addr), | ^^^^ error[E0669]: invalid value for constraint in inline assembly --> $DIR/inline-asm-bad-operand.rs:56:32 | -LL | "r"("hello e0669")); //~ ERROR E0669 +LL | "r"("hello e0669")); | ^^^^^^^^^^^^^ error: aborting due to 7 previous errors diff --git a/src/test/ui/inner-static-type-parameter.stderr b/src/test/ui/inner-static-type-parameter.stderr index 87fb364954d..3c14e217aeb 100644 --- a/src/test/ui/inner-static-type-parameter.stderr +++ b/src/test/ui/inner-static-type-parameter.stderr @@ -11,7 +11,7 @@ LL | static a: Bar = Bar::What; error[E0392]: parameter `T` is never used --> $DIR/inner-static-type-parameter.rs:3:10 | -LL | enum Bar { What } //~ ERROR parameter `T` is never used +LL | enum Bar { What } | ^ unused type parameter | = help: consider removing `T` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/integral-indexing.stderr b/src/test/ui/integral-indexing.stderr index efbad86c4d3..28ef5937eaa 100644 --- a/src/test/ui/integral-indexing.stderr +++ b/src/test/ui/integral-indexing.stderr @@ -1,7 +1,7 @@ error[E0277]: the type `[isize]` cannot be indexed by `u8` --> $DIR/integral-indexing.rs:6:5 | -LL | v[3u8]; //~ERROR : the type `[isize]` cannot be indexed by `u8` +LL | v[3u8]; | ^^^^^^ slice indices are of type `usize` or ranges of `usize` | = help: the trait `std::slice::SliceIndex<[isize]>` is not implemented for `u8` @@ -10,7 +10,7 @@ LL | v[3u8]; //~ERROR : the type `[isize]` cannot be indexed by `u8` error[E0277]: the type `[isize]` cannot be indexed by `i8` --> $DIR/integral-indexing.rs:7:5 | -LL | v[3i8]; //~ERROR : the type `[isize]` cannot be indexed by `i8` +LL | v[3i8]; | ^^^^^^ slice indices are of type `usize` or ranges of `usize` | = help: the trait `std::slice::SliceIndex<[isize]>` is not implemented for `i8` @@ -19,7 +19,7 @@ LL | v[3i8]; //~ERROR : the type `[isize]` cannot be indexed by `i8` error[E0277]: the type `[isize]` cannot be indexed by `u32` --> $DIR/integral-indexing.rs:8:5 | -LL | v[3u32]; //~ERROR : the type `[isize]` cannot be indexed by `u32` +LL | v[3u32]; | ^^^^^^^ slice indices are of type `usize` or ranges of `usize` | = help: the trait `std::slice::SliceIndex<[isize]>` is not implemented for `u32` @@ -28,7 +28,7 @@ LL | v[3u32]; //~ERROR : the type `[isize]` cannot be indexed by `u32` error[E0277]: the type `[isize]` cannot be indexed by `i32` --> $DIR/integral-indexing.rs:9:5 | -LL | v[3i32]; //~ERROR : the type `[isize]` cannot be indexed by `i32` +LL | v[3i32]; | ^^^^^^^ slice indices are of type `usize` or ranges of `usize` | = help: the trait `std::slice::SliceIndex<[isize]>` is not implemented for `i32` @@ -37,7 +37,7 @@ LL | v[3i32]; //~ERROR : the type `[isize]` cannot be indexed by `i32` error[E0277]: the type `[u8]` cannot be indexed by `u8` --> $DIR/integral-indexing.rs:12:5 | -LL | s.as_bytes()[3u8]; //~ERROR : the type `[u8]` cannot be indexed by `u8` +LL | s.as_bytes()[3u8]; | ^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize` | = help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8` @@ -46,7 +46,7 @@ LL | s.as_bytes()[3u8]; //~ERROR : the type `[u8]` cannot be indexed by `u8 error[E0277]: the type `[u8]` cannot be indexed by `i8` --> $DIR/integral-indexing.rs:13:5 | -LL | s.as_bytes()[3i8]; //~ERROR : the type `[u8]` cannot be indexed by `i8` +LL | s.as_bytes()[3i8]; | ^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize` | = help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `i8` @@ -55,7 +55,7 @@ LL | s.as_bytes()[3i8]; //~ERROR : the type `[u8]` cannot be indexed by `i8 error[E0277]: the type `[u8]` cannot be indexed by `u32` --> $DIR/integral-indexing.rs:14:5 | -LL | s.as_bytes()[3u32]; //~ERROR : the type `[u8]` cannot be indexed by `u32` +LL | s.as_bytes()[3u32]; | ^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize` | = help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u32` @@ -64,7 +64,7 @@ LL | s.as_bytes()[3u32]; //~ERROR : the type `[u8]` cannot be indexed by `u3 error[E0277]: the type `[u8]` cannot be indexed by `i32` --> $DIR/integral-indexing.rs:15:5 | -LL | s.as_bytes()[3i32]; //~ERROR : the type `[u8]` cannot be indexed by `i32` +LL | s.as_bytes()[3i32]; | ^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize` | = help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `i32` diff --git a/src/test/ui/internal/internal-unstable-thread-local.stderr b/src/test/ui/internal/internal-unstable-thread-local.stderr index 0e25592b103..603bdc39bdd 100644 --- a/src/test/ui/internal/internal-unstable-thread-local.stderr +++ b/src/test/ui/internal/internal-unstable-thread-local.stderr @@ -1,7 +1,7 @@ error[E0658]: use of unstable library feature 'function' --> $DIR/internal-unstable-thread-local.rs:9:32 | -LL | thread_local!(static BAR: () = internal_unstable::unstable()); //~ ERROR use of unstable +LL | thread_local!(static BAR: () = internal_unstable::unstable()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(function)] to the crate attributes to enable diff --git a/src/test/ui/internal/internal-unstable.stderr b/src/test/ui/internal/internal-unstable.stderr index 3e1a44f082e..5c14fed568f 100644 --- a/src/test/ui/internal/internal-unstable.stderr +++ b/src/test/ui/internal/internal-unstable.stderr @@ -1,7 +1,7 @@ error[E0658]: use of unstable library feature 'function' --> $DIR/internal-unstable.rs:33:25 | -LL | pass_through_allow!(internal_unstable::unstable()); //~ ERROR use of unstable +LL | pass_through_allow!(internal_unstable::unstable()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(function)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | pass_through_allow!(internal_unstable::unstable()); //~ ERROR use of un error[E0658]: use of unstable library feature 'function' --> $DIR/internal-unstable.rs:35:27 | -LL | pass_through_noallow!(internal_unstable::unstable()); //~ ERROR use of unstable +LL | pass_through_noallow!(internal_unstable::unstable()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(function)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | pass_through_noallow!(internal_unstable::unstable()); //~ ERROR use of error[E0658]: use of unstable library feature 'function' --> $DIR/internal-unstable.rs:39:22 | -LL | println!("{:?}", internal_unstable::unstable()); //~ ERROR use of unstable +LL | println!("{:?}", internal_unstable::unstable()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(function)] to the crate attributes to enable @@ -25,7 +25,7 @@ LL | println!("{:?}", internal_unstable::unstable()); //~ ERROR use of unsta error[E0658]: use of unstable library feature 'function' --> $DIR/internal-unstable.rs:41:10 | -LL | bar!(internal_unstable::unstable()); //~ ERROR use of unstable +LL | bar!(internal_unstable::unstable()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(function)] to the crate attributes to enable @@ -33,10 +33,10 @@ LL | bar!(internal_unstable::unstable()); //~ ERROR use of unstable error[E0658]: use of unstable library feature 'function' --> $DIR/internal-unstable.rs:12:9 | -LL | internal_unstable::unstable(); //~ ERROR use of unstable +LL | internal_unstable::unstable(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -LL | bar!(internal_unstable::unstable()); //~ ERROR use of unstable +LL | bar!(internal_unstable::unstable()); | ------------------------------------ in this macro invocation | = help: add #![feature(function)] to the crate attributes to enable diff --git a/src/test/ui/invalid/invalid-crate-type.stderr b/src/test/ui/invalid/invalid-crate-type.stderr index 63edd04650b..030dc96c6d6 100644 --- a/src/test/ui/invalid/invalid-crate-type.stderr +++ b/src/test/ui/invalid/invalid-crate-type.stderr @@ -1,7 +1,7 @@ error: invalid `crate_type` value --> $DIR/invalid-crate-type.rs:2:15 | -LL | #![crate_type="foo"] //~ ERROR invalid `crate_type` value +LL | #![crate_type="foo"] | ^^^^^ | = note: #[deny(unknown_crate_types)] on by default diff --git a/src/test/ui/invalid/invalid-inline.stderr b/src/test/ui/invalid/invalid-inline.stderr index fdbd25070f7..ce29951822f 100644 --- a/src/test/ui/invalid/invalid-inline.stderr +++ b/src/test/ui/invalid/invalid-inline.stderr @@ -1,19 +1,19 @@ error[E0535]: invalid argument --> $DIR/invalid-inline.rs:3:10 | -LL | #[inline(please_no)] //~ ERROR invalid argument +LL | #[inline(please_no)] | ^^^^^^^^^ error[E0534]: expected one argument --> $DIR/invalid-inline.rs:7:1 | -LL | #[inline(please,no)] //~ ERROR expected one argument +LL | #[inline(please,no)] | ^^^^^^^^^^^^^^^^^^^^ error[E0534]: expected one argument --> $DIR/invalid-inline.rs:11:1 | -LL | #[inline()] //~ ERROR expected one argument +LL | #[inline()] | ^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/invalid/invalid-macro-matcher.stderr b/src/test/ui/invalid/invalid-macro-matcher.stderr index 5d6c70fa30b..dbe025b7330 100644 --- a/src/test/ui/invalid/invalid-macro-matcher.stderr +++ b/src/test/ui/invalid/invalid-macro-matcher.stderr @@ -1,7 +1,7 @@ error: invalid macro matcher; matchers must be contained in balanced delimiters --> $DIR/invalid-macro-matcher.rs:4:5 | -LL | _ => (); //~ ERROR invalid macro matcher +LL | _ => (); | ^ error: aborting due to previous error diff --git a/src/test/ui/invalid/invalid-plugin-attr.stderr b/src/test/ui/invalid/invalid-plugin-attr.stderr index 2d7ae1f5cfe..c7b2ce47489 100644 --- a/src/test/ui/invalid/invalid-plugin-attr.stderr +++ b/src/test/ui/invalid/invalid-plugin-attr.stderr @@ -1,7 +1,7 @@ error: unused attribute --> $DIR/invalid-plugin-attr.rs:4:1 | -LL | #[plugin(bla)] //~ ERROR unused attribute +LL | #[plugin(bla)] | ^^^^^^^^^^^^^^ | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![deny(unused_attributes)] error: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] --> $DIR/invalid-plugin-attr.rs:4:1 | -LL | #[plugin(bla)] //~ ERROR unused attribute +LL | #[plugin(bla)] | ^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/invalid_crate_type_syntax.stderr b/src/test/ui/invalid_crate_type_syntax.stderr index 8d6948b583c..cb3faedfedb 100644 --- a/src/test/ui/invalid_crate_type_syntax.stderr +++ b/src/test/ui/invalid_crate_type_syntax.stderr @@ -1,7 +1,7 @@ error: attribute must be of the form `#[crate_type = "bin|lib|..."]` --> $DIR/invalid_crate_type_syntax.rs:2:1 | -LL | #![crate_type(lib)] //~ ERROR attribute must be of the form +LL | #![crate_type(lib)] | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/invalid_dispatch_from_dyn_impls.stderr b/src/test/ui/invalid_dispatch_from_dyn_impls.stderr index 8ee0a40a529..bd016466300 100644 --- a/src/test/ui/invalid_dispatch_from_dyn_impls.stderr +++ b/src/test/ui/invalid_dispatch_from_dyn_impls.stderr @@ -4,7 +4,7 @@ error[E0378]: the trait `DispatchFromDyn` may only be implemented for structs co LL | / impl DispatchFromDyn> for WrapperWithExtraField LL | | where LL | | T: DispatchFromDyn, -LL | | {} //~^^^ ERROR [E0378] +LL | | {} | |__^ | = note: extra field `1` of type `i32` is not allowed @@ -15,7 +15,7 @@ error[E0378]: implementing the `DispatchFromDyn` trait requires multiple coercio LL | / impl DispatchFromDyn> for MultiplePointers LL | | where LL | | T: Unsize, -LL | | {} //~^^^ ERROR [E0378] +LL | | {} | |__^ | = note: the trait `DispatchFromDyn` may only be implemented for a coercion between structures with a single field being coerced @@ -33,7 +33,7 @@ error[E0378]: structs implementing `DispatchFromDyn` may not have `#[repr(packed LL | / impl DispatchFromDyn> for HasReprC LL | | where LL | | T: Unsize, -LL | | {} //~^^^ ERROR [E0378] +LL | | {} | |__^ error: aborting due to 4 previous errors diff --git a/src/test/ui/issue-18986.stderr b/src/test/ui/issue-18986.stderr index 440782b0b1f..6c23178c700 100644 --- a/src/test/ui/issue-18986.stderr +++ b/src/test/ui/issue-18986.stderr @@ -1,7 +1,7 @@ error[E0574]: expected struct, variant or union type, found trait `Trait` --> $DIR/issue-18986.rs:8:9 | -LL | Trait { x: 42 } => () //~ ERROR expected struct, variant or union type, found trait `Trait` +LL | Trait { x: 42 } => () | ^^^^^ not a struct, variant or union type error: aborting due to previous error diff --git a/src/test/ui/issue-42944.stderr b/src/test/ui/issue-42944.stderr index 43fd0ffb724..0613be0b3d0 100644 --- a/src/test/ui/issue-42944.stderr +++ b/src/test/ui/issue-42944.stderr @@ -1,13 +1,13 @@ error[E0423]: expected function, found struct `B` --> $DIR/issue-42944.rs:9:9 | -LL | B(()); //~ ERROR expected function, found struct `B` [E0423] +LL | B(()); | ^ constructor is not visible here due to private fields error[E0425]: cannot find function `B` in this scope --> $DIR/issue-42944.rs:15:9 | -LL | B(()); //~ ERROR cannot find function `B` in this scope [E0425] +LL | B(()); | ^ not found in this scope help: possible candidate is found in another module, you can import it into scope | diff --git a/src/test/ui/issue-53787-inline-assembler-macro.stderr b/src/test/ui/issue-53787-inline-assembler-macro.stderr index 69f380bdc9c..047ba341cfc 100644 --- a/src/test/ui/issue-53787-inline-assembler-macro.stderr +++ b/src/test/ui/issue-53787-inline-assembler-macro.stderr @@ -1,7 +1,7 @@ error[E0669]: invalid value for constraint in inline assembly --> $DIR/issue-53787-inline-assembler-macro.rs:21:16 | -LL | fake_jump!("FirstFunc"); //~ ERROR invalid value for constraint in inline assembly +LL | fake_jump!("FirstFunc"); | ^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-10200.stderr b/src/test/ui/issues/issue-10200.stderr index ac1ad118a71..544716e89b3 100644 --- a/src/test/ui/issues/issue-10200.stderr +++ b/src/test/ui/issues/issue-10200.stderr @@ -1,7 +1,7 @@ error[E0532]: expected tuple struct/variant, found function `foo` --> $DIR/issue-10200.rs:6:9 | -LL | foo(x) //~ ERROR expected tuple struct/variant, found function `foo` +LL | foo(x) | ^^^ help: a tuple struct with a similar name exists: `Foo` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-10291.stderr b/src/test/ui/issues/issue-10291.stderr index 9bd42895017..89ffd4537a2 100644 --- a/src/test/ui/issues/issue-10291.stderr +++ b/src/test/ui/issues/issue-10291.stderr @@ -1,7 +1,7 @@ error[E0312]: lifetime of reference outlives lifetime of borrowed content... --> $DIR/issue-10291.rs:3:9 | -LL | x //~ ERROR E0312 +LL | x | ^ | note: ...the reference is valid for the anonymous lifetime #2 defined on the body at 2:65... @@ -9,7 +9,7 @@ note: ...the reference is valid for the anonymous lifetime #2 defined on the bod | LL | drop:: FnMut(&'z isize) -> &'z isize>>(Box::new(|z| { | _________________________________________________________________^ -LL | | x //~ ERROR E0312 +LL | | x LL | | })); | |_____^ note: ...but the borrowed content is only valid for the lifetime 'x as defined on the function body at 1:9 diff --git a/src/test/ui/issues/issue-10412.stderr b/src/test/ui/issues/issue-10412.stderr index 8128ba22fde..48920813ae1 100644 --- a/src/test/ui/issues/issue-10412.stderr +++ b/src/test/ui/issues/issue-10412.stderr @@ -1,49 +1,49 @@ error: lifetimes cannot use keyword names --> $DIR/issue-10412.rs:1:20 | -LL | trait Serializable<'self, T> { //~ ERROR lifetimes cannot use keyword names +LL | trait Serializable<'self, T> { | ^^^^^ error: lifetimes cannot use keyword names --> $DIR/issue-10412.rs:2:25 | -LL | fn serialize(val : &'self T) -> Vec; //~ ERROR lifetimes cannot use keyword names +LL | fn serialize(val : &'self T) -> Vec; | ^^^^^ error: lifetimes cannot use keyword names --> $DIR/issue-10412.rs:3:38 | -LL | fn deserialize(repr : &[u8]) -> &'self T; //~ ERROR lifetimes cannot use keyword names +LL | fn deserialize(repr : &[u8]) -> &'self T; | ^^^^^ error: lifetimes cannot use keyword names --> $DIR/issue-10412.rs:6:6 | -LL | impl<'self> Serializable for &'self str { //~ ERROR lifetimes cannot use keyword names +LL | impl<'self> Serializable for &'self str { | ^^^^^ error: lifetimes cannot use keyword names --> $DIR/issue-10412.rs:6:36 | -LL | impl<'self> Serializable for &'self str { //~ ERROR lifetimes cannot use keyword names +LL | impl<'self> Serializable for &'self str { | ^^^^^ error: lifetimes cannot use keyword names --> $DIR/issue-10412.rs:9:25 | -LL | fn serialize(val : &'self str) -> Vec { //~ ERROR lifetimes cannot use keyword names +LL | fn serialize(val : &'self str) -> Vec { | ^^^^^ error: lifetimes cannot use keyword names --> $DIR/issue-10412.rs:12:37 | -LL | fn deserialize(repr: &[u8]) -> &'self str { //~ ERROR lifetimes cannot use keyword names +LL | fn deserialize(repr: &[u8]) -> &'self str { | ^^^^^ error[E0106]: missing lifetime specifier --> $DIR/issue-10412.rs:6:13 | -LL | impl<'self> Serializable for &'self str { //~ ERROR lifetimes cannot use keyword names +LL | impl<'self> Serializable for &'self str { | ^^^^^^^^^^^^^^^^^ expected lifetime parameter error: aborting due to 8 previous errors diff --git a/src/test/ui/issues/issue-10465.stderr b/src/test/ui/issues/issue-10465.stderr index 41613cfa010..6efbd8e40ef 100644 --- a/src/test/ui/issues/issue-10465.stderr +++ b/src/test/ui/issues/issue-10465.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `foo` found for type `&b::B` in the current scope --> $DIR/issue-10465.rs:17:15 | -LL | b.foo(); //~ ERROR: no method named `foo` found +LL | b.foo(); | ^^^ | = help: items from traits can only be used if the trait is in scope diff --git a/src/test/ui/issues/issue-10545.stderr b/src/test/ui/issues/issue-10545.stderr index e486a17bda9..59d4fedcd2b 100644 --- a/src/test/ui/issues/issue-10545.stderr +++ b/src/test/ui/issues/issue-10545.stderr @@ -1,7 +1,7 @@ error[E0603]: struct `S` is private --> $DIR/issue-10545.rs:6:14 | -LL | fn foo(_: a::S) { //~ ERROR: struct `S` is private +LL | fn foo(_: a::S) { | ^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-10969.stderr b/src/test/ui/issues/issue-10969.stderr index 0eaed9464b4..9e28a665e30 100644 --- a/src/test/ui/issues/issue-10969.stderr +++ b/src/test/ui/issues/issue-10969.stderr @@ -3,7 +3,7 @@ error[E0618]: expected function, found `i32` | LL | fn func(i: i32) { | - `i32` defined here -LL | i(); //~ERROR expected function, found `i32` +LL | i(); | ^-- | | | call expression requires function @@ -13,7 +13,7 @@ error[E0618]: expected function, found `i32` | LL | let i = 0i32; | - `i32` defined here -LL | i(); //~ERROR expected function, found `i32` +LL | i(); | ^-- | | | call expression requires function diff --git a/src/test/ui/issues/issue-10991.stderr b/src/test/ui/issues/issue-10991.stderr index c91b15cb3fb..f12539b47cf 100644 --- a/src/test/ui/issues/issue-10991.stderr +++ b/src/test/ui/issues/issue-10991.stderr @@ -1,7 +1,7 @@ error[E0605]: non-primitive cast: `()` as `usize` --> $DIR/issue-10991.rs:3:14 | -LL | let _t = nil as usize; //~ ERROR: non-primitive cast: `()` as `usize` +LL | let _t = nil as usize; | ^^^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait diff --git a/src/test/ui/issues/issue-11004.stderr b/src/test/ui/issues/issue-11004.stderr index a5c63e9c31d..b5831e42e39 100644 --- a/src/test/ui/issues/issue-11004.stderr +++ b/src/test/ui/issues/issue-11004.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `x` on type `*mut A` --> $DIR/issue-11004.rs:7:21 | -LL | let x : i32 = n.x; //~ no field `x` on type `*mut A` +LL | let x : i32 = n.x; | --^ | | | help: `n` is a raw pointer; try dereferencing it: `(*n).x` @@ -9,7 +9,7 @@ LL | let x : i32 = n.x; //~ no field `x` on type `*mut A` error[E0609]: no field `y` on type `*mut A` --> $DIR/issue-11004.rs:8:21 | -LL | let y : f64 = n.y; //~ no field `y` on type `*mut A` +LL | let y : f64 = n.y; | --^ | | | help: `n` is a raw pointer; try dereferencing it: `(*n).y` diff --git a/src/test/ui/issues/issue-11192.stderr b/src/test/ui/issues/issue-11192.stderr index 37ae73685b4..ce90b16207f 100644 --- a/src/test/ui/issues/issue-11192.stderr +++ b/src/test/ui/issues/issue-11192.stderr @@ -9,7 +9,7 @@ LL | ptr = box Foo { x: ptr.x + 1 }; ... LL | test(&*ptr); | ^^^^ immutable borrow occurs here -LL | //~^ ERROR: cannot borrow `*ptr` as immutable +LL | LL | } | - mutable borrow ends here diff --git a/src/test/ui/issues/issue-11319.stderr b/src/test/ui/issues/issue-11319.stderr index 10db477b8ca..6179f9d3fe0 100644 --- a/src/test/ui/issues/issue-11319.stderr +++ b/src/test/ui/issues/issue-11319.stderr @@ -2,13 +2,13 @@ error[E0308]: match arms have incompatible types --> $DIR/issue-11319.rs:8:20 | LL | / match Some(10) { -LL | | //~^ NOTE `match` arms have incompatible types +LL | | LL | | Some(5) => false, | | ----- this is found to be of type `bool` -LL | | //~^ NOTE this is found to be of type `bool` +LL | | LL | | Some(2) => true, | | ---- this is found to be of type `bool` -LL | | //~^ NOTE this is found to be of type `bool` +LL | | LL | | None => (), | | ^^ expected bool, found () ... | diff --git a/src/test/ui/issues/issue-11374.stderr b/src/test/ui/issues/issue-11374.stderr index 6cd552f86e1..8d7e6c81f4f 100644 --- a/src/test/ui/issues/issue-11374.stderr +++ b/src/test/ui/issues/issue-11374.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-11374.rs:26:15 | -LL | c.read_to(v); //~ ERROR E0308 +LL | c.read_to(v); | ^ | | | expected &mut [u8], found struct `std::vec::Vec` diff --git a/src/test/ui/issues/issue-11515.stderr b/src/test/ui/issues/issue-11515.stderr index d7d51a32414..0ab0c7dba0b 100644 --- a/src/test/ui/issues/issue-11515.stderr +++ b/src/test/ui/issues/issue-11515.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-11515.rs:9:33 | -LL | let test = box Test { func: closure }; //~ ERROR mismatched types +LL | let test = box Test { func: closure }; | ^^^^^^^ expected trait `std::ops::FnMut`, found trait `std::ops::Fn` | = note: expected type `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>` diff --git a/src/test/ui/issues/issue-11681.stderr b/src/test/ui/issues/issue-11681.stderr index 210c6dc5a00..f59ddb07642 100644 --- a/src/test/ui/issues/issue-11681.stderr +++ b/src/test/ui/issues/issue-11681.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/issue-11681.rs:12:20 | -LL | let testValue = &Test; //~ ERROR borrowed value does not live long enough +LL | let testValue = &Test; | ^^^^ temporary value does not live long enough LL | return testValue; LL | } diff --git a/src/test/ui/issues/issue-11692-1.stderr b/src/test/ui/issues/issue-11692-1.stderr index 57a6a999544..bfd1647e8be 100644 --- a/src/test/ui/issues/issue-11692-1.stderr +++ b/src/test/ui/issues/issue-11692-1.stderr @@ -1,7 +1,7 @@ error: cannot find macro `testo!` in this scope --> $DIR/issue-11692-1.rs:2:12 | -LL | print!(testo!()); //~ ERROR cannot find macro `testo!` in this scope +LL | print!(testo!()); | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-11692-2.stderr b/src/test/ui/issues/issue-11692-2.stderr index 5d4467080f1..740c3555e52 100644 --- a/src/test/ui/issues/issue-11692-2.stderr +++ b/src/test/ui/issues/issue-11692-2.stderr @@ -1,7 +1,7 @@ error: cannot find macro `test!` in this scope --> $DIR/issue-11692-2.rs:2:13 | -LL | concat!(test!()); //~ ERROR cannot find macro `test!` in this scope +LL | concat!(test!()); | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-11844.stderr b/src/test/ui/issues/issue-11844.stderr index 683ad48ff52..1c4321f1b4a 100644 --- a/src/test/ui/issues/issue-11844.stderr +++ b/src/test/ui/issues/issue-11844.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | match a { | - this match expression has type `std::option::Option>` -LL | Ok(a) => //~ ERROR: mismatched types +LL | Ok(a) => | ^^^^^ expected enum `std::option::Option`, found enum `std::result::Result` | = note: expected type `std::option::Option>` diff --git a/src/test/ui/issues/issue-11873.stderr b/src/test/ui/issues/issue-11873.stderr index 1e44754c707..63bb4e7bd04 100644 --- a/src/test/ui/issues/issue-11873.stderr +++ b/src/test/ui/issues/issue-11873.stderr @@ -3,7 +3,7 @@ error[E0505]: cannot move out of `v` because it is borrowed | LL | let mut f = || v.push(2); | -- borrow of `v` occurs here -LL | let _w = v; //~ ERROR: cannot move out of `v` +LL | let _w = v; | ^^ move out of `v` occurs here error: aborting due to previous error diff --git a/src/test/ui/issues/issue-12028.stderr b/src/test/ui/issues/issue-12028.stderr index 7b0850581ce..64694c7a8d0 100644 --- a/src/test/ui/issues/issue-12028.stderr +++ b/src/test/ui/issues/issue-12028.stderr @@ -1,7 +1,7 @@ error[E0284]: type annotations required: cannot resolve `<_ as StreamHasher>::S == ::S` --> $DIR/issue-12028.rs:29:14 | -LL | self.input_stream(&mut stream); //~ ERROR type annotations required +LL | self.input_stream(&mut stream); | ^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-12369.stderr b/src/test/ui/issues/issue-12369.stderr index 6906c7b7920..fec9078dc40 100644 --- a/src/test/ui/issues/issue-12369.stderr +++ b/src/test/ui/issues/issue-12369.stderr @@ -1,7 +1,7 @@ error: unreachable pattern --> $DIR/issue-12369.rs:10:9 | -LL | &[10,a, ref rest..] => 10 //~ ERROR: unreachable pattern +LL | &[10,a, ref rest..] => 10 | ^^^^^^^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/issues/issue-12470.stderr b/src/test/ui/issues/issue-12470.stderr index 59056aaca90..fadfb75cde6 100644 --- a/src/test/ui/issues/issue-12470.stderr +++ b/src/test/ui/issues/issue-12470.stderr @@ -1,7 +1,7 @@ error[E0597]: `*b` does not live long enough --> $DIR/issue-12470.rs:28:19 | -LL | let bb: &B = &*b; //~ ERROR does not live long enough +LL | let bb: &B = &*b; | ^^ borrowed value does not live long enough LL | make_a(bb) LL | } diff --git a/src/test/ui/issues/issue-12552.stderr b/src/test/ui/issues/issue-12552.stderr index 768d11bf899..6eaac1b3577 100644 --- a/src/test/ui/issues/issue-12552.stderr +++ b/src/test/ui/issues/issue-12552.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | match t { | - this match expression has type `std::result::Result<_, {integer}>` -LL | Some(k) => match k { //~ ERROR mismatched types +LL | Some(k) => match k { | ^^^^^^^ expected enum `std::result::Result`, found enum `std::option::Option` | = note: expected type `std::result::Result<_, {integer}>` @@ -12,7 +12,7 @@ LL | Some(k) => match k { //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/issue-12552.rs:9:5 | -LL | None => () //~ ERROR mismatched types +LL | None => () | ^^^^ expected enum `std::result::Result`, found enum `std::option::Option` | = note: expected type `std::result::Result<_, {integer}>` diff --git a/src/test/ui/issues/issue-12863.stderr b/src/test/ui/issues/issue-12863.stderr index 3f1a6bf598d..bec70a5fb95 100644 --- a/src/test/ui/issues/issue-12863.stderr +++ b/src/test/ui/issues/issue-12863.stderr @@ -1,7 +1,7 @@ error[E0532]: expected unit struct/variant or constant, found function `foo::bar` --> $DIR/issue-12863.rs:5:9 | -LL | foo::bar => {} //~ ERROR expected unit struct/variant or constant, found function `foo::bar` +LL | foo::bar => {} | ^^^^^^^^ not a unit struct/variant or constant error: aborting due to previous error diff --git a/src/test/ui/issues/issue-12997-1.stderr b/src/test/ui/issues/issue-12997-1.stderr index 050e753dd1a..e036896812e 100644 --- a/src/test/ui/issues/issue-12997-1.stderr +++ b/src/test/ui/issues/issue-12997-1.stderr @@ -1,13 +1,13 @@ error: functions used as benches must have signature `fn(&mut Bencher) -> impl Termination` --> $DIR/issue-12997-1.rs:6:1 | -LL | fn foo() { } //~ ERROR functions used as benches +LL | fn foo() { } | ^^^^^^^^^^^^ error: functions used as benches must have signature `fn(&mut Bencher) -> impl Termination` --> $DIR/issue-12997-1.rs:9:1 | -LL | fn bar(x: isize, y: isize) { } //~ ERROR functions used as benches +LL | fn bar(x: isize, y: isize) { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-13404.stderr b/src/test/ui/issues/issue-13404.stderr index 45cddffef71..1f50debb07b 100644 --- a/src/test/ui/issues/issue-13404.stderr +++ b/src/test/ui/issues/issue-13404.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `b::f` --> $DIR/issue-13404.rs:2:5 | -LL | use b::f; //~ ERROR: unresolved import `b::f` [E0432] +LL | use b::f; | ^^^^ no `f` in `b` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-13482-2.stderr b/src/test/ui/issues/issue-13482-2.stderr index 0c036f1d0e6..ccab95878b5 100644 --- a/src/test/ui/issues/issue-13482-2.stderr +++ b/src/test/ui/issues/issue-13482-2.stderr @@ -1,7 +1,7 @@ error[E0527]: pattern requires 0 elements but array has 2 --> $DIR/issue-13482-2.rs:6:9 | -LL | [] => None, //~ ERROR pattern requires 0 elements but array has 2 +LL | [] => None, | ^^ expected 2 elements error: aborting due to previous error diff --git a/src/test/ui/issues/issue-13482.stderr b/src/test/ui/issues/issue-13482.stderr index 5776dedf0a2..3eb05f504c2 100644 --- a/src/test/ui/issues/issue-13482.stderr +++ b/src/test/ui/issues/issue-13482.stderr @@ -1,7 +1,7 @@ error[E0527]: pattern requires 0 elements but array has 2 --> $DIR/issue-13482.rs:4:5 | -LL | [] => None, //~ ERROR pattern requires 0 elements but array has 2 +LL | [] => None, | ^^ expected 2 elements error: aborting due to previous error diff --git a/src/test/ui/issues/issue-13483.stderr b/src/test/ui/issues/issue-13483.stderr index 1ab67d285c0..739f0612366 100644 --- a/src/test/ui/issues/issue-13483.stderr +++ b/src/test/ui/issues/issue-13483.stderr @@ -1,13 +1,13 @@ error: missing condition for `if` statemement --> $DIR/issue-13483.rs:3:14 | -LL | } else if { //~ ERROR missing condition +LL | } else if { | ^ expected if condition here error: missing condition for `if` statemement --> $DIR/issue-13483.rs:10:14 | -LL | } else if { //~ ERROR missing condition +LL | } else if { | ^ expected if condition here error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-13497-2.stderr b/src/test/ui/issues/issue-13497-2.stderr index c91ab789fe8..5fde55cce00 100644 --- a/src/test/ui/issues/issue-13497-2.stderr +++ b/src/test/ui/issues/issue-13497-2.stderr @@ -1,7 +1,7 @@ error[E0597]: `rawLines` does not live long enough --> $DIR/issue-13497-2.rs:3:5 | -LL | rawLines //~ ERROR `rawLines` does not live long enough +LL | rawLines | ^^^^^^^^ borrowed value does not live long enough LL | .iter().map(|l| l.trim()).collect() LL | } diff --git a/src/test/ui/issues/issue-13497.stderr b/src/test/ui/issues/issue-13497.stderr index eb053c1003e..b72f0277052 100644 --- a/src/test/ui/issues/issue-13497.stderr +++ b/src/test/ui/issues/issue-13497.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/issue-13497.rs:2:5 | -LL | &str //~ ERROR missing lifetime specifier +LL | &str | ^ help: consider giving it a 'static lifetime: `&'static` | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from diff --git a/src/test/ui/issues/issue-1362.stderr b/src/test/ui/issues/issue-1362.stderr index dd97e0cf04a..5fef8497cde 100644 --- a/src/test/ui/issues/issue-1362.stderr +++ b/src/test/ui/issues/issue-1362.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-1362.rs:4:16 | -LL | let x: u32 = 20i32; //~ ERROR mismatched types +LL | let x: u32 = 20i32; | ^^^^^ expected u32, found i32 error: aborting due to previous error diff --git a/src/test/ui/issues/issue-13847.stderr b/src/test/ui/issues/issue-13847.stderr index 9199199d730..52b8dc04970 100644 --- a/src/test/ui/issues/issue-13847.stderr +++ b/src/test/ui/issues/issue-13847.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `is_failure` on type `!` --> $DIR/issue-13847.rs:2:12 | -LL | return.is_failure //~ ERROR no field `is_failure` on type `!` +LL | return.is_failure | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-13853-2.stderr b/src/test/ui/issues/issue-13853-2.stderr index 3e711243b4e..0853f5cffb7 100644 --- a/src/test/ui/issues/issue-13853-2.stderr +++ b/src/test/ui/issues/issue-13853-2.stderr @@ -1,7 +1,7 @@ error[E0615]: attempted to take value of method `get` on type `std::boxed::Box<(dyn ResponseHook + 'static)>` --> $DIR/issue-13853-2.rs:5:39 | -LL | fn foo(res : Box) { res.get } //~ ERROR attempted to take value of method +LL | fn foo(res : Box) { res.get } | ^^^ help: use parentheses to call the method: `get()` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-13853.stderr b/src/test/ui/issues/issue-13853.stderr index 6da5da04fb1..b4efd5511c3 100644 --- a/src/test/ui/issues/issue-13853.stderr +++ b/src/test/ui/issues/issue-13853.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | fn nodes<'a, I: Iterator>(&self) -> I | - expected `I` because of return type ... -LL | self.iter() //~ ERROR mismatched types +LL | self.iter() | ^^^^^^^^^^^ expected type parameter, found struct `std::slice::Iter` | = note: expected type `I` @@ -13,13 +13,13 @@ LL | self.iter() //~ ERROR mismatched types error[E0599]: no method named `iter` found for type `&G` in the current scope --> $DIR/issue-13853.rs:27:23 | -LL | for node in graph.iter() { //~ ERROR no method named `iter` found +LL | for node in graph.iter() { | ^^^^ error[E0308]: mismatched types --> $DIR/issue-13853.rs:37:13 | -LL | iterate(graph); //~ ERROR mismatched types +LL | iterate(graph); | ^^^^^ | | | expected reference, found struct `std::vec::Vec` diff --git a/src/test/ui/issues/issue-14221.stderr b/src/test/ui/issues/issue-14221.stderr index bf12480a5d3..3e5e25a9f6d 100644 --- a/src/test/ui/issues/issue-14221.stderr +++ b/src/test/ui/issues/issue-14221.stderr @@ -7,7 +7,7 @@ LL | A => "A", warning[E0170]: pattern binding `B` is named the same as one of the variants of the type `E` --> $DIR/issue-14221.rs:15:13 | -LL | B => "B", //~ ERROR: unreachable pattern +LL | B => "B", | ^ help: to match on the variant, qualify the path: `E::B` error: unreachable pattern @@ -15,8 +15,8 @@ error: unreachable pattern | LL | A => "A", | - matches any value -LL | //~^ WARN pattern binding `A` is named the same as one of the variants of the type `E` -LL | B => "B", //~ ERROR: unreachable pattern +LL | +LL | B => "B", | ^ unreachable pattern | note: lint level defined here diff --git a/src/test/ui/issues/issue-14285.stderr b/src/test/ui/issues/issue-14285.stderr index e5d0ab0684a..c180ed03e54 100644 --- a/src/test/ui/issues/issue-14285.stderr +++ b/src/test/ui/issues/issue-14285.stderr @@ -3,7 +3,7 @@ error[E0621]: explicit lifetime required in the type of `a` | LL | fn foo<'a>(a: &Foo) -> B<'a> { | ---- help: add explicit lifetime `'a` to the type of `a`: `&'a (dyn Foo + 'a)` -LL | B(a) //~ ERROR explicit lifetime required in the type of `a` [E0621] +LL | B(a) | ^^^^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/issues/issue-14309.stderr b/src/test/ui/issues/issue-14309.stderr index b8d82aadd48..4376876ecd6 100644 --- a/src/test/ui/issues/issue-14309.stderr +++ b/src/test/ui/issues/issue-14309.stderr @@ -1,7 +1,7 @@ error: `extern` block uses type `A` which is not FFI-safe: this struct has unspecified layout --> $DIR/issue-14309.rs:30:15 | -LL | fn foo(x: A); //~ ERROR type `A` which is not FFI-safe +LL | fn foo(x: A); | ^ | note: lint level defined here @@ -21,7 +21,7 @@ LL | | } error: `extern` block uses type `A` which is not FFI-safe: this struct has unspecified layout --> $DIR/issue-14309.rs:31:15 | -LL | fn bar(x: B); //~ ERROR type `A` +LL | fn bar(x: B); | ^ | = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct @@ -36,7 +36,7 @@ LL | | } error: `extern` block uses type `A` which is not FFI-safe: this struct has unspecified layout --> $DIR/issue-14309.rs:33:15 | -LL | fn qux(x: A2); //~ ERROR type `A` +LL | fn qux(x: A2); | ^^ | = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct @@ -51,7 +51,7 @@ LL | | } error: `extern` block uses type `A` which is not FFI-safe: this struct has unspecified layout --> $DIR/issue-14309.rs:34:16 | -LL | fn quux(x: B2); //~ ERROR type `A` +LL | fn quux(x: B2); | ^^ | = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct @@ -66,7 +66,7 @@ LL | | } error: `extern` block uses type `A` which is not FFI-safe: this struct has unspecified layout --> $DIR/issue-14309.rs:36:16 | -LL | fn fred(x: D); //~ ERROR type `A` +LL | fn fred(x: D); | ^ | = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct diff --git a/src/test/ui/issues/issue-1448-2.stderr b/src/test/ui/issues/issue-1448-2.stderr index b06a6162712..487b061eba1 100644 --- a/src/test/ui/issues/issue-1448-2.stderr +++ b/src/test/ui/issues/issue-1448-2.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-1448-2.rs:6:24 | -LL | println!("{}", foo(10i32)); //~ ERROR mismatched types +LL | println!("{}", foo(10i32)); | ^^^^^ expected u32, found i32 error: aborting due to previous error diff --git a/src/test/ui/issues/issue-14721.stderr b/src/test/ui/issues/issue-14721.stderr index 8029318419a..49ebb2976e8 100644 --- a/src/test/ui/issues/issue-14721.stderr +++ b/src/test/ui/issues/issue-14721.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `desc` on type `&str` --> $DIR/issue-14721.rs:3:24 | -LL | println!("{}", foo.desc); //~ no field `desc` on type `&str` +LL | println!("{}", foo.desc); | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-1476.stderr b/src/test/ui/issues/issue-1476.stderr index a0c0a8fb1f2..670bd546335 100644 --- a/src/test/ui/issues/issue-1476.stderr +++ b/src/test/ui/issues/issue-1476.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `x` in this scope --> $DIR/issue-1476.rs:2:20 | -LL | println!("{}", x); //~ ERROR cannot find value `x` in this scope +LL | println!("{}", x); | ^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/issues/issue-14772.stderr b/src/test/ui/issues/issue-14772.stderr index a7448ad5b88..253fec5e578 100644 --- a/src/test/ui/issues/issue-14772.stderr +++ b/src/test/ui/issues/issue-14772.stderr @@ -1,7 +1,7 @@ error: only functions may be used as tests --> $DIR/issue-14772.rs:4:1 | -LL | mod foo {} //~ ERROR only functions may be used as tests +LL | mod foo {} | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-14845.stderr b/src/test/ui/issues/issue-14845.stderr index 94e7ac74ff0..2fa9fbaa887 100644 --- a/src/test/ui/issues/issue-14845.stderr +++ b/src/test/ui/issues/issue-14845.stderr @@ -1,13 +1,13 @@ error[E0606]: casting `&[u8; 1]` as `*mut u8` is invalid --> $DIR/issue-14845.rs:7:14 | -LL | let _f = &x.a as *mut u8; //~ ERROR casting +LL | let _f = &x.a as *mut u8; | ^^^^^^^^^^^^^^^ error[E0606]: casting `&[u8; 1]` as `*mut u8` is invalid --> $DIR/issue-14845.rs:10:14 | -LL | let _v = &local as *mut u8; //~ ERROR casting +LL | let _v = &local as *mut u8; | ^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-15207.stderr b/src/test/ui/issues/issue-15207.stderr index 7149444b566..2d90eb80fc5 100644 --- a/src/test/ui/issues/issue-15207.stderr +++ b/src/test/ui/issues/issue-15207.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `push` found for type `!` in the current scope --> $DIR/issue-15207.rs:3:15 | -LL | break.push(1) //~ ERROR no method named `push` found for type `!` +LL | break.push(1) | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-15965.stderr b/src/test/ui/issues/issue-15965.stderr index 904656cb3b1..90377c19dee 100644 --- a/src/test/ui/issues/issue-15965.stderr +++ b/src/test/ui/issues/issue-15965.stderr @@ -2,7 +2,7 @@ error[E0282]: type annotations needed --> $DIR/issue-15965.rs:3:9 | LL | / { return () } -LL | | //~^ ERROR type annotations needed [E0282] +LL | | LL | | () | |______^ cannot infer type | diff --git a/src/test/ui/issues/issue-16098.stderr b/src/test/ui/issues/issue-16098.stderr index 4a62cea20b8..cdab76ca70b 100644 --- a/src/test/ui/issues/issue-16098.stderr +++ b/src/test/ui/issues/issue-16098.stderr @@ -1,7 +1,7 @@ error: recursion limit reached while expanding the macro `prob1` --> $DIR/issue-16098.rs:7:18 | -LL | $n + prob1!($n - 1); //~ ERROR recursion limit reached while expanding the macro `prob1` +LL | $n + prob1!($n - 1); | ^^^^^^^^^^^^^^ ... LL | println!("Problem 1: {}", prob1!(1000)); diff --git a/src/test/ui/issues/issue-16250.stderr b/src/test/ui/issues/issue-16250.stderr index fc6f26f0439..a8ff2548b73 100644 --- a/src/test/ui/issues/issue-16250.stderr +++ b/src/test/ui/issues/issue-16250.stderr @@ -1,7 +1,7 @@ error: `extern` block uses type `Foo` which is not FFI-safe: this struct has unspecified layout --> $DIR/issue-16250.rs:6:20 | -LL | pub fn foo(x: (Foo)); //~ ERROR unspecified layout +LL | pub fn foo(x: (Foo)); | ^^^ | note: lint level defined here diff --git a/src/test/ui/issues/issue-16683.stderr b/src/test/ui/issues/issue-16683.stderr index 23e67bb2de9..a047893a168 100644 --- a/src/test/ui/issues/issue-16683.stderr +++ b/src/test/ui/issues/issue-16683.stderr @@ -1,20 +1,20 @@ error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements --> $DIR/issue-16683.rs:4:14 | -LL | self.a(); //~ ERROR cannot infer +LL | self.a(); | ^ | note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 3:5... --> $DIR/issue-16683.rs:3:5 | LL | / fn b(&self) { -LL | | self.a(); //~ ERROR cannot infer +LL | | self.a(); LL | | } | |_____^ note: ...so that reference does not outlive borrowed content --> $DIR/issue-16683.rs:4:9 | -LL | self.a(); //~ ERROR cannot infer +LL | self.a(); | ^^^^ note: but, the lifetime must be valid for the lifetime 'a as defined on the trait at 1:9... --> $DIR/issue-16683.rs:1:9 diff --git a/src/test/ui/issues/issue-16939.stderr b/src/test/ui/issues/issue-16939.stderr index 7281f6a7355..5df2119c141 100644 --- a/src/test/ui/issues/issue-16939.stderr +++ b/src/test/ui/issues/issue-16939.stderr @@ -1,7 +1,7 @@ error[E0057]: this function takes 0 parameters but 1 parameter was supplied --> $DIR/issue-16939.rs:5:9 | -LL | |t| f(t); //~ ERROR E0057 +LL | |t| f(t); | ^^^^ expected 0 parameters error: aborting due to previous error diff --git a/src/test/ui/issues/issue-1697.stderr b/src/test/ui/issues/issue-1697.stderr index 00e136cb1ce..6ae5bd1fc26 100644 --- a/src/test/ui/issues/issue-1697.stderr +++ b/src/test/ui/issues/issue-1697.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `unresolved` --> $DIR/issue-1697.rs:3:5 | -LL | use unresolved::*; //~ ERROR unresolved import `unresolved` [E0432] +LL | use unresolved::*; | ^^^^^^^^^^ maybe a missing `extern crate unresolved;`? error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17001.stderr b/src/test/ui/issues/issue-17001.stderr index bdd08249638..d7e6069977b 100644 --- a/src/test/ui/issues/issue-17001.stderr +++ b/src/test/ui/issues/issue-17001.stderr @@ -1,7 +1,7 @@ error[E0574]: expected struct, variant or union type, found module `foo` --> $DIR/issue-17001.rs:4:13 | -LL | let p = foo { x: () }; //~ ERROR expected struct, variant or union type, found module `foo` +LL | let p = foo { x: () }; | ^^^ not a struct, variant or union type error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17033.stderr b/src/test/ui/issues/issue-17033.stderr index 181a9992c6d..ba78aa2bc6a 100644 --- a/src/test/ui/issues/issue-17033.stderr +++ b/src/test/ui/issues/issue-17033.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-17033.rs:2:10 | -LL | (*p)(()) //~ ERROR mismatched types +LL | (*p)(()) | ^^ | | | expected &mut (), found () diff --git a/src/test/ui/issues/issue-17252.stderr b/src/test/ui/issues/issue-17252.stderr index e333e150651..c993588f553 100644 --- a/src/test/ui/issues/issue-17252.stderr +++ b/src/test/ui/issues/issue-17252.stderr @@ -1,7 +1,7 @@ error[E0391]: cycle detected when processing `FOO` --> $DIR/issue-17252.rs:1:20 | -LL | const FOO: usize = FOO; //~ ERROR E0391 +LL | const FOO: usize = FOO; | ^^^ | = note: ...which again requires processing `FOO`, completing the cycle diff --git a/src/test/ui/issues/issue-17337.stderr b/src/test/ui/issues/issue-17337.stderr index 4c3ffe92ccc..8973afb8068 100644 --- a/src/test/ui/issues/issue-17337.stderr +++ b/src/test/ui/issues/issue-17337.stderr @@ -1,7 +1,7 @@ error: use of deprecated item 'Foo::foo': text --> $DIR/issue-17337.rs:16:6 | -LL | .foo(); //~ ERROR use of deprecated item +LL | .foo(); | ^^^ | note: lint level defined here diff --git a/src/test/ui/issues/issue-17373.stderr b/src/test/ui/issues/issue-17373.stderr index e1a9f097b22..5c429d1113d 100644 --- a/src/test/ui/issues/issue-17373.stderr +++ b/src/test/ui/issues/issue-17373.stderr @@ -1,7 +1,7 @@ error[E0614]: type `!` cannot be dereferenced --> $DIR/issue-17373.rs:2:5 | -LL | *return //~ ERROR type `!` cannot be dereferenced +LL | *return | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17385.stderr b/src/test/ui/issues/issue-17385.stderr index 5f28a3c2c27..ee55d862e13 100644 --- a/src/test/ui/issues/issue-17385.stderr +++ b/src/test/ui/issues/issue-17385.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `foo` | LL | drop(foo); | --- value moved here -LL | match foo { //~ ERROR use of moved value +LL | match foo { | ^^^ value used here after move | = note: move occurs because `foo` has type `X`, which does not implement the `Copy` trait @@ -13,7 +13,7 @@ error[E0382]: use of moved value: `e` | LL | drop(e); | - value moved here -LL | match e { //~ ERROR use of moved value +LL | match e { | ^ value used here after move | = note: move occurs because `e` has type `Enum`, which does not implement the `Copy` trait diff --git a/src/test/ui/issues/issue-17405.stderr b/src/test/ui/issues/issue-17405.stderr index 2bfc85cc7de..37274e239ba 100644 --- a/src/test/ui/issues/issue-17405.stderr +++ b/src/test/ui/issues/issue-17405.stderr @@ -1,7 +1,7 @@ error[E0574]: expected struct, variant or union type, found enum `Foo` --> $DIR/issue-17405.rs:7:9 | -LL | Foo { i } => () //~ ERROR expected struct, variant or union type, found enum `Foo` +LL | Foo { i } => () | ^^^ not a struct, variant or union type error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17545.stderr b/src/test/ui/issues/issue-17545.stderr index 62ec25e1d1a..c4acaf2278e 100644 --- a/src/test/ui/issues/issue-17545.stderr +++ b/src/test/ui/issues/issue-17545.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/issue-17545.rs:7:10 | -LL | &id(()), //~ ERROR borrowed value does not live long enough +LL | &id(()), | ^^^^^^ temporary value does not live long enough LL | )); | - temporary value only lives until here diff --git a/src/test/ui/issues/issue-17551.stderr b/src/test/ui/issues/issue-17551.stderr index df693591e7c..40e7727752b 100644 --- a/src/test/ui/issues/issue-17551.stderr +++ b/src/test/ui/issues/issue-17551.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-17551.rs:6:15 | -LL | let foo = B(marker::PhantomData); //~ ERROR type annotations needed +LL | let foo = B(marker::PhantomData); | --- ^ cannot infer type for `T` | | | consider giving `foo` a type diff --git a/src/test/ui/issues/issue-17718-const-privacy.stderr b/src/test/ui/issues/issue-17718-const-privacy.stderr index 5025aaca777..0b0de8a5259 100644 --- a/src/test/ui/issues/issue-17718-const-privacy.stderr +++ b/src/test/ui/issues/issue-17718-const-privacy.stderr @@ -1,13 +1,13 @@ error[E0603]: constant `B` is private --> $DIR/issue-17718-const-privacy.rs:5:8 | -LL | use a::B; //~ ERROR: constant `B` is private +LL | use a::B; | ^ error[E0603]: constant `BAR` is private --> $DIR/issue-17718-const-privacy.rs:8:5 | -LL | BAR, //~ ERROR: constant `BAR` is private +LL | BAR, | ^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-17718-patterns.stderr b/src/test/ui/issues/issue-17718-patterns.stderr index 698bd857a58..109091c2af0 100644 --- a/src/test/ui/issues/issue-17718-patterns.stderr +++ b/src/test/ui/issues/issue-17718-patterns.stderr @@ -4,7 +4,7 @@ error[E0530]: match bindings cannot shadow statics LL | static A1: usize = 1; | --------------------- the static `A1` is defined here ... -LL | A1 => {} //~ ERROR: match bindings cannot shadow statics +LL | A1 => {} | ^^ cannot be named the same as a static error[E0530]: match bindings cannot shadow statics @@ -13,7 +13,7 @@ error[E0530]: match bindings cannot shadow statics LL | static mut A2: usize = 1; | ------------------------- the static `A2` is defined here ... -LL | A2 => {} //~ ERROR: match bindings cannot shadow statics +LL | A2 => {} | ^^ cannot be named the same as a static error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-17718-references.stderr b/src/test/ui/issues/issue-17718-references.stderr index ef49dcfeef9..15c3e67f7a1 100644 --- a/src/test/ui/issues/issue-17718-references.stderr +++ b/src/test/ui/issues/issue-17718-references.stderr @@ -1,13 +1,13 @@ error[E0013]: constants cannot refer to statics, use a constant instead --> $DIR/issue-17718-references.rs:9:28 | -LL | const T2: &'static usize = &S; //~ ERROR: constants cannot refer to statics +LL | const T2: &'static usize = &S; | ^^ error[E0013]: constants cannot refer to statics, use a constant instead --> $DIR/issue-17718-references.rs:14:19 | -LL | const T6: usize = S; //~ ERROR: constants cannot refer to statics +LL | const T6: usize = S; | ^ error[E0013]: constants cannot refer to statics, use a constant instead diff --git a/src/test/ui/issues/issue-17718-static-move.stderr b/src/test/ui/issues/issue-17718-static-move.stderr index dd473f0a4c4..064a991e4a3 100644 --- a/src/test/ui/issues/issue-17718-static-move.stderr +++ b/src/test/ui/issues/issue-17718-static-move.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of static item --> $DIR/issue-17718-static-move.rs:6:14 | -LL | let _a = FOO; //~ ERROR: cannot move out of static item +LL | let _a = FOO; | ^^^ | | | cannot move out of static item diff --git a/src/test/ui/issues/issue-17740.stderr b/src/test/ui/issues/issue-17740.stderr index c7a76c558ee..7ab0fa4d818 100644 --- a/src/test/ui/issues/issue-17740.stderr +++ b/src/test/ui/issues/issue-17740.stderr @@ -10,11 +10,11 @@ note: the anonymous lifetime #2 defined on the method body at 6:5... --> $DIR/issue-17740.rs:6:5 | LL | / fn bar(self: &mut Foo) { -LL | | //~^ mismatched method receiver -LL | | //~| expected type `Foo<'a>` -LL | | //~| found type `Foo<'_>` +LL | | +LL | | +LL | | ... | -LL | | //~| lifetime mismatch +LL | | LL | | } | |_____^ note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 5:7 @@ -40,11 +40,11 @@ note: ...does not necessarily outlive the anonymous lifetime #2 defined on the m --> $DIR/issue-17740.rs:6:5 | LL | / fn bar(self: &mut Foo) { -LL | | //~^ mismatched method receiver -LL | | //~| expected type `Foo<'a>` -LL | | //~| found type `Foo<'_>` +LL | | +LL | | +LL | | ... | -LL | | //~| lifetime mismatch +LL | | LL | | } | |_____^ diff --git a/src/test/ui/issues/issue-17758.stderr b/src/test/ui/issues/issue-17758.stderr index b376757091d..28a1be59840 100644 --- a/src/test/ui/issues/issue-17758.stderr +++ b/src/test/ui/issues/issue-17758.stderr @@ -9,7 +9,7 @@ note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on th | LL | / fn bar(&self) { LL | | self.foo(); -LL | | //~^ ERROR cannot infer +LL | | LL | | } | |_____^ note: ...so that reference does not outlive borrowed content diff --git a/src/test/ui/issues/issue-17904-2.stderr b/src/test/ui/issues/issue-17904-2.stderr index b4f97452574..b8fabd3b13f 100644 --- a/src/test/ui/issues/issue-17904-2.stderr +++ b/src/test/ui/issues/issue-17904-2.stderr @@ -1,7 +1,7 @@ error[E0392]: parameter `T` is never used --> $DIR/issue-17904-2.rs:4:12 | -LL | struct Foo where T: Copy; //~ ERROR parameter `T` is never used +LL | struct Foo where T: Copy; | ^ unused type parameter | = help: consider removing `T` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/issues/issue-17905-2.stderr b/src/test/ui/issues/issue-17905-2.stderr index 39e5f8ffc9f..f185f49b9b9 100644 --- a/src/test/ui/issues/issue-17905-2.stderr +++ b/src/test/ui/issues/issue-17905-2.stderr @@ -10,8 +10,8 @@ note: the anonymous lifetime #2 defined on the method body at 8:5... --> $DIR/issue-17905-2.rs:8:5 | LL | / fn say(self: &Pair<&str, isize>) { -LL | | //~^ ERROR mismatched method receiver -LL | | //~| ERROR mismatched method receiver +LL | | +LL | | LL | | println!("{:?}", self); LL | | } | |_____^ @@ -38,8 +38,8 @@ note: ...does not necessarily outlive the anonymous lifetime #2 defined on the m --> $DIR/issue-17905-2.rs:8:5 | LL | / fn say(self: &Pair<&str, isize>) { -LL | | //~^ ERROR mismatched method receiver -LL | | //~| ERROR mismatched method receiver +LL | | +LL | | LL | | println!("{:?}", self); LL | | } | |_____^ diff --git a/src/test/ui/issues/issue-17959.stderr b/src/test/ui/issues/issue-17959.stderr index 790e8f7c798..de742e48aea 100644 --- a/src/test/ui/issues/issue-17959.stderr +++ b/src/test/ui/issues/issue-17959.stderr @@ -2,7 +2,7 @@ error[E0367]: The requirement `T: std::marker::Sized` is added only by the Drop --> $DIR/issue-17959.rs:11:1 | LL | / impl Drop for G { -LL | | //~^ ERROR: The requirement `T: std::marker::Sized` is added only by the Drop impl. [E0367] +LL | | LL | | fn drop(&mut self) { LL | | if !self._ptr.is_null() { LL | | } diff --git a/src/test/ui/issues/issue-17994.stderr b/src/test/ui/issues/issue-17994.stderr index e22b2c07197..61e1e496f79 100644 --- a/src/test/ui/issues/issue-17994.stderr +++ b/src/test/ui/issues/issue-17994.stderr @@ -1,7 +1,7 @@ error[E0091]: type parameter `T` is unused --> $DIR/issue-17994.rs:2:10 | -LL | type Huh where T: Tr = isize; //~ ERROR type parameter `T` is unused +LL | type Huh where T: Tr = isize; | ^ unused type parameter error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17999.stderr b/src/test/ui/issues/issue-17999.stderr index 51c0c757a80..b9ae03356e9 100644 --- a/src/test/ui/issues/issue-17999.stderr +++ b/src/test/ui/issues/issue-17999.stderr @@ -1,7 +1,7 @@ error: unused variable: `x` --> $DIR/issue-17999.rs:5:13 | -LL | let x = (); //~ ERROR: unused variable: `x` +LL | let x = (); | ^ help: consider prefixing with an underscore: `_x` | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![deny(unused_variables)] error: unused variable: `a` --> $DIR/issue-17999.rs:7:13 | -LL | a => {} //~ ERROR: unused variable: `a` +LL | a => {} | ^ help: consider prefixing with an underscore: `_a` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-18118.stderr b/src/test/ui/issues/issue-18118.stderr index 9b21ece341a..07fa1f60e06 100644 --- a/src/test/ui/issues/issue-18118.stderr +++ b/src/test/ui/issues/issue-18118.stderr @@ -1,7 +1,7 @@ error[E0597]: `p` does not live long enough --> $DIR/issue-18118.rs:4:10 | -LL | &p //~ ERROR `p` does not live long enough +LL | &p | ^ borrowed value does not live long enough LL | }; | - borrowed value only lives until here diff --git a/src/test/ui/issues/issue-18159.stderr b/src/test/ui/issues/issue-18159.stderr index 25b7051a880..6048344125c 100644 --- a/src/test/ui/issues/issue-18159.stderr +++ b/src/test/ui/issues/issue-18159.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-18159.rs:2:9 | -LL | let x; //~ ERROR type annotations needed +LL | let x; | ^ | | | cannot infer type diff --git a/src/test/ui/issues/issue-18183.stderr b/src/test/ui/issues/issue-18183.stderr index cf33124bc95..c8f8ac9296d 100644 --- a/src/test/ui/issues/issue-18183.stderr +++ b/src/test/ui/issues/issue-18183.stderr @@ -1,7 +1,7 @@ error[E0128]: type parameters with a default cannot use forward declared identifiers --> $DIR/issue-18183.rs:1:20 | -LL | pub struct Foo(Bar); //~ ERROR E0128 +LL | pub struct Foo(Bar); | ^^^ defaulted type parameters cannot be forward declared error: aborting due to previous error diff --git a/src/test/ui/issues/issue-18294.stderr b/src/test/ui/issues/issue-18294.stderr index f3e8ab1a313..a7d0392f7f0 100644 --- a/src/test/ui/issues/issue-18294.stderr +++ b/src/test/ui/issues/issue-18294.stderr @@ -1,7 +1,7 @@ error[E0658]: casting pointers to integers in constants is unstable (see issue #51910) --> $DIR/issue-18294.rs:3:31 | -LL | const Y: usize = unsafe { &X as *const u32 as usize }; //~ ERROR is unstable +LL | const Y: usize = unsafe { &X as *const u32 as usize }; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable diff --git a/src/test/ui/issues/issue-18389.stderr b/src/test/ui/issues/issue-18389.stderr index 02ff6b6d5bf..090487ee8fd 100644 --- a/src/test/ui/issues/issue-18389.stderr +++ b/src/test/ui/issues/issue-18389.stderr @@ -5,7 +5,7 @@ LL | trait Private { | - `Private<::P, ::R>` declared as private ... LL | / pub trait Public: Private< -LL | | //~^ ERROR private trait `Private<::P, ::R>` in public interface +LL | | LL | | ::P, LL | | ::R ... | diff --git a/src/test/ui/issues/issue-18423.stderr b/src/test/ui/issues/issue-18423.stderr index 96652767a05..141fd27be36 100644 --- a/src/test/ui/issues/issue-18423.stderr +++ b/src/test/ui/issues/issue-18423.stderr @@ -1,7 +1,7 @@ error[E0107]: wrong number of lifetime arguments: expected 0, found 1 --> $DIR/issue-18423.rs:4:12 | -LL | x: Box<'a, isize> //~ ERROR wrong number of lifetime arguments +LL | x: Box<'a, isize> | ^^ unexpected lifetime argument error: aborting due to previous error diff --git a/src/test/ui/issues/issue-18446.stderr b/src/test/ui/issues/issue-18446.stderr index 8aff0309aa7..e6afc4c13a9 100644 --- a/src/test/ui/issues/issue-18446.stderr +++ b/src/test/ui/issues/issue-18446.stderr @@ -1,7 +1,7 @@ error[E0034]: multiple applicable items in scope --> $DIR/issue-18446.rs:18:7 | -LL | x.foo(); //~ ERROR multiple applicable items in scope [E0034] +LL | x.foo(); | ^^^ multiple `foo` found | note: candidate #1 is defined in an impl for the type `dyn T` diff --git a/src/test/ui/issues/issue-18532.stderr b/src/test/ui/issues/issue-18532.stderr index 400890348a1..4c224eb2d24 100644 --- a/src/test/ui/issues/issue-18532.stderr +++ b/src/test/ui/issues/issue-18532.stderr @@ -1,7 +1,7 @@ error[E0618]: expected function, found `!` --> $DIR/issue-18532.rs:6:5 | -LL | (return)((),()); //~ ERROR expected function, found `!` +LL | (return)((),()); | ^^^^^^^^------- | | | call expression requires function diff --git a/src/test/ui/issues/issue-18611.stderr b/src/test/ui/issues/issue-18611.stderr index 8fa7694dc6c..22c3470b61e 100644 --- a/src/test/ui/issues/issue-18611.stderr +++ b/src/test/ui/issues/issue-18611.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `isize: HasState` is not satisfied --> $DIR/issue-18611.rs:1:1 | LL | / fn add_state(op: ::State) { -LL | | //~^ ERROR `isize: HasState` is not satisfied +LL | | LL | | } | |_^ the trait `HasState` is not implemented for `isize` diff --git a/src/test/ui/issues/issue-1871.stderr b/src/test/ui/issues/issue-1871.stderr index 10b0825c34e..fecd689251b 100644 --- a/src/test/ui/issues/issue-1871.stderr +++ b/src/test/ui/issues/issue-1871.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `honk` found for type `{integer}` in the current scope --> $DIR/issue-1871.rs:7:9 | -LL | f.honk() //~ ERROR no method named `honk` found +LL | f.honk() | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-18783.stderr b/src/test/ui/issues/issue-18783.stderr index 68eb5167ecb..f88c42552e3 100644 --- a/src/test/ui/issues/issue-18783.stderr +++ b/src/test/ui/issues/issue-18783.stderr @@ -9,7 +9,7 @@ LL | c.push(Box::new(|| y = 0)); | ^^ - borrow occurs due to use of `y` in closure | | | second mutable borrow occurs here -LL | //~^ ERROR cannot borrow `y` as mutable more than once at a time +LL | LL | } | - first borrow ends here @@ -24,7 +24,7 @@ LL | Push::push(&c, Box::new(|| y = 0)); | ^^ - borrow occurs due to use of `y` in closure | | | second mutable borrow occurs here -LL | //~^ ERROR cannot borrow `y` as mutable more than once at a time +LL | LL | } | - first borrow ends here diff --git a/src/test/ui/issues/issue-18919.stderr b/src/test/ui/issues/issue-18919.stderr index ca717a3c49b..87528652bd4 100644 --- a/src/test/ui/issues/issue-18919.stderr +++ b/src/test/ui/issues/issue-18919.stderr @@ -2,7 +2,7 @@ error[E0277]: the size for values of type `dyn for<'r> std::ops::Fn(&'r isize) - --> $DIR/issue-18919.rs:3:1 | LL | / fn ho_func(f: Option) { -LL | | //~^ ERROR the size for values of type +LL | | LL | | } | |_^ doesn't have a size known at compile-time | diff --git a/src/test/ui/issues/issue-18937.stderr b/src/test/ui/issues/issue-18937.stderr index 91182224ad0..ac302caecc3 100644 --- a/src/test/ui/issues/issue-18937.stderr +++ b/src/test/ui/issues/issue-18937.stderr @@ -6,7 +6,7 @@ LL | | where F: fmt::Debug + 'a, LL | | Self: Sized; | |__________________________- definition of `foo` from trait ... -LL | / fn foo(&mut self, f: F) //~ ERROR impl has stricter +LL | / fn foo(&mut self, f: F) LL | | where F: fmt::Debug + 'static, LL | | { LL | | self.list.push(Box::new(f)); diff --git a/src/test/ui/issues/issue-19498.stderr b/src/test/ui/issues/issue-19498.stderr index fd5e48bde16..cc1d649d610 100644 --- a/src/test/ui/issues/issue-19498.stderr +++ b/src/test/ui/issues/issue-19498.stderr @@ -4,7 +4,7 @@ error[E0255]: the name `A` is defined multiple times LL | use self::A; | ------- previous import of the module `A` here LL | use self::B; -LL | mod A {} //~ ERROR the name `A` is defined multiple times +LL | mod A {} | ^^^^^ `A` redefined here | = note: `A` must be defined only once in the type namespace of this module @@ -19,7 +19,7 @@ error[E0255]: the name `B` is defined multiple times LL | use self::B; | ------- previous import of the module `B` here ... -LL | pub mod B {} //~ ERROR the name `B` is defined multiple times +LL | pub mod B {} | ^^^^^^^^^ `B` redefined here | = note: `B` must be defined only once in the type namespace of this module @@ -33,7 +33,7 @@ error[E0255]: the name `D` is defined multiple times | LL | use C::D; | ---- previous import of the module `D` here -LL | mod D {} //~ ERROR the name `D` is defined multiple times +LL | mod D {} | ^^^^^ `D` redefined here | = note: `D` must be defined only once in the type namespace of this module diff --git a/src/test/ui/issues/issue-19521.stderr b/src/test/ui/issues/issue-19521.stderr index 9005317736a..a43368be583 100644 --- a/src/test/ui/issues/issue-19521.stderr +++ b/src/test/ui/issues/issue-19521.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `homura` found for type `&'static str` in the current scope --> $DIR/issue-19521.rs:2:8 | -LL | "".homura()(); //~ ERROR no method named `homura` found +LL | "".homura()(); | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-1962.stderr b/src/test/ui/issues/issue-1962.stderr index f2c540b7451..afef59c5264 100644 --- a/src/test/ui/issues/issue-1962.stderr +++ b/src/test/ui/issues/issue-1962.stderr @@ -1,7 +1,7 @@ error: denote infinite loops with `loop { ... }` --> $DIR/issue-1962.rs:4:3 | -LL | while true { //~ ERROR denote infinite loops with `loop +LL | while true { | ^^^^^^^^^^ help: use `loop` | = note: requested on the command line with `-D while-true` diff --git a/src/test/ui/issues/issue-19692.stderr b/src/test/ui/issues/issue-19692.stderr index 1ed19676674..5e576f11583 100644 --- a/src/test/ui/issues/issue-19692.stderr +++ b/src/test/ui/issues/issue-19692.stderr @@ -4,7 +4,7 @@ error[E0599]: no method named `kaname` found for type `Homura` in the current sc LL | struct Homura; | -------------- method `kaname` not found for this ... -LL | let Some(ref madoka) = Some(homura.kaname()); //~ ERROR no method named `kaname` found +LL | let Some(ref madoka) = Some(homura.kaname()); | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-19707.stderr b/src/test/ui/issues/issue-19707.stderr index 7ba683a6891..c85ce0eb3a7 100644 --- a/src/test/ui/issues/issue-19707.stderr +++ b/src/test/ui/issues/issue-19707.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/issue-19707.rs:3:28 | -LL | type Foo = fn(&u8, &u8) -> &u8; //~ ERROR missing lifetime specifier +LL | type Foo = fn(&u8, &u8) -> &u8; | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2 @@ -9,7 +9,7 @@ LL | type Foo = fn(&u8, &u8) -> &u8; //~ ERROR missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/issue-19707.rs:5:27 | -LL | fn bar &u8>(f: &F) {} //~ ERROR missing lifetime specifier +LL | fn bar &u8>(f: &F) {} | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2 diff --git a/src/test/ui/issues/issue-19991.stderr b/src/test/ui/issues/issue-19991.stderr index ee5d363c4bd..4c6d150229a 100644 --- a/src/test/ui/issues/issue-19991.stderr +++ b/src/test/ui/issues/issue-19991.stderr @@ -1,10 +1,10 @@ error[E0317]: if may be missing an else clause --> $DIR/issue-19991.rs:5:5 | -LL | / if let Some(homura) = Some("madoka") { //~ ERROR missing an else clause -LL | | //~| expected type `()` -LL | | //~| found type `{integer}` -LL | | //~| expected (), found integer +LL | / if let Some(homura) = Some("madoka") { +LL | | +LL | | +LL | | LL | | 765 LL | | }; | |_____^ expected (), found integer diff --git a/src/test/ui/issues/issue-20005.stderr b/src/test/ui/issues/issue-20005.stderr index 672d78f65e9..e271005e74d 100644 --- a/src/test/ui/issues/issue-20005.stderr +++ b/src/test/ui/issues/issue-20005.stderr @@ -1,7 +1,7 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation time --> $DIR/issue-20005.rs:8:5 | -LL | / fn to( //~ ERROR the size for values of type +LL | / fn to( LL | | self LL | | ) -> >::Result where Dst: From { LL | | From::from(self) diff --git a/src/test/ui/issues/issue-20313.stderr b/src/test/ui/issues/issue-20313.stderr index 01673630cf1..87e2e899d3f 100644 --- a/src/test/ui/issues/issue-20313.stderr +++ b/src/test/ui/issues/issue-20313.stderr @@ -1,7 +1,7 @@ error[E0658]: linking to LLVM intrinsics is experimental (see issue #29602) --> $DIR/issue-20313.rs:3:5 | -LL | fn sqrt(x: f32) -> f32; //~ ERROR linking to LLVM intrinsics is experimental +LL | fn sqrt(x: f32) -> f32; | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(link_llvm_intrinsics)] to the crate attributes to enable diff --git a/src/test/ui/issues/issue-20413.stderr b/src/test/ui/issues/issue-20413.stderr index db746bebbe2..893f4faab0d 100644 --- a/src/test/ui/issues/issue-20413.stderr +++ b/src/test/ui/issues/issue-20413.stderr @@ -10,9 +10,9 @@ error[E0275]: overflow evaluating the requirement `NoData $DIR/issue-20413.rs:8:1 | LL | / impl Foo for T where NoData: Foo { -LL | | //~^ ERROR: overflow evaluating the requirement +LL | | LL | | fn answer(self) { -LL | | //~^ ERROR: overflow evaluating the requirement +LL | | LL | | let val: NoData = NoData; LL | | } LL | | } @@ -92,7 +92,7 @@ error[E0275]: overflow evaluating the requirement `NoData $DIR/issue-20413.rs:10:3 | LL | / fn answer(self) { -LL | | //~^ ERROR: overflow evaluating the requirement +LL | | LL | | let val: NoData = NoData; LL | | } | |___^ diff --git a/src/test/ui/issues/issue-20616-1.stderr b/src/test/ui/issues/issue-20616-1.stderr index 522db412412..143486c8f5a 100644 --- a/src/test/ui/issues/issue-20616-1.stderr +++ b/src/test/ui/issues/issue-20616-1.stderr @@ -1,7 +1,7 @@ error: expected one of `,`, `:`, or `>`, found `T` --> $DIR/issue-20616-1.rs:9:16 | -LL | type Type_1<'a T> = &'a T; //~ error: expected one of `,`, `:`, or `>`, found `T` +LL | type Type_1<'a T> = &'a T; | ^ expected one of `,`, `:`, or `>` here error: aborting due to previous error diff --git a/src/test/ui/issues/issue-20616-2.stderr b/src/test/ui/issues/issue-20616-2.stderr index 544219eb6cf..1152dec8bad 100644 --- a/src/test/ui/issues/issue-20616-2.stderr +++ b/src/test/ui/issues/issue-20616-2.stderr @@ -1,7 +1,7 @@ error: expected one of `,` or `>`, found `(` --> $DIR/issue-20616-2.rs:12:31 | -LL | type Type_2 = Type_1_<'static ()>; //~ error: expected one of `,` or `>`, found `(` +LL | type Type_2 = Type_1_<'static ()>; | ^ expected one of `,` or `>` here error: aborting due to previous error diff --git a/src/test/ui/issues/issue-20714.stderr b/src/test/ui/issues/issue-20714.stderr index 9cd6a27c12a..456aff05750 100644 --- a/src/test/ui/issues/issue-20714.stderr +++ b/src/test/ui/issues/issue-20714.stderr @@ -4,7 +4,7 @@ error[E0618]: expected function, found `G` LL | struct G; | --------- `G` defined here ... -LL | let g = G(); //~ ERROR: expected function, found `G` +LL | let g = G(); | ^-- | | | call expression requires function diff --git a/src/test/ui/issues/issue-20772.stderr b/src/test/ui/issues/issue-20772.stderr index 7dc4e43fd57..e67fedc5a9e 100644 --- a/src/test/ui/issues/issue-20772.stderr +++ b/src/test/ui/issues/issue-20772.stderr @@ -2,8 +2,8 @@ error[E0391]: cycle detected when computing the supertraits of `T` --> $DIR/issue-20772.rs:1:1 | LL | / trait T : Iterator -LL | | //~^ ERROR cycle detected -LL | | //~| ERROR associated type `Item` not found for `Self` +LL | | +LL | | LL | | {} | |__^ | @@ -12,8 +12,8 @@ note: cycle used when collecting item types in top-level module --> $DIR/issue-20772.rs:1:1 | LL | / trait T : Iterator -LL | | //~^ ERROR cycle detected -LL | | //~| ERROR associated type `Item` not found for `Self` +LL | | +LL | | LL | | {} | |__^ diff --git a/src/test/ui/issues/issue-20831-debruijn.stderr b/src/test/ui/issues/issue-20831-debruijn.stderr index fa7704cf17e..b2a05551837 100644 --- a/src/test/ui/issues/issue-20831-debruijn.stderr +++ b/src/test/ui/issues/issue-20831-debruijn.stderr @@ -3,8 +3,8 @@ error[E0308]: mismatched types | LL | / fn subscribe(&mut self, t : Box::Output> + 'a>) { LL | | // Not obvious, but there is an implicit lifetime here -------^ -LL | | //~^^ ERROR cannot infer -LL | | //~| ERROR mismatched types +LL | | +LL | | ... | LL | | self.sub = t; LL | | } @@ -17,8 +17,8 @@ note: the anonymous lifetime #2 defined on the method body at 28:5... | LL | / fn subscribe(&mut self, t : Box::Output> + 'a>) { LL | | // Not obvious, but there is an implicit lifetime here -------^ -LL | | //~^^ ERROR cannot infer -LL | | //~| ERROR mismatched types +LL | | +LL | | ... | LL | | self.sub = t; LL | | } @@ -34,8 +34,8 @@ error[E0308]: mismatched types | LL | / fn subscribe(&mut self, t : Box::Output> + 'a>) { LL | | // Not obvious, but there is an implicit lifetime here -------^ -LL | | //~^^ ERROR cannot infer -LL | | //~| ERROR mismatched types +LL | | +LL | | ... | LL | | self.sub = t; LL | | } @@ -53,8 +53,8 @@ note: ...does not necessarily outlive the anonymous lifetime #2 defined on the m | LL | / fn subscribe(&mut self, t : Box::Output> + 'a>) { LL | | // Not obvious, but there is an implicit lifetime here -------^ -LL | | //~^^ ERROR cannot infer -LL | | //~| ERROR mismatched types +LL | | +LL | | ... | LL | | self.sub = t; LL | | } @@ -65,8 +65,8 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` d | LL | / fn subscribe(&mut self, t : Box::Output> + 'a>) { LL | | // Not obvious, but there is an implicit lifetime here -------^ -LL | | //~^^ ERROR cannot infer -LL | | //~| ERROR mismatched types +LL | | +LL | | ... | LL | | self.sub = t; LL | | } @@ -77,8 +77,8 @@ note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on th | LL | / fn subscribe(&mut self, t : Box::Output> + 'a>) { LL | | // Not obvious, but there is an implicit lifetime here -------^ -LL | | //~^^ ERROR cannot infer -LL | | //~| ERROR mismatched types +LL | | +LL | | ... | LL | | self.sub = t; LL | | } diff --git a/src/test/ui/issues/issue-2151.stderr b/src/test/ui/issues/issue-2151.stderr index 23f3c58653e..a2bcc8a8cea 100644 --- a/src/test/ui/issues/issue-2151.stderr +++ b/src/test/ui/issues/issue-2151.stderr @@ -3,7 +3,7 @@ error[E0282]: type annotations needed | LL | let x = panic!(); | - consider giving `x` a type -LL | x.clone(); //~ ERROR type annotations needed +LL | x.clone(); | ^ cannot infer type | = note: type must be known at this point diff --git a/src/test/ui/issues/issue-21600.stderr b/src/test/ui/issues/issue-21600.stderr index ccb75f4cc00..a20838c6c9b 100644 --- a/src/test/ui/issues/issue-21600.stderr +++ b/src/test/ui/issues/issue-21600.stderr @@ -1,7 +1,7 @@ error[E0387]: cannot borrow data mutably in a captured outer variable in an `Fn` closure --> $DIR/issue-21600.rs:14:17 | -LL | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer +LL | call_it(|| x.gen_mut()); | ^^ | help: consider changing this to accept closures that implement `FnMut` @@ -10,21 +10,21 @@ help: consider changing this to accept closures that implement `FnMut` LL | call_it(|| { | _____________^ LL | | call_it(|| x.gen()); -LL | | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer -LL | | //~^ ERROR cannot borrow data mutably in a captured outer +LL | | call_it(|| x.gen_mut()); +LL | | LL | | }); | |_____^ error[E0387]: cannot borrow data mutably in a captured outer variable in an `Fn` closure --> $DIR/issue-21600.rs:14:20 | -LL | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer +LL | call_it(|| x.gen_mut()); | ^ | help: consider changing this closure to take self by mutable reference --> $DIR/issue-21600.rs:14:17 | -LL | call_it(|| x.gen_mut()); //~ ERROR cannot borrow data mutably in a captured outer +LL | call_it(|| x.gen_mut()); | ^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-21837.stderr b/src/test/ui/issues/issue-21837.stderr index 464a65fa695..3111d3a4741 100644 --- a/src/test/ui/issues/issue-21837.stderr +++ b/src/test/ui/issues/issue-21837.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `T: Bound` is not satisfied --> $DIR/issue-21837.rs:8:9 | -LL | impl Trait2 for Foo {} //~ ERROR the trait bound `T: Bound` is not satisfied +LL | impl Trait2 for Foo {} | ^^^^^^ the trait `Bound` is not implemented for `T` | = help: consider adding a `where T: Bound` bound diff --git a/src/test/ui/issues/issue-21974.stderr b/src/test/ui/issues/issue-21974.stderr index d5c48db4500..85e59d7bede 100644 --- a/src/test/ui/issues/issue-21974.stderr +++ b/src/test/ui/issues/issue-21974.stderr @@ -1,7 +1,7 @@ error[E0283]: type annotations required: cannot resolve `&'a T: Foo` --> $DIR/issue-21974.rs:10:1 | -LL | / fn foo<'a,'b,T>(x: &'a T, y: &'b T) //~ ERROR type annotations required +LL | / fn foo<'a,'b,T>(x: &'a T, y: &'b T) LL | | where &'a T : Foo, LL | | &'b T : Foo LL | | { diff --git a/src/test/ui/issues/issue-22289.stderr b/src/test/ui/issues/issue-22289.stderr index 5214ec1ad16..e9846b848f4 100644 --- a/src/test/ui/issues/issue-22289.stderr +++ b/src/test/ui/issues/issue-22289.stderr @@ -1,7 +1,7 @@ error[E0605]: non-primitive cast: `i32` as `&(dyn std::any::Any + 'static)` --> $DIR/issue-22289.rs:2:5 | -LL | 0 as &std::any::Any; //~ ERROR non-primitive cast +LL | 0 as &std::any::Any; | ^^^^^^^^^^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait diff --git a/src/test/ui/issues/issue-22560.stderr b/src/test/ui/issues/issue-22560.stderr index c6de479aac0..be4f3dda0cb 100644 --- a/src/test/ui/issues/issue-22560.stderr +++ b/src/test/ui/issues/issue-22560.stderr @@ -25,8 +25,8 @@ error[E0191]: the value of the associated type `Output` (from the trait `std::op | LL | type Test = Add + | _____________^ -LL | | //~^ ERROR E0393 -LL | | //~| ERROR E0191 +LL | | +LL | | LL | | Sub; | |_______________^ associated type `Output` must be specified diff --git a/src/test/ui/issues/issue-22599.stderr b/src/test/ui/issues/issue-22599.stderr index bc4949da6f7..12234293ac9 100644 --- a/src/test/ui/issues/issue-22599.stderr +++ b/src/test/ui/issues/issue-22599.stderr @@ -1,7 +1,7 @@ error: unused variable: `a` --> $DIR/issue-22599.rs:8:19 | -LL | v = match 0 { a => 0 }; //~ ERROR: unused variable: `a` +LL | v = match 0 { a => 0 }; | ^ help: consider prefixing with an underscore: `_a` | note: lint level defined here diff --git a/src/test/ui/issues/issue-22638.stderr b/src/test/ui/issues/issue-22638.stderr index ba7d5f07017..aff968f3618 100644 --- a/src/test/ui/issues/issue-22638.stderr +++ b/src/test/ui/issues/issue-22638.stderr @@ -2,7 +2,7 @@ error: reached the type-length limit while instantiating `D::matches::$CLOSURE` --> $DIR/issue-22638.rs:52:5 | LL | / pub fn matches(&self, f: &F) { -LL | | //~^ ERROR reached the type-length limit while instantiating `D::matches::<[closure +LL | | LL | | let &D(ref a) = self; LL | | a.matches(f) LL | | } diff --git a/src/test/ui/issues/issue-22644.stderr b/src/test/ui/issues/issue-22644.stderr index de97b2271b1..cbff5575ed2 100644 --- a/src/test/ui/issues/issue-22644.stderr +++ b/src/test/ui/issues/issue-22644.stderr @@ -1,7 +1,7 @@ error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:8:31 | -LL | println!("{}", a as usize < long_name); //~ ERROR `<` is interpreted as a start of generic +LL | println!("{}", a as usize < long_name); | ---------- ^ --------- interpreted as generic arguments | | | | | not interpreted as comparison @@ -19,7 +19,7 @@ LL | println!("{}{}", a as usize < long_name, long_name); error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:11:31 | -LL | println!("{}", a as usize < 4); //~ ERROR `<` is interpreted as a start of generic +LL | println!("{}", a as usize < 4); | ---------- ^ - interpreted as generic arguments | | | | | not interpreted as comparison @@ -37,7 +37,7 @@ LL | println!("{}{}", a: usize < long_name, long_name); error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:15:29 | -LL | println!("{}", a: usize < 4); //~ ERROR `<` is interpreted as a start of generic +LL | println!("{}", a: usize < 4); | -------- ^ - interpreted as generic arguments | | | | | not interpreted as comparison @@ -46,7 +46,7 @@ LL | println!("{}", a: usize < 4); //~ ERROR `<` is interpreted as a start o error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:20:20 | -LL | < //~ ERROR `<` is interpreted as a start of generic +LL | < | ^ not interpreted as comparison LL | 4); | - interpreted as generic arguments @@ -60,7 +60,7 @@ LL | usize) error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison --> $DIR/issue-22644.rs:29:20 | -LL | < //~ ERROR `<` is interpreted as a start of generic +LL | < | ^ not interpreted as comparison LL | 5); | - interpreted as generic arguments @@ -77,7 +77,7 @@ LL | error: `<` is interpreted as a start of generic arguments for `usize`, not a shift --> $DIR/issue-22644.rs:32:31 | -LL | println!("{}", a as usize << long_name); //~ ERROR `<` is interpreted as a start of generic +LL | println!("{}", a as usize << long_name); | ---------- ^^ --------- interpreted as generic arguments | | | | | not interpreted as shift @@ -86,7 +86,7 @@ LL | println!("{}", a as usize << long_name); //~ ERROR `<` is interpreted a error: expected type, found `4` --> $DIR/issue-22644.rs:34:28 | -LL | println!("{}", a: &mut 4); //~ ERROR expected type, found `4` +LL | println!("{}", a: &mut 4); | ^ expecting a type here because of type ascription error: aborting due to 9 previous errors diff --git a/src/test/ui/issues/issue-22684.stderr b/src/test/ui/issues/issue-22684.stderr index 6e2b2357a05..738123ec4d4 100644 --- a/src/test/ui/issues/issue-22684.stderr +++ b/src/test/ui/issues/issue-22684.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-22684.rs:17:17 | -LL | let _: () = foo::Foo.bar(); //~ ERROR mismatched types +LL | let _: () = foo::Foo.bar(); | ^^^^^^^^^^^^^^ expected (), found bool | = note: expected type `()` diff --git a/src/test/ui/issues/issue-2281-part1.stderr b/src/test/ui/issues/issue-2281-part1.stderr index faf31c7bd4a..c2391a7c091 100644 --- a/src/test/ui/issues/issue-2281-part1.stderr +++ b/src/test/ui/issues/issue-2281-part1.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `foobar` in this scope --> $DIR/issue-2281-part1.rs:1:28 | -LL | fn main() { println!("{}", foobar); } //~ ERROR cannot find value `foobar` in this scope +LL | fn main() { println!("{}", foobar); } | ^^^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/issues/issue-22886.stderr b/src/test/ui/issues/issue-22886.stderr index ff206e8113e..c4b39655924 100644 --- a/src/test/ui/issues/issue-22886.stderr +++ b/src/test/ui/issues/issue-22886.stderr @@ -1,7 +1,7 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates --> $DIR/issue-22886.rs:13:6 | -LL | impl<'a> Iterator for Newtype { //~ ERROR E0207 +LL | impl<'a> Iterator for Newtype { | ^^ unconstrained lifetime parameter error: aborting due to previous error diff --git a/src/test/ui/issues/issue-23041.stderr b/src/test/ui/issues/issue-23041.stderr index aa6ffdd2570..401086b2044 100644 --- a/src/test/ui/issues/issue-23041.stderr +++ b/src/test/ui/issues/issue-23041.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-23041.rs:6:22 | -LL | b.downcast_ref::_>(); //~ ERROR E0282 +LL | b.downcast_ref::_>(); | ^^^^^^^^ cannot infer type error: aborting due to previous error diff --git a/src/test/ui/issues/issue-23046.stderr b/src/test/ui/issues/issue-23046.stderr index 9b7599e1e35..aab90a9d440 100644 --- a/src/test/ui/issues/issue-23046.stderr +++ b/src/test/ui/issues/issue-23046.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-23046.rs:17:15 | -LL | let ex = |x| { //~ ERROR type annotations needed +LL | let ex = |x| { | ^ consider giving this closure parameter a type error: aborting due to previous error diff --git a/src/test/ui/issues/issue-23073.stderr b/src/test/ui/issues/issue-23073.stderr index e3ddd190d4f..3a10a1ab11a 100644 --- a/src/test/ui/issues/issue-23073.stderr +++ b/src/test/ui/issues/issue-23073.stderr @@ -1,7 +1,7 @@ error[E0223]: ambiguous associated type --> $DIR/issue-23073.rs:6:17 | -LL | type FooT = <::Foo>::T; //~ ERROR ambiguous associated type +LL | type FooT = <::Foo>::T; | ^^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<::Foo as Trait>::T` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-23080-2.stderr b/src/test/ui/issues/issue-23080-2.stderr index db9a6488851..38998469e42 100644 --- a/src/test/ui/issues/issue-23080-2.stderr +++ b/src/test/ui/issues/issue-23080-2.stderr @@ -2,7 +2,7 @@ error[E0380]: auto traits cannot have methods or associated items --> $DIR/issue-23080-2.rs:7:1 | LL | / unsafe auto trait Trait { -LL | | //~^ ERROR E0380 +LL | | LL | | type Output; LL | | } | |_^ diff --git a/src/test/ui/issues/issue-23080.stderr b/src/test/ui/issues/issue-23080.stderr index cace9a57507..ed843e793be 100644 --- a/src/test/ui/issues/issue-23080.stderr +++ b/src/test/ui/issues/issue-23080.stderr @@ -2,7 +2,7 @@ error[E0380]: auto traits cannot have methods or associated items --> $DIR/issue-23080.rs:5:1 | LL | / unsafe auto trait Trait { -LL | | //~^ ERROR E0380 +LL | | LL | | fn method(&self) { LL | | println!("Hello"); LL | | } diff --git a/src/test/ui/issues/issue-23189.stderr b/src/test/ui/issues/issue-23189.stderr index 82c6ed9c062..ed065212c56 100644 --- a/src/test/ui/issues/issue-23189.stderr +++ b/src/test/ui/issues/issue-23189.stderr @@ -1,7 +1,7 @@ error[E0574]: expected struct, variant or union type, found module `module` --> $DIR/issue-23189.rs:4:13 | -LL | let _ = module { x: 0 }; //~ERROR expected struct +LL | let _ = module { x: 0 }; | ^^^^^^ not a struct, variant or union type error: aborting due to previous error diff --git a/src/test/ui/issues/issue-2330.stderr b/src/test/ui/issues/issue-2330.stderr index 472ad199a63..877cf68b586 100644 --- a/src/test/ui/issues/issue-2330.stderr +++ b/src/test/ui/issues/issue-2330.stderr @@ -1,7 +1,7 @@ error[E0404]: expected trait, found enum `Chan` --> $DIR/issue-2330.rs:8:6 | -LL | impl Chan for isize { //~ ERROR expected trait, found enum `Chan` +LL | impl Chan for isize { | ^^^^ not a trait error: aborting due to previous error diff --git a/src/test/ui/issues/issue-23302-1.stderr b/src/test/ui/issues/issue-23302-1.stderr index ed422e10c98..5fa82f8b786 100644 --- a/src/test/ui/issues/issue-23302-1.stderr +++ b/src/test/ui/issues/issue-23302-1.stderr @@ -1,14 +1,14 @@ error[E0391]: cycle detected when processing `X::A::{{constant}}` --> $DIR/issue-23302-1.rs:4:9 | -LL | A = X::A as isize, //~ ERROR E0391 +LL | A = X::A as isize, | ^^^^^^^^^^^^^ | = note: ...which again requires processing `X::A::{{constant}}`, completing the cycle note: cycle used when const-evaluating `X::A::{{constant}}` --> $DIR/issue-23302-1.rs:4:9 | -LL | A = X::A as isize, //~ ERROR E0391 +LL | A = X::A as isize, | ^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-23302-2.stderr b/src/test/ui/issues/issue-23302-2.stderr index b6d44ceec9d..5b77baed73c 100644 --- a/src/test/ui/issues/issue-23302-2.stderr +++ b/src/test/ui/issues/issue-23302-2.stderr @@ -1,14 +1,14 @@ error[E0391]: cycle detected when processing `Y::A::{{constant}}` --> $DIR/issue-23302-2.rs:4:9 | -LL | A = Y::B as isize, //~ ERROR E0391 +LL | A = Y::B as isize, | ^^^^^^^^^^^^^ | = note: ...which again requires processing `Y::A::{{constant}}`, completing the cycle note: cycle used when const-evaluating `Y::A::{{constant}}` --> $DIR/issue-23302-2.rs:4:9 | -LL | A = Y::B as isize, //~ ERROR E0391 +LL | A = Y::B as isize, | ^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-23302-3.stderr b/src/test/ui/issues/issue-23302-3.stderr index b3ca736622a..a7d643987f7 100644 --- a/src/test/ui/issues/issue-23302-3.stderr +++ b/src/test/ui/issues/issue-23302-3.stderr @@ -1,13 +1,13 @@ error[E0391]: cycle detected when const checking if rvalue is promotable to static `A` --> $DIR/issue-23302-3.rs:1:1 | -LL | const A: i32 = B; //~ ERROR cycle detected +LL | const A: i32 = B; | ^^^^^^^^^^^^^^^^^ | note: ...which requires checking which parts of `A` are promotable to static... --> $DIR/issue-23302-3.rs:1:16 | -LL | const A: i32 = B; //~ ERROR cycle detected +LL | const A: i32 = B; | ^ note: ...which requires const checking if rvalue is promotable to static `B`... --> $DIR/issue-23302-3.rs:3:1 diff --git a/src/test/ui/issues/issue-24081.stderr b/src/test/ui/issues/issue-24081.stderr index 999ac0d5570..647048c7c20 100644 --- a/src/test/ui/issues/issue-24081.stderr +++ b/src/test/ui/issues/issue-24081.stderr @@ -4,7 +4,7 @@ error[E0255]: the name `Add` is defined multiple times LL | use std::ops::Add; | ------------- previous import of the trait `Add` here ... -LL | type Add = bool; //~ ERROR the name `Add` is defined multiple times +LL | type Add = bool; | ^^^^^^^^^^^^^^^^ `Add` redefined here | = note: `Add` must be defined only once in the type namespace of this module @@ -19,7 +19,7 @@ error[E0255]: the name `Sub` is defined multiple times LL | use std::ops::Sub; | ------------- previous import of the trait `Sub` here ... -LL | struct Sub { x: f32 } //~ ERROR the name `Sub` is defined multiple times +LL | struct Sub { x: f32 } | ^^^^^^^^^^ `Sub` redefined here | = note: `Sub` must be defined only once in the type namespace of this module @@ -34,7 +34,7 @@ error[E0255]: the name `Mul` is defined multiple times LL | use std::ops::Mul; | ------------- previous import of the trait `Mul` here ... -LL | enum Mul { A, B } //~ ERROR the name `Mul` is defined multiple times +LL | enum Mul { A, B } | ^^^^^^^^ `Mul` redefined here | = note: `Mul` must be defined only once in the type namespace of this module @@ -49,7 +49,7 @@ error[E0255]: the name `Div` is defined multiple times LL | use std::ops::Div; | ------------- previous import of the trait `Div` here ... -LL | mod Div { } //~ ERROR the name `Div` is defined multiple times +LL | mod Div { } | ^^^^^^^ `Div` redefined here | = note: `Div` must be defined only once in the type namespace of this module @@ -64,7 +64,7 @@ error[E0255]: the name `Rem` is defined multiple times LL | use std::ops::Rem; | ------------- previous import of the trait `Rem` here ... -LL | trait Rem { } //~ ERROR the name `Rem` is defined multiple times +LL | trait Rem { } | ^^^^^^^^^ `Rem` redefined here | = note: `Rem` must be defined only once in the type namespace of this module diff --git a/src/test/ui/issues/issue-24267-flow-exit.stderr b/src/test/ui/issues/issue-24267-flow-exit.stderr index 0d226e01809..2b9e2ee9011 100644 --- a/src/test/ui/issues/issue-24267-flow-exit.stderr +++ b/src/test/ui/issues/issue-24267-flow-exit.stderr @@ -1,13 +1,13 @@ error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/issue-24267-flow-exit.rs:12:20 | -LL | println!("{}", x); //~ ERROR use of possibly uninitialized variable: `x` +LL | println!("{}", x); | ^ use of possibly uninitialized `x` error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/issue-24267-flow-exit.rs:18:20 | -LL | println!("{}", x); //~ ERROR use of possibly uninitialized variable: `x` +LL | println!("{}", x); | ^ use of possibly uninitialized `x` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-24322.stderr b/src/test/ui/issues/issue-24322.stderr index b4285438751..def373cf2c0 100644 --- a/src/test/ui/issues/issue-24322.stderr +++ b/src/test/ui/issues/issue-24322.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-24322.rs:8:29 | -LL | let x: &fn(&B) -> u32 = &B::func; //~ ERROR mismatched types +LL | let x: &fn(&B) -> u32 = &B::func; | ^^^^^^^^ expected fn pointer, found fn item | = note: expected type `&for<'r> fn(&'r B) -> u32` diff --git a/src/test/ui/issues/issue-24352.stderr b/src/test/ui/issues/issue-24352.stderr index 835706d015b..a315ca8b08f 100644 --- a/src/test/ui/issues/issue-24352.stderr +++ b/src/test/ui/issues/issue-24352.stderr @@ -1,7 +1,7 @@ error[E0277]: cannot subtract `{integer}` from `f64` --> $DIR/issue-24352.rs:3:12 | -LL | 1.0f64 - 1 //~ ERROR E0277 +LL | 1.0f64 - 1 | ^ no implementation for `f64 - {integer}` | = help: the trait `std::ops::Sub<{integer}>` is not implemented for `f64` diff --git a/src/test/ui/issues/issue-24357.stderr b/src/test/ui/issues/issue-24357.stderr index 3bc84cba0f5..ced24ffc5ed 100644 --- a/src/test/ui/issues/issue-24357.stderr +++ b/src/test/ui/issues/issue-24357.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `x` | LL | let f = move || { let y = x; }; | ------- value moved (into closure) here -LL | //~^ NOTE value moved (into closure) here +LL | LL | let z = x; | ^ value used here after move | diff --git a/src/test/ui/issues/issue-24363.stderr b/src/test/ui/issues/issue-24363.stderr index ff02887a153..3399856d3f9 100644 --- a/src/test/ui/issues/issue-24363.stderr +++ b/src/test/ui/issues/issue-24363.stderr @@ -1,13 +1,13 @@ error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/issue-24363.rs:2:7 | -LL | 1.create_a_type_error[ //~ `{integer}` is a primitive type and therefore doesn't have fields +LL | 1.create_a_type_error[ | ^^^^^^^^^^^^^^^^^^^ error[E0369]: binary operation `+` cannot be applied to type `()` --> $DIR/issue-24363.rs:3:9 | -LL | ()+() //~ ERROR binary operation `+` cannot be applied +LL | ()+() | ^^^^^ | = note: an implementation of `std::ops::Add` might be missing for `()` diff --git a/src/test/ui/issues/issue-24365.stderr b/src/test/ui/issues/issue-24365.stderr index 7d02f117f9f..f9eead8a4f2 100644 --- a/src/test/ui/issues/issue-24365.stderr +++ b/src/test/ui/issues/issue-24365.stderr @@ -1,19 +1,19 @@ error[E0609]: no field `b` on type `Foo` --> $DIR/issue-24365.rs:10:22 | -LL | println!("{}", a.b); //~ no field `b` on type `Foo` +LL | println!("{}", a.b); | ^ error[E0609]: no field `attr_name_idx` on type `&Attribute` --> $DIR/issue-24365.rs:17:18 | -LL | let z = (&x).attr_name_idx; //~ no field `attr_name_idx` on type `&Attribute` +LL | let z = (&x).attr_name_idx; | ^^^^^^^^^^^^^ error[E0609]: no field `attr_name_idx` on type `Attribute` --> $DIR/issue-24365.rs:18:15 | -LL | let y = x.attr_name_idx; //~ no field `attr_name_idx` on type `Attribute` +LL | let y = x.attr_name_idx; | ^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-24682.stderr b/src/test/ui/issues/issue-24682.stderr index f6d03f6c18f..e1943bf4d68 100644 --- a/src/test/ui/issues/issue-24682.stderr +++ b/src/test/ui/issues/issue-24682.stderr @@ -1,20 +1,20 @@ error[E0229]: associated type bindings are not allowed here --> $DIR/issue-24682.rs:5:11 | -LL | / N= //~ ERROR associated type bindings are not allowed here +LL | / N= LL | | Self::N> { | |_________________^ associated type not allowed here error[E0229]: associated type bindings are not allowed here --> $DIR/issue-24682.rs:11:13 | -LL | //~ ERROR associated type bindings are not allowed here +LL | | ^^^^ associated type not allowed here error[E0229]: associated type bindings are not allowed here --> $DIR/issue-24682.rs:15:13 | -LL | u32 //~ ERROR associated type bindings are not allowed here +LL | u32 | ^^^^ associated type not allowed here error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-25076.stderr b/src/test/ui/issues/issue-25076.stderr index 8793475e6d4..435ab13edad 100644 --- a/src/test/ui/issues/issue-25076.stderr +++ b/src/test/ui/issues/issue-25076.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `(): InOut<_>` is not satisfied --> $DIR/issue-25076.rs:10:5 | -LL | do_fold(bot(), ()); //~ ERROR `(): InOut<_>` is not satisfied +LL | do_fold(bot(), ()); | ^^^^^^^ the trait `InOut<_>` is not implemented for `()` | note: required by `do_fold` diff --git a/src/test/ui/issues/issue-25368.stderr b/src/test/ui/issues/issue-25368.stderr index 2e6a02e7389..3ad6a2569be 100644 --- a/src/test/ui/issues/issue-25368.stderr +++ b/src/test/ui/issues/issue-25368.stderr @@ -4,7 +4,7 @@ error[E0282]: type annotations needed LL | let (tx, rx) = channel(); | -------- consider giving the pattern a type ... -LL | tx.send(Foo{ foo: PhantomData }); //~ ERROR E0282 +LL | tx.send(Foo{ foo: PhantomData }); | ^^^ cannot infer type for `T` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-25396.stderr b/src/test/ui/issues/issue-25396.stderr index aae62b688d4..38dc9ef1035 100644 --- a/src/test/ui/issues/issue-25396.stderr +++ b/src/test/ui/issues/issue-25396.stderr @@ -3,13 +3,13 @@ error[E0252]: the name `baz` is defined multiple times | LL | use foo::baz; | -------- previous import of the module `baz` here -LL | use bar::baz; //~ ERROR the name `baz` is defined multiple times +LL | use bar::baz; | ^^^^^^^^ `baz` reimported here | = note: `baz` must be defined only once in the type namespace of this module help: you can use `as` to change the binding name of the import | -LL | use bar::baz as other_baz; //~ ERROR the name `baz` is defined multiple times +LL | use bar::baz as other_baz; | ^^^^^^^^^^^^^^^^^^^^^ error[E0252]: the name `Quux` is defined multiple times @@ -17,13 +17,13 @@ error[E0252]: the name `Quux` is defined multiple times | LL | use foo::Quux; | --------- previous import of the trait `Quux` here -LL | use bar::Quux; //~ ERROR the name `Quux` is defined multiple times +LL | use bar::Quux; | ^^^^^^^^^ `Quux` reimported here | = note: `Quux` must be defined only once in the type namespace of this module help: you can use `as` to change the binding name of the import | -LL | use bar::Quux as OtherQuux; //~ ERROR the name `Quux` is defined multiple times +LL | use bar::Quux as OtherQuux; | ^^^^^^^^^^^^^^^^^^^^^^ error[E0252]: the name `blah` is defined multiple times @@ -31,13 +31,13 @@ error[E0252]: the name `blah` is defined multiple times | LL | use foo::blah; | --------- previous import of the type `blah` here -LL | use bar::blah; //~ ERROR the name `blah` is defined multiple times +LL | use bar::blah; | ^^^^^^^^^ `blah` reimported here | = note: `blah` must be defined only once in the type namespace of this module help: you can use `as` to change the binding name of the import | -LL | use bar::blah as other_blah; //~ ERROR the name `blah` is defined multiple times +LL | use bar::blah as other_blah; | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0252]: the name `WOMP` is defined multiple times @@ -45,13 +45,13 @@ error[E0252]: the name `WOMP` is defined multiple times | LL | use foo::WOMP; | --------- previous import of the value `WOMP` here -LL | use bar::WOMP; //~ ERROR the name `WOMP` is defined multiple times +LL | use bar::WOMP; | ^^^^^^^^^ `WOMP` reimported here | = note: `WOMP` must be defined only once in the value namespace of this module help: you can use `as` to change the binding name of the import | -LL | use bar::WOMP as OtherWOMP; //~ ERROR the name `WOMP` is defined multiple times +LL | use bar::WOMP as OtherWOMP; | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/issues/issue-25439.stderr b/src/test/ui/issues/issue-25439.stderr index 9e9ab4e39d3..9b041483132 100644 --- a/src/test/ui/issues/issue-25439.stderr +++ b/src/test/ui/issues/issue-25439.stderr @@ -1,7 +1,7 @@ error[E0644]: closure/generator type that references itself --> $DIR/issue-25439.rs:8:9 | -LL | fix(|_, x| x); //~ ERROR closure/generator type that references itself [E0644] +LL | fix(|_, x| x); | ^^^^^^^^ cyclic type of infinite size | = note: closures cannot capture themselves or take themselves as argument; diff --git a/src/test/ui/issues/issue-25700.stderr b/src/test/ui/issues/issue-25700.stderr index d4cf89d0abd..4a203c7c257 100644 --- a/src/test/ui/issues/issue-25700.stderr +++ b/src/test/ui/issues/issue-25700.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `t` | LL | drop(t); | - value moved here -LL | drop(t); //~ ERROR use of moved value +LL | drop(t); | ^ value used here after move | = note: move occurs because `t` has type `S<()>`, which does not implement the `Copy` trait diff --git a/src/test/ui/issues/issue-2590.stderr b/src/test/ui/issues/issue-2590.stderr index f93b5db3adf..c50652d3284 100644 --- a/src/test/ui/issues/issue-2590.stderr +++ b/src/test/ui/issues/issue-2590.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of borrowed content --> $DIR/issue-2590.rs:11:9 | -LL | self.tokens //~ ERROR cannot move out of borrowed content +LL | self.tokens | ^^^^ cannot move out of borrowed content error: aborting due to previous error diff --git a/src/test/ui/issues/issue-26158.stderr b/src/test/ui/issues/issue-26158.stderr index 868ffd191cb..3a4dd79e810 100644 --- a/src/test/ui/issues/issue-26158.stderr +++ b/src/test/ui/issues/issue-26158.stderr @@ -1,7 +1,7 @@ error[E0005]: refutable pattern in local binding: `&[]` not covered --> $DIR/issue-26158.rs:5:9 | -LL | let &[[ref _a, ref _b..]..] = x; //~ ERROR refutable pattern +LL | let &[[ref _a, ref _b..]..] = x; | ^^^^^^^^^^^^^^^^^^^^^^^ pattern `&[]` not covered error: aborting due to previous error diff --git a/src/test/ui/issues/issue-26472.stderr b/src/test/ui/issues/issue-26472.stderr index 8c261d2a3f3..245ebeaf972 100644 --- a/src/test/ui/issues/issue-26472.stderr +++ b/src/test/ui/issues/issue-26472.stderr @@ -1,7 +1,7 @@ error[E0616]: field `len` of struct `sub::S` is private --> $DIR/issue-26472.rs:11:13 | -LL | let v = s.len; //~ ERROR field `len` of struct `sub::S` is private +LL | let v = s.len; | ^^--- | | | help: a method `len` also exists, call it with parentheses: `len()` @@ -9,7 +9,7 @@ LL | let v = s.len; //~ ERROR field `len` of struct `sub::S` is private error[E0616]: field `len` of struct `sub::S` is private --> $DIR/issue-26472.rs:12:5 | -LL | s.len = v; //~ ERROR field `len` of struct `sub::S` is private +LL | s.len = v; | ^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-26548.stderr b/src/test/ui/issues/issue-26548.stderr index ff197eeeb0f..7c1789cc1e9 100644 --- a/src/test/ui/issues/issue-26548.stderr +++ b/src/test/ui/issues/issue-26548.stderr @@ -5,7 +5,7 @@ error[E0391]: cycle detected when computing layout of `std::option::Option` note: cycle used when processing `main` --> $DIR/issue-26548.rs:9:1 | -LL | fn main() { //~ NOTE cycle used when processing `main` +LL | fn main() { | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-26886.stderr b/src/test/ui/issues/issue-26886.stderr index 70dacb353fe..fa7f922707a 100644 --- a/src/test/ui/issues/issue-26886.stderr +++ b/src/test/ui/issues/issue-26886.stderr @@ -3,7 +3,7 @@ error[E0252]: the name `Arc` is defined multiple times | LL | use std::sync::{self, Arc}; | --- previous import of the type `Arc` here -LL | use std::sync::Arc; //~ ERROR the name `Arc` is defined multiple times +LL | use std::sync::Arc; | ----^^^^^^^^^^^^^^- | | | | | `Arc` reimported here @@ -17,7 +17,7 @@ error[E0252]: the name `sync` is defined multiple times LL | use std::sync::{self, Arc}; | ---- previous import of the module `sync` here ... -LL | use std::sync; //~ ERROR the name `sync` is defined multiple times +LL | use std::sync; | ----^^^^^^^^^- | | | | | `sync` reimported here diff --git a/src/test/ui/issues/issue-26905.stderr b/src/test/ui/issues/issue-26905.stderr index 93b4d7e36e8..10dbb732585 100644 --- a/src/test/ui/issues/issue-26905.stderr +++ b/src/test/ui/issues/issue-26905.stderr @@ -1,7 +1,7 @@ error[E0375]: implementing the trait `CoerceUnsized` requires multiple coercions --> $DIR/issue-26905.rs:16:40 | -LL | impl, U: ?Sized> CoerceUnsized> for MyRc{ } //~ERROR +LL | impl, U: ?Sized> CoerceUnsized> for MyRc{ } | ^^^^^^^^^^^^^^^^^^^^^^ requires multiple coercions | = note: `CoerceUnsized` may only be implemented for a coercion between structures with one field being coerced diff --git a/src/test/ui/issues/issue-27033.stderr b/src/test/ui/issues/issue-27033.stderr index b343924bb02..ab954332280 100644 --- a/src/test/ui/issues/issue-27033.stderr +++ b/src/test/ui/issues/issue-27033.stderr @@ -1,7 +1,7 @@ error[E0530]: match bindings cannot shadow unit variants --> $DIR/issue-27033.rs:3:9 | -LL | None @ _ => {} //~ ERROR match bindings cannot shadow unit variants +LL | None @ _ => {} | ^^^^ cannot be named the same as a unit variant error[E0530]: match bindings cannot shadow constants @@ -10,7 +10,7 @@ error[E0530]: match bindings cannot shadow constants LL | const C: u8 = 1; | ---------------- the constant `C` is defined here LL | match 1 { -LL | C @ 2 => { //~ ERROR match bindings cannot shadow constant +LL | C @ 2 => { | ^ cannot be named the same as a constant error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-27042.stderr b/src/test/ui/issues/issue-27042.stderr index bcefb29c18b..cce7d24a5f6 100644 --- a/src/test/ui/issues/issue-27042.stderr +++ b/src/test/ui/issues/issue-27042.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-27042.rs:6:16 | -LL | loop { break }; //~ ERROR mismatched types +LL | loop { break }; | ^^^^^ expected (), found i32 | = note: expected type `()` @@ -10,7 +10,7 @@ LL | loop { break }; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/issue-27042.rs:8:9 | -LL | / 'b: //~ ERROR mismatched types +LL | / 'b: LL | | while true { break }; // but here we cite the whole loop | |____________________________^ expected i32, found () | @@ -20,7 +20,7 @@ LL | | while true { break }; // but here we cite the whole loop error[E0308]: mismatched types --> $DIR/issue-27042.rs:11:9 | -LL | / 'c: //~ ERROR mismatched types +LL | / 'c: LL | | for _ in None { break }; // but here we cite the whole loop | |_______________________________^ expected i32, found () | @@ -30,7 +30,7 @@ LL | | for _ in None { break }; // but here we cite the whole loop error[E0308]: mismatched types --> $DIR/issue-27042.rs:14:9 | -LL | / 'd: //~ ERROR mismatched types +LL | / 'd: LL | | while let Some(_) = None { break }; | |__________________________________________^ expected i32, found () | diff --git a/src/test/ui/issues/issue-27060-2.stderr b/src/test/ui/issues/issue-27060-2.stderr index b95c298b6e6..f7227c34101 100644 --- a/src/test/ui/issues/issue-27060-2.stderr +++ b/src/test/ui/issues/issue-27060-2.stderr @@ -1,7 +1,7 @@ error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/issue-27060-2.rs:3:5 | -LL | data: T, //~ ERROR the size for values of type +LL | data: T, | ^^^^^^^ doesn't have a size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `T` diff --git a/src/test/ui/issues/issue-27060.stderr b/src/test/ui/issues/issue-27060.stderr index 023f90eb9fe..bc44c1a4ac5 100644 --- a/src/test/ui/issues/issue-27060.stderr +++ b/src/test/ui/issues/issue-27060.stderr @@ -1,7 +1,7 @@ error: borrow of packed field is unsafe and requires unsafe function or block (error E0133) --> $DIR/issue-27060.rs:26:13 | -LL | let _ = &good.data; //~ ERROR borrow of packed field is unsafe +LL | let _ = &good.data; | ^^^^^^^^^^ | note: lint level defined here @@ -16,7 +16,7 @@ LL | #[deny(safe_packed_borrows)] error: borrow of packed field is unsafe and requires unsafe function or block (error E0133) --> $DIR/issue-27060.rs:28:13 | -LL | let _ = &good.data2[0]; //~ ERROR borrow of packed field is unsafe +LL | let _ = &good.data2[0]; | ^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! diff --git a/src/test/ui/issues/issue-27340.stderr b/src/test/ui/issues/issue-27340.stderr index 634a31a89d5..05b213b293c 100644 --- a/src/test/ui/issues/issue-27340.stderr +++ b/src/test/ui/issues/issue-27340.stderr @@ -3,7 +3,7 @@ error[E0204]: the trait `Copy` may not be implemented for this type | LL | #[derive(Copy, Clone)] | ^^^^ -LL | //~^ ERROR the trait `Copy` may not be implemented for this type +LL | LL | struct Bar(Foo); | --- this field does not implement `Copy` diff --git a/src/test/ui/issues/issue-27815.stderr b/src/test/ui/issues/issue-27815.stderr index fbddd3be9dc..43f78ccf639 100644 --- a/src/test/ui/issues/issue-27815.stderr +++ b/src/test/ui/issues/issue-27815.stderr @@ -1,13 +1,13 @@ error[E0574]: expected struct, variant or union type, found module `A` --> $DIR/issue-27815.rs:4:13 | -LL | let u = A { x: 1 }; //~ ERROR expected struct, variant or union type, found module `A` +LL | let u = A { x: 1 }; | ^ not a struct, variant or union type error[E0574]: expected struct, variant or union type, found builtin type `u32` --> $DIR/issue-27815.rs:5:13 | -LL | let v = u32 { x: 1 }; //~ ERROR expected struct, variant or union type, found builtin type `u32` +LL | let v = u32 { x: 1 }; | ^^^ not a struct, variant or union type error[E0574]: expected struct, variant or union type, found module `A` diff --git a/src/test/ui/issues/issue-28105.stderr b/src/test/ui/issues/issue-28105.stderr index 900bc43bfc8..0e1b90e6520 100644 --- a/src/test/ui/issues/issue-28105.stderr +++ b/src/test/ui/issues/issue-28105.stderr @@ -1,13 +1,13 @@ error[E0268]: `continue` outside of loop --> $DIR/issue-28105.rs:4:5 | -LL | continue //~ ERROR `continue` outside of loop +LL | continue | ^^^^^^^^ cannot break outside of a loop error[E0268]: `break` outside of loop --> $DIR/issue-28105.rs:6:5 | -LL | break //~ ERROR `break` outside of loop +LL | break | ^^^^^ cannot break outside of a loop error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-28109.stderr b/src/test/ui/issues/issue-28109.stderr index 91a82972564..0f918d3b6f7 100644 --- a/src/test/ui/issues/issue-28109.stderr +++ b/src/test/ui/issues/issue-28109.stderr @@ -1,13 +1,13 @@ error[E0426]: use of undeclared label `'b` --> $DIR/issue-28109.rs:6:9 | -LL | 'b //~ ERROR use of undeclared label +LL | 'b | ^^ undeclared label `'b` error[E0426]: use of undeclared label `'c` --> $DIR/issue-28109.rs:9:9 | -LL | 'c //~ ERROR use of undeclared label +LL | 'c | ^^ undeclared label `'c` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-28134.stderr b/src/test/ui/issues/issue-28134.stderr index 5b967b31c29..b9189480048 100644 --- a/src/test/ui/issues/issue-28134.stderr +++ b/src/test/ui/issues/issue-28134.stderr @@ -1,7 +1,7 @@ error: only functions may be used as tests --> $DIR/issue-28134.rs:3:1 | -LL | #![test] //~ ERROR only functions may be used as tests +LL | #![test] | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-2823.stderr b/src/test/ui/issues/issue-2823.stderr index b51ff611dbd..4c1dfb8501a 100644 --- a/src/test/ui/issues/issue-2823.stderr +++ b/src/test/ui/issues/issue-2823.stderr @@ -4,7 +4,7 @@ error[E0599]: no method named `clone` found for type `C` in the current scope LL | struct C { | -------- method `clone` not found for this ... -LL | let _d = c.clone(); //~ ERROR no method named `clone` found +LL | let _d = c.clone(); | ^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope diff --git a/src/test/ui/issues/issue-28388-1.stderr b/src/test/ui/issues/issue-28388-1.stderr index 6aabf653512..7f5e47aa84f 100644 --- a/src/test/ui/issues/issue-28388-1.stderr +++ b/src/test/ui/issues/issue-28388-1.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `foo` --> $DIR/issue-28388-1.rs:3:5 | -LL | use foo::{}; //~ ERROR unresolved import `foo` +LL | use foo::{}; | ^^^^^^^ no `foo` in the root error: aborting due to previous error diff --git a/src/test/ui/issues/issue-28472.stderr b/src/test/ui/issues/issue-28472.stderr index 8288a1d9bb7..92b598252bf 100644 --- a/src/test/ui/issues/issue-28472.stderr +++ b/src/test/ui/issues/issue-28472.stderr @@ -4,7 +4,7 @@ error[E0428]: the name `foo` is defined multiple times LL | fn foo(); | --------- previous definition of the value `foo` here LL | -LL | / pub //~ ERROR the name `foo` is defined multiple times +LL | / pub LL | | fn foo(); | |___________^ `foo` redefined here | @@ -16,7 +16,7 @@ error[E0428]: the name `foo` is defined multiple times LL | fn foo(); | --------- previous definition of the value `foo` here ... -LL | / pub //~ ERROR the name `foo` is defined multiple times +LL | / pub LL | | static mut foo: u32; | |______________________^ `foo` redefined here | diff --git a/src/test/ui/issues/issue-2848.stderr b/src/test/ui/issues/issue-2848.stderr index d9466405dd2..71ed7d70b5b 100644 --- a/src/test/ui/issues/issue-2848.stderr +++ b/src/test/ui/issues/issue-2848.stderr @@ -1,7 +1,7 @@ error[E0408]: variable `beta` is not bound in all patterns --> $DIR/issue-2848.rs:14:7 | -LL | alpha | beta => {} //~ ERROR variable `beta` is not bound in all patterns +LL | alpha | beta => {} | ^^^^^ ---- variable not in all patterns | | | pattern doesn't bind `beta` diff --git a/src/test/ui/issues/issue-28576.stderr b/src/test/ui/issues/issue-28576.stderr index b04715f23f4..cf6174ba857 100644 --- a/src/test/ui/issues/issue-28576.stderr +++ b/src/test/ui/issues/issue-28576.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Bar` cannot be made into an object --> $DIR/issue-28576.rs:7:12 | -LL | / Bar //~ ERROR the trait `Bar` cannot be made into an object +LL | / Bar LL | | | |________________________^ the trait `Bar` cannot be made into an object | diff --git a/src/test/ui/issues/issue-28625.stderr b/src/test/ui/issues/issue-28625.stderr index 36cb47944f2..7ee0cd48670 100644 --- a/src/test/ui/issues/issue-28625.stderr +++ b/src/test/ui/issues/issue-28625.stderr @@ -1,7 +1,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> $DIR/issue-28625.rs:12:14 | -LL | unsafe { std::mem::transmute(a) } //~ ERROR cannot transmute between types of different sizes +LL | unsafe { std::mem::transmute(a) } | ^^^^^^^^^^^^^^^^^^^ | = note: source type: `&ArrayPeano` (N bits) diff --git a/src/test/ui/issues/issue-28837.stderr b/src/test/ui/issues/issue-28837.stderr index 833493e5cda..aeb25ce1286 100644 --- a/src/test/ui/issues/issue-28837.stderr +++ b/src/test/ui/issues/issue-28837.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `+` cannot be applied to type `A` --> $DIR/issue-28837.rs:6:5 | -LL | a + a; //~ ERROR binary operation `+` cannot be applied to type `A` +LL | a + a; | ^^^^^ | = note: an implementation of `std::ops::Add` might be missing for `A` @@ -9,7 +9,7 @@ LL | a + a; //~ ERROR binary operation `+` cannot be applied to type `A` error[E0369]: binary operation `-` cannot be applied to type `A` --> $DIR/issue-28837.rs:8:5 | -LL | a - a; //~ ERROR binary operation `-` cannot be applied to type `A` +LL | a - a; | ^^^^^ | = note: an implementation of `std::ops::Sub` might be missing for `A` @@ -17,7 +17,7 @@ LL | a - a; //~ ERROR binary operation `-` cannot be applied to type `A` error[E0369]: binary operation `*` cannot be applied to type `A` --> $DIR/issue-28837.rs:10:5 | -LL | a * a; //~ ERROR binary operation `*` cannot be applied to type `A` +LL | a * a; | ^^^^^ | = note: an implementation of `std::ops::Mul` might be missing for `A` @@ -25,7 +25,7 @@ LL | a * a; //~ ERROR binary operation `*` cannot be applied to type `A` error[E0369]: binary operation `/` cannot be applied to type `A` --> $DIR/issue-28837.rs:12:5 | -LL | a / a; //~ ERROR binary operation `/` cannot be applied to type `A` +LL | a / a; | ^^^^^ | = note: an implementation of `std::ops::Div` might be missing for `A` @@ -33,7 +33,7 @@ LL | a / a; //~ ERROR binary operation `/` cannot be applied to type `A` error[E0369]: binary operation `%` cannot be applied to type `A` --> $DIR/issue-28837.rs:14:5 | -LL | a % a; //~ ERROR binary operation `%` cannot be applied to type `A` +LL | a % a; | ^^^^^ | = note: an implementation of `std::ops::Rem` might be missing for `A` @@ -41,7 +41,7 @@ LL | a % a; //~ ERROR binary operation `%` cannot be applied to type `A` error[E0369]: binary operation `&` cannot be applied to type `A` --> $DIR/issue-28837.rs:16:5 | -LL | a & a; //~ ERROR binary operation `&` cannot be applied to type `A` +LL | a & a; | ^^^^^ | = note: an implementation of `std::ops::BitAnd` might be missing for `A` @@ -49,7 +49,7 @@ LL | a & a; //~ ERROR binary operation `&` cannot be applied to type `A` error[E0369]: binary operation `|` cannot be applied to type `A` --> $DIR/issue-28837.rs:18:5 | -LL | a | a; //~ ERROR binary operation `|` cannot be applied to type `A` +LL | a | a; | ^^^^^ | = note: an implementation of `std::ops::BitOr` might be missing for `A` @@ -57,7 +57,7 @@ LL | a | a; //~ ERROR binary operation `|` cannot be applied to type `A` error[E0369]: binary operation `<<` cannot be applied to type `A` --> $DIR/issue-28837.rs:20:5 | -LL | a << a; //~ ERROR binary operation `<<` cannot be applied to type `A` +LL | a << a; | ^^^^^^ | = note: an implementation of `std::ops::Shl` might be missing for `A` @@ -65,7 +65,7 @@ LL | a << a; //~ ERROR binary operation `<<` cannot be applied to type `A` error[E0369]: binary operation `>>` cannot be applied to type `A` --> $DIR/issue-28837.rs:22:5 | -LL | a >> a; //~ ERROR binary operation `>>` cannot be applied to type `A` +LL | a >> a; | ^^^^^^ | = note: an implementation of `std::ops::Shr` might be missing for `A` @@ -73,7 +73,7 @@ LL | a >> a; //~ ERROR binary operation `>>` cannot be applied to type `A` error[E0369]: binary operation `==` cannot be applied to type `A` --> $DIR/issue-28837.rs:24:5 | -LL | a == a; //~ ERROR binary operation `==` cannot be applied to type `A` +LL | a == a; | ^^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `A` @@ -81,7 +81,7 @@ LL | a == a; //~ ERROR binary operation `==` cannot be applied to type `A` error[E0369]: binary operation `!=` cannot be applied to type `A` --> $DIR/issue-28837.rs:26:5 | -LL | a != a; //~ ERROR binary operation `!=` cannot be applied to type `A` +LL | a != a; | ^^^^^^ | = note: an implementation of `std::cmp::PartialEq` might be missing for `A` @@ -89,7 +89,7 @@ LL | a != a; //~ ERROR binary operation `!=` cannot be applied to type `A` error[E0369]: binary operation `<` cannot be applied to type `A` --> $DIR/issue-28837.rs:28:5 | -LL | a < a; //~ ERROR binary operation `<` cannot be applied to type `A` +LL | a < a; | ^^^^^ | = note: an implementation of `std::cmp::PartialOrd` might be missing for `A` @@ -97,7 +97,7 @@ LL | a < a; //~ ERROR binary operation `<` cannot be applied to type `A` error[E0369]: binary operation `<=` cannot be applied to type `A` --> $DIR/issue-28837.rs:30:5 | -LL | a <= a; //~ ERROR binary operation `<=` cannot be applied to type `A` +LL | a <= a; | ^^^^^^ | = note: an implementation of `std::cmp::PartialOrd` might be missing for `A` @@ -105,7 +105,7 @@ LL | a <= a; //~ ERROR binary operation `<=` cannot be applied to type `A` error[E0369]: binary operation `>` cannot be applied to type `A` --> $DIR/issue-28837.rs:32:5 | -LL | a > a; //~ ERROR binary operation `>` cannot be applied to type `A` +LL | a > a; | ^^^^^ | = note: an implementation of `std::cmp::PartialOrd` might be missing for `A` @@ -113,7 +113,7 @@ LL | a > a; //~ ERROR binary operation `>` cannot be applied to type `A` error[E0369]: binary operation `>=` cannot be applied to type `A` --> $DIR/issue-28837.rs:34:5 | -LL | a >= a; //~ ERROR binary operation `>=` cannot be applied to type `A` +LL | a >= a; | ^^^^^^ | = note: an implementation of `std::cmp::PartialOrd` might be missing for `A` diff --git a/src/test/ui/issues/issue-28848.stderr b/src/test/ui/issues/issue-28848.stderr index d9cdccac9fc..5f0f202c0b2 100644 --- a/src/test/ui/issues/issue-28848.stderr +++ b/src/test/ui/issues/issue-28848.stderr @@ -1,7 +1,7 @@ error[E0478]: lifetime bound not satisfied --> $DIR/issue-28848.rs:10:5 | -LL | Foo::<'a, 'b>::xmute(u) //~ ERROR lifetime bound not satisfied +LL | Foo::<'a, 'b>::xmute(u) | ^^^^^^^^^^^^^^^^^^^^ | note: lifetime parameter instantiated with the lifetime 'b as defined on the function body at 9:16 diff --git a/src/test/ui/issues/issue-28992-empty.stderr b/src/test/ui/issues/issue-28992-empty.stderr index 1eb1c67d106..68be37252cb 100644 --- a/src/test/ui/issues/issue-28992-empty.stderr +++ b/src/test/ui/issues/issue-28992-empty.stderr @@ -1,7 +1,7 @@ error[E0532]: expected tuple struct/variant, found constant `C1` --> $DIR/issue-28992-empty.rs:13:12 | -LL | if let C1(..) = 0 {} //~ ERROR expected tuple struct/variant, found constant `C1` +LL | if let C1(..) = 0 {} | ^^ not a tuple struct/variant error[E0164]: expected tuple struct/variant, found associated constant `::C2` diff --git a/src/test/ui/issues/issue-29147.stderr b/src/test/ui/issues/issue-29147.stderr index c6d850925ec..3b42186b251 100644 --- a/src/test/ui/issues/issue-29147.stderr +++ b/src/test/ui/issues/issue-29147.stderr @@ -1,7 +1,7 @@ error[E0283]: type annotations required: cannot resolve `S5<_>: Foo` --> $DIR/issue-29147.rs:21:13 | -LL | let _ = >::xxx; //~ ERROR cannot resolve `S5<_>: Foo` +LL | let _ = >::xxx; | ^^^^^^^^^^^^ | note: required by `Foo::xxx` diff --git a/src/test/ui/issues/issue-29161.stderr b/src/test/ui/issues/issue-29161.stderr index e0215157b36..50c257ad6f1 100644 --- a/src/test/ui/issues/issue-29161.stderr +++ b/src/test/ui/issues/issue-29161.stderr @@ -1,7 +1,7 @@ error[E0449]: unnecessary visibility qualifier --> $DIR/issue-29161.rs:5:9 | -LL | pub fn default() -> A { //~ ERROR unnecessary visibility qualifier +LL | pub fn default() -> A { | ^^^ `pub` not permitted here because it's implied error[E0603]: struct `A` is private diff --git a/src/test/ui/issues/issue-29181.stderr b/src/test/ui/issues/issue-29181.stderr index b277753608a..09201428154 100644 --- a/src/test/ui/issues/issue-29181.stderr +++ b/src/test/ui/issues/issue-29181.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `homura` found for type `{integer}` in the current scope --> $DIR/issue-29181.rs:6:7 | -LL | 0.homura(); //~ ERROR no method named `homura` found +LL | 0.homura(); | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-29184.stderr b/src/test/ui/issues/issue-29184.stderr index 6c1eeb9c0dc..87d3632ee42 100644 --- a/src/test/ui/issues/issue-29184.stderr +++ b/src/test/ui/issues/issue-29184.stderr @@ -1,7 +1,7 @@ error[E0516]: `typeof` is a reserved keyword but unimplemented --> $DIR/issue-29184.rs:2:12 | -LL | let x: typeof(92) = 92; //~ ERROR `typeof` is a reserved keyword +LL | let x: typeof(92) = 92; | ^^^^^^^^^^ reserved keyword error: aborting due to previous error diff --git a/src/test/ui/issues/issue-2937.stderr b/src/test/ui/issues/issue-2937.stderr index e63ee42d99c..428634828f9 100644 --- a/src/test/ui/issues/issue-2937.stderr +++ b/src/test/ui/issues/issue-2937.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `m::f` --> $DIR/issue-2937.rs:1:5 | -LL | use m::f as x; //~ ERROR unresolved import `m::f` [E0432] +LL | use m::f as x; | ^^^^^^^^^ no `f` in `m` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-2995.stderr b/src/test/ui/issues/issue-2995.stderr index 68cb283e453..c316780d5f6 100644 --- a/src/test/ui/issues/issue-2995.stderr +++ b/src/test/ui/issues/issue-2995.stderr @@ -1,7 +1,7 @@ error[E0605]: non-primitive cast: `*const isize` as `&isize` --> $DIR/issue-2995.rs:2:22 | -LL | let _q: &isize = p as &isize; //~ ERROR non-primitive cast +LL | let _q: &isize = p as &isize; | ^^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait diff --git a/src/test/ui/issues/issue-30007.stderr b/src/test/ui/issues/issue-30007.stderr index fb069e8ff98..87e770e1543 100644 --- a/src/test/ui/issues/issue-30007.stderr +++ b/src/test/ui/issues/issue-30007.stderr @@ -1,7 +1,7 @@ error: macro expansion ignores token `;` and any following --> $DIR/issue-30007.rs:2:20 | -LL | () => ( String ; ); //~ ERROR macro expansion ignores token `;` +LL | () => ( String ; ); | ^ ... LL | let i: Vec; diff --git a/src/test/ui/issues/issue-30079.stderr b/src/test/ui/issues/issue-30079.stderr index b62482add30..57ca5721544 100644 --- a/src/test/ui/issues/issue-30079.stderr +++ b/src/test/ui/issues/issue-30079.stderr @@ -1,7 +1,7 @@ warning: private type `m1::Priv` in public interface (error E0446) --> $DIR/issue-30079.rs:6:9 | -LL | pub fn f(_: Priv) {} //~ WARN private type `m1::Priv` in public interface +LL | pub fn f(_: Priv) {} | ^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(private_in_public)] on by default @@ -14,7 +14,7 @@ error[E0446]: private type `m2::Priv` in public interface LL | struct Priv; | - `m2::Priv` declared as private LL | impl ::std::ops::Deref for ::SemiPriv { -LL | type Target = Priv; //~ ERROR private type `m2::Priv` in public interface +LL | type Target = Priv; | ^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `m3::Priv` in public interface @@ -23,7 +23,7 @@ error[E0446]: private type `m3::Priv` in public interface LL | struct Priv; | - `m3::Priv` declared as private LL | impl ::SemiPrivTrait for () { -LL | type Assoc = Priv; //~ ERROR private type `m3::Priv` in public interface +LL | type Assoc = Priv; | ^^^^^^^^^^^^^^^^^^ can't leak private type error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-3021-b.stderr b/src/test/ui/issues/issue-3021-b.stderr index 375da43c197..72289c5f9c3 100644 --- a/src/test/ui/issues/issue-3021-b.stderr +++ b/src/test/ui/issues/issue-3021-b.stderr @@ -1,7 +1,7 @@ error[E0434]: can't capture dynamic environment in a fn item --> $DIR/issue-3021-b.rs:9:22 | -LL | self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment +LL | self.v0 = k0 ^ 0x736f6d6570736575; | ^^ | = help: use the `|| { ... }` closure form instead diff --git a/src/test/ui/issues/issue-3021-c.stderr b/src/test/ui/issues/issue-3021-c.stderr index 5eadf7837c7..cef30acd602 100644 --- a/src/test/ui/issues/issue-3021-c.stderr +++ b/src/test/ui/issues/issue-3021-c.stderr @@ -4,7 +4,7 @@ error[E0401]: can't use generic parameters from outer function LL | fn siphash() { | - type variable from outer function ... -LL | fn g(&self, x: T) -> T; //~ ERROR can't use generic parameters from outer function +LL | fn g(&self, x: T) -> T; | - ^ use of generic parameter from outer function | | | help: try using a local generic parameter instead: `g` @@ -15,7 +15,7 @@ error[E0401]: can't use generic parameters from outer function LL | fn siphash() { | - type variable from outer function ... -LL | fn g(&self, x: T) -> T; //~ ERROR can't use generic parameters from outer function +LL | fn g(&self, x: T) -> T; | - ^ use of generic parameter from outer function | | | help: try using a local generic parameter instead: `g` diff --git a/src/test/ui/issues/issue-3021-d.stderr b/src/test/ui/issues/issue-3021-d.stderr index ffefab19725..39e6e8c43e9 100644 --- a/src/test/ui/issues/issue-3021-d.stderr +++ b/src/test/ui/issues/issue-3021-d.stderr @@ -1,7 +1,7 @@ error[E0434]: can't capture dynamic environment in a fn item --> $DIR/issue-3021-d.rs:21:23 | -LL | self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment +LL | self.v0 = k0 ^ 0x736f6d6570736575; | ^^ | = help: use the `|| { ... }` closure form instead @@ -9,7 +9,7 @@ LL | self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dyna error[E0434]: can't capture dynamic environment in a fn item --> $DIR/issue-3021-d.rs:22:23 | -LL | self.v1 = k1 ^ 0x646f72616e646f6d; //~ ERROR can't capture dynamic environment +LL | self.v1 = k1 ^ 0x646f72616e646f6d; | ^^ | = help: use the `|| { ... }` closure form instead diff --git a/src/test/ui/issues/issue-3021.stderr b/src/test/ui/issues/issue-3021.stderr index 38c5bd2b94a..d5b015eec35 100644 --- a/src/test/ui/issues/issue-3021.stderr +++ b/src/test/ui/issues/issue-3021.stderr @@ -1,7 +1,7 @@ error[E0434]: can't capture dynamic environment in a fn item --> $DIR/issue-3021.rs:12:22 | -LL | self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment +LL | self.v0 = k0 ^ 0x736f6d6570736575; | ^^ | = help: use the `|| { ... }` closure form instead diff --git a/src/test/ui/issues/issue-30236.stderr b/src/test/ui/issues/issue-30236.stderr index e60babd9559..64cbd58d695 100644 --- a/src/test/ui/issues/issue-30236.stderr +++ b/src/test/ui/issues/issue-30236.stderr @@ -1,7 +1,7 @@ error[E0091]: type parameter `Unused` is unused --> $DIR/issue-30236.rs:2:5 | -LL | Unused //~ ERROR type parameter `Unused` is unused +LL | Unused | ^^^^^^ unused type parameter error: aborting due to previous error diff --git a/src/test/ui/issues/issue-30240-b.stderr b/src/test/ui/issues/issue-30240-b.stderr index 5613a18f404..e0dd4794db5 100644 --- a/src/test/ui/issues/issue-30240-b.stderr +++ b/src/test/ui/issues/issue-30240-b.stderr @@ -1,7 +1,7 @@ error: unreachable pattern --> $DIR/issue-30240-b.rs:12:9 | -LL | "hello" => {} //~ ERROR unreachable pattern +LL | "hello" => {} | ^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/issues/issue-30240.stderr b/src/test/ui/issues/issue-30240.stderr index bc538abf3bd..8b683b4af65 100644 --- a/src/test/ui/issues/issue-30240.stderr +++ b/src/test/ui/issues/issue-30240.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `&_` not covered --> $DIR/issue-30240.rs:2:11 | -LL | match "world" { //~ ERROR non-exhaustive patterns: `&_` +LL | match "world" { | ^^^^^^^ pattern `&_` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -9,7 +9,7 @@ LL | match "world" { //~ ERROR non-exhaustive patterns: `&_` error[E0004]: non-exhaustive patterns: `&_` not covered --> $DIR/issue-30240.rs:6:11 | -LL | match "world" { //~ ERROR non-exhaustive patterns: `&_` +LL | match "world" { | ^^^^^^^ pattern `&_` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/issues/issue-30302.stderr b/src/test/ui/issues/issue-30302.stderr index 193a8c4916c..d762d6f2b3d 100644 --- a/src/test/ui/issues/issue-30302.stderr +++ b/src/test/ui/issues/issue-30302.stderr @@ -9,7 +9,7 @@ error: unreachable pattern | LL | Nil => true, | --- matches any value -LL | //~^ WARN pattern binding `Nil` is named the same as one of the variants of the type `Stack` +LL | LL | _ => false | ^ unreachable pattern | diff --git a/src/test/ui/issues/issue-3038.stderr b/src/test/ui/issues/issue-3038.stderr index 8638c196524..210da2ceff9 100644 --- a/src/test/ui/issues/issue-3038.stderr +++ b/src/test/ui/issues/issue-3038.stderr @@ -13,7 +13,7 @@ LL | H::I(J::L(x, _), K::M(_, x)) error[E0416]: identifier `x` is bound more than once in the same pattern --> $DIR/issue-3038.rs:23:13 | -LL | (x, x) => { x } //~ ERROR identifier `x` is bound more than once in the same pattern +LL | (x, x) => { x } | ^ used in a pattern more than once error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-30438-a.stderr b/src/test/ui/issues/issue-30438-a.stderr index 94aca7f0319..89f8e623dc4 100644 --- a/src/test/ui/issues/issue-30438-a.stderr +++ b/src/test/ui/issues/issue-30438-a.stderr @@ -11,7 +11,7 @@ note: borrowed value must be valid for the anonymous lifetime #1 defined on the | LL | / fn index(&self, _: usize) -> &Self::Output { LL | | return &Test { s: &self.s}; -LL | | //~^ ERROR: borrowed value does not live long enough +LL | | LL | | } | |_____^ = note: consider using a `let` binding to increase its lifetime diff --git a/src/test/ui/issues/issue-30438-b.stderr b/src/test/ui/issues/issue-30438-b.stderr index b99801dad81..49208ed696a 100644 --- a/src/test/ui/issues/issue-30438-b.stderr +++ b/src/test/ui/issues/issue-30438-b.stderr @@ -3,7 +3,7 @@ error[E0597]: borrowed value does not live long enough | LL | &Test { s: &self.s} | ^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -LL | //~^ ERROR: borrowed value does not live long enough +LL | LL | } | - temporary value only lives until here | @@ -12,7 +12,7 @@ note: borrowed value must be valid for the anonymous lifetime #1 defined on the | LL | / fn index(&self, _: usize) -> &Self::Output { LL | | &Test { s: &self.s} -LL | | //~^ ERROR: borrowed value does not live long enough +LL | | LL | | } | |_____^ diff --git a/src/test/ui/issues/issue-30438-c.stderr b/src/test/ui/issues/issue-30438-c.stderr index 71c2ed9dfc9..a003e27f055 100644 --- a/src/test/ui/issues/issue-30438-c.stderr +++ b/src/test/ui/issues/issue-30438-c.stderr @@ -3,7 +3,7 @@ error[E0597]: `x` does not live long enough | LL | &x | ^ borrowed value does not live long enough -LL | //~^ ERROR: `x` does not live long enough +LL | LL | } | - borrowed value only lives until here | diff --git a/src/test/ui/issues/issue-30535.stderr b/src/test/ui/issues/issue-30535.stderr index b93ed8d9c2a..e3692934b62 100644 --- a/src/test/ui/issues/issue-30535.stderr +++ b/src/test/ui/issues/issue-30535.stderr @@ -1,7 +1,7 @@ error[E0573]: expected type, found variant `foo::Foo::FooV` --> $DIR/issue-30535.rs:6:8 | -LL | _: foo::Foo::FooV //~ ERROR expected type, found variant `foo::Foo::FooV` +LL | _: foo::Foo::FooV | ^^^^^^^^^^^^^^ | | | not a type diff --git a/src/test/ui/issues/issue-30560.stderr b/src/test/ui/issues/issue-30560.stderr index 27fa9e16bf2..5225f190f9e 100644 --- a/src/test/ui/issues/issue-30560.stderr +++ b/src/test/ui/issues/issue-30560.stderr @@ -1,7 +1,7 @@ error: items in traits are not importable. --> $DIR/issue-30560.rs:10:5 | -LL | use T::*; //~ ERROR items in traits are not importable +LL | use T::*; | ^^^^ error[E0432]: unresolved import `Alias` diff --git a/src/test/ui/issues/issue-30589.stderr b/src/test/ui/issues/issue-30589.stderr index 17ba4051fb4..4b88547a1af 100644 --- a/src/test/ui/issues/issue-30589.stderr +++ b/src/test/ui/issues/issue-30589.stderr @@ -1,7 +1,7 @@ error[E0412]: cannot find type `DecoderError` in this scope --> $DIR/issue-30589.rs:3:23 | -LL | impl fmt::Display for DecoderError { //~ ERROR cannot find type `DecoderError` in this scope +LL | impl fmt::Display for DecoderError { | ^^^^^^^^^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/issues/issue-3080.stderr b/src/test/ui/issues/issue-3080.stderr index 44f16c708e0..138d6df679f 100644 --- a/src/test/ui/issues/issue-3080.stderr +++ b/src/test/ui/issues/issue-3080.stderr @@ -1,7 +1,7 @@ error[E0133]: call to unsafe function is unsafe and requires unsafe function or block --> $DIR/issue-3080.rs:7:5 | -LL | X(()).with(); //~ ERROR requires unsafe function or block +LL | X(()).with(); | ^^^^^^^^^^^^ call to unsafe function | = note: consult the function's documentation for information on how to avoid undefined behavior diff --git a/src/test/ui/issues/issue-3096-1.stderr b/src/test/ui/issues/issue-3096-1.stderr index fee58474031..c5a7fa7e0eb 100644 --- a/src/test/ui/issues/issue-3096-1.stderr +++ b/src/test/ui/issues/issue-3096-1.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: type `()` is non-empty --> $DIR/issue-3096-1.rs:2:11 | -LL | match () { } //~ ERROR non-exhaustive +LL | match () { } | ^^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/issues/issue-3096-2.stderr b/src/test/ui/issues/issue-3096-2.stderr index 93119d37744..6f2e0e760d7 100644 --- a/src/test/ui/issues/issue-3096-2.stderr +++ b/src/test/ui/issues/issue-3096-2.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: type `*const Bottom` is non-empty --> $DIR/issue-3096-2.rs:5:11 | -LL | match x { } //~ ERROR non-exhaustive patterns +LL | match x { } | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/issues/issue-3099-a.stderr b/src/test/ui/issues/issue-3099-a.stderr index d3da944cb53..d6e0a799921 100644 --- a/src/test/ui/issues/issue-3099-a.stderr +++ b/src/test/ui/issues/issue-3099-a.stderr @@ -4,7 +4,7 @@ error[E0428]: the name `A` is defined multiple times LL | enum A { B, C } | ------ previous definition of the type `A` here LL | -LL | enum A { D, E } //~ ERROR the name `A` is defined multiple times +LL | enum A { D, E } | ^^^^^^ `A` redefined here | = note: `A` must be defined only once in the type namespace of this module diff --git a/src/test/ui/issues/issue-3099-b.stderr b/src/test/ui/issues/issue-3099-b.stderr index cc49325805e..3ba8b189da6 100644 --- a/src/test/ui/issues/issue-3099-b.stderr +++ b/src/test/ui/issues/issue-3099-b.stderr @@ -4,7 +4,7 @@ error[E0428]: the name `a` is defined multiple times LL | pub mod a {} | --------- previous definition of the module `a` here LL | -LL | pub mod a {} //~ ERROR the name `a` is defined multiple times +LL | pub mod a {} | ^^^^^^^^^ `a` redefined here | = note: `a` must be defined only once in the type namespace of this module diff --git a/src/test/ui/issues/issue-3099.stderr b/src/test/ui/issues/issue-3099.stderr index a650d3caa64..32ee2e1d207 100644 --- a/src/test/ui/issues/issue-3099.stderr +++ b/src/test/ui/issues/issue-3099.stderr @@ -4,7 +4,7 @@ error[E0428]: the name `a` is defined multiple times LL | fn a(x: String) -> String { | ------------------------- previous definition of the value `a` here ... -LL | fn a(x: String, y: String) -> String { //~ ERROR the name `a` is defined multiple times +LL | fn a(x: String, y: String) -> String { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `a` redefined here | = note: `a` must be defined only once in the value namespace of this module diff --git a/src/test/ui/issues/issue-31173.stderr b/src/test/ui/issues/issue-31173.stderr index 76f245a22cf..d5f8cc8f839 100644 --- a/src/test/ui/issues/issue-31173.stderr +++ b/src/test/ui/issues/issue-31173.stderr @@ -10,7 +10,7 @@ LL | .cloned() error[E0599]: no method named `collect` found for type `std::iter::Cloned, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>` in the current scope --> $DIR/issue-31173.rs:14:10 | -LL | .collect(); //~ ERROR no method named `collect` +LL | .collect(); | ^^^^^^^ | = note: the method `collect` exists but the following trait bounds were not satisfied: diff --git a/src/test/ui/issues/issue-31212.stderr b/src/test/ui/issues/issue-31212.stderr index 09300ffc787..5daf900c31f 100644 --- a/src/test/ui/issues/issue-31212.stderr +++ b/src/test/ui/issues/issue-31212.stderr @@ -1,13 +1,13 @@ error[E0432]: unresolved import `self::*` --> $DIR/issue-31212.rs:5:13 | -LL | pub use self::*; //~ ERROR unresolved +LL | pub use self::*; | ^^^^^^^ cannot glob-import a module into itself error[E0425]: cannot find function `f` in module `foo` --> $DIR/issue-31212.rs:9:10 | -LL | foo::f(); //~ ERROR cannot find function `f` in module `foo` +LL | foo::f(); | ^ not found in `foo` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-3154.stderr b/src/test/ui/issues/issue-3154.stderr index 6f3b37a8a3f..da2af83ff03 100644 --- a/src/test/ui/issues/issue-3154.stderr +++ b/src/test/ui/issues/issue-3154.stderr @@ -3,7 +3,7 @@ error[E0621]: explicit lifetime required in the type of `x` | LL | fn thing<'a,Q>(x: &Q) -> Thing<'a,Q> { | -- help: add explicit lifetime `'a` to the type of `x`: `&'a Q` -LL | Thing { x: x } //~ ERROR explicit lifetime required in the type of `x` [E0621] +LL | Thing { x: x } | ^^^^^^^^^^^^^^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/issues/issue-31769.stderr b/src/test/ui/issues/issue-31769.stderr index 7e5e5673baf..29fcefc0803 100644 --- a/src/test/ui/issues/issue-31769.stderr +++ b/src/test/ui/issues/issue-31769.stderr @@ -1,13 +1,13 @@ error[E0518]: attribute should be applied to function or closure --> $DIR/issue-31769.rs:2:5 | -LL | #[inline] struct Foo; //~ ERROR attribute should be applied to function or closure +LL | #[inline] struct Foo; | ^^^^^^^^^ ----------- not a function or closure error[E0517]: attribute should be applied to struct, enum or union --> $DIR/issue-31769.rs:3:12 | -LL | #[repr(C)] fn foo() {} //~ ERROR attribute should be applied to struct, enum or union +LL | #[repr(C)] fn foo() {} | ^ ----------- not a struct, enum or union error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-31804.stderr b/src/test/ui/issues/issue-31804.stderr index 67e2f2bf2ec..76e68b0b352 100644 --- a/src/test/ui/issues/issue-31804.stderr +++ b/src/test/ui/issues/issue-31804.stderr @@ -1,7 +1,7 @@ error: expected pattern, found `}` --> $DIR/issue-31804.rs:6:1 | -LL | } //~ ERROR expected pattern, found `}` +LL | } | ^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/issues/issue-31845.stderr b/src/test/ui/issues/issue-31845.stderr index 7ee1a41a387..10cb398cb24 100644 --- a/src/test/ui/issues/issue-31845.stderr +++ b/src/test/ui/issues/issue-31845.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find function `g` in this scope --> $DIR/issue-31845.rs:7:12 | -LL | g(); //~ ERROR cannot find function `g` in this scope +LL | g(); | ^ help: a function with a similar name exists: `h` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-32086.stderr b/src/test/ui/issues/issue-32086.stderr index bb2cc7c101b..b5a120c4b9c 100644 --- a/src/test/ui/issues/issue-32086.stderr +++ b/src/test/ui/issues/issue-32086.stderr @@ -1,13 +1,13 @@ error[E0532]: expected tuple struct/variant, found constant `C` --> $DIR/issue-32086.rs:5:9 | -LL | let C(a) = S(11); //~ ERROR expected tuple struct/variant, found constant `C` +LL | let C(a) = S(11); | ^ help: a tuple struct with a similar name exists: `S` error[E0532]: expected tuple struct/variant, found constant `C` --> $DIR/issue-32086.rs:6:9 | -LL | let C(..) = S(11); //~ ERROR expected tuple struct/variant, found constant `C` +LL | let C(..) = S(11); | ^ help: a tuple struct with a similar name exists: `S` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-3214.stderr b/src/test/ui/issues/issue-3214.stderr index e6526bad3e0..9c2585688e9 100644 --- a/src/test/ui/issues/issue-3214.stderr +++ b/src/test/ui/issues/issue-3214.stderr @@ -6,7 +6,7 @@ LL | fn foo() { | | | try adding a local generic parameter in this method instead LL | struct Foo { -LL | x: T, //~ ERROR can't use generic parameters from outer function +LL | x: T, | ^ use of generic parameter from outer function error[E0107]: wrong number of type arguments: expected 0, found 1 diff --git a/src/test/ui/issues/issue-32326.stderr b/src/test/ui/issues/issue-32326.stderr index 0f56e94bd19..5967627e51a 100644 --- a/src/test/ui/issues/issue-32326.stderr +++ b/src/test/ui/issues/issue-32326.stderr @@ -1,7 +1,7 @@ error[E0072]: recursive type `Expr` has infinite size --> $DIR/issue-32326.rs:5:1 | -LL | enum Expr { //~ ERROR E0072 +LL | enum Expr { | ^^^^^^^^^ recursive type has infinite size LL | Plus(Expr, Expr), | ---- ---- recursive without indirection diff --git a/src/test/ui/issues/issue-32354-suggest-import-rename.stderr b/src/test/ui/issues/issue-32354-suggest-import-rename.stderr index 9e115143fbd..96684309a00 100644 --- a/src/test/ui/issues/issue-32354-suggest-import-rename.stderr +++ b/src/test/ui/issues/issue-32354-suggest-import-rename.stderr @@ -3,13 +3,13 @@ error[E0252]: the name `ConstructorExtension` is defined multiple times | LL | use extension1::ConstructorExtension; | -------------------------------- previous import of the trait `ConstructorExtension` here -LL | use extension2::ConstructorExtension; //~ ERROR is defined multiple times +LL | use extension2::ConstructorExtension; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ConstructorExtension` reimported here | = note: `ConstructorExtension` must be defined only once in the type namespace of this module help: you can use `as` to change the binding name of the import | -LL | use extension2::ConstructorExtension as OtherConstructorExtension; //~ ERROR is defined multiple times +LL | use extension2::ConstructorExtension as OtherConstructorExtension; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-32655.stderr b/src/test/ui/issues/issue-32655.stderr index ae0cf49a791..7b3c8e75beb 100644 --- a/src/test/ui/issues/issue-32655.stderr +++ b/src/test/ui/issues/issue-32655.stderr @@ -1,7 +1,7 @@ error[E0658]: The attribute `derive_Clone` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/issue-32655.rs:6:11 | -LL | #[derive_Clone] //~ ERROR attribute `derive_Clone` is currently unknown +LL | #[derive_Clone] | ^^^^^^^^^^^^ ... LL | foo!(); @@ -12,7 +12,7 @@ LL | foo!(); error[E0658]: The attribute `derive_Clone` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/issue-32655.rs:18:7 | -LL | #[derive_Clone] //~ ERROR attribute `derive_Clone` is currently unknown +LL | #[derive_Clone] | ^^^^^^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable diff --git a/src/test/ui/issues/issue-32709.stderr b/src/test/ui/issues/issue-32709.stderr index 9161e64ef0a..9127c754658 100644 --- a/src/test/ui/issues/issue-32709.stderr +++ b/src/test/ui/issues/issue-32709.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `(): std::convert::From<{integer}>` is not satisfied --> $DIR/issue-32709.rs:4:5 | -LL | Err(5)?; //~ ERROR +LL | Err(5)?; | ^^^^^^^ the trait `std::convert::From<{integer}>` is not implemented for `()` | = note: required by `std::convert::From::from` diff --git a/src/test/ui/issues/issue-32782.stderr b/src/test/ui/issues/issue-32782.stderr index 5d583ee843f..886f5297156 100644 --- a/src/test/ui/issues/issue-32782.stderr +++ b/src/test/ui/issues/issue-32782.stderr @@ -1,7 +1,7 @@ error[E0658]: allow_internal_unstable side-steps feature gating and stability checks --> $DIR/issue-32782.rs:7:9 | -LL | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps +LL | #[allow_internal_unstable] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ... LL | foo!(); diff --git a/src/test/ui/issues/issue-32833.stderr b/src/test/ui/issues/issue-32833.stderr index c7f0eb1a432..430cc0fda26 100644 --- a/src/test/ui/issues/issue-32833.stderr +++ b/src/test/ui/issues/issue-32833.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `bar::Foo` --> $DIR/issue-32833.rs:1:5 | -LL | use bar::Foo; //~ ERROR unresolved import `bar::Foo` [E0432] +LL | use bar::Foo; | ^^^^^^^^ no `Foo` in `bar` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-32950.stderr b/src/test/ui/issues/issue-32950.stderr index 13aed4a1756..3cdf35af1d8 100644 --- a/src/test/ui/issues/issue-32950.stderr +++ b/src/test/ui/issues/issue-32950.stderr @@ -1,13 +1,13 @@ error: `derive` cannot be used on items with type macros --> $DIR/issue-32950.rs:5:5 | -LL | concat_idents!(Foo, Bar) //~ ERROR `derive` cannot be used on items with type macros +LL | concat_idents!(Foo, Bar) | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0412]: cannot find type `FooBar` in this scope --> $DIR/issue-32950.rs:5:5 | -LL | concat_idents!(Foo, Bar) //~ ERROR `derive` cannot be used on items with type macros +LL | concat_idents!(Foo, Bar) | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-33140.stderr b/src/test/ui/issues/issue-33140.stderr index e2631e971c5..43065a2e2d4 100644 --- a/src/test/ui/issues/issue-33140.stderr +++ b/src/test/ui/issues/issue-33140.stderr @@ -19,7 +19,7 @@ LL | impl Trait2 for dyn Sync + Send + Sync { error[E0592]: duplicate definitions with name `abc` --> $DIR/issue-33140.rs:29:5 | -LL | / fn abc() -> bool { //~ ERROR duplicate definitions with name `abc` +LL | / fn abc() -> bool { LL | | false LL | | } | |_____^ duplicate definitions for `abc` diff --git a/src/test/ui/issues/issue-3344.stderr b/src/test/ui/issues/issue-3344.stderr index 8e4a14fb4fa..6593e07b189 100644 --- a/src/test/ui/issues/issue-3344.stderr +++ b/src/test/ui/issues/issue-3344.stderr @@ -1,7 +1,7 @@ error[E0046]: not all trait items implemented, missing: `partial_cmp` --> $DIR/issue-3344.rs:3:1 | -LL | impl PartialOrd for Thing { //~ ERROR not all trait items implemented, missing: `partial_cmp` +LL | impl PartialOrd for Thing { | ^^^^^^^^^^^^^^^^^^^^^^^^^ missing `partial_cmp` in implementation | = note: `partial_cmp` from trait: `fn(&Self, &Rhs) -> std::option::Option` diff --git a/src/test/ui/issues/issue-33504.stderr b/src/test/ui/issues/issue-33504.stderr index 716aa8a8632..7af555eaa2c 100644 --- a/src/test/ui/issues/issue-33504.stderr +++ b/src/test/ui/issues/issue-33504.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-33504.rs:7:13 | -LL | let Test = 1; //~ ERROR mismatched types +LL | let Test = 1; | ^^^^ expected integer, found struct `Test` | = note: expected type `{integer}` diff --git a/src/test/ui/issues/issue-33525.stderr b/src/test/ui/issues/issue-33525.stderr index 2c97a39a183..584b903c2ef 100644 --- a/src/test/ui/issues/issue-33525.stderr +++ b/src/test/ui/issues/issue-33525.stderr @@ -1,19 +1,19 @@ error[E0425]: cannot find value `a` in this scope --> $DIR/issue-33525.rs:2:5 | -LL | a; //~ ERROR cannot find value `a` +LL | a; | ^ not found in this scope error[E0609]: no field `lorem` on type `&'static str` --> $DIR/issue-33525.rs:3:8 | -LL | "".lorem; //~ ERROR no field +LL | "".lorem; | ^^^^^ error[E0609]: no field `ipsum` on type `&'static str` --> $DIR/issue-33525.rs:4:8 | -LL | "".ipsum; //~ ERROR no field +LL | "".ipsum; | ^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-33571.stderr b/src/test/ui/issues/issue-33571.stderr index 2fae447c5e8..5d83a08e907 100644 --- a/src/test/ui/issues/issue-33571.stderr +++ b/src/test/ui/issues/issue-33571.stderr @@ -1,7 +1,7 @@ error: this unsafe trait should be implemented explicitly --> $DIR/issue-33571.rs:2:10 | -LL | Sync, //~ ERROR this unsafe trait should be implemented explicitly +LL | Sync, | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-33941.stderr b/src/test/ui/issues/issue-33941.stderr index 43cd7af81d9..596921e526d 100644 --- a/src/test/ui/issues/issue-33941.stderr +++ b/src/test/ui/issues/issue-33941.stderr @@ -1,7 +1,7 @@ error[E0271]: type mismatch resolving ` as std::iter::Iterator>::Item == &_` --> $DIR/issue-33941.rs:4:36 | -LL | for _ in HashMap::new().iter().cloned() {} //~ ERROR type mismatch +LL | for _ in HashMap::new().iter().cloned() {} | ^^^^^^ expected tuple, found reference | = note: expected type `(&_, &_)` @@ -10,7 +10,7 @@ LL | for _ in HashMap::new().iter().cloned() {} //~ ERROR type mismatch error[E0271]: type mismatch resolving ` as std::iter::Iterator>::Item == &_` --> $DIR/issue-33941.rs:4:14 | -LL | for _ in HashMap::new().iter().cloned() {} //~ ERROR type mismatch +LL | for _ in HashMap::new().iter().cloned() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tuple, found reference | = note: expected type `(&_, &_)` diff --git a/src/test/ui/issues/issue-34047.stderr b/src/test/ui/issues/issue-34047.stderr index 8d552f24cd6..f770ded50d0 100644 --- a/src/test/ui/issues/issue-34047.stderr +++ b/src/test/ui/issues/issue-34047.stderr @@ -4,7 +4,7 @@ error[E0530]: match bindings cannot shadow constants LL | const C: u8 = 0; | ---------------- the constant `C` is defined here ... -LL | mut C => {} //~ ERROR match bindings cannot shadow constants +LL | mut C => {} | ^ cannot be named the same as a constant error: aborting due to previous error diff --git a/src/test/ui/issues/issue-34222-1.stderr b/src/test/ui/issues/issue-34222-1.stderr index beb6b589766..0799656b06b 100644 --- a/src/test/ui/issues/issue-34222-1.stderr +++ b/src/test/ui/issues/issue-34222-1.stderr @@ -1,7 +1,7 @@ error[E0585]: found a documentation comment that doesn't document anything --> $DIR/issue-34222-1.rs:2:5 | -LL | /// comment //~ ERROR found a documentation comment that doesn't document anything +LL | /// comment | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: doc comments must come before what they document, maybe a comment was intended with `//`? diff --git a/src/test/ui/issues/issue-34334.stderr b/src/test/ui/issues/issue-34334.stderr index 9571d043635..1b0babf9390 100644 --- a/src/test/ui/issues/issue-34334.stderr +++ b/src/test/ui/issues/issue-34334.stderr @@ -1,7 +1,7 @@ error: expected one of `,` or `>`, found `=` --> $DIR/issue-34334.rs:2:29 | -LL | let sr: Vec<(u32, _, _) = vec![]; //~ ERROR expected one of `,` or `>`, found `=` +LL | let sr: Vec<(u32, _, _) = vec![]; | -- ^ expected one of `,` or `>` here | | | while parsing the type for `sr` diff --git a/src/test/ui/issues/issue-34349.stderr b/src/test/ui/issues/issue-34349.stderr index f0cd8f94881..d0b51961b44 100644 --- a/src/test/ui/issues/issue-34349.stderr +++ b/src/test/ui/issues/issue-34349.stderr @@ -1,7 +1,7 @@ error[E0525]: expected a closure that implements the `Fn` trait, but this closure only implements `FnMut` --> $DIR/issue-34349.rs:16:17 | -LL | let diary = || { //~ ERROR E0525 +LL | let diary = || { | ^^ this closure implements `FnMut`, not `Fn` LL | farewell.push_str("!!!"); | -------- closure is `FnMut` because it mutates the variable `farewell` here diff --git a/src/test/ui/issues/issue-34373.stderr b/src/test/ui/issues/issue-34373.stderr index 07ac421455c..f260a847743 100644 --- a/src/test/ui/issues/issue-34373.stderr +++ b/src/test/ui/issues/issue-34373.stderr @@ -1,7 +1,7 @@ error[E0391]: cycle detected when processing `Foo::T` --> $DIR/issue-34373.rs:7:30 | -LL | pub struct Foo>>; //~ ERROR cycle detected +LL | pub struct Foo>>; | ^^^^^^^^^^ | note: ...which requires processing `DefaultFoo`... diff --git a/src/test/ui/issues/issue-35075.stderr b/src/test/ui/issues/issue-35075.stderr index 5372996d1cb..2aeb6b15224 100644 --- a/src/test/ui/issues/issue-35075.stderr +++ b/src/test/ui/issues/issue-35075.stderr @@ -1,21 +1,21 @@ error[E0412]: cannot find type `Foo` in this scope --> $DIR/issue-35075.rs:2:12 | -LL | inner: Foo //~ ERROR cannot find type `Foo` in this scope +LL | inner: Foo | ^^^ not found in this scope help: there is an enum variant `Baz::Foo`; try using the variant's enum | -LL | inner: Baz //~ ERROR cannot find type `Foo` in this scope +LL | inner: Baz | ^^^ error[E0412]: cannot find type `Foo` in this scope --> $DIR/issue-35075.rs:6:9 | -LL | Foo(Foo) //~ ERROR cannot find type `Foo` in this scope +LL | Foo(Foo) | ^^^ not found in this scope help: there is an enum variant `Baz::Foo`; try using the variant's enum | -LL | Foo(Baz) //~ ERROR cannot find type `Foo` in this scope +LL | Foo(Baz) | ^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-35139.stderr b/src/test/ui/issues/issue-35139.stderr index 1e3d24fa514..79e889b7e59 100644 --- a/src/test/ui/issues/issue-35139.stderr +++ b/src/test/ui/issues/issue-35139.stderr @@ -1,7 +1,7 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates --> $DIR/issue-35139.rs:9:6 | -LL | impl<'a> MethodType for MTFn { //~ ERROR E0207 +LL | impl<'a> MethodType for MTFn { | ^^ unconstrained lifetime parameter error: aborting due to previous error diff --git a/src/test/ui/issues/issue-35241.stderr b/src/test/ui/issues/issue-35241.stderr index 022bc7baa34..8fda58abadb 100644 --- a/src/test/ui/issues/issue-35241.stderr +++ b/src/test/ui/issues/issue-35241.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-35241.rs:3:20 | -LL | fn test() -> Foo { Foo } //~ ERROR mismatched types +LL | fn test() -> Foo { Foo } | --- ^^^ | | | | | expected struct `Foo`, found fn item diff --git a/src/test/ui/issues/issue-35450.stderr b/src/test/ui/issues/issue-35450.stderr index 7edee5c41e6..f2065689f44 100644 --- a/src/test/ui/issues/issue-35450.stderr +++ b/src/test/ui/issues/issue-35450.stderr @@ -1,7 +1,7 @@ error: expected expression, found `$` --> $DIR/issue-35450.rs:4:8 | -LL | m!($t); //~ ERROR expected expression +LL | m!($t); | ^ expected expression error: aborting due to previous error diff --git a/src/test/ui/issues/issue-3601.stderr b/src/test/ui/issues/issue-3601.stderr index 85b53443434..fa0fa3345f5 100644 --- a/src/test/ui/issues/issue-3601.stderr +++ b/src/test/ui/issues/issue-3601.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `_` not covered --> $DIR/issue-3601.rs:30:44 | -LL | box NodeKind::Element(ed) => match ed.kind { //~ ERROR non-exhaustive patterns +LL | box NodeKind::Element(ed) => match ed.kind { | ^^^^^^^ pattern `_` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/issues/issue-36116.stderr b/src/test/ui/issues/issue-36116.stderr index e8f9a472b07..5236db29ae4 100644 --- a/src/test/ui/issues/issue-36116.stderr +++ b/src/test/ui/issues/issue-36116.stderr @@ -1,12 +1,12 @@ warning: unnecessary path disambiguator --> $DIR/issue-36116.rs:20:50 | -LL | let f = Some(Foo { _a: 42 }).map(|a| a as Foo::); //~ WARN unnecessary path disambiguator +LL | let f = Some(Foo { _a: 42 }).map(|a| a as Foo::); | ^^ try removing `::` warning: unnecessary path disambiguator --> $DIR/issue-36116.rs:21:15 | -LL | let g: Foo:: = Foo { _a: 42 }; //~ WARN unnecessary path disambiguator +LL | let g: Foo:: = Foo { _a: 42 }; | ^^ try removing `::` diff --git a/src/test/ui/issues/issue-36163.stderr b/src/test/ui/issues/issue-36163.stderr index c114e58e4d9..94de4c76927 100644 --- a/src/test/ui/issues/issue-36163.stderr +++ b/src/test/ui/issues/issue-36163.stderr @@ -1,7 +1,7 @@ error[E0391]: cycle detected when processing `Foo::B::{{constant}}` --> $DIR/issue-36163.rs:4:9 | -LL | B = A, //~ ERROR E0391 +LL | B = A, | ^ | note: ...which requires processing `A`... @@ -13,7 +13,7 @@ LL | const A: isize = Foo::B as isize; note: cycle used when const-evaluating `Foo::B::{{constant}}` --> $DIR/issue-36163.rs:4:9 | -LL | B = A, //~ ERROR E0391 +LL | B = A, | ^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-36400.stderr b/src/test/ui/issues/issue-36400.stderr index d9394277050..1494324eea3 100644 --- a/src/test/ui/issues/issue-36400.stderr +++ b/src/test/ui/issues/issue-36400.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow immutable `Box` content `*x` as mutable | LL | let x = Box::new(3); | - help: make this binding mutable: `mut x` -LL | f(&mut *x); //~ ERROR cannot borrow immutable +LL | f(&mut *x); | ^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/issues/issue-36617.stderr b/src/test/ui/issues/issue-36617.stderr index 7685b84bea7..296fec46d80 100644 --- a/src/test/ui/issues/issue-36617.stderr +++ b/src/test/ui/issues/issue-36617.stderr @@ -1,7 +1,7 @@ error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-36617.rs:1:1 | -LL | #![derive(Copy)] //~ ERROR `derive` may only be applied to structs, enums and unions +LL | #![derive(Copy)] | ^^^^^^^^^^^^^^^^ help: try an outer attribute: `#[derive(Copy)]` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-36881.stderr b/src/test/ui/issues/issue-36881.stderr index b08b229384d..2ec636fde60 100644 --- a/src/test/ui/issues/issue-36881.stderr +++ b/src/test/ui/issues/issue-36881.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `issue_36881_aux` --> $DIR/issue-36881.rs:6:9 | -LL | use issue_36881_aux::Foo; //~ ERROR unresolved import +LL | use issue_36881_aux::Foo; | ^^^^^^^^^^^^^^^ maybe a missing `extern crate issue_36881_aux;`? error: aborting due to previous error diff --git a/src/test/ui/issues/issue-3702-2.stderr b/src/test/ui/issues/issue-3702-2.stderr index 11d24b38061..347a19b687f 100644 --- a/src/test/ui/issues/issue-3702-2.stderr +++ b/src/test/ui/issues/issue-3702-2.stderr @@ -1,7 +1,7 @@ error[E0034]: multiple applicable items in scope --> $DIR/issue-3702-2.rs:16:14 | -LL | self.to_int() + other.to_int() //~ ERROR multiple applicable items in scope +LL | self.to_int() + other.to_int() | ^^^^^^ multiple `to_int` found | note: candidate #1 is defined in an impl of the trait `ToPrimitive` for the type `isize` diff --git a/src/test/ui/issues/issue-37026.stderr b/src/test/ui/issues/issue-37026.stderr index 39a500cf565..1f81264ffdb 100644 --- a/src/test/ui/issues/issue-37026.stderr +++ b/src/test/ui/issues/issue-37026.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-37026.rs:6:9 | -LL | let empty_struct::XEmpty2 = (); //~ ERROR mismatched types +LL | let empty_struct::XEmpty2 = (); | ^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `empty_struct::XEmpty2` | = note: expected type `()` @@ -10,7 +10,7 @@ LL | let empty_struct::XEmpty2 = (); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/issue-37026.rs:7:9 | -LL | let empty_struct::XEmpty6(..) = (); //~ ERROR mismatched types +LL | let empty_struct::XEmpty6(..) = (); | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `empty_struct::XEmpty6` | = note: expected type `()` diff --git a/src/test/ui/issues/issue-3707.stderr b/src/test/ui/issues/issue-3707.stderr index 436dcbee862..05c8ce4c3f1 100644 --- a/src/test/ui/issues/issue-3707.stderr +++ b/src/test/ui/issues/issue-3707.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `boom` found for type `&Obj` in the current scope --> $DIR/issue-3707.rs:10:14 | -LL | self.boom(); //~ ERROR no method named `boom` found for type `&Obj` in the current scope +LL | self.boom(); | -----^^^^ | | | | | this is an associated function, not a method diff --git a/src/test/ui/issues/issue-37311-type-length-limit/issue-37311.stderr b/src/test/ui/issues/issue-37311-type-length-limit/issue-37311.stderr index fa1ee227f0b..24b31f43a85 100644 --- a/src/test/ui/issues/issue-37311-type-length-limit/issue-37311.stderr +++ b/src/test/ui/issues/issue-37311-type-length-limit/issue-37311.stderr @@ -1,7 +1,7 @@ error: reached the type-length limit while instantiating `<(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(), &()), &(&()...` --> $DIR/issue-37311.rs:13:5 | -LL | / fn recurse(&self) { //~ ERROR reached the type-length limit +LL | / fn recurse(&self) { LL | | (self, self).recurse(); LL | | } | |_____^ diff --git a/src/test/ui/issues/issue-37550.stderr b/src/test/ui/issues/issue-37550.stderr index 97160af43be..41f33a38fbd 100644 --- a/src/test/ui/issues/issue-37550.stderr +++ b/src/test/ui/issues/issue-37550.stderr @@ -1,7 +1,7 @@ error[E0723]: function pointers in const fn are unstable (see issue #57563) --> $DIR/issue-37550.rs:3:9 | -LL | let x = || t; //~ ERROR function pointers in const fn are unstable +LL | let x = || t; | ^ | = help: add #![feature(const_fn)] to the crate attributes to enable diff --git a/src/test/ui/issues/issue-3763.stderr b/src/test/ui/issues/issue-3763.stderr index f37b923d5dc..cc95d221c51 100644 --- a/src/test/ui/issues/issue-3763.stderr +++ b/src/test/ui/issues/issue-3763.stderr @@ -13,13 +13,13 @@ LL | let _woohoo = (Box::new(my_struct)).priv_field; error[E0624]: method `happyfun` is private --> $DIR/issue-3763.rs:21:18 | -LL | (&my_struct).happyfun(); //~ ERROR method `happyfun` is private +LL | (&my_struct).happyfun(); | ^^^^^^^^ error[E0624]: method `happyfun` is private --> $DIR/issue-3763.rs:23:27 | -LL | (Box::new(my_struct)).happyfun(); //~ ERROR method `happyfun` is private +LL | (Box::new(my_struct)).happyfun(); | ^^^^^^^^ error[E0616]: field `priv_field` of struct `my_mod::MyStruct` is private diff --git a/src/test/ui/issues/issue-37665.stderr b/src/test/ui/issues/issue-37665.stderr index c3599fab685..c2749469951 100644 --- a/src/test/ui/issues/issue-37665.stderr +++ b/src/test/ui/issues/issue-37665.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-37665.rs:10:17 | -LL | let x: () = 0; //~ ERROR: mismatched types +LL | let x: () = 0; | ^ expected (), found integer | = note: expected type `()` diff --git a/src/test/ui/issues/issue-3779.stderr b/src/test/ui/issues/issue-3779.stderr index 3538cb199c3..ba1e842c610 100644 --- a/src/test/ui/issues/issue-3779.stderr +++ b/src/test/ui/issues/issue-3779.stderr @@ -3,7 +3,7 @@ error[E0072]: recursive type `S` has infinite size | LL | struct S { | ^^^^^^^^ recursive type has infinite size -LL | //~^ ERROR E0072 +LL | LL | element: Option | ------------------ recursive without indirection | diff --git a/src/test/ui/issues/issue-37884.stderr b/src/test/ui/issues/issue-37884.stderr index f791c6df72f..9a5f659da16 100644 --- a/src/test/ui/issues/issue-37884.stderr +++ b/src/test/ui/issues/issue-37884.stderr @@ -2,8 +2,8 @@ error[E0308]: method not compatible with trait --> $DIR/issue-37884.rs:6:5 | LL | / fn next(&'a mut self) -> Option -LL | | //~^ ERROR method not compatible with trait -LL | | //~| lifetime mismatch +LL | | +LL | | LL | | { LL | | Some(&mut self.0) LL | | } @@ -15,8 +15,8 @@ note: the anonymous lifetime #1 defined on the method body at 6:5... --> $DIR/issue-37884.rs:6:5 | LL | / fn next(&'a mut self) -> Option -LL | | //~^ ERROR method not compatible with trait -LL | | //~| lifetime mismatch +LL | | +LL | | LL | | { LL | | Some(&mut self.0) LL | | } diff --git a/src/test/ui/issues/issue-37887.stderr b/src/test/ui/issues/issue-37887.stderr index 3b3ce8b39bc..24543a5efaf 100644 --- a/src/test/ui/issues/issue-37887.stderr +++ b/src/test/ui/issues/issue-37887.stderr @@ -1,13 +1,13 @@ error[E0432]: unresolved import `libc` --> $DIR/issue-37887.rs:3:9 | -LL | use libc::*; //~ ERROR unresolved import +LL | use libc::*; | ^^^^ maybe a missing `extern crate libc;`? error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? (see issue #27812) --> $DIR/issue-37887.rs:2:5 | -LL | extern crate libc; //~ ERROR use of unstable +LL | extern crate libc; | ^^^^^^^^^^^^^^^^^^ | = help: add #![feature(rustc_private)] to the crate attributes to enable diff --git a/src/test/ui/issues/issue-3820.stderr b/src/test/ui/issues/issue-3820.stderr index 0a36ac7616b..b4af9c2d27d 100644 --- a/src/test/ui/issues/issue-3820.stderr +++ b/src/test/ui/issues/issue-3820.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `*` cannot be applied to type `Thing` --> $DIR/issue-3820.rs:14:13 | -LL | let w = u * 3; //~ ERROR binary operation `*` cannot be applied to type `Thing` +LL | let w = u * 3; | ^^^^^ | = note: an implementation of `std::ops::Mul` might be missing for `Thing` diff --git a/src/test/ui/issues/issue-38293.stderr b/src/test/ui/issues/issue-38293.stderr index 409670074d9..e0b2fe4fe05 100644 --- a/src/test/ui/issues/issue-38293.stderr +++ b/src/test/ui/issues/issue-38293.stderr @@ -1,13 +1,13 @@ error[E0432]: unresolved import `foo::f` --> $DIR/issue-38293.rs:6:14 | -LL | use foo::f::{self}; //~ ERROR unresolved import `foo::f` +LL | use foo::f::{self}; | ^^^^ no `f` in `foo` error[E0423]: expected function, found module `baz` --> $DIR/issue-38293.rs:15:5 | -LL | baz(); //~ ERROR expected function, found module `baz` +LL | baz(); | ^^^ not a function help: possible better candidate is found in another module, you can import it into scope | diff --git a/src/test/ui/issues/issue-38458.stderr b/src/test/ui/issues/issue-38458.stderr index 541a36233ca..c04a01118a4 100644 --- a/src/test/ui/issues/issue-38458.stderr +++ b/src/test/ui/issues/issue-38458.stderr @@ -1,7 +1,7 @@ error[E0572]: return statement outside of function body --> $DIR/issue-38458.rs:2:5 | -LL | return; //~ ERROR return statement outside of function body +LL | return; | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-38604.stderr b/src/test/ui/issues/issue-38604.stderr index 30b4d2b53ff..77b42b80613 100644 --- a/src/test/ui/issues/issue-38604.stderr +++ b/src/test/ui/issues/issue-38604.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Foo` cannot be made into an object --> $DIR/issue-38604.rs:14:13 | -LL | let _f: Box = //~ ERROR `Foo` cannot be made into an object +LL | let _f: Box = | ^^^^^^^^ the trait `Foo` cannot be made into an object | = note: the trait cannot use `Self` as a type parameter in the supertraits or where-clauses @@ -9,7 +9,7 @@ LL | let _f: Box = //~ ERROR `Foo` cannot be made into an object error[E0038]: the trait `Foo` cannot be made into an object --> $DIR/issue-38604.rs:15:9 | -LL | Box::new(()); //~ ERROR `Foo` cannot be made into an object +LL | Box::new(()); | ^^^^^^^^^^^^ the trait `Foo` cannot be made into an object | = note: the trait cannot use `Self` as a type parameter in the supertraits or where-clauses diff --git a/src/test/ui/issues/issue-38715.stderr b/src/test/ui/issues/issue-38715.stderr index 21d96d36e27..34e08bfc93a 100644 --- a/src/test/ui/issues/issue-38715.stderr +++ b/src/test/ui/issues/issue-38715.stderr @@ -1,7 +1,7 @@ error: a macro named `foo` has already been exported --> $DIR/issue-38715.rs:5:1 | -LL | macro_rules! foo { () => {} } //~ ERROR a macro named `foo` has already been exported +LL | macro_rules! foo { () => {} } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `foo` already exported | = note: #[deny(duplicate_macro_exports)] on by default diff --git a/src/test/ui/issues/issue-38868.stderr b/src/test/ui/issues/issue-38868.stderr index ae975ca78c1..fe932c744bf 100644 --- a/src/test/ui/issues/issue-38868.stderr +++ b/src/test/ui/issues/issue-38868.stderr @@ -1,7 +1,7 @@ error[E0366]: Implementations of Drop cannot be specialized --> $DIR/issue-38868.rs:5:1 | -LL | / impl Drop for List { //~ ERROR E0366 +LL | / impl Drop for List { LL | | fn drop(&mut self) { LL | | panic!() LL | | } diff --git a/src/test/ui/issues/issue-38919.stderr b/src/test/ui/issues/issue-38919.stderr index 8c094364795..d23a4dfd0a4 100644 --- a/src/test/ui/issues/issue-38919.stderr +++ b/src/test/ui/issues/issue-38919.stderr @@ -1,7 +1,7 @@ error[E0599]: no associated item named `Item` found for type `T` in the current scope --> $DIR/issue-38919.rs:2:8 | -LL | T::Item; //~ ERROR no associated item named `Item` found for type `T` in the current scope +LL | T::Item; | ---^^^^ | | | associated item not found in `T` diff --git a/src/test/ui/issues/issue-39211.stderr b/src/test/ui/issues/issue-39211.stderr index b9134445455..ea850ea57d5 100644 --- a/src/test/ui/issues/issue-39211.stderr +++ b/src/test/ui/issues/issue-39211.stderr @@ -1,7 +1,7 @@ error[E0220]: associated type `Row` not found for `M` --> $DIR/issue-39211.rs:11:17 | -LL | let a = [3; M::Row::DIM]; //~ ERROR associated type `Row` not found for `M` +LL | let a = [3; M::Row::DIM]; | ^^^^^^^^^^^ associated type `Row` not found error: aborting due to previous error diff --git a/src/test/ui/issues/issue-39388.stderr b/src/test/ui/issues/issue-39388.stderr index 00d6598aeaf..e04e16e2a03 100644 --- a/src/test/ui/issues/issue-39388.stderr +++ b/src/test/ui/issues/issue-39388.stderr @@ -1,7 +1,7 @@ error: expected `*` or `+` --> $DIR/issue-39388.rs:4:22 | -LL | (($($a:tt)*) = ($($b:tt))*) => { //~ ERROR expected `*` or `+` +LL | (($($a:tt)*) = ($($b:tt))*) => { | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-39616.stderr b/src/test/ui/issues/issue-39616.stderr index 082c3a6853a..e24ffcdb0d9 100644 --- a/src/test/ui/issues/issue-39616.stderr +++ b/src/test/ui/issues/issue-39616.stderr @@ -1,13 +1,13 @@ error: expected type, found `0` --> $DIR/issue-39616.rs:1:12 | -LL | fn foo(a: [0; 1]) {} //~ ERROR expected type, found `0` +LL | fn foo(a: [0; 1]) {} | ^ error: expected one of `)`, `,`, `->`, `where`, or `{`, found `]` --> $DIR/issue-39616.rs:1:16 | -LL | fn foo(a: [0; 1]) {} //~ ERROR expected type, found `0` +LL | fn foo(a: [0; 1]) {} | ^ expected one of `)`, `,`, `->`, `where`, or `{` here error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-3973.stderr b/src/test/ui/issues/issue-3973.stderr index 8e46d880181..2ece4c39606 100644 --- a/src/test/ui/issues/issue-3973.stderr +++ b/src/test/ui/issues/issue-3973.stderr @@ -2,7 +2,7 @@ error[E0407]: method `new` is not a member of trait `ToString_` --> $DIR/issue-3973.rs:11:5 | LL | / fn new(x: f64, y: f64) -> Point { -LL | | //~^ ERROR method `new` is not a member of trait `ToString_` +LL | | LL | | Point { x: x, y: y } LL | | } | |_____^ not a member of trait `ToString_` diff --git a/src/test/ui/issues/issue-3993.stderr b/src/test/ui/issues/issue-3993.stderr index 090bca3a759..ce594a3f9bb 100644 --- a/src/test/ui/issues/issue-3993.stderr +++ b/src/test/ui/issues/issue-3993.stderr @@ -1,7 +1,7 @@ error[E0603]: function `fly` is private --> $DIR/issue-3993.rs:1:10 | -LL | use zoo::fly; //~ ERROR: function `fly` is private +LL | use zoo::fly; | ^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-40000.stderr b/src/test/ui/issues/issue-40000.stderr index ce0c44c1475..c48fb24ea17 100644 --- a/src/test/ui/issues/issue-40000.stderr +++ b/src/test/ui/issues/issue-40000.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-40000.rs:6:9 | -LL | foo(bar); //~ ERROR E0308 +LL | foo(bar); | ^^^ expected concrete lifetime, found bound lifetime parameter | = note: expected type `std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r i32) + 'static)>` diff --git a/src/test/ui/issues/issue-40288.stderr b/src/test/ui/issues/issue-40288.stderr index 2ac5964f5da..5e8ad323ccb 100644 --- a/src/test/ui/issues/issue-40288.stderr +++ b/src/test/ui/issues/issue-40288.stderr @@ -4,7 +4,7 @@ error[E0506]: cannot assign to `*refr` because it is borrowed LL | save_ref(&*refr, &mut out); | ----- borrow of `*refr` occurs here ... -LL | *refr = 3; //~ ERROR cannot assign to `*refr` because it is borrowed +LL | *refr = 3; | ^^^^^^^^^ assignment to borrowed `*refr` occurs here error: aborting due to previous error diff --git a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.stderr b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.stderr index 87b98bbcedb..5e7be1a3101 100644 --- a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.stderr +++ b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of indexed content --> $DIR/issue-40402-1.rs:9:13 | -LL | let e = f.v[0]; //~ ERROR cannot move out of indexed content +LL | let e = f.v[0]; | ^^^^^^ | | | cannot move out of indexed content diff --git a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.stderr b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.stderr index d64cd96e959..b672029f717 100644 --- a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.stderr +++ b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of indexed content --> $DIR/issue-40402-2.rs:5:18 | -LL | let (a, b) = x[0]; //~ ERROR cannot move out of indexed content +LL | let (a, b) = x[0]; | - - ^^^^ cannot move out of indexed content | | | | | ...and here (use `ref b` or `ref mut b`) diff --git a/src/test/ui/issues/issue-40782.stderr b/src/test/ui/issues/issue-40782.stderr index 03f051adc6e..fdc57466f3c 100644 --- a/src/test/ui/issues/issue-40782.stderr +++ b/src/test/ui/issues/issue-40782.stderr @@ -1,7 +1,7 @@ error: missing `in` in `for` loop --> $DIR/issue-40782.rs:2:10 | -LL | for i 0..2 { //~ ERROR missing `in` +LL | for i 0..2 { | ^ help: try adding `in` here error: aborting due to previous error diff --git a/src/test/ui/issues/issue-40845.stderr b/src/test/ui/issues/issue-40845.stderr index a8d75025279..a8be38ebf06 100644 --- a/src/test/ui/issues/issue-40845.stderr +++ b/src/test/ui/issues/issue-40845.stderr @@ -1,13 +1,13 @@ error: cannot find macro `m!` in this scope --> $DIR/issue-40845.rs:4:10 | -LL | impl S { m!(); } //~ ERROR cannot find macro `m!` in this scope +LL | impl S { m!(); } | ^ error: cannot find macro `m!` in this scope --> $DIR/issue-40845.rs:1:11 | -LL | trait T { m!(); } //~ ERROR cannot find macro `m!` in this scope +LL | trait T { m!(); } | ^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-41255.stderr b/src/test/ui/issues/issue-41255.stderr index 05e930de27a..9ccfc9a0016 100644 --- a/src/test/ui/issues/issue-41255.stderr +++ b/src/test/ui/issues/issue-41255.stderr @@ -1,7 +1,7 @@ error: floating-point types cannot be used in patterns --> $DIR/issue-41255.rs:10:9 | -LL | 5.0 => {}, //~ ERROR floating-point types cannot be used in patterns +LL | 5.0 => {}, | ^^^ | note: lint level defined here @@ -15,7 +15,7 @@ LL | #![forbid(illegal_floating_point_literal_pattern)] error: floating-point types cannot be used in patterns --> $DIR/issue-41255.rs:12:9 | -LL | 5.0f32 => {}, //~ ERROR floating-point types cannot be used in patterns +LL | 5.0f32 => {}, | ^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -24,7 +24,7 @@ LL | 5.0f32 => {}, //~ ERROR floating-point types cannot be used in patt error: floating-point types cannot be used in patterns --> $DIR/issue-41255.rs:14:10 | -LL | -5.0 => {}, //~ ERROR floating-point types cannot be used in patterns +LL | -5.0 => {}, | ^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -33,7 +33,7 @@ LL | -5.0 => {}, //~ ERROR floating-point types cannot be used in patter error: floating-point types cannot be used in patterns --> $DIR/issue-41255.rs:16:9 | -LL | 1.0 .. 33.0 => {}, //~ ERROR floating-point types cannot be used in patterns +LL | 1.0 .. 33.0 => {}, | ^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -42,7 +42,7 @@ LL | 1.0 .. 33.0 => {}, //~ ERROR floating-point types cannot be used in error: floating-point types cannot be used in patterns --> $DIR/issue-41255.rs:16:16 | -LL | 1.0 .. 33.0 => {}, //~ ERROR floating-point types cannot be used in patterns +LL | 1.0 .. 33.0 => {}, | ^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -51,7 +51,7 @@ LL | 1.0 .. 33.0 => {}, //~ ERROR floating-point types cannot be used in error: floating-point types cannot be used in patterns --> $DIR/issue-41255.rs:20:9 | -LL | 39.0 ..= 70.0 => {}, //~ ERROR floating-point types cannot be used in patterns +LL | 39.0 ..= 70.0 => {}, | ^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -60,7 +60,7 @@ LL | 39.0 ..= 70.0 => {}, //~ ERROR floating-point types cannot be used error: floating-point types cannot be used in patterns --> $DIR/issue-41255.rs:20:18 | -LL | 39.0 ..= 70.0 => {}, //~ ERROR floating-point types cannot be used in patterns +LL | 39.0 ..= 70.0 => {}, | ^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -69,7 +69,7 @@ LL | 39.0 ..= 70.0 => {}, //~ ERROR floating-point types cannot be used error: floating-point types cannot be used in patterns --> $DIR/issue-41255.rs:29:10 | -LL | (3.14, 1) => {}, //~ ERROR floating-point types cannot be used +LL | (3.14, 1) => {}, | ^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -78,7 +78,7 @@ LL | (3.14, 1) => {}, //~ ERROR floating-point types cannot be used error: floating-point types cannot be used in patterns --> $DIR/issue-41255.rs:36:18 | -LL | Foo { x: 2.0 } => {}, //~ ERROR floating-point types cannot be used +LL | Foo { x: 2.0 } => {}, | ^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! diff --git a/src/test/ui/issues/issue-41549.stderr b/src/test/ui/issues/issue-41549.stderr index b144387ac44..5e102dcbf41 100644 --- a/src/test/ui/issues/issue-41549.stderr +++ b/src/test/ui/issues/issue-41549.stderr @@ -1,7 +1,7 @@ error[E0326]: implemented const `CONST` has an incompatible type for trait --> $DIR/issue-41549.rs:9:18 | -LL | const CONST: () = (); //~ ERROR incompatible type for trait +LL | const CONST: () = (); | ^^ expected u32, found () | = note: expected type `u32` diff --git a/src/test/ui/issues/issue-41726.stderr b/src/test/ui/issues/issue-41726.stderr index e6b92dc9dfe..e29c163b817 100644 --- a/src/test/ui/issues/issue-41726.stderr +++ b/src/test/ui/issues/issue-41726.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable indexed content as mutable --> $DIR/issue-41726.rs:5:9 | -LL | things[src.as_str()].sort(); //~ ERROR cannot borrow immutable +LL | things[src.as_str()].sort(); | ^^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable | = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `std::collections::HashMap>` diff --git a/src/test/ui/issues/issue-41742.stderr b/src/test/ui/issues/issue-41742.stderr index 03a9710f679..f205abf5576 100644 --- a/src/test/ui/issues/issue-41742.stderr +++ b/src/test/ui/issues/issue-41742.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-41742.rs:24:7 | -LL | H["?"].f(); //~ ERROR mismatched types +LL | H["?"].f(); | ^^^ expected u32, found reference | = note: expected type `u32` diff --git a/src/test/ui/issues/issue-41776.stderr b/src/test/ui/issues/issue-41776.stderr index 1806f68f14a..e06873b5026 100644 --- a/src/test/ui/issues/issue-41776.stderr +++ b/src/test/ui/issues/issue-41776.stderr @@ -1,7 +1,7 @@ error: argument must be a string literal --> $DIR/issue-41776.rs:2:14 | -LL | include!(line!()); //~ ERROR argument must be a string literal +LL | include!(line!()); | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-41974.stderr b/src/test/ui/issues/issue-41974.stderr index 68712e0f054..54fa48e8bb2 100644 --- a/src/test/ui/issues/issue-41974.stderr +++ b/src/test/ui/issues/issue-41974.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `std::ops::Drop` for type `std::boxed::Box<_>`: --> $DIR/issue-41974.rs:7:1 | -LL | impl Drop for T where T: A { //~ ERROR E0119 +LL | impl Drop for T where T: A { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `alloc`: @@ -12,13 +12,13 @@ LL | impl Drop for T where T: A { //~ ERROR E0119 error[E0120]: the Drop trait may only be implemented on structures --> $DIR/issue-41974.rs:7:18 | -LL | impl Drop for T where T: A { //~ ERROR E0119 +LL | impl Drop for T where T: A { | ^ implementing Drop requires a struct error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct`) --> $DIR/issue-41974.rs:7:1 | -LL | impl Drop for T where T: A { //~ ERROR E0119 +LL | impl Drop for T where T: A { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type | = note: only traits defined in the current crate can be implemented for a type parameter diff --git a/src/test/ui/issues/issue-4201.stderr b/src/test/ui/issues/issue-4201.stderr index 4f8ec96d531..d436c929a72 100644 --- a/src/test/ui/issues/issue-4201.stderr +++ b/src/test/ui/issues/issue-4201.stderr @@ -3,10 +3,10 @@ error[E0317]: if may be missing an else clause | LL | } else if false { | ____________^ -LL | | //~^ ERROR if may be missing an else clause -LL | | //~| expected type `()` -LL | | //~| found type `{integer}` -LL | | //~| expected (), found integer +LL | | +LL | | +LL | | +LL | | LL | | 1 LL | | }; | |_____^ expected (), found integer diff --git a/src/test/ui/issues/issue-42060.stderr b/src/test/ui/issues/issue-42060.stderr index cad2bb2a67b..6f42c86e84a 100644 --- a/src/test/ui/issues/issue-42060.stderr +++ b/src/test/ui/issues/issue-42060.stderr @@ -1,25 +1,25 @@ error[E0435]: attempt to use a non-constant value in a constant --> $DIR/issue-42060.rs:3:23 | -LL | let other: typeof(thing) = thing; //~ ERROR attempt to use a non-constant value in a constant +LL | let other: typeof(thing) = thing; | ^^^^^ non-constant value error[E0435]: attempt to use a non-constant value in a constant --> $DIR/issue-42060.rs:9:13 | -LL | ::N //~ ERROR attempt to use a non-constant value in a constant +LL | ::N | ^ non-constant value error[E0516]: `typeof` is a reserved keyword but unimplemented --> $DIR/issue-42060.rs:3:16 | -LL | let other: typeof(thing) = thing; //~ ERROR attempt to use a non-constant value in a constant +LL | let other: typeof(thing) = thing; | ^^^^^^^^^^^^^ reserved keyword error[E0516]: `typeof` is a reserved keyword but unimplemented --> $DIR/issue-42060.rs:9:6 | -LL | ::N //~ ERROR attempt to use a non-constant value in a constant +LL | ::N | ^^^^^^^^^ reserved keyword error: aborting due to 4 previous errors diff --git a/src/test/ui/issues/issue-42106.stderr b/src/test/ui/issues/issue-42106.stderr index e1018a89d20..9e3ce9878c2 100644 --- a/src/test/ui/issues/issue-42106.stderr +++ b/src/test/ui/issues/issue-42106.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `*collection` as mutable because `collection` is als | LL | let _a = &collection; | ---------- immutable borrow occurs here -LL | collection.swap(1, 2); //~ ERROR also borrowed as immutable +LL | collection.swap(1, 2); | ^^^^^^^^^^ mutable borrow occurs here LL | _a.use_ref(); LL | } diff --git a/src/test/ui/issues/issue-42344.stderr b/src/test/ui/issues/issue-42344.stderr index cb0fe78d102..6bf26c2cf5c 100644 --- a/src/test/ui/issues/issue-42344.stderr +++ b/src/test/ui/issues/issue-42344.stderr @@ -1,7 +1,7 @@ error[E0389]: cannot borrow data mutably in a `&` reference --> $DIR/issue-42344.rs:4:5 | -LL | TAB[0].iter_mut(); //~ ERROR cannot borrow data mutably in a `&` reference [E0389] +LL | TAB[0].iter_mut(); | ^^^^^^ assignment into an immutable reference error: aborting due to previous error diff --git a/src/test/ui/issues/issue-4265.stderr b/src/test/ui/issues/issue-4265.stderr index b5fce14914d..4faf5d3a923 100644 --- a/src/test/ui/issues/issue-4265.stderr +++ b/src/test/ui/issues/issue-4265.stderr @@ -6,7 +6,7 @@ LL | | Foo { baz: 0 }.bar(); LL | | } | |_____- previous definition of `bar` here LL | -LL | / fn bar() { //~ ERROR duplicate definitions +LL | / fn bar() { LL | | } | |_____^ duplicate definition diff --git a/src/test/ui/issues/issue-42755.stderr b/src/test/ui/issues/issue-42755.stderr index 4b490f8e87f..12047e22f1b 100644 --- a/src/test/ui/issues/issue-42755.stderr +++ b/src/test/ui/issues/issue-42755.stderr @@ -1,7 +1,7 @@ error: repetition matches empty token tree --> $DIR/issue-42755.rs:2:7 | -LL | ($($p:vis)*) => {} //~ ERROR repetition matches empty token tree +LL | ($($p:vis)*) => {} | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-42796.stderr b/src/test/ui/issues/issue-42796.stderr index 530eedd68e6..d180e6478ef 100644 --- a/src/test/ui/issues/issue-42796.stderr +++ b/src/test/ui/issues/issue-42796.stderr @@ -4,7 +4,7 @@ error[E0382]: use of moved value: `s` LL | let mut s_copy = s; | ---------- value moved here ... -LL | println!("{}", s); //~ ERROR use of moved value +LL | println!("{}", s); | ^ value used here after move | = note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait diff --git a/src/test/ui/issues/issue-42880.stderr b/src/test/ui/issues/issue-42880.stderr index 36b9e8a1e8a..8a40a49c0de 100644 --- a/src/test/ui/issues/issue-42880.stderr +++ b/src/test/ui/issues/issue-42880.stderr @@ -1,7 +1,7 @@ error[E0599]: no associated item named `String` found for type `std::string::String` in the current scope --> $DIR/issue-42880.rs:4:22 | -LL | let f = |&Value::String(_)| (); //~ ERROR no associated item named +LL | let f = |&Value::String(_)| (); | -------^^^^^^--- associated item not found in `std::string::String` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-42954.stderr b/src/test/ui/issues/issue-42954.stderr index 6a89724de5f..8c35088a1bb 100644 --- a/src/test/ui/issues/issue-42954.stderr +++ b/src/test/ui/issues/issue-42954.stderr @@ -1,7 +1,7 @@ error: `<` is interpreted as a start of generic arguments for `u32`, not a comparison --> $DIR/issue-42954.rs:7:19 | -LL | $i as u32 < 0 //~ `<` is interpreted as a start of generic arguments +LL | $i as u32 < 0 | --------- ^ - interpreted as generic arguments | | | | | not interpreted as comparison diff --git a/src/test/ui/issues/issue-43023.stderr b/src/test/ui/issues/issue-43023.stderr index b620cc5d74e..206a51645fe 100644 --- a/src/test/ui/issues/issue-43023.stderr +++ b/src/test/ui/issues/issue-43023.stderr @@ -1,19 +1,19 @@ error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-43023.rs:4:5 | -LL | #[derive(Debug)] //~ ERROR `derive` may only be applied to structs, enums and unions +LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-43023.rs:11:5 | -LL | #[derive(Debug)] //~ ERROR `derive` may only be applied to structs, enums and unions +LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-43023.rs:16:5 | -LL | #[derive(Debug)] //~ ERROR `derive` may only be applied to structs, enums and unions +LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-43162.stderr b/src/test/ui/issues/issue-43162.stderr index 3fc5317830e..d3ff9002b96 100644 --- a/src/test/ui/issues/issue-43162.stderr +++ b/src/test/ui/issues/issue-43162.stderr @@ -1,13 +1,13 @@ error[E0268]: `break` outside of loop --> $DIR/issue-43162.rs:3:5 | -LL | break true; //~ ERROR E0268 +LL | break true; | ^^^^^^^^^^ cannot break outside of a loop error[E0268]: `break` outside of loop --> $DIR/issue-43162.rs:7:5 | -LL | break {}; //~ ERROR E0268 +LL | break {}; | ^^^^^^^^ cannot break outside of a loop error[E0308]: mismatched types @@ -17,8 +17,8 @@ LL | fn foo() -> bool { | --- ^^^^ expected bool, found () | | | this function's body doesn't return -LL | //~^ ERROR E0308 -LL | break true; //~ ERROR E0268 +LL | +LL | break true; | - help: consider removing this semicolon | = note: expected type `bool` diff --git a/src/test/ui/issues/issue-4321.stderr b/src/test/ui/issues/issue-4321.stderr index 731e63fbb2b..afb4fe775d5 100644 --- a/src/test/ui/issues/issue-4321.stderr +++ b/src/test/ui/issues/issue-4321.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `(true, false)` not covered --> $DIR/issue-4321.rs:3:31 | -LL | println!("foo {:}", match tup { //~ ERROR non-exhaustive patterns: `(true, false)` not covered +LL | println!("foo {:}", match tup { | ^^^ pattern `(true, false)` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/issues/issue-43420-no-over-suggest.stderr b/src/test/ui/issues/issue-43420-no-over-suggest.stderr index bd51d7e1169..7a3722e4bd7 100644 --- a/src/test/ui/issues/issue-43420-no-over-suggest.stderr +++ b/src/test/ui/issues/issue-43420-no-over-suggest.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-43420-no-over-suggest.rs:8:9 | -LL | foo(&a); //~ ERROR mismatched types +LL | foo(&a); | ^^ expected slice, found struct `std::vec::Vec` | = note: expected type `&[u16]` diff --git a/src/test/ui/issues/issue-43424.stderr b/src/test/ui/issues/issue-43424.stderr index c81ea20170c..6274a7928ba 100644 --- a/src/test/ui/issues/issue-43424.stderr +++ b/src/test/ui/issues/issue-43424.stderr @@ -1,7 +1,7 @@ error: unexpected generic arguments in path --> $DIR/issue-43424.rs:10:4 | -LL | m!(inline); //~ ERROR: unexpected generic arguments in path +LL | m!(inline); | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-4366-2.stderr b/src/test/ui/issues/issue-4366-2.stderr index 8cf0e3bd520..76f08d77232 100644 --- a/src/test/ui/issues/issue-4366-2.stderr +++ b/src/test/ui/issues/issue-4366-2.stderr @@ -11,7 +11,7 @@ LL | use a::b::Bar; error[E0423]: expected function, found module `foo` --> $DIR/issue-4366-2.rs:25:5 | -LL | foo(); //~ ERROR expected function, found module `foo` +LL | foo(); | ^^^ not a function help: possible better candidates are found in other modules, you can import them into scope | diff --git a/src/test/ui/issues/issue-4366.stderr b/src/test/ui/issues/issue-4366.stderr index 2bad7b17d64..c59ab004557 100644 --- a/src/test/ui/issues/issue-4366.stderr +++ b/src/test/ui/issues/issue-4366.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find function `foo` in this scope --> $DIR/issue-4366.rs:18:29 | -LL | fn sub() -> isize { foo(); 1 } //~ ERROR cannot find function `foo` in this scope +LL | fn sub() -> isize { foo(); 1 } | ^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | diff --git a/src/test/ui/issues/issue-43733.stderr b/src/test/ui/issues/issue-43733.stderr index 38fa93d4461..c48f9baf271 100644 --- a/src/test/ui/issues/issue-43733.stderr +++ b/src/test/ui/issues/issue-43733.stderr @@ -1,7 +1,7 @@ error[E0133]: call to unsafe function is unsafe and requires unsafe function or block --> $DIR/issue-43733.rs:20:5 | -LL | __KEY.get() //~ ERROR call to unsafe function is unsafe +LL | __KEY.get() | ^^^^^^^^^^^ call to unsafe function | = note: consult the function's documentation for information on how to avoid undefined behavior diff --git a/src/test/ui/issues/issue-43784-associated-type.stderr b/src/test/ui/issues/issue-43784-associated-type.stderr index 4beb854b0f3..fc05d280693 100644 --- a/src/test/ui/issues/issue-43784-associated-type.stderr +++ b/src/test/ui/issues/issue-43784-associated-type.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied --> $DIR/issue-43784-associated-type.rs:13:9 | -LL | impl Complete for T { //~ ERROR the trait bound `T: std::marker::Copy` is not satisfied +LL | impl Complete for T { | ^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` | = help: consider adding a `where T: std::marker::Copy` bound diff --git a/src/test/ui/issues/issue-43784-supertrait.stderr b/src/test/ui/issues/issue-43784-supertrait.stderr index 7771f9abfb8..4c423f2e77f 100644 --- a/src/test/ui/issues/issue-43784-supertrait.stderr +++ b/src/test/ui/issues/issue-43784-supertrait.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied --> $DIR/issue-43784-supertrait.rs:8:9 | -LL | impl Complete for T {} //~ ERROR the trait bound `T: std::marker::Copy` is not satisfied +LL | impl Complete for T {} | ^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` | = help: consider adding a `where T: std::marker::Copy` bound diff --git a/src/test/ui/issues/issue-43925.stderr b/src/test/ui/issues/issue-43925.stderr index e73c2122a03..739ace10aa6 100644 --- a/src/test/ui/issues/issue-43925.stderr +++ b/src/test/ui/issues/issue-43925.stderr @@ -1,7 +1,7 @@ error: invalid argument for `cfg(..)` --> $DIR/issue-43925.rs:1:24 | -LL | #[link(name="foo", cfg("rlib"))] //~ ERROR invalid argument for `cfg(..)` +LL | #[link(name="foo", cfg("rlib"))] | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-43926.stderr b/src/test/ui/issues/issue-43926.stderr index 9dc9cfe5db2..d9d6b3a34fe 100644 --- a/src/test/ui/issues/issue-43926.stderr +++ b/src/test/ui/issues/issue-43926.stderr @@ -1,7 +1,7 @@ error: `cfg()` must have an argument --> $DIR/issue-43926.rs:1:20 | -LL | #[link(name="foo", cfg())] //~ ERROR `cfg()` must have an argument +LL | #[link(name="foo", cfg())] | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-44021.stderr b/src/test/ui/issues/issue-44021.stderr index 03f11312d46..94500087e55 100644 --- a/src/test/ui/issues/issue-44021.stderr +++ b/src/test/ui/issues/issue-44021.stderr @@ -1,7 +1,7 @@ error: expected one of `:`, `@`, or `|`, found `}` --> $DIR/issue-44021.rs:3:18 | -LL | fn f() {|x, y} //~ ERROR expected one of `:`, `@`, or `|`, found `}` +LL | fn f() {|x, y} | ^ expected one of `:`, `@`, or `|` here error: aborting due to previous error diff --git a/src/test/ui/issues/issue-44023.stderr b/src/test/ui/issues/issue-44023.stderr index f1962a86ee0..153be363c1d 100644 --- a/src/test/ui/issues/issue-44023.stderr +++ b/src/test/ui/issues/issue-44023.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-44023.rs:5:36 | -LL | fn საჭმელად_გემრიელი_სადილი ( ) -> isize { //~ ERROR mismatched types +LL | fn საჭმელად_გემრიელი_სადილი ( ) -> isize { | ------------------------ ^^^^^ expected isize, found () | | | this function's body doesn't return diff --git a/src/test/ui/issues/issue-44078.stderr b/src/test/ui/issues/issue-44078.stderr index e7f46130f11..43b49e46312 100644 --- a/src/test/ui/issues/issue-44078.stderr +++ b/src/test/ui/issues/issue-44078.stderr @@ -1,7 +1,7 @@ error: unterminated double quote string --> $DIR/issue-44078.rs:2:8 | -LL | "😊""; //~ ERROR unterminated double quote +LL | "😊""; | _________^ LL | | } | |__^ diff --git a/src/test/ui/issues/issue-44373.stderr b/src/test/ui/issues/issue-44373.stderr index 5a4bf18f3d5..c5295583390 100644 --- a/src/test/ui/issues/issue-44373.stderr +++ b/src/test/ui/issues/issue-44373.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/issue-44373.rs:4:42 | -LL | let _val: &'static [&'static u32] = &[&FOO]; //~ ERROR borrowed value does not live long enough +LL | let _val: &'static [&'static u32] = &[&FOO]; | ^^^^^^ temporary value does not live long enough LL | } | - temporary value only lives until here diff --git a/src/test/ui/issues/issue-44406.stderr b/src/test/ui/issues/issue-44406.stderr index 105dbb677dc..14b3b8cc5c8 100644 --- a/src/test/ui/issues/issue-44406.stderr +++ b/src/test/ui/issues/issue-44406.stderr @@ -1,11 +1,11 @@ error: expected identifier, found keyword `true` --> $DIR/issue-44406.rs:8:10 | -LL | foo!(true); //~ ERROR expected type, found keyword +LL | foo!(true); | ^^^^ expected identifier, found keyword help: you can escape reserved keywords to use them as identifiers | -LL | foo!(r#true); //~ ERROR expected type, found keyword +LL | foo!(r#true); | ^^^^^^ error: expected type, found keyword `true` @@ -14,7 +14,7 @@ error: expected type, found keyword `true` LL | bar(baz: $rest) | - help: try using a semicolon: `;` ... -LL | foo!(true); //~ ERROR expected type, found keyword +LL | foo!(true); | ^^^^ expecting a type here because of type ascription error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-45107-unnecessary-unsafe-in-closure.stderr b/src/test/ui/issues/issue-45107-unnecessary-unsafe-in-closure.stderr index 3510112daf0..71fbba562ca 100644 --- a/src/test/ui/issues/issue-45107-unnecessary-unsafe-in-closure.stderr +++ b/src/test/ui/issues/issue-45107-unnecessary-unsafe-in-closure.stderr @@ -4,7 +4,7 @@ error: unnecessary `unsafe` block LL | unsafe { | ------ because it's nested under this `unsafe` block LL | let f = |v: &mut Vec<_>| { -LL | unsafe { //~ ERROR unnecessary `unsafe` +LL | unsafe { | ^^^^^^ unnecessary `unsafe` block | note: lint level defined here @@ -19,7 +19,7 @@ error: unnecessary `unsafe` block LL | unsafe { | ------ because it's nested under this `unsafe` block ... -LL | |w: &mut Vec| { unsafe { //~ ERROR unnecessary `unsafe` +LL | |w: &mut Vec| { unsafe { | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block @@ -28,7 +28,7 @@ error: unnecessary `unsafe` block LL | unsafe { | ------ because it's nested under this `unsafe` block ... -LL | |x: &mut Vec| { unsafe { //~ ERROR unnecessary `unsafe` +LL | |x: &mut Vec| { unsafe { | ^^^^^^ unnecessary `unsafe` block error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-45157.stderr b/src/test/ui/issues/issue-45157.stderr index 3b15a8dbd9e..fbfa1d19956 100644 --- a/src/test/ui/issues/issue-45157.stderr +++ b/src/test/ui/issues/issue-45157.stderr @@ -6,7 +6,7 @@ LL | let mref = &mut u.s.a; ... LL | let nref = &u.z.c; | ^^^^^^ immutable borrow of `u.z.c` -- which overlaps with `u.s.a` -- occurs here -LL | //~^ ERROR cannot borrow `u` (via `u.z.c`) as immutable because it is also borrowed as mutable (via `u.s.a`) [E0502] +LL | LL | println!("{} {}", mref, nref) | ---- mutable borrow later used here | diff --git a/src/test/ui/issues/issue-45296.stderr b/src/test/ui/issues/issue-45296.stderr index afea28fb7aa..bc14d20b623 100644 --- a/src/test/ui/issues/issue-45296.stderr +++ b/src/test/ui/issues/issue-45296.stderr @@ -1,7 +1,7 @@ error: an inner attribute is not permitted in this context --> $DIR/issue-45296.rs:4:7 | -LL | #![allow(unused_variables)] //~ ERROR not permitted in this context +LL | #![allow(unused_variables)] | ^ | = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them. diff --git a/src/test/ui/issues/issue-45730.stderr b/src/test/ui/issues/issue-45730.stderr index 4f2784c6c36..3c400d6eefa 100644 --- a/src/test/ui/issues/issue-45730.stderr +++ b/src/test/ui/issues/issue-45730.stderr @@ -1,7 +1,7 @@ error[E0641]: cannot cast to a pointer of an unknown kind --> $DIR/issue-45730.rs:3:23 | -LL | let x: *const _ = 0 as _; //~ ERROR cannot cast +LL | let x: *const _ = 0 as _; | ^^^^^- | | | help: consider giving more type information @@ -11,7 +11,7 @@ LL | let x: *const _ = 0 as _; //~ ERROR cannot cast error[E0641]: cannot cast to a pointer of an unknown kind --> $DIR/issue-45730.rs:5:23 | -LL | let x: *const _ = 0 as *const _; //~ ERROR cannot cast +LL | let x: *const _ = 0 as *const _; | ^^^^^-------- | | | help: consider giving more type information @@ -21,7 +21,7 @@ LL | let x: *const _ = 0 as *const _; //~ ERROR cannot cast error[E0641]: cannot cast to a pointer of an unknown kind --> $DIR/issue-45730.rs:8:13 | -LL | let x = 0 as *const i32 as *const _ as *mut _; //~ ERROR cannot cast +LL | let x = 0 as *const i32 as *const _ as *mut _; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------ | | | help: consider giving more type information diff --git a/src/test/ui/issues/issue-46036.stderr b/src/test/ui/issues/issue-46036.stderr index 40a77f925b9..9c1746e0fa1 100644 --- a/src/test/ui/issues/issue-46036.stderr +++ b/src/test/ui/issues/issue-46036.stderr @@ -1,7 +1,7 @@ error[E0597]: `a` does not live long enough --> $DIR/issue-46036.rs:9:24 | -LL | let foo = Foo { x: &a }; //~ ERROR E0597 +LL | let foo = Foo { x: &a }; | ^^ | | | borrowed value does not live long enough diff --git a/src/test/ui/issues/issue-46311.stderr b/src/test/ui/issues/issue-46311.stderr index 8ceb1d62c25..d72d6477db6 100644 --- a/src/test/ui/issues/issue-46311.stderr +++ b/src/test/ui/issues/issue-46311.stderr @@ -1,7 +1,7 @@ error: invalid label name `'break` --> $DIR/issue-46311.rs:2:5 | -LL | 'break: loop { //~ ERROR invalid label name `'break` +LL | 'break: loop { | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-46438.stderr b/src/test/ui/issues/issue-46438.stderr index c670459c781..c1fad44b885 100644 --- a/src/test/ui/issues/issue-46438.stderr +++ b/src/test/ui/issues/issue-46438.stderr @@ -1,7 +1,7 @@ error: expected a trait, found type --> $DIR/issue-46438.rs:11:4 | -LL | m!(&'static u8); //~ ERROR expected a trait, found type +LL | m!(&'static u8); | ^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-46771.stderr b/src/test/ui/issues/issue-46771.stderr index 3c9c679ece4..76c86d7aa90 100644 --- a/src/test/ui/issues/issue-46771.stderr +++ b/src/test/ui/issues/issue-46771.stderr @@ -3,7 +3,7 @@ error[E0618]: expected function, found `main::Foo` | LL | struct Foo; | ----------- `main::Foo` defined here -LL | (1 .. 2).find(|_| Foo(0) == 0); //~ ERROR expected function, found `main::Foo` +LL | (1 .. 2).find(|_| Foo(0) == 0); | ^^^--- | | | call expression requires function diff --git a/src/test/ui/issues/issue-46843.stderr b/src/test/ui/issues/issue-46843.stderr index d02561e4a27..c252f0d0758 100644 --- a/src/test/ui/issues/issue-46843.stderr +++ b/src/test/ui/issues/issue-46843.stderr @@ -1,13 +1,13 @@ error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants --> $DIR/issue-46843.rs:7:26 | -LL | pub const Q: i32 = match non_const() { //~ ERROR E0015 +LL | pub const Q: i32 = match non_const() { | ^^^^^^^^^^^ error[E0019]: constant contains unimplemented expression type --> $DIR/issue-46843.rs:8:5 | -LL | Thing::This => 1, //~ ERROR unimplemented expression type +LL | Thing::This => 1, | ^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-4736.stderr b/src/test/ui/issues/issue-4736.stderr index 39c649ba3e0..b4ac12643bc 100644 --- a/src/test/ui/issues/issue-4736.stderr +++ b/src/test/ui/issues/issue-4736.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `NonCopyable` has no field named `p` --> $DIR/issue-4736.rs:4:26 | -LL | let z = NonCopyable{ p: () }; //~ ERROR struct `NonCopyable` has no field named `p` +LL | let z = NonCopyable{ p: () }; | ^ help: a field with a similar name exists: `0` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-47623.stderr b/src/test/ui/issues/issue-47623.stderr index eb160ff86ae..53968a2960c 100644 --- a/src/test/ui/issues/issue-47623.stderr +++ b/src/test/ui/issues/issue-47623.stderr @@ -1,7 +1,7 @@ error[E0429]: `self` imports are only allowed within a { } list --> $DIR/issue-47623.rs:1:5 | -LL | use self; //~ERROR `self` imports are only allowed within a { } list +LL | use self; | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-47646.stderr b/src/test/ui/issues/issue-47646.stderr index c30fedeea73..db9f227d6b7 100644 --- a/src/test/ui/issues/issue-47646.stderr +++ b/src/test/ui/issues/issue-47646.stderr @@ -7,7 +7,7 @@ LL | LL | match (borrow, ()) { | ------------ a temporary with access to the mutable borrow is created here ... LL | (Some(_), ()) => { -LL | println!("{:?}", heap); //~ ERROR cannot borrow `heap` as immutable +LL | println!("{:?}", heap); | ^^^^ immutable borrow occurs here ... LL | }; diff --git a/src/test/ui/issues/issue-48131.stderr b/src/test/ui/issues/issue-48131.stderr index 6e454173f8b..adc36e266c2 100644 --- a/src/test/ui/issues/issue-48131.stderr +++ b/src/test/ui/issues/issue-48131.stderr @@ -1,19 +1,19 @@ error: unnecessary `unsafe` block --> $DIR/issue-48131.rs:8:9 | -LL | unsafe { /* unnecessary */ } //~ ERROR unnecessary `unsafe` +LL | unsafe { /* unnecessary */ } | ^^^^^^ unnecessary `unsafe` block | note: lint level defined here --> $DIR/issue-48131.rs:3:9 | -LL | #![deny(unused_unsafe)] //~ NOTE +LL | #![deny(unused_unsafe)] | ^^^^^^^^^^^^^ error: unnecessary `unsafe` block --> $DIR/issue-48131.rs:19:13 | -LL | unsafe { /* unnecessary */ } //~ ERROR unnecessary `unsafe` +LL | unsafe { /* unnecessary */ } | ^^^^^^ unnecessary `unsafe` block error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-48728.stderr b/src/test/ui/issues/issue-48728.stderr index e2f549ac425..99a9bf9903e 100644 --- a/src/test/ui/issues/issue-48728.stderr +++ b/src/test/ui/issues/issue-48728.stderr @@ -1,7 +1,7 @@ error[E0119]: conflicting implementations of trait `std::clone::Clone` for type `Node<[_]>`: --> $DIR/issue-48728.rs:4:10 | -LL | #[derive(Clone)] //~ ERROR conflicting implementations of trait `std::clone::Clone` +LL | #[derive(Clone)] | ^^^^^ conflicting implementation for `Node<[_]>` ... LL | impl Clone for Node<[T]> { diff --git a/src/test/ui/issues/issue-48803.stderr b/src/test/ui/issues/issue-48803.stderr index 2635520ef07..9a6da9e625d 100644 --- a/src/test/ui/issues/issue-48803.stderr +++ b/src/test/ui/issues/issue-48803.stderr @@ -6,7 +6,7 @@ LL | let y = &x; ... LL | x = "modified"; | ^^^^^^^^^^^^^^ assignment to borrowed `x` occurs here -LL | //~^ ERROR cannot assign to `x` because it is borrowed [E0506] +LL | LL | println!("{}", w); // prints "modified" | - borrow later used here diff --git a/src/test/ui/issues/issue-48838.stderr b/src/test/ui/issues/issue-48838.stderr index 32eea5e5fbb..3007d67336b 100644 --- a/src/test/ui/issues/issue-48838.stderr +++ b/src/test/ui/issues/issue-48838.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-48838.rs:2:14 | -LL | Square = |x| x, //~ ERROR mismatched types +LL | Square = |x| x, | ^^^^^ expected isize, found closure | = note: expected type `isize` diff --git a/src/test/ui/issues/issue-49040.stderr b/src/test/ui/issues/issue-49040.stderr index 12e78e2f3bc..de78b8d3c14 100644 --- a/src/test/ui/issues/issue-49040.stderr +++ b/src/test/ui/issues/issue-49040.stderr @@ -1,7 +1,7 @@ error: expected item, found `;` --> $DIR/issue-49040.rs:1:28 | -LL | #![allow(unused_variables)]; //~ ERROR expected item, found `;` +LL | #![allow(unused_variables)]; | ^ help: remove this semicolon error[E0601]: `main` function not found in crate `issue_49040` diff --git a/src/test/ui/issues/issue-49074.stderr b/src/test/ui/issues/issue-49074.stderr index a25d8ee3526..b41d9130f12 100644 --- a/src/test/ui/issues/issue-49074.stderr +++ b/src/test/ui/issues/issue-49074.stderr @@ -9,7 +9,7 @@ LL | #[marco_use] // typo error: cannot find macro `bar!` in this scope --> $DIR/issue-49074.rs:12:4 | -LL | bar!(); //~ ERROR cannot find macro `bar!` in this scope +LL | bar!(); | ^^^ | = help: have you added the `#[macro_use]` on the module/import? diff --git a/src/test/ui/issues/issue-49257.stderr b/src/test/ui/issues/issue-49257.stderr index 0bccfbbf7e5..43a505cfe85 100644 --- a/src/test/ui/issues/issue-49257.stderr +++ b/src/test/ui/issues/issue-49257.stderr @@ -1,33 +1,33 @@ error: expected `}`, found `,` --> $DIR/issue-49257.rs:10:19 | -LL | let Point { .., y, } = p; //~ ERROR expected `}`, found `,` +LL | let Point { .., y, } = p; | --^ | | | | | expected `}` | `..` must be at the end and cannot have a trailing comma help: move the `..` to the end of the field list | -LL | let Point { y, .. } = p; //~ ERROR expected `}`, found `,` +LL | let Point { y, .. } = p; | -- ^^^^ error: expected `}`, found `,` --> $DIR/issue-49257.rs:11:19 | -LL | let Point { .., y } = p; //~ ERROR expected `}`, found `,` +LL | let Point { .., y } = p; | --^ | | | | | expected `}` | `..` must be at the end and cannot have a trailing comma help: move the `..` to the end of the field list | -LL | let Point { y , .. } = p; //~ ERROR expected `}`, found `,` +LL | let Point { y , .. } = p; | -- ^^^^^^ error: expected `}`, found `,` --> $DIR/issue-49257.rs:12:19 | -LL | let Point { .., } = p; //~ ERROR expected `}`, found `,` +LL | let Point { .., } = p; | --^ | | | | | expected `}` diff --git a/src/test/ui/issues/issue-4935.stderr b/src/test/ui/issues/issue-4935.stderr index 42869ab4831..a99581fdca1 100644 --- a/src/test/ui/issues/issue-4935.stderr +++ b/src/test/ui/issues/issue-4935.stderr @@ -3,7 +3,7 @@ error[E0061]: this function takes 1 parameter but 2 parameters were supplied | LL | fn foo(a: usize) {} | ---------------- defined here -LL | //~^ defined here +LL | LL | fn main() { foo(5, 6) } | ^^^^^^^^^ expected 1 parameter diff --git a/src/test/ui/issues/issue-4972.stderr b/src/test/ui/issues/issue-4972.stderr index 30664c90ce8..b1947e2a9df 100644 --- a/src/test/ui/issues/issue-4972.stderr +++ b/src/test/ui/issues/issue-4972.stderr @@ -1,7 +1,7 @@ error[E0033]: type `std::boxed::Box<(dyn MyTrait + 'static)>` cannot be dereferenced --> $DIR/issue-4972.rs:14:25 | -LL | TraitWrapper::A(box ref map) => map, //~ ERROR cannot be dereferenced +LL | TraitWrapper::A(box ref map) => map, | ^^^^^^^^^^^ type `std::boxed::Box<(dyn MyTrait + 'static)>` cannot be dereferenced error: aborting due to previous error diff --git a/src/test/ui/issues/issue-49824.stderr b/src/test/ui/issues/issue-49824.stderr index f487c363ea6..4ad537f3eb5 100644 --- a/src/test/ui/issues/issue-49824.stderr +++ b/src/test/ui/issues/issue-49824.stderr @@ -2,7 +2,7 @@ error: compilation successful --> $DIR/issue-49824.rs:8:1 | LL | / fn main() { -LL | | //~^ compilation successful +LL | | LL | | let mut x = 0; LL | | || { ... | diff --git a/src/test/ui/issues/issue-49934.stderr b/src/test/ui/issues/issue-49934.stderr index 295f4f1b559..6ca751a47c4 100644 --- a/src/test/ui/issues/issue-49934.stderr +++ b/src/test/ui/issues/issue-49934.stderr @@ -9,31 +9,31 @@ LL | #[derive(Debug)] warning: unused attribute --> $DIR/issue-49934.rs:6:8 | -LL | fn foo<#[derive(Debug)] T>() { //~ WARN unused attribute +LL | fn foo<#[derive(Debug)] T>() { | ^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/issue-49934.rs:4:9 | -LL | #![warn(unused_attributes)] //~ NOTE lint level defined here +LL | #![warn(unused_attributes)] | ^^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-49934.rs:8:9 | -LL | #[derive(Debug)] //~ WARN unused attribute +LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-49934.rs:26:5 | -LL | #[derive(Debug)] //~ WARN unused attribute +LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ warning: unused attribute --> $DIR/issue-49934.rs:30:5 | -LL | #[derive(Debug)] //~ WARN unused attribute +LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ warning: unused attribute @@ -45,6 +45,6 @@ LL | let _ = #[derive(Debug)] "Hello, world!"; warning: unused attribute --> $DIR/issue-49934.rs:39:9 | -LL | #[derive(Debug)] //~ WARN unused attribute +LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/issues/issue-50403.stderr b/src/test/ui/issues/issue-50403.stderr index f84d9d7769d..d20a98ecc6a 100644 --- a/src/test/ui/issues/issue-50403.stderr +++ b/src/test/ui/issues/issue-50403.stderr @@ -1,7 +1,7 @@ error: concat_idents! takes 1 or more arguments. --> $DIR/issue-50403.rs:4:13 | -LL | let x = concat_idents!(); //~ ERROR concat_idents! takes 1 or more arguments +LL | let x = concat_idents!(); | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-50480.stderr b/src/test/ui/issues/issue-50480.stderr index 240a0f22286..fb111e87d18 100644 --- a/src/test/ui/issues/issue-50480.stderr +++ b/src/test/ui/issues/issue-50480.stderr @@ -18,7 +18,7 @@ error[E0204]: the trait `Copy` may not be implemented for this type | LL | #[derive(Clone, Copy)] | ^^^^ -LL | //~^ ERROR the trait `Copy` may not be implemented for this type +LL | LL | struct Foo(NotDefined, ::Item, Vec, String); | -------- ------ this field does not implement `Copy` | | diff --git a/src/test/ui/issues/issue-50576.stderr b/src/test/ui/issues/issue-50576.stderr index 98624d141a6..22d978262c4 100644 --- a/src/test/ui/issues/issue-50576.stderr +++ b/src/test/ui/issues/issue-50576.stderr @@ -13,7 +13,7 @@ LL | |bool: [u8; break 'L]| 0; error[E0268]: `break` outside of loop --> $DIR/issue-50576.rs:5:16 | -LL | Vec::<[u8; break]>::new(); //~ ERROR [E0268] +LL | Vec::<[u8; break]>::new(); | ^^^^^ cannot break outside of a loop error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-50581.stderr b/src/test/ui/issues/issue-50581.stderr index 70ac9ecc9ed..01a5f9b3c44 100644 --- a/src/test/ui/issues/issue-50581.stderr +++ b/src/test/ui/issues/issue-50581.stderr @@ -1,7 +1,7 @@ error[E0268]: `break` outside of loop --> $DIR/issue-50581.rs:2:14 | -LL | |_: [u8; break]| (); //~ ERROR [E0268] +LL | |_: [u8; break]| (); | ^^^^^ cannot break outside of a loop error: aborting due to previous error diff --git a/src/test/ui/issues/issue-50599.stderr b/src/test/ui/issues/issue-50599.stderr index cf2f309340d..e0c9bea4023 100644 --- a/src/test/ui/issues/issue-50599.stderr +++ b/src/test/ui/issues/issue-50599.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `LOG10_2` in module `std::f64` --> $DIR/issue-50599.rs:3:48 | -LL | const M: usize = (f64::from(N) * std::f64::LOG10_2) as usize; //~ ERROR cannot find value +LL | const M: usize = (f64::from(N) * std::f64::LOG10_2) as usize; | ^^^^^^^ not found in `std::f64` help: possible candidates are found in other modules, you can import them into scope | diff --git a/src/test/ui/issues/issue-50600.stderr b/src/test/ui/issues/issue-50600.stderr index 36219390c51..2d97c2781c2 100644 --- a/src/test/ui/issues/issue-50600.stderr +++ b/src/test/ui/issues/issue-50600.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-50600.rs:2:13 | -LL | fn([u8; |x: u8| {}]), //~ ERROR mismatched types +LL | fn([u8; |x: u8| {}]), | ^^^^^^^^^^ expected usize, found closure | = note: expected type `usize` diff --git a/src/test/ui/issues/issue-50688.stderr b/src/test/ui/issues/issue-50688.stderr index 2a1315c9a01..13eec8361ba 100644 --- a/src/test/ui/issues/issue-50688.stderr +++ b/src/test/ui/issues/issue-50688.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-50688.rs:2:9 | -LL | [1; || {}]; //~ ERROR mismatched types +LL | [1; || {}]; | ^^^^^ expected usize, found closure | = note: expected type `usize` diff --git a/src/test/ui/issues/issue-50714-1.stderr b/src/test/ui/issues/issue-50714-1.stderr index e5fdd18d332..427b200adf4 100644 --- a/src/test/ui/issues/issue-50714-1.stderr +++ b/src/test/ui/issues/issue-50714-1.stderr @@ -1,7 +1,7 @@ error[E0647]: start function is not allowed to have a `where` clause --> $DIR/issue-50714-1.rs:9:56 | -LL | fn start(_: isize, _: *const *const u8) -> isize where fn(&()): Eq { //~ ERROR [E0647] +LL | fn start(_: isize, _: *const *const u8) -> isize where fn(&()): Eq { | ^^^^^^^^^^^ start function cannot have a `where` clause error: aborting due to previous error diff --git a/src/test/ui/issues/issue-50714.stderr b/src/test/ui/issues/issue-50714.stderr index d7631adc7b2..e048f39260c 100644 --- a/src/test/ui/issues/issue-50714.stderr +++ b/src/test/ui/issues/issue-50714.stderr @@ -1,7 +1,7 @@ error[E0646]: `main` function is not allowed to have a `where` clause --> $DIR/issue-50714.rs:3:17 | -LL | fn main() where fn(&()): Eq {} //~ ERROR [E0646] +LL | fn main() where fn(&()): Eq {} | ^^^^^^^^^^^ `main` cannot have a `where` clause error: aborting due to previous error diff --git a/src/test/ui/issues/issue-50781.stderr b/src/test/ui/issues/issue-50781.stderr index 11de59f9f00..c98f78c51ee 100644 --- a/src/test/ui/issues/issue-50781.stderr +++ b/src/test/ui/issues/issue-50781.stderr @@ -1,7 +1,7 @@ error: the trait `X` cannot be made into an object --> $DIR/issue-50781.rs:6:5 | -LL | fn foo(&self) where Self: Trait; //~ ERROR the trait `X` cannot be made into an object +LL | fn foo(&self) where Self: Trait; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/issues/issue-50802.stderr b/src/test/ui/issues/issue-50802.stderr index 9a2ae794293..e064fabccd0 100644 --- a/src/test/ui/issues/issue-50802.stderr +++ b/src/test/ui/issues/issue-50802.stderr @@ -1,7 +1,7 @@ error[E0590]: `break` or `continue` with no label in the condition of a `while` loop --> $DIR/issue-50802.rs:5:21 | -LL | break while continue { //~ ERROR E0590 +LL | break while continue { | ^^^^^^^^ unlabeled `continue` in the condition of a `while` loop error: aborting due to previous error diff --git a/src/test/ui/issues/issue-5099.stderr b/src/test/ui/issues/issue-5099.stderr index d103c968979..cc11db9c5ec 100644 --- a/src/test/ui/issues/issue-5099.stderr +++ b/src/test/ui/issues/issue-5099.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `this` in this scope --> $DIR/issue-5099.rs:1:31 | -LL | trait B < A > { fn a() -> A { this.a } } //~ ERROR cannot find value `this` in this scope +LL | trait B < A > { fn a() -> A { this.a } } | ^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/issues/issue-5100.stderr b/src/test/ui/issues/issue-5100.stderr index 0a918a78970..0c1a0289cf2 100644 --- a/src/test/ui/issues/issue-5100.stderr +++ b/src/test/ui/issues/issue-5100.stderr @@ -48,7 +48,7 @@ LL | &(true, false) => () error[E0618]: expected function, found `(char, char)` --> $DIR/issue-5100.rs:48:14 | -LL | let v = [('a', 'b') //~ ERROR expected function, found `(char, char)` +LL | let v = [('a', 'b') | ______________-^^^^^^^^^ LL | | ('c', 'd'), | |_______________________- call expression requires function @@ -56,7 +56,7 @@ LL | | ('c', 'd'), error[E0308]: mismatched types --> $DIR/issue-5100.rs:55:19 | -LL | let x: char = true; //~ ERROR mismatched types +LL | let x: char = true; | ^^^^ expected char, found bool error: aborting due to 7 previous errors diff --git a/src/test/ui/issues/issue-51116.stderr b/src/test/ui/issues/issue-51116.stderr index 4c1870eb8c9..8501ae6a1d0 100644 --- a/src/test/ui/issues/issue-51116.stderr +++ b/src/test/ui/issues/issue-51116.stderr @@ -3,7 +3,7 @@ error[E0282]: type annotations needed | LL | for tile in row { | --- the element type for this iterator is not specified -LL | //~^ NOTE the element type for this iterator is not specified +LL | LL | *tile = 0; | ^^^^^ cannot infer type | diff --git a/src/test/ui/issues/issue-51244.stderr b/src/test/ui/issues/issue-51244.stderr index a5b06aa2282..f798b5f1fce 100644 --- a/src/test/ui/issues/issue-51244.stderr +++ b/src/test/ui/issues/issue-51244.stderr @@ -3,7 +3,7 @@ error[E0594]: cannot assign to immutable borrowed content `*my_ref` | LL | let ref my_ref @ _ = 0; | -------------- help: use a mutable reference instead: `ref mut my_ref @ _` -LL | *my_ref = 0; //~ ERROR cannot assign to immutable borrowed content `*my_ref` [E0594] +LL | *my_ref = 0; | ^^^^^^^^^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/issues/issue-51848.stderr b/src/test/ui/issues/issue-51848.stderr index 1bb6f3c1f1f..31faaab6141 100644 --- a/src/test/ui/issues/issue-51848.stderr +++ b/src/test/ui/issues/issue-51848.stderr @@ -1,7 +1,7 @@ error: invalid format string: expected `'}'` but string was terminated --> $DIR/issue-51848.rs:6:20 | -LL | println!("{"); //~ ERROR invalid +LL | println!("{"); | -^ expected `'}'` in format string | | | because of this opening brace @@ -14,7 +14,7 @@ LL | macro_with_error!(); error: invalid format string: unmatched `}` found --> $DIR/issue-51848.rs:18:15 | -LL | println!("}"); //~ ERROR invalid +LL | println!("}"); | ^ unmatched `}` in format string | = note: if you intended to print `}`, you can escape it using `}}` diff --git a/src/test/ui/issues/issue-51874.stderr b/src/test/ui/issues/issue-51874.stderr index 38c380c4bab..9b1a6bf2e12 100644 --- a/src/test/ui/issues/issue-51874.stderr +++ b/src/test/ui/issues/issue-51874.stderr @@ -1,11 +1,11 @@ error[E0689]: can't call method `pow` on ambiguous numeric type `{float}` --> $DIR/issue-51874.rs:2:19 | -LL | let a = (1.0).pow(1.0); //~ ERROR can't call method `pow` on ambiguous numeric type +LL | let a = (1.0).pow(1.0); | ^^^ help: you must specify a concrete type for this numeric value, like `f32` | -LL | let a = (1.0_f32).pow(1.0); //~ ERROR can't call method `pow` on ambiguous numeric type +LL | let a = (1.0_f32).pow(1.0); | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-52023-array-size-pointer-cast.stderr b/src/test/ui/issues/issue-52023-array-size-pointer-cast.stderr index f687be5edb0..60e0792954a 100644 --- a/src/test/ui/issues/issue-52023-array-size-pointer-cast.stderr +++ b/src/test/ui/issues/issue-52023-array-size-pointer-cast.stderr @@ -1,7 +1,7 @@ error[E0658]: casting pointers to integers in constants is unstable (see issue #51910) --> $DIR/issue-52023-array-size-pointer-cast.rs:2:17 | -LL | let _ = [0; (&0 as *const i32) as usize]; //~ ERROR casting pointers to integers in constants +LL | let _ = [0; (&0 as *const i32) as usize]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(const_raw_ptr_to_usize_cast)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | let _ = [0; (&0 as *const i32) as usize]; //~ ERROR casting pointers to error[E0080]: it is undefined behavior to use this value --> $DIR/issue-52023-array-size-pointer-cast.rs:2:17 | -LL | let _ = [0; (&0 as *const i32) as usize]; //~ ERROR casting pointers to integers in constants +LL | let _ = [0; (&0 as *const i32) as usize]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a pointer, but expected initialized plain (non-pointer) bytes | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior diff --git a/src/test/ui/issues/issue-5216.stderr b/src/test/ui/issues/issue-5216.stderr index 5afea5873d5..ccfe7e04a2c 100644 --- a/src/test/ui/issues/issue-5216.stderr +++ b/src/test/ui/issues/issue-5216.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-5216.rs:3:21 | -LL | pub static C: S = S(f); //~ ERROR mismatched types +LL | pub static C: S = S(f); | ^ expected struct `std::boxed::Box`, found fn item | = note: expected type `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>` @@ -10,7 +10,7 @@ LL | pub static C: S = S(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/issue-5216.rs:8:19 | -LL | pub static D: T = g; //~ ERROR mismatched types +LL | pub static D: T = g; | ^ expected struct `std::boxed::Box`, found fn item | = note: expected type `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>` diff --git a/src/test/ui/issues/issue-52213.stderr b/src/test/ui/issues/issue-52213.stderr index 4d3346f325d..8d74b8ecb88 100644 --- a/src/test/ui/issues/issue-52213.stderr +++ b/src/test/ui/issues/issue-52213.stderr @@ -1,7 +1,7 @@ error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements --> $DIR/issue-52213.rs:2:11 | -LL | match (&t,) { //~ ERROR cannot infer an appropriate lifetime +LL | match (&t,) { | ^^^^^ | note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 1:23... diff --git a/src/test/ui/issues/issue-52891.stderr b/src/test/ui/issues/issue-52891.stderr index 65b2b9460bc..1385693e91a 100644 --- a/src/test/ui/issues/issue-52891.stderr +++ b/src/test/ui/issues/issue-52891.stderr @@ -3,7 +3,7 @@ error[E0252]: the name `a` is defined multiple times | LL | use issue_52891::a; | -------------- previous import of the module `a` here -LL | use issue_52891::a; //~ ERROR `a` is defined multiple times +LL | use issue_52891::a; | ----^^^^^^^^^^^^^^- | | | | | `a` reimported here @@ -17,7 +17,7 @@ error[E0252]: the name `a` is defined multiple times LL | use issue_52891::a; | -------------- previous import of the module `a` here ... -LL | use issue_52891::{a, b, c}; //~ ERROR `a` is defined multiple times +LL | use issue_52891::{a, b, c}; | ^-- | | | `a` reimported here @@ -31,7 +31,7 @@ error[E0252]: the name `a` is defined multiple times LL | use issue_52891::a; | -------------- previous import of the module `a` here ... -LL | use issue_52891::{d, a, e}; //~ ERROR `a` is defined multiple times +LL | use issue_52891::{d, a, e}; | ^-- | | | `a` reimported here @@ -45,7 +45,7 @@ error[E0252]: the name `a` is defined multiple times LL | use issue_52891::a; | -------------- previous import of the module `a` here ... -LL | use issue_52891::{f, g, a}; //~ ERROR `a` is defined multiple times +LL | use issue_52891::{f, g, a}; | --^ | | | | | `a` reimported here @@ -59,7 +59,7 @@ error[E0252]: the name `a` is defined multiple times LL | use issue_52891::a; | -------------- previous import of the module `a` here ... -LL | use issue_52891::{a, //~ ERROR `a` is defined multiple times +LL | use issue_52891::{a, | ^-- | | | `a` reimported here @@ -73,7 +73,7 @@ error[E0252]: the name `a` is defined multiple times LL | use issue_52891::a; | -------------- previous import of the module `a` here ... -LL | a, //~ ERROR `a` is defined multiple times +LL | a, | ^-- | | | `a` reimported here @@ -89,7 +89,7 @@ LL | use issue_52891::a; ... LL | m, | ______- -LL | | a}; //~ ERROR `a` is defined multiple times +LL | | a}; | | ^ | | | | |_____`a` reimported here @@ -102,13 +102,13 @@ error[E0252]: the name `inner` is defined multiple times | LL | use issue_52891::a::inner; | --------------------- previous import of the module `inner` here -LL | use issue_52891::b::inner; //~ ERROR `inner` is defined multiple times +LL | use issue_52891::b::inner; | ^^^^^^^^^^^^^^^^^^^^^ `inner` reimported here | = note: `inner` must be defined only once in the type namespace of this module help: you can use `as` to change the binding name of the import | -LL | use issue_52891::b::inner as other_inner; //~ ERROR `inner` is defined multiple times +LL | use issue_52891::b::inner as other_inner; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0254]: the name `issue_52891` is defined multiple times @@ -134,7 +134,7 @@ LL | use issue_52891::n; | | previous import of the module `n` here | help: remove unnecessary import LL | #[macro_use] -LL | use issue_52891::n; //~ ERROR `n` is defined multiple times +LL | use issue_52891::n; | ^^^^^^^^^^^^^^ `n` reimported here | = note: `n` must be defined only once in the type namespace of this module diff --git a/src/test/ui/issues/issue-54348.stderr b/src/test/ui/issues/issue-54348.stderr index d4ee94aa411..e39a1cb20cf 100644 --- a/src/test/ui/issues/issue-54348.stderr +++ b/src/test/ui/issues/issue-54348.stderr @@ -1,7 +1,7 @@ error: index out of bounds: the len is 1 but the index is 1 --> $DIR/issue-54348.rs:3:5 | -LL | [1][1.5 as usize]; //~ ERROR index out of bounds +LL | [1][1.5 as usize]; | ^^^^^^^^^^^^^^^^^ | = note: #[deny(const_err)] on by default @@ -9,7 +9,7 @@ LL | [1][1.5 as usize]; //~ ERROR index out of bounds error: index out of bounds: the len is 1 but the index is 1 --> $DIR/issue-54348.rs:4:5 | -LL | [1][1u64 as usize]; //~ ERROR index out of bounds +LL | [1][1u64 as usize]; | ^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-5439.stderr b/src/test/ui/issues/issue-5439.stderr index 847bc769580..bd0cb670bc2 100644 --- a/src/test/ui/issues/issue-5439.stderr +++ b/src/test/ui/issues/issue-5439.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `Foo` has no field named `nonexistent` --> $DIR/issue-5439.rs:13:26 | -LL | return box Foo { nonexistent: self, foo: i }; //~ ERROR: no field named +LL | return box Foo { nonexistent: self, foo: i }; | ^^^^^^^^^^^ `Foo` does not have this field | = note: available fields are: `foo` diff --git a/src/test/ui/issues/issue-55587.stderr b/src/test/ui/issues/issue-55587.stderr index 876fb4391b1..1334f249256 100644 --- a/src/test/ui/issues/issue-55587.stderr +++ b/src/test/ui/issues/issue-55587.stderr @@ -1,7 +1,7 @@ error[E0164]: expected tuple struct/variant, found method `::new` --> $DIR/issue-55587.rs:4:9 | -LL | let Path::new(); //~ ERROR expected tuple struct/variant +LL | let Path::new(); | ^^^^^^^^^^^ not a tuple variant or struct error: aborting due to previous error diff --git a/src/test/ui/issues/issue-57362-1.stderr b/src/test/ui/issues/issue-57362-1.stderr index b21b35849b1..1d2ff7669c0 100644 --- a/src/test/ui/issues/issue-57362-1.stderr +++ b/src/test/ui/issues/issue-57362-1.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `f` found for type `fn(&u8)` in the current scope --> $DIR/issue-57362-1.rs:20:7 | -LL | a.f(); //~ ERROR no method named `f` +LL | a.f(); | ^ | = note: a is a function, perhaps you wish to call it diff --git a/src/test/ui/issues/issue-57362-2.stderr b/src/test/ui/issues/issue-57362-2.stderr index b8211691f7b..522b201ec78 100644 --- a/src/test/ui/issues/issue-57362-2.stderr +++ b/src/test/ui/issues/issue-57362-2.stderr @@ -1,7 +1,7 @@ error[E0599]: no function or associated item named `make_g` found for type `for<'r> fn(&'r ())` in the current scope --> $DIR/issue-57362-2.rs:22:25 | -LL | let x = ::make_g(); //~ ERROR no function or associated item +LL | let x = ::make_g(); | ------------^^^^^^ | | | function or associated item not found in `for<'r> fn(&'r ())` diff --git a/src/test/ui/issues/issue-57843.stderr b/src/test/ui/issues/issue-57843.stderr index 4ef884cb3f5..57b206d7bff 100644 --- a/src/test/ui/issues/issue-57843.stderr +++ b/src/test/ui/issues/issue-57843.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-57843.rs:23:9 | -LL | Foo(Box::new(|_| ())); //~ ERROR mismatched types +LL | Foo(Box::new(|_| ())); | ^^^^^^^^^^^^^^^^ one type is more general than the other | = note: expected type `std::ops::FnOnce<(&'a bool,)>` diff --git a/src/test/ui/issues/issue-5844.stderr b/src/test/ui/issues/issue-5844.stderr index 876151fb25c..ed5a3dc6b1e 100644 --- a/src/test/ui/issues/issue-5844.stderr +++ b/src/test/ui/issues/issue-5844.stderr @@ -1,7 +1,7 @@ error[E0133]: call to unsafe function is unsafe and requires unsafe function or block --> $DIR/issue-5844.rs:6:5 | -LL | issue_5844_aux::rand(); //~ ERROR: requires unsafe +LL | issue_5844_aux::rand(); | ^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function | = note: consult the function's documentation for information on how to avoid undefined behavior diff --git a/src/test/ui/issues/issue-5883.stderr b/src/test/ui/issues/issue-5883.stderr index ad463d4c478..7753881f736 100644 --- a/src/test/ui/issues/issue-5883.stderr +++ b/src/test/ui/issues/issue-5883.stderr @@ -12,7 +12,7 @@ LL | fn new_struct(r: A+'static) error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time --> $DIR/issue-5883.rs:8:8 | -LL | -> Struct { //~^ ERROR the size for values of type +LL | -> Struct { | ^^^^^^ doesn't have a size known at compile-time | = help: within `Struct`, the trait `std::marker::Sized` is not implemented for `(dyn A + 'static)` diff --git a/src/test/ui/issues/issue-58856-2.stderr b/src/test/ui/issues/issue-58856-2.stderr index 55a9e9d5cb8..b760fd6768a 100644 --- a/src/test/ui/issues/issue-58856-2.stderr +++ b/src/test/ui/issues/issue-58856-2.stderr @@ -19,8 +19,8 @@ error[E0407]: method `how_are_you` is not a member of trait `Howness` --> $DIR/issue-58856-2.rs:6:5 | LL | / fn how_are_you(&self -> Empty { -LL | | //~^ ERROR expected one of `)` or `,`, found `->` -LL | | //~| ERROR method `how_are_you` is not a member of trait `Howness` +LL | | +LL | | LL | | Empty LL | | } | |_____^ not a member of trait `Howness` diff --git a/src/test/ui/issues/issue-5927.stderr b/src/test/ui/issues/issue-5927.stderr index 189eefe51b9..6b0a2b7b935 100644 --- a/src/test/ui/issues/issue-5927.stderr +++ b/src/test/ui/issues/issue-5927.stderr @@ -1,13 +1,13 @@ error[E0531]: cannot find tuple struct/variant `x` in this scope --> $DIR/issue-5927.rs:3:9 | -LL | x(1) => x(1) //~ ERROR cannot find tuple struct/variant `x` in this scope +LL | x(1) => x(1) | ^ not found in this scope error[E0425]: cannot find function `x` in this scope --> $DIR/issue-5927.rs:3:17 | -LL | x(1) => x(1) //~ ERROR cannot find tuple struct/variant `x` in this scope +LL | x(1) => x(1) | ^ not found in this scope error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-5997-struct.stderr b/src/test/ui/issues/issue-5997-struct.stderr index a60987b3f98..cb1b5146b6c 100644 --- a/src/test/ui/issues/issue-5997-struct.stderr +++ b/src/test/ui/issues/issue-5997-struct.stderr @@ -5,7 +5,7 @@ LL | fn f() -> bool { | - - type variable from outer function | | | try adding a local generic parameter in this method instead -LL | struct S(T); //~ ERROR can't use generic parameters from outer function +LL | struct S(T); | ^ use of generic parameter from outer function error: aborting due to previous error diff --git a/src/test/ui/issues/issue-6458-4.stderr b/src/test/ui/issues/issue-6458-4.stderr index c087292e978..90b493e1634 100644 --- a/src/test/ui/issues/issue-6458-4.stderr +++ b/src/test/ui/issues/issue-6458-4.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-6458-4.rs:1:20 | -LL | fn foo(b: bool) -> Result { //~ ERROR mismatched types +LL | fn foo(b: bool) -> Result { | --- ^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found () | | | this function's body doesn't return diff --git a/src/test/ui/issues/issue-6642.stderr b/src/test/ui/issues/issue-6642.stderr index a99d9b3cd77..6668108d024 100644 --- a/src/test/ui/issues/issue-6642.stderr +++ b/src/test/ui/issues/issue-6642.stderr @@ -1,7 +1,7 @@ error[E0434]: can't capture dynamic environment in a fn item --> $DIR/issue-6642.rs:5:13 | -LL | self.m() //~ ERROR can't capture dynamic environment in a fn item +LL | self.m() | ^^^^ | = help: use the `|| { ... }` closure form instead diff --git a/src/test/ui/issues/issue-6801.stderr b/src/test/ui/issues/issue-6801.stderr index fa0e1928ba4..482e4873f3a 100644 --- a/src/test/ui/issues/issue-6801.stderr +++ b/src/test/ui/issues/issue-6801.stderr @@ -4,7 +4,7 @@ error[E0505]: cannot move out of `x` because it is borrowed LL | let sq = || { *x * *x }; | -- borrow of `x` occurs here LL | -LL | twice(x); //~ ERROR: cannot move out of +LL | twice(x); | ^ move out of `x` occurs here error: aborting due to previous error diff --git a/src/test/ui/issues/issue-6804.stderr b/src/test/ui/issues/issue-6804.stderr index 965148d478e..1c251ed8445 100644 --- a/src/test/ui/issues/issue-6804.stderr +++ b/src/test/ui/issues/issue-6804.stderr @@ -1,7 +1,7 @@ error: floating-point types cannot be used in patterns --> $DIR/issue-6804.rs:11:9 | -LL | NAN => {}, //~ ERROR floating-point types cannot be used +LL | NAN => {}, | ^^^ | note: lint level defined here @@ -15,7 +15,7 @@ LL | #![deny(illegal_floating_point_literal_pattern)] error: floating-point types cannot be used in patterns --> $DIR/issue-6804.rs:17:10 | -LL | [NAN, _] => {}, //~ ERROR floating-point types cannot be used +LL | [NAN, _] => {}, | ^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! diff --git a/src/test/ui/issues/issue-6936.stderr b/src/test/ui/issues/issue-6936.stderr index b3fe1ddc483..9292d60ca68 100644 --- a/src/test/ui/issues/issue-6936.stderr +++ b/src/test/ui/issues/issue-6936.stderr @@ -3,7 +3,7 @@ error[E0428]: the name `Foo` is defined multiple times | LL | type Foo = ::T; | --------------- previous definition of the type `Foo` here -LL | mod Foo {} //~ ERROR the name `Foo` is defined multiple times +LL | mod Foo {} | ^^^^^^^ `Foo` redefined here | = note: `Foo` must be defined only once in the type namespace of this module @@ -13,7 +13,7 @@ error[E0428]: the name `Foo` is defined multiple times | LL | type Foo = ::T; | --------------- previous definition of the type `Foo` here -LL | struct Foo; //~ ERROR the name `Foo` is defined multiple times +LL | struct Foo; | ^^^^^^^^^^^ `Foo` redefined here | = note: `Foo` must be defined only once in the type namespace of this module @@ -23,7 +23,7 @@ error[E0428]: the name `Foo` is defined multiple times | LL | type Foo = ::T; | --------------- previous definition of the type `Foo` here -LL | enum Foo {} //~ ERROR the name `Foo` is defined multiple times +LL | enum Foo {} | ^^^^^^^^ `Foo` redefined here | = note: `Foo` must be defined only once in the type namespace of this module @@ -33,7 +33,7 @@ error[E0428]: the name `Bar` is defined multiple times | LL | type Bar = T; | ---------------- previous definition of the type `Bar` here -LL | mod Bar {} //~ ERROR the name `Bar` is defined multiple times +LL | mod Bar {} | ^^^^^^^ `Bar` redefined here | = note: `Bar` must be defined only once in the type namespace of this module diff --git a/src/test/ui/issues/issue-7044.stderr b/src/test/ui/issues/issue-7044.stderr index 46c5d164e42..2ad67ec23be 100644 --- a/src/test/ui/issues/issue-7044.stderr +++ b/src/test/ui/issues/issue-7044.stderr @@ -3,7 +3,7 @@ error[E0428]: the name `X` is defined multiple times | LL | static X: isize = 0; | -------------------- previous definition of the value `X` here -LL | struct X; //~ ERROR the name `X` is defined multiple times +LL | struct X; | ^^^^^^^^^ `X` redefined here | = note: `X` must be defined only once in the value namespace of this module diff --git a/src/test/ui/issues/issue-7246.stderr b/src/test/ui/issues/issue-7246.stderr index 5b8652597d3..e049295e913 100644 --- a/src/test/ui/issues/issue-7246.stderr +++ b/src/test/ui/issues/issue-7246.stderr @@ -1,7 +1,7 @@ error: unreachable statement --> $DIR/issue-7246.rs:7:5 | -LL | if *ptr::null() {}; //~ ERROR unreachable +LL | if *ptr::null() {}; | ^^^^^^^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/issues/issue-7607-1.stderr b/src/test/ui/issues/issue-7607-1.stderr index aa0a6c761bf..9320943a827 100644 --- a/src/test/ui/issues/issue-7607-1.stderr +++ b/src/test/ui/issues/issue-7607-1.stderr @@ -1,7 +1,7 @@ error[E0412]: cannot find type `Fo` in this scope --> $DIR/issue-7607-1.rs:5:6 | -LL | impl Fo { //~ ERROR cannot find type `Fo` in this scope +LL | impl Fo { | ^^ help: a trait with a similar name exists: `Fn` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-7813.stderr b/src/test/ui/issues/issue-7813.stderr index da5fc6357a6..45b9c915885 100644 --- a/src/test/ui/issues/issue-7813.stderr +++ b/src/test/ui/issues/issue-7813.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-7813.rs:2:13 | -LL | let v = &[]; //~ ERROR type annotations needed +LL | let v = &[]; | - ^^^ cannot infer type | | | consider giving `v` a type diff --git a/src/test/ui/issues/issue-8153.stderr b/src/test/ui/issues/issue-8153.stderr index 800b0277c9a..4389c3dc288 100644 --- a/src/test/ui/issues/issue-8153.stderr +++ b/src/test/ui/issues/issue-8153.stderr @@ -3,7 +3,7 @@ error[E0201]: duplicate definitions with name `bar`: | LL | fn bar(&self) -> isize {1} | -------------------------- previous definition of `bar` here -LL | fn bar(&self) -> isize {2} //~ ERROR duplicate definitions +LL | fn bar(&self) -> isize {2} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definition error: aborting due to previous error diff --git a/src/test/ui/issues/issue-8208.stderr b/src/test/ui/issues/issue-8208.stderr index a042dce1ac1..e59aea12cda 100644 --- a/src/test/ui/issues/issue-8208.stderr +++ b/src/test/ui/issues/issue-8208.stderr @@ -1,13 +1,13 @@ error[E0432]: unresolved import `self::*` --> $DIR/issue-8208.rs:1:5 | -LL | use self::*; //~ ERROR: unresolved import `self::*` [E0432] +LL | use self::*; | ^^^^^^^ cannot glob-import a module into itself error[E0432]: unresolved import `foo::*` --> $DIR/issue-8208.rs:5:9 | -LL | use foo::*; //~ ERROR: unresolved import `foo::*` [E0432] +LL | use foo::*; | ^^^^^^ cannot glob-import a module into itself error[E0432]: unresolved import `super::bar::*` diff --git a/src/test/ui/issues/issue-8767.stderr b/src/test/ui/issues/issue-8767.stderr index 80280f8c535..91d99f393b6 100644 --- a/src/test/ui/issues/issue-8767.stderr +++ b/src/test/ui/issues/issue-8767.stderr @@ -1,7 +1,7 @@ error[E0412]: cannot find type `B` in this scope --> $DIR/issue-8767.rs:1:6 | -LL | impl B { //~ ERROR cannot find type `B` in this scope +LL | impl B { | ^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/issues/issue-9814.stderr b/src/test/ui/issues/issue-9814.stderr index fe105a9c3ce..bd9e7df4991 100644 --- a/src/test/ui/issues/issue-9814.stderr +++ b/src/test/ui/issues/issue-9814.stderr @@ -1,7 +1,7 @@ error[E0614]: type `Foo` cannot be dereferenced --> $DIR/issue-9814.rs:7:13 | -LL | let _ = *Foo::Bar(2); //~ ERROR type `Foo` cannot be dereferenced +LL | let _ = *Foo::Bar(2); | ^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-pr29383.stderr b/src/test/ui/issues/issue-pr29383.stderr index 1fe49f8fb14..9695e1e3c07 100644 --- a/src/test/ui/issues/issue-pr29383.stderr +++ b/src/test/ui/issues/issue-pr29383.stderr @@ -1,13 +1,13 @@ error[E0532]: expected tuple struct/variant, found unit variant `E::A` --> $DIR/issue-pr29383.rs:9:14 | -LL | Some(E::A(..)) => {} //~ ERROR expected tuple struct/variant, found unit variant `E::A` +LL | Some(E::A(..)) => {} | ^^^^ not a tuple struct/variant error[E0532]: expected tuple struct/variant, found unit variant `E::B` --> $DIR/issue-pr29383.rs:10:14 | -LL | Some(E::B(..)) => {} //~ ERROR expected tuple struct/variant, found unit variant `E::B` +LL | Some(E::B(..)) => {} | ^^^^ not a tuple struct/variant error: aborting due to 2 previous errors diff --git a/src/test/ui/keyword/extern/keyword-extern-as-identifier-expr.stderr b/src/test/ui/keyword/extern/keyword-extern-as-identifier-expr.stderr index 150fc88e7ef..8bb89d2ee21 100644 --- a/src/test/ui/keyword/extern/keyword-extern-as-identifier-expr.stderr +++ b/src/test/ui/keyword/extern/keyword-extern-as-identifier-expr.stderr @@ -1,7 +1,7 @@ error: expected expression, found keyword `extern` --> $DIR/keyword-extern-as-identifier-expr.rs:2:13 | -LL | let s = extern::foo::Bar; //~ ERROR expected expression, found keyword `extern` +LL | let s = extern::foo::Bar; | ^^^^^^ expected expression error: aborting due to previous error diff --git a/src/test/ui/keyword/extern/keyword-extern-as-identifier-pat.stderr b/src/test/ui/keyword/extern/keyword-extern-as-identifier-pat.stderr index 426b4eef056..d7b9ad2abe9 100644 --- a/src/test/ui/keyword/extern/keyword-extern-as-identifier-pat.stderr +++ b/src/test/ui/keyword/extern/keyword-extern-as-identifier-pat.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `extern` --> $DIR/keyword-extern-as-identifier-pat.rs:2:9 | -LL | let extern = 0; //~ ERROR expected pattern, found keyword `extern` +LL | let extern = 0; | ^^^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/keyword/extern/keyword-extern-as-identifier-type.stderr b/src/test/ui/keyword/extern/keyword-extern-as-identifier-type.stderr index 97b641fbea5..447c76a5bbc 100644 --- a/src/test/ui/keyword/extern/keyword-extern-as-identifier-type.stderr +++ b/src/test/ui/keyword/extern/keyword-extern-as-identifier-type.stderr @@ -1,7 +1,7 @@ error: expected `fn`, found `::` --> $DIR/keyword-extern-as-identifier-type.rs:1:16 | -LL | type A = extern::foo::bar; //~ ERROR expected `fn`, found `::` +LL | type A = extern::foo::bar; | ^^ expected `fn` here error: aborting due to previous error diff --git a/src/test/ui/keyword/extern/keyword-extern-as-identifier-use.stderr b/src/test/ui/keyword/extern/keyword-extern-as-identifier-use.stderr index 31b575a92e0..4b833f80681 100644 --- a/src/test/ui/keyword/extern/keyword-extern-as-identifier-use.stderr +++ b/src/test/ui/keyword/extern/keyword-extern-as-identifier-use.stderr @@ -1,11 +1,11 @@ error: expected identifier, found keyword `extern` --> $DIR/keyword-extern-as-identifier-use.rs:1:5 | -LL | use extern::foo; //~ ERROR expected identifier, found keyword `extern` +LL | use extern::foo; | ^^^^^^ expected identifier, found keyword help: you can escape reserved keywords to use them as identifiers | -LL | use r#extern::foo; //~ ERROR expected identifier, found keyword `extern` +LL | use r#extern::foo; | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/keyword/keyword-false-as-identifier.stderr b/src/test/ui/keyword/keyword-false-as-identifier.stderr index 6c8dffa7e22..95446045998 100644 --- a/src/test/ui/keyword/keyword-false-as-identifier.stderr +++ b/src/test/ui/keyword/keyword-false-as-identifier.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/keyword-false-as-identifier.rs:2:9 | -LL | let false = 22; //~ error: mismatched types +LL | let false = 22; | ^^^^^ expected integer, found bool | = note: expected type `{integer}` diff --git a/src/test/ui/keyword/keyword-self-as-identifier.stderr b/src/test/ui/keyword/keyword-self-as-identifier.stderr index 6ea19620a66..be57c6ad26f 100644 --- a/src/test/ui/keyword/keyword-self-as-identifier.stderr +++ b/src/test/ui/keyword/keyword-self-as-identifier.stderr @@ -1,7 +1,7 @@ error[E0531]: cannot find unit struct/variant or constant `Self` in this scope --> $DIR/keyword-self-as-identifier.rs:2:9 | -LL | let Self = 22; //~ ERROR cannot find unit struct/variant or constant `Self` in this scope +LL | let Self = 22; | ^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/keyword/keyword-super-as-identifier.stderr b/src/test/ui/keyword/keyword-super-as-identifier.stderr index b0973bd170e..bbeaed94287 100644 --- a/src/test/ui/keyword/keyword-super-as-identifier.stderr +++ b/src/test/ui/keyword/keyword-super-as-identifier.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve: there are too many initial `super`s. --> $DIR/keyword-super-as-identifier.rs:2:9 | -LL | let super = 22; //~ ERROR failed to resolve: there are too many initial `super`s +LL | let super = 22; | ^^^^^ there are too many initial `super`s. error: aborting due to previous error diff --git a/src/test/ui/keyword/keyword-super.stderr b/src/test/ui/keyword/keyword-super.stderr index 5ec33ae30a6..63394c7852a 100644 --- a/src/test/ui/keyword/keyword-super.stderr +++ b/src/test/ui/keyword/keyword-super.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve: there are too many initial `super`s. --> $DIR/keyword-super.rs:2:9 | -LL | let super: isize; //~ ERROR failed to resolve: there are too many initial `super`s +LL | let super: isize; | ^^^^^ there are too many initial `super`s. error: aborting due to previous error diff --git a/src/test/ui/keyword/keyword-true-as-identifier.stderr b/src/test/ui/keyword/keyword-true-as-identifier.stderr index e5d3938e54a..36b1d882a34 100644 --- a/src/test/ui/keyword/keyword-true-as-identifier.stderr +++ b/src/test/ui/keyword/keyword-true-as-identifier.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/keyword-true-as-identifier.rs:2:9 | -LL | let true = 22; //~ error: mismatched types +LL | let true = 22; | ^^^^ expected integer, found bool | = note: expected type `{integer}` diff --git a/src/test/ui/kindck/kindck-copy.stderr b/src/test/ui/kindck/kindck-copy.stderr index 65c06b8308c..2680cb7c012 100644 --- a/src/test/ui/kindck/kindck-copy.stderr +++ b/src/test/ui/kindck/kindck-copy.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `&'static mut isize: std::marker::Copy` is not satisfied --> $DIR/kindck-copy.rs:27:5 | -LL | assert_copy::<&'static mut isize>(); //~ ERROR : std::marker::Copy` is not satisfied +LL | assert_copy::<&'static mut isize>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `&'static mut isize` | = help: the following implementations were found: @@ -15,7 +15,7 @@ LL | fn assert_copy() { } error[E0277]: the trait bound `&'a mut isize: std::marker::Copy` is not satisfied --> $DIR/kindck-copy.rs:28:5 | -LL | assert_copy::<&'a mut isize>(); //~ ERROR : std::marker::Copy` is not satisfied +LL | assert_copy::<&'a mut isize>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `&'a mut isize` | = help: the following implementations were found: @@ -29,7 +29,7 @@ LL | fn assert_copy() { } error[E0277]: the trait bound `std::boxed::Box: std::marker::Copy` is not satisfied --> $DIR/kindck-copy.rs:31:5 | -LL | assert_copy::>(); //~ ERROR : std::marker::Copy` is not satisfied +LL | assert_copy::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box` | note: required by `assert_copy` @@ -41,7 +41,7 @@ LL | fn assert_copy() { } error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied --> $DIR/kindck-copy.rs:32:5 | -LL | assert_copy::(); //~ ERROR : std::marker::Copy` is not satisfied +LL | assert_copy::(); | ^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String` | note: required by `assert_copy` @@ -53,7 +53,7 @@ LL | fn assert_copy() { } error[E0277]: the trait bound `std::vec::Vec: std::marker::Copy` is not satisfied --> $DIR/kindck-copy.rs:33:5 | -LL | assert_copy:: >(); //~ ERROR : std::marker::Copy` is not satisfied +LL | assert_copy:: >(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::vec::Vec` | note: required by `assert_copy` @@ -65,7 +65,7 @@ LL | fn assert_copy() { } error[E0277]: the trait bound `std::boxed::Box<&'a mut isize>: std::marker::Copy` is not satisfied --> $DIR/kindck-copy.rs:34:5 | -LL | assert_copy::>(); //~ ERROR : std::marker::Copy` is not satisfied +LL | assert_copy::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<&'a mut isize>` | note: required by `assert_copy` @@ -77,7 +77,7 @@ LL | fn assert_copy() { } error[E0277]: the trait bound `std::boxed::Box: std::marker::Copy` is not satisfied --> $DIR/kindck-copy.rs:42:5 | -LL | assert_copy::>(); //~ ERROR : std::marker::Copy` is not satisfied +LL | assert_copy::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box` | note: required by `assert_copy` @@ -89,7 +89,7 @@ LL | fn assert_copy() { } error[E0277]: the trait bound `std::boxed::Box: std::marker::Copy` is not satisfied --> $DIR/kindck-copy.rs:43:5 | -LL | assert_copy::>(); //~ ERROR : std::marker::Copy` is not satisfied +LL | assert_copy::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box` | note: required by `assert_copy` @@ -101,7 +101,7 @@ LL | fn assert_copy() { } error[E0277]: the trait bound `&'a mut (dyn Dummy + std::marker::Send + 'a): std::marker::Copy` is not satisfied --> $DIR/kindck-copy.rs:46:5 | -LL | assert_copy::<&'a mut (Dummy+Send)>(); //~ ERROR : std::marker::Copy` is not satisfied +LL | assert_copy::<&'a mut (Dummy+Send)>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `&'a mut (dyn Dummy + std::marker::Send + 'a)` | note: required by `assert_copy` @@ -113,7 +113,7 @@ LL | fn assert_copy() { } error[E0277]: the trait bound `MyNoncopyStruct: std::marker::Copy` is not satisfied --> $DIR/kindck-copy.rs:64:5 | -LL | assert_copy::(); //~ ERROR : std::marker::Copy` is not satisfied +LL | assert_copy::(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `MyNoncopyStruct` | note: required by `assert_copy` @@ -125,7 +125,7 @@ LL | fn assert_copy() { } error[E0277]: the trait bound `std::rc::Rc: std::marker::Copy` is not satisfied --> $DIR/kindck-copy.rs:67:5 | -LL | assert_copy::>(); //~ ERROR : std::marker::Copy` is not satisfied +LL | assert_copy::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::rc::Rc` | note: required by `assert_copy` diff --git a/src/test/ui/kindck/kindck-inherited-copy-bound.stderr b/src/test/ui/kindck/kindck-inherited-copy-bound.stderr index fe8e02e3547..1b7f9cd5517 100644 --- a/src/test/ui/kindck/kindck-inherited-copy-bound.stderr +++ b/src/test/ui/kindck/kindck-inherited-copy-bound.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `std::boxed::Box<{integer}>: std::marker::Copy` is not satisfied --> $DIR/kindck-inherited-copy-bound.rs:18:5 | -LL | take_param(&x); //~ ERROR E0277 +LL | take_param(&x); | ^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<{integer}>` | = note: required because of the requirements on the impl of `Foo` for `std::boxed::Box<{integer}>` diff --git a/src/test/ui/label/label-static.stderr b/src/test/ui/label/label-static.stderr index 52ab547aa7b..1d3251d1b5f 100644 --- a/src/test/ui/label/label-static.stderr +++ b/src/test/ui/label/label-static.stderr @@ -1,13 +1,13 @@ error: invalid label name `'static` --> $DIR/label-static.rs:2:5 | -LL | 'static: loop { //~ ERROR invalid label name `'static` +LL | 'static: loop { | ^^^^^^^ error: invalid label name `'static` --> $DIR/label-static.rs:3:15 | -LL | break 'static //~ ERROR invalid label name `'static` +LL | break 'static | ^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/label/label-underscore.stderr b/src/test/ui/label/label-underscore.stderr index a4925c8619e..4558ec4cb41 100644 --- a/src/test/ui/label/label-underscore.stderr +++ b/src/test/ui/label/label-underscore.stderr @@ -1,13 +1,13 @@ error: invalid label name `'_` --> $DIR/label-underscore.rs:2:5 | -LL | '_: loop { //~ ERROR invalid label name `'_` +LL | '_: loop { | ^^ error: invalid label name `'_` --> $DIR/label-underscore.rs:3:15 | -LL | break '_ //~ ERROR invalid label name `'_` +LL | break '_ | ^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/label/label_break_value_continue.stderr b/src/test/ui/label/label_break_value_continue.stderr index c0decc82552..bd1dd593898 100644 --- a/src/test/ui/label/label_break_value_continue.stderr +++ b/src/test/ui/label/label_break_value_continue.stderr @@ -1,27 +1,27 @@ error[E0695]: unlabeled `continue` inside of a labeled block --> $DIR/label_break_value_continue.rs:7:9 | -LL | continue; //~ ERROR unlabeled `continue` inside of a labeled block +LL | continue; | ^^^^^^^^ `continue` statements that would diverge to or through a labeled block need to bear a label error[E0696]: `continue` pointing to a labeled block --> $DIR/label_break_value_continue.rs:14:9 | -LL | continue 'b; //~ ERROR `continue` pointing to a labeled block +LL | continue 'b; | ^^^^^^^^^^^ labeled blocks cannot be `continue`'d | note: labeled block the continue points to --> $DIR/label_break_value_continue.rs:13:5 | LL | / 'b: { -LL | | continue 'b; //~ ERROR `continue` pointing to a labeled block +LL | | continue 'b; LL | | } | |_____^ error[E0695]: unlabeled `continue` inside of a labeled block --> $DIR/label_break_value_continue.rs:22:13 | -LL | continue; //~ ERROR unlabeled `continue` inside of a labeled block +LL | continue; | ^^^^^^^^ `continue` statements that would diverge to or through a labeled block need to bear a label error: aborting due to 3 previous errors diff --git a/src/test/ui/label/label_break_value_illegal_uses.stderr b/src/test/ui/label/label_break_value_illegal_uses.stderr index 889df17de44..0b9754c3c70 100644 --- a/src/test/ui/label/label_break_value_illegal_uses.stderr +++ b/src/test/ui/label/label_break_value_illegal_uses.stderr @@ -1,13 +1,13 @@ error: expected one of `extern`, `fn`, or `{`, found `'b` --> $DIR/label_break_value_illegal_uses.rs:6:12 | -LL | unsafe 'b: {} //~ ERROR expected one of `extern`, `fn`, or `{` +LL | unsafe 'b: {} | ^^ expected one of `extern`, `fn`, or `{` here error: expected `{`, found `'b` --> $DIR/label_break_value_illegal_uses.rs:10:13 | -LL | if true 'b: {} //~ ERROR expected `{`, found `'b` +LL | if true 'b: {} | -- ^^---- | | | | | expected `{` @@ -17,7 +17,7 @@ LL | if true 'b: {} //~ ERROR expected `{`, found `'b` error: expected `{`, found `'b` --> $DIR/label_break_value_illegal_uses.rs:14:21 | -LL | if true {} else 'b: {} //~ ERROR expected `{`, found `'b` +LL | if true {} else 'b: {} | ^^---- | | | expected `{` @@ -26,7 +26,7 @@ LL | if true {} else 'b: {} //~ ERROR expected `{`, found `'b` error: expected one of `.`, `?`, `{`, or an operator, found `'b` --> $DIR/label_break_value_illegal_uses.rs:18:17 | -LL | match false 'b: {} //~ ERROR expected one of `.`, `?`, `{`, or an operator +LL | match false 'b: {} | ----- ^^ expected one of `.`, `?`, `{`, or an operator here | | | while parsing this match expression diff --git a/src/test/ui/label/label_break_value_unlabeled_break.stderr b/src/test/ui/label/label_break_value_unlabeled_break.stderr index 1d6e27d4c3d..0c4f573d27d 100644 --- a/src/test/ui/label/label_break_value_unlabeled_break.stderr +++ b/src/test/ui/label/label_break_value_unlabeled_break.stderr @@ -1,13 +1,13 @@ error[E0695]: unlabeled `break` inside of a labeled block --> $DIR/label_break_value_unlabeled_break.rs:7:9 | -LL | break; //~ ERROR unlabeled `break` inside of a labeled block +LL | break; | ^^^^^ `break` statements that would diverge to or through a labeled block need to bear a label error[E0695]: unlabeled `break` inside of a labeled block --> $DIR/label_break_value_unlabeled_break.rs:15:13 | -LL | break; //~ ERROR unlabeled `break` inside of a labeled block +LL | break; | ^^^^^ `break` statements that would diverge to or through a labeled block need to bear a label error: aborting due to 2 previous errors diff --git a/src/test/ui/lexical-scopes.stderr b/src/test/ui/lexical-scopes.stderr index 51313033a02..fb823ebde2e 100644 --- a/src/test/ui/lexical-scopes.stderr +++ b/src/test/ui/lexical-scopes.stderr @@ -1,7 +1,7 @@ error[E0574]: expected struct, variant or union type, found type parameter `T` --> $DIR/lexical-scopes.rs:3:13 | -LL | let t = T { i: 0 }; //~ ERROR expected struct, variant or union type, found type parameter `T` +LL | let t = T { i: 0 }; | ^ not a struct, variant or union type help: possible better candidate is found in another module, you can import it into scope | @@ -11,7 +11,7 @@ LL | use T; error[E0599]: no function or associated item named `f` found for type `Foo` in the current scope --> $DIR/lexical-scopes.rs:10:10 | -LL | Foo::f(); //~ ERROR no function or associated item named `f` +LL | Foo::f(); | -----^ | | | function or associated item not found in `Foo` diff --git a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr index a283a0b29e6..1af4bd501ba 100644 --- a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr +++ b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/lifetime-bound-will-change-warning.rs:34:13 | -LL | ref_obj(x) //~ ERROR mismatched types +LL | ref_obj(x) | ^ lifetime mismatch | = note: expected type `&std::boxed::Box<(dyn std::ops::Fn() + 'static)>` @@ -16,7 +16,7 @@ LL | fn test2<'a>(x: &'a Box) { error[E0308]: mismatched types --> $DIR/lifetime-bound-will-change-warning.rs:39:18 | -LL | lib::ref_obj(x) //~ ERROR mismatched types +LL | lib::ref_obj(x) | ^ lifetime mismatch | = note: expected type `&std::boxed::Box<(dyn std::ops::Fn() + 'static)>` diff --git a/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr b/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr index d4ca1aec697..90bec01df63 100644 --- a/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr +++ b/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr @@ -46,7 +46,7 @@ LL | fn baz<'a, L, M: X<&'a Nested>>() { | ^ - help: consider adding an explicit lifetime bound `L: 'a`... | _____| | | -LL | | //~^ ERROR may not live long enough +LL | | LL | | } | |_____^ | @@ -54,7 +54,7 @@ note: ...so that the reference type `&'a Nested` does not outlive the data it --> $DIR/lifetime-doesnt-live-long-enough.rs:32:5 | LL | / fn baz<'a, L, M: X<&'a Nested>>() { -LL | | //~^ ERROR may not live long enough +LL | | LL | | } | |_____^ @@ -64,7 +64,7 @@ error[E0309]: the parameter type `K` may not live long enough LL | impl Nested { | - help: consider adding an explicit lifetime bound `K: 'a`... LL | / fn generic_in_parent<'a, L: X<&'a Nested>>() { -LL | | //~^ ERROR may not live long enough +LL | | LL | | } | |_____^ | @@ -72,7 +72,7 @@ note: ...so that the reference type `&'a Nested` does not outlive the data it --> $DIR/lifetime-doesnt-live-long-enough.rs:41:5 | LL | / fn generic_in_parent<'a, L: X<&'a Nested>>() { -LL | | //~^ ERROR may not live long enough +LL | | LL | | } | |_____^ @@ -83,7 +83,7 @@ LL | fn generic_in_child<'a, 'b, L: X<&'a Nested>, M: 'b>() { | ^ -- help: consider adding an explicit lifetime bound `M: 'a`... | _____| | | -LL | | //~^ ERROR may not live long enough +LL | | LL | | } | |_____^ | @@ -91,7 +91,7 @@ note: ...so that the reference type `&'a Nested` does not outlive the data it --> $DIR/lifetime-doesnt-live-long-enough.rs:44:5 | LL | / fn generic_in_child<'a, 'b, L: X<&'a Nested>, M: 'b>() { -LL | | //~^ ERROR may not live long enough +LL | | LL | | } | |_____^ diff --git a/src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr b/src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr index cf825c52f56..3f7c3934a0b 100644 --- a/src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr +++ b/src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:2:11 | -LL | fn f() -> &isize { //~ ERROR missing lifetime specifier +LL | fn f() -> &isize { | ^ help: consider giving it a 'static lifetime: `&'static` | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from @@ -9,7 +9,7 @@ LL | fn f() -> &isize { //~ ERROR missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:7:33 | -LL | fn g(_x: &isize, _y: &isize) -> &isize { //~ ERROR missing lifetime specifier +LL | fn g(_x: &isize, _y: &isize) -> &isize { | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `_x` or `_y` @@ -17,7 +17,7 @@ LL | fn g(_x: &isize, _y: &isize) -> &isize { //~ ERROR missing lifetime spec error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:17:19 | -LL | fn h(_x: &Foo) -> &isize { //~ ERROR missing lifetime specifier +LL | fn h(_x: &Foo) -> &isize { | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say which one of `_x`'s 2 lifetimes it is borrowed from @@ -25,7 +25,7 @@ LL | fn h(_x: &Foo) -> &isize { //~ ERROR missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:21:20 | -LL | fn i(_x: isize) -> &isize { //~ ERROR missing lifetime specifier +LL | fn i(_x: isize) -> &isize { | ^ help: consider giving it an explicit bounded or 'static lifetime: `&'static` | = help: this function's return type contains a borrowed value with an elided lifetime, but the lifetime cannot be derived from the arguments @@ -33,7 +33,7 @@ LL | fn i(_x: isize) -> &isize { //~ ERROR missing lifetime specifier error[E0106]: missing lifetime specifier --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:34:24 | -LL | fn j(_x: StaticStr) -> &isize { //~ ERROR missing lifetime specifier +LL | fn j(_x: StaticStr) -> &isize { | ^ help: consider giving it an explicit bounded or 'static lifetime: `&'static` | = help: this function's return type contains a borrowed value with an elided lifetime, but the lifetime cannot be derived from the arguments diff --git a/src/test/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.stderr b/src/test/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.stderr index 6211a9a1141..63d00875dd3 100644 --- a/src/test/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.stderr @@ -4,7 +4,7 @@ error[E0621]: explicit lifetime required in the type of `x` LL | fn foo2<'a>(a: &'a Foo, x: &i32) -> &'a i32 { | ---- help: add explicit lifetime `'a` to the type of `x`: `&'a i32` ... -LL | &*x //~ ERROR explicit lifetime +LL | &*x | ^^^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr index 9fe1679936d..64aa8361cd5 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr @@ -4,7 +4,7 @@ error[E0621]: explicit lifetime required in the type of `other` LL | fn bar(&self, other: Foo) -> Foo<'a> { | --- help: add explicit lifetime `'a` to the type of `other`: `Foo<'a>` ... -LL | other //~ ERROR explicit lifetime +LL | other | ^^^^^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr index 94ec5248eb0..b40481ecdc4 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr @@ -3,7 +3,7 @@ error[E0621]: explicit lifetime required in the type of `x` | LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { | ---- help: add explicit lifetime `'a` to the type of `x`: `&'a i32` -LL | if x > y { x } else { y } //~ ERROR explicit lifetime +LL | if x > y { x } else { y } | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr index 4be638bf4c2..194fd95891e 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr @@ -3,7 +3,7 @@ error[E0621]: explicit lifetime required in parameter type | LL | fn foo<'a>((x, y): (&'a i32, &i32)) -> &'a i32 { | --------------- help: add explicit lifetime `'a` to type: `(&'a i32, &'a i32)` -LL | if x > y { x } else { y } //~ ERROR explicit lifetime +LL | if x > y { x } else { y } | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr index d61271b81ac..64f4bd0fc70 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr @@ -3,7 +3,7 @@ error[E0621]: explicit lifetime required in the type of `x` | LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { | ---- help: add explicit lifetime `'a` to the type of `x`: `&'a i32` -LL | if x > y { x } else { y } //~ ERROR explicit lifetime +LL | if x > y { x } else { y } | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr index 15642be44b7..f764ec43ad1 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr @@ -4,7 +4,7 @@ error[E0621]: explicit lifetime required in the type of `x` LL | fn foo<'a>(&'a self, x: &i32) -> &i32 { | ---- help: add explicit lifetime `'a` to the type of `x`: `&'a i32` LL | -LL | if true { &self.field } else { x } //~ ERROR explicit lifetime +LL | if true { &self.field } else { x } | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr index 1eaa9c8339f..e9f5fc311df 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr @@ -6,7 +6,7 @@ LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { | | | this parameter and the return type are declared with different lifetimes... LL | -LL | if x > y { x } else { y } //~ ERROR lifetime mismatch +LL | if x > y { x } else { y } | ^ ...but data from `x` is returned here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr index d48adf16808..29a70695710 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr @@ -3,7 +3,7 @@ error[E0621]: explicit lifetime required in the type of `y` | LL | fn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 { | ---- help: add explicit lifetime `'a` to the type of `y`: `&'a i32` -LL | if x > y { x } else { y } //~ ERROR explicit lifetime +LL | if x > y { x } else { y } | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr index f4b2efa8438..0d506f2b9fc 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr @@ -6,7 +6,7 @@ LL | fn foo<'a>(&self, x: &'a i32) -> &i32 { | | | this parameter and the return type are declared with different lifetimes... LL | -LL | x //~ ERROR lifetime mismatch +LL | x | ^ ...but data from `x` is returned here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr index 328c69bb658..98a23613c36 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr @@ -6,7 +6,7 @@ LL | fn foo<'a>(&self, x: &'a Foo) -> &'a Foo { | | | this parameter and the return type are declared with different lifetimes... LL | -LL | if true { x } else { self } //~ ERROR lifetime mismatch +LL | if true { x } else { self } | ^^^^ ...but data from `self` is returned here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr index 9fc1124685c..a4e0d71a3fa 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/ex1b-return-no-names-if-else.rs:1:29 | -LL | fn foo(x: &i32, y: &i32) -> &i32 { //~ ERROR missing lifetime +LL | fn foo(x: &i32, y: &i32) -> &i32 { | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `x` or `y` diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.stderr index 3df29e62a28..412cac43563 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.stderr @@ -3,7 +3,7 @@ error[E0621]: explicit lifetime required in the type of `x` | LL | fn foo<'a>(x: Ref, y: &mut Vec>) { | -------- help: add explicit lifetime `'a` to the type of `x`: `Ref<'a, i32>` -LL | y.push(x); //~ ERROR explicit lifetime +LL | y.push(x); | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr index 0fd085c39f2..30826c3613c 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr @@ -4,7 +4,7 @@ error[E0621]: explicit lifetime required in the type of `y` LL | fn baz<'a, 'b, T>(x: &mut Vec<&'a T>, y: &T) | -- help: add explicit lifetime `'a` to the type of `y`: `&'a T` ... -LL | x.push(y); //~ ERROR explicit lifetime required +LL | x.push(y); | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.stderr index a669e33ab09..13d0835287d 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.stderr @@ -3,7 +3,7 @@ error[E0621]: explicit lifetime required in the type of `y` | LL | fn foo<'a>(x: &mut Vec>, y: Ref) { | -------- help: add explicit lifetime `'a` to the type of `y`: `Ref<'a, i32>` -LL | x.push(y); //~ ERROR explicit lifetime +LL | x.push(y); | ^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr index 7ac61df4954..e505c9c0dc2 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr @@ -3,7 +3,7 @@ error[E0623]: lifetime mismatch | LL | fn foo(x: &mut Vec>, y: Ref) { | -------- -------- these two types are declared with different lifetimes... -LL | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr index bfa9c0d15f0..63b1c6db28f 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr @@ -4,7 +4,7 @@ error[E0623]: lifetime mismatch LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { | ------------ ------------ these two types are declared with different lifetimes... LL | let z = Ref { data: y.data }; -LL | x.push(z); //~ ERROR lifetime mismatch +LL | x.push(z); | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr index 2db81f8aba6..2f669efcf1e 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr @@ -3,7 +3,7 @@ error[E0623]: lifetime mismatch | LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { | ------------ ------------ these two types are declared with different lifetimes... -LL | let a: &mut Vec> = x; //~ ERROR lifetime mismatch +LL | let a: &mut Vec> = x; | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr index 85a6dba9289..258b6805acd 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr @@ -3,7 +3,7 @@ error[E0623]: lifetime mismatch | LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec>, y: Ref<'c, i32>) { | ------------ ------------ these two types are declared with different lifetimes... -LL | let a: &mut Vec> = x; //~ ERROR lifetime mismatch +LL | let a: &mut Vec> = x; | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr index b8f97d14577..0aff80c6fbd 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr @@ -3,7 +3,7 @@ error[E0623]: lifetime mismatch | LL | fn foo(&mut (ref mut v, w): &mut (&u8, &u8), x: &u8) { | --- --- these two types are declared with different lifetimes... -LL | *v = x; //~ ERROR lifetime mismatch +LL | *v = x; | ^ ...but data from `x` flows here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.stderr index acfe809b678..2e5ff6782d3 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.stderr @@ -3,7 +3,7 @@ error[E0623]: lifetime mismatch | LL | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { | --- --- these two types are declared with different lifetimes... -LL | z.push((x,y)); //~ ERROR lifetime mismatch +LL | z.push((x,y)); | ^ ...but data flows into `z` here error[E0623]: lifetime mismatch @@ -11,7 +11,7 @@ error[E0623]: lifetime mismatch | LL | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { | --- --- these two types are declared with different lifetimes... -LL | z.push((x,y)); //~ ERROR lifetime mismatch +LL | z.push((x,y)); | ^ ...but data flows into `z` here error: aborting due to 2 previous errors diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr index cb1ca5e1485..8e41d7c54e6 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr @@ -3,7 +3,7 @@ error[E0623]: lifetime mismatch | LL | fn foo(mut x: Ref, y: Ref) { | --- --- these two types are declared with different lifetimes... -LL | x.b = y.b; //~ ERROR lifetime mismatch +LL | x.b = y.b; | ^^^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr index 863ec9806fc..da83ebc984c 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr @@ -5,7 +5,7 @@ LL | fn foo(mut x: Ref) { | --- | | | this type is declared with multiple lifetimes... -LL | x.a = x.b; //~ ERROR lifetime mismatch +LL | x.a = x.b; | ^^^ ...but data with one lifetime flows into the other here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr index 57174385b4d..374bbd93d08 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr @@ -4,7 +4,7 @@ error[E0623]: lifetime mismatch LL | fn foo<'a, 'b>(mut x: Vec>, y: Ref<'b>) | ------- ------- these two types are declared with different lifetimes... ... -LL | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr index caa7397979b..94798d1ce2a 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr @@ -3,7 +3,7 @@ error[E0623]: lifetime mismatch | LL | fn foo<'a, 'b>(mut x: Vec>, y: Ref<'b>) { | ------- ------- these two types are declared with different lifetimes... -LL | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr index 27d5f5da7e5..9f5a79ed333 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr @@ -3,7 +3,7 @@ error[E0623]: lifetime mismatch | LL | fn foo(mut x: Vec, y: Ref) { | --- --- these two types are declared with different lifetimes... -LL | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr index 97da7f8ac6d..2c87f8dbd2c 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr @@ -3,7 +3,7 @@ error[E0623]: lifetime mismatch | LL | fn foo<'a,'b>(x: &mut Vec<&'a u8>, y: &'b u8) { | ------ ------ these two types are declared with different lifetimes... -LL | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr index 8c4e3daed4c..60b92ed2b32 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr @@ -5,7 +5,7 @@ LL | fn foo(mut x: Ref, y: &u32) { | --- ---- | | | these two types are declared with different lifetimes... -LL | y = x.b; //~ ERROR lifetime mismatch +LL | y = x.b; | ^^^ ...but data from `x` flows into `y` here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr index b443707bbae..a220c8ddb2b 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr @@ -3,7 +3,7 @@ error[E0623]: lifetime mismatch | LL | fn foo(mut y: Ref, x: &u32) { | --- ---- these two types are declared with different lifetimes... -LL | y.b = x; //~ ERROR lifetime mismatch +LL | y.b = x; | ^ ...but data from `x` flows into `y` here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr index 77d43cd17c8..73472a8d022 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr @@ -3,7 +3,7 @@ error[E0623]: lifetime mismatch | LL | fn foo(mut y: Ref, x: &u32) { | --- ---- these two types are declared with different lifetimes... -LL | y.b = x; //~ ERROR lifetime mismatch +LL | y.b = x; | ^ ...but data from `x` flows into `y` here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr index eef3aa50e0f..eb6e6f2e95e 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr @@ -3,7 +3,7 @@ error[E0623]: lifetime mismatch | LL | fn foo(mut x: Ref, y: &u32) { | --- ---- these two types are declared with different lifetimes... -LL | x.b = y; //~ ERROR lifetime mismatch +LL | x.b = y; | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr index 917b90fd47f..199f880b3c4 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr @@ -5,7 +5,7 @@ LL | fn foo<'a>(&self, x: &i32) -> &i32 { | ---- ---- | | | this parameter and the return type are declared with different lifetimes... -LL | x //~ ERROR lifetime mismatch +LL | x | ^ ...but data from `x` is returned here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr index a2ba41ef4f0..838f43b3774 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr @@ -5,7 +5,7 @@ LL | fn foo<'a>(&self, x: &Foo) -> &Foo { | ---- ---- | | | this parameter and the return type are declared with different lifetimes... -LL | if true { x } else { self } //~ ERROR lifetime mismatch +LL | if true { x } else { self } | ^ ...but data from `x` is returned here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr index 43e54d64085..d2cc3dba6a4 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr @@ -3,7 +3,7 @@ error[E0623]: lifetime mismatch | LL | fn foo(x:fn(&u8, &u8), y: Vec<&u8>, z: &u8) { | --- --- these two types are declared with different lifetimes... -LL | y.push(z); //~ ERROR lifetime mismatch +LL | y.push(z); | ^ ...but data from `z` flows into `y` here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr index 39896a3c8a0..e8b0208f092 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr @@ -3,7 +3,7 @@ error[E0623]: lifetime mismatch | LL | fn foo(x: &mut Vec<&u8>, y: &u8) { | --- --- these two types are declared with different lifetimes... -LL | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr index 46eca5ea64f..5ad85c97e72 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr @@ -3,7 +3,7 @@ error[E0623]: lifetime mismatch | LL | fn foo(x:Box , y: Vec<&u8>, z: &u8) { | --- --- these two types are declared with different lifetimes... -LL | y.push(z); //~ ERROR lifetime mismatch +LL | y.push(z); | ^ ...but data from `z` flows into `y` here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr index 07d6cafd633..b2784827672 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr @@ -3,7 +3,7 @@ error[E0623]: lifetime mismatch | LL | fn foo(x: &mut Vec<&u8>, y: &u8) { | --- --- these two types are declared with different lifetimes... -LL | x.push(y); //~ ERROR lifetime mismatch +LL | x.push(y); | ^ ...but data from `y` flows into `x` here error: aborting due to previous error diff --git a/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr b/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr index f66bd3b35f7..e15290f0b9e 100644 --- a/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr @@ -3,7 +3,7 @@ error[E0384]: cannot assign twice to immutable variable `x` (Ast) | LL | x = 2; | ----- first assignment to `x` -LL | x = 3; //~ ERROR (Ast) [E0384] +LL | x = 3; | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Ast) @@ -11,22 +11,22 @@ error[E0384]: cannot assign twice to immutable variable `x` (Ast) | LL | x = 2; | ----- first assignment to `x` -LL | x = 3; //~ ERROR (Ast) [E0384] +LL | x = 3; | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Ast) --> $DIR/liveness-assign-imm-local-notes.rs:35:13 | -LL | x = 1; //~ ERROR (Ast) [E0384] +LL | x = 1; | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Ast) --> $DIR/liveness-assign-imm-local-notes.rs:38:13 | -LL | x = 1; //~ ERROR (Ast) [E0384] +LL | x = 1; | ----- first assignment to `x` ... -LL | x = 2; //~ ERROR (Ast) [E0384] +LL | x = 2; | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Mir) @@ -37,7 +37,7 @@ LL | let x; ... LL | x = 2; | ----- first assignment to `x` -LL | x = 3; //~ ERROR (Ast) [E0384] +LL | x = 3; | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Mir) @@ -48,7 +48,7 @@ LL | let x; ... LL | x = 2; | ----- first assignment to `x` -LL | x = 3; //~ ERROR (Ast) [E0384] +LL | x = 3; | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Mir) @@ -57,7 +57,7 @@ error[E0384]: cannot assign twice to immutable variable `x` (Mir) LL | let x; | - help: make this binding mutable: `mut x` ... -LL | x = 1; //~ ERROR (Ast) [E0384] +LL | x = 1; | ^^^^^ cannot assign twice to immutable variable error[E0384]: cannot assign twice to immutable variable `x` (Mir) @@ -66,10 +66,10 @@ error[E0384]: cannot assign twice to immutable variable `x` (Mir) LL | let x; | - help: make this binding mutable: `mut x` ... -LL | x = 1; //~ ERROR (Ast) [E0384] +LL | x = 1; | ----- first assignment to `x` ... -LL | x = 2; //~ ERROR (Ast) [E0384] +LL | x = 2; | ^^^^^ cannot assign twice to immutable variable error: aborting due to 8 previous errors diff --git a/src/test/ui/lifetimes/lifetime-no-keyword.stderr b/src/test/ui/lifetimes/lifetime-no-keyword.stderr index 912befff01c..ba8ceb80fe0 100644 --- a/src/test/ui/lifetimes/lifetime-no-keyword.stderr +++ b/src/test/ui/lifetimes/lifetime-no-keyword.stderr @@ -1,25 +1,25 @@ error: lifetimes cannot use keyword names --> $DIR/lifetime-no-keyword.rs:3:8 | -LL | fn baz<'let>(a: &'let isize) { } //~ ERROR lifetimes cannot use keyword names +LL | fn baz<'let>(a: &'let isize) { } | ^^^^ error: lifetimes cannot use keyword names --> $DIR/lifetime-no-keyword.rs:3:18 | -LL | fn baz<'let>(a: &'let isize) { } //~ ERROR lifetimes cannot use keyword names +LL | fn baz<'let>(a: &'let isize) { } | ^^^^ error: lifetimes cannot use keyword names --> $DIR/lifetime-no-keyword.rs:5:8 | -LL | fn zab<'self>(a: &'self isize) { } //~ ERROR lifetimes cannot use keyword names +LL | fn zab<'self>(a: &'self isize) { } | ^^^^^ error: lifetimes cannot use keyword names --> $DIR/lifetime-no-keyword.rs:5:19 | -LL | fn zab<'self>(a: &'self isize) { } //~ ERROR lifetimes cannot use keyword names +LL | fn zab<'self>(a: &'self isize) { } | ^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/lint/command-line-lint-group-deny.stderr b/src/test/ui/lint/command-line-lint-group-deny.stderr index 3250a41ee0e..04c3f6f2637 100644 --- a/src/test/ui/lint/command-line-lint-group-deny.stderr +++ b/src/test/ui/lint/command-line-lint-group-deny.stderr @@ -1,7 +1,7 @@ error: variable `_InappropriateCamelCasing` should have a snake case name --> $DIR/command-line-lint-group-deny.rs:4:9 | -LL | let _InappropriateCamelCasing = true; //~ ERROR should have a snake +LL | let _InappropriateCamelCasing = true; | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `_inappropriate_camel_casing` | = note: `-D non-snake-case` implied by `-D bad-style` diff --git a/src/test/ui/lint/command-line-lint-group-forbid.stderr b/src/test/ui/lint/command-line-lint-group-forbid.stderr index 39f6da400c4..73678214063 100644 --- a/src/test/ui/lint/command-line-lint-group-forbid.stderr +++ b/src/test/ui/lint/command-line-lint-group-forbid.stderr @@ -1,7 +1,7 @@ error: variable `_InappropriateCamelCasing` should have a snake case name --> $DIR/command-line-lint-group-forbid.rs:4:9 | -LL | let _InappropriateCamelCasing = true; //~ ERROR should have a snake +LL | let _InappropriateCamelCasing = true; | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `_inappropriate_camel_casing` | = note: `-F non-snake-case` implied by `-F bad-style` diff --git a/src/test/ui/lint/issue-54538-unused-parens-lint.stderr b/src/test/ui/lint/issue-54538-unused-parens-lint.stderr index fd55ffbdf43..3cf321b072f 100644 --- a/src/test/ui/lint/issue-54538-unused-parens-lint.stderr +++ b/src/test/ui/lint/issue-54538-unused-parens-lint.stderr @@ -1,7 +1,7 @@ warning: unnecessary parentheses around pattern --> $DIR/issue-54538-unused-parens-lint.rs:9:9 | -LL | (_) => {} //~ WARNING: unnecessary parentheses around pattern +LL | (_) => {} | ^^^ help: remove these parentheses | note: lint level defined here @@ -13,30 +13,30 @@ LL | #![warn(unused_parens)] warning: unnecessary parentheses around pattern --> $DIR/issue-54538-unused-parens-lint.rs:10:9 | -LL | (y) => {} //~ WARNING: unnecessary parentheses around pattern +LL | (y) => {} | ^^^ help: remove these parentheses warning: unnecessary parentheses around pattern --> $DIR/issue-54538-unused-parens-lint.rs:11:9 | -LL | (ref r) => {} //~ WARNING: unnecessary parentheses around pattern +LL | (ref r) => {} | ^^^^^^^ help: remove these parentheses warning: unnecessary parentheses around pattern --> $DIR/issue-54538-unused-parens-lint.rs:12:9 | -LL | (e @ 1..=2) => {} //~ WARNING: unnecessary parentheses around outer pattern +LL | (e @ 1..=2) => {} | ^^^^^^^^^^^ help: remove these parentheses warning: unnecessary parentheses around pattern --> $DIR/issue-54538-unused-parens-lint.rs:18:9 | -LL | (e @ &(1...2)) => {} //~ WARNING: unnecessary parentheses around outer pattern +LL | (e @ &(1...2)) => {} | ^^^^^^^^^^^^^^ help: remove these parentheses warning: unnecessary parentheses around pattern --> $DIR/issue-54538-unused-parens-lint.rs:19:10 | -LL | &(_) => {} //~ WARNING: unnecessary parentheses around pattern +LL | &(_) => {} | ^^^ help: remove these parentheses diff --git a/src/test/ui/lint/lint-attr-non-item-node.stderr b/src/test/ui/lint/lint-attr-non-item-node.stderr index 2c95831f375..6eb72c098df 100644 --- a/src/test/ui/lint/lint-attr-non-item-node.stderr +++ b/src/test/ui/lint/lint-attr-non-item-node.stderr @@ -1,7 +1,7 @@ error: unreachable statement --> $DIR/lint-attr-non-item-node.rs:7:9 | -LL | "unreachable"; //~ ERROR unreachable statement +LL | "unreachable"; | ^^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/lint/lint-change-warnings.stderr b/src/test/ui/lint/lint-change-warnings.stderr index 7d7a066613a..c4b8ab5fc18 100644 --- a/src/test/ui/lint/lint-change-warnings.stderr +++ b/src/test/ui/lint/lint-change-warnings.stderr @@ -1,7 +1,7 @@ error: denote infinite loops with `loop { ... }` --> $DIR/lint-change-warnings.rs:5:5 | -LL | while true {} //~ ERROR: infinite +LL | while true {} | ^^^^^^^^^^ help: use `loop` | note: lint level defined here @@ -14,7 +14,7 @@ LL | #![deny(warnings)] warning: denote infinite loops with `loop { ... }` --> $DIR/lint-change-warnings.rs:15:5 | -LL | while true {} //~ WARNING: infinite +LL | while true {} | ^^^^^^^^^^ help: use `loop` | = note: #[warn(while_true)] on by default @@ -22,7 +22,7 @@ LL | while true {} //~ WARNING: infinite error: denote infinite loops with `loop { ... }` --> $DIR/lint-change-warnings.rs:20:5 | -LL | while true {} //~ ERROR: infinite +LL | while true {} | ^^^^^^^^^^ help: use `loop` | note: lint level defined here diff --git a/src/test/ui/lint/lint-ctypes-enum.stderr b/src/test/ui/lint/lint-ctypes-enum.stderr index dd33cc77458..92f76cfc38a 100644 --- a/src/test/ui/lint/lint-ctypes-enum.stderr +++ b/src/test/ui/lint/lint-ctypes-enum.stderr @@ -1,7 +1,7 @@ error: `extern` block uses type `U` which is not FFI-safe: enum has no representation hint --> $DIR/lint-ctypes-enum.rs:20:13 | -LL | fn uf(x: U); //~ ERROR enum has no representation hint +LL | fn uf(x: U); | ^ | note: lint level defined here @@ -19,7 +19,7 @@ LL | enum U { A } error: `extern` block uses type `B` which is not FFI-safe: enum has no representation hint --> $DIR/lint-ctypes-enum.rs:21:13 | -LL | fn bf(x: B); //~ ERROR enum has no representation hint +LL | fn bf(x: B); | ^ | = help: consider adding a #[repr(...)] attribute to this enum @@ -32,7 +32,7 @@ LL | enum B { C, D } error: `extern` block uses type `T` which is not FFI-safe: enum has no representation hint --> $DIR/lint-ctypes-enum.rs:22:13 | -LL | fn tf(x: T); //~ ERROR enum has no representation hint +LL | fn tf(x: T); | ^ | = help: consider adding a #[repr(...)] attribute to this enum diff --git a/src/test/ui/lint/lint-ctypes.stderr b/src/test/ui/lint/lint-ctypes.stderr index 51211c87631..67ba30a81c5 100644 --- a/src/test/ui/lint/lint-ctypes.stderr +++ b/src/test/ui/lint/lint-ctypes.stderr @@ -1,7 +1,7 @@ error: `extern` block uses type `Foo` which is not FFI-safe: this struct has unspecified layout --> $DIR/lint-ctypes.rs:46:28 | -LL | pub fn ptr_type1(size: *const Foo); //~ ERROR: uses type `Foo` +LL | pub fn ptr_type1(size: *const Foo); | ^^^^^^^^^^ | note: lint level defined here @@ -19,7 +19,7 @@ LL | pub struct Foo; error: `extern` block uses type `Foo` which is not FFI-safe: this struct has unspecified layout --> $DIR/lint-ctypes.rs:47:28 | -LL | pub fn ptr_type2(size: *const Foo); //~ ERROR: uses type `Foo` +LL | pub fn ptr_type2(size: *const Foo); | ^^^^^^^^^^ | = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct @@ -32,7 +32,7 @@ LL | pub struct Foo; error: `extern` block uses type `[u32]` which is not FFI-safe: slices have no C equivalent --> $DIR/lint-ctypes.rs:48:26 | -LL | pub fn slice_type(p: &[u32]); //~ ERROR: uses type `[u32]` +LL | pub fn slice_type(p: &[u32]); | ^^^^^^ | = help: consider using a raw pointer instead @@ -40,7 +40,7 @@ LL | pub fn slice_type(p: &[u32]); //~ ERROR: uses type `[u32]` error: `extern` block uses type `str` which is not FFI-safe: string slices have no C equivalent --> $DIR/lint-ctypes.rs:49:24 | -LL | pub fn str_type(p: &str); //~ ERROR: uses type `str` +LL | pub fn str_type(p: &str); | ^^^^ | = help: consider using `*const u8` and a length instead @@ -48,7 +48,7 @@ LL | pub fn str_type(p: &str); //~ ERROR: uses type `str` error: `extern` block uses type `std::boxed::Box` which is not FFI-safe: this struct has unspecified layout --> $DIR/lint-ctypes.rs:50:24 | -LL | pub fn box_type(p: Box); //~ ERROR uses type `std::boxed::Box` +LL | pub fn box_type(p: Box); | ^^^^^^^^ | = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct @@ -56,7 +56,7 @@ LL | pub fn box_type(p: Box); //~ ERROR uses type `std::boxed::Box error: `extern` block uses type `char` which is not FFI-safe: the `char` type has no C equivalent --> $DIR/lint-ctypes.rs:51:25 | -LL | pub fn char_type(p: char); //~ ERROR uses type `char` +LL | pub fn char_type(p: char); | ^^^^ | = help: consider using `u32` or `libc::wchar_t` instead @@ -64,25 +64,25 @@ LL | pub fn char_type(p: char); //~ ERROR uses type `char` error: `extern` block uses type `i128` which is not FFI-safe: 128-bit integers don't currently have a known stable ABI --> $DIR/lint-ctypes.rs:52:25 | -LL | pub fn i128_type(p: i128); //~ ERROR uses type `i128` +LL | pub fn i128_type(p: i128); | ^^^^ error: `extern` block uses type `u128` which is not FFI-safe: 128-bit integers don't currently have a known stable ABI --> $DIR/lint-ctypes.rs:53:25 | -LL | pub fn u128_type(p: u128); //~ ERROR uses type `u128` +LL | pub fn u128_type(p: u128); | ^^^^ error: `extern` block uses type `dyn std::clone::Clone` which is not FFI-safe: trait objects have no C equivalent --> $DIR/lint-ctypes.rs:54:26 | -LL | pub fn trait_type(p: &Clone); //~ ERROR uses type `dyn std::clone::Clone` +LL | pub fn trait_type(p: &Clone); | ^^^^^^ error: `extern` block uses type `(i32, i32)` which is not FFI-safe: tuples have unspecified layout --> $DIR/lint-ctypes.rs:55:26 | -LL | pub fn tuple_type(p: (i32, i32)); //~ ERROR uses type `(i32, i32)` +LL | pub fn tuple_type(p: (i32, i32)); | ^^^^^^^^^^ | = help: consider using a struct instead @@ -90,7 +90,7 @@ LL | pub fn tuple_type(p: (i32, i32)); //~ ERROR uses type `(i32, i32)` error: `extern` block uses type `(i32, i32)` which is not FFI-safe: tuples have unspecified layout --> $DIR/lint-ctypes.rs:56:27 | -LL | pub fn tuple_type2(p: I32Pair); //~ ERROR uses type `(i32, i32)` +LL | pub fn tuple_type2(p: I32Pair); | ^^^^^^^ | = help: consider using a struct instead @@ -98,7 +98,7 @@ LL | pub fn tuple_type2(p: I32Pair); //~ ERROR uses type `(i32, i32)` error: `extern` block uses type `ZeroSize` which is not FFI-safe: this struct has no fields --> $DIR/lint-ctypes.rs:57:25 | -LL | pub fn zero_size(p: ZeroSize); //~ ERROR struct has no fields +LL | pub fn zero_size(p: ZeroSize); | ^^^^^^^^ | = help: consider adding a member to this struct @@ -111,19 +111,19 @@ LL | pub struct ZeroSize; error: `extern` block uses type `ZeroSizeWithPhantomData` which is not FFI-safe: composed only of PhantomData --> $DIR/lint-ctypes.rs:58:33 | -LL | pub fn zero_size_phantom(p: ZeroSizeWithPhantomData); //~ ERROR composed only of PhantomData +LL | pub fn zero_size_phantom(p: ZeroSizeWithPhantomData); | ^^^^^^^^^^^^^^^^^^^^^^^ error: `extern` block uses type `std::marker::PhantomData` which is not FFI-safe: composed only of PhantomData --> $DIR/lint-ctypes.rs:60:12 | -LL | -> ::std::marker::PhantomData; //~ ERROR: composed only of PhantomData +LL | -> ::std::marker::PhantomData; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `extern` block uses type `fn()` which is not FFI-safe: this function pointer has Rust-specific calling convention --> $DIR/lint-ctypes.rs:61:23 | -LL | pub fn fn_type(p: RustFn); //~ ERROR function pointer has Rust-specific +LL | pub fn fn_type(p: RustFn); | ^^^^^^ | = help: consider using an `extern fn(...) -> ...` function pointer instead @@ -131,7 +131,7 @@ LL | pub fn fn_type(p: RustFn); //~ ERROR function pointer has Rust-specific error: `extern` block uses type `fn()` which is not FFI-safe: this function pointer has Rust-specific calling convention --> $DIR/lint-ctypes.rs:62:24 | -LL | pub fn fn_type2(p: fn()); //~ ERROR function pointer has Rust-specific +LL | pub fn fn_type2(p: fn()); | ^^^^ | = help: consider using an `extern fn(...) -> ...` function pointer instead @@ -139,7 +139,7 @@ LL | pub fn fn_type2(p: fn()); //~ ERROR function pointer has Rust-specific error: `extern` block uses type `std::boxed::Box` which is not FFI-safe: this struct has unspecified layout --> $DIR/lint-ctypes.rs:63:28 | -LL | pub fn fn_contained(p: RustBadRet); //~ ERROR: uses type `std::boxed::Box` +LL | pub fn fn_contained(p: RustBadRet); | ^^^^^^^^^^ | = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct @@ -147,13 +147,13 @@ LL | pub fn fn_contained(p: RustBadRet); //~ ERROR: uses type `std::boxed::B error: `extern` block uses type `i128` which is not FFI-safe: 128-bit integers don't currently have a known stable ABI --> $DIR/lint-ctypes.rs:64:32 | -LL | pub fn transparent_i128(p: TransparentI128); //~ ERROR: uses type `i128` +LL | pub fn transparent_i128(p: TransparentI128); | ^^^^^^^^^^^^^^^ error: `extern` block uses type `str` which is not FFI-safe: string slices have no C equivalent --> $DIR/lint-ctypes.rs:65:31 | -LL | pub fn transparent_str(p: TransparentStr); //~ ERROR: uses type `str` +LL | pub fn transparent_str(p: TransparentStr); | ^^^^^^^^^^^^^^ | = help: consider using `*const u8` and a length instead @@ -161,7 +161,7 @@ LL | pub fn transparent_str(p: TransparentStr); //~ ERROR: uses type `str` error: `extern` block uses type `std::boxed::Box` which is not FFI-safe: this struct has unspecified layout --> $DIR/lint-ctypes.rs:66:30 | -LL | pub fn transparent_fn(p: TransparentBadFn); //~ ERROR: uses type `std::boxed::Box` +LL | pub fn transparent_fn(p: TransparentBadFn); | ^^^^^^^^^^^^^^^^ | = help: consider adding a #[repr(C)] or #[repr(transparent)] attribute to this struct diff --git a/src/test/ui/lint/lint-dead-code-1.stderr b/src/test/ui/lint/lint-dead-code-1.stderr index 6d0295002f1..be96c697d99 100644 --- a/src/test/ui/lint/lint-dead-code-1.stderr +++ b/src/test/ui/lint/lint-dead-code-1.stderr @@ -1,7 +1,7 @@ error: struct is never constructed: `Bar` --> $DIR/lint-dead-code-1.rs:12:5 | -LL | pub struct Bar; //~ ERROR: struct is never constructed +LL | pub struct Bar; | ^^^^^^^^^^^^^^^ | note: lint level defined here @@ -13,55 +13,55 @@ LL | #![deny(dead_code)] error: static item is never used: `priv_static` --> $DIR/lint-dead-code-1.rs:20:1 | -LL | static priv_static: isize = 0; //~ ERROR: static item is never used +LL | static priv_static: isize = 0; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: constant item is never used: `priv_const` --> $DIR/lint-dead-code-1.rs:27:1 | -LL | const priv_const: isize = 0; //~ ERROR: constant item is never used +LL | const priv_const: isize = 0; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: struct is never constructed: `PrivStruct` --> $DIR/lint-dead-code-1.rs:35:1 | -LL | struct PrivStruct; //~ ERROR: struct is never constructed +LL | struct PrivStruct; | ^^^^^^^^^^^^^^^^^^ error: enum is never used: `priv_enum` --> $DIR/lint-dead-code-1.rs:64:1 | -LL | enum priv_enum { foo2, bar2 } //~ ERROR: enum is never used +LL | enum priv_enum { foo2, bar2 } | ^^^^^^^^^^^^^^ error: variant is never constructed: `bar3` --> $DIR/lint-dead-code-1.rs:67:5 | -LL | bar3 //~ ERROR variant is never constructed +LL | bar3 | ^^^^ error: function is never used: `priv_fn` --> $DIR/lint-dead-code-1.rs:88:1 | -LL | fn priv_fn() { //~ ERROR: function is never used +LL | fn priv_fn() { | ^^^^^^^^^^^^ error: function is never used: `foo` --> $DIR/lint-dead-code-1.rs:93:1 | -LL | fn foo() { //~ ERROR: function is never used +LL | fn foo() { | ^^^^^^^^ error: function is never used: `bar` --> $DIR/lint-dead-code-1.rs:98:1 | -LL | fn bar() { //~ ERROR: function is never used +LL | fn bar() { | ^^^^^^^^ error: function is never used: `baz` --> $DIR/lint-dead-code-1.rs:102:1 | -LL | fn baz() -> impl Copy { //~ ERROR: function is never used +LL | fn baz() -> impl Copy { | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 10 previous errors diff --git a/src/test/ui/lint/lint-dead-code-2.stderr b/src/test/ui/lint/lint-dead-code-2.stderr index d17149104db..1226f9823ac 100644 --- a/src/test/ui/lint/lint-dead-code-2.stderr +++ b/src/test/ui/lint/lint-dead-code-2.stderr @@ -1,7 +1,7 @@ error: function is never used: `dead_fn` --> $DIR/lint-dead-code-2.rs:22:1 | -LL | fn dead_fn() {} //~ ERROR: function is never used +LL | fn dead_fn() {} | ^^^^^^^^^^^^ | note: lint level defined here @@ -13,13 +13,13 @@ LL | #![deny(dead_code)] error: function is never used: `dead_fn2` --> $DIR/lint-dead-code-2.rs:25:1 | -LL | fn dead_fn2() {} //~ ERROR: function is never used +LL | fn dead_fn2() {} | ^^^^^^^^^^^^^ error: function is never used: `main` --> $DIR/lint-dead-code-2.rs:38:1 | -LL | fn main() { //~ ERROR: function is never used +LL | fn main() { | ^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/lint/lint-dead-code-3.stderr b/src/test/ui/lint/lint-dead-code-3.stderr index 72bcac22de8..2408da0af89 100644 --- a/src/test/ui/lint/lint-dead-code-3.stderr +++ b/src/test/ui/lint/lint-dead-code-3.stderr @@ -1,7 +1,7 @@ error: struct is never constructed: `Foo` --> $DIR/lint-dead-code-3.rs:13:1 | -LL | struct Foo; //~ ERROR: struct is never constructed +LL | struct Foo; | ^^^^^^^^^^^ | note: lint level defined here @@ -13,25 +13,25 @@ LL | #![deny(dead_code)] error: method is never used: `foo` --> $DIR/lint-dead-code-3.rs:15:5 | -LL | fn foo(&self) { //~ ERROR: method is never used +LL | fn foo(&self) { | ^^^^^^^^^^^^^ error: function is never used: `bar` --> $DIR/lint-dead-code-3.rs:20:1 | -LL | fn bar() { //~ ERROR: function is never used +LL | fn bar() { | ^^^^^^^^ error: enum is never used: `c_void` --> $DIR/lint-dead-code-3.rs:59:1 | -LL | enum c_void {} //~ ERROR: enum is never used +LL | enum c_void {} | ^^^^^^^^^^^ error: foreign function is never used: `free` --> $DIR/lint-dead-code-3.rs:61:5 | -LL | fn free(p: *const c_void); //~ ERROR: foreign function is never used +LL | fn free(p: *const c_void); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 5 previous errors diff --git a/src/test/ui/lint/lint-dead-code-4.stderr b/src/test/ui/lint/lint-dead-code-4.stderr index 62de048d5e9..b7ceee99998 100644 --- a/src/test/ui/lint/lint-dead-code-4.stderr +++ b/src/test/ui/lint/lint-dead-code-4.stderr @@ -1,7 +1,7 @@ error: field is never used: `b` --> $DIR/lint-dead-code-4.rs:7:5 | -LL | b: bool, //~ ERROR: field is never used +LL | b: bool, | ^^^^^^^ | note: lint level defined here @@ -13,13 +13,13 @@ LL | #![deny(dead_code)] error: variant is never constructed: `X` --> $DIR/lint-dead-code-4.rs:15:5 | -LL | X, //~ ERROR variant is never constructed +LL | X, | ^ error: variant is never constructed: `Y` --> $DIR/lint-dead-code-4.rs:16:5 | -LL | / Y { //~ ERROR variant is never constructed +LL | / Y { LL | | a: String, LL | | b: i32, LL | | c: i32, @@ -29,43 +29,43 @@ LL | | }, error: enum is never used: `ABC` --> $DIR/lint-dead-code-4.rs:24:1 | -LL | enum ABC { //~ ERROR enum is never used +LL | enum ABC { | ^^^^^^^^ error: variant is never constructed: `I` --> $DIR/lint-dead-code-4.rs:36:5 | -LL | I, //~ ERROR variant is never constructed +LL | I, | ^ error: field is never used: `b` --> $DIR/lint-dead-code-4.rs:39:9 | -LL | b: i32, //~ ERROR field is never used +LL | b: i32, | ^^^^^^ error: field is never used: `c` --> $DIR/lint-dead-code-4.rs:40:9 | -LL | c: i32, //~ ERROR field is never used +LL | c: i32, | ^^^^^^ error: variant is never constructed: `K` --> $DIR/lint-dead-code-4.rs:42:5 | -LL | K //~ ERROR variant is never constructed +LL | K | ^ error: field is never used: `x` --> $DIR/lint-dead-code-4.rs:61:5 | -LL | x: usize, //~ ERROR: field is never used +LL | x: usize, | ^^^^^^^^ error: field is never used: `c` --> $DIR/lint-dead-code-4.rs:63:5 | -LL | c: bool, //~ ERROR: field is never used +LL | c: bool, | ^^^^^^^ error: aborting due to 10 previous errors diff --git a/src/test/ui/lint/lint-dead-code-5.stderr b/src/test/ui/lint/lint-dead-code-5.stderr index e6c2354783a..740cfde2c06 100644 --- a/src/test/ui/lint/lint-dead-code-5.stderr +++ b/src/test/ui/lint/lint-dead-code-5.stderr @@ -1,7 +1,7 @@ error: variant is never constructed: `Variant2` --> $DIR/lint-dead-code-5.rs:6:5 | -LL | Variant2 //~ ERROR: variant is never constructed +LL | Variant2 | ^^^^^^^^ | note: lint level defined here @@ -13,19 +13,19 @@ LL | #![deny(dead_code)] error: variant is never constructed: `Variant5` --> $DIR/lint-dead-code-5.rs:13:5 | -LL | Variant5 { _x: isize }, //~ ERROR: variant is never constructed: `Variant5` +LL | Variant5 { _x: isize }, | ^^^^^^^^^^^^^^^^^^^^^^ error: variant is never constructed: `Variant6` --> $DIR/lint-dead-code-5.rs:14:5 | -LL | Variant6(isize), //~ ERROR: variant is never constructed: `Variant6` +LL | Variant6(isize), | ^^^^^^^^^^^^^^^ error: enum is never used: `Enum3` --> $DIR/lint-dead-code-5.rs:18:1 | -LL | enum Enum3 { //~ ERROR: enum is never used +LL | enum Enum3 { | ^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/lint/lint-dead-code-type-alias.stderr b/src/test/ui/lint/lint-dead-code-type-alias.stderr index a4d4727be7c..4198ddfb6cb 100644 --- a/src/test/ui/lint/lint-dead-code-type-alias.stderr +++ b/src/test/ui/lint/lint-dead-code-type-alias.stderr @@ -1,7 +1,7 @@ error: type alias is never used: `Unused` --> $DIR/lint-dead-code-type-alias.rs:4:1 | -LL | type Unused = u8; //~ ERROR type alias is never used +LL | type Unused = u8; | ^^^^^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/lint/lint-dead-code-variant.stderr b/src/test/ui/lint/lint-dead-code-variant.stderr index b9465e73b0d..a79432dc68d 100644 --- a/src/test/ui/lint/lint-dead-code-variant.stderr +++ b/src/test/ui/lint/lint-dead-code-variant.stderr @@ -1,7 +1,7 @@ error: variant is never constructed: `Variant1` --> $DIR/lint-dead-code-variant.rs:5:5 | -LL | Variant1, //~ ERROR: variant is never constructed +LL | Variant1, | ^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/lint/lint-directives-on-use-items-issue-10534.stderr b/src/test/ui/lint/lint-directives-on-use-items-issue-10534.stderr index 170b98a12a8..020591ccff7 100644 --- a/src/test/ui/lint/lint-directives-on-use-items-issue-10534.stderr +++ b/src/test/ui/lint/lint-directives-on-use-items-issue-10534.stderr @@ -1,7 +1,7 @@ error: unused import: `a::x` --> $DIR/lint-directives-on-use-items-issue-10534.rs:12:9 | -LL | use a::x; //~ ERROR: unused import +LL | use a::x; | ^^^^ | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![deny(unused_imports)] error: unused import: `a::y` --> $DIR/lint-directives-on-use-items-issue-10534.rs:21:9 | -LL | use a::y; //~ ERROR: unused import +LL | use a::y; | ^^^^ | note: lint level defined here diff --git a/src/test/ui/lint/lint-exceeding-bitshifts.stderr b/src/test/ui/lint/lint-exceeding-bitshifts.stderr index be739eb41bd..f9f168c14de 100644 --- a/src/test/ui/lint/lint-exceeding-bitshifts.stderr +++ b/src/test/ui/lint/lint-exceeding-bitshifts.stderr @@ -1,7 +1,7 @@ error: attempt to shift left with overflow --> $DIR/lint-exceeding-bitshifts.rs:7:15 | -LL | let n = 1u8 << 8; //~ ERROR: attempt to shift left with overflow +LL | let n = 1u8 << 8; | ^^^^^^^^ | note: lint level defined here @@ -13,103 +13,103 @@ LL | #![deny(exceeding_bitshifts, const_err)] error: attempt to shift left with overflow --> $DIR/lint-exceeding-bitshifts.rs:9:15 | -LL | let n = 1u16 << 16; //~ ERROR: attempt to shift left with overflow +LL | let n = 1u16 << 16; | ^^^^^^^^^^ error: attempt to shift left with overflow --> $DIR/lint-exceeding-bitshifts.rs:11:15 | -LL | let n = 1u32 << 32; //~ ERROR: attempt to shift left with overflow +LL | let n = 1u32 << 32; | ^^^^^^^^^^ error: attempt to shift left with overflow --> $DIR/lint-exceeding-bitshifts.rs:13:15 | -LL | let n = 1u64 << 64; //~ ERROR: attempt to shift left with overflow +LL | let n = 1u64 << 64; | ^^^^^^^^^^ error: attempt to shift left with overflow --> $DIR/lint-exceeding-bitshifts.rs:15:15 | -LL | let n = 1i8 << 8; //~ ERROR: attempt to shift left with overflow +LL | let n = 1i8 << 8; | ^^^^^^^^ error: attempt to shift left with overflow --> $DIR/lint-exceeding-bitshifts.rs:17:15 | -LL | let n = 1i16 << 16; //~ ERROR: attempt to shift left with overflow +LL | let n = 1i16 << 16; | ^^^^^^^^^^ error: attempt to shift left with overflow --> $DIR/lint-exceeding-bitshifts.rs:19:15 | -LL | let n = 1i32 << 32; //~ ERROR: attempt to shift left with overflow +LL | let n = 1i32 << 32; | ^^^^^^^^^^ error: attempt to shift left with overflow --> $DIR/lint-exceeding-bitshifts.rs:21:15 | -LL | let n = 1i64 << 64; //~ ERROR: attempt to shift left with overflow +LL | let n = 1i64 << 64; | ^^^^^^^^^^ error: attempt to shift right with overflow --> $DIR/lint-exceeding-bitshifts.rs:24:15 | -LL | let n = 1u8 >> 8; //~ ERROR: attempt to shift right with overflow +LL | let n = 1u8 >> 8; | ^^^^^^^^ error: attempt to shift right with overflow --> $DIR/lint-exceeding-bitshifts.rs:26:15 | -LL | let n = 1u16 >> 16; //~ ERROR: attempt to shift right with overflow +LL | let n = 1u16 >> 16; | ^^^^^^^^^^ error: attempt to shift right with overflow --> $DIR/lint-exceeding-bitshifts.rs:28:15 | -LL | let n = 1u32 >> 32; //~ ERROR: attempt to shift right with overflow +LL | let n = 1u32 >> 32; | ^^^^^^^^^^ error: attempt to shift right with overflow --> $DIR/lint-exceeding-bitshifts.rs:30:15 | -LL | let n = 1u64 >> 64; //~ ERROR: attempt to shift right with overflow +LL | let n = 1u64 >> 64; | ^^^^^^^^^^ error: attempt to shift right with overflow --> $DIR/lint-exceeding-bitshifts.rs:32:15 | -LL | let n = 1i8 >> 8; //~ ERROR: attempt to shift right with overflow +LL | let n = 1i8 >> 8; | ^^^^^^^^ error: attempt to shift right with overflow --> $DIR/lint-exceeding-bitshifts.rs:34:15 | -LL | let n = 1i16 >> 16; //~ ERROR: attempt to shift right with overflow +LL | let n = 1i16 >> 16; | ^^^^^^^^^^ error: attempt to shift right with overflow --> $DIR/lint-exceeding-bitshifts.rs:36:15 | -LL | let n = 1i32 >> 32; //~ ERROR: attempt to shift right with overflow +LL | let n = 1i32 >> 32; | ^^^^^^^^^^ error: attempt to shift right with overflow --> $DIR/lint-exceeding-bitshifts.rs:38:15 | -LL | let n = 1i64 >> 64; //~ ERROR: attempt to shift right with overflow +LL | let n = 1i64 >> 64; | ^^^^^^^^^^ error: attempt to shift left with overflow --> $DIR/lint-exceeding-bitshifts.rs:42:15 | -LL | let n = n << 8; //~ ERROR: attempt to shift left with overflow +LL | let n = n << 8; | ^^^^^^ error: attempt to shift left with overflow --> $DIR/lint-exceeding-bitshifts.rs:44:15 | -LL | let n = 1u8 << -8; //~ ERROR: attempt to shift left with overflow +LL | let n = 1u8 << -8; | ^^^^^^^^^ error: aborting due to 18 previous errors diff --git a/src/test/ui/lint/lint-exceeding-bitshifts2.stderr b/src/test/ui/lint/lint-exceeding-bitshifts2.stderr index 0adcde02acb..8a6d2a89c70 100644 --- a/src/test/ui/lint/lint-exceeding-bitshifts2.stderr +++ b/src/test/ui/lint/lint-exceeding-bitshifts2.stderr @@ -1,7 +1,7 @@ error: attempt to shift left with overflow --> $DIR/lint-exceeding-bitshifts2.rs:7:15 | -LL | let n = 1u8 << (4+4); //~ ERROR: attempt to shift left with overflow +LL | let n = 1u8 << (4+4); | ^^^^^^^^^^^^ | note: lint level defined here @@ -13,13 +13,13 @@ LL | #![deny(exceeding_bitshifts, const_err)] error: attempt to shift left with overflow --> $DIR/lint-exceeding-bitshifts2.rs:15:15 | -LL | let n = 1_isize << BITS; //~ ERROR: attempt to shift left with overflow +LL | let n = 1_isize << BITS; | ^^^^^^^^^^^^^^^ error: attempt to shift left with overflow --> $DIR/lint-exceeding-bitshifts2.rs:16:15 | -LL | let n = 1_usize << BITS; //~ ERROR: attempt to shift left with overflow +LL | let n = 1_usize << BITS; | ^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/lint/lint-forbid-cmdline.stderr b/src/test/ui/lint/lint-forbid-cmdline.stderr index 35539f0e877..bece4775abb 100644 --- a/src/test/ui/lint/lint-forbid-cmdline.stderr +++ b/src/test/ui/lint/lint-forbid-cmdline.stderr @@ -1,7 +1,7 @@ error[E0453]: allow(deprecated) overruled by outer forbid(deprecated) --> $DIR/lint-forbid-cmdline.rs:3:9 | -LL | #[allow(deprecated)] //~ ERROR allow(deprecated) overruled by outer forbid(deprecated) +LL | #[allow(deprecated)] | ^^^^^^^^^^ overruled by previous forbid | = note: `forbid` lint level was set on command line diff --git a/src/test/ui/lint/lint-group-nonstandard-style.stderr b/src/test/ui/lint/lint-group-nonstandard-style.stderr index ab36cda57ec..a365204f12a 100644 --- a/src/test/ui/lint/lint-group-nonstandard-style.stderr +++ b/src/test/ui/lint/lint-group-nonstandard-style.stderr @@ -1,7 +1,7 @@ warning: type `snake_case` should have an upper camel case name --> $DIR/lint-group-nonstandard-style.rs:22:16 | -LL | struct snake_case; //~ WARN should have an upper camel +LL | struct snake_case; | ^^^^^^^^^^ help: convert the identifier to upper camel case: `SnakeCase` | note: lint level defined here @@ -14,7 +14,7 @@ LL | #![warn(nonstandard_style)] error: function `CamelCase` should have a snake case name --> $DIR/lint-group-nonstandard-style.rs:4:4 | -LL | fn CamelCase() {} //~ ERROR should have a snake +LL | fn CamelCase() {} | ^^^^^^^^^ help: convert the identifier to snake case: `camel_case` | note: lint level defined here @@ -27,7 +27,7 @@ LL | #![deny(nonstandard_style)] error: function `CamelCase` should have a snake case name --> $DIR/lint-group-nonstandard-style.rs:12:12 | -LL | fn CamelCase() {} //~ ERROR should have a snake +LL | fn CamelCase() {} | ^^^^^^^^^ help: convert the identifier to snake case: `camel_case` | note: lint level defined here @@ -40,7 +40,7 @@ LL | #[forbid(nonstandard_style)] error: static variable `bad` should have an upper case name --> $DIR/lint-group-nonstandard-style.rs:14:16 | -LL | static bad: isize = 1; //~ ERROR should have an upper +LL | static bad: isize = 1; | ^^^ help: convert the identifier to upper case: `BAD` | note: lint level defined here @@ -53,7 +53,7 @@ LL | #[forbid(nonstandard_style)] warning: function `CamelCase` should have a snake case name --> $DIR/lint-group-nonstandard-style.rs:20:12 | -LL | fn CamelCase() {} //~ WARN should have a snake +LL | fn CamelCase() {} | ^^^^^^^^^ help: convert the identifier to snake case: `camel_case` | note: lint level defined here diff --git a/src/test/ui/lint/lint-impl-fn.stderr b/src/test/ui/lint/lint-impl-fn.stderr index b0a3f619784..2c9a264287c 100644 --- a/src/test/ui/lint/lint-impl-fn.stderr +++ b/src/test/ui/lint/lint-impl-fn.stderr @@ -1,7 +1,7 @@ error: denote infinite loops with `loop { ... }` --> $DIR/lint-impl-fn.rs:10:21 | -LL | fn bar(&self) { while true {} } //~ ERROR: infinite loops +LL | fn bar(&self) { while true {} } | ^^^^^^^^^^ help: use `loop` | note: lint level defined here @@ -13,7 +13,7 @@ LL | #[deny(while_true)] error: denote infinite loops with `loop { ... }` --> $DIR/lint-impl-fn.rs:18:25 | -LL | fn foo(&self) { while true {} } //~ ERROR: infinite loops +LL | fn foo(&self) { while true {} } | ^^^^^^^^^^ help: use `loop` | note: lint level defined here @@ -25,7 +25,7 @@ LL | #[deny(while_true)] error: denote infinite loops with `loop { ... }` --> $DIR/lint-impl-fn.rs:27:5 | -LL | while true {} //~ ERROR: infinite loops +LL | while true {} | ^^^^^^^^^^ help: use `loop` | note: lint level defined here diff --git a/src/test/ui/lint/lint-malformed.stderr b/src/test/ui/lint/lint-malformed.stderr index 98a7cecc2bb..f5b9e2b0a0f 100644 --- a/src/test/ui/lint/lint-malformed.stderr +++ b/src/test/ui/lint/lint-malformed.stderr @@ -1,13 +1,13 @@ error[E0452]: malformed lint attribute --> $DIR/lint-malformed.rs:2:10 | -LL | #![allow(bar = "baz")] //~ ERROR malformed lint attribute +LL | #![allow(bar = "baz")] | ^^^^^^^^^^^ error: attribute must be of the form `#[deny(lint1, lint2, ..., /*opt*/ reason = "...")]` --> $DIR/lint-malformed.rs:1:1 | -LL | #![deny = "foo"] //~ ERROR attribute must be of the form +LL | #![deny = "foo"] | ^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/lint/lint-misplaced-attr.stderr b/src/test/ui/lint/lint-misplaced-attr.stderr index 2a28d54619c..1419f858f8e 100644 --- a/src/test/ui/lint/lint-misplaced-attr.stderr +++ b/src/test/ui/lint/lint-misplaced-attr.stderr @@ -1,7 +1,7 @@ error: unused attribute --> $DIR/lint-misplaced-attr.rs:7:5 | -LL | #![crate_type = "bin"] //~ ERROR unused attribute +LL | #![crate_type = "bin"] | ^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here @@ -13,19 +13,19 @@ LL | #![deny(unused_attributes)] error: crate-level attribute should be in the root module --> $DIR/lint-misplaced-attr.rs:7:5 | -LL | #![crate_type = "bin"] //~ ERROR unused attribute +LL | #![crate_type = "bin"] | ^^^^^^^^^^^^^^^^^^^^^^ error: unused attribute --> $DIR/lint-misplaced-attr.rs:11:1 | -LL | #[crate_type = "bin"] fn main() {} //~ ERROR unused attribute +LL | #[crate_type = "bin"] fn main() {} | ^^^^^^^^^^^^^^^^^^^^^ error: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] --> $DIR/lint-misplaced-attr.rs:11:1 | -LL | #[crate_type = "bin"] fn main() {} //~ ERROR unused attribute +LL | #[crate_type = "bin"] fn main() {} | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/lint/lint-missing-copy-implementations.stderr b/src/test/ui/lint/lint-missing-copy-implementations.stderr index 30da3ac879e..7b6674e71bf 100644 --- a/src/test/ui/lint/lint-missing-copy-implementations.stderr +++ b/src/test/ui/lint/lint-missing-copy-implementations.stderr @@ -1,7 +1,7 @@ error: type could implement `Copy`; consider adding `impl Copy` --> $DIR/lint-missing-copy-implementations.rs:6:5 | -LL | / pub struct Foo { //~ ERROR type could implement `Copy`; consider adding `impl Copy` +LL | / pub struct Foo { LL | | pub field: i32 LL | | } | |_____^ diff --git a/src/test/ui/lint/lint-missing-doc.stderr b/src/test/ui/lint/lint-missing-doc.stderr index ea5a14bca7c..3532c9315d8 100644 --- a/src/test/ui/lint/lint-missing-doc.stderr +++ b/src/test/ui/lint/lint-missing-doc.stderr @@ -1,7 +1,7 @@ error: missing documentation for a type alias --> $DIR/lint-missing-doc.rs:11:1 | -LL | pub type PubTypedef = String; //~ ERROR: missing documentation for a type alias +LL | pub type PubTypedef = String; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here @@ -13,109 +13,109 @@ LL | #![deny(missing_docs)] error: missing documentation for a struct --> $DIR/lint-missing-doc.rs:18:1 | -LL | pub struct PubFoo { //~ ERROR: missing documentation for a struct +LL | pub struct PubFoo { | ^^^^^^^^^^^^^^^^^ error: missing documentation for a struct field --> $DIR/lint-missing-doc.rs:19:5 | -LL | pub a: isize, //~ ERROR: missing documentation for a struct field +LL | pub a: isize, | ^^^^^^^^^^^^ error: missing documentation for a module --> $DIR/lint-missing-doc.rs:30:1 | -LL | pub mod pub_module_no_dox {} //~ ERROR: missing documentation for a module +LL | pub mod pub_module_no_dox {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: missing documentation for a function --> $DIR/lint-missing-doc.rs:34:1 | -LL | pub fn foo2() {} //~ ERROR: missing documentation for a function +LL | pub fn foo2() {} | ^^^^^^^^^^^^^ error: missing documentation for a trait --> $DIR/lint-missing-doc.rs:52:1 | -LL | pub trait C { //~ ERROR: missing documentation for a trait +LL | pub trait C { | ^^^^^^^^^^^ error: missing documentation for a trait method --> $DIR/lint-missing-doc.rs:53:5 | -LL | fn foo(&self); //~ ERROR: missing documentation for a trait method +LL | fn foo(&self); | ^^^^^^^^^^^^^^ error: missing documentation for a trait method --> $DIR/lint-missing-doc.rs:54:5 | -LL | fn foo_with_impl(&self) {} //~ ERROR: missing documentation for a trait method +LL | fn foo_with_impl(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^ error: missing documentation for an associated type --> $DIR/lint-missing-doc.rs:64:5 | -LL | type AssociatedType; //~ ERROR: missing documentation for an associated type +LL | type AssociatedType; | ^^^^^^^^^^^^^^^^^^^^ error: missing documentation for an associated type --> $DIR/lint-missing-doc.rs:65:5 | -LL | type AssociatedTypeDef = Self; //~ ERROR: missing documentation for an associated type +LL | type AssociatedTypeDef = Self; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: missing documentation for a method --> $DIR/lint-missing-doc.rs:81:5 | -LL | pub fn foo() {} //~ ERROR: missing documentation for a method +LL | pub fn foo() {} | ^^^^^^^^^^^^ error: missing documentation for an enum --> $DIR/lint-missing-doc.rs:118:1 | -LL | pub enum PubBaz { //~ ERROR: missing documentation for an enum +LL | pub enum PubBaz { | ^^^^^^^^^^^^^^^ error: missing documentation for a variant --> $DIR/lint-missing-doc.rs:119:5 | -LL | PubBazA { //~ ERROR: missing documentation for a variant +LL | PubBazA { | ^^^^^^^ error: missing documentation for a struct field --> $DIR/lint-missing-doc.rs:120:9 | -LL | a: isize, //~ ERROR: missing documentation for a struct field +LL | a: isize, | ^^^^^^^^ error: missing documentation for a constant --> $DIR/lint-missing-doc.rs:151:1 | -LL | pub const FOO4: u32 = 0; //~ ERROR: missing documentation for a const +LL | pub const FOO4: u32 = 0; | ^^^^^^^^^^^^^^^^^^^^^^^^ error: missing documentation for a static --> $DIR/lint-missing-doc.rs:161:1 | -LL | pub static BAR4: u32 = 0; //~ ERROR: missing documentation for a static +LL | pub static BAR4: u32 = 0; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: missing documentation for a function --> $DIR/lint-missing-doc.rs:167:5 | -LL | pub fn undocumented1() {} //~ ERROR: missing documentation for a function +LL | pub fn undocumented1() {} | ^^^^^^^^^^^^^^^^^^^^^^ error: missing documentation for a function --> $DIR/lint-missing-doc.rs:168:5 | -LL | pub fn undocumented2() {} //~ ERROR: missing documentation for a function +LL | pub fn undocumented2() {} | ^^^^^^^^^^^^^^^^^^^^^^ error: missing documentation for a function --> $DIR/lint-missing-doc.rs:174:9 | -LL | pub fn also_undocumented1() {} //~ ERROR: missing documentation for a function +LL | pub fn also_undocumented1() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 19 previous errors diff --git a/src/test/ui/lint/lint-non-camel-case-types.stderr b/src/test/ui/lint/lint-non-camel-case-types.stderr index 7afacf64d87..432a16debc6 100644 --- a/src/test/ui/lint/lint-non-camel-case-types.stderr +++ b/src/test/ui/lint/lint-non-camel-case-types.stderr @@ -13,43 +13,43 @@ LL | #![forbid(non_camel_case_types)] error: type `foo` should have an upper camel case name --> $DIR/lint-non-camel-case-types.rs:7:8 | -LL | struct foo { //~ ERROR type `foo` should have an upper camel case name +LL | struct foo { | ^^^ help: convert the identifier to upper camel case: `Foo` error: type `foo2` should have an upper camel case name --> $DIR/lint-non-camel-case-types.rs:11:6 | -LL | enum foo2 { //~ ERROR type `foo2` should have an upper camel case name +LL | enum foo2 { | ^^^^ help: convert the identifier to upper camel case: `Foo2` error: type `foo3` should have an upper camel case name --> $DIR/lint-non-camel-case-types.rs:15:8 | -LL | struct foo3 { //~ ERROR type `foo3` should have an upper camel case name +LL | struct foo3 { | ^^^^ help: convert the identifier to upper camel case: `Foo3` error: type `foo4` should have an upper camel case name --> $DIR/lint-non-camel-case-types.rs:19:6 | -LL | type foo4 = isize; //~ ERROR type `foo4` should have an upper camel case name +LL | type foo4 = isize; | ^^^^ help: convert the identifier to upper camel case: `Foo4` error: variant `bar` should have an upper camel case name --> $DIR/lint-non-camel-case-types.rs:22:5 | -LL | bar //~ ERROR variant `bar` should have an upper camel case name +LL | bar | ^^^ help: convert the identifier to upper camel case: `Bar` error: trait `foo6` should have an upper camel case name --> $DIR/lint-non-camel-case-types.rs:25:7 | -LL | trait foo6 { //~ ERROR trait `foo6` should have an upper camel case name +LL | trait foo6 { | ^^^^ help: convert the identifier to upper camel case: `Foo6` error: type parameter `ty` should have an upper camel case name --> $DIR/lint-non-camel-case-types.rs:29:6 | -LL | fn f(_: ty) {} //~ ERROR type parameter `ty` should have an upper camel case name +LL | fn f(_: ty) {} | ^^ help: convert the identifier to upper camel case: `Ty` error: aborting due to 8 previous errors diff --git a/src/test/ui/lint/lint-non-snake-case-lifetimes.stderr b/src/test/ui/lint/lint-non-snake-case-lifetimes.stderr index 970666ebcfd..d638626495a 100644 --- a/src/test/ui/lint/lint-non-snake-case-lifetimes.stderr +++ b/src/test/ui/lint/lint-non-snake-case-lifetimes.stderr @@ -1,7 +1,7 @@ error: lifetime `'FooBar` should have a snake case name --> $DIR/lint-non-snake-case-lifetimes.rs:4:6 | -LL | fn f<'FooBar>( //~ ERROR lifetime `'FooBar` should have a snake case name +LL | fn f<'FooBar>( | ^^^^^^^ help: convert the identifier to snake case: `'foo_bar` | note: lint level defined here diff --git a/src/test/ui/lint/lint-non-snake-case-modules.stderr b/src/test/ui/lint/lint-non-snake-case-modules.stderr index 651132e49d9..847c43e1b04 100644 --- a/src/test/ui/lint/lint-non-snake-case-modules.stderr +++ b/src/test/ui/lint/lint-non-snake-case-modules.stderr @@ -1,7 +1,7 @@ error: module `FooBar` should have a snake case name --> $DIR/lint-non-snake-case-modules.rs:4:5 | -LL | mod FooBar { //~ ERROR module `FooBar` should have a snake case name +LL | mod FooBar { | ^^^^^^ help: convert the identifier to snake case: `foo_bar` | note: lint level defined here diff --git a/src/test/ui/lint/lint-non-uppercase-statics.stderr b/src/test/ui/lint/lint-non-uppercase-statics.stderr index f5bba5f145d..8b477276efc 100644 --- a/src/test/ui/lint/lint-non-uppercase-statics.stderr +++ b/src/test/ui/lint/lint-non-uppercase-statics.stderr @@ -1,7 +1,7 @@ error: static variable `foo` should have an upper case name --> $DIR/lint-non-uppercase-statics.rs:4:8 | -LL | static foo: isize = 1; //~ ERROR static variable `foo` should have an upper case name +LL | static foo: isize = 1; | ^^^ help: convert the identifier to upper case: `FOO` | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![forbid(non_upper_case_globals)] error: static variable `bar` should have an upper case name --> $DIR/lint-non-uppercase-statics.rs:6:12 | -LL | static mut bar: isize = 1; //~ ERROR static variable `bar` should have an upper case name +LL | static mut bar: isize = 1; | ^^^ help: convert the identifier to upper case: `BAR` error: aborting due to 2 previous errors diff --git a/src/test/ui/lint/lint-obsolete-attr.stderr b/src/test/ui/lint/lint-obsolete-attr.stderr index c71bde54acf..c06bd26df2b 100644 --- a/src/test/ui/lint/lint-obsolete-attr.stderr +++ b/src/test/ui/lint/lint-obsolete-attr.stderr @@ -1,7 +1,7 @@ error: unused attribute --> $DIR/lint-obsolete-attr.rs:8:1 | -LL | #[ab_isize="stdcall"] extern {} //~ ERROR unused attribute +LL | #[ab_isize="stdcall"] extern {} | ^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![deny(unused_attributes)] error: unused attribute --> $DIR/lint-obsolete-attr.rs:10:1 | -LL | #[fixed_stack_segment] fn f() {} //~ ERROR unused attribute +LL | #[fixed_stack_segment] fn f() {} | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/lint/lint-output-format.stderr b/src/test/ui/lint/lint-output-format.stderr index 4dcd8c23164..21b12301e2c 100644 --- a/src/test/ui/lint/lint-output-format.stderr +++ b/src/test/ui/lint/lint-output-format.stderr @@ -1,7 +1,7 @@ error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-output-format.rs:6:1 | -LL | extern crate lint_output_format; //~ ERROR use of unstable library feature +LL | extern crate lint_output_format; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | extern crate lint_output_format; //~ ERROR use of unstable library feature error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-output-format.rs:7:31 | -LL | use lint_output_format::{foo, bar}; //~ ERROR use of unstable library feature +LL | use lint_output_format::{foo, bar}; | ^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | use lint_output_format::{foo, bar}; //~ ERROR use of unstable library featu error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-output-format.rs:11:14 | -LL | let _y = bar(); //~ ERROR use of unstable library feature +LL | let _y = bar(); | ^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable diff --git a/src/test/ui/lint/lint-owned-heap-memory.stderr b/src/test/ui/lint/lint-owned-heap-memory.stderr index 572b82b3366..c61b3d31558 100644 --- a/src/test/ui/lint/lint-owned-heap-memory.stderr +++ b/src/test/ui/lint/lint-owned-heap-memory.stderr @@ -1,7 +1,7 @@ error: type uses owned (Box type) pointers: std::boxed::Box --> $DIR/lint-owned-heap-memory.rs:6:5 | -LL | x: Box //~ ERROR type uses owned +LL | x: Box | ^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/lint/lint-qualification.stderr b/src/test/ui/lint/lint-qualification.stderr index 953ff0f5f65..78f7e32a30c 100644 --- a/src/test/ui/lint/lint-qualification.stderr +++ b/src/test/ui/lint/lint-qualification.stderr @@ -1,7 +1,7 @@ error: unnecessary qualification --> $DIR/lint-qualification.rs:9:5 | -LL | foo::bar(); //~ ERROR: unnecessary qualification +LL | foo::bar(); | ^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/lint/lint-removed-allow.stderr b/src/test/ui/lint/lint-removed-allow.stderr index f796a14d637..32af7389b6c 100644 --- a/src/test/ui/lint/lint-removed-allow.stderr +++ b/src/test/ui/lint/lint-removed-allow.stderr @@ -1,7 +1,7 @@ error: unused variable: `unused` --> $DIR/lint-removed-allow.rs:8:17 | -LL | fn main() { let unused = (); } //~ ERROR unused +LL | fn main() { let unused = (); } | ^^^^^^ help: consider prefixing with an underscore: `_unused` | note: lint level defined here diff --git a/src/test/ui/lint/lint-removed.stderr b/src/test/ui/lint/lint-removed.stderr index 55f010348fe..cde494f22f0 100644 --- a/src/test/ui/lint/lint-removed.stderr +++ b/src/test/ui/lint/lint-removed.stderr @@ -1,7 +1,7 @@ warning: lint `raw_pointer_derive` has been removed: `using derive with raw pointers is ok` --> $DIR/lint-removed.rs:6:8 | -LL | #[deny(raw_pointer_derive)] //~ WARN `raw_pointer_derive` has been removed +LL | #[deny(raw_pointer_derive)] | ^^^^^^^^^^^^^^^^^^ | = note: #[warn(renamed_and_removed_lints)] on by default @@ -9,7 +9,7 @@ LL | #[deny(raw_pointer_derive)] //~ WARN `raw_pointer_derive` has been removed error: unused variable: `unused` --> $DIR/lint-removed.rs:8:17 | -LL | fn main() { let unused = (); } //~ ERROR unused +LL | fn main() { let unused = (); } | ^^^^^^ help: consider prefixing with an underscore: `_unused` | note: lint level defined here diff --git a/src/test/ui/lint/lint-renamed-allow.stderr b/src/test/ui/lint/lint-renamed-allow.stderr index b2eeeae8f8e..383a800b54a 100644 --- a/src/test/ui/lint/lint-renamed-allow.stderr +++ b/src/test/ui/lint/lint-renamed-allow.stderr @@ -1,7 +1,7 @@ error: unused variable: `unused` --> $DIR/lint-renamed-allow.rs:8:17 | -LL | fn main() { let unused = (); } //~ ERROR unused +LL | fn main() { let unused = (); } | ^^^^^^ help: consider prefixing with an underscore: `_unused` | note: lint level defined here diff --git a/src/test/ui/lint/lint-renamed.stderr b/src/test/ui/lint/lint-renamed.stderr index b140a93ab38..2174b22ffb9 100644 --- a/src/test/ui/lint/lint-renamed.stderr +++ b/src/test/ui/lint/lint-renamed.stderr @@ -9,7 +9,7 @@ LL | #[deny(bare_trait_object)] error: unused variable: `unused` --> $DIR/lint-renamed.rs:4:17 | -LL | fn main() { let unused = (); } //~ ERROR unused +LL | fn main() { let unused = (); } | ^^^^^^ help: consider prefixing with an underscore: `_unused` | note: lint level defined here diff --git a/src/test/ui/lint/lint-shorthand-field.stderr b/src/test/ui/lint/lint-shorthand-field.stderr index 32c69fdddcb..366ab55d7d4 100644 --- a/src/test/ui/lint/lint-shorthand-field.stderr +++ b/src/test/ui/lint/lint-shorthand-field.stderr @@ -1,7 +1,7 @@ error: the `x:` in this pattern is redundant --> $DIR/lint-shorthand-field.rs:12:13 | -LL | x: x, //~ ERROR the `x:` in this pattern is redundant +LL | x: x, | --^^ | | | help: remove this @@ -15,7 +15,7 @@ LL | #![deny(non_shorthand_field_patterns)] error: the `y:` in this pattern is redundant --> $DIR/lint-shorthand-field.rs:13:13 | -LL | y: ref y, //~ ERROR the `y:` in this pattern is redundant +LL | y: ref y, | --^^^^^^ | | | help: remove this diff --git a/src/test/ui/lint/lint-stability-2.stderr b/src/test/ui/lint/lint-stability-2.stderr index 4142ce5af79..808c16c95a4 100644 --- a/src/test/ui/lint/lint-stability-2.stderr +++ b/src/test/ui/lint/lint-stability-2.stderr @@ -81,7 +81,7 @@ LL | ::trait_deprecated_unstable_text(&foo); error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:62:13 | -LL | foo.method_unstable(); //~ ERROR use of unstable library feature +LL | foo.method_unstable(); | ^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -89,7 +89,7 @@ LL | foo.method_unstable(); //~ ERROR use of unstable library feature error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:63:9 | -LL | Foo::method_unstable(&foo); //~ ERROR use of unstable library feature +LL | Foo::method_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -97,7 +97,7 @@ LL | Foo::method_unstable(&foo); //~ ERROR use of unstable library featu error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:64:9 | -LL | ::method_unstable(&foo); //~ ERROR use of unstable library feature +LL | ::method_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -105,7 +105,7 @@ LL | ::method_unstable(&foo); //~ ERROR use of unstable library fea error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:65:13 | -LL | foo.trait_unstable(); //~ ERROR use of unstable library feature +LL | foo.trait_unstable(); | ^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -113,7 +113,7 @@ LL | foo.trait_unstable(); //~ ERROR use of unstable library feature error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:66:9 | -LL | ::trait_unstable(&foo); //~ ERROR use of unstable library feature +LL | ::trait_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -193,7 +193,7 @@ LL | ::trait_deprecated_unstable_text(&foo); error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:139:13 | -LL | foo.trait_unstable(); //~ ERROR use of unstable library feature +LL | foo.trait_unstable(); | ^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -201,7 +201,7 @@ LL | foo.trait_unstable(); //~ ERROR use of unstable library feature error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:140:9 | -LL | ::trait_unstable(&foo); //~ ERROR use of unstable library feature +LL | ::trait_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -241,7 +241,7 @@ LL | foo.trait_deprecated_unstable_text(); error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:158:13 | -LL | foo.trait_unstable(); //~ ERROR use of unstable library feature +LL | foo.trait_unstable(); | ^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable diff --git a/src/test/ui/lint/lint-stability-deprecated.stderr b/src/test/ui/lint/lint-stability-deprecated.stderr index a1748ac59fb..811004ee12c 100644 --- a/src/test/ui/lint/lint-stability-deprecated.stderr +++ b/src/test/ui/lint/lint-stability-deprecated.stderr @@ -1,7 +1,7 @@ warning: use of deprecated item 'lint_stability::deprecated': text --> $DIR/lint-stability-deprecated.rs:26:9 | -LL | deprecated(); //~ WARN use of deprecated item 'lint_stability::deprecated' +LL | deprecated(); | ^^^^^^^^^^ | note: lint level defined here @@ -13,73 +13,73 @@ LL | #![warn(deprecated)] warning: use of deprecated item 'lint_stability::Trait::trait_deprecated': text --> $DIR/lint-stability-deprecated.rs:31:9 | -LL | Trait::trait_deprecated(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated' +LL | Trait::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated': text --> $DIR/lint-stability-deprecated.rs:33:9 | -LL | ::trait_deprecated(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated' +LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::deprecated_text': text --> $DIR/lint-stability-deprecated.rs:35:9 | -LL | deprecated_text(); //~ WARN use of deprecated item 'lint_stability::deprecated_text': text +LL | deprecated_text(); | ^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:40:9 | -LL | Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text +LL | Trait::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:42:9 | -LL | ::trait_deprecated_text(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text +LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::deprecated_unstable': text --> $DIR/lint-stability-deprecated.rs:44:9 | -LL | deprecated_unstable(); //~ WARN use of deprecated item 'lint_stability::deprecated_unstable' +LL | deprecated_unstable(); | ^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable': text --> $DIR/lint-stability-deprecated.rs:49:9 | -LL | Trait::trait_deprecated_unstable(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable' +LL | Trait::trait_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable': text --> $DIR/lint-stability-deprecated.rs:51:9 | -LL | ::trait_deprecated_unstable(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable' +LL | ::trait_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::deprecated_unstable_text': text --> $DIR/lint-stability-deprecated.rs:53:9 | -LL | deprecated_unstable_text(); //~ WARN use of deprecated item 'lint_stability::deprecated_unstable_text': text +LL | deprecated_unstable_text(); | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text --> $DIR/lint-stability-deprecated.rs:58:9 | -LL | Trait::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text +LL | Trait::trait_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text --> $DIR/lint-stability-deprecated.rs:60:9 | -LL | ::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text +LL | ::trait_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::DeprecatedStruct': text --> $DIR/lint-stability-deprecated.rs:107:17 | -LL | let _ = DeprecatedStruct { //~ WARN use of deprecated item 'lint_stability::DeprecatedStruct' +LL | let _ = DeprecatedStruct { | ^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::DeprecatedUnstableStruct': text @@ -91,157 +91,157 @@ LL | let _ = DeprecatedUnstableStruct { warning: use of deprecated item 'lint_stability::DeprecatedUnitStruct': text --> $DIR/lint-stability-deprecated.rs:117:17 | -LL | let _ = DeprecatedUnitStruct; //~ WARN use of deprecated item 'lint_stability::DeprecatedUnitStruct' +LL | let _ = DeprecatedUnitStruct; | ^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::DeprecatedUnstableUnitStruct': text --> $DIR/lint-stability-deprecated.rs:118:17 | -LL | let _ = DeprecatedUnstableUnitStruct; //~ WARN use of deprecated item 'lint_stability::DeprecatedUnstableUnitStruct' +LL | let _ = DeprecatedUnstableUnitStruct; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Enum::DeprecatedVariant': text --> $DIR/lint-stability-deprecated.rs:122:17 | -LL | let _ = Enum::DeprecatedVariant; //~ WARN use of deprecated item 'lint_stability::Enum::DeprecatedVariant' +LL | let _ = Enum::DeprecatedVariant; | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Enum::DeprecatedUnstableVariant': text --> $DIR/lint-stability-deprecated.rs:123:17 | -LL | let _ = Enum::DeprecatedUnstableVariant; //~ WARN use of deprecated item 'lint_stability::Enum::DeprecatedUnstableVariant' +LL | let _ = Enum::DeprecatedUnstableVariant; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::DeprecatedTupleStruct': text --> $DIR/lint-stability-deprecated.rs:127:17 | -LL | let _ = DeprecatedTupleStruct (1); //~ WARN use of deprecated item 'lint_stability::DeprecatedTupleStruct' +LL | let _ = DeprecatedTupleStruct (1); | ^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::DeprecatedUnstableTupleStruct': text --> $DIR/lint-stability-deprecated.rs:128:17 | -LL | let _ = DeprecatedUnstableTupleStruct (1); //~ WARN use of deprecated item 'lint_stability::DeprecatedUnstableTupleStruct' +LL | let _ = DeprecatedUnstableTupleStruct (1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::deprecated_text': text --> $DIR/lint-stability-deprecated.rs:137:25 | -LL | macro_test_arg!(deprecated_text()); //~ WARN use of deprecated item 'lint_stability::deprecated_text': text +LL | macro_test_arg!(deprecated_text()); | ^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::deprecated_unstable_text': text --> $DIR/lint-stability-deprecated.rs:138:25 | -LL | macro_test_arg!(deprecated_unstable_text()); //~ WARN use of deprecated item 'lint_stability::deprecated_unstable_text': text +LL | macro_test_arg!(deprecated_unstable_text()); | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::deprecated_text': text --> $DIR/lint-stability-deprecated.rs:139:41 | -LL | macro_test_arg!(macro_test_arg!(deprecated_text())); //~ WARN use of deprecated item 'lint_stability::deprecated_text': text +LL | macro_test_arg!(macro_test_arg!(deprecated_text())); | ^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated': text --> $DIR/lint-stability-deprecated.rs:144:9 | -LL | Trait::trait_deprecated(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated' +LL | Trait::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated': text --> $DIR/lint-stability-deprecated.rs:146:9 | -LL | ::trait_deprecated(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated' +LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:148:9 | -LL | Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text +LL | Trait::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:150:9 | -LL | ::trait_deprecated_text(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text +LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable': text --> $DIR/lint-stability-deprecated.rs:152:9 | -LL | Trait::trait_deprecated_unstable(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable' +LL | Trait::trait_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable': text --> $DIR/lint-stability-deprecated.rs:154:9 | -LL | ::trait_deprecated_unstable(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable' +LL | ::trait_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text --> $DIR/lint-stability-deprecated.rs:156:9 | -LL | Trait::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text +LL | Trait::trait_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text --> $DIR/lint-stability-deprecated.rs:158:9 | -LL | ::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text +LL | ::trait_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::DeprecatedTrait': text --> $DIR/lint-stability-deprecated.rs:186:10 | -LL | impl DeprecatedTrait for S {} //~ WARN use of deprecated item 'lint_stability::DeprecatedTrait': text +LL | impl DeprecatedTrait for S {} | ^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::DeprecatedTrait': text --> $DIR/lint-stability-deprecated.rs:188:25 | -LL | trait LocalTrait2 : DeprecatedTrait { } //~ WARN use of deprecated item 'lint_stability::DeprecatedTrait': text +LL | trait LocalTrait2 : DeprecatedTrait { } | ^^^^^^^^^^^^^^^ warning: use of deprecated item 'inheritance::inherited_stability::unstable_mod::deprecated': text --> $DIR/lint-stability-deprecated.rs:207:9 | -LL | unstable_mod::deprecated(); //~ WARN use of deprecated item 'inheritance::inherited_stability::unstable_mod::deprecated': text +LL | unstable_mod::deprecated(); | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::deprecated': text --> $DIR/lint-stability-deprecated.rs:329:9 | -LL | deprecated(); //~ WARN use of deprecated item 'this_crate::deprecated' +LL | deprecated(); | ^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated': text --> $DIR/lint-stability-deprecated.rs:334:9 | -LL | Trait::trait_deprecated(&foo); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated' +LL | Trait::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated': text --> $DIR/lint-stability-deprecated.rs:336:9 | -LL | ::trait_deprecated(&foo); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated' +LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::deprecated_text': text --> $DIR/lint-stability-deprecated.rs:338:9 | -LL | deprecated_text(); //~ WARN use of deprecated item 'this_crate::deprecated_text': text +LL | deprecated_text(); | ^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:343:9 | -LL | Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated_text': text +LL | Trait::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:345:9 | -LL | ::trait_deprecated_text(&foo); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated_text': text +LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::DeprecatedStruct': text @@ -253,67 +253,67 @@ LL | let _ = DeprecatedStruct { warning: use of deprecated item 'this_crate::DeprecatedUnitStruct': text --> $DIR/lint-stability-deprecated.rs:390:17 | -LL | let _ = DeprecatedUnitStruct; //~ WARN use of deprecated item 'this_crate::DeprecatedUnitStruct' +LL | let _ = DeprecatedUnitStruct; | ^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Enum::DeprecatedVariant': text --> $DIR/lint-stability-deprecated.rs:394:17 | -LL | let _ = Enum::DeprecatedVariant; //~ WARN use of deprecated item 'this_crate::Enum::DeprecatedVariant' +LL | let _ = Enum::DeprecatedVariant; | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::DeprecatedTupleStruct': text --> $DIR/lint-stability-deprecated.rs:398:17 | -LL | let _ = DeprecatedTupleStruct (1); //~ WARN use of deprecated item 'this_crate::DeprecatedTupleStruct' +LL | let _ = DeprecatedTupleStruct (1); | ^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated': text --> $DIR/lint-stability-deprecated.rs:405:9 | -LL | Trait::trait_deprecated(&foo); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated' +LL | Trait::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated': text --> $DIR/lint-stability-deprecated.rs:407:9 | -LL | ::trait_deprecated(&foo); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated' +LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:409:9 | -LL | Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated_text': text +LL | Trait::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:411:9 | -LL | ::trait_deprecated_text(&foo); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated_text': text +LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::test_fn_body::fn_in_body': text --> $DIR/lint-stability-deprecated.rs:438:9 | -LL | fn_in_body(); //~ WARN use of deprecated item 'this_crate::test_fn_body::fn_in_body': text +LL | fn_in_body(); | ^^^^^^^^^^ warning: use of deprecated item 'this_crate::DeprecatedTrait': text --> $DIR/lint-stability-deprecated.rs:458:10 | -LL | impl DeprecatedTrait for S { } //~ WARN use of deprecated item 'this_crate::DeprecatedTrait' +LL | impl DeprecatedTrait for S { } | ^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::DeprecatedTrait': text --> $DIR/lint-stability-deprecated.rs:460:24 | -LL | trait LocalTrait : DeprecatedTrait { } //~ WARN use of deprecated item 'this_crate::DeprecatedTrait' +LL | trait LocalTrait : DeprecatedTrait { } | ^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::MethodTester::test_method_body::fn_in_body': text --> $DIR/lint-stability-deprecated.rs:446:13 | -LL | fn_in_body(); //~ WARN use of deprecated item 'this_crate::MethodTester::test_method_body::fn_in_body': text +LL | fn_in_body(); | ^^^^^^^^^^ warning: use of deprecated item 'lint_stability::TraitWithAssociatedTypes::TypeDeprecated': text @@ -331,306 +331,306 @@ LL | TypeDeprecated = u16, warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated': text --> $DIR/lint-stability-deprecated.rs:27:13 | -LL | foo.method_deprecated(); //~ WARN use of deprecated item 'lint_stability::MethodTester::method_deprecated' +LL | foo.method_deprecated(); | ^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated': text --> $DIR/lint-stability-deprecated.rs:28:9 | -LL | Foo::method_deprecated(&foo); //~ WARN use of deprecated item 'lint_stability::MethodTester::method_deprecated' +LL | Foo::method_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated': text --> $DIR/lint-stability-deprecated.rs:29:9 | -LL | ::method_deprecated(&foo); //~ WARN use of deprecated item 'lint_stability::MethodTester::method_deprecated' +LL | ::method_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated': text --> $DIR/lint-stability-deprecated.rs:30:13 | -LL | foo.trait_deprecated(); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated' +LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated': text --> $DIR/lint-stability-deprecated.rs:32:9 | -LL | ::trait_deprecated(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated' +LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:36:13 | -LL | foo.method_deprecated_text(); //~ WARN use of deprecated item 'lint_stability::MethodTester::method_deprecated_text': text +LL | foo.method_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:37:9 | -LL | Foo::method_deprecated_text(&foo); //~ WARN use of deprecated item 'lint_stability::MethodTester::method_deprecated_text': text +LL | Foo::method_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:38:9 | -LL | ::method_deprecated_text(&foo); //~ WARN use of deprecated item 'lint_stability::MethodTester::method_deprecated_text': text +LL | ::method_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:39:13 | -LL | foo.trait_deprecated_text(); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text +LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:41:9 | -LL | ::trait_deprecated_text(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text +LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated_unstable': text --> $DIR/lint-stability-deprecated.rs:45:13 | -LL | foo.method_deprecated_unstable(); //~ WARN use of deprecated item 'lint_stability::MethodTester::method_deprecated_unstable' +LL | foo.method_deprecated_unstable(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated_unstable': text --> $DIR/lint-stability-deprecated.rs:46:9 | -LL | Foo::method_deprecated_unstable(&foo); //~ WARN use of deprecated item 'lint_stability::MethodTester::method_deprecated_unstable' +LL | Foo::method_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated_unstable': text --> $DIR/lint-stability-deprecated.rs:47:9 | -LL | ::method_deprecated_unstable(&foo); //~ WARN use of deprecated item 'lint_stability::MethodTester::method_deprecated_unstable' +LL | ::method_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable': text --> $DIR/lint-stability-deprecated.rs:48:13 | -LL | foo.trait_deprecated_unstable(); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable' +LL | foo.trait_deprecated_unstable(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable': text --> $DIR/lint-stability-deprecated.rs:50:9 | -LL | ::trait_deprecated_unstable(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable' +LL | ::trait_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated_unstable_text': text --> $DIR/lint-stability-deprecated.rs:54:13 | -LL | foo.method_deprecated_unstable_text(); //~ WARN use of deprecated item 'lint_stability::MethodTester::method_deprecated_unstable_text': text +LL | foo.method_deprecated_unstable_text(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated_unstable_text': text --> $DIR/lint-stability-deprecated.rs:55:9 | -LL | Foo::method_deprecated_unstable_text(&foo); //~ WARN use of deprecated item 'lint_stability::MethodTester::method_deprecated_unstable_text': text +LL | Foo::method_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::MethodTester::method_deprecated_unstable_text': text --> $DIR/lint-stability-deprecated.rs:56:9 | -LL | ::method_deprecated_unstable_text(&foo); //~ WARN use of deprecated item 'lint_stability::MethodTester::method_deprecated_unstable_text': text +LL | ::method_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text --> $DIR/lint-stability-deprecated.rs:57:13 | -LL | foo.trait_deprecated_unstable_text(); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text +LL | foo.trait_deprecated_unstable_text(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text --> $DIR/lint-stability-deprecated.rs:59:9 | -LL | ::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text +LL | ::trait_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::DeprecatedStruct::i': text --> $DIR/lint-stability-deprecated.rs:108:13 | -LL | i: 0 //~ WARN use of deprecated item 'lint_stability::DeprecatedStruct::i' +LL | i: 0 | ^^^^ warning: use of deprecated item 'lint_stability::DeprecatedUnstableStruct::i': text --> $DIR/lint-stability-deprecated.rs:112:13 | -LL | i: 0 //~ WARN use of deprecated item 'lint_stability::DeprecatedUnstableStruct::i' +LL | i: 0 | ^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated': text --> $DIR/lint-stability-deprecated.rs:143:13 | -LL | foo.trait_deprecated(); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated' +LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated': text --> $DIR/lint-stability-deprecated.rs:145:9 | -LL | ::trait_deprecated(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated' +LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:147:13 | -LL | foo.trait_deprecated_text(); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text +LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:149:9 | -LL | ::trait_deprecated_text(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text +LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable': text --> $DIR/lint-stability-deprecated.rs:151:13 | -LL | foo.trait_deprecated_unstable(); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable' +LL | foo.trait_deprecated_unstable(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable': text --> $DIR/lint-stability-deprecated.rs:153:9 | -LL | ::trait_deprecated_unstable(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable' +LL | ::trait_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text --> $DIR/lint-stability-deprecated.rs:155:13 | -LL | foo.trait_deprecated_unstable_text(); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text +LL | foo.trait_deprecated_unstable_text(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text --> $DIR/lint-stability-deprecated.rs:157:9 | -LL | ::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text +LL | ::trait_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated': text --> $DIR/lint-stability-deprecated.rs:174:13 | -LL | foo.trait_deprecated(); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated' +LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:175:13 | -LL | foo.trait_deprecated_text(); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_text': text +LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable': text --> $DIR/lint-stability-deprecated.rs:176:13 | -LL | foo.trait_deprecated_unstable(); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable' +LL | foo.trait_deprecated_unstable(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text --> $DIR/lint-stability-deprecated.rs:177:13 | -LL | foo.trait_deprecated_unstable_text(); //~ WARN use of deprecated item 'lint_stability::Trait::trait_deprecated_unstable_text': text +LL | foo.trait_deprecated_unstable_text(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::MethodTester::method_deprecated': text --> $DIR/lint-stability-deprecated.rs:330:13 | -LL | foo.method_deprecated(); //~ WARN use of deprecated item 'this_crate::MethodTester::method_deprecated' +LL | foo.method_deprecated(); | ^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::MethodTester::method_deprecated': text --> $DIR/lint-stability-deprecated.rs:331:9 | -LL | Foo::method_deprecated(&foo); //~ WARN use of deprecated item 'this_crate::MethodTester::method_deprecated' +LL | Foo::method_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::MethodTester::method_deprecated': text --> $DIR/lint-stability-deprecated.rs:332:9 | -LL | ::method_deprecated(&foo); //~ WARN use of deprecated item 'this_crate::MethodTester::method_deprecated' +LL | ::method_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated': text --> $DIR/lint-stability-deprecated.rs:333:13 | -LL | foo.trait_deprecated(); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated' +LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated': text --> $DIR/lint-stability-deprecated.rs:335:9 | -LL | ::trait_deprecated(&foo); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated' +LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::MethodTester::method_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:339:13 | -LL | foo.method_deprecated_text(); //~ WARN use of deprecated item 'this_crate::MethodTester::method_deprecated_text': text +LL | foo.method_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::MethodTester::method_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:340:9 | -LL | Foo::method_deprecated_text(&foo); //~ WARN use of deprecated item 'this_crate::MethodTester::method_deprecated_text': text +LL | Foo::method_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::MethodTester::method_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:341:9 | -LL | ::method_deprecated_text(&foo); //~ WARN use of deprecated item 'this_crate::MethodTester::method_deprecated_text': text +LL | ::method_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:342:13 | -LL | foo.trait_deprecated_text(); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated_text': text +LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:344:9 | -LL | ::trait_deprecated_text(&foo); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated_text': text +LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::DeprecatedStruct::i': text --> $DIR/lint-stability-deprecated.rs:385:13 | -LL | i: 0 //~ WARN use of deprecated item 'this_crate::DeprecatedStruct::i' +LL | i: 0 | ^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated': text --> $DIR/lint-stability-deprecated.rs:404:13 | -LL | foo.trait_deprecated(); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated' +LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated': text --> $DIR/lint-stability-deprecated.rs:406:9 | -LL | ::trait_deprecated(&foo); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated' +LL | ::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:408:13 | -LL | foo.trait_deprecated_text(); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated_text': text +LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:410:9 | -LL | ::trait_deprecated_text(&foo); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated_text': text +LL | ::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated': text --> $DIR/lint-stability-deprecated.rs:427:13 | -LL | foo.trait_deprecated(); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated' +LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text --> $DIR/lint-stability-deprecated.rs:428:13 | -LL | foo.trait_deprecated_text(); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated_text': text +LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/lint/lint-stability-fields.stderr b/src/test/ui/lint/lint-stability-fields.stderr index 93f8075b2b2..e80e745922d 100644 --- a/src/test/ui/lint/lint-stability-fields.stderr +++ b/src/test/ui/lint/lint-stability-fields.stderr @@ -1,7 +1,7 @@ error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:51:17 | -LL | let x = Unstable { //~ ERROR use of unstable +LL | let x = Unstable { | ^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | let x = Unstable { //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:61:13 | -LL | let Unstable { //~ ERROR use of unstable +LL | let Unstable { | ^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | let Unstable { //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:67:13 | -LL | let Unstable //~ ERROR use of unstable +LL | let Unstable | ^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -25,7 +25,7 @@ LL | let Unstable //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:72:17 | -LL | let x = reexport::Unstable2(1, 2, 3); //~ ERROR use of unstable +LL | let x = reexport::Unstable2(1, 2, 3); | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -33,7 +33,7 @@ LL | let x = reexport::Unstable2(1, 2, 3); //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:74:17 | -LL | let x = Unstable2(1, 2, 3); //~ ERROR use of unstable +LL | let x = Unstable2(1, 2, 3); | ^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -41,7 +41,7 @@ LL | let x = Unstable2(1, 2, 3); //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:80:13 | -LL | let Unstable2 //~ ERROR use of unstable +LL | let Unstable2 | ^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -49,7 +49,7 @@ LL | let Unstable2 //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:85:13 | -LL | let Unstable2 //~ ERROR use of unstable +LL | let Unstable2 | ^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -57,7 +57,7 @@ LL | let Unstable2 //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:90:17 | -LL | let x = Deprecated { //~ ERROR use of unstable +LL | let x = Deprecated { | ^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -65,7 +65,7 @@ LL | let x = Deprecated { //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:100:13 | -LL | let Deprecated { //~ ERROR use of unstable +LL | let Deprecated { | ^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -73,7 +73,7 @@ LL | let Deprecated { //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:106:13 | -LL | let Deprecated //~ ERROR use of unstable +LL | let Deprecated | ^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -81,7 +81,7 @@ LL | let Deprecated //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:110:17 | -LL | let x = Deprecated2(1, 2, 3); //~ ERROR use of unstable +LL | let x = Deprecated2(1, 2, 3); | ^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -89,7 +89,7 @@ LL | let x = Deprecated2(1, 2, 3); //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:116:13 | -LL | let Deprecated2 //~ ERROR use of unstable +LL | let Deprecated2 | ^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -97,7 +97,7 @@ LL | let Deprecated2 //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:121:13 | -LL | let Deprecated2 //~ ERROR use of unstable +LL | let Deprecated2 | ^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -105,7 +105,7 @@ LL | let Deprecated2 //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:21:13 | -LL | override1: 2, //~ ERROR use of unstable +LL | override1: 2, | ^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -113,7 +113,7 @@ LL | override1: 2, //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:22:13 | -LL | override2: 3, //~ ERROR use of unstable +LL | override2: 3, | ^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -121,7 +121,7 @@ LL | override2: 3, //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:26:17 | -LL | let _ = x.override1; //~ ERROR use of unstable +LL | let _ = x.override1; | ^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -129,7 +129,7 @@ LL | let _ = x.override1; //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:27:17 | -LL | let _ = x.override2; //~ ERROR use of unstable +LL | let _ = x.override2; | ^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -137,7 +137,7 @@ LL | let _ = x.override2; //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:31:13 | -LL | override1: _, //~ ERROR use of unstable +LL | override1: _, | ^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -145,7 +145,7 @@ LL | override1: _, //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:32:13 | -LL | override2: _ //~ ERROR use of unstable +LL | override2: _ | ^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -153,7 +153,7 @@ LL | override2: _ //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:40:17 | -LL | let _ = x.1; //~ ERROR use of unstable +LL | let _ = x.1; | ^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -161,7 +161,7 @@ LL | let _ = x.1; //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:41:17 | -LL | let _ = x.2; //~ ERROR use of unstable +LL | let _ = x.2; | ^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -169,7 +169,7 @@ LL | let _ = x.2; //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:44:20 | -LL | _, //~ ERROR use of unstable +LL | _, | ^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -177,7 +177,7 @@ LL | _, //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:45:20 | -LL | _) //~ ERROR use of unstable +LL | _) | ^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -185,7 +185,7 @@ LL | _) //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:52:13 | -LL | inherit: 1, //~ ERROR use of unstable +LL | inherit: 1, | ^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -193,7 +193,7 @@ LL | inherit: 1, //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:54:13 | -LL | override2: 3, //~ ERROR use of unstable +LL | override2: 3, | ^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -201,7 +201,7 @@ LL | override2: 3, //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:57:17 | -LL | let _ = x.inherit; //~ ERROR use of unstable +LL | let _ = x.inherit; | ^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -209,7 +209,7 @@ LL | let _ = x.inherit; //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:59:17 | -LL | let _ = x.override2; //~ ERROR use of unstable +LL | let _ = x.override2; | ^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -217,7 +217,7 @@ LL | let _ = x.override2; //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:62:13 | -LL | inherit: _, //~ ERROR use of unstable +LL | inherit: _, | ^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -225,7 +225,7 @@ LL | inherit: _, //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:64:13 | -LL | override2: _ //~ ERROR use of unstable +LL | override2: _ | ^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -233,7 +233,7 @@ LL | override2: _ //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:76:17 | -LL | let _ = x.0; //~ ERROR use of unstable +LL | let _ = x.0; | ^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -241,7 +241,7 @@ LL | let _ = x.0; //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:78:17 | -LL | let _ = x.2; //~ ERROR use of unstable +LL | let _ = x.2; | ^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -249,7 +249,7 @@ LL | let _ = x.2; //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:81:14 | -LL | (_, //~ ERROR use of unstable +LL | (_, | ^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -257,7 +257,7 @@ LL | (_, //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:83:14 | -LL | _) //~ ERROR use of unstable +LL | _) | ^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -265,7 +265,7 @@ LL | _) //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:91:13 | -LL | inherit: 1, //~ ERROR use of unstable +LL | inherit: 1, | ^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -273,7 +273,7 @@ LL | inherit: 1, //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:93:13 | -LL | override2: 3, //~ ERROR use of unstable +LL | override2: 3, | ^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -281,7 +281,7 @@ LL | override2: 3, //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:96:17 | -LL | let _ = x.inherit; //~ ERROR use of unstable +LL | let _ = x.inherit; | ^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -289,7 +289,7 @@ LL | let _ = x.inherit; //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:98:17 | -LL | let _ = x.override2; //~ ERROR use of unstable +LL | let _ = x.override2; | ^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -297,7 +297,7 @@ LL | let _ = x.override2; //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:101:13 | -LL | inherit: _, //~ ERROR use of unstable +LL | inherit: _, | ^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -305,7 +305,7 @@ LL | inherit: _, //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:103:13 | -LL | override2: _ //~ ERROR use of unstable +LL | override2: _ | ^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -313,7 +313,7 @@ LL | override2: _ //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:112:17 | -LL | let _ = x.0; //~ ERROR use of unstable +LL | let _ = x.0; | ^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -321,7 +321,7 @@ LL | let _ = x.0; //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:114:17 | -LL | let _ = x.2; //~ ERROR use of unstable +LL | let _ = x.2; | ^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -329,7 +329,7 @@ LL | let _ = x.2; //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:117:14 | -LL | (_, //~ ERROR use of unstable +LL | (_, | ^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -337,7 +337,7 @@ LL | (_, //~ ERROR use of unstable error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:119:14 | -LL | _) //~ ERROR use of unstable +LL | _) | ^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable diff --git a/src/test/ui/lint/lint-stability.stderr b/src/test/ui/lint/lint-stability.stderr index 03c42e59c67..dd7f7182530 100644 --- a/src/test/ui/lint/lint-stability.stderr +++ b/src/test/ui/lint/lint-stability.stderr @@ -1,7 +1,7 @@ error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:17:5 | -LL | extern crate stability_cfg2; //~ ERROR use of unstable library feature +LL | extern crate stability_cfg2; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -57,7 +57,7 @@ LL | ::trait_deprecated_unstable_text(&foo); error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:59:9 | -LL | unstable(); //~ ERROR use of unstable library feature +LL | unstable(); | ^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -65,7 +65,7 @@ LL | unstable(); //~ ERROR use of unstable library feature error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:60:9 | -LL | Trait::trait_unstable(&foo); //~ ERROR use of unstable library feature +LL | Trait::trait_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -73,7 +73,7 @@ LL | Trait::trait_unstable(&foo); //~ ERROR use of unstable library feat error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:61:9 | -LL | ::trait_unstable(&foo); //~ ERROR use of unstable library feature +LL | ::trait_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -113,7 +113,7 @@ LL | let _ = DeprecatedUnstableStruct { error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:103:17 | -LL | let _ = UnstableStruct { i: 0 }; //~ ERROR use of unstable library feature +LL | let _ = UnstableStruct { i: 0 }; | ^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -129,7 +129,7 @@ LL | let _ = DeprecatedUnstableUnitStruct; error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:109:17 | -LL | let _ = UnstableUnitStruct; //~ ERROR use of unstable library feature +LL | let _ = UnstableUnitStruct; | ^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -145,7 +145,7 @@ LL | let _ = Enum::DeprecatedUnstableVariant; error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:115:17 | -LL | let _ = Enum::UnstableVariant; //~ ERROR use of unstable library feature +LL | let _ = Enum::UnstableVariant; | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -161,7 +161,7 @@ LL | let _ = DeprecatedUnstableTupleStruct (1); error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:121:17 | -LL | let _ = UnstableTupleStruct (1); //~ ERROR use of unstable library feature +LL | let _ = UnstableTupleStruct (1); | ^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -209,7 +209,7 @@ LL | ::trait_deprecated_unstable_text(&foo); error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:152:9 | -LL | Trait::trait_unstable(&foo); //~ ERROR use of unstable library feature +LL | Trait::trait_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -217,7 +217,7 @@ LL | Trait::trait_unstable(&foo); //~ ERROR use of unstable library feat error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:153:9 | -LL | ::trait_unstable(&foo); //~ ERROR use of unstable library feature +LL | ::trait_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -241,7 +241,7 @@ LL | ::trait_unstable_text(&foo); error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:172:10 | -LL | impl UnstableTrait for S { } //~ ERROR use of unstable library feature +LL | impl UnstableTrait for S { } | ^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -249,7 +249,7 @@ LL | impl UnstableTrait for S { } //~ ERROR use of unstable library feature error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:174:24 | -LL | trait LocalTrait : UnstableTrait { } //~ ERROR use of unstable library feature +LL | trait LocalTrait : UnstableTrait { } | ^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -257,7 +257,7 @@ LL | trait LocalTrait : UnstableTrait { } //~ ERROR use of unstable library error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:179:9 | -LL | fn trait_unstable(&self) {} //~ ERROR use of unstable library feature +LL | fn trait_unstable(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -265,7 +265,7 @@ LL | fn trait_unstable(&self) {} //~ ERROR use of unstable library featu error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:184:5 | -LL | extern crate inherited_stability; //~ ERROR use of unstable library feature +LL | extern crate inherited_stability; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -273,7 +273,7 @@ LL | extern crate inherited_stability; //~ ERROR use of unstable library fea error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:185:9 | -LL | use self::inherited_stability::*; //~ ERROR use of unstable library feature +LL | use self::inherited_stability::*; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -281,7 +281,7 @@ LL | use self::inherited_stability::*; //~ ERROR use of unstable library fea error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:188:9 | -LL | unstable(); //~ ERROR use of unstable library feature +LL | unstable(); | ^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -289,7 +289,7 @@ LL | unstable(); //~ ERROR use of unstable library feature error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:191:9 | -LL | stable_mod::unstable(); //~ ERROR use of unstable library feature +LL | stable_mod::unstable(); | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -297,7 +297,7 @@ LL | stable_mod::unstable(); //~ ERROR use of unstable library feature error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:195:9 | -LL | unstable_mod::unstable(); //~ ERROR use of unstable library feature +LL | unstable_mod::unstable(); | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -305,7 +305,7 @@ LL | unstable_mod::unstable(); //~ ERROR use of unstable library feature error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:197:17 | -LL | let _ = Unstable::UnstableVariant; //~ ERROR use of unstable library feature +LL | let _ = Unstable::UnstableVariant; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable @@ -321,7 +321,7 @@ LL | struct S1(T::TypeUnstable); error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:92:13 | -LL | TypeUnstable = u8, //~ ERROR use of unstable library feature +LL | TypeUnstable = u8, | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_test_feature)] to the crate attributes to enable diff --git a/src/test/ui/lint/lint-type-limits.stderr b/src/test/ui/lint/lint-type-limits.stderr index 14ef953d294..71a2b3bfda8 100644 --- a/src/test/ui/lint/lint-type-limits.stderr +++ b/src/test/ui/lint/lint-type-limits.stderr @@ -1,7 +1,7 @@ error: comparison is useless due to type limits --> $DIR/lint-type-limits.rs:8:11 | -LL | while i >= 0 { //~ ERROR comparison is useless due to type limits +LL | while i >= 0 { | ^^^^^^ | = note: requested on the command line with `-D unused-comparisons` @@ -9,49 +9,49 @@ LL | while i >= 0 { //~ ERROR comparison is useless due to type limits error: comparison is useless due to type limits --> $DIR/lint-type-limits.rs:19:13 | -LL | let _ = u > 255; //~ ERROR comparison is useless due to type limits +LL | let _ = u > 255; | ^^^^^^^ error: comparison is useless due to type limits --> $DIR/lint-type-limits.rs:20:13 | -LL | let _ = 255 < u; //~ ERROR comparison is useless due to type limits +LL | let _ = 255 < u; | ^^^^^^^ error: comparison is useless due to type limits --> $DIR/lint-type-limits.rs:21:13 | -LL | let _ = u < 0; //~ ERROR comparison is useless due to type limits +LL | let _ = u < 0; | ^^^^^ error: comparison is useless due to type limits --> $DIR/lint-type-limits.rs:22:13 | -LL | let _ = 0 > u; //~ ERROR comparison is useless due to type limits +LL | let _ = 0 > u; | ^^^^^ error: comparison is useless due to type limits --> $DIR/lint-type-limits.rs:23:13 | -LL | let _ = u <= 255; //~ ERROR comparison is useless due to type limits +LL | let _ = u <= 255; | ^^^^^^^^ error: comparison is useless due to type limits --> $DIR/lint-type-limits.rs:24:13 | -LL | let _ = 255 >= u; //~ ERROR comparison is useless due to type limits +LL | let _ = 255 >= u; | ^^^^^^^^ error: comparison is useless due to type limits --> $DIR/lint-type-limits.rs:25:13 | -LL | let _ = u >= 0; //~ ERROR comparison is useless due to type limits +LL | let _ = u >= 0; | ^^^^^^ error: comparison is useless due to type limits --> $DIR/lint-type-limits.rs:26:13 | -LL | let _ = 0 <= u; //~ ERROR comparison is useless due to type limits +LL | let _ = 0 <= u; | ^^^^^^ error: aborting due to 9 previous errors diff --git a/src/test/ui/lint/lint-type-limits2.stderr b/src/test/ui/lint/lint-type-limits2.stderr index f88fff62e21..e7bc407422a 100644 --- a/src/test/ui/lint/lint-type-limits2.stderr +++ b/src/test/ui/lint/lint-type-limits2.stderr @@ -1,7 +1,7 @@ error: comparison is useless due to type limits --> $DIR/lint-type-limits2.rs:13:5 | -LL | 128 > bar() //~ ERROR comparison is useless due to type limits +LL | 128 > bar() | ^^^^^^^^^^^ | = note: requested on the command line with `-D unused-comparisons` @@ -9,7 +9,7 @@ LL | 128 > bar() //~ ERROR comparison is useless due to type limits warning: literal out of range for i8 --> $DIR/lint-type-limits2.rs:13:5 | -LL | 128 > bar() //~ ERROR comparison is useless due to type limits +LL | 128 > bar() | ^^^ | note: lint level defined here diff --git a/src/test/ui/lint/lint-type-limits3.stderr b/src/test/ui/lint/lint-type-limits3.stderr index 4f47a7ce316..742b6695c24 100644 --- a/src/test/ui/lint/lint-type-limits3.stderr +++ b/src/test/ui/lint/lint-type-limits3.stderr @@ -1,7 +1,7 @@ error: comparison is useless due to type limits --> $DIR/lint-type-limits3.rs:9:11 | -LL | while 200 != i { //~ ERROR comparison is useless due to type limits +LL | while 200 != i { | ^^^^^^^^ | = note: requested on the command line with `-D unused-comparisons` @@ -9,7 +9,7 @@ LL | while 200 != i { //~ ERROR comparison is useless due to type limits warning: literal out of range for i8 --> $DIR/lint-type-limits3.rs:9:11 | -LL | while 200 != i { //~ ERROR comparison is useless due to type limits +LL | while 200 != i { | ^^^ | note: lint level defined here diff --git a/src/test/ui/lint/lint-type-overflow.stderr b/src/test/ui/lint/lint-type-overflow.stderr index 987ee8a640c..9da007457aa 100644 --- a/src/test/ui/lint/lint-type-overflow.stderr +++ b/src/test/ui/lint/lint-type-overflow.stderr @@ -1,7 +1,7 @@ error: literal out of range for u8 --> $DIR/lint-type-overflow.rs:12:18 | -LL | let x1: u8 = 256; //~ error: literal out of range for u8 +LL | let x1: u8 = 256; | ^^^ | note: lint level defined here @@ -13,103 +13,103 @@ LL | #![deny(overflowing_literals)] error: literal out of range for u8 --> $DIR/lint-type-overflow.rs:15:14 | -LL | let x1 = 256_u8; //~ error: literal out of range for u8 +LL | let x1 = 256_u8; | ^^^^^^ error: literal out of range for i8 --> $DIR/lint-type-overflow.rs:18:18 | -LL | let x1: i8 = 128; //~ error: literal out of range for i8 +LL | let x1: i8 = 128; | ^^^ error: literal out of range for i8 --> $DIR/lint-type-overflow.rs:20:19 | -LL | let x3: i8 = -129; //~ error: literal out of range for i8 +LL | let x3: i8 = -129; | ^^^ error: literal out of range for i8 --> $DIR/lint-type-overflow.rs:21:19 | -LL | let x3: i8 = -(129); //~ error: literal out of range for i8 +LL | let x3: i8 = -(129); | ^^^^^ error: literal out of range for i8 --> $DIR/lint-type-overflow.rs:22:20 | -LL | let x3: i8 = -{129}; //~ error: literal out of range for i8 +LL | let x3: i8 = -{129}; | ^^^ error: literal out of range for i8 --> $DIR/lint-type-overflow.rs:24:10 | -LL | test(1000); //~ error: literal out of range for i8 +LL | test(1000); | ^^^^ error: literal out of range for i8 --> $DIR/lint-type-overflow.rs:26:13 | -LL | let x = 128_i8; //~ error: literal out of range for i8 +LL | let x = 128_i8; | ^^^^^^ error: literal out of range for i8 --> $DIR/lint-type-overflow.rs:30:14 | -LL | let x = -129_i8; //~ error: literal out of range for i8 +LL | let x = -129_i8; | ^^^^^^ error: literal out of range for i32 --> $DIR/lint-type-overflow.rs:34:18 | -LL | let x: i32 = 2147483648; //~ error: literal out of range for i32 +LL | let x: i32 = 2147483648; | ^^^^^^^^^^ error: literal out of range for i32 --> $DIR/lint-type-overflow.rs:35:13 | -LL | let x = 2147483648_i32; //~ error: literal out of range for i32 +LL | let x = 2147483648_i32; | ^^^^^^^^^^^^^^ error: literal out of range for i32 --> $DIR/lint-type-overflow.rs:38:19 | -LL | let x: i32 = -2147483649; //~ error: literal out of range for i32 +LL | let x: i32 = -2147483649; | ^^^^^^^^^^ error: literal out of range for i32 --> $DIR/lint-type-overflow.rs:39:14 | -LL | let x = -2147483649_i32; //~ error: literal out of range for i32 +LL | let x = -2147483649_i32; | ^^^^^^^^^^^^^^ error: literal out of range for i32 --> $DIR/lint-type-overflow.rs:40:13 | -LL | let x = 2147483648; //~ error: literal out of range for i32 +LL | let x = 2147483648; | ^^^^^^^^^^ error: literal out of range for i64 --> $DIR/lint-type-overflow.rs:42:13 | -LL | let x = 9223372036854775808_i64; //~ error: literal out of range for i64 +LL | let x = 9223372036854775808_i64; | ^^^^^^^^^^^^^^^^^^^^^^^ error: literal out of range for i64 --> $DIR/lint-type-overflow.rs:44:13 | -LL | let x = 18446744073709551615_i64; //~ error: literal out of range for i64 +LL | let x = 18446744073709551615_i64; | ^^^^^^^^^^^^^^^^^^^^^^^^ error: literal out of range for i64 --> $DIR/lint-type-overflow.rs:45:19 | -LL | let x: i64 = -9223372036854775809; //~ error: literal out of range for i64 +LL | let x: i64 = -9223372036854775809; | ^^^^^^^^^^^^^^^^^^^ error: literal out of range for i64 --> $DIR/lint-type-overflow.rs:46:14 | -LL | let x = -9223372036854775809_i64; //~ error: literal out of range for i64 +LL | let x = -9223372036854775809_i64; | ^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 18 previous errors diff --git a/src/test/ui/lint/lint-type-overflow2.stderr b/src/test/ui/lint/lint-type-overflow2.stderr index 5f63ce49680..5255f6c7593 100644 --- a/src/test/ui/lint/lint-type-overflow2.stderr +++ b/src/test/ui/lint/lint-type-overflow2.stderr @@ -1,7 +1,7 @@ warning: literal out of range for i8 --> $DIR/lint-type-overflow2.rs:9:20 | -LL | let x2: i8 = --128; //~ warn: literal out of range for i8 +LL | let x2: i8 = --128; | ^^^ | note: lint level defined here @@ -13,31 +13,31 @@ LL | #![warn(overflowing_literals)] warning: literal out of range for f32 --> $DIR/lint-type-overflow2.rs:11:14 | -LL | let x = -3.40282357e+38_f32; //~ warn: literal out of range for f32 +LL | let x = -3.40282357e+38_f32; | ^^^^^^^^^^^^^^^^^^ warning: literal out of range for f32 --> $DIR/lint-type-overflow2.rs:12:14 | -LL | let x = 3.40282357e+38_f32; //~ warn: literal out of range for f32 +LL | let x = 3.40282357e+38_f32; | ^^^^^^^^^^^^^^^^^^ warning: literal out of range for f64 --> $DIR/lint-type-overflow2.rs:13:14 | -LL | let x = -1.7976931348623159e+308_f64; //~ warn: literal out of range for f64 +LL | let x = -1.7976931348623159e+308_f64; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: literal out of range for f64 --> $DIR/lint-type-overflow2.rs:14:14 | -LL | let x = 1.7976931348623159e+308_f64; //~ warn: literal out of range for f64 +LL | let x = 1.7976931348623159e+308_f64; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: this expression will panic at runtime --> $DIR/lint-type-overflow2.rs:9:18 | -LL | let x2: i8 = --128; //~ warn: literal out of range for i8 +LL | let x2: i8 = --128; | ^^^^^ attempt to negate with overflow | note: lint level defined here diff --git a/src/test/ui/lint/lint-unconditional-recursion.stderr b/src/test/ui/lint/lint-unconditional-recursion.stderr index 50daa537591..5d2e8201b14 100644 --- a/src/test/ui/lint/lint-unconditional-recursion.stderr +++ b/src/test/ui/lint/lint-unconditional-recursion.stderr @@ -1,7 +1,7 @@ error: function cannot return without recursing --> $DIR/lint-unconditional-recursion.rs:4:1 | -LL | fn foo() { //~ ERROR function cannot return without recursing +LL | fn foo() { | ^^^^^^^^ cannot return without recursing LL | foo(); | ----- recursive call site @@ -16,7 +16,7 @@ LL | #![deny(unconditional_recursion)] error: function cannot return without recursing --> $DIR/lint-unconditional-recursion.rs:14:1 | -LL | fn baz() { //~ ERROR function cannot return without recursing +LL | fn baz() { | ^^^^^^^^ cannot return without recursing LL | if true { LL | baz() @@ -30,7 +30,7 @@ LL | baz() error: function cannot return without recursing --> $DIR/lint-unconditional-recursion.rs:26:1 | -LL | fn quz() -> bool { //~ ERROR function cannot return without recursing +LL | fn quz() -> bool { | ^^^^^^^^^^^^^^^^ cannot return without recursing LL | if true { LL | while quz() {} @@ -44,7 +44,7 @@ LL | loop { quz(); } error: function cannot return without recursing --> $DIR/lint-unconditional-recursion.rs:37:5 | -LL | fn bar(&self) { //~ ERROR function cannot return without recursing +LL | fn bar(&self) { | ^^^^^^^^^^^^^ cannot return without recursing LL | self.bar() | ---------- recursive call site @@ -54,7 +54,7 @@ LL | self.bar() error: function cannot return without recursing --> $DIR/lint-unconditional-recursion.rs:43:5 | -LL | fn bar(&self) { //~ ERROR function cannot return without recursing +LL | fn bar(&self) { | ^^^^^^^^^^^^^ cannot return without recursing LL | loop { LL | self.bar() @@ -65,7 +65,7 @@ LL | self.bar() error: function cannot return without recursing --> $DIR/lint-unconditional-recursion.rs:52:5 | -LL | fn bar(&self) { //~ ERROR function cannot return without recursing +LL | fn bar(&self) { | ^^^^^^^^^^^^^ cannot return without recursing LL | 0.bar() | ------- recursive call site @@ -75,7 +75,7 @@ LL | 0.bar() error: function cannot return without recursing --> $DIR/lint-unconditional-recursion.rs:65:5 | -LL | fn bar(&self) { //~ ERROR function cannot return without recursing +LL | fn bar(&self) { | ^^^^^^^^^^^^^ cannot return without recursing LL | Foo2::bar(self) | --------------- recursive call site @@ -85,7 +85,7 @@ LL | Foo2::bar(self) error: function cannot return without recursing --> $DIR/lint-unconditional-recursion.rs:71:5 | -LL | fn bar(&self) { //~ ERROR function cannot return without recursing +LL | fn bar(&self) { | ^^^^^^^^^^^^^ cannot return without recursing LL | loop { LL | Foo2::bar(self) @@ -96,7 +96,7 @@ LL | Foo2::bar(self) error: function cannot return without recursing --> $DIR/lint-unconditional-recursion.rs:81:5 | -LL | fn qux(&self) { //~ ERROR function cannot return without recursing +LL | fn qux(&self) { | ^^^^^^^^^^^^^ cannot return without recursing LL | self.qux(); | ---------- recursive call site @@ -106,7 +106,7 @@ LL | self.qux(); error: function cannot return without recursing --> $DIR/lint-unconditional-recursion.rs:86:5 | -LL | fn as_ref(&self) -> &Self { //~ ERROR function cannot return without recursing +LL | fn as_ref(&self) -> &Self { | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing LL | Baz::as_ref(self) | ----------------- recursive call site @@ -116,7 +116,7 @@ LL | Baz::as_ref(self) error: function cannot return without recursing --> $DIR/lint-unconditional-recursion.rs:93:5 | -LL | fn default() -> Baz { //~ ERROR function cannot return without recursing +LL | fn default() -> Baz { | ^^^^^^^^^^^^^^^^^^^ cannot return without recursing LL | let x = Default::default(); | ------------------ recursive call site @@ -126,7 +126,7 @@ LL | let x = Default::default(); error: function cannot return without recursing --> $DIR/lint-unconditional-recursion.rs:102:5 | -LL | fn deref(&self) -> &() { //~ ERROR function cannot return without recursing +LL | fn deref(&self) -> &() { | ^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing LL | &**self | ------ recursive call site @@ -136,7 +136,7 @@ LL | &**self error: function cannot return without recursing --> $DIR/lint-unconditional-recursion.rs:109:5 | -LL | fn index(&self, x: usize) -> &Baz { //~ ERROR function cannot return without recursing +LL | fn index(&self, x: usize) -> &Baz { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing LL | &self[x] | ------- recursive call site @@ -146,7 +146,7 @@ LL | &self[x] error: function cannot return without recursing --> $DIR/lint-unconditional-recursion.rs:118:5 | -LL | fn deref(&self) -> &Baz { //~ ERROR function cannot return without recursing +LL | fn deref(&self) -> &Baz { | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing LL | self.as_ref() | ---- recursive call site diff --git a/src/test/ui/lint/lint-unexported-no-mangle.stderr b/src/test/ui/lint/lint-unexported-no-mangle.stderr index f6a1087635a..586ee8ed411 100644 --- a/src/test/ui/lint/lint-unexported-no-mangle.stderr +++ b/src/test/ui/lint/lint-unexported-no-mangle.stderr @@ -9,7 +9,7 @@ warning: lint `private_no_mangle_statics` has been removed: `no longer a warning error: const items should never be #[no_mangle] --> $DIR/lint-unexported-no-mangle.rs:9:1 | -LL | const FOO: u64 = 1; //~ ERROR const items should never be #[no_mangle] +LL | const FOO: u64 = 1; | -----^^^^^^^^^^^^^^ | | | help: try a static value: `pub static` @@ -19,7 +19,7 @@ LL | const FOO: u64 = 1; //~ ERROR const items should never be #[no_mangle] error: const items should never be #[no_mangle] --> $DIR/lint-unexported-no-mangle.rs:12:1 | -LL | pub const PUB_FOO: u64 = 1; //~ ERROR const items should never be #[no_mangle] +LL | pub const PUB_FOO: u64 = 1; | ---------^^^^^^^^^^^^^^^^^^ | | | help: try a static value: `pub static` diff --git a/src/test/ui/lint/lint-unknown-attr.stderr b/src/test/ui/lint/lint-unknown-attr.stderr index 435b03b1f65..9817760c224 100644 --- a/src/test/ui/lint/lint-unknown-attr.stderr +++ b/src/test/ui/lint/lint-unknown-attr.stderr @@ -1,7 +1,7 @@ error: unused attribute --> $DIR/lint-unknown-attr.rs:9:1 | -LL | #[dance] mod a {} //~ ERROR unused attribute +LL | #[dance] mod a {} | ^^^^^^^^ | note: lint level defined here @@ -13,13 +13,13 @@ LL | #![deny(unused_attributes)] error: unused attribute --> $DIR/lint-unknown-attr.rs:11:1 | -LL | #[dance] fn main() {} //~ ERROR unused attribute +LL | #[dance] fn main() {} | ^^^^^^^^ error: unused attribute --> $DIR/lint-unknown-attr.rs:7:1 | -LL | #![mutable_doc] //~ ERROR unused attribute +LL | #![mutable_doc] | ^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/lint/lint-unknown-lint.stderr b/src/test/ui/lint/lint-unknown-lint.stderr index 976c88c11d0..b3ba6e31bc1 100644 --- a/src/test/ui/lint/lint-unknown-lint.stderr +++ b/src/test/ui/lint/lint-unknown-lint.stderr @@ -1,7 +1,7 @@ error: unknown lint: `not_a_real_lint` --> $DIR/lint-unknown-lint.rs:3:10 | -LL | #![allow(not_a_real_lint)] //~ ERROR unknown lint +LL | #![allow(not_a_real_lint)] | ^^^^^^^^^^^^^^^ | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![deny(unknown_lints)] error: unknown lint: `dead_cod` --> $DIR/lint-unknown-lint.rs:5:9 | -LL | #![deny(dead_cod)] //~ ERROR unknown lint +LL | #![deny(dead_cod)] | ^^^^^^^^ help: did you mean: `dead_code` error: aborting due to 2 previous errors diff --git a/src/test/ui/lint/lint-unnecessary-import-braces.stderr b/src/test/ui/lint/lint-unnecessary-import-braces.stderr index 40e7ab4dd13..41e274bc545 100644 --- a/src/test/ui/lint/lint-unnecessary-import-braces.stderr +++ b/src/test/ui/lint/lint-unnecessary-import-braces.stderr @@ -1,7 +1,7 @@ error: braces around A is unnecessary --> $DIR/lint-unnecessary-import-braces.rs:3:1 | -LL | use test::{A}; //~ ERROR braces around A is unnecessary +LL | use test::{A}; | ^^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/lint/lint-unnecessary-parens.stderr b/src/test/ui/lint/lint-unnecessary-parens.stderr index c14ebb6be97..fe2ee38eb42 100644 --- a/src/test/ui/lint/lint-unnecessary-parens.stderr +++ b/src/test/ui/lint/lint-unnecessary-parens.stderr @@ -1,7 +1,7 @@ error: unnecessary parentheses around `return` value --> $DIR/lint-unnecessary-parens.rs:10:12 | -LL | return (1); //~ ERROR unnecessary parentheses around `return` value +LL | return (1); | ^^^ help: remove these parentheses | note: lint level defined here @@ -13,67 +13,67 @@ LL | #![deny(unused_parens)] error: unnecessary parentheses around `return` value --> $DIR/lint-unnecessary-parens.rs:13:12 | -LL | return (X { y }); //~ ERROR unnecessary parentheses around `return` value +LL | return (X { y }); | ^^^^^^^^^ help: remove these parentheses error: unnecessary parentheses around function argument --> $DIR/lint-unnecessary-parens.rs:18:9 | -LL | bar((true)); //~ ERROR unnecessary parentheses around function argument +LL | bar((true)); | ^^^^^^ help: remove these parentheses error: unnecessary parentheses around `if` condition --> $DIR/lint-unnecessary-parens.rs:20:8 | -LL | if (true) {} //~ ERROR unnecessary parentheses around `if` condition +LL | if (true) {} | ^^^^^^ help: remove these parentheses error: unnecessary parentheses around `while` condition --> $DIR/lint-unnecessary-parens.rs:21:11 | -LL | while (true) {} //~ ERROR unnecessary parentheses around `while` condition +LL | while (true) {} | ^^^^^^ help: remove these parentheses error: unnecessary parentheses around `match` head expression --> $DIR/lint-unnecessary-parens.rs:22:11 | -LL | match (true) { //~ ERROR unnecessary parentheses around `match` head expression +LL | match (true) { | ^^^^^^ help: remove these parentheses error: unnecessary parentheses around `if let` head expression --> $DIR/lint-unnecessary-parens.rs:25:16 | -LL | if let 1 = (1) {} //~ ERROR unnecessary parentheses around `if let` head expression +LL | if let 1 = (1) {} | ^^^ help: remove these parentheses error: unnecessary parentheses around `while let` head expression --> $DIR/lint-unnecessary-parens.rs:26:19 | -LL | while let 1 = (2) {} //~ ERROR unnecessary parentheses around `while let` head expression +LL | while let 1 = (2) {} | ^^^ help: remove these parentheses error: unnecessary parentheses around method argument --> $DIR/lint-unnecessary-parens.rs:40:24 | -LL | X { y: false }.foo((true)); //~ ERROR unnecessary parentheses around method argument +LL | X { y: false }.foo((true)); | ^^^^^^ help: remove these parentheses error: unnecessary parentheses around assigned value --> $DIR/lint-unnecessary-parens.rs:42:18 | -LL | let mut _a = (0); //~ ERROR unnecessary parentheses around assigned value +LL | let mut _a = (0); | ^^^ help: remove these parentheses error: unnecessary parentheses around assigned value --> $DIR/lint-unnecessary-parens.rs:43:10 | -LL | _a = (0); //~ ERROR unnecessary parentheses around assigned value +LL | _a = (0); | ^^^ help: remove these parentheses error: unnecessary parentheses around assigned value --> $DIR/lint-unnecessary-parens.rs:44:11 | -LL | _a += (1); //~ ERROR unnecessary parentheses around assigned value +LL | _a += (1); | ^^^ help: remove these parentheses error: aborting due to 12 previous errors diff --git a/src/test/ui/lint/lint-unsafe-code.stderr b/src/test/ui/lint/lint-unsafe-code.stderr index e2dd45e2c8a..96ad0c33691 100644 --- a/src/test/ui/lint/lint-unsafe-code.stderr +++ b/src/test/ui/lint/lint-unsafe-code.stderr @@ -1,7 +1,7 @@ error: declaration of an `unsafe` function --> $DIR/lint-unsafe-code.rs:23:1 | -LL | unsafe fn baz() {} //~ ERROR: declaration of an `unsafe` function +LL | unsafe fn baz() {} | ^^^^^^^^^^^^^^^^^^ | note: lint level defined here @@ -13,79 +13,79 @@ LL | #![deny(unsafe_code)] error: declaration of an `unsafe` trait --> $DIR/lint-unsafe-code.rs:24:1 | -LL | unsafe trait Foo {} //~ ERROR: declaration of an `unsafe` trait +LL | unsafe trait Foo {} | ^^^^^^^^^^^^^^^^^^^ error: implementation of an `unsafe` trait --> $DIR/lint-unsafe-code.rs:25:1 | -LL | unsafe impl Foo for Bar {} //~ ERROR: implementation of an `unsafe` trait +LL | unsafe impl Foo for Bar {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: declaration of an `unsafe` method --> $DIR/lint-unsafe-code.rs:28:5 | -LL | unsafe fn baz(&self); //~ ERROR: declaration of an `unsafe` method +LL | unsafe fn baz(&self); | ^^^^^^^^^^^^^^^^^^^^^ error: implementation of an `unsafe` method --> $DIR/lint-unsafe-code.rs:29:5 | -LL | unsafe fn provided(&self) {} //~ ERROR: implementation of an `unsafe` method +LL | unsafe fn provided(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: implementation of an `unsafe` method --> $DIR/lint-unsafe-code.rs:30:5 | -LL | unsafe fn provided_override(&self) {} //~ ERROR: implementation of an `unsafe` method +LL | unsafe fn provided_override(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: implementation of an `unsafe` method --> $DIR/lint-unsafe-code.rs:34:5 | -LL | unsafe fn baz(&self) {} //~ ERROR: implementation of an `unsafe` method +LL | unsafe fn baz(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^ error: implementation of an `unsafe` method --> $DIR/lint-unsafe-code.rs:35:5 | -LL | unsafe fn provided_override(&self) {} //~ ERROR: implementation of an `unsafe` method +LL | unsafe fn provided_override(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: implementation of an `unsafe` method --> $DIR/lint-unsafe-code.rs:54:5 | -LL | unsafe fn provided_override(&self) {} //~ ERROR: implementation of an `unsafe` method +LL | unsafe fn provided_override(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: implementation of an `unsafe` method --> $DIR/lint-unsafe-code.rs:65:5 | -LL | unsafe fn provided(&self) {} //~ ERROR: implementation of an `unsafe` method +LL | unsafe fn provided(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: implementation of an `unsafe` method --> $DIR/lint-unsafe-code.rs:71:5 | -LL | unsafe fn provided(&self) {} //~ ERROR: implementation of an `unsafe` method +LL | unsafe fn provided(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: implementation of an `unsafe` method --> $DIR/lint-unsafe-code.rs:75:5 | -LL | unsafe fn baz(&self) {} //~ ERROR: implementation of an `unsafe` method +LL | unsafe fn baz(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^ error: usage of an `unsafe` block --> $DIR/lint-unsafe-code.rs:86:5 | -LL | unsafe {} //~ ERROR: usage of an `unsafe` block +LL | unsafe {} | ^^^^^^^^^ error: usage of an `unsafe` block --> $DIR/lint-unsafe-code.rs:19:9 | -LL | unsafe {} //~ ERROR: usage of an `unsafe` block +LL | unsafe {} | ^^^^^^^^^ ... LL | unsafe_in_macro!() diff --git a/src/test/ui/lint/lint-unused-extern-crate.stderr b/src/test/ui/lint/lint-unused-extern-crate.stderr index 46499515fa7..aa4a8dad24c 100644 --- a/src/test/ui/lint/lint-unused-extern-crate.stderr +++ b/src/test/ui/lint/lint-unused-extern-crate.stderr @@ -1,7 +1,7 @@ error: unused extern crate --> $DIR/lint-unused-extern-crate.rs:11:1 | -LL | extern crate lint_unused_extern_crate5; //~ ERROR: unused extern crate +LL | extern crate lint_unused_extern_crate5; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![deny(unused_extern_crates)] error: unused extern crate --> $DIR/lint-unused-extern-crate.rs:29:5 | -LL | extern crate lint_unused_extern_crate2; //~ ERROR unused extern crate +LL | extern crate lint_unused_extern_crate2; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it error: aborting due to 2 previous errors diff --git a/src/test/ui/lint/lint-unused-imports.stderr b/src/test/ui/lint/lint-unused-imports.stderr index 18f2fae0067..f9a54f477f9 100644 --- a/src/test/ui/lint/lint-unused-imports.stderr +++ b/src/test/ui/lint/lint-unused-imports.stderr @@ -19,37 +19,37 @@ LL | use std::option::Option::{Some, None}; error: unused import: `test::A` --> $DIR/lint-unused-imports.rs:15:5 | -LL | use test::A; //~ ERROR unused import: `test::A` +LL | use test::A; | ^^^^^^^ error: unused import: `bar` --> $DIR/lint-unused-imports.rs:24:18 | -LL | use test2::{foo, bar}; //~ ERROR unused import: `bar` +LL | use test2::{foo, bar}; | ^^^ error: unused import: `foo::Square` --> $DIR/lint-unused-imports.rs:52:13 | -LL | use foo::Square; //~ ERROR unused import: `foo::Square` +LL | use foo::Square; | ^^^^^^^^^^^ error: unused import: `self::g` --> $DIR/lint-unused-imports.rs:68:9 | -LL | use self::g; //~ ERROR unused import: `self::g` +LL | use self::g; | ^^^^^^^ error: unused import: `test2::foo` --> $DIR/lint-unused-imports.rs:77:9 | -LL | use test2::foo; //~ ERROR unused import: `test2::foo` +LL | use test2::foo; | ^^^^^^^^^^ error: unused import: `test::B2` --> $DIR/lint-unused-imports.rs:20:5 | -LL | use test::B2; //~ ERROR unused import: `test::B2` +LL | use test::B2; | ^^^^^^^^ error: aborting due to 8 previous errors diff --git a/src/test/ui/lint/lint-unused-mut-self.stderr b/src/test/ui/lint/lint-unused-mut-self.stderr index 62be0c8f159..b5f6b717dc3 100644 --- a/src/test/ui/lint/lint-unused-mut-self.stderr +++ b/src/test/ui/lint/lint-unused-mut-self.stderr @@ -1,7 +1,7 @@ error: variable does not need to be mutable --> $DIR/lint-unused-mut-self.rs:8:12 | -LL | fn foo(mut self) {} //~ ERROR: variable does not need to be mutable +LL | fn foo(mut self) {} | ----^^^^ | | | help: remove this `mut` @@ -15,7 +15,7 @@ LL | #![deny(unused_mut)] error: variable does not need to be mutable --> $DIR/lint-unused-mut-self.rs:9:12 | -LL | fn bar(mut self: Box) {} //~ ERROR: variable does not need to be mutable +LL | fn bar(mut self: Box) {} | ----^^^^ | | | help: remove this `mut` diff --git a/src/test/ui/lint/lint-unused-mut-variables.stderr b/src/test/ui/lint/lint-unused-mut-variables.stderr index a90cc964a84..e41d8f8ac74 100644 --- a/src/test/ui/lint/lint-unused-mut-variables.stderr +++ b/src/test/ui/lint/lint-unused-mut-variables.stderr @@ -1,7 +1,7 @@ error: variable does not need to be mutable --> $DIR/lint-unused-mut-variables.rs:46:14 | -LL | let x = |mut y: isize| 10; //~ ERROR: variable does not need to be mutable +LL | let x = |mut y: isize| 10; | ----^ | | | help: remove this `mut` @@ -15,7 +15,7 @@ LL | #![deny(unused_mut)] error: variable does not need to be mutable --> $DIR/lint-unused-mut-variables.rs:11:9 | -LL | let mut a = 3; //~ ERROR: variable does not need to be mutable +LL | let mut a = 3; | ----^ | | | help: remove this `mut` @@ -23,7 +23,7 @@ LL | let mut a = 3; //~ ERROR: variable does not need to be mutable error: variable does not need to be mutable --> $DIR/lint-unused-mut-variables.rs:13:9 | -LL | let mut a = 2; //~ ERROR: variable does not need to be mutable +LL | let mut a = 2; | ----^ | | | help: remove this `mut` @@ -31,7 +31,7 @@ LL | let mut a = 2; //~ ERROR: variable does not need to be mutable error: variable does not need to be mutable --> $DIR/lint-unused-mut-variables.rs:15:9 | -LL | let mut b = 3; //~ ERROR: variable does not need to be mutable +LL | let mut b = 3; | ----^ | | | help: remove this `mut` @@ -39,7 +39,7 @@ LL | let mut b = 3; //~ ERROR: variable does not need to be mutable error: variable does not need to be mutable --> $DIR/lint-unused-mut-variables.rs:17:9 | -LL | let mut a = vec![3]; //~ ERROR: variable does not need to be mutable +LL | let mut a = vec![3]; | ----^ | | | help: remove this `mut` @@ -47,7 +47,7 @@ LL | let mut a = vec![3]; //~ ERROR: variable does not need to be mutable error: variable does not need to be mutable --> $DIR/lint-unused-mut-variables.rs:19:10 | -LL | let (mut a, b) = (1, 2); //~ ERROR: variable does not need to be mutable +LL | let (mut a, b) = (1, 2); | ----^ | | | help: remove this `mut` @@ -55,7 +55,7 @@ LL | let (mut a, b) = (1, 2); //~ ERROR: variable does not need to be mutabl error: variable does not need to be mutable --> $DIR/lint-unused-mut-variables.rs:21:9 | -LL | let mut a; //~ ERROR: variable does not need to be mutable +LL | let mut a; | ----^ | | | help: remove this `mut` @@ -63,7 +63,7 @@ LL | let mut a; //~ ERROR: variable does not need to be mutable error: variable does not need to be mutable --> $DIR/lint-unused-mut-variables.rs:25:9 | -LL | let mut b; //~ ERROR: variable does not need to be mutable +LL | let mut b; | ----^ | | | help: remove this `mut` @@ -71,7 +71,7 @@ LL | let mut b; //~ ERROR: variable does not need to be mutable error: variable does not need to be mutable --> $DIR/lint-unused-mut-variables.rs:34:9 | -LL | mut x => {} //~ ERROR: variable does not need to be mutable +LL | mut x => {} | ----^ | | | help: remove this `mut` @@ -79,7 +79,7 @@ LL | mut x => {} //~ ERROR: variable does not need to be mutable error: variable does not need to be mutable --> $DIR/lint-unused-mut-variables.rs:38:8 | -LL | (mut x, 1) | //~ ERROR: variable does not need to be mutable +LL | (mut x, 1) | | ----^ | | | help: remove this `mut` @@ -87,7 +87,7 @@ LL | (mut x, 1) | //~ ERROR: variable does not need to be mutable error: variable does not need to be mutable --> $DIR/lint-unused-mut-variables.rs:51:9 | -LL | let mut a = &mut 5; //~ ERROR: variable does not need to be mutable +LL | let mut a = &mut 5; | ----^ | | | help: remove this `mut` @@ -95,7 +95,7 @@ LL | let mut a = &mut 5; //~ ERROR: variable does not need to be mutable error: variable does not need to be mutable --> $DIR/lint-unused-mut-variables.rs:56:9 | -LL | let mut b = (&mut a,); //~ ERROR: variable does not need to be mutable +LL | let mut b = (&mut a,); | ----^ | | | help: remove this `mut` @@ -103,7 +103,7 @@ LL | let mut b = (&mut a,); //~ ERROR: variable does not need to be mutable error: variable does not need to be mutable --> $DIR/lint-unused-mut-variables.rs:59:9 | -LL | let mut x = &mut 1; //~ ERROR: variable does not need to be mutable +LL | let mut x = &mut 1; | ----^ | | | help: remove this `mut` @@ -111,7 +111,7 @@ LL | let mut x = &mut 1; //~ ERROR: variable does not need to be mutable error: variable does not need to be mutable --> $DIR/lint-unused-mut-variables.rs:71:9 | -LL | let mut v : &mut Vec<()> = &mut vec![]; //~ ERROR: variable does not need to be mutable +LL | let mut v : &mut Vec<()> = &mut vec![]; | ----^ | | | help: remove this `mut` @@ -119,7 +119,7 @@ LL | let mut v : &mut Vec<()> = &mut vec![]; //~ ERROR: variable does not ne error: variable does not need to be mutable --> $DIR/lint-unused-mut-variables.rs:48:13 | -LL | fn what(mut foo: isize) {} //~ ERROR: variable does not need to be mutable +LL | fn what(mut foo: isize) {} | ----^^^ | | | help: remove this `mut` @@ -135,7 +135,7 @@ LL | fn mut_ref_arg(mut arg : &mut [u8]) -> &mut [u8] { error: variable does not need to be mutable --> $DIR/lint-unused-mut-variables.rs:130:9 | -LL | let mut b = vec![2]; //~ ERROR: variable does not need to be mutable +LL | let mut b = vec![2]; | ----^ | | | help: remove this `mut` diff --git a/src/test/ui/lint/lint-uppercase-variables.stderr b/src/test/ui/lint/lint-uppercase-variables.stderr index f2267f351dd..40c13231c18 100644 --- a/src/test/ui/lint/lint-uppercase-variables.stderr +++ b/src/test/ui/lint/lint-uppercase-variables.stderr @@ -20,7 +20,7 @@ LL | #![warn(unused)] error: structure field `X` should have a snake case name --> $DIR/lint-uppercase-variables.rs:10:5 | -LL | X: usize //~ ERROR structure field `X` should have a snake case name +LL | X: usize | ^ help: convert the identifier to snake case: `x` | note: lint level defined here @@ -32,13 +32,13 @@ LL | #![deny(non_snake_case)] error: variable `Xx` should have a snake case name --> $DIR/lint-uppercase-variables.rs:13:9 | -LL | fn test(Xx: usize) { //~ ERROR variable `Xx` should have a snake case name +LL | fn test(Xx: usize) { | ^^ help: convert the identifier to snake case: `xx` error: variable `Test` should have a snake case name --> $DIR/lint-uppercase-variables.rs:18:9 | -LL | let Test: usize = 0; //~ ERROR variable `Test` should have a snake case name +LL | let Test: usize = 0; | ^^^^ help: convert the identifier to snake case: `test` error: variable `Foo` should have a snake case name diff --git a/src/test/ui/lint/lints-in-foreign-macros.stderr b/src/test/ui/lint/lints-in-foreign-macros.stderr index 8287ca5692b..3fc3c2281f2 100644 --- a/src/test/ui/lint/lints-in-foreign-macros.stderr +++ b/src/test/ui/lint/lints-in-foreign-macros.stderr @@ -1,7 +1,7 @@ warning: unused import: `std::string::ToString` --> $DIR/lints-in-foreign-macros.rs:11:16 | -LL | () => {use std::string::ToString;} //~ WARN: unused import +LL | () => {use std::string::ToString;} | ^^^^^^^^^^^^^^^^^^^^^ ... LL | mod a { foo!(); } @@ -10,25 +10,25 @@ LL | mod a { foo!(); } note: lint level defined here --> $DIR/lints-in-foreign-macros.rs:4:9 | -LL | #![warn(unused_imports)] //~ missing documentation for crate [missing_docs] +LL | #![warn(unused_imports)] | ^^^^^^^^^^^^^^ warning: unused import: `std::string::ToString` --> $DIR/lints-in-foreign-macros.rs:16:18 | -LL | mod c { baz!(use std::string::ToString;); } //~ WARN: unused import +LL | mod c { baz!(use std::string::ToString;); } | ^^^^^^^^^^^^^^^^^^^^^ warning: unused import: `std::string::ToString` --> $DIR/lints-in-foreign-macros.rs:17:19 | -LL | mod d { baz2!(use std::string::ToString;); } //~ WARN: unused import +LL | mod d { baz2!(use std::string::ToString;); } | ^^^^^^^^^^^^^^^^^^^^^ warning: missing documentation for crate --> $DIR/lints-in-foreign-macros.rs:4:1 | -LL | / #![warn(unused_imports)] //~ missing documentation for crate [missing_docs] +LL | / #![warn(unused_imports)] LL | | #![warn(missing_docs)] LL | | LL | | #[macro_use] @@ -46,12 +46,12 @@ LL | #![warn(missing_docs)] warning: missing documentation for a function --> $DIR/lints-in-foreign-macros.rs:18:6 | -LL | baz!(pub fn undocumented() {}); //~ WARN: missing documentation for a function +LL | baz!(pub fn undocumented() {}); | ^^^^^^^^^^^^^^^^^^^^^ warning: missing documentation for a function --> $DIR/lints-in-foreign-macros.rs:19:7 | -LL | baz2!(pub fn undocumented2() {}); //~ WARN: missing documentation for a function +LL | baz2!(pub fn undocumented2() {}); | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/lint/must_use-trait.stderr b/src/test/ui/lint/must_use-trait.stderr index 94f5f4f40d2..7e2b2f67964 100644 --- a/src/test/ui/lint/must_use-trait.stderr +++ b/src/test/ui/lint/must_use-trait.stderr @@ -1,7 +1,7 @@ error: unused implementer of `Critical` that must be used --> $DIR/must_use-trait.rs:21:5 | -LL | get_critical(); //~ ERROR unused implementer of `Critical` that must be used +LL | get_critical(); | ^^^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/lint/must_use-unit.stderr b/src/test/ui/lint/must_use-unit.stderr index ee61c2d1dbc..f6229c0442f 100644 --- a/src/test/ui/lint/must_use-unit.stderr +++ b/src/test/ui/lint/must_use-unit.stderr @@ -1,7 +1,7 @@ error: unused return value of `foo` that must be used --> $DIR/must_use-unit.rs:14:5 | -LL | foo(); //~ unused return value of `foo` +LL | foo(); | ^^^^^^ | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![deny(unused_must_use)] error: unused return value of `bar` that must be used --> $DIR/must_use-unit.rs:16:5 | -LL | bar(); //~ unused return value of `bar` +LL | bar(); | ^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/lint/outer-forbid.stderr b/src/test/ui/lint/outer-forbid.stderr index 57ad55a37f0..310a5d88f8c 100644 --- a/src/test/ui/lint/outer-forbid.stderr +++ b/src/test/ui/lint/outer-forbid.stderr @@ -4,7 +4,7 @@ error[E0453]: allow(unused_variables) overruled by outer forbid(unused) LL | #![forbid(unused, non_snake_case)] | ------ `forbid` level set here LL | -LL | #[allow(unused_variables)] //~ ERROR overruled +LL | #[allow(unused_variables)] | ^^^^^^^^^^^^^^^^ overruled by previous forbid error[E0453]: allow(unused) overruled by outer forbid(unused) @@ -13,7 +13,7 @@ error[E0453]: allow(unused) overruled by outer forbid(unused) LL | #![forbid(unused, non_snake_case)] | ------ `forbid` level set here ... -LL | #[allow(unused)] //~ ERROR overruled +LL | #[allow(unused)] | ^^^^^^ overruled by previous forbid error[E0453]: allow(nonstandard_style) overruled by outer forbid(non_snake_case) @@ -22,7 +22,7 @@ error[E0453]: allow(nonstandard_style) overruled by outer forbid(non_snake_case) LL | #![forbid(unused, non_snake_case)] | -------------- `forbid` level set here ... -LL | #[allow(nonstandard_style)] //~ ERROR overruled +LL | #[allow(nonstandard_style)] | ^^^^^^^^^^^^^^^^^ overruled by previous forbid error: aborting due to 3 previous errors diff --git a/src/test/ui/lint/suggestions.stderr b/src/test/ui/lint/suggestions.stderr index 1e4eabc9db0..c28814aeee8 100644 --- a/src/test/ui/lint/suggestions.stderr +++ b/src/test/ui/lint/suggestions.stderr @@ -59,7 +59,7 @@ warning: functions generic over types or consts must be mangled | LL | #[no_mangle] | ------------ help: remove this attribute -LL | //~^ HELP remove this attribute +LL | LL | pub fn defiant(_t: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | diff --git a/src/test/ui/lint/test-inner-fn.stderr b/src/test/ui/lint/test-inner-fn.stderr index 12838cec024..bf476a45f77 100644 --- a/src/test/ui/lint/test-inner-fn.stderr +++ b/src/test/ui/lint/test-inner-fn.stderr @@ -1,7 +1,7 @@ error: cannot test inner items --> $DIR/test-inner-fn.rs:5:5 | -LL | #[test] //~ ERROR cannot test inner items [unnameable_test_items] +LL | #[test] | ^^^^^^^ | = note: requested on the command line with `-D unnameable-test-items` @@ -9,7 +9,7 @@ LL | #[test] //~ ERROR cannot test inner items [unnameable_test_items] error: cannot test inner items --> $DIR/test-inner-fn.rs:13:9 | -LL | #[test] //~ ERROR cannot test inner items [unnameable_test_items] +LL | #[test] | ^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/lint/type-overflow.stderr b/src/test/ui/lint/type-overflow.stderr index 349d0be0164..5235c9851b5 100644 --- a/src/test/ui/lint/type-overflow.stderr +++ b/src/test/ui/lint/type-overflow.stderr @@ -1,7 +1,7 @@ warning: literal out of range for i8 --> $DIR/type-overflow.rs:5:17 | -LL | let error = 255i8; //~WARNING literal out of range for i8 +LL | let error = 255i8; | ^^^^^ | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![warn(overflowing_literals)] warning: literal out of range for i8 --> $DIR/type-overflow.rs:10:16 | -LL | let fail = 0b1000_0001i8; //~WARNING literal out of range for i8 +LL | let fail = 0b1000_0001i8; | ^^^^^^^^^^^^^ help: consider using `u8` instead: `0b1000_0001u8` | = note: the literal `0b1000_0001i8` (decimal `129`) does not fit into an `i8` and will become `-127i8` @@ -21,7 +21,7 @@ LL | let fail = 0b1000_0001i8; //~WARNING literal out of range for i8 warning: literal out of range for i64 --> $DIR/type-overflow.rs:12:16 | -LL | let fail = 0x8000_0000_0000_0000i64; //~WARNING literal out of range for i64 +LL | let fail = 0x8000_0000_0000_0000i64; | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `u64` instead: `0x8000_0000_0000_0000u64` | = note: the literal `0x8000_0000_0000_0000i64` (decimal `9223372036854775808`) does not fit into an `i64` and will become `-9223372036854775808i64` @@ -29,7 +29,7 @@ LL | let fail = 0x8000_0000_0000_0000i64; //~WARNING literal out of range fo warning: literal out of range for u32 --> $DIR/type-overflow.rs:14:16 | -LL | let fail = 0x1_FFFF_FFFFu32; //~WARNING literal out of range for u32 +LL | let fail = 0x1_FFFF_FFFFu32; | ^^^^^^^^^^^^^^^^ help: consider using `u64` instead: `0x1_FFFF_FFFFu64` | = note: the literal `0x1_FFFF_FFFFu32` (decimal `8589934591`) does not fit into an `u32` and will become `4294967295u32` @@ -46,7 +46,7 @@ LL | let fail: i128 = 0x8000_0000_0000_0000_0000_0000_0000_0000; warning: literal out of range for i32 --> $DIR/type-overflow.rs:19:16 | -LL | let fail = 0x8FFF_FFFF_FFFF_FFFE; //~WARNING literal out of range for i32 +LL | let fail = 0x8FFF_FFFF_FFFF_FFFE; | ^^^^^^^^^^^^^^^^^^^^^ | = note: the literal `0x8FFF_FFFF_FFFF_FFFE` (decimal `10376293541461622782`) does not fit into an `i32` and will become `-2i32` @@ -55,7 +55,7 @@ LL | let fail = 0x8FFF_FFFF_FFFF_FFFE; //~WARNING literal out of range for i warning: literal out of range for i8 --> $DIR/type-overflow.rs:21:17 | -LL | let fail = -0b1111_1111i8; //~WARNING literal out of range for i8 +LL | let fail = -0b1111_1111i8; | ^^^^^^^^^^^^^ help: consider using `i16` instead: `0b1111_1111i16` | = note: the literal `0b1111_1111i8` (decimal `255`) does not fit into an `i8` and will become `-1i8` diff --git a/src/test/ui/lint/unused_labels.stderr b/src/test/ui/lint/unused_labels.stderr index 39d0a7850ef..08f8548e049 100644 --- a/src/test/ui/lint/unused_labels.stderr +++ b/src/test/ui/lint/unused_labels.stderr @@ -57,7 +57,7 @@ warning: label name `'many_used_shadowed` shadows a label name that is already i | LL | 'many_used_shadowed: for _ in 0..10 { | ------------------- first declared here -LL | //~^ WARN unused label +LL | LL | 'many_used_shadowed: for _ in 0..10 { | ^^^^^^^^^^^^^^^^^^^ lifetime 'many_used_shadowed already in scope diff --git a/src/test/ui/liveness/liveness-closure-require-ret.stderr b/src/test/ui/liveness/liveness-closure-require-ret.stderr index 3133efdedd7..e8f185a5cb2 100644 --- a/src/test/ui/liveness/liveness-closure-require-ret.stderr +++ b/src/test/ui/liveness/liveness-closure-require-ret.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/liveness-closure-require-ret.rs:2:37 | -LL | fn main() { println!("{}", force(|| {})); } //~ ERROR mismatched types +LL | fn main() { println!("{}", force(|| {})); } | ^^ expected isize, found () | = note: expected type `isize` diff --git a/src/test/ui/liveness/liveness-dead.stderr b/src/test/ui/liveness/liveness-dead.stderr index c89135e5135..d054b1d497e 100644 --- a/src/test/ui/liveness/liveness-dead.stderr +++ b/src/test/ui/liveness/liveness-dead.stderr @@ -1,7 +1,7 @@ error: value assigned to `x` is never read --> $DIR/liveness-dead.rs:9:13 | -LL | let mut x: isize = 3; //~ ERROR: value assigned to `x` is never read +LL | let mut x: isize = 3; | ^ | note: lint level defined here @@ -14,7 +14,7 @@ LL | #![deny(unused_assignments)] error: value assigned to `x` is never read --> $DIR/liveness-dead.rs:17:5 | -LL | x = 4; //~ ERROR: value assigned to `x` is never read +LL | x = 4; | ^ | = help: maybe it is overwritten before being read? @@ -22,7 +22,7 @@ LL | x = 4; //~ ERROR: value assigned to `x` is never read error: value passed to `x` is never read --> $DIR/liveness-dead.rs:20:11 | -LL | fn f4(mut x: i32) { //~ ERROR: value passed to `x` is never read +LL | fn f4(mut x: i32) { | ^ | = help: maybe it is overwritten before being read? @@ -30,7 +30,7 @@ LL | fn f4(mut x: i32) { //~ ERROR: value passed to `x` is never read error: value assigned to `x` is never read --> $DIR/liveness-dead.rs:27:5 | -LL | x = 4; //~ ERROR: value assigned to `x` is never read +LL | x = 4; | ^ | = help: maybe it is overwritten before being read? diff --git a/src/test/ui/liveness/liveness-issue-2163.stderr b/src/test/ui/liveness/liveness-issue-2163.stderr index e91994d9a22..780a2548f1f 100644 --- a/src/test/ui/liveness/liveness-issue-2163.stderr +++ b/src/test/ui/liveness/liveness-issue-2163.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | a.iter().all(|_| -> bool { | ______________________________^ -LL | | //~^ ERROR mismatched types +LL | | LL | | }); | |_____^ expected bool, found () | diff --git a/src/test/ui/liveness/liveness-missing-ret2.stderr b/src/test/ui/liveness/liveness-missing-ret2.stderr index 58d0249ee3b..ab7d411880b 100644 --- a/src/test/ui/liveness/liveness-missing-ret2.stderr +++ b/src/test/ui/liveness/liveness-missing-ret2.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/liveness-missing-ret2.rs:1:11 | -LL | fn f() -> isize { //~ ERROR mismatched types +LL | fn f() -> isize { | - ^^^^^ expected isize, found () | | | this function's body doesn't return diff --git a/src/test/ui/liveness/liveness-move-call-arg.stderr b/src/test/ui/liveness/liveness-move-call-arg.stderr index 21d285463e3..c50c01e2a9e 100644 --- a/src/test/ui/liveness/liveness-move-call-arg.stderr +++ b/src/test/ui/liveness/liveness-move-call-arg.stderr @@ -1,7 +1,7 @@ error[E0382]: use of moved value: `x` --> $DIR/liveness-move-call-arg.rs:9:14 | -LL | take(x); //~ ERROR use of moved value: `x` +LL | take(x); | ^ value moved here in previous iteration of loop | = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait diff --git a/src/test/ui/liveness/liveness-move-in-loop.stderr b/src/test/ui/liveness/liveness-move-in-loop.stderr index d00c2d6ac35..52e83a6a68f 100644 --- a/src/test/ui/liveness/liveness-move-in-loop.stderr +++ b/src/test/ui/liveness/liveness-move-in-loop.stderr @@ -1,7 +1,7 @@ error[E0382]: use of moved value: `y` --> $DIR/liveness-move-in-loop.rs:11:25 | -LL | x = y; //~ ERROR use of moved value +LL | x = y; | ^ value moved here in previous iteration of loop | = note: move occurs because `y` has type `std::boxed::Box`, which does not implement the `Copy` trait diff --git a/src/test/ui/liveness/liveness-move-in-while.stderr b/src/test/ui/liveness/liveness-move-in-while.stderr index 91f722cb422..61b4cd8c630 100644 --- a/src/test/ui/liveness/liveness-move-in-while.stderr +++ b/src/test/ui/liveness/liveness-move-in-while.stderr @@ -1,7 +1,7 @@ error[E0382]: use of moved value: `y` --> $DIR/liveness-move-in-while.rs:7:24 | -LL | println!("{}", y); //~ ERROR use of moved value: `y` +LL | println!("{}", y); | ^ value used here after move LL | while true { while true { while true { x = y; x.clone(); } } } | - value moved here 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 c6d166d8b31..a5d9734c069 100644 --- a/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr +++ b/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr @@ -16,7 +16,7 @@ LL | test!(); error[E0308]: mismatched types --> $DIR/liveness-return-last-stmt-semi.rs:7:19 | -LL | fn no_return() -> i32 {} //~ ERROR mismatched types +LL | fn no_return() -> i32 {} | --------- ^^^ expected i32, found () | | | this function's body doesn't return @@ -27,7 +27,7 @@ LL | fn no_return() -> i32 {} //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/liveness-return-last-stmt-semi.rs:9:19 | -LL | fn bar(x: u32) -> u32 { //~ ERROR mismatched types +LL | fn bar(x: u32) -> u32 { | --- ^^^ expected u32, found () | | | this function's body doesn't return @@ -40,7 +40,7 @@ LL | x * 2; error[E0308]: mismatched types --> $DIR/liveness-return-last-stmt-semi.rs:13:19 | -LL | fn baz(x: u64) -> u32 { //~ ERROR mismatched types +LL | fn baz(x: u64) -> u32 { | --- ^^^ expected u32, found () | | | this function's body doesn't return diff --git a/src/test/ui/liveness/liveness-unused.stderr b/src/test/ui/liveness/liveness-unused.stderr index 49795faa59c..d6077111f71 100644 --- a/src/test/ui/liveness/liveness-unused.stderr +++ b/src/test/ui/liveness/liveness-unused.stderr @@ -1,7 +1,7 @@ warning: unreachable statement --> $DIR/liveness-unused.rs:92:9 | -LL | drop(*x as i32); //~ WARNING unreachable statement +LL | drop(*x as i32); | ^^^^^^^^^^^^^^^^ | note: lint level defined here @@ -105,7 +105,7 @@ LL | let x; error: value assigned to `x` is never read --> $DIR/liveness-unused.rs:116:9 | -LL | x = 0; //~ ERROR value assigned to `x` is never read +LL | x = 0; | ^ | = help: maybe it is overwritten before being read? diff --git a/src/test/ui/liveness/liveness-use-after-move.stderr b/src/test/ui/liveness/liveness-use-after-move.stderr index 62475943d0e..ce192ae05f0 100644 --- a/src/test/ui/liveness/liveness-use-after-move.stderr +++ b/src/test/ui/liveness/liveness-use-after-move.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `*x` | LL | let y = x; | - value moved here -LL | println!("{}", *x); //~ ERROR use of moved value: `*x` +LL | println!("{}", *x); | ^^ value used here after move | = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait diff --git a/src/test/ui/liveness/liveness-use-after-send.stderr b/src/test/ui/liveness/liveness-use-after-send.stderr index 1fdb1d3ec39..28173285fb4 100644 --- a/src/test/ui/liveness/liveness-use-after-send.stderr +++ b/src/test/ui/liveness/liveness-use-after-send.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `message` | LL | send(ch, message); | ------- value moved here -LL | println!("{}", message); //~ ERROR use of moved value: `message` +LL | println!("{}", message); | ^^^^^^^ value used here after move | = note: move occurs because `message` has type `std::boxed::Box`, which does not implement the `Copy` trait diff --git a/src/test/ui/loops/loop-break-value-no-repeat.stderr b/src/test/ui/loops/loop-break-value-no-repeat.stderr index f5c6544a815..066dce531a5 100644 --- a/src/test/ui/loops/loop-break-value-no-repeat.stderr +++ b/src/test/ui/loops/loop-break-value-no-repeat.stderr @@ -1,11 +1,11 @@ error[E0571]: `break` with value from a `for` loop --> $DIR/loop-break-value-no-repeat.rs:12:9 | -LL | break 22 //~ ERROR `break` with value from a `for` loop +LL | break 22 | ^^^^^^^^ can only break with a value inside `loop` or breakable block help: instead, use `break` on its own without a value inside this `for` loop | -LL | break //~ ERROR `break` with value from a `for` loop +LL | break | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/loops/loop-break-value.stderr b/src/test/ui/loops/loop-break-value.stderr index 3e009c007e0..8823eecab64 100644 --- a/src/test/ui/loops/loop-break-value.stderr +++ b/src/test/ui/loops/loop-break-value.stderr @@ -1,11 +1,11 @@ error[E0571]: `break` with value from a `while` loop --> $DIR/loop-break-value.rs:28:9 | -LL | break (); //~ ERROR `break` with value from a `while` loop +LL | break (); | ^^^^^^^^ can only break with a value inside `loop` or breakable block help: instead, use `break` on its own without a value inside this `while` loop | -LL | break; //~ ERROR `break` with value from a `while` loop +LL | break; | ^^^^^ error[E0571]: `break` with value from a `while` loop @@ -21,11 +21,11 @@ LL | break; error[E0571]: `break` with value from a `while let` loop --> $DIR/loop-break-value.rs:38:12 | -LL | if break () { //~ ERROR `break` with value from a `while let` loop +LL | if break () { | ^^^^^^^^ can only break with a value inside `loop` or breakable block help: instead, use `break` on its own without a value inside this `while let` loop | -LL | if break { //~ ERROR `break` with value from a `while let` loop +LL | if break { | ^^^^^ error[E0571]: `break` with value from a `while let` loop @@ -51,11 +51,11 @@ LL | break; error[E0571]: `break` with value from a `for` loop --> $DIR/loop-break-value.rs:56:9 | -LL | break (); //~ ERROR `break` with value from a `for` loop +LL | break (); | ^^^^^^^^ can only break with a value inside `loop` or breakable block help: instead, use `break` on its own without a value inside this `for` loop | -LL | break; //~ ERROR `break` with value from a `for` loop +LL | break; | ^^^^^ error[E0571]: `break` with value from a `for` loop @@ -90,7 +90,7 @@ LL | let val: ! = loop { break break; }; error[E0308]: mismatched types --> $DIR/loop-break-value.rs:11:19 | -LL | break 123; //~ ERROR mismatched types +LL | break 123; | ^^^ expected &str, found integer | = note: expected type `&str` @@ -99,7 +99,7 @@ LL | break 123; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/loop-break-value.rs:16:15 | -LL | break "asdf"; //~ ERROR mismatched types +LL | break "asdf"; | ^^^^^^ expected i32, found reference | = note: expected type `i32` @@ -108,7 +108,7 @@ LL | break "asdf"; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/loop-break-value.rs:21:31 | -LL | break 'outer_loop "nope"; //~ ERROR mismatched types +LL | break 'outer_loop "nope"; | ^^^^^^ expected i32, found reference | = note: expected type `i32` @@ -117,7 +117,7 @@ LL | break 'outer_loop "nope"; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/loop-break-value.rs:73:26 | -LL | break 'c 123; //~ ERROR mismatched types +LL | break 'c 123; | ^^^ expected (), found integer | = note: expected type `()` @@ -126,7 +126,7 @@ LL | break 'c 123; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/loop-break-value.rs:80:15 | -LL | break (break, break); //~ ERROR mismatched types +LL | break (break, break); | ^^^^^^^^^^^^^^ expected (), found tuple | = note: expected type `()` @@ -135,7 +135,7 @@ LL | break (break, break); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/loop-break-value.rs:85:15 | -LL | break 2; //~ ERROR mismatched types +LL | break 2; | ^ expected (), found integer | = note: expected type `()` @@ -144,7 +144,7 @@ LL | break 2; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/loop-break-value.rs:90:9 | -LL | break; //~ ERROR mismatched types +LL | break; | ^^^^^ expected (), found integer | = note: expected type `()` diff --git a/src/test/ui/loops/loop-labeled-break-value.stderr b/src/test/ui/loops/loop-labeled-break-value.stderr index 5cfd86ea504..ad7cb4b0c2e 100644 --- a/src/test/ui/loops/loop-labeled-break-value.stderr +++ b/src/test/ui/loops/loop-labeled-break-value.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/loop-labeled-break-value.rs:3:29 | -LL | let _: i32 = loop { break }; //~ ERROR mismatched types +LL | let _: i32 = loop { break }; | ^^^^^ expected (), found i32 | = note: expected type `()` @@ -10,7 +10,7 @@ LL | let _: i32 = loop { break }; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/loop-labeled-break-value.rs:6:37 | -LL | let _: i32 = 'inner: loop { break 'inner }; //~ ERROR mismatched types +LL | let _: i32 = 'inner: loop { break 'inner }; | ^^^^^^^^^^^^ expected (), found i32 | = note: expected type `()` @@ -19,7 +19,7 @@ LL | let _: i32 = 'inner: loop { break 'inner }; //~ ERROR mismatched ty error[E0308]: mismatched types --> $DIR/loop-labeled-break-value.rs:9:45 | -LL | let _: i32 = 'inner2: loop { loop { break 'inner2 } }; //~ ERROR mismatched types +LL | let _: i32 = 'inner2: loop { loop { break 'inner2 } }; | ^^^^^^^^^^^^^ expected (), found i32 | = note: expected type `()` diff --git a/src/test/ui/loops/loop-proper-liveness.stderr b/src/test/ui/loops/loop-proper-liveness.stderr index b8fb3fe00ee..392b961fa07 100644 --- a/src/test/ui/loops/loop-proper-liveness.stderr +++ b/src/test/ui/loops/loop-proper-liveness.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/loop-proper-liveness.rs:9:22 | -LL | println!("{:?}", x); //~ ERROR use of possibly uninitialized variable +LL | println!("{:?}", x); | ^ use of possibly uninitialized `x` error: aborting due to previous error diff --git a/src/test/ui/loops/loop-properly-diverging-2.stderr b/src/test/ui/loops/loop-properly-diverging-2.stderr index 5bd088fa011..6293fdb058a 100644 --- a/src/test/ui/loops/loop-properly-diverging-2.stderr +++ b/src/test/ui/loops/loop-properly-diverging-2.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/loop-properly-diverging-2.rs:2:23 | -LL | let x: i32 = loop { break }; //~ ERROR mismatched types +LL | let x: i32 = loop { break }; | ^^^^^ expected (), found i32 | = note: expected type `()` diff --git a/src/test/ui/loops/loops-reject-duplicate-labels-2.stderr b/src/test/ui/loops/loops-reject-duplicate-labels-2.stderr index 4d1a29f7165..fc42449aa58 100644 --- a/src/test/ui/loops/loops-reject-duplicate-labels-2.stderr +++ b/src/test/ui/loops/loops-reject-duplicate-labels-2.stderr @@ -3,7 +3,7 @@ warning: label name `'fl` shadows a label name that is already in scope | LL | { 'fl: for _ in 0..10 { break; } } | --- first declared here -LL | { 'fl: loop { break; } } //~ WARN label name `'fl` shadows a label name that is already in scope +LL | { 'fl: loop { break; } } | ^^^ lifetime 'fl already in scope warning: label name `'lf` shadows a label name that is already in scope @@ -11,7 +11,7 @@ warning: label name `'lf` shadows a label name that is already in scope | LL | { 'lf: loop { break; } } | --- first declared here -LL | { 'lf: for _ in 0..10 { break; } } //~ WARN label name `'lf` shadows a label name that is already in scope +LL | { 'lf: for _ in 0..10 { break; } } | ^^^ lifetime 'lf already in scope warning: label name `'wl` shadows a label name that is already in scope @@ -19,7 +19,7 @@ warning: label name `'wl` shadows a label name that is already in scope | LL | { 'wl: while 2 > 1 { break; } } | --- first declared here -LL | { 'wl: loop { break; } } //~ WARN label name `'wl` shadows a label name that is already in scope +LL | { 'wl: loop { break; } } | ^^^ lifetime 'wl already in scope warning: label name `'lw` shadows a label name that is already in scope @@ -27,7 +27,7 @@ warning: label name `'lw` shadows a label name that is already in scope | LL | { 'lw: loop { break; } } | --- first declared here -LL | { 'lw: while 2 > 1 { break; } } //~ WARN label name `'lw` shadows a label name that is already in scope +LL | { 'lw: while 2 > 1 { break; } } | ^^^ lifetime 'lw already in scope warning: label name `'fw` shadows a label name that is already in scope @@ -35,7 +35,7 @@ warning: label name `'fw` shadows a label name that is already in scope | LL | { 'fw: for _ in 0..10 { break; } } | --- first declared here -LL | { 'fw: while 2 > 1 { break; } } //~ WARN label name `'fw` shadows a label name that is already in scope +LL | { 'fw: while 2 > 1 { break; } } | ^^^ lifetime 'fw already in scope warning: label name `'wf` shadows a label name that is already in scope @@ -43,7 +43,7 @@ warning: label name `'wf` shadows a label name that is already in scope | LL | { 'wf: while 2 > 1 { break; } } | --- first declared here -LL | { 'wf: for _ in 0..10 { break; } } //~ WARN label name `'wf` shadows a label name that is already in scope +LL | { 'wf: for _ in 0..10 { break; } } | ^^^ lifetime 'wf already in scope warning: label name `'tl` shadows a label name that is already in scope @@ -51,7 +51,7 @@ warning: label name `'tl` shadows a label name that is already in scope | LL | { 'tl: while let Some(_) = None:: { break; } } | --- first declared here -LL | { 'tl: loop { break; } } //~ WARN label name `'tl` shadows a label name that is already in scope +LL | { 'tl: loop { break; } } | ^^^ lifetime 'tl already in scope warning: label name `'lt` shadows a label name that is already in scope diff --git a/src/test/ui/loops/loops-reject-duplicate-labels.stderr b/src/test/ui/loops/loops-reject-duplicate-labels.stderr index f9a19ad57f0..4574c5ca0bd 100644 --- a/src/test/ui/loops/loops-reject-duplicate-labels.stderr +++ b/src/test/ui/loops/loops-reject-duplicate-labels.stderr @@ -3,7 +3,7 @@ warning: label name `'fl` shadows a label name that is already in scope | LL | 'fl: for _ in 0..10 { break; } | --- first declared here -LL | 'fl: loop { break; } //~ WARN label name `'fl` shadows a label name that is already in scope +LL | 'fl: loop { break; } | ^^^ lifetime 'fl already in scope warning: label name `'lf` shadows a label name that is already in scope @@ -11,7 +11,7 @@ warning: label name `'lf` shadows a label name that is already in scope | LL | 'lf: loop { break; } | --- first declared here -LL | 'lf: for _ in 0..10 { break; } //~ WARN label name `'lf` shadows a label name that is already in scope +LL | 'lf: for _ in 0..10 { break; } | ^^^ lifetime 'lf already in scope warning: label name `'wl` shadows a label name that is already in scope @@ -19,7 +19,7 @@ warning: label name `'wl` shadows a label name that is already in scope | LL | 'wl: while 2 > 1 { break; } | --- first declared here -LL | 'wl: loop { break; } //~ WARN label name `'wl` shadows a label name that is already in scope +LL | 'wl: loop { break; } | ^^^ lifetime 'wl already in scope warning: label name `'lw` shadows a label name that is already in scope @@ -27,7 +27,7 @@ warning: label name `'lw` shadows a label name that is already in scope | LL | 'lw: loop { break; } | --- first declared here -LL | 'lw: while 2 > 1 { break; } //~ WARN label name `'lw` shadows a label name that is already in scope +LL | 'lw: while 2 > 1 { break; } | ^^^ lifetime 'lw already in scope warning: label name `'fw` shadows a label name that is already in scope @@ -35,7 +35,7 @@ warning: label name `'fw` shadows a label name that is already in scope | LL | 'fw: for _ in 0..10 { break; } | --- first declared here -LL | 'fw: while 2 > 1 { break; } //~ WARN label name `'fw` shadows a label name that is already in scope +LL | 'fw: while 2 > 1 { break; } | ^^^ lifetime 'fw already in scope warning: label name `'wf` shadows a label name that is already in scope @@ -43,7 +43,7 @@ warning: label name `'wf` shadows a label name that is already in scope | LL | 'wf: while 2 > 1 { break; } | --- first declared here -LL | 'wf: for _ in 0..10 { break; } //~ WARN label name `'wf` shadows a label name that is already in scope +LL | 'wf: for _ in 0..10 { break; } | ^^^ lifetime 'wf already in scope warning: label name `'tl` shadows a label name that is already in scope @@ -51,7 +51,7 @@ warning: label name `'tl` shadows a label name that is already in scope | LL | 'tl: while let Some(_) = None:: { break; } | --- first declared here -LL | 'tl: loop { break; } //~ WARN label name `'tl` shadows a label name that is already in scope +LL | 'tl: loop { break; } | ^^^ lifetime 'tl already in scope warning: label name `'lt` shadows a label name that is already in scope diff --git a/src/test/ui/lub-glb/old-lub-glb-hr.stderr b/src/test/ui/lub-glb/old-lub-glb-hr.stderr index 8f228ea4cad..475c1801ca1 100644 --- a/src/test/ui/lub-glb/old-lub-glb-hr.stderr +++ b/src/test/ui/lub-glb/old-lub-glb-hr.stderr @@ -5,7 +5,7 @@ LL | let z = match 22 { | _____________- LL | | 0 => x, | | - this is found to be of type `for<'r, 's> fn(&'r u8, &'s u8)` -LL | | _ => y, //~ ERROR match arms have incompatible types +LL | | _ => y, | | ^ expected bound lifetime parameter, found concrete lifetime LL | | }; | |_____- `match` arms have incompatible types diff --git a/src/test/ui/lub-glb/old-lub-glb-object.stderr b/src/test/ui/lub-glb/old-lub-glb-object.stderr index 056f9131dd2..e02ede399e6 100644 --- a/src/test/ui/lub-glb/old-lub-glb-object.stderr +++ b/src/test/ui/lub-glb/old-lub-glb-object.stderr @@ -5,7 +5,7 @@ LL | let z = match 22 { | _____________- LL | | 0 => x, | | - this is found to be of type `&dyn for<'a, 'b> Foo<&'a u8, &'b u8>` -LL | | _ => y, //~ ERROR match arms have incompatible types +LL | | _ => y, | | ^ expected bound lifetime parameter 'a, found concrete lifetime LL | | }; | |_____- `match` arms have incompatible types diff --git a/src/test/ui/lub-if.stderr b/src/test/ui/lub-if.stderr index 2cf12ba6041..26f756c9183 100644 --- a/src/test/ui/lub-if.stderr +++ b/src/test/ui/lub-if.stderr @@ -1,7 +1,7 @@ error[E0312]: lifetime of reference outlives lifetime of borrowed content... --> $DIR/lub-if.rs:28:9 | -LL | s //~ ERROR E0312 +LL | s | ^ | = note: ...the reference is valid for the static lifetime... @@ -14,7 +14,7 @@ LL | pub fn opt_str2<'a>(maybestr: &'a Option) -> &'static str { error[E0312]: lifetime of reference outlives lifetime of borrowed content... --> $DIR/lub-if.rs:35:9 | -LL | s //~ ERROR E0312 +LL | s | ^ | = note: ...the reference is valid for the static lifetime... diff --git a/src/test/ui/lub-match.stderr b/src/test/ui/lub-match.stderr index 0db27f91717..0cb0a23c6f2 100644 --- a/src/test/ui/lub-match.stderr +++ b/src/test/ui/lub-match.stderr @@ -1,7 +1,7 @@ error[E0312]: lifetime of reference outlives lifetime of borrowed content... --> $DIR/lub-match.rs:30:13 | -LL | s //~ ERROR E0312 +LL | s | ^ | = note: ...the reference is valid for the static lifetime... @@ -14,7 +14,7 @@ LL | pub fn opt_str2<'a>(maybestr: &'a Option) -> &'static str { error[E0312]: lifetime of reference outlives lifetime of borrowed content... --> $DIR/lub-match.rs:39:13 | -LL | s //~ ERROR E0312 +LL | s | ^ | = note: ...the reference is valid for the static lifetime... diff --git a/src/test/ui/macros/ambiguity-legacy-vs-modern.stderr b/src/test/ui/macros/ambiguity-legacy-vs-modern.stderr index 2785594585d..d9a0a9f0054 100644 --- a/src/test/ui/macros/ambiguity-legacy-vs-modern.stderr +++ b/src/test/ui/macros/ambiguity-legacy-vs-modern.stderr @@ -1,7 +1,7 @@ error[E0659]: `m` is ambiguous (`macro_rules` vs non-`macro_rules` from other module) --> $DIR/ambiguity-legacy-vs-modern.rs:31:9 | -LL | m!() //~ ERROR `m` is ambiguous +LL | m!() | ^ ambiguous name | note: `m` could refer to the macro defined here @@ -18,7 +18,7 @@ LL | macro m() { 0 } error[E0659]: `m` is ambiguous (`macro_rules` vs non-`macro_rules` from other module) --> $DIR/ambiguity-legacy-vs-modern.rs:43:5 | -LL | m!() //~ ERROR `m` is ambiguous +LL | m!() | ^ ambiguous name | note: `m` could refer to the macro defined here diff --git a/src/test/ui/macros/assert.stderr b/src/test/ui/macros/assert.stderr index 2cfcebabcb9..fa604506b94 100644 --- a/src/test/ui/macros/assert.stderr +++ b/src/test/ui/macros/assert.stderr @@ -1,19 +1,19 @@ error: macro requires a boolean expression as an argument --> $DIR/assert.rs:2:5 | -LL | assert!(); //~ ERROR requires a boolean expression +LL | assert!(); | ^^^^^^^^^^ boolean expression required error: expected expression, found keyword `struct` --> $DIR/assert.rs:3:13 | -LL | assert!(struct); //~ ERROR expected expression +LL | assert!(struct); | ^^^^^^ expected expression error: macro requires a boolean expression as an argument --> $DIR/assert.rs:4:5 | -LL | debug_assert!(); //~ ERROR requires a boolean expression +LL | debug_assert!(); | ^^^^^^^^^^^^^^^^ boolean expression required | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) @@ -21,7 +21,7 @@ LL | debug_assert!(); //~ ERROR requires a boolean expression error: expected expression, found keyword `struct` --> $DIR/assert.rs:5:19 | -LL | debug_assert!(struct); //~ ERROR expected expression +LL | debug_assert!(struct); | ^^^^^^ expected expression error: aborting due to 4 previous errors diff --git a/src/test/ui/macros/cfg.stderr b/src/test/ui/macros/cfg.stderr index a7aca88f3e5..0fdb62922a7 100644 --- a/src/test/ui/macros/cfg.stderr +++ b/src/test/ui/macros/cfg.stderr @@ -1,19 +1,19 @@ error: macro requires a cfg-pattern as an argument --> $DIR/cfg.rs:2:5 | -LL | cfg!(); //~ ERROR macro requires a cfg-pattern +LL | cfg!(); | ^^^^^^^ cfg-pattern required error: expected identifier, found `123` --> $DIR/cfg.rs:3:10 | -LL | cfg!(123); //~ ERROR expected identifier +LL | cfg!(123); | ^^^ expected identifier error[E0565]: literal in `cfg` predicate value must be a string --> $DIR/cfg.rs:4:16 | -LL | cfg!(foo = 123); //~ ERROR literal in `cfg` predicate value must be a string +LL | cfg!(foo = 123); | ^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/macros/format-foreign.stderr b/src/test/ui/macros/format-foreign.stderr index 0b8bfcbdc17..87cadada3c7 100644 --- a/src/test/ui/macros/format-foreign.stderr +++ b/src/test/ui/macros/format-foreign.stderr @@ -1,7 +1,7 @@ error: multiple unused formatting arguments --> $DIR/format-foreign.rs:2:30 | -LL | println!("%.*3$s %s!/n", "Hello,", "World", 4); //~ ERROR multiple unused formatting arguments +LL | println!("%.*3$s %s!/n", "Hello,", "World", 4); | -------------- ^^^^^^^^ ^^^^^^^ ^ argument never used | | | | | | | argument never used @@ -11,13 +11,13 @@ LL | println!("%.*3$s %s!/n", "Hello,", "World", 4); //~ ERROR multiple unus = note: printf formatting not supported; see the documentation for `std::fmt` help: format specifiers use curly braces | -LL | println!("{:.2$} {}!/n", "Hello,", "World", 4); //~ ERROR multiple unused formatting arguments +LL | println!("{:.2$} {}!/n", "Hello,", "World", 4); | ^^^^^^ ^^ error: argument never used --> $DIR/format-foreign.rs:3:29 | -LL | println!("%1$*2$.*3$f", 123.456); //~ ERROR never used +LL | println!("%1$*2$.*3$f", 123.456); | ----------- ^^^^^^^ argument never used | | | help: format specifiers use curly braces: `{0:1$.2$}` @@ -47,7 +47,7 @@ LL | {}!/n error: argument never used --> $DIR/format-foreign.rs:12:30 | -LL | println!("{} %f", "one", 2.0); //~ ERROR never used +LL | println!("{} %f", "one", 2.0); | ------- ^^^ argument never used | | | formatting specifier missing @@ -55,7 +55,7 @@ LL | println!("{} %f", "one", 2.0); //~ ERROR never used error: named argument never used --> $DIR/format-foreign.rs:14:39 | -LL | println!("Hi there, $NAME.", NAME="Tim"); //~ ERROR never used +LL | println!("Hi there, $NAME.", NAME="Tim"); | ----- ^^^^^ named argument never used | | | help: format specifiers use curly braces: `{NAME}` diff --git a/src/test/ui/macros/format-parse-errors.stderr b/src/test/ui/macros/format-parse-errors.stderr index a3d2786bce1..b634cf2d994 100644 --- a/src/test/ui/macros/format-parse-errors.stderr +++ b/src/test/ui/macros/format-parse-errors.stderr @@ -1,7 +1,7 @@ error: requires at least a format string argument --> $DIR/format-parse-errors.rs:2:5 | -LL | format!(); //~ ERROR requires at least a format string argument +LL | format!(); | ^^^^^^^^^^ | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) @@ -9,41 +9,41 @@ LL | format!(); //~ ERROR requires at least a format string argument error: expected expression, found keyword `struct` --> $DIR/format-parse-errors.rs:3:13 | -LL | format!(struct); //~ ERROR expected expression +LL | format!(struct); | ^^^^^^ expected expression error: expected expression, found `` --> $DIR/format-parse-errors.rs:4:23 | -LL | format!("s", name =); //~ ERROR expected expression +LL | format!("s", name =); | ^ expected expression error: expected `=`, found `` --> $DIR/format-parse-errors.rs:5:29 | -LL | format!("s", foo = foo, bar); //~ ERROR expected `=` +LL | format!("s", foo = foo, bar); | ^^^ expected `=` error: expected expression, found keyword `struct` --> $DIR/format-parse-errors.rs:6:24 | -LL | format!("s", foo = struct); //~ ERROR expected expression +LL | format!("s", foo = struct); | ^^^^^^ expected expression error: expected expression, found keyword `struct` --> $DIR/format-parse-errors.rs:7:18 | -LL | format!("s", struct); //~ ERROR expected expression +LL | format!("s", struct); | ^^^^^^ expected expression error: format argument must be a string literal --> $DIR/format-parse-errors.rs:10:13 | -LL | format!(123); //~ ERROR format argument must be a string literal +LL | format!(123); | ^^^ help: you might be missing a string literal to format with | -LL | format!("{}", 123); //~ ERROR format argument must be a string literal +LL | format!("{}", 123); | ^^^^^ error: aborting due to 7 previous errors diff --git a/src/test/ui/macros/format-unused-lables.stderr b/src/test/ui/macros/format-unused-lables.stderr index 0a5e379a4ad..7423c7b7c8b 100644 --- a/src/test/ui/macros/format-unused-lables.stderr +++ b/src/test/ui/macros/format-unused-lables.stderr @@ -13,7 +13,7 @@ error: multiple unused formatting arguments | LL | println!("Test2", | ------- multiple missing formatting specifiers -LL | 123, //~ ERROR multiple unused formatting arguments +LL | 123, | ^^^ argument never used LL | 456, | ^^^ argument never used @@ -23,7 +23,7 @@ LL | 789 error: named argument never used --> $DIR/format-unused-lables.rs:11:35 | -LL | println!("Some stuff", UNUSED="args"); //~ ERROR named argument never used +LL | println!("Some stuff", UNUSED="args"); | ------------ ^^^^^^ named argument never used | | | formatting specifier missing @@ -36,7 +36,7 @@ LL | println!("Some more $STUFF", | | | | | help: format specifiers use curly braces: `{STUFF}` | multiple missing formatting specifiers -LL | "woo!", //~ ERROR multiple unused formatting arguments +LL | "woo!", | ^^^^^^ argument never used LL | STUFF= LL | "things" diff --git a/src/test/ui/macros/global-asm.stderr b/src/test/ui/macros/global-asm.stderr index 94664c96db3..c43bf83fe19 100644 --- a/src/test/ui/macros/global-asm.stderr +++ b/src/test/ui/macros/global-asm.stderr @@ -1,19 +1,19 @@ error: macro requires a string literal as an argument --> $DIR/global-asm.rs:4:5 | -LL | global_asm!(); //~ ERROR requires a string literal as an argument +LL | global_asm!(); | ^^^^^^^^^^^^^^ string literal required error: expected expression, found keyword `struct` --> $DIR/global-asm.rs:5:17 | -LL | global_asm!(struct); //~ ERROR expected expression +LL | global_asm!(struct); | ^^^^^^ expected expression error: inline assembly must be a string literal --> $DIR/global-asm.rs:6:17 | -LL | global_asm!(123); //~ ERROR inline assembly must be a string literal +LL | global_asm!(123); | ^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/macros/issue-54441.stderr b/src/test/ui/macros/issue-54441.stderr index e27056b412a..b0fafdc3b63 100644 --- a/src/test/ui/macros/issue-54441.stderr +++ b/src/test/ui/macros/issue-54441.stderr @@ -1,7 +1,7 @@ error: expected one of `crate`, `fn`, `pub`, `static`, or `type`, found `let` --> $DIR/issue-54441.rs:5:9 | -LL | let //~ ERROR expected +LL | let | ^^^ unexpected token ... LL | m!(); diff --git a/src/test/ui/macros/macro-at-most-once-rep-2015-ques-rep.stderr b/src/test/ui/macros/macro-at-most-once-rep-2015-ques-rep.stderr index cb0a9163b74..e78f2833078 100644 --- a/src/test/ui/macros/macro-at-most-once-rep-2015-ques-rep.stderr +++ b/src/test/ui/macros/macro-at-most-once-rep-2015-ques-rep.stderr @@ -1,7 +1,7 @@ error: expected `*` or `+` --> $DIR/macro-at-most-once-rep-2015-ques-rep.rs:6:10 | -LL | ($(a)?) => {} //~ERROR expected `*` or `+` +LL | ($(a)?) => {} | ^ | = note: `?` is not a macro repetition operator in the 2015 edition, but is accepted in the 2018 edition @@ -9,7 +9,7 @@ LL | ($(a)?) => {} //~ERROR expected `*` or `+` error: expected `*` or `+` --> $DIR/macro-at-most-once-rep-2015-ques-rep.rs:10:11 | -LL | ($(a),?) => {} //~ERROR expected `*` or `+` +LL | ($(a),?) => {} | ^ | = note: `?` is not a macro repetition operator in the 2015 edition, but is accepted in the 2018 edition diff --git a/src/test/ui/macros/macro-at-most-once-rep-2015-ques-sep.stderr b/src/test/ui/macros/macro-at-most-once-rep-2015-ques-sep.stderr index b171cf8b34d..bf1861ae540 100644 --- a/src/test/ui/macros/macro-at-most-once-rep-2015-ques-sep.stderr +++ b/src/test/ui/macros/macro-at-most-once-rep-2015-ques-sep.stderr @@ -1,7 +1,7 @@ warning: using `?` as a separator is deprecated and will be a hard error in an upcoming edition --> $DIR/macro-at-most-once-rep-2015-ques-sep.rs:10:10 | -LL | ($(a)?*) => {} //~WARN using `?` as a separator +LL | ($(a)?*) => {} | ^ | note: lint level defined here @@ -16,7 +16,7 @@ LL | #![warn(rust_2018_compatibility)] warning: using `?` as a separator is deprecated and will be a hard error in an upcoming edition --> $DIR/macro-at-most-once-rep-2015-ques-sep.rs:15:10 | -LL | ($(a)?+) => {} //~WARN using `?` as a separator +LL | ($(a)?+) => {} | ^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! diff --git a/src/test/ui/macros/macro-at-most-once-rep-2018.stderr b/src/test/ui/macros/macro-at-most-once-rep-2018.stderr index 657c7e54d97..f285c7cc7c2 100644 --- a/src/test/ui/macros/macro-at-most-once-rep-2018.stderr +++ b/src/test/ui/macros/macro-at-most-once-rep-2018.stderr @@ -1,7 +1,7 @@ error: the `?` macro repetition operator does not take a separator --> $DIR/macro-at-most-once-rep-2018.rs:10:10 | -LL | ($(a),?) => {}; //~ERROR the `?` macro repetition operator +LL | ($(a),?) => {}; | ^ error: no rules expected the token `?` @@ -10,7 +10,7 @@ error: no rules expected the token `?` LL | macro_rules! foo { | ---------------- when calling this macro ... -LL | foo!(a?); //~ ERROR no rules expected the token `?` +LL | foo!(a?); | ^ no rules expected this token in macro call error: no rules expected the token `?` @@ -19,7 +19,7 @@ error: no rules expected the token `?` LL | macro_rules! foo { | ---------------- when calling this macro ... -LL | foo!(a?a); //~ ERROR no rules expected the token `?` +LL | foo!(a?a); | ^ no rules expected this token in macro call error: no rules expected the token `?` @@ -28,7 +28,7 @@ error: no rules expected the token `?` LL | macro_rules! foo { | ---------------- when calling this macro ... -LL | foo!(a?a?a); //~ ERROR no rules expected the token `?` +LL | foo!(a?a?a); | ^ no rules expected this token in macro call error: unexpected end of macro invocation @@ -37,7 +37,7 @@ error: unexpected end of macro invocation LL | macro_rules! barplus { | -------------------- when calling this macro ... -LL | barplus!(); //~ERROR unexpected end of macro invocation +LL | barplus!(); | ^^^^^^^^^^^ missing tokens in macro arguments error: unexpected end of macro invocation @@ -46,7 +46,7 @@ error: unexpected end of macro invocation LL | macro_rules! barplus { | -------------------- when calling this macro ... -LL | barplus!(a); //~ERROR unexpected end of macro invocation +LL | barplus!(a); | ^ missing tokens in macro arguments error: no rules expected the token `?` @@ -55,7 +55,7 @@ error: no rules expected the token `?` LL | macro_rules! barplus { | -------------------- when calling this macro ... -LL | barplus!(a?); //~ ERROR no rules expected the token `?` +LL | barplus!(a?); | ^ no rules expected this token in macro call error: no rules expected the token `?` @@ -64,7 +64,7 @@ error: no rules expected the token `?` LL | macro_rules! barplus { | -------------------- when calling this macro ... -LL | barplus!(a?a); //~ ERROR no rules expected the token `?` +LL | barplus!(a?a); | ^ no rules expected this token in macro call error: unexpected end of macro invocation @@ -73,7 +73,7 @@ error: unexpected end of macro invocation LL | macro_rules! barstar { | -------------------- when calling this macro ... -LL | barstar!(); //~ERROR unexpected end of macro invocation +LL | barstar!(); | ^^^^^^^^^^^ missing tokens in macro arguments error: unexpected end of macro invocation @@ -82,7 +82,7 @@ error: unexpected end of macro invocation LL | macro_rules! barstar { | -------------------- when calling this macro ... -LL | barstar!(a); //~ERROR unexpected end of macro invocation +LL | barstar!(a); | ^ missing tokens in macro arguments error: no rules expected the token `?` @@ -91,7 +91,7 @@ error: no rules expected the token `?` LL | macro_rules! barstar { | -------------------- when calling this macro ... -LL | barstar!(a?); //~ ERROR no rules expected the token `?` +LL | barstar!(a?); | ^ no rules expected this token in macro call error: no rules expected the token `?` @@ -100,7 +100,7 @@ error: no rules expected the token `?` LL | macro_rules! barstar { | -------------------- when calling this macro ... -LL | barstar!(a?a); //~ ERROR no rules expected the token `?` +LL | barstar!(a?a); | ^ no rules expected this token in macro call error: aborting due to 12 previous errors diff --git a/src/test/ui/macros/macro-attribute.stderr b/src/test/ui/macros/macro-attribute.stderr index 7314e483348..aa1cd94b0c6 100644 --- a/src/test/ui/macros/macro-attribute.stderr +++ b/src/test/ui/macros/macro-attribute.stderr @@ -1,7 +1,7 @@ error: unexpected token: `$` --> $DIR/macro-attribute.rs:1:7 | -LL | #[doc = $not_there] //~ ERROR unexpected token: `$` +LL | #[doc = $not_there] | ^ error: aborting due to previous error diff --git a/src/test/ui/macros/macro-backtrace-invalid-internals.stderr b/src/test/ui/macros/macro-backtrace-invalid-internals.stderr index 353ae1d0ea6..11a4b44eff1 100644 --- a/src/test/ui/macros/macro-backtrace-invalid-internals.stderr +++ b/src/test/ui/macros/macro-backtrace-invalid-internals.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `fake` found for type `{integer}` in the current scope --> $DIR/macro-backtrace-invalid-internals.rs:5:13 | -LL | 1.fake() //~ ERROR no method +LL | 1.fake() | ^^^^ ... LL | fake_method_stmt!(); @@ -10,7 +10,7 @@ LL | fake_method_stmt!(); error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/macro-backtrace-invalid-internals.rs:11:13 | -LL | 1.fake //~ ERROR doesn't have fields +LL | 1.fake | ^^^^ ... LL | fake_field_stmt!(); @@ -19,7 +19,7 @@ LL | fake_field_stmt!(); error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/macro-backtrace-invalid-internals.rs:17:15 | -LL | (1).0 //~ ERROR doesn't have fields +LL | (1).0 | ^ ... LL | fake_anon_field_stmt!(); @@ -28,20 +28,20 @@ LL | fake_anon_field_stmt!(); error[E0689]: can't call method `neg` on ambiguous numeric type `{float}` --> $DIR/macro-backtrace-invalid-internals.rs:41:15 | -LL | 2.0.neg() //~ ERROR can't call method `neg` on ambiguous numeric type `{float}` +LL | 2.0.neg() | ^^^ ... LL | real_method_stmt!(); | -------------------- in this macro invocation help: you must specify a concrete type for this numeric value, like `f32` | -LL | 2.0_f32.neg() //~ ERROR can't call method `neg` on ambiguous numeric type `{float}` +LL | 2.0_f32.neg() | ^^^^^^^ error[E0599]: no method named `fake` found for type `{integer}` in the current scope --> $DIR/macro-backtrace-invalid-internals.rs:23:13 | -LL | 1.fake() //~ ERROR no method +LL | 1.fake() | ^^^^ ... LL | let _ = fake_method_expr!(); @@ -50,7 +50,7 @@ LL | let _ = fake_method_expr!(); error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/macro-backtrace-invalid-internals.rs:29:13 | -LL | 1.fake //~ ERROR doesn't have fields +LL | 1.fake | ^^^^ ... LL | let _ = fake_field_expr!(); @@ -59,7 +59,7 @@ LL | let _ = fake_field_expr!(); error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/macro-backtrace-invalid-internals.rs:35:15 | -LL | (1).0 //~ ERROR doesn't have fields +LL | (1).0 | ^ ... LL | let _ = fake_anon_field_expr!(); @@ -68,14 +68,14 @@ LL | let _ = fake_anon_field_expr!(); error[E0689]: can't call method `neg` on ambiguous numeric type `{float}` --> $DIR/macro-backtrace-invalid-internals.rs:47:15 | -LL | 2.0.neg() //~ ERROR can't call method `neg` on ambiguous numeric type `{float}` +LL | 2.0.neg() | ^^^ ... LL | let _ = real_method_expr!(); | ------------------- in this macro invocation help: you must specify a concrete type for this numeric value, like `f32` | -LL | 2.0_f32.neg() //~ ERROR can't call method `neg` on ambiguous numeric type `{float}` +LL | 2.0_f32.neg() | ^^^^^^^ error: aborting due to 8 previous errors diff --git a/src/test/ui/macros/macro-backtrace-nested.stderr b/src/test/ui/macros/macro-backtrace-nested.stderr index 61a11231efe..501f525a05f 100644 --- a/src/test/ui/macros/macro-backtrace-nested.stderr +++ b/src/test/ui/macros/macro-backtrace-nested.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `fake` in this scope --> $DIR/macro-backtrace-nested.rs:5:12 | -LL | () => (fake) //~ ERROR cannot find +LL | () => (fake) | ^^^^ not found in this scope ... LL | 1 + call_nested_expr!(); @@ -10,7 +10,7 @@ LL | 1 + call_nested_expr!(); error[E0425]: cannot find value `fake` in this scope --> $DIR/macro-backtrace-nested.rs:5:12 | -LL | () => (fake) //~ ERROR cannot find +LL | () => (fake) | ^^^^ not found in this scope ... LL | call_nested_expr_sum!(); diff --git a/src/test/ui/macros/macro-backtrace-println.stderr b/src/test/ui/macros/macro-backtrace-println.stderr index c24a88c4159..573184b63b1 100644 --- a/src/test/ui/macros/macro-backtrace-println.stderr +++ b/src/test/ui/macros/macro-backtrace-println.stderr @@ -1,7 +1,7 @@ error: 1 positional argument in format string, but no arguments were given --> $DIR/macro-backtrace-println.rs:14:30 | -LL | ($fmt:expr) => (myprint!(concat!($fmt, "/n"))); //~ ERROR no arguments were given +LL | ($fmt:expr) => (myprint!(concat!($fmt, "/n"))); | ^^^^^^^^^^^^^^^^^^^ ... LL | myprintln!("{}"); diff --git a/src/test/ui/macros/macro-comma-support.stderr b/src/test/ui/macros/macro-comma-support.stderr index a4bb8a9b32f..28d064f7f5b 100644 --- a/src/test/ui/macros/macro-comma-support.stderr +++ b/src/test/ui/macros/macro-comma-support.stderr @@ -1,13 +1,13 @@ error: lel --> $DIR/macro-comma-support.rs:6:5 | -LL | compile_error!("lel"); //~ ERROR lel +LL | compile_error!("lel"); | ^^^^^^^^^^^^^^^^^^^^^^ error: lel --> $DIR/macro-comma-support.rs:7:5 | -LL | compile_error!("lel",); //~ ERROR lel +LL | compile_error!("lel",); | ^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/macros/macro-context.stderr b/src/test/ui/macros/macro-context.stderr index 9a4a8e31985..2a0779190f5 100644 --- a/src/test/ui/macros/macro-context.stderr +++ b/src/test/ui/macros/macro-context.stderr @@ -1,7 +1,7 @@ error: macro expansion ignores token `;` and any following --> $DIR/macro-context.rs:3:15 | -LL | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` +LL | () => ( i ; typeof ); | ^ ... LL | let a: m!(); @@ -12,7 +12,7 @@ LL | let a: m!(); error: macro expansion ignores token `typeof` and any following --> $DIR/macro-context.rs:3:17 | -LL | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` +LL | () => ( i ; typeof ); | ^^^^^^ ... LL | let i = m!(); @@ -23,7 +23,7 @@ LL | let i = m!(); error: macro expansion ignores token `;` and any following --> $DIR/macro-context.rs:3:15 | -LL | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` +LL | () => ( i ; typeof ); | ^ ... LL | m!() => {} @@ -34,7 +34,7 @@ LL | m!() => {} error: expected expression, found reserved keyword `typeof` --> $DIR/macro-context.rs:3:17 | -LL | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof` +LL | () => ( i ; typeof ); | ^^^^^^ expected expression ... LL | m!(); diff --git a/src/test/ui/macros/macro-crate-nonterminal-non-root.stderr b/src/test/ui/macros/macro-crate-nonterminal-non-root.stderr index a1af9ba1758..1eca0186da9 100644 --- a/src/test/ui/macros/macro-crate-nonterminal-non-root.stderr +++ b/src/test/ui/macros/macro-crate-nonterminal-non-root.stderr @@ -1,7 +1,7 @@ error[E0468]: an `extern crate` loading macros must be at the crate root --> $DIR/macro-crate-nonterminal-non-root.rs:5:5 | -LL | extern crate macro_crate_nonterminal; //~ ERROR must be at the crate root +LL | extern crate macro_crate_nonterminal; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/macros/macro-error.stderr b/src/test/ui/macros/macro-error.stderr index f56b67e7cd0..b3aed8c2cef 100644 --- a/src/test/ui/macros/macro-error.stderr +++ b/src/test/ui/macros/macro-error.stderr @@ -1,13 +1,13 @@ error: macro rhs must be delimited --> $DIR/macro-error.rs:2:18 | -LL | ($a:expr) => a; //~ ERROR macro rhs must be delimited +LL | ($a:expr) => a; | ^ error: non-type macro in type position: cfg --> $DIR/macro-error.rs:8:12 | -LL | let _: cfg!(foo) = (); //~ ERROR non-type macro in type position +LL | let _: cfg!(foo) = (); | ^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/macros/macro-follow.stderr b/src/test/ui/macros/macro-follow.stderr index e3302eac4ac..d3f081bb4a2 100644 --- a/src/test/ui/macros/macro-follow.stderr +++ b/src/test/ui/macros/macro-follow.stderr @@ -1,7 +1,7 @@ error: `$p:pat` is followed by `(`, which is not allowed for `pat` fragments --> $DIR/macro-follow.rs:8:14 | -LL | ($p:pat ()) => {}; //~ERROR `$p:pat` is followed by `(` +LL | ($p:pat ()) => {}; | ^ not allowed after `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in` @@ -9,7 +9,7 @@ LL | ($p:pat ()) => {}; //~ERROR `$p:pat` is followed by `(` error: `$p:pat` is followed by `[`, which is not allowed for `pat` fragments --> $DIR/macro-follow.rs:9:14 | -LL | ($p:pat []) => {}; //~ERROR `$p:pat` is followed by `[` +LL | ($p:pat []) => {}; | ^ not allowed after `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in` @@ -17,7 +17,7 @@ LL | ($p:pat []) => {}; //~ERROR `$p:pat` is followed by `[` error: `$p:pat` is followed by `{`, which is not allowed for `pat` fragments --> $DIR/macro-follow.rs:10:14 | -LL | ($p:pat {}) => {}; //~ERROR `$p:pat` is followed by `{` +LL | ($p:pat {}) => {}; | ^ not allowed after `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in` @@ -25,7 +25,7 @@ LL | ($p:pat {}) => {}; //~ERROR `$p:pat` is followed by `{` error: `$p:pat` is followed by `:`, which is not allowed for `pat` fragments --> $DIR/macro-follow.rs:11:13 | -LL | ($p:pat :) => {}; //~ERROR `$p:pat` is followed by `:` +LL | ($p:pat :) => {}; | ^ not allowed after `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in` @@ -33,7 +33,7 @@ LL | ($p:pat :) => {}; //~ERROR `$p:pat` is followed by `:` error: `$p:pat` is followed by `>`, which is not allowed for `pat` fragments --> $DIR/macro-follow.rs:12:13 | -LL | ($p:pat >) => {}; //~ERROR `$p:pat` is followed by `>` +LL | ($p:pat >) => {}; | ^ not allowed after `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in` @@ -41,7 +41,7 @@ LL | ($p:pat >) => {}; //~ERROR `$p:pat` is followed by `>` error: `$p:pat` is followed by `+`, which is not allowed for `pat` fragments --> $DIR/macro-follow.rs:13:13 | -LL | ($p:pat +) => {}; //~ERROR `$p:pat` is followed by `+` +LL | ($p:pat +) => {}; | ^ not allowed after `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in` @@ -49,7 +49,7 @@ LL | ($p:pat +) => {}; //~ERROR `$p:pat` is followed by `+` error: `$p:pat` is followed by `ident`, which is not allowed for `pat` fragments --> $DIR/macro-follow.rs:14:13 | -LL | ($p:pat ident) => {}; //~ERROR `$p:pat` is followed by `ident` +LL | ($p:pat ident) => {}; | ^^^^^ not allowed after `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in` @@ -57,7 +57,7 @@ LL | ($p:pat ident) => {}; //~ERROR `$p:pat` is followed by `ident` error: `$p:pat` is followed by `$q:pat`, which is not allowed for `pat` fragments --> $DIR/macro-follow.rs:15:13 | -LL | ($p:pat $q:pat) => {}; //~ERROR `$p:pat` is followed by `$q:pat` +LL | ($p:pat $q:pat) => {}; | ^^^^^^ not allowed after `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in` @@ -65,7 +65,7 @@ LL | ($p:pat $q:pat) => {}; //~ERROR `$p:pat` is followed by `$q:pat` error: `$p:pat` is followed by `$e:expr`, which is not allowed for `pat` fragments --> $DIR/macro-follow.rs:16:13 | -LL | ($p:pat $e:expr) => {}; //~ERROR `$p:pat` is followed by `$e:expr` +LL | ($p:pat $e:expr) => {}; | ^^^^^^^ not allowed after `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in` @@ -73,7 +73,7 @@ LL | ($p:pat $e:expr) => {}; //~ERROR `$p:pat` is followed by `$e:expr` error: `$p:pat` is followed by `$t:ty`, which is not allowed for `pat` fragments --> $DIR/macro-follow.rs:17:13 | -LL | ($p:pat $t:ty) => {}; //~ERROR `$p:pat` is followed by `$t:ty` +LL | ($p:pat $t:ty) => {}; | ^^^^^ not allowed after `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in` @@ -81,7 +81,7 @@ LL | ($p:pat $t:ty) => {}; //~ERROR `$p:pat` is followed by `$t:ty` error: `$p:pat` is followed by `$s:stmt`, which is not allowed for `pat` fragments --> $DIR/macro-follow.rs:18:13 | -LL | ($p:pat $s:stmt) => {}; //~ERROR `$p:pat` is followed by `$s:stmt` +LL | ($p:pat $s:stmt) => {}; | ^^^^^^^ not allowed after `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in` @@ -89,7 +89,7 @@ LL | ($p:pat $s:stmt) => {}; //~ERROR `$p:pat` is followed by `$s:stmt` error: `$p:pat` is followed by `$q:path`, which is not allowed for `pat` fragments --> $DIR/macro-follow.rs:19:13 | -LL | ($p:pat $q:path) => {}; //~ERROR `$p:pat` is followed by `$q:path` +LL | ($p:pat $q:path) => {}; | ^^^^^^^ not allowed after `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in` @@ -97,7 +97,7 @@ LL | ($p:pat $q:path) => {}; //~ERROR `$p:pat` is followed by `$q:path` error: `$p:pat` is followed by `$b:block`, which is not allowed for `pat` fragments --> $DIR/macro-follow.rs:20:13 | -LL | ($p:pat $b:block) => {}; //~ERROR `$p:pat` is followed by `$b:block` +LL | ($p:pat $b:block) => {}; | ^^^^^^^^ not allowed after `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in` @@ -105,7 +105,7 @@ LL | ($p:pat $b:block) => {}; //~ERROR `$p:pat` is followed by `$b:block` error: `$p:pat` is followed by `$i:ident`, which is not allowed for `pat` fragments --> $DIR/macro-follow.rs:21:13 | -LL | ($p:pat $i:ident) => {}; //~ERROR `$p:pat` is followed by `$i:ident` +LL | ($p:pat $i:ident) => {}; | ^^^^^^^^ not allowed after `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in` @@ -113,7 +113,7 @@ LL | ($p:pat $i:ident) => {}; //~ERROR `$p:pat` is followed by `$i:ident` error: `$p:pat` is followed by `$t:tt`, which is not allowed for `pat` fragments --> $DIR/macro-follow.rs:22:13 | -LL | ($p:pat $t:tt) => {}; //~ERROR `$p:pat` is followed by `$t:tt` +LL | ($p:pat $t:tt) => {}; | ^^^^^ not allowed after `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in` @@ -121,7 +121,7 @@ LL | ($p:pat $t:tt) => {}; //~ERROR `$p:pat` is followed by `$t:tt` error: `$p:pat` is followed by `$i:item`, which is not allowed for `pat` fragments --> $DIR/macro-follow.rs:23:13 | -LL | ($p:pat $i:item) => {}; //~ERROR `$p:pat` is followed by `$i:item` +LL | ($p:pat $i:item) => {}; | ^^^^^^^ not allowed after `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in` @@ -129,7 +129,7 @@ LL | ($p:pat $i:item) => {}; //~ERROR `$p:pat` is followed by `$i:item` error: `$p:pat` is followed by `$m:meta`, which is not allowed for `pat` fragments --> $DIR/macro-follow.rs:24:13 | -LL | ($p:pat $m:meta) => {}; //~ERROR `$p:pat` is followed by `$m:meta` +LL | ($p:pat $m:meta) => {}; | ^^^^^^^ not allowed after `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in` @@ -137,7 +137,7 @@ LL | ($p:pat $m:meta) => {}; //~ERROR `$p:pat` is followed by `$m:meta` error: `$e:expr` is followed by `(`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:28:15 | -LL | ($e:expr ()) => {}; //~ERROR `$e:expr` is followed by `(` +LL | ($e:expr ()) => {}; | ^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -145,7 +145,7 @@ LL | ($e:expr ()) => {}; //~ERROR `$e:expr` is followed by `(` error: `$e:expr` is followed by `[`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:29:15 | -LL | ($e:expr []) => {}; //~ERROR `$e:expr` is followed by `[` +LL | ($e:expr []) => {}; | ^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -153,7 +153,7 @@ LL | ($e:expr []) => {}; //~ERROR `$e:expr` is followed by `[` error: `$e:expr` is followed by `{`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:30:15 | -LL | ($e:expr {}) => {}; //~ERROR `$e:expr` is followed by `{` +LL | ($e:expr {}) => {}; | ^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -161,7 +161,7 @@ LL | ($e:expr {}) => {}; //~ERROR `$e:expr` is followed by `{` error: `$e:expr` is followed by `=`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:31:14 | -LL | ($e:expr =) => {}; //~ERROR `$e:expr` is followed by `=` +LL | ($e:expr =) => {}; | ^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -169,7 +169,7 @@ LL | ($e:expr =) => {}; //~ERROR `$e:expr` is followed by `=` error: `$e:expr` is followed by `|`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:32:14 | -LL | ($e:expr |) => {}; //~ERROR `$e:expr` is followed by `|` +LL | ($e:expr |) => {}; | ^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -177,7 +177,7 @@ LL | ($e:expr |) => {}; //~ERROR `$e:expr` is followed by `|` error: `$e:expr` is followed by `:`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:33:14 | -LL | ($e:expr :) => {}; //~ERROR `$e:expr` is followed by `:` +LL | ($e:expr :) => {}; | ^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -185,7 +185,7 @@ LL | ($e:expr :) => {}; //~ERROR `$e:expr` is followed by `:` error: `$e:expr` is followed by `>`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:34:14 | -LL | ($e:expr >) => {}; //~ERROR `$e:expr` is followed by `>` +LL | ($e:expr >) => {}; | ^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -193,7 +193,7 @@ LL | ($e:expr >) => {}; //~ERROR `$e:expr` is followed by `>` error: `$e:expr` is followed by `+`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:35:14 | -LL | ($e:expr +) => {}; //~ERROR `$e:expr` is followed by `+` +LL | ($e:expr +) => {}; | ^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -201,7 +201,7 @@ LL | ($e:expr +) => {}; //~ERROR `$e:expr` is followed by `+` error: `$e:expr` is followed by `ident`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:36:14 | -LL | ($e:expr ident) => {}; //~ERROR `$e:expr` is followed by `ident` +LL | ($e:expr ident) => {}; | ^^^^^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -209,7 +209,7 @@ LL | ($e:expr ident) => {}; //~ERROR `$e:expr` is followed by `ident` error: `$e:expr` is followed by `if`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:37:14 | -LL | ($e:expr if) => {}; //~ERROR `$e:expr` is followed by `if` +LL | ($e:expr if) => {}; | ^^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -217,7 +217,7 @@ LL | ($e:expr if) => {}; //~ERROR `$e:expr` is followed by `if` error: `$e:expr` is followed by `in`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:38:14 | -LL | ($e:expr in) => {}; //~ERROR `$e:expr` is followed by `in` +LL | ($e:expr in) => {}; | ^^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -225,7 +225,7 @@ LL | ($e:expr in) => {}; //~ERROR `$e:expr` is followed by `in` error: `$e:expr` is followed by `$p:pat`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:39:14 | -LL | ($e:expr $p:pat) => {}; //~ERROR `$e:expr` is followed by `$p:pat` +LL | ($e:expr $p:pat) => {}; | ^^^^^^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -233,7 +233,7 @@ LL | ($e:expr $p:pat) => {}; //~ERROR `$e:expr` is followed by `$p:pat` error: `$e:expr` is followed by `$f:expr`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:40:14 | -LL | ($e:expr $f:expr) => {}; //~ERROR `$e:expr` is followed by `$f:expr` +LL | ($e:expr $f:expr) => {}; | ^^^^^^^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -241,7 +241,7 @@ LL | ($e:expr $f:expr) => {}; //~ERROR `$e:expr` is followed by `$f:expr` error: `$e:expr` is followed by `$t:ty`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:41:14 | -LL | ($e:expr $t:ty) => {}; //~ERROR `$e:expr` is followed by `$t:ty` +LL | ($e:expr $t:ty) => {}; | ^^^^^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -249,7 +249,7 @@ LL | ($e:expr $t:ty) => {}; //~ERROR `$e:expr` is followed by `$t:ty` error: `$e:expr` is followed by `$s:stmt`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:42:14 | -LL | ($e:expr $s:stmt) => {}; //~ERROR `$e:expr` is followed by `$s:stmt` +LL | ($e:expr $s:stmt) => {}; | ^^^^^^^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -257,7 +257,7 @@ LL | ($e:expr $s:stmt) => {}; //~ERROR `$e:expr` is followed by `$s:stmt` error: `$e:expr` is followed by `$p:path`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:43:14 | -LL | ($e:expr $p:path) => {}; //~ERROR `$e:expr` is followed by `$p:path` +LL | ($e:expr $p:path) => {}; | ^^^^^^^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -265,7 +265,7 @@ LL | ($e:expr $p:path) => {}; //~ERROR `$e:expr` is followed by `$p:path` error: `$e:expr` is followed by `$b:block`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:44:14 | -LL | ($e:expr $b:block) => {}; //~ERROR `$e:expr` is followed by `$b:block` +LL | ($e:expr $b:block) => {}; | ^^^^^^^^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -273,7 +273,7 @@ LL | ($e:expr $b:block) => {}; //~ERROR `$e:expr` is followed by `$b:block` error: `$e:expr` is followed by `$i:ident`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:45:14 | -LL | ($e:expr $i:ident) => {}; //~ERROR `$e:expr` is followed by `$i:ident` +LL | ($e:expr $i:ident) => {}; | ^^^^^^^^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -281,7 +281,7 @@ LL | ($e:expr $i:ident) => {}; //~ERROR `$e:expr` is followed by `$i:ident` error: `$e:expr` is followed by `$t:tt`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:46:14 | -LL | ($e:expr $t:tt) => {}; //~ERROR `$e:expr` is followed by `$t:tt` +LL | ($e:expr $t:tt) => {}; | ^^^^^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -289,7 +289,7 @@ LL | ($e:expr $t:tt) => {}; //~ERROR `$e:expr` is followed by `$t:tt` error: `$e:expr` is followed by `$i:item`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:47:14 | -LL | ($e:expr $i:item) => {}; //~ERROR `$e:expr` is followed by `$i:item` +LL | ($e:expr $i:item) => {}; | ^^^^^^^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -297,7 +297,7 @@ LL | ($e:expr $i:item) => {}; //~ERROR `$e:expr` is followed by `$i:item` error: `$e:expr` is followed by `$m:meta`, which is not allowed for `expr` fragments --> $DIR/macro-follow.rs:48:14 | -LL | ($e:expr $m:meta) => {}; //~ERROR `$e:expr` is followed by `$m:meta` +LL | ($e:expr $m:meta) => {}; | ^^^^^^^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -305,7 +305,7 @@ LL | ($e:expr $m:meta) => {}; //~ERROR `$e:expr` is followed by `$m:meta` error: `$t:ty` is followed by `(`, which is not allowed for `ty` fragments --> $DIR/macro-follow.rs:53:13 | -LL | ($t:ty ()) => {}; //~ERROR `$t:ty` is followed by `(` +LL | ($t:ty ()) => {}; | ^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -313,7 +313,7 @@ LL | ($t:ty ()) => {}; //~ERROR `$t:ty` is followed by `(` error: `$t:ty` is followed by `+`, which is not allowed for `ty` fragments --> $DIR/macro-follow.rs:55:12 | -LL | ($t:ty +) => {}; //~ERROR `$t:ty` is followed by `+` +LL | ($t:ty +) => {}; | ^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -321,7 +321,7 @@ LL | ($t:ty +) => {}; //~ERROR `$t:ty` is followed by `+` error: `$t:ty` is followed by `ident`, which is not allowed for `ty` fragments --> $DIR/macro-follow.rs:56:12 | -LL | ($t:ty ident) => {}; //~ERROR `$t:ty` is followed by `ident` +LL | ($t:ty ident) => {}; | ^^^^^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -329,7 +329,7 @@ LL | ($t:ty ident) => {}; //~ERROR `$t:ty` is followed by `ident` error: `$t:ty` is followed by `if`, which is not allowed for `ty` fragments --> $DIR/macro-follow.rs:57:12 | -LL | ($t:ty if) => {}; //~ERROR `$t:ty` is followed by `if` +LL | ($t:ty if) => {}; | ^^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -337,7 +337,7 @@ LL | ($t:ty if) => {}; //~ERROR `$t:ty` is followed by `if` error: `$t:ty` is followed by `$p:pat`, which is not allowed for `ty` fragments --> $DIR/macro-follow.rs:58:12 | -LL | ($t:ty $p:pat) => {}; //~ERROR `$t:ty` is followed by `$p:pat` +LL | ($t:ty $p:pat) => {}; | ^^^^^^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -345,7 +345,7 @@ LL | ($t:ty $p:pat) => {}; //~ERROR `$t:ty` is followed by `$p:pat` error: `$t:ty` is followed by `$e:expr`, which is not allowed for `ty` fragments --> $DIR/macro-follow.rs:59:12 | -LL | ($t:ty $e:expr) => {}; //~ERROR `$t:ty` is followed by `$e:expr` +LL | ($t:ty $e:expr) => {}; | ^^^^^^^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -353,7 +353,7 @@ LL | ($t:ty $e:expr) => {}; //~ERROR `$t:ty` is followed by `$e:expr` error: `$t:ty` is followed by `$r:ty`, which is not allowed for `ty` fragments --> $DIR/macro-follow.rs:60:12 | -LL | ($t:ty $r:ty) => {}; //~ERROR `$t:ty` is followed by `$r:ty` +LL | ($t:ty $r:ty) => {}; | ^^^^^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -361,7 +361,7 @@ LL | ($t:ty $r:ty) => {}; //~ERROR `$t:ty` is followed by `$r:ty` error: `$t:ty` is followed by `$s:stmt`, which is not allowed for `ty` fragments --> $DIR/macro-follow.rs:61:12 | -LL | ($t:ty $s:stmt) => {}; //~ERROR `$t:ty` is followed by `$s:stmt` +LL | ($t:ty $s:stmt) => {}; | ^^^^^^^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -369,7 +369,7 @@ LL | ($t:ty $s:stmt) => {}; //~ERROR `$t:ty` is followed by `$s:stmt` error: `$t:ty` is followed by `$p:path`, which is not allowed for `ty` fragments --> $DIR/macro-follow.rs:62:12 | -LL | ($t:ty $p:path) => {}; //~ERROR `$t:ty` is followed by `$p:path` +LL | ($t:ty $p:path) => {}; | ^^^^^^^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -377,7 +377,7 @@ LL | ($t:ty $p:path) => {}; //~ERROR `$t:ty` is followed by `$p:path` error: `$t:ty` is followed by `$i:ident`, which is not allowed for `ty` fragments --> $DIR/macro-follow.rs:64:12 | -LL | ($t:ty $i:ident) => {}; //~ERROR `$t:ty` is followed by `$i:ident` +LL | ($t:ty $i:ident) => {}; | ^^^^^^^^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -385,7 +385,7 @@ LL | ($t:ty $i:ident) => {}; //~ERROR `$t:ty` is followed by `$i:ident` error: `$t:ty` is followed by `$r:tt`, which is not allowed for `ty` fragments --> $DIR/macro-follow.rs:65:12 | -LL | ($t:ty $r:tt) => {}; //~ERROR `$t:ty` is followed by `$r:tt` +LL | ($t:ty $r:tt) => {}; | ^^^^^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -393,7 +393,7 @@ LL | ($t:ty $r:tt) => {}; //~ERROR `$t:ty` is followed by `$r:tt` error: `$t:ty` is followed by `$i:item`, which is not allowed for `ty` fragments --> $DIR/macro-follow.rs:66:12 | -LL | ($t:ty $i:item) => {}; //~ERROR `$t:ty` is followed by `$i:item` +LL | ($t:ty $i:item) => {}; | ^^^^^^^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -401,7 +401,7 @@ LL | ($t:ty $i:item) => {}; //~ERROR `$t:ty` is followed by `$i:item` error: `$t:ty` is followed by `$m:meta`, which is not allowed for `ty` fragments --> $DIR/macro-follow.rs:67:12 | -LL | ($t:ty $m:meta) => {}; //~ERROR `$t:ty` is followed by `$m:meta` +LL | ($t:ty $m:meta) => {}; | ^^^^^^^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -409,7 +409,7 @@ LL | ($t:ty $m:meta) => {}; //~ERROR `$t:ty` is followed by `$m:meta` error: `$s:stmt` is followed by `(`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:71:15 | -LL | ($s:stmt ()) => {}; //~ERROR `$s:stmt` is followed by `(` +LL | ($s:stmt ()) => {}; | ^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -417,7 +417,7 @@ LL | ($s:stmt ()) => {}; //~ERROR `$s:stmt` is followed by `(` error: `$s:stmt` is followed by `[`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:72:15 | -LL | ($s:stmt []) => {}; //~ERROR `$s:stmt` is followed by `[` +LL | ($s:stmt []) => {}; | ^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -425,7 +425,7 @@ LL | ($s:stmt []) => {}; //~ERROR `$s:stmt` is followed by `[` error: `$s:stmt` is followed by `{`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:73:15 | -LL | ($s:stmt {}) => {}; //~ERROR `$s:stmt` is followed by `{` +LL | ($s:stmt {}) => {}; | ^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -433,7 +433,7 @@ LL | ($s:stmt {}) => {}; //~ERROR `$s:stmt` is followed by `{` error: `$s:stmt` is followed by `=`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:74:14 | -LL | ($s:stmt =) => {}; //~ERROR `$s:stmt` is followed by `=` +LL | ($s:stmt =) => {}; | ^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -441,7 +441,7 @@ LL | ($s:stmt =) => {}; //~ERROR `$s:stmt` is followed by `=` error: `$s:stmt` is followed by `|`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:75:14 | -LL | ($s:stmt |) => {}; //~ERROR `$s:stmt` is followed by `|` +LL | ($s:stmt |) => {}; | ^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -449,7 +449,7 @@ LL | ($s:stmt |) => {}; //~ERROR `$s:stmt` is followed by `|` error: `$s:stmt` is followed by `:`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:76:14 | -LL | ($s:stmt :) => {}; //~ERROR `$s:stmt` is followed by `:` +LL | ($s:stmt :) => {}; | ^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -457,7 +457,7 @@ LL | ($s:stmt :) => {}; //~ERROR `$s:stmt` is followed by `:` error: `$s:stmt` is followed by `>`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:77:14 | -LL | ($s:stmt >) => {}; //~ERROR `$s:stmt` is followed by `>` +LL | ($s:stmt >) => {}; | ^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -465,7 +465,7 @@ LL | ($s:stmt >) => {}; //~ERROR `$s:stmt` is followed by `>` error: `$s:stmt` is followed by `+`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:78:14 | -LL | ($s:stmt +) => {}; //~ERROR `$s:stmt` is followed by `+` +LL | ($s:stmt +) => {}; | ^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -473,7 +473,7 @@ LL | ($s:stmt +) => {}; //~ERROR `$s:stmt` is followed by `+` error: `$s:stmt` is followed by `ident`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:79:14 | -LL | ($s:stmt ident) => {}; //~ERROR `$s:stmt` is followed by `ident` +LL | ($s:stmt ident) => {}; | ^^^^^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -481,7 +481,7 @@ LL | ($s:stmt ident) => {}; //~ERROR `$s:stmt` is followed by `ident` error: `$s:stmt` is followed by `if`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:80:14 | -LL | ($s:stmt if) => {}; //~ERROR `$s:stmt` is followed by `if` +LL | ($s:stmt if) => {}; | ^^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -489,7 +489,7 @@ LL | ($s:stmt if) => {}; //~ERROR `$s:stmt` is followed by `if` error: `$s:stmt` is followed by `in`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:81:14 | -LL | ($s:stmt in) => {}; //~ERROR `$s:stmt` is followed by `in` +LL | ($s:stmt in) => {}; | ^^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -497,7 +497,7 @@ LL | ($s:stmt in) => {}; //~ERROR `$s:stmt` is followed by `in` error: `$s:stmt` is followed by `$p:pat`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:82:14 | -LL | ($s:stmt $p:pat) => {}; //~ERROR `$s:stmt` is followed by `$p:pat` +LL | ($s:stmt $p:pat) => {}; | ^^^^^^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -505,7 +505,7 @@ LL | ($s:stmt $p:pat) => {}; //~ERROR `$s:stmt` is followed by `$p:pat` error: `$s:stmt` is followed by `$e:expr`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:83:14 | -LL | ($s:stmt $e:expr) => {}; //~ERROR `$s:stmt` is followed by `$e:expr` +LL | ($s:stmt $e:expr) => {}; | ^^^^^^^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -513,7 +513,7 @@ LL | ($s:stmt $e:expr) => {}; //~ERROR `$s:stmt` is followed by `$e:expr` error: `$s:stmt` is followed by `$t:ty`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:84:14 | -LL | ($s:stmt $t:ty) => {}; //~ERROR `$s:stmt` is followed by `$t:ty` +LL | ($s:stmt $t:ty) => {}; | ^^^^^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -521,7 +521,7 @@ LL | ($s:stmt $t:ty) => {}; //~ERROR `$s:stmt` is followed by `$t:ty` error: `$s:stmt` is followed by `$t:stmt`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:85:14 | -LL | ($s:stmt $t:stmt) => {}; //~ERROR `$s:stmt` is followed by `$t:stmt` +LL | ($s:stmt $t:stmt) => {}; | ^^^^^^^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -529,7 +529,7 @@ LL | ($s:stmt $t:stmt) => {}; //~ERROR `$s:stmt` is followed by `$t:stmt` error: `$s:stmt` is followed by `$p:path`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:86:14 | -LL | ($s:stmt $p:path) => {}; //~ERROR `$s:stmt` is followed by `$p:path` +LL | ($s:stmt $p:path) => {}; | ^^^^^^^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -537,7 +537,7 @@ LL | ($s:stmt $p:path) => {}; //~ERROR `$s:stmt` is followed by `$p:path` error: `$s:stmt` is followed by `$b:block`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:87:14 | -LL | ($s:stmt $b:block) => {}; //~ERROR `$s:stmt` is followed by `$b:block` +LL | ($s:stmt $b:block) => {}; | ^^^^^^^^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -545,7 +545,7 @@ LL | ($s:stmt $b:block) => {}; //~ERROR `$s:stmt` is followed by `$b:block` error: `$s:stmt` is followed by `$i:ident`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:88:14 | -LL | ($s:stmt $i:ident) => {}; //~ERROR `$s:stmt` is followed by `$i:ident` +LL | ($s:stmt $i:ident) => {}; | ^^^^^^^^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -553,7 +553,7 @@ LL | ($s:stmt $i:ident) => {}; //~ERROR `$s:stmt` is followed by `$i:ident` error: `$s:stmt` is followed by `$t:tt`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:89:14 | -LL | ($s:stmt $t:tt) => {}; //~ERROR `$s:stmt` is followed by `$t:tt` +LL | ($s:stmt $t:tt) => {}; | ^^^^^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -561,7 +561,7 @@ LL | ($s:stmt $t:tt) => {}; //~ERROR `$s:stmt` is followed by `$t:tt` error: `$s:stmt` is followed by `$i:item`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:90:14 | -LL | ($s:stmt $i:item) => {}; //~ERROR `$s:stmt` is followed by `$i:item` +LL | ($s:stmt $i:item) => {}; | ^^^^^^^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -569,7 +569,7 @@ LL | ($s:stmt $i:item) => {}; //~ERROR `$s:stmt` is followed by `$i:item` error: `$s:stmt` is followed by `$m:meta`, which is not allowed for `stmt` fragments --> $DIR/macro-follow.rs:91:14 | -LL | ($s:stmt $m:meta) => {}; //~ERROR `$s:stmt` is followed by `$m:meta` +LL | ($s:stmt $m:meta) => {}; | ^^^^^^^ not allowed after `stmt` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -577,7 +577,7 @@ LL | ($s:stmt $m:meta) => {}; //~ERROR `$s:stmt` is followed by `$m:meta` error: `$p:path` is followed by `(`, which is not allowed for `path` fragments --> $DIR/macro-follow.rs:95:15 | -LL | ($p:path ()) => {}; //~ERROR `$p:path` is followed by `(` +LL | ($p:path ()) => {}; | ^ not allowed after `path` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -585,7 +585,7 @@ LL | ($p:path ()) => {}; //~ERROR `$p:path` is followed by `(` error: `$p:path` is followed by `+`, which is not allowed for `path` fragments --> $DIR/macro-follow.rs:97:14 | -LL | ($p:path +) => {}; //~ERROR `$p:path` is followed by `+` +LL | ($p:path +) => {}; | ^ not allowed after `path` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -593,7 +593,7 @@ LL | ($p:path +) => {}; //~ERROR `$p:path` is followed by `+` error: `$p:path` is followed by `ident`, which is not allowed for `path` fragments --> $DIR/macro-follow.rs:98:14 | -LL | ($p:path ident) => {}; //~ERROR `$p:path` is followed by `ident` +LL | ($p:path ident) => {}; | ^^^^^ not allowed after `path` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -601,7 +601,7 @@ LL | ($p:path ident) => {}; //~ERROR `$p:path` is followed by `ident` error: `$p:path` is followed by `if`, which is not allowed for `path` fragments --> $DIR/macro-follow.rs:99:14 | -LL | ($p:path if) => {}; //~ERROR `$p:path` is followed by `if` +LL | ($p:path if) => {}; | ^^ not allowed after `path` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -609,7 +609,7 @@ LL | ($p:path if) => {}; //~ERROR `$p:path` is followed by `if` error: `$p:path` is followed by `$q:pat`, which is not allowed for `path` fragments --> $DIR/macro-follow.rs:100:14 | -LL | ($p:path $q:pat) => {}; //~ERROR `$p:path` is followed by `$q:pat` +LL | ($p:path $q:pat) => {}; | ^^^^^^ not allowed after `path` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -617,7 +617,7 @@ LL | ($p:path $q:pat) => {}; //~ERROR `$p:path` is followed by `$q:pat` error: `$p:path` is followed by `$e:expr`, which is not allowed for `path` fragments --> $DIR/macro-follow.rs:101:14 | -LL | ($p:path $e:expr) => {}; //~ERROR `$p:path` is followed by `$e:expr` +LL | ($p:path $e:expr) => {}; | ^^^^^^^ not allowed after `path` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -625,7 +625,7 @@ LL | ($p:path $e:expr) => {}; //~ERROR `$p:path` is followed by `$e:expr` error: `$p:path` is followed by `$t:ty`, which is not allowed for `path` fragments --> $DIR/macro-follow.rs:102:14 | -LL | ($p:path $t:ty) => {}; //~ERROR `$p:path` is followed by `$t:ty` +LL | ($p:path $t:ty) => {}; | ^^^^^ not allowed after `path` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -633,7 +633,7 @@ LL | ($p:path $t:ty) => {}; //~ERROR `$p:path` is followed by `$t:ty` error: `$p:path` is followed by `$s:stmt`, which is not allowed for `path` fragments --> $DIR/macro-follow.rs:103:14 | -LL | ($p:path $s:stmt) => {}; //~ERROR `$p:path` is followed by `$s:stmt` +LL | ($p:path $s:stmt) => {}; | ^^^^^^^ not allowed after `path` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -641,7 +641,7 @@ LL | ($p:path $s:stmt) => {}; //~ERROR `$p:path` is followed by `$s:stmt` error: `$p:path` is followed by `$q:path`, which is not allowed for `path` fragments --> $DIR/macro-follow.rs:104:14 | -LL | ($p:path $q:path) => {}; //~ERROR `$p:path` is followed by `$q:path` +LL | ($p:path $q:path) => {}; | ^^^^^^^ not allowed after `path` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -649,7 +649,7 @@ LL | ($p:path $q:path) => {}; //~ERROR `$p:path` is followed by `$q:path` error: `$p:path` is followed by `$i:ident`, which is not allowed for `path` fragments --> $DIR/macro-follow.rs:106:14 | -LL | ($p:path $i:ident) => {}; //~ERROR `$p:path` is followed by `$i:ident` +LL | ($p:path $i:ident) => {}; | ^^^^^^^^ not allowed after `path` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -657,7 +657,7 @@ LL | ($p:path $i:ident) => {}; //~ERROR `$p:path` is followed by `$i:ident` error: `$p:path` is followed by `$t:tt`, which is not allowed for `path` fragments --> $DIR/macro-follow.rs:107:14 | -LL | ($p:path $t:tt) => {}; //~ERROR `$p:path` is followed by `$t:tt` +LL | ($p:path $t:tt) => {}; | ^^^^^ not allowed after `path` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -665,7 +665,7 @@ LL | ($p:path $t:tt) => {}; //~ERROR `$p:path` is followed by `$t:tt` error: `$p:path` is followed by `$i:item`, which is not allowed for `path` fragments --> $DIR/macro-follow.rs:108:14 | -LL | ($p:path $i:item) => {}; //~ERROR `$p:path` is followed by `$i:item` +LL | ($p:path $i:item) => {}; | ^^^^^^^ not allowed after `path` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -673,7 +673,7 @@ LL | ($p:path $i:item) => {}; //~ERROR `$p:path` is followed by `$i:item` error: `$p:path` is followed by `$m:meta`, which is not allowed for `path` fragments --> $DIR/macro-follow.rs:109:14 | -LL | ($p:path $m:meta) => {}; //~ERROR `$p:path` is followed by `$m:meta` +LL | ($p:path $m:meta) => {}; | ^^^^^^^ not allowed after `path` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` diff --git a/src/test/ui/macros/macro-followed-by-seq-bad.stderr b/src/test/ui/macros/macro-followed-by-seq-bad.stderr index 18403fd248d..7097979aedd 100644 --- a/src/test/ui/macros/macro-followed-by-seq-bad.stderr +++ b/src/test/ui/macros/macro-followed-by-seq-bad.stderr @@ -1,7 +1,7 @@ error: `$a:expr` is followed by `$b:tt`, which is not allowed for `expr` fragments --> $DIR/macro-followed-by-seq-bad.rs:7:15 | -LL | ( $a:expr $($b:tt)* ) => { }; //~ ERROR not allowed for `expr` fragments +LL | ( $a:expr $($b:tt)* ) => { }; | ^^^^^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` @@ -9,7 +9,7 @@ LL | ( $a:expr $($b:tt)* ) => { }; //~ ERROR not allowed for `expr` fragments error: `$a:ty` is followed by `$b:tt`, which is not allowed for `ty` fragments --> $DIR/macro-followed-by-seq-bad.rs:8:13 | -LL | ( $a:ty $($b:tt)* ) => { }; //~ ERROR not allowed for `ty` fragments +LL | ( $a:ty $($b:tt)* ) => { }; | ^^^^^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` diff --git a/src/test/ui/macros/macro-input-future-proofing.stderr b/src/test/ui/macros/macro-input-future-proofing.stderr index fa39fc6a212..a35f6283afb 100644 --- a/src/test/ui/macros/macro-input-future-proofing.stderr +++ b/src/test/ui/macros/macro-input-future-proofing.stderr @@ -1,7 +1,7 @@ error: `$ty:ty` is followed by `<`, which is not allowed for `ty` fragments --> $DIR/macro-input-future-proofing.rs:4:13 | -LL | ($ty:ty <) => (); //~ ERROR `$ty:ty` is followed by `<`, which is not allowed for `ty` +LL | ($ty:ty <) => (); | ^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -9,7 +9,7 @@ LL | ($ty:ty <) => (); //~ ERROR `$ty:ty` is followed by `<`, which is not a error: `$ty:ty` is followed by `<`, which is not allowed for `ty` fragments --> $DIR/macro-input-future-proofing.rs:5:13 | -LL | ($ty:ty < foo ,) => (); //~ ERROR `$ty:ty` is followed by `<`, which is not allowed for `ty` +LL | ($ty:ty < foo ,) => (); | ^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -17,7 +17,7 @@ LL | ($ty:ty < foo ,) => (); //~ ERROR `$ty:ty` is followed by `<`, which is error: `$pa:pat` is followed by `>`, which is not allowed for `pat` fragments --> $DIR/macro-input-future-proofing.rs:11:14 | -LL | ($pa:pat >) => (); //~ ERROR `$pa:pat` is followed by `>`, which is not allowed for `pat` +LL | ($pa:pat >) => (); | ^ not allowed after `pat` fragments | = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in` @@ -41,7 +41,7 @@ LL | ($pa:pat $pb:pat $ty:ty ,) => (); error: `$ty:ty` is followed by `-`, which is not allowed for `ty` fragments --> $DIR/macro-input-future-proofing.rs:16:17 | -LL | ($($ty:ty)* -) => (); //~ ERROR `$ty:ty` is followed by `-` +LL | ($($ty:ty)* -) => (); | ^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -49,7 +49,7 @@ LL | ($($ty:ty)* -) => (); //~ ERROR `$ty:ty` is followed by `-` error: `$b:ty` is followed by `-`, which is not allowed for `ty` fragments --> $DIR/macro-input-future-proofing.rs:17:23 | -LL | ($($a:ty, $b:ty)* -) => (); //~ ERROR `$b:ty` is followed by `-` +LL | ($($a:ty, $b:ty)* -) => (); | ^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` @@ -57,7 +57,7 @@ LL | ($($a:ty, $b:ty)* -) => (); //~ ERROR `$b:ty` is followed by `-` error: `$ty:ty` is followed by `-`, which is not allowed for `ty` fragments --> $DIR/macro-input-future-proofing.rs:18:7 | -LL | ($($ty:ty)-+) => (); //~ ERROR `$ty:ty` is followed by `-`, which is not allowed for `ty` +LL | ($($ty:ty)-+) => (); | ^^^^^^^^ not allowed after `ty` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` diff --git a/src/test/ui/macros/macro-match-nonterminal.stderr b/src/test/ui/macros/macro-match-nonterminal.stderr index 15eafbde0a2..1de8c5bd4b4 100644 --- a/src/test/ui/macros/macro-match-nonterminal.stderr +++ b/src/test/ui/macros/macro-match-nonterminal.stderr @@ -1,7 +1,7 @@ error: missing fragment specifier --> $DIR/macro-match-nonterminal.rs:1:24 | -LL | macro_rules! test { ($a, $b) => (()); } //~ ERROR missing fragment +LL | macro_rules! test { ($a, $b) => (()); } | ^ error: aborting due to previous error diff --git a/src/test/ui/macros/macro-missing-delimiters.stderr b/src/test/ui/macros/macro-missing-delimiters.stderr index 63cf1826f77..e7c37c8ddbe 100644 --- a/src/test/ui/macros/macro-missing-delimiters.stderr +++ b/src/test/ui/macros/macro-missing-delimiters.stderr @@ -1,7 +1,7 @@ error: invalid macro matcher; matchers must be contained in balanced delimiters --> $DIR/macro-missing-delimiters.rs:2:5 | -LL | baz => () //~ ERROR invalid macro matcher; +LL | baz => () | ^^^ error: aborting due to previous error diff --git a/src/test/ui/macros/macro-missing-fragment.stderr b/src/test/ui/macros/macro-missing-fragment.stderr index 8c4026760ca..b7871c0ec3a 100644 --- a/src/test/ui/macros/macro-missing-fragment.stderr +++ b/src/test/ui/macros/macro-missing-fragment.stderr @@ -1,7 +1,7 @@ error: missing fragment specifier --> $DIR/macro-missing-fragment.rs:2:20 | -LL | ( $( any_token $field_rust_type )* ) => {}; //~ ERROR missing fragment +LL | ( $( any_token $field_rust_type )* ) => {}; | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/macros/macro-multiple-matcher-bindings.stderr b/src/test/ui/macros/macro-multiple-matcher-bindings.stderr index bc78b471a2d..41e9a3286ae 100644 --- a/src/test/ui/macros/macro-multiple-matcher-bindings.stderr +++ b/src/test/ui/macros/macro-multiple-matcher-bindings.stderr @@ -1,7 +1,7 @@ warning: duplicate matcher binding --> $DIR/macro-multiple-matcher-bindings.rs:11:6 | -LL | ($a:ident, $a:ident) => {}; //~WARNING duplicate matcher binding +LL | ($a:ident, $a:ident) => {}; | ^^^^^^^^ ^^^^^^^^ | = note: #[warn(duplicate_matcher_binding_name)] on by default @@ -11,7 +11,7 @@ LL | ($a:ident, $a:ident) => {}; //~WARNING duplicate matcher binding warning: duplicate matcher binding --> $DIR/macro-multiple-matcher-bindings.rs:12:6 | -LL | ($a:ident, $a:path) => {}; //~WARNING duplicate matcher binding +LL | ($a:ident, $a:path) => {}; | ^^^^^^^^ ^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -20,7 +20,7 @@ LL | ($a:ident, $a:path) => {}; //~WARNING duplicate matcher binding warning: duplicate matcher binding --> $DIR/macro-multiple-matcher-bindings.rs:21:6 | -LL | ($a:ident, $($a:ident),*) => {}; //~WARNING duplicate matcher binding +LL | ($a:ident, $($a:ident),*) => {}; | ^^^^^^^^ ^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -29,7 +29,7 @@ LL | ($a:ident, $($a:ident),*) => {}; //~WARNING duplicate matcher binding warning: duplicate matcher binding --> $DIR/macro-multiple-matcher-bindings.rs:22:8 | -LL | ($($a:ident)+ # $($($a:path),+);*) => {}; //~WARNING duplicate matcher binding +LL | ($($a:ident)+ # $($($a:path),+);*) => {}; | ^^^^^^^^ ^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! diff --git a/src/test/ui/macros/macro-name-typo.stderr b/src/test/ui/macros/macro-name-typo.stderr index 5af9828fd98..a8930f243f8 100644 --- a/src/test/ui/macros/macro-name-typo.stderr +++ b/src/test/ui/macros/macro-name-typo.stderr @@ -1,7 +1,7 @@ error: cannot find macro `printlx!` in this scope --> $DIR/macro-name-typo.rs:2:5 | -LL | printlx!("oh noes!"); //~ ERROR cannot find +LL | printlx!("oh noes!"); | ^^^^^^^ help: you could try the macro: `println` error: aborting due to previous error diff --git a/src/test/ui/macros/macro-outer-attributes.stderr b/src/test/ui/macros/macro-outer-attributes.stderr index f9413250076..838333b95c0 100644 --- a/src/test/ui/macros/macro-outer-attributes.stderr +++ b/src/test/ui/macros/macro-outer-attributes.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find function `bar` in module `a` --> $DIR/macro-outer-attributes.rs:18:8 | -LL | a::bar(); //~ ERROR cannot find function `bar` in module `a` +LL | a::bar(); | ^^^ not found in `a` help: possible candidate is found in another module, you can import it into scope | diff --git a/src/test/ui/macros/macro-parameter-span.stderr b/src/test/ui/macros/macro-parameter-span.stderr index c7dcb12d3d1..24e3e89ea9b 100644 --- a/src/test/ui/macros/macro-parameter-span.stderr +++ b/src/test/ui/macros/macro-parameter-span.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `x` in this scope --> $DIR/macro-parameter-span.rs:11:9 | -LL | x //~ ERROR cannot find value `x` in this scope +LL | x | ^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/macros/macro-path-prelude-fail-1.stderr b/src/test/ui/macros/macro-path-prelude-fail-1.stderr index 4bf51bd893a..551d2fe8ce0 100644 --- a/src/test/ui/macros/macro-path-prelude-fail-1.stderr +++ b/src/test/ui/macros/macro-path-prelude-fail-1.stderr @@ -1,13 +1,13 @@ error[E0433]: failed to resolve: not a module `Vec` --> $DIR/macro-path-prelude-fail-1.rs:5:9 | -LL | Vec::clone!(); //~ ERROR failed to resolve: not a module `Vec` +LL | Vec::clone!(); | ^^^ not a module `Vec` error[E0433]: failed to resolve: not a module `u8` --> $DIR/macro-path-prelude-fail-1.rs:6:9 | -LL | u8::clone!(); //~ ERROR failed to resolve: not a module `u8` +LL | u8::clone!(); | ^^ not a module `u8` error: aborting due to 2 previous errors diff --git a/src/test/ui/macros/macro-path-prelude-fail-2.stderr b/src/test/ui/macros/macro-path-prelude-fail-2.stderr index 6b1a5b3741a..9574b7a1e25 100644 --- a/src/test/ui/macros/macro-path-prelude-fail-2.stderr +++ b/src/test/ui/macros/macro-path-prelude-fail-2.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve: partially resolved path in a macro --> $DIR/macro-path-prelude-fail-2.rs:3:9 | -LL | Result::Ok!(); //~ ERROR failed to resolve: partially resolved path in a macro +LL | Result::Ok!(); | ^^^^^^^^^^ partially resolved path in a macro error: aborting due to previous error diff --git a/src/test/ui/macros/macro-path-prelude-fail-3.stderr b/src/test/ui/macros/macro-path-prelude-fail-3.stderr index 17723251181..7eeddb88547 100644 --- a/src/test/ui/macros/macro-path-prelude-fail-3.stderr +++ b/src/test/ui/macros/macro-path-prelude-fail-3.stderr @@ -1,7 +1,7 @@ error: cannot find macro `inline!` in this scope --> $DIR/macro-path-prelude-fail-3.rs:2:5 | -LL | inline!(); //~ ERROR cannot find macro `inline!` in this scope +LL | inline!(); | ^^^^^^ help: you could try the macro: `line` error: aborting due to previous error diff --git a/src/test/ui/macros/macro-path-prelude-fail-4.stderr b/src/test/ui/macros/macro-path-prelude-fail-4.stderr index e354f345a4c..f08445e1f77 100644 --- a/src/test/ui/macros/macro-path-prelude-fail-4.stderr +++ b/src/test/ui/macros/macro-path-prelude-fail-4.stderr @@ -1,7 +1,7 @@ error: expected a macro, found built-in attribute --> $DIR/macro-path-prelude-fail-4.rs:1:10 | -LL | #[derive(inline)] //~ ERROR expected a macro, found built-in attribute +LL | #[derive(inline)] | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/macros/macro-path-prelude-shadowing.stderr b/src/test/ui/macros/macro-path-prelude-shadowing.stderr index 9c0214346a6..e7b381daf93 100644 --- a/src/test/ui/macros/macro-path-prelude-shadowing.stderr +++ b/src/test/ui/macros/macro-path-prelude-shadowing.stderr @@ -1,7 +1,7 @@ error[E0659]: `std` is ambiguous (glob import vs any other name from outer scope during import/macro resolution) --> $DIR/macro-path-prelude-shadowing.rs:29:9 | -LL | std::panic!(); //~ ERROR `std` is ambiguous +LL | std::panic!(); | ^^^ ambiguous name | = note: `std` could refer to a built-in extern crate diff --git a/src/test/ui/macros/macro-reexport-removed.stderr b/src/test/ui/macros/macro-reexport-removed.stderr index 6cfec3ee762..302952909be 100644 --- a/src/test/ui/macros/macro-reexport-removed.stderr +++ b/src/test/ui/macros/macro-reexport-removed.stderr @@ -1,19 +1,19 @@ error[E0557]: feature has been removed --> $DIR/macro-reexport-removed.rs:3:12 | -LL | #![feature(macro_reexport)] //~ ERROR feature has been removed +LL | #![feature(macro_reexport)] | ^^^^^^^^^^^^^^ | note: subsumed by `pub use` --> $DIR/macro-reexport-removed.rs:3:12 | -LL | #![feature(macro_reexport)] //~ ERROR feature has been removed +LL | #![feature(macro_reexport)] | ^^^^^^^^^^^^^^ error[E0658]: The attribute `macro_reexport` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/macro-reexport-removed.rs:5:3 | -LL | #[macro_reexport(macro_one)] //~ ERROR attribute `macro_reexport` is currently unknown +LL | #[macro_reexport(macro_one)] | ^^^^^^^^^^^^^^ help: a built-in attribute with a similar name exists: `macro_export` | = help: add #![feature(custom_attribute)] to the crate attributes to enable diff --git a/src/test/ui/macros/macro-shadowing.stderr b/src/test/ui/macros/macro-shadowing.stderr index c297f0ef52d..033e12a31ae 100644 --- a/src/test/ui/macros/macro-shadowing.stderr +++ b/src/test/ui/macros/macro-shadowing.stderr @@ -1,7 +1,7 @@ error: `macro_two` is already in scope --> $DIR/macro-shadowing.rs:12:5 | -LL | #[macro_use] //~ ERROR `macro_two` is already in scope +LL | #[macro_use] | ^^^^^^^^^^^^ ... LL | m1!(); @@ -12,7 +12,7 @@ LL | m1!(); error[E0659]: `foo` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/macro-shadowing.rs:17:1 | -LL | foo!(); //~ ERROR `foo` is ambiguous +LL | foo!(); | ^^^ ambiguous name | note: `foo` could refer to the macro defined here diff --git a/src/test/ui/macros/macro-stability.stderr b/src/test/ui/macros/macro-stability.stderr index e5c535a08e1..a0e0c351a48 100644 --- a/src/test/ui/macros/macro-stability.stderr +++ b/src/test/ui/macros/macro-stability.stderr @@ -1,7 +1,7 @@ error[E0658]: macro unstable_macro! is unstable --> $DIR/macro-stability.rs:11:5 | -LL | unstable_macro!(); //~ ERROR: macro unstable_macro! is unstable +LL | unstable_macro!(); | ^^^^^^^^^^^^^^^^^^ | = help: add #![feature(unstable_macros)] to the crate attributes to enable diff --git a/src/test/ui/macros/macro-use-bad-args-1.stderr b/src/test/ui/macros/macro-use-bad-args-1.stderr index 1eb8cc3f4c4..f403c8a3660 100644 --- a/src/test/ui/macros/macro-use-bad-args-1.stderr +++ b/src/test/ui/macros/macro-use-bad-args-1.stderr @@ -1,7 +1,7 @@ error[E0466]: bad macro import --> $DIR/macro-use-bad-args-1.rs:4:13 | -LL | #[macro_use(foo(bar))] //~ ERROR bad macro import +LL | #[macro_use(foo(bar))] | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/macros/macro-use-bad-args-2.stderr b/src/test/ui/macros/macro-use-bad-args-2.stderr index 7ed6b26b1b7..93617edeeae 100644 --- a/src/test/ui/macros/macro-use-bad-args-2.stderr +++ b/src/test/ui/macros/macro-use-bad-args-2.stderr @@ -1,7 +1,7 @@ error[E0466]: bad macro import --> $DIR/macro-use-bad-args-2.rs:4:13 | -LL | #[macro_use(foo="bar")] //~ ERROR bad macro import +LL | #[macro_use(foo="bar")] | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/macros/macro-use-undef.stderr b/src/test/ui/macros/macro-use-undef.stderr index 4d9fa3aeb13..85b86e2211f 100644 --- a/src/test/ui/macros/macro-use-undef.stderr +++ b/src/test/ui/macros/macro-use-undef.stderr @@ -1,7 +1,7 @@ error[E0469]: imported macro not found --> $DIR/macro-use-undef.rs:3:24 | -LL | #[macro_use(macro_two, no_way)] //~ ERROR imported macro not found +LL | #[macro_use(macro_two, no_way)] | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/macros/macro_path_as_generic_bound.stderr b/src/test/ui/macros/macro_path_as_generic_bound.stderr index 2f0e67c1ba8..48c33575ad2 100644 --- a/src/test/ui/macros/macro_path_as_generic_bound.stderr +++ b/src/test/ui/macros/macro_path_as_generic_bound.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve: use of undeclared type or module `m` --> $DIR/macro_path_as_generic_bound.rs:7:6 | -LL | foo!(m::m2::A); //~ ERROR failed to resolve +LL | foo!(m::m2::A); | ^ use of undeclared type or module `m` error: aborting due to previous error diff --git a/src/test/ui/macros/macro_undefined.stderr b/src/test/ui/macros/macro_undefined.stderr index b9a76e07a00..b516f91c67d 100644 --- a/src/test/ui/macros/macro_undefined.stderr +++ b/src/test/ui/macros/macro_undefined.stderr @@ -1,7 +1,7 @@ error: cannot find macro `k!` in this scope --> $DIR/macro_undefined.rs:11:5 | -LL | k!(); //~ ERROR cannot find +LL | k!(); | ^ help: you could try the macro: `kl` error: aborting due to previous error diff --git a/src/test/ui/macros/macros-nonfatal-errors.stderr b/src/test/ui/macros/macros-nonfatal-errors.stderr index ce7035ee274..8a8455c262b 100644 --- a/src/test/ui/macros/macros-nonfatal-errors.stderr +++ b/src/test/ui/macros/macros-nonfatal-errors.stderr @@ -1,89 +1,89 @@ error[E0665]: `Default` cannot be derived for enums, only structs --> $DIR/macros-nonfatal-errors.rs:9:10 | -LL | #[derive(Default)] //~ ERROR +LL | #[derive(Default)] | ^^^^^^^ error: inline assembly must be a string literal --> $DIR/macros-nonfatal-errors.rs:13:10 | -LL | asm!(invalid); //~ ERROR +LL | asm!(invalid); | ^^^^^^^ error: concat_idents! requires ident args. --> $DIR/macros-nonfatal-errors.rs:15:5 | -LL | concat_idents!("not", "idents"); //~ ERROR +LL | concat_idents!("not", "idents"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: argument must be a string literal --> $DIR/macros-nonfatal-errors.rs:17:17 | -LL | option_env!(invalid); //~ ERROR +LL | option_env!(invalid); | ^^^^^^^ error: expected string literal --> $DIR/macros-nonfatal-errors.rs:18:10 | -LL | env!(invalid); //~ ERROR +LL | env!(invalid); | ^^^^^^^ error: expected string literal --> $DIR/macros-nonfatal-errors.rs:19:10 | -LL | env!(foo, abr, baz); //~ ERROR +LL | env!(foo, abr, baz); | ^^^ error: environment variable `RUST_HOPEFULLY_THIS_DOESNT_EXIST` not defined --> $DIR/macros-nonfatal-errors.rs:20:5 | -LL | env!("RUST_HOPEFULLY_THIS_DOESNT_EXIST"); //~ ERROR +LL | env!("RUST_HOPEFULLY_THIS_DOESNT_EXIST"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: format argument must be a string literal --> $DIR/macros-nonfatal-errors.rs:22:13 | -LL | format!(invalid); //~ ERROR +LL | format!(invalid); | ^^^^^^^ help: you might be missing a string literal to format with | -LL | format!("{}", invalid); //~ ERROR +LL | format!("{}", invalid); | ^^^^^ error: argument must be a string literal --> $DIR/macros-nonfatal-errors.rs:24:14 | -LL | include!(invalid); //~ ERROR +LL | include!(invalid); | ^^^^^^^ error: argument must be a string literal --> $DIR/macros-nonfatal-errors.rs:26:18 | -LL | include_str!(invalid); //~ ERROR +LL | include_str!(invalid); | ^^^^^^^ error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: $FILE_NOT_FOUND_MSG (os error 2) --> $DIR/macros-nonfatal-errors.rs:27:5 | -LL | include_str!("i'd be quite surprised if a file with this name existed"); //~ ERROR +LL | include_str!("i'd be quite surprised if a file with this name existed"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: argument must be a string literal --> $DIR/macros-nonfatal-errors.rs:28:20 | -LL | include_bytes!(invalid); //~ ERROR +LL | include_bytes!(invalid); | ^^^^^^^ error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: $FILE_NOT_FOUND_MSG (os error 2) --> $DIR/macros-nonfatal-errors.rs:29:5 | -LL | include_bytes!("i'd be quite surprised if a file with this name existed"); //~ ERROR +LL | include_bytes!("i'd be quite surprised if a file with this name existed"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: trace_macros! accepts only `true` or `false` --> $DIR/macros-nonfatal-errors.rs:31:5 | -LL | trace_macros!(invalid); //~ ERROR +LL | trace_macros!(invalid); | ^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 14 previous errors diff --git a/src/test/ui/macros/meta-item-absolute-path.stderr b/src/test/ui/macros/meta-item-absolute-path.stderr index 31b0a27bbc8..23933f730aa 100644 --- a/src/test/ui/macros/meta-item-absolute-path.stderr +++ b/src/test/ui/macros/meta-item-absolute-path.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve: maybe a missing `extern crate Absolute;`? --> $DIR/meta-item-absolute-path.rs:1:12 | -LL | #[derive(::Absolute)] //~ ERROR failed to resolve +LL | #[derive(::Absolute)] | ^^^^^^^^ maybe a missing `extern crate Absolute;`? error: aborting due to previous error diff --git a/src/test/ui/macros/must-use-in-macro-55516.stderr b/src/test/ui/macros/must-use-in-macro-55516.stderr index 47874b80972..623b5745a35 100644 --- a/src/test/ui/macros/must-use-in-macro-55516.stderr +++ b/src/test/ui/macros/must-use-in-macro-55516.stderr @@ -1,7 +1,7 @@ warning: unused `std::result::Result` that must be used --> $DIR/must-use-in-macro-55516.rs:9:5 | -LL | write!(&mut example, "{}", 42); //~WARN must be used +LL | write!(&mut example, "{}", 42); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `-W unused-must-use` implied by `-W unused` diff --git a/src/test/ui/macros/nonterminal-matching.stderr b/src/test/ui/macros/nonterminal-matching.stderr index f2a191ae149..5fba8002e1c 100644 --- a/src/test/ui/macros/nonterminal-matching.stderr +++ b/src/test/ui/macros/nonterminal-matching.stderr @@ -1,7 +1,7 @@ error: no rules expected the token `enum E { }` --> $DIR/nonterminal-matching.rs:19:10 | -LL | n!(a $nt_item b); //~ ERROR no rules expected the token `enum E { }` +LL | n!(a $nt_item b); | ^^^^^^^^ no rules expected this token in macro call ... LL | complex_nonterminal!(enum E {}); diff --git a/src/test/ui/macros/restricted-shadowing-legacy.stderr b/src/test/ui/macros/restricted-shadowing-legacy.stderr index 9d61799713b..8378286bdad 100644 --- a/src/test/ui/macros/restricted-shadowing-legacy.stderr +++ b/src/test/ui/macros/restricted-shadowing-legacy.stderr @@ -1,7 +1,7 @@ error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-legacy.rs:101:13 | -LL | m!(); //~ ERROR `m` is ambiguous +LL | m!(); | ^ ambiguous name ... LL | include!(); @@ -27,7 +27,7 @@ LL | include!(); error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-legacy.rs:139:42 | -LL | macro_rules! gen_invoc { () => { m!() } } //~ ERROR `m` is ambiguous +LL | macro_rules! gen_invoc { () => { m!() } } | ^ ambiguous name ... LL | include!(); @@ -53,7 +53,7 @@ LL | include!(); error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-legacy.rs:148:9 | -LL | m!(); //~ ERROR `m` is ambiguous +LL | m!(); | ^ ambiguous name ... LL | include!(); @@ -79,7 +79,7 @@ LL | include!(); error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-legacy.rs:164:9 | -LL | m!(); //~ ERROR `m` is ambiguous +LL | m!(); | ^ ambiguous name ... LL | include!(); @@ -105,7 +105,7 @@ LL | include!(); error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-legacy.rs:180:13 | -LL | m!(); //~ ERROR `m` is ambiguous +LL | m!(); | ^ ambiguous name ... LL | include!(); @@ -131,7 +131,7 @@ LL | include!(); error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-legacy.rs:218:42 | -LL | macro_rules! gen_invoc { () => { m!() } } //~ ERROR `m` is ambiguous +LL | macro_rules! gen_invoc { () => { m!() } } | ^ ambiguous name ... LL | include!(); @@ -157,7 +157,7 @@ LL | include!(); error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-legacy.rs:232:9 | -LL | m!(); //~ ERROR `m` is ambiguous +LL | m!(); | ^ ambiguous name ... LL | include!(); @@ -183,7 +183,7 @@ LL | include!(); error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-legacy.rs:262:42 | -LL | macro_rules! gen_invoc { () => { m!() } } //~ ERROR `m` is ambiguous +LL | macro_rules! gen_invoc { () => { m!() } } | ^ ambiguous name ... LL | include!(); diff --git a/src/test/ui/macros/restricted-shadowing-modern.stderr b/src/test/ui/macros/restricted-shadowing-modern.stderr index 398a7660d30..d147debeb51 100644 --- a/src/test/ui/macros/restricted-shadowing-modern.stderr +++ b/src/test/ui/macros/restricted-shadowing-modern.stderr @@ -1,7 +1,7 @@ error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-modern.rs:106:17 | -LL | m!(); //~ ERROR `m` is ambiguous +LL | m!(); | ^ ambiguous name ... LL | include!(); @@ -27,7 +27,7 @@ LL | include!(); error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-modern.rs:149:33 | -LL | macro gen_invoc() { m!() } //~ ERROR `m` is ambiguous +LL | macro gen_invoc() { m!() } | ^ ambiguous name ... LL | include!(); @@ -53,7 +53,7 @@ LL | include!(); error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-modern.rs:158:13 | -LL | m!(); //~ ERROR `m` is ambiguous +LL | m!(); | ^ ambiguous name ... LL | include!(); @@ -79,7 +79,7 @@ LL | include!(); error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-modern.rs:174:13 | -LL | m!(); //~ ERROR `m` is ambiguous +LL | m!(); | ^ ambiguous name ... LL | include!(); @@ -105,7 +105,7 @@ LL | include!(); error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-modern.rs:192:17 | -LL | m!(); //~ ERROR `m` is ambiguous +LL | m!(); | ^ ambiguous name ... LL | include!(); @@ -131,7 +131,7 @@ LL | include!(); error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/restricted-shadowing-modern.rs:235:33 | -LL | macro gen_invoc() { m!() } //~ ERROR `m` is ambiguous +LL | macro gen_invoc() { m!() } | ^ ambiguous name ... LL | include!(); diff --git a/src/test/ui/macros/trace_faulty_macros.stderr b/src/test/ui/macros/trace_faulty_macros.stderr index a645590f005..233d3dcfcb6 100644 --- a/src/test/ui/macros/trace_faulty_macros.stderr +++ b/src/test/ui/macros/trace_faulty_macros.stderr @@ -4,7 +4,7 @@ error: no rules expected the token `bcd` LL | macro_rules! my_faulty_macro { | ---------------------------- when calling this macro LL | () => { -LL | my_faulty_macro!(bcd); //~ ERROR no rules +LL | my_faulty_macro!(bcd); | ^^^ no rules expected this token in macro call ... LL | my_faulty_macro!(); @@ -23,7 +23,7 @@ LL | my_faulty_macro!(); error: recursion limit reached while expanding the macro `my_recursive_macro` --> $DIR/trace_faulty_macros.rs:22:9 | -LL | my_recursive_macro!(); //~ ERROR recursion limit +LL | my_recursive_macro!(); | ^^^^^^^^^^^^^^^^^^^^^^ ... LL | my_recursive_macro!(); diff --git a/src/test/ui/malformed/malformed-interpolated.stderr b/src/test/ui/malformed/malformed-interpolated.stderr index 24aa590c4d9..efeede0148d 100644 --- a/src/test/ui/malformed/malformed-interpolated.stderr +++ b/src/test/ui/malformed/malformed-interpolated.stderr @@ -1,7 +1,7 @@ error: suffixed literals are not allowed in attributes --> $DIR/malformed-interpolated.rs:5:21 | -LL | #[my_attr = $expr] //~ ERROR suffixed literals are not allowed in attributes +LL | #[my_attr = $expr] | ^^^^^ ... LL | check!(0u8); // ERROR, see above @@ -12,7 +12,7 @@ LL | check!(0u8); // ERROR, see above error: unexpected token: `-0` --> $DIR/malformed-interpolated.rs:5:19 | -LL | #[my_attr = $expr] //~ ERROR suffixed literals are not allowed in attributes +LL | #[my_attr = $expr] | ^ ... LL | check!(-0); // ERROR, see above @@ -21,7 +21,7 @@ LL | check!(-0); // ERROR, see above error: unexpected token: `0 + 0` --> $DIR/malformed-interpolated.rs:5:19 | -LL | #[my_attr = $expr] //~ ERROR suffixed literals are not allowed in attributes +LL | #[my_attr = $expr] | ^ ... LL | check!(0 + 0); // ERROR, see above diff --git a/src/test/ui/malformed/malformed-plugin-1.stderr b/src/test/ui/malformed/malformed-plugin-1.stderr index f42e66e2b32..cc0ac182d70 100644 --- a/src/test/ui/malformed/malformed-plugin-1.stderr +++ b/src/test/ui/malformed/malformed-plugin-1.stderr @@ -1,7 +1,7 @@ error: attribute must be of the form `#[plugin(name|name(args))]` --> $DIR/malformed-plugin-1.rs:2:1 | -LL | #![plugin] //~ ERROR attribute must be of the form +LL | #![plugin] | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/malformed/malformed-plugin-2.stderr b/src/test/ui/malformed/malformed-plugin-2.stderr index 923cbc18860..617b13b2654 100644 --- a/src/test/ui/malformed/malformed-plugin-2.stderr +++ b/src/test/ui/malformed/malformed-plugin-2.stderr @@ -1,7 +1,7 @@ error: attribute must be of the form `#[plugin(name|name(args))]` --> $DIR/malformed-plugin-2.rs:2:1 | -LL | #![plugin="bleh"] //~ ERROR attribute must be of the form +LL | #![plugin="bleh"] | ^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/malformed/malformed-plugin-3.stderr b/src/test/ui/malformed/malformed-plugin-3.stderr index 6f19a117149..5739770ad98 100644 --- a/src/test/ui/malformed/malformed-plugin-3.stderr +++ b/src/test/ui/malformed/malformed-plugin-3.stderr @@ -1,7 +1,7 @@ error[E0498]: malformed plugin attribute --> $DIR/malformed-plugin-3.rs:2:1 | -LL | #![plugin(foo="bleh")] //~ ERROR malformed plugin attribute +LL | #![plugin(foo="bleh")] | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/malformed/malformed-regressions.stderr b/src/test/ui/malformed/malformed-regressions.stderr index a3b2bda07f6..9a81c1056ca 100644 --- a/src/test/ui/malformed/malformed-regressions.stderr +++ b/src/test/ui/malformed/malformed-regressions.stderr @@ -1,7 +1,7 @@ warning: attribute must be of the form `#[doc(hidden|inline|...)]` or `#[doc = "string"]` --> $DIR/malformed-regressions.rs:3:1 | -LL | #[doc] //~ WARN attribute must be of the form +LL | #[doc] | ^^^^^^ | = note: #[warn(ill_formed_attribute_input)] on by default @@ -11,7 +11,7 @@ LL | #[doc] //~ WARN attribute must be of the form warning: attribute must be of the form `#[ignore]` or `#[ignore = "reason"]` --> $DIR/malformed-regressions.rs:4:1 | -LL | #[ignore()] //~ WARN attribute must be of the form +LL | #[ignore()] | ^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -20,7 +20,7 @@ LL | #[ignore()] //~ WARN attribute must be of the form warning: attribute must be of the form `#[inline]` or `#[inline(always|never)]` --> $DIR/malformed-regressions.rs:5:1 | -LL | #[inline = ""] //~ WARN attribute must be of the form +LL | #[inline = ""] | ^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -30,7 +30,7 @@ warning: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dyl /*opt*/ cfg = "...")]` --> $DIR/malformed-regressions.rs:6:1 | -LL | #[link] //~ WARN attribute must be of the form +LL | #[link] | ^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -40,7 +40,7 @@ warning: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dyl /*opt*/ cfg = "...")]` --> $DIR/malformed-regressions.rs:7:1 | -LL | #[link = ""] //~ WARN attribute must be of the form +LL | #[link = ""] | ^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! diff --git a/src/test/ui/malformed/malformed-special-attrs.stderr b/src/test/ui/malformed/malformed-special-attrs.stderr index 1653aa150d5..8c23424087c 100644 --- a/src/test/ui/malformed/malformed-special-attrs.stderr +++ b/src/test/ui/malformed/malformed-special-attrs.stderr @@ -3,22 +3,22 @@ error: expected `(`, found `` error: expected `(`, found `=` --> $DIR/malformed-special-attrs.rs:4:12 | -LL | #[cfg_attr] //~ ERROR expected `(`, found `` +LL | #[cfg_attr] | - expected `(` ... -LL | #[cfg_attr = ""] //~ ERROR expected `(`, found `=` +LL | #[cfg_attr = ""] | ^ unexpected token error: attribute must be of the form `#[derive(Trait1, Trait2, ...)]` --> $DIR/malformed-special-attrs.rs:7:1 | -LL | #[derive] //~ ERROR attribute must be of the form +LL | #[derive] | ^^^^^^^^^ error: attribute must be of the form `#[derive(Trait1, Trait2, ...)]` --> $DIR/malformed-special-attrs.rs:10:1 | -LL | #[derive = ""] //~ ERROR attribute must be of the form +LL | #[derive = ""] | ^^^^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/malformed_macro_lhs.stderr b/src/test/ui/malformed_macro_lhs.stderr index ab09bc10b86..adf64b08935 100644 --- a/src/test/ui/malformed_macro_lhs.stderr +++ b/src/test/ui/malformed_macro_lhs.stderr @@ -1,7 +1,7 @@ error: invalid macro matcher; matchers must be contained in balanced delimiters --> $DIR/malformed_macro_lhs.rs:2:5 | -LL | t => (1); //~ ERROR invalid macro matcher +LL | t => (1); | ^ error: aborting due to previous error diff --git a/src/test/ui/marker_trait_attr/marker-attribute-on-non-trait.stderr b/src/test/ui/marker_trait_attr/marker-attribute-on-non-trait.stderr index b88c125d968..d30b990caac 100644 --- a/src/test/ui/marker_trait_attr/marker-attribute-on-non-trait.stderr +++ b/src/test/ui/marker_trait_attr/marker-attribute-on-non-trait.stderr @@ -1,7 +1,7 @@ error: attribute can only be applied to a trait --> $DIR/marker-attribute-on-non-trait.rs:3:1 | -LL | #[marker] //~ ERROR attribute can only be applied to a trait +LL | #[marker] | ^^^^^^^^^ LL | struct Struct {} | ---------------- not a trait @@ -9,7 +9,7 @@ LL | struct Struct {} error: attribute can only be applied to a trait --> $DIR/marker-attribute-on-non-trait.rs:6:1 | -LL | #[marker] //~ ERROR attribute can only be applied to a trait +LL | #[marker] | ^^^^^^^^^ LL | impl Struct {} | -------------- not a trait @@ -17,7 +17,7 @@ LL | impl Struct {} error: attribute can only be applied to a trait --> $DIR/marker-attribute-on-non-trait.rs:9:1 | -LL | #[marker] //~ ERROR attribute can only be applied to a trait +LL | #[marker] | ^^^^^^^^^ LL | / union Union { LL | | x: i32, @@ -27,7 +27,7 @@ LL | | } error: attribute can only be applied to a trait --> $DIR/marker-attribute-on-non-trait.rs:14:1 | -LL | #[marker] //~ ERROR attribute can only be applied to a trait +LL | #[marker] | ^^^^^^^^^ LL | const CONST: usize = 10; | ------------------------ not a trait @@ -35,7 +35,7 @@ LL | const CONST: usize = 10; error: attribute can only be applied to a trait --> $DIR/marker-attribute-on-non-trait.rs:17:1 | -LL | #[marker] //~ ERROR attribute can only be applied to a trait +LL | #[marker] | ^^^^^^^^^ LL | fn function() {} | ---------------- not a trait @@ -43,7 +43,7 @@ LL | fn function() {} error: attribute can only be applied to a trait --> $DIR/marker-attribute-on-non-trait.rs:20:1 | -LL | #[marker] //~ ERROR attribute can only be applied to a trait +LL | #[marker] | ^^^^^^^^^ LL | type Type = (); | --------------- not a trait diff --git a/src/test/ui/marker_trait_attr/overlap-marker-trait.stderr b/src/test/ui/marker_trait_attr/overlap-marker-trait.stderr index 4579ec26116..f4a52a65af6 100644 --- a/src/test/ui/marker_trait_attr/overlap-marker-trait.stderr +++ b/src/test/ui/marker_trait_attr/overlap-marker-trait.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `NotDebugOrDisplay: Marker` is not satisfied --> $DIR/overlap-marker-trait.rs:27:5 | -LL | is_marker::(); //~ ERROR +LL | is_marker::(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Marker` is not implemented for `NotDebugOrDisplay` | note: required by `is_marker` diff --git a/src/test/ui/match/match-byte-array-patterns-2.stderr b/src/test/ui/match/match-byte-array-patterns-2.stderr index 83dbecfcac6..d53e2e25b3d 100644 --- a/src/test/ui/match/match-byte-array-patterns-2.stderr +++ b/src/test/ui/match/match-byte-array-patterns-2.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `&[_, _, _, _]` not covered --> $DIR/match-byte-array-patterns-2.rs:4:11 | -LL | match buf { //~ ERROR non-exhaustive +LL | match buf { | ^^^ pattern `&[_, _, _, _]` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -9,7 +9,7 @@ LL | match buf { //~ ERROR non-exhaustive error[E0004]: non-exhaustive patterns: `&[]`, `&[_]`, `&[_, _]` and 3 more not covered --> $DIR/match-byte-array-patterns-2.rs:10:11 | -LL | match buf { //~ ERROR non-exhaustive +LL | match buf { | ^^^ patterns `&[]`, `&[_]`, `&[_, _]` and 3 more not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/match/match-byte-array-patterns.stderr b/src/test/ui/match/match-byte-array-patterns.stderr index a23f1853666..b28646b50cf 100644 --- a/src/test/ui/match/match-byte-array-patterns.stderr +++ b/src/test/ui/match/match-byte-array-patterns.stderr @@ -1,7 +1,7 @@ error: unreachable pattern --> $DIR/match-byte-array-patterns.rs:9:9 | -LL | &[0x41, 0x41, 0x41, 0x41] => {} //~ ERROR unreachable pattern +LL | &[0x41, 0x41, 0x41, 0x41] => {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here @@ -13,43 +13,43 @@ LL | #![deny(unreachable_patterns)] error: unreachable pattern --> $DIR/match-byte-array-patterns.rs:15:9 | -LL | b"AAAA" => {}, //~ ERROR unreachable pattern +LL | b"AAAA" => {}, | ^^^^^^^ error: unreachable pattern --> $DIR/match-byte-array-patterns.rs:21:9 | -LL | b"AAAA" => {}, //~ ERROR unreachable pattern +LL | b"AAAA" => {}, | ^^^^^^^ error: unreachable pattern --> $DIR/match-byte-array-patterns.rs:27:9 | -LL | b"AAAA" => {}, //~ ERROR unreachable pattern +LL | b"AAAA" => {}, | ^^^^^^^ error: unreachable pattern --> $DIR/match-byte-array-patterns.rs:35:9 | -LL | &[0x41, 0x41, 0x41, 0x41] => {} //~ ERROR unreachable pattern +LL | &[0x41, 0x41, 0x41, 0x41] => {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: unreachable pattern --> $DIR/match-byte-array-patterns.rs:41:9 | -LL | b"AAAA" => {}, //~ ERROR unreachable pattern +LL | b"AAAA" => {}, | ^^^^^^^ error: unreachable pattern --> $DIR/match-byte-array-patterns.rs:47:9 | -LL | b"AAAA" => {}, //~ ERROR unreachable pattern +LL | b"AAAA" => {}, | ^^^^^^^ error: unreachable pattern --> $DIR/match-byte-array-patterns.rs:53:9 | -LL | b"AAAA" => {}, //~ ERROR unreachable pattern +LL | b"AAAA" => {}, | ^^^^^^^ error: aborting due to 8 previous errors diff --git a/src/test/ui/match/match-ill-type2.stderr b/src/test/ui/match/match-ill-type2.stderr index 116d26ac712..83fae10d4cb 100644 --- a/src/test/ui/match/match-ill-type2.stderr +++ b/src/test/ui/match/match-ill-type2.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/match-ill-type2.rs:4:9 | -LL | 2u32 => 1, //~ ERROR mismatched types +LL | 2u32 => 1, | ^^^^ expected i32, found u32 error: aborting due to previous error diff --git a/src/test/ui/match/match-join.stderr b/src/test/ui/match/match-join.stderr index 6e08c92bedb..27a82c1242c 100644 --- a/src/test/ui/match/match-join.stderr +++ b/src/test/ui/match/match-join.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `x` in this scope --> $DIR/match-join.rs:9:20 | -LL | println!("{}", x); //~ ERROR cannot find value `x` in this scope +LL | println!("{}", x); | ^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/match/match-no-arms-unreachable-after.stderr b/src/test/ui/match/match-no-arms-unreachable-after.stderr index bd136245c1a..65dcc6ee465 100644 --- a/src/test/ui/match/match-no-arms-unreachable-after.stderr +++ b/src/test/ui/match/match-no-arms-unreachable-after.stderr @@ -1,7 +1,7 @@ error: unreachable statement --> $DIR/match-no-arms-unreachable-after.rs:8:5 | -LL | let x = 2; //~ ERROR unreachable +LL | let x = 2; | ^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/match/match-non-exhaustive.stderr b/src/test/ui/match/match-non-exhaustive.stderr index 9921e4f63b6..00c2bfff7eb 100644 --- a/src/test/ui/match/match-non-exhaustive.stderr +++ b/src/test/ui/match/match-non-exhaustive.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `-2147483648i32..=0i32` and `2i32..=2147483647i32` not covered --> $DIR/match-non-exhaustive.rs:2:11 | -LL | match 0 { 1 => () } //~ ERROR non-exhaustive patterns +LL | match 0 { 1 => () } | ^ patterns `-2147483648i32..=0i32` and `2i32..=2147483647i32` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -9,7 +9,7 @@ LL | match 0 { 1 => () } //~ ERROR non-exhaustive patterns error[E0004]: non-exhaustive patterns: `_` not covered --> $DIR/match-non-exhaustive.rs:3:11 | -LL | match 0 { 0 if false => () } //~ ERROR non-exhaustive patterns +LL | match 0 { 0 if false => () } | ^ pattern `_` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/match/match-ref-ice.stderr b/src/test/ui/match/match-ref-ice.stderr index faefd9f2129..c4bfa0afcc2 100644 --- a/src/test/ui/match/match-ref-ice.stderr +++ b/src/test/ui/match/match-ref-ice.stderr @@ -1,7 +1,7 @@ error: unreachable pattern --> $DIR/match-ref-ice.rs:13:9 | -LL | [1, 2, 3] => (), //~ ERROR unreachable pattern +LL | [1, 2, 3] => (), | ^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/match/match-ref-mut-invariance.stderr b/src/test/ui/match/match-ref-mut-invariance.stderr index 61552b44c27..30bbb8d7800 100644 --- a/src/test/ui/match/match-ref-mut-invariance.stderr +++ b/src/test/ui/match/match-ref-mut-invariance.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/match-ref-mut-invariance.rs:10:37 | -LL | match self.0 { ref mut x => x } //~ ERROR mismatched types +LL | match self.0 { ref mut x => x } | ^ lifetime mismatch | = note: expected type `&'a mut &'a i32` diff --git a/src/test/ui/match/match-ref-mut-let-invariance.stderr b/src/test/ui/match/match-ref-mut-let-invariance.stderr index 26ec0697f41..6ca222d9c2f 100644 --- a/src/test/ui/match/match-ref-mut-let-invariance.stderr +++ b/src/test/ui/match/match-ref-mut-let-invariance.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/match-ref-mut-let-invariance.rs:11:9 | -LL | x //~ ERROR mismatched types +LL | x | ^ lifetime mismatch | = note: expected type `&'a mut &'a i32` diff --git a/src/test/ui/match/match-tag-nullary.stderr b/src/test/ui/match/match-tag-nullary.stderr index 014581ea4bd..902ccc94dde 100644 --- a/src/test/ui/match/match-tag-nullary.stderr +++ b/src/test/ui/match/match-tag-nullary.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/match-tag-nullary.rs:4:40 | -LL | fn main() { let x: A = A::A; match x { B::B => { } } } //~ ERROR mismatched types +LL | fn main() { let x: A = A::A; match x { B::B => { } } } | ^^^^ expected enum `A`, found enum `B` | = note: expected type `A` diff --git a/src/test/ui/match/match-tag-unary.stderr b/src/test/ui/match/match-tag-unary.stderr index 53b66351369..da599c37407 100644 --- a/src/test/ui/match/match-tag-unary.stderr +++ b/src/test/ui/match/match-tag-unary.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/match-tag-unary.rs:4:43 | -LL | fn main() { let x: A = A::A(0); match x { B::B(y) => { } } } //~ ERROR mismatched types +LL | fn main() { let x: A = A::A(0); match x { B::B(y) => { } } } | - ^^^^^^^ expected enum `A`, found enum `B` | | | this match expression has type `A` diff --git a/src/test/ui/match/match-type-err-first-arm.stderr b/src/test/ui/match/match-type-err-first-arm.stderr index db8bef8dc77..a318e6cffb9 100644 --- a/src/test/ui/match/match-type-err-first-arm.stderr +++ b/src/test/ui/match/match-type-err-first-arm.stderr @@ -12,14 +12,14 @@ error[E0308]: match arms have incompatible types | LL | let x = match n { | _____________- -LL | | //~^ NOTE `match` arms have incompatible types +LL | | LL | | 12 => 'b', | | --- this is found to be of type `char` -LL | | //~^ NOTE this is found to be of type `char` +LL | | LL | | _ => 42, | | ^^ expected char, found integer ... | -LL | | //~| NOTE expected type `char` +LL | | LL | | }; | |_____- `match` arms have incompatible types | @@ -31,17 +31,17 @@ error[E0308]: match arms have incompatible types | LL | let x = match n { | _____________- -LL | | //~^ NOTE `match` arms have incompatible types +LL | | LL | | 1 => 'b', LL | | 2 => 'b', ... | LL | | 6 => 'b', | | --- this and all prior arms are found to be of type `char` -LL | | //~^ NOTE this and all prior arms are found to be of type `char` +LL | | LL | | _ => 42, | | ^^ expected char, found integer ... | -LL | | //~| NOTE expected type `char` +LL | | LL | | }; | |_____- `match` arms have incompatible types | diff --git a/src/test/ui/match/match-unresolved-one-arm.stderr b/src/test/ui/match/match-unresolved-one-arm.stderr index b013933eaae..ad8569b4802 100644 --- a/src/test/ui/match/match-unresolved-one-arm.stderr +++ b/src/test/ui/match/match-unresolved-one-arm.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/match-unresolved-one-arm.rs:4:9 | -LL | let x = match () { //~ ERROR type annotations needed +LL | let x = match () { | ^ | | | cannot infer type diff --git a/src/test/ui/match/match-vec-fixed.stderr b/src/test/ui/match/match-vec-fixed.stderr index f4b426bea32..ae2dd87b695 100644 --- a/src/test/ui/match/match-vec-fixed.stderr +++ b/src/test/ui/match/match-vec-fixed.stderr @@ -1,7 +1,7 @@ error: unreachable pattern --> $DIR/match-vec-fixed.rs:7:9 | -LL | [_, _, _] => {} //~ ERROR unreachable pattern +LL | [_, _, _] => {} | ^^^^^^^^^ | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![deny(unreachable_patterns)] error: unreachable pattern --> $DIR/match-vec-fixed.rs:11:9 | -LL | [_, 1, _] => {} //~ ERROR unreachable pattern +LL | [_, 1, _] => {} | ^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/match/match-vec-mismatch.stderr b/src/test/ui/match/match-vec-mismatch.stderr index 93a407760a5..e19a0f956ce 100644 --- a/src/test/ui/match/match-vec-mismatch.stderr +++ b/src/test/ui/match/match-vec-mismatch.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `does_not_exist` in this scope --> $DIR/match-vec-mismatch.rs:28:11 | -LL | match does_not_exist { //~ ERROR cannot find value `does_not_exist` in this scope +LL | match does_not_exist { | ^^^^^^^^^^^^^^ not found in this scope error[E0529]: expected an array or slice, found `std::string::String` @@ -13,19 +13,19 @@ LL | ['f', 'o', ..] => {} error[E0527]: pattern requires 1 elements but array has 3 --> $DIR/match-vec-mismatch.rs:20:9 | -LL | [0] => {}, //~ ERROR pattern requires +LL | [0] => {}, | ^^^ expected 3 elements error[E0528]: pattern requires at least 4 elements but array has 3 --> $DIR/match-vec-mismatch.rs:25:9 | -LL | [0, 1, 2, 3, x..] => {} //~ ERROR pattern requires +LL | [0, 1, 2, 3, x..] => {} | ^^^^^^^^^^^^^^^^^ pattern cannot match array of 3 elements error[E0282]: type annotations needed --> $DIR/match-vec-mismatch.rs:36:9 | -LL | [] => {} //~ ERROR type annotations needed +LL | [] => {} | ^^ cannot infer type | = note: type must be known at this point diff --git a/src/test/ui/match/match-vec-unreachable.stderr b/src/test/ui/match/match-vec-unreachable.stderr index 71e3d8c5e31..415c24ae77e 100644 --- a/src/test/ui/match/match-vec-unreachable.stderr +++ b/src/test/ui/match/match-vec-unreachable.stderr @@ -1,7 +1,7 @@ error: unreachable pattern --> $DIR/match-vec-unreachable.rs:9:9 | -LL | [(1, 2), (2, 3), b] => (), //~ ERROR unreachable pattern +LL | [(1, 2), (2, 3), b] => (), | ^^^^^^^^^^^^^^^^^^^ | note: lint level defined here @@ -13,13 +13,13 @@ LL | #![deny(unreachable_patterns)] error: unreachable pattern --> $DIR/match-vec-unreachable.rs:19:9 | -LL | [_, _, _, _, _] => { } //~ ERROR unreachable pattern +LL | [_, _, _, _, _] => { } | ^^^^^^^^^^^^^^^ error: unreachable pattern --> $DIR/match-vec-unreachable.rs:27:9 | -LL | ['a', 'b', 'c'] => {} //~ ERROR unreachable pattern +LL | ['a', 'b', 'c'] => {} | ^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/maybe-bounds.stderr b/src/test/ui/maybe-bounds.stderr index 58f5b790c09..20446c257df 100644 --- a/src/test/ui/maybe-bounds.stderr +++ b/src/test/ui/maybe-bounds.stderr @@ -1,7 +1,7 @@ error: `?Trait` is not permitted in supertraits --> $DIR/maybe-bounds.rs:1:11 | -LL | trait Tr: ?Sized {} //~ ERROR `?Trait` is not permitted in supertraits +LL | trait Tr: ?Sized {} | ^^^^^^ | = note: traits are `?Sized` by default @@ -9,13 +9,13 @@ LL | trait Tr: ?Sized {} //~ ERROR `?Trait` is not permitted in supertraits error: `?Trait` is not permitted in trait object types --> $DIR/maybe-bounds.rs:3:16 | -LL | type A1 = Tr + (?Sized); //~ ERROR `?Trait` is not permitted in trait object types +LL | type A1 = Tr + (?Sized); | ^^^^^^^^ error: `?Trait` is not permitted in trait object types --> $DIR/maybe-bounds.rs:4:24 | -LL | type A2 = for<'a> Tr + (?Sized); //~ ERROR `?Trait` is not permitted in trait object types +LL | type A2 = for<'a> Tr + (?Sized); | ^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr index 53a07f5196e..9e5f2ee4ce5 100644 --- a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr +++ b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr @@ -9,7 +9,7 @@ LL | let mut x = Vec::new(); error[E0308]: mismatched types --> $DIR/method-ambig-one-trait-unknown-int-type.rs:33:20 | -LL | let y: usize = x.foo(); //~ ERROR mismatched types +LL | let y: usize = x.foo(); | ^^^^^^^ expected usize, found isize error: aborting due to 2 previous errors diff --git a/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr b/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr index 15379194777..2b87ddfdf98 100644 --- a/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr +++ b/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr @@ -1,7 +1,7 @@ error[E0034]: multiple applicable items in scope --> $DIR/method-ambig-two-traits-cross-crate.rs:11:21 | -LL | fn main() { 1_usize.me(); } //~ ERROR E0034 +LL | fn main() { 1_usize.me(); } | ^^ multiple `me` found | note: candidate #1 is defined in an impl of the trait `Me2` for the type `usize` diff --git a/src/test/ui/methods/method-ambig-two-traits-from-bounds.stderr b/src/test/ui/methods/method-ambig-two-traits-from-bounds.stderr index a805ca3ca56..6c493c67e29 100644 --- a/src/test/ui/methods/method-ambig-two-traits-from-bounds.stderr +++ b/src/test/ui/methods/method-ambig-two-traits-from-bounds.stderr @@ -1,7 +1,7 @@ error[E0034]: multiple applicable items in scope --> $DIR/method-ambig-two-traits-from-bounds.rs:5:7 | -LL | t.foo(); //~ ERROR E0034 +LL | t.foo(); | ^^^ multiple `foo` found | note: candidate #1 is defined in the trait `A` diff --git a/src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr b/src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr index cbb1754935a..5d508d57022 100644 --- a/src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr +++ b/src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr @@ -1,7 +1,7 @@ error[E0034]: multiple applicable items in scope --> $DIR/method-ambig-two-traits-with-default-method.rs:12:13 | -LL | 1_usize.method(); //~ ERROR E0034 +LL | 1_usize.method(); | ^^^^^^ multiple `method` found | note: candidate #1 is defined in an impl of the trait `Foo` for the type `usize` diff --git a/src/test/ui/methods/method-call-err-msg.stderr b/src/test/ui/methods/method-call-err-msg.stderr index 2113add63d6..0e901a98348 100644 --- a/src/test/ui/methods/method-call-err-msg.stderr +++ b/src/test/ui/methods/method-call-err-msg.stderr @@ -4,7 +4,7 @@ error[E0061]: this function takes 0 parameters but 1 parameter was supplied LL | fn zero(self) -> Foo { self } | -------------------- defined here ... -LL | x.zero(0) //~ ERROR this function takes 0 parameters but 1 parameter was supplied +LL | x.zero(0) | ^^^^ expected 0 parameters error[E0061]: this function takes 1 parameter but 0 parameters were supplied @@ -13,7 +13,7 @@ error[E0061]: this function takes 1 parameter but 0 parameters were supplied LL | fn one(self, _: isize) -> Foo { self } | ----------------------------- defined here ... -LL | .one() //~ ERROR this function takes 1 parameter but 0 parameters were supplied +LL | .one() | ^^^ expected 1 parameter error[E0061]: this function takes 2 parameters but 1 parameter was supplied @@ -22,7 +22,7 @@ error[E0061]: this function takes 2 parameters but 1 parameter was supplied LL | fn two(self, _: isize, _: isize) -> Foo { self } | --------------------------------------- defined here ... -LL | .two(0); //~ ERROR this function takes 2 parameters but 1 parameter was supplied +LL | .two(0); | ^^^ expected 2 parameters error[E0599]: no method named `take` found for type `Foo` in the current scope @@ -31,7 +31,7 @@ error[E0599]: no method named `take` found for type `Foo` in the current scope LL | pub struct Foo; | --------------- method `take` not found for this ... -LL | .take() //~ ERROR no method named `take` found for type `Foo` in the current scope +LL | .take() | ^^^^ | = note: the method `take` exists but the following trait bounds were not satisfied: diff --git a/src/test/ui/methods/method-call-lifetime-args-unresolved.stderr b/src/test/ui/methods/method-call-lifetime-args-unresolved.stderr index 25432177a85..67fd8d7a13e 100644 --- a/src/test/ui/methods/method-call-lifetime-args-unresolved.stderr +++ b/src/test/ui/methods/method-call-lifetime-args-unresolved.stderr @@ -1,7 +1,7 @@ error[E0261]: use of undeclared lifetime name `'a` --> $DIR/method-call-lifetime-args-unresolved.rs:2:15 | -LL | 0.clone::<'a>(); //~ ERROR use of undeclared lifetime name `'a` +LL | 0.clone::<'a>(); | ^^ undeclared lifetime error: aborting due to previous error diff --git a/src/test/ui/methods/method-call-type-binding.stderr b/src/test/ui/methods/method-call-type-binding.stderr index 27d6f93490b..4b93082ace5 100644 --- a/src/test/ui/methods/method-call-type-binding.stderr +++ b/src/test/ui/methods/method-call-type-binding.stderr @@ -1,7 +1,7 @@ error[E0229]: associated type bindings are not allowed here --> $DIR/method-call-type-binding.rs:2:15 | -LL | 0.clone::(); //~ ERROR associated type bindings are not allowed here +LL | 0.clone::(); | ^^^^^^ associated type not allowed here error: aborting due to previous error diff --git a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr index 2d8449b96de..3c2e9b01767 100644 --- a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr +++ b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:85:24 | -LL | let _seetype: () = z; //~ ERROR mismatched types +LL | let _seetype: () = z; | ^ expected (), found u32 | = note: expected type `()` @@ -10,7 +10,7 @@ LL | let _seetype: () = z; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:102:24 | -LL | let _seetype: () = z; //~ ERROR mismatched types +LL | let _seetype: () = z; | ^ expected (), found u64 | = note: expected type `()` @@ -19,7 +19,7 @@ LL | let _seetype: () = z; //~ ERROR mismatched types error[E0034]: multiple applicable items in scope --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:120:15 | -LL | let z = x.foo(); //~ ERROR multiple applicable items in scope +LL | let z = x.foo(); | ^^^ multiple `foo` found | note: candidate #1 is defined in an impl of the trait `internal::X` for the type `_` @@ -42,7 +42,7 @@ LL | fn foo(&self) -> u8; error[E0308]: mismatched types --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:137:24 | -LL | let _seetype: () = z; //~ ERROR mismatched types +LL | let _seetype: () = z; | ^ expected (), found u8 | = note: expected type `()` @@ -51,7 +51,7 @@ LL | let _seetype: () = z; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:155:24 | -LL | let _seetype: () = z; //~ ERROR mismatched types +LL | let _seetype: () = z; | ^ expected (), found u32 | = note: expected type `()` @@ -60,7 +60,7 @@ LL | let _seetype: () = z; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:172:24 | -LL | let _seetype: () = z; //~ ERROR mismatched types +LL | let _seetype: () = z; | ^ expected (), found u32 | = note: expected type `()` diff --git a/src/test/ui/methods/method-macro-backtrace.stderr b/src/test/ui/methods/method-macro-backtrace.stderr index 81098bbceb0..7860365476a 100644 --- a/src/test/ui/methods/method-macro-backtrace.stderr +++ b/src/test/ui/methods/method-macro-backtrace.stderr @@ -3,7 +3,7 @@ error[E0201]: duplicate definitions with name `bar`: | LL | fn bar(&self) { } | ----------------- previous definition of `bar` here -LL | fn bar(&self) { } //~ ERROR duplicate definitions +LL | fn bar(&self) { } | ^^^^^^^^^^^^^^^^^ duplicate definition error: aborting due to previous error diff --git a/src/test/ui/methods/method-missing-call.stderr b/src/test/ui/methods/method-missing-call.stderr index 886d92aa925..3ab5f66a0c3 100644 --- a/src/test/ui/methods/method-missing-call.stderr +++ b/src/test/ui/methods/method-missing-call.stderr @@ -1,13 +1,13 @@ error[E0615]: attempted to take value of method `get_x` on type `Point` --> $DIR/method-missing-call.rs:22:26 | -LL | .get_x;//~ ERROR attempted to take value of method `get_x` on type `Point` +LL | .get_x; | ^^^^^ help: use parentheses to call the method: `get_x()` error[E0615]: attempted to take value of method `filter_map` on type `std::iter::Filter, [closure@$DIR/method-missing-call.rs:27:20: 27:25]>, [closure@$DIR/method-missing-call.rs:28:23: 28:35]>` --> $DIR/method-missing-call.rs:29:16 | -LL | .filter_map; //~ ERROR attempted to take value of method `filter_map` on type +LL | .filter_map; | ^^^^^^^^^^ help: use parentheses to call the method: `filter_map(...)` error: aborting due to 2 previous errors diff --git a/src/test/ui/methods/method-self-arg-1.stderr b/src/test/ui/methods/method-self-arg-1.stderr index 8c80d01b18c..8485a5403ff 100644 --- a/src/test/ui/methods/method-self-arg-1.stderr +++ b/src/test/ui/methods/method-self-arg-1.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/method-self-arg-1.rs:11:14 | -LL | Foo::bar(x); //~ ERROR mismatched types +LL | Foo::bar(x); | ^ | | | expected &Foo, found struct `Foo` @@ -13,7 +13,7 @@ LL | Foo::bar(x); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/method-self-arg-1.rs:15:14 | -LL | Foo::bar(&42); //~ ERROR mismatched types +LL | Foo::bar(&42); | ^^^ expected struct `Foo`, found integer | = note: expected type `&Foo` diff --git a/src/test/ui/methods/method-self-arg-2.stderr b/src/test/ui/methods/method-self-arg-2.stderr index 9746ac316d9..56cc8c83fe1 100644 --- a/src/test/ui/methods/method-self-arg-2.stderr +++ b/src/test/ui/methods/method-self-arg-2.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `x` as immutable because it is also borrowed as muta | LL | let y = &mut x; | - mutable borrow occurs here -LL | Foo::bar(&x); //~ERROR cannot borrow `x` +LL | Foo::bar(&x); | ^ immutable borrow occurs here ... LL | } @@ -14,7 +14,7 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time | LL | let y = &mut x; | - first mutable borrow occurs here -LL | Foo::baz(&mut x); //~ERROR cannot borrow `x` +LL | Foo::baz(&mut x); | ^ second mutable borrow occurs here LL | y.use_mut(); LL | } diff --git a/src/test/ui/mir-dataflow/def-inits-1.stderr b/src/test/ui/mir-dataflow/def-inits-1.stderr index 93debd6c15d..6bc5f7dcb99 100644 --- a/src/test/ui/mir-dataflow/def-inits-1.stderr +++ b/src/test/ui/mir-dataflow/def-inits-1.stderr @@ -1,25 +1,25 @@ error: rustc_peek: bit not set --> $DIR/def-inits-1.rs:15:14 | -LL | unsafe { rustc_peek(&ret); } //~ ERROR rustc_peek: bit not set +LL | unsafe { rustc_peek(&ret); } | ^^^^^^^^^^^^^^^^ error: rustc_peek: bit not set --> $DIR/def-inits-1.rs:31:14 | -LL | unsafe { rustc_peek(&z); } //~ ERROR rustc_peek: bit not set +LL | unsafe { rustc_peek(&z); } | ^^^^^^^^^^^^^^ error: rustc_peek: bit not set --> $DIR/def-inits-1.rs:34:14 | -LL | unsafe { rustc_peek(&y); } //~ ERROR rustc_peek: bit not set +LL | unsafe { rustc_peek(&y); } | ^^^^^^^^^^^^^^ error: rustc_peek: bit not set --> $DIR/def-inits-1.rs:42:14 | -LL | unsafe { rustc_peek(&x); } //~ ERROR rustc_peek: bit not set +LL | unsafe { rustc_peek(&x); } | ^^^^^^^^^^^^^^ error: stop_after_dataflow ended compilation diff --git a/src/test/ui/mir-dataflow/inits-1.stderr b/src/test/ui/mir-dataflow/inits-1.stderr index 7ee61e6be2c..38a9c60b168 100644 --- a/src/test/ui/mir-dataflow/inits-1.stderr +++ b/src/test/ui/mir-dataflow/inits-1.stderr @@ -1,19 +1,19 @@ error: rustc_peek: bit not set --> $DIR/inits-1.rs:15:14 | -LL | unsafe { rustc_peek(&ret); } //~ ERROR rustc_peek: bit not set +LL | unsafe { rustc_peek(&ret); } | ^^^^^^^^^^^^^^^^ error: rustc_peek: bit not set --> $DIR/inits-1.rs:35:14 | -LL | unsafe { rustc_peek(&y); } //~ ERROR rustc_peek: bit not set +LL | unsafe { rustc_peek(&y); } | ^^^^^^^^^^^^^^ error: rustc_peek: bit not set --> $DIR/inits-1.rs:43:14 | -LL | unsafe { rustc_peek(&x); } //~ ERROR rustc_peek: bit not set +LL | unsafe { rustc_peek(&x); } | ^^^^^^^^^^^^^^ error: stop_after_dataflow ended compilation diff --git a/src/test/ui/mir-dataflow/uninits-1.stderr b/src/test/ui/mir-dataflow/uninits-1.stderr index 21ad0b3c2c1..c60987050e6 100644 --- a/src/test/ui/mir-dataflow/uninits-1.stderr +++ b/src/test/ui/mir-dataflow/uninits-1.stderr @@ -1,31 +1,31 @@ error: rustc_peek: bit not set --> $DIR/uninits-1.rs:19:14 | -LL | unsafe { rustc_peek(&x) }; //~ ERROR rustc_peek: bit not set +LL | unsafe { rustc_peek(&x) }; | ^^^^^^^^^^^^^^ error: rustc_peek: bit not set --> $DIR/uninits-1.rs:20:14 | -LL | unsafe { rustc_peek(&y) }; //~ ERROR rustc_peek: bit not set +LL | unsafe { rustc_peek(&y) }; | ^^^^^^^^^^^^^^ error: rustc_peek: bit not set --> $DIR/uninits-1.rs:21:14 | -LL | unsafe { rustc_peek(&z) }; //~ ERROR rustc_peek: bit not set +LL | unsafe { rustc_peek(&z) }; | ^^^^^^^^^^^^^^ error: rustc_peek: bit not set --> $DIR/uninits-1.rs:37:14 | -LL | unsafe { rustc_peek(&x); } //~ ERROR rustc_peek: bit not set +LL | unsafe { rustc_peek(&x); } | ^^^^^^^^^^^^^^ error: rustc_peek: bit not set --> $DIR/uninits-1.rs:45:14 | -LL | unsafe { rustc_peek(&ret); } //~ ERROR rustc_peek: bit not set +LL | unsafe { rustc_peek(&ret); } | ^^^^^^^^^^^^^^^^ error: stop_after_dataflow ended compilation diff --git a/src/test/ui/mir-dataflow/uninits-2.stderr b/src/test/ui/mir-dataflow/uninits-2.stderr index 08959ce3b13..de3e58e52de 100644 --- a/src/test/ui/mir-dataflow/uninits-2.stderr +++ b/src/test/ui/mir-dataflow/uninits-2.stderr @@ -1,7 +1,7 @@ error: rustc_peek: bit not set --> $DIR/uninits-2.rs:15:14 | -LL | unsafe { rustc_peek(&x) }; //~ ERROR rustc_peek: bit not set +LL | unsafe { rustc_peek(&x) }; | ^^^^^^^^^^^^^^ error: stop_after_dataflow ended compilation diff --git a/src/test/ui/mir-unpretty.stderr b/src/test/ui/mir-unpretty.stderr index 59e8c0bf090..6e5dac22669 100644 --- a/src/test/ui/mir-unpretty.stderr +++ b/src/test/ui/mir-unpretty.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/mir-unpretty.rs:4:17 | -LL | let x: () = 0; //~ ERROR: mismatched types +LL | let x: () = 0; | ^ expected (), found integer | = note: expected type `()` diff --git a/src/test/ui/mismatched_types/E0409.stderr b/src/test/ui/mismatched_types/E0409.stderr index 08f132efd05..93115bfb998 100644 --- a/src/test/ui/mismatched_types/E0409.stderr +++ b/src/test/ui/mismatched_types/E0409.stderr @@ -1,7 +1,7 @@ error[E0409]: variable `y` is bound in inconsistent ways within the same match arm --> $DIR/E0409.rs:5:23 | -LL | (0, ref y) | (y, 0) => {} //~ ERROR E0409 +LL | (0, ref y) | (y, 0) => {} | - ^ bound in different ways | | | first binding @@ -9,7 +9,7 @@ LL | (0, ref y) | (y, 0) => {} //~ ERROR E0409 error[E0308]: mismatched types --> $DIR/E0409.rs:5:23 | -LL | (0, ref y) | (y, 0) => {} //~ ERROR E0409 +LL | (0, ref y) | (y, 0) => {} | ^ expected &{integer}, found integer | = note: expected type `&{integer}` diff --git a/src/test/ui/mismatched_types/E0631.stderr b/src/test/ui/mismatched_types/E0631.stderr index df320a2059b..f2bc6e1692f 100644 --- a/src/test/ui/mismatched_types/E0631.stderr +++ b/src/test/ui/mismatched_types/E0631.stderr @@ -1,7 +1,7 @@ error[E0631]: type mismatch in closure arguments --> $DIR/E0631.rs:7:5 | -LL | foo(|_: isize| {}); //~ ERROR type mismatch +LL | foo(|_: isize| {}); | ^^^ ---------- found signature of `fn(isize) -> _` | | | expected signature of `fn(usize) -> _` @@ -15,7 +15,7 @@ LL | fn foo(_: F) {} error[E0631]: type mismatch in closure arguments --> $DIR/E0631.rs:8:5 | -LL | bar(|_: isize| {}); //~ ERROR type mismatch +LL | bar(|_: isize| {}); | ^^^ ---------- found signature of `fn(isize) -> _` | | | expected signature of `fn(usize) -> _` @@ -32,7 +32,7 @@ error[E0631]: type mismatch in function arguments LL | fn f(_: u64) {} | ------------ found signature of `fn(u64) -> _` ... -LL | foo(f); //~ ERROR type mismatch +LL | foo(f); | ^^^ expected signature of `fn(usize) -> _` | note: required by `foo` @@ -47,7 +47,7 @@ error[E0631]: type mismatch in function arguments LL | fn f(_: u64) {} | ------------ found signature of `fn(u64) -> _` ... -LL | bar(f); //~ ERROR type mismatch +LL | bar(f); | ^^^ expected signature of `fn(usize) -> _` | note: required by `bar` diff --git a/src/test/ui/mismatched_types/abridged.stderr b/src/test/ui/mismatched_types/abridged.stderr index 6a5cf7db4ee..b7f3b3dde8a 100644 --- a/src/test/ui/mismatched_types/abridged.stderr +++ b/src/test/ui/mismatched_types/abridged.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | fn a() -> Foo { | --- expected `Foo` because of return type -LL | Some(Foo { bar: 1 }) //~ ERROR mismatched types +LL | Some(Foo { bar: 1 }) | ^^^^^^^^^^^^^^^^^^^^ expected struct `Foo`, found enum `std::option::Option` | = note: expected type `Foo` @@ -14,7 +14,7 @@ error[E0308]: mismatched types | LL | fn a2() -> Foo { | --- expected `Foo` because of return type -LL | Ok(Foo { bar: 1}) //~ ERROR mismatched types +LL | Ok(Foo { bar: 1}) | ^^^^^^^^^^^^^^^^^ expected struct `Foo`, found enum `std::result::Result` | = note: expected type `Foo` @@ -25,7 +25,7 @@ error[E0308]: mismatched types | LL | fn b() -> Option { | ----------- expected `std::option::Option` because of return type -LL | Foo { bar: 1 } //~ ERROR mismatched types +LL | Foo { bar: 1 } | ^^^^^^^^^^^^^^ expected enum `std::option::Option`, found struct `Foo` | = note: expected type `std::option::Option` @@ -36,7 +36,7 @@ error[E0308]: mismatched types | LL | fn c() -> Result { | ---------------- expected `std::result::Result` because of return type -LL | Foo { bar: 1 } //~ ERROR mismatched types +LL | Foo { bar: 1 } | ^^^^^^^^^^^^^^ expected enum `std::result::Result`, found struct `Foo` | = note: expected type `std::result::Result` @@ -48,7 +48,7 @@ error[E0308]: mismatched types LL | fn d() -> X, String> { | ---------------------------- expected `X, std::string::String>` because of return type ... -LL | x //~ ERROR mismatched types +LL | x | ^ expected struct `std::string::String`, found integer | = note: expected type `X, std::string::String>` @@ -60,7 +60,7 @@ error[E0308]: mismatched types LL | fn e() -> X, String> { | ---------------------------- expected `X, std::string::String>` because of return type ... -LL | x //~ ERROR mismatched types +LL | x | ^ expected struct `std::string::String`, found integer | = note: expected type `X, _>` diff --git a/src/test/ui/mismatched_types/binops.stderr b/src/test/ui/mismatched_types/binops.stderr index 76ea0ab54c3..9dda44a8568 100644 --- a/src/test/ui/mismatched_types/binops.stderr +++ b/src/test/ui/mismatched_types/binops.stderr @@ -1,7 +1,7 @@ error[E0277]: cannot add `std::option::Option<{integer}>` to `{integer}` --> $DIR/binops.rs:2:7 | -LL | 1 + Some(1); //~ ERROR cannot add `std::option::Option<{integer}>` to `{integer}` +LL | 1 + Some(1); | ^ no implementation for `{integer} + std::option::Option<{integer}>` | = help: the trait `std::ops::Add>` is not implemented for `{integer}` @@ -9,7 +9,7 @@ LL | 1 + Some(1); //~ ERROR cannot add `std::option::Option<{integer}>` to ` error[E0277]: cannot subtract `std::option::Option<{integer}>` from `usize` --> $DIR/binops.rs:3:16 | -LL | 2 as usize - Some(1); //~ ERROR cannot subtract `std::option::Option<{integer}>` from `usize` +LL | 2 as usize - Some(1); | ^ no implementation for `usize - std::option::Option<{integer}>` | = help: the trait `std::ops::Sub>` is not implemented for `usize` @@ -17,7 +17,7 @@ LL | 2 as usize - Some(1); //~ ERROR cannot subtract `std::option::Option<{i error[E0277]: cannot multiply `()` to `{integer}` --> $DIR/binops.rs:4:7 | -LL | 3 * (); //~ ERROR cannot multiply `()` to `{integer}` +LL | 3 * (); | ^ no implementation for `{integer} * ()` | = help: the trait `std::ops::Mul<()>` is not implemented for `{integer}` @@ -25,7 +25,7 @@ LL | 3 * (); //~ ERROR cannot multiply `()` to `{integer}` error[E0277]: cannot divide `{integer}` by `&str` --> $DIR/binops.rs:5:7 | -LL | 4 / ""; //~ ERROR cannot divide `{integer}` by `&str` +LL | 4 / ""; | ^ no implementation for `{integer} / &str` | = help: the trait `std::ops::Div<&str>` is not implemented for `{integer}` @@ -33,7 +33,7 @@ LL | 4 / ""; //~ ERROR cannot divide `{integer}` by `&str` error[E0277]: can't compare `{integer}` with `std::string::String` --> $DIR/binops.rs:6:7 | -LL | 5 < String::new(); //~ ERROR can't compare `{integer}` with `std::string::String` +LL | 5 < String::new(); | ^ no implementation for `{integer} < std::string::String` and `{integer} > std::string::String` | = help: the trait `std::cmp::PartialOrd` is not implemented for `{integer}` @@ -41,7 +41,7 @@ LL | 5 < String::new(); //~ ERROR can't compare `{integer}` with `std::strin error[E0277]: can't compare `{integer}` with `std::result::Result<{integer}, _>` --> $DIR/binops.rs:7:7 | -LL | 6 == Ok(1); //~ ERROR can't compare `{integer}` with `std::result::Result<{integer}, _>` +LL | 6 == Ok(1); | ^^ no implementation for `{integer} == std::result::Result<{integer}, _>` | = help: the trait `std::cmp::PartialEq>` is not implemented for `{integer}` diff --git a/src/test/ui/mismatched_types/cast-rfc0401.stderr b/src/test/ui/mismatched_types/cast-rfc0401.stderr index 76091f2d09e..c30f0acaa57 100644 --- a/src/test/ui/mismatched_types/cast-rfc0401.stderr +++ b/src/test/ui/mismatched_types/cast-rfc0401.stderr @@ -1,7 +1,7 @@ error[E0606]: casting `*const U` as `*const V` is invalid --> $DIR/cast-rfc0401.rs:3:5 | -LL | u as *const V //~ ERROR is invalid +LL | u as *const V | ^^^^^^^^^^^^^ | = note: vtable kinds may not match @@ -9,7 +9,7 @@ LL | u as *const V //~ ERROR is invalid error[E0606]: casting `*const U` as `*const str` is invalid --> $DIR/cast-rfc0401.rs:8:5 | -LL | u as *const str //~ ERROR is invalid +LL | u as *const str | ^^^^^^^^^^^^^^^ | = note: vtable kinds may not match @@ -17,13 +17,13 @@ LL | u as *const str //~ ERROR is invalid error[E0609]: no field `f` on type `fn() {main}` --> $DIR/cast-rfc0401.rs:65:18 | -LL | let _ = main.f as *const u32; //~ ERROR no field +LL | let _ = main.f as *const u32; | ^ error[E0605]: non-primitive cast: `*const u8` as `&u8` --> $DIR/cast-rfc0401.rs:29:13 | -LL | let _ = v as &u8; //~ ERROR non-primitive cast +LL | let _ = v as &u8; | ^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -31,7 +31,7 @@ LL | let _ = v as &u8; //~ ERROR non-primitive cast error[E0605]: non-primitive cast: `*const u8` as `E` --> $DIR/cast-rfc0401.rs:30:13 | -LL | let _ = v as E; //~ ERROR non-primitive cast +LL | let _ = v as E; | ^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -39,7 +39,7 @@ LL | let _ = v as E; //~ ERROR non-primitive cast error[E0605]: non-primitive cast: `*const u8` as `fn()` --> $DIR/cast-rfc0401.rs:31:13 | -LL | let _ = v as fn(); //~ ERROR non-primitive cast +LL | let _ = v as fn(); | ^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -47,7 +47,7 @@ LL | let _ = v as fn(); //~ ERROR non-primitive cast error[E0605]: non-primitive cast: `*const u8` as `(u32,)` --> $DIR/cast-rfc0401.rs:32:13 | -LL | let _ = v as (u32,); //~ ERROR non-primitive cast +LL | let _ = v as (u32,); | ^^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -55,7 +55,7 @@ LL | let _ = v as (u32,); //~ ERROR non-primitive cast error[E0605]: non-primitive cast: `std::option::Option<&*const u8>` as `*const u8` --> $DIR/cast-rfc0401.rs:33:13 | -LL | let _ = Some(&v) as *const u8; //~ ERROR non-primitive cast +LL | let _ = Some(&v) as *const u8; | ^^^^^^^^^^^^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -63,19 +63,19 @@ LL | let _ = Some(&v) as *const u8; //~ ERROR non-primitive cast error[E0606]: casting `*const u8` as `f32` is invalid --> $DIR/cast-rfc0401.rs:35:13 | -LL | let _ = v as f32; //~ ERROR is invalid +LL | let _ = v as f32; | ^^^^^^^^ error[E0606]: casting `fn() {main}` as `f64` is invalid --> $DIR/cast-rfc0401.rs:36:13 | -LL | let _ = main as f64; //~ ERROR is invalid +LL | let _ = main as f64; | ^^^^^^^^^^^ error[E0606]: casting `&*const u8` as `usize` is invalid --> $DIR/cast-rfc0401.rs:37:13 | -LL | let _ = &v as usize; //~ ERROR is invalid +LL | let _ = &v as usize; | ^^^^^^^^^^^ | = help: cast through a raw pointer first @@ -83,31 +83,31 @@ LL | let _ = &v as usize; //~ ERROR is invalid error[E0606]: casting `f32` as `*const u8` is invalid --> $DIR/cast-rfc0401.rs:38:13 | -LL | let _ = f as *const u8; //~ ERROR is invalid +LL | let _ = f as *const u8; | ^^^^^^^^^^^^^^ error[E0054]: cannot cast as `bool` --> $DIR/cast-rfc0401.rs:39:13 | -LL | let _ = 3_i32 as bool; //~ ERROR cannot cast +LL | let _ = 3_i32 as bool; | ^^^^^^^^^^^^^ help: compare with zero instead: `3_i32 != 0` error[E0054]: cannot cast as `bool` --> $DIR/cast-rfc0401.rs:40:13 | -LL | let _ = E::A as bool; //~ ERROR cannot cast +LL | let _ = E::A as bool; | ^^^^^^^^^^^^ unsupported cast error[E0604]: only `u8` can be cast as `char`, not `u32` --> $DIR/cast-rfc0401.rs:41:13 | -LL | let _ = 0x61u32 as char; //~ ERROR can be cast as +LL | let _ = 0x61u32 as char; | ^^^^^^^^^^^^^^^ error[E0606]: casting `bool` as `f32` is invalid --> $DIR/cast-rfc0401.rs:43:13 | -LL | let _ = false as f32; //~ ERROR is invalid +LL | let _ = false as f32; | ^^^^^^^^^^^^ | = help: cast through an integer first @@ -115,7 +115,7 @@ LL | let _ = false as f32; //~ ERROR is invalid error[E0606]: casting `E` as `f32` is invalid --> $DIR/cast-rfc0401.rs:44:13 | -LL | let _ = E::A as f32; //~ ERROR is invalid +LL | let _ = E::A as f32; | ^^^^^^^^^^^ | = help: cast through an integer first @@ -123,7 +123,7 @@ LL | let _ = E::A as f32; //~ ERROR is invalid error[E0606]: casting `char` as `f32` is invalid --> $DIR/cast-rfc0401.rs:45:13 | -LL | let _ = 'a' as f32; //~ ERROR is invalid +LL | let _ = 'a' as f32; | ^^^^^^^^^^ | = help: cast through an integer first @@ -131,67 +131,67 @@ LL | let _ = 'a' as f32; //~ ERROR is invalid error[E0606]: casting `bool` as `*const u8` is invalid --> $DIR/cast-rfc0401.rs:47:13 | -LL | let _ = false as *const u8; //~ ERROR is invalid +LL | let _ = false as *const u8; | ^^^^^^^^^^^^^^^^^^ error[E0606]: casting `E` as `*const u8` is invalid --> $DIR/cast-rfc0401.rs:48:13 | -LL | let _ = E::A as *const u8; //~ ERROR is invalid +LL | let _ = E::A as *const u8; | ^^^^^^^^^^^^^^^^^ error[E0606]: casting `char` as `*const u8` is invalid --> $DIR/cast-rfc0401.rs:49:13 | -LL | let _ = 'a' as *const u8; //~ ERROR is invalid +LL | let _ = 'a' as *const u8; | ^^^^^^^^^^^^^^^^ error[E0606]: casting `usize` as `*const [u8]` is invalid --> $DIR/cast-rfc0401.rs:51:13 | -LL | let _ = 42usize as *const [u8]; //~ ERROR is invalid +LL | let _ = 42usize as *const [u8]; | ^^^^^^^^^^^^^^^^^^^^^^ error[E0607]: cannot cast thin pointer `*const u8` to fat pointer `*const [u8]` --> $DIR/cast-rfc0401.rs:52:13 | -LL | let _ = v as *const [u8]; //~ ERROR cannot cast +LL | let _ = v as *const [u8]; | ^^^^^^^^^^^^^^^^ error[E0606]: casting `&dyn Foo` as `*const str` is invalid --> $DIR/cast-rfc0401.rs:54:13 | -LL | let _ = foo as *const str; //~ ERROR is invalid +LL | let _ = foo as *const str; | ^^^^^^^^^^^^^^^^^ error[E0606]: casting `&dyn Foo` as `*mut str` is invalid --> $DIR/cast-rfc0401.rs:55:13 | -LL | let _ = foo as *mut str; //~ ERROR is invalid +LL | let _ = foo as *mut str; | ^^^^^^^^^^^^^^^ error[E0606]: casting `fn() {main}` as `*mut str` is invalid --> $DIR/cast-rfc0401.rs:56:13 | -LL | let _ = main as *mut str; //~ ERROR is invalid +LL | let _ = main as *mut str; | ^^^^^^^^^^^^^^^^ error[E0606]: casting `&f32` as `*mut f32` is invalid --> $DIR/cast-rfc0401.rs:57:13 | -LL | let _ = &f as *mut f32; //~ ERROR is invalid +LL | let _ = &f as *mut f32; | ^^^^^^^^^^^^^^ error[E0606]: casting `&f32` as `*const f64` is invalid --> $DIR/cast-rfc0401.rs:58:13 | -LL | let _ = &f as *const f64; //~ ERROR is invalid +LL | let _ = &f as *const f64; | ^^^^^^^^^^^^^^^^ error[E0606]: casting `*const [i8]` as `usize` is invalid --> $DIR/cast-rfc0401.rs:59:13 | -LL | let _ = fat_sv as usize; //~ ERROR is invalid +LL | let _ = fat_sv as usize; | ^^^^^^^^^^^^^^^ | = help: cast through a thin pointer first @@ -199,7 +199,7 @@ LL | let _ = fat_sv as usize; //~ ERROR is invalid error[E0606]: casting `*const dyn Foo` as `*const [u16]` is invalid --> $DIR/cast-rfc0401.rs:68:13 | -LL | let _ = cf as *const [u16]; //~ ERROR is invalid +LL | let _ = cf as *const [u16]; | ^^^^^^^^^^^^^^^^^^ | = note: vtable kinds may not match @@ -207,7 +207,7 @@ LL | let _ = cf as *const [u16]; //~ ERROR is invalid error[E0606]: casting `*const dyn Foo` as `*const dyn Bar` is invalid --> $DIR/cast-rfc0401.rs:69:13 | -LL | let _ = cf as *const Bar; //~ ERROR is invalid +LL | let _ = cf as *const Bar; | ^^^^^^^^^^^^^^^^ | = note: vtable kinds may not match @@ -215,7 +215,7 @@ LL | let _ = cf as *const Bar; //~ ERROR is invalid error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> $DIR/cast-rfc0401.rs:53:13 | -LL | let _ = fat_v as *const Foo; //~ ERROR the size for values of type +LL | let _ = fat_v as *const Foo; | ^^^^^ doesn't have a size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[u8]` @@ -225,7 +225,7 @@ LL | let _ = fat_v as *const Foo; //~ ERROR the size for values of type error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/cast-rfc0401.rs:62:13 | -LL | let _ = a as *const Foo; //~ ERROR the size for values of type +LL | let _ = a as *const Foo; | ^ doesn't have a size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` @@ -235,7 +235,7 @@ LL | let _ = a as *const Foo; //~ ERROR the size for values of type error[E0606]: casting `&{float}` as `f32` is invalid --> $DIR/cast-rfc0401.rs:71:30 | -LL | vec![0.0].iter().map(|s| s as f32).collect::>(); //~ ERROR is invalid +LL | vec![0.0].iter().map(|s| s as f32).collect::>(); | -^^^^^^^ | | | cannot cast `&{float}` as `f32` diff --git a/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr b/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr index 5dd6887005e..cf392e1731b 100644 --- a/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr +++ b/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr @@ -1,7 +1,7 @@ error[E0631]: type mismatch in closure arguments --> $DIR/closure-arg-type-mismatch.rs:3:14 | -LL | a.iter().map(|_: (u32, u32)| 45); //~ ERROR type mismatch +LL | a.iter().map(|_: (u32, u32)| 45); | ^^^ ------------------ found signature of `fn((u32, u32)) -> _` | | | expected signature of `fn(&(u32, u32)) -> _` @@ -9,7 +9,7 @@ LL | a.iter().map(|_: (u32, u32)| 45); //~ ERROR type mismatch error[E0631]: type mismatch in closure arguments --> $DIR/closure-arg-type-mismatch.rs:4:14 | -LL | a.iter().map(|_: &(u16, u16)| 45); //~ ERROR type mismatch +LL | a.iter().map(|_: &(u16, u16)| 45); | ^^^ ------------------- found signature of `for<'r> fn(&'r (u16, u16)) -> _` | | | expected signature of `fn(&(u32, u32)) -> _` @@ -17,7 +17,7 @@ LL | a.iter().map(|_: &(u16, u16)| 45); //~ ERROR type mismatch error[E0631]: type mismatch in closure arguments --> $DIR/closure-arg-type-mismatch.rs:5:14 | -LL | a.iter().map(|_: (u16, u16)| 45); //~ ERROR type mismatch +LL | a.iter().map(|_: (u16, u16)| 45); | ^^^ ------------------ found signature of `fn((u16, u16)) -> _` | | | expected signature of `fn(&(u32, u32)) -> _` @@ -25,7 +25,7 @@ LL | a.iter().map(|_: (u16, u16)| 45); //~ ERROR type mismatch error[E0631]: type mismatch in function arguments --> $DIR/closure-arg-type-mismatch.rs:10:5 | -LL | baz(f); //~ ERROR type mismatch +LL | baz(f); | ^^^ | | | expected signature of `for<'r> fn(*mut &'r u32) -> _` @@ -40,7 +40,7 @@ LL | fn baz(_: F) {} error[E0271]: type mismatch resolving `for<'r> >::Output == ()` --> $DIR/closure-arg-type-mismatch.rs:10:5 | -LL | baz(f); //~ ERROR type mismatch +LL | baz(f); | ^^^ expected bound lifetime parameter, found concrete lifetime | note: required by `baz` diff --git a/src/test/ui/mismatched_types/closure-mismatch.stderr b/src/test/ui/mismatched_types/closure-mismatch.stderr index e55047e96c2..6fbc9225612 100644 --- a/src/test/ui/mismatched_types/closure-mismatch.stderr +++ b/src/test/ui/mismatched_types/closure-mismatch.stderr @@ -1,7 +1,7 @@ error[E0271]: type mismatch resolving `for<'r> <[closure@$DIR/closure-mismatch.rs:8:9: 8:15] as std::ops::FnOnce<(&'r (),)>>::Output == ()` --> $DIR/closure-mismatch.rs:8:5 | -LL | baz(|_| ()); //~ ERROR type mismatch +LL | baz(|_| ()); | ^^^ expected bound lifetime parameter, found concrete lifetime | = note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:8:9: 8:15]` @@ -14,7 +14,7 @@ LL | fn baz(_: T) {} error[E0631]: type mismatch in closure arguments --> $DIR/closure-mismatch.rs:8:5 | -LL | baz(|_| ()); //~ ERROR type mismatch +LL | baz(|_| ()); | ^^^ ------ found signature of `fn(_) -> _` | | | expected signature of `for<'r> fn(&'r ()) -> _` diff --git a/src/test/ui/mismatched_types/const-fn-in-trait.stderr b/src/test/ui/mismatched_types/const-fn-in-trait.stderr index e1482d7c450..ec1f36bf087 100644 --- a/src/test/ui/mismatched_types/const-fn-in-trait.stderr +++ b/src/test/ui/mismatched_types/const-fn-in-trait.stderr @@ -1,13 +1,13 @@ error[E0379]: trait fns cannot be declared const --> $DIR/const-fn-in-trait.rs:7:5 | -LL | const fn g(); //~ ERROR cannot be declared const +LL | const fn g(); | ^^^^^ trait fns cannot be const error[E0379]: trait fns cannot be declared const --> $DIR/const-fn-in-trait.rs:11:5 | -LL | const fn f() -> u32 { 22 } //~ ERROR cannot be declared const +LL | const fn f() -> u32 { 22 } | ^^^^^ trait fns cannot be const error: aborting due to 2 previous errors diff --git a/src/test/ui/mismatched_types/for-loop-has-unit-body.stderr b/src/test/ui/mismatched_types/for-loop-has-unit-body.stderr index 25203d6f35d..3c8ba8057c5 100644 --- a/src/test/ui/mismatched_types/for-loop-has-unit-body.stderr +++ b/src/test/ui/mismatched_types/for-loop-has-unit-body.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/for-loop-has-unit-body.rs:3:9 | -LL | x //~ ERROR mismatched types +LL | x | ^ expected (), found integer | = note: expected type `()` diff --git a/src/test/ui/mismatched_types/issue-26480.stderr b/src/test/ui/mismatched_types/issue-26480.stderr index 11aa6cd7c1b..ef7a8d38537 100644 --- a/src/test/ui/mismatched_types/issue-26480.stderr +++ b/src/test/ui/mismatched_types/issue-26480.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-26480.rs:16:19 | -LL | $arr.len() * size_of($arr[0])); //~ ERROR mismatched types +LL | $arr.len() * size_of($arr[0])); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u64, found usize ... LL | write!(hello); @@ -10,7 +10,7 @@ LL | write!(hello); error[E0605]: non-primitive cast: `{integer}` as `()` --> $DIR/issue-26480.rs:22:19 | -LL | ($x:expr) => ($x as ()) //~ ERROR non-primitive cast +LL | ($x:expr) => ($x as ()) | ^^^^^^^^ ... LL | cast!(2); diff --git a/src/test/ui/mismatched_types/issue-35030.stderr b/src/test/ui/mismatched_types/issue-35030.stderr index 6a3e7d930cf..f0306701613 100644 --- a/src/test/ui/mismatched_types/issue-35030.stderr +++ b/src/test/ui/mismatched_types/issue-35030.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-35030.rs:9:14 | -LL | Some(true) //~ ERROR mismatched types +LL | Some(true) | ^^^^ expected type parameter, found bool | = note: expected type `bool` (type parameter) diff --git a/src/test/ui/mismatched_types/issue-38371.stderr b/src/test/ui/mismatched_types/issue-38371.stderr index f702a4f47f1..d1686923730 100644 --- a/src/test/ui/mismatched_types/issue-38371.stderr +++ b/src/test/ui/mismatched_types/issue-38371.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-38371.rs:4:8 | -LL | fn foo(&foo: Foo) { //~ ERROR mismatched types +LL | fn foo(&foo: Foo) { | ^^^^ expected struct `Foo`, found reference | = note: expected type `Foo` @@ -11,7 +11,7 @@ LL | fn foo(&foo: Foo) { //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/issue-38371.rs:18:9 | -LL | fn agh(&&bar: &u32) { //~ ERROR mismatched types +LL | fn agh(&&bar: &u32) { | ^^^^ expected u32, found reference | = note: expected type `u32` @@ -21,7 +21,7 @@ LL | fn agh(&&bar: &u32) { //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/issue-38371.rs:21:8 | -LL | fn bgh(&&bar: u32) { //~ ERROR mismatched types +LL | fn bgh(&&bar: u32) { | ^^^^^ expected u32, found reference | = note: expected type `u32` @@ -30,7 +30,7 @@ LL | fn bgh(&&bar: u32) { //~ ERROR mismatched types error[E0529]: expected an array or slice, found `u32` --> $DIR/issue-38371.rs:24:9 | -LL | fn ugh(&[bar]: &u32) { //~ ERROR expected an array or slice +LL | fn ugh(&[bar]: &u32) { | ^^^^^ pattern cannot match with input type `u32` error: aborting due to 4 previous errors diff --git a/src/test/ui/mismatched_types/main.stderr b/src/test/ui/mismatched_types/main.stderr index 57e95e41333..1d53cfdd252 100644 --- a/src/test/ui/mismatched_types/main.stderr +++ b/src/test/ui/mismatched_types/main.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/main.rs:2:18 | -LL | let x: u32 = ( //~ ERROR mismatched types +LL | let x: u32 = ( | __________________^ LL | | ); | |_____^ expected u32, found () diff --git a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr index 51975abd720..3551e4105f8 100644 --- a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr +++ b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/overloaded-calls-bad.rs:28:17 | -LL | let ans = s("what"); //~ ERROR mismatched types +LL | let ans = s("what"); | ^^^^^^ expected isize, found reference | = note: expected type `isize` diff --git a/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr b/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr index a9b637c81a7..6475cce5aa6 100644 --- a/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr +++ b/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/trait-bounds-cant-coerce.rs:13:7 | -LL | a(x); //~ ERROR mismatched types [E0308] +LL | a(x); | ^ expected trait `Foo + std::marker::Send`, found trait `Foo` | = note: expected type `std::boxed::Box<(dyn Foo + std::marker::Send + 'static)>` diff --git a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr b/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr index 4e54b35029a..8ea3567b948 100644 --- a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr +++ b/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr @@ -4,7 +4,7 @@ error[E0053]: method `foo` has an incompatible type for trait LL | fn foo(x: u16); | --- type in trait ... -LL | fn foo(x: i16) { } //~ ERROR incompatible type +LL | fn foo(x: i16) { } | ^^^ expected u16, found i16 | = note: expected type `fn(u16)` @@ -16,14 +16,14 @@ error[E0053]: method `bar` has an incompatible type for trait LL | fn bar(&mut self, bar: &mut Bar); | -------- type in trait ... -LL | fn bar(&mut self, bar: &Bar) { } //~ ERROR incompatible type +LL | fn bar(&mut self, bar: &Bar) { } | ^^^^ types differ in mutability | = note: expected type `fn(&mut Bar, &mut Bar)` found type `fn(&mut Bar, &Bar)` help: consider change the type to match the mutability in trait | -LL | fn bar(&mut self, bar: &mut Bar) { } //~ ERROR incompatible type +LL | fn bar(&mut self, bar: &mut Bar) { } | ^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr b/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr index 8db81a8c683..ad0eefa27a1 100644 --- a/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr +++ b/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr @@ -3,7 +3,7 @@ error[E0631]: type mismatch in closure arguments | LL | let f = to_fn_mut(|x: usize, y: isize| -> isize { (x as isize) + y }); | ----------------------------- found signature of `fn(usize, isize) -> _` -LL | //~^ NOTE found signature of `fn(usize, isize) -> _` +LL | LL | let z = call_it(3, f); | ^^^^^^^ expected signature of `fn(isize, isize) -> _` | diff --git a/src/test/ui/missing/missing-block-hint.stderr b/src/test/ui/missing/missing-block-hint.stderr index 576a6268a99..ee86a3241e8 100644 --- a/src/test/ui/missing/missing-block-hint.stderr +++ b/src/test/ui/missing/missing-block-hint.stderr @@ -1,7 +1,7 @@ error: expected `{`, found `=>` --> $DIR/missing-block-hint.rs:3:18 | -LL | if (foo) => {} //~ ERROR expected `{`, found `=>` +LL | if (foo) => {} | -- ^^ expected `{` | | | this `if` statement has a condition, but no block @@ -11,7 +11,7 @@ error: expected `{`, found `bar` | LL | if (foo) | -- this `if` statement has a condition, but no block -LL | bar; //~ ERROR expected `{`, found `bar` +LL | bar; | ^^^- | | | expected `{` diff --git a/src/test/ui/missing/missing-derivable-attr.stderr b/src/test/ui/missing/missing-derivable-attr.stderr index e3e61bcb391..9b8c0c583a1 100644 --- a/src/test/ui/missing/missing-derivable-attr.stderr +++ b/src/test/ui/missing/missing-derivable-attr.stderr @@ -4,7 +4,7 @@ error[E0046]: not all trait items implemented, missing: `eq` LL | fn eq(&self, other: &Self) -> bool; | ----------------------------------- `eq` from trait ... -LL | impl MyEq for A {} //~ ERROR not all trait items implemented, missing: `eq` +LL | impl MyEq for A {} | ^^^^^^^^^^^^^^^ missing `eq` in implementation error: aborting due to previous error diff --git a/src/test/ui/missing/missing-items/issue-40221.stderr b/src/test/ui/missing/missing-items/issue-40221.stderr index 9e4ce7c81b7..8e5286f2100 100644 --- a/src/test/ui/missing/missing-items/issue-40221.stderr +++ b/src/test/ui/missing/missing-items/issue-40221.stderr @@ -7,7 +7,7 @@ LL | | C(PC), LL | | } | |_- `P` defined here ... -LL | match proto { //~ ERROR non-exhaustive patterns +LL | match proto { | ^^^^^ pattern `C(QA)` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/missing/missing-items/m2.stderr b/src/test/ui/missing/missing-items/m2.stderr index b2245750518..d2dac4ca645 100644 --- a/src/test/ui/missing/missing-items/m2.stderr +++ b/src/test/ui/missing/missing-items/m2.stderr @@ -1,7 +1,7 @@ error[E0046]: not all trait items implemented, missing: `CONSTANT`, `Type`, `method` --> $DIR/m2.rs:9:1 | -LL | impl m1::X for X { //~ ERROR not all trait items implemented +LL | impl m1::X for X { | ^^^^^^^^^^^^^^^^ missing `CONSTANT`, `Type`, `method` in implementation | = note: `CONSTANT` from trait: `const CONSTANT: u32;` diff --git a/src/test/ui/missing/missing-items/missing-type-parameter.stderr b/src/test/ui/missing/missing-items/missing-type-parameter.stderr index 619377198e1..dbb467d60f9 100644 --- a/src/test/ui/missing/missing-items/missing-type-parameter.stderr +++ b/src/test/ui/missing/missing-items/missing-type-parameter.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/missing-type-parameter.rs:4:5 | -LL | foo(); //~ ERROR type annotations needed +LL | foo(); | ^^^ cannot infer type for `X` error: aborting due to previous error diff --git a/src/test/ui/missing/missing-semicolon-warning.stderr b/src/test/ui/missing/missing-semicolon-warning.stderr index 50627c3252d..b3f3ebc855d 100644 --- a/src/test/ui/missing/missing-semicolon-warning.stderr +++ b/src/test/ui/missing/missing-semicolon-warning.stderr @@ -1,7 +1,7 @@ warning: expected `;`, found keyword `let` --> $DIR/missing-semicolon-warning.rs:6:12 | -LL | $( let x = $e1 )*; //~ WARN expected `;` +LL | $( let x = $e1 )*; | ^^^ ... LL | fn main() { m!(0, 0; 0, 0); } @@ -12,7 +12,7 @@ LL | fn main() { m!(0, 0; 0, 0); } warning: expected `;`, found `println` --> $DIR/missing-semicolon-warning.rs:7:12 | -LL | $( println!("{}", $e2) )*; //~ WARN expected `;` +LL | $( println!("{}", $e2) )*; | ^^^^^^^ ... LL | fn main() { m!(0, 0; 0, 0); } diff --git a/src/test/ui/missing/missing-stability.stderr b/src/test/ui/missing/missing-stability.stderr index 6c81f2bac57..659f8c78cae 100644 --- a/src/test/ui/missing/missing-stability.stderr +++ b/src/test/ui/missing/missing-stability.stderr @@ -2,7 +2,7 @@ error: function has missing stability attribute --> $DIR/missing-stability.rs:8:1 | LL | / pub fn unmarked() { -LL | | //~^ ERROR function has missing stability attribute +LL | | LL | | () LL | | } | |_^ diff --git a/src/test/ui/missing_debug_impls.stderr b/src/test/ui/missing_debug_impls.stderr index cceab4b4c0b..bb8390a8f31 100644 --- a/src/test/ui/missing_debug_impls.stderr +++ b/src/test/ui/missing_debug_impls.stderr @@ -1,7 +1,7 @@ error: type does not implement `fmt::Debug`; consider adding #[derive(Debug)] or a manual implementation --> $DIR/missing_debug_impls.rs:7:1 | -LL | pub enum A {} //~ ERROR type does not implement `fmt::Debug` +LL | pub enum A {} | ^^^^^^^^^^^^^ | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![deny(missing_debug_implementations)] error: type does not implement `fmt::Debug`; consider adding #[derive(Debug)] or a manual implementation --> $DIR/missing_debug_impls.rs:20:1 | -LL | pub struct Foo; //~ ERROR type does not implement `fmt::Debug` +LL | pub struct Foo; | ^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/mod/mod_file_disambig.stderr b/src/test/ui/mod/mod_file_disambig.stderr index 1720ca420ca..2b77d866fb3 100644 --- a/src/test/ui/mod/mod_file_disambig.stderr +++ b/src/test/ui/mod/mod_file_disambig.stderr @@ -1,7 +1,7 @@ error[E0584]: file for module `mod_file_disambig_aux` found at both mod_file_disambig_aux.rs and mod_file_disambig_aux/mod.rs --> $DIR/mod_file_disambig.rs:1:5 | -LL | mod mod_file_disambig_aux; //~ ERROR file for module `mod_file_disambig_aux` found at both +LL | mod mod_file_disambig_aux; | ^^^^^^^^^^^^^^^^^^^^^ | = help: delete or rename one of them to remove the ambiguity diff --git a/src/test/ui/module-macro_use-arguments.stderr b/src/test/ui/module-macro_use-arguments.stderr index 4dc6df39a47..2a75736a2c6 100644 --- a/src/test/ui/module-macro_use-arguments.stderr +++ b/src/test/ui/module-macro_use-arguments.stderr @@ -1,7 +1,7 @@ error: arguments to macro_use are not allowed here --> $DIR/module-macro_use-arguments.rs:1:1 | -LL | #[macro_use(foo, bar)] //~ ERROR arguments to macro_use are not allowed here +LL | #[macro_use(foo, bar)] | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/moves/move-guard-same-consts.stderr b/src/test/ui/moves/move-guard-same-consts.stderr index 78a76a47b8a..65f6f1239fe 100644 --- a/src/test/ui/moves/move-guard-same-consts.stderr +++ b/src/test/ui/moves/move-guard-same-consts.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `x` | LL | (1, 2) if take(x) => (), | - value moved here -LL | (1, 2) if take(x) => (), //~ ERROR use of moved value: `x` +LL | (1, 2) if take(x) => (), | ^ value used here after move | = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait diff --git a/src/test/ui/moves/move-in-guard-1.stderr b/src/test/ui/moves/move-in-guard-1.stderr index d4cb538e05d..af49fa82b0f 100644 --- a/src/test/ui/moves/move-in-guard-1.stderr +++ b/src/test/ui/moves/move-in-guard-1.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `x` | LL | (1, _) if take(x) => (), | - value moved here -LL | (_, 2) if take(x) => (), //~ ERROR use of moved value: `x` +LL | (_, 2) if take(x) => (), | ^ value used here after move | = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait diff --git a/src/test/ui/moves/move-in-guard-2.stderr b/src/test/ui/moves/move-in-guard-2.stderr index d4e747c9f61..5228abe86ef 100644 --- a/src/test/ui/moves/move-in-guard-2.stderr +++ b/src/test/ui/moves/move-in-guard-2.stderr @@ -1,7 +1,7 @@ error[E0382]: use of moved value: `x` --> $DIR/move-in-guard-2.rs:10:24 | -LL | (_, 2) if take(x) => (), //~ ERROR use of moved value: `x` +LL | (_, 2) if take(x) => (), | ^ value moved here in previous iteration of loop | = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait diff --git a/src/test/ui/moves/move-into-dead-array-1.stderr b/src/test/ui/moves/move-into-dead-array-1.stderr index 36f98a76b54..3a1bbe97d28 100644 --- a/src/test/ui/moves/move-into-dead-array-1.stderr +++ b/src/test/ui/moves/move-into-dead-array-1.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `a` --> $DIR/move-into-dead-array-1.rs:14:5 | -LL | a[i] = d(); //~ ERROR use of possibly uninitialized variable: `a` +LL | a[i] = d(); | ^^^^^^^^^^ use of possibly uninitialized `a` error: aborting due to previous error diff --git a/src/test/ui/moves/move-into-dead-array-2.stderr b/src/test/ui/moves/move-into-dead-array-2.stderr index 417b1ab2054..4521fa9bcb0 100644 --- a/src/test/ui/moves/move-into-dead-array-2.stderr +++ b/src/test/ui/moves/move-into-dead-array-2.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `a` | LL | drop(a); | - value moved here -LL | a[i] = d(); //~ ERROR use of moved value: `a` +LL | a[i] = d(); | ^^^^^^^^^^ value used here after move | = note: move occurs because `a` has type `[D; 4]`, which does not implement the `Copy` trait diff --git a/src/test/ui/moves/move-out-of-array-1.stderr b/src/test/ui/moves/move-out-of-array-1.stderr index 677f0b42f5a..fb191b89bda 100644 --- a/src/test/ui/moves/move-out-of-array-1.stderr +++ b/src/test/ui/moves/move-out-of-array-1.stderr @@ -1,7 +1,7 @@ error[E0508]: cannot move out of type `[D; 4]`, a non-copy array --> $DIR/move-out-of-array-1.rs:17:5 | -LL | a[i] //~ ERROR cannot move out of type `[D; 4]`, a non-copy array +LL | a[i] | ^^^^ cannot move out of here error: aborting due to previous error diff --git a/src/test/ui/moves/move-out-of-slice-1.stderr b/src/test/ui/moves/move-out-of-slice-1.stderr index bfdf6419869..f84e3a3f3e3 100644 --- a/src/test/ui/moves/move-out-of-slice-1.stderr +++ b/src/test/ui/moves/move-out-of-slice-1.stderr @@ -1,7 +1,7 @@ error[E0508]: cannot move out of type `[A]`, a non-copy slice --> $DIR/move-out-of-slice-1.rs:8:13 | -LL | box [a] => {}, //~ ERROR cannot move out of type `[A]`, a non-copy slice +LL | box [a] => {}, | ^-^ | || | |hint: to prevent move, use `ref a` or `ref mut a` diff --git a/src/test/ui/moves/move-out-of-tuple-field.stderr b/src/test/ui/moves/move-out-of-tuple-field.stderr index 6839c49c829..89662c8303d 100644 --- a/src/test/ui/moves/move-out-of-tuple-field.stderr +++ b/src/test/ui/moves/move-out-of-tuple-field.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `x.0` | LL | let y = x.0; | - value moved here -LL | let z = x.0; //~ ERROR use of moved value: `x.0` +LL | let z = x.0; | ^ value used here after move | = note: move occurs because `x.0` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -13,7 +13,7 @@ error[E0382]: use of moved value: `x.0` | LL | let y = x.0; | - value moved here -LL | let z = x.0; //~ ERROR use of moved value: `x.0` +LL | let z = x.0; | ^ value used here after move | = note: move occurs because `x.0` has type `std::boxed::Box`, which does not implement the `Copy` trait diff --git a/src/test/ui/moves/moves-based-on-type-access-to-field.stderr b/src/test/ui/moves/moves-based-on-type-access-to-field.stderr index 882c1fe1706..ed4d69f838e 100644 --- a/src/test/ui/moves/moves-based-on-type-access-to-field.stderr +++ b/src/test/ui/moves/moves-based-on-type-access-to-field.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `x` | LL | consume(x.into_iter().next().unwrap()); | - value moved here -LL | touch(&x[0]); //~ ERROR use of moved value: `x` +LL | touch(&x[0]); | ^ value used here after move | = note: move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait diff --git a/src/test/ui/moves/moves-based-on-type-block-bad.stderr b/src/test/ui/moves/moves-based-on-type-block-bad.stderr index 4ecaed3b69b..f5328edfcc2 100644 --- a/src/test/ui/moves/moves-based-on-type-block-bad.stderr +++ b/src/test/ui/moves/moves-based-on-type-block-bad.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of borrowed content --> $DIR/moves-based-on-type-block-bad.rs:24:19 | -LL | match hellothere.x { //~ ERROR cannot move out +LL | match hellothere.x { | ^^^^^^^^^^ cannot move out of borrowed content ... LL | box E::Bar(x) => println!("{}", x.to_string()), diff --git a/src/test/ui/moves/moves-based-on-type-capture-clause-bad.stderr b/src/test/ui/moves/moves-based-on-type-capture-clause-bad.stderr index 88e58fdf58b..39119ff3aaa 100644 --- a/src/test/ui/moves/moves-based-on-type-capture-clause-bad.stderr +++ b/src/test/ui/moves/moves-based-on-type-capture-clause-bad.stderr @@ -4,7 +4,7 @@ error[E0382]: use of moved value: `x` LL | thread::spawn(move|| { | ------ value moved (into closure) here ... -LL | println!("{}", x); //~ ERROR use of moved value +LL | println!("{}", x); | ^ value used here after move | = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait diff --git a/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr b/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr index 7624ba5fe28..8b904c7169b 100644 --- a/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr +++ b/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr @@ -4,7 +4,7 @@ error[E0382]: use of partially moved value: `node` LL | Some(right) => consume(right), | ----- value moved here ... -LL | consume(node) + r //~ ERROR use of partially moved value: `node` +LL | consume(node) + r | ^^^^ value used here after move | = note: move occurs because the value has type `std::boxed::Box`, which does not implement the `Copy` trait diff --git a/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.stderr b/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.stderr index 374ac61e7f5..edf521a896f 100644 --- a/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.stderr +++ b/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.stderr @@ -3,8 +3,8 @@ error[E0382]: use of moved value: `x` | LL | let _y = Foo { f:x }; | - value moved here -LL | //~^ NOTE value moved here -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | +LL | touch(&x); | ^ value used here after move | = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait @@ -14,8 +14,8 @@ error[E0382]: use of moved value: `x` | LL | let _y = Foo { f:(((x))) }; | ------- value moved here -LL | //~^ NOTE value moved here -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | +LL | touch(&x); | ^ value used here after move | = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait diff --git a/src/test/ui/moves/moves-based-on-type-exprs.stderr b/src/test/ui/moves/moves-based-on-type-exprs.stderr index e6177c6b6c8..6cb297cbd63 100644 --- a/src/test/ui/moves/moves-based-on-type-exprs.stderr +++ b/src/test/ui/moves/moves-based-on-type-exprs.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `x` | LL | let _y = Foo { f:x }; | - value moved here -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | touch(&x); | ^ value used here after move | = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait @@ -13,7 +13,7 @@ error[E0382]: use of moved value: `x` | LL | let _y = (x, 3); | - value moved here -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | touch(&x); | ^ value used here after move | = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait @@ -24,7 +24,7 @@ error[E0382]: use of moved value: `x` LL | x | - value moved here ... -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | touch(&x); | ^ value used here after move | = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait @@ -35,7 +35,7 @@ error[E0382]: use of moved value: `y` LL | y | - value moved here ... -LL | touch(&y); //~ ERROR use of moved value: `y` +LL | touch(&y); | ^ value used here after move | = note: move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait @@ -46,7 +46,7 @@ error[E0382]: use of moved value: `x` LL | true => x, | - value moved here ... -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | touch(&x); | ^ value used here after move | = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait @@ -57,7 +57,7 @@ error[E0382]: use of moved value: `y` LL | false => y | - value moved here ... -LL | touch(&y); //~ ERROR use of moved value: `y` +LL | touch(&y); | ^ value used here after move | = note: move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait @@ -68,7 +68,7 @@ error[E0382]: use of moved value: `x` LL | _ if guard(x) => 10, | - value moved here ... -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | touch(&x); | ^ value used here after move | = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait @@ -78,7 +78,7 @@ error[E0382]: use of moved value: `x` | LL | let _y = [x]; | - value moved here -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | touch(&x); | ^ value used here after move | = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait @@ -88,7 +88,7 @@ error[E0382]: use of moved value: `x` | LL | let _y = vec![x]; | - value moved here -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | touch(&x); | ^ value used here after move | = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait @@ -98,7 +98,7 @@ error[E0382]: use of moved value: `x` | LL | let _y = x.into_iter().next().unwrap(); | - value moved here -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | touch(&x); | ^ value used here after move | = note: move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait @@ -108,7 +108,7 @@ error[E0382]: use of moved value: `x` | LL | let _y = [x.into_iter().next().unwrap(); 1]; | - value moved here -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | touch(&x); | ^ value used here after move | = note: move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait diff --git a/src/test/ui/moves/moves-based-on-type-match-bindings.stderr b/src/test/ui/moves/moves-based-on-type-match-bindings.stderr index 41ced9dfd93..9174cfa122c 100644 --- a/src/test/ui/moves/moves-based-on-type-match-bindings.stderr +++ b/src/test/ui/moves/moves-based-on-type-match-bindings.stderr @@ -4,7 +4,7 @@ error[E0382]: use of partially moved value: `x` LL | Foo {f} => {} | - value moved here ... -LL | touch(&x); //~ ERROR use of partially moved value: `x` +LL | touch(&x); | ^ value used here after move | = note: move occurs because `x.f` has type `std::string::String`, which does not implement the `Copy` trait diff --git a/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr b/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr index 49113a57d2f..654881d25e6 100644 --- a/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr +++ b/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr @@ -3,7 +3,7 @@ error[E0507]: cannot move out of captured outer variable in an `Fn` closure | LL | let i = box 3; | - captured outer variable -LL | let _f = to_fn(|| test(i)); //~ ERROR cannot move out +LL | let _f = to_fn(|| test(i)); | ^ cannot move out of captured outer variable in an `Fn` closure error: aborting due to previous error diff --git a/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr b/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr index 05ced7f0107..fe91a488d10 100644 --- a/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr +++ b/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr @@ -12,7 +12,7 @@ error[E0382]: use of moved value: `f` | LL | let mut r = R {c: Box::new(f)}; | - value moved here -LL | f(&mut r, false) //~ ERROR use of moved value +LL | f(&mut r, false) | ^ value used here after move | = note: move occurs because `f` has type `F`, which does not implement the `Copy` trait diff --git a/src/test/ui/moves/moves-sru-moved-field.stderr b/src/test/ui/moves/moves-sru-moved-field.stderr index 3d38faa20a1..aac399ea4a1 100644 --- a/src/test/ui/moves/moves-sru-moved-field.stderr +++ b/src/test/ui/moves/moves-sru-moved-field.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `f.moved` | LL | let _b = Foo {noncopyable: g, ..f}; | - value moved here -LL | let _c = Foo {noncopyable: h, ..f}; //~ ERROR use of moved value: `f.moved` +LL | let _c = Foo {noncopyable: h, ..f}; | ^ value used here after move | = note: move occurs because `f.moved` has type `std::boxed::Box`, which does not implement the `Copy` trait diff --git a/src/test/ui/multiple-main-2.stderr b/src/test/ui/multiple-main-2.stderr index c761e74bb87..ae33e01cd26 100644 --- a/src/test/ui/multiple-main-2.stderr +++ b/src/test/ui/multiple-main-2.stderr @@ -5,7 +5,7 @@ LL | / fn bar() { LL | | } | |_- first #[main] function ... -LL | / fn foo() { //~ ERROR multiple functions with a #[main] attribute +LL | / fn foo() { LL | | } | |_^ additional #[main] function diff --git a/src/test/ui/multiple-main-3.stderr b/src/test/ui/multiple-main-3.stderr index 2574f0ef6d8..b85637b8a56 100644 --- a/src/test/ui/multiple-main-3.stderr +++ b/src/test/ui/multiple-main-3.stderr @@ -5,7 +5,7 @@ LL | / fn main1() { LL | | } | |_- first #[main] function ... -LL | / fn main2() { //~ ERROR multiple functions with a #[main] attribute +LL | / fn main2() { LL | | } | |_____^ additional #[main] function diff --git a/src/test/ui/mut/mut-cant-alias.stderr b/src/test/ui/mut/mut-cant-alias.stderr index ce942677bed..5fc194bc3db 100644 --- a/src/test/ui/mut/mut-cant-alias.stderr +++ b/src/test/ui/mut/mut-cant-alias.stderr @@ -3,7 +3,7 @@ error[E0499]: cannot borrow `b` as mutable more than once at a time | LL | let b1 = &mut *b; | - first mutable borrow occurs here -LL | let b2 = &mut *b; //~ ERROR cannot borrow +LL | let b2 = &mut *b; | ^ second mutable borrow occurs here LL | b1.use_mut(); LL | } diff --git a/src/test/ui/mut/mut-cross-borrowing.stderr b/src/test/ui/mut/mut-cross-borrowing.stderr index 8708a135360..e2eea195daf 100644 --- a/src/test/ui/mut/mut-cross-borrowing.stderr +++ b/src/test/ui/mut/mut-cross-borrowing.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/mut-cross-borrowing.rs:7:7 | -LL | f(x) //~ ERROR mismatched types +LL | f(x) | ^ | | | expected &mut isize, found struct `std::boxed::Box` diff --git a/src/test/ui/mut/mut-pattern-mismatched.stderr b/src/test/ui/mut/mut-pattern-mismatched.stderr index d50a1a8f273..d1adc991519 100644 --- a/src/test/ui/mut/mut-pattern-mismatched.stderr +++ b/src/test/ui/mut/mut-pattern-mismatched.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/mut-pattern-mismatched.rs:6:10 | -LL | let &_ //~ ERROR mismatched types +LL | let &_ | ^^ types differ in mutability | = note: expected type `&mut {integer}` @@ -10,7 +10,7 @@ LL | let &_ //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/mut-pattern-mismatched.rs:15:9 | -LL | let &mut _ //~ ERROR mismatched types +LL | let &mut _ | ^^^^^^ types differ in mutability | = note: expected type `&{integer}` diff --git a/src/test/ui/mut/mut-ref.stderr b/src/test/ui/mut/mut-ref.stderr index 339da7f8a02..e6d4901aafb 100644 --- a/src/test/ui/mut/mut-ref.stderr +++ b/src/test/ui/mut/mut-ref.stderr @@ -1,7 +1,7 @@ error: the order of `mut` and `ref` is incorrect --> $DIR/mut-ref.rs:2:9 | -LL | let mut ref x = 10; //~ ERROR the order of `mut` and `ref` is incorrect +LL | let mut ref x = 10; | ^^^^^^^ help: try switching the order: `ref mut` error: aborting due to previous error diff --git a/src/test/ui/mut/mutable-class-fields-2.stderr b/src/test/ui/mut/mutable-class-fields-2.stderr index daeee1117bc..b0dea3082dd 100644 --- a/src/test/ui/mut/mutable-class-fields-2.stderr +++ b/src/test/ui/mut/mutable-class-fields-2.stderr @@ -3,7 +3,7 @@ error[E0594]: cannot assign to field `self.how_hungry` of immutable binding | LL | pub fn eat(&self) { | ----- use `&mut self` here to make mutable -LL | self.how_hungry -= 5; //~ ERROR cannot assign +LL | self.how_hungry -= 5; | ^^^^^^^^^^^^^^^^^^^^ cannot mutably borrow field of immutable binding error: aborting due to previous error diff --git a/src/test/ui/namespace/namespace-mix.stderr b/src/test/ui/namespace/namespace-mix.stderr index 5ebb40e75b3..22c871dd3c0 100644 --- a/src/test/ui/namespace/namespace-mix.stderr +++ b/src/test/ui/namespace/namespace-mix.stderr @@ -1,13 +1,13 @@ error[E0423]: expected value, found type alias `m1::S` --> $DIR/namespace-mix.rs:34:11 | -LL | check(m1::S); //~ ERROR expected value, found type alias `m1::S` +LL | check(m1::S); | ^^^^^ | = note: can't use a type alias as a constructor help: a tuple struct with a similar name exists | -LL | check(m1::TS); //~ ERROR expected value, found type alias `m1::S` +LL | check(m1::TS); | ^^ help: possible better candidates are found in other modules, you can import them into scope | @@ -19,13 +19,13 @@ LL | use namespace_mix::xm2::S; error[E0423]: expected value, found type alias `xm1::S` --> $DIR/namespace-mix.rs:40:11 | -LL | check(xm1::S); //~ ERROR expected value, found type alias `xm1::S` +LL | check(xm1::S); | ^^^^^^ | = note: can't use a type alias as a constructor help: a tuple struct with a similar name exists | -LL | check(xm1::TS); //~ ERROR expected value, found type alias `xm1::S` +LL | check(xm1::TS); | ^^ help: possible better candidates are found in other modules, you can import them into scope | @@ -37,11 +37,11 @@ LL | use namespace_mix::xm2::S; error[E0423]: expected value, found struct variant `m7::V` --> $DIR/namespace-mix.rs:100:11 | -LL | check(m7::V); //~ ERROR expected value, found struct variant `m7::V` +LL | check(m7::V); | ^^^^^ did you mean `m7::V { /* fields */ }`? help: a tuple variant with a similar name exists | -LL | check(m7::TV); //~ ERROR expected value, found struct variant `m7::V` +LL | check(m7::TV); | ^^ help: possible better candidates are found in other modules, you can import them into scope | @@ -53,11 +53,11 @@ LL | use namespace_mix::xm8::V; error[E0423]: expected value, found struct variant `xm7::V` --> $DIR/namespace-mix.rs:106:11 | -LL | check(xm7::V); //~ ERROR expected value, found struct variant `xm7::V` +LL | check(xm7::V); | ^^^^^^ did you mean `xm7::V { /* fields */ }`? help: a tuple variant with a similar name exists | -LL | check(xm7::TV); //~ ERROR expected value, found struct variant `xm7::V` +LL | check(xm7::TV); | ^^ help: possible better candidates are found in other modules, you can import them into scope | @@ -69,7 +69,7 @@ LL | use namespace_mix::xm8::V; error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:33:5 | -LL | check(m1::S{}); //~ ERROR c::Item +LL | check(m1::S{}); | ^^^^^ the trait `Impossible` is not implemented for `c::Item` | note: required by `check` @@ -81,7 +81,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::S: Impossible` is not satisfied --> $DIR/namespace-mix.rs:35:5 | -LL | check(m2::S{}); //~ ERROR c::S +LL | check(m2::S{}); | ^^^^^ the trait `Impossible` is not implemented for `c::S` | note: required by `check` @@ -93,7 +93,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:36:5 | -LL | check(m2::S); //~ ERROR c::Item +LL | check(m2::S); | ^^^^^ the trait `Impossible` is not implemented for `c::Item` | note: required by `check` @@ -105,7 +105,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:39:5 | -LL | check(xm1::S{}); //~ ERROR c::Item +LL | check(xm1::S{}); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | note: required by `check` @@ -117,7 +117,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::S: Impossible` is not satisfied --> $DIR/namespace-mix.rs:41:5 | -LL | check(xm2::S{}); //~ ERROR c::S +LL | check(xm2::S{}); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::S` | note: required by `check` @@ -129,7 +129,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:42:5 | -LL | check(xm2::S); //~ ERROR c::Item +LL | check(xm2::S); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | note: required by `check` @@ -141,7 +141,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:55:5 | -LL | check(m3::TS{}); //~ ERROR c::Item +LL | check(m3::TS{}); | ^^^^^ the trait `Impossible` is not implemented for `c::Item` | note: required by `check` @@ -153,7 +153,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `fn() -> c::TS {c::TS}: Impossible` is not satisfied --> $DIR/namespace-mix.rs:56:5 | -LL | check(m3::TS); //~ ERROR c::TS +LL | check(m3::TS); | ^^^^^ the trait `Impossible` is not implemented for `fn() -> c::TS {c::TS}` | note: required by `check` @@ -165,7 +165,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::TS: Impossible` is not satisfied --> $DIR/namespace-mix.rs:57:5 | -LL | check(m4::TS{}); //~ ERROR c::TS +LL | check(m4::TS{}); | ^^^^^ the trait `Impossible` is not implemented for `c::TS` | note: required by `check` @@ -177,7 +177,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:58:5 | -LL | check(m4::TS); //~ ERROR c::Item +LL | check(m4::TS); | ^^^^^ the trait `Impossible` is not implemented for `c::Item` | note: required by `check` @@ -189,7 +189,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:61:5 | -LL | check(xm3::TS{}); //~ ERROR c::Item +LL | check(xm3::TS{}); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | note: required by `check` @@ -201,7 +201,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `fn() -> namespace_mix::c::TS {namespace_mix::c::TS}: Impossible` is not satisfied --> $DIR/namespace-mix.rs:62:5 | -LL | check(xm3::TS); //~ ERROR c::TS +LL | check(xm3::TS); | ^^^^^ the trait `Impossible` is not implemented for `fn() -> namespace_mix::c::TS {namespace_mix::c::TS}` | note: required by `check` @@ -213,7 +213,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::TS: Impossible` is not satisfied --> $DIR/namespace-mix.rs:63:5 | -LL | check(xm4::TS{}); //~ ERROR c::TS +LL | check(xm4::TS{}); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::TS` | note: required by `check` @@ -225,7 +225,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:64:5 | -LL | check(xm4::TS); //~ ERROR c::Item +LL | check(xm4::TS); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | note: required by `check` @@ -237,7 +237,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:77:5 | -LL | check(m5::US{}); //~ ERROR c::Item +LL | check(m5::US{}); | ^^^^^ the trait `Impossible` is not implemented for `c::Item` | note: required by `check` @@ -249,7 +249,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::US: Impossible` is not satisfied --> $DIR/namespace-mix.rs:78:5 | -LL | check(m5::US); //~ ERROR c::US +LL | check(m5::US); | ^^^^^ the trait `Impossible` is not implemented for `c::US` | note: required by `check` @@ -261,7 +261,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::US: Impossible` is not satisfied --> $DIR/namespace-mix.rs:79:5 | -LL | check(m6::US{}); //~ ERROR c::US +LL | check(m6::US{}); | ^^^^^ the trait `Impossible` is not implemented for `c::US` | note: required by `check` @@ -273,7 +273,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:80:5 | -LL | check(m6::US); //~ ERROR c::Item +LL | check(m6::US); | ^^^^^ the trait `Impossible` is not implemented for `c::Item` | note: required by `check` @@ -285,7 +285,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:83:5 | -LL | check(xm5::US{}); //~ ERROR c::Item +LL | check(xm5::US{}); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | note: required by `check` @@ -297,7 +297,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::US: Impossible` is not satisfied --> $DIR/namespace-mix.rs:84:5 | -LL | check(xm5::US); //~ ERROR c::US +LL | check(xm5::US); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::US` | note: required by `check` @@ -309,7 +309,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::US: Impossible` is not satisfied --> $DIR/namespace-mix.rs:85:5 | -LL | check(xm6::US{}); //~ ERROR c::US +LL | check(xm6::US{}); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::US` | note: required by `check` @@ -321,7 +321,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:86:5 | -LL | check(xm6::US); //~ ERROR c::Item +LL | check(xm6::US); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | note: required by `check` @@ -333,7 +333,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:99:5 | -LL | check(m7::V{}); //~ ERROR c::Item +LL | check(m7::V{}); | ^^^^^ the trait `Impossible` is not implemented for `c::Item` | note: required by `check` @@ -345,7 +345,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::E: Impossible` is not satisfied --> $DIR/namespace-mix.rs:101:5 | -LL | check(m8::V{}); //~ ERROR c::E +LL | check(m8::V{}); | ^^^^^ the trait `Impossible` is not implemented for `c::E` | note: required by `check` @@ -357,7 +357,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:102:5 | -LL | check(m8::V); //~ ERROR c::Item +LL | check(m8::V); | ^^^^^ the trait `Impossible` is not implemented for `c::Item` | note: required by `check` @@ -369,7 +369,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:105:5 | -LL | check(xm7::V{}); //~ ERROR c::Item +LL | check(xm7::V{}); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | note: required by `check` @@ -381,7 +381,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied --> $DIR/namespace-mix.rs:107:5 | -LL | check(xm8::V{}); //~ ERROR c::E +LL | check(xm8::V{}); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E` | note: required by `check` @@ -393,7 +393,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:108:5 | -LL | check(xm8::V); //~ ERROR c::Item +LL | check(xm8::V); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | note: required by `check` @@ -405,7 +405,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:121:5 | -LL | check(m9::TV{}); //~ ERROR c::Item +LL | check(m9::TV{}); | ^^^^^ the trait `Impossible` is not implemented for `c::Item` | note: required by `check` @@ -417,7 +417,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `fn() -> c::E {c::E::TV}: Impossible` is not satisfied --> $DIR/namespace-mix.rs:122:5 | -LL | check(m9::TV); //~ ERROR c::E +LL | check(m9::TV); | ^^^^^ the trait `Impossible` is not implemented for `fn() -> c::E {c::E::TV}` | note: required by `check` @@ -429,7 +429,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::E: Impossible` is not satisfied --> $DIR/namespace-mix.rs:123:5 | -LL | check(mA::TV{}); //~ ERROR c::E +LL | check(mA::TV{}); | ^^^^^ the trait `Impossible` is not implemented for `c::E` | note: required by `check` @@ -441,7 +441,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:124:5 | -LL | check(mA::TV); //~ ERROR c::Item +LL | check(mA::TV); | ^^^^^ the trait `Impossible` is not implemented for `c::Item` | note: required by `check` @@ -453,7 +453,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:127:5 | -LL | check(xm9::TV{}); //~ ERROR c::Item +LL | check(xm9::TV{}); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | note: required by `check` @@ -465,7 +465,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `fn() -> namespace_mix::c::E {namespace_mix::c::E::TV}: Impossible` is not satisfied --> $DIR/namespace-mix.rs:128:5 | -LL | check(xm9::TV); //~ ERROR c::E +LL | check(xm9::TV); | ^^^^^ the trait `Impossible` is not implemented for `fn() -> namespace_mix::c::E {namespace_mix::c::E::TV}` | note: required by `check` @@ -477,7 +477,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied --> $DIR/namespace-mix.rs:129:5 | -LL | check(xmA::TV{}); //~ ERROR c::E +LL | check(xmA::TV{}); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E` | note: required by `check` @@ -489,7 +489,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:130:5 | -LL | check(xmA::TV); //~ ERROR c::Item +LL | check(xmA::TV); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | note: required by `check` @@ -501,7 +501,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:143:5 | -LL | check(mB::UV{}); //~ ERROR c::Item +LL | check(mB::UV{}); | ^^^^^ the trait `Impossible` is not implemented for `c::Item` | note: required by `check` @@ -513,7 +513,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::E: Impossible` is not satisfied --> $DIR/namespace-mix.rs:144:5 | -LL | check(mB::UV); //~ ERROR c::E +LL | check(mB::UV); | ^^^^^ the trait `Impossible` is not implemented for `c::E` | note: required by `check` @@ -525,7 +525,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::E: Impossible` is not satisfied --> $DIR/namespace-mix.rs:145:5 | -LL | check(mC::UV{}); //~ ERROR c::E +LL | check(mC::UV{}); | ^^^^^ the trait `Impossible` is not implemented for `c::E` | note: required by `check` @@ -537,7 +537,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:146:5 | -LL | check(mC::UV); //~ ERROR c::Item +LL | check(mC::UV); | ^^^^^ the trait `Impossible` is not implemented for `c::Item` | note: required by `check` @@ -549,7 +549,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:149:5 | -LL | check(xmB::UV{}); //~ ERROR c::Item +LL | check(xmB::UV{}); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | note: required by `check` @@ -561,7 +561,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied --> $DIR/namespace-mix.rs:150:5 | -LL | check(xmB::UV); //~ ERROR c::E +LL | check(xmB::UV); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E` | note: required by `check` @@ -573,7 +573,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied --> $DIR/namespace-mix.rs:151:5 | -LL | check(xmC::UV{}); //~ ERROR c::E +LL | check(xmC::UV{}); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E` | note: required by `check` @@ -585,7 +585,7 @@ LL | fn check(_: T) {} error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:152:5 | -LL | check(xmC::UV); //~ ERROR c::Item +LL | check(xmC::UV); | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | note: required by `check` diff --git a/src/test/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.stderr b/src/test/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.stderr index 691061f0510..f3dbcc2d7b2 100644 --- a/src/test/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.stderr +++ b/src/test/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.stderr @@ -1,25 +1,25 @@ error[E0425]: cannot find function `foo` in this scope --> $DIR/namespaced-enum-glob-import-no-impls-xcrate.rs:11:5 | -LL | foo(); //~ ERROR cannot find function `foo` in this scope +LL | foo(); | ^^^ not found in this scope error[E0425]: cannot find function `foo` in module `m` --> $DIR/namespaced-enum-glob-import-no-impls-xcrate.rs:12:8 | -LL | m::foo(); //~ ERROR cannot find function `foo` in module `m` +LL | m::foo(); | ^^^ not found in `m` error[E0425]: cannot find function `bar` in this scope --> $DIR/namespaced-enum-glob-import-no-impls-xcrate.rs:13:5 | -LL | bar(); //~ ERROR cannot find function `bar` in this scope +LL | bar(); | ^^^ not found in this scope error[E0425]: cannot find function `bar` in module `m` --> $DIR/namespaced-enum-glob-import-no-impls-xcrate.rs:14:8 | -LL | m::bar(); //~ ERROR cannot find function `bar` in module `m` +LL | m::bar(); | ^^^ not found in `m` error: aborting due to 4 previous errors diff --git a/src/test/ui/namespace/namespaced-enum-glob-import-no-impls.stderr b/src/test/ui/namespace/namespaced-enum-glob-import-no-impls.stderr index f53f299fe4d..98784de8e59 100644 --- a/src/test/ui/namespace/namespaced-enum-glob-import-no-impls.stderr +++ b/src/test/ui/namespace/namespaced-enum-glob-import-no-impls.stderr @@ -1,25 +1,25 @@ error[E0425]: cannot find function `foo` in this scope --> $DIR/namespaced-enum-glob-import-no-impls.rs:21:5 | -LL | foo(); //~ ERROR cannot find function `foo` in this scope +LL | foo(); | ^^^ not found in this scope error[E0425]: cannot find function `foo` in module `m` --> $DIR/namespaced-enum-glob-import-no-impls.rs:22:8 | -LL | m::foo(); //~ ERROR cannot find function `foo` in module `m` +LL | m::foo(); | ^^^ not found in `m` error[E0425]: cannot find function `bar` in this scope --> $DIR/namespaced-enum-glob-import-no-impls.rs:23:5 | -LL | bar(); //~ ERROR cannot find function `bar` in this scope +LL | bar(); | ^^^ not found in this scope error[E0425]: cannot find function `bar` in module `m` --> $DIR/namespaced-enum-glob-import-no-impls.rs:24:8 | -LL | m::bar(); //~ ERROR cannot find function `bar` in module `m` +LL | m::bar(); | ^^^ not found in `m` error: aborting due to 4 previous errors diff --git a/src/test/ui/nested-cfg-attrs.stderr b/src/test/ui/nested-cfg-attrs.stderr index e7cd39114ed..f63888b2f8a 100644 --- a/src/test/ui/nested-cfg-attrs.stderr +++ b/src/test/ui/nested-cfg-attrs.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find function `f` in this scope --> $DIR/nested-cfg-attrs.rs:4:13 | -LL | fn main() { f() } //~ ERROR cannot find function `f` in this scope +LL | fn main() { f() } | ^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/never-assign-dead-code.stderr b/src/test/ui/never-assign-dead-code.stderr index bcc20a0d703..6735310da8b 100644 --- a/src/test/ui/never-assign-dead-code.stderr +++ b/src/test/ui/never-assign-dead-code.stderr @@ -1,7 +1,7 @@ warning: unreachable statement --> $DIR/never-assign-dead-code.rs:10:5 | -LL | drop(x); //~ WARN unreachable +LL | drop(x); | ^^^^^^^^ | note: lint level defined here @@ -14,13 +14,13 @@ LL | #![warn(unused)] warning: unreachable expression --> $DIR/never-assign-dead-code.rs:10:5 | -LL | drop(x); //~ WARN unreachable +LL | drop(x); | ^^^^^^^ warning: unused variable: `x` --> $DIR/never-assign-dead-code.rs:9:9 | -LL | let x: ! = panic!("aah"); //~ WARN unused +LL | let x: ! = panic!("aah"); | ^ help: consider prefixing with an underscore: `_x` | note: lint level defined here diff --git a/src/test/ui/never-assign-wrong-type.stderr b/src/test/ui/never-assign-wrong-type.stderr index bc61996db99..da2e77d023d 100644 --- a/src/test/ui/never-assign-wrong-type.stderr +++ b/src/test/ui/never-assign-wrong-type.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/never-assign-wrong-type.rs:7:16 | -LL | let x: ! = "hello"; //~ ERROR mismatched types +LL | let x: ! = "hello"; | ^^^^^^^ expected !, found reference | = note: expected type `!` diff --git a/src/test/ui/nll/borrowed-local-error.stderr b/src/test/ui/nll/borrowed-local-error.stderr index 318b62a0fdb..799eec9d342 100644 --- a/src/test/ui/nll/borrowed-local-error.stderr +++ b/src/test/ui/nll/borrowed-local-error.stderr @@ -6,7 +6,7 @@ LL | let x = gimme({ LL | let v = (22,); LL | &v | ^^ borrowed value does not live long enough -LL | //~^ ERROR `v` does not live long enough [E0597] +LL | LL | }); | - `v` dropped here while still borrowed diff --git a/src/test/ui/nll/borrowed-referent-issue-38899.stderr b/src/test/ui/nll/borrowed-referent-issue-38899.stderr index 1b58b21fff0..5c9c48f5b1d 100644 --- a/src/test/ui/nll/borrowed-referent-issue-38899.stderr +++ b/src/test/ui/nll/borrowed-referent-issue-38899.stderr @@ -6,7 +6,7 @@ LL | let x = &mut block; LL | println!("{}", x.current); LL | let p: &'a u8 = &*block.current; | ^^^^^^^^^^^^^^^ immutable borrow occurs here -LL | //~^ ERROR cannot borrow `*block.current` as immutable because it is also borrowed as mutable +LL | LL | drop(x); | - mutable borrow later used here diff --git a/src/test/ui/nll/borrowed-temporary-error.stderr b/src/test/ui/nll/borrowed-temporary-error.stderr index 31d1dfde1ce..c0d42312eb1 100644 --- a/src/test/ui/nll/borrowed-temporary-error.stderr +++ b/src/test/ui/nll/borrowed-temporary-error.stderr @@ -3,7 +3,7 @@ error[E0716]: temporary value dropped while borrowed | LL | &(v,) | ^^^^ creates a temporary which is freed while still in use -LL | //~^ ERROR temporary value dropped while borrowed [E0716] +LL | LL | }); | - temporary value is freed at the end of this statement LL | println!("{:?}", x); diff --git a/src/test/ui/nll/cannot-move-block-spans.stderr b/src/test/ui/nll/cannot-move-block-spans.stderr index e37c6ff06f7..6de67a45fb9 100644 --- a/src/test/ui/nll/cannot-move-block-spans.stderr +++ b/src/test/ui/nll/cannot-move-block-spans.stderr @@ -1,55 +1,55 @@ error[E0507]: cannot move out of borrowed content --> $DIR/cannot-move-block-spans.rs:5:15 | -LL | let x = { *r }; //~ ERROR +LL | let x = { *r }; | ^^ cannot move out of borrowed content error[E0507]: cannot move out of borrowed content --> $DIR/cannot-move-block-spans.rs:6:22 | -LL | let y = unsafe { *r }; //~ ERROR +LL | let y = unsafe { *r }; | ^^ cannot move out of borrowed content error[E0507]: cannot move out of borrowed content --> $DIR/cannot-move-block-spans.rs:7:26 | -LL | let z = loop { break *r; }; //~ ERROR +LL | let z = loop { break *r; }; | ^^ cannot move out of borrowed content error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array --> $DIR/cannot-move-block-spans.rs:11:15 | -LL | let x = { arr[0] }; //~ ERROR +LL | let x = { arr[0] }; | ^^^^^^ cannot move out of here error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array --> $DIR/cannot-move-block-spans.rs:12:22 | -LL | let y = unsafe { arr[0] }; //~ ERROR +LL | let y = unsafe { arr[0] }; | ^^^^^^ cannot move out of here error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array --> $DIR/cannot-move-block-spans.rs:13:26 | -LL | let z = loop { break arr[0]; }; //~ ERROR +LL | let z = loop { break arr[0]; }; | ^^^^^^ cannot move out of here error[E0507]: cannot move out of borrowed content --> $DIR/cannot-move-block-spans.rs:17:38 | -LL | let x = { let mut u = 0; u += 1; *r }; //~ ERROR +LL | let x = { let mut u = 0; u += 1; *r }; | ^^ cannot move out of borrowed content error[E0507]: cannot move out of borrowed content --> $DIR/cannot-move-block-spans.rs:18:45 | -LL | let y = unsafe { let mut u = 0; u += 1; *r }; //~ ERROR +LL | let y = unsafe { let mut u = 0; u += 1; *r }; | ^^ cannot move out of borrowed content error[E0507]: cannot move out of borrowed content --> $DIR/cannot-move-block-spans.rs:19:49 | -LL | let z = loop { let mut u = 0; u += 1; break *r; u += 2; }; //~ ERROR +LL | let z = loop { let mut u = 0; u += 1; break *r; u += 2; }; | ^^ cannot move out of borrowed content error: aborting due to 9 previous errors diff --git a/src/test/ui/nll/closure-access-spans.stderr b/src/test/ui/nll/closure-access-spans.stderr index 3ca0aefb592..6c4cad923b6 100644 --- a/src/test/ui/nll/closure-access-spans.stderr +++ b/src/test/ui/nll/closure-access-spans.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `x` as immutable because it is also borrowed as muta | LL | let r = &mut x; | ------ mutable borrow occurs here -LL | || x; //~ ERROR +LL | || x; | ^^ - second borrow occurs due to use of `x` in closure | | | immutable borrow occurs here @@ -15,7 +15,7 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time | LL | let r = &mut x; | ------ first mutable borrow occurs here -LL | || x = 2; //~ ERROR +LL | || x = 2; | ^^ - second borrow occurs due to use of `x` in closure | | | second mutable borrow occurs here @@ -27,7 +27,7 @@ error[E0500]: closure requires unique access to `x` but it is already borrowed | LL | let r = &mut x; | ------ borrow occurs here -LL | || *x = 2; //~ ERROR +LL | || *x = 2; | ^^ - second borrow occurs due to use of `x` in closure | | | closure construction occurs here @@ -39,7 +39,7 @@ error[E0503]: cannot use `x` because it was mutably borrowed | LL | let r = &mut x; | ------ borrow of `x` occurs here -LL | move || x; //~ ERROR +LL | move || x; | ^ use of borrowed `x` LL | r.use_ref(); | - borrow later used here @@ -49,7 +49,7 @@ error[E0505]: cannot move out of `x` because it is borrowed | LL | let r = &x; | -- borrow of `x` occurs here -LL | || x; //~ ERROR +LL | || x; | ^^ - move occurs due to use in closure | | | move out of `x` occurs here @@ -63,7 +63,7 @@ LL | fn closure_imm_capture_moved(mut x: String) { | ----- move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait LL | let r = x; | - value moved here -LL | || x.len(); //~ ERROR +LL | || x.len(); | ^^ - borrow occurs due to use in closure | | | value borrowed here after move @@ -75,7 +75,7 @@ LL | fn closure_mut_capture_moved(mut x: String) { | ----- move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait LL | let r = x; | - value moved here -LL | || x = String::new(); //~ ERROR +LL | || x = String::new(); | ^^ - borrow occurs due to use in closure | | | value borrowed here after move @@ -87,7 +87,7 @@ LL | fn closure_unique_capture_moved(x: &mut String) { | - move occurs because `x` has type `&mut std::string::String`, which does not implement the `Copy` trait LL | let r = x; | - value moved here -LL | || *x = String::new(); //~ ERROR +LL | || *x = String::new(); | ^^ - borrow occurs due to use in closure | | | value borrowed here after move @@ -99,7 +99,7 @@ LL | fn closure_move_capture_moved(x: &mut String) { | - move occurs because `x` has type `&mut std::string::String`, which does not implement the `Copy` trait LL | let r = x; | - value moved here -LL | || x; //~ ERROR +LL | || x; | ^^ - use occurs due to use in closure | | | value used here after move diff --git a/src/test/ui/nll/closure-borrow-spans.stderr b/src/test/ui/nll/closure-borrow-spans.stderr index cf88b309f74..fcb699a7562 100644 --- a/src/test/ui/nll/closure-borrow-spans.stderr +++ b/src/test/ui/nll/closure-borrow-spans.stderr @@ -5,7 +5,7 @@ LL | let f = || x.len(); | -- - borrow occurs due to use in closure | | | borrow of `x` occurs here -LL | let y = x; //~ ERROR +LL | let y = x; | ^ move out of `x` occurs here LL | f.use_ref(); | - borrow later used here @@ -17,7 +17,7 @@ LL | let f = || x; | -- - first borrow occurs due to use of `x` in closure | | | immutable borrow occurs here -LL | let y = &mut x; //~ ERROR +LL | let y = &mut x; | ^^^^^^ mutable borrow occurs here LL | f.use_ref(); | - immutable borrow later used here @@ -25,7 +25,7 @@ LL | f.use_ref(); error[E0597]: `x` does not live long enough --> $DIR/closure-borrow-spans.rs:21:16 | -LL | f = || x; //~ ERROR +LL | f = || x; | -- ^ borrowed value does not live long enough | | | value captured here @@ -41,7 +41,7 @@ LL | let f = || x; | -- - borrow occurs due to use in closure | | | borrow of `x` occurs here -LL | x = 1; //~ ERROR +LL | x = 1; | ^^^^^ assignment to borrowed `x` occurs here LL | f.use_ref(); | - borrow later used here @@ -53,7 +53,7 @@ LL | let f = || x = 0; | -- - borrow occurs due to use of `x` in closure | | | borrow of `x` occurs here -LL | let y = x; //~ ERROR +LL | let y = x; | ^ use of borrowed `x` LL | f.use_ref(); | - borrow later used here @@ -65,7 +65,7 @@ LL | let f = || x = 0; | -- - first borrow occurs due to use of `x` in closure | | | mutable borrow occurs here -LL | let y = &x; //~ ERROR +LL | let y = &x; | ^^ immutable borrow occurs here LL | f.use_ref(); | - mutable borrow later used here @@ -77,7 +77,7 @@ LL | let f = || x = 0; | -- - first borrow occurs due to use of `x` in closure | | | first mutable borrow occurs here -LL | let y = &mut x; //~ ERROR +LL | let y = &mut x; | ^^^^^^ second mutable borrow occurs here LL | f.use_ref(); | - first borrow later used here @@ -85,7 +85,7 @@ LL | f.use_ref(); error[E0597]: `x` does not live long enough --> $DIR/closure-borrow-spans.rs:54:16 | -LL | f = || x = 0; //~ ERROR +LL | f = || x = 0; | -- ^ borrowed value does not live long enough | | | value captured here @@ -101,7 +101,7 @@ LL | let f = || x = 0; | -- - borrow occurs due to use in closure | | | borrow of `x` occurs here -LL | x = 1; //~ ERROR +LL | x = 1; | ^^^^^ assignment to borrowed `x` occurs here LL | f.use_ref(); | - borrow later used here @@ -113,7 +113,7 @@ LL | let f = || *x = 0; | -- - borrow occurs due to use in closure | | | borrow of `x` occurs here -LL | let y = x; //~ ERROR +LL | let y = x; | ^ move out of `x` occurs here LL | f.use_ref(); | - borrow later used here @@ -125,7 +125,7 @@ LL | let f = || *x = 0; | -- - first borrow occurs due to use of `x` in closure | | | closure construction occurs here -LL | let y = &x; //~ ERROR +LL | let y = &x; | ^^ second borrow occurs here LL | f.use_ref(); | - first borrow later used here @@ -137,7 +137,7 @@ LL | let f = || *x = 0; | -- - first borrow occurs due to use of `x` in closure | | | closure construction occurs here -LL | let y = &mut x; //~ ERROR +LL | let y = &mut x; | ^^^^^^ second borrow occurs here LL | f.use_ref(); | - first borrow later used here @@ -145,7 +145,7 @@ LL | f.use_ref(); error[E0597]: `x` does not live long enough --> $DIR/closure-borrow-spans.rs:88:17 | -LL | f = || *x = 0; //~ ERROR +LL | f = || *x = 0; | -- ^ borrowed value does not live long enough | | | value captured here @@ -161,7 +161,7 @@ LL | let f = || *x = 0; | -- - borrow occurs due to use in closure | | | borrow of `*x` occurs here -LL | *x = 1; //~ ERROR +LL | *x = 1; | ^^^^^^ assignment to borrowed `*x` occurs here LL | f.use_ref(); | - borrow later used here diff --git a/src/test/ui/nll/closure-captures.stderr b/src/test/ui/nll/closure-captures.stderr index cdc055f2a37..7dc1c59cebe 100644 --- a/src/test/ui/nll/closure-captures.stderr +++ b/src/test/ui/nll/closure-captures.stderr @@ -4,7 +4,7 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable LL | fn one_closure(x: i32) { | - help: consider changing this to be mutable: `mut x` LL | || -LL | x = 1; //~ ERROR +LL | x = 1; | ^^^^^ cannot assign error[E0594]: cannot assign to `x`, as it is not declared as mutable @@ -13,7 +13,7 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable LL | fn one_closure(x: i32) { | - help: consider changing this to be mutable: `mut x` ... -LL | x = 1; //~ ERROR +LL | x = 1; | ^^^^^ cannot assign error[E0594]: cannot assign to `x`, as it is not declared as mutable @@ -22,7 +22,7 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable LL | fn two_closures(x: i32) { | - help: consider changing this to be mutable: `mut x` ... -LL | x = 1; //~ ERROR +LL | x = 1; | ^^^^^ cannot assign error[E0594]: cannot assign to `x`, as it is not declared as mutable @@ -31,13 +31,13 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable LL | fn two_closures(x: i32) { | - help: consider changing this to be mutable: `mut x` ... -LL | x = 1; //~ ERROR +LL | x = 1; | ^^^^^ cannot assign error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure --> $DIR/closure-captures.rs:30:9 | -LL | || //~ ERROR +LL | || | ^^ cannot borrow as mutable LL | x = 1;} | - mutable borrow occurs due to use of `x` in closure @@ -47,14 +47,14 @@ help: consider changing this to accept closures that implement `FnMut` | LL | fn_ref(|| { | ____________^ -LL | | || //~ ERROR +LL | | || LL | | x = 1;} | |________________^ error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure --> $DIR/closure-captures.rs:34:9 | -LL | || //~ ERROR +LL | || | ^^ cannot borrow as mutable LL | x = 1;}); | - mutable borrow occurs due to use of `x` in closure @@ -64,7 +64,7 @@ help: consider changing this to accept closures that implement `FnMut` | LL | fn_ref(move || { | ____________^ -LL | | || //~ ERROR +LL | | || LL | | x = 1;}); | |___________^ @@ -74,15 +74,15 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable LL | fn two_closures_ref(x: i32) { | - help: consider changing this to be mutable: `mut x` ... -LL | x = 1;} //~ ERROR +LL | x = 1;} | ^^^^^ cannot assign error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure --> $DIR/closure-captures.rs:41:9 | -LL | || //~ ERROR +LL | || | ^^ cannot borrow as mutable -LL | x = 1;} //~ ERROR +LL | x = 1;} | - mutable borrow occurs due to use of `x` in closure | help: consider changing this to accept closures that implement `FnMut` @@ -90,8 +90,8 @@ help: consider changing this to accept closures that implement `FnMut` | LL | fn_ref(|| { | ____________^ -LL | | || //~ ERROR -LL | | x = 1;} //~ ERROR +LL | | || +LL | | x = 1;} | |________________^ error[E0594]: cannot assign to `x`, as it is not declared as mutable @@ -100,15 +100,15 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable LL | fn two_closures_ref(x: i32) { | - help: consider changing this to be mutable: `mut x` ... -LL | x = 1;}); //~ ERROR +LL | x = 1;}); | ^^^^^ cannot assign error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure --> $DIR/closure-captures.rs:45:9 | -LL | || //~ ERROR +LL | || | ^^ cannot borrow as mutable -LL | x = 1;}); //~ ERROR +LL | x = 1;}); | - mutable borrow occurs due to use of `x` in closure | help: consider changing this to accept closures that implement `FnMut` @@ -116,14 +116,14 @@ help: consider changing this to accept closures that implement `FnMut` | LL | fn_ref(move || { | ____________^ -LL | | || //~ ERROR -LL | | x = 1;}); //~ ERROR +LL | | || +LL | | x = 1;}); | |___________^ error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure --> $DIR/closure-captures.rs:51:9 | -LL | || //~ ERROR +LL | || | ^^ cannot borrow as mutable LL | *x = 1;}); | - mutable borrow occurs due to use of `x` in closure @@ -133,14 +133,14 @@ help: consider changing this to accept closures that implement `FnMut` | LL | fn_ref(|| { | ____________^ -LL | | || //~ ERROR +LL | | || LL | | *x = 1;}); | |________________^ error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure --> $DIR/closure-captures.rs:54:9 | -LL | || //~ ERROR +LL | || | ^^ cannot borrow as mutable LL | *x = 1;}); | - mutable borrow occurs due to use of `x` in closure @@ -150,7 +150,7 @@ help: consider changing this to accept closures that implement `FnMut` | LL | fn_ref(move || { | ____________^ -LL | | || //~ ERROR +LL | | || LL | | *x = 1;}); | |________________^ diff --git a/src/test/ui/nll/closure-move-spans.stderr b/src/test/ui/nll/closure-move-spans.stderr index 6750c404760..1cc4ca85b9f 100644 --- a/src/test/ui/nll/closure-move-spans.stderr +++ b/src/test/ui/nll/closure-move-spans.stderr @@ -7,7 +7,7 @@ LL | || x; | -- - variable moved due to use in closure | | | value moved into closure here -LL | let y = x; //~ ERROR +LL | let y = x; | ^ value used here after move error[E0382]: borrow of moved value: `x` @@ -19,7 +19,7 @@ LL | || x; | -- - variable moved due to use in closure | | | value moved into closure here -LL | let y = &x; //~ ERROR +LL | let y = &x; | ^^ value borrowed here after move error[E0382]: borrow of moved value: `x` @@ -31,7 +31,7 @@ LL | || x; | -- - variable moved due to use in closure | | | value moved into closure here -LL | let y = &mut x; //~ ERROR +LL | let y = &mut x; | ^^^^^^ value borrowed here after move error: aborting due to 3 previous errors diff --git a/src/test/ui/nll/closure-requirements/escape-argument.stderr b/src/test/ui/nll/closure-requirements/escape-argument.stderr index 9b66abc40f0..d47b326f48e 100644 --- a/src/test/ui/nll/closure-requirements/escape-argument.stderr +++ b/src/test/ui/nll/closure-requirements/escape-argument.stderr @@ -28,7 +28,7 @@ error[E0597]: `y` does not live long enough | LL | closure(&mut p, &y); | ^^ borrowed value does not live long enough -LL | //~^ ERROR `y` does not live long enough [E0597] +LL | LL | } | - `y` dropped here while still borrowed LL | diff --git a/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr b/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr index 8214ff1fcec..dec4a6b811f 100644 --- a/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr +++ b/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr @@ -1,7 +1,7 @@ note: External requirements --> $DIR/escape-upvar-nested.rs:21:32 | -LL | let mut closure1 = || p = &y; //~ ERROR `y` does not live long enough [E0597] +LL | let mut closure1 = || p = &y; | ^^^^^^^^^ | = note: defining type: DefId(0/1:10 ~ escape_upvar_nested[317d]::test[0]::{{closure}}[0]::{{closure}}[0]) with closure substs [ @@ -18,7 +18,7 @@ note: External requirements | LL | let mut closure = || { | ___________________________^ -LL | | let mut closure1 = || p = &y; //~ ERROR `y` does not live long enough [E0597] +LL | | let mut closure1 = || p = &y; LL | | closure1(); LL | | }; | |_________^ @@ -51,7 +51,7 @@ error[E0597]: `y` does not live long enough | LL | let mut closure = || { | -- value captured here -LL | let mut closure1 = || p = &y; //~ ERROR `y` does not live long enough [E0597] +LL | let mut closure1 = || p = &y; | ^ borrowed value does not live long enough ... LL | } diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr index 55e4573e60b..067bd08220d 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr @@ -4,7 +4,7 @@ note: No external requirements LL | / |_outlives1, _outlives2, _outlives3, x, y| { LL | | // Only works if 'x: 'y: LL | | let p = x.get(); -LL | | demand_y(x, y, p) //~ ERROR +LL | | demand_y(x, y, p) LL | | }, | |_________^ | @@ -24,7 +24,7 @@ LL | |_outlives1, _outlives2, _outlives3, x, y| { | | | has type `std::cell::Cell<&&'1 u32>` ... -LL | demand_y(x, y, p) //~ ERROR +LL | demand_y(x, y, p) | ^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2` note: No external requirements diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr index 5863b9bc840..a1a1024bccd 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr @@ -5,7 +5,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, | _______________________________________________^ LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) -LL | | //~^ ERROR lifetime may not live long enough +LL | | LL | | }); | |_____^ | @@ -25,7 +25,7 @@ LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) -LL | | //~^ ERROR lifetime may not live long enough +LL | | LL | | }); LL | | } | |_^ diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr index a9aeee8a319..ad2a5cae62e 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr @@ -4,7 +4,7 @@ note: No external requirements LL | foo(cell, |cell_a, cell_x| { | _______________^ LL | | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure -LL | | //~^ ERROR +LL | | LL | | }) | |_____^ | @@ -59,7 +59,7 @@ note: No external requirements LL | / fn case2() { LL | | let a = 0; LL | | let cell = Cell::new(&a); -LL | | //~^ ERROR `a` does not live long enough +LL | | ... | LL | | }) LL | | } diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr index daeb3b9ab5c..f5167c2197b 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr @@ -3,7 +3,7 @@ note: External requirements | LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { | _______________________________________________^ -LL | | //~^ ERROR borrowed data escapes outside of function +LL | | LL | | LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) @@ -24,7 +24,7 @@ note: No external requirements | LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { LL | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { -LL | | //~^ ERROR borrowed data escapes outside of function +LL | | LL | | ... | LL | | }); @@ -39,7 +39,7 @@ error[E0521]: borrowed data escapes outside of function LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { | ------ `cell_a` is a reference that is only valid in the function body LL | / establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { -LL | | //~^ ERROR borrowed data escapes outside of function +LL | | LL | | LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr index 95e5ce0ae74..b4e1b0d2247 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr @@ -3,7 +3,7 @@ note: External requirements | LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { | _______________________________________________^ -LL | | //~^ ERROR borrowed data escapes outside of function +LL | | LL | | LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) @@ -24,7 +24,7 @@ note: No external requirements | LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { -LL | | //~^ ERROR borrowed data escapes outside of function +LL | | LL | | ... | LL | | }); @@ -39,7 +39,7 @@ error[E0521]: borrowed data escapes outside of function LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { | ------ `cell_a` is a reference that is only valid in the function body LL | / establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { -LL | | //~^ ERROR borrowed data escapes outside of function +LL | | LL | | LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr index b6d9d8529cf..6ab2104a51c 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr @@ -5,7 +5,7 @@ LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| | _____________________________________________^ LL | | // Only works if 'x: 'y: LL | | demand_y(outlives1, outlives2, x.get()) -LL | | //~^ ERROR lifetime may not live long enough +LL | | LL | | }); | |_____^ | @@ -25,7 +25,7 @@ LL | / fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { LL | | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| { LL | | // Only works if 'x: 'y: LL | | demand_y(outlives1, outlives2, x.get()) -LL | | //~^ ERROR lifetime may not live long enough +LL | | LL | | }); LL | | } | |_^ diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr index 93eb93bdc06..5cf37bedb88 100644 --- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr @@ -5,7 +5,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { | _______________________________________________^ LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) -LL | | //~^ ERROR +LL | | LL | | }); | |_____^ | @@ -34,7 +34,7 @@ LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { LL | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) -LL | | //~^ ERROR +LL | | LL | | }); LL | | } | |_^ diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr index c7809de88b9..671a8b9a935 100644 --- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr @@ -5,7 +5,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, | _______________________________________________^ LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) -LL | | //~^ ERROR +LL | | LL | | }); | |_____^ | @@ -34,7 +34,7 @@ LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) -LL | | //~^ ERROR +LL | | LL | | }); LL | | } | |_^ diff --git a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr index 3bcd8e1e256..c2bbd813814 100644 --- a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr @@ -3,7 +3,7 @@ note: External requirements | LL | establish_relationships(value, |value| { | ____________________________________^ -LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | LL | | LL | | // This function call requires that ... | @@ -42,7 +42,7 @@ error[E0309]: the parameter type `T` may not live long enough | LL | establish_relationships(value, |value| { | ____________________________________^ -LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | LL | | LL | | // This function call requires that ... | diff --git a/src/test/ui/nll/closure-requirements/propagate-multiple-requirements.stderr b/src/test/ui/nll/closure-requirements/propagate-multiple-requirements.stderr index 2ad4577869a..332724daaa8 100644 --- a/src/test/ui/nll/closure-requirements/propagate-multiple-requirements.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-multiple-requirements.stderr @@ -6,7 +6,7 @@ LL | let mut out: &mut &'static [i32] = &mut (&[1] as _); LL | once(|mut z: &[i32], mut out_val: &mut &[i32]| { | ----------------------------------------- value captured here ... -LL | z = &local_arr; //~ ERROR +LL | z = &local_arr; | ^^^^^^^^^ borrowed value does not live long enough ... LL | } diff --git a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr b/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr index 4a035d0c9cd..d5bfa3f9894 100644 --- a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr +++ b/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr @@ -23,7 +23,7 @@ note: No external requirements | LL | / fn test() { LL | | expect_sig(|a, b| b); // ought to return `a` -LL | | //~^ ERROR +LL | | LL | | } | |_^ | diff --git a/src/test/ui/nll/closure-use-spans.stderr b/src/test/ui/nll/closure-use-spans.stderr index b2abfcacd0e..20696da3b8e 100644 --- a/src/test/ui/nll/closure-use-spans.stderr +++ b/src/test/ui/nll/closure-use-spans.stderr @@ -3,7 +3,7 @@ error[E0506]: cannot assign to `x` because it is borrowed | LL | let y = &x; | -- borrow of `x` occurs here -LL | x = 0; //~ ERROR +LL | x = 0; | ^^^^^ assignment to borrowed `x` occurs here LL | || *y; | - borrow later captured here by closure @@ -13,7 +13,7 @@ error[E0506]: cannot assign to `x` because it is borrowed | LL | let y = &mut x; | ------ borrow of `x` occurs here -LL | x = 0; //~ ERROR +LL | x = 0; | ^^^^^ assignment to borrowed `x` occurs here LL | || *y = 1; | - borrow later captured here by closure @@ -23,7 +23,7 @@ error[E0506]: cannot assign to `x` because it is borrowed | LL | let y = &x; | -- borrow of `x` occurs here -LL | x = 0; //~ ERROR +LL | x = 0; | ^^^^^ assignment to borrowed `x` occurs here LL | move || *y; | - borrow later captured here by closure diff --git a/src/test/ui/nll/closures-in-loops.stderr b/src/test/ui/nll/closures-in-loops.stderr index 6c9e1639f88..6408293aeea 100644 --- a/src/test/ui/nll/closures-in-loops.stderr +++ b/src/test/ui/nll/closures-in-loops.stderr @@ -4,7 +4,7 @@ error[E0382]: use of moved value: `x` LL | fn repreated_move(x: String) { | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait LL | for i in 0..10 { -LL | || x; //~ ERROR +LL | || x; | ^^ - use occurs due to use in closure | | | value moved into closure here, in previous iteration of loop @@ -12,7 +12,7 @@ LL | || x; //~ ERROR error[E0499]: cannot borrow `x` as mutable more than once at a time --> $DIR/closures-in-loops.rs:15:16 | -LL | v.push(|| x = String::new()); //~ ERROR +LL | v.push(|| x = String::new()); | ^^ - borrows occur due to use of `x` in closure | | | mutable borrow starts here in previous iteration of loop @@ -20,7 +20,7 @@ LL | v.push(|| x = String::new()); //~ ERROR error[E0524]: two closures require unique access to `x` at the same time --> $DIR/closures-in-loops.rs:22:16 | -LL | v.push(|| *x = String::new()); //~ ERROR +LL | v.push(|| *x = String::new()); | ^^ - borrows occur due to use of `x` in closure | | | closures are constructed here in different iterations of loop diff --git a/src/test/ui/nll/constant-thread-locals-issue-47053.stderr b/src/test/ui/nll/constant-thread-locals-issue-47053.stderr index 77cffbfa72d..ae056a97840 100644 --- a/src/test/ui/nll/constant-thread-locals-issue-47053.stderr +++ b/src/test/ui/nll/constant-thread-locals-issue-47053.stderr @@ -1,7 +1,7 @@ error[E0594]: cannot assign to immutable static item `FOO` --> $DIR/constant-thread-locals-issue-47053.rs:10:5 | -LL | FOO = 6; //~ ERROR cannot assign to immutable static item `FOO` [E0594] +LL | FOO = 6; | ^^^^^^^ cannot assign error: aborting due to previous error diff --git a/src/test/ui/nll/do-not-ignore-lifetime-bounds-in-copy.stderr b/src/test/ui/nll/do-not-ignore-lifetime-bounds-in-copy.stderr index db5a549106b..bf5c571b455 100644 --- a/src/test/ui/nll/do-not-ignore-lifetime-bounds-in-copy.stderr +++ b/src/test/ui/nll/do-not-ignore-lifetime-bounds-in-copy.stderr @@ -1,7 +1,7 @@ error[E0597]: `s` does not live long enough --> $DIR/do-not-ignore-lifetime-bounds-in-copy.rs:10:17 | -LL | let a = Foo(&s); //~ ERROR `s` does not live long enough [E0597] +LL | let a = Foo(&s); | ^^ borrowed value does not live long enough LL | drop(a); | - copying this value requires that `s` is borrowed for `'static` diff --git a/src/test/ui/nll/drop-no-may-dangle.stderr b/src/test/ui/nll/drop-no-may-dangle.stderr index efa825be295..e1d2b038ec8 100644 --- a/src/test/ui/nll/drop-no-may-dangle.stderr +++ b/src/test/ui/nll/drop-no-may-dangle.stderr @@ -4,7 +4,7 @@ error[E0506]: cannot assign to `v[_]` because it is borrowed LL | let p: WrapMayNotDangle<&usize> = WrapMayNotDangle { value: &v[0] }; | ----- borrow of `v[_]` occurs here ... -LL | v[0] += 1; //~ ERROR cannot assign to `v[_]` because it is borrowed +LL | v[0] += 1; | ^^^^^^^^^ assignment to borrowed `v[_]` occurs here ... LL | } @@ -16,7 +16,7 @@ error[E0506]: cannot assign to `v[_]` because it is borrowed LL | let p: WrapMayNotDangle<&usize> = WrapMayNotDangle { value: &v[0] }; | ----- borrow of `v[_]` occurs here ... -LL | v[0] += 1; //~ ERROR cannot assign to `v[_]` because it is borrowed +LL | v[0] += 1; | ^^^^^^^^^ assignment to borrowed `v[_]` occurs here LL | } | - borrow might be used here, when `p` is dropped and runs the `Drop` code for type `WrapMayNotDangle` diff --git a/src/test/ui/nll/enum-drop-access.stderr b/src/test/ui/nll/enum-drop-access.stderr index da9c96f7bc2..699179fd52f 100644 --- a/src/test/ui/nll/enum-drop-access.stderr +++ b/src/test/ui/nll/enum-drop-access.stderr @@ -4,7 +4,7 @@ error[E0713]: borrow may still be in use when destructor runs LL | fn drop_enum(opt: DropOption<&mut i32>) -> Option<&mut i32> { | - let's call the lifetime of this reference `'1` LL | match opt { -LL | DropOption::Some(&mut ref mut r) => { //~ ERROR +LL | DropOption::Some(&mut ref mut r) => { | ^^^^^^^^^ LL | Some(r) | ------- returning this value requires that `*opt.0` is borrowed for `'1` @@ -18,7 +18,7 @@ error[E0713]: borrow may still be in use when destructor runs LL | fn optional_drop_enum(opt: Option>) -> Option<&mut i32> { | - let's call the lifetime of this reference `'1` LL | match opt { -LL | Some(DropOption::Some(&mut ref mut r)) => { //~ ERROR +LL | Some(DropOption::Some(&mut ref mut r)) => { | ^^^^^^^^^ LL | Some(r) | ------- returning this value requires that `*opt.0.0` is borrowed for `'1` diff --git a/src/test/ui/nll/guarantor-issue-46974.stderr b/src/test/ui/nll/guarantor-issue-46974.stderr index b2ed4c8fcab..8486c7d4858 100644 --- a/src/test/ui/nll/guarantor-issue-46974.stderr +++ b/src/test/ui/nll/guarantor-issue-46974.stderr @@ -4,7 +4,7 @@ error[E0506]: cannot assign to `*s` because it is borrowed LL | let t = &mut *s; // this borrow should last for the entire function | ------- borrow of `*s` occurs here LL | let x = &t.0; -LL | *s = (2,); //~ ERROR cannot assign to `*s` +LL | *s = (2,); | ^^^^^^^^^ assignment to borrowed `*s` occurs here LL | *x | -- borrow later used here @@ -15,7 +15,7 @@ error[E0621]: explicit lifetime required in the type of `s` LL | fn bar(s: &Box<(i32,)>) -> &'static i32 { | ------------ help: add explicit lifetime `'static` to the type of `s`: `&'static std::boxed::Box<(i32,)>` LL | // FIXME(#46983): error message should be better -LL | &s.0 //~ ERROR explicit lifetime required in the type of `s` [E0621] +LL | &s.0 | ^^^^ lifetime `'static` required error: aborting due to 2 previous errors diff --git a/src/test/ui/nll/issue-21232-partial-init-and-use.stderr b/src/test/ui/nll/issue-21232-partial-init-and-use.stderr index 23da533252c..ab85caabb31 100644 --- a/src/test/ui/nll/issue-21232-partial-init-and-use.stderr +++ b/src/test/ui/nll/issue-21232-partial-init-and-use.stderr @@ -158,7 +158,7 @@ LL | let mut c = (1, "".to_owned()); LL | match c { LL | c2 => { | -- value moved here -LL | c.0 = 2; //~ ERROR assign to part of moved value +LL | c.0 = 2; | ^^^^^^^ value partially assigned here after move error[E0382]: assign to part of moved value: `c` @@ -169,7 +169,7 @@ LL | let mut c = (1, (1, "".to_owned())); LL | match c { LL | c2 => { | -- value moved here -LL | (c.1).0 = 2; //~ ERROR assign to part of moved value +LL | (c.1).0 = 2; | ^^^^^^^^^^^ value partially assigned here after move error[E0382]: assign to part of moved value: `c.1` @@ -177,7 +177,7 @@ error[E0382]: assign to part of moved value: `c.1` | LL | c2 => { | -- value moved here -LL | ((c.1).1).0 = 3; //~ ERROR assign to part of moved value +LL | ((c.1).1).0 = 3; | ^^^^^^^^^^^^^^^ value partially assigned here after move | = note: move occurs because `c.1` has type `(i32, (i32, std::string::String))`, which does not implement the `Copy` trait diff --git a/src/test/ui/nll/issue-27868.stderr b/src/test/ui/nll/issue-27868.stderr index 4cbd74fe272..c83cb0b300b 100644 --- a/src/test/ui/nll/issue-27868.stderr +++ b/src/test/ui/nll/issue-27868.stderr @@ -8,7 +8,7 @@ LL | vecvec[0] += { | | LL | | vecvec = vec![]; | | ^^^^^^ assignment to borrowed `vecvec` occurs here -LL | | //~^ ERROR cannot assign to `vecvec` because it is borrowed [E0506] +LL | | LL | | 0 LL | | }; | |_____- borrow later used here diff --git a/src/test/ui/nll/issue-31567.stderr b/src/test/ui/nll/issue-31567.stderr index c76365095df..d098ff82d34 100644 --- a/src/test/ui/nll/issue-31567.stderr +++ b/src/test/ui/nll/issue-31567.stderr @@ -3,7 +3,7 @@ error[E0713]: borrow may still be in use when destructor runs | LL | fn get_dangling<'a>(v: VecWrapper<'a>) -> &'a u32 { | -- lifetime `'a` defined here -LL | let s_inner: &'a S = &*v.0; //~ ERROR borrow may still be in use when destructor runs [E0713] +LL | let s_inner: &'a S = &*v.0; | ----- ^^^^^ | | | type annotation requires that `*v.0` is borrowed for `'a` diff --git a/src/test/ui/nll/issue-47388.stderr b/src/test/ui/nll/issue-47388.stderr index dda324c2e98..91f758a60a5 100644 --- a/src/test/ui/nll/issue-47388.stderr +++ b/src/test/ui/nll/issue-47388.stderr @@ -3,7 +3,7 @@ error[E0594]: cannot assign to `fancy_ref.num` which is behind a `&` reference | LL | let fancy_ref = &(&mut fancy); | ------------- help: consider changing this to be a mutable reference: `&mut (&mut fancy)` -LL | fancy_ref.num = 6; //~ ERROR E0594 +LL | fancy_ref.num = 6; | ^^^^^^^^^^^^^^^^^ `fancy_ref` is a `&` reference, so the data it refers to cannot be written error: aborting due to previous error diff --git a/src/test/ui/nll/issue-47470.stderr b/src/test/ui/nll/issue-47470.stderr index ff1f1e2c1f1..d23cee3fc7c 100644 --- a/src/test/ui/nll/issue-47470.stderr +++ b/src/test/ui/nll/issue-47470.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return reference to local variable `local` --> $DIR/issue-47470.rs:17:9 | -LL | &local //~ ERROR cannot return reference to local variable `local` +LL | &local | ^^^^^^ returns a reference to data owned by the current function error: aborting due to previous error diff --git a/src/test/ui/nll/issue-48238.stderr b/src/test/ui/nll/issue-48238.stderr index 7cb5eb736c0..05a90eec05c 100644 --- a/src/test/ui/nll/issue-48238.stderr +++ b/src/test/ui/nll/issue-48238.stderr @@ -1,7 +1,7 @@ error: lifetime may not live long enough --> $DIR/issue-48238.rs:11:13 | -LL | move || use_val(&orig); //~ ERROR +LL | move || use_val(&orig); | ------- ^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2` | | | | | return type of closure is &'2 u8 diff --git a/src/test/ui/nll/issue-48697.stderr b/src/test/ui/nll/issue-48697.stderr index 16b46c15b90..73832fd5787 100644 --- a/src/test/ui/nll/issue-48697.stderr +++ b/src/test/ui/nll/issue-48697.stderr @@ -3,7 +3,7 @@ error[E0515]: cannot return value referencing local variable `z` | LL | let k = f(&z); | -- `z` is borrowed here -LL | f(x) //~ cannot return value referencing local variable +LL | f(x) | ^^^^ returns a value referencing data owned by the current function error: aborting due to previous error diff --git a/src/test/ui/nll/issue-50716.stderr b/src/test/ui/nll/issue-50716.stderr index 229bb1777cc..7e5ffb51501 100644 --- a/src/test/ui/nll/issue-50716.stderr +++ b/src/test/ui/nll/issue-50716.stderr @@ -4,7 +4,7 @@ error: lifetime may not live long enough LL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>) | -- lifetime `'a` defined here ... -LL | let _x = *s; //~ ERROR +LL | let _x = *s; | ^^ proving this value is `Sized` requires that `'a` must outlive `'static` error: aborting due to previous error diff --git a/src/test/ui/nll/issue-51191.stderr b/src/test/ui/nll/issue-51191.stderr index e2348d36d33..e80cd873d5a 100644 --- a/src/test/ui/nll/issue-51191.stderr +++ b/src/test/ui/nll/issue-51191.stderr @@ -3,7 +3,7 @@ warning: function cannot return without recursing | LL | fn bar(self: &mut Self) { | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing -LL | //~^ WARN function cannot return without recursing +LL | LL | (&mut self).bar(); | ----------------- recursive call site | diff --git a/src/test/ui/nll/issue-51268.stderr b/src/test/ui/nll/issue-51268.stderr index ce93d3787ef..0be181745fd 100644 --- a/src/test/ui/nll/issue-51268.stderr +++ b/src/test/ui/nll/issue-51268.stderr @@ -6,7 +6,7 @@ LL | self.thing.bar(|| { | | | | _________| immutable borrow later used by call | | -LL | | //~^ ERROR cannot borrow `self.thing` as mutable because it is also borrowed as immutable [E0502] +LL | | LL | | &self.number; | | ---- first borrow occurs due to use of `self` in closure LL | | }); diff --git a/src/test/ui/nll/issue-52113.stderr b/src/test/ui/nll/issue-52113.stderr index ceae16185bb..8638fe25769 100644 --- a/src/test/ui/nll/issue-52113.stderr +++ b/src/test/ui/nll/issue-52113.stderr @@ -6,7 +6,7 @@ LL | fn produce_err<'a, 'b: 'a>(data: &'b mut Vec<&'b u32>, value: &'a u32) -> i | | | lifetime `'a` defined here ... -LL | x //~ ERROR lifetime may not live long enough +LL | x | ^ returning this value requires that `'a` must outlive `'b` error: aborting due to previous error diff --git a/src/test/ui/nll/issue-52534-2.stderr b/src/test/ui/nll/issue-52534-2.stderr index a4396ae386d..f98deaea718 100644 --- a/src/test/ui/nll/issue-52534-2.stderr +++ b/src/test/ui/nll/issue-52534-2.stderr @@ -3,7 +3,7 @@ error[E0597]: `x` does not live long enough | LL | y = &x | ^^^^^^ borrowed value does not live long enough -LL | //~^ ERROR does not live long enough +LL | LL | } | - `x` dropped here while still borrowed LL | diff --git a/src/test/ui/nll/issue-52534.stderr b/src/test/ui/nll/issue-52534.stderr index e83374af3b0..9ac79eda161 100644 --- a/src/test/ui/nll/issue-52534.stderr +++ b/src/test/ui/nll/issue-52534.stderr @@ -5,7 +5,7 @@ LL | foo(|a| &x) | - ^ `x` would have to be valid for `'0`... | | | has type `&'0 u32` -LL | //~^ ERROR does not live long enough +LL | LL | } | - ...but `x` will be dropped here, when the function `bar` returns | @@ -19,7 +19,7 @@ LL | baz(|first, second| &y) | ----- ^ `y` would have to be valid for `'0`... | | | has type `&'0 u32` -LL | //~^ ERROR does not live long enough +LL | LL | } | - ...but `y` will be dropped here, when the function `foobar` returns | diff --git a/src/test/ui/nll/issue-53773.stderr b/src/test/ui/nll/issue-53773.stderr index 92a9946068c..1933ef7a2db 100644 --- a/src/test/ui/nll/issue-53773.stderr +++ b/src/test/ui/nll/issue-53773.stderr @@ -3,7 +3,7 @@ error[E0713]: borrow may still be in use when destructor runs | LL | members.push(child.raw); | ^^^^^^^^^ -LL | //~^ ERROR borrow may still be in use when destructor runs [E0713] +LL | LL | } | - here, drop of `child` needs exclusive access to `*child.raw`, because the type `C<'_>` implements the `Drop` trait LL | members.len(); diff --git a/src/test/ui/nll/issue-54556-niconii.stderr b/src/test/ui/nll/issue-54556-niconii.stderr index 03a7b94d181..2d0de26ab30 100644 --- a/src/test/ui/nll/issue-54556-niconii.stderr +++ b/src/test/ui/nll/issue-54556-niconii.stderr @@ -1,7 +1,7 @@ error[E0597]: `counter` does not live long enough --> $DIR/issue-54556-niconii.rs:22:20 | -LL | if let Ok(_) = counter.lock() { } //~ ERROR does not live long enough +LL | if let Ok(_) = counter.lock() { } | ^^^^^^^ borrowed value does not live long enough ... LL | } diff --git a/src/test/ui/nll/issue-54556-stephaneyfx.stderr b/src/test/ui/nll/issue-54556-stephaneyfx.stderr index bf3285a73c7..4e581a516b2 100644 --- a/src/test/ui/nll/issue-54556-stephaneyfx.stderr +++ b/src/test/ui/nll/issue-54556-stephaneyfx.stderr @@ -1,7 +1,7 @@ error[E0597]: `stmt` does not live long enough --> $DIR/issue-54556-stephaneyfx.rs:27:22 | -LL | let rows = Rows(&stmt); //~ ERROR does not live long enough +LL | let rows = Rows(&stmt); | ^^^^ borrowed value does not live long enough ... LL | } diff --git a/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr b/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr index ca636e76132..a74970f7118 100644 --- a/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr +++ b/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.stderr @@ -1,7 +1,7 @@ error[E0597]: `_thing1` does not live long enough --> $DIR/issue-54556-temps-in-tail-diagnostic.rs:5:12 | -LL | D(&_thing1).end() //~ ERROR does not live long enough +LL | D(&_thing1).end() | ^^^^^^^ borrowed value does not live long enough LL | } | - `_thing1` dropped here while still borrowed diff --git a/src/test/ui/nll/issue-54556-wrap-it-up.stderr b/src/test/ui/nll/issue-54556-wrap-it-up.stderr index a0c19b96387..c98b3a9fafb 100644 --- a/src/test/ui/nll/issue-54556-wrap-it-up.stderr +++ b/src/test/ui/nll/issue-54556-wrap-it-up.stderr @@ -4,7 +4,7 @@ error[E0506]: cannot assign to `x` because it is borrowed LL | let wrap = Wrap { p: &mut x }; | - borrow of `x` occurs here ... -LL | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] +LL | x = 1; | ^^^^^ assignment to borrowed `x` occurs here error: aborting due to previous error diff --git a/src/test/ui/nll/issue-55394.stderr b/src/test/ui/nll/issue-55394.stderr index bcdd78248eb..e9a70fd6b16 100644 --- a/src/test/ui/nll/issue-55394.stderr +++ b/src/test/ui/nll/issue-55394.stderr @@ -5,7 +5,7 @@ LL | fn new(bar: &mut Bar) -> Self { | - ---- return type is Foo<'2> | | | let's call the lifetime of this reference `'1` -LL | Foo { bar } //~ERROR lifetime may not live long enough +LL | Foo { bar } | ^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2` error: aborting due to previous error diff --git a/src/test/ui/nll/issue-55401.stderr b/src/test/ui/nll/issue-55401.stderr index 952b5441f86..622bc5a3f34 100644 --- a/src/test/ui/nll/issue-55401.stderr +++ b/src/test/ui/nll/issue-55401.stderr @@ -4,7 +4,7 @@ error: lifetime may not live long enough LL | fn static_to_a_to_static_through_ref_in_tuple<'a>(x: &'a u32) -> &'static u32 { | -- lifetime `'a` defined here LL | let (ref y, _z): (&'a u32, u32) = (&22, 44); -LL | *y //~ ERROR +LL | *y | ^^ returning this value requires that `'a` must outlive `'static` error: aborting due to previous error diff --git a/src/test/ui/nll/issue-55850.stderr b/src/test/ui/nll/issue-55850.stderr index 2a24cba1a68..7deee1d541a 100644 --- a/src/test/ui/nll/issue-55850.stderr +++ b/src/test/ui/nll/issue-55850.stderr @@ -1,7 +1,7 @@ error[E0597]: `s` does not live long enough --> $DIR/issue-55850.rs:28:16 | -LL | yield &s[..] //~ ERROR `s` does not live long enough [E0597] +LL | yield &s[..] | ^ borrowed value does not live long enough LL | }) | - borrowed value only lives until here diff --git a/src/test/ui/nll/issue-57989.stderr b/src/test/ui/nll/issue-57989.stderr index 4561c99096f..db28787a046 100644 --- a/src/test/ui/nll/issue-57989.stderr +++ b/src/test/ui/nll/issue-57989.stderr @@ -4,7 +4,7 @@ error[E0594]: cannot assign to `*x` which is behind a `&` reference LL | fn f(x: &i32) { | ---- help: consider changing this to be a mutable reference: `&mut i32` LL | let g = &x; -LL | *x = 0; //~ ERROR cannot assign to `*x` which is behind a `&` reference +LL | *x = 0; | ^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written error[E0506]: cannot assign to `*x` because it is borrowed @@ -12,9 +12,9 @@ error[E0506]: cannot assign to `*x` because it is borrowed | LL | let g = &x; | -- borrow of `*x` occurs here -LL | *x = 0; //~ ERROR cannot assign to `*x` which is behind a `&` reference +LL | *x = 0; | ^^^^^^ assignment to borrowed `*x` occurs here -LL | //~| ERROR cannot assign to `*x` because it is borrowed +LL | LL | g; | - borrow later used here diff --git a/src/test/ui/nll/issue-58299.stderr b/src/test/ui/nll/issue-58299.stderr index b87d0de51a3..0c69b70a97c 100644 --- a/src/test/ui/nll/issue-58299.stderr +++ b/src/test/ui/nll/issue-58299.stderr @@ -4,7 +4,7 @@ error: lifetime may not live long enough LL | fn foo<'a>(x: i32) { | -- lifetime `'a` defined here ... -LL | A::<'a>::X..=A::<'static>::X => (), //~ ERROR lifetime may not live long enough +LL | A::<'a>::X..=A::<'static>::X => (), | ^^^^^^^^^^ requires that `'a` must outlive `'static` error: lifetime may not live long enough @@ -13,7 +13,7 @@ error: lifetime may not live long enough LL | fn bar<'a>(x: i32) { | -- lifetime `'a` defined here ... -LL | A::<'static>::X..=A::<'a>::X => (), //~ ERROR lifetime may not live long enough +LL | A::<'static>::X..=A::<'a>::X => (), | ^^^^^^^^^^ requires that `'a` must outlive `'static` error: aborting due to 2 previous errors diff --git a/src/test/ui/nll/loan_ends_mid_block_vec.stderr b/src/test/ui/nll/loan_ends_mid_block_vec.stderr index 18d4e010946..a3f1391f001 100644 --- a/src/test/ui/nll/loan_ends_mid_block_vec.stderr +++ b/src/test/ui/nll/loan_ends_mid_block_vec.stderr @@ -66,7 +66,7 @@ LL | let slice = &mut data; ... LL | data.push('f'); | ^^^^ second mutable borrow occurs here -LL | //~^ ERROR (Ast) [E0499] +LL | LL | } | - first borrow ends here diff --git a/src/test/ui/nll/match-cfg-fake-edges.stderr b/src/test/ui/nll/match-cfg-fake-edges.stderr index a855b28a978..72c6a6cd420 100644 --- a/src/test/ui/nll/match-cfg-fake-edges.stderr +++ b/src/test/ui/nll/match-cfg-fake-edges.stderr @@ -1,7 +1,7 @@ error[E0381]: use of possibly uninitialized variable: `x` --> $DIR/match-cfg-fake-edges.rs:23:13 | -LL | x; //~ ERROR use of possibly uninitialized variable: `x` +LL | x; | ^ use of possibly uninitialized `x` error[E0382]: use of moved value: `x` @@ -13,7 +13,7 @@ LL | let x = String::new(); LL | false if { drop(x); true } => 1, | - value moved here LL | true => { -LL | x; //~ ERROR use of moved value: `x` +LL | x; | ^ value used here after move error[E0503]: cannot use `y.1` because it was mutably borrowed @@ -22,7 +22,7 @@ error[E0503]: cannot use `y.1` because it was mutably borrowed LL | let r = &mut y.1; | -------- borrow of `y.1` occurs here ... -LL | (false, true) => 1, //~ ERROR cannot use `y.1` because it was mutably borrowed +LL | (false, true) => 1, | ^^^^ use of borrowed `y.1` LL | (true, _) => { LL | r; diff --git a/src/test/ui/nll/match-guards-partially-borrow.stderr b/src/test/ui/nll/match-guards-partially-borrow.stderr index baff2fda9f5..a646b7d84bc 100644 --- a/src/test/ui/nll/match-guards-partially-borrow.stderr +++ b/src/test/ui/nll/match-guards-partially-borrow.stderr @@ -4,7 +4,7 @@ error[E0510]: cannot assign `q` in match guard LL | match q { | - value is immutable in match guard ... -LL | q = true; //~ ERROR +LL | q = true; | ^^^^^^^^ cannot assign error[E0510]: cannot assign `r` in match guard @@ -13,7 +13,7 @@ error[E0510]: cannot assign `r` in match guard LL | match r { | - value is immutable in match guard ... -LL | r = true; //~ ERROR +LL | r = true; | ^^^^^^^^ cannot assign error[E0510]: cannot assign `t` in match guard @@ -22,7 +22,7 @@ error[E0510]: cannot assign `t` in match guard LL | match t { | - value is immutable in match guard ... -LL | t = true; //~ ERROR +LL | t = true; | ^^^^^^^^ cannot assign error[E0510]: cannot mutably borrow `x.0` in match guard @@ -31,7 +31,7 @@ error[E0510]: cannot mutably borrow `x.0` in match guard LL | match x { | - value is immutable in match guard ... -LL | Some(ref mut r) => *r = None, //~ ERROR +LL | Some(ref mut r) => *r = None, | ^^^^^^^^^ cannot mutably borrow error[E0506]: cannot assign to `t` because it is borrowed @@ -39,7 +39,7 @@ error[E0506]: cannot assign to `t` because it is borrowed | LL | s if { | - borrow of `t` occurs here -LL | t = !t; //~ ERROR +LL | t = !t; | ^^^^^^ assignment to borrowed `t` occurs here LL | false LL | } => (), // What value should `s` have in the arm? @@ -51,7 +51,7 @@ error[E0510]: cannot assign `y` in match guard LL | match *y { | -- value is immutable in match guard ... -LL | y = &true; //~ ERROR +LL | y = &true; | ^^^^^^^^^ cannot assign error[E0510]: cannot assign `z` in match guard @@ -60,7 +60,7 @@ error[E0510]: cannot assign `z` in match guard LL | match z { | - value is immutable in match guard ... -LL | z = &true; //~ ERROR +LL | z = &true; | ^^^^^^^^^ cannot assign error[E0510]: cannot assign `a` in match guard @@ -69,7 +69,7 @@ error[E0510]: cannot assign `a` in match guard LL | match a { | - value is immutable in match guard ... -LL | a = &true; //~ ERROR +LL | a = &true; | ^^^^^^^^^ cannot assign error[E0510]: cannot assign `b` in match guard @@ -78,7 +78,7 @@ error[E0510]: cannot assign `b` in match guard LL | match b { | - value is immutable in match guard ... -LL | b = &true; //~ ERROR +LL | b = &true; | ^^^^^^^^^ cannot assign error: aborting due to 9 previous errors diff --git a/src/test/ui/nll/match-on-borrowed.stderr b/src/test/ui/nll/match-on-borrowed.stderr index 2d34dd7805d..e8db0626a7b 100644 --- a/src/test/ui/nll/match-on-borrowed.stderr +++ b/src/test/ui/nll/match-on-borrowed.stderr @@ -4,7 +4,7 @@ error[E0503]: cannot use `e` because it was mutably borrowed LL | E::V(ref mut x, _) => x, | --------- borrow of `e.0` occurs here ... -LL | E::V(_, r) => (), //~ ERROR +LL | E::V(_, r) => (), | ^^^^^^^^^^ use of borrowed `e.0` ... LL | x; @@ -16,7 +16,7 @@ error[E0503]: cannot use `*f` because it was mutably borrowed LL | E::V(ref mut x, _) => x, | --------- borrow of `f.0` occurs here ... -LL | E::V(_, r) => (), //~ ERROR +LL | E::V(_, r) => (), | ^^^^^^^^^^ use of borrowed `f.0` ... LL | x; @@ -28,7 +28,7 @@ error[E0503]: cannot use `t` because it was mutably borrowed LL | let x = &mut t; | ------ borrow of `t` occurs here LL | match t { -LL | true => (), //~ ERROR +LL | true => (), | ^^^^ use of borrowed `t` ... LL | x; @@ -37,7 +37,7 @@ LL | x; error[E0381]: use of possibly uninitialized variable: `n` --> $DIR/match-on-borrowed.rs:92:11 | -LL | match n {} //~ ERROR +LL | match n {} | ^ use of possibly uninitialized `n` error: aborting due to 4 previous errors diff --git a/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr b/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr index 3ff778675bc..e7755bdb89c 100644 --- a/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr +++ b/src/test/ui/nll/maybe-initialized-drop-implicit-fragment-drop.stderr @@ -4,7 +4,7 @@ error[E0506]: cannot assign to `x` because it is borrowed LL | let wrap = Wrap { p: &mut x }; | ------ borrow of `x` occurs here ... -LL | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] +LL | x = 1; | ^^^^^ assignment to borrowed `x` occurs here LL | // FIXME ^ Should not error in the future with implicit dtors, only manually implemented ones LL | } diff --git a/src/test/ui/nll/maybe-initialized-drop-with-fragment.stderr b/src/test/ui/nll/maybe-initialized-drop-with-fragment.stderr index 5585e69f090..e4efd98253c 100644 --- a/src/test/ui/nll/maybe-initialized-drop-with-fragment.stderr +++ b/src/test/ui/nll/maybe-initialized-drop-with-fragment.stderr @@ -4,7 +4,7 @@ error[E0506]: cannot assign to `x` because it is borrowed LL | let wrap = Wrap { p: &mut x }; | ------ borrow of `x` occurs here ... -LL | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] +LL | x = 1; | ^^^^^ assignment to borrowed `x` occurs here LL | } | - borrow might be used here, when `foo` is dropped and runs the destructor for type `Foo<'_>` diff --git a/src/test/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr b/src/test/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr index aa9544927f8..0e2be68c6d3 100644 --- a/src/test/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr +++ b/src/test/ui/nll/maybe-initialized-drop-with-uninitialized-fragments.stderr @@ -4,7 +4,7 @@ error[E0506]: cannot assign to `x` because it is borrowed LL | let wrap = Wrap { p: &mut x }; | ------ borrow of `x` occurs here ... -LL | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] +LL | x = 1; | ^^^^^ assignment to borrowed `x` occurs here LL | // FIXME ^ This currently errors and it should not. LL | } diff --git a/src/test/ui/nll/maybe-initialized-drop.stderr b/src/test/ui/nll/maybe-initialized-drop.stderr index 331f846dfd0..10b9a6dcf5a 100644 --- a/src/test/ui/nll/maybe-initialized-drop.stderr +++ b/src/test/ui/nll/maybe-initialized-drop.stderr @@ -3,7 +3,7 @@ error[E0506]: cannot assign to `x` because it is borrowed | LL | let wrap = Wrap { p: &mut x }; | ------ borrow of `x` occurs here -LL | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506] +LL | x = 1; | ^^^^^ assignment to borrowed `x` occurs here LL | } | - borrow might be used here, when `wrap` is dropped and runs the `Drop` code for type `Wrap` diff --git a/src/test/ui/nll/move-errors.stderr b/src/test/ui/nll/move-errors.stderr index 86bb8e3a4b3..f329748139e 100644 --- a/src/test/ui/nll/move-errors.stderr +++ b/src/test/ui/nll/move-errors.stderr @@ -87,7 +87,7 @@ LL | match x[0] { | | | cannot move out of here | help: consider borrowing here: `&x[0]` -LL | //~^ ERROR +LL | LL | B::U(d) => (), | - data moved here LL | B::V(s) => (), @@ -151,7 +151,7 @@ error[E0509]: cannot move out of type `F`, which implements the `Drop` trait | LL | match x { | ^ cannot move out of here -LL | //~^ ERROR +LL | LL | F(s, mut t) => (), | - ----- ...and here | | @@ -171,7 +171,7 @@ LL | match *x { | | | cannot move out of borrowed content | help: consider removing the `*`: `x` -LL | //~^ ERROR +LL | LL | Ok(s) | Err(s) => (), | - data moved here | diff --git a/src/test/ui/nll/move-subpaths-moves-root.stderr b/src/test/ui/nll/move-subpaths-moves-root.stderr index 8b52cc113cc..bdbc25e9ee3 100644 --- a/src/test/ui/nll/move-subpaths-moves-root.stderr +++ b/src/test/ui/nll/move-subpaths-moves-root.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `x` | LL | drop(x.0); | --- value moved here -LL | drop(x); //~ ERROR use of moved value +LL | drop(x); | ^ value used here after partial move | = note: move occurs because `x.0` has type `std::vec::Vec`, which does not implement the `Copy` trait diff --git a/src/test/ui/nll/polonius-smoke-test.stderr b/src/test/ui/nll/polonius-smoke-test.stderr index c4aab0b8b1d..fb3e9cfd259 100644 --- a/src/test/ui/nll/polonius-smoke-test.stderr +++ b/src/test/ui/nll/polonius-smoke-test.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return reference to local variable `x` --> $DIR/polonius-smoke-test.rs:7:5 | -LL | &x //~ ERROR +LL | &x | ^^ returns a reference to data owned by the current function error[E0503]: cannot use `x` because it was mutably borrowed @@ -9,7 +9,7 @@ error[E0503]: cannot use `x` because it was mutably borrowed | LL | let y = &mut x; | ------ borrow of `x` occurs here -LL | let z = x; //~ ERROR +LL | let z = x; | ^ use of borrowed `x` LL | let w = y; | - borrow later used here @@ -19,7 +19,7 @@ error[E0505]: cannot move out of `x` because it is borrowed | LL | let y = &mut *x; | ------- borrow of `*x` occurs here -LL | let z = x; //~ ERROR +LL | let z = x; | ^ move out of `x` occurs here LL | y | - borrow later used here @@ -30,7 +30,7 @@ error[E0505]: cannot move out of `s` because it is borrowed LL | let r = &mut *s; | ------- borrow of `*s` occurs here LL | let tmp = foo(&r); -LL | s; //~ ERROR +LL | s; | ^ move out of `s` occurs here LL | tmp; | --- borrow later used here diff --git a/src/test/ui/nll/promoted-bounds.stderr b/src/test/ui/nll/promoted-bounds.stderr index 9798f238fc4..de185cc0d29 100644 --- a/src/test/ui/nll/promoted-bounds.stderr +++ b/src/test/ui/nll/promoted-bounds.stderr @@ -4,7 +4,7 @@ error[E0597]: `l` does not live long enough LL | let ptr = { | --- borrow later stored here LL | let l = 3; -LL | let b = &l; //~ ERROR does not live long enough +LL | let b = &l; | ^^ borrowed value does not live long enough ... LL | }; diff --git a/src/test/ui/nll/promoted-closure-pair.stderr b/src/test/ui/nll/promoted-closure-pair.stderr index 5f4a6037668..b04d1a9ccba 100644 --- a/src/test/ui/nll/promoted-closure-pair.stderr +++ b/src/test/ui/nll/promoted-closure-pair.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return value referencing local variable `z` --> $DIR/promoted-closure-pair.rs:9:5 | -LL | p.1(&z) //~ ERROR cannot return +LL | p.1(&z) | ^^^^--^ | | | | | `z` is borrowed here diff --git a/src/test/ui/nll/relate_tys/universe-violation.stderr b/src/test/ui/nll/relate_tys/universe-violation.stderr index 0a2e0ed7b2d..6dc78789564 100644 --- a/src/test/ui/nll/relate_tys/universe-violation.stderr +++ b/src/test/ui/nll/relate_tys/universe-violation.stderr @@ -1,7 +1,7 @@ error: higher-ranked subtype error --> $DIR/universe-violation.rs:15:31 | -LL | let b: fn(&u32) -> &u32 = a; //~ ERROR higher-ranked subtype error +LL | let b: fn(&u32) -> &u32 = a; | ^ error: aborting due to previous error diff --git a/src/test/ui/nll/relate_tys/var-appears-twice.stderr b/src/test/ui/nll/relate_tys/var-appears-twice.stderr index da693045576..7c078d226dc 100644 --- a/src/test/ui/nll/relate_tys/var-appears-twice.stderr +++ b/src/test/ui/nll/relate_tys/var-appears-twice.stderr @@ -1,7 +1,7 @@ error[E0597]: `b` does not live long enough --> $DIR/var-appears-twice.rs:23:38 | -LL | let x: DoubleCell<_> = make_cell(&b); //~ ERROR +LL | let x: DoubleCell<_> = make_cell(&b); | ------------- ^^ borrowed value does not live long enough | | | type annotation requires that `b` is borrowed for `'static` diff --git a/src/test/ui/nll/return-ref-mut-issue-46557.stderr b/src/test/ui/nll/return-ref-mut-issue-46557.stderr index 7603d8b5bb5..cc201136ff2 100644 --- a/src/test/ui/nll/return-ref-mut-issue-46557.stderr +++ b/src/test/ui/nll/return-ref-mut-issue-46557.stderr @@ -3,7 +3,7 @@ error[E0515]: cannot return value referencing temporary value | LL | let ref mut x = 1234543; | ------- temporary value created here -LL | x //~ ERROR cannot return value referencing temporary value [E0515] +LL | x | ^ returns a value referencing data owned by the current function error: aborting due to previous error diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr index fc7a4570a18..a7679aac219 100644 --- a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr @@ -21,7 +21,7 @@ LL | | where LL | | T: Iterator, LL | | { LL | | with_signature(x, |mut y| Box::new(y.next())) -LL | | //~^ ERROR the associated type `::Item` may not live long enough +LL | | LL | | } | |_^ | @@ -93,7 +93,7 @@ LL | | where LL | | T: 'b + Iterator, LL | | { LL | | with_signature(x, |mut y| Box::new(y.next())) -LL | | //~^ ERROR the associated type `::Item` may not live long enough +LL | | LL | | } | |_^ | diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr index e8283d1ab5d..7ba7164b35b 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr @@ -23,7 +23,7 @@ LL | | where LL | | T: Anything<'b>, LL | | { ... | -LL | | //~| ERROR +LL | | LL | | } | |_^ | @@ -76,7 +76,7 @@ LL | | where LL | | T: Anything<'b>, LL | | 'a: 'a, ... | -LL | | //~| ERROR +LL | | LL | | } | |_^ | diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr index 78a8c803dd9..63ead49adfc 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr @@ -22,7 +22,7 @@ LL | | where LL | | T: Anything<'b>, LL | | { LL | | with_signature(cell, t, |cell, t| require(cell, t)); -LL | | //~^ ERROR +LL | | LL | | } | |_^ | @@ -66,7 +66,7 @@ LL | | where LL | | T: Anything<'b>, LL | | 'a: 'a, ... | -LL | | //~^ ERROR +LL | | LL | | } | |_^ | diff --git a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr index d8725dc4284..f5daae28670 100644 --- a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr @@ -23,7 +23,7 @@ LL | | where LL | | T: Anything<'b, 'c>, LL | | { LL | | with_signature(cell, t, |cell, t| require(cell, t)); -LL | | //~^ ERROR associated type `>::AssocType` may not live long enough +LL | | LL | | } | |_^ | @@ -66,7 +66,7 @@ LL | | where LL | | T: Anything<'b, 'c>, LL | | 'a: 'a, ... | -LL | | //~^ ERROR associated type `>::AssocType` may not live long enough +LL | | LL | | } | |_^ | @@ -217,7 +217,7 @@ LL | | where LL | | T: Anything<'b, 'b>, LL | | { LL | | with_signature(cell, t, |cell, t| require(cell, t)); -LL | | //~^ ERROR lifetime may not live long enough +LL | | LL | | } | |_^ | diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr index 597b096dbe6..1aed0a545b4 100644 --- a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr +++ b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-bound.stderr @@ -1,7 +1,7 @@ error[E0309]: the associated type `>::Output` may not live long enough --> $DIR/projection-where-clause-env-wrong-bound.rs:17:5 | -LL | bar::() //~ ERROR may not live long enough +LL | bar::() | ^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `>::Output: 'a`... diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-none.stderr b/src/test/ui/nll/ty-outlives/projection-where-clause-none.stderr index 3c2ac474778..8175c302155 100644 --- a/src/test/ui/nll/ty-outlives/projection-where-clause-none.stderr +++ b/src/test/ui/nll/ty-outlives/projection-where-clause-none.stderr @@ -1,7 +1,7 @@ error[E0309]: the parameter type `T` may not live long enough --> $DIR/projection-where-clause-none.rs:16:5 | -LL | bar::() //~ ERROR the parameter type `T` may not live long enough +LL | bar::() | ^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `T: 'a`... diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr index 24bd97f0469..41c2916dca3 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr @@ -45,7 +45,7 @@ note: No external requirements | LL | / fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) { LL | | twice(cell, value, |a, b| invoke(a, b)); -LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | LL | | } | |_^ | diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr index 30c1dbc9027..6a201b8523a 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr @@ -21,7 +21,7 @@ LL | | where LL | | T: Debug, LL | | { ... | -LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | LL | | } | |_^ | diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr index a76a9463cc8..4ddc54717fb 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr @@ -3,7 +3,7 @@ note: External requirements | LL | with_signature(a, b, |x, y| { | __________________________^ -LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | LL | | // LL | | // See `correct_region`, which explains the point of this ... | @@ -25,7 +25,7 @@ note: No external requirements | LL | / fn no_region<'a, T>(a: Cell<&'a ()>, b: T) { LL | | with_signature(a, b, |x, y| { -LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | LL | | // ... | LL | | }) @@ -41,7 +41,7 @@ error[E0309]: the parameter type `T` may not live long enough | LL | with_signature(a, b, |x, y| { | __________________________^ -LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | LL | | // LL | | // See `correct_region`, which explains the point of this ... | @@ -95,7 +95,7 @@ note: External requirements | LL | with_signature(a, b, |x, y| { | __________________________^ -LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | LL | | // See `correct_region` LL | | require(&x, &y) LL | | }) @@ -133,7 +133,7 @@ error[E0309]: the parameter type `T` may not live long enough | LL | with_signature(a, b, |x, y| { | __________________________^ -LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | LL | | // See `correct_region` LL | | require(&x, &y) LL | | }) diff --git a/src/test/ui/nll/ty-outlives/wf-unreachable.stderr b/src/test/ui/nll/ty-outlives/wf-unreachable.stderr index 14642a1e615..9128fd16479 100644 --- a/src/test/ui/nll/ty-outlives/wf-unreachable.stderr +++ b/src/test/ui/nll/ty-outlives/wf-unreachable.stderr @@ -4,7 +4,7 @@ error: lifetime may not live long enough LL | fn uninit<'a>() { | -- lifetime `'a` defined here LL | return; -LL | let x: &'static &'a (); //~ ERROR lifetime may not live long enough +LL | let x: &'static &'a (); | ^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static` error: lifetime may not live long enough @@ -13,7 +13,7 @@ error: lifetime may not live long enough LL | fn var_type<'a>() { | -- lifetime `'a` defined here LL | return; -LL | let x: &'static &'a () = &&(); //~ ERROR lifetime may not live long enough +LL | let x: &'static &'a () = &&(); | ^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static` error: lifetime may not live long enough @@ -21,7 +21,7 @@ error: lifetime may not live long enough | LL | fn uninit_infer<'a>() { | -- lifetime `'a` defined here -LL | let x: &'static &'a _; //~ ERROR lifetime may not live long enough +LL | let x: &'static &'a _; | ^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static` error: lifetime may not live long enough @@ -30,7 +30,7 @@ error: lifetime may not live long enough LL | fn infer<'a>() { | -- lifetime `'a` defined here LL | return; -LL | let x: &'static &'a _ = &&(); //~ ERROR lifetime may not live long enough +LL | let x: &'static &'a _ = &&(); | ^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static` error: lifetime may not live long enough @@ -39,7 +39,7 @@ error: lifetime may not live long enough LL | fn uninit_no_var<'a>() { | -- lifetime `'a` defined here LL | return; -LL | let _: &'static &'a (); //~ ERROR lifetime may not live long enough +LL | let _: &'static &'a (); | ^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static` error: lifetime may not live long enough @@ -48,7 +48,7 @@ error: lifetime may not live long enough LL | fn no_var<'a>() { | -- lifetime `'a` defined here LL | return; -LL | let _: &'static &'a () = &&(); //~ ERROR lifetime may not live long enough +LL | let _: &'static &'a () = &&(); | ^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static` error: lifetime may not live long enough @@ -57,7 +57,7 @@ error: lifetime may not live long enough LL | fn infer_no_var<'a>() { | -- lifetime `'a` defined here LL | return; -LL | let _: &'static &'a _ = &&(); //~ ERROR lifetime may not live long enough +LL | let _: &'static &'a _ = &&(); | ^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static` error: lifetime may not live long enough @@ -66,7 +66,7 @@ error: lifetime may not live long enough LL | fn required_substs<'a>() { | -- lifetime `'a` defined here LL | return; -LL | let _: C<'static, 'a, _> = C((), &(), &()); //~ ERROR lifetime may not live long enough +LL | let _: C<'static, 'a, _> = C((), &(), &()); | ^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static` error: aborting due to 8 previous errors diff --git a/src/test/ui/nll/type-alias-free-regions.stderr b/src/test/ui/nll/type-alias-free-regions.stderr index bcd141bb406..4facc2d0da0 100644 --- a/src/test/ui/nll/type-alias-free-regions.stderr +++ b/src/test/ui/nll/type-alias-free-regions.stderr @@ -5,7 +5,7 @@ LL | impl<'a> FromBox<'a> for C<'a> { | -- lifetime `'a` defined here LL | fn from_box(b: Box) -> Self { | - has type `std::boxed::Box>` -LL | C { f: b } //~ ERROR +LL | C { f: b } | ^^^^^^^^^^ returning this value requires that `'1` must outlive `'a` error: lifetime may not live long enough @@ -15,7 +15,7 @@ LL | impl<'a> FromTuple<'a> for C<'a> { | -- lifetime `'a` defined here LL | fn from_tuple(b: (B,)) -> Self { | - has type `(std::boxed::Box<&'1 isize>,)` -LL | C { f: Box::new(b.0) } //~ ERROR +LL | C { f: Box::new(b.0) } | ^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'a` error: aborting due to 2 previous errors diff --git a/src/test/ui/nll/type-check-pointer-coercions.stderr b/src/test/ui/nll/type-check-pointer-coercions.stderr index 3b8d9942124..9aa78dfbd4a 100644 --- a/src/test/ui/nll/type-check-pointer-coercions.stderr +++ b/src/test/ui/nll/type-check-pointer-coercions.stderr @@ -5,7 +5,7 @@ LL | fn shared_to_const<'a, 'b>(x: &&'a i32) -> *const &'b i32 { | -- -- lifetime `'b` defined here | | | lifetime `'a` defined here -LL | x //~ ERROR +LL | x | ^ returning this value requires that `'a` must outlive `'b` error: lifetime may not live long enough @@ -15,7 +15,7 @@ LL | fn unique_to_const<'a, 'b>(x: &mut &'a i32) -> *const &'b i32 { | -- -- lifetime `'b` defined here | | | lifetime `'a` defined here -LL | x //~ ERROR +LL | x | ^ returning this value requires that `'a` must outlive `'b` error: lifetime may not live long enough @@ -26,7 +26,7 @@ LL | fn unique_to_mut<'a, 'b>(x: &mut &'a i32) -> *mut &'b i32 { | | | lifetime `'a` defined here LL | // Two errors because *mut is invariant -LL | x //~ ERROR +LL | x | ^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b` error: lifetime may not live long enough @@ -37,7 +37,7 @@ LL | fn unique_to_mut<'a, 'b>(x: &mut &'a i32) -> *mut &'b i32 { | | | lifetime `'a` defined here LL | // Two errors because *mut is invariant -LL | x //~ ERROR +LL | x | ^ returning this value requires that `'a` must outlive `'b` error: lifetime may not live long enough @@ -47,7 +47,7 @@ LL | fn mut_to_const<'a, 'b>(x: *mut &'a i32) -> *const &'b i32 { | -- -- lifetime `'b` defined here | | | lifetime `'a` defined here -LL | x //~ ERROR +LL | x | ^ returning this value requires that `'a` must outlive `'b` error: lifetime may not live long enough @@ -58,7 +58,7 @@ LL | fn array_elem<'a, 'b>(x: &'a i32) -> *const &'b i32 { | | | lifetime `'a` defined here ... -LL | y //~ ERROR +LL | y | ^ returning this value requires that `'a` must outlive `'b` error: lifetime may not live long enough @@ -69,7 +69,7 @@ LL | fn array_coerce<'a, 'b>(x: &'a i32) -> *const [&'b i32; 3] { | | | lifetime `'a` defined here ... -LL | y //~ ERROR +LL | y | ^ returning this value requires that `'a` must outlive `'b` error: lifetime may not live long enough @@ -80,7 +80,7 @@ LL | fn nested_array<'a, 'b>(x: &'a i32) -> *const [&'b i32; 2] { | | | lifetime `'a` defined here ... -LL | y //~ ERROR +LL | y | ^ returning this value requires that `'a` must outlive `'b` error: aborting due to 8 previous errors diff --git a/src/test/ui/nll/user-annotations/adt-brace-enums.stderr b/src/test/ui/nll/user-annotations/adt-brace-enums.stderr index fd1a4b96fe3..38f068746a6 100644 --- a/src/test/ui/nll/user-annotations/adt-brace-enums.stderr +++ b/src/test/ui/nll/user-annotations/adt-brace-enums.stderr @@ -1,7 +1,7 @@ error[E0597]: `c` does not live long enough --> $DIR/adt-brace-enums.rs:27:48 | -LL | SomeEnum::SomeVariant::<&'static u32> { t: &c }; //~ ERROR +LL | SomeEnum::SomeVariant::<&'static u32> { t: &c }; | ^^ | | | borrowed value does not live long enough @@ -15,7 +15,7 @@ error[E0597]: `c` does not live long enough LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here LL | let c = 66; -LL | SomeEnum::SomeVariant::<&'a u32> { t: &c }; //~ ERROR +LL | SomeEnum::SomeVariant::<&'a u32> { t: &c }; | ^^ | | | borrowed value does not live long enough @@ -29,7 +29,7 @@ error[E0597]: `c` does not live long enough LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | -- lifetime `'a` defined here ... -LL | SomeEnum::SomeVariant::<&'a u32> { t: &c }; //~ ERROR +LL | SomeEnum::SomeVariant::<&'a u32> { t: &c }; | ^^ | | | borrowed value does not live long enough diff --git a/src/test/ui/nll/user-annotations/adt-brace-structs.stderr b/src/test/ui/nll/user-annotations/adt-brace-structs.stderr index e614e00ac00..25a9de480b2 100644 --- a/src/test/ui/nll/user-annotations/adt-brace-structs.stderr +++ b/src/test/ui/nll/user-annotations/adt-brace-structs.stderr @@ -1,7 +1,7 @@ error[E0597]: `c` does not live long enough --> $DIR/adt-brace-structs.rs:25:37 | -LL | SomeStruct::<&'static u32> { t: &c }; //~ ERROR +LL | SomeStruct::<&'static u32> { t: &c }; | ^^ | | | borrowed value does not live long enough @@ -15,7 +15,7 @@ error[E0597]: `c` does not live long enough LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here LL | let c = 66; -LL | SomeStruct::<&'a u32> { t: &c }; //~ ERROR +LL | SomeStruct::<&'a u32> { t: &c }; | ^^ | | | borrowed value does not live long enough @@ -29,7 +29,7 @@ error[E0597]: `c` does not live long enough LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | -- lifetime `'a` defined here ... -LL | SomeStruct::<&'a u32> { t: &c }; //~ ERROR +LL | SomeStruct::<&'a u32> { t: &c }; | ^^ | | | borrowed value does not live long enough diff --git a/src/test/ui/nll/user-annotations/adt-nullary-enums.stderr b/src/test/ui/nll/user-annotations/adt-nullary-enums.stderr index c72e56c619f..1afbac7c4b2 100644 --- a/src/test/ui/nll/user-annotations/adt-nullary-enums.stderr +++ b/src/test/ui/nll/user-annotations/adt-nullary-enums.stderr @@ -1,7 +1,7 @@ error[E0597]: `c` does not live long enough --> $DIR/adt-nullary-enums.rs:34:41 | -LL | SomeEnum::SomeVariant(Cell::new(&c)), //~ ERROR +LL | SomeEnum::SomeVariant(Cell::new(&c)), | ----------^^- | | | | | borrowed value does not live long enough @@ -16,7 +16,7 @@ error[E0597]: `c` does not live long enough LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here ... -LL | SomeEnum::SomeVariant(Cell::new(&c)), //~ ERROR +LL | SomeEnum::SomeVariant(Cell::new(&c)), | ----------^^- | | | | | borrowed value does not live long enough @@ -31,7 +31,7 @@ error[E0597]: `c` does not live long enough LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | -- lifetime `'a` defined here ... -LL | SomeEnum::SomeVariant(Cell::new(&c)), //~ ERROR +LL | SomeEnum::SomeVariant(Cell::new(&c)), | ----------^^- | | | | | borrowed value does not live long enough diff --git a/src/test/ui/nll/user-annotations/adt-tuple-enums.stderr b/src/test/ui/nll/user-annotations/adt-tuple-enums.stderr index dc5b5a0dd7f..cd625653ace 100644 --- a/src/test/ui/nll/user-annotations/adt-tuple-enums.stderr +++ b/src/test/ui/nll/user-annotations/adt-tuple-enums.stderr @@ -1,7 +1,7 @@ error[E0597]: `c` does not live long enough --> $DIR/adt-tuple-enums.rs:29:43 | -LL | SomeEnum::SomeVariant::<&'static u32>(&c); //~ ERROR +LL | SomeEnum::SomeVariant::<&'static u32>(&c); | ^^ | | | borrowed value does not live long enough @@ -15,7 +15,7 @@ error[E0597]: `c` does not live long enough LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here LL | let c = 66; -LL | SomeEnum::SomeVariant::<&'a u32>(&c); //~ ERROR +LL | SomeEnum::SomeVariant::<&'a u32>(&c); | ^^ | | | borrowed value does not live long enough @@ -29,7 +29,7 @@ error[E0597]: `c` does not live long enough LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | -- lifetime `'a` defined here ... -LL | SomeEnum::SomeVariant::<&'a u32>(&c); //~ ERROR +LL | SomeEnum::SomeVariant::<&'a u32>(&c); | ^^ | | | borrowed value does not live long enough diff --git a/src/test/ui/nll/user-annotations/adt-tuple-struct.stderr b/src/test/ui/nll/user-annotations/adt-tuple-struct.stderr index 38acfcb4b61..2bb58bb2590 100644 --- a/src/test/ui/nll/user-annotations/adt-tuple-struct.stderr +++ b/src/test/ui/nll/user-annotations/adt-tuple-struct.stderr @@ -1,7 +1,7 @@ error[E0597]: `c` does not live long enough --> $DIR/adt-tuple-struct.rs:25:32 | -LL | SomeStruct::<&'static u32>(&c); //~ ERROR +LL | SomeStruct::<&'static u32>(&c); | ^^ | | | borrowed value does not live long enough @@ -15,7 +15,7 @@ error[E0597]: `c` does not live long enough LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here LL | let c = 66; -LL | SomeStruct::<&'a u32>(&c); //~ ERROR +LL | SomeStruct::<&'a u32>(&c); | ^^ | | | borrowed value does not live long enough @@ -29,7 +29,7 @@ error[E0597]: `c` does not live long enough LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | -- lifetime `'a` defined here ... -LL | SomeStruct::<&'a u32>(&c); //~ ERROR +LL | SomeStruct::<&'a u32>(&c); | ^^ | | | borrowed value does not live long enough diff --git a/src/test/ui/nll/user-annotations/cast_static_lifetime.stderr b/src/test/ui/nll/user-annotations/cast_static_lifetime.stderr index 7e795ce17a8..0228b56d761 100644 --- a/src/test/ui/nll/user-annotations/cast_static_lifetime.stderr +++ b/src/test/ui/nll/user-annotations/cast_static_lifetime.stderr @@ -1,7 +1,7 @@ error[E0597]: `x` does not live long enough --> $DIR/cast_static_lifetime.rs:6:19 | -LL | let y: &u32 = (&x) as &'static u32; //~ ERROR `x` does not live long enough +LL | let y: &u32 = (&x) as &'static u32; | ^^^^---------------- | | | borrowed value does not live long enough diff --git a/src/test/ui/nll/user-annotations/closure-substs.stderr b/src/test/ui/nll/user-annotations/closure-substs.stderr index a46ab61418e..55bb3a6090c 100644 --- a/src/test/ui/nll/user-annotations/closure-substs.stderr +++ b/src/test/ui/nll/user-annotations/closure-substs.stderr @@ -4,7 +4,7 @@ error: lifetime may not live long enough LL | fn foo<'a>() { | -- lifetime `'a` defined here ... -LL | return x; //~ ERROR lifetime may not live long enough +LL | return x; | ^ returning this value requires that `'a` must outlive `'static` error: lifetime may not live long enough @@ -12,7 +12,7 @@ error: lifetime may not live long enough | LL | |x: &i32| -> &'static i32 { | - let's call the lifetime of this reference `'1` -LL | return x; //~ ERROR lifetime may not live long enough +LL | return x; | ^ returning this value requires that `'1` must outlive `'static` error: lifetime may not live long enough @@ -21,7 +21,7 @@ error: lifetime may not live long enough LL | fn bar<'a>() { | -- lifetime `'a` defined here ... -LL | b(x); //~ ERROR lifetime may not live long enough +LL | b(x); | ^^^^ argument requires that `'a` must outlive `'static` error[E0521]: borrowed data escapes outside of closure @@ -29,7 +29,7 @@ error[E0521]: borrowed data escapes outside of closure | LL | |x: &i32, b: fn(&'static i32)| { | - `x` is a reference that is only valid in the closure body -LL | b(x); //~ ERROR borrowed data escapes outside of closure +LL | b(x); | ^^^^ `x` escapes the closure body here error: aborting due to 4 previous errors diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr index 541a7113ec7..9a28fbd1133 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr +++ b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr @@ -3,7 +3,7 @@ error: lifetime may not live long enough | LL | fn foo<'a>(_: &'a u32) -> &'static u32 { | -- lifetime `'a` defined here -LL | >::C //~ ERROR +LL | >::C | ^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` error: aborting due to previous error diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.stderr index 57cfaa2db04..07e2e1e85cb 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.stderr +++ b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-2.stderr @@ -1,7 +1,7 @@ error[E0597]: `x` does not live long enough --> $DIR/constant-in-expr-inherent-2.rs:25:9 | -LL | FUN(&x); //~ ERROR `x` does not live long enough +LL | FUN(&x); | ----^^- | | | | | borrowed value does not live long enough @@ -13,7 +13,7 @@ LL | } error[E0597]: `x` does not live long enough --> $DIR/constant-in-expr-inherent-2.rs:26:23 | -LL | A::ASSOCIATED_FUN(&x); //~ ERROR `x` does not live long enough +LL | A::ASSOCIATED_FUN(&x); | ------------------^^- | | | | | borrowed value does not live long enough @@ -25,19 +25,19 @@ LL | } error[E0597]: `x` does not live long enough --> $DIR/constant-in-expr-inherent-2.rs:27:28 | -LL | B::ALSO_ASSOCIATED_FUN(&x); //~ ERROR `x` does not live long enough +LL | B::ALSO_ASSOCIATED_FUN(&x); | -----------------------^^- | | | | | borrowed value does not live long enough | argument requires that `x` is borrowed for `'static` -LL | <_>::TRAIT_ASSOCIATED_FUN(&x); //~ ERROR `x` does not live long enough +LL | <_>::TRAIT_ASSOCIATED_FUN(&x); LL | } | - `x` dropped here while still borrowed error[E0597]: `x` does not live long enough --> $DIR/constant-in-expr-inherent-2.rs:28:31 | -LL | <_>::TRAIT_ASSOCIATED_FUN(&x); //~ ERROR `x` does not live long enough +LL | <_>::TRAIT_ASSOCIATED_FUN(&x); | --------------------------^^- | | | | | borrowed value does not live long enough diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-normalize.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-normalize.stderr index 5b97c12b626..5e66a30d7c3 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-normalize.stderr +++ b/src/test/ui/nll/user-annotations/constant-in-expr-normalize.stderr @@ -3,7 +3,7 @@ error: lifetime may not live long enough | LL | fn foo<'a>(_: &'a u32) -> &'static u32 { | -- lifetime `'a` defined here -LL | <() as Foo<'a>>::C //~ ERROR +LL | <() as Foo<'a>>::C | ^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` error: aborting due to previous error diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr index 10e48b5bc34..c96838f259a 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr +++ b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr @@ -3,7 +3,7 @@ error: lifetime may not live long enough | LL | fn foo<'a>(_: &'a u32) -> &'static u32 { | -- lifetime `'a` defined here -LL | <() as Foo<'a>>::C //~ ERROR +LL | <() as Foo<'a>>::C | ^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` error: aborting due to previous error diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr index 5bfa32ec644..fcc3c40e43f 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr +++ b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr @@ -3,7 +3,7 @@ error: lifetime may not live long enough | LL | fn foo<'a, T: Foo<'a>>() -> &'static u32 { | -- lifetime `'a` defined here -LL | >::C //~ ERROR +LL | >::C | ^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` error: aborting due to previous error diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr index a1e60db05d0..c91370c810c 100644 --- a/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr +++ b/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.stderr @@ -3,7 +3,7 @@ error: lifetime may not live long enough | LL | fn foo<'a, T: Foo<'a>>() -> &'static u32 { | -- lifetime `'a` defined here -LL | T::C //~ ERROR +LL | T::C | ^^^^ returning this value requires that `'a` must outlive `'static` error: aborting due to previous error diff --git a/src/test/ui/nll/user-annotations/dump-adt-brace-struct.stderr b/src/test/ui/nll/user-annotations/dump-adt-brace-struct.stderr index 6e24da094e0..ae123b8ab54 100644 --- a/src/test/ui/nll/user-annotations/dump-adt-brace-struct.stderr +++ b/src/test/ui/nll/user-annotations/dump-adt-brace-struct.stderr @@ -1,7 +1,7 @@ error: user substs: UserSubsts { substs: [&ReStatic u32], user_self_ty: None } --> $DIR/dump-adt-brace-struct.rs:20:5 | -LL | SomeStruct::<&'static u32> { t: &22 }; //~ ERROR [&ReStatic u32] +LL | SomeStruct::<&'static u32> { t: &22 }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/nll/user-annotations/dump-fn-method.stderr b/src/test/ui/nll/user-annotations/dump-fn-method.stderr index 04ceb8e5f84..631bcde4ee8 100644 --- a/src/test/ui/nll/user-annotations/dump-fn-method.stderr +++ b/src/test/ui/nll/user-annotations/dump-fn-method.stderr @@ -1,25 +1,25 @@ error: user substs: UserSubsts { substs: [&ReStatic u32], user_self_ty: None } --> $DIR/dump-fn-method.rs:30:13 | -LL | let x = foo::<&'static u32>; //~ ERROR [&ReStatic u32] +LL | let x = foo::<&'static u32>; | ^^^^^^^^^^^^^^^^^^^ error: user substs: UserSubsts { substs: [^0, u32, ^1], user_self_ty: None } --> $DIR/dump-fn-method.rs:36:13 | -LL | let x = <_ as Bazoom>::method::<_>; //~ ERROR [^0, u32, ^1] +LL | let x = <_ as Bazoom>::method::<_>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: user substs: UserSubsts { substs: [u8, &ReStatic u16, u32], user_self_ty: None } --> $DIR/dump-fn-method.rs:45:13 | -LL | let x = >::method::; //~ ERROR [u8, &ReStatic u16, u32] +LL | let x = >::method::; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: user substs: UserSubsts { substs: [^0, ^1, u32], user_self_ty: None } --> $DIR/dump-fn-method.rs:53:5 | -LL | y.method::(44, 66); //~ ERROR [^0, ^1, u32] +LL | y.method::(44, 66); | ^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/nll/user-annotations/fns.stderr b/src/test/ui/nll/user-annotations/fns.stderr index 65af2f68bcf..dadce24159e 100644 --- a/src/test/ui/nll/user-annotations/fns.stderr +++ b/src/test/ui/nll/user-annotations/fns.stderr @@ -1,7 +1,7 @@ error[E0597]: `c` does not live long enough --> $DIR/fns.rs:25:29 | -LL | some_fn::<&'static u32>(&c); //~ ERROR +LL | some_fn::<&'static u32>(&c); | ------------------------^^- | | | | | borrowed value does not live long enough @@ -15,7 +15,7 @@ error[E0597]: `c` does not live long enough LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here LL | let c = 66; -LL | some_fn::<&'a u32>(&c); //~ ERROR +LL | some_fn::<&'a u32>(&c); | -------------------^^- | | | | | borrowed value does not live long enough @@ -29,7 +29,7 @@ error[E0597]: `c` does not live long enough LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | -- lifetime `'a` defined here ... -LL | some_fn::<&'a u32>(&c); //~ ERROR +LL | some_fn::<&'a u32>(&c); | -------------------^^- | | | | | borrowed value does not live long enough diff --git a/src/test/ui/nll/user-annotations/inherent-associated-constants.stderr b/src/test/ui/nll/user-annotations/inherent-associated-constants.stderr index 785b39ec887..76845469898 100644 --- a/src/test/ui/nll/user-annotations/inherent-associated-constants.stderr +++ b/src/test/ui/nll/user-annotations/inherent-associated-constants.stderr @@ -3,7 +3,7 @@ error: lifetime may not live long enough | LL | fn non_wf_associated_const<'a>(x: i32) { | -- lifetime `'a` defined here -LL | A::<'a>::IC; //~ ERROR lifetime may not live long enough +LL | A::<'a>::IC; | ^^^^^^^^^^^ requires that `'a` must outlive `'static` error: aborting due to previous error diff --git a/src/test/ui/nll/user-annotations/issue-54124.stderr b/src/test/ui/nll/user-annotations/issue-54124.stderr index b1c2411e46c..6cfccf7cb69 100644 --- a/src/test/ui/nll/user-annotations/issue-54124.stderr +++ b/src/test/ui/nll/user-annotations/issue-54124.stderr @@ -3,7 +3,7 @@ error: lifetime may not live long enough | LL | fn test<'a>() { | -- lifetime `'a` defined here -LL | let _:fn(&()) = |_:&'a ()| {}; //~ ERROR lifetime may not live long enough +LL | let _:fn(&()) = |_:&'a ()| {}; | ^ - let's call the lifetime of this reference `'1` | | | requires that `'1` must outlive `'a` @@ -13,7 +13,7 @@ error: lifetime may not live long enough | LL | fn test<'a>() { | -- lifetime `'a` defined here -LL | let _:fn(&()) = |_:&'a ()| {}; //~ ERROR lifetime may not live long enough +LL | let _:fn(&()) = |_:&'a ()| {}; | ^ requires that `'a` must outlive `'static` error: aborting due to 2 previous errors diff --git a/src/test/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.stderr b/src/test/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.stderr index 76be637220a..c99f53c5aa4 100644 --- a/src/test/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.stderr +++ b/src/test/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.stderr @@ -4,7 +4,7 @@ error: lifetime may not live long enough LL | fn coupled_wilds_rhs<'a>(_x: &'a u32, s: &'static u32) -> &'static u32 { | -- lifetime `'a` defined here LL | let ((y, _z),) = ((s, _x),): (PairCoupledTypes<_>,); -LL | y //~ ERROR lifetime may not live long enough +LL | y | ^ returning this value requires that `'a` must outlive `'static` error: lifetime may not live long enough @@ -13,7 +13,7 @@ error: lifetime may not live long enough LL | fn coupled_regions_rhs<'a>(_x: &'a u32, s: &'static u32) -> &'static u32 { | -- lifetime `'a` defined here LL | let ((y, _z),) = ((s, _x),): (PairCoupledRegions<_>,); -LL | y //~ ERROR lifetime may not live long enough +LL | y | ^ returning this value requires that `'a` must outlive `'static` error: lifetime may not live long enough @@ -22,7 +22,7 @@ error: lifetime may not live long enough LL | fn cast_coupled_wilds_rhs<'a>(_x: &'a u32, s: &'static u32) -> &'static u32 { | -- lifetime `'a` defined here LL | let ((y, _z),) = ((s, _x),) as (PairCoupledTypes<_>,); -LL | y //~ ERROR lifetime may not live long enough +LL | y | ^ returning this value requires that `'a` must outlive `'static` error: lifetime may not live long enough @@ -31,7 +31,7 @@ error: lifetime may not live long enough LL | fn cast_coupled_regions_rhs<'a>(_x: &'a u32, s: &'static u32) -> &'static u32 { | -- lifetime `'a` defined here LL | let ((y, _z),) = ((s, _x),) as (PairCoupledRegions<_>,); -LL | y //~ ERROR lifetime may not live long enough +LL | y | ^ returning this value requires that `'a` must outlive `'static` error: aborting due to 4 previous errors diff --git a/src/test/ui/nll/user-annotations/method-call.stderr b/src/test/ui/nll/user-annotations/method-call.stderr index 2e23e6e2a65..7e5314614f3 100644 --- a/src/test/ui/nll/user-annotations/method-call.stderr +++ b/src/test/ui/nll/user-annotations/method-call.stderr @@ -1,7 +1,7 @@ error[E0597]: `c` does not live long enough --> $DIR/method-call.rs:38:34 | -LL | a.method::<&'static u32>(b, &c); //~ ERROR +LL | a.method::<&'static u32>(b, &c); | -----------------------------^^- | | | | | borrowed value does not live long enough @@ -15,7 +15,7 @@ error[E0597]: `c` does not live long enough LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here ... -LL | a.method::<&'a u32>(b, &c); //~ ERROR +LL | a.method::<&'a u32>(b, &c); | ------------------------^^- | | | | | borrowed value does not live long enough @@ -29,7 +29,7 @@ error[E0597]: `c` does not live long enough LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | -- lifetime `'a` defined here ... -LL | a.method::<&'a u32>(b, &c); //~ ERROR +LL | a.method::<&'a u32>(b, &c); | ------------------------^^- | | | | | borrowed value does not live long enough diff --git a/src/test/ui/nll/user-annotations/method-ufcs-1.stderr b/src/test/ui/nll/user-annotations/method-ufcs-1.stderr index 30cf01f54bd..12b02ba33f7 100644 --- a/src/test/ui/nll/user-annotations/method-ufcs-1.stderr +++ b/src/test/ui/nll/user-annotations/method-ufcs-1.stderr @@ -1,7 +1,7 @@ error[E0597]: `a` does not live long enough --> $DIR/method-ufcs-1.rs:32:7 | -LL | x(&a, b, c); //~ ERROR +LL | x(&a, b, c); | --^^------- | | | | | borrowed value does not live long enough @@ -15,7 +15,7 @@ error[E0597]: `a` does not live long enough LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here ... -LL | <&'a u32 as Bazoom<_>>::method(&a, b, c); //~ ERROR +LL | <&'a u32 as Bazoom<_>>::method(&a, b, c); | -------------------------------^^------- | | | | | borrowed value does not live long enough @@ -32,7 +32,7 @@ LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { LL | let _closure = || { | -- value captured here LL | let c = 66; -LL | <&'a u32 as Bazoom<_>>::method(&a, b, c); //~ ERROR +LL | <&'a u32 as Bazoom<_>>::method(&a, b, c); | --------------------------------^------- | | | | | borrowed value does not live long enough diff --git a/src/test/ui/nll/user-annotations/method-ufcs-2.stderr b/src/test/ui/nll/user-annotations/method-ufcs-2.stderr index 140bb750469..a55ed1aa272 100644 --- a/src/test/ui/nll/user-annotations/method-ufcs-2.stderr +++ b/src/test/ui/nll/user-annotations/method-ufcs-2.stderr @@ -1,7 +1,7 @@ error[E0597]: `a` does not live long enough --> $DIR/method-ufcs-2.rs:32:7 | -LL | x(&a, b, c); //~ ERROR +LL | x(&a, b, c); | --^^------- | | | | | borrowed value does not live long enough @@ -15,7 +15,7 @@ error[E0597]: `b` does not live long enough LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here ... -LL | <_ as Bazoom<&'a u32>>::method(a, &b, c); //~ ERROR +LL | <_ as Bazoom<&'a u32>>::method(a, &b, c); | ----------------------------------^^---- | | | | | borrowed value does not live long enough @@ -32,7 +32,7 @@ LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { LL | let _closure = || { | -- value captured here LL | let c = 66; -LL | <_ as Bazoom<&'a u32>>::method(a, &b, c); //~ ERROR +LL | <_ as Bazoom<&'a u32>>::method(a, &b, c); | -----------------------------------^---- | | | | | borrowed value does not live long enough diff --git a/src/test/ui/nll/user-annotations/method-ufcs-3.stderr b/src/test/ui/nll/user-annotations/method-ufcs-3.stderr index 12b9685bdb8..140bda2df41 100644 --- a/src/test/ui/nll/user-annotations/method-ufcs-3.stderr +++ b/src/test/ui/nll/user-annotations/method-ufcs-3.stderr @@ -1,7 +1,7 @@ error[E0597]: `c` does not live long enough --> $DIR/method-ufcs-3.rs:38:53 | -LL | <_ as Bazoom<_>>::method::<&'static u32>(&a, b, &c); //~ ERROR +LL | <_ as Bazoom<_>>::method::<&'static u32>(&a, b, &c); | ------------------------------------------------^^- | | | | | borrowed value does not live long enough @@ -15,7 +15,7 @@ error[E0597]: `c` does not live long enough LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | -- lifetime `'a` defined here ... -LL | <_ as Bazoom<_>>::method::<&'a u32>(&a, b, &c); //~ ERROR +LL | <_ as Bazoom<_>>::method::<&'a u32>(&a, b, &c); | -------------------------------------------^^- | | | | | borrowed value does not live long enough @@ -29,7 +29,7 @@ error[E0597]: `c` does not live long enough LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | -- lifetime `'a` defined here ... -LL | <_ as Bazoom<_>>::method::<&'a u32>(&a, b, &c); //~ ERROR +LL | <_ as Bazoom<_>>::method::<&'a u32>(&a, b, &c); | -------------------------------------------^^- | | | | | borrowed value does not live long enough diff --git a/src/test/ui/nll/user-annotations/method-ufcs-inherent-1.stderr b/src/test/ui/nll/user-annotations/method-ufcs-inherent-1.stderr index cb6cc647964..70e1cda004b 100644 --- a/src/test/ui/nll/user-annotations/method-ufcs-inherent-1.stderr +++ b/src/test/ui/nll/user-annotations/method-ufcs-inherent-1.stderr @@ -9,7 +9,7 @@ LL | let x = A::<'a>::new(&v, 22); | | | | | borrowed value does not live long enough | argument requires that `v` is borrowed for `'a` -LL | //~^ ERROR +LL | LL | } | - `v` dropped here while still borrowed diff --git a/src/test/ui/nll/user-annotations/method-ufcs-inherent-3.stderr b/src/test/ui/nll/user-annotations/method-ufcs-inherent-3.stderr index 2f83283ef91..50e4fb25991 100644 --- a/src/test/ui/nll/user-annotations/method-ufcs-inherent-3.stderr +++ b/src/test/ui/nll/user-annotations/method-ufcs-inherent-3.stderr @@ -9,7 +9,7 @@ LL | let x = >::new(&v, 22); | | | | | borrowed value does not live long enough | argument requires that `v` is borrowed for `'a` -LL | //~^ ERROR +LL | LL | } | - `v` dropped here while still borrowed diff --git a/src/test/ui/nll/user-annotations/normalization.stderr b/src/test/ui/nll/user-annotations/normalization.stderr index 71bf8507a73..fe93c3edba8 100644 --- a/src/test/ui/nll/user-annotations/normalization.stderr +++ b/src/test/ui/nll/user-annotations/normalization.stderr @@ -1,7 +1,7 @@ error[E0597]: `a` does not live long enough --> $DIR/normalization.rs:11:31 | -LL | let b: <() as Foo>::Out = &a; //~ ERROR +LL | let b: <() as Foo>::Out = &a; | ---------------- ^^ borrowed value does not live long enough | | | type annotation requires that `a` is borrowed for `'static` diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.stderr b/src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.stderr index 800c822058d..b483f219c90 100644 --- a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.stderr +++ b/src/test/ui/nll/user-annotations/pattern_substs_on_brace_enum_variant.stderr @@ -3,7 +3,7 @@ error[E0597]: `y` does not live long enough | LL | let foo = Foo::Bar { field: &y }; | ^^ borrowed value does not live long enough -LL | //~^ ERROR `y` does not live long enough +LL | LL | let Foo::Bar::<'static> { field: _z } = foo; | --------------------------------- type annotation requires that `y` is borrowed for `'static` LL | } diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.stderr b/src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.stderr index 8adadfb8b67..9c888b0bffe 100644 --- a/src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.stderr +++ b/src/test/ui/nll/user-annotations/pattern_substs_on_brace_struct.stderr @@ -3,7 +3,7 @@ error[E0597]: `y` does not live long enough | LL | let foo = Foo { field: &y }; | ^^ borrowed value does not live long enough -LL | //~^ ERROR `y` does not live long enough +LL | LL | let Foo::<'static> { field: _z } = foo; | ---------------------------- type annotation requires that `y` is borrowed for `'static` LL | } diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.stderr b/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.stderr index 0fd5fc3578d..698cff51126 100644 --- a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.stderr +++ b/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_enum_variant.stderr @@ -3,7 +3,7 @@ error[E0597]: `y` does not live long enough | LL | let foo = Foo::Bar(&y); | ^^ borrowed value does not live long enough -LL | //~^ ERROR `y` does not live long enough +LL | LL | let Foo::Bar::<'static>(_z) = foo; | ----------------------- type annotation requires that `y` is borrowed for `'static` LL | } diff --git a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.stderr b/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.stderr index 3d114fa5d75..b5f2cb8e321 100644 --- a/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.stderr +++ b/src/test/ui/nll/user-annotations/pattern_substs_on_tuple_struct.stderr @@ -3,7 +3,7 @@ error[E0597]: `y` does not live long enough | LL | let foo = Foo(&y); | ^^ borrowed value does not live long enough -LL | //~^ ERROR `y` does not live long enough +LL | LL | let Foo::<'static>(_z) = foo; | ------------------ type annotation requires that `y` is borrowed for `'static` LL | } diff --git a/src/test/ui/nll/user-annotations/patterns.stderr b/src/test/ui/nll/user-annotations/patterns.stderr index 476578e074d..1ac62832315 100644 --- a/src/test/ui/nll/user-annotations/patterns.stderr +++ b/src/test/ui/nll/user-annotations/patterns.stderr @@ -3,7 +3,7 @@ error[E0597]: `x` does not live long enough | LL | let y: &'static u32; | ------------ type annotation requires that `x` is borrowed for `'static` -LL | y = &x; //~ ERROR +LL | y = &x; | ^^ borrowed value does not live long enough LL | } | - `x` dropped here while still borrowed @@ -13,7 +13,7 @@ error[E0597]: `x` does not live long enough | LL | let (y, z): (&'static u32, &'static u32); | ---------------------------- type annotation requires that `x` is borrowed for `'static` -LL | y = &x; //~ ERROR +LL | y = &x; | ^^ borrowed value does not live long enough LL | } | - `x` dropped here while still borrowed @@ -21,7 +21,7 @@ LL | } error[E0597]: `x` does not live long enough --> $DIR/patterns.rs:22:13 | -LL | let y = &x; //~ ERROR +LL | let y = &x; | ^^ borrowed value does not live long enough LL | let ref z: &'static u32 = y; | ------------ type annotation requires that `x` is borrowed for `'static` @@ -34,7 +34,7 @@ error[E0597]: `x` does not live long enough | LL | let Single { value: y }: Single<&'static u32>; | -------------------- type annotation requires that `x` is borrowed for `'static` -LL | y = &x; //~ ERROR +LL | y = &x; | ^^ borrowed value does not live long enough LL | } | - `x` dropped here while still borrowed @@ -44,7 +44,7 @@ error[E0597]: `x` does not live long enough | LL | let Single2 { value: mut _y }: Single2; | ------------------ type annotation requires that `x` is borrowed for `'static` -LL | _y = &x; //~ ERROR +LL | _y = &x; | ^^ borrowed value does not live long enough LL | } | - `x` dropped here while still borrowed @@ -52,7 +52,7 @@ LL | } error[E0597]: `x` does not live long enough --> $DIR/patterns.rs:58:27 | -LL | let y: &'static u32 = &x; //~ ERROR +LL | let y: &'static u32 = &x; | ------------ ^^ borrowed value does not live long enough | | | type annotation requires that `x` is borrowed for `'static` @@ -62,7 +62,7 @@ LL | } error[E0597]: `x` does not live long enough --> $DIR/patterns.rs:63:27 | -LL | let _: &'static u32 = &x; //~ ERROR +LL | let _: &'static u32 = &x; | ------------ ^^ borrowed value does not live long enough | | | type annotation requires that `x` is borrowed for `'static` @@ -100,7 +100,7 @@ LL | let (_a, b): (Vec<&'static String>, _) = (vec![&String::new()], 44); error[E0597]: `x` does not live long enough --> $DIR/patterns.rs:77:40 | -LL | let (_, _): (&'static u32, u32) = (&x, 44); //~ ERROR +LL | let (_, _): (&'static u32, u32) = (&x, 44); | ------------------- ^^ borrowed value does not live long enough | | | type annotation requires that `x` is borrowed for `'static` @@ -110,7 +110,7 @@ LL | } error[E0597]: `x` does not live long enough --> $DIR/patterns.rs:82:40 | -LL | let (y, _): (&'static u32, u32) = (&x, 44); //~ ERROR +LL | let (y, _): (&'static u32, u32) = (&x, 44); | ------------------- ^^ borrowed value does not live long enough | | | type annotation requires that `x` is borrowed for `'static` @@ -120,7 +120,7 @@ LL | } error[E0597]: `x` does not live long enough --> $DIR/patterns.rs:87:69 | -LL | let Single { value: y }: Single<&'static u32> = Single { value: &x }; //~ ERROR +LL | let Single { value: y }: Single<&'static u32> = Single { value: &x }; | -------------------- ^^ borrowed value does not live long enough | | | type annotation requires that `x` is borrowed for `'static` @@ -130,7 +130,7 @@ LL | } error[E0597]: `x` does not live long enough --> $DIR/patterns.rs:92:69 | -LL | let Single { value: _ }: Single<&'static u32> = Single { value: &x }; //~ ERROR +LL | let Single { value: _ }: Single<&'static u32> = Single { value: &x }; | -------------------- ^^ borrowed value does not live long enough | | | type annotation requires that `x` is borrowed for `'static` @@ -142,7 +142,7 @@ error[E0597]: `x` does not live long enough | LL | let Double { value1: _, value2: _ }: Double<&'static u32> = Double { | -------------------- type annotation requires that `x` is borrowed for `'static` -LL | value1: &x, //~ ERROR +LL | value1: &x, | ^^ borrowed value does not live long enough ... LL | } @@ -154,7 +154,7 @@ error: lifetime may not live long enough LL | fn static_to_a_to_static_through_variable<'a>(x: &'a u32) -> &'static u32 { | -- lifetime `'a` defined here ... -LL | y //~ ERROR +LL | y | ^ returning this value requires that `'a` must outlive `'static` error: lifetime may not live long enough @@ -163,7 +163,7 @@ error: lifetime may not live long enough LL | fn static_to_a_to_static_through_tuple<'a>(x: &'a u32) -> &'static u32 { | -- lifetime `'a` defined here ... -LL | y //~ ERROR +LL | y | ^ returning this value requires that `'a` must outlive `'static` error: lifetime may not live long enough @@ -172,7 +172,7 @@ error: lifetime may not live long enough LL | fn static_to_a_to_static_through_struct<'a>(_x: &'a u32) -> &'static u32 { | -- lifetime `'a` defined here LL | let Single { value: y }: Single<&'a u32> = Single { value: &22 }; -LL | y //~ ERROR +LL | y | ^ returning this value requires that `'a` must outlive `'static` error: lifetime may not live long enough @@ -180,7 +180,7 @@ error: lifetime may not live long enough | LL | fn a_to_static_then_static<'a>(x: &'a u32) -> &'static u32 { | -- lifetime `'a` defined here -LL | let (y, _z): (&'static u32, u32) = (x, 44); //~ ERROR +LL | let (y, _z): (&'static u32, u32) = (x, 44); | ^^^^^^^^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static` error: aborting due to 19 previous errors diff --git a/src/test/ui/nll/user-annotations/promoted-annotation.stderr b/src/test/ui/nll/user-annotations/promoted-annotation.stderr index 144af1e0ec1..d8b01f22145 100644 --- a/src/test/ui/nll/user-annotations/promoted-annotation.stderr +++ b/src/test/ui/nll/user-annotations/promoted-annotation.stderr @@ -8,7 +8,7 @@ LL | let f = &drop::<&'a i32>; | ---------------- assignment requires that `x` is borrowed for `'a` LL | f(&x); | ^^ borrowed value does not live long enough -LL | //~^ ERROR `x` does not live long enough +LL | LL | } | - `x` dropped here while still borrowed diff --git a/src/test/ui/nll/user-annotations/type_ascription_static_lifetime.stderr b/src/test/ui/nll/user-annotations/type_ascription_static_lifetime.stderr index a88ff6df3d7..93dbf7cb1b3 100644 --- a/src/test/ui/nll/user-annotations/type_ascription_static_lifetime.stderr +++ b/src/test/ui/nll/user-annotations/type_ascription_static_lifetime.stderr @@ -1,7 +1,7 @@ error[E0597]: `x` does not live long enough --> $DIR/type_ascription_static_lifetime.rs:7:19 | -LL | let y: &u32 = &x: &'static u32; //~ ERROR E0597 +LL | let y: &u32 = &x: &'static u32; | ^^-------------- | | | borrowed value does not live long enough diff --git a/src/test/ui/nll/user-annotations/wf-self-type.stderr b/src/test/ui/nll/user-annotations/wf-self-type.stderr index 00500c8d654..8f8e1bc28f6 100644 --- a/src/test/ui/nll/user-annotations/wf-self-type.stderr +++ b/src/test/ui/nll/user-annotations/wf-self-type.stderr @@ -5,7 +5,7 @@ LL | pub fn foo<'a, 'b>(u: &'b ()) -> &'a () { | -- -- lifetime `'b` defined here | | | lifetime `'a` defined here -LL | Foo::xmute(u) //~ ERROR lifetime may not live long enough +LL | Foo::xmute(u) | ^^^^^^^^^^^^^ returning this value requires that `'b` must outlive `'a` error: aborting due to previous error diff --git a/src/test/ui/no-implicit-prelude-nested.stderr b/src/test/ui/no-implicit-prelude-nested.stderr index 7ef4bfbaf99..521ed8f2cf3 100644 --- a/src/test/ui/no-implicit-prelude-nested.stderr +++ b/src/test/ui/no-implicit-prelude-nested.stderr @@ -1,7 +1,7 @@ error[E0405]: cannot find trait `Add` in this scope --> $DIR/no-implicit-prelude-nested.rs:11:14 | -LL | impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope +LL | impl Add for Test {} | ^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | @@ -11,7 +11,7 @@ LL | use std::ops::Add; error[E0405]: cannot find trait `Clone` in this scope --> $DIR/no-implicit-prelude-nested.rs:12:14 | -LL | impl Clone for Test {} //~ ERROR cannot find trait `Clone` in this scope +LL | impl Clone for Test {} | ^^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | @@ -23,7 +23,7 @@ LL | use std::prelude::v1::Clone; error[E0405]: cannot find trait `Iterator` in this scope --> $DIR/no-implicit-prelude-nested.rs:13:14 | -LL | impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope +LL | impl Iterator for Test {} | ^^^^^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | @@ -35,7 +35,7 @@ LL | use std::prelude::v1::Iterator; error[E0405]: cannot find trait `ToString` in this scope --> $DIR/no-implicit-prelude-nested.rs:14:14 | -LL | impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope +LL | impl ToString for Test {} | ^^^^^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | @@ -47,13 +47,13 @@ LL | use std::string::ToString; error[E0405]: cannot find trait `Writer` in this scope --> $DIR/no-implicit-prelude-nested.rs:15:14 | -LL | impl Writer for Test {} //~ ERROR cannot find trait `Writer` in this scope +LL | impl Writer for Test {} | ^^^^^^ not found in this scope error[E0425]: cannot find function `drop` in this scope --> $DIR/no-implicit-prelude-nested.rs:18:13 | -LL | drop(2) //~ ERROR cannot find function `drop` in this scope +LL | drop(2) | ^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | @@ -65,7 +65,7 @@ LL | use std::prelude::v1::drop; error[E0405]: cannot find trait `Add` in this scope --> $DIR/no-implicit-prelude-nested.rs:23:10 | -LL | impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope +LL | impl Add for Test {} | ^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | @@ -75,7 +75,7 @@ LL | use std::ops::Add; error[E0405]: cannot find trait `Clone` in this scope --> $DIR/no-implicit-prelude-nested.rs:24:10 | -LL | impl Clone for Test {} //~ ERROR cannot find trait `Clone` in this scope +LL | impl Clone for Test {} | ^^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | @@ -87,7 +87,7 @@ LL | use std::prelude::v1::Clone; error[E0405]: cannot find trait `Iterator` in this scope --> $DIR/no-implicit-prelude-nested.rs:25:10 | -LL | impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope +LL | impl Iterator for Test {} | ^^^^^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | @@ -99,7 +99,7 @@ LL | use std::prelude::v1::Iterator; error[E0405]: cannot find trait `ToString` in this scope --> $DIR/no-implicit-prelude-nested.rs:26:10 | -LL | impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope +LL | impl ToString for Test {} | ^^^^^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | @@ -111,13 +111,13 @@ LL | use std::string::ToString; error[E0405]: cannot find trait `Writer` in this scope --> $DIR/no-implicit-prelude-nested.rs:27:10 | -LL | impl Writer for Test {} //~ ERROR cannot find trait `Writer` in this scope +LL | impl Writer for Test {} | ^^^^^^ not found in this scope error[E0425]: cannot find function `drop` in this scope --> $DIR/no-implicit-prelude-nested.rs:30:9 | -LL | drop(2) //~ ERROR cannot find function `drop` in this scope +LL | drop(2) | ^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | @@ -129,7 +129,7 @@ LL | use std::prelude::v1::drop; error[E0405]: cannot find trait `Add` in this scope --> $DIR/no-implicit-prelude-nested.rs:38:14 | -LL | impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope +LL | impl Add for Test {} | ^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | @@ -139,7 +139,7 @@ LL | use std::ops::Add; error[E0405]: cannot find trait `Clone` in this scope --> $DIR/no-implicit-prelude-nested.rs:39:14 | -LL | impl Clone for Test {} //~ ERROR cannot find trait `Clone` in this scope +LL | impl Clone for Test {} | ^^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | @@ -151,7 +151,7 @@ LL | use std::prelude::v1::Clone; error[E0405]: cannot find trait `Iterator` in this scope --> $DIR/no-implicit-prelude-nested.rs:40:14 | -LL | impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope +LL | impl Iterator for Test {} | ^^^^^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | @@ -163,7 +163,7 @@ LL | use std::prelude::v1::Iterator; error[E0405]: cannot find trait `ToString` in this scope --> $DIR/no-implicit-prelude-nested.rs:41:14 | -LL | impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope +LL | impl ToString for Test {} | ^^^^^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | @@ -175,13 +175,13 @@ LL | use std::string::ToString; error[E0405]: cannot find trait `Writer` in this scope --> $DIR/no-implicit-prelude-nested.rs:42:14 | -LL | impl Writer for Test {} //~ ERROR cannot find trait `Writer` in this scope +LL | impl Writer for Test {} | ^^^^^^ not found in this scope error[E0425]: cannot find function `drop` in this scope --> $DIR/no-implicit-prelude-nested.rs:45:13 | -LL | drop(2) //~ ERROR cannot find function `drop` in this scope +LL | drop(2) | ^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | diff --git a/src/test/ui/no-implicit-prelude.stderr b/src/test/ui/no-implicit-prelude.stderr index fa82ac6cbe7..e5c54ddd103 100644 --- a/src/test/ui/no-implicit-prelude.stderr +++ b/src/test/ui/no-implicit-prelude.stderr @@ -1,7 +1,7 @@ error[E0405]: cannot find trait `Add` in this scope --> $DIR/no-implicit-prelude.rs:10:6 | -LL | impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope +LL | impl Add for Test {} | ^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | @@ -11,7 +11,7 @@ LL | use std::ops::Add; error[E0405]: cannot find trait `Clone` in this scope --> $DIR/no-implicit-prelude.rs:11:6 | -LL | impl Clone for Test {} //~ ERROR cannot find trait `Clone` in this scope +LL | impl Clone for Test {} | ^^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | @@ -23,7 +23,7 @@ LL | use std::prelude::v1::Clone; error[E0405]: cannot find trait `Iterator` in this scope --> $DIR/no-implicit-prelude.rs:12:6 | -LL | impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope +LL | impl Iterator for Test {} | ^^^^^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | @@ -35,7 +35,7 @@ LL | use std::prelude::v1::Iterator; error[E0405]: cannot find trait `ToString` in this scope --> $DIR/no-implicit-prelude.rs:13:6 | -LL | impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope +LL | impl ToString for Test {} | ^^^^^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | @@ -47,13 +47,13 @@ LL | use std::string::ToString; error[E0405]: cannot find trait `Writer` in this scope --> $DIR/no-implicit-prelude.rs:14:6 | -LL | impl Writer for Test {} //~ ERROR cannot find trait `Writer` in this scope +LL | impl Writer for Test {} | ^^^^^^ not found in this scope error[E0425]: cannot find function `drop` in this scope --> $DIR/no-implicit-prelude.rs:17:5 | -LL | drop(2) //~ ERROR cannot find function `drop` in this scope +LL | drop(2) | ^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | diff --git a/src/test/ui/no-link-unknown-crate.stderr b/src/test/ui/no-link-unknown-crate.stderr index db76b74fdad..068c7139ed9 100644 --- a/src/test/ui/no-link-unknown-crate.stderr +++ b/src/test/ui/no-link-unknown-crate.stderr @@ -1,7 +1,7 @@ error[E0463]: can't find crate for `doesnt_exist` --> $DIR/no-link-unknown-crate.rs:2:1 | -LL | extern crate doesnt_exist; //~ ERROR can't find crate +LL | extern crate doesnt_exist; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate error: aborting due to previous error diff --git a/src/test/ui/no-link.stderr b/src/test/ui/no-link.stderr index 928ad423202..c9c8468eba4 100644 --- a/src/test/ui/no-link.stderr +++ b/src/test/ui/no-link.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `XEmpty1` in module `empty_struct` --> $DIR/no-link.rs:7:19 | -LL | empty_struct::XEmpty1; //~ ERROR cannot find value `XEmpty1` in module `empty_struct` +LL | empty_struct::XEmpty1; | ^^^^^^^ not found in `empty_struct` error: aborting due to previous error diff --git a/src/test/ui/no-patterns-in-args-2.stderr b/src/test/ui/no-patterns-in-args-2.stderr index 161e7bb4b00..ec7d2d9f0d1 100644 --- a/src/test/ui/no-patterns-in-args-2.stderr +++ b/src/test/ui/no-patterns-in-args-2.stderr @@ -1,13 +1,13 @@ error[E0642]: patterns aren't allowed in methods without bodies --> $DIR/no-patterns-in-args-2.rs:6:11 | -LL | fn f2(&arg: u8); //~ ERROR patterns aren't allowed in methods without bodies +LL | fn f2(&arg: u8); | ^^^^ error: patterns aren't allowed in methods without bodies --> $DIR/no-patterns-in-args-2.rs:4:11 | -LL | fn f1(mut arg: u8); //~ ERROR patterns aren't allowed in methods without bodies +LL | fn f1(mut arg: u8); | ^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/no-patterns-in-args.stderr b/src/test/ui/no-patterns-in-args.stderr index 3fd476c4d72..0768c3f4de8 100644 --- a/src/test/ui/no-patterns-in-args.stderr +++ b/src/test/ui/no-patterns-in-args.stderr @@ -1,31 +1,31 @@ error[E0130]: patterns aren't allowed in foreign function declarations --> $DIR/no-patterns-in-args.rs:2:11 | -LL | fn f1(mut arg: u8); //~ ERROR patterns aren't allowed in foreign function declarations +LL | fn f1(mut arg: u8); | ^^^^^^^ pattern not allowed in foreign function error[E0130]: patterns aren't allowed in foreign function declarations --> $DIR/no-patterns-in-args.rs:3:11 | -LL | fn f2(&arg: u8); //~ ERROR patterns aren't allowed in foreign function declarations +LL | fn f2(&arg: u8); | ^^^^ pattern not allowed in foreign function error[E0130]: patterns aren't allowed in foreign function declarations --> $DIR/no-patterns-in-args.rs:4:11 | -LL | fn f3(arg @ _: u8); //~ ERROR patterns aren't allowed in foreign function declarations +LL | fn f3(arg @ _: u8); | ^^^^^^^ pattern not allowed in foreign function error[E0561]: patterns aren't allowed in function pointer types --> $DIR/no-patterns-in-args.rs:10:14 | -LL | type A1 = fn(mut arg: u8); //~ ERROR patterns aren't allowed in function pointer types +LL | type A1 = fn(mut arg: u8); | ^^^^^^^ error[E0561]: patterns aren't allowed in function pointer types --> $DIR/no-patterns-in-args.rs:11:14 | -LL | type A2 = fn(&arg: u8); //~ ERROR patterns aren't allowed in function pointer types +LL | type A2 = fn(&arg: u8); | ^^^^ error: aborting due to 5 previous errors diff --git a/src/test/ui/no-reuse-move-arc.stderr b/src/test/ui/no-reuse-move-arc.stderr index d8ab314e762..d7123314786 100644 --- a/src/test/ui/no-reuse-move-arc.stderr +++ b/src/test/ui/no-reuse-move-arc.stderr @@ -4,7 +4,7 @@ error[E0382]: use of moved value: `arc_v` LL | thread::spawn(move|| { | ------ value moved (into closure) here ... -LL | assert_eq!((*arc_v)[2], 3); //~ ERROR use of moved value: `arc_v` +LL | assert_eq!((*arc_v)[2], 3); | ^^^^^ value used here after move | = note: move occurs because `arc_v` has type `std::sync::Arc>`, which does not implement the `Copy` trait @@ -15,7 +15,7 @@ error[E0382]: use of moved value: `arc_v` LL | thread::spawn(move|| { | ------ value moved (into closure) here ... -LL | println!("{:?}", *arc_v); //~ ERROR use of moved value: `arc_v` +LL | println!("{:?}", *arc_v); | ^^^^^ value used here after move | = note: move occurs because `arc_v` has type `std::sync::Arc>`, which does not implement the `Copy` trait diff --git a/src/test/ui/no-std-inject.stderr b/src/test/ui/no-std-inject.stderr index 0ccd567e7a9..975f5c2f50c 100644 --- a/src/test/ui/no-std-inject.stderr +++ b/src/test/ui/no-std-inject.stderr @@ -1,13 +1,13 @@ error[E0259]: the name `core` is defined multiple times --> $DIR/no-std-inject.rs:4:1 | -LL | extern crate core; //~ ERROR: the name `core` is defined multiple times +LL | extern crate core; | ^^^^^^^^^^^^^^^^^^ `core` reimported here | = note: `core` must be defined only once in the type namespace of this module help: you can use `as` to change the binding name of the import | -LL | extern crate core as other_core; //~ ERROR: the name `core` is defined multiple times +LL | extern crate core as other_core; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/no-type-for-node-ice.stderr b/src/test/ui/no-type-for-node-ice.stderr index cd1a7ee6fe5..b50241fb1a0 100644 --- a/src/test/ui/no-type-for-node-ice.stderr +++ b/src/test/ui/no-type-for-node-ice.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `homura` on type `&'static str` --> $DIR/no-type-for-node-ice.rs:4:8 | -LL | "".homura[""]; //~ no field `homura` on type `&'static str` +LL | "".homura[""]; | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/no_crate_type.stderr b/src/test/ui/no_crate_type.stderr index 6b76ab68658..ec79420d4dd 100644 --- a/src/test/ui/no_crate_type.stderr +++ b/src/test/ui/no_crate_type.stderr @@ -1,7 +1,7 @@ error: attribute must be of the form `#[crate_type = "bin|lib|..."]` --> $DIR/no_crate_type.rs:2:1 | -LL | #![crate_type] //~ ERROR attribute must be of the form +LL | #![crate_type] | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/non-exhaustive/non-exhaustive-float-range-match.stderr b/src/test/ui/non-exhaustive/non-exhaustive-float-range-match.stderr index 03215f72ebc..6de615c3de4 100644 --- a/src/test/ui/non-exhaustive/non-exhaustive-float-range-match.stderr +++ b/src/test/ui/non-exhaustive/non-exhaustive-float-range-match.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `_` not covered --> $DIR/non-exhaustive-float-range-match.rs:10:11 | -LL | match 0.0 { //~ ERROR non-exhaustive patterns +LL | match 0.0 { | ^^^ pattern `_` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/non-exhaustive/non-exhaustive-match-nested.stderr b/src/test/ui/non-exhaustive/non-exhaustive-match-nested.stderr index d5beac4b716..67c818e19cb 100644 --- a/src/test/ui/non-exhaustive/non-exhaustive-match-nested.stderr +++ b/src/test/ui/non-exhaustive/non-exhaustive-match-nested.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `(Some(&[]), Err(_))` not covered --> $DIR/non-exhaustive-match-nested.rs:7:11 | -LL | match (l1, l2) { //~ ERROR non-exhaustive patterns: `(Some(&[]), Err(_))` not covered +LL | match (l1, l2) { | ^^^^^^^^ pattern `(Some(&[]), Err(_))` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -15,7 +15,7 @@ LL | enum T { A(U), B } | | not covered | `T` defined here ... -LL | match x { //~ ERROR non-exhaustive patterns: `A(C)` not covered +LL | match x { | ^ pattern `A(C)` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/non-exhaustive/non-exhaustive-match.stderr b/src/test/ui/non-exhaustive/non-exhaustive-match.stderr index 112e18432b4..58e3309fd26 100644 --- a/src/test/ui/non-exhaustive/non-exhaustive-match.stderr +++ b/src/test/ui/non-exhaustive/non-exhaustive-match.stderr @@ -7,7 +7,7 @@ LL | enum T { A, B } | | not covered | `T` defined here ... -LL | match x { T::B => { } } //~ ERROR non-exhaustive patterns: `A` not covered +LL | match x { T::B => { } } | ^ pattern `A` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -15,7 +15,7 @@ LL | match x { T::B => { } } //~ ERROR non-exhaustive patterns: `A` not cove error[E0004]: non-exhaustive patterns: `false` not covered --> $DIR/non-exhaustive-match.rs:9:11 | -LL | match true { //~ ERROR non-exhaustive patterns: `false` not covered +LL | match true { | ^^^^ pattern `false` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -23,7 +23,7 @@ LL | match true { //~ ERROR non-exhaustive patterns: `false` not covered error[E0004]: non-exhaustive patterns: `Some(_)` not covered --> $DIR/non-exhaustive-match.rs:12:11 | -LL | match Some(10) { //~ ERROR non-exhaustive patterns: `Some(_)` not covered +LL | match Some(10) { | ^^^^^^^^ pattern `Some(_)` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -31,7 +31,7 @@ LL | match Some(10) { //~ ERROR non-exhaustive patterns: `Some(_)` not cover error[E0004]: non-exhaustive patterns: `(_, _, -2147483648i32..=3i32)` and `(_, _, 5i32..=2147483647i32)` not covered --> $DIR/non-exhaustive-match.rs:15:11 | -LL | match (2, 3, 4) { //~ ERROR non-exhaustive patterns: `(_, _, -2147483648i32..=3i32)` +LL | match (2, 3, 4) { | ^^^^^^^^^ patterns `(_, _, -2147483648i32..=3i32)` and `(_, _, 5i32..=2147483647i32)` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -39,7 +39,7 @@ LL | match (2, 3, 4) { //~ ERROR non-exhaustive patterns: `(_, _, -214748364 error[E0004]: non-exhaustive patterns: `(A, A)` not covered --> $DIR/non-exhaustive-match.rs:19:11 | -LL | match (T::A, T::A) { //~ ERROR non-exhaustive patterns: `(A, A)` not covered +LL | match (T::A, T::A) { | ^^^^^^^^^^^^ pattern `(A, A)` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -53,7 +53,7 @@ LL | enum T { A, B } | | not covered | `T` defined here ... -LL | match T::A { //~ ERROR non-exhaustive patterns: `B` not covered +LL | match T::A { | ^^^^ pattern `B` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -61,7 +61,7 @@ LL | match T::A { //~ ERROR non-exhaustive patterns: `B` not covered error[E0004]: non-exhaustive patterns: `[]` not covered --> $DIR/non-exhaustive-match.rs:34:11 | -LL | match *vec { //~ ERROR non-exhaustive patterns: `[]` not covered +LL | match *vec { | ^^^^ pattern `[]` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -69,7 +69,7 @@ LL | match *vec { //~ ERROR non-exhaustive patterns: `[]` not covered error[E0004]: non-exhaustive patterns: `[_, _, _, _]` not covered --> $DIR/non-exhaustive-match.rs:47:11 | -LL | match *vec { //~ ERROR non-exhaustive patterns: `[_, _, _, _]` not covered +LL | match *vec { | ^^^^ pattern `[_, _, _, _]` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/noncopyable-class.stderr b/src/test/ui/noncopyable-class.stderr index 1876de87362..eb47a33a729 100644 --- a/src/test/ui/noncopyable-class.stderr +++ b/src/test/ui/noncopyable-class.stderr @@ -4,7 +4,7 @@ error[E0599]: no method named `clone` found for type `Foo` in the current scope LL | struct Foo { | ---------- method `clone` not found for this ... -LL | let _y = x.clone(); //~ ERROR no method named `clone` found +LL | let _y = x.clone(); | ^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope diff --git a/src/test/ui/nonscalar-cast.stderr b/src/test/ui/nonscalar-cast.stderr index eb482b337e6..9338688b037 100644 --- a/src/test/ui/nonscalar-cast.stderr +++ b/src/test/ui/nonscalar-cast.stderr @@ -1,7 +1,7 @@ error[E0605]: non-primitive cast: `Foo` as `isize` --> $DIR/nonscalar-cast.rs:7:20 | -LL | println!("{}", Foo { x: 1 } as isize); //~ non-primitive cast: `Foo` as `isize` [E0605] +LL | println!("{}", Foo { x: 1 } as isize); | ^^^^^^^^^^^^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait diff --git a/src/test/ui/not-clone-closure.stderr b/src/test/ui/not-clone-closure.stderr index b583db1e4ba..b66391b83b8 100644 --- a/src/test/ui/not-clone-closure.stderr +++ b/src/test/ui/not-clone-closure.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `S: std::clone::Clone` is not satisfied in `[closure@$DIR/not-clone-closure.rs:7:17: 9:6 a:S]` --> $DIR/not-clone-closure.rs:11:23 | -LL | let hello = hello.clone(); //~ ERROR the trait bound `S: std::clone::Clone` is not satisfied +LL | let hello = hello.clone(); | ^^^^^ within `[closure@$DIR/not-clone-closure.rs:7:17: 9:6 a:S]`, the trait `std::clone::Clone` is not implemented for `S` | = note: required because it appears within the type `[closure@$DIR/not-clone-closure.rs:7:17: 9:6 a:S]` diff --git a/src/test/ui/not-copy-closure.stderr b/src/test/ui/not-copy-closure.stderr index bdae06d3a66..41447537978 100644 --- a/src/test/ui/not-copy-closure.stderr +++ b/src/test/ui/not-copy-closure.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `hello` | LL | let b = hello; | - value moved here -LL | let c = hello; //~ ERROR use of moved value: `hello` [E0382] +LL | let c = hello; | ^ value used here after move | note: closure cannot be invoked more than once because it moves the variable `a` out of its environment diff --git a/src/test/ui/not-panic/not-panic-safe-5.stderr b/src/test/ui/not-panic/not-panic-safe-5.stderr index 46400a4b03c..a603acb2f1f 100644 --- a/src/test/ui/not-panic/not-panic-safe-5.stderr +++ b/src/test/ui/not-panic/not-panic-safe-5.stderr @@ -1,7 +1,7 @@ error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary --> $DIR/not-panic-safe-5.rs:9:5 | -LL | assert::<*const UnsafeCell>(); //~ ERROR E0277 +LL | assert::<*const UnsafeCell>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | = help: the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell` diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.stderr index a7cb32ec7b8..0077c95139f 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.stderr @@ -4,7 +4,7 @@ error[E0621]: explicit lifetime required in the type of `ss` LL | fn load(ss: &mut SomeStruct) -> Box { | --------------- help: add explicit lifetime `'static` to the type of `ss`: `&mut SomeStruct<'static>` ... -LL | ss.r //~ ERROR explicit lifetime required in the type of `ss` [E0621] +LL | ss.r | ^^^^ lifetime `'static` required error[E0621]: explicit lifetime required in the type of `ss` @@ -13,7 +13,7 @@ error[E0621]: explicit lifetime required in the type of `ss` LL | fn store1<'b>(ss: &mut SomeStruct, b: Box) { | --------------- help: add explicit lifetime `'b` to the type of `ss`: `&mut SomeStruct<'b>` ... -LL | ss.r = b; //~ ERROR explicit lifetime required in the type of `ss` [E0621] +LL | ss.r = b; | ^ lifetime `'b` required error: aborting due to 2 previous errors diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr index 165f6311ffd..d7e3a171333 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/object-lifetime-default-from-rptr-box-error.rs:15:12 | -LL | ss.t = t; //~ ERROR mismatched types +LL | ss.t = t; | ^ lifetime mismatch | = note: expected type `&'a std::boxed::Box<(dyn Test + 'static)>` diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr index 2f042c05f25..4d082530dc5 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/object-lifetime-default-from-rptr-struct-error.rs:21:12 | -LL | ss.t = t; //~ ERROR mismatched types +LL | ss.t = t; | ^ lifetime mismatch | = note: expected type `&'a MyBox<(dyn Test + 'static)>` diff --git a/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr b/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr index 1a21096741c..402448cde31 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr @@ -7,13 +7,13 @@ LL | b: &'b MyBox) LL | -> &'b MyBox | -------------------- LL | { -LL | a //~ ERROR lifetime mismatch +LL | a | ^ ...but data from `a` is returned here error[E0308]: mismatched types --> $DIR/object-lifetime-default-mybox.rs:31:11 | -LL | load0(ss) //~ ERROR mismatched types +LL | load0(ss) | ^^ lifetime mismatch | = note: expected type `&MyBox<(dyn SomeTrait + 'static)>` diff --git a/src/test/ui/object-lifetime/object-lifetime-default.stderr b/src/test/ui/object-lifetime/object-lifetime-default.stderr index 443d4ff6537..2642cdff2bf 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default.stderr @@ -1,43 +1,43 @@ error: 'a,Ambiguous --> $DIR/object-lifetime-default.rs:24:1 | -LL | struct G<'a,'b,T:'a,U:'a+'b>(&'a T, &'b U); //~ ERROR 'a,Ambiguous +LL | struct G<'a,'b,T:'a,U:'a+'b>(&'a T, &'b U); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: 'a,'b --> $DIR/object-lifetime-default.rs:21:1 | -LL | struct F<'a,'b,T:'a,U:'b>(&'a T, &'b U); //~ ERROR 'a,'b +LL | struct F<'a,'b,T:'a,U:'b>(&'a T, &'b U); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: 'b --> $DIR/object-lifetime-default.rs:18:1 | -LL | struct E<'a,'b:'a,T:'b>(&'a T, &'b T); //~ ERROR 'b +LL | struct E<'a,'b:'a,T:'b>(&'a T, &'b T); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Ambiguous --> $DIR/object-lifetime-default.rs:15:1 | -LL | struct D<'a,'b,T:'a+'b>(&'a T, &'b T); //~ ERROR Ambiguous +LL | struct D<'a,'b,T:'a+'b>(&'a T, &'b T); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: 'a --> $DIR/object-lifetime-default.rs:12:1 | -LL | struct C<'a,T:'a>(&'a T); //~ ERROR 'a +LL | struct C<'a,T:'a>(&'a T); | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: BaseDefault --> $DIR/object-lifetime-default.rs:9:1 | -LL | struct B<'a,T>(&'a (), T); //~ ERROR BaseDefault +LL | struct B<'a,T>(&'a (), T); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: BaseDefault --> $DIR/object-lifetime-default.rs:6:1 | -LL | struct A(T); //~ ERROR BaseDefault +LL | struct A(T); | ^^^^^^^^^^^^^^^ error: aborting due to 7 previous errors diff --git a/src/test/ui/object-pointer-types.stderr b/src/test/ui/object-pointer-types.stderr index c5738edb6cf..0c7e4e991a5 100644 --- a/src/test/ui/object-pointer-types.stderr +++ b/src/test/ui/object-pointer-types.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `owned` found for type `&dyn Foo` in the current scope --> $DIR/object-pointer-types.rs:11:7 | -LL | x.owned(); //~ ERROR no method named `owned` found +LL | x.owned(); | ^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -11,7 +11,7 @@ LL | x.owned(); //~ ERROR no method named `owned` found error[E0599]: no method named `owned` found for type `&mut dyn Foo` in the current scope --> $DIR/object-pointer-types.rs:17:7 | -LL | x.owned(); //~ ERROR no method named `owned` found +LL | x.owned(); | ^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -21,7 +21,7 @@ LL | x.owned(); //~ ERROR no method named `owned` found error[E0599]: no method named `managed` found for type `std::boxed::Box<(dyn Foo + 'static)>` in the current scope --> $DIR/object-pointer-types.rs:23:7 | -LL | x.managed(); //~ ERROR no method named `managed` found +LL | x.managed(); | ^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/object-safety/object-safety-by-value-self-use.stderr b/src/test/ui/object-safety/object-safety-by-value-self-use.stderr index 0711981a521..0ab881687e9 100644 --- a/src/test/ui/object-safety/object-safety-by-value-self-use.stderr +++ b/src/test/ui/object-safety/object-safety-by-value-self-use.stderr @@ -1,7 +1,7 @@ error[E0161]: cannot move a value of type (dyn Bar + 'static): the size of (dyn Bar + 'static) cannot be statically determined --> $DIR/object-safety-by-value-self-use.rs:15:5 | -LL | t.bar() //~ ERROR cannot move a value of type (dyn Bar + 'static) +LL | t.bar() | ^ error: aborting due to previous error diff --git a/src/test/ui/obsolete-syntax-impl-for-dotdot.stderr b/src/test/ui/obsolete-syntax-impl-for-dotdot.stderr index 793ed26ca68..b7108ced0d7 100644 --- a/src/test/ui/obsolete-syntax-impl-for-dotdot.stderr +++ b/src/test/ui/obsolete-syntax-impl-for-dotdot.stderr @@ -1,7 +1,7 @@ error: `impl Trait for .. {}` is an obsolete syntax --> $DIR/obsolete-syntax-impl-for-dotdot.rs:7:1 | -LL | impl Trait2 for .. {} //~ ERROR `impl Trait for .. {}` is an obsolete syntax +LL | impl Trait2 for .. {} | ^^^^^^^^^^^^^^^^^^^^^ | = help: use `auto trait Trait {}` instead diff --git a/src/test/ui/old-suffixes-are-really-forbidden.stderr b/src/test/ui/old-suffixes-are-really-forbidden.stderr index c54b72a3585..9d1e8d071f0 100644 --- a/src/test/ui/old-suffixes-are-really-forbidden.stderr +++ b/src/test/ui/old-suffixes-are-really-forbidden.stderr @@ -1,7 +1,7 @@ error: invalid suffix `is` for numeric literal --> $DIR/old-suffixes-are-really-forbidden.rs:2:13 | -LL | let a = 1_is; //~ ERROR invalid suffix +LL | let a = 1_is; | ^^^^ invalid suffix `is` | = help: the suffix must be one of the integral types (`u32`, `isize`, etc) @@ -9,7 +9,7 @@ LL | let a = 1_is; //~ ERROR invalid suffix error: invalid suffix `us` for numeric literal --> $DIR/old-suffixes-are-really-forbidden.rs:3:13 | -LL | let b = 2_us; //~ ERROR invalid suffix +LL | let b = 2_us; | ^^^^ invalid suffix `us` | = help: the suffix must be one of the integral types (`u32`, `isize`, etc) diff --git a/src/test/ui/on-unimplemented/expected-comma-found-token.stderr b/src/test/ui/on-unimplemented/expected-comma-found-token.stderr index 1e0808e1d84..5bbdbe29416 100644 --- a/src/test/ui/on-unimplemented/expected-comma-found-token.stderr +++ b/src/test/ui/on-unimplemented/expected-comma-found-token.stderr @@ -3,7 +3,7 @@ error: expected one of `)` or `,`, found `label` | LL | message="the message" | - expected one of `)` or `,` here -LL | label="the label" //~ ERROR expected one of `)` or `,`, found `label` +LL | label="the label" | ^^^^^ unexpected token error: aborting due to previous error diff --git a/src/test/ui/on-unimplemented/on-trait.stderr b/src/test/ui/on-unimplemented/on-trait.stderr index 939c2725cc4..ece8dee0afe 100644 --- a/src/test/ui/on-unimplemented/on-trait.stderr +++ b/src/test/ui/on-unimplemented/on-trait.stderr @@ -14,7 +14,7 @@ LL | fn collect, B: MyFromIterator>(it: I) -> B { error[E0277]: the trait bound `std::string::String: Bar::Foo` is not satisfied --> $DIR/on-trait.rs:31:21 | -LL | let x: String = foobar(); //~ ERROR +LL | let x: String = foobar(); | ^^^^^^ test error `std::string::String` with `u8` `_` `u32` in `Bar::Foo` | = help: the trait `Bar::Foo` is not implemented for `std::string::String` diff --git a/src/test/ui/on-unimplemented/slice-index.stderr b/src/test/ui/on-unimplemented/slice-index.stderr index 7b45d848c97..c1d884929a0 100644 --- a/src/test/ui/on-unimplemented/slice-index.stderr +++ b/src/test/ui/on-unimplemented/slice-index.stderr @@ -1,7 +1,7 @@ error[E0277]: the type `[i32]` cannot be indexed by `i32` --> $DIR/slice-index.rs:11:5 | -LL | x[1i32]; //~ ERROR E0277 +LL | x[1i32]; | ^^^^^^^ slice indices are of type `usize` or ranges of `usize` | = help: the trait `std::slice::SliceIndex<[i32]>` is not implemented for `i32` @@ -10,7 +10,7 @@ LL | x[1i32]; //~ ERROR E0277 error[E0277]: the type `[i32]` cannot be indexed by `std::ops::RangeTo` --> $DIR/slice-index.rs:12:5 | -LL | x[..1i32]; //~ ERROR E0277 +LL | x[..1i32]; | ^^^^^^^^^ slice indices are of type `usize` or ranges of `usize` | = help: the trait `std::slice::SliceIndex<[i32]>` is not implemented for `std::ops::RangeTo` diff --git a/src/test/ui/once-cant-call-twice-on-heap.stderr b/src/test/ui/once-cant-call-twice-on-heap.stderr index 4559425e5be..40034dae5bc 100644 --- a/src/test/ui/once-cant-call-twice-on-heap.stderr +++ b/src/test/ui/once-cant-call-twice-on-heap.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `blk` | LL | blk(); | --- value moved here -LL | blk(); //~ ERROR use of moved value +LL | blk(); | ^^^ value used here after move | = note: move occurs because `blk` has type `F`, which does not implement the `Copy` trait diff --git a/src/test/ui/out-of-order-shadowing.stderr b/src/test/ui/out-of-order-shadowing.stderr index 17bda18f8f6..2a120dee482 100644 --- a/src/test/ui/out-of-order-shadowing.stderr +++ b/src/test/ui/out-of-order-shadowing.stderr @@ -1,7 +1,7 @@ error[E0659]: `bar` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) --> $DIR/out-of-order-shadowing.rs:5:1 | -LL | bar!(); //~ ERROR `bar` is ambiguous +LL | bar!(); | ^^^ ambiguous name | note: `bar` could refer to the macro defined here diff --git a/src/test/ui/overlap-marker-trait.stderr b/src/test/ui/overlap-marker-trait.stderr index 21ba2367901..a59af8dcdbc 100644 --- a/src/test/ui/overlap-marker-trait.stderr +++ b/src/test/ui/overlap-marker-trait.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `NotDebugOrDisplay: Marker` is not satisfied --> $DIR/overlap-marker-trait.rs:30:5 | -LL | is_marker::(); //~ ERROR +LL | is_marker::(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Marker` is not implemented for `NotDebugOrDisplay` | note: required by `is_marker` diff --git a/src/test/ui/overloaded-calls-nontuple.stderr b/src/test/ui/overloaded-calls-nontuple.stderr index 31b5697adda..82c12c4b6e1 100644 --- a/src/test/ui/overloaded-calls-nontuple.stderr +++ b/src/test/ui/overloaded-calls-nontuple.stderr @@ -1,7 +1,7 @@ error[E0059]: cannot use call notation; the first type parameter for the function trait is neither a tuple nor unit --> $DIR/overloaded-calls-nontuple.rs:26:10 | -LL | drop(s(3)) //~ ERROR cannot use call notation +LL | drop(s(3)) | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/panic-handler/panic-handler-bad-signature-1.stderr b/src/test/ui/panic-handler/panic-handler-bad-signature-1.stderr index e3664489549..8b044f7669c 100644 --- a/src/test/ui/panic-handler/panic-handler-bad-signature-1.stderr +++ b/src/test/ui/panic-handler/panic-handler-bad-signature-1.stderr @@ -1,13 +1,13 @@ error: return type should be `!` --> $DIR/panic-handler-bad-signature-1.rs:11:6 | -LL | ) -> () //~ ERROR return type should be `!` +LL | ) -> () | ^^ error: argument should be `&PanicInfo` --> $DIR/panic-handler-bad-signature-1.rs:10:11 | -LL | info: PanicInfo, //~ ERROR argument should be `&PanicInfo` +LL | info: PanicInfo, | ^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/panic-handler/panic-handler-bad-signature-2.stderr b/src/test/ui/panic-handler/panic-handler-bad-signature-2.stderr index 737ff313d0b..5ab6934202e 100644 --- a/src/test/ui/panic-handler/panic-handler-bad-signature-2.stderr +++ b/src/test/ui/panic-handler/panic-handler-bad-signature-2.stderr @@ -1,7 +1,7 @@ error: argument should be `&PanicInfo` --> $DIR/panic-handler-bad-signature-2.rs:10:11 | -LL | info: &'static PanicInfo, //~ ERROR argument should be `&PanicInfo` +LL | info: &'static PanicInfo, | ^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/panic-handler/panic-handler-bad-signature-3.stderr b/src/test/ui/panic-handler/panic-handler-bad-signature-3.stderr index c0b39769a49..0a70181fdac 100644 --- a/src/test/ui/panic-handler/panic-handler-bad-signature-3.stderr +++ b/src/test/ui/panic-handler/panic-handler-bad-signature-3.stderr @@ -1,7 +1,7 @@ error: function should have one argument --> $DIR/panic-handler-bad-signature-3.rs:9:1 | -LL | fn panic() -> ! { //~ ERROR function should have one argument +LL | fn panic() -> ! { | ^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/panic-handler/panic-handler-bad-signature-4.stderr b/src/test/ui/panic-handler/panic-handler-bad-signature-4.stderr index bd25c8b02f8..3a5fc76efbb 100644 --- a/src/test/ui/panic-handler/panic-handler-bad-signature-4.stderr +++ b/src/test/ui/panic-handler/panic-handler-bad-signature-4.stderr @@ -2,7 +2,7 @@ error: should have no type parameters --> $DIR/panic-handler-bad-signature-4.rs:9:1 | LL | / fn panic(pi: &PanicInfo) -> ! { -LL | | //~^ ERROR should have no type parameters +LL | | LL | | loop {} LL | | } | |_^ diff --git a/src/test/ui/panic-handler/panic-handler-duplicate.stderr b/src/test/ui/panic-handler/panic-handler-duplicate.stderr index 80deff23a87..e9b19453643 100644 --- a/src/test/ui/panic-handler/panic-handler-duplicate.stderr +++ b/src/test/ui/panic-handler/panic-handler-duplicate.stderr @@ -1,7 +1,7 @@ error[E0152]: duplicate lang item found: `panic_impl`. --> $DIR/panic-handler-duplicate.rs:15:1 | -LL | / fn panic2(info: &PanicInfo) -> ! { //~ ERROR duplicate lang item found: `panic_impl`. +LL | / fn panic2(info: &PanicInfo) -> ! { LL | | loop {} LL | | } | |_^ diff --git a/src/test/ui/panic-handler/panic-handler-wrong-location.stderr b/src/test/ui/panic-handler/panic-handler-wrong-location.stderr index cab45d8bfad..ae3ed5ab12b 100644 --- a/src/test/ui/panic-handler/panic-handler-wrong-location.stderr +++ b/src/test/ui/panic-handler/panic-handler-wrong-location.stderr @@ -1,7 +1,7 @@ error[E0718]: `panic_impl` language item must be applied to a function --> $DIR/panic-handler-wrong-location.rs:6:1 | -LL | #[panic_handler] //~ ERROR `panic_impl` language item must be applied to a function +LL | #[panic_handler] | ^^^^^^^^^^^^^^^^ attribute should be applied to a function, not a static item error: `#[panic_handler]` function required, but not found diff --git a/src/test/ui/panic-runtime/needs-gate.stderr b/src/test/ui/panic-runtime/needs-gate.stderr index 75ddda79b2d..5b8ff82d1fd 100644 --- a/src/test/ui/panic-runtime/needs-gate.stderr +++ b/src/test/ui/panic-runtime/needs-gate.stderr @@ -1,7 +1,7 @@ error[E0658]: the `#[panic_runtime]` attribute is an experimental feature (see issue #32837) --> $DIR/needs-gate.rs:4:1 | -LL | #![panic_runtime] //~ ERROR: is an experimental feature +LL | #![panic_runtime] | ^^^^^^^^^^^^^^^^^ | = help: add #![feature(panic_runtime)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | #![panic_runtime] //~ ERROR: is an experimental feature error[E0658]: the `#[needs_panic_runtime]` attribute is an experimental feature (see issue #32837) --> $DIR/needs-gate.rs:5:1 | -LL | #![needs_panic_runtime] //~ ERROR: is an experimental feature +LL | #![needs_panic_runtime] | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(needs_panic_runtime)] to the crate attributes to enable diff --git a/src/test/ui/paren-span.stderr b/src/test/ui/paren-span.stderr index 23e6ade0469..141378752d6 100644 --- a/src/test/ui/paren-span.stderr +++ b/src/test/ui/paren-span.stderr @@ -1,7 +1,7 @@ error[E0616]: field `x` of struct `m::S` is private --> $DIR/paren-span.rs:19:12 | -LL | paren!(s.x); //~ ERROR field `x` of struct `m::S` is private +LL | paren!(s.x); | ^^^ error: aborting due to previous error diff --git a/src/test/ui/parenthesized-deref-suggestion.stderr b/src/test/ui/parenthesized-deref-suggestion.stderr index fd9b0e8216b..a16510055f5 100644 --- a/src/test/ui/parenthesized-deref-suggestion.stderr +++ b/src/test/ui/parenthesized-deref-suggestion.stderr @@ -1,17 +1,17 @@ error[E0609]: no field `opts` on type `*const Session` --> $DIR/parenthesized-deref-suggestion.rs:7:30 | -LL | (sess as *const Session).opts; //~ ERROR no field `opts` on type `*const Session` +LL | (sess as *const Session).opts; | ^^^^ help: `(sess as *const Session)` is a raw pointer; try dereferencing it | -LL | (*(sess as *const Session)).opts; //~ ERROR no field `opts` on type `*const Session` +LL | (*(sess as *const Session)).opts; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0609]: no field `0` on type `[u32; 1]` --> $DIR/parenthesized-deref-suggestion.rs:10:21 | -LL | (x as [u32; 1]).0; //~ ERROR no field `0` on type `[u32; 1]` +LL | (x as [u32; 1]).0; | ----------------^ | | | help: instead of using tuple indexing, use array indexing: `(x as [u32; 1])[0]` diff --git a/src/test/ui/parse-error-correct.stderr b/src/test/ui/parse-error-correct.stderr index 529a93cf304..b0d2b2d0c0a 100644 --- a/src/test/ui/parse-error-correct.stderr +++ b/src/test/ui/parse-error-correct.stderr @@ -1,13 +1,13 @@ error: unexpected token: `;` --> $DIR/parse-error-correct.rs:8:15 | -LL | let x = y.; //~ ERROR unexpected token +LL | let x = y.; | ^ error: unexpected token: `(` --> $DIR/parse-error-correct.rs:9:15 | -LL | let x = y.(); //~ ERROR unexpected token +LL | let x = y.(); | ^ error[E0618]: expected function, found `{integer}` @@ -15,8 +15,8 @@ error[E0618]: expected function, found `{integer}` | LL | let y = 42; | - `{integer}` defined here -LL | let x = y.; //~ ERROR unexpected token -LL | let x = y.(); //~ ERROR unexpected token +LL | let x = y.; +LL | let x = y.(); | ^--- | | | call expression requires function @@ -24,7 +24,7 @@ LL | let x = y.(); //~ ERROR unexpected token error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/parse-error-correct.rs:11:15 | -LL | let x = y.foo; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields [E061 +LL | let x = y.foo; | ^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/parser-recovery-1.stderr b/src/test/ui/parser-recovery-1.stderr index 28505a8a056..cd02710c40b 100644 --- a/src/test/ui/parser-recovery-1.stderr +++ b/src/test/ui/parser-recovery-1.stderr @@ -9,7 +9,7 @@ LL | fn bar() { LL | } | - ...as it matches this but it has different indentation ... -LL | } //~ ERROR this file contains an un-closed delimiter +LL | } | ^ error: unexpected token: `;` diff --git a/src/test/ui/parser-recovery-2.stderr b/src/test/ui/parser-recovery-2.stderr index 76f7af38e77..c246fa80b0a 100644 --- a/src/test/ui/parser-recovery-2.stderr +++ b/src/test/ui/parser-recovery-2.stderr @@ -1,7 +1,7 @@ error: unexpected token: `;` --> $DIR/parser-recovery-2.rs:12:15 | -LL | let x = y.; //~ ERROR unexpected token +LL | let x = y.; | ^ error: incorrect close delimiter: `)` @@ -9,20 +9,20 @@ error: incorrect close delimiter: `)` | LL | fn bar() { | - un-closed delimiter -LL | let x = foo(); //~ ERROR cannot find function `foo` in this scope -LL | ) //~ ERROR incorrect close delimiter: `)` +LL | let x = foo(); +LL | ) | ^ incorrect close delimiter error[E0425]: cannot find function `foo` in this scope --> $DIR/parser-recovery-2.rs:7:17 | -LL | let x = foo(); //~ ERROR cannot find function `foo` in this scope +LL | let x = foo(); | ^^^ not found in this scope error[E0425]: cannot find value `y` in this scope --> $DIR/parser-recovery-2.rs:12:13 | -LL | let x = y.; //~ ERROR unexpected token +LL | let x = y.; | ^ not found in this scope error: aborting due to 4 previous errors diff --git a/src/test/ui/parser/ascii-only-character-escape.stderr b/src/test/ui/parser/ascii-only-character-escape.stderr index d3330a405c0..7524c4eccd9 100644 --- a/src/test/ui/parser/ascii-only-character-escape.stderr +++ b/src/test/ui/parser/ascii-only-character-escape.stderr @@ -1,19 +1,19 @@ error: this form of character escape may only be used with characters in the range [/x00-/x7f] --> $DIR/ascii-only-character-escape.rs:4:16 | -LL | let x = "/x80"; //~ ERROR may only be used +LL | let x = "/x80"; | ^^ error: this form of character escape may only be used with characters in the range [/x00-/x7f] --> $DIR/ascii-only-character-escape.rs:5:16 | -LL | let y = "/xff"; //~ ERROR may only be used +LL | let y = "/xff"; | ^^ error: this form of character escape may only be used with characters in the range [/x00-/x7f] --> $DIR/ascii-only-character-escape.rs:6:16 | -LL | let z = "/xe2"; //~ ERROR may only be used +LL | let z = "/xe2"; | ^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/parser/assoc-oddities-1.stderr b/src/test/ui/parser/assoc-oddities-1.stderr index 076bca0fc3a..376ddf4d68b 100644 --- a/src/test/ui/parser/assoc-oddities-1.stderr +++ b/src/test/ui/parser/assoc-oddities-1.stderr @@ -1,7 +1,7 @@ error: expected one of `.`, `;`, `?`, or `}`, found `[` --> $DIR/assoc-oddities-1.rs:10:28 | -LL | ..if c { a } else { b }[n]; //~ ERROR expected one of +LL | ..if c { a } else { b }[n]; | ^ expected one of `.`, `;`, `?`, or `}` here error: aborting due to previous error diff --git a/src/test/ui/parser/assoc-oddities-2.stderr b/src/test/ui/parser/assoc-oddities-2.stderr index 56810291252..4b3893d2c17 100644 --- a/src/test/ui/parser/assoc-oddities-2.stderr +++ b/src/test/ui/parser/assoc-oddities-2.stderr @@ -1,7 +1,7 @@ error: expected one of `.`, `;`, `?`, or `}`, found `[` --> $DIR/assoc-oddities-2.rs:5:29 | -LL | x..if c { a } else { b }[n]; //~ ERROR expected one of +LL | x..if c { a } else { b }[n]; | ^ expected one of `.`, `;`, `?`, or `}` here error: aborting due to previous error diff --git a/src/test/ui/parser/attr-bad-meta-2.stderr b/src/test/ui/parser/attr-bad-meta-2.stderr index 36e566b5aa4..ffbfc583e8a 100644 --- a/src/test/ui/parser/attr-bad-meta-2.stderr +++ b/src/test/ui/parser/attr-bad-meta-2.stderr @@ -1,7 +1,7 @@ error: unexpected token: `]` --> $DIR/attr-bad-meta-2.rs:1:8 | -LL | #[path =] //~ ERROR unexpected token: `]` +LL | #[path =] | ^ error: aborting due to previous error diff --git a/src/test/ui/parser/attr-bad-meta-3.stderr b/src/test/ui/parser/attr-bad-meta-3.stderr index 863a2d2069f..4fa420c79fc 100644 --- a/src/test/ui/parser/attr-bad-meta-3.stderr +++ b/src/test/ui/parser/attr-bad-meta-3.stderr @@ -1,7 +1,7 @@ error: expected `]`, found `token` --> $DIR/attr-bad-meta-3.rs:1:10 | -LL | #[path() token] //~ ERROR expected `]`, found `token` +LL | #[path() token] | ^^^^^ expected `]` error: aborting due to previous error diff --git a/src/test/ui/parser/attr-bad-meta.stderr b/src/test/ui/parser/attr-bad-meta.stderr index 693da95017d..a452df5e90c 100644 --- a/src/test/ui/parser/attr-bad-meta.stderr +++ b/src/test/ui/parser/attr-bad-meta.stderr @@ -1,7 +1,7 @@ error: expected one of `(`, `::`, `=`, `[`, `]`, or `{`, found `*` --> $DIR/attr-bad-meta.rs:1:7 | -LL | #[path*] //~ ERROR expected one of `(`, `::`, `=`, `[`, `]`, or `{`, found `*` +LL | #[path*] | ^ expected one of `(`, `::`, `=`, `[`, `]`, or `{` here error: aborting due to previous error diff --git a/src/test/ui/parser/attr-before-eof.stderr b/src/test/ui/parser/attr-before-eof.stderr index a81dc52417a..eb5daf84981 100644 --- a/src/test/ui/parser/attr-before-eof.stderr +++ b/src/test/ui/parser/attr-before-eof.stderr @@ -1,7 +1,7 @@ error: expected item after attributes --> $DIR/attr-before-eof.rs:3:16 | -LL | #[derive(Debug)] //~ERROR expected item after attributes +LL | #[derive(Debug)] | ^ error: aborting due to previous error diff --git a/src/test/ui/parser/attr.stderr b/src/test/ui/parser/attr.stderr index 8151bd7cdd7..5111b40603c 100644 --- a/src/test/ui/parser/attr.stderr +++ b/src/test/ui/parser/attr.stderr @@ -1,7 +1,7 @@ error: an inner attribute is not permitted in this context --> $DIR/attr.rs:5:3 | -LL | #![lang = "foo"] //~ ERROR an inner attribute is not permitted in this context +LL | #![lang = "foo"] | ^ | = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them. @@ -9,7 +9,7 @@ LL | #![lang = "foo"] //~ ERROR an inner attribute is not permitted in this cont error[E0522]: definition of an unknown language item: `foo` --> $DIR/attr.rs:5:1 | -LL | #![lang = "foo"] //~ ERROR an inner attribute is not permitted in this context +LL | #![lang = "foo"] | ^^^^^^^^^^^^^^^^ definition of unknown language item `foo` error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/attrs-after-extern-mod.stderr b/src/test/ui/parser/attrs-after-extern-mod.stderr index 067c4192ce6..cecdab4d631 100644 --- a/src/test/ui/parser/attrs-after-extern-mod.stderr +++ b/src/test/ui/parser/attrs-after-extern-mod.stderr @@ -1,7 +1,7 @@ error: expected item after attributes --> $DIR/attrs-after-extern-mod.rs:10:19 | -LL | #[cfg(stage37)] //~ ERROR expected item after attributes +LL | #[cfg(stage37)] | ^ error: aborting due to previous error diff --git a/src/test/ui/parser/bad-char-literals.stderr b/src/test/ui/parser/bad-char-literals.stderr index 0335a4b83ea..eb048b08c71 100644 --- a/src/test/ui/parser/bad-char-literals.stderr +++ b/src/test/ui/parser/bad-char-literals.stderr @@ -15,7 +15,7 @@ LL | | '; error: character constant must be escaped: /r --> $DIR/bad-char-literals.rs:16:6 | -LL | ' '; //~ ERROR: character constant must be escaped: /r +LL | ' '; | ^ error: character constant must be escaped: /t diff --git a/src/test/ui/parser/bad-lit-suffixes.stderr b/src/test/ui/parser/bad-lit-suffixes.stderr index 608c5fda248..3d4d7b4a78b 100644 --- a/src/test/ui/parser/bad-lit-suffixes.stderr +++ b/src/test/ui/parser/bad-lit-suffixes.stderr @@ -1,55 +1,55 @@ error: ABI spec with a suffix is invalid --> $DIR/bad-lit-suffixes.rs:5:5 | -LL | "C"suffix //~ ERROR ABI spec with a suffix is invalid +LL | "C"suffix | ^^^^^^^^^ ABI spec with a suffix is invalid error: ABI spec with a suffix is invalid --> $DIR/bad-lit-suffixes.rs:9:5 | -LL | "C"suffix //~ ERROR ABI spec with a suffix is invalid +LL | "C"suffix | ^^^^^^^^^ ABI spec with a suffix is invalid error: string literal with a suffix is invalid --> $DIR/bad-lit-suffixes.rs:13:5 | -LL | ""suffix; //~ ERROR string literal with a suffix is invalid +LL | ""suffix; | ^^^^^^^^ string literal with a suffix is invalid error: byte string literal with a suffix is invalid --> $DIR/bad-lit-suffixes.rs:14:5 | -LL | b""suffix; //~ ERROR byte string literal with a suffix is invalid +LL | b""suffix; | ^^^^^^^^^ byte string literal with a suffix is invalid error: string literal with a suffix is invalid --> $DIR/bad-lit-suffixes.rs:15:5 | -LL | r#""#suffix; //~ ERROR string literal with a suffix is invalid +LL | r#""#suffix; | ^^^^^^^^^^^ string literal with a suffix is invalid error: byte string literal with a suffix is invalid --> $DIR/bad-lit-suffixes.rs:16:5 | -LL | br#""#suffix; //~ ERROR byte string literal with a suffix is invalid +LL | br#""#suffix; | ^^^^^^^^^^^^ byte string literal with a suffix is invalid error: char literal with a suffix is invalid --> $DIR/bad-lit-suffixes.rs:17:5 | -LL | 'a'suffix; //~ ERROR char literal with a suffix is invalid +LL | 'a'suffix; | ^^^^^^^^^ char literal with a suffix is invalid error: byte literal with a suffix is invalid --> $DIR/bad-lit-suffixes.rs:18:5 | -LL | b'a'suffix; //~ ERROR byte literal with a suffix is invalid +LL | b'a'suffix; | ^^^^^^^^^^ byte literal with a suffix is invalid error: invalid width `1024` for integer literal --> $DIR/bad-lit-suffixes.rs:20:5 | -LL | 1234u1024; //~ ERROR invalid width `1024` for integer literal +LL | 1234u1024; | ^^^^^^^^^ | = help: valid widths are 8, 16, 32, 64 and 128 @@ -57,7 +57,7 @@ LL | 1234u1024; //~ ERROR invalid width `1024` for integer literal error: invalid width `1024` for integer literal --> $DIR/bad-lit-suffixes.rs:21:5 | -LL | 1234i1024; //~ ERROR invalid width `1024` for integer literal +LL | 1234i1024; | ^^^^^^^^^ | = help: valid widths are 8, 16, 32, 64 and 128 @@ -65,7 +65,7 @@ LL | 1234i1024; //~ ERROR invalid width `1024` for integer literal error: invalid width `1024` for float literal --> $DIR/bad-lit-suffixes.rs:22:5 | -LL | 1234f1024; //~ ERROR invalid width `1024` for float literal +LL | 1234f1024; | ^^^^^^^^^ | = help: valid widths are 32 and 64 @@ -73,7 +73,7 @@ LL | 1234f1024; //~ ERROR invalid width `1024` for float literal error: invalid width `1024` for float literal --> $DIR/bad-lit-suffixes.rs:23:5 | -LL | 1234.5f1024; //~ ERROR invalid width `1024` for float literal +LL | 1234.5f1024; | ^^^^^^^^^^^ | = help: valid widths are 32 and 64 @@ -81,7 +81,7 @@ LL | 1234.5f1024; //~ ERROR invalid width `1024` for float literal error: invalid suffix `suffix` for numeric literal --> $DIR/bad-lit-suffixes.rs:25:5 | -LL | 1234suffix; //~ ERROR invalid suffix `suffix` for numeric literal +LL | 1234suffix; | ^^^^^^^^^^ invalid suffix `suffix` | = help: the suffix must be one of the integral types (`u32`, `isize`, etc) @@ -89,7 +89,7 @@ LL | 1234suffix; //~ ERROR invalid suffix `suffix` for numeric literal error: invalid suffix `suffix` for numeric literal --> $DIR/bad-lit-suffixes.rs:26:5 | -LL | 0b101suffix; //~ ERROR invalid suffix `suffix` for numeric literal +LL | 0b101suffix; | ^^^^^^^^^^^ invalid suffix `suffix` | = help: the suffix must be one of the integral types (`u32`, `isize`, etc) @@ -97,7 +97,7 @@ LL | 0b101suffix; //~ ERROR invalid suffix `suffix` for numeric literal error: invalid suffix `suffix` for float literal --> $DIR/bad-lit-suffixes.rs:27:5 | -LL | 1.0suffix; //~ ERROR invalid suffix `suffix` for float literal +LL | 1.0suffix; | ^^^^^^^^^ invalid suffix `suffix` | = help: valid suffixes are `f32` and `f64` @@ -105,7 +105,7 @@ LL | 1.0suffix; //~ ERROR invalid suffix `suffix` for float literal error: invalid suffix `suffix` for float literal --> $DIR/bad-lit-suffixes.rs:28:5 | -LL | 1.0e10suffix; //~ ERROR invalid suffix `suffix` for float literal +LL | 1.0e10suffix; | ^^^^^^^^^^^^ invalid suffix `suffix` | = help: valid suffixes are `f32` and `f64` diff --git a/src/test/ui/parser/bad-match.stderr b/src/test/ui/parser/bad-match.stderr index dd3a2d2a27a..2f29b978e9c 100644 --- a/src/test/ui/parser/bad-match.stderr +++ b/src/test/ui/parser/bad-match.stderr @@ -1,7 +1,7 @@ error: expected one of `:`, `;`, `=`, or `@`, found `x` --> $DIR/bad-match.rs:2:13 | -LL | let isize x = 5; //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `x` +LL | let isize x = 5; | ^ expected one of `:`, `;`, `=`, or `@` here error: aborting due to previous error diff --git a/src/test/ui/parser/bad-value-ident-false.stderr b/src/test/ui/parser/bad-value-ident-false.stderr index 69a496f3a0c..9ddca101567 100644 --- a/src/test/ui/parser/bad-value-ident-false.stderr +++ b/src/test/ui/parser/bad-value-ident-false.stderr @@ -1,11 +1,11 @@ error: expected identifier, found keyword `false` --> $DIR/bad-value-ident-false.rs:1:4 | -LL | fn false() { } //~ ERROR expected identifier, found keyword `false` +LL | fn false() { } | ^^^^^ expected identifier, found keyword help: you can escape reserved keywords to use them as identifiers | -LL | fn r#false() { } //~ ERROR expected identifier, found keyword `false` +LL | fn r#false() { } | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/parser/bad-value-ident-true.stderr b/src/test/ui/parser/bad-value-ident-true.stderr index 2606b7450ae..ec497dbe407 100644 --- a/src/test/ui/parser/bad-value-ident-true.stderr +++ b/src/test/ui/parser/bad-value-ident-true.stderr @@ -1,11 +1,11 @@ error: expected identifier, found keyword `true` --> $DIR/bad-value-ident-true.rs:1:4 | -LL | fn true() { } //~ ERROR expected identifier, found keyword `true` +LL | fn true() { } | ^^^^ expected identifier, found keyword help: you can escape reserved keywords to use them as identifiers | -LL | fn r#true() { } //~ ERROR expected identifier, found keyword `true` +LL | fn r#true() { } | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/parser/better-expected.stderr b/src/test/ui/parser/better-expected.stderr index 3495353c6f9..d100d01e78f 100644 --- a/src/test/ui/parser/better-expected.stderr +++ b/src/test/ui/parser/better-expected.stderr @@ -1,7 +1,7 @@ error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `3` --> $DIR/better-expected.rs:2:19 | -LL | let x: [isize 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `3` +LL | let x: [isize 3]; | - ^ expected one of 7 possible tokens here | | | while parsing the type for `x` diff --git a/src/test/ui/parser/bind-struct-early-modifiers.stderr b/src/test/ui/parser/bind-struct-early-modifiers.stderr index 618e577e4e2..50c95b8cf40 100644 --- a/src/test/ui/parser/bind-struct-early-modifiers.stderr +++ b/src/test/ui/parser/bind-struct-early-modifiers.stderr @@ -1,13 +1,13 @@ error: expected `,` --> $DIR/bind-struct-early-modifiers.rs:4:19 | -LL | Foo { ref x: ref x } => {}, //~ ERROR expected `,` +LL | Foo { ref x: ref x } => {}, | ^ error[E0027]: pattern does not mention field `x` --> $DIR/bind-struct-early-modifiers.rs:4:9 | -LL | Foo { ref x: ref x } => {}, //~ ERROR expected `,` +LL | Foo { ref x: ref x } => {}, | ^^^^^^^^^^^^^^^^^^^^ missing field `x` error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/bound-single-question-mark.stderr b/src/test/ui/parser/bound-single-question-mark.stderr index e30b32f41b4..82937a517b5 100644 --- a/src/test/ui/parser/bound-single-question-mark.stderr +++ b/src/test/ui/parser/bound-single-question-mark.stderr @@ -1,7 +1,7 @@ error: expected identifier, found `>` --> $DIR/bound-single-question-mark.rs:1:10 | -LL | fn f() {} //~ ERROR expected identifier, found `>` +LL | fn f() {} | ^ expected identifier error: aborting due to previous error diff --git a/src/test/ui/parser/bounds-lifetime-1.stderr b/src/test/ui/parser/bounds-lifetime-1.stderr index 33bba35f692..17d65314d96 100644 --- a/src/test/ui/parser/bounds-lifetime-1.stderr +++ b/src/test/ui/parser/bounds-lifetime-1.stderr @@ -1,7 +1,7 @@ error: expected one of `,`, `:`, or `>`, found `'b` --> $DIR/bounds-lifetime-1.rs:1:17 | -LL | type A = for<'a 'b> fn(); //~ ERROR expected one of `,`, `:`, or `>`, found `'b` +LL | type A = for<'a 'b> fn(); | ^^ expected one of `,`, `:`, or `>` here error: aborting due to previous error diff --git a/src/test/ui/parser/bounds-lifetime-2.stderr b/src/test/ui/parser/bounds-lifetime-2.stderr index a8a22aaafce..587e527f0a8 100644 --- a/src/test/ui/parser/bounds-lifetime-2.stderr +++ b/src/test/ui/parser/bounds-lifetime-2.stderr @@ -1,7 +1,7 @@ error: expected one of `,`, `:`, or `>`, found `+` --> $DIR/bounds-lifetime-2.rs:1:17 | -LL | type A = for<'a + 'b> fn(); //~ ERROR expected one of `,`, `:`, or `>`, found `+` +LL | type A = for<'a + 'b> fn(); | ^ expected one of `,`, `:`, or `>` here error: aborting due to previous error diff --git a/src/test/ui/parser/bounds-lifetime-where-1.stderr b/src/test/ui/parser/bounds-lifetime-where-1.stderr index 0300fe98910..b6bd866938b 100644 --- a/src/test/ui/parser/bounds-lifetime-where-1.stderr +++ b/src/test/ui/parser/bounds-lifetime-where-1.stderr @@ -1,7 +1,7 @@ error: expected `:`, found `;` --> $DIR/bounds-lifetime-where-1.rs:1:16 | -LL | type A where 'a; //~ ERROR expected `:`, found `;` +LL | type A where 'a; | ^ expected `:` error: aborting due to previous error diff --git a/src/test/ui/parser/bounds-lifetime-where.stderr b/src/test/ui/parser/bounds-lifetime-where.stderr index 6a8d7e9d4a1..9507a459858 100644 --- a/src/test/ui/parser/bounds-lifetime-where.stderr +++ b/src/test/ui/parser/bounds-lifetime-where.stderr @@ -1,7 +1,7 @@ error: expected one of `=`, lifetime, or type, found `,` --> $DIR/bounds-lifetime-where.rs:8:14 | -LL | type A where , = u8; //~ ERROR expected one of `=`, lifetime, or type, found `,` +LL | type A where , = u8; | ^ expected one of `=`, lifetime, or type here error: aborting due to previous error diff --git a/src/test/ui/parser/bounds-lifetime.stderr b/src/test/ui/parser/bounds-lifetime.stderr index 191ea3ebd07..facbd280070 100644 --- a/src/test/ui/parser/bounds-lifetime.stderr +++ b/src/test/ui/parser/bounds-lifetime.stderr @@ -1,7 +1,7 @@ error: expected one of `>`, `const`, identifier, or lifetime, found `,` --> $DIR/bounds-lifetime.rs:9:14 | -LL | type A = for<,> fn(); //~ ERROR expected one of `>`, `const`, identifier, or lifetime, found `,` +LL | type A = for<,> fn(); | ^ expected one of `>`, `const`, identifier, or lifetime here error: aborting due to previous error diff --git a/src/test/ui/parser/bounds-type.stderr b/src/test/ui/parser/bounds-type.stderr index 046e0ce8c7a..0b714e40a10 100644 --- a/src/test/ui/parser/bounds-type.stderr +++ b/src/test/ui/parser/bounds-type.stderr @@ -1,7 +1,7 @@ error: `?` may only modify trait bounds, not lifetime bounds --> $DIR/bounds-type.rs:10:8 | -LL | T: ?'a, //~ ERROR `?` may only modify trait bounds, not lifetime bounds +LL | T: ?'a, | ^ error: aborting due to previous error diff --git a/src/test/ui/parser/byte-literals.stderr b/src/test/ui/parser/byte-literals.stderr index ab14eeede66..36cb0170a14 100644 --- a/src/test/ui/parser/byte-literals.stderr +++ b/src/test/ui/parser/byte-literals.stderr @@ -1,43 +1,43 @@ error: unknown byte escape: f --> $DIR/byte-literals.rs:6:21 | -LL | static FOO: u8 = b'/f'; //~ ERROR unknown byte escape +LL | static FOO: u8 = b'/f'; | ^ error: unknown byte escape: f --> $DIR/byte-literals.rs:9:8 | -LL | b'/f'; //~ ERROR unknown byte escape +LL | b'/f'; | ^ error: invalid character in numeric character escape: Z --> $DIR/byte-literals.rs:10:10 | -LL | b'/x0Z'; //~ ERROR invalid character in numeric character escape: Z +LL | b'/x0Z'; | ^ error: byte constant must be escaped: /t --> $DIR/byte-literals.rs:11:7 | -LL | b' '; //~ ERROR byte constant must be escaped +LL | b' '; | ^^^^ error: byte constant must be escaped: ' --> $DIR/byte-literals.rs:12:7 | -LL | b'''; //~ ERROR byte constant must be escaped +LL | b'''; | ^ error: byte constant must be ASCII. Use a /xHH escape for a non-ASCII byte --> $DIR/byte-literals.rs:13:7 | -LL | b'é'; //~ ERROR byte constant must be ASCII +LL | b'é'; | ^ error: unterminated byte constant: b'a --> $DIR/byte-literals.rs:14:5 | -LL | b'a //~ ERROR unterminated byte constant +LL | b'a | ^^^ error: aborting due to 7 previous errors diff --git a/src/test/ui/parser/byte-string-literals.stderr b/src/test/ui/parser/byte-string-literals.stderr index 669f5585cb2..2e9b13b933e 100644 --- a/src/test/ui/parser/byte-string-literals.stderr +++ b/src/test/ui/parser/byte-string-literals.stderr @@ -1,31 +1,31 @@ error: unknown byte escape: f --> $DIR/byte-string-literals.rs:6:32 | -LL | static FOO: &'static [u8] = b"/f"; //~ ERROR unknown byte escape +LL | static FOO: &'static [u8] = b"/f"; | ^ error: unknown byte escape: f --> $DIR/byte-string-literals.rs:9:8 | -LL | b"/f"; //~ ERROR unknown byte escape +LL | b"/f"; | ^ error: invalid character in numeric character escape: Z --> $DIR/byte-string-literals.rs:10:10 | -LL | b"/x0Z"; //~ ERROR invalid character in numeric character escape: Z +LL | b"/x0Z"; | ^ error: byte constant must be ASCII. Use a /xHH escape for a non-ASCII byte --> $DIR/byte-string-literals.rs:11:7 | -LL | b"é"; //~ ERROR byte constant must be ASCII +LL | b"é"; | ^ error: unterminated double quote byte string --> $DIR/byte-string-literals.rs:12:7 | -LL | b"a //~ ERROR unterminated double quote byte string +LL | b"a | _______^ LL | | } | |__^ diff --git a/src/test/ui/parser/circular_modules_main.stderr b/src/test/ui/parser/circular_modules_main.stderr index 7751a8c0f38..33865fb7bca 100644 --- a/src/test/ui/parser/circular_modules_main.stderr +++ b/src/test/ui/parser/circular_modules_main.stderr @@ -1,7 +1,7 @@ error: circular modules: $DIR/circular_modules_hello.rs -> $DIR/circular_modules_main.rs -> $DIR/circular_modules_hello.rs --> $DIR/circular_modules_main.rs:2:5 | -LL | mod circular_modules_hello; //~ ERROR: circular modules +LL | mod circular_modules_hello; | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/parser/column-offset-1-based.stderr b/src/test/ui/parser/column-offset-1-based.stderr index b12b47b67ce..5cbf3d3e959 100644 --- a/src/test/ui/parser/column-offset-1-based.stderr +++ b/src/test/ui/parser/column-offset-1-based.stderr @@ -1,7 +1,7 @@ error: expected `[`, found `` --> $DIR/column-offset-1-based.rs:1:1 | -LL | # //~ ERROR expected `[`, found `` +LL | # | ^ expected `[` error: aborting due to previous error diff --git a/src/test/ui/parser/default.stderr b/src/test/ui/parser/default.stderr index 27193672903..c43fffd58af 100644 --- a/src/test/ui/parser/default.stderr +++ b/src/test/ui/parser/default.stderr @@ -1,13 +1,13 @@ error: expected one of `async`, `const`, `existential`, `extern`, `fn`, `type`, or `unsafe`, found `pub` --> $DIR/default.rs:22:13 | -LL | default pub fn foo() -> T { T::default() } //~ ERROR expected one of +LL | default pub fn foo() -> T { T::default() } | ^^^ expected one of 7 possible tokens here error[E0449]: unnecessary visibility qualifier --> $DIR/default.rs:16:5 | -LL | pub default fn foo() -> T { //~ ERROR unnecessary visibility qualifier +LL | pub default fn foo() -> T { | ^^^ `pub` not permitted here because it's implied error[E0046]: not all trait items implemented, missing: `foo` @@ -16,7 +16,7 @@ error[E0046]: not all trait items implemented, missing: `foo` LL | fn foo() -> T; | -------------------------- `foo` from trait ... -LL | impl Foo for u32 { //~ ERROR not all trait items implemented, missing: `foo` +LL | impl Foo for u32 { | ^^^^^^^^^^^^^^^^ missing `foo` in implementation error: aborting due to 3 previous errors diff --git a/src/test/ui/parser/doc-before-attr.stderr b/src/test/ui/parser/doc-before-attr.stderr index 0cd6aa81ec5..0fae44ce5c8 100644 --- a/src/test/ui/parser/doc-before-attr.stderr +++ b/src/test/ui/parser/doc-before-attr.stderr @@ -1,7 +1,7 @@ error: expected item after attributes --> $DIR/doc-before-attr.rs:4:16 | -LL | #[derive(Debug)] //~ERROR expected item after attributes +LL | #[derive(Debug)] | ^ error: aborting due to previous error diff --git a/src/test/ui/parser/doc-before-eof.stderr b/src/test/ui/parser/doc-before-eof.stderr index 5809d64e806..82756626765 100644 --- a/src/test/ui/parser/doc-before-eof.stderr +++ b/src/test/ui/parser/doc-before-eof.stderr @@ -1,7 +1,7 @@ error: expected item after doc comment --> $DIR/doc-before-eof.rs:3:1 | -LL | /// hi //~ERROR expected item after doc comment +LL | /// hi | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment doesn't document anything error: aborting due to previous error diff --git a/src/test/ui/parser/empty-impl-semicolon.stderr b/src/test/ui/parser/empty-impl-semicolon.stderr index 965a8a45aed..46f2393cd83 100644 --- a/src/test/ui/parser/empty-impl-semicolon.stderr +++ b/src/test/ui/parser/empty-impl-semicolon.stderr @@ -1,7 +1,7 @@ error: expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `;` --> $DIR/empty-impl-semicolon.rs:1:9 | -LL | impl Foo; //~ ERROR expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `;` +LL | impl Foo; | ^ expected one of 8 possible tokens here error: aborting due to previous error diff --git a/src/test/ui/parser/extern-crate-unexpected-token.stderr b/src/test/ui/parser/extern-crate-unexpected-token.stderr index ed888eb1a8e..04edd46936a 100644 --- a/src/test/ui/parser/extern-crate-unexpected-token.stderr +++ b/src/test/ui/parser/extern-crate-unexpected-token.stderr @@ -1,7 +1,7 @@ error: expected one of `crate`, `fn`, or `{`, found `crte` --> $DIR/extern-crate-unexpected-token.rs:1:8 | -LL | extern crte foo; //~ ERROR expected one of `crate`, `fn`, or `{`, found `crte` +LL | extern crte foo; | ^^^^ expected one of `crate`, `fn`, or `{` here error: aborting due to previous error diff --git a/src/test/ui/parser/extern-expected-fn-or-brace.stderr b/src/test/ui/parser/extern-expected-fn-or-brace.stderr index 94b2d1d7b7e..0fb99355341 100644 --- a/src/test/ui/parser/extern-expected-fn-or-brace.stderr +++ b/src/test/ui/parser/extern-expected-fn-or-brace.stderr @@ -1,7 +1,7 @@ error: expected one of `fn` or `{`, found `mod` --> $DIR/extern-expected-fn-or-brace.rs:4:12 | -LL | extern "C" mod foo; //~ERROR expected one of `fn` or `{`, found `mod` +LL | extern "C" mod foo; | ^^^ expected one of `fn` or `{` here error: aborting due to previous error diff --git a/src/test/ui/parser/extern-foreign-crate.stderr b/src/test/ui/parser/extern-foreign-crate.stderr index d2fe8b77ce6..de9f0c93232 100644 --- a/src/test/ui/parser/extern-foreign-crate.stderr +++ b/src/test/ui/parser/extern-foreign-crate.stderr @@ -1,7 +1,7 @@ error: expected one of `;` or `as`, found `{` --> $DIR/extern-foreign-crate.rs:4:18 | -LL | extern crate foo {} //~ERROR expected one of `;` or `as`, found `{` +LL | extern crate foo {} | ^ expected one of `;` or `as` here error: aborting due to previous error diff --git a/src/test/ui/parser/extern-no-fn.stderr b/src/test/ui/parser/extern-no-fn.stderr index e764cd08401..d2d5e3c4687 100644 --- a/src/test/ui/parser/extern-no-fn.stderr +++ b/src/test/ui/parser/extern-no-fn.stderr @@ -1,7 +1,7 @@ error: missing `fn`, `type`, or `static` for extern-item declaration --> $DIR/extern-no-fn.rs:1:9 | -LL | extern { //~ ERROR missing `fn`, `type`, or `static` for extern-item declaration +LL | extern { | _________^ LL | | f(); | |____^ missing `fn`, `type`, or `static` diff --git a/src/test/ui/parser/if-in-in.stderr b/src/test/ui/parser/if-in-in.stderr index 2938bba77d7..9926fcc0858 100644 --- a/src/test/ui/parser/if-in-in.stderr +++ b/src/test/ui/parser/if-in-in.stderr @@ -1,7 +1,7 @@ error: expected iterable, found keyword `in` --> $DIR/if-in-in.rs:2:14 | -LL | for i in in 1..2 { //~ ERROR expected iterable, found keyword `in` +LL | for i in in 1..2 { | ---^^ | | | help: remove the duplicated `in` diff --git a/src/test/ui/parser/impl-parsing.stderr b/src/test/ui/parser/impl-parsing.stderr index 353f5e21ee6..935e93963e1 100644 --- a/src/test/ui/parser/impl-parsing.stderr +++ b/src/test/ui/parser/impl-parsing.stderr @@ -1,31 +1,31 @@ error: missing `for` in a trait impl --> $DIR/impl-parsing.rs:6:11 | -LL | impl Trait Type {} //~ ERROR missing `for` in a trait impl +LL | impl Trait Type {} | ^ help: add `for` here error: missing `for` in a trait impl --> $DIR/impl-parsing.rs:7:11 | -LL | impl Trait .. {} //~ ERROR missing `for` in a trait impl +LL | impl Trait .. {} | ^ help: add `for` here error: expected a trait, found type --> $DIR/impl-parsing.rs:8:6 | -LL | impl ?Sized for Type {} //~ ERROR expected a trait, found type +LL | impl ?Sized for Type {} | ^^^^^^ error: expected a trait, found type --> $DIR/impl-parsing.rs:9:6 | -LL | impl ?Sized for .. {} //~ ERROR expected a trait, found type +LL | impl ?Sized for .. {} | ^^^^^^ error: expected `impl`, found `FAIL` --> $DIR/impl-parsing.rs:11:16 | -LL | default unsafe FAIL //~ ERROR expected `impl`, found `FAIL` +LL | default unsafe FAIL | ^^^^ expected `impl` here error: aborting due to 5 previous errors diff --git a/src/test/ui/parser/inner-attr.stderr b/src/test/ui/parser/inner-attr.stderr index 001eab226dc..11a37bc139b 100644 --- a/src/test/ui/parser/inner-attr.stderr +++ b/src/test/ui/parser/inner-attr.stderr @@ -1,7 +1,7 @@ error: an inner attribute is not permitted following an outer attribute --> $DIR/inner-attr.rs:3:3 | -LL | #![recursion_limit="100"] //~ ERROR an inner attribute is not permitted following an outer attribute +LL | #![recursion_limit="100"] | ^ | = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them. diff --git a/src/test/ui/parser/issue-10392-2.stderr b/src/test/ui/parser/issue-10392-2.stderr index 47e1f7adf25..ccc5dd938b5 100644 --- a/src/test/ui/parser/issue-10392-2.stderr +++ b/src/test/ui/parser/issue-10392-2.stderr @@ -1,7 +1,7 @@ error: expected `}`, found `,` --> $DIR/issue-10392-2.rs:6:15 | -LL | let A { .., } = a(); //~ ERROR: expected `}` +LL | let A { .., } = a(); | --^ | | | | | expected `}` diff --git a/src/test/ui/parser/issue-10392.stderr b/src/test/ui/parser/issue-10392.stderr index 9c9858aa26c..7bf5aa93f0a 100644 --- a/src/test/ui/parser/issue-10392.stderr +++ b/src/test/ui/parser/issue-10392.stderr @@ -1,13 +1,13 @@ error: expected identifier, found `,` --> $DIR/issue-10392.rs:6:13 | -LL | let A { , } = a(); //~ ERROR expected ident +LL | let A { , } = a(); | ^ expected identifier error[E0027]: pattern does not mention field `foo` --> $DIR/issue-10392.rs:6:9 | -LL | let A { , } = a(); //~ ERROR expected ident +LL | let A { , } = a(); | ^^^^^^^ missing field `foo` error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/issue-15914.stderr b/src/test/ui/parser/issue-15914.stderr index 3a886c4c481..ea26453f808 100644 --- a/src/test/ui/parser/issue-15914.stderr +++ b/src/test/ui/parser/issue-15914.stderr @@ -1,7 +1,7 @@ error: expected identifier, found `(` --> $DIR/issue-15914.rs:3:9 | -LL | (); //~ ERROR expected identifier, found `(` +LL | (); | ^ expected identifier error: aborting due to previous error diff --git a/src/test/ui/parser/issue-15980.stderr b/src/test/ui/parser/issue-15980.stderr index c91595208c8..879bcb2b4a1 100644 --- a/src/test/ui/parser/issue-15980.stderr +++ b/src/test/ui/parser/issue-15980.stderr @@ -3,7 +3,7 @@ error: expected identifier, found keyword `return` | LL | Err(ref e) if e.kind == io::EndOfFile { | ------------- while parsing this struct -LL | //~^ NOTE while parsing this struct +LL | LL | return | ^^^^^^ expected identifier, found keyword help: you can escape reserved keywords to use them as identifiers @@ -16,7 +16,7 @@ error: expected one of `.`, `=>`, `?`, or an operator, found `_` | LL | } | - expected one of `.`, `=>`, `?`, or an operator here -LL | //~^ NOTE expected one of `.`, `=>`, `?`, or an operator here +LL | LL | _ => {} | ^ unexpected token diff --git a/src/test/ui/parser/issue-17718-const-mut.stderr b/src/test/ui/parser/issue-17718-const-mut.stderr index 19f9fe19ef5..8251ce9993f 100644 --- a/src/test/ui/parser/issue-17718-const-mut.stderr +++ b/src/test/ui/parser/issue-17718-const-mut.stderr @@ -3,7 +3,7 @@ error: const globals cannot be mutable | LL | const | ----- help: you might want to declare a static instead: `static` -LL | mut //~ ERROR: const globals cannot be mutable +LL | mut | ^^^ cannot be mutable error: aborting due to previous error diff --git a/src/test/ui/parser/issue-17904-2.stderr b/src/test/ui/parser/issue-17904-2.stderr index 8322dc00cad..03e556da268 100644 --- a/src/test/ui/parser/issue-17904-2.stderr +++ b/src/test/ui/parser/issue-17904-2.stderr @@ -1,7 +1,7 @@ error: expected item, found keyword `where` --> $DIR/issue-17904-2.rs:3:24 | -LL | struct Bar { x: T } where T: Copy //~ ERROR expected item, found keyword `where` +LL | struct Bar { x: T } where T: Copy | ^^^^^ expected item error: aborting due to previous error diff --git a/src/test/ui/parser/issue-17904.stderr b/src/test/ui/parser/issue-17904.stderr index f2f0b411e9a..a4470093620 100644 --- a/src/test/ui/parser/issue-17904.stderr +++ b/src/test/ui/parser/issue-17904.stderr @@ -1,7 +1,7 @@ error: expected one of `:`, `==`, or `=`, found `;` --> $DIR/issue-17904.rs:6:33 | -LL | struct Foo where T: Copy, (T); //~ ERROR expected one of `:`, `==`, or `=`, found `;` +LL | struct Foo where T: Copy, (T); | ^ expected one of `:`, `==`, or `=` here error: aborting due to previous error diff --git a/src/test/ui/parser/issue-19096.stderr b/src/test/ui/parser/issue-19096.stderr index f92604d0067..6aa97add7b0 100644 --- a/src/test/ui/parser/issue-19096.stderr +++ b/src/test/ui/parser/issue-19096.stderr @@ -1,7 +1,7 @@ error: expected one of `.`, `;`, `?`, `}`, or an operator, found `::` --> $DIR/issue-19096.rs:3:8 | -LL | t.0::; //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `::` +LL | t.0::; | ^^ expected one of `.`, `;`, `?`, `}`, or an operator here error[E0308]: mismatched types @@ -10,7 +10,7 @@ error[E0308]: mismatched types LL | fn main() { | - expected `()` because of default return type LL | let t = (42, 42); -LL | t.0::; //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `::` +LL | t.0::; | ^^^ expected (), found integer | = note: expected type `()` diff --git a/src/test/ui/parser/issue-19398.stderr b/src/test/ui/parser/issue-19398.stderr index 627b74ff8f7..d5f1f972d55 100644 --- a/src/test/ui/parser/issue-19398.stderr +++ b/src/test/ui/parser/issue-19398.stderr @@ -1,7 +1,7 @@ error: expected `fn`, found `unsafe` --> $DIR/issue-19398.rs:2:19 | -LL | extern "Rust" unsafe fn foo(); //~ ERROR expected `fn`, found `unsafe` +LL | extern "Rust" unsafe fn foo(); | ^^^^^^ expected `fn` here error: aborting due to previous error diff --git a/src/test/ui/parser/issue-20711-2.stderr b/src/test/ui/parser/issue-20711-2.stderr index e06eb7a9846..f67dfa09aca 100644 --- a/src/test/ui/parser/issue-20711-2.stderr +++ b/src/test/ui/parser/issue-20711-2.stderr @@ -3,7 +3,7 @@ error: expected one of `async`, `const`, `crate`, `default`, `existential`, `ext | LL | #[stable(feature = "rust1", since = "1.0.0")] | - expected one of 10 possible tokens here -LL | } //~ ERROR expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, or +LL | } | ^ unexpected token error: aborting due to previous error diff --git a/src/test/ui/parser/issue-20711.stderr b/src/test/ui/parser/issue-20711.stderr index 6cf39608fcc..26b819fa298 100644 --- a/src/test/ui/parser/issue-20711.stderr +++ b/src/test/ui/parser/issue-20711.stderr @@ -3,7 +3,7 @@ error: expected one of `async`, `const`, `crate`, `default`, `existential`, `ext | LL | #[stable(feature = "rust1", since = "1.0.0")] | - expected one of 10 possible tokens here -LL | } //~ ERROR expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, or +LL | } | ^ unexpected token error: aborting due to previous error diff --git a/src/test/ui/parser/issue-21153.stderr b/src/test/ui/parser/issue-21153.stderr index 1e0244c2e1d..70f55f0aeb9 100644 --- a/src/test/ui/parser/issue-21153.stderr +++ b/src/test/ui/parser/issue-21153.stderr @@ -1,7 +1,7 @@ error: missing `fn`, `type`, or `const` for trait-item declaration --> $DIR/issue-21153.rs:1:29 | -LL | trait MyTrait: Iterator { //~ ERROR missing `fn`, `type`, or `const` +LL | trait MyTrait: Iterator { | _____________________________^ LL | | Item = T; | |____^ missing `fn`, `type`, or `const` diff --git a/src/test/ui/parser/issue-22647.stderr b/src/test/ui/parser/issue-22647.stderr index 8935ea9c6c1..2dc56a5eca3 100644 --- a/src/test/ui/parser/issue-22647.stderr +++ b/src/test/ui/parser/issue-22647.stderr @@ -1,7 +1,7 @@ error: expected one of `:`, `;`, `=`, or `@`, found `<` --> $DIR/issue-22647.rs:2:15 | -LL | let caller = |f: F| //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `<` +LL | let caller = |f: F| | ^ expected one of `:`, `;`, `=`, or `@` here error: aborting due to previous error diff --git a/src/test/ui/parser/issue-22712.stderr b/src/test/ui/parser/issue-22712.stderr index 3a4fa9a5e7b..167eaf962e0 100644 --- a/src/test/ui/parser/issue-22712.stderr +++ b/src/test/ui/parser/issue-22712.stderr @@ -1,7 +1,7 @@ error: expected one of `:`, `;`, `=`, or `@`, found `<` --> $DIR/issue-22712.rs:6:12 | -LL | let Foo> //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `<` +LL | let Foo> | ^ expected one of `:`, `;`, `=`, or `@` here error: aborting due to previous error diff --git a/src/test/ui/parser/issue-2354-1.stderr b/src/test/ui/parser/issue-2354-1.stderr index da25aac486e..7c083751228 100644 --- a/src/test/ui/parser/issue-2354-1.stderr +++ b/src/test/ui/parser/issue-2354-1.stderr @@ -1,7 +1,7 @@ error: unexpected close delimiter: `}` --> $DIR/issue-2354-1.rs:1:24 | -LL | static foo: isize = 2; } //~ ERROR unexpected close delimiter: +LL | static foo: isize = 2; } | ^ unexpected close delimiter error: aborting due to previous error diff --git a/src/test/ui/parser/issue-2354.stderr b/src/test/ui/parser/issue-2354.stderr index 0f4cd5724ce..7098da738b8 100644 --- a/src/test/ui/parser/issue-2354.stderr +++ b/src/test/ui/parser/issue-2354.stderr @@ -1,7 +1,7 @@ error: this file contains an un-closed delimiter --> $DIR/issue-2354.rs:15:66 | -LL | fn foo() { //~ NOTE un-closed delimiter +LL | fn foo() { | - un-closed delimiter LL | match Some(10) { | - this delimiter might not be properly closed... @@ -9,7 +9,7 @@ LL | match Some(10) { LL | } | - ...as it matches this but it has different indentation ... -LL | //~ ERROR this file contains an un-closed delimiter +LL | | ^ error[E0601]: `main` function not found in crate `issue_2354` @@ -18,7 +18,7 @@ error[E0601]: `main` function not found in crate `issue_2354` note: here is a function named 'main' --> $DIR/issue-2354.rs:14:1 | -LL | fn main() {} //~ NOTE here is a function named 'main' +LL | fn main() {} | ^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/issue-24197.stderr b/src/test/ui/parser/issue-24197.stderr index 4e073d8c58a..2dfb31432bc 100644 --- a/src/test/ui/parser/issue-24197.stderr +++ b/src/test/ui/parser/issue-24197.stderr @@ -1,7 +1,7 @@ error: expected one of `:`, `;`, `=`, or `@`, found `[` --> $DIR/issue-24197.rs:2:12 | -LL | let buf[0] = 0; //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `[` +LL | let buf[0] = 0; | ^ expected one of `:`, `;`, `=`, or `@` here error: aborting due to previous error diff --git a/src/test/ui/parser/issue-24375.stderr b/src/test/ui/parser/issue-24375.stderr index f773a7df4fe..e45b08be9ab 100644 --- a/src/test/ui/parser/issue-24375.stderr +++ b/src/test/ui/parser/issue-24375.stderr @@ -1,7 +1,7 @@ error: expected one of `=>`, `@`, `if`, or `|`, found `[` --> $DIR/issue-24375.rs:6:12 | -LL | tmp[0] => {} //~ ERROR expected one of `=>`, `@`, `if`, or `|`, found `[` +LL | tmp[0] => {} | ^ expected one of `=>`, `@`, `if`, or `|` here error: aborting due to previous error diff --git a/src/test/ui/parser/issue-3036.stderr b/src/test/ui/parser/issue-3036.stderr index eadf5546d85..18947b8fa40 100644 --- a/src/test/ui/parser/issue-3036.stderr +++ b/src/test/ui/parser/issue-3036.stderr @@ -3,7 +3,7 @@ error: expected one of `.`, `;`, `?`, or an operator, found `}` | LL | let x = 3 | - expected one of `.`, `;`, `?`, or an operator here -LL | } //~ ERROR: expected one of `.`, `;`, `?`, or an operator, found `}` +LL | } | ^ unexpected token error: aborting due to previous error diff --git a/src/test/ui/parser/issue-32446.stderr b/src/test/ui/parser/issue-32446.stderr index 07eafdde907..b0c18f4ec5a 100644 --- a/src/test/ui/parser/issue-32446.stderr +++ b/src/test/ui/parser/issue-32446.stderr @@ -1,7 +1,7 @@ error: expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found `...` --> $DIR/issue-32446.rs:4:11 | -LL | trait T { ... } //~ ERROR +LL | trait T { ... } | ^^^ expected one of 7 possible tokens here error: aborting due to previous error diff --git a/src/test/ui/parser/issue-32501.stderr b/src/test/ui/parser/issue-32501.stderr index d74c539abfe..97efb895935 100644 --- a/src/test/ui/parser/issue-32501.stderr +++ b/src/test/ui/parser/issue-32501.stderr @@ -1,7 +1,7 @@ error: expected identifier, found reserved identifier `_` --> $DIR/issue-32501.rs:7:13 | -LL | let mut _ = 0; //~ ERROR expected identifier, found reserved identifier `_` +LL | let mut _ = 0; | ^ expected identifier, found reserved identifier error: aborting due to previous error diff --git a/src/test/ui/parser/issue-32505.stderr b/src/test/ui/parser/issue-32505.stderr index 1ea4c36a525..f812646ca58 100644 --- a/src/test/ui/parser/issue-32505.stderr +++ b/src/test/ui/parser/issue-32505.stderr @@ -1,7 +1,7 @@ error: expected expression, found `)` --> $DIR/issue-32505.rs:4:12 | -LL | foo(|_|) //~ ERROR expected expression, found `)` +LL | foo(|_|) | ^ expected expression error: aborting due to previous error diff --git a/src/test/ui/parser/issue-33418.stderr b/src/test/ui/parser/issue-33418.stderr index bfe44588a5b..acbe597ef31 100644 --- a/src/test/ui/parser/issue-33418.stderr +++ b/src/test/ui/parser/issue-33418.stderr @@ -1,13 +1,13 @@ error: negative trait bounds are not supported --> $DIR/issue-33418.rs:3:9 | -LL | trait Tr: !SuperA {} //~ ERROR negative trait bounds are not supported +LL | trait Tr: !SuperA {} | ^^^^^^^^^ help: remove the trait bound error: negative trait bounds are not supported --> $DIR/issue-33418.rs:4:19 | -LL | trait Tr2: SuperA + !SuperB {} //~ ERROR negative trait bounds are not supported +LL | trait Tr2: SuperA + !SuperB {} | ---------^^^^^^^^^ | | | help: remove the trait bound @@ -15,7 +15,7 @@ LL | trait Tr2: SuperA + !SuperB {} //~ ERROR negative trait bounds are not supp error: negative trait bounds are not supported --> $DIR/issue-33418.rs:5:10 | -LL | trait Tr3: !SuperA + SuperB {} //~ ERROR negative trait bounds are not supported +LL | trait Tr3: !SuperA + SuperB {} | ^^^^^^^^^--------- | | | help: remove the trait bound @@ -23,7 +23,7 @@ LL | trait Tr3: !SuperA + SuperB {} //~ ERROR negative trait bounds are not supp error: negative trait bounds are not supported --> $DIR/issue-33418.rs:6:10 | -LL | trait Tr4: !SuperA + SuperB //~ ERROR negative trait bounds are not supported +LL | trait Tr4: !SuperA + SuperB | __________-^^^^^^^^ LL | | + !SuperC + SuperD {} | |_____^^^^^^^^^________- help: remove the trait bounds @@ -31,7 +31,7 @@ LL | | + !SuperC + SuperD {} error: negative trait bounds are not supported --> $DIR/issue-33418.rs:8:10 | -LL | trait Tr5: !SuperA //~ ERROR negative trait bounds are not supported +LL | trait Tr5: !SuperA | __________-^^^^^^^^ LL | | + !SuperB {} | | ^^^^^^^^- diff --git a/src/test/ui/parser/issue-33455.stderr b/src/test/ui/parser/issue-33455.stderr index 38d00a0ea0b..4516c388afc 100644 --- a/src/test/ui/parser/issue-33455.stderr +++ b/src/test/ui/parser/issue-33455.stderr @@ -1,7 +1,7 @@ error: expected one of `::`, `;`, or `as`, found `.` --> $DIR/issue-33455.rs:1:8 | -LL | use foo.bar; //~ ERROR expected one of `::`, `;`, or `as`, found `.` +LL | use foo.bar; | ^ expected one of `::`, `;`, or `as` here error: aborting due to previous error diff --git a/src/test/ui/parser/issue-41155.stderr b/src/test/ui/parser/issue-41155.stderr index ac75829f2e3..719845e6999 100644 --- a/src/test/ui/parser/issue-41155.stderr +++ b/src/test/ui/parser/issue-41155.stderr @@ -3,7 +3,7 @@ error: expected one of `(`, `async`, `const`, `default`, `existential`, `extern` | LL | pub | - expected one of 9 possible tokens here -LL | } //~ ERROR expected one of +LL | } | ^ unexpected token error: aborting due to previous error diff --git a/src/test/ui/parser/issue-43692.stderr b/src/test/ui/parser/issue-43692.stderr index 780f63a6638..9408182f952 100644 --- a/src/test/ui/parser/issue-43692.stderr +++ b/src/test/ui/parser/issue-43692.stderr @@ -1,7 +1,7 @@ error: invalid start of unicode escape --> $DIR/issue-43692.rs:2:9 | -LL | '/u{_10FFFF}'; //~ ERROR invalid start of unicode escape +LL | '/u{_10FFFF}'; | ^ error: aborting due to previous error diff --git a/src/test/ui/parser/issue-5806.stderr b/src/test/ui/parser/issue-5806.stderr index f9f00f70f0b..6cf902ca86e 100644 --- a/src/test/ui/parser/issue-5806.stderr +++ b/src/test/ui/parser/issue-5806.stderr @@ -1,7 +1,7 @@ error: couldn't read $DIR/../parser: $ACCESS_DENIED_MSG (os error $ACCESS_DENIED_CODE) --> $DIR/issue-5806.rs:5:5 | -LL | mod foo; //~ ERROR couldn't read +LL | mod foo; | ^^^ error: aborting due to previous error diff --git a/src/test/ui/parser/issue-6610.stderr b/src/test/ui/parser/issue-6610.stderr index b4760161a62..22d93bffead 100644 --- a/src/test/ui/parser/issue-6610.stderr +++ b/src/test/ui/parser/issue-6610.stderr @@ -1,7 +1,7 @@ error: expected `;` or `{`, found `}` --> $DIR/issue-6610.rs:1:20 | -LL | trait Foo { fn a() } //~ ERROR expected `;` or `{`, found `}` +LL | trait Foo { fn a() } | ^ expected `;` or `{` error: aborting due to previous error diff --git a/src/test/ui/parser/issue-8537.stderr b/src/test/ui/parser/issue-8537.stderr index 4442cd0ff01..82ca6142154 100644 --- a/src/test/ui/parser/issue-8537.stderr +++ b/src/test/ui/parser/issue-8537.stderr @@ -1,7 +1,7 @@ error[E0703]: invalid ABI: found `invalid-ab_isize` --> $DIR/issue-8537.rs:2:3 | -LL | "invalid-ab_isize" //~ ERROR invalid ABI +LL | "invalid-ab_isize" | ^^^^^^^^^^^^^^^^^^ invalid ABI | = help: valid ABIs: cdecl, stdcall, fastcall, vectorcall, thiscall, aapcs, win64, sysv64, ptx-kernel, msp430-interrupt, x86-interrupt, amdgpu-kernel, Rust, C, system, rust-intrinsic, rust-call, platform-intrinsic, unadjusted diff --git a/src/test/ui/parser/keyword-abstract.stderr b/src/test/ui/parser/keyword-abstract.stderr index 4185ae034b5..2c79598a81b 100644 --- a/src/test/ui/parser/keyword-abstract.stderr +++ b/src/test/ui/parser/keyword-abstract.stderr @@ -1,7 +1,7 @@ error: expected pattern, found reserved keyword `abstract` --> $DIR/keyword-abstract.rs:2:9 | -LL | let abstract = (); //~ ERROR expected pattern, found reserved keyword `abstract` +LL | let abstract = (); | ^^^^^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-as-as-identifier.stderr b/src/test/ui/parser/keyword-as-as-identifier.stderr index 6eaf5e2ed93..ef466488ad0 100644 --- a/src/test/ui/parser/keyword-as-as-identifier.stderr +++ b/src/test/ui/parser/keyword-as-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `as` --> $DIR/keyword-as-as-identifier.rs:4:9 | -LL | let as = "foo"; //~ error: expected pattern, found keyword `as` +LL | let as = "foo"; | ^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-box-as-identifier.stderr b/src/test/ui/parser/keyword-box-as-identifier.stderr index 07a134442b8..8b185948498 100644 --- a/src/test/ui/parser/keyword-box-as-identifier.stderr +++ b/src/test/ui/parser/keyword-box-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found `=` --> $DIR/keyword-box-as-identifier.rs:2:13 | -LL | let box = "foo"; //~ error: expected pattern, found `=` +LL | let box = "foo"; | ^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-break-as-identifier.stderr b/src/test/ui/parser/keyword-break-as-identifier.stderr index 69af9737445..690bd84221a 100644 --- a/src/test/ui/parser/keyword-break-as-identifier.stderr +++ b/src/test/ui/parser/keyword-break-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `break` --> $DIR/keyword-break-as-identifier.rs:4:9 | -LL | let break = "foo"; //~ error: expected pattern, found keyword `break` +LL | let break = "foo"; | ^^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-const-as-identifier.stderr b/src/test/ui/parser/keyword-const-as-identifier.stderr index c727f1754c7..6da47f88d04 100644 --- a/src/test/ui/parser/keyword-const-as-identifier.stderr +++ b/src/test/ui/parser/keyword-const-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `const` --> $DIR/keyword-const-as-identifier.rs:4:9 | -LL | let const = "foo"; //~ error: expected pattern, found keyword `const` +LL | let const = "foo"; | ^^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-continue-as-identifier.stderr b/src/test/ui/parser/keyword-continue-as-identifier.stderr index 7fd2761884f..4b0a659f9ad 100644 --- a/src/test/ui/parser/keyword-continue-as-identifier.stderr +++ b/src/test/ui/parser/keyword-continue-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `continue` --> $DIR/keyword-continue-as-identifier.rs:4:9 | -LL | let continue = "foo"; //~ error: expected pattern, found keyword `continue` +LL | let continue = "foo"; | ^^^^^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-else-as-identifier.stderr b/src/test/ui/parser/keyword-else-as-identifier.stderr index 6d180bb56da..bec7b7ba01e 100644 --- a/src/test/ui/parser/keyword-else-as-identifier.stderr +++ b/src/test/ui/parser/keyword-else-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `else` --> $DIR/keyword-else-as-identifier.rs:4:9 | -LL | let else = "foo"; //~ error: expected pattern, found keyword `else` +LL | let else = "foo"; | ^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-enum-as-identifier.stderr b/src/test/ui/parser/keyword-enum-as-identifier.stderr index dc7e37824dc..51a834f797c 100644 --- a/src/test/ui/parser/keyword-enum-as-identifier.stderr +++ b/src/test/ui/parser/keyword-enum-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `enum` --> $DIR/keyword-enum-as-identifier.rs:4:9 | -LL | let enum = "foo"; //~ error: expected pattern, found keyword `enum` +LL | let enum = "foo"; | ^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-final.stderr b/src/test/ui/parser/keyword-final.stderr index 897624279e5..e8372643be6 100644 --- a/src/test/ui/parser/keyword-final.stderr +++ b/src/test/ui/parser/keyword-final.stderr @@ -1,7 +1,7 @@ error: expected pattern, found reserved keyword `final` --> $DIR/keyword-final.rs:2:9 | -LL | let final = (); //~ ERROR expected pattern, found reserved keyword `final` +LL | let final = (); | ^^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-fn-as-identifier.stderr b/src/test/ui/parser/keyword-fn-as-identifier.stderr index 945fc77c310..a071a40a70e 100644 --- a/src/test/ui/parser/keyword-fn-as-identifier.stderr +++ b/src/test/ui/parser/keyword-fn-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `fn` --> $DIR/keyword-fn-as-identifier.rs:4:9 | -LL | let fn = "foo"; //~ error: expected pattern, found keyword `fn` +LL | let fn = "foo"; | ^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-for-as-identifier.stderr b/src/test/ui/parser/keyword-for-as-identifier.stderr index 32263e9f6e2..090046cebdc 100644 --- a/src/test/ui/parser/keyword-for-as-identifier.stderr +++ b/src/test/ui/parser/keyword-for-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `for` --> $DIR/keyword-for-as-identifier.rs:4:9 | -LL | let for = "foo"; //~ error: expected pattern, found keyword `for` +LL | let for = "foo"; | ^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-if-as-identifier.stderr b/src/test/ui/parser/keyword-if-as-identifier.stderr index 11ba41015cb..98bfdb46e97 100644 --- a/src/test/ui/parser/keyword-if-as-identifier.stderr +++ b/src/test/ui/parser/keyword-if-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `if` --> $DIR/keyword-if-as-identifier.rs:4:9 | -LL | let if = "foo"; //~ error: expected pattern, found keyword `if` +LL | let if = "foo"; | ^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-impl-as-identifier.stderr b/src/test/ui/parser/keyword-impl-as-identifier.stderr index 960a42df429..2672959b7c6 100644 --- a/src/test/ui/parser/keyword-impl-as-identifier.stderr +++ b/src/test/ui/parser/keyword-impl-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `impl` --> $DIR/keyword-impl-as-identifier.rs:4:9 | -LL | let impl = "foo"; //~ error: expected pattern, found keyword `impl` +LL | let impl = "foo"; | ^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-in-as-identifier.stderr b/src/test/ui/parser/keyword-in-as-identifier.stderr index 2300a257a02..98332b723f2 100644 --- a/src/test/ui/parser/keyword-in-as-identifier.stderr +++ b/src/test/ui/parser/keyword-in-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `in` --> $DIR/keyword-in-as-identifier.rs:4:9 | -LL | let in = "foo"; //~ error: expected pattern, found keyword `in` +LL | let in = "foo"; | ^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-let-as-identifier.stderr b/src/test/ui/parser/keyword-let-as-identifier.stderr index ed2c8a4eb9c..99dbc0530f3 100644 --- a/src/test/ui/parser/keyword-let-as-identifier.stderr +++ b/src/test/ui/parser/keyword-let-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `let` --> $DIR/keyword-let-as-identifier.rs:4:9 | -LL | let let = "foo"; //~ error: expected pattern, found keyword `let` +LL | let let = "foo"; | ^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-loop-as-identifier.stderr b/src/test/ui/parser/keyword-loop-as-identifier.stderr index f91cab02953..783507eb35c 100644 --- a/src/test/ui/parser/keyword-loop-as-identifier.stderr +++ b/src/test/ui/parser/keyword-loop-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `loop` --> $DIR/keyword-loop-as-identifier.rs:4:9 | -LL | let loop = "foo"; //~ error: expected pattern, found keyword `loop` +LL | let loop = "foo"; | ^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-match-as-identifier.stderr b/src/test/ui/parser/keyword-match-as-identifier.stderr index 4c8e76695bc..e56a115c916 100644 --- a/src/test/ui/parser/keyword-match-as-identifier.stderr +++ b/src/test/ui/parser/keyword-match-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `match` --> $DIR/keyword-match-as-identifier.rs:4:9 | -LL | let match = "foo"; //~ error: expected pattern, found keyword `match` +LL | let match = "foo"; | ^^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-mod-as-identifier.stderr b/src/test/ui/parser/keyword-mod-as-identifier.stderr index 8aeebcebec9..a8be2ceb037 100644 --- a/src/test/ui/parser/keyword-mod-as-identifier.stderr +++ b/src/test/ui/parser/keyword-mod-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `mod` --> $DIR/keyword-mod-as-identifier.rs:4:9 | -LL | let mod = "foo"; //~ error: expected pattern, found keyword `mod` +LL | let mod = "foo"; | ^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-move-as-identifier.stderr b/src/test/ui/parser/keyword-move-as-identifier.stderr index 37e06708e25..e0687e27eb5 100644 --- a/src/test/ui/parser/keyword-move-as-identifier.stderr +++ b/src/test/ui/parser/keyword-move-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `move` --> $DIR/keyword-move-as-identifier.rs:4:9 | -LL | let move = "foo"; //~ error: expected pattern, found keyword `move` +LL | let move = "foo"; | ^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-mut-as-identifier.stderr b/src/test/ui/parser/keyword-mut-as-identifier.stderr index b0266060903..040960835d8 100644 --- a/src/test/ui/parser/keyword-mut-as-identifier.stderr +++ b/src/test/ui/parser/keyword-mut-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected identifier, found `=` --> $DIR/keyword-mut-as-identifier.rs:2:13 | -LL | let mut = "foo"; //~ error: expected identifier, found `=` +LL | let mut = "foo"; | ^ expected identifier error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-override.stderr b/src/test/ui/parser/keyword-override.stderr index 69a6415908c..1bfc6c9b385 100644 --- a/src/test/ui/parser/keyword-override.stderr +++ b/src/test/ui/parser/keyword-override.stderr @@ -1,7 +1,7 @@ error: expected pattern, found reserved keyword `override` --> $DIR/keyword-override.rs:2:9 | -LL | let override = (); //~ ERROR expected pattern, found reserved keyword `override` +LL | let override = (); | ^^^^^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-pub-as-identifier.stderr b/src/test/ui/parser/keyword-pub-as-identifier.stderr index 8b595673ec4..526ddcd6ee0 100644 --- a/src/test/ui/parser/keyword-pub-as-identifier.stderr +++ b/src/test/ui/parser/keyword-pub-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `pub` --> $DIR/keyword-pub-as-identifier.rs:4:9 | -LL | let pub = "foo"; //~ error: expected pattern, found keyword `pub` +LL | let pub = "foo"; | ^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-ref-as-identifier.stderr b/src/test/ui/parser/keyword-ref-as-identifier.stderr index 656df196f09..618043d89ff 100644 --- a/src/test/ui/parser/keyword-ref-as-identifier.stderr +++ b/src/test/ui/parser/keyword-ref-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected identifier, found `=` --> $DIR/keyword-ref-as-identifier.rs:2:13 | -LL | let ref = "foo"; //~ error: expected identifier, found `=` +LL | let ref = "foo"; | ^ expected identifier error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-return-as-identifier.stderr b/src/test/ui/parser/keyword-return-as-identifier.stderr index 903137542d6..c0156a63fa9 100644 --- a/src/test/ui/parser/keyword-return-as-identifier.stderr +++ b/src/test/ui/parser/keyword-return-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `return` --> $DIR/keyword-return-as-identifier.rs:4:9 | -LL | let return = "foo"; //~ error: expected pattern, found keyword `return` +LL | let return = "foo"; | ^^^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-static-as-identifier.stderr b/src/test/ui/parser/keyword-static-as-identifier.stderr index 4830e6f1bef..00a65977732 100644 --- a/src/test/ui/parser/keyword-static-as-identifier.stderr +++ b/src/test/ui/parser/keyword-static-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `static` --> $DIR/keyword-static-as-identifier.rs:4:9 | -LL | let static = "foo"; //~ error: expected pattern, found keyword `static` +LL | let static = "foo"; | ^^^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-struct-as-identifier.stderr b/src/test/ui/parser/keyword-struct-as-identifier.stderr index 50ac690e425..b2d6639e72e 100644 --- a/src/test/ui/parser/keyword-struct-as-identifier.stderr +++ b/src/test/ui/parser/keyword-struct-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `struct` --> $DIR/keyword-struct-as-identifier.rs:4:9 | -LL | let struct = "foo"; //~ error: expected pattern, found keyword `struct` +LL | let struct = "foo"; | ^^^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-trait-as-identifier.stderr b/src/test/ui/parser/keyword-trait-as-identifier.stderr index 3736f366cbd..b31c0df28c0 100644 --- a/src/test/ui/parser/keyword-trait-as-identifier.stderr +++ b/src/test/ui/parser/keyword-trait-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `trait` --> $DIR/keyword-trait-as-identifier.rs:4:9 | -LL | let trait = "foo"; //~ error: expected pattern, found keyword `trait` +LL | let trait = "foo"; | ^^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-try-as-identifier-edition2018.stderr b/src/test/ui/parser/keyword-try-as-identifier-edition2018.stderr index 73e8d64b56c..c342e3a76fb 100644 --- a/src/test/ui/parser/keyword-try-as-identifier-edition2018.stderr +++ b/src/test/ui/parser/keyword-try-as-identifier-edition2018.stderr @@ -1,7 +1,7 @@ error: expected pattern, found reserved keyword `try` --> $DIR/keyword-try-as-identifier-edition2018.rs:4:9 | -LL | let try = "foo"; //~ error: expected pattern, found reserved keyword `try` +LL | let try = "foo"; | ^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-type-as-identifier.stderr b/src/test/ui/parser/keyword-type-as-identifier.stderr index f7db20034a1..b749c708d44 100644 --- a/src/test/ui/parser/keyword-type-as-identifier.stderr +++ b/src/test/ui/parser/keyword-type-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `type` --> $DIR/keyword-type-as-identifier.rs:4:9 | -LL | let type = "foo"; //~ error: expected pattern, found keyword `type` +LL | let type = "foo"; | ^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-typeof.stderr b/src/test/ui/parser/keyword-typeof.stderr index 07c9f883b60..e7b18023e61 100644 --- a/src/test/ui/parser/keyword-typeof.stderr +++ b/src/test/ui/parser/keyword-typeof.stderr @@ -1,7 +1,7 @@ error: expected pattern, found reserved keyword `typeof` --> $DIR/keyword-typeof.rs:2:9 | -LL | let typeof = (); //~ ERROR expected pattern, found reserved keyword `typeof` +LL | let typeof = (); | ^^^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-unsafe-as-identifier.stderr b/src/test/ui/parser/keyword-unsafe-as-identifier.stderr index ddd5e4d7b11..67935ce43ba 100644 --- a/src/test/ui/parser/keyword-unsafe-as-identifier.stderr +++ b/src/test/ui/parser/keyword-unsafe-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `unsafe` --> $DIR/keyword-unsafe-as-identifier.rs:4:9 | -LL | let unsafe = "foo"; //~ error: expected pattern, found keyword `unsafe` +LL | let unsafe = "foo"; | ^^^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-use-as-identifier.stderr b/src/test/ui/parser/keyword-use-as-identifier.stderr index 7e798a3f0b9..2c69d0a8744 100644 --- a/src/test/ui/parser/keyword-use-as-identifier.stderr +++ b/src/test/ui/parser/keyword-use-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `use` --> $DIR/keyword-use-as-identifier.rs:4:9 | -LL | let use = "foo"; //~ error: expected pattern, found keyword `use` +LL | let use = "foo"; | ^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-where-as-identifier.stderr b/src/test/ui/parser/keyword-where-as-identifier.stderr index 5285520cc20..fc01183ca04 100644 --- a/src/test/ui/parser/keyword-where-as-identifier.stderr +++ b/src/test/ui/parser/keyword-where-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `where` --> $DIR/keyword-where-as-identifier.rs:4:9 | -LL | let where = "foo"; //~ error: expected pattern, found keyword `where` +LL | let where = "foo"; | ^^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/keyword-while-as-identifier.stderr b/src/test/ui/parser/keyword-while-as-identifier.stderr index b84a652dc5c..f72ac877420 100644 --- a/src/test/ui/parser/keyword-while-as-identifier.stderr +++ b/src/test/ui/parser/keyword-while-as-identifier.stderr @@ -1,7 +1,7 @@ error: expected pattern, found keyword `while` --> $DIR/keyword-while-as-identifier.rs:4:9 | -LL | let while = "foo"; //~ error: expected pattern, found keyword `while` +LL | let while = "foo"; | ^^^^^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/lex-bad-binary-literal.stderr b/src/test/ui/parser/lex-bad-binary-literal.stderr index 9750906aaf2..15959f671b6 100644 --- a/src/test/ui/parser/lex-bad-binary-literal.stderr +++ b/src/test/ui/parser/lex-bad-binary-literal.stderr @@ -1,55 +1,55 @@ error: invalid digit for a base 2 literal --> $DIR/lex-bad-binary-literal.rs:4:8 | -LL | 0b121; //~ ERROR invalid digit for a base 2 literal +LL | 0b121; | ^ error: invalid digit for a base 2 literal --> $DIR/lex-bad-binary-literal.rs:5:12 | -LL | 0b10_10301; //~ ERROR invalid digit for a base 2 literal +LL | 0b10_10301; | ^ error: invalid digit for a base 2 literal --> $DIR/lex-bad-binary-literal.rs:6:7 | -LL | 0b30; //~ ERROR invalid digit for a base 2 literal +LL | 0b30; | ^ error: invalid digit for a base 2 literal --> $DIR/lex-bad-binary-literal.rs:7:7 | -LL | 0b41; //~ ERROR invalid digit for a base 2 literal +LL | 0b41; | ^ error: invalid digit for a base 2 literal --> $DIR/lex-bad-binary-literal.rs:8:7 | -LL | 0b5; //~ ERROR invalid digit for a base 2 literal +LL | 0b5; | ^ error: invalid digit for a base 2 literal --> $DIR/lex-bad-binary-literal.rs:9:7 | -LL | 0b6; //~ ERROR invalid digit for a base 2 literal +LL | 0b6; | ^ error: invalid digit for a base 2 literal --> $DIR/lex-bad-binary-literal.rs:10:7 | -LL | 0b7; //~ ERROR invalid digit for a base 2 literal +LL | 0b7; | ^ error: invalid digit for a base 2 literal --> $DIR/lex-bad-binary-literal.rs:11:7 | -LL | 0b8; //~ ERROR invalid digit for a base 2 literal +LL | 0b8; | ^ error: invalid digit for a base 2 literal --> $DIR/lex-bad-binary-literal.rs:12:7 | -LL | 0b9; //~ ERROR invalid digit for a base 2 literal +LL | 0b9; | ^ error: aborting due to 9 previous errors diff --git a/src/test/ui/parser/lex-bad-char-literals-1.stderr b/src/test/ui/parser/lex-bad-char-literals-1.stderr index c22bf7d0010..3c8550e3dbe 100644 --- a/src/test/ui/parser/lex-bad-char-literals-1.stderr +++ b/src/test/ui/parser/lex-bad-char-literals-1.stderr @@ -1,25 +1,25 @@ error: numeric character escape is too short --> $DIR/lex-bad-char-literals-1.rs:3:8 | -LL | '/x1' //~ ERROR: numeric character escape is too short +LL | '/x1' | ^ error: numeric character escape is too short --> $DIR/lex-bad-char-literals-1.rs:7:8 | -LL | "/x1" //~ ERROR: numeric character escape is too short +LL | "/x1" | ^ error: unknown character escape: /u{25cf} --> $DIR/lex-bad-char-literals-1.rs:11:7 | -LL | '/●' //~ ERROR: unknown character escape +LL | '/●' | ^ error: unknown character escape: /u{25cf} --> $DIR/lex-bad-char-literals-1.rs:15:7 | -LL | "/●" //~ ERROR: unknown character escape +LL | "/●" | ^ error: aborting due to 4 previous errors diff --git a/src/test/ui/parser/lex-bad-char-literals-2.stderr b/src/test/ui/parser/lex-bad-char-literals-2.stderr index 7eadb8ebfe0..4c1c5c29f47 100644 --- a/src/test/ui/parser/lex-bad-char-literals-2.stderr +++ b/src/test/ui/parser/lex-bad-char-literals-2.stderr @@ -1,7 +1,7 @@ error: character literal may only contain one codepoint --> $DIR/lex-bad-char-literals-2.rs:3:5 | -LL | 'nope' //~ ERROR: character literal may only contain one codepoint +LL | 'nope' | ^^^^^^ error[E0601]: `main` function not found in crate `lex_bad_char_literals_2` diff --git a/src/test/ui/parser/lex-bad-char-literals-4.stderr b/src/test/ui/parser/lex-bad-char-literals-4.stderr index 881e3d5276b..7bcca3761fc 100644 --- a/src/test/ui/parser/lex-bad-char-literals-4.stderr +++ b/src/test/ui/parser/lex-bad-char-literals-4.stderr @@ -1,7 +1,7 @@ error: character literal may only contain one codepoint: '● --> $DIR/lex-bad-char-literals-4.rs:4:5 | -LL | '● //~ ERROR: character literal may only contain one codepoint +LL | '● | ^^ error: aborting due to previous error diff --git a/src/test/ui/parser/lex-bad-numeric-literals.stderr b/src/test/ui/parser/lex-bad-numeric-literals.stderr index 1fa23b8b73c..466d7af1bda 100644 --- a/src/test/ui/parser/lex-bad-numeric-literals.stderr +++ b/src/test/ui/parser/lex-bad-numeric-literals.stderr @@ -1,139 +1,139 @@ error: octal float literal is not supported --> $DIR/lex-bad-numeric-literals.rs:4:5 | -LL | 0o1.0; //~ ERROR: octal float literal is not supported +LL | 0o1.0; | ^^^^^ error: octal float literal is not supported --> $DIR/lex-bad-numeric-literals.rs:6:5 | -LL | 0o3.0f32; //~ ERROR: octal float literal is not supported +LL | 0o3.0f32; | ^^^^^ error: octal float literal is not supported --> $DIR/lex-bad-numeric-literals.rs:7:5 | -LL | 0o4e4; //~ ERROR: octal float literal is not supported +LL | 0o4e4; | ^^^^^ error: octal float literal is not supported --> $DIR/lex-bad-numeric-literals.rs:8:5 | -LL | 0o5.0e5; //~ ERROR: octal float literal is not supported +LL | 0o5.0e5; | ^^^^^^^ error: octal float literal is not supported --> $DIR/lex-bad-numeric-literals.rs:9:5 | -LL | 0o6e6f32; //~ ERROR: octal float literal is not supported +LL | 0o6e6f32; | ^^^^^ error: octal float literal is not supported --> $DIR/lex-bad-numeric-literals.rs:10:5 | -LL | 0o7.0e7f64; //~ ERROR: octal float literal is not supported +LL | 0o7.0e7f64; | ^^^^^^^ error: hexadecimal float literal is not supported --> $DIR/lex-bad-numeric-literals.rs:11:5 | -LL | 0x8.0e+9; //~ ERROR: hexadecimal float literal is not supported +LL | 0x8.0e+9; | ^^^^^^^^ error: hexadecimal float literal is not supported --> $DIR/lex-bad-numeric-literals.rs:12:5 | -LL | 0x9.0e-9; //~ ERROR: hexadecimal float literal is not supported +LL | 0x9.0e-9; | ^^^^^^^^ error: no valid digits found for number --> $DIR/lex-bad-numeric-literals.rs:13:5 | -LL | 0o; //~ ERROR: no valid digits +LL | 0o; | ^^ error: expected at least one digit in exponent --> $DIR/lex-bad-numeric-literals.rs:14:8 | -LL | 1e+; //~ ERROR: expected at least one digit in exponent +LL | 1e+; | ^ error: hexadecimal float literal is not supported --> $DIR/lex-bad-numeric-literals.rs:15:5 | -LL | 0x539.0; //~ ERROR: hexadecimal float literal is not supported +LL | 0x539.0; | ^^^^^^^ error: no valid digits found for number --> $DIR/lex-bad-numeric-literals.rs:18:5 | -LL | 0x; //~ ERROR: no valid digits +LL | 0x; | ^^ error: no valid digits found for number --> $DIR/lex-bad-numeric-literals.rs:19:5 | -LL | 0xu32; //~ ERROR: no valid digits +LL | 0xu32; | ^^ error: no valid digits found for number --> $DIR/lex-bad-numeric-literals.rs:20:5 | -LL | 0ou32; //~ ERROR: no valid digits +LL | 0ou32; | ^^ error: no valid digits found for number --> $DIR/lex-bad-numeric-literals.rs:21:5 | -LL | 0bu32; //~ ERROR: no valid digits +LL | 0bu32; | ^^ error: no valid digits found for number --> $DIR/lex-bad-numeric-literals.rs:22:5 | -LL | 0b; //~ ERROR: no valid digits +LL | 0b; | ^^ error: octal float literal is not supported --> $DIR/lex-bad-numeric-literals.rs:24:5 | -LL | 0o123.456; //~ ERROR: octal float literal is not supported +LL | 0o123.456; | ^^^^^^^^^ error: binary float literal is not supported --> $DIR/lex-bad-numeric-literals.rs:26:5 | -LL | 0b111.101; //~ ERROR: binary float literal is not supported +LL | 0b111.101; | ^^^^^^^^^ error: octal float literal is not supported --> $DIR/lex-bad-numeric-literals.rs:5:5 | -LL | 0o2f32; //~ ERROR: octal float literal is not supported +LL | 0o2f32; | ^^^^^^ not supported error: int literal is too large --> $DIR/lex-bad-numeric-literals.rs:16:5 | -LL | 9900000000000000000000000000999999999999999999999999999999; //~ ERROR: int literal is too large +LL | 9900000000000000000000000000999999999999999999999999999999; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: int literal is too large --> $DIR/lex-bad-numeric-literals.rs:17:5 | -LL | 9900000000000000000000000000999999999999999999999999999999; //~ ERROR: int literal is too large +LL | 9900000000000000000000000000999999999999999999999999999999; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: octal float literal is not supported --> $DIR/lex-bad-numeric-literals.rs:23:5 | -LL | 0o123f64; //~ ERROR: octal float literal is not supported +LL | 0o123f64; | ^^^^^^^^ not supported error: binary float literal is not supported --> $DIR/lex-bad-numeric-literals.rs:25:5 | -LL | 0b101f64; //~ ERROR: binary float literal is not supported +LL | 0b101f64; | ^^^^^^^^ not supported error: aborting due to 23 previous errors diff --git a/src/test/ui/parser/lex-bad-octal-literal.stderr b/src/test/ui/parser/lex-bad-octal-literal.stderr index 542247d69df..01f4c236c9f 100644 --- a/src/test/ui/parser/lex-bad-octal-literal.stderr +++ b/src/test/ui/parser/lex-bad-octal-literal.stderr @@ -1,13 +1,13 @@ error: invalid digit for a base 8 literal --> $DIR/lex-bad-octal-literal.rs:4:8 | -LL | 0o18; //~ ERROR invalid digit for a base 8 literal +LL | 0o18; | ^ error: invalid digit for a base 8 literal --> $DIR/lex-bad-octal-literal.rs:5:12 | -LL | 0o1234_9_5670; //~ ERROR invalid digit for a base 8 literal +LL | 0o1234_9_5670; | ^ error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/lex-bad-token.stderr b/src/test/ui/parser/lex-bad-token.stderr index 284ffde9efb..c0c2e542058 100644 --- a/src/test/ui/parser/lex-bad-token.stderr +++ b/src/test/ui/parser/lex-bad-token.stderr @@ -1,7 +1,7 @@ error: unknown start of token: /u{25cf} --> $DIR/lex-bad-token.rs:1:1 | -LL | ● //~ ERROR: unknown start of token +LL | ● | ^ error: aborting due to previous error diff --git a/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.stderr b/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.stderr index e9f3537ab74..19117bfa9c9 100644 --- a/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.stderr +++ b/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.stderr @@ -25,25 +25,25 @@ LL | /*! block doc comment with bare CR: ' ' */ error: bare CR not allowed in string, use /r instead --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:21:18 | -LL | let _s = "foo bar"; //~ ERROR: bare CR not allowed in string +LL | let _s = "foo bar"; | ^ error: bare CR not allowed in raw string, use /r instead --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:24:14 | -LL | let _s = r"bar foo"; //~ ERROR: bare CR not allowed in raw string +LL | let _s = r"bar foo"; | ^^^^^ error: unknown character escape: /r --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:27:19 | -LL | let _s = "foo/ bar"; //~ ERROR: unknown character escape: /r +LL | let _s = "foo/ bar"; | ^ | help: this is an isolated carriage return; consider checking your editor and version control settings --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:27:19 | -LL | let _s = "foo/ bar"; //~ ERROR: unknown character escape: /r +LL | let _s = "foo/ bar"; | ^ error: aborting due to 7 previous errors diff --git a/src/test/ui/parser/lex-stray-backslash.stderr b/src/test/ui/parser/lex-stray-backslash.stderr index 40e0cc1d786..7ce061b8be0 100644 --- a/src/test/ui/parser/lex-stray-backslash.stderr +++ b/src/test/ui/parser/lex-stray-backslash.stderr @@ -1,7 +1,7 @@ error: unknown start of token: / --> $DIR/lex-stray-backslash.rs:1:1 | -LL | / //~ ERROR: unknown start of token: / +LL | / | ^ error: aborting due to previous error diff --git a/src/test/ui/parser/macro-bad-delimiter-ident.stderr b/src/test/ui/parser/macro-bad-delimiter-ident.stderr index 59762e02165..6a17d39e8bf 100644 --- a/src/test/ui/parser/macro-bad-delimiter-ident.stderr +++ b/src/test/ui/parser/macro-bad-delimiter-ident.stderr @@ -1,7 +1,7 @@ error: expected `(` or `{`, found `<` --> $DIR/macro-bad-delimiter-ident.rs:2:14 | -LL | foo! bar < //~ ERROR expected `(` or `{`, found `<` +LL | foo! bar < | ^ expected `(` or `{` error: aborting due to previous error diff --git a/src/test/ui/parser/macro-keyword.stderr b/src/test/ui/parser/macro-keyword.stderr index 4a10dd50b23..f74c8aa57e7 100644 --- a/src/test/ui/parser/macro-keyword.stderr +++ b/src/test/ui/parser/macro-keyword.stderr @@ -1,11 +1,11 @@ error: expected identifier, found reserved keyword `macro` --> $DIR/macro-keyword.rs:1:4 | -LL | fn macro() { //~ ERROR expected identifier, found reserved keyword `macro` +LL | fn macro() { | ^^^^^ expected identifier, found reserved keyword help: you can escape reserved keywords to use them as identifiers | -LL | fn r#macro() { //~ ERROR expected identifier, found reserved keyword `macro` +LL | fn r#macro() { | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/parser/macro-mismatched-delim-brace-paren.stderr b/src/test/ui/parser/macro-mismatched-delim-brace-paren.stderr index 21c3d1771aa..f411ee8ce2c 100644 --- a/src/test/ui/parser/macro-mismatched-delim-brace-paren.stderr +++ b/src/test/ui/parser/macro-mismatched-delim-brace-paren.stderr @@ -4,7 +4,7 @@ error: incorrect close delimiter: `)` LL | foo! { | - un-closed delimiter LL | bar, "baz", 1, 2.0 -LL | ) //~ ERROR incorrect close delimiter +LL | ) | ^ incorrect close delimiter error: aborting due to previous error diff --git a/src/test/ui/parser/macro-mismatched-delim-paren-brace.stderr b/src/test/ui/parser/macro-mismatched-delim-paren-brace.stderr index abb08209795..b6843393611 100644 --- a/src/test/ui/parser/macro-mismatched-delim-paren-brace.stderr +++ b/src/test/ui/parser/macro-mismatched-delim-paren-brace.stderr @@ -1,7 +1,7 @@ error: unexpected close delimiter: `}` --> $DIR/macro-mismatched-delim-paren-brace.rs:5:1 | -LL | } //~ ERROR unexpected close delimiter: `}` +LL | } | ^ unexpected close delimiter error: incorrect close delimiter: `}` @@ -10,7 +10,7 @@ error: incorrect close delimiter: `}` LL | foo! ( | - un-closed delimiter LL | bar, "baz", 1, 2.0 -LL | } //~ ERROR incorrect close delimiter +LL | } | ^ incorrect close delimiter error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/macro/issue-33569.stderr b/src/test/ui/parser/macro/issue-33569.stderr index 213d72363f5..8ba72fc8886 100644 --- a/src/test/ui/parser/macro/issue-33569.stderr +++ b/src/test/ui/parser/macro/issue-33569.stderr @@ -1,19 +1,19 @@ error: expected identifier, found `+` --> $DIR/issue-33569.rs:2:8 | -LL | { $+ } => { //~ ERROR expected identifier, found `+` +LL | { $+ } => { | ^ error: expected `*` or `+` --> $DIR/issue-33569.rs:4:13 | -LL | $(x)(y) //~ ERROR expected `*` or `+` +LL | $(x)(y) | ^^^ error: missing fragment specifier --> $DIR/issue-33569.rs:2:8 | -LL | { $+ } => { //~ ERROR expected identifier, found `+` +LL | { $+ } => { | ^ error: aborting due to 3 previous errors diff --git a/src/test/ui/parser/macro/issue-37113.stderr b/src/test/ui/parser/macro/issue-37113.stderr index 36589667c4b..7aadc0aa4b5 100644 --- a/src/test/ui/parser/macro/issue-37113.stderr +++ b/src/test/ui/parser/macro/issue-37113.stderr @@ -1,7 +1,7 @@ error: expected identifier, found `String` --> $DIR/issue-37113.rs:4:16 | -LL | $( $t, )* //~ ERROR expected identifier, found `String` +LL | $( $t, )* | ^^ expected identifier ... LL | test_macro!(String,); diff --git a/src/test/ui/parser/macro/issue-37234.stderr b/src/test/ui/parser/macro/issue-37234.stderr index dcc24fca5cc..004de9d905f 100644 --- a/src/test/ui/parser/macro/issue-37234.stderr +++ b/src/test/ui/parser/macro/issue-37234.stderr @@ -1,7 +1,7 @@ error: expected one of `.`, `;`, `?`, or an operator, found `""` --> $DIR/issue-37234.rs:3:19 | -LL | let x = 5 ""; //~ ERROR found `""` +LL | let x = 5 ""; | ^^ expected one of `.`, `;`, `?`, or an operator here ... LL | failed!(); diff --git a/src/test/ui/parser/macro/macro-incomplete-parse.stderr b/src/test/ui/parser/macro/macro-incomplete-parse.stderr index 3fcc8e08520..b37bd583060 100644 --- a/src/test/ui/parser/macro/macro-incomplete-parse.stderr +++ b/src/test/ui/parser/macro/macro-incomplete-parse.stderr @@ -1,7 +1,7 @@ error: macro expansion ignores token `,` and any following --> $DIR/macro-incomplete-parse.rs:7:9 | -LL | , //~ ERROR macro expansion ignores token `,` +LL | , | ^ ... LL | ignored_item!(); @@ -12,7 +12,7 @@ LL | ignored_item!(); error: expected one of `.`, `;`, `?`, `}`, or an operator, found `,` --> $DIR/macro-incomplete-parse.rs:12:14 | -LL | () => ( 1, //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `,` +LL | () => ( 1, | ^ expected one of `.`, `;`, `?`, `}`, or an operator here ... LL | ignored_expr!(); @@ -21,7 +21,7 @@ LL | ignored_expr!(); error: macro expansion ignores token `,` and any following --> $DIR/macro-incomplete-parse.rs:18:14 | -LL | () => ( 1, 2 ) //~ ERROR macro expansion ignores token `,` +LL | () => ( 1, 2 ) | ^ ... LL | ignored_pat!() => (), diff --git a/src/test/ui/parser/macro/macro-repeat.stderr b/src/test/ui/parser/macro/macro-repeat.stderr index 310d60c8dbd..c86684de744 100644 --- a/src/test/ui/parser/macro/macro-repeat.stderr +++ b/src/test/ui/parser/macro/macro-repeat.stderr @@ -1,7 +1,7 @@ error: variable 'v' is still repeating at this depth --> $DIR/macro-repeat.rs:3:9 | -LL | $v //~ ERROR still repeating at this depth +LL | $v | ^^ error: aborting due to previous error diff --git a/src/test/ui/parser/macro/pub-item-macro.stderr b/src/test/ui/parser/macro/pub-item-macro.stderr index a624d574c45..fa25161ab50 100644 --- a/src/test/ui/parser/macro/pub-item-macro.stderr +++ b/src/test/ui/parser/macro/pub-item-macro.stderr @@ -1,7 +1,7 @@ error: can't qualify macro invocation with `pub` --> $DIR/pub-item-macro.rs:8:5 | -LL | pub priv_x!(); //~ ERROR can't qualify macro invocation with `pub` +LL | pub priv_x!(); | ^^^ ... LL | pub_x!(); @@ -12,7 +12,7 @@ LL | pub_x!(); error[E0603]: static `x` is private --> $DIR/pub-item-macro.rs:17:23 | -LL | let y: u32 = foo::x; //~ ERROR static `x` is private +LL | let y: u32 = foo::x; | ^ error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/macro/trait-object-macro-matcher.stderr b/src/test/ui/parser/macro/trait-object-macro-matcher.stderr index 185a9e71809..19c5c82f82c 100644 --- a/src/test/ui/parser/macro/trait-object-macro-matcher.stderr +++ b/src/test/ui/parser/macro/trait-object-macro-matcher.stderr @@ -1,7 +1,7 @@ error: expected type, found `'static` --> $DIR/trait-object-macro-matcher.rs:9:8 | -LL | m!('static); //~ ERROR expected type, found `'static` +LL | m!('static); | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/parser/macros-no-semicolon-items.stderr b/src/test/ui/parser/macros-no-semicolon-items.stderr index 84dd302b4a8..a869a53c1ee 100644 --- a/src/test/ui/parser/macros-no-semicolon-items.stderr +++ b/src/test/ui/parser/macros-no-semicolon-items.stderr @@ -1,7 +1,7 @@ error: macros that expand to items must either be surrounded with braces or followed by a semicolon --> $DIR/macros-no-semicolon-items.rs:1:17 | -LL | macro_rules! foo() //~ ERROR semicolon +LL | macro_rules! foo() | ^^ error: aborting due to previous error diff --git a/src/test/ui/parser/macros-no-semicolon.stderr b/src/test/ui/parser/macros-no-semicolon.stderr index 4f9e7fb5de8..09925eae51d 100644 --- a/src/test/ui/parser/macros-no-semicolon.stderr +++ b/src/test/ui/parser/macros-no-semicolon.stderr @@ -3,7 +3,7 @@ error: expected one of `.`, `;`, `?`, `}`, or an operator, found `assert_eq` | LL | assert_eq!(1, 2) | - expected one of `.`, `;`, `?`, `}`, or an operator here -LL | assert_eq!(3, 4) //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `assert_eq` +LL | assert_eq!(3, 4) | ^^^^^^^^^ unexpected token error: aborting due to previous error diff --git a/src/test/ui/parser/match-arrows-block-then-binop.stderr b/src/test/ui/parser/match-arrows-block-then-binop.stderr index 2782af49e66..a844cac189a 100644 --- a/src/test/ui/parser/match-arrows-block-then-binop.stderr +++ b/src/test/ui/parser/match-arrows-block-then-binop.stderr @@ -1,7 +1,7 @@ error: expected pattern, found `+` --> $DIR/match-arrows-block-then-binop.rs:5:9 | -LL | } + 5 //~ ERROR expected pattern, found `+` +LL | } + 5 | ^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/match-refactor-to-expr.stderr b/src/test/ui/parser/match-refactor-to-expr.stderr index 692b116123a..bf20bc93500 100644 --- a/src/test/ui/parser/match-refactor-to-expr.stderr +++ b/src/test/ui/parser/match-refactor-to-expr.stderr @@ -1,15 +1,15 @@ error: expected one of `.`, `?`, `{`, or an operator, found `;` --> $DIR/match-refactor-to-expr.rs:6:9 | -LL | match //~ NOTE while parsing this match expression +LL | match | ----- | | | while parsing this match expression | help: try removing this `match` LL | Some(4).unwrap_or_else(5) | - expected one of `.`, `?`, `{`, or an operator here -LL | //~^ NOTE expected one of `.`, `?`, `{`, or an operator here -LL | ; //~ NOTE unexpected token +LL | +LL | ; | ^ unexpected token error: aborting due to previous error diff --git a/src/test/ui/parser/match-vec-invalid.stderr b/src/test/ui/parser/match-vec-invalid.stderr index 5a5fc9c4509..fee8d248dcf 100644 --- a/src/test/ui/parser/match-vec-invalid.stderr +++ b/src/test/ui/parser/match-vec-invalid.stderr @@ -1,7 +1,7 @@ error: expected one of `,` or `@`, found `..` --> $DIR/match-vec-invalid.rs:4:25 | -LL | [1, tail.., tail..] => {}, //~ ERROR: expected one of `,` or `@`, found `..` +LL | [1, tail.., tail..] => {}, | ^^ expected one of `,` or `@` here error: aborting due to previous error diff --git a/src/test/ui/parser/mod_file_not_exist_windows.stderr b/src/test/ui/parser/mod_file_not_exist_windows.stderr index 67abd6304d5..60ae00abab1 100644 --- a/src/test/ui/parser/mod_file_not_exist_windows.stderr +++ b/src/test/ui/parser/mod_file_not_exist_windows.stderr @@ -1,7 +1,7 @@ error[E0583]: file not found for module `not_a_real_file` --> $DIR/mod_file_not_exist_windows.rs:3:5 | -LL | mod not_a_real_file; //~ ERROR file not found for module `not_a_real_file` +LL | mod not_a_real_file; | ^^^^^^^^^^^^^^^ | = help: name the file either not_a_real_file.rs or not_a_real_file/mod.rs inside the directory "$DIR" diff --git a/src/test/ui/parser/mod_file_with_path_attr.stderr b/src/test/ui/parser/mod_file_with_path_attr.stderr index a3a3486dd9e..004b5d7963a 100644 --- a/src/test/ui/parser/mod_file_with_path_attr.stderr +++ b/src/test/ui/parser/mod_file_with_path_attr.stderr @@ -1,7 +1,7 @@ error: couldn't read $DIR/not_a_real_file.rs: $FILE_NOT_FOUND_MSG (os error 2) --> $DIR/mod_file_with_path_attr.rs:4:5 | -LL | mod m; //~ ERROR not_a_real_file.rs +LL | mod m; | ^ error: aborting due to previous error diff --git a/src/test/ui/parser/multiline-comment-line-tracking.stderr b/src/test/ui/parser/multiline-comment-line-tracking.stderr index c9404d8b9e4..cac0c801a59 100644 --- a/src/test/ui/parser/multiline-comment-line-tracking.stderr +++ b/src/test/ui/parser/multiline-comment-line-tracking.stderr @@ -1,7 +1,7 @@ error: expected expression, found `%` --> $DIR/multiline-comment-line-tracking.rs:8:3 | -LL | %; //~ ERROR expected expression, found `%` +LL | %; | ^ expected expression error: aborting due to previous error diff --git a/src/test/ui/parser/mut-patterns.stderr b/src/test/ui/parser/mut-patterns.stderr index 5bbb4ce569f..286956440ec 100644 --- a/src/test/ui/parser/mut-patterns.stderr +++ b/src/test/ui/parser/mut-patterns.stderr @@ -1,7 +1,7 @@ error: expected one of `:`, `;`, `=`, or `@`, found `{` --> $DIR/mut-patterns.rs:5:17 | -LL | let mut Foo { x: x } = Foo { x: 3 }; //~ ERROR: expected one of `:`, `;`, `=`, or `@`, found `{` +LL | let mut Foo { x: x } = Foo { x: 3 }; | ^ expected one of `:`, `;`, `=`, or `@` here error: aborting due to previous error diff --git a/src/test/ui/parser/new-unicode-escapes-1.stderr b/src/test/ui/parser/new-unicode-escapes-1.stderr index 828e72e56ea..5a191735307 100644 --- a/src/test/ui/parser/new-unicode-escapes-1.stderr +++ b/src/test/ui/parser/new-unicode-escapes-1.stderr @@ -1,7 +1,7 @@ error: unterminated unicode escape (needed a `}`) --> $DIR/new-unicode-escapes-1.rs:2:21 | -LL | let s = "/u{2603"; //~ ERROR unterminated unicode escape (needed a `}`) +LL | let s = "/u{2603"; | ^ error: aborting due to previous error diff --git a/src/test/ui/parser/new-unicode-escapes-2.stderr b/src/test/ui/parser/new-unicode-escapes-2.stderr index 97ba3fb2cb6..0fb8befa45b 100644 --- a/src/test/ui/parser/new-unicode-escapes-2.stderr +++ b/src/test/ui/parser/new-unicode-escapes-2.stderr @@ -1,7 +1,7 @@ error: overlong unicode escape (must have at most 6 hex digits) --> $DIR/new-unicode-escapes-2.rs:2:17 | -LL | let s = "/u{260311111111}"; //~ ERROR overlong unicode escape (must have at most 6 hex digits) +LL | let s = "/u{260311111111}"; | ^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/parser/new-unicode-escapes-3.stderr b/src/test/ui/parser/new-unicode-escapes-3.stderr index 038002ae05e..427426788f6 100644 --- a/src/test/ui/parser/new-unicode-escapes-3.stderr +++ b/src/test/ui/parser/new-unicode-escapes-3.stderr @@ -1,7 +1,7 @@ error: invalid unicode character escape --> $DIR/new-unicode-escapes-3.rs:2:14 | -LL | let s1 = "/u{d805}"; //~ ERROR invalid unicode character escape +LL | let s1 = "/u{d805}"; | ^^^^^^^^^^ | = help: unicode escape must not be a surrogate @@ -9,7 +9,7 @@ LL | let s1 = "/u{d805}"; //~ ERROR invalid unicode character escape error: invalid unicode character escape --> $DIR/new-unicode-escapes-3.rs:3:14 | -LL | let s2 = "/u{ffffff}"; //~ ERROR invalid unicode character escape +LL | let s2 = "/u{ffffff}"; | ^^^^^^^^^^^^ | = help: unicode escape must be at most 10FFFF diff --git a/src/test/ui/parser/no-unsafe-self.stderr b/src/test/ui/parser/no-unsafe-self.stderr index 84779b09dc7..96d8b56bf9a 100644 --- a/src/test/ui/parser/no-unsafe-self.stderr +++ b/src/test/ui/parser/no-unsafe-self.stderr @@ -1,37 +1,37 @@ error: cannot pass `self` by raw pointer --> $DIR/no-unsafe-self.rs:4:17 | -LL | fn foo(*mut self); //~ ERROR cannot pass `self` by raw pointer +LL | fn foo(*mut self); | ^^^^ cannot pass `self` by raw pointer error: cannot pass `self` by raw pointer --> $DIR/no-unsafe-self.rs:5:19 | -LL | fn baz(*const self); //~ ERROR cannot pass `self` by raw pointer +LL | fn baz(*const self); | ^^^^ cannot pass `self` by raw pointer error: cannot pass `self` by raw pointer --> $DIR/no-unsafe-self.rs:6:13 | -LL | fn bar(*self); //~ ERROR cannot pass `self` by raw pointer +LL | fn bar(*self); | ^^^^ cannot pass `self` by raw pointer error: cannot pass `self` by raw pointer --> $DIR/no-unsafe-self.rs:11:17 | -LL | fn foo(*mut self) { } //~ ERROR cannot pass `self` by raw pointer +LL | fn foo(*mut self) { } | ^^^^ cannot pass `self` by raw pointer error: cannot pass `self` by raw pointer --> $DIR/no-unsafe-self.rs:12:19 | -LL | fn baz(*const self) { } //~ ERROR cannot pass `self` by raw pointer +LL | fn baz(*const self) { } | ^^^^ cannot pass `self` by raw pointer error: cannot pass `self` by raw pointer --> $DIR/no-unsafe-self.rs:13:13 | -LL | fn bar(*self) { } //~ ERROR cannot pass `self` by raw pointer +LL | fn bar(*self) { } | ^^^^ cannot pass `self` by raw pointer error: aborting due to 6 previous errors diff --git a/src/test/ui/parser/omitted-arg-in-item-fn.stderr b/src/test/ui/parser/omitted-arg-in-item-fn.stderr index b21a1bd0831..4f2a76d2d25 100644 --- a/src/test/ui/parser/omitted-arg-in-item-fn.stderr +++ b/src/test/ui/parser/omitted-arg-in-item-fn.stderr @@ -1,7 +1,7 @@ error: expected one of `:` or `@`, found `)` --> $DIR/omitted-arg-in-item-fn.rs:1:9 | -LL | fn foo(x) { //~ ERROR expected one of `:` or `@`, found `)` +LL | fn foo(x) { | ^ expected one of `:` or `@` here error: aborting due to previous error diff --git a/src/test/ui/parser/paamayim-nekudotayim.stderr b/src/test/ui/parser/paamayim-nekudotayim.stderr index 6423aa2dc2f..6ceba07f469 100644 --- a/src/test/ui/parser/paamayim-nekudotayim.stderr +++ b/src/test/ui/parser/paamayim-nekudotayim.stderr @@ -1,7 +1,7 @@ error: expected identifier, found `;` --> $DIR/paamayim-nekudotayim.rs:4:7 | -LL | ::; //~ ERROR expected identifier, found `;` +LL | ::; | ^ expected identifier error: aborting due to previous error diff --git a/src/test/ui/parser/pat-lt-bracket-4.stderr b/src/test/ui/parser/pat-lt-bracket-4.stderr index 18e0e9e8f0c..d14702acee6 100644 --- a/src/test/ui/parser/pat-lt-bracket-4.stderr +++ b/src/test/ui/parser/pat-lt-bracket-4.stderr @@ -1,7 +1,7 @@ error: expected one of `=>`, `@`, `if`, or `|`, found `<` --> $DIR/pat-lt-bracket-4.rs:8:12 | -LL | Foo::A(value) => value, //~ error: expected one of `=>`, `@`, `if`, or `|`, found `<` +LL | Foo::A(value) => value, | ^ expected one of `=>`, `@`, `if`, or `|` here error: aborting due to previous error diff --git a/src/test/ui/parser/pat-lt-bracket-5.stderr b/src/test/ui/parser/pat-lt-bracket-5.stderr index 7e76a04ce6f..ce4cc05db19 100644 --- a/src/test/ui/parser/pat-lt-bracket-5.stderr +++ b/src/test/ui/parser/pat-lt-bracket-5.stderr @@ -1,7 +1,7 @@ error: expected one of `:`, `;`, `=`, or `@`, found `[` --> $DIR/pat-lt-bracket-5.rs:2:10 | -LL | let v[0] = v[1]; //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `[` +LL | let v[0] = v[1]; | ^ expected one of `:`, `;`, `=`, or `@` here error: aborting due to previous error diff --git a/src/test/ui/parser/pat-lt-bracket-6.stderr b/src/test/ui/parser/pat-lt-bracket-6.stderr index bf5b6190761..2ee4bdb20fe 100644 --- a/src/test/ui/parser/pat-lt-bracket-6.stderr +++ b/src/test/ui/parser/pat-lt-bracket-6.stderr @@ -1,7 +1,7 @@ error: expected one of `)`, `,`, or `@`, found `[` --> $DIR/pat-lt-bracket-6.rs:2:19 | -LL | let Test(&desc[..]) = x; //~ ERROR: expected one of `)`, `,`, or `@`, found `[` +LL | let Test(&desc[..]) = x; | ^ expected one of `)`, `,`, or `@` here error: aborting due to previous error diff --git a/src/test/ui/parser/pat-lt-bracket-7.stderr b/src/test/ui/parser/pat-lt-bracket-7.stderr index 44394c30021..5552ea46d9b 100644 --- a/src/test/ui/parser/pat-lt-bracket-7.stderr +++ b/src/test/ui/parser/pat-lt-bracket-7.stderr @@ -1,7 +1,7 @@ error: expected one of `)`, `,`, or `@`, found `[` --> $DIR/pat-lt-bracket-7.rs:2:16 | -LL | for thing(x[]) in foo {} //~ ERROR: expected one of `)`, `,`, or `@`, found `[` +LL | for thing(x[]) in foo {} | ^ expected one of `)`, `,`, or `@` here error: aborting due to previous error diff --git a/src/test/ui/parser/pat-ranges-1.stderr b/src/test/ui/parser/pat-ranges-1.stderr index 378caf63000..6e0deccab8c 100644 --- a/src/test/ui/parser/pat-ranges-1.stderr +++ b/src/test/ui/parser/pat-ranges-1.stderr @@ -1,7 +1,7 @@ error: expected one of `:`, `;`, or `=`, found `..=` --> $DIR/pat-ranges-1.rs:4:21 | -LL | let macropus!() ..= 11 = 12; //~ error: expected one of `:`, `;`, or `=`, found `..=` +LL | let macropus!() ..= 11 = 12; | ^^^ expected one of `:`, `;`, or `=` here error: aborting due to previous error diff --git a/src/test/ui/parser/pat-ranges-2.stderr b/src/test/ui/parser/pat-ranges-2.stderr index ef8b4f94ef4..d180bb42911 100644 --- a/src/test/ui/parser/pat-ranges-2.stderr +++ b/src/test/ui/parser/pat-ranges-2.stderr @@ -1,7 +1,7 @@ error: expected one of `::`, `:`, `;`, or `=`, found `!` --> $DIR/pat-ranges-2.rs:4:26 | -LL | let 10 ..= makropulos!() = 12; //~ error: expected one of `::`, `:`, `;`, or `=`, found `!` +LL | let 10 ..= makropulos!() = 12; | ^ expected one of `::`, `:`, `;`, or `=` here error: aborting due to previous error diff --git a/src/test/ui/parser/pat-ranges-3.stderr b/src/test/ui/parser/pat-ranges-3.stderr index f923228710b..aaa85e3c2dd 100644 --- a/src/test/ui/parser/pat-ranges-3.stderr +++ b/src/test/ui/parser/pat-ranges-3.stderr @@ -1,7 +1,7 @@ error: expected one of `:`, `;`, or `=`, found `+` --> $DIR/pat-ranges-3.rs:4:19 | -LL | let 10 ..= 10 + 3 = 12; //~ expected one of `:`, `;`, or `=`, found `+` +LL | let 10 ..= 10 + 3 = 12; | ^ expected one of `:`, `;`, or `=` here error: aborting due to previous error diff --git a/src/test/ui/parser/pat-ref-enum.stderr b/src/test/ui/parser/pat-ref-enum.stderr index 8729e8c5854..a3bce337264 100644 --- a/src/test/ui/parser/pat-ref-enum.stderr +++ b/src/test/ui/parser/pat-ref-enum.stderr @@ -1,7 +1,7 @@ error: expected identifier, found enum pattern --> $DIR/pat-ref-enum.rs:3:11 | -LL | ref Some(i) => {} //~ ERROR expected identifier, found enum pattern +LL | ref Some(i) => {} | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/parser/pat-tuple-1.stderr b/src/test/ui/parser/pat-tuple-1.stderr index 33c69deda42..391f2c428bf 100644 --- a/src/test/ui/parser/pat-tuple-1.stderr +++ b/src/test/ui/parser/pat-tuple-1.stderr @@ -1,7 +1,7 @@ error: expected pattern, found `,` --> $DIR/pat-tuple-1.rs:3:10 | -LL | (, ..) => {} //~ ERROR expected pattern, found `,` +LL | (, ..) => {} | ^ expected pattern error: aborting due to previous error diff --git a/src/test/ui/parser/pat-tuple-4.stderr b/src/test/ui/parser/pat-tuple-4.stderr index fe4b4deaa60..26b92fae313 100644 --- a/src/test/ui/parser/pat-tuple-4.stderr +++ b/src/test/ui/parser/pat-tuple-4.stderr @@ -1,7 +1,7 @@ error: expected one of `)` or `,`, found `pat` --> $DIR/pat-tuple-4.rs:3:13 | -LL | (.. pat) => {} //~ ERROR expected one of `)` or `,`, found `pat` +LL | (.. pat) => {} | ^^^ expected one of `)` or `,` here error: aborting due to previous error diff --git a/src/test/ui/parser/pat-tuple-5.stderr b/src/test/ui/parser/pat-tuple-5.stderr index 2ca10f69760..61ae40b355d 100644 --- a/src/test/ui/parser/pat-tuple-5.stderr +++ b/src/test/ui/parser/pat-tuple-5.stderr @@ -1,7 +1,7 @@ error: unexpected token: `)` --> $DIR/pat-tuple-5.rs:3:14 | -LL | (pat ..) => {} //~ ERROR unexpected token: `)` +LL | (pat ..) => {} | ^^ error: aborting due to previous error diff --git a/src/test/ui/parser/pub-method-macro.stderr b/src/test/ui/parser/pub-method-macro.stderr index 2b4920a792f..7b0fe493461 100644 --- a/src/test/ui/parser/pub-method-macro.stderr +++ b/src/test/ui/parser/pub-method-macro.stderr @@ -1,7 +1,7 @@ error: can't qualify macro invocation with `pub` --> $DIR/pub-method-macro.rs:17:9 | -LL | pub defn!(f); //~ ERROR can't qualify macro invocation with `pub` +LL | pub defn!(f); | ^^^ | = help: try adjusting the macro to put `pub` inside the invocation diff --git a/src/test/ui/parser/range_inclusive.stderr b/src/test/ui/parser/range_inclusive.stderr index f50b2fa49fb..12b7edae79f 100644 --- a/src/test/ui/parser/range_inclusive.stderr +++ b/src/test/ui/parser/range_inclusive.stderr @@ -1,7 +1,7 @@ error[E0586]: inclusive range with no end --> $DIR/range_inclusive.rs:4:19 | -LL | for _ in 1..= {} //~ERROR inclusive range with no end +LL | for _ in 1..= {} | ^ | = help: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) diff --git a/src/test/ui/parser/range_inclusive_dotdotdot.stderr b/src/test/ui/parser/range_inclusive_dotdotdot.stderr index 9fad20848a6..21ad26d8d25 100644 --- a/src/test/ui/parser/range_inclusive_dotdotdot.stderr +++ b/src/test/ui/parser/range_inclusive_dotdotdot.stderr @@ -1,57 +1,57 @@ error: unexpected token: `...` --> $DIR/range_inclusive_dotdotdot.rs:8:12 | -LL | return ...1; //~ERROR unexpected token: `...` +LL | return ...1; | ^^^ help: use `..` for an exclusive range | -LL | return ..1; //~ERROR unexpected token: `...` +LL | return ..1; | ^^ help: or `..=` for an inclusive range | -LL | return ..=1; //~ERROR unexpected token: `...` +LL | return ..=1; | ^^^ error: unexpected token: `...` --> $DIR/range_inclusive_dotdotdot.rs:14:13 | -LL | let x = ...0; //~ERROR unexpected token: `...` +LL | let x = ...0; | ^^^ help: use `..` for an exclusive range | -LL | let x = ..0; //~ERROR unexpected token: `...` +LL | let x = ..0; | ^^ help: or `..=` for an inclusive range | -LL | let x = ..=0; //~ERROR unexpected token: `...` +LL | let x = ..=0; | ^^^ error: unexpected token: `...` --> $DIR/range_inclusive_dotdotdot.rs:18:14 | -LL | let x = 5...5; //~ERROR unexpected token: `...` +LL | let x = 5...5; | ^^^ help: use `..` for an exclusive range | -LL | let x = 5..5; //~ERROR unexpected token: `...` +LL | let x = 5..5; | ^^ help: or `..=` for an inclusive range | -LL | let x = 5..=5; //~ERROR unexpected token: `...` +LL | let x = 5..=5; | ^^^ error: unexpected token: `...` --> $DIR/range_inclusive_dotdotdot.rs:22:15 | -LL | for _ in 0...1 {} //~ERROR unexpected token: `...` +LL | for _ in 0...1 {} | ^^^ help: use `..` for an exclusive range | -LL | for _ in 0..1 {} //~ERROR unexpected token: `...` +LL | for _ in 0..1 {} | ^^ help: or `..=` for an inclusive range | -LL | for _ in 0..=1 {} //~ERROR unexpected token: `...` +LL | for _ in 0..=1 {} | ^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/parser/raw-byte-string-eof.stderr b/src/test/ui/parser/raw-byte-string-eof.stderr index 071cd6241da..2ba50e8fb2a 100644 --- a/src/test/ui/parser/raw-byte-string-eof.stderr +++ b/src/test/ui/parser/raw-byte-string-eof.stderr @@ -1,7 +1,7 @@ error: unterminated raw string --> $DIR/raw-byte-string-eof.rs:2:6 | -LL | br##"a"#; //~ unterminated raw string +LL | br##"a"#; | ^ unterminated raw string | = note: this raw string should be terminated with `"##` diff --git a/src/test/ui/parser/raw-byte-string-literals.stderr b/src/test/ui/parser/raw-byte-string-literals.stderr index 1131e0015bb..5670ed6590a 100644 --- a/src/test/ui/parser/raw-byte-string-literals.stderr +++ b/src/test/ui/parser/raw-byte-string-literals.stderr @@ -1,13 +1,13 @@ error: raw byte string must be ASCII: /u{e9} --> $DIR/raw-byte-string-literals.rs:5:8 | -LL | br"é"; //~ ERROR raw byte string must be ASCII +LL | br"é"; | ^ error: found invalid character; only `#` is allowed in raw string delimitation: ~ --> $DIR/raw-byte-string-literals.rs:6:6 | -LL | br##~"a"~##; //~ ERROR only `#` is allowed in raw string delimitation +LL | br##~"a"~##; | ^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/raw-str-delim.stderr b/src/test/ui/parser/raw-str-delim.stderr index 47fd331969d..b86b9e90e73 100644 --- a/src/test/ui/parser/raw-str-delim.stderr +++ b/src/test/ui/parser/raw-str-delim.stderr @@ -1,7 +1,7 @@ error: found invalid character; only `#` is allowed in raw string delimitation: ~ --> $DIR/raw-str-delim.rs:2:5 | -LL | r#~"#"~# //~ ERROR found invalid character; only `#` is allowed in raw string delimitation +LL | r#~"#"~# | ^^ error: aborting due to previous error diff --git a/src/test/ui/parser/raw-str-unbalanced.stderr b/src/test/ui/parser/raw-str-unbalanced.stderr index 6dedcfb6a0a..26910ff64f5 100644 --- a/src/test/ui/parser/raw-str-unbalanced.stderr +++ b/src/test/ui/parser/raw-str-unbalanced.stderr @@ -1,7 +1,7 @@ error: expected one of `.`, `;`, `?`, or an operator, found `#` --> $DIR/raw-str-unbalanced.rs:3:9 | -LL | "## //~ ERROR expected one of `.`, `;`, `?`, or an operator, found `#` +LL | "## | ^ expected one of `.`, `;`, `?`, or an operator here error: aborting due to previous error diff --git a/src/test/ui/parser/raw/raw-literal-keywords.stderr b/src/test/ui/parser/raw/raw-literal-keywords.stderr index 8465b6a6e84..8b8b71373b5 100644 --- a/src/test/ui/parser/raw/raw-literal-keywords.stderr +++ b/src/test/ui/parser/raw/raw-literal-keywords.stderr @@ -1,37 +1,37 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `true` --> $DIR/raw-literal-keywords.rs:2:10 | -LL | r#if true { } //~ ERROR found `true` +LL | r#if true { } | ^^^^ expected one of 8 possible tokens here error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `Test` --> $DIR/raw-literal-keywords.rs:7:14 | -LL | r#struct Test; //~ ERROR found `Test` +LL | r#struct Test; | ^^^^ expected one of 8 possible tokens here error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `Test` --> $DIR/raw-literal-keywords.rs:12:13 | -LL | r#union Test; //~ ERROR found `Test` +LL | r#union Test; | ^^^^ expected one of 8 possible tokens here error[E0425]: cannot find value `if` in this scope --> $DIR/raw-literal-keywords.rs:2:5 | -LL | r#if true { } //~ ERROR found `true` +LL | r#if true { } | ^^^^ not found in this scope error[E0425]: cannot find value `struct` in this scope --> $DIR/raw-literal-keywords.rs:7:5 | -LL | r#struct Test; //~ ERROR found `Test` +LL | r#struct Test; | ^^^^^^^^ not found in this scope error[E0425]: cannot find value `union` in this scope --> $DIR/raw-literal-keywords.rs:12:5 | -LL | r#union Test; //~ ERROR found `Test` +LL | r#union Test; | ^^^^^^^ not found in this scope error: aborting due to 6 previous errors diff --git a/src/test/ui/parser/recover-enum.stderr b/src/test/ui/parser/recover-enum.stderr index 81e292939b0..8c3448d6fbe 100644 --- a/src/test/ui/parser/recover-enum.stderr +++ b/src/test/ui/parser/recover-enum.stderr @@ -3,7 +3,7 @@ error: expected one of `(`, `,`, `=`, `{`, or `}`, found `Bad` | LL | Very | - expected one of `(`, `,`, `=`, `{`, or `}` here -LL | Bad //~ ERROR found `Bad` +LL | Bad | ^^^ unexpected token error: aborting due to previous error diff --git a/src/test/ui/parser/recover-enum2.stderr b/src/test/ui/parser/recover-enum2.stderr index 315bfde77c7..d1984a54e2f 100644 --- a/src/test/ui/parser/recover-enum2.stderr +++ b/src/test/ui/parser/recover-enum2.stderr @@ -1,13 +1,13 @@ error: expected type, found `{` --> $DIR/recover-enum2.rs:8:18 | -LL | abc: {}, //~ ERROR: expected type, found `{` +LL | abc: {}, | ^ error: expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `{` --> $DIR/recover-enum2.rs:27:22 | -LL | Nope(i32 {}) //~ ERROR: found `{` +LL | Nope(i32 {}) | ^ expected one of 7 possible tokens here error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/recover-struct.stderr b/src/test/ui/parser/recover-struct.stderr index edb3cb95cab..8e11d6b29a5 100644 --- a/src/test/ui/parser/recover-struct.stderr +++ b/src/test/ui/parser/recover-struct.stderr @@ -3,7 +3,7 @@ error: expected `:`, found `Bad` | LL | Very | - expected `:` -LL | Bad //~ ERROR found `Bad` +LL | Bad | ^^^ unexpected token error: aborting due to previous error diff --git a/src/test/ui/parser/regions-out-of-scope-slice.stderr b/src/test/ui/parser/regions-out-of-scope-slice.stderr index cd56dfa6aeb..8d9bf0b7a04 100644 --- a/src/test/ui/parser/regions-out-of-scope-slice.stderr +++ b/src/test/ui/parser/regions-out-of-scope-slice.stderr @@ -1,7 +1,7 @@ error: expected `:`, found `[` --> $DIR/regions-out-of-scope-slice.rs:7:19 | -LL | x = &'blk [1,2,3]; //~ ERROR expected `:`, found `[` +LL | x = &'blk [1,2,3]; | ^ expected `:` error: aborting due to previous error diff --git a/src/test/ui/parser/removed-syntax-enum-newtype.stderr b/src/test/ui/parser/removed-syntax-enum-newtype.stderr index 4c710dec5ba..a6d0ff4eaf2 100644 --- a/src/test/ui/parser/removed-syntax-enum-newtype.stderr +++ b/src/test/ui/parser/removed-syntax-enum-newtype.stderr @@ -1,7 +1,7 @@ error: expected one of `<`, `where`, or `{`, found `=` --> $DIR/removed-syntax-enum-newtype.rs:1:8 | -LL | enum e = isize; //~ ERROR expected one of `<`, `where`, or `{`, found `=` +LL | enum e = isize; | ^ expected one of `<`, `where`, or `{` here error: aborting due to previous error diff --git a/src/test/ui/parser/removed-syntax-fixed-vec.stderr b/src/test/ui/parser/removed-syntax-fixed-vec.stderr index 318591e5cc0..ca6969d1e87 100644 --- a/src/test/ui/parser/removed-syntax-fixed-vec.stderr +++ b/src/test/ui/parser/removed-syntax-fixed-vec.stderr @@ -1,7 +1,7 @@ error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `*` --> $DIR/removed-syntax-fixed-vec.rs:1:17 | -LL | type v = [isize * 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `*` +LL | type v = [isize * 3]; | ^ expected one of 7 possible tokens here error: aborting due to previous error diff --git a/src/test/ui/parser/removed-syntax-fn-sigil.stderr b/src/test/ui/parser/removed-syntax-fn-sigil.stderr index 9303a67a8cc..196a5af4729 100644 --- a/src/test/ui/parser/removed-syntax-fn-sigil.stderr +++ b/src/test/ui/parser/removed-syntax-fn-sigil.stderr @@ -1,7 +1,7 @@ error: expected `(`, found `~` --> $DIR/removed-syntax-fn-sigil.rs:2:14 | -LL | let x: fn~() = || (); //~ ERROR expected `(`, found `~` +LL | let x: fn~() = || (); | - ^ expected `(` | | | while parsing the type for `x` diff --git a/src/test/ui/parser/removed-syntax-mut-vec-expr.stderr b/src/test/ui/parser/removed-syntax-mut-vec-expr.stderr index 8164645b01b..313420fb9a4 100644 --- a/src/test/ui/parser/removed-syntax-mut-vec-expr.stderr +++ b/src/test/ui/parser/removed-syntax-mut-vec-expr.stderr @@ -1,7 +1,7 @@ error: expected expression, found keyword `mut` --> $DIR/removed-syntax-mut-vec-expr.rs:2:14 | -LL | let v = [mut 1, 2, 3, 4]; //~ ERROR expected expression, found keyword `mut` +LL | let v = [mut 1, 2, 3, 4]; | ^^^ expected expression error: aborting due to previous error diff --git a/src/test/ui/parser/removed-syntax-mut-vec-ty.stderr b/src/test/ui/parser/removed-syntax-mut-vec-ty.stderr index f0eafa3d00a..a759716b5a9 100644 --- a/src/test/ui/parser/removed-syntax-mut-vec-ty.stderr +++ b/src/test/ui/parser/removed-syntax-mut-vec-ty.stderr @@ -1,7 +1,7 @@ error: expected type, found keyword `mut` --> $DIR/removed-syntax-mut-vec-ty.rs:1:11 | -LL | type v = [mut isize]; //~ ERROR expected type, found keyword `mut` +LL | type v = [mut isize]; | ^^^ error: aborting due to previous error diff --git a/src/test/ui/parser/removed-syntax-ptr-lifetime.stderr b/src/test/ui/parser/removed-syntax-ptr-lifetime.stderr index 689ed35668e..7beef9883bd 100644 --- a/src/test/ui/parser/removed-syntax-ptr-lifetime.stderr +++ b/src/test/ui/parser/removed-syntax-ptr-lifetime.stderr @@ -1,7 +1,7 @@ error: expected one of `!`, `(`, `::`, `;`, or `<`, found `/` --> $DIR/removed-syntax-ptr-lifetime.rs:1:22 | -LL | type bptr = &lifetime/isize; //~ ERROR expected one of `!`, `(`, `::`, `;`, or `<`, found `/` +LL | type bptr = &lifetime/isize; | ^ expected one of `!`, `(`, `::`, `;`, or `<` here error: aborting due to previous error diff --git a/src/test/ui/parser/removed-syntax-record.stderr b/src/test/ui/parser/removed-syntax-record.stderr index f9b98596ae3..730d5e2712b 100644 --- a/src/test/ui/parser/removed-syntax-record.stderr +++ b/src/test/ui/parser/removed-syntax-record.stderr @@ -1,7 +1,7 @@ error: expected type, found `{` --> $DIR/removed-syntax-record.rs:1:10 | -LL | type t = { f: () }; //~ ERROR expected type, found `{` +LL | type t = { f: () }; | ^ error: aborting due to previous error diff --git a/src/test/ui/parser/removed-syntax-uniq-mut-expr.stderr b/src/test/ui/parser/removed-syntax-uniq-mut-expr.stderr index 90d0764def0..63d2fdb8cd4 100644 --- a/src/test/ui/parser/removed-syntax-uniq-mut-expr.stderr +++ b/src/test/ui/parser/removed-syntax-uniq-mut-expr.stderr @@ -1,7 +1,7 @@ error: expected expression, found keyword `mut` --> $DIR/removed-syntax-uniq-mut-expr.rs:2:21 | -LL | let a_box = box mut 42; //~ ERROR expected expression, found keyword `mut` +LL | let a_box = box mut 42; | ^^^ expected expression error: aborting due to previous error diff --git a/src/test/ui/parser/removed-syntax-uniq-mut-ty.stderr b/src/test/ui/parser/removed-syntax-uniq-mut-ty.stderr index b2759778d03..b6c5749c031 100644 --- a/src/test/ui/parser/removed-syntax-uniq-mut-ty.stderr +++ b/src/test/ui/parser/removed-syntax-uniq-mut-ty.stderr @@ -1,7 +1,7 @@ error: expected one of `>`, const, lifetime, or type, found `mut` --> $DIR/removed-syntax-uniq-mut-ty.rs:1:20 | -LL | type mut_box = Box; //~ ERROR expected one of `>`, const, lifetime, or type, found `mut` +LL | type mut_box = Box; | ^^^ expected one of `>`, const, lifetime, or type here error: aborting due to previous error diff --git a/src/test/ui/parser/struct-literal-in-for.stderr b/src/test/ui/parser/struct-literal-in-for.stderr index 38a5e22e3f7..b319c64f406 100644 --- a/src/test/ui/parser/struct-literal-in-for.stderr +++ b/src/test/ui/parser/struct-literal-in-for.stderr @@ -1,19 +1,19 @@ error: expected type, found `3` --> $DIR/struct-literal-in-for.rs:13:12 | -LL | x: 3 //~ ERROR expected type, found `3` +LL | x: 3 | ^ expecting a type here because of type ascription error: expected one of `.`, `;`, `?`, `}`, or an operator, found `{` --> $DIR/struct-literal-in-for.rs:14:12 | -LL | }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{` +LL | }.hi() { | ^ expected one of `.`, `;`, `?`, `}`, or an operator here error[E0423]: expected value, found struct `Foo` --> $DIR/struct-literal-in-for.rs:12:14 | -LL | for x in Foo { //~ ERROR expected value, found struct `Foo` +LL | for x in Foo { | ^^^ did you mean `(Foo { /* fields */ })`? error: aborting due to 3 previous errors diff --git a/src/test/ui/parser/struct-literal-in-if.stderr b/src/test/ui/parser/struct-literal-in-if.stderr index 49b9a52aff9..27672eeda83 100644 --- a/src/test/ui/parser/struct-literal-in-if.stderr +++ b/src/test/ui/parser/struct-literal-in-if.stderr @@ -1,19 +1,19 @@ error: expected type, found `3` --> $DIR/struct-literal-in-if.rs:13:12 | -LL | x: 3 //~ ERROR expected type, found `3` +LL | x: 3 | ^ expecting a type here because of type ascription error: expected one of `.`, `;`, `?`, `}`, or an operator, found `{` --> $DIR/struct-literal-in-if.rs:14:12 | -LL | }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{` +LL | }.hi() { | ^ expected one of `.`, `;`, `?`, `}`, or an operator here error[E0423]: expected value, found struct `Foo` --> $DIR/struct-literal-in-if.rs:12:8 | -LL | if Foo { //~ ERROR expected value, found struct `Foo` +LL | if Foo { | ^^^ did you mean `(Foo { /* fields */ })`? error: aborting due to 3 previous errors diff --git a/src/test/ui/parser/struct-literal-in-match-discriminant.stderr b/src/test/ui/parser/struct-literal-in-match-discriminant.stderr index 64ddde0e9e9..94a758eb526 100644 --- a/src/test/ui/parser/struct-literal-in-match-discriminant.stderr +++ b/src/test/ui/parser/struct-literal-in-match-discriminant.stderr @@ -1,25 +1,25 @@ error: expected one of `=>`, `@`, `if`, or `|`, found `:` --> $DIR/struct-literal-in-match-discriminant.rs:7:10 | -LL | x: 3 //~ ERROR expected one of `=>`, `@`, `if`, or `|`, found `:` +LL | x: 3 | ^ expected one of `=>`, `@`, `if`, or `|` here error: expected one of `.`, `;`, `?`, `}`, or an operator, found `=>` --> $DIR/struct-literal-in-match-discriminant.rs:11:11 | -LL | } => {} //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `=>` +LL | } => {} | ^^ expected one of `.`, `;`, `?`, `}`, or an operator here error[E0423]: expected value, found struct `Foo` --> $DIR/struct-literal-in-match-discriminant.rs:6:11 | -LL | match Foo { //~ ERROR expected value, found struct `Foo` +LL | match Foo { | ^^^ did you mean `(Foo { /* fields */ })`? error[E0425]: cannot find value `x` in this scope --> $DIR/struct-literal-in-match-discriminant.rs:10:16 | -LL | x: x //~ ERROR cannot find value `x` in this scope +LL | x: x | ^ not found in this scope error[E0308]: mismatched types @@ -28,9 +28,9 @@ error[E0308]: mismatched types LL | fn main() { | - expected `()` because of default return type ... -LL | / Foo { //~ ERROR mismatched types -LL | | x: x //~ ERROR cannot find value `x` in this scope -LL | | } => {} //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `=>` +LL | / Foo { +LL | | x: x +LL | | } => {} | |_________^ expected (), found struct `Foo` | = note: expected type `()` diff --git a/src/test/ui/parser/struct-literal-in-while.stderr b/src/test/ui/parser/struct-literal-in-while.stderr index 9a6ab81e7c0..8a130f441a3 100644 --- a/src/test/ui/parser/struct-literal-in-while.stderr +++ b/src/test/ui/parser/struct-literal-in-while.stderr @@ -1,25 +1,25 @@ error: expected type, found `3` --> $DIR/struct-literal-in-while.rs:13:12 | -LL | x: 3 //~ ERROR expected type, found `3` +LL | x: 3 | ^ expecting a type here because of type ascription error: expected one of `.`, `;`, `?`, `}`, or an operator, found `{` --> $DIR/struct-literal-in-while.rs:14:12 | -LL | }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{` +LL | }.hi() { | ^ expected one of `.`, `;`, `?`, `}`, or an operator here error[E0423]: expected value, found struct `Foo` --> $DIR/struct-literal-in-while.rs:12:11 | -LL | while Foo { //~ ERROR expected value, found struct `Foo` +LL | while Foo { | ^^^ did you mean `(Foo { /* fields */ })`? error[E0599]: no method named `hi` found for type `()` in the current scope --> $DIR/struct-literal-in-while.rs:14:7 | -LL | }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{` +LL | }.hi() { | ^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr b/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr index 2303df93810..3505d00b64b 100644 --- a/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr +++ b/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr @@ -1,25 +1,25 @@ error: expected type, found `3` --> $DIR/struct-literal-restrictions-in-lamda.rs:13:12 | -LL | x: 3 //~ ERROR expected type, found `3` +LL | x: 3 | ^ expecting a type here because of type ascription error: expected one of `.`, `;`, `?`, `}`, or an operator, found `{` --> $DIR/struct-literal-restrictions-in-lamda.rs:14:12 | -LL | }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{` +LL | }.hi() { | ^ expected one of `.`, `;`, `?`, `}`, or an operator here error[E0423]: expected value, found struct `Foo` --> $DIR/struct-literal-restrictions-in-lamda.rs:12:14 | -LL | while || Foo { //~ ERROR expected value, found struct `Foo` +LL | while || Foo { | ^^^ did you mean `(Foo { /* fields */ })`? error[E0599]: no method named `hi` found for type `()` in the current scope --> $DIR/struct-literal-restrictions-in-lamda.rs:14:7 | -LL | }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{` +LL | }.hi() { | ^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/parser/tag-variant-disr-non-nullary.stderr b/src/test/ui/parser/tag-variant-disr-non-nullary.stderr index cc6312b4545..884e9672cb1 100644 --- a/src/test/ui/parser/tag-variant-disr-non-nullary.stderr +++ b/src/test/ui/parser/tag-variant-disr-non-nullary.stderr @@ -3,7 +3,7 @@ error: discriminator values can only be used with a field-less enum | LL | Red = 0xff0000, | ^^^^^^^^ only valid in field-less enums -LL | //~^ ERROR discriminator values can only be used with a field-less enum +LL | LL | Green = 0x00ff00, | ^^^^^^^^ only valid in field-less enums LL | Blue = 0x0000ff, diff --git a/src/test/ui/parser/trait-bounds-not-on-impl.stderr b/src/test/ui/parser/trait-bounds-not-on-impl.stderr index 3c0346c96b2..a712f68044e 100644 --- a/src/test/ui/parser/trait-bounds-not-on-impl.stderr +++ b/src/test/ui/parser/trait-bounds-not-on-impl.stderr @@ -1,7 +1,7 @@ error: expected a trait, found type --> $DIR/trait-bounds-not-on-impl.rs:8:6 | -LL | impl Foo + Owned for Bar { //~ ERROR expected a trait, found type +LL | impl Foo + Owned for Bar { | ^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/parser/trait-object-lifetime-parens.stderr b/src/test/ui/parser/trait-object-lifetime-parens.stderr index 94ca66aef72..084e6d5b11f 100644 --- a/src/test/ui/parser/trait-object-lifetime-parens.stderr +++ b/src/test/ui/parser/trait-object-lifetime-parens.stderr @@ -1,19 +1,19 @@ error: parenthesized lifetime bounds are not supported --> $DIR/trait-object-lifetime-parens.rs:5:21 | -LL | fn f<'a, T: Trait + ('a)>() {} //~ ERROR parenthesized lifetime bounds are not supported +LL | fn f<'a, T: Trait + ('a)>() {} | ^^^^ help: remove the parentheses error: parenthesized lifetime bounds are not supported --> $DIR/trait-object-lifetime-parens.rs:8:24 | -LL | let _: Box; //~ ERROR parenthesized lifetime bounds are not supported +LL | let _: Box; | ^^^^ help: remove the parentheses error: expected type, found `'a` --> $DIR/trait-object-lifetime-parens.rs:9:17 | -LL | let _: Box<('a) + Trait>; //~ ERROR expected type, found `'a` +LL | let _: Box<('a) + Trait>; | - ^^ | | | while parsing the type for `_` diff --git a/src/test/ui/parser/unclosed-braces.stderr b/src/test/ui/parser/unclosed-braces.stderr index 3ab366446d8..44c7e930a3a 100644 --- a/src/test/ui/parser/unclosed-braces.stderr +++ b/src/test/ui/parser/unclosed-braces.stderr @@ -10,7 +10,7 @@ LL | { LL | } | - ...as it matches this but it has different indentation ... -LL | //~ ERROR this file contains an un-closed delimiter +LL | | ^ error: aborting due to previous error diff --git a/src/test/ui/parser/underscore-suffix-for-float.stderr b/src/test/ui/parser/underscore-suffix-for-float.stderr index 58adcbbba76..a5f3b6551aa 100644 --- a/src/test/ui/parser/underscore-suffix-for-float.stderr +++ b/src/test/ui/parser/underscore-suffix-for-float.stderr @@ -1,13 +1,13 @@ error: expected identifier, found reserved identifier `_` --> $DIR/underscore-suffix-for-float.rs:2:16 | -LL | let a = 42._; //~ ERROR expected identifier, found reserved identifier `_` +LL | let a = 42._; | ^ expected identifier, found reserved identifier error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/underscore-suffix-for-float.rs:2:16 | -LL | let a = 42._; //~ ERROR expected identifier, found reserved identifier `_` +LL | let a = 42._; | ^ error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/underscore_static.stderr b/src/test/ui/parser/underscore_static.stderr index 3bf3ce88a63..4c41afdc3f0 100644 --- a/src/test/ui/parser/underscore_static.stderr +++ b/src/test/ui/parser/underscore_static.stderr @@ -1,7 +1,7 @@ error: expected identifier, found reserved identifier `_` --> $DIR/underscore_static.rs:1:8 | -LL | static _: () = (); //~ ERROR expected identifier, found reserved identifier `_` +LL | static _: () = (); | ^ expected identifier, found reserved identifier error: aborting due to previous error diff --git a/src/test/ui/parser/unmatched-delimiter-at-end-of-file.stderr b/src/test/ui/parser/unmatched-delimiter-at-end-of-file.stderr index 442837e5808..bfbdb0363ef 100644 --- a/src/test/ui/parser/unmatched-delimiter-at-end-of-file.stderr +++ b/src/test/ui/parser/unmatched-delimiter-at-end-of-file.stderr @@ -1,7 +1,7 @@ error: this file contains an un-closed delimiter --> $DIR/unmatched-delimiter-at-end-of-file.rs:11:64 | -LL | fn foo() { //~ ERROR this file contains an un-closed delimiter +LL | fn foo() { | - un-closed delimiter ^ error: aborting due to previous error diff --git a/src/test/ui/parser/unsized2.stderr b/src/test/ui/parser/unsized2.stderr index fd12d86144c..17e39b29200 100644 --- a/src/test/ui/parser/unsized2.stderr +++ b/src/test/ui/parser/unsized2.stderr @@ -1,7 +1,7 @@ error: expected expression, found keyword `type` --> $DIR/unsized2.rs:6:7 | -LL | f(); //~ ERROR expected expression, found keyword `type` +LL | f(); | ^^^^ expected expression error: aborting due to previous error diff --git a/src/test/ui/parser/use-as-where-use-ends-with-mod-sep.stderr b/src/test/ui/parser/use-as-where-use-ends-with-mod-sep.stderr index 51e1a02cbd7..36917523555 100644 --- a/src/test/ui/parser/use-as-where-use-ends-with-mod-sep.stderr +++ b/src/test/ui/parser/use-as-where-use-ends-with-mod-sep.stderr @@ -1,17 +1,17 @@ error: expected identifier, found keyword `as` --> $DIR/use-as-where-use-ends-with-mod-sep.rs:3:16 | -LL | use std::any:: as foo; //~ ERROR expected identifier, found keyword `as` +LL | use std::any:: as foo; | ^^ expected identifier, found keyword help: you can escape reserved keywords to use them as identifiers | -LL | use std::any:: r#as foo; //~ ERROR expected identifier, found keyword `as` +LL | use std::any:: r#as foo; | ^^^^ error: expected one of `::`, `;`, or `as`, found `foo` --> $DIR/use-as-where-use-ends-with-mod-sep.rs:3:19 | -LL | use std::any:: as foo; //~ ERROR expected identifier, found keyword `as` +LL | use std::any:: as foo; | ^^^ expected one of `::`, `;`, or `as` here error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/use-ends-with-mod-sep.stderr b/src/test/ui/parser/use-ends-with-mod-sep.stderr index 4a2b95ada6d..bd0d881a06c 100644 --- a/src/test/ui/parser/use-ends-with-mod-sep.stderr +++ b/src/test/ui/parser/use-ends-with-mod-sep.stderr @@ -1,7 +1,7 @@ error: expected identifier, found `;` --> $DIR/use-ends-with-mod-sep.rs:1:15 | -LL | use std::any::; //~ ERROR expected identifier, found `;` +LL | use std::any::; | ^ expected identifier error: aborting due to previous error diff --git a/src/test/ui/partialeq_help.stderr b/src/test/ui/partialeq_help.stderr index 04eb9770c46..9021bd30a77 100644 --- a/src/test/ui/partialeq_help.stderr +++ b/src/test/ui/partialeq_help.stderr @@ -1,7 +1,7 @@ error[E0277]: can't compare `&T` with `T` --> $DIR/partialeq_help.rs:2:7 | -LL | a == b; //~ ERROR E0277 +LL | a == b; | ^^ no implementation for `&T == T` | = help: the trait `std::cmp::PartialEq` is not implemented for `&T` diff --git a/src/test/ui/path-lookahead.stderr b/src/test/ui/path-lookahead.stderr index 73c6884679d..50593e45230 100644 --- a/src/test/ui/path-lookahead.stderr +++ b/src/test/ui/path-lookahead.stderr @@ -1,7 +1,7 @@ warning: unnecessary parentheses around `return` value --> $DIR/path-lookahead.rs:8:10 | -LL | return (::to_string(&arg)); //~WARN unnecessary parentheses around `return` value +LL | return (::to_string(&arg)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses | note: lint level defined here @@ -14,7 +14,7 @@ LL | #![warn(unused)] warning: function is never used: `with_parens` --> $DIR/path-lookahead.rs:7:1 | -LL | fn with_parens(arg: T) -> String { //~WARN function is never used: `with_parens` +LL | fn with_parens(arg: T) -> String { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here @@ -27,6 +27,6 @@ LL | #![warn(unused)] warning: function is never used: `no_parens` --> $DIR/path-lookahead.rs:11:1 | -LL | fn no_parens(arg: T) -> String { //~WARN function is never used: `no_parens` +LL | fn no_parens(arg: T) -> String { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/pattern/deny-irrefutable-let-patterns.stderr b/src/test/ui/pattern/deny-irrefutable-let-patterns.stderr index ad8cc2ef897..b32cf8cbb0e 100644 --- a/src/test/ui/pattern/deny-irrefutable-let-patterns.stderr +++ b/src/test/ui/pattern/deny-irrefutable-let-patterns.stderr @@ -1,7 +1,7 @@ error: irrefutable if-let pattern --> $DIR/deny-irrefutable-let-patterns.rs:4:5 | -LL | if let _ = 5 {} //~ ERROR irrefutable if-let pattern +LL | if let _ = 5 {} | ^^^^^^^^^^^^^^^ | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![deny(irrefutable_let_patterns)] error: irrefutable while-let pattern --> $DIR/deny-irrefutable-let-patterns.rs:6:5 | -LL | / while let _ = 5 { //~ ERROR irrefutable while-let pattern +LL | / while let _ = 5 { LL | | break; LL | | } | |_____^ diff --git a/src/test/ui/pattern/pat-shadow-in-nested-binding.stderr b/src/test/ui/pattern/pat-shadow-in-nested-binding.stderr index 7dbe23a8f28..0c5824be95d 100644 --- a/src/test/ui/pattern/pat-shadow-in-nested-binding.stderr +++ b/src/test/ui/pattern/pat-shadow-in-nested-binding.stderr @@ -4,7 +4,7 @@ error[E0530]: let bindings cannot shadow tuple structs LL | struct foo(usize); | ------------------ the tuple struct `foo` is defined here ... -LL | let (foo, _) = (2, 3); //~ ERROR let bindings cannot shadow tuple structs +LL | let (foo, _) = (2, 3); | ^^^ cannot be named the same as a tuple struct error: aborting due to previous error diff --git a/src/test/ui/pattern/pat-tuple-bad-type.stderr b/src/test/ui/pattern/pat-tuple-bad-type.stderr index 28aa52856c5..84b9a622431 100644 --- a/src/test/ui/pattern/pat-tuple-bad-type.stderr +++ b/src/test/ui/pattern/pat-tuple-bad-type.stderr @@ -4,7 +4,7 @@ error[E0282]: type annotations needed LL | let x; | - consider giving `x` a type ... -LL | (..) => {} //~ ERROR type annotations needed +LL | (..) => {} | ^^^^ cannot infer type | = note: type must be known at this point @@ -12,7 +12,7 @@ LL | (..) => {} //~ ERROR type annotations needed error[E0308]: mismatched types --> $DIR/pat-tuple-bad-type.rs:10:9 | -LL | (..) => {} //~ ERROR mismatched types +LL | (..) => {} | ^^^^ expected u8, found () | = note: expected type `u8` diff --git a/src/test/ui/pattern/pat-tuple-overfield.stderr b/src/test/ui/pattern/pat-tuple-overfield.stderr index 4bd374affb3..9bf14e15fce 100644 --- a/src/test/ui/pattern/pat-tuple-overfield.stderr +++ b/src/test/ui/pattern/pat-tuple-overfield.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/pat-tuple-overfield.rs:5:9 | -LL | (1, 2, 3, 4) => {} //~ ERROR mismatched types +LL | (1, 2, 3, 4) => {} | ^^^^^^^^^^^^ expected a tuple with 3 elements, found one with 4 elements | = note: expected type `({integer}, {integer}, {integer})` @@ -10,7 +10,7 @@ LL | (1, 2, 3, 4) => {} //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/pat-tuple-overfield.rs:6:9 | -LL | (1, 2, .., 3, 4) => {} //~ ERROR mismatched types +LL | (1, 2, .., 3, 4) => {} | ^^^^^^^^^^^^^^^^ expected a tuple with 3 elements, found one with 4 elements | = note: expected type `({integer}, {integer}, {integer})` diff --git a/src/test/ui/pattern/patkind-litrange-no-expr.stderr b/src/test/ui/pattern/patkind-litrange-no-expr.stderr index 4caafa7d3e8..7474d326793 100644 --- a/src/test/ui/pattern/patkind-litrange-no-expr.stderr +++ b/src/test/ui/pattern/patkind-litrange-no-expr.stderr @@ -1,13 +1,13 @@ error: arbitrary expressions aren't allowed in patterns --> $DIR/patkind-litrange-no-expr.rs:20:13 | -LL | Arith = 1 + 1, //~ ERROR arbitrary expressions aren't allowed in patterns +LL | Arith = 1 + 1, | ^^^^^ error[E0029]: only char and numeric types are allowed in range patterns --> $DIR/patkind-litrange-no-expr.rs:20:13 | -LL | Arith = 1 + 1, //~ ERROR arbitrary expressions aren't allowed in patterns +LL | Arith = 1 + 1, | ^^^^^ ranges require char or numeric types | = note: start type: {integer} diff --git a/src/test/ui/pattern/pattern-binding-disambiguation.stderr b/src/test/ui/pattern/pattern-binding-disambiguation.stderr index 958934c301f..faa0d7c3074 100644 --- a/src/test/ui/pattern/pattern-binding-disambiguation.stderr +++ b/src/test/ui/pattern/pattern-binding-disambiguation.stderr @@ -4,7 +4,7 @@ error[E0530]: match bindings cannot shadow tuple structs LL | struct TupleStruct(); | --------------------- the tuple struct `TupleStruct` is defined here ... -LL | TupleStruct => {} //~ ERROR match bindings cannot shadow tuple structs +LL | TupleStruct => {} | ^^^^^^^^^^^ cannot be named the same as a tuple struct error[E0530]: match bindings cannot shadow tuple variants @@ -13,7 +13,7 @@ error[E0530]: match bindings cannot shadow tuple variants LL | use E::*; | ---- the tuple variant `TupleVariant` is imported here ... -LL | TupleVariant => {} //~ ERROR match bindings cannot shadow tuple variants +LL | TupleVariant => {} | ^^^^^^^^^^^^ cannot be named the same as a tuple variant error[E0530]: match bindings cannot shadow struct variants @@ -22,7 +22,7 @@ error[E0530]: match bindings cannot shadow struct variants LL | use E::*; | ---- the struct variant `BracedVariant` is imported here ... -LL | BracedVariant => {} //~ ERROR match bindings cannot shadow struct variants +LL | BracedVariant => {} | ^^^^^^^^^^^^^ cannot be named the same as a struct variant error[E0530]: match bindings cannot shadow statics @@ -31,7 +31,7 @@ error[E0530]: match bindings cannot shadow statics LL | static STATIC: () = (); | ----------------------- the static `STATIC` is defined here ... -LL | STATIC => {} //~ ERROR match bindings cannot shadow statics +LL | STATIC => {} | ^^^^^^ cannot be named the same as a static error[E0530]: let bindings cannot shadow tuple structs @@ -40,7 +40,7 @@ error[E0530]: let bindings cannot shadow tuple structs LL | struct TupleStruct(); | --------------------- the tuple struct `TupleStruct` is defined here ... -LL | let TupleStruct = doesnt_matter; //~ ERROR let bindings cannot shadow tuple structs +LL | let TupleStruct = doesnt_matter; | ^^^^^^^^^^^ cannot be named the same as a tuple struct error[E0530]: let bindings cannot shadow tuple variants @@ -49,7 +49,7 @@ error[E0530]: let bindings cannot shadow tuple variants LL | use E::*; | ---- the tuple variant `TupleVariant` is imported here ... -LL | let TupleVariant = doesnt_matter; //~ ERROR let bindings cannot shadow tuple variants +LL | let TupleVariant = doesnt_matter; | ^^^^^^^^^^^^ cannot be named the same as a tuple variant error[E0530]: let bindings cannot shadow struct variants @@ -58,7 +58,7 @@ error[E0530]: let bindings cannot shadow struct variants LL | use E::*; | ---- the struct variant `BracedVariant` is imported here ... -LL | let BracedVariant = doesnt_matter; //~ ERROR let bindings cannot shadow struct variants +LL | let BracedVariant = doesnt_matter; | ^^^^^^^^^^^^^ cannot be named the same as a struct variant error[E0530]: let bindings cannot shadow statics @@ -67,7 +67,7 @@ error[E0530]: let bindings cannot shadow statics LL | static STATIC: () = (); | ----------------------- the static `STATIC` is defined here ... -LL | let STATIC = doesnt_matter; //~ ERROR let bindings cannot shadow statics +LL | let STATIC = doesnt_matter; | ^^^^^^ cannot be named the same as a static error: aborting due to 8 previous errors diff --git a/src/test/ui/pattern/pattern-error-continue.stderr b/src/test/ui/pattern/pattern-error-continue.stderr index 654814afcfe..11e0c31cfa6 100644 --- a/src/test/ui/pattern/pattern-error-continue.stderr +++ b/src/test/ui/pattern/pattern-error-continue.stderr @@ -1,13 +1,13 @@ error[E0433]: failed to resolve: use of undeclared type or module `E` --> $DIR/pattern-error-continue.rs:35:9 | -LL | E::V => {} //~ ERROR failed to resolve: use of undeclared type or module `E` +LL | E::V => {} | ^ use of undeclared type or module `E` error[E0532]: expected tuple struct/variant, found unit variant `A::D` --> $DIR/pattern-error-continue.rs:18:9 | -LL | A::D(_) => (), //~ ERROR expected tuple struct/variant, found unit variant `A::D` +LL | A::D(_) => (), | ^^^- | | | help: a tuple variant with a similar name exists: `B` @@ -15,7 +15,7 @@ LL | A::D(_) => (), //~ ERROR expected tuple struct/variant, found error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields --> $DIR/pattern-error-continue.rs:17:9 | -LL | A::B(_, _, _) => (), //~ ERROR this pattern has 3 fields, but +LL | A::B(_, _, _) => (), | ^^^^^^^^^^^^^ expected 2 fields, found 3 error[E0308]: mismatched types diff --git a/src/test/ui/pattern/pattern-ident-path-generics.stderr b/src/test/ui/pattern/pattern-ident-path-generics.stderr index 278b3d19d8b..bfc10c5f866 100644 --- a/src/test/ui/pattern/pattern-ident-path-generics.stderr +++ b/src/test/ui/pattern/pattern-ident-path-generics.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/pattern-ident-path-generics.rs:3:9 | -LL | None:: => {} //~ ERROR mismatched types +LL | None:: => {} | ^^^^^^^^^^^^^ expected &str, found isize | = note: expected type `std::option::Option<&str>` diff --git a/src/test/ui/pattern/pattern-tyvar.stderr b/src/test/ui/pattern/pattern-tyvar.stderr index 69cd552aabd..54834703467 100644 --- a/src/test/ui/pattern/pattern-tyvar.stderr +++ b/src/test/ui/pattern/pattern-tyvar.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | match t { | - this match expression has type `std::option::Option>` -LL | Bar::T1(_, Some::(x)) => { //~ ERROR mismatched types +LL | Bar::T1(_, Some::(x)) => { | ^^^^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found isize | = note: expected type `std::option::Option>` diff --git a/src/test/ui/pattern/slice-pattern-const-2.stderr b/src/test/ui/pattern/slice-pattern-const-2.stderr index 95651ccc401..e2c408a90e4 100644 --- a/src/test/ui/pattern/slice-pattern-const-2.stderr +++ b/src/test/ui/pattern/slice-pattern-const-2.stderr @@ -1,7 +1,7 @@ error: unreachable pattern --> $DIR/slice-pattern-const-2.rs:9:9 | -LL | [4, 5, 6, 7] => (), //~ ERROR unreachable pattern +LL | [4, 5, 6, 7] => (), | ^^^^^^^^^^^^ | note: lint level defined here @@ -13,13 +13,13 @@ LL | #![deny(unreachable_patterns)] error: unreachable pattern --> $DIR/slice-pattern-const-2.rs:15:9 | -LL | [4, 5, 6, 7] => (), //~ ERROR unreachable pattern +LL | [4, 5, 6, 7] => (), | ^^^^^^^^^^^^ error: unreachable pattern --> $DIR/slice-pattern-const-2.rs:28:9 | -LL | FOO => (), //~ ERROR unreachable pattern +LL | FOO => (), | ^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/pattern/slice-pattern-const-3.stderr b/src/test/ui/pattern/slice-pattern-const-3.stderr index 531bbbc84d0..eab4fc3f086 100644 --- a/src/test/ui/pattern/slice-pattern-const-3.stderr +++ b/src/test/ui/pattern/slice-pattern-const-3.stderr @@ -1,7 +1,7 @@ error: unreachable pattern --> $DIR/slice-pattern-const-3.rs:28:9 | -LL | FOO => (), //~ ERROR unreachable pattern +LL | FOO => (), | ^^^ | note: lint level defined here diff --git a/src/test/ui/pattern/slice-pattern-const.stderr b/src/test/ui/pattern/slice-pattern-const.stderr index 412e0158c01..2dd10a0478a 100644 --- a/src/test/ui/pattern/slice-pattern-const.stderr +++ b/src/test/ui/pattern/slice-pattern-const.stderr @@ -1,7 +1,7 @@ error: unreachable pattern --> $DIR/slice-pattern-const.rs:9:9 | -LL | [84, 69, 83, 84] => (), //~ ERROR unreachable pattern +LL | [84, 69, 83, 84] => (), | ^^^^^^^^^^^^^^^^ | note: lint level defined here @@ -13,43 +13,43 @@ LL | #![deny(unreachable_patterns)] error: unreachable pattern --> $DIR/slice-pattern-const.rs:15:9 | -LL | [84, 69, 83, 84] => (), //~ ERROR unreachable pattern +LL | [84, 69, 83, 84] => (), | ^^^^^^^^^^^^^^^^ error: unreachable pattern --> $DIR/slice-pattern-const.rs:21:9 | -LL | MAGIC_TEST => (), //~ ERROR unreachable pattern +LL | MAGIC_TEST => (), | ^^^^^^^^^^ error: unreachable pattern --> $DIR/slice-pattern-const.rs:28:9 | -LL | FOO => (), //~ ERROR unreachable pattern +LL | FOO => (), | ^^^ error: unreachable pattern --> $DIR/slice-pattern-const.rs:35:9 | -LL | BAR => (), //~ ERROR unreachable pattern +LL | BAR => (), | ^^^ error: unreachable pattern --> $DIR/slice-pattern-const.rs:43:9 | -LL | BOO => (), //~ ERROR unreachable pattern +LL | BOO => (), | ^^^ error: unreachable pattern --> $DIR/slice-pattern-const.rs:44:9 | -LL | b"" => (), //~ ERROR unreachable pattern +LL | b"" => (), | ^^^ error: unreachable pattern --> $DIR/slice-pattern-const.rs:45:9 | -LL | _ => (), //~ ERROR unreachable pattern +LL | _ => (), | ^ error: aborting due to 8 previous errors diff --git a/src/test/ui/point-to-type-err-cause-on-impl-trait-return.stderr b/src/test/ui/point-to-type-err-cause-on-impl-trait-return.stderr index 5ebe00e624f..ee1e36081e7 100644 --- a/src/test/ui/point-to-type-err-cause-on-impl-trait-return.stderr +++ b/src/test/ui/point-to-type-err-cause-on-impl-trait-return.stderr @@ -34,7 +34,7 @@ error[E0308]: mismatched types LL | fn baz() -> impl std::fmt::Display { | ---------------------- expected because this return type... LL | / if false { -LL | | //~^ ERROR mismatched types +LL | | LL | | return 0i32; | | ---- ...is found to be `i32` here LL | | } else { @@ -54,7 +54,7 @@ LL | | 0i32 LL | | } else { LL | | 1u32 | | ^^^^ expected i32, found u32 -LL | | //~^ ERROR if and else have incompatible types +LL | | LL | | } | |_____- if and else have incompatible types | diff --git a/src/test/ui/precise_pointer_size_matching.stderr b/src/test/ui/precise_pointer_size_matching.stderr index a8906a43003..6f0322fd9b9 100644 --- a/src/test/ui/precise_pointer_size_matching.stderr +++ b/src/test/ui/precise_pointer_size_matching.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `$ISIZE_MIN..=-6isize` and `21isize..=$ISIZE_MAX` not covered --> $DIR/precise_pointer_size_matching.rs:24:11 | -LL | match 0isize { //~ ERROR non-exhaustive patterns +LL | match 0isize { | ^^^^^^ patterns `$ISIZE_MIN..=-6isize` and `21isize..=$ISIZE_MAX` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -9,7 +9,7 @@ LL | match 0isize { //~ ERROR non-exhaustive patterns error[E0004]: non-exhaustive patterns: `0usize` and `21usize..=$USIZE_MAX` not covered --> $DIR/precise_pointer_size_matching.rs:29:11 | -LL | match 0usize { //~ ERROR non-exhaustive patterns +LL | match 0usize { | ^^^^^^ patterns `0usize` and `21usize..=$USIZE_MAX` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/prim-with-args.stderr b/src/test/ui/prim-with-args.stderr index 91259e87efc..4535633bc6f 100644 --- a/src/test/ui/prim-with-args.stderr +++ b/src/test/ui/prim-with-args.stderr @@ -1,133 +1,133 @@ error[E0109]: type arguments are not allowed on this entity --> $DIR/prim-with-args.rs:3:14 | -LL | let x: isize; //~ ERROR type arguments are not allowed on this entity +LL | let x: isize; | ^^^^^ type argument not allowed error[E0109]: type arguments are not allowed on this entity --> $DIR/prim-with-args.rs:4:11 | -LL | let x: i8; //~ ERROR type arguments are not allowed on this entity +LL | let x: i8; | ^^^^^ type argument not allowed error[E0109]: type arguments are not allowed on this entity --> $DIR/prim-with-args.rs:5:12 | -LL | let x: i16; //~ ERROR type arguments are not allowed on this entity +LL | let x: i16; | ^^^^^ type argument not allowed error[E0109]: type arguments are not allowed on this entity --> $DIR/prim-with-args.rs:6:12 | -LL | let x: i32; //~ ERROR type arguments are not allowed on this entity +LL | let x: i32; | ^^^^^ type argument not allowed error[E0109]: type arguments are not allowed on this entity --> $DIR/prim-with-args.rs:7:12 | -LL | let x: i64; //~ ERROR type arguments are not allowed on this entity +LL | let x: i64; | ^^^^^ type argument not allowed error[E0109]: type arguments are not allowed on this entity --> $DIR/prim-with-args.rs:8:14 | -LL | let x: usize; //~ ERROR type arguments are not allowed on this entity +LL | let x: usize; | ^^^^^ type argument not allowed error[E0109]: type arguments are not allowed on this entity --> $DIR/prim-with-args.rs:9:11 | -LL | let x: u8; //~ ERROR type arguments are not allowed on this entity +LL | let x: u8; | ^^^^^ type argument not allowed error[E0109]: type arguments are not allowed on this entity --> $DIR/prim-with-args.rs:10:12 | -LL | let x: u16; //~ ERROR type arguments are not allowed on this entity +LL | let x: u16; | ^^^^^ type argument not allowed error[E0109]: type arguments are not allowed on this entity --> $DIR/prim-with-args.rs:11:12 | -LL | let x: u32; //~ ERROR type arguments are not allowed on this entity +LL | let x: u32; | ^^^^^ type argument not allowed error[E0109]: type arguments are not allowed on this entity --> $DIR/prim-with-args.rs:12:12 | -LL | let x: u64; //~ ERROR type arguments are not allowed on this entity +LL | let x: u64; | ^^^^^ type argument not allowed error[E0109]: type arguments are not allowed on this entity --> $DIR/prim-with-args.rs:13:13 | -LL | let x: char; //~ ERROR type arguments are not allowed on this entity +LL | let x: char; | ^^^^^ type argument not allowed error[E0110]: lifetime arguments are not allowed on this entity --> $DIR/prim-with-args.rs:15:14 | -LL | let x: isize<'static>; //~ ERROR lifetime arguments are not allowed on this entity +LL | let x: isize<'static>; | ^^^^^^^ lifetime argument not allowed error[E0110]: lifetime arguments are not allowed on this entity --> $DIR/prim-with-args.rs:16:11 | -LL | let x: i8<'static>; //~ ERROR lifetime arguments are not allowed on this entity +LL | let x: i8<'static>; | ^^^^^^^ lifetime argument not allowed error[E0110]: lifetime arguments are not allowed on this entity --> $DIR/prim-with-args.rs:17:12 | -LL | let x: i16<'static>; //~ ERROR lifetime arguments are not allowed on this entity +LL | let x: i16<'static>; | ^^^^^^^ lifetime argument not allowed error[E0110]: lifetime arguments are not allowed on this entity --> $DIR/prim-with-args.rs:18:12 | -LL | let x: i32<'static>; //~ ERROR lifetime arguments are not allowed on this entity +LL | let x: i32<'static>; | ^^^^^^^ lifetime argument not allowed error[E0110]: lifetime arguments are not allowed on this entity --> $DIR/prim-with-args.rs:19:12 | -LL | let x: i64<'static>; //~ ERROR lifetime arguments are not allowed on this entity +LL | let x: i64<'static>; | ^^^^^^^ lifetime argument not allowed error[E0110]: lifetime arguments are not allowed on this entity --> $DIR/prim-with-args.rs:20:14 | -LL | let x: usize<'static>; //~ ERROR lifetime arguments are not allowed on this entity +LL | let x: usize<'static>; | ^^^^^^^ lifetime argument not allowed error[E0110]: lifetime arguments are not allowed on this entity --> $DIR/prim-with-args.rs:21:11 | -LL | let x: u8<'static>; //~ ERROR lifetime arguments are not allowed on this entity +LL | let x: u8<'static>; | ^^^^^^^ lifetime argument not allowed error[E0110]: lifetime arguments are not allowed on this entity --> $DIR/prim-with-args.rs:22:12 | -LL | let x: u16<'static>; //~ ERROR lifetime arguments are not allowed on this entity +LL | let x: u16<'static>; | ^^^^^^^ lifetime argument not allowed error[E0110]: lifetime arguments are not allowed on this entity --> $DIR/prim-with-args.rs:23:12 | -LL | let x: u32<'static>; //~ ERROR lifetime arguments are not allowed on this entity +LL | let x: u32<'static>; | ^^^^^^^ lifetime argument not allowed error[E0110]: lifetime arguments are not allowed on this entity --> $DIR/prim-with-args.rs:24:12 | -LL | let x: u64<'static>; //~ ERROR lifetime arguments are not allowed on this entity +LL | let x: u64<'static>; | ^^^^^^^ lifetime argument not allowed error[E0110]: lifetime arguments are not allowed on this entity --> $DIR/prim-with-args.rs:25:13 | -LL | let x: char<'static>; //~ ERROR lifetime arguments are not allowed on this entity +LL | let x: char<'static>; | ^^^^^^^ lifetime argument not allowed error: aborting due to 22 previous errors diff --git a/src/test/ui/priv-in-bad-locations.stderr b/src/test/ui/priv-in-bad-locations.stderr index 09706a6d255..713568f879d 100644 --- a/src/test/ui/priv-in-bad-locations.stderr +++ b/src/test/ui/priv-in-bad-locations.stderr @@ -1,7 +1,7 @@ error[E0449]: unnecessary visibility qualifier --> $DIR/priv-in-bad-locations.rs:1:1 | -LL | pub extern { //~ ERROR unnecessary visibility qualifier +LL | pub extern { | ^^^ `pub` not permitted here because it's implied | = note: place qualifiers on individual foreign items instead @@ -9,7 +9,7 @@ LL | pub extern { //~ ERROR unnecessary visibility qualifier error[E0449]: unnecessary visibility qualifier --> $DIR/priv-in-bad-locations.rs:11:1 | -LL | pub impl B {} //~ ERROR unnecessary visibility qualifier +LL | pub impl B {} | ^^^ `pub` not permitted here because it's implied | = note: place qualifiers on individual impl items instead @@ -17,13 +17,13 @@ LL | pub impl B {} //~ ERROR unnecessary visibility qualifier error[E0449]: unnecessary visibility qualifier --> $DIR/priv-in-bad-locations.rs:13:1 | -LL | pub impl A for B { //~ ERROR unnecessary visibility qualifier +LL | pub impl A for B { | ^^^ `pub` not permitted here because it's implied error[E0449]: unnecessary visibility qualifier --> $DIR/priv-in-bad-locations.rs:14:5 | -LL | pub fn foo(&self) {} //~ ERROR unnecessary visibility qualifier +LL | pub fn foo(&self) {} | ^^^ `pub` not permitted here because it's implied error: aborting due to 4 previous errors diff --git a/src/test/ui/privacy/decl-macro.stderr b/src/test/ui/privacy/decl-macro.stderr index c8b043d1b5f..230cf95de62 100644 --- a/src/test/ui/privacy/decl-macro.stderr +++ b/src/test/ui/privacy/decl-macro.stderr @@ -1,7 +1,7 @@ error[E0603]: macro `mac` is private --> $DIR/decl-macro.rs:8:8 | -LL | m::mac!(); //~ ERROR macro `mac` is private +LL | m::mac!(); | ^^^ error: aborting due to previous error diff --git a/src/test/ui/privacy/privacy-in-paths.stderr b/src/test/ui/privacy/privacy-in-paths.stderr index 563aaec89aa..4b9faca0457 100644 --- a/src/test/ui/privacy/privacy-in-paths.stderr +++ b/src/test/ui/privacy/privacy-in-paths.stderr @@ -1,19 +1,19 @@ error[E0603]: module `bar` is private --> $DIR/privacy-in-paths.rs:24:16 | -LL | ::foo::bar::baz::f(); //~ERROR module `bar` is private +LL | ::foo::bar::baz::f(); | ^^^ error[E0603]: module `bar` is private --> $DIR/privacy-in-paths.rs:25:16 | -LL | ::foo::bar::S::f(); //~ERROR module `bar` is private +LL | ::foo::bar::S::f(); | ^^^ error[E0603]: trait `T` is private --> $DIR/privacy-in-paths.rs:26:23 | -LL | <() as ::foo::T>::Assoc::f(); //~ERROR trait `T` is private +LL | <() as ::foo::T>::Assoc::f(); | ^ error: aborting due to 3 previous errors diff --git a/src/test/ui/privacy/privacy-ns1.stderr b/src/test/ui/privacy/privacy-ns1.stderr index 6ba2dbe41a2..07b013be725 100644 --- a/src/test/ui/privacy/privacy-ns1.stderr +++ b/src/test/ui/privacy/privacy-ns1.stderr @@ -1,11 +1,11 @@ error[E0423]: expected function, found trait `Bar` --> $DIR/privacy-ns1.rs:20:5 | -LL | Bar(); //~ ERROR expected function, found trait `Bar` +LL | Bar(); | ^^^ help: a unit struct with a similar name exists | -LL | Baz(); //~ ERROR expected function, found trait `Bar` +LL | Baz(); | ^^^ help: possible better candidates are found in other modules, you can import them into scope | @@ -19,11 +19,11 @@ LL | use foo3::Bar; error[E0573]: expected type, found function `Bar` --> $DIR/privacy-ns1.rs:35:17 | -LL | let _x: Box; //~ ERROR expected type, found function `Bar` +LL | let _x: Box; | ^^^ help: a struct with a similar name exists | -LL | let _x: Box; //~ ERROR expected type, found function `Bar` +LL | let _x: Box; | ^^^ help: possible better candidates are found in other modules, you can import them into scope | @@ -37,11 +37,11 @@ LL | use foo3::Bar; error[E0425]: cannot find function `Bar` in this scope --> $DIR/privacy-ns1.rs:50:5 | -LL | Bar(); //~ ERROR cannot find function `Bar` in this scope +LL | Bar(); | ^^^ help: a unit struct with a similar name exists | -LL | Baz(); //~ ERROR cannot find function `Bar` in this scope +LL | Baz(); | ^^^ help: possible candidates are found in other modules, you can import them into scope | @@ -55,11 +55,11 @@ LL | use foo3::Bar; error[E0412]: cannot find type `Bar` in this scope --> $DIR/privacy-ns1.rs:51:17 | -LL | let _x: Box; //~ ERROR cannot find type `Bar` in this scope +LL | let _x: Box; | ^^^ help: a struct with a similar name exists | -LL | let _x: Box; //~ ERROR cannot find type `Bar` in this scope +LL | let _x: Box; | ^^^ help: possible candidates are found in other modules, you can import them into scope | diff --git a/src/test/ui/privacy/privacy-ns2.stderr b/src/test/ui/privacy/privacy-ns2.stderr index 0012072ed11..cd5b5369064 100644 --- a/src/test/ui/privacy/privacy-ns2.stderr +++ b/src/test/ui/privacy/privacy-ns2.stderr @@ -1,7 +1,7 @@ error[E0423]: expected function, found trait `Bar` --> $DIR/privacy-ns2.rs:20:5 | -LL | Bar(); //~ ERROR expected function, found trait `Bar` +LL | Bar(); | ^^^ not a function help: possible better candidates are found in other modules, you can import them into scope | @@ -15,11 +15,11 @@ LL | use foo3::Bar; error[E0423]: expected function, found trait `Bar` --> $DIR/privacy-ns2.rs:26:5 | -LL | Bar(); //~ ERROR expected function, found trait `Bar` +LL | Bar(); | ^^^ help: a unit struct with a similar name exists | -LL | Baz(); //~ ERROR expected function, found trait `Bar` +LL | Baz(); | ^^^ help: possible better candidates are found in other modules, you can import them into scope | @@ -33,7 +33,7 @@ LL | use foo3::Bar; error[E0573]: expected type, found function `Bar` --> $DIR/privacy-ns2.rs:41:18 | -LL | let _x : Box; //~ ERROR expected type, found function `Bar` +LL | let _x : Box; | ^^^ not a type help: possible better candidates are found in other modules, you can import them into scope | @@ -47,11 +47,11 @@ LL | use foo3::Bar; error[E0573]: expected type, found function `Bar` --> $DIR/privacy-ns2.rs:47:17 | -LL | let _x: Box; //~ ERROR expected type, found function `Bar` +LL | let _x: Box; | ^^^ help: a struct with a similar name exists | -LL | let _x: Box; //~ ERROR expected type, found function `Bar` +LL | let _x: Box; | ^^^ help: possible better candidates are found in other modules, you can import them into scope | @@ -65,19 +65,19 @@ LL | use foo3::Bar; error[E0603]: trait `Bar` is private --> $DIR/privacy-ns2.rs:60:15 | -LL | use foo3::Bar; //~ ERROR `Bar` is private +LL | use foo3::Bar; | ^^^ error[E0603]: trait `Bar` is private --> $DIR/privacy-ns2.rs:64:15 | -LL | use foo3::Bar; //~ ERROR `Bar` is private +LL | use foo3::Bar; | ^^^ error[E0603]: trait `Bar` is private --> $DIR/privacy-ns2.rs:71:16 | -LL | use foo3::{Bar,Baz}; //~ ERROR `Bar` is private +LL | use foo3::{Bar,Baz}; | ^^^ error: aborting due to 7 previous errors diff --git a/src/test/ui/privacy/privacy-sanity.stderr b/src/test/ui/privacy/privacy-sanity.stderr index b1e3127645e..c92553fd1a1 100644 --- a/src/test/ui/privacy/privacy-sanity.stderr +++ b/src/test/ui/privacy/privacy-sanity.stderr @@ -1,31 +1,31 @@ error[E0449]: unnecessary visibility qualifier --> $DIR/privacy-sanity.rs:13:1 | -LL | pub impl Tr for S { //~ ERROR unnecessary visibility qualifier +LL | pub impl Tr for S { | ^^^ `pub` not permitted here because it's implied error[E0449]: unnecessary visibility qualifier --> $DIR/privacy-sanity.rs:14:5 | -LL | pub fn f() {} //~ ERROR unnecessary visibility qualifier +LL | pub fn f() {} | ^^^ `pub` not permitted here because it's implied error[E0449]: unnecessary visibility qualifier --> $DIR/privacy-sanity.rs:15:5 | -LL | pub const C: u8 = 0; //~ ERROR unnecessary visibility qualifier +LL | pub const C: u8 = 0; | ^^^ `pub` not permitted here because it's implied error[E0449]: unnecessary visibility qualifier --> $DIR/privacy-sanity.rs:16:5 | -LL | pub type T = u8; //~ ERROR unnecessary visibility qualifier +LL | pub type T = u8; | ^^^ `pub` not permitted here because it's implied error[E0449]: unnecessary visibility qualifier --> $DIR/privacy-sanity.rs:18:1 | -LL | pub impl S { //~ ERROR unnecessary visibility qualifier +LL | pub impl S { | ^^^ `pub` not permitted here because it's implied | = note: place qualifiers on individual impl items instead @@ -33,7 +33,7 @@ LL | pub impl S { //~ ERROR unnecessary visibility qualifier error[E0449]: unnecessary visibility qualifier --> $DIR/privacy-sanity.rs:23:1 | -LL | pub extern "C" { //~ ERROR unnecessary visibility qualifier +LL | pub extern "C" { | ^^^ `pub` not permitted here because it's implied | = note: place qualifiers on individual foreign items instead @@ -41,31 +41,31 @@ LL | pub extern "C" { //~ ERROR unnecessary visibility qualifier error[E0449]: unnecessary visibility qualifier --> $DIR/privacy-sanity.rs:39:5 | -LL | pub impl Tr for S { //~ ERROR unnecessary visibility qualifier +LL | pub impl Tr for S { | ^^^ `pub` not permitted here because it's implied error[E0449]: unnecessary visibility qualifier --> $DIR/privacy-sanity.rs:40:9 | -LL | pub fn f() {} //~ ERROR unnecessary visibility qualifier +LL | pub fn f() {} | ^^^ `pub` not permitted here because it's implied error[E0449]: unnecessary visibility qualifier --> $DIR/privacy-sanity.rs:41:9 | -LL | pub const C: u8 = 0; //~ ERROR unnecessary visibility qualifier +LL | pub const C: u8 = 0; | ^^^ `pub` not permitted here because it's implied error[E0449]: unnecessary visibility qualifier --> $DIR/privacy-sanity.rs:42:9 | -LL | pub type T = u8; //~ ERROR unnecessary visibility qualifier +LL | pub type T = u8; | ^^^ `pub` not permitted here because it's implied error[E0449]: unnecessary visibility qualifier --> $DIR/privacy-sanity.rs:44:5 | -LL | pub impl S { //~ ERROR unnecessary visibility qualifier +LL | pub impl S { | ^^^ `pub` not permitted here because it's implied | = note: place qualifiers on individual impl items instead @@ -73,7 +73,7 @@ LL | pub impl S { //~ ERROR unnecessary visibility qualifier error[E0449]: unnecessary visibility qualifier --> $DIR/privacy-sanity.rs:49:5 | -LL | pub extern "C" { //~ ERROR unnecessary visibility qualifier +LL | pub extern "C" { | ^^^ `pub` not permitted here because it's implied | = note: place qualifiers on individual foreign items instead @@ -81,31 +81,31 @@ LL | pub extern "C" { //~ ERROR unnecessary visibility qualifier error[E0449]: unnecessary visibility qualifier --> $DIR/privacy-sanity.rs:68:5 | -LL | pub impl Tr for S { //~ ERROR unnecessary visibility qualifier +LL | pub impl Tr for S { | ^^^ `pub` not permitted here because it's implied error[E0449]: unnecessary visibility qualifier --> $DIR/privacy-sanity.rs:69:9 | -LL | pub fn f() {} //~ ERROR unnecessary visibility qualifier +LL | pub fn f() {} | ^^^ `pub` not permitted here because it's implied error[E0449]: unnecessary visibility qualifier --> $DIR/privacy-sanity.rs:70:9 | -LL | pub const C: u8 = 0; //~ ERROR unnecessary visibility qualifier +LL | pub const C: u8 = 0; | ^^^ `pub` not permitted here because it's implied error[E0449]: unnecessary visibility qualifier --> $DIR/privacy-sanity.rs:71:9 | -LL | pub type T = u8; //~ ERROR unnecessary visibility qualifier +LL | pub type T = u8; | ^^^ `pub` not permitted here because it's implied error[E0449]: unnecessary visibility qualifier --> $DIR/privacy-sanity.rs:73:5 | -LL | pub impl S { //~ ERROR unnecessary visibility qualifier +LL | pub impl S { | ^^^ `pub` not permitted here because it's implied | = note: place qualifiers on individual impl items instead @@ -113,7 +113,7 @@ LL | pub impl S { //~ ERROR unnecessary visibility qualifier error[E0449]: unnecessary visibility qualifier --> $DIR/privacy-sanity.rs:78:5 | -LL | pub extern "C" { //~ ERROR unnecessary visibility qualifier +LL | pub extern "C" { | ^^^ `pub` not permitted here because it's implied | = note: place qualifiers on individual foreign items instead diff --git a/src/test/ui/privacy/privacy-ufcs.stderr b/src/test/ui/privacy/privacy-ufcs.stderr index c70afe5061d..6be14df89d2 100644 --- a/src/test/ui/privacy/privacy-ufcs.stderr +++ b/src/test/ui/privacy/privacy-ufcs.stderr @@ -1,7 +1,7 @@ error[E0603]: trait `Bar` is private --> $DIR/privacy-ufcs.rs:12:20 | -LL | ::baz(); //~ERROR trait `Bar` is private +LL | ::baz(); | ^^^ error: aborting due to previous error diff --git a/src/test/ui/privacy/privacy1.stderr b/src/test/ui/privacy/privacy1.stderr index 7feebabe781..73672d1c214 100644 --- a/src/test/ui/privacy/privacy1.stderr +++ b/src/test/ui/privacy/privacy1.stderr @@ -13,55 +13,55 @@ LL | use bar::baz; error[E0603]: module `i` is private --> $DIR/privacy1.rs:164:20 | -LL | use self::foo::i::A; //~ ERROR: module `i` is private +LL | use self::foo::i::A; | ^ error[E0603]: module `baz` is private --> $DIR/privacy1.rs:104:16 | -LL | ::bar::baz::A::foo(); //~ ERROR: module `baz` is private +LL | ::bar::baz::A::foo(); | ^^^ error[E0603]: module `baz` is private --> $DIR/privacy1.rs:105:16 | -LL | ::bar::baz::A::bar(); //~ ERROR: module `baz` is private +LL | ::bar::baz::A::bar(); | ^^^ error[E0603]: module `baz` is private --> $DIR/privacy1.rs:107:16 | -LL | ::bar::baz::A.foo2(); //~ ERROR: module `baz` is private +LL | ::bar::baz::A.foo2(); | ^^^ error[E0603]: module `baz` is private --> $DIR/privacy1.rs:108:16 | -LL | ::bar::baz::A.bar2(); //~ ERROR: module `baz` is private +LL | ::bar::baz::A.bar2(); | ^^^ error[E0603]: trait `B` is private --> $DIR/privacy1.rs:112:16 | -LL | ::bar::B::foo(); //~ ERROR: trait `B` is private +LL | ::bar::B::foo(); | ^ error[E0603]: function `epriv` is private --> $DIR/privacy1.rs:118:20 | -LL | ::bar::epriv(); //~ ERROR: function `epriv` is private +LL | ::bar::epriv(); | ^^^^^ error[E0603]: module `baz` is private --> $DIR/privacy1.rs:127:16 | -LL | ::bar::baz::foo(); //~ ERROR: module `baz` is private +LL | ::bar::baz::foo(); | ^^^ error[E0603]: module `baz` is private --> $DIR/privacy1.rs:128:16 | -LL | ::bar::baz::bar(); //~ ERROR: module `baz` is private +LL | ::bar::baz::bar(); | ^^^ error[E0603]: trait `B` is private @@ -73,31 +73,31 @@ LL | impl ::bar::B for f32 { fn foo() -> f32 { 1.0 } } error[E0624]: method `bar` is private --> $DIR/privacy1.rs:77:9 | -LL | self::baz::A::bar(); //~ ERROR: method `bar` is private +LL | self::baz::A::bar(); | ^^^^^^^^^^^^^^^^^ error[E0624]: method `bar` is private --> $DIR/privacy1.rs:95:5 | -LL | bar::A::bar(); //~ ERROR: method `bar` is private +LL | bar::A::bar(); | ^^^^^^^^^^^ error[E0624]: method `bar` is private --> $DIR/privacy1.rs:102:9 | -LL | ::bar::A::bar(); //~ ERROR: method `bar` is private +LL | ::bar::A::bar(); | ^^^^^^^^^^^^^ error[E0624]: method `bar` is private --> $DIR/privacy1.rs:105:9 | -LL | ::bar::baz::A::bar(); //~ ERROR: module `baz` is private +LL | ::bar::baz::A::bar(); | ^^^^^^^^^^^^^^^^^^ error[E0624]: method `bar2` is private --> $DIR/privacy1.rs:108:23 | -LL | ::bar::baz::A.bar2(); //~ ERROR: module `baz` is private +LL | ::bar::baz::A.bar2(); | ^^^^ error: aborting due to 17 previous errors diff --git a/src/test/ui/privacy/privacy4.stderr b/src/test/ui/privacy/privacy4.stderr index 9e3e48272f9..e4a20f920a0 100644 --- a/src/test/ui/privacy/privacy4.stderr +++ b/src/test/ui/privacy/privacy4.stderr @@ -1,7 +1,7 @@ error[E0603]: module `glob` is private --> $DIR/privacy4.rs:21:14 | -LL | use bar::glob::gpriv; //~ ERROR: module `glob` is private +LL | use bar::glob::gpriv; | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/privacy/privacy5.stderr b/src/test/ui/privacy/privacy5.stderr index cdd9b2cefbb..7568c346b24 100644 --- a/src/test/ui/privacy/privacy5.stderr +++ b/src/test/ui/privacy/privacy5.stderr @@ -1,289 +1,289 @@ error[E0603]: tuple struct `A` is private --> $DIR/privacy5.rs:51:16 | -LL | let a = a::A(()); //~ ERROR tuple struct `A` is private +LL | let a = a::A(()); | ^ error[E0603]: tuple struct `B` is private --> $DIR/privacy5.rs:52:16 | -LL | let b = a::B(2); //~ ERROR tuple struct `B` is private +LL | let b = a::B(2); | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:53:16 | -LL | let c = a::C(2, 3); //~ ERROR tuple struct `C` is private +LL | let c = a::C(2, 3); | ^ error[E0603]: tuple struct `A` is private --> $DIR/privacy5.rs:56:12 | -LL | let a::A(()) = a; //~ ERROR tuple struct `A` is private +LL | let a::A(()) = a; | ^ error[E0603]: tuple struct `A` is private --> $DIR/privacy5.rs:57:12 | -LL | let a::A(_) = a; //~ ERROR tuple struct `A` is private +LL | let a::A(_) = a; | ^ error[E0603]: tuple struct `A` is private --> $DIR/privacy5.rs:58:18 | -LL | match a { a::A(()) => {} } //~ ERROR tuple struct `A` is private +LL | match a { a::A(()) => {} } | ^ error[E0603]: tuple struct `A` is private --> $DIR/privacy5.rs:59:18 | -LL | match a { a::A(_) => {} } //~ ERROR tuple struct `A` is private +LL | match a { a::A(_) => {} } | ^ error[E0603]: tuple struct `B` is private --> $DIR/privacy5.rs:61:12 | -LL | let a::B(_) = b; //~ ERROR tuple struct `B` is private +LL | let a::B(_) = b; | ^ error[E0603]: tuple struct `B` is private --> $DIR/privacy5.rs:62:12 | -LL | let a::B(_b) = b; //~ ERROR tuple struct `B` is private +LL | let a::B(_b) = b; | ^ error[E0603]: tuple struct `B` is private --> $DIR/privacy5.rs:63:18 | -LL | match b { a::B(_) => {} } //~ ERROR tuple struct `B` is private +LL | match b { a::B(_) => {} } | ^ error[E0603]: tuple struct `B` is private --> $DIR/privacy5.rs:64:18 | -LL | match b { a::B(_b) => {} } //~ ERROR tuple struct `B` is private +LL | match b { a::B(_b) => {} } | ^ error[E0603]: tuple struct `B` is private --> $DIR/privacy5.rs:65:18 | -LL | match b { a::B(1) => {} a::B(_) => {} } //~ ERROR tuple struct `B` is private +LL | match b { a::B(1) => {} a::B(_) => {} } | ^ error[E0603]: tuple struct `B` is private --> $DIR/privacy5.rs:65:32 | -LL | match b { a::B(1) => {} a::B(_) => {} } //~ ERROR tuple struct `B` is private +LL | match b { a::B(1) => {} a::B(_) => {} } | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:68:12 | -LL | let a::C(_, _) = c; //~ ERROR tuple struct `C` is private +LL | let a::C(_, _) = c; | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:69:12 | -LL | let a::C(_a, _) = c; //~ ERROR tuple struct `C` is private +LL | let a::C(_a, _) = c; | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:70:12 | -LL | let a::C(_, _b) = c; //~ ERROR tuple struct `C` is private +LL | let a::C(_, _b) = c; | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:71:12 | -LL | let a::C(_a, _b) = c; //~ ERROR tuple struct `C` is private +LL | let a::C(_a, _b) = c; | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:72:18 | -LL | match c { a::C(_, _) => {} } //~ ERROR tuple struct `C` is private +LL | match c { a::C(_, _) => {} } | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:73:18 | -LL | match c { a::C(_a, _) => {} } //~ ERROR tuple struct `C` is private +LL | match c { a::C(_a, _) => {} } | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:74:18 | -LL | match c { a::C(_, _b) => {} } //~ ERROR tuple struct `C` is private +LL | match c { a::C(_, _b) => {} } | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:75:18 | -LL | match c { a::C(_a, _b) => {} } //~ ERROR tuple struct `C` is private +LL | match c { a::C(_a, _b) => {} } | ^ error[E0603]: tuple struct `A` is private --> $DIR/privacy5.rs:83:17 | -LL | let a2 = a::A; //~ ERROR tuple struct `A` is private +LL | let a2 = a::A; | ^ error[E0603]: tuple struct `B` is private --> $DIR/privacy5.rs:84:17 | -LL | let b2 = a::B; //~ ERROR tuple struct `B` is private +LL | let b2 = a::B; | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:85:17 | -LL | let c2 = a::C; //~ ERROR tuple struct `C` is private +LL | let c2 = a::C; | ^ error[E0603]: tuple struct `A` is private --> $DIR/privacy5.rs:90:20 | -LL | let a = other::A(()); //~ ERROR tuple struct `A` is private +LL | let a = other::A(()); | ^ error[E0603]: tuple struct `B` is private --> $DIR/privacy5.rs:91:20 | -LL | let b = other::B(2); //~ ERROR tuple struct `B` is private +LL | let b = other::B(2); | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:92:20 | -LL | let c = other::C(2, 3); //~ ERROR tuple struct `C` is private +LL | let c = other::C(2, 3); | ^ error[E0603]: tuple struct `A` is private --> $DIR/privacy5.rs:95:16 | -LL | let other::A(()) = a; //~ ERROR tuple struct `A` is private +LL | let other::A(()) = a; | ^ error[E0603]: tuple struct `A` is private --> $DIR/privacy5.rs:96:16 | -LL | let other::A(_) = a; //~ ERROR tuple struct `A` is private +LL | let other::A(_) = a; | ^ error[E0603]: tuple struct `A` is private --> $DIR/privacy5.rs:97:22 | -LL | match a { other::A(()) => {} } //~ ERROR tuple struct `A` is private +LL | match a { other::A(()) => {} } | ^ error[E0603]: tuple struct `A` is private --> $DIR/privacy5.rs:98:22 | -LL | match a { other::A(_) => {} } //~ ERROR tuple struct `A` is private +LL | match a { other::A(_) => {} } | ^ error[E0603]: tuple struct `B` is private --> $DIR/privacy5.rs:100:16 | -LL | let other::B(_) = b; //~ ERROR tuple struct `B` is private +LL | let other::B(_) = b; | ^ error[E0603]: tuple struct `B` is private --> $DIR/privacy5.rs:101:16 | -LL | let other::B(_b) = b; //~ ERROR tuple struct `B` is private +LL | let other::B(_b) = b; | ^ error[E0603]: tuple struct `B` is private --> $DIR/privacy5.rs:102:22 | -LL | match b { other::B(_) => {} } //~ ERROR tuple struct `B` is private +LL | match b { other::B(_) => {} } | ^ error[E0603]: tuple struct `B` is private --> $DIR/privacy5.rs:103:22 | -LL | match b { other::B(_b) => {} } //~ ERROR tuple struct `B` is private +LL | match b { other::B(_b) => {} } | ^ error[E0603]: tuple struct `B` is private --> $DIR/privacy5.rs:104:22 | -LL | match b { other::B(1) => {} other::B(_) => {} } //~ ERROR tuple struct `B` is private +LL | match b { other::B(1) => {} other::B(_) => {} } | ^ error[E0603]: tuple struct `B` is private --> $DIR/privacy5.rs:104:40 | -LL | match b { other::B(1) => {} other::B(_) => {} } //~ ERROR tuple struct `B` is private +LL | match b { other::B(1) => {} other::B(_) => {} } | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:107:16 | -LL | let other::C(_, _) = c; //~ ERROR tuple struct `C` is private +LL | let other::C(_, _) = c; | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:108:16 | -LL | let other::C(_a, _) = c; //~ ERROR tuple struct `C` is private +LL | let other::C(_a, _) = c; | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:109:16 | -LL | let other::C(_, _b) = c; //~ ERROR tuple struct `C` is private +LL | let other::C(_, _b) = c; | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:110:16 | -LL | let other::C(_a, _b) = c; //~ ERROR tuple struct `C` is private +LL | let other::C(_a, _b) = c; | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:111:22 | -LL | match c { other::C(_, _) => {} } //~ ERROR tuple struct `C` is private +LL | match c { other::C(_, _) => {} } | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:112:22 | -LL | match c { other::C(_a, _) => {} } //~ ERROR tuple struct `C` is private +LL | match c { other::C(_a, _) => {} } | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:113:22 | -LL | match c { other::C(_, _b) => {} } //~ ERROR tuple struct `C` is private +LL | match c { other::C(_, _b) => {} } | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:114:22 | -LL | match c { other::C(_a, _b) => {} } //~ ERROR tuple struct `C` is private +LL | match c { other::C(_a, _b) => {} } | ^ error[E0603]: tuple struct `A` is private --> $DIR/privacy5.rs:122:21 | -LL | let a2 = other::A; //~ ERROR tuple struct `A` is private +LL | let a2 = other::A; | ^ error[E0603]: tuple struct `B` is private --> $DIR/privacy5.rs:123:21 | -LL | let b2 = other::B; //~ ERROR tuple struct `B` is private +LL | let b2 = other::B; | ^ error[E0603]: tuple struct `C` is private --> $DIR/privacy5.rs:124:21 | -LL | let c2 = other::C; //~ ERROR tuple struct `C` is private +LL | let c2 = other::C; | ^ error: aborting due to 48 previous errors diff --git a/src/test/ui/privacy/private-impl-method.stderr b/src/test/ui/privacy/private-impl-method.stderr index 8e254b15c78..e1da3f47a4e 100644 --- a/src/test/ui/privacy/private-impl-method.stderr +++ b/src/test/ui/privacy/private-impl-method.stderr @@ -1,7 +1,7 @@ error[E0624]: method `foo` is private --> $DIR/private-impl-method.rs:20:7 | -LL | s.foo(); //~ ERROR method `foo` is private +LL | s.foo(); | ^^^ error: aborting due to previous error diff --git a/src/test/ui/privacy/private-in-public-assoc-ty.stderr b/src/test/ui/privacy/private-in-public-assoc-ty.stderr index 0e5dab1a08c..a610b475923 100644 --- a/src/test/ui/privacy/private-in-public-assoc-ty.stderr +++ b/src/test/ui/privacy/private-in-public-assoc-ty.stderr @@ -2,9 +2,9 @@ warning: private trait `m::PrivTr` in public interface (error E0445) --> $DIR/private-in-public-assoc-ty.rs:15:5 | LL | / pub trait PubTr { -LL | | //~^ WARN private trait `m::PrivTr` in public interface -LL | | //~| WARN this was previously accepted -LL | | //~| WARN private type `m::Priv` in public interface +LL | | +LL | | +LL | | ... | LL | | fn infer_exist() -> Self::Exist; LL | | } @@ -18,9 +18,9 @@ warning: private type `m::Priv` in public interface (error E0446) --> $DIR/private-in-public-assoc-ty.rs:15:5 | LL | / pub trait PubTr { -LL | | //~^ WARN private trait `m::PrivTr` in public interface -LL | | //~| WARN this was previously accepted -LL | | //~| WARN private type `m::Priv` in public interface +LL | | +LL | | +LL | | ... | LL | | fn infer_exist() -> Self::Exist; LL | | } diff --git a/src/test/ui/privacy/private-in-public-ill-formed.stderr b/src/test/ui/privacy/private-in-public-ill-formed.stderr index ab6531cc748..a1a326f2873 100644 --- a/src/test/ui/privacy/private-in-public-ill-formed.stderr +++ b/src/test/ui/privacy/private-in-public-ill-formed.stderr @@ -1,7 +1,7 @@ error[E0118]: no base type found for inherent implementation --> $DIR/private-in-public-ill-formed.rs:14:10 | -LL | impl ::AssocAlias { //~ ERROR no base type found for inherent implementation +LL | impl ::AssocAlias { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl requires a base type | = note: either implement a trait on it or create a newtype to wrap it instead @@ -9,7 +9,7 @@ LL | impl ::AssocAlias { //~ ERROR no base type found for in error[E0118]: no base type found for inherent implementation --> $DIR/private-in-public-ill-formed.rs:30:10 | -LL | impl ::AssocAlias { //~ ERROR no base type found for inherent implementation +LL | impl ::AssocAlias { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl requires a base type | = note: either implement a trait on it or create a newtype to wrap it instead diff --git a/src/test/ui/privacy/private-in-public-lint.stderr b/src/test/ui/privacy/private-in-public-lint.stderr index 730ac24d5e5..441a4d5cffd 100644 --- a/src/test/ui/privacy/private-in-public-lint.stderr +++ b/src/test/ui/privacy/private-in-public-lint.stderr @@ -4,7 +4,7 @@ error[E0446]: private type `m1::Priv` in public interface LL | struct Priv; | - `m1::Priv` declared as private ... -LL | pub fn f() -> Priv {Priv} //~ ERROR private type `m1::Priv` in public interface +LL | pub fn f() -> Priv {Priv} | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `m2::Priv` in public interface @@ -13,7 +13,7 @@ error[E0446]: private type `m2::Priv` in public interface LL | struct Priv; | - `m2::Priv` declared as private ... -LL | pub fn f() -> Priv {Priv} //~ ERROR private type `m2::Priv` in public interface +LL | pub fn f() -> Priv {Priv} | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error: aborting due to 2 previous errors diff --git a/src/test/ui/privacy/private-in-public-non-principal.stderr b/src/test/ui/privacy/private-in-public-non-principal.stderr index 99674055897..729b94ed892 100644 --- a/src/test/ui/privacy/private-in-public-non-principal.stderr +++ b/src/test/ui/privacy/private-in-public-non-principal.stderr @@ -11,7 +11,7 @@ LL | pub fn leak_dyn_nonprincipal() -> Box { lo error: missing documentation for a method --> $DIR/private-in-public-non-principal.rs:13:9 | -LL | pub fn check_doc_lint() {} //~ ERROR missing documentation for a method +LL | pub fn check_doc_lint() {} | ^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/privacy/private-in-public-warn.stderr b/src/test/ui/privacy/private-in-public-warn.stderr index 621d9a57fa0..16b7e510328 100644 --- a/src/test/ui/privacy/private-in-public-warn.stderr +++ b/src/test/ui/privacy/private-in-public-warn.stderr @@ -1,7 +1,7 @@ error: private type `types::Priv` in public interface (error E0446) --> $DIR/private-in-public-warn.rs:15:5 | -LL | pub type Alias = Priv; //~ ERROR private type `types::Priv` in public interface +LL | pub type Alias = Priv; | ^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here @@ -15,7 +15,7 @@ LL | #![deny(private_in_public)] error: private type `types::Priv` in public interface (error E0446) --> $DIR/private-in-public-warn.rs:18:12 | -LL | V1(Priv), //~ ERROR private type `types::Priv` in public interface +LL | V1(Priv), | ^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -24,7 +24,7 @@ LL | V1(Priv), //~ ERROR private type `types::Priv` in public interface error: private type `types::Priv` in public interface (error E0446) --> $DIR/private-in-public-warn.rs:20:14 | -LL | V2 { field: Priv }, //~ ERROR private type `types::Priv` in public interface +LL | V2 { field: Priv }, | ^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -33,7 +33,7 @@ LL | V2 { field: Priv }, //~ ERROR private type `types::Priv` in public error: private type `types::Priv` in public interface (error E0446) --> $DIR/private-in-public-warn.rs:24:9 | -LL | const C: Priv = Priv; //~ ERROR private type `types::Priv` in public interface +LL | const C: Priv = Priv; | ^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -45,13 +45,13 @@ error[E0446]: private type `types::Priv` in public interface LL | struct Priv; | - `types::Priv` declared as private ... -LL | type Alias = Priv; //~ ERROR private type `types::Priv` in public interface +LL | type Alias = Priv; | ^^^^^^^^^^^^^^^^^^ can't leak private type error: private type `types::Priv` in public interface (error E0446) --> $DIR/private-in-public-warn.rs:27:9 | -LL | fn f1(arg: Priv) {} //~ ERROR private type `types::Priv` in public interface +LL | fn f1(arg: Priv) {} | ^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -60,7 +60,7 @@ LL | fn f1(arg: Priv) {} //~ ERROR private type `types::Priv` in public error: private type `types::Priv` in public interface (error E0446) --> $DIR/private-in-public-warn.rs:29:9 | -LL | fn f2() -> Priv { panic!() } //~ ERROR private type `types::Priv` in public interface +LL | fn f2() -> Priv { panic!() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -69,7 +69,7 @@ LL | fn f2() -> Priv { panic!() } //~ ERROR private type `types::Priv` i error: private type `types::Priv` in public interface (error E0446) --> $DIR/private-in-public-warn.rs:33:9 | -LL | pub static ES: Priv; //~ ERROR private type `types::Priv` in public interface +LL | pub static ES: Priv; | ^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -78,7 +78,7 @@ LL | pub static ES: Priv; //~ ERROR private type `types::Priv` in public error: private type `types::Priv` in public interface (error E0446) --> $DIR/private-in-public-warn.rs:35:9 | -LL | pub fn ef1(arg: Priv); //~ ERROR private type `types::Priv` in public interface +LL | pub fn ef1(arg: Priv); | ^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -87,7 +87,7 @@ LL | pub fn ef1(arg: Priv); //~ ERROR private type `types::Priv` in publ error: private type `types::Priv` in public interface (error E0446) --> $DIR/private-in-public-warn.rs:37:9 | -LL | pub fn ef2() -> Priv; //~ ERROR private type `types::Priv` in public interface +LL | pub fn ef2() -> Priv; | ^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -99,13 +99,13 @@ error[E0446]: private type `types::Priv` in public interface LL | struct Priv; | - `types::Priv` declared as private ... -LL | type Alias = Priv; //~ ERROR private type `types::Priv` in public interface +LL | type Alias = Priv; | ^^^^^^^^^^^^^^^^^^ can't leak private type error: private trait `traits::PrivTr` in public interface (error E0445) --> $DIR/private-in-public-warn.rs:50:5 | -LL | pub type Alias = T; //~ ERROR private trait `traits::PrivTr` in public interface +LL | pub type Alias = T; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -114,7 +114,7 @@ LL | pub type Alias = T; //~ ERROR private trait `traits::PrivTr` error: private trait `traits::PrivTr` in public interface (error E0445) --> $DIR/private-in-public-warn.rs:53:5 | -LL | pub trait Tr1: PrivTr {} //~ ERROR private trait `traits::PrivTr` in public interface +LL | pub trait Tr1: PrivTr {} | ^^^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -123,7 +123,7 @@ LL | pub trait Tr1: PrivTr {} //~ ERROR private trait `traits::PrivTr` in pu error: private trait `traits::PrivTr` in public interface (error E0445) --> $DIR/private-in-public-warn.rs:55:5 | -LL | pub trait Tr2 {} //~ ERROR private trait `traits::PrivTr` in public interface +LL | pub trait Tr2 {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -133,11 +133,11 @@ error: private trait `traits::PrivTr` in public interface (error E0445) --> $DIR/private-in-public-warn.rs:57:5 | LL | / pub trait Tr3 { -LL | | //~^ ERROR private trait `traits::PrivTr` in public interface -LL | | //~| WARNING hard error +LL | | +LL | | LL | | type Alias: PrivTr; -LL | | fn f(arg: T) {} //~ ERROR private trait `traits::PrivTr` in public interface -LL | | //~^ WARNING hard error +LL | | fn f(arg: T) {} +LL | | LL | | } | |_____^ | @@ -147,7 +147,7 @@ LL | | } error: private trait `traits::PrivTr` in public interface (error E0445) --> $DIR/private-in-public-warn.rs:61:9 | -LL | fn f(arg: T) {} //~ ERROR private trait `traits::PrivTr` in public interface +LL | fn f(arg: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -156,7 +156,7 @@ LL | fn f(arg: T) {} //~ ERROR private trait `traits::PrivTr` error: private trait `traits::PrivTr` in public interface (error E0445) --> $DIR/private-in-public-warn.rs:64:5 | -LL | impl Pub {} //~ ERROR private trait `traits::PrivTr` in public interface +LL | impl Pub {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -165,7 +165,7 @@ LL | impl Pub {} //~ ERROR private trait `traits::PrivTr` in p error: private trait `traits::PrivTr` in public interface (error E0445) --> $DIR/private-in-public-warn.rs:66:5 | -LL | impl PubTr for Pub {} //~ ERROR private trait `traits::PrivTr` in public interface +LL | impl PubTr for Pub {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -228,7 +228,7 @@ LL | pub trait Tr1: PrivTr {} error: private type `generics::Priv` in public interface (error E0446) --> $DIR/private-in-public-warn.rs:104:5 | -LL | pub trait Tr2: PubTr {} //~ ERROR private type `generics::Priv` in public interface +LL | pub trait Tr2: PubTr {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -237,7 +237,7 @@ LL | pub trait Tr2: PubTr {} //~ ERROR private type `generics::Priv` i error: private type `generics::Priv` in public interface (error E0446) --> $DIR/private-in-public-warn.rs:106:5 | -LL | pub trait Tr3: PubTr<[Priv; 1]> {} //~ ERROR private type `generics::Priv` in public interface +LL | pub trait Tr3: PubTr<[Priv; 1]> {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -246,7 +246,7 @@ LL | pub trait Tr3: PubTr<[Priv; 1]> {} //~ ERROR private type `generics::Pr error: private type `generics::Priv` in public interface (error E0446) --> $DIR/private-in-public-warn.rs:108:5 | -LL | pub trait Tr4: PubTr> {} //~ ERROR private type `generics::Priv` in public interface +LL | pub trait Tr4: PubTr> {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -258,13 +258,13 @@ error[E0446]: private type `impls::Priv` in public interface LL | struct Priv; | - `impls::Priv` declared as private ... -LL | type Alias = Priv; //~ ERROR private type `impls::Priv` in public interface +LL | type Alias = Priv; | ^^^^^^^^^^^^^^^^^^ can't leak private type error: private type `aliases_pub::Priv` in public interface (error E0446) --> $DIR/private-in-public-warn.rs:206:9 | -LL | pub fn f(arg: Priv) {} //~ ERROR private type `aliases_pub::Priv` in public interface +LL | pub fn f(arg: Priv) {} | ^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -276,7 +276,7 @@ error[E0446]: private type `aliases_pub::Priv` in public interface LL | struct Priv; | - `aliases_pub::Priv` declared as private ... -LL | type Check = Priv; //~ ERROR private type `aliases_pub::Priv` in public interface +LL | type Check = Priv; | ^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `aliases_pub::Priv` in public interface @@ -285,7 +285,7 @@ error[E0446]: private type `aliases_pub::Priv` in public interface LL | struct Priv; | - `aliases_pub::Priv` declared as private ... -LL | type Check = Priv; //~ ERROR private type `aliases_pub::Priv` in public interface +LL | type Check = Priv; | ^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `aliases_pub::Priv` in public interface @@ -294,7 +294,7 @@ error[E0446]: private type `aliases_pub::Priv` in public interface LL | struct Priv; | - `aliases_pub::Priv` declared as private ... -LL | type Check = Priv; //~ ERROR private type `aliases_pub::Priv` in public interface +LL | type Check = Priv; | ^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `aliases_pub::Priv` in public interface @@ -303,7 +303,7 @@ error[E0446]: private type `aliases_pub::Priv` in public interface LL | struct Priv; | - `aliases_pub::Priv` declared as private ... -LL | type Check = Priv; //~ ERROR private type `aliases_pub::Priv` in public interface +LL | type Check = Priv; | ^^^^^^^^^^^^^^^^^^ can't leak private type error: private trait `aliases_priv::PrivTr1` in public interface (error E0445) @@ -336,7 +336,7 @@ LL | pub trait Tr2: PrivUseAliasTr {} warning: bounds on generic parameters are not enforced in type aliases --> $DIR/private-in-public-warn.rs:50:23 | -LL | pub type Alias = T; //~ ERROR private trait `traits::PrivTr` in public interface +LL | pub type Alias = T; | ^^^^^^ | = note: #[warn(type_alias_bounds)] on by default diff --git a/src/test/ui/privacy/private-in-public.stderr b/src/test/ui/privacy/private-in-public.stderr index bf88a83e633..3c57e50cfed 100644 --- a/src/test/ui/privacy/private-in-public.stderr +++ b/src/test/ui/privacy/private-in-public.stderr @@ -4,7 +4,7 @@ error[E0446]: private type `types::Priv` in public interface LL | struct Priv; | - `types::Priv` declared as private ... -LL | pub const C: Priv = Priv; //~ ERROR private type `types::Priv` in public interface +LL | pub const C: Priv = Priv; | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `types::Priv` in public interface @@ -13,7 +13,7 @@ error[E0446]: private type `types::Priv` in public interface LL | struct Priv; | - `types::Priv` declared as private ... -LL | pub static S: Priv = Priv; //~ ERROR private type `types::Priv` in public interface +LL | pub static S: Priv = Priv; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `types::Priv` in public interface @@ -22,7 +22,7 @@ error[E0446]: private type `types::Priv` in public interface LL | struct Priv; | - `types::Priv` declared as private ... -LL | pub fn f1(arg: Priv) {} //~ ERROR private type `types::Priv` in public interface +LL | pub fn f1(arg: Priv) {} | ^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `types::Priv` in public interface @@ -31,7 +31,7 @@ error[E0446]: private type `types::Priv` in public interface LL | struct Priv; | - `types::Priv` declared as private ... -LL | pub fn f2() -> Priv { panic!() } //~ ERROR private type `types::Priv` in public interface +LL | pub fn f2() -> Priv { panic!() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `types::Priv` in public interface @@ -40,7 +40,7 @@ error[E0446]: private type `types::Priv` in public interface LL | struct Priv; | - `types::Priv` declared as private ... -LL | pub struct S1(pub Priv); //~ ERROR private type `types::Priv` in public interface +LL | pub struct S1(pub Priv); | ^^^^^^^^ can't leak private type error[E0446]: private type `types::Priv` in public interface @@ -49,7 +49,7 @@ error[E0446]: private type `types::Priv` in public interface LL | struct Priv; | - `types::Priv` declared as private ... -LL | pub struct S2 { pub field: Priv } //~ ERROR private type `types::Priv` in public interface +LL | pub struct S2 { pub field: Priv } | ^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `types::Priv` in public interface @@ -58,7 +58,7 @@ error[E0446]: private type `types::Priv` in public interface LL | struct Priv; | - `types::Priv` declared as private ... -LL | pub const C: Priv = Priv; //~ ERROR private type `types::Priv` in public interface +LL | pub const C: Priv = Priv; | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `types::Priv` in public interface @@ -67,7 +67,7 @@ error[E0446]: private type `types::Priv` in public interface LL | struct Priv; | - `types::Priv` declared as private ... -LL | pub fn f1(arg: Priv) {} //~ ERROR private type `types::Priv` in public interface +LL | pub fn f1(arg: Priv) {} | ^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `types::Priv` in public interface @@ -76,7 +76,7 @@ error[E0446]: private type `types::Priv` in public interface LL | struct Priv; | - `types::Priv` declared as private ... -LL | pub fn f2() -> Priv { panic!() } //~ ERROR private type `types::Priv` in public interface +LL | pub fn f2() -> Priv { panic!() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0445]: private trait `traits::PrivTr` in public interface @@ -85,7 +85,7 @@ error[E0445]: private trait `traits::PrivTr` in public interface LL | trait PrivTr {} | - `traits::PrivTr` declared as private ... -LL | pub enum E { V(T) } //~ ERROR private trait `traits::PrivTr` in public interface +LL | pub enum E { V(T) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error[E0445]: private trait `traits::PrivTr` in public interface @@ -94,7 +94,7 @@ error[E0445]: private trait `traits::PrivTr` in public interface LL | trait PrivTr {} | - `traits::PrivTr` declared as private ... -LL | pub fn f(arg: T) {} //~ ERROR private trait `traits::PrivTr` in public interface +LL | pub fn f(arg: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error[E0445]: private trait `traits::PrivTr` in public interface @@ -103,7 +103,7 @@ error[E0445]: private trait `traits::PrivTr` in public interface LL | trait PrivTr {} | - `traits::PrivTr` declared as private ... -LL | pub struct S1(T); //~ ERROR private trait `traits::PrivTr` in public interface +LL | pub struct S1(T); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error[E0445]: private trait `traits::PrivTr` in public interface @@ -112,8 +112,8 @@ error[E0445]: private trait `traits::PrivTr` in public interface LL | trait PrivTr {} | - `traits::PrivTr` declared as private ... -LL | / impl Pub { //~ ERROR private trait `traits::PrivTr` in public interface -LL | | pub fn f(arg: U) {} //~ ERROR private trait `traits::PrivTr` in public interface +LL | / impl Pub { +LL | | pub fn f(arg: U) {} LL | | } | |_____^ can't leak private trait @@ -123,7 +123,7 @@ error[E0445]: private trait `traits::PrivTr` in public interface LL | trait PrivTr {} | - `traits::PrivTr` declared as private ... -LL | pub fn f(arg: U) {} //~ ERROR private trait `traits::PrivTr` in public interface +LL | pub fn f(arg: U) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error[E0445]: private trait `traits_where::PrivTr` in public interface @@ -160,9 +160,9 @@ LL | trait PrivTr {} | - `traits_where::PrivTr` declared as private ... LL | / impl Pub where T: PrivTr { -LL | | //~^ ERROR private trait `traits_where::PrivTr` in public interface +LL | | LL | | pub fn f(arg: U) where U: PrivTr {} -LL | | //~^ ERROR private trait `traits_where::PrivTr` in public interface +LL | | LL | | } | |_____^ can't leak private trait @@ -181,7 +181,7 @@ error[E0446]: private type `generics::Priv` in public interface LL | struct Priv(T); | - `generics::Priv` declared as private ... -LL | pub fn f1(arg: [Priv; 1]) {} //~ ERROR private type `generics::Priv` in public interface +LL | pub fn f1(arg: [Priv; 1]) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `generics::Priv` in public interface @@ -190,7 +190,7 @@ error[E0446]: private type `generics::Priv` in public interface LL | struct Priv(T); | - `generics::Priv` declared as private ... -LL | pub fn f2(arg: Pub) {} //~ ERROR private type `generics::Priv` in public interface +LL | pub fn f2(arg: Pub) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `generics::Priv` in public interface @@ -208,7 +208,7 @@ error[E0446]: private type `impls::Priv` in public interface LL | struct Priv; | - `impls::Priv` declared as private ... -LL | pub fn f(arg: Priv) {} //~ ERROR private type `impls::Priv` in public interface +LL | pub fn f(arg: Priv) {} | ^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0445]: private trait `aliases_pub::PrivTr` in public interface @@ -235,7 +235,7 @@ error[E0446]: private type `aliases_pub::Priv` in public interface LL | struct Priv; | - `aliases_pub::Priv` declared as private ... -LL | pub fn f(arg: Priv) {} //~ ERROR private type `aliases_pub::Priv` in public interface +LL | pub fn f(arg: Priv) {} | ^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `aliases_priv::Priv1` in public interface @@ -244,7 +244,7 @@ error[E0446]: private type `aliases_priv::Priv1` in public interface LL | struct Priv1; | - `aliases_priv::Priv1` declared as private ... -LL | pub fn f1(arg: PrivUseAlias) {} //~ ERROR private type `aliases_priv::Priv1` in public interface +LL | pub fn f1(arg: PrivUseAlias) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `aliases_priv::Priv2` in public interface @@ -253,7 +253,7 @@ error[E0446]: private type `aliases_priv::Priv2` in public interface LL | struct Priv2; | - `aliases_priv::Priv2` declared as private ... -LL | pub fn f2(arg: PrivAlias) {} //~ ERROR private type `aliases_priv::Priv2` in public interface +LL | pub fn f2(arg: PrivAlias) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0445]: private trait `aliases_priv::PrivTr` in public interface @@ -289,7 +289,7 @@ error[E0446]: private type `aliases_params::Priv` in public interface LL | struct Priv; | - `aliases_params::Priv` declared as private ... -LL | pub fn f3(arg: Result) {} //~ ERROR private type `aliases_params::Priv` in public interface +LL | pub fn f3(arg: Result) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error: aborting due to 32 previous errors diff --git a/src/test/ui/privacy/private-inferred-type-1.stderr b/src/test/ui/privacy/private-inferred-type-1.stderr index 06df7e84783..097b8b9a61e 100644 --- a/src/test/ui/privacy/private-inferred-type-1.stderr +++ b/src/test/ui/privacy/private-inferred-type-1.stderr @@ -1,13 +1,13 @@ error: type `m::Priv` is private --> $DIR/private-inferred-type-1.rs:16:5 | -LL | [].arr0_secret(); //~ ERROR type `m::Priv` is private +LL | [].arr0_secret(); | ^^^^^^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type-1.rs:17:5 | -LL | None.ty_param_secret(); //~ ERROR type `m::Priv` is private +LL | None.ty_param_secret(); | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/privacy/private-inferred-type-2.stderr b/src/test/ui/privacy/private-inferred-type-2.stderr index 7a3f52fa05d..da95cc49241 100644 --- a/src/test/ui/privacy/private-inferred-type-2.stderr +++ b/src/test/ui/privacy/private-inferred-type-2.stderr @@ -1,19 +1,19 @@ error: type `m::Priv` is private --> $DIR/private-inferred-type-2.rs:16:5 | -LL | m::Pub::get_priv; //~ ERROR type `m::Priv` is private +LL | m::Pub::get_priv; | ^^^^^^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type-2.rs:17:5 | -LL | m::Pub::static_method; //~ ERROR type `m::Priv` is private +LL | m::Pub::static_method; | ^^^^^^^^^^^^^^^^^^^^^ error: type `ext::Priv` is private --> $DIR/private-inferred-type-2.rs:18:5 | -LL | ext::Pub::static_method; //~ ERROR type `ext::Priv` is private +LL | ext::Pub::static_method; | ^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/privacy/private-inferred-type.stderr b/src/test/ui/privacy/private-inferred-type.stderr index 568d4dadc8c..baa98292b67 100644 --- a/src/test/ui/privacy/private-inferred-type.stderr +++ b/src/test/ui/privacy/private-inferred-type.stderr @@ -13,103 +13,103 @@ error[E0446]: private type `adjust::S2` in public interface LL | struct S2; | - `adjust::S2` declared as private ... -LL | type Target = S2Alias; //~ ERROR private type `adjust::S2` in public interface +LL | type Target = S2Alias; | ^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:97:9 | -LL | let _: m::Alias; //~ ERROR type `m::Priv` is private +LL | let _: m::Alias; | ^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:97:12 | -LL | let _: m::Alias; //~ ERROR type `m::Priv` is private +LL | let _: m::Alias; | ^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:99:13 | -LL | let _: ::AssocTy; //~ ERROR type `m::Priv` is private +LL | let _: ::AssocTy; | ^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:100:5 | -LL | m::Alias {}; //~ ERROR type `m::Priv` is private +LL | m::Alias {}; | ^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:101:5 | -LL | m::Pub { 0: m::Alias {} }; //~ ERROR type `m::Priv` is private +LL | m::Pub { 0: m::Alias {} }; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:103:5 | -LL | m::Pub::static_method; //~ ERROR type `m::Priv` is private +LL | m::Pub::static_method; | ^^^^^^^^^^^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:104:5 | -LL | m::Pub::INHERENT_ASSOC_CONST; //~ ERROR type `m::Priv` is private +LL | m::Pub::INHERENT_ASSOC_CONST; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:105:5 | -LL | m::Pub(0u8).method_with_substs::(); //~ ERROR type `m::Priv` is private +LL | m::Pub(0u8).method_with_substs::(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:106:17 | -LL | m::Pub(0u8).method_with_priv_params(loop{}); //~ ERROR type `m::Priv` is private +LL | m::Pub(0u8).method_with_priv_params(loop{}); | ^^^^^^^^^^^^^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:107:5 | -LL | ::TRAIT_ASSOC_CONST; //~ ERROR type `m::Priv` is private +LL | ::TRAIT_ASSOC_CONST; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:108:6 | -LL | >::INHERENT_ASSOC_CONST; //~ ERROR type `m::Priv` is private +LL | >::INHERENT_ASSOC_CONST; | ^^^^^^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:109:5 | -LL | >::INHERENT_ASSOC_CONST_GENERIC_SELF; //~ ERROR type `m::Priv` is private +LL | >::INHERENT_ASSOC_CONST_GENERIC_SELF; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:110:5 | -LL | >::static_method_generic_self; //~ ERROR type `m::Priv` is private +LL | >::static_method_generic_self; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:112:5 | -LL | u8::pub_method; //~ ERROR type `m::Priv` is private +LL | u8::pub_method; | ^^^^^^^^^^^^^^ error: type `adjust::S2` is private --> $DIR/private-inferred-type.rs:114:5 | -LL | adjust::S1.method_s3(); //~ ERROR type `adjust::S2` is private +LL | adjust::S1.method_s3(); | ^^^^^^^^^^ error: type `fn() {m::priv_fn}` is private --> $DIR/private-inferred-type.rs:39:9 | -LL | priv_fn; //~ ERROR type `fn() {m::priv_fn}` is private +LL | priv_fn; | ^^^^^^^ ... LL | m::m!(); @@ -118,7 +118,7 @@ LL | m::m!(); error: type `m::PrivEnum` is private --> $DIR/private-inferred-type.rs:41:9 | -LL | PrivEnum::Variant; //~ ERROR type `m::PrivEnum` is private +LL | PrivEnum::Variant; | ^^^^^^^^^^^^^^^^^ ... LL | m::m!(); @@ -127,7 +127,7 @@ LL | m::m!(); error: type `fn() {::method}` is private --> $DIR/private-inferred-type.rs:43:9 | -LL | ::method; //~ ERROR type `fn() {::method}` is private +LL | ::method; | ^^^^^^^^^^^^^^^^^^^^^^^^^ ... LL | m::m!(); @@ -163,61 +163,61 @@ LL | m::m!(); error: trait `m::Trait` is private --> $DIR/private-inferred-type.rs:118:5 | -LL | m::leak_anon1(); //~ ERROR trait `m::Trait` is private +LL | m::leak_anon1(); | ^^^^^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:119:5 | -LL | m::leak_anon2(); //~ ERROR type `m::Priv` is private +LL | m::leak_anon2(); | ^^^^^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:120:5 | -LL | m::leak_anon3(); //~ ERROR type `m::Priv` is private +LL | m::leak_anon3(); | ^^^^^^^^^^^^^^^ error: trait `m::Trait` is private --> $DIR/private-inferred-type.rs:122:5 | -LL | m::leak_dyn1(); //~ ERROR trait `m::Trait` is private +LL | m::leak_dyn1(); | ^^^^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:123:5 | -LL | m::leak_dyn2(); //~ ERROR type `m::Priv` is private +LL | m::leak_dyn2(); | ^^^^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:124:5 | -LL | m::leak_dyn3(); //~ ERROR type `m::Priv` is private +LL | m::leak_dyn3(); | ^^^^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:127:13 | -LL | let a = m::Alias {}; //~ ERROR type `m::Priv` is private +LL | let a = m::Alias {}; | ^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:128:17 | -LL | let mut b = a; //~ ERROR type `m::Priv` is private +LL | let mut b = a; | ^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:129:9 | -LL | b = a; //~ ERROR type `m::Priv` is private +LL | b = a; | ^ error: type `m::Priv` is private --> $DIR/private-inferred-type.rs:130:11 | -LL | match a { //~ ERROR type `m::Priv` is private +LL | match a { | ^ error: aborting due to 33 previous errors diff --git a/src/test/ui/privacy/private-item-simple.stderr b/src/test/ui/privacy/private-item-simple.stderr index 2ac694f35d4..0d5435e1c50 100644 --- a/src/test/ui/privacy/private-item-simple.stderr +++ b/src/test/ui/privacy/private-item-simple.stderr @@ -1,7 +1,7 @@ error[E0603]: function `f` is private --> $DIR/private-item-simple.rs:6:8 | -LL | a::f(); //~ ERROR function `f` is private +LL | a::f(); | ^ error: aborting due to previous error diff --git a/src/test/ui/privacy/private-method-cross-crate.stderr b/src/test/ui/privacy/private-method-cross-crate.stderr index bd28f2e5a8b..10e0bfe5b13 100644 --- a/src/test/ui/privacy/private-method-cross-crate.stderr +++ b/src/test/ui/privacy/private-method-cross-crate.stderr @@ -1,7 +1,7 @@ error[E0624]: method `nap` is private --> $DIR/private-method-cross-crate.rs:7:8 | -LL | nyan.nap(); //~ ERROR method `nap` is private +LL | nyan.nap(); | ^^^ error: aborting due to previous error diff --git a/src/test/ui/privacy/private-method-inherited.stderr b/src/test/ui/privacy/private-method-inherited.stderr index 30c1e99cedd..d2ba591ef0c 100644 --- a/src/test/ui/privacy/private-method-inherited.stderr +++ b/src/test/ui/privacy/private-method-inherited.stderr @@ -1,7 +1,7 @@ error[E0624]: method `f` is private --> $DIR/private-method-inherited.rs:13:7 | -LL | x.f(); //~ ERROR method `f` is private +LL | x.f(); | ^ error: aborting due to previous error diff --git a/src/test/ui/privacy/private-method.stderr b/src/test/ui/privacy/private-method.stderr index 64820e5ea8c..61fc122e318 100644 --- a/src/test/ui/privacy/private-method.stderr +++ b/src/test/ui/privacy/private-method.stderr @@ -1,7 +1,7 @@ error[E0624]: method `nap` is private --> $DIR/private-method.rs:22:8 | -LL | nyan.nap(); //~ ERROR method `nap` is private +LL | nyan.nap(); | ^^^ error: aborting due to previous error diff --git a/src/test/ui/privacy/private-struct-field-ctor.stderr b/src/test/ui/privacy/private-struct-field-ctor.stderr index 943abeed114..97585c1d880 100644 --- a/src/test/ui/privacy/private-struct-field-ctor.stderr +++ b/src/test/ui/privacy/private-struct-field-ctor.stderr @@ -1,7 +1,7 @@ error[E0451]: field `x` of struct `a::Foo` is private --> $DIR/private-struct-field-ctor.rs:8:22 | -LL | let s = a::Foo { x: 1 }; //~ ERROR field `x` of struct `a::Foo` is private +LL | let s = a::Foo { x: 1 }; | ^^^^ field `x` is private error: aborting due to previous error diff --git a/src/test/ui/privacy/private-struct-field-pattern.stderr b/src/test/ui/privacy/private-struct-field-pattern.stderr index 05e6d3d7243..69bd58aacfc 100644 --- a/src/test/ui/privacy/private-struct-field-pattern.stderr +++ b/src/test/ui/privacy/private-struct-field-pattern.stderr @@ -1,7 +1,7 @@ error[E0451]: field `x` of struct `a::Foo` is private --> $DIR/private-struct-field-pattern.rs:15:15 | -LL | Foo { x: _ } => {} //~ ERROR field `x` of struct `a::Foo` is private +LL | Foo { x: _ } => {} | ^^^^ field `x` is private error: aborting due to previous error diff --git a/src/test/ui/privacy/private-struct-field.stderr b/src/test/ui/privacy/private-struct-field.stderr index 7cb6d6ab4d7..da53c73b431 100644 --- a/src/test/ui/privacy/private-struct-field.stderr +++ b/src/test/ui/privacy/private-struct-field.stderr @@ -1,7 +1,7 @@ error[E0616]: field `meows` of struct `cat::Cat` is private --> $DIR/private-struct-field.rs:13:16 | -LL | assert_eq!(nyan.meows, 52); //~ ERROR field `meows` of struct `cat::Cat` is private +LL | assert_eq!(nyan.meows, 52); | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/privacy/private-type-in-interface.stderr b/src/test/ui/privacy/private-type-in-interface.stderr index b436f20fce9..aa4bfb7fc9a 100644 --- a/src/test/ui/privacy/private-type-in-interface.stderr +++ b/src/test/ui/privacy/private-type-in-interface.stderr @@ -1,55 +1,55 @@ error: type `m::Priv` is private --> $DIR/private-type-in-interface.rs:15:9 | -LL | fn f(_: m::Alias) {} //~ ERROR type `m::Priv` is private +LL | fn f(_: m::Alias) {} | ^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-type-in-interface.rs:15:6 | -LL | fn f(_: m::Alias) {} //~ ERROR type `m::Priv` is private +LL | fn f(_: m::Alias) {} | ^ error: type `ext::Priv` is private --> $DIR/private-type-in-interface.rs:17:13 | -LL | fn f_ext(_: ext::Alias) {} //~ ERROR type `ext::Priv` is private +LL | fn f_ext(_: ext::Alias) {} | ^^^^^^^^^^ error: type `ext::Priv` is private --> $DIR/private-type-in-interface.rs:17:10 | -LL | fn f_ext(_: ext::Alias) {} //~ ERROR type `ext::Priv` is private +LL | fn f_ext(_: ext::Alias) {} | ^ error: type `m::Priv` is private --> $DIR/private-type-in-interface.rs:21:6 | -LL | impl m::Alias {} //~ ERROR type `m::Priv` is private +LL | impl m::Alias {} | ^^^^^^^^ error: type `ext::Priv` is private --> $DIR/private-type-in-interface.rs:22:14 | -LL | impl Tr1 for ext::Alias {} //~ ERROR type `ext::Priv` is private +LL | impl Tr1 for ext::Alias {} | ^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-type-in-interface.rs:23:10 | -LL | type A = ::X; //~ ERROR type `m::Priv` is private +LL | type A = ::X; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: type `m::Priv` is private --> $DIR/private-type-in-interface.rs:27:11 | -LL | fn g() -> impl Tr2 { 0 } //~ ERROR type `m::Priv` is private +LL | fn g() -> impl Tr2 { 0 } | ^^^^^^^^^^^^^^^^^^ error: type `ext::Priv` is private --> $DIR/private-type-in-interface.rs:28:15 | -LL | fn g_ext() -> impl Tr2 { 0 } //~ ERROR type `ext::Priv` is private +LL | fn g_ext() -> impl Tr2 { 0 } | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to 9 previous errors diff --git a/src/test/ui/privacy/private-variant-reexport.stderr b/src/test/ui/privacy/private-variant-reexport.stderr index 99f4a41272c..8e4c3452862 100644 --- a/src/test/ui/privacy/private-variant-reexport.stderr +++ b/src/test/ui/privacy/private-variant-reexport.stderr @@ -1,7 +1,7 @@ error: variant `V` is private and cannot be re-exported --> $DIR/private-variant-reexport.rs:2:13 | -LL | pub use ::E::V; //~ ERROR variant `V` is private and cannot be re-exported +LL | pub use ::E::V; | ^^^^^^ ... LL | enum E { V } @@ -10,19 +10,19 @@ LL | enum E { V } error: variant `V` is private and cannot be re-exported --> $DIR/private-variant-reexport.rs:6:19 | -LL | pub use ::E::{V}; //~ ERROR variant `V` is private and cannot be re-exported +LL | pub use ::E::{V}; | ^ error: variant `V` is private and cannot be re-exported --> $DIR/private-variant-reexport.rs:10:22 | -LL | pub use ::E::V::{self}; //~ ERROR variant `V` is private and cannot be re-exported +LL | pub use ::E::V::{self}; | ^^^^ error: enum is private and its variants cannot be re-exported --> $DIR/private-variant-reexport.rs:14:13 | -LL | pub use ::E::*; //~ ERROR enum is private and its variants cannot be re-exported +LL | pub use ::E::*; | ^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/privacy/restricted/private-in-public.stderr b/src/test/ui/privacy/restricted/private-in-public.stderr index 2fb7059e0d4..87c96d31f09 100644 --- a/src/test/ui/privacy/restricted/private-in-public.stderr +++ b/src/test/ui/privacy/restricted/private-in-public.stderr @@ -4,7 +4,7 @@ error[E0446]: private type `foo::Priv` in public interface LL | struct Priv; | - `foo::Priv` declared as private ... -LL | pub(crate) fn g(_: Priv) {} //~ ERROR E0446 +LL | pub(crate) fn g(_: Priv) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `foo::Priv` in public interface @@ -13,7 +13,7 @@ error[E0446]: private type `foo::Priv` in public interface LL | struct Priv; | - `foo::Priv` declared as private ... -LL | crate fn h(_: Priv) {} //~ ERROR E0446 +LL | crate fn h(_: Priv) {} | ^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error: aborting due to 2 previous errors diff --git a/src/test/ui/privacy/restricted/struct-literal-field.stderr b/src/test/ui/privacy/restricted/struct-literal-field.stderr index 0109cae91a0..dd609944a4b 100644 --- a/src/test/ui/privacy/restricted/struct-literal-field.stderr +++ b/src/test/ui/privacy/restricted/struct-literal-field.stderr @@ -1,7 +1,7 @@ error[E0451]: field `x` of struct `foo::bar::S` is private --> $DIR/struct-literal-field.rs:18:9 | -LL | S { x: 0 }; //~ ERROR private +LL | S { x: 0 }; | ^^^^ field `x` is private error: aborting due to previous error diff --git a/src/test/ui/privacy/restricted/test.stderr b/src/test/ui/privacy/restricted/test.stderr index 7539b0e1af4..b4ef7b8e3f7 100644 --- a/src/test/ui/privacy/restricted/test.stderr +++ b/src/test/ui/privacy/restricted/test.stderr @@ -1,79 +1,79 @@ error[E0433]: failed to resolve: maybe a missing `extern crate bad;`? --> $DIR/test.rs:50:12 | -LL | pub(in bad::path) mod m1 {} //~ ERROR failed to resolve: maybe a missing `extern crate bad;`? +LL | pub(in bad::path) mod m1 {} | ^^^ maybe a missing `extern crate bad;`? error: visibilities can only be restricted to ancestor modules --> $DIR/test.rs:51:12 | -LL | pub(in foo) mod m2 {} //~ ERROR visibilities can only be restricted to ancestor modules +LL | pub(in foo) mod m2 {} | ^^^ error[E0364]: `f` is private, and cannot be re-exported --> $DIR/test.rs:21:24 | -LL | pub(super) use foo::bar::f as g; //~ ERROR cannot be re-exported +LL | pub(super) use foo::bar::f as g; | ^^^^^^^^^^^^^^^^ | note: consider marking `f` as `pub` in the imported module --> $DIR/test.rs:21:24 | -LL | pub(super) use foo::bar::f as g; //~ ERROR cannot be re-exported +LL | pub(super) use foo::bar::f as g; | ^^^^^^^^^^^^^^^^ error[E0603]: struct `Crate` is private --> $DIR/test.rs:38:25 | -LL | use pub_restricted::Crate; //~ ERROR private +LL | use pub_restricted::Crate; | ^^^^^ error[E0603]: function `f` is private --> $DIR/test.rs:30:19 | -LL | use foo::bar::f; //~ ERROR private +LL | use foo::bar::f; | ^ error[E0616]: field `x` of struct `foo::bar::S` is private --> $DIR/test.rs:31:5 | -LL | S::default().x; //~ ERROR private +LL | S::default().x; | ^^^^^^^^^^^^^^ error[E0624]: method `f` is private --> $DIR/test.rs:32:18 | -LL | S::default().f(); //~ ERROR private +LL | S::default().f(); | ^ error[E0624]: method `g` is private --> $DIR/test.rs:33:5 | -LL | S::g(); //~ ERROR private +LL | S::g(); | ^^^^ error[E0616]: field `y` of struct `pub_restricted::Universe` is private --> $DIR/test.rs:42:13 | -LL | let _ = u.y; //~ ERROR private +LL | let _ = u.y; | ^^^ error[E0616]: field `z` of struct `pub_restricted::Universe` is private --> $DIR/test.rs:43:13 | -LL | let _ = u.z; //~ ERROR private +LL | let _ = u.z; | ^^^ error[E0624]: method `g` is private --> $DIR/test.rs:45:7 | -LL | u.g(); //~ ERROR private +LL | u.g(); | ^ error[E0624]: method `h` is private --> $DIR/test.rs:46:7 | -LL | u.h(); //~ ERROR private +LL | u.h(); | ^ error: aborting due to 12 previous errors diff --git a/src/test/ui/privacy/union-field-privacy-1.stderr b/src/test/ui/privacy/union-field-privacy-1.stderr index d31360dbe65..96a1d7ed509 100644 --- a/src/test/ui/privacy/union-field-privacy-1.stderr +++ b/src/test/ui/privacy/union-field-privacy-1.stderr @@ -1,13 +1,13 @@ error[E0451]: field `c` of union `m::U` is private --> $DIR/union-field-privacy-1.rs:12:20 | -LL | let u = m::U { c: 0 }; //~ ERROR field `c` of union `m::U` is private +LL | let u = m::U { c: 0 }; | ^^^^ field `c` is private error[E0451]: field `c` of union `m::U` is private --> $DIR/union-field-privacy-1.rs:16:16 | -LL | let m::U { c } = u; //~ ERROR field `c` of union `m::U` is private +LL | let m::U { c } = u; | ^ field `c` is private error: aborting due to 2 previous errors diff --git a/src/test/ui/privacy/union-field-privacy-2.stderr b/src/test/ui/privacy/union-field-privacy-2.stderr index bd2c834c966..df054b8cff8 100644 --- a/src/test/ui/privacy/union-field-privacy-2.stderr +++ b/src/test/ui/privacy/union-field-privacy-2.stderr @@ -1,7 +1,7 @@ error[E0616]: field `c` of struct `m::U` is private --> $DIR/union-field-privacy-2.rs:14:13 | -LL | let c = u.c; //~ ERROR field `c` of struct `m::U` is private +LL | let c = u.c; | ^^^ error: aborting due to previous error diff --git a/src/test/ui/proc-macro/ambiguous-builtin-attrs-test.stderr b/src/test/ui/proc-macro/ambiguous-builtin-attrs-test.stderr index db07055b6a1..316eb636ba8 100644 --- a/src/test/ui/proc-macro/ambiguous-builtin-attrs-test.stderr +++ b/src/test/ui/proc-macro/ambiguous-builtin-attrs-test.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `NonExistent` in this scope --> $DIR/ambiguous-builtin-attrs-test.rs:19:5 | -LL | NonExistent; //~ ERROR cannot find value `NonExistent` in this scope +LL | NonExistent; | ^^^^^^^^^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/proc-macro/ambiguous-builtin-attrs.stderr b/src/test/ui/proc-macro/ambiguous-builtin-attrs.stderr index 79dc922b9db..975be7ce03b 100644 --- a/src/test/ui/proc-macro/ambiguous-builtin-attrs.stderr +++ b/src/test/ui/proc-macro/ambiguous-builtin-attrs.stderr @@ -1,13 +1,13 @@ error[E0425]: cannot find value `NonExistent` in this scope --> $DIR/ambiguous-builtin-attrs.rs:30:5 | -LL | NonExistent; //~ ERROR cannot find value `NonExistent` in this scope +LL | NonExistent; | ^^^^^^^^^^^ not found in this scope error[E0659]: `repr` is ambiguous (built-in attribute vs any other name) --> $DIR/ambiguous-builtin-attrs.rs:9:3 | -LL | #[repr(C)] //~ ERROR `repr` is ambiguous +LL | #[repr(C)] | ^^^^ ambiguous name | = note: `repr` could refer to a built-in attribute @@ -21,7 +21,7 @@ LL | use builtin_attrs::*; error[E0659]: `repr` is ambiguous (built-in attribute vs any other name) --> $DIR/ambiguous-builtin-attrs.rs:11:19 | -LL | #[cfg_attr(all(), repr(C))] //~ ERROR `repr` is ambiguous +LL | #[cfg_attr(all(), repr(C))] | ^^^^ ambiguous name | = note: `repr` could refer to a built-in attribute @@ -35,7 +35,7 @@ LL | use builtin_attrs::*; error[E0659]: `repr` is ambiguous (built-in attribute vs any other name) --> $DIR/ambiguous-builtin-attrs.rs:20:34 | -LL | fn non_macro_expanded_location<#[repr(C)] T>() { //~ ERROR `repr` is ambiguous +LL | fn non_macro_expanded_location<#[repr(C)] T>() { | ^^^^ ambiguous name | = note: `repr` could refer to a built-in attribute @@ -49,7 +49,7 @@ LL | use builtin_attrs::*; error[E0659]: `repr` is ambiguous (built-in attribute vs any other name) --> $DIR/ambiguous-builtin-attrs.rs:22:11 | -LL | #[repr(C)] //~ ERROR `repr` is ambiguous +LL | #[repr(C)] | ^^^^ ambiguous name | = note: `repr` could refer to a built-in attribute @@ -63,7 +63,7 @@ LL | use builtin_attrs::*; error[E0659]: `feature` is ambiguous (built-in attribute vs any other name) --> $DIR/ambiguous-builtin-attrs.rs:3:4 | -LL | #![feature(decl_macro)] //~ ERROR `feature` is ambiguous +LL | #![feature(decl_macro)] | ^^^^^^^ ambiguous name | = note: `feature` could refer to a built-in attribute diff --git a/src/test/ui/proc-macro/attribute-order-restricted.stderr b/src/test/ui/proc-macro/attribute-order-restricted.stderr index a4f165cd1b5..39db45cf569 100644 --- a/src/test/ui/proc-macro/attribute-order-restricted.stderr +++ b/src/test/ui/proc-macro/attribute-order-restricted.stderr @@ -1,7 +1,7 @@ error: macro attributes must be placed before `#[derive]` --> $DIR/attribute-order-restricted.rs:11:1 | -LL | #[attr_proc_macro] //~ ERROR macro attributes must be placed before `#[derive]` +LL | #[attr_proc_macro] | ^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/proc-macro/attribute-spans-preserved.stderr b/src/test/ui/proc-macro/attribute-spans-preserved.stderr index 8371088c4c2..6c571dbdb47 100644 --- a/src/test/ui/proc-macro/attribute-spans-preserved.stderr +++ b/src/test/ui/proc-macro/attribute-spans-preserved.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/attribute-spans-preserved.rs:7:23 | -LL | #[ foo ( let y: u32 = "z"; ) ] //~ ERROR: mismatched types +LL | #[ foo ( let y: u32 = "z"; ) ] | ^^^ expected u32, found reference | = note: expected type `u32` @@ -10,7 +10,7 @@ LL | #[ foo ( let y: u32 = "z"; ) ] //~ ERROR: mismatched types error[E0308]: mismatched types --> $DIR/attribute-spans-preserved.rs:8:23 | -LL | #[ bar { let x: u32 = "y"; } ] //~ ERROR: mismatched types +LL | #[ bar { let x: u32 = "y"; } ] | ^^^ expected u32, found reference | = note: expected type `u32` diff --git a/src/test/ui/proc-macro/attributes-included.stderr b/src/test/ui/proc-macro/attributes-included.stderr index 87b6fb9539f..fcd77b2d383 100644 --- a/src/test/ui/proc-macro/attributes-included.stderr +++ b/src/test/ui/proc-macro/attributes-included.stderr @@ -1,7 +1,7 @@ warning: unused variable: `a` --> $DIR/attributes-included.rs:17:9 | -LL | let a: i32 = "foo"; //~ WARN: unused variable +LL | let a: i32 = "foo"; | ^ help: consider prefixing with an underscore: `_a` | note: lint level defined here diff --git a/src/test/ui/proc-macro/define-two.stderr b/src/test/ui/proc-macro/define-two.stderr index c74215f415e..bf1bd8427c8 100644 --- a/src/test/ui/proc-macro/define-two.stderr +++ b/src/test/ui/proc-macro/define-two.stderr @@ -4,7 +4,7 @@ error[E0428]: the name `A` is defined multiple times LL | #[proc_macro_derive(A)] | - previous definition of the macro `A` here ... -LL | #[proc_macro_derive(A)] //~ ERROR the name `A` is defined multiple times +LL | #[proc_macro_derive(A)] | ^ `A` redefined here | = note: `A` must be defined only once in the macro namespace of this module diff --git a/src/test/ui/proc-macro/derive-helper-shadowing.stderr b/src/test/ui/proc-macro/derive-helper-shadowing.stderr index 8180c84d3f6..5f2009b384b 100644 --- a/src/test/ui/proc-macro/derive-helper-shadowing.stderr +++ b/src/test/ui/proc-macro/derive-helper-shadowing.stderr @@ -1,7 +1,7 @@ error[E0658]: The attribute `my_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/derive-helper-shadowing.rs:20:15 | -LL | #[my_attr] //~ ERROR attribute `my_attr` is currently unknown +LL | #[my_attr] | ^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | #[my_attr] //~ ERROR attribute `my_attr` is currently unknown error[E0659]: `my_attr` is ambiguous (derive helper attribute vs any other name) --> $DIR/derive-helper-shadowing.rs:6:3 | -LL | #[my_attr] //~ ERROR `my_attr` is ambiguous +LL | #[my_attr] | ^^^^^^^ ambiguous name | note: `my_attr` could refer to the derive helper attribute defined here diff --git a/src/test/ui/proc-macro/derive-still-gated.stderr b/src/test/ui/proc-macro/derive-still-gated.stderr index ece1b621291..f7c8960372e 100644 --- a/src/test/ui/proc-macro/derive-still-gated.stderr +++ b/src/test/ui/proc-macro/derive-still-gated.stderr @@ -1,7 +1,7 @@ error[E0658]: The attribute `derive_A` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/derive-still-gated.rs:8:3 | -LL | #[derive_A] //~ ERROR attribute `derive_A` is currently unknown +LL | #[derive_A] | ^^^^^^^^ help: a built-in attribute with a similar name exists: `derive` | = help: add #![feature(custom_attribute)] to the crate attributes to enable diff --git a/src/test/ui/proc-macro/dollar-crate.stderr b/src/test/ui/proc-macro/dollar-crate.stderr index 08de3c7d1a6..d1b836e7f6f 100644 --- a/src/test/ui/proc-macro/dollar-crate.stderr +++ b/src/test/ui/proc-macro/dollar-crate.stderr @@ -1,7 +1,7 @@ error[E0428]: the name `D` is defined multiple times --> $DIR/dollar-crate.rs:27:13 | -LL | struct D($crate::S); //~ ERROR the name `D` is defined multiple times +LL | struct D($crate::S); | ^^^^^^^^^^^^^^^^^^^^ | | | `D` redefined here @@ -15,7 +15,7 @@ LL | local!(); error[E0428]: the name `D` is defined multiple times --> $DIR/dollar-crate.rs:37:5 | -LL | dollar_crate_external::external!(); //~ ERROR the name `D` is defined multiple times +LL | dollar_crate_external::external!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | `D` redefined here diff --git a/src/test/ui/proc-macro/exports.stderr b/src/test/ui/proc-macro/exports.stderr index 6cf5c63d2da..2f81921358d 100644 --- a/src/test/ui/proc-macro/exports.stderr +++ b/src/test/ui/proc-macro/exports.stderr @@ -1,25 +1,25 @@ error: `proc-macro` crate types cannot export any items other than functions tagged with `#[proc_macro_derive]` currently --> $DIR/exports.rs:7:1 | -LL | pub fn a() {} //~ ERROR: cannot export any items +LL | pub fn a() {} | ^^^^^^^^^^^^^ error: `proc-macro` crate types cannot export any items other than functions tagged with `#[proc_macro_derive]` currently --> $DIR/exports.rs:8:1 | -LL | pub struct B; //~ ERROR: cannot export any items +LL | pub struct B; | ^^^^^^^^^^^^^ error: `proc-macro` crate types cannot export any items other than functions tagged with `#[proc_macro_derive]` currently --> $DIR/exports.rs:9:1 | -LL | pub enum C {} //~ ERROR: cannot export any items +LL | pub enum C {} | ^^^^^^^^^^^^^ error: `proc-macro` crate types cannot export any items other than functions tagged with `#[proc_macro_derive]` currently --> $DIR/exports.rs:10:1 | -LL | pub mod d {} //~ ERROR: cannot export any items +LL | pub mod d {} | ^^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/proc-macro/generate-mod.stderr b/src/test/ui/proc-macro/generate-mod.stderr index 1177fc6e575..1b828b4f03f 100644 --- a/src/test/ui/proc-macro/generate-mod.stderr +++ b/src/test/ui/proc-macro/generate-mod.stderr @@ -1,31 +1,31 @@ error[E0412]: cannot find type `FromOutside` in this scope --> $DIR/generate-mod.rs:9:1 | -LL | generate_mod::check!(); //~ ERROR cannot find type `FromOutside` in this scope +LL | generate_mod::check!(); | ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope error[E0412]: cannot find type `Outer` in this scope --> $DIR/generate-mod.rs:9:1 | -LL | generate_mod::check!(); //~ ERROR cannot find type `FromOutside` in this scope +LL | generate_mod::check!(); | ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope error[E0412]: cannot find type `FromOutside` in this scope --> $DIR/generate-mod.rs:12:1 | -LL | #[generate_mod::check_attr] //~ ERROR cannot find type `FromOutside` in this scope +LL | #[generate_mod::check_attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope error[E0412]: cannot find type `OuterAttr` in this scope --> $DIR/generate-mod.rs:12:1 | -LL | #[generate_mod::check_attr] //~ ERROR cannot find type `FromOutside` in this scope +LL | #[generate_mod::check_attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope warning: cannot find type `FromOutside` in this scope --> $DIR/generate-mod.rs:16:10 | -LL | #[derive(generate_mod::CheckDerive)] //~ WARN cannot find type `FromOutside` in this scope +LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import | = note: #[warn(proc_macro_derive_resolution_fallback)] on by default @@ -35,7 +35,7 @@ LL | #[derive(generate_mod::CheckDerive)] //~ WARN cannot find type `FromOutside warning: cannot find type `OuterDerive` in this scope --> $DIR/generate-mod.rs:16:10 | -LL | #[derive(generate_mod::CheckDerive)] //~ WARN cannot find type `FromOutside` in this scope +LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -44,7 +44,7 @@ LL | #[derive(generate_mod::CheckDerive)] //~ WARN cannot find type `FromOutside warning: cannot find type `FromOutside` in this scope --> $DIR/generate-mod.rs:23:14 | -LL | #[derive(generate_mod::CheckDerive)] //~ WARN cannot find type `FromOutside` in this scope +LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -53,7 +53,7 @@ LL | #[derive(generate_mod::CheckDerive)] //~ WARN cannot find type `FromOut warning: cannot find type `OuterDerive` in this scope --> $DIR/generate-mod.rs:23:14 | -LL | #[derive(generate_mod::CheckDerive)] //~ WARN cannot find type `FromOutside` in this scope +LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! diff --git a/src/test/ui/proc-macro/invalid-attributes.stderr b/src/test/ui/proc-macro/invalid-attributes.stderr index 06a7ef2b206..8dff60d0dc5 100644 --- a/src/test/ui/proc-macro/invalid-attributes.stderr +++ b/src/test/ui/proc-macro/invalid-attributes.stderr @@ -1,37 +1,37 @@ error: attribute must be of the form `#[proc_macro]` --> $DIR/invalid-attributes.rs:10:1 | -LL | #[proc_macro = "test"] //~ ERROR attribute must be of the form +LL | #[proc_macro = "test"] | ^^^^^^^^^^^^^^^^^^^^^^ error: attribute must be of the form `#[proc_macro]` --> $DIR/invalid-attributes.rs:13:1 | -LL | #[proc_macro()] //~ ERROR attribute must be of the form +LL | #[proc_macro()] | ^^^^^^^^^^^^^^^ error: attribute must be of the form `#[proc_macro]` --> $DIR/invalid-attributes.rs:16:1 | -LL | #[proc_macro(x)] //~ ERROR attribute must be of the form +LL | #[proc_macro(x)] | ^^^^^^^^^^^^^^^^ error: attribute must be of the form `#[proc_macro_attribute]` --> $DIR/invalid-attributes.rs:19:1 | -LL | #[proc_macro_attribute = "test"] //~ ERROR attribute must be of the form +LL | #[proc_macro_attribute = "test"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: attribute must be of the form `#[proc_macro_attribute]` --> $DIR/invalid-attributes.rs:22:1 | -LL | #[proc_macro_attribute()] //~ ERROR attribute must be of the form +LL | #[proc_macro_attribute()] | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: attribute must be of the form `#[proc_macro_attribute]` --> $DIR/invalid-attributes.rs:25:1 | -LL | #[proc_macro_attribute(x)] //~ ERROR attribute must be of the form +LL | #[proc_macro_attribute(x)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/proc-macro/invalid-punct-ident-1.stderr b/src/test/ui/proc-macro/invalid-punct-ident-1.stderr index 87594130378..9a53741f94f 100644 --- a/src/test/ui/proc-macro/invalid-punct-ident-1.stderr +++ b/src/test/ui/proc-macro/invalid-punct-ident-1.stderr @@ -1,7 +1,7 @@ error: proc macro panicked --> $DIR/invalid-punct-ident-1.rs:6:1 | -LL | invalid_punct!(); //~ ERROR proc macro panicked +LL | invalid_punct!(); | ^^^^^^^^^^^^^^^^^ | = help: message: unsupported character `'`'` diff --git a/src/test/ui/proc-macro/invalid-punct-ident-2.stderr b/src/test/ui/proc-macro/invalid-punct-ident-2.stderr index 384d30650f1..77a26b830d9 100644 --- a/src/test/ui/proc-macro/invalid-punct-ident-2.stderr +++ b/src/test/ui/proc-macro/invalid-punct-ident-2.stderr @@ -1,7 +1,7 @@ error: proc macro panicked --> $DIR/invalid-punct-ident-2.rs:6:1 | -LL | invalid_ident!(); //~ ERROR proc macro panicked +LL | invalid_ident!(); | ^^^^^^^^^^^^^^^^^ | = help: message: `"*"` is not a valid identifier diff --git a/src/test/ui/proc-macro/invalid-punct-ident-3.stderr b/src/test/ui/proc-macro/invalid-punct-ident-3.stderr index fd34459e897..6ff47e3752c 100644 --- a/src/test/ui/proc-macro/invalid-punct-ident-3.stderr +++ b/src/test/ui/proc-macro/invalid-punct-ident-3.stderr @@ -1,7 +1,7 @@ error: proc macro panicked --> $DIR/invalid-punct-ident-3.rs:6:1 | -LL | invalid_raw_ident!(); //~ ERROR proc macro panicked +LL | invalid_raw_ident!(); | ^^^^^^^^^^^^^^^^^^^^^ | = help: message: `"self"` is not a valid raw identifier diff --git a/src/test/ui/proc-macro/invalid-punct-ident-4.stderr b/src/test/ui/proc-macro/invalid-punct-ident-4.stderr index 39eb64e555c..da2bf07a1a3 100644 --- a/src/test/ui/proc-macro/invalid-punct-ident-4.stderr +++ b/src/test/ui/proc-macro/invalid-punct-ident-4.stderr @@ -1,13 +1,13 @@ error: unexpected close delimiter: `)` --> $DIR/invalid-punct-ident-4.rs:6:1 | -LL | lexer_failure!(); //~ ERROR proc macro panicked +LL | lexer_failure!(); | ^^^^^^^^^^^^^^^^^ unexpected close delimiter error: proc macro panicked --> $DIR/invalid-punct-ident-4.rs:6:1 | -LL | lexer_failure!(); //~ ERROR proc macro panicked +LL | lexer_failure!(); | ^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/proc-macro/issue-37788.stderr b/src/test/ui/proc-macro/issue-37788.stderr index 40f28460b16..0727e8c8ed1 100644 --- a/src/test/ui/proc-macro/issue-37788.stderr +++ b/src/test/ui/proc-macro/issue-37788.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | fn main() { | - expected `()` because of default return type LL | // Test that constructing the `visible_parent_map` (in `cstore_impl.rs`) does not ICE. -LL | std::cell::Cell::new(0) //~ ERROR mismatched types +LL | std::cell::Cell::new(0) | ^^^^^^^^^^^^^^^^^^^^^^^- help: try adding a semicolon: `;` | | | expected (), found struct `std::cell::Cell` diff --git a/src/test/ui/proc-macro/issue-38586.stderr b/src/test/ui/proc-macro/issue-38586.stderr index 9657914f49b..2584e0c62ee 100644 --- a/src/test/ui/proc-macro/issue-38586.stderr +++ b/src/test/ui/proc-macro/issue-38586.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `foo` in this scope --> $DIR/issue-38586.rs:6:10 | -LL | #[derive(A)] //~ ERROR `foo` +LL | #[derive(A)] | ^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/proc-macro/issue-50493.stderr b/src/test/ui/proc-macro/issue-50493.stderr index 559e8f0f222..28c61a2f52f 100644 --- a/src/test/ui/proc-macro/issue-50493.stderr +++ b/src/test/ui/proc-macro/issue-50493.stderr @@ -1,13 +1,13 @@ error: visibilities can only be restricted to ancestor modules --> $DIR/issue-50493.rs:8:12 | -LL | pub(in restricted) field: usize, //~ visibilities can only be restricted to ancestor modules +LL | pub(in restricted) field: usize, | ^^^^^^^^^^ error[E0616]: field `field` of struct `Restricted` is private --> $DIR/issue-50493.rs:6:10 | -LL | #[derive(Derive)] //~ ERROR field `field` of struct `Restricted` is private +LL | #[derive(Derive)] | ^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/proc-macro/lifetimes.stderr b/src/test/ui/proc-macro/lifetimes.stderr index c873ab68654..2356a119530 100644 --- a/src/test/ui/proc-macro/lifetimes.stderr +++ b/src/test/ui/proc-macro/lifetimes.stderr @@ -1,7 +1,7 @@ error: expected type, found `'` --> $DIR/lifetimes.rs:9:10 | -LL | type A = single_quote_alone!(); //~ ERROR expected type, found `'` +LL | type A = single_quote_alone!(); | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/proc-macro/macro-brackets.stderr b/src/test/ui/proc-macro/macro-brackets.stderr index a3cc7d485cd..7447b5c15ee 100644 --- a/src/test/ui/proc-macro/macro-brackets.stderr +++ b/src/test/ui/proc-macro/macro-brackets.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/macro-brackets.rs:11:21 | -LL | id![static X: u32 = 'a';]; //~ ERROR: mismatched types +LL | id![static X: u32 = 'a';]; | ^^^ expected u32, found char error: aborting due to previous error diff --git a/src/test/ui/proc-macro/macro-namespace-reserved-2.stderr b/src/test/ui/proc-macro/macro-namespace-reserved-2.stderr index c1821199e30..548f9e3051d 100644 --- a/src/test/ui/proc-macro/macro-namespace-reserved-2.stderr +++ b/src/test/ui/proc-macro/macro-namespace-reserved-2.stderr @@ -1,55 +1,55 @@ error: can't use a procedural macro from the same crate that defines it --> $DIR/macro-namespace-reserved-2.rs:25:5 | -LL | my_macro!(); //~ ERROR can't use a procedural macro from the same crate that defines it +LL | my_macro!(); | ^^^^^^^^ error: can't use a procedural macro from the same crate that defines it --> $DIR/macro-namespace-reserved-2.rs:28:5 | -LL | my_macro_attr!(); //~ ERROR can't use a procedural macro from the same crate that defines it +LL | my_macro_attr!(); | ^^^^^^^^^^^^^ error: can't use a procedural macro from the same crate that defines it --> $DIR/macro-namespace-reserved-2.rs:31:5 | -LL | MyTrait!(); //~ ERROR can't use a procedural macro from the same crate that defines it +LL | MyTrait!(); | ^^^^^^^ error: can't use a procedural macro from the same crate that defines it --> $DIR/macro-namespace-reserved-2.rs:34:3 | -LL | #[my_macro] //~ ERROR can't use a procedural macro from the same crate that defines it +LL | #[my_macro] | ^^^^^^^^ error: can't use a procedural macro from the same crate that defines it --> $DIR/macro-namespace-reserved-2.rs:36:3 | -LL | #[my_macro_attr] //~ ERROR can't use a procedural macro from the same crate that defines it +LL | #[my_macro_attr] | ^^^^^^^^^^^^^ error: can't use a procedural macro from the same crate that defines it --> $DIR/macro-namespace-reserved-2.rs:38:3 | -LL | #[MyTrait] //~ ERROR can't use a procedural macro from the same crate that defines it +LL | #[MyTrait] | ^^^^^^^ error: can't use a procedural macro from the same crate that defines it --> $DIR/macro-namespace-reserved-2.rs:41:10 | -LL | #[derive(my_macro)] //~ ERROR can't use a procedural macro from the same crate that defines it +LL | #[derive(my_macro)] | ^^^^^^^^ error: can't use a procedural macro from the same crate that defines it --> $DIR/macro-namespace-reserved-2.rs:43:10 | -LL | #[derive(my_macro_attr)] //~ ERROR can't use a procedural macro from the same crate that defines it +LL | #[derive(my_macro_attr)] | ^^^^^^^^^^^^^ error: can't use a procedural macro from the same crate that defines it --> $DIR/macro-namespace-reserved-2.rs:45:10 | -LL | #[derive(MyTrait)] //~ ERROR can't use a procedural macro from the same crate that defines it +LL | #[derive(MyTrait)] | ^^^^^^^ error: aborting due to 9 previous errors diff --git a/src/test/ui/proc-macro/macro-namespace-reserved.stderr b/src/test/ui/proc-macro/macro-namespace-reserved.stderr index 2192e6d2b17..f5d589c3ac6 100644 --- a/src/test/ui/proc-macro/macro-namespace-reserved.stderr +++ b/src/test/ui/proc-macro/macro-namespace-reserved.stderr @@ -4,7 +4,7 @@ error[E0428]: the name `my_macro` is defined multiple times LL | pub fn my_macro(input: TokenStream) -> TokenStream { | -------------------------------------------------- previous definition of the macro `my_macro` here ... -LL | macro my_macro() {} //~ ERROR the name `my_macro` is defined multiple times +LL | macro my_macro() {} | ^^^^^^^^^^^^^^^^ `my_macro` redefined here | = note: `my_macro` must be defined only once in the macro namespace of this module @@ -15,7 +15,7 @@ error[E0428]: the name `my_macro_attr` is defined multiple times LL | pub fn my_macro_attr(input: TokenStream, _: TokenStream) -> TokenStream { | ----------------------------------------------------------------------- previous definition of the macro `my_macro_attr` here ... -LL | macro my_macro_attr() {} //~ ERROR the name `my_macro_attr` is defined multiple times +LL | macro my_macro_attr() {} | ^^^^^^^^^^^^^^^^^^^^^ `my_macro_attr` redefined here | = note: `my_macro_attr` must be defined only once in the macro namespace of this module @@ -26,7 +26,7 @@ error[E0428]: the name `MyTrait` is defined multiple times LL | #[proc_macro_derive(MyTrait)] | ------- previous definition of the macro `MyTrait` here ... -LL | macro MyTrait() {} //~ ERROR the name `MyTrait` is defined multiple times +LL | macro MyTrait() {} | ^^^^^^^^^^^^^^^ `MyTrait` redefined here | = note: `MyTrait` must be defined only once in the macro namespace of this module diff --git a/src/test/ui/proc-macro/more-gates.stderr b/src/test/ui/proc-macro/more-gates.stderr index 21e75027e48..c6c2954f939 100644 --- a/src/test/ui/proc-macro/more-gates.stderr +++ b/src/test/ui/proc-macro/more-gates.stderr @@ -17,7 +17,7 @@ LL | #[attr2mac2] error[E0658]: procedural macros cannot expand to macro definitions (see issue #54727) --> $DIR/more-gates.rs:16:1 | -LL | mac2mac1!(); //~ ERROR: cannot expand to macro definitions +LL | mac2mac1!(); | ^^^^^^^^^^^^ | = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable @@ -25,7 +25,7 @@ LL | mac2mac1!(); //~ ERROR: cannot expand to macro definitions error[E0658]: procedural macros cannot expand to macro definitions (see issue #54727) --> $DIR/more-gates.rs:17:1 | -LL | mac2mac2!(); //~ ERROR: cannot expand to macro definitions +LL | mac2mac2!(); | ^^^^^^^^^^^^ | = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable diff --git a/src/test/ui/proc-macro/multispan.stderr b/src/test/ui/proc-macro/multispan.stderr index 7519f778e9e..44af07a7942 100644 --- a/src/test/ui/proc-macro/multispan.stderr +++ b/src/test/ui/proc-macro/multispan.stderr @@ -1,85 +1,85 @@ error: hello to you, too! --> $DIR/multispan.rs:14:5 | -LL | hello!(hi); //~ ERROR hello to you, too! +LL | hello!(hi); | ^^^^^^^^^^^ | note: found these 'hi's --> $DIR/multispan.rs:14:12 | -LL | hello!(hi); //~ ERROR hello to you, too! +LL | hello!(hi); | ^^ error: hello to you, too! --> $DIR/multispan.rs:17:5 | -LL | hello!(hi hi); //~ ERROR hello to you, too! +LL | hello!(hi hi); | ^^^^^^^^^^^^^^ | note: found these 'hi's --> $DIR/multispan.rs:17:12 | -LL | hello!(hi hi); //~ ERROR hello to you, too! +LL | hello!(hi hi); | ^^ ^^ error: hello to you, too! --> $DIR/multispan.rs:20:5 | -LL | hello!(hi hi hi); //~ ERROR hello to you, too! +LL | hello!(hi hi hi); | ^^^^^^^^^^^^^^^^^ | note: found these 'hi's --> $DIR/multispan.rs:20:12 | -LL | hello!(hi hi hi); //~ ERROR hello to you, too! +LL | hello!(hi hi hi); | ^^ ^^ ^^ error: hello to you, too! --> $DIR/multispan.rs:23:5 | -LL | hello!(hi hey hi yo hi beep beep hi hi); //~ ERROR hello to you, too! +LL | hello!(hi hey hi yo hi beep beep hi hi); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: found these 'hi's --> $DIR/multispan.rs:23:12 | -LL | hello!(hi hey hi yo hi beep beep hi hi); //~ ERROR hello to you, too! +LL | hello!(hi hey hi yo hi beep beep hi hi); | ^^ ^^ ^^ ^^ ^^ error: hello to you, too! --> $DIR/multispan.rs:24:5 | -LL | hello!(hi there, hi how are you? hi... hi.); //~ ERROR hello to you, too! +LL | hello!(hi there, hi how are you? hi... hi.); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: found these 'hi's --> $DIR/multispan.rs:24:12 | -LL | hello!(hi there, hi how are you? hi... hi.); //~ ERROR hello to you, too! +LL | hello!(hi there, hi how are you? hi... hi.); | ^^ ^^ ^^ ^^ error: hello to you, too! --> $DIR/multispan.rs:25:5 | -LL | hello!(whoah. hi di hi di ho); //~ ERROR hello to you, too! +LL | hello!(whoah. hi di hi di ho); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: found these 'hi's --> $DIR/multispan.rs:25:19 | -LL | hello!(whoah. hi di hi di ho); //~ ERROR hello to you, too! +LL | hello!(whoah. hi di hi di ho); | ^^ ^^ error: hello to you, too! --> $DIR/multispan.rs:26:5 | -LL | hello!(hi good hi and good bye); //~ ERROR hello to you, too! +LL | hello!(hi good hi and good bye); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: found these 'hi's --> $DIR/multispan.rs:26:12 | -LL | hello!(hi good hi and good bye); //~ ERROR hello to you, too! +LL | hello!(hi good hi and good bye); | ^^ ^^ error: aborting due to 7 previous errors diff --git a/src/test/ui/proc-macro/nested-item-spans.stderr b/src/test/ui/proc-macro/nested-item-spans.stderr index cba4b73486c..011a91d4462 100644 --- a/src/test/ui/proc-macro/nested-item-spans.stderr +++ b/src/test/ui/proc-macro/nested-item-spans.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/nested-item-spans.rs:10:22 | -LL | let x: u32 = "x"; //~ ERROR: mismatched types +LL | let x: u32 = "x"; | ^^^ expected u32, found reference | = note: expected type `u32` @@ -10,7 +10,7 @@ LL | let x: u32 = "x"; //~ ERROR: mismatched types error[E0308]: mismatched types --> $DIR/nested-item-spans.rs:19:22 | -LL | let x: u32 = "x"; //~ ERROR: mismatched types +LL | let x: u32 = "x"; | ^^^ expected u32, found reference | = note: expected type `u32` diff --git a/src/test/ui/proc-macro/no-macro-use-attr.stderr b/src/test/ui/proc-macro/no-macro-use-attr.stderr index fe5107e17cb..4b2fce7f6e4 100644 --- a/src/test/ui/proc-macro/no-macro-use-attr.stderr +++ b/src/test/ui/proc-macro/no-macro-use-attr.stderr @@ -13,7 +13,7 @@ LL | #![warn(unused_extern_crates)] error: compilation successful --> $DIR/no-macro-use-attr.rs:10:1 | -LL | fn main() {} //~ ERROR compilation successful +LL | fn main() {} | ^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/proc-macro/proc-macro-attributes.stderr b/src/test/ui/proc-macro/proc-macro-attributes.stderr index a5ec787ac67..f8f1e7cd988 100644 --- a/src/test/ui/proc-macro/proc-macro-attributes.stderr +++ b/src/test/ui/proc-macro/proc-macro-attributes.stderr @@ -1,7 +1,7 @@ error[E0658]: The attribute `C` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/proc-macro-attributes.rs:7:3 | -LL | #[C] //~ ERROR attribute `C` is currently unknown to the compiler +LL | #[C] | ^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | #[C] //~ ERROR attribute `C` is currently unknown to the compiler error[E0659]: `B` is ambiguous (derive helper attribute vs any other name) --> $DIR/proc-macro-attributes.rs:6:3 | -LL | #[B] //~ ERROR `B` is ambiguous +LL | #[B] | ^ ambiguous name | note: `B` could refer to the derive helper attribute defined here @@ -26,7 +26,7 @@ LL | #[macro_use] error[E0659]: `B` is ambiguous (derive helper attribute vs any other name) --> $DIR/proc-macro-attributes.rs:8:3 | -LL | #[B(D)] //~ ERROR `B` is ambiguous +LL | #[B(D)] | ^ ambiguous name | note: `B` could refer to the derive helper attribute defined here @@ -43,7 +43,7 @@ LL | #[macro_use] error[E0659]: `B` is ambiguous (derive helper attribute vs any other name) --> $DIR/proc-macro-attributes.rs:9:3 | -LL | #[B(E = "foo")] //~ ERROR `B` is ambiguous +LL | #[B(E = "foo")] | ^ ambiguous name | note: `B` could refer to the derive helper attribute defined here @@ -60,7 +60,7 @@ LL | #[macro_use] error[E0659]: `B` is ambiguous (derive helper attribute vs any other name) --> $DIR/proc-macro-attributes.rs:10:3 | -LL | #[B(arbitrary tokens)] //~ ERROR `B` is ambiguous +LL | #[B(arbitrary tokens)] | ^ ambiguous name | note: `B` could refer to the derive helper attribute defined here diff --git a/src/test/ui/proc-macro/proc-macro-gates.stderr b/src/test/ui/proc-macro/proc-macro-gates.stderr index abfcf09bfaf..4ae8e63df72 100644 --- a/src/test/ui/proc-macro/proc-macro-gates.stderr +++ b/src/test/ui/proc-macro/proc-macro-gates.stderr @@ -1,7 +1,7 @@ error[E0658]: non-builtin inner attributes are unstable (see issue #54726) --> $DIR/proc-macro-gates.rs:11:5 | -LL | #![a] //~ ERROR: non-builtin inner attributes are unstable +LL | #![a] | ^^^^^ | = help: add #![feature(custom_inner_attributes)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | #![a] //~ ERROR: non-builtin inner attributes are unstable error[E0658]: non-builtin inner attributes are unstable (see issue #54726) --> $DIR/proc-macro-gates.rs:18:5 | -LL | #![a] //~ ERROR: custom attributes cannot be applied to modules +LL | #![a] | ^^^^^ | = help: add #![feature(custom_inner_attributes)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | #![a] //~ ERROR: custom attributes cannot be applied to modules error[E0658]: custom attributes cannot be applied to modules (see issue #54727) --> $DIR/proc-macro-gates.rs:14:1 | -LL | #[a] //~ ERROR: custom attributes cannot be applied to modules +LL | #[a] | ^^^^ | = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable @@ -25,7 +25,7 @@ LL | #[a] //~ ERROR: custom attributes cannot be applied to modules error[E0658]: custom attributes cannot be applied to modules (see issue #54727) --> $DIR/proc-macro-gates.rs:18:5 | -LL | #![a] //~ ERROR: custom attributes cannot be applied to modules +LL | #![a] | ^^^^^ | = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable @@ -33,13 +33,13 @@ LL | #![a] //~ ERROR: custom attributes cannot be applied to modules error: custom attribute invocations must be of the form #[foo] or #[foo(..)], the macro name must only be followed by a delimiter token --> $DIR/proc-macro-gates.rs:22:1 | -LL | #[a = "y"] //~ ERROR: must only be followed by a delimiter token +LL | #[a = "y"] | ^^^^^^^^^^ error[E0658]: custom attributes cannot be applied to statements (see issue #54727) --> $DIR/proc-macro-gates.rs:31:5 | -LL | #[a] //~ ERROR: custom attributes cannot be applied to statements +LL | #[a] | ^^^^ | = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable @@ -47,7 +47,7 @@ LL | #[a] //~ ERROR: custom attributes cannot be applied to statements error[E0658]: custom attributes cannot be applied to statements (see issue #54727) --> $DIR/proc-macro-gates.rs:35:5 | -LL | #[a] //~ ERROR: custom attributes cannot be applied to statements +LL | #[a] | ^^^^ | = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable @@ -55,7 +55,7 @@ LL | #[a] //~ ERROR: custom attributes cannot be applied to statements error[E0658]: custom attributes cannot be applied to statements (see issue #54727) --> $DIR/proc-macro-gates.rs:39:5 | -LL | #[a] //~ ERROR: custom attributes cannot be applied to statements +LL | #[a] | ^^^^ | = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable @@ -63,7 +63,7 @@ LL | #[a] //~ ERROR: custom attributes cannot be applied to statements error[E0658]: custom attributes cannot be applied to expressions (see issue #54727) --> $DIR/proc-macro-gates.rs:43:14 | -LL | let _x = #[a] 2; //~ ERROR: custom attributes cannot be applied to expressions +LL | let _x = #[a] 2; | ^^^^ | = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable @@ -71,7 +71,7 @@ LL | let _x = #[a] 2; //~ ERROR: custom attributes cannot be applied to expr error[E0658]: custom attributes cannot be applied to expressions (see issue #54727) --> $DIR/proc-macro-gates.rs:46:15 | -LL | let _x = [#[a] 2]; //~ ERROR: custom attributes cannot be applied to expressions +LL | let _x = [#[a] 2]; | ^^^^ | = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable @@ -79,7 +79,7 @@ LL | let _x = [#[a] 2]; //~ ERROR: custom attributes cannot be applied to ex error[E0658]: custom attributes cannot be applied to expressions (see issue #54727) --> $DIR/proc-macro-gates.rs:49:14 | -LL | let _x = #[a] println!(); //~ ERROR: custom attributes cannot be applied to expressions +LL | let _x = #[a] println!(); | ^^^^ | = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable @@ -87,7 +87,7 @@ LL | let _x = #[a] println!(); //~ ERROR: custom attributes cannot be applie error[E0658]: procedural macros cannot be expanded to types (see issue #54727) --> $DIR/proc-macro-gates.rs:53:13 | -LL | let _x: m!(u32) = 3; //~ ERROR: procedural macros cannot be expanded to types +LL | let _x: m!(u32) = 3; | ^^^^^^^ | = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable @@ -95,7 +95,7 @@ LL | let _x: m!(u32) = 3; //~ ERROR: procedural macros cannot be expanded to error[E0658]: procedural macros cannot be expanded to patterns (see issue #54727) --> $DIR/proc-macro-gates.rs:54:12 | -LL | if let m!(Some(_x)) = Some(3) {} //~ ERROR: procedural macros cannot be expanded to patterns +LL | if let m!(Some(_x)) = Some(3) {} | ^^^^^^^^^^^^ | = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable @@ -103,7 +103,7 @@ LL | if let m!(Some(_x)) = Some(3) {} //~ ERROR: procedural macros cannot be error[E0658]: procedural macros cannot be expanded to statements (see issue #54727) --> $DIR/proc-macro-gates.rs:56:5 | -LL | m!(struct S;); //~ ERROR: procedural macros cannot be expanded to statements +LL | m!(struct S;); | ^^^^^^^^^^^^^^ | = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable @@ -111,7 +111,7 @@ LL | m!(struct S;); //~ ERROR: procedural macros cannot be expanded to state error[E0658]: procedural macros cannot be expanded to statements (see issue #54727) --> $DIR/proc-macro-gates.rs:57:5 | -LL | m!(let _x = 3;); //~ ERROR: procedural macros cannot be expanded to statements +LL | m!(let _x = 3;); | ^^^^^^^^^^^^^^^^ | = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable @@ -119,7 +119,7 @@ LL | m!(let _x = 3;); //~ ERROR: procedural macros cannot be expanded to sta error[E0658]: procedural macros cannot be expanded to expressions (see issue #54727) --> $DIR/proc-macro-gates.rs:59:14 | -LL | let _x = m!(3); //~ ERROR: procedural macros cannot be expanded to expressions +LL | let _x = m!(3); | ^^^^^ | = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable @@ -127,7 +127,7 @@ LL | let _x = m!(3); //~ ERROR: procedural macros cannot be expanded to expr error[E0658]: procedural macros cannot be expanded to expressions (see issue #54727) --> $DIR/proc-macro-gates.rs:60:15 | -LL | let _x = [m!(3)]; //~ ERROR: procedural macros cannot be expanded to expressions +LL | let _x = [m!(3)]; | ^^^^^ | = help: add #![feature(proc_macro_hygiene)] to the crate attributes to enable diff --git a/src/test/ui/proc-macro/proc-macro-gates2.stderr b/src/test/ui/proc-macro/proc-macro-gates2.stderr index 262482aea34..89ad527a43c 100644 --- a/src/test/ui/proc-macro/proc-macro-gates2.stderr +++ b/src/test/ui/proc-macro/proc-macro-gates2.stderr @@ -9,7 +9,7 @@ LL | fn _test6<#[a] T>() {} error[E0658]: The attribute `a` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/proc-macro-gates2.rs:18:9 | -LL | #[a] //~ ERROR: unknown to the compiler +LL | #[a] | ^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable diff --git a/src/test/ui/proc-macro/pub-at-crate-root.stderr b/src/test/ui/proc-macro/pub-at-crate-root.stderr index 47be1c44d2d..66fa499d33b 100644 --- a/src/test/ui/proc-macro/pub-at-crate-root.stderr +++ b/src/test/ui/proc-macro/pub-at-crate-root.stderr @@ -1,7 +1,7 @@ error: `proc-macro` crate types cannot export any items other than functions tagged with `#[proc_macro_derive]` currently --> $DIR/pub-at-crate-root.rs:8:1 | -LL | / pub mod a { //~ `proc-macro` crate types cannot export any items +LL | / pub mod a { LL | | use proc_macro::TokenStream; LL | | LL | | #[proc_macro_derive(B)] @@ -14,7 +14,7 @@ error: functions tagged with `#[proc_macro_derive]` must currently reside in the --> $DIR/pub-at-crate-root.rs:12:5 | LL | / pub fn bar(a: TokenStream) -> TokenStream { -LL | | //~^ ERROR: must currently reside in the root of the crate +LL | | LL | | a LL | | } | |_____^ @@ -23,7 +23,7 @@ error: functions tagged with `#[proc_macro_derive]` must be `pub` --> $DIR/pub-at-crate-root.rs:19:1 | LL | / fn bar(a: proc_macro::TokenStream) -> proc_macro::TokenStream { -LL | | //~^ ERROR: functions tagged with `#[proc_macro_derive]` must be `pub` +LL | | LL | | a LL | | } | |_^ diff --git a/src/test/ui/proc-macro/shadow.stderr b/src/test/ui/proc-macro/shadow.stderr index 2dfe2a94c88..91b73903aca 100644 --- a/src/test/ui/proc-macro/shadow.stderr +++ b/src/test/ui/proc-macro/shadow.stderr @@ -4,7 +4,7 @@ error[E0259]: the name `derive_a` is defined multiple times LL | extern crate derive_a; | ---------------------- previous import of the extern crate `derive_a` here LL | / #[macro_use] -LL | | extern crate derive_a; //~ ERROR the name `derive_a` is defined multiple times +LL | | extern crate derive_a; | | ^^^^^^^^^^^^^^^^^^^^^- | |_|____________________| | | help: remove unnecessary import diff --git a/src/test/ui/proc-macro/signature.stderr b/src/test/ui/proc-macro/signature.stderr index 99cb3316533..4743e3031a3 100644 --- a/src/test/ui/proc-macro/signature.stderr +++ b/src/test/ui/proc-macro/signature.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/signature.rs:10:1 | LL | / pub unsafe extern fn foo(a: i32, b: u32) -> u32 { -LL | | //~^ ERROR: mismatched types +LL | | LL | | loop {} LL | | } | |_^ expected normal fn, found unsafe fn diff --git a/src/test/ui/proc-macro/span-preservation.stderr b/src/test/ui/proc-macro/span-preservation.stderr index db524907b65..fbccde28f59 100644 --- a/src/test/ui/proc-macro/span-preservation.stderr +++ b/src/test/ui/proc-macro/span-preservation.stderr @@ -6,7 +6,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/span-preservation.rs:13:20 | -LL | let x: usize = "hello";;;;; //~ ERROR mismatched types +LL | let x: usize = "hello";;;;; | ^^^^^^^ expected usize, found reference | = note: expected type `usize` @@ -18,19 +18,19 @@ error[E0308]: mismatched types LL | fn b(x: Option) -> usize { | ----- expected `usize` because of return type LL | match x { -LL | Some(x) => { return x }, //~ ERROR mismatched types +LL | Some(x) => { return x }, | ^ expected usize, found isize error[E0308]: mismatched types --> $DIR/span-preservation.rs:35:22 | -LL | let x = Foo { a: 10isize }; //~ ERROR mismatched types +LL | let x = Foo { a: 10isize }; | ^^^^^^^ expected usize, found isize error[E0560]: struct `c::Foo` has no field named `b` --> $DIR/span-preservation.rs:36:26 | -LL | let y = Foo { a: 10, b: 10isize }; //~ ERROR has no field named `b` +LL | let y = Foo { a: 10, b: 10isize }; | ^ `c::Foo` does not have this field | = note: available fields are: `a` @@ -40,7 +40,7 @@ error[E0308]: mismatched types | LL | extern "C" fn baz() { | - possibly return type missing here? -LL | 0 //~ ERROR mismatched types +LL | 0 | ^ expected (), found integer | = note: expected type `()` diff --git a/src/test/ui/proc-macro/subspan.stderr b/src/test/ui/proc-macro/subspan.stderr index 94f1be6021f..5117dd6d32d 100644 --- a/src/test/ui/proc-macro/subspan.stderr +++ b/src/test/ui/proc-macro/subspan.stderr @@ -1,97 +1,97 @@ error: found 'hi's --> $DIR/subspan.rs:11:1 | -LL | subspan!("hi"); //~ ERROR found 'hi's +LL | subspan!("hi"); | ^^^^^^^^^^^^^^^ | note: here --> $DIR/subspan.rs:11:11 | -LL | subspan!("hi"); //~ ERROR found 'hi's +LL | subspan!("hi"); | ^^ error: found 'hi's --> $DIR/subspan.rs:14:1 | -LL | subspan!("hihi"); //~ ERROR found 'hi's +LL | subspan!("hihi"); | ^^^^^^^^^^^^^^^^^ | note: here --> $DIR/subspan.rs:14:11 | -LL | subspan!("hihi"); //~ ERROR found 'hi's +LL | subspan!("hihi"); | ^^^^ error: found 'hi's --> $DIR/subspan.rs:17:1 | -LL | subspan!("hihihi"); //~ ERROR found 'hi's +LL | subspan!("hihihi"); | ^^^^^^^^^^^^^^^^^^^ | note: here --> $DIR/subspan.rs:17:11 | -LL | subspan!("hihihi"); //~ ERROR found 'hi's +LL | subspan!("hihihi"); | ^^^^^^ error: found 'hi's --> $DIR/subspan.rs:20:1 | -LL | subspan!("why I hide? hi!"); //~ ERROR found 'hi's +LL | subspan!("why I hide? hi!"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: here --> $DIR/subspan.rs:20:17 | -LL | subspan!("why I hide? hi!"); //~ ERROR found 'hi's +LL | subspan!("why I hide? hi!"); | ^^ ^^ error: found 'hi's --> $DIR/subspan.rs:21:1 | -LL | subspan!("hey, hi, hidy, hidy, hi hi"); //~ ERROR found 'hi's +LL | subspan!("hey, hi, hidy, hidy, hi hi"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: here --> $DIR/subspan.rs:21:16 | -LL | subspan!("hey, hi, hidy, hidy, hi hi"); //~ ERROR found 'hi's +LL | subspan!("hey, hi, hidy, hidy, hi hi"); | ^^ ^^ ^^ ^^ ^^ error: found 'hi's --> $DIR/subspan.rs:22:1 | -LL | subspan!("this is a hi, and this is another hi"); //~ ERROR found 'hi's +LL | subspan!("this is a hi, and this is another hi"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: here --> $DIR/subspan.rs:22:12 | -LL | subspan!("this is a hi, and this is another hi"); //~ ERROR found 'hi's +LL | subspan!("this is a hi, and this is another hi"); | ^^ ^^ ^^ ^^ error: found 'hi's --> $DIR/subspan.rs:23:1 | -LL | subspan!("how are you this evening"); //~ ERROR found 'hi's +LL | subspan!("how are you this evening"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: here --> $DIR/subspan.rs:23:24 | -LL | subspan!("how are you this evening"); //~ ERROR found 'hi's +LL | subspan!("how are you this evening"); | ^^ error: found 'hi's --> $DIR/subspan.rs:24:1 | -LL | subspan!("this is highly eradic"); //~ ERROR found 'hi's +LL | subspan!("this is highly eradic"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: here --> $DIR/subspan.rs:24:12 | -LL | subspan!("this is highly eradic"); //~ ERROR found 'hi's +LL | subspan!("this is highly eradic"); | ^^ ^^ error: aborting due to 8 previous errors diff --git a/src/test/ui/proc-macro/three-equals.stderr b/src/test/ui/proc-macro/three-equals.stderr index e38343348dd..f8dfa841d4f 100644 --- a/src/test/ui/proc-macro/three-equals.stderr +++ b/src/test/ui/proc-macro/three-equals.stderr @@ -1,7 +1,7 @@ error: found 2 equal signs, need exactly 3 --> $DIR/three-equals.rs:15:5 | -LL | three_equals!(==); //~ ERROR found 2 equal signs, need exactly 3 +LL | three_equals!(==); | ^^^^^^^^^^^^^^^^^^ | = help: input must be: `===` @@ -9,38 +9,38 @@ LL | three_equals!(==); //~ ERROR found 2 equal signs, need exactly 3 error: expected EOF, found `=`. --> $DIR/three-equals.rs:18:21 | -LL | three_equals!(=====); //~ ERROR expected EOF +LL | three_equals!(=====); | ^^ | note: last good input was here --> $DIR/three-equals.rs:18:21 | -LL | three_equals!(=====); //~ ERROR expected EOF +LL | three_equals!(=====); | ^^ = help: input must be: `===` error: expected `=`, found `abc`. --> $DIR/three-equals.rs:21:19 | -LL | three_equals!(abc); //~ ERROR expected `=` +LL | three_equals!(abc); | ^^^ error: expected `=`, found `!`. --> $DIR/three-equals.rs:24:19 | -LL | three_equals!(!!); //~ ERROR expected `=` +LL | three_equals!(!!); | ^ error: expected EOF, found `a`. --> $DIR/three-equals.rs:27:22 | -LL | three_equals!(===a); //~ ERROR expected EOF +LL | three_equals!(===a); | ^ | note: last good input was here --> $DIR/three-equals.rs:27:21 | -LL | three_equals!(===a); //~ ERROR expected EOF +LL | three_equals!(===a); | ^ = help: input must be: `===` diff --git a/src/test/ui/ptr-coercion.stderr b/src/test/ui/ptr-coercion.stderr index 2499e90db7d..019241d6874 100644 --- a/src/test/ui/ptr-coercion.stderr +++ b/src/test/ui/ptr-coercion.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/ptr-coercion.rs:7:25 | -LL | let x: *mut isize = x; //~ ERROR mismatched types +LL | let x: *mut isize = x; | ^ types differ in mutability | = note: expected type `*mut isize` @@ -10,7 +10,7 @@ LL | let x: *mut isize = x; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/ptr-coercion.rs:13:25 | -LL | let x: *mut isize = &42; //~ ERROR mismatched types +LL | let x: *mut isize = &42; | ^^^ types differ in mutability | = note: expected type `*mut isize` @@ -19,7 +19,7 @@ LL | let x: *mut isize = &42; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/ptr-coercion.rs:19:25 | -LL | let x: *mut isize = x; //~ ERROR mismatched types +LL | let x: *mut isize = x; | ^ types differ in mutability | = note: expected type `*mut isize` diff --git a/src/test/ui/pub/pub-reexport-priv-extern-crate.stderr b/src/test/ui/pub/pub-reexport-priv-extern-crate.stderr index e895d51a848..61c148bf2df 100644 --- a/src/test/ui/pub/pub-reexport-priv-extern-crate.stderr +++ b/src/test/ui/pub/pub-reexport-priv-extern-crate.stderr @@ -1,7 +1,7 @@ error: extern crate `core` is private, and cannot be re-exported (error E0365), consider declaring with `pub` --> $DIR/pub-reexport-priv-extern-crate.rs:4:9 | -LL | pub use core as reexported_core; //~ ERROR `core` is private, and cannot be re-exported +LL | pub use core as reexported_core; | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: #[deny(pub_use_of_private_extern_crate)] on by default @@ -11,7 +11,7 @@ LL | pub use core as reexported_core; //~ ERROR `core` is private, and cannot be error: extern crate `core` is private, and cannot be re-exported (error E0365), consider declaring with `pub` --> $DIR/pub-reexport-priv-extern-crate.rs:12:9 | -LL | use foo1::core; //~ ERROR `core` is private, and cannot be re-exported +LL | use foo1::core; | ^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -20,7 +20,7 @@ LL | use foo1::core; //~ ERROR `core` is private, and cannot be re-exported error: extern crate `core` is private, and cannot be re-exported (error E0365), consider declaring with `pub` --> $DIR/pub-reexport-priv-extern-crate.rs:20:13 | -LL | pub use foo2::bar::core; //~ ERROR `core` is private, and cannot be re-exported +LL | pub use foo2::bar::core; | ^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! diff --git a/src/test/ui/pub/pub-restricted-error-fn.stderr b/src/test/ui/pub/pub-restricted-error-fn.stderr index 86fe1b2186f..fcff5334890 100644 --- a/src/test/ui/pub/pub-restricted-error-fn.stderr +++ b/src/test/ui/pub/pub-restricted-error-fn.stderr @@ -1,7 +1,7 @@ error: unmatched visibility `pub` --> $DIR/pub-restricted-error-fn.rs:3:10 | -LL | pub(crate) () fn foo() {} //~ unmatched visibility +LL | pub(crate) () fn foo() {} | ^ error: aborting due to previous error diff --git a/src/test/ui/pub/pub-restricted-error.stderr b/src/test/ui/pub/pub-restricted-error.stderr index ca720279946..d856833d04f 100644 --- a/src/test/ui/pub/pub-restricted-error.stderr +++ b/src/test/ui/pub/pub-restricted-error.stderr @@ -1,7 +1,7 @@ error: expected identifier, found `(` --> $DIR/pub-restricted-error.rs:6:16 | -LL | pub(crate) () foo: usize, //~ ERROR expected identifier +LL | pub(crate) () foo: usize, | ^ expected identifier error: aborting due to previous error diff --git a/src/test/ui/pub/pub-restricted-non-path.stderr b/src/test/ui/pub/pub-restricted-non-path.stderr index 526e964f8ee..e0ea50621f7 100644 --- a/src/test/ui/pub/pub-restricted-non-path.stderr +++ b/src/test/ui/pub/pub-restricted-non-path.stderr @@ -1,7 +1,7 @@ error: expected identifier, found `.` --> $DIR/pub-restricted-non-path.rs:3:6 | -LL | pub (.) fn afn() {} //~ ERROR expected identifier +LL | pub (.) fn afn() {} | ^ expected identifier error: aborting due to previous error diff --git a/src/test/ui/pub/pub-restricted.stderr b/src/test/ui/pub/pub-restricted.stderr index 40cf398023b..7eeefa95505 100644 --- a/src/test/ui/pub/pub-restricted.stderr +++ b/src/test/ui/pub/pub-restricted.stderr @@ -1,7 +1,7 @@ error[E0704]: incorrect visibility restriction --> $DIR/pub-restricted.rs:5:6 | -LL | pub (a) fn afn() {} //~ incorrect visibility restriction +LL | pub (a) fn afn() {} | ^ help: make this visible only to module `a` with `in`: `in a` | = help: some possible visibility restrictions are: @@ -12,7 +12,7 @@ LL | pub (a) fn afn() {} //~ incorrect visibility restriction error[E0704]: incorrect visibility restriction --> $DIR/pub-restricted.rs:6:6 | -LL | pub (b) fn bfn() {} //~ incorrect visibility restriction +LL | pub (b) fn bfn() {} | ^ help: make this visible only to module `b` with `in`: `in b` | = help: some possible visibility restrictions are: @@ -23,7 +23,7 @@ LL | pub (b) fn bfn() {} //~ incorrect visibility restriction error[E0704]: incorrect visibility restriction --> $DIR/pub-restricted.rs:22:14 | -LL | pub (a) invalid: usize, //~ incorrect visibility restriction +LL | pub (a) invalid: usize, | ^ help: make this visible only to module `a` with `in`: `in a` | = help: some possible visibility restrictions are: @@ -34,7 +34,7 @@ LL | pub (a) invalid: usize, //~ incorrect visibility restriction error[E0704]: incorrect visibility restriction --> $DIR/pub-restricted.rs:31:6 | -LL | pub (xyz) fn xyz() {} //~ incorrect visibility restriction +LL | pub (xyz) fn xyz() {} | ^^^ help: make this visible only to module `xyz` with `in`: `in xyz` | = help: some possible visibility restrictions are: @@ -45,7 +45,7 @@ LL | pub (xyz) fn xyz() {} //~ incorrect visibility restriction error: visibilities can only be restricted to ancestor modules --> $DIR/pub-restricted.rs:23:17 | -LL | pub (in x) non_parent_invalid: usize, //~ ERROR visibilities can only be restricted +LL | pub (in x) non_parent_invalid: usize, | ^ error: aborting due to 5 previous errors diff --git a/src/test/ui/qualified/qualified-path-params.stderr b/src/test/ui/qualified/qualified-path-params.stderr index 18fca2e3046..926b098040f 100644 --- a/src/test/ui/qualified/qualified-path-params.stderr +++ b/src/test/ui/qualified/qualified-path-params.stderr @@ -7,7 +7,7 @@ LL | ::A::f:: => {} error[E0029]: only char and numeric types are allowed in range patterns --> $DIR/qualified-path-params.rs:22:15 | -LL | 0 ..= ::A::f:: => {} //~ ERROR only char and numeric types are allowed in range +LL | 0 ..= ::A::f:: => {} | ^^^^^^^^^^^^^^^^^^^^^ ranges require char or numeric types | = note: start type: {integer} diff --git a/src/test/ui/question-mark-type-infer.stderr b/src/test/ui/question-mark-type-infer.stderr index c998bdc086f..f62a540572c 100644 --- a/src/test/ui/question-mark-type-infer.stderr +++ b/src/test/ui/question-mark-type-infer.stderr @@ -1,7 +1,7 @@ error[E0284]: type annotations required: cannot resolve `<_ as std::ops::Try>::Ok == _` --> $DIR/question-mark-type-infer.rs:12:5 | -LL | l.iter().map(f).collect()? //~ ERROR type annotations required: cannot resolve +LL | l.iter().map(f).collect()? | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/range/range_traits-2.stderr b/src/test/ui/range/range_traits-2.stderr index f7f887006ed..598a0b3ed03 100644 --- a/src/test/ui/range/range_traits-2.stderr +++ b/src/test/ui/range/range_traits-2.stderr @@ -1,7 +1,7 @@ error[E0204]: the trait `Copy` may not be implemented for this type --> $DIR/range_traits-2.rs:3:10 | -LL | #[derive(Copy, Clone)] //~ ERROR Copy +LL | #[derive(Copy, Clone)] | ^^^^ LL | struct R(Range); | ------------ this field does not implement `Copy` diff --git a/src/test/ui/range/range_traits-3.stderr b/src/test/ui/range/range_traits-3.stderr index 910ba517276..e2713a2bd5e 100644 --- a/src/test/ui/range/range_traits-3.stderr +++ b/src/test/ui/range/range_traits-3.stderr @@ -1,7 +1,7 @@ error[E0204]: the trait `Copy` may not be implemented for this type --> $DIR/range_traits-3.rs:3:10 | -LL | #[derive(Copy, Clone)] //~ ERROR Copy +LL | #[derive(Copy, Clone)] | ^^^^ LL | struct R(RangeFrom); | ---------------- this field does not implement `Copy` diff --git a/src/test/ui/range/range_traits-6.stderr b/src/test/ui/range/range_traits-6.stderr index c1916e24bfe..226d72ce026 100644 --- a/src/test/ui/range/range_traits-6.stderr +++ b/src/test/ui/range/range_traits-6.stderr @@ -1,7 +1,7 @@ error[E0204]: the trait `Copy` may not be implemented for this type --> $DIR/range_traits-6.rs:3:10 | -LL | #[derive(Copy, Clone)] //~ ERROR Copy +LL | #[derive(Copy, Clone)] | ^^^^ LL | struct R(RangeInclusive); | --------------------- this field does not implement `Copy` diff --git a/src/test/ui/reachable/expr_add.stderr b/src/test/ui/reachable/expr_add.stderr index 548600f26ec..02b29021cb6 100644 --- a/src/test/ui/reachable/expr_add.stderr +++ b/src/test/ui/reachable/expr_add.stderr @@ -1,7 +1,7 @@ error: unreachable expression --> $DIR/expr_add.rs:17:13 | -LL | let x = Foo + return; //~ ERROR unreachable +LL | let x = Foo + return; | ^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/reachable/expr_array.stderr b/src/test/ui/reachable/expr_array.stderr index b6e79e551cd..18d7ffe74bd 100644 --- a/src/test/ui/reachable/expr_array.stderr +++ b/src/test/ui/reachable/expr_array.stderr @@ -1,7 +1,7 @@ error: unreachable expression --> $DIR/expr_array.rs:9:34 | -LL | let x: [usize; 2] = [return, 22]; //~ ERROR unreachable +LL | let x: [usize; 2] = [return, 22]; | ^^ | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![deny(unreachable_code)] error: unreachable expression --> $DIR/expr_array.rs:14:25 | -LL | let x: [usize; 2] = [22, return]; //~ ERROR unreachable +LL | let x: [usize; 2] = [22, return]; | ^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/reachable/expr_assign.stderr b/src/test/ui/reachable/expr_assign.stderr index 949009b7299..def16d90a74 100644 --- a/src/test/ui/reachable/expr_assign.stderr +++ b/src/test/ui/reachable/expr_assign.stderr @@ -1,7 +1,7 @@ error: unreachable expression --> $DIR/expr_assign.rs:10:5 | -LL | x = return; //~ ERROR unreachable +LL | x = return; | ^^^^^^^^^^ | note: lint level defined here @@ -13,13 +13,13 @@ LL | #![deny(unreachable_code)] error: unreachable expression --> $DIR/expr_assign.rs:20:14 | -LL | *p = return; //~ ERROR unreachable +LL | *p = return; | ^^^^^^ error: unreachable expression --> $DIR/expr_assign.rs:26:15 | -LL | *{return; &mut i} = 22; //~ ERROR unreachable +LL | *{return; &mut i} = 22; | ^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/reachable/expr_block.stderr b/src/test/ui/reachable/expr_block.stderr index d71d12b744a..a498502e6cb 100644 --- a/src/test/ui/reachable/expr_block.stderr +++ b/src/test/ui/reachable/expr_block.stderr @@ -1,7 +1,7 @@ error: unreachable expression --> $DIR/expr_block.rs:10:9 | -LL | 22 //~ ERROR unreachable +LL | 22 | ^^ | note: lint level defined here diff --git a/src/test/ui/reachable/expr_box.stderr b/src/test/ui/reachable/expr_box.stderr index 289cef24bce..63137ce3da1 100644 --- a/src/test/ui/reachable/expr_box.stderr +++ b/src/test/ui/reachable/expr_box.stderr @@ -1,7 +1,7 @@ error: unreachable expression --> $DIR/expr_box.rs:6:13 | -LL | let x = box return; //~ ERROR unreachable +LL | let x = box return; | ^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/reachable/expr_call.stderr b/src/test/ui/reachable/expr_call.stderr index aecaf24adc4..df5cff16f9a 100644 --- a/src/test/ui/reachable/expr_call.stderr +++ b/src/test/ui/reachable/expr_call.stderr @@ -1,7 +1,7 @@ error: unreachable expression --> $DIR/expr_call.rs:13:17 | -LL | foo(return, 22); //~ ERROR unreachable +LL | foo(return, 22); | ^^ | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![deny(unreachable_code)] error: unreachable expression --> $DIR/expr_call.rs:18:5 | -LL | bar(return); //~ ERROR unreachable +LL | bar(return); | ^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/reachable/expr_cast.stderr b/src/test/ui/reachable/expr_cast.stderr index 21f8a0f418e..3086745d28e 100644 --- a/src/test/ui/reachable/expr_cast.stderr +++ b/src/test/ui/reachable/expr_cast.stderr @@ -1,7 +1,7 @@ error: unreachable expression --> $DIR/expr_cast.rs:9:13 | -LL | let x = {return} as !; //~ ERROR unreachable +LL | let x = {return} as !; | ^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/reachable/expr_method.stderr b/src/test/ui/reachable/expr_method.stderr index f1770df2f9e..bbfa2ef529a 100644 --- a/src/test/ui/reachable/expr_method.stderr +++ b/src/test/ui/reachable/expr_method.stderr @@ -1,7 +1,7 @@ error: unreachable expression --> $DIR/expr_method.rs:16:21 | -LL | Foo.foo(return, 22); //~ ERROR unreachable +LL | Foo.foo(return, 22); | ^^ | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![deny(unreachable_code)] error: unreachable expression --> $DIR/expr_method.rs:21:5 | -LL | Foo.bar(return); //~ ERROR unreachable +LL | Foo.bar(return); | ^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/reachable/expr_repeat.stderr b/src/test/ui/reachable/expr_repeat.stderr index 288c18d5d65..0536cdef721 100644 --- a/src/test/ui/reachable/expr_repeat.stderr +++ b/src/test/ui/reachable/expr_repeat.stderr @@ -1,7 +1,7 @@ error: unreachable expression --> $DIR/expr_repeat.rs:9:25 | -LL | let x: [usize; 2] = [return; 2]; //~ ERROR unreachable +LL | let x: [usize; 2] = [return; 2]; | ^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/reachable/expr_return.stderr b/src/test/ui/reachable/expr_return.stderr index e5ce660d695..3317da58aba 100644 --- a/src/test/ui/reachable/expr_return.stderr +++ b/src/test/ui/reachable/expr_return.stderr @@ -1,7 +1,7 @@ error: unreachable expression --> $DIR/expr_return.rs:10:22 | -LL | let x = {return {return {return;}}}; //~ ERROR unreachable +LL | let x = {return {return {return;}}}; | ^^^^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/reachable/expr_struct.stderr b/src/test/ui/reachable/expr_struct.stderr index 5fbf603602b..dcccb7a4db3 100644 --- a/src/test/ui/reachable/expr_struct.stderr +++ b/src/test/ui/reachable/expr_struct.stderr @@ -1,7 +1,7 @@ error: unreachable expression --> $DIR/expr_struct.rs:14:13 | -LL | let x = Foo { a: 22, b: 33, ..return }; //~ ERROR unreachable +LL | let x = Foo { a: 22, b: 33, ..return }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here @@ -13,19 +13,19 @@ LL | #![deny(unreachable_code)] error: unreachable expression --> $DIR/expr_struct.rs:19:33 | -LL | let x = Foo { a: return, b: 33, ..return }; //~ ERROR unreachable +LL | let x = Foo { a: return, b: 33, ..return }; | ^^ error: unreachable expression --> $DIR/expr_struct.rs:24:39 | -LL | let x = Foo { a: 22, b: return, ..return }; //~ ERROR unreachable +LL | let x = Foo { a: 22, b: return, ..return }; | ^^^^^^ error: unreachable expression --> $DIR/expr_struct.rs:29:13 | -LL | let x = Foo { a: 22, b: return }; //~ ERROR unreachable +LL | let x = Foo { a: 22, b: return }; | ^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/reachable/expr_tup.stderr b/src/test/ui/reachable/expr_tup.stderr index def678ec93e..1837031107d 100644 --- a/src/test/ui/reachable/expr_tup.stderr +++ b/src/test/ui/reachable/expr_tup.stderr @@ -1,7 +1,7 @@ error: unreachable expression --> $DIR/expr_tup.rs:9:38 | -LL | let x: (usize, usize) = (return, 2); //~ ERROR unreachable +LL | let x: (usize, usize) = (return, 2); | ^ | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![deny(unreachable_code)] error: unreachable expression --> $DIR/expr_tup.rs:14:29 | -LL | let x: (usize, usize) = (2, return); //~ ERROR unreachable +LL | let x: (usize, usize) = (2, return); | ^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/reachable/expr_type.stderr b/src/test/ui/reachable/expr_type.stderr index b90cd790341..f867c891634 100644 --- a/src/test/ui/reachable/expr_type.stderr +++ b/src/test/ui/reachable/expr_type.stderr @@ -1,7 +1,7 @@ error: unreachable expression --> $DIR/expr_type.rs:9:13 | -LL | let x = {return}: !; //~ ERROR unreachable +LL | let x = {return}: !; | ^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/reachable/expr_unary.stderr b/src/test/ui/reachable/expr_unary.stderr index 44887f0ee52..61982289cdc 100644 --- a/src/test/ui/reachable/expr_unary.stderr +++ b/src/test/ui/reachable/expr_unary.stderr @@ -1,13 +1,13 @@ error[E0600]: cannot apply unary operator `!` to type `!` --> $DIR/expr_unary.rs:8:16 | -LL | let x: ! = ! { return; }; //~ ERROR unreachable +LL | let x: ! = ! { return; }; | ^^^^^^^^^^^^^ cannot apply unary operator `!` error: unreachable expression --> $DIR/expr_unary.rs:8:16 | -LL | let x: ! = ! { return; }; //~ ERROR unreachable +LL | let x: ! = ! { return; }; | ^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/recursion/recursion.stderr b/src/test/ui/recursion/recursion.stderr index 1bef37ad588..9213ba052a9 100644 --- a/src/test/ui/recursion/recursion.stderr +++ b/src/test/ui/recursion/recursion.stderr @@ -1,7 +1,7 @@ error: reached the recursion limit while instantiating `test::>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` --> $DIR/recursion.rs:12:1 | -LL | / fn test (n:isize, i:isize, first:T, second:T) ->isize { //~ ERROR recursion limit +LL | / fn test (n:isize, i:isize, first:T, second:T) ->isize { LL | | match n { 0 => {first.dot(second)} LL | | // FIXME(#4287) Error message should be here. It should be LL | | // a type error to instantiate `test` at a type other than T. diff --git a/src/test/ui/recursion/recursive-reexports.stderr b/src/test/ui/recursion/recursive-reexports.stderr index 681931ef830..01afc1458af 100644 --- a/src/test/ui/recursion/recursive-reexports.stderr +++ b/src/test/ui/recursion/recursive-reexports.stderr @@ -1,7 +1,7 @@ error[E0412]: cannot find type `S` in module `recursive_reexports` --> $DIR/recursive-reexports.rs:5:32 | -LL | fn f() -> recursive_reexports::S {} //~ ERROR cannot find type `S` in module `recursive_reexports` +LL | fn f() -> recursive_reexports::S {} | ^ not found in `recursive_reexports` error: aborting due to previous error diff --git a/src/test/ui/ref-suggestion.stderr b/src/test/ui/ref-suggestion.stderr index 1f871bafeec..df677a611cd 100644 --- a/src/test/ui/ref-suggestion.stderr +++ b/src/test/ui/ref-suggestion.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `x` | LL | let y = x; | - value moved here -LL | x; //~ ERROR use of moved value +LL | x; | ^ value used here after move | = note: move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait @@ -13,7 +13,7 @@ error[E0382]: use of moved value: `x` | LL | let mut y = x; | ----- value moved here -LL | x; //~ ERROR use of moved value +LL | x; | ^ value used here after move | = note: move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait @@ -24,7 +24,7 @@ error[E0382]: use of partially moved value: `x` LL | (Some(y), ()) => {}, | - value moved here ... -LL | x; //~ ERROR use of partially moved value +LL | x; | ^ value used here after move | = note: move occurs because the value has type `std::vec::Vec`, which does not implement the `Copy` trait diff --git a/src/test/ui/regions-fn-subtyping-return-static-fail.stderr b/src/test/ui/regions-fn-subtyping-return-static-fail.stderr index 66e6a615b33..35478a7db86 100644 --- a/src/test/ui/regions-fn-subtyping-return-static-fail.stderr +++ b/src/test/ui/regions-fn-subtyping-return-static-fail.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/regions-fn-subtyping-return-static-fail.rs:40:12 | -LL | want_F(bar); //~ ERROR mismatched types +LL | want_F(bar); | ^^^ expected concrete lifetime, found bound lifetime parameter 'cx | = note: expected type `for<'cx> fn(&'cx S) -> &'cx S` @@ -10,7 +10,7 @@ LL | want_F(bar); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/regions-fn-subtyping-return-static-fail.rs:48:12 | -LL | want_G(baz); //~ ERROR mismatched types +LL | want_G(baz); | ^^^ expected concrete lifetime, found bound lifetime parameter 'cx | = note: expected type `for<'cx> fn(&'cx S) -> &'static S` diff --git a/src/test/ui/regions/region-bound-on-closure-outlives-call.stderr b/src/test/ui/regions/region-bound-on-closure-outlives-call.stderr index 3e60efd1472..cb888ab66c4 100644 --- a/src/test/ui/regions/region-bound-on-closure-outlives-call.stderr +++ b/src/test/ui/regions/region-bound-on-closure-outlives-call.stderr @@ -3,8 +3,8 @@ warning: function cannot return without recursing | LL | fn call_rec(mut f: F) -> usize where F: FnMut(usize) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing -LL | //~^ WARN function cannot return without recursing -LL | (|x| f(x))(call_rec(f)) //~ ERROR cannot move out of `f` +LL | +LL | (|x| f(x))(call_rec(f)) | ----------- recursive call site | = note: #[warn(unconditional_recursion)] on by default @@ -13,7 +13,7 @@ LL | (|x| f(x))(call_rec(f)) //~ ERROR cannot move out of `f` error[E0505]: cannot move out of `f` because it is borrowed --> $DIR/region-bound-on-closure-outlives-call.rs:3:25 | -LL | (|x| f(x))(call_rec(f)) //~ ERROR cannot move out of `f` +LL | (|x| f(x))(call_rec(f)) | --- ^ move out of `f` occurs here | | | borrow of `f` occurs here diff --git a/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr b/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr index 16c31fbcac0..ec71d55705e 100644 --- a/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr +++ b/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr @@ -13,18 +13,18 @@ LL | z: Box+'b+'c>, note: lifetime parameter instantiated with the lifetime 'b as defined on the struct at 11:15 --> $DIR/region-bounds-on-objects-and-type-parameters.rs:11:15 | -LL | struct Foo<'a,'b,'c> { //~ ERROR parameter `'c` is never used +LL | struct Foo<'a,'b,'c> { | ^^ note: but lifetime parameter must outlive the lifetime 'a as defined on the struct at 11:12 --> $DIR/region-bounds-on-objects-and-type-parameters.rs:11:12 | -LL | struct Foo<'a,'b,'c> { //~ ERROR parameter `'c` is never used +LL | struct Foo<'a,'b,'c> { | ^^ error[E0392]: parameter `'c` is never used --> $DIR/region-bounds-on-objects-and-type-parameters.rs:11:18 | -LL | struct Foo<'a,'b,'c> { //~ ERROR parameter `'c` is never used +LL | struct Foo<'a,'b,'c> { | ^^ unused type parameter | = help: consider removing `'c` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr b/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr index 5c8b3d3ba69..7b901c2f960 100644 --- a/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr +++ b/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr @@ -4,7 +4,7 @@ error[E0623]: lifetime mismatch LL | fn b<'a, 'b>(x: &mut &'a isize, y: &mut &'b isize) { | --------- --------- these two types are declared with different lifetimes... LL | // Illegal now because there is no `'b:'a` declaration. -LL | *x = *y; //~ ERROR E0623 +LL | *x = *y; | ^^ ...but data from `y` flows into `x` here error[E0623]: lifetime mismatch @@ -13,13 +13,13 @@ error[E0623]: lifetime mismatch LL | fn c<'a,'b>(x: &mut &'a isize, y: &mut &'b isize) { | --------- --------- these two types are declared with different lifetimes... ... -LL | a(x, y); //~ ERROR lifetime mismatch [E0623] +LL | a(x, y); | ^ ...but data from `y` flows into `x` here error[E0308]: mismatched types --> $DIR/region-lifetime-bounds-on-fns-where-clause.rs:20:43 | -LL | let _: fn(&mut &isize, &mut &isize) = a; //~ ERROR mismatched types +LL | let _: fn(&mut &isize, &mut &isize) = a; | ^ expected concrete lifetime, found bound lifetime parameter | = note: expected type `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)` diff --git a/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr b/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr index f36885f7aeb..3e42cfcffb4 100644 --- a/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr +++ b/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr @@ -4,7 +4,7 @@ error[E0623]: lifetime mismatch LL | fn b<'a, 'b, 'c>(x: &mut &'a isize, y: &mut &'b isize, z: &mut &'c isize) { | --------- --------- these two types are declared with different lifetimes... LL | // Illegal now because there is no `'b:'a` declaration. -LL | *x = *y; //~ ERROR E0623 +LL | *x = *y; | ^^ ...but data from `y` flows into `x` here error[E0623]: lifetime mismatch @@ -15,7 +15,7 @@ LL | fn b<'a, 'b, 'c>(x: &mut &'a isize, y: &mut &'b isize, z: &mut &'c isize) { | | | these two types are declared with different lifetimes... ... -LL | *z = *y; //~ ERROR E0623 +LL | *z = *y; | ^^ ...but data from `y` flows into `z` here error[E0623]: lifetime mismatch @@ -24,13 +24,13 @@ error[E0623]: lifetime mismatch LL | fn c<'a,'b, 'c>(x: &mut &'a isize, y: &mut &'b isize, z: &mut &'c isize) { | --------- --------- these two types are declared with different lifetimes... ... -LL | a(x, y, z); //~ ERROR lifetime mismatch [E0623] +LL | a(x, y, z); | ^ ...but data from `y` flows into `x` here error[E0308]: mismatched types --> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:22:56 | -LL | let _: fn(&mut &isize, &mut &isize, &mut &isize) = a; //~ ERROR E0308 +LL | let _: fn(&mut &isize, &mut &isize, &mut &isize) = a; | ^ expected concrete lifetime, found bound lifetime parameter | = note: expected type `for<'r, 's, 't0, 't1, 't2, 't3> fn(&'r mut &'s isize, &'t0 mut &'t1 isize, &'t2 mut &'t3 isize)` diff --git a/src/test/ui/regions/region-object-lifetime-2.stderr b/src/test/ui/regions/region-object-lifetime-2.stderr index f1e87ebf474..8817ad1c9f7 100644 --- a/src/test/ui/regions/region-object-lifetime-2.stderr +++ b/src/test/ui/regions/region-object-lifetime-2.stderr @@ -1,7 +1,7 @@ error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements --> $DIR/region-object-lifetime-2.rs:10:7 | -LL | x.borrowed() //~ ERROR cannot infer +LL | x.borrowed() | ^^^^^^^^ | note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 9:42... @@ -12,7 +12,7 @@ LL | fn borrowed_receiver_different_lifetimes<'a,'b>(x: &'a Foo) -> &'b () { note: ...so that reference does not outlive borrowed content --> $DIR/region-object-lifetime-2.rs:10:5 | -LL | x.borrowed() //~ ERROR cannot infer +LL | x.borrowed() | ^ note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 9:45... --> $DIR/region-object-lifetime-2.rs:9:45 @@ -22,7 +22,7 @@ LL | fn borrowed_receiver_different_lifetimes<'a,'b>(x: &'a Foo) -> &'b () { note: ...so that reference does not outlive borrowed content --> $DIR/region-object-lifetime-2.rs:10:5 | -LL | x.borrowed() //~ ERROR cannot infer +LL | x.borrowed() | ^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/regions/region-object-lifetime-4.stderr b/src/test/ui/regions/region-object-lifetime-4.stderr index 862a469ddb9..fee7f40efd4 100644 --- a/src/test/ui/regions/region-object-lifetime-4.stderr +++ b/src/test/ui/regions/region-object-lifetime-4.stderr @@ -1,7 +1,7 @@ error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements --> $DIR/region-object-lifetime-4.rs:12:7 | -LL | x.borrowed() //~ ERROR cannot infer +LL | x.borrowed() | ^^^^^^^^ | note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 11:41... @@ -12,7 +12,7 @@ LL | fn borrowed_receiver_related_lifetimes2<'a,'b>(x: &'a (Foo+'b)) -> &'b () { note: ...so that reference does not outlive borrowed content --> $DIR/region-object-lifetime-4.rs:12:5 | -LL | x.borrowed() //~ ERROR cannot infer +LL | x.borrowed() | ^ note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 11:44... --> $DIR/region-object-lifetime-4.rs:11:44 @@ -22,7 +22,7 @@ LL | fn borrowed_receiver_related_lifetimes2<'a,'b>(x: &'a (Foo+'b)) -> &'b () { note: ...so that reference does not outlive borrowed content --> $DIR/region-object-lifetime-4.rs:12:5 | -LL | x.borrowed() //~ ERROR cannot infer +LL | x.borrowed() | ^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/regions/region-object-lifetime-5.stderr b/src/test/ui/regions/region-object-lifetime-5.stderr index 002bae18b1c..1efaee181cb 100644 --- a/src/test/ui/regions/region-object-lifetime-5.stderr +++ b/src/test/ui/regions/region-object-lifetime-5.stderr @@ -1,7 +1,7 @@ error[E0597]: `*x` does not live long enough --> $DIR/region-object-lifetime-5.rs:11:5 | -LL | x.borrowed() //~ ERROR `*x` does not live long enough +LL | x.borrowed() | ^ borrowed value does not live long enough LL | } | - borrowed value only lives until here diff --git a/src/test/ui/regions/regions-addr-of-arg.stderr b/src/test/ui/regions/regions-addr-of-arg.stderr index 61e28b8bbea..3e76a7dda99 100644 --- a/src/test/ui/regions/regions-addr-of-arg.stderr +++ b/src/test/ui/regions/regions-addr-of-arg.stderr @@ -1,7 +1,7 @@ error[E0597]: `a` does not live long enough --> $DIR/regions-addr-of-arg.rs:5:31 | -LL | let _p: &'static isize = &a; //~ ERROR `a` does not live long enough +LL | let _p: &'static isize = &a; | ^ borrowed value does not live long enough LL | } | - borrowed value only lives until here @@ -11,7 +11,7 @@ LL | } error[E0597]: `a` does not live long enough --> $DIR/regions-addr-of-arg.rs:13:6 | -LL | &a //~ ERROR `a` does not live long enough +LL | &a | ^ borrowed value does not live long enough LL | } | - borrowed value only lives until here diff --git a/src/test/ui/regions/regions-addr-of-self.stderr b/src/test/ui/regions/regions-addr-of-self.stderr index 2ea8aecacda..a0b8b6b51e5 100644 --- a/src/test/ui/regions/regions-addr-of-self.stderr +++ b/src/test/ui/regions/regions-addr-of-self.stderr @@ -1,27 +1,27 @@ error[E0495]: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements --> $DIR/regions-addr-of-self.rs:7:37 | -LL | let p: &'static mut usize = &mut self.cats_chased; //~ ERROR cannot infer +LL | let p: &'static mut usize = &mut self.cats_chased; | ^^^^^^^^^^^^^^^^^^^^^ | note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 6:5... --> $DIR/regions-addr-of-self.rs:6:5 | LL | / pub fn chase_cat(&mut self) { -LL | | let p: &'static mut usize = &mut self.cats_chased; //~ ERROR cannot infer +LL | | let p: &'static mut usize = &mut self.cats_chased; LL | | *p += 1; LL | | } | |_____^ note: ...so that reference does not outlive borrowed content --> $DIR/regions-addr-of-self.rs:7:37 | -LL | let p: &'static mut usize = &mut self.cats_chased; //~ ERROR cannot infer +LL | let p: &'static mut usize = &mut self.cats_chased; | ^^^^^^^^^^^^^^^^^^^^^ = note: but, the lifetime must be valid for the static lifetime... note: ...so that reference does not outlive borrowed content --> $DIR/regions-addr-of-self.rs:7:37 | -LL | let p: &'static mut usize = &mut self.cats_chased; //~ ERROR cannot infer +LL | let p: &'static mut usize = &mut self.cats_chased; | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/regions/regions-addr-of-upvar-self.stderr b/src/test/ui/regions/regions-addr-of-upvar-self.stderr index 97470aae54a..01b2631a537 100644 --- a/src/test/ui/regions/regions-addr-of-upvar-self.stderr +++ b/src/test/ui/regions/regions-addr-of-upvar-self.stderr @@ -1,7 +1,7 @@ error[E0495]: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements --> $DIR/regions-addr-of-upvar-self.rs:10:41 | -LL | let p: &'static mut usize = &mut self.food; //~ ERROR cannot infer +LL | let p: &'static mut usize = &mut self.food; | ^^^^^^^^^^^^^^ | note: first, the lifetime cannot outlive the lifetime as defined on the body at 9:18... @@ -12,13 +12,13 @@ LL | let _f = || { note: ...so that reference does not outlive borrowed content --> $DIR/regions-addr-of-upvar-self.rs:10:41 | -LL | let p: &'static mut usize = &mut self.food; //~ ERROR cannot infer +LL | let p: &'static mut usize = &mut self.food; | ^^^^^^^^^^^^^^ = note: but, the lifetime must be valid for the static lifetime... note: ...so that reference does not outlive borrowed content --> $DIR/regions-addr-of-upvar-self.rs:10:41 | -LL | let p: &'static mut usize = &mut self.food; //~ ERROR cannot infer +LL | let p: &'static mut usize = &mut self.food; | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/regions/regions-adjusted-lvalue-op.stderr b/src/test/ui/regions/regions-adjusted-lvalue-op.stderr index 9988289b91e..2c4c75f323c 100644 --- a/src/test/ui/regions/regions-adjusted-lvalue-op.stderr +++ b/src/test/ui/regions/regions-adjusted-lvalue-op.stderr @@ -1,7 +1,7 @@ error[E0502]: cannot borrow `v` as immutable because it is also borrowed as mutable --> $DIR/regions-adjusted-lvalue-op.rs:14:17 | -LL | v[0].oh_no(&v); //~ ERROR cannot borrow `v` as immutable because +LL | v[0].oh_no(&v); | - ^- mutable borrow ends here | | | | | immutable borrow occurs here @@ -10,7 +10,7 @@ LL | v[0].oh_no(&v); //~ ERROR cannot borrow `v` as immutable because error[E0502]: cannot borrow `v` as immutable because it is also borrowed as mutable --> $DIR/regions-adjusted-lvalue-op.rs:15:17 | -LL | (*v).oh_no(&v); //~ ERROR cannot borrow `v` as immutable because +LL | (*v).oh_no(&v); | - ^- mutable borrow ends here | | | | | immutable borrow occurs here diff --git a/src/test/ui/regions/regions-bounded-by-trait-requiring-static.stderr b/src/test/ui/regions/regions-bounded-by-trait-requiring-static.stderr index dbda9f4067b..c72d6483c28 100644 --- a/src/test/ui/regions/regions-bounded-by-trait-requiring-static.stderr +++ b/src/test/ui/regions/regions-bounded-by-trait-requiring-static.stderr @@ -1,7 +1,7 @@ error[E0477]: the type `&'a isize` does not fulfill the required lifetime --> $DIR/regions-bounded-by-trait-requiring-static.rs:22:5 | -LL | assert_send::<&'a isize>(); //~ ERROR does not fulfill the required lifetime +LL | assert_send::<&'a isize>(); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: type must satisfy the static lifetime @@ -9,7 +9,7 @@ LL | assert_send::<&'a isize>(); //~ ERROR does not fulfill the required lif error[E0477]: the type `&'a str` does not fulfill the required lifetime --> $DIR/regions-bounded-by-trait-requiring-static.rs:26:5 | -LL | assert_send::<&'a str>(); //~ ERROR does not fulfill the required lifetime +LL | assert_send::<&'a str>(); | ^^^^^^^^^^^^^^^^^^^^^^ | = note: type must satisfy the static lifetime @@ -17,7 +17,7 @@ LL | assert_send::<&'a str>(); //~ ERROR does not fulfill the required lifet error[E0477]: the type `&'a [isize]` does not fulfill the required lifetime --> $DIR/regions-bounded-by-trait-requiring-static.rs:30:5 | -LL | assert_send::<&'a [isize]>(); //~ ERROR does not fulfill the required lifetime +LL | assert_send::<&'a [isize]>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: type must satisfy the static lifetime @@ -25,7 +25,7 @@ LL | assert_send::<&'a [isize]>(); //~ ERROR does not fulfill the required l error[E0477]: the type `std::boxed::Box<&'a isize>` does not fulfill the required lifetime --> $DIR/regions-bounded-by-trait-requiring-static.rs:44:5 | -LL | assert_send::>(); //~ ERROR does not fulfill the required lifetime +LL | assert_send::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: type must satisfy the static lifetime @@ -33,7 +33,7 @@ LL | assert_send::>(); //~ ERROR does not fulfill the require error[E0477]: the type `*const &'a isize` does not fulfill the required lifetime --> $DIR/regions-bounded-by-trait-requiring-static.rs:55:5 | -LL | assert_send::<*const &'a isize>(); //~ ERROR does not fulfill the required lifetime +LL | assert_send::<*const &'a isize>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: type must satisfy the static lifetime @@ -41,7 +41,7 @@ LL | assert_send::<*const &'a isize>(); //~ ERROR does not fulfill the requi error[E0477]: the type `*mut &'a isize` does not fulfill the required lifetime --> $DIR/regions-bounded-by-trait-requiring-static.rs:59:5 | -LL | assert_send::<*mut &'a isize>(); //~ ERROR does not fulfill the required lifetime +LL | assert_send::<*mut &'a isize>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: type must satisfy the static lifetime diff --git a/src/test/ui/regions/regions-bounded-method-type-parameters-cross-crate.stderr b/src/test/ui/regions/regions-bounded-method-type-parameters-cross-crate.stderr index 50339590ee5..eb205a303db 100644 --- a/src/test/ui/regions/regions-bounded-method-type-parameters-cross-crate.stderr +++ b/src/test/ui/regions/regions-bounded-method-type-parameters-cross-crate.stderr @@ -4,7 +4,7 @@ error[E0623]: lifetime mismatch LL | fn call_bigger_region<'x, 'y>(a: Inv<'x>, b: Inv<'y>) { | ------- ------- these two types are declared with different lifetimes... LL | // Here the value provided for 'y is 'y, and hence 'y:'x does not hold. -LL | a.bigger_region(b) //~ ERROR lifetime mismatch [E0623] +LL | a.bigger_region(b) | ^^^^^^^^^^^^^ ...but data from `b` flows into `a` here error: aborting due to previous error diff --git a/src/test/ui/regions/regions-bounded-method-type-parameters-trait-bound.stderr b/src/test/ui/regions/regions-bounded-method-type-parameters-trait-bound.stderr index c9cbacded90..de1073cd1d9 100644 --- a/src/test/ui/regions/regions-bounded-method-type-parameters-trait-bound.stderr +++ b/src/test/ui/regions/regions-bounded-method-type-parameters-trait-bound.stderr @@ -4,7 +4,7 @@ error[E0623]: lifetime mismatch LL | fn caller2<'a,'b,F:Foo<'a>>(a: Inv<'a>, b: Inv<'b>, f: F) { | ------- ------- these two types are declared with different lifetimes... LL | // Here the value provided for 'y is 'b, and hence 'b:'a does not hold. -LL | f.method(b); //~ ERROR lifetime mismatch [E0623] +LL | f.method(b); | ^^^^^^ ...but data from `b` flows into `a` here error: aborting due to previous error diff --git a/src/test/ui/regions/regions-bounds.stderr b/src/test/ui/regions/regions-bounds.stderr index 95857e98775..27eb8891c6c 100644 --- a/src/test/ui/regions/regions-bounds.stderr +++ b/src/test/ui/regions/regions-bounds.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/regions-bounds.rs:9:12 | -LL | return e; //~ ERROR mismatched types +LL | return e; | ^ lifetime mismatch | = note: expected type `TupleStruct<'b>` @@ -20,7 +20,7 @@ LL | fn a_fn1<'a,'b>(e: TupleStruct<'a>) -> TupleStruct<'b> { error[E0308]: mismatched types --> $DIR/regions-bounds.rs:13:12 | -LL | return e; //~ ERROR mismatched types +LL | return e; | ^ lifetime mismatch | = note: expected type `Struct<'b>` diff --git a/src/test/ui/regions/regions-close-associated-type-into-object.stderr b/src/test/ui/regions/regions-close-associated-type-into-object.stderr index 182081ede0c..89c0c253426 100644 --- a/src/test/ui/regions/regions-close-associated-type-into-object.stderr +++ b/src/test/ui/regions/regions-close-associated-type-into-object.stderr @@ -1,53 +1,53 @@ error[E0310]: the associated type `::Item` may not live long enough --> $DIR/regions-close-associated-type-into-object.rs:15:5 | -LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough +LL | Box::new(item) | ^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: 'static`... note: ...so that the type `::Item` will meet its required lifetime bounds --> $DIR/regions-close-associated-type-into-object.rs:15:5 | -LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough +LL | Box::new(item) | ^^^^^^^^^^^^^^ error[E0310]: the associated type `::Item` may not live long enough --> $DIR/regions-close-associated-type-into-object.rs:22:5 | -LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough +LL | Box::new(item) | ^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: 'static`... note: ...so that the type `std::boxed::Box<::Item>` will meet its required lifetime bounds --> $DIR/regions-close-associated-type-into-object.rs:22:5 | -LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough +LL | Box::new(item) | ^^^^^^^^^^^^^^ error[E0309]: the associated type `::Item` may not live long enough --> $DIR/regions-close-associated-type-into-object.rs:28:5 | -LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough +LL | Box::new(item) | ^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: 'a`... note: ...so that the type `::Item` will meet its required lifetime bounds --> $DIR/regions-close-associated-type-into-object.rs:28:5 | -LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough +LL | Box::new(item) | ^^^^^^^^^^^^^^ error[E0309]: the associated type `::Item` may not live long enough --> $DIR/regions-close-associated-type-into-object.rs:35:5 | -LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough +LL | Box::new(item) | ^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: 'a`... note: ...so that the type `std::boxed::Box<::Item>` will meet its required lifetime bounds --> $DIR/regions-close-associated-type-into-object.rs:35:5 | -LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough +LL | Box::new(item) | ^^^^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/regions/regions-close-object-into-object-1.stderr b/src/test/ui/regions/regions-close-object-into-object-1.stderr index 817f664db45..c7bde8dbd6d 100644 --- a/src/test/ui/regions/regions-close-object-into-object-1.stderr +++ b/src/test/ui/regions/regions-close-object-into-object-1.stderr @@ -1,7 +1,7 @@ error[E0597]: `*v` does not live long enough --> $DIR/regions-close-object-into-object-1.rs:12:12 | -LL | box B(&*v) as Box //~ ERROR `*v` does not live long enough +LL | box B(&*v) as Box | ^^ borrowed value does not live long enough LL | } | - borrowed value only lives until here diff --git a/src/test/ui/regions/regions-close-object-into-object-2.stderr b/src/test/ui/regions/regions-close-object-into-object-2.stderr index de9a250ced6..d5e228e1f0d 100644 --- a/src/test/ui/regions/regions-close-object-into-object-2.stderr +++ b/src/test/ui/regions/regions-close-object-into-object-2.stderr @@ -1,7 +1,7 @@ error[E0495]: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements --> $DIR/regions-close-object-into-object-2.rs:10:11 | -LL | box B(&*v) as Box //~ ERROR cannot infer +LL | box B(&*v) as Box | ^^^ | note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 9:6... @@ -12,7 +12,7 @@ LL | fn g<'a, T: 'static>(v: Box+'a>) -> Box { note: ...so that the type `(dyn A + 'a)` is not borrowed for too long --> $DIR/regions-close-object-into-object-2.rs:10:11 | -LL | box B(&*v) as Box //~ ERROR cannot infer +LL | box B(&*v) as Box | ^^^ = note: but, the lifetime must be valid for the static lifetime... = note: ...so that the expression is assignable: diff --git a/src/test/ui/regions/regions-close-object-into-object-3.stderr b/src/test/ui/regions/regions-close-object-into-object-3.stderr index 1736a5f215c..122e57a3250 100644 --- a/src/test/ui/regions/regions-close-object-into-object-3.stderr +++ b/src/test/ui/regions/regions-close-object-into-object-3.stderr @@ -1,7 +1,7 @@ error[E0597]: `*v` does not live long enough --> $DIR/regions-close-object-into-object-3.rs:11:12 | -LL | box B(&*v) as Box //~ ERROR `*v` does not live long enough +LL | box B(&*v) as Box | ^^ borrowed value does not live long enough LL | } | - borrowed value only lives until here diff --git a/src/test/ui/regions/regions-close-object-into-object-4.stderr b/src/test/ui/regions/regions-close-object-into-object-4.stderr index 87bf28d74d4..c9ad95d31d6 100644 --- a/src/test/ui/regions/regions-close-object-into-object-4.stderr +++ b/src/test/ui/regions/regions-close-object-into-object-4.stderr @@ -1,7 +1,7 @@ error[E0495]: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements --> $DIR/regions-close-object-into-object-4.rs:10:11 | -LL | box B(&*v) as Box //~ ERROR cannot infer +LL | box B(&*v) as Box | ^^^ | note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 9:6... @@ -12,7 +12,7 @@ LL | fn i<'a, T, U>(v: Box+'a>) -> Box { note: ...so that the type `(dyn A + 'a)` is not borrowed for too long --> $DIR/regions-close-object-into-object-4.rs:10:11 | -LL | box B(&*v) as Box //~ ERROR cannot infer +LL | box B(&*v) as Box | ^^^ = note: but, the lifetime must be valid for the static lifetime... = note: ...so that the expression is assignable: diff --git a/src/test/ui/regions/regions-close-over-type-parameter-multiple.stderr b/src/test/ui/regions/regions-close-over-type-parameter-multiple.stderr index 4803ae84415..68809eb548b 100644 --- a/src/test/ui/regions/regions-close-over-type-parameter-multiple.stderr +++ b/src/test/ui/regions/regions-close-over-type-parameter-multiple.stderr @@ -1,7 +1,7 @@ error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements --> $DIR/regions-close-over-type-parameter-multiple.rs:20:5 | -LL | box v as Box //~ ERROR cannot infer an appropriate lifetime +LL | box v as Box | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 18:20... @@ -12,7 +12,7 @@ LL | fn make_object_bad<'a,'b,'c,A:SomeTrait+'a+'b>(v: A) -> Box { note: ...so that the declared lifetime parameter bounds are satisfied --> $DIR/regions-close-over-type-parameter-multiple.rs:20:5 | -LL | box v as Box //~ ERROR cannot infer an appropriate lifetime +LL | box v as Box | ^^^^^^^^^^^^^^^^^^^^^^^^^^ note: but, the lifetime must be valid for the lifetime 'c as defined on the function body at 18:26... --> $DIR/regions-close-over-type-parameter-multiple.rs:18:26 diff --git a/src/test/ui/regions/regions-close-param-into-object.stderr b/src/test/ui/regions/regions-close-param-into-object.stderr index 58028fc7bd8..a7f05723817 100644 --- a/src/test/ui/regions/regions-close-param-into-object.stderr +++ b/src/test/ui/regions/regions-close-param-into-object.stderr @@ -4,13 +4,13 @@ error[E0310]: the parameter type `T` may not live long enough LL | fn p1(v: T) -> Box | - help: consider adding an explicit lifetime bound `T: 'static`... ... -LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough +LL | Box::new(v) | ^^^^^^^^^^^ | note: ...so that the type `T` will meet its required lifetime bounds --> $DIR/regions-close-param-into-object.rs:6:5 | -LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough +LL | Box::new(v) | ^^^^^^^^^^^ error[E0310]: the parameter type `T` may not live long enough @@ -19,13 +19,13 @@ error[E0310]: the parameter type `T` may not live long enough LL | fn p2(v: Box) -> Box | - help: consider adding an explicit lifetime bound `T: 'static`... ... -LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough +LL | Box::new(v) | ^^^^^^^^^^^ | note: ...so that the type `std::boxed::Box` will meet its required lifetime bounds --> $DIR/regions-close-param-into-object.rs:12:5 | -LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough +LL | Box::new(v) | ^^^^^^^^^^^ error[E0309]: the parameter type `T` may not live long enough @@ -34,13 +34,13 @@ error[E0309]: the parameter type `T` may not live long enough LL | fn p3<'a,T>(v: T) -> Box | - help: consider adding an explicit lifetime bound `T: 'a`... ... -LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough +LL | Box::new(v) | ^^^^^^^^^^^ | note: ...so that the type `T` will meet its required lifetime bounds --> $DIR/regions-close-param-into-object.rs:18:5 | -LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough +LL | Box::new(v) | ^^^^^^^^^^^ error[E0309]: the parameter type `T` may not live long enough @@ -49,13 +49,13 @@ error[E0309]: the parameter type `T` may not live long enough LL | fn p4<'a,T>(v: Box) -> Box | - help: consider adding an explicit lifetime bound `T: 'a`... ... -LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough +LL | Box::new(v) | ^^^^^^^^^^^ | note: ...so that the type `std::boxed::Box` will meet its required lifetime bounds --> $DIR/regions-close-param-into-object.rs:24:5 | -LL | Box::new(v) //~ ERROR parameter type `T` may not live long enough +LL | Box::new(v) | ^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/regions/regions-creating-enums.stderr b/src/test/ui/regions/regions-creating-enums.stderr index 36cd6d0c22e..bb11be9b758 100644 --- a/src/test/ui/regions/regions-creating-enums.stderr +++ b/src/test/ui/regions/regions-creating-enums.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/regions-creating-enums.rs:23:17 | -LL | return &Ast::Num((*f)(x)); //~ ERROR borrowed value does not live long enough +LL | return &Ast::Num((*f)(x)); | ^^^^^^^^^^^^^^^^^- temporary value only lives until here | | | temporary value does not live long enough @@ -16,7 +16,7 @@ LL | fn map_nums<'a,'b, F>(x: &Ast, f: &mut F) -> &'a Ast<'b> where F: FnMut(usi error[E0597]: borrowed value does not live long enough --> $DIR/regions-creating-enums.rs:28:17 | -LL | return &Ast::Add(m_x, m_y); //~ ERROR borrowed value does not live long enough +LL | return &Ast::Add(m_x, m_y); | ^^^^^^^^^^^^^^^^^^- temporary value only lives until here | | | temporary value does not live long enough diff --git a/src/test/ui/regions/regions-creating-enums3.stderr b/src/test/ui/regions/regions-creating-enums3.stderr index 2a0efaa598c..2fc1fc3f681 100644 --- a/src/test/ui/regions/regions-creating-enums3.stderr +++ b/src/test/ui/regions/regions-creating-enums3.stderr @@ -5,7 +5,7 @@ LL | fn mk_add_bad1<'a,'b>(x: &'a Ast<'a>, y: &'b Ast<'b>) -> Ast<'a> { | ----------- ------- | | | this parameter and the return type are declared with different lifetimes... -LL | Ast::Add(x, y) //~ ERROR lifetime mismatch [E0623] +LL | Ast::Add(x, y) | ^^^^^^^^^^^^^^ ...but data from `y` is returned here error: aborting due to previous error diff --git a/src/test/ui/regions/regions-creating-enums4.stderr b/src/test/ui/regions/regions-creating-enums4.stderr index 569530768b8..4d00783d180 100644 --- a/src/test/ui/regions/regions-creating-enums4.stderr +++ b/src/test/ui/regions/regions-creating-enums4.stderr @@ -1,7 +1,7 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements --> $DIR/regions-creating-enums4.rs:7:5 | -LL | Ast::Add(x, y) //~ ERROR cannot infer +LL | Ast::Add(x, y) | ^^^^^^^^ | note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 6:16... diff --git a/src/test/ui/regions/regions-enum-not-wf.stderr b/src/test/ui/regions/regions-enum-not-wf.stderr index d10f7ed28fc..87014085667 100644 --- a/src/test/ui/regions/regions-enum-not-wf.stderr +++ b/src/test/ui/regions/regions-enum-not-wf.stderr @@ -3,13 +3,13 @@ error[E0309]: the parameter type `T` may not live long enough | LL | enum Ref1<'a, T> { | - help: consider adding an explicit lifetime bound `T: 'a`... -LL | Ref1Variant1(RequireOutlives<'a, T>) //~ ERROR the parameter type `T` may not live long enough +LL | Ref1Variant1(RequireOutlives<'a, T>) | ^^^^^^^^^^^^^^^^^^^^^^ | note: ...so that the type `T` will meet its required lifetime bounds --> $DIR/regions-enum-not-wf.rs:18:18 | -LL | Ref1Variant1(RequireOutlives<'a, T>) //~ ERROR the parameter type `T` may not live long enough +LL | Ref1Variant1(RequireOutlives<'a, T>) | ^^^^^^^^^^^^^^^^^^^^^^ error[E0309]: the parameter type `T` may not live long enough @@ -18,40 +18,40 @@ error[E0309]: the parameter type `T` may not live long enough LL | enum Ref2<'a, T> { | - help: consider adding an explicit lifetime bound `T: 'a`... LL | Ref2Variant1, -LL | Ref2Variant2(isize, RequireOutlives<'a, T>), //~ ERROR the parameter type `T` may not live long enough +LL | Ref2Variant2(isize, RequireOutlives<'a, T>), | ^^^^^^^^^^^^^^^^^^^^^^ | note: ...so that the type `T` will meet its required lifetime bounds --> $DIR/regions-enum-not-wf.rs:23:25 | -LL | Ref2Variant2(isize, RequireOutlives<'a, T>), //~ ERROR the parameter type `T` may not live long enough +LL | Ref2Variant2(isize, RequireOutlives<'a, T>), | ^^^^^^^^^^^^^^^^^^^^^^ error[E0309]: the parameter type `T` may not live long enough --> $DIR/regions-enum-not-wf.rs:35:1 | -LL | enum RefDouble<'a, 'b, T> { //~ ERROR the parameter type `T` may not live long enough [E0309] +LL | enum RefDouble<'a, 'b, T> { | ^ - help: consider adding an explicit lifetime bound `T: 'b`... | _| | | LL | | RefDoubleVariant1(&'a RequireOutlives<'b, T>) -LL | | //~^ the parameter type `T` may not live long enough [E0309] +LL | | LL | | } | |_^ | note: ...so that the type `T` will meet its required lifetime bounds --> $DIR/regions-enum-not-wf.rs:35:1 | -LL | / enum RefDouble<'a, 'b, T> { //~ ERROR the parameter type `T` may not live long enough [E0309] +LL | / enum RefDouble<'a, 'b, T> { LL | | RefDoubleVariant1(&'a RequireOutlives<'b, T>) -LL | | //~^ the parameter type `T` may not live long enough [E0309] +LL | | LL | | } | |_^ error[E0309]: the parameter type `T` may not live long enough --> $DIR/regions-enum-not-wf.rs:36:23 | -LL | enum RefDouble<'a, 'b, T> { //~ ERROR the parameter type `T` may not live long enough [E0309] +LL | enum RefDouble<'a, 'b, T> { | - help: consider adding an explicit lifetime bound `T: 'b`... LL | RefDoubleVariant1(&'a RequireOutlives<'b, T>) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/regions/regions-escape-method.stderr b/src/test/ui/regions/regions-escape-method.stderr index 8575a24281d..b93dd0d4c57 100644 --- a/src/test/ui/regions/regions-escape-method.stderr +++ b/src/test/ui/regions/regions-escape-method.stderr @@ -1,13 +1,13 @@ error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements --> $DIR/regions-escape-method.rs:15:13 | -LL | s.f(|p| p) //~ ERROR cannot infer +LL | s.f(|p| p) | ^ | note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 15:9... --> $DIR/regions-escape-method.rs:15:9 | -LL | s.f(|p| p) //~ ERROR cannot infer +LL | s.f(|p| p) | ^^^^^ = note: ...so that the expression is assignable: expected &i32 @@ -15,12 +15,12 @@ LL | s.f(|p| p) //~ ERROR cannot infer note: but, the lifetime must be valid for the method call at 15:5... --> $DIR/regions-escape-method.rs:15:5 | -LL | s.f(|p| p) //~ ERROR cannot infer +LL | s.f(|p| p) | ^^^^^^^^^^ note: ...so that a type/lifetime parameter is in scope here --> $DIR/regions-escape-method.rs:15:5 | -LL | s.f(|p| p) //~ ERROR cannot infer +LL | s.f(|p| p) | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/regions/regions-escape-via-trait-or-not.stderr b/src/test/ui/regions/regions-escape-via-trait-or-not.stderr index 8f4bfd889a8..a6b165e2d44 100644 --- a/src/test/ui/regions/regions-escape-via-trait-or-not.stderr +++ b/src/test/ui/regions/regions-escape-via-trait-or-not.stderr @@ -1,13 +1,13 @@ error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements --> $DIR/regions-escape-via-trait-or-not.rs:18:14 | -LL | with(|o| o) //~ ERROR cannot infer +LL | with(|o| o) | ^ | note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 18:10... --> $DIR/regions-escape-via-trait-or-not.rs:18:10 | -LL | with(|o| o) //~ ERROR cannot infer +LL | with(|o| o) | ^^^^^ = note: ...so that the expression is assignable: expected &isize @@ -15,12 +15,12 @@ LL | with(|o| o) //~ ERROR cannot infer note: but, the lifetime must be valid for the expression at 18:5... --> $DIR/regions-escape-via-trait-or-not.rs:18:5 | -LL | with(|o| o) //~ ERROR cannot infer +LL | with(|o| o) | ^^^^ note: ...so type `fn([closure@$DIR/regions-escape-via-trait-or-not.rs:18:10: 18:15]) -> isize {with::<&isize, [closure@$DIR/regions-escape-via-trait-or-not.rs:18:10: 18:15]>}` of expression is valid during the expression --> $DIR/regions-escape-via-trait-or-not.rs:18:5 | -LL | with(|o| o) //~ ERROR cannot infer +LL | with(|o| o) | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/regions/regions-fn-subtyping-return-static.stderr b/src/test/ui/regions/regions-fn-subtyping-return-static.stderr index 42a5a7c806e..cda5ce273bd 100644 --- a/src/test/ui/regions/regions-fn-subtyping-return-static.stderr +++ b/src/test/ui/regions/regions-fn-subtyping-return-static.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/regions-fn-subtyping-return-static.rs:41:12 | -LL | want_F(bar); //~ ERROR mismatched types +LL | want_F(bar); | ^^^ expected concrete lifetime, found bound lifetime parameter 'cx | = note: expected type `for<'cx> fn(&'cx S) -> &'cx S` diff --git a/src/test/ui/regions/regions-free-region-ordering-callee-4.stderr b/src/test/ui/regions/regions-free-region-ordering-callee-4.stderr index e3f42d59228..3b8f09f1ad8 100644 --- a/src/test/ui/regions/regions-free-region-ordering-callee-4.stderr +++ b/src/test/ui/regions/regions-free-region-ordering-callee-4.stderr @@ -2,7 +2,7 @@ error[E0491]: in type `&'a &'b usize`, reference has a longer lifetime than the --> $DIR/regions-free-region-ordering-callee-4.rs:5:1 | LL | / fn ordering4<'a, 'b, F>(a: &'a usize, b: &'b usize, x: F) where F: FnOnce(&'a &'b usize) { -LL | | //~^ ERROR reference has a longer lifetime than the data it references +LL | | LL | | // Do not infer ordering from closure argument types. LL | | let z: Option<&'a &'b usize> = None; LL | | } diff --git a/src/test/ui/regions/regions-free-region-ordering-callee.stderr b/src/test/ui/regions/regions-free-region-ordering-callee.stderr index b5c66386341..4648bf046bc 100644 --- a/src/test/ui/regions/regions-free-region-ordering-callee.stderr +++ b/src/test/ui/regions/regions-free-region-ordering-callee.stderr @@ -6,7 +6,7 @@ LL | fn ordering2<'a, 'b>(x: &'a &'b usize, y: &'a usize) -> &'b usize { | | | this parameter and the return type are declared with different lifetimes... LL | // However, it is not safe to assume that 'b <= 'a -LL | &*y //~ ERROR lifetime mismatch [E0623] +LL | &*y | ^^^ ...but data from `x` is returned here error[E0623]: lifetime mismatch diff --git a/src/test/ui/regions/regions-free-region-ordering-incorrect.stderr b/src/test/ui/regions/regions-free-region-ordering-incorrect.stderr index 12e08072676..676e96a038b 100644 --- a/src/test/ui/regions/regions-free-region-ordering-incorrect.stderr +++ b/src/test/ui/regions/regions-free-region-ordering-incorrect.stderr @@ -1,7 +1,7 @@ error[E0495]: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements --> $DIR/regions-free-region-ordering-incorrect.rs:17:21 | -LL | None => &self.val //~ ERROR cannot infer +LL | None => &self.val | ^^^^^^^^^ | note: first, the lifetime cannot outlive the lifetime 'a as defined on the method body at 14:12... @@ -12,7 +12,7 @@ LL | fn get<'a>(&'a self) -> &'b T { note: ...so that reference does not outlive borrowed content --> $DIR/regions-free-region-ordering-incorrect.rs:17:21 | -LL | None => &self.val //~ ERROR cannot infer +LL | None => &self.val | ^^^^^^^^^ note: but, the lifetime must be valid for the lifetime 'b as defined on the impl at 13:6... --> $DIR/regions-free-region-ordering-incorrect.rs:13:6 @@ -24,7 +24,7 @@ note: ...so that reference does not outlive borrowed content | LL | / match self.next { LL | | Some(ref next) => next.get(), -LL | | None => &self.val //~ ERROR cannot infer +LL | | None => &self.val LL | | } | |_________^ diff --git a/src/test/ui/regions/regions-glb-free-free.stderr b/src/test/ui/regions/regions-glb-free-free.stderr index 23492b3c718..575037a0a4d 100644 --- a/src/test/ui/regions/regions-glb-free-free.stderr +++ b/src/test/ui/regions/regions-glb-free-free.stderr @@ -3,7 +3,7 @@ error[E0621]: explicit lifetime required in the type of `s` | LL | pub fn set_desc(self, s: &str) -> Flag<'a> { | ---- help: add explicit lifetime `'a` to the type of `s`: `&'a str` -LL | / Flag { //~ ERROR explicit lifetime required in the type of `s` [E0621] +LL | / Flag { LL | | name: self.name, LL | | desc: s, LL | | max_count: self.max_count, diff --git a/src/test/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr b/src/test/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr index e2a4a1eec42..ca86eb7edae 100644 --- a/src/test/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr +++ b/src/test/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr @@ -2,7 +2,7 @@ error[E0491]: in type `&'x (dyn for<'z> Trait1<>::Foo> + 'x) --> $DIR/regions-implied-bounds-projection-gap-hr-1.rs:21:1 | LL | / fn callee<'x, 'y, T>(t: &'x for<'z> Trait1< >::Foo >) -LL | | //~^ ERROR reference has a longer lifetime than the data it references +LL | | LL | | { LL | | } | |_^ diff --git a/src/test/ui/regions/regions-in-enums-anon.stderr b/src/test/ui/regions/regions-in-enums-anon.stderr index 9cfdb67939f..ae06e7653db 100644 --- a/src/test/ui/regions/regions-in-enums-anon.stderr +++ b/src/test/ui/regions/regions-in-enums-anon.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/regions-in-enums-anon.rs:4:9 | -LL | Bar(&isize) //~ ERROR missing lifetime specifier +LL | Bar(&isize) | ^ expected lifetime parameter error: aborting due to previous error diff --git a/src/test/ui/regions/regions-in-enums.stderr b/src/test/ui/regions/regions-in-enums.stderr index d0137d1afef..cfed9feba4b 100644 --- a/src/test/ui/regions/regions-in-enums.stderr +++ b/src/test/ui/regions/regions-in-enums.stderr @@ -1,13 +1,13 @@ error[E0261]: use of undeclared lifetime name `'foo` --> $DIR/regions-in-enums.rs:13:9 | -LL | X5(&'foo usize) //~ ERROR use of undeclared lifetime name `'foo` +LL | X5(&'foo usize) | ^^^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/regions-in-enums.rs:17:9 | -LL | X6(&'a usize) //~ ERROR use of undeclared lifetime name `'a` +LL | X6(&'a usize) | ^^ undeclared lifetime error: aborting due to 2 previous errors diff --git a/src/test/ui/regions/regions-in-structs-anon.stderr b/src/test/ui/regions/regions-in-structs-anon.stderr index 9defd82aed5..a1d4ebb597b 100644 --- a/src/test/ui/regions/regions-in-structs-anon.stderr +++ b/src/test/ui/regions/regions-in-structs-anon.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/regions-in-structs-anon.rs:4:8 | -LL | x: &isize //~ ERROR missing lifetime specifier +LL | x: &isize | ^ expected lifetime parameter error: aborting due to previous error diff --git a/src/test/ui/regions/regions-in-structs.stderr b/src/test/ui/regions/regions-in-structs.stderr index dea7f105418..8314942759d 100644 --- a/src/test/ui/regions/regions-in-structs.stderr +++ b/src/test/ui/regions/regions-in-structs.stderr @@ -1,13 +1,13 @@ error[E0261]: use of undeclared lifetime name `'a` --> $DIR/regions-in-structs.rs:10:9 | -LL | a: &'a isize, //~ ERROR use of undeclared lifetime name `'a` +LL | a: &'a isize, | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/regions-in-structs.rs:11:9 | -LL | b: &'a isize, //~ ERROR use of undeclared lifetime name `'a` +LL | b: &'a isize, | ^^ undeclared lifetime error: aborting due to 2 previous errors diff --git a/src/test/ui/regions/regions-infer-borrow-scope-too-big.stderr b/src/test/ui/regions/regions-infer-borrow-scope-too-big.stderr index 562ec649a48..ed4bc155040 100644 --- a/src/test/ui/regions/regions-infer-borrow-scope-too-big.stderr +++ b/src/test/ui/regions/regions-infer-borrow-scope-too-big.stderr @@ -1,7 +1,7 @@ error[E0597]: `*p` does not live long enough --> $DIR/regions-infer-borrow-scope-too-big.rs:11:23 | -LL | let xc = x_coord(&*p); //~ ERROR `*p` does not live long enough +LL | let xc = x_coord(&*p); | ^^ borrowed value does not live long enough ... LL | } diff --git a/src/test/ui/regions/regions-infer-bound-from-trait.stderr b/src/test/ui/regions/regions-infer-bound-from-trait.stderr index 100ac763358..382d932e81a 100644 --- a/src/test/ui/regions/regions-infer-bound-from-trait.stderr +++ b/src/test/ui/regions/regions-infer-bound-from-trait.stderr @@ -3,13 +3,13 @@ error[E0309]: the parameter type `A` may not live long enough | LL | fn bar1<'a,A>(x: Inv<'a>, a: A) { | - help: consider adding an explicit lifetime bound `A: 'a`... -LL | check_bound(x, a) //~ ERROR parameter type `A` may not live long enough +LL | check_bound(x, a) | ^^^^^^^^^^^ | note: ...so that the type `A` will meet its required lifetime bounds --> $DIR/regions-infer-bound-from-trait.rs:33:5 | -LL | check_bound(x, a) //~ ERROR parameter type `A` may not live long enough +LL | check_bound(x, a) | ^^^^^^^^^^^ error[E0309]: the parameter type `A` may not live long enough @@ -17,13 +17,13 @@ error[E0309]: the parameter type `A` may not live long enough | LL | fn bar2<'a,'b,A:Is<'b>>(x: Inv<'a>, y: Inv<'b>, a: A) { | -- help: consider adding an explicit lifetime bound `A: 'a`... -LL | check_bound(x, a) //~ ERROR parameter type `A` may not live long enough +LL | check_bound(x, a) | ^^^^^^^^^^^ | note: ...so that the type `A` will meet its required lifetime bounds --> $DIR/regions-infer-bound-from-trait.rs:37:5 | -LL | check_bound(x, a) //~ ERROR parameter type `A` may not live long enough +LL | check_bound(x, a) | ^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/regions/regions-infer-contravariance-due-to-decl.stderr b/src/test/ui/regions/regions-infer-contravariance-due-to-decl.stderr index 9dafc168086..f3a0358b90f 100644 --- a/src/test/ui/regions/regions-infer-contravariance-due-to-decl.stderr +++ b/src/test/ui/regions/regions-infer-contravariance-due-to-decl.stderr @@ -7,7 +7,7 @@ LL | s: &'short isize, LL | l: &'long isize, | ------------ ... -LL | let _: Contravariant<'long> = c; //~ ERROR E0623 +LL | let _: Contravariant<'long> = c; | ^ ...but data from `c` flows into `l` here error: aborting due to previous error diff --git a/src/test/ui/regions/regions-infer-covariance-due-to-decl.stderr b/src/test/ui/regions/regions-infer-covariance-due-to-decl.stderr index a4742703666..c3e2075fbc3 100644 --- a/src/test/ui/regions/regions-infer-covariance-due-to-decl.stderr +++ b/src/test/ui/regions/regions-infer-covariance-due-to-decl.stderr @@ -6,7 +6,7 @@ LL | fn use_<'short,'long>(c: Covariant<'long>, LL | s: &'short isize, | ------------- these two types are declared with different lifetimes... ... -LL | let _: Covariant<'short> = c; //~ ERROR E0623 +LL | let _: Covariant<'short> = c; | ^ ...but data from `s` flows into `c` here error: aborting due to previous error diff --git a/src/test/ui/regions/regions-infer-invariance-due-to-decl.stderr b/src/test/ui/regions/regions-infer-invariance-due-to-decl.stderr index 8d8c218958a..d31ed3ede36 100644 --- a/src/test/ui/regions/regions-infer-invariance-due-to-decl.stderr +++ b/src/test/ui/regions/regions-infer-invariance-due-to-decl.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/regions-infer-invariance-due-to-decl.rs:12:5 | -LL | b_isize //~ ERROR mismatched types +LL | b_isize | ^^^^^^^ lifetime mismatch | = note: expected type `Invariant<'static>` diff --git a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr index 7058757f908..f8bdd014db7 100644 --- a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr +++ b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/regions-infer-invariance-due-to-mutability-3.rs:10:5 | -LL | b_isize //~ ERROR mismatched types +LL | b_isize | ^^^^^^^ lifetime mismatch | = note: expected type `Invariant<'static>` diff --git a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr index 51b2330b658..1de6f22f08e 100644 --- a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr +++ b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/regions-infer-invariance-due-to-mutability-4.rs:10:5 | -LL | b_isize //~ ERROR mismatched types +LL | b_isize | ^^^^^^^ lifetime mismatch | = note: expected type `Invariant<'static>` diff --git a/src/test/ui/regions/regions-infer-not-param.stderr b/src/test/ui/regions/regions-infer-not-param.stderr index d0d41c271c6..f43ab829121 100644 --- a/src/test/ui/regions/regions-infer-not-param.stderr +++ b/src/test/ui/regions/regions-infer-not-param.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/regions-infer-not-param.rs:15:54 | -LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p } //~ ERROR mismatched types +LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p } | ^ lifetime mismatch | = note: expected type `Direct<'b>` @@ -9,18 +9,18 @@ LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p } //~ ERROR mismatch note: the lifetime 'a as defined on the function body at 15:16... --> $DIR/regions-infer-not-param.rs:15:16 | -LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p } //~ ERROR mismatched types +LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p } | ^^ note: ...does not necessarily outlive the lifetime 'b as defined on the function body at 15:19 --> $DIR/regions-infer-not-param.rs:15:19 | -LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p } //~ ERROR mismatched types +LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p } | ^^ error[E0308]: mismatched types --> $DIR/regions-infer-not-param.rs:19:63 | -LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } //~ ERROR mismatched types +LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } | ^ lifetime mismatch | = note: expected type `Indirect2<'b>` @@ -28,18 +28,18 @@ LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } //~ ERROR note: the lifetime 'a as defined on the function body at 19:19... --> $DIR/regions-infer-not-param.rs:19:19 | -LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } //~ ERROR mismatched types +LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } | ^^ note: ...does not necessarily outlive the lifetime 'b as defined on the function body at 19:22 --> $DIR/regions-infer-not-param.rs:19:22 | -LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } //~ ERROR mismatched types +LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } | ^^ error[E0308]: mismatched types --> $DIR/regions-infer-not-param.rs:19:63 | -LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } //~ ERROR mismatched types +LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } | ^ lifetime mismatch | = note: expected type `Indirect2<'b>` @@ -47,12 +47,12 @@ LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } //~ ERROR note: the lifetime 'b as defined on the function body at 19:22... --> $DIR/regions-infer-not-param.rs:19:22 | -LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } //~ ERROR mismatched types +LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } | ^^ note: ...does not necessarily outlive the lifetime 'a as defined on the function body at 19:19 --> $DIR/regions-infer-not-param.rs:19:19 | -LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } //~ ERROR mismatched types +LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } | ^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/regions/regions-infer-paramd-indirect.stderr b/src/test/ui/regions/regions-infer-paramd-indirect.stderr index 47de228e31d..1b999ed059c 100644 --- a/src/test/ui/regions/regions-infer-paramd-indirect.stderr +++ b/src/test/ui/regions/regions-infer-paramd-indirect.stderr @@ -11,10 +11,10 @@ note: the anonymous lifetime #2 defined on the method body at 21:5... | LL | / fn set_f_bad(&mut self, b: Box) { LL | | self.f = b; -LL | | //~^ ERROR mismatched types -LL | | //~| expected type `std::boxed::Box>` -LL | | //~| found type `std::boxed::Box>` -LL | | //~| lifetime mismatch +LL | | +LL | | +LL | | +LL | | LL | | } | |_____^ note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 16:6 diff --git a/src/test/ui/regions/regions-infer-proc-static-upvar.stderr b/src/test/ui/regions/regions-infer-proc-static-upvar.stderr index f929a06bad7..21b2e881a79 100644 --- a/src/test/ui/regions/regions-infer-proc-static-upvar.stderr +++ b/src/test/ui/regions/regions-infer-proc-static-upvar.stderr @@ -1,7 +1,7 @@ error[E0597]: `x` does not live long enough --> $DIR/regions-infer-proc-static-upvar.rs:10:14 | -LL | let y = &x; //~ ERROR `x` does not live long enough +LL | let y = &x; | ^ borrowed value does not live long enough ... LL | } diff --git a/src/test/ui/regions/regions-lifetime-bounds-on-fns.stderr b/src/test/ui/regions/regions-lifetime-bounds-on-fns.stderr index 99d85e9e4b5..46200e4d84b 100644 --- a/src/test/ui/regions/regions-lifetime-bounds-on-fns.stderr +++ b/src/test/ui/regions/regions-lifetime-bounds-on-fns.stderr @@ -4,7 +4,7 @@ error[E0623]: lifetime mismatch LL | fn b<'a, 'b>(x: &mut &'a isize, y: &mut &'b isize) { | --------- --------- these two types are declared with different lifetimes... LL | // Illegal now because there is no `'b:'a` declaration. -LL | *x = *y; //~ ERROR E0623 +LL | *x = *y; | ^^ ...but data from `y` flows into `x` here error[E0623]: lifetime mismatch @@ -13,13 +13,13 @@ error[E0623]: lifetime mismatch LL | fn c<'a,'b>(x: &mut &'a isize, y: &mut &'b isize) { | --------- --------- these two types are declared with different lifetimes... ... -LL | a(x, y); //~ ERROR lifetime mismatch [E0623] +LL | a(x, y); | ^ ...but data from `y` flows into `x` here error[E0308]: mismatched types --> $DIR/regions-lifetime-bounds-on-fns.rs:20:43 | -LL | let _: fn(&mut &isize, &mut &isize) = a; //~ ERROR E0308 +LL | let _: fn(&mut &isize, &mut &isize) = a; | ^ expected concrete lifetime, found bound lifetime parameter | = note: expected type `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)` diff --git a/src/test/ui/regions/regions-name-duplicated.stderr b/src/test/ui/regions/regions-name-duplicated.stderr index 1b552006a93..a7e03a61adc 100644 --- a/src/test/ui/regions/regions-name-duplicated.stderr +++ b/src/test/ui/regions/regions-name-duplicated.stderr @@ -1,7 +1,7 @@ error[E0263]: lifetime name `'a` declared twice in the same scope --> $DIR/regions-name-duplicated.rs:1:16 | -LL | struct Foo<'a, 'a> { //~ ERROR lifetime name `'a` declared twice +LL | struct Foo<'a, 'a> { | -- ^^ declared twice | | | previous declaration here diff --git a/src/test/ui/regions/regions-name-static.stderr b/src/test/ui/regions/regions-name-static.stderr index bf7b021f9fe..4b7026e65ea 100644 --- a/src/test/ui/regions/regions-name-static.stderr +++ b/src/test/ui/regions/regions-name-static.stderr @@ -1,7 +1,7 @@ error[E0262]: invalid lifetime parameter name: `'static` --> $DIR/regions-name-static.rs:1:12 | -LL | struct Foo<'static> { //~ ERROR invalid lifetime parameter name: `'static` +LL | struct Foo<'static> { | ^^^^^^^ 'static is a reserved lifetime name error: aborting due to previous error diff --git a/src/test/ui/regions/regions-name-undeclared.stderr b/src/test/ui/regions/regions-name-undeclared.stderr index 7b041d5dad5..4840d751f7f 100644 --- a/src/test/ui/regions/regions-name-undeclared.stderr +++ b/src/test/ui/regions/regions-name-undeclared.stderr @@ -1,67 +1,67 @@ error[E0261]: use of undeclared lifetime name `'b` --> $DIR/regions-name-undeclared.rs:15:24 | -LL | fn m4(&self, arg: &'b isize) { } //~ ERROR undeclared lifetime +LL | fn m4(&self, arg: &'b isize) { } | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/regions-name-undeclared.rs:16:12 | -LL | fn m5(&'b self) { } //~ ERROR undeclared lifetime +LL | fn m5(&'b self) { } | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/regions-name-undeclared.rs:17:27 | -LL | fn m6(&self, arg: Foo<'b>) { } //~ ERROR undeclared lifetime +LL | fn m6(&self, arg: Foo<'b>) { } | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/regions-name-undeclared.rs:25:22 | -LL | type X = Option<&'a isize>; //~ ERROR undeclared lifetime +LL | type X = Option<&'a isize>; | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/regions-name-undeclared.rs:27:13 | -LL | E1(&'a isize) //~ ERROR undeclared lifetime +LL | E1(&'a isize) | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/regions-name-undeclared.rs:30:13 | -LL | f: &'a isize //~ ERROR undeclared lifetime +LL | f: &'a isize | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/regions-name-undeclared.rs:32:14 | -LL | fn f(a: &'a isize) { } //~ ERROR undeclared lifetime +LL | fn f(a: &'a isize) { } | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/regions-name-undeclared.rs:40:17 | -LL | fn fn_types(a: &'a isize, //~ ERROR undeclared lifetime +LL | fn fn_types(a: &'a isize, | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/regions-name-undeclared.rs:42:36 | -LL | &'b isize, //~ ERROR undeclared lifetime +LL | &'b isize, | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'b` --> $DIR/regions-name-undeclared.rs:45:36 | -LL | &'b isize)>, //~ ERROR undeclared lifetime +LL | &'b isize)>, | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/regions-name-undeclared.rs:46:17 | -LL | c: &'a isize) //~ ERROR undeclared lifetime +LL | c: &'a isize) | ^^ undeclared lifetime error: aborting due to 11 previous errors diff --git a/src/test/ui/regions/regions-nested-fns-2.stderr b/src/test/ui/regions/regions-nested-fns-2.stderr index 924eac6fdd4..08bab6e9806 100644 --- a/src/test/ui/regions/regions-nested-fns-2.stderr +++ b/src/test/ui/regions/regions-nested-fns-2.stderr @@ -3,7 +3,7 @@ error[E0373]: closure may outlive the current function, but it borrows `y`, whic | LL | |z| { | ^^^ may outlive borrowed value `y` -LL | //~^ ERROR E0373 +LL | LL | if false { &y } else { z } | - `y` is borrowed here help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword diff --git a/src/test/ui/regions/regions-nested-fns.stderr b/src/test/ui/regions/regions-nested-fns.stderr index d6d4c44de61..3cecd4ee83c 100644 --- a/src/test/ui/regions/regions-nested-fns.stderr +++ b/src/test/ui/regions/regions-nested-fns.stderr @@ -1,7 +1,7 @@ error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements --> $DIR/regions-nested-fns.rs:5:18 | -LL | let mut ay = &y; //~ ERROR E0495 +LL | let mut ay = &y; | ^^ | note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 7:54... @@ -24,7 +24,7 @@ note: but, the lifetime must be valid for the anonymous lifetime #2 defined on t | LL | ignore::< Box FnMut(&'z isize) -> &'z isize>>(Box::new(|z| { | ____________________________________________________________________^ -LL | | if false { return x; } //~ ERROR E0312 +LL | | if false { return x; } LL | | if false { return ay; } LL | | return z; LL | | })); @@ -36,7 +36,7 @@ LL | | })); error[E0312]: lifetime of reference outlives lifetime of borrowed content... --> $DIR/regions-nested-fns.rs:14:27 | -LL | if false { return x; } //~ ERROR E0312 +LL | if false { return x; } | ^ | note: ...the reference is valid for the anonymous lifetime #2 defined on the body at 13:68... @@ -44,7 +44,7 @@ note: ...the reference is valid for the anonymous lifetime #2 defined on the bod | LL | ignore::< Box FnMut(&'z isize) -> &'z isize>>(Box::new(|z| { | ____________________________________________________________________^ -LL | | if false { return x; } //~ ERROR E0312 +LL | | if false { return x; } LL | | if false { return ay; } LL | | return z; LL | | })); diff --git a/src/test/ui/regions/regions-normalize-in-where-clause-list.stderr b/src/test/ui/regions/regions-normalize-in-where-clause-list.stderr index a4197eed225..c44edf1f03b 100644 --- a/src/test/ui/regions/regions-normalize-in-where-clause-list.stderr +++ b/src/test/ui/regions/regions-normalize-in-where-clause-list.stderr @@ -1,7 +1,7 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements --> $DIR/regions-normalize-in-where-clause-list.rs:22:1 | -LL | / fn bar<'a, 'b>() //~ ERROR cannot infer +LL | / fn bar<'a, 'b>() LL | | where <() as Project<'a, 'b>>::Item : Eq LL | | { LL | | } @@ -10,12 +10,12 @@ LL | | } note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 22:8... --> $DIR/regions-normalize-in-where-clause-list.rs:22:8 | -LL | fn bar<'a, 'b>() //~ ERROR cannot infer +LL | fn bar<'a, 'b>() | ^^ note: ...but the lifetime must also be valid for the lifetime 'b as defined on the function body at 22:12... --> $DIR/regions-normalize-in-where-clause-list.rs:22:12 | -LL | fn bar<'a, 'b>() //~ ERROR cannot infer +LL | fn bar<'a, 'b>() | ^^ = note: ...so that the types are compatible: expected Project<'a, 'b> diff --git a/src/test/ui/regions/regions-outlives-projection-container.stderr b/src/test/ui/regions/regions-outlives-projection-container.stderr index 884314f421a..b50347ac964 100644 --- a/src/test/ui/regions/regions-outlives-projection-container.stderr +++ b/src/test/ui/regions/regions-outlives-projection-container.stderr @@ -52,7 +52,7 @@ LL | fn call_with_assoc<'a,'b>() { error[E0491]: in type `&'a WithoutAssoc>`, reference has a longer lifetime than the data it references --> $DIR/regions-outlives-projection-container.rs:74:12 | -LL | call::<&'a WithoutAssoc>>(); //~ ERROR reference has a longer lifetime +LL | call::<&'a WithoutAssoc>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: the pointer is valid for the lifetime 'a as defined on the function body at 71:23 diff --git a/src/test/ui/regions/regions-pattern-typing-issue-19552.stderr b/src/test/ui/regions/regions-pattern-typing-issue-19552.stderr index ad80925cad7..3e3201db240 100644 --- a/src/test/ui/regions/regions-pattern-typing-issue-19552.stderr +++ b/src/test/ui/regions/regions-pattern-typing-issue-19552.stderr @@ -1,7 +1,7 @@ error[E0597]: `line` does not live long enough --> $DIR/regions-pattern-typing-issue-19552.rs:5:14 | -LL | match [&*line] { //~ ERROR `line` does not live long enough +LL | match [&*line] { | ^^^^ borrowed value does not live long enough ... LL | } diff --git a/src/test/ui/regions/regions-proc-bound-capture.stderr b/src/test/ui/regions/regions-proc-bound-capture.stderr index 31be3ab4d3d..aea7347d53c 100644 --- a/src/test/ui/regions/regions-proc-bound-capture.stderr +++ b/src/test/ui/regions/regions-proc-bound-capture.stderr @@ -4,7 +4,7 @@ error[E0621]: explicit lifetime required in the type of `x` LL | fn static_proc(x: &isize) -> Box(isize) + 'static> { | ------ help: add explicit lifetime `'static` to the type of `x`: `&'static isize` LL | // This is illegal, because the region bound on `proc` is 'static. -LL | Box::new(move|| { *x }) //~ ERROR explicit lifetime required in the type of `x` [E0621] +LL | Box::new(move|| { *x }) | ^^^^^^^^^^^^^^^^^^^^^^^ lifetime `'static` required error: aborting due to previous error diff --git a/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.stderr b/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.stderr index 5670e5305eb..aca3a1ed057 100644 --- a/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.stderr +++ b/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.stderr @@ -5,7 +5,7 @@ LL | fn copy_borrowed_ptr<'a, 'b, 'c>(p: &'a mut &'b mut &'c mut isize) -> &'b m | ----------------------------- ------------- | | | this parameter and the return type are declared with different lifetimes... -LL | &mut ***p //~ ERROR lifetime mismatch [E0623] +LL | &mut ***p | ^^^^^^^^^ ...but data from `p` is returned here error: aborting due to previous error diff --git a/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref.stderr b/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref.stderr index 90004e27d95..a9916dbe4f5 100644 --- a/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref.stderr +++ b/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref.stderr @@ -5,7 +5,7 @@ LL | fn copy_borrowed_ptr<'a, 'b>(p: &'a mut &'b mut isize) -> &'b mut isize { | --------------------- ------------- | | | this parameter and the return type are declared with different lifetimes... -LL | &mut **p //~ ERROR lifetime mismatch [E0623] +LL | &mut **p | ^^^^^^^^ ...but data from `p` is returned here error: aborting due to previous error diff --git a/src/test/ui/regions/regions-ref-in-fn-arg.stderr b/src/test/ui/regions/regions-ref-in-fn-arg.stderr index 748508ecbcd..9ecd327510a 100644 --- a/src/test/ui/regions/regions-ref-in-fn-arg.stderr +++ b/src/test/ui/regions/regions-ref-in-fn-arg.stderr @@ -3,7 +3,7 @@ error[E0597]: borrowed value does not live long enough | LL | fn arg_item(box ref x: Box) -> &'static isize { | ^^^^^ borrowed value does not live long enough -LL | x //~^ ERROR borrowed value does not live long enough +LL | x LL | } | - borrowed value only lives until here | @@ -12,7 +12,7 @@ LL | } error[E0597]: borrowed value does not live long enough --> $DIR/regions-ref-in-fn-arg.rs:11:15 | -LL | with(|box ref x| x) //~ ERROR borrowed value does not live long enough +LL | with(|box ref x| x) | ^^^^^ - borrowed value only lives until here | | | borrowed value does not live long enough diff --git a/src/test/ui/regions/regions-ret.stderr b/src/test/ui/regions/regions-ret.stderr index 001f62ab60c..77820a34e40 100644 --- a/src/test/ui/regions/regions-ret.stderr +++ b/src/test/ui/regions/regions-ret.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/regions-ret.rs:4:13 | -LL | return &id(3); //~ ERROR borrowed value does not live long enough +LL | return &id(3); | ^^^^^- temporary value only lives until here | | | temporary value does not live long enough @@ -10,7 +10,7 @@ note: borrowed value must be valid for the anonymous lifetime #1 defined on the --> $DIR/regions-ret.rs:3:1 | LL | / fn f(_x: &isize) -> &isize { -LL | | return &id(3); //~ ERROR borrowed value does not live long enough +LL | | return &id(3); LL | | } | |_^ = note: consider using a `let` binding to increase its lifetime diff --git a/src/test/ui/regions/regions-return-ref-to-upvar-issue-17403.stderr b/src/test/ui/regions/regions-return-ref-to-upvar-issue-17403.stderr index e4b14811d90..9cf0b0ffabd 100644 --- a/src/test/ui/regions/regions-return-ref-to-upvar-issue-17403.stderr +++ b/src/test/ui/regions/regions-return-ref-to-upvar-issue-17403.stderr @@ -1,18 +1,18 @@ error[E0495]: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements --> $DIR/regions-return-ref-to-upvar-issue-17403.rs:7:24 | -LL | let mut f = || &mut x; //~ ERROR cannot infer +LL | let mut f = || &mut x; | ^^^^^^ | note: first, the lifetime cannot outlive the lifetime as defined on the body at 7:21... --> $DIR/regions-return-ref-to-upvar-issue-17403.rs:7:21 | -LL | let mut f = || &mut x; //~ ERROR cannot infer +LL | let mut f = || &mut x; | ^^^^^^^^^ note: ...so that closure can access `x` --> $DIR/regions-return-ref-to-upvar-issue-17403.rs:7:24 | -LL | let mut f = || &mut x; //~ ERROR cannot infer +LL | let mut f = || &mut x; | ^^^^^^ note: but, the lifetime must be valid for the call at 9:17... --> $DIR/regions-return-ref-to-upvar-issue-17403.rs:9:17 diff --git a/src/test/ui/regions/regions-return-stack-allocated-vec.stderr b/src/test/ui/regions/regions-return-stack-allocated-vec.stderr index 78eec7cc456..3256294473f 100644 --- a/src/test/ui/regions/regions-return-stack-allocated-vec.stderr +++ b/src/test/ui/regions/regions-return-stack-allocated-vec.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/regions-return-stack-allocated-vec.rs:4:6 | -LL | &[x] //~ ERROR borrowed value does not live long enough +LL | &[x] | ^^^ temporary value does not live long enough LL | } | - temporary value only lives until here diff --git a/src/test/ui/regions/regions-steal-closure.stderr b/src/test/ui/regions/regions-steal-closure.stderr index dc5c1671535..8cfd5b50312 100644 --- a/src/test/ui/regions/regions-steal-closure.stderr +++ b/src/test/ui/regions/regions-steal-closure.stderr @@ -1,7 +1,7 @@ error[E0597]: `i` does not live long enough --> $DIR/regions-steal-closure.rs:14:28 | -LL | box_it(Box::new(|| i += 1)) //~ ERROR `i` does not live long enough +LL | box_it(Box::new(|| i += 1)) | -- ^ borrowed value does not live long enough | | | capture occurs here diff --git a/src/test/ui/regions/regions-trait-1.stderr b/src/test/ui/regions/regions-trait-1.stderr index e1aa2a2c299..421f826ccc5 100644 --- a/src/test/ui/regions/regions-trait-1.stderr +++ b/src/test/ui/regions/regions-trait-1.stderr @@ -1,7 +1,7 @@ error[E0308]: method not compatible with trait --> $DIR/regions-trait-1.rs:16:5 | -LL | fn get_ctxt(&self) -> &'a Ctxt { //~ ERROR method not compatible with trait +LL | fn get_ctxt(&self) -> &'a Ctxt { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `fn(&HasCtxt<'a>) -> &Ctxt` @@ -14,7 +14,7 @@ LL | impl<'a> GetCtxt for HasCtxt<'a> { note: ...does not necessarily outlive the anonymous lifetime #1 defined on the method body at 16:5 --> $DIR/regions-trait-1.rs:16:5 | -LL | / fn get_ctxt(&self) -> &'a Ctxt { //~ ERROR method not compatible with trait +LL | / fn get_ctxt(&self) -> &'a Ctxt { LL | | self.c LL | | } | |_____^ diff --git a/src/test/ui/regions/regions-trait-object-subtyping.stderr b/src/test/ui/regions/regions-trait-object-subtyping.stderr index dc5ce34d7d8..3b30ddd16cc 100644 --- a/src/test/ui/regions/regions-trait-object-subtyping.stderr +++ b/src/test/ui/regions/regions-trait-object-subtyping.stderr @@ -1,7 +1,7 @@ error[E0478]: lifetime bound not satisfied --> $DIR/regions-trait-object-subtyping.rs:15:5 | -LL | x //~ ERROR lifetime bound not satisfied +LL | x | ^ | note: lifetime parameter instantiated with the lifetime 'a as defined on the function body at 13:9 @@ -18,7 +18,7 @@ LL | fn foo3<'a,'b>(x: &'a mut Dummy) -> &'b mut Dummy { error[E0495]: cannot infer an appropriate lifetime for automatic coercion due to conflicting requirements --> $DIR/regions-trait-object-subtyping.rs:15:5 | -LL | x //~ ERROR lifetime bound not satisfied +LL | x | ^ | note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 13:9... @@ -29,7 +29,7 @@ LL | fn foo3<'a,'b>(x: &'a mut Dummy) -> &'b mut Dummy { note: ...so that reference does not outlive borrowed content --> $DIR/regions-trait-object-subtyping.rs:15:5 | -LL | x //~ ERROR lifetime bound not satisfied +LL | x | ^ note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 13:12... --> $DIR/regions-trait-object-subtyping.rs:13:12 @@ -43,7 +43,7 @@ LL | fn foo3<'a,'b>(x: &'a mut Dummy) -> &'b mut Dummy { error[E0308]: mismatched types --> $DIR/regions-trait-object-subtyping.rs:22:5 | -LL | x //~ ERROR mismatched types +LL | x | ^ lifetime mismatch | = note: expected type `Wrapper<&'b mut (dyn Dummy + 'b)>` diff --git a/src/test/ui/regions/regions-trait-variance.stderr b/src/test/ui/regions/regions-trait-variance.stderr index ddc8ce9796d..32c89b8eeff 100644 --- a/src/test/ui/regions/regions-trait-variance.stderr +++ b/src/test/ui/regions/regions-trait-variance.stderr @@ -1,7 +1,7 @@ error[E0597]: `*b` does not live long enough --> $DIR/regions-trait-variance.rs:37:19 | -LL | let bb: &B = &*b; //~ ERROR `*b` does not live long enough +LL | let bb: &B = &*b; | ^^ borrowed value does not live long enough LL | make_a(bb) LL | } diff --git a/src/test/ui/regions/regions-undeclared.stderr b/src/test/ui/regions/regions-undeclared.stderr index 7e35dc1c474..495aec3fde5 100644 --- a/src/test/ui/regions/regions-undeclared.stderr +++ b/src/test/ui/regions/regions-undeclared.stderr @@ -1,31 +1,31 @@ error[E0261]: use of undeclared lifetime name `'blk` --> $DIR/regions-undeclared.rs:1:14 | -LL | static c_x: &'blk isize = &22; //~ ERROR use of undeclared lifetime name `'blk` +LL | static c_x: &'blk isize = &22; | ^^^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/regions-undeclared.rs:4:10 | -LL | Foo(&'a isize), //~ ERROR use of undeclared lifetime name `'a` +LL | Foo(&'a isize), | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/regions-undeclared.rs:5:10 | -LL | Bar(&'a isize), //~ ERROR use of undeclared lifetime name `'a` +LL | Bar(&'a isize), | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/regions-undeclared.rs:8:15 | -LL | fn fnDecl(x: &'a isize, //~ ERROR use of undeclared lifetime name `'a` +LL | fn fnDecl(x: &'a isize, | ^^ undeclared lifetime error[E0261]: use of undeclared lifetime name `'a` --> $DIR/regions-undeclared.rs:9:15 | -LL | y: &'a isize) //~ ERROR use of undeclared lifetime name `'a` +LL | y: &'a isize) | ^^ undeclared lifetime error: aborting due to 5 previous errors diff --git a/src/test/ui/regions/regions-var-type-out-of-scope.stderr b/src/test/ui/regions/regions-var-type-out-of-scope.stderr index f474b9a2343..0363fe0d19f 100644 --- a/src/test/ui/regions/regions-var-type-out-of-scope.stderr +++ b/src/test/ui/regions/regions-var-type-out-of-scope.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/regions-var-type-out-of-scope.rs:9:14 | -LL | x = &id(3); //~ ERROR borrowed value does not live long enough +LL | x = &id(3); | ^^^^^- temporary value dropped here while still borrowed | | | temporary value does not live long enough diff --git a/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr b/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr index 20615e6a3d7..e135007604b 100644 --- a/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr +++ b/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr @@ -6,7 +6,7 @@ LL | fn use_<'short,'long>(c: S<'long, 'short>, | | | this type is declared with multiple lifetimes... ... -LL | let _: S<'long, 'long> = c; //~ ERROR E0623 +LL | let _: S<'long, 'long> = c; | ^ ...but data with one lifetime flows into the other here error: aborting due to previous error diff --git a/src/test/ui/regions/regions-variance-contravariant-use-covariant.stderr b/src/test/ui/regions/regions-variance-contravariant-use-covariant.stderr index da8d2188191..e7c106cbbe3 100644 --- a/src/test/ui/regions/regions-variance-contravariant-use-covariant.stderr +++ b/src/test/ui/regions/regions-variance-contravariant-use-covariant.stderr @@ -7,7 +7,7 @@ LL | s: &'short isize, LL | l: &'long isize, | ------------ ... -LL | let _: Contravariant<'long> = c; //~ ERROR E0623 +LL | let _: Contravariant<'long> = c; | ^ ...but data from `c` flows into `l` here error: aborting due to previous error diff --git a/src/test/ui/regions/regions-variance-covariant-use-contravariant.stderr b/src/test/ui/regions/regions-variance-covariant-use-contravariant.stderr index 74a6aee2627..e5e5261ba99 100644 --- a/src/test/ui/regions/regions-variance-covariant-use-contravariant.stderr +++ b/src/test/ui/regions/regions-variance-covariant-use-contravariant.stderr @@ -6,7 +6,7 @@ LL | fn use_<'short,'long>(c: Covariant<'long>, LL | s: &'short isize, | ------------- these two types are declared with different lifetimes... ... -LL | let _: Covariant<'short> = c; //~ ERROR E0623 +LL | let _: Covariant<'short> = c; | ^ ...but data from `s` flows into `c` here error: aborting due to previous error diff --git a/src/test/ui/regions/regions-variance-invariant-use-contravariant.stderr b/src/test/ui/regions/regions-variance-invariant-use-contravariant.stderr index 2332acdf832..2a2d5d019a1 100644 --- a/src/test/ui/regions/regions-variance-invariant-use-contravariant.stderr +++ b/src/test/ui/regions/regions-variance-invariant-use-contravariant.stderr @@ -6,7 +6,7 @@ LL | fn use_<'short,'long>(c: Invariant<'long>, LL | s: &'short isize, | ------------- these two types are declared with different lifetimes... ... -LL | let _: Invariant<'short> = c; //~ ERROR E0623 +LL | let _: Invariant<'short> = c; | ^ ...but data from `s` flows into `c` here error: aborting due to previous error diff --git a/src/test/ui/regions/regions-variance-invariant-use-covariant.stderr b/src/test/ui/regions/regions-variance-invariant-use-covariant.stderr index f1d1a14f52b..90b37ce935a 100644 --- a/src/test/ui/regions/regions-variance-invariant-use-covariant.stderr +++ b/src/test/ui/regions/regions-variance-invariant-use-covariant.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/regions-variance-invariant-use-covariant.rs:17:33 | -LL | let _: Invariant<'static> = c; //~ ERROR mismatched types +LL | let _: Invariant<'static> = c; | ^ lifetime mismatch | = note: expected type `Invariant<'static>` diff --git a/src/test/ui/regions/regions-wf-trait-object.stderr b/src/test/ui/regions/regions-wf-trait-object.stderr index c2689577376..3dc1c4dcd22 100644 --- a/src/test/ui/regions/regions-wf-trait-object.stderr +++ b/src/test/ui/regions/regions-wf-trait-object.stderr @@ -1,7 +1,7 @@ error[E0478]: lifetime bound not satisfied --> $DIR/regions-wf-trait-object.rs:7:5 | -LL | x: Box+'b> //~ ERROR E0478 +LL | x: Box+'b> | ^^^^^^^^^^^^^^^^^^^^^^^ | note: lifetime parameter instantiated with the lifetime 'b as defined on the struct at 6:15 diff --git a/src/test/ui/reject-specialized-drops-8142.stderr b/src/test/ui/reject-specialized-drops-8142.stderr index 1782d3b3105..7dacc1f2740 100644 --- a/src/test/ui/reject-specialized-drops-8142.stderr +++ b/src/test/ui/reject-specialized-drops-8142.stderr @@ -2,7 +2,7 @@ error[E0367]: The requirement `'adds_bnd : 'al` is added only by the Drop impl. --> $DIR/reject-specialized-drops-8142.rs:19:1 | LL | / impl<'al,'adds_bnd:'al> Drop for K<'al,'adds_bnd> { // REJECT -LL | | //~^ ERROR The requirement `'adds_bnd : 'al` is added only by the Drop impl. +LL | | LL | | fn drop(&mut self) { } } | |____________________________^ | @@ -16,7 +16,7 @@ error[E0367]: The requirement `'adds_bnd : 'al` is added only by the Drop impl. --> $DIR/reject-specialized-drops-8142.rs:23:1 | LL | / impl<'al,'adds_bnd> Drop for L<'al,'adds_bnd> where 'adds_bnd:'al { // REJECT -LL | | //~^ ERROR The requirement `'adds_bnd : 'al` is added only by the Drop impl. +LL | | LL | | fn drop(&mut self) { } } | |____________________________^ | diff --git a/src/test/ui/repr/repr-align-assign.stderr b/src/test/ui/repr/repr-align-assign.stderr index 884a99357cd..cc046e04de5 100644 --- a/src/test/ui/repr/repr-align-assign.stderr +++ b/src/test/ui/repr/repr-align-assign.stderr @@ -1,13 +1,13 @@ error[E0693]: incorrect `repr(align)` attribute format --> $DIR/repr-align-assign.rs:5:8 | -LL | #[repr(align=8)] //~ ERROR incorrect `repr(align)` attribute format +LL | #[repr(align=8)] | ^^^^^^^ help: use parentheses instead: `align(8)` error[E0693]: incorrect `repr(align)` attribute format --> $DIR/repr-align-assign.rs:8:8 | -LL | #[repr(align="8")] //~ ERROR incorrect `repr(align)` attribute format +LL | #[repr(align="8")] | ^^^^^^^^^ help: use parentheses instead: `align(8)` error: aborting due to 2 previous errors diff --git a/src/test/ui/repr/repr-align.stderr b/src/test/ui/repr/repr-align.stderr index f1a5d88ace1..641f117a717 100644 --- a/src/test/ui/repr/repr-align.stderr +++ b/src/test/ui/repr/repr-align.stderr @@ -1,25 +1,25 @@ error[E0589]: invalid `repr(align)` attribute: not an unsuffixed integer --> $DIR/repr-align.rs:4:8 | -LL | #[repr(align(16.0))] //~ ERROR: invalid `repr(align)` attribute: not an unsuffixed integer +LL | #[repr(align(16.0))] | ^^^^^^^^^^^ error[E0589]: invalid `repr(align)` attribute: not a power of two --> $DIR/repr-align.rs:7:8 | -LL | #[repr(align(15))] //~ ERROR: invalid `repr(align)` attribute: not a power of two +LL | #[repr(align(15))] | ^^^^^^^^^ error[E0589]: invalid `repr(align)` attribute: larger than 2^29 --> $DIR/repr-align.rs:10:8 | -LL | #[repr(align(4294967296))] //~ ERROR: invalid `repr(align)` attribute: larger than 2^29 +LL | #[repr(align(4294967296))] | ^^^^^^^^^^^^^^^^^ error[E0589]: invalid `repr(align)` attribute: not a power of two --> $DIR/repr-align.rs:16:8 | -LL | #[repr(align(15))] //~ ERROR: invalid `repr(align)` attribute: not a power of two +LL | #[repr(align(15))] | ^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/repr/repr-packed-contains-align.stderr b/src/test/ui/repr/repr-packed-contains-align.stderr index 59f8b359d1f..df001d6b5f2 100644 --- a/src/test/ui/repr/repr-packed-contains-align.stderr +++ b/src/test/ui/repr/repr-packed-contains-align.stderr @@ -1,31 +1,31 @@ error[E0588]: packed type cannot transitively contain a `[repr(align)]` type --> $DIR/repr-packed-contains-align.rs:19:1 | -LL | struct SC(SA); //~ ERROR: packed type cannot transitively contain a `[repr(align)]` type +LL | struct SC(SA); | ^^^^^^^^^^^^^^ error[E0588]: packed type cannot transitively contain a `[repr(align)]` type --> $DIR/repr-packed-contains-align.rs:22:1 | -LL | struct SD(SB); //~ ERROR: packed type cannot transitively contain a `[repr(align)]` type +LL | struct SD(SB); | ^^^^^^^^^^^^^^ error[E0588]: packed type cannot transitively contain a `[repr(align)]` type --> $DIR/repr-packed-contains-align.rs:25:1 | -LL | struct SE(UA); //~ ERROR: packed type cannot transitively contain a `[repr(align)]` type +LL | struct SE(UA); | ^^^^^^^^^^^^^^ error[E0588]: packed type cannot transitively contain a `[repr(align)]` type --> $DIR/repr-packed-contains-align.rs:28:1 | -LL | struct SF(UB); //~ ERROR: packed type cannot transitively contain a `[repr(align)]` type +LL | struct SF(UB); | ^^^^^^^^^^^^^^ error[E0588]: packed type cannot transitively contain a `[repr(align)]` type --> $DIR/repr-packed-contains-align.rs:31:1 | -LL | / union UC { //~ ERROR: packed type cannot transitively contain a `[repr(align)]` type +LL | / union UC { LL | | a: UA LL | | } | |_^ @@ -33,7 +33,7 @@ LL | | } error[E0588]: packed type cannot transitively contain a `[repr(align)]` type --> $DIR/repr-packed-contains-align.rs:36:1 | -LL | / union UD { //~ ERROR: packed type cannot transitively contain a `[repr(align)]` type +LL | / union UD { LL | | n: UB LL | | } | |_^ @@ -41,7 +41,7 @@ LL | | } error[E0588]: packed type cannot transitively contain a `[repr(align)]` type --> $DIR/repr-packed-contains-align.rs:41:1 | -LL | / union UE { //~ ERROR: packed type cannot transitively contain a `[repr(align)]` type +LL | / union UE { LL | | a: SA LL | | } | |_^ @@ -49,7 +49,7 @@ LL | | } error[E0588]: packed type cannot transitively contain a `[repr(align)]` type --> $DIR/repr-packed-contains-align.rs:46:1 | -LL | / union UF { //~ ERROR: packed type cannot transitively contain a `[repr(align)]` type +LL | / union UF { LL | | n: SB LL | | } | |_^ diff --git a/src/test/ui/repr/repr-transparent-other-items.stderr b/src/test/ui/repr/repr-transparent-other-items.stderr index 5b7f9650d0c..c3fb1d9e21e 100644 --- a/src/test/ui/repr/repr-transparent-other-items.stderr +++ b/src/test/ui/repr/repr-transparent-other-items.stderr @@ -1,15 +1,15 @@ error[E0517]: attribute should be applied to struct --> $DIR/repr-transparent-other-items.rs:3:8 | -LL | #[repr(transparent)] //~ ERROR unsupported representation for zero-variant enum +LL | #[repr(transparent)] | ^^^^^^^^^^^ -LL | enum Void {} //~| ERROR should be applied to struct +LL | enum Void {} | ------------ not a struct error[E0517]: attribute should be applied to struct --> $DIR/repr-transparent-other-items.rs:6:8 | -LL | #[repr(transparent)] //~ ERROR should be applied to struct +LL | #[repr(transparent)] | ^^^^^^^^^^^ LL | / enum FieldlessEnum { LL | | Foo, @@ -20,7 +20,7 @@ LL | | } error[E0517]: attribute should be applied to struct --> $DIR/repr-transparent-other-items.rs:12:8 | -LL | #[repr(transparent)] //~ ERROR should be applied to struct +LL | #[repr(transparent)] | ^^^^^^^^^^^ LL | / enum Enum { LL | | Foo(String), @@ -31,7 +31,7 @@ LL | | } error[E0517]: attribute should be applied to struct --> $DIR/repr-transparent-other-items.rs:18:8 | -LL | #[repr(transparent)] //~ ERROR should be applied to struct +LL | #[repr(transparent)] | ^^^^^^^^^^^ LL | / union Foo { LL | | u: u32, @@ -42,7 +42,7 @@ LL | | } error[E0517]: attribute should be applied to struct --> $DIR/repr-transparent-other-items.rs:24:8 | -LL | #[repr(transparent)] //~ ERROR should be applied to struct +LL | #[repr(transparent)] | ^^^^^^^^^^^ LL | fn cant_repr_this() {} | ---------------------- not a struct @@ -50,7 +50,7 @@ LL | fn cant_repr_this() {} error[E0517]: attribute should be applied to struct --> $DIR/repr-transparent-other-items.rs:27:8 | -LL | #[repr(transparent)] //~ ERROR should be applied to struct +LL | #[repr(transparent)] | ^^^^^^^^^^^ LL | static CANT_REPR_THIS: u32 = 0; | ------------------------------- not a struct @@ -58,9 +58,9 @@ LL | static CANT_REPR_THIS: u32 = 0; error[E0084]: unsupported representation for zero-variant enum --> $DIR/repr-transparent-other-items.rs:3:1 | -LL | #[repr(transparent)] //~ ERROR unsupported representation for zero-variant enum +LL | #[repr(transparent)] | ^^^^^^^^^^^^^^^^^^^^ -LL | enum Void {} //~| ERROR should be applied to struct +LL | enum Void {} | ------------ zero-variant enum error: aborting due to 7 previous errors diff --git a/src/test/ui/repr/repr-transparent-other-reprs.stderr b/src/test/ui/repr/repr-transparent-other-reprs.stderr index 1aafa436249..9b48bb3a43d 100644 --- a/src/test/ui/repr/repr-transparent-other-reprs.stderr +++ b/src/test/ui/repr/repr-transparent-other-reprs.stderr @@ -1,25 +1,25 @@ error[E0692]: transparent struct cannot have other repr hints --> $DIR/repr-transparent-other-reprs.rs:5:8 | -LL | #[repr(transparent, C)] //~ ERROR cannot have other repr +LL | #[repr(transparent, C)] | ^^^^^^^^^^^ ^ error[E0692]: transparent struct cannot have other repr hints --> $DIR/repr-transparent-other-reprs.rs:10:8 | -LL | #[repr(transparent, packed)] //~ ERROR cannot have other repr +LL | #[repr(transparent, packed)] | ^^^^^^^^^^^ ^^^^^^ error[E0692]: transparent struct cannot have other repr hints --> $DIR/repr-transparent-other-reprs.rs:13:8 | -LL | #[repr(transparent, align(2))] //~ ERROR cannot have other repr +LL | #[repr(transparent, align(2))] | ^^^^^^^^^^^ ^^^^^^^^ error[E0692]: transparent struct cannot have other repr hints --> $DIR/repr-transparent-other-reprs.rs:16:8 | -LL | #[repr(transparent)] //~ ERROR cannot have other repr +LL | #[repr(transparent)] | ^^^^^^^^^^^ LL | #[repr(C)] | ^ diff --git a/src/test/ui/repr/repr-transparent.stderr b/src/test/ui/repr/repr-transparent.stderr index 02bf2154fe5..2ecee838be1 100644 --- a/src/test/ui/repr/repr-transparent.stderr +++ b/src/test/ui/repr/repr-transparent.stderr @@ -1,7 +1,7 @@ error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0 --> $DIR/repr-transparent.rs:11:1 | -LL | struct NoFields; //~ ERROR needs exactly one non-zero-sized field +LL | struct NoFields; | ^^^^^^^^^^^^^^^^ | = note: non-zero-sized field @@ -9,7 +9,7 @@ LL | struct NoFields; //~ ERROR needs exactly one non-zero-sized field error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0 --> $DIR/repr-transparent.rs:14:1 | -LL | struct ContainsOnlyZst(()); //~ ERROR needs exactly one non-zero-sized field +LL | struct ContainsOnlyZst(()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: non-zero-sized field @@ -17,7 +17,7 @@ LL | struct ContainsOnlyZst(()); //~ ERROR needs exactly one non-zero-sized fiel error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0 --> $DIR/repr-transparent.rs:17:1 | -LL | struct ContainsOnlyZstArray([bool; 0]); //~ ERROR needs exactly one non-zero-sized field +LL | struct ContainsOnlyZstArray([bool; 0]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: non-zero-sized field @@ -33,13 +33,13 @@ LL | struct ContainsMultipleZst(PhantomData<*const i32>, NoFields); error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 2 --> $DIR/repr-transparent.rs:24:1 | -LL | struct MultipleNonZst(u8, u8); //~ ERROR needs exactly one non-zero-sized field +LL | struct MultipleNonZst(u8, u8); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: non-zero-sized field --> $DIR/repr-transparent.rs:24:23 | -LL | struct MultipleNonZst(u8, u8); //~ ERROR needs exactly one non-zero-sized field +LL | struct MultipleNonZst(u8, u8); | ^^ ^^ error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 2 @@ -57,13 +57,13 @@ LL | pub struct StructWithProjection(f32, ::It); error[E0691]: zero-sized field in transparent struct has alignment larger than 1 --> $DIR/repr-transparent.rs:34:32 | -LL | struct NontrivialAlignZst(u32, [u16; 0]); //~ ERROR alignment larger than 1 +LL | struct NontrivialAlignZst(u32, [u16; 0]); | ^^^^^^^^ error[E0691]: zero-sized field in transparent struct has alignment larger than 1 --> $DIR/repr-transparent.rs:40:24 | -LL | struct GenericAlign(ZstAlign32, u32); //~ ERROR alignment larger than 1 +LL | struct GenericAlign(ZstAlign32, u32); | ^^^^^^^^^^^^^ error: aborting due to 8 previous errors diff --git a/src/test/ui/reserved/reserved-attr-on-macro.stderr b/src/test/ui/reserved/reserved-attr-on-macro.stderr index 46d3478b628..3e082e53ca8 100644 --- a/src/test/ui/reserved/reserved-attr-on-macro.stderr +++ b/src/test/ui/reserved/reserved-attr-on-macro.stderr @@ -9,7 +9,7 @@ LL | #[rustc_attribute_should_be_reserved] error: cannot determine resolution for the macro `foo` --> $DIR/reserved-attr-on-macro.rs:8:5 | -LL | foo!(); //~ ERROR cannot determine resolution for the macro `foo` +LL | foo!(); | ^^^ | = note: import resolution is stuck, try simplifying macro imports diff --git a/src/test/ui/resolve/issue-17518.stderr b/src/test/ui/resolve/issue-17518.stderr index 5d080d98944..057aac25234 100644 --- a/src/test/ui/resolve/issue-17518.stderr +++ b/src/test/ui/resolve/issue-17518.stderr @@ -1,7 +1,7 @@ error[E0422]: cannot find struct, variant or union type `E` in this scope --> $DIR/issue-17518.rs:6:5 | -LL | E { name: "foobar" }; //~ ERROR cannot find struct, variant or union type `E` +LL | E { name: "foobar" }; | ^ not found in this scope help: possible candidate is found in another module, you can import it into scope | diff --git a/src/test/ui/resolve/issue-22692.stderr b/src/test/ui/resolve/issue-22692.stderr index 1c8d959d60d..13752430e71 100644 --- a/src/test/ui/resolve/issue-22692.stderr +++ b/src/test/ui/resolve/issue-22692.stderr @@ -1,7 +1,7 @@ error[E0423]: expected value, found struct `String` --> $DIR/issue-22692.rs:2:13 | -LL | let _ = String.new(); //~ ERROR expected value, found struct `String` +LL | let _ = String.new(); | ^^^^^^---- | | | help: use `::` to access an associated function: `String::new` diff --git a/src/test/ui/resolve/issue-33876.stderr b/src/test/ui/resolve/issue-33876.stderr index fb61abc9505..29a63fdd11f 100644 --- a/src/test/ui/resolve/issue-33876.stderr +++ b/src/test/ui/resolve/issue-33876.stderr @@ -1,7 +1,7 @@ error[E0423]: expected value, found trait `Bar` --> $DIR/issue-33876.rs:10:22 | -LL | let any: &Any = &Bar; //~ ERROR expected value, found trait `Bar` +LL | let any: &Any = &Bar; | ^^^ not a value error: aborting due to previous error diff --git a/src/test/ui/resolve/issue-3907.stderr b/src/test/ui/resolve/issue-3907.stderr index 55bd555676a..49f7ae84491 100644 --- a/src/test/ui/resolve/issue-3907.stderr +++ b/src/test/ui/resolve/issue-3907.stderr @@ -1,7 +1,7 @@ error[E0404]: expected trait, found type alias `Foo` --> $DIR/issue-3907.rs:10:6 | -LL | impl Foo for S { //~ ERROR expected trait, found type alias `Foo` +LL | impl Foo for S { | ^^^ type aliases cannot be used as traits | = note: did you mean to use a trait alias? diff --git a/src/test/ui/resolve/issue-5035.stderr b/src/test/ui/resolve/issue-5035.stderr index 57ad5f22f4c..68d35f3b5fe 100644 --- a/src/test/ui/resolve/issue-5035.stderr +++ b/src/test/ui/resolve/issue-5035.stderr @@ -1,13 +1,13 @@ error[E0432]: unresolved import `ImportError` --> $DIR/issue-5035.rs:5:5 | -LL | use ImportError; //~ ERROR unresolved import `ImportError` [E0432] +LL | use ImportError; | ^^^^^^^^^^^ no `ImportError` in the root error[E0404]: expected trait, found type alias `K` --> $DIR/issue-5035.rs:3:6 | -LL | impl K for isize {} //~ ERROR expected trait, found type alias `K` +LL | impl K for isize {} | ^ | | | type aliases cannot be used as traits diff --git a/src/test/ui/resolve/issue-54379.stderr b/src/test/ui/resolve/issue-54379.stderr index 9dbab6917c7..60a6f904610 100644 --- a/src/test/ui/resolve/issue-54379.stderr +++ b/src/test/ui/resolve/issue-54379.stderr @@ -1,7 +1,7 @@ error: expected `}`, found `,` --> $DIR/issue-54379.rs:9:22 | -LL | MyStruct { .., Some(_) } => {}, //~ ERROR pattern does not mention field `s1` +LL | MyStruct { .., Some(_) } => {}, | --^ | | | | | expected `}` @@ -10,13 +10,13 @@ LL | MyStruct { .., Some(_) } => {}, //~ ERROR pattern does not mention error: expected `,` --> $DIR/issue-54379.rs:9:24 | -LL | MyStruct { .., Some(_) } => {}, //~ ERROR pattern does not mention field `s1` +LL | MyStruct { .., Some(_) } => {}, | ^^^^ error[E0027]: pattern does not mention field `s1` --> $DIR/issue-54379.rs:9:9 | -LL | MyStruct { .., Some(_) } => {}, //~ ERROR pattern does not mention field `s1` +LL | MyStruct { .., Some(_) } => {}, | ^^^^^^^^^^^^^^^^^^^^^^^^ missing field `s1` error: aborting due to 3 previous errors diff --git a/src/test/ui/resolve/issue-6702.stderr b/src/test/ui/resolve/issue-6702.stderr index 906ac2808aa..9a46f0d7742 100644 --- a/src/test/ui/resolve/issue-6702.stderr +++ b/src/test/ui/resolve/issue-6702.stderr @@ -1,7 +1,7 @@ error[E0423]: expected function, found struct `Monster` --> $DIR/issue-6702.rs:7:14 | -LL | let _m = Monster(); //~ ERROR expected function, found struct `Monster` +LL | let _m = Monster(); | ^^^^^^^ did you mean `Monster { /* fields */ }`? error: aborting due to previous error diff --git a/src/test/ui/resolve/name-clash-nullary.stderr b/src/test/ui/resolve/name-clash-nullary.stderr index 5bb9371da6d..51793f426d6 100644 --- a/src/test/ui/resolve/name-clash-nullary.stderr +++ b/src/test/ui/resolve/name-clash-nullary.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/name-clash-nullary.rs:2:7 | -LL | let None: isize = 42; //~ ERROR mismatched types +LL | let None: isize = 42; | ^^^^ expected isize, found enum `std::option::Option` | = note: expected type `isize` diff --git a/src/test/ui/resolve/resolve-bad-import-prefix.stderr b/src/test/ui/resolve/resolve-bad-import-prefix.stderr index f39e1edb613..852b9c6afff 100644 --- a/src/test/ui/resolve/resolve-bad-import-prefix.stderr +++ b/src/test/ui/resolve/resolve-bad-import-prefix.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `Nonexistent` --> $DIR/resolve-bad-import-prefix.rs:12:5 | -LL | use Nonexistent::{}; //~ ERROR unresolved import `Nonexistent` +LL | use Nonexistent::{}; | ^^^^^^^^^^^^^^^ no `Nonexistent` in the root error: aborting due to previous error diff --git a/src/test/ui/resolve/resolve-bad-visibility.stderr b/src/test/ui/resolve/resolve-bad-visibility.stderr index 519e7a946e1..32b85f202f1 100644 --- a/src/test/ui/resolve/resolve-bad-visibility.stderr +++ b/src/test/ui/resolve/resolve-bad-visibility.stderr @@ -1,31 +1,31 @@ error: visibilities can only be restricted to ancestor modules --> $DIR/resolve-bad-visibility.rs:6:8 | -LL | pub(in std::vec) struct F; //~ ERROR visibilities can only be restricted to ancestor modules +LL | pub(in std::vec) struct F; | ^^^^^^^^ error[E0577]: expected module, found enum `E` --> $DIR/resolve-bad-visibility.rs:4:8 | -LL | pub(in E) struct S; //~ ERROR expected module, found enum `E` +LL | pub(in E) struct S; | ^ not a module error[E0577]: expected module, found trait `Tr` --> $DIR/resolve-bad-visibility.rs:5:8 | -LL | pub(in Tr) struct Z; //~ ERROR expected module, found trait `Tr` +LL | pub(in Tr) struct Z; | ^^ not a module error[E0578]: cannot find module `nonexistent` in the crate root --> $DIR/resolve-bad-visibility.rs:7:8 | -LL | pub(in nonexistent) struct G; //~ ERROR cannot find module `nonexistent` in the crate root +LL | pub(in nonexistent) struct G; | ^^^^^^^^^^^ not found in the crate root error[E0578]: cannot find module `too_soon` in the crate root --> $DIR/resolve-bad-visibility.rs:8:8 | -LL | pub(in too_soon) struct H; //~ ERROR cannot find module `too_soon` in the crate root +LL | pub(in too_soon) struct H; | ^^^^^^^^ not found in the crate root error: aborting due to 5 previous errors diff --git a/src/test/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr b/src/test/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr index 24889a0a820..a0a85820901 100644 --- a/src/test/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr +++ b/src/test/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr @@ -1,13 +1,13 @@ error[E0254]: the name `std` is defined multiple times --> $DIR/resolve-conflict-import-vs-extern-crate.rs:1:5 | -LL | use std::slice as std; //~ ERROR the name `std` is defined multiple times +LL | use std::slice as std; | ^^^^^^^^^^^^^^^^^ `std` reimported here | = note: `std` must be defined only once in the type namespace of this module help: you can use `as` to change the binding name of the import | -LL | use std::slice as other_std; //~ ERROR the name `std` is defined multiple times +LL | use std::slice as other_std; | ^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/resolve/resolve-conflict-item-vs-extern-crate.stderr b/src/test/ui/resolve/resolve-conflict-item-vs-extern-crate.stderr index 5e190bf3185..7b9fb6c63f6 100644 --- a/src/test/ui/resolve/resolve-conflict-item-vs-extern-crate.stderr +++ b/src/test/ui/resolve/resolve-conflict-item-vs-extern-crate.stderr @@ -1,7 +1,7 @@ error[E0260]: the name `std` is defined multiple times --> $DIR/resolve-conflict-item-vs-extern-crate.rs:2:1 | -LL | mod std {} //~ ERROR the name `std` is defined multiple times +LL | mod std {} | ^^^^^^^ `std` redefined here | = note: `std` must be defined only once in the type namespace of this module diff --git a/src/test/ui/resolve/resolve-inconsistent-names.stderr b/src/test/ui/resolve/resolve-inconsistent-names.stderr index 20346d5aefe..c75718149fa 100644 --- a/src/test/ui/resolve/resolve-inconsistent-names.stderr +++ b/src/test/ui/resolve/resolve-inconsistent-names.stderr @@ -1,7 +1,7 @@ error[E0408]: variable `a` is not bound in all patterns --> $DIR/resolve-inconsistent-names.rs:4:12 | -LL | a | b => {} //~ ERROR variable `a` is not bound in all patterns +LL | a | b => {} | - ^ pattern doesn't bind `a` | | | variable not in all patterns @@ -9,7 +9,7 @@ LL | a | b => {} //~ ERROR variable `a` is not bound in all patterns error[E0408]: variable `b` is not bound in all patterns --> $DIR/resolve-inconsistent-names.rs:4:8 | -LL | a | b => {} //~ ERROR variable `a` is not bound in all patterns +LL | a | b => {} | ^ - variable not in all patterns | | | pattern doesn't bind `b` diff --git a/src/test/ui/resolve/resolve-label.stderr b/src/test/ui/resolve/resolve-label.stderr index fecfd922347..72a8e443bac 100644 --- a/src/test/ui/resolve/resolve-label.stderr +++ b/src/test/ui/resolve/resolve-label.stderr @@ -1,7 +1,7 @@ error[E0426]: use of undeclared label `'l` --> $DIR/resolve-label.rs:5:23 | -LL | break 'l; //~ ERROR use of undeclared label +LL | break 'l; | ^^ undeclared label `'l` error: aborting due to previous error diff --git a/src/test/ui/resolve/resolve-self-in-impl-2.stderr b/src/test/ui/resolve/resolve-self-in-impl-2.stderr index 1f5887e1352..765f150ebc7 100644 --- a/src/test/ui/resolve/resolve-self-in-impl-2.stderr +++ b/src/test/ui/resolve/resolve-self-in-impl-2.stderr @@ -1,13 +1,13 @@ error[E0411]: expected trait, found self type `Self` --> $DIR/resolve-self-in-impl-2.rs:4:6 | -LL | impl Self for S {} //~ ERROR expected trait, found self type `Self` +LL | impl Self for S {} | ^^^^ `Self` is only available in impls, traits, and type definitions error[E0405]: cannot find trait `N` in `Self` --> $DIR/resolve-self-in-impl-2.rs:5:12 | -LL | impl Self::N for S {} //~ ERROR cannot find trait `N` in `Self` +LL | impl Self::N for S {} | ^ not found in `Self` error: aborting due to 2 previous errors diff --git a/src/test/ui/resolve/resolve-self-in-impl.stderr b/src/test/ui/resolve/resolve-self-in-impl.stderr index 1940c0cd2a4..58e851e5c12 100644 --- a/src/test/ui/resolve/resolve-self-in-impl.stderr +++ b/src/test/ui/resolve/resolve-self-in-impl.stderr @@ -1,7 +1,7 @@ error[E0391]: cycle detected when processing `` --> $DIR/resolve-self-in-impl.rs:14:13 | -LL | impl Tr for Self {} //~ ERROR cycle detected +LL | impl Tr for Self {} | ^^^^ | = note: ...which again requires processing ``, completing the cycle @@ -20,7 +20,7 @@ LL | | fn main() {} error[E0391]: cycle detected when processing `` --> $DIR/resolve-self-in-impl.rs:15:15 | -LL | impl Tr for S {} //~ ERROR cycle detected +LL | impl Tr for S {} | ^^^^ | = note: ...which again requires processing ``, completing the cycle @@ -39,7 +39,7 @@ LL | | fn main() {} error[E0391]: cycle detected when processing `` --> $DIR/resolve-self-in-impl.rs:16:6 | -LL | impl Self {} //~ ERROR cycle detected +LL | impl Self {} | ^^^^ | = note: ...which again requires processing ``, completing the cycle @@ -58,7 +58,7 @@ LL | | fn main() {} error[E0391]: cycle detected when processing `` --> $DIR/resolve-self-in-impl.rs:17:8 | -LL | impl S {} //~ ERROR cycle detected +LL | impl S {} | ^^^^ | = note: ...which again requires processing ``, completing the cycle @@ -77,7 +77,7 @@ LL | | fn main() {} error[E0391]: cycle detected when processing `` --> $DIR/resolve-self-in-impl.rs:18:1 | -LL | impl Tr for S {} //~ ERROR cycle detected +LL | impl Tr for S {} | ^^^^^^^^^^^^^^^^^^^^^^ | = note: ...which again requires processing ``, completing the cycle diff --git a/src/test/ui/resolve/resolve-variant-assoc-item.stderr b/src/test/ui/resolve/resolve-variant-assoc-item.stderr index b93005849f4..173976d707c 100644 --- a/src/test/ui/resolve/resolve-variant-assoc-item.stderr +++ b/src/test/ui/resolve/resolve-variant-assoc-item.stderr @@ -1,13 +1,13 @@ error[E0433]: failed to resolve: not a module `V` --> $DIR/resolve-variant-assoc-item.rs:5:8 | -LL | E::V::associated_item; //~ ERROR failed to resolve: not a module `V` +LL | E::V::associated_item; | ^ not a module `V` error[E0433]: failed to resolve: not a module `V` --> $DIR/resolve-variant-assoc-item.rs:6:5 | -LL | V::associated_item; //~ ERROR failed to resolve: not a module `V` +LL | V::associated_item; | ^ not a module `V` error: aborting due to 2 previous errors diff --git a/src/test/ui/resolve/token-error-correct-2.stderr b/src/test/ui/resolve/token-error-correct-2.stderr index 481ed882889..d568117d676 100644 --- a/src/test/ui/resolve/token-error-correct-2.stderr +++ b/src/test/ui/resolve/token-error-correct-2.stderr @@ -3,8 +3,8 @@ error: incorrect close delimiter: `)` | LL | if foo { | - un-closed delimiter -LL | //~^ ERROR: cannot find value `foo` -LL | ) //~ ERROR: incorrect close delimiter: `)` +LL | +LL | ) | ^ incorrect close delimiter error[E0425]: cannot find value `foo` in this scope diff --git a/src/test/ui/resolve/token-error-correct-3.stderr b/src/test/ui/resolve/token-error-correct-3.stderr index 035a5ede453..52a3117ff3a 100644 --- a/src/test/ui/resolve/token-error-correct-3.stderr +++ b/src/test/ui/resolve/token-error-correct-3.stderr @@ -12,7 +12,7 @@ error: expected one of `.`, `;`, `?`, `}`, or an operator, found `)` | LL | fs::create_dir_all(path.as_ref()).map(|()| true) | - expected one of `.`, `;`, `?`, `}`, or an operator here -LL | //~^ ERROR mismatched types +LL | LL | } else { | ^ unexpected token diff --git a/src/test/ui/resolve/token-error-correct.stderr b/src/test/ui/resolve/token-error-correct.stderr index b0827ea7367..9452e2d68de 100644 --- a/src/test/ui/resolve/token-error-correct.stderr +++ b/src/test/ui/resolve/token-error-correct.stderr @@ -5,7 +5,7 @@ LL | fn main() { | - close delimiter possibly meant for this LL | foo(bar(; | - un-closed delimiter -LL | //~^ ERROR cannot find function `bar` in this scope +LL | LL | } | ^ incorrect close delimiter diff --git a/src/test/ui/resolve/tuple-struct-alias.stderr b/src/test/ui/resolve/tuple-struct-alias.stderr index f299aa40a31..fc701b1644d 100644 --- a/src/test/ui/resolve/tuple-struct-alias.stderr +++ b/src/test/ui/resolve/tuple-struct-alias.stderr @@ -1,7 +1,7 @@ error[E0423]: expected function, found type alias `A` --> $DIR/tuple-struct-alias.rs:5:13 | -LL | let s = A(0, 1); //~ ERROR expected function +LL | let s = A(0, 1); | ^ help: a tuple struct with a similar name exists: `S` | = note: can't use a type alias as a constructor @@ -9,7 +9,7 @@ LL | let s = A(0, 1); //~ ERROR expected function error[E0532]: expected tuple struct/variant, found type alias `A` --> $DIR/tuple-struct-alias.rs:7:9 | -LL | A(..) => {} //~ ERROR expected tuple struct/variant +LL | A(..) => {} | ^ help: a tuple struct with a similar name exists: `S` | = note: can't use a type alias as a constructor diff --git a/src/test/ui/resolve/use_suggestion_placement.stderr b/src/test/ui/resolve/use_suggestion_placement.stderr index dcbb8dfe665..8d2fdd530f1 100644 --- a/src/test/ui/resolve/use_suggestion_placement.stderr +++ b/src/test/ui/resolve/use_suggestion_placement.stderr @@ -1,7 +1,7 @@ error[E0412]: cannot find type `Path` in this scope --> $DIR/use_suggestion_placement.rs:17:16 | -LL | type Bar = Path; //~ ERROR cannot find +LL | type Bar = Path; | ^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | @@ -11,7 +11,7 @@ LL | use std::path::Path; error[E0425]: cannot find value `A` in this scope --> $DIR/use_suggestion_placement.rs:22:13 | -LL | let _ = A; //~ ERROR cannot find +LL | let _ = A; | ^ not found in this scope help: possible candidate is found in another module, you can import it into scope | @@ -21,7 +21,7 @@ LL | use m::A; error[E0412]: cannot find type `HashMap` in this scope --> $DIR/use_suggestion_placement.rs:27:23 | -LL | type Dict = HashMap; //~ ERROR cannot find +LL | type Dict = HashMap; | ^^^^^^^ not found in this scope help: possible candidates are found in other modules, you can import them into scope | diff --git a/src/test/ui/retslot-cast.stderr b/src/test/ui/retslot-cast.stderr index 855aa501082..3c58285bdb3 100644 --- a/src/test/ui/retslot-cast.stderr +++ b/src/test/ui/retslot-cast.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/retslot-cast.rs:13:5 | -LL | inner(x) //~ ERROR mismatched types +LL | inner(x) | ^^^^^^^^ expected trait `std::iter::Iterator`, found trait `std::iter::Iterator + std::marker::Send` | = note: expected type `std::option::Option<&dyn std::iter::Iterator>` diff --git a/src/test/ui/return/return-from-diverging.stderr b/src/test/ui/return/return-from-diverging.stderr index 2862ae641df..3dd029c14c0 100644 --- a/src/test/ui/return/return-from-diverging.stderr +++ b/src/test/ui/return/return-from-diverging.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | fn fail() -> ! { | - expected `!` because of return type -LL | return "wow"; //~ ERROR mismatched types +LL | return "wow"; | ^^^^^ expected !, found reference | = note: expected type `!` diff --git a/src/test/ui/return/return-match-array-const.stderr b/src/test/ui/return/return-match-array-const.stderr index 763b3d987d7..6e8c9ed40bb 100644 --- a/src/test/ui/return/return-match-array-const.stderr +++ b/src/test/ui/return/return-match-array-const.stderr @@ -1,19 +1,19 @@ error[E0572]: return statement outside of function body --> $DIR/return-match-array-const.rs:2:10 | -LL | [(); return match 0 { n => n }]; //~ ERROR: return statement outside of function body +LL | [(); return match 0 { n => n }]; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0572]: return statement outside of function body --> $DIR/return-match-array-const.rs:4:10 | -LL | [(); return match 0 { 0 => 0 }]; //~ ERROR: return statement outside of function body +LL | [(); return match 0 { 0 => 0 }]; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0572]: return statement outside of function body --> $DIR/return-match-array-const.rs:6:10 | -LL | [(); return match () { 'a' => 0, _ => 0 }]; //~ ERROR: return statement outside of function body +LL | [(); return match () { 'a' => 0, _ => 0 }]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/return/return-unit-from-diverging.stderr b/src/test/ui/return/return-unit-from-diverging.stderr index 19eccac3433..befc57563a9 100644 --- a/src/test/ui/return/return-unit-from-diverging.stderr +++ b/src/test/ui/return/return-unit-from-diverging.stderr @@ -3,7 +3,7 @@ error[E0069]: `return;` in a function whose return type is not `()` | LL | fn fail() -> ! { | - expected `!` because of this return type -LL | return; //~ ERROR in a function whose return type is not +LL | return; | ^^^^^^ return type is not `()` error: aborting due to previous error diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-in-test-should-panic.stderr b/src/test/ui/rfc-1937-termination-trait/termination-trait-in-test-should-panic.stderr index 23a56bf8fec..7f6749fc9cc 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-in-test-should-panic.stderr +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-in-test-should-panic.stderr @@ -2,7 +2,7 @@ error: functions using `#[should_panic]` must return `()` --> $DIR/termination-trait-in-test-should-panic.rs:11:1 | LL | / fn not_a_num() -> Result<(), ParseIntError> { -LL | | //~^ ERROR functions using `#[should_panic]` must return `()` +LL | | LL | | let _: u32 = "abc".parse()?; LL | | Ok(()) LL | | } diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-main-wrong-type.stderr b/src/test/ui/rfc-1937-termination-trait/termination-trait-main-wrong-type.stderr index c1be04ca881..31b90340d79 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-main-wrong-type.stderr +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-main-wrong-type.stderr @@ -1,7 +1,7 @@ error[E0277]: `main` has invalid return type `char` --> $DIR/termination-trait-main-wrong-type.rs:1:14 | -LL | fn main() -> char { //~ ERROR +LL | fn main() -> char { | ^^^^ `main` can only return types that implement `std::process::Termination` | = help: consider using `()`, or a `Result` diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-not-satisfied.stderr b/src/test/ui/rfc-1937-termination-trait/termination-trait-not-satisfied.stderr index 2f05f9b0f7a..72a58a04170 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-not-satisfied.stderr +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-not-satisfied.stderr @@ -1,7 +1,7 @@ error[E0277]: `main` has invalid return type `ReturnType` --> $DIR/termination-trait-not-satisfied.rs:3:14 | -LL | fn main() -> ReturnType { //~ ERROR `main` has invalid return type `ReturnType` +LL | fn main() -> ReturnType { | ^^^^^^^^^^ `main` can only return types that implement `std::process::Termination` | = help: consider using `()`, or a `Result` diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr b/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr index a99f852d99b..18115541af9 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr @@ -1,7 +1,7 @@ error[E0277]: `main` has invalid return type `std::result::Result` --> $DIR/termination-trait-test-wrong-type.rs:6:1 | -LL | / fn can_parse_zero_as_f32() -> Result { //~ ERROR +LL | / fn can_parse_zero_as_f32() -> Result { LL | | "0".parse() LL | | } | |_^ `main` can only return types that implement `std::process::Termination` diff --git a/src/test/ui/rfc-2005-default-binding-mode/const.stderr b/src/test/ui/rfc-2005-default-binding-mode/const.stderr index 7ce8a325632..210b4f6be63 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/const.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/const.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/const.rs:14:9 | -LL | FOO => {}, //~ ERROR mismatched types +LL | FOO => {}, | ^^^ expected &Foo, found struct `Foo` | = note: expected type `&Foo` diff --git a/src/test/ui/rfc-2005-default-binding-mode/enum.stderr b/src/test/ui/rfc-2005-default-binding-mode/enum.stderr index d29b0111d8b..5106618af64 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/enum.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/enum.stderr @@ -1,19 +1,19 @@ error[E0594]: cannot assign to immutable borrowed content `*x` --> $DIR/enum.rs:9:5 | -LL | *x += 1; //~ ERROR cannot assign to immutable +LL | *x += 1; | ^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content `*x` --> $DIR/enum.rs:13:9 | -LL | *x += 1; //~ ERROR cannot assign to immutable +LL | *x += 1; | ^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content `*x` --> $DIR/enum.rs:19:9 | -LL | *x += 1; //~ ERROR cannot assign to immutable +LL | *x += 1; | ^^^^^^^ cannot borrow as mutable error: aborting due to 3 previous errors diff --git a/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.stderr b/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.stderr index e03f67760d7..b6424f84264 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.stderr @@ -1,19 +1,19 @@ error[E0594]: cannot assign to immutable borrowed content `*n` --> $DIR/explicit-mut.rs:7:13 | -LL | *n += 1; //~ ERROR cannot assign to immutable +LL | *n += 1; | ^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content `*n` --> $DIR/explicit-mut.rs:15:13 | -LL | *n += 1; //~ ERROR cannot assign to immutable +LL | *n += 1; | ^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable borrowed content `*n` --> $DIR/explicit-mut.rs:23:13 | -LL | *n += 1; //~ ERROR cannot assign to immutable +LL | *n += 1; | ^^^^^^^ cannot borrow as mutable error: aborting due to 3 previous errors diff --git a/src/test/ui/rfc-2005-default-binding-mode/lit.stderr b/src/test/ui/rfc-2005-default-binding-mode/lit.stderr index b78b4432bbe..9be1876b714 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/lit.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/lit.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/lit.rs:7:13 | -LL | "abc" => true, //~ ERROR mismatched types +LL | "abc" => true, | ^^^^^ expected &str, found str | = note: expected type `&&str` @@ -10,7 +10,7 @@ LL | "abc" => true, //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/lit.rs:16:9 | -LL | b"abc" => true, //~ ERROR mismatched types +LL | b"abc" => true, | ^^^^^^ expected &[u8], found array of 3 elements | = note: expected type `&&[u8]` diff --git a/src/test/ui/rfc-2005-default-binding-mode/no-double-error.stderr b/src/test/ui/rfc-2005-default-binding-mode/no-double-error.stderr index 9d35e167075..1bf9b09fcc5 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/no-double-error.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/no-double-error.stderr @@ -1,7 +1,7 @@ error[E0599]: no associated item named `XXX` found for type `u32` in the current scope --> $DIR/no-double-error.rs:8:14 | -LL | u32::XXX => { } //~ ERROR no associated item named +LL | u32::XXX => { } | -----^^^ | | | associated item not found in `u32` diff --git a/src/test/ui/rfc-2005-default-binding-mode/slice.stderr b/src/test/ui/rfc-2005-default-binding-mode/slice.stderr index e24c8f15559..f1e91a05f08 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/slice.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/slice.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `&[]` not covered --> $DIR/slice.rs:6:11 | -LL | match sl { //~ ERROR non-exhaustive patterns +LL | match sl { | ^^ pattern `&[]` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/rfc-2008-non-exhaustive/invalid-attribute.stderr b/src/test/ui/rfc-2008-non-exhaustive/invalid-attribute.stderr index 1d055fe8d4c..ff082e6fc42 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/invalid-attribute.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/invalid-attribute.stderr @@ -9,7 +9,7 @@ error[E0701]: attribute can only be applied to a struct or enum | LL | #[non_exhaustive] | ^^^^^^^^^^^^^^^^^ -LL | //~^ ERROR attribute can only be applied to a struct or enum [E0701] +LL | LL | trait Bar { } | ------------- not a struct or enum @@ -18,7 +18,7 @@ error[E0701]: attribute can only be applied to a struct or enum | LL | #[non_exhaustive] | ^^^^^^^^^^^^^^^^^ -LL | //~^ ERROR attribute can only be applied to a struct or enum [E0701] +LL | LL | / union Baz { LL | | f1: u16, LL | | f2: u16 diff --git a/src/test/ui/rfc-2008-non-exhaustive/structs.stderr b/src/test/ui/rfc-2008-non-exhaustive/structs.stderr index 4532b5c34cc..6213c392a9b 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/structs.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/structs.stderr @@ -27,7 +27,7 @@ error[E0639]: cannot create non-exhaustive struct using struct expression | LL | let fr = FunctionalRecord { | ______________^ -LL | | //~^ ERROR cannot create non-exhaustive struct +LL | | LL | | first_field: 1920, LL | | second_field: 1080, LL | | ..FunctionalRecord::default() diff --git a/src/test/ui/rfc-2093-infer-outlives/cross-crate.stderr b/src/test/ui/rfc-2093-infer-outlives/cross-crate.stderr index 850e7caec54..3368e35d304 100644 --- a/src/test/ui/rfc-2093-infer-outlives/cross-crate.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/cross-crate.stderr @@ -1,7 +1,7 @@ error: rustc_outlives --> $DIR/cross-crate.rs:4:1 | -LL | / struct Foo<'a, T> { //~ ERROR rustc_outlives +LL | / struct Foo<'a, T> { LL | | bar: std::slice::IterMut<'a, T> LL | | } | |_^ diff --git a/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.stderr b/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.stderr index e4f4b58fb33..26cbeeaf5ac 100644 --- a/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.stderr @@ -3,13 +3,13 @@ error[E0310]: the parameter type `U` may not live long enough | LL | struct Foo { | - help: consider adding an explicit lifetime bound `U: 'static`... -LL | bar: Bar //~ ERROR the parameter type `U` may not live long enough [E0310] +LL | bar: Bar | ^^^^^^^^^^^ | note: ...so that the type `U` will meet its required lifetime bounds --> $DIR/dont-infer-static.rs:10:5 | -LL | bar: Bar //~ ERROR the parameter type `U` may not live long enough [E0310] +LL | bar: Bar | ^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/rfc-2093-infer-outlives/enum.stderr b/src/test/ui/rfc-2093-infer-outlives/enum.stderr index c8e730090fc..e81d10a66df 100644 --- a/src/test/ui/rfc-2093-infer-outlives/enum.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/enum.stderr @@ -1,7 +1,7 @@ error: rustc_outlives --> $DIR/enum.rs:9:1 | -LL | / enum Foo<'a, T> { //~ ERROR rustc_outlives +LL | / enum Foo<'a, T> { LL | | One(Bar<'a, T>) LL | | } | |_^ @@ -11,7 +11,7 @@ LL | | } error: rustc_outlives --> $DIR/enum.rs:15:1 | -LL | / struct Bar<'b, U> { //~ ERROR rustc_outlives +LL | / struct Bar<'b, U> { LL | | field2: &'b U LL | | } | |_^ @@ -21,7 +21,7 @@ LL | | } error: rustc_outlives --> $DIR/enum.rs:21:1 | -LL | / enum Ying<'c, K> { //~ ERROR rustc_outlives +LL | / enum Ying<'c, K> { LL | | One(&'c Yang) LL | | } | |_^ diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-dyn.stderr b/src/test/ui/rfc-2093-infer-outlives/explicit-dyn.stderr index a5bee93a150..c87ef6c391b 100644 --- a/src/test/ui/rfc-2093-infer-outlives/explicit-dyn.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/explicit-dyn.stderr @@ -1,7 +1,7 @@ error: rustc_outlives --> $DIR/explicit-dyn.rs:8:1 | -LL | / struct Foo<'a, A> //~ ERROR rustc_outlives +LL | / struct Foo<'a, A> LL | | { LL | | foo: Box> LL | | } diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-enum.stderr b/src/test/ui/rfc-2093-infer-outlives/explicit-enum.stderr index 2149e0533c6..611df047cff 100644 --- a/src/test/ui/rfc-2093-infer-outlives/explicit-enum.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/explicit-enum.stderr @@ -1,7 +1,7 @@ error: rustc_outlives --> $DIR/explicit-enum.rs:4:1 | -LL | / enum Foo<'a, U> { //~ ERROR rustc_outlives +LL | / enum Foo<'a, U> { LL | | One(Bar<'a, U>) LL | | } | |_^ diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-projection.stderr b/src/test/ui/rfc-2093-infer-outlives/explicit-projection.stderr index 46793b1690a..8e9b158ab7c 100644 --- a/src/test/ui/rfc-2093-infer-outlives/explicit-projection.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/explicit-projection.stderr @@ -1,7 +1,7 @@ error: rustc_outlives --> $DIR/explicit-projection.rs:8:1 | -LL | / struct Foo<'a, A, B> where A: Trait<'a, B> //~ ERROR rustc_outlives +LL | / struct Foo<'a, A, B> where A: Trait<'a, B> LL | | { LL | | foo: >::Type LL | | } diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-struct.stderr b/src/test/ui/rfc-2093-infer-outlives/explicit-struct.stderr index b694b7a9543..cbff2b777fe 100644 --- a/src/test/ui/rfc-2093-infer-outlives/explicit-struct.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/explicit-struct.stderr @@ -1,7 +1,7 @@ error: rustc_outlives --> $DIR/explicit-struct.rs:4:1 | -LL | / struct Foo<'b, U> { //~ ERROR rustc_outlives +LL | / struct Foo<'b, U> { LL | | bar: Bar<'b, U> LL | | } | |_^ diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-union.stderr b/src/test/ui/rfc-2093-infer-outlives/explicit-union.stderr index d70fad9d830..adf62651cac 100644 --- a/src/test/ui/rfc-2093-infer-outlives/explicit-union.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/explicit-union.stderr @@ -1,7 +1,7 @@ error: rustc_outlives --> $DIR/explicit-union.rs:6:1 | -LL | / union Foo<'b, U> { //~ ERROR rustc_outlives +LL | / union Foo<'b, U> { LL | | bar: Bar<'b, U> LL | | } | |_^ diff --git a/src/test/ui/rfc-2093-infer-outlives/infer-static.stderr b/src/test/ui/rfc-2093-infer-outlives/infer-static.stderr index b3a827f38c5..106db765f7e 100644 --- a/src/test/ui/rfc-2093-infer-outlives/infer-static.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/infer-static.stderr @@ -1,7 +1,7 @@ error: rustc_outlives --> $DIR/infer-static.rs:5:1 | -LL | / struct Foo { //~ ERROR rustc_outlives +LL | / struct Foo { LL | | bar: Bar LL | | } | |_^ diff --git a/src/test/ui/rfc-2093-infer-outlives/nested-enum.stderr b/src/test/ui/rfc-2093-infer-outlives/nested-enum.stderr index 76d18bbee9d..6b143ba7eb9 100644 --- a/src/test/ui/rfc-2093-infer-outlives/nested-enum.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/nested-enum.stderr @@ -1,7 +1,7 @@ error: rustc_outlives --> $DIR/nested-enum.rs:4:1 | -LL | / enum Foo<'a, T> { //~ ERROR rustc_outlives +LL | / enum Foo<'a, T> { LL | | LL | | One(Bar<'a, T>) LL | | } diff --git a/src/test/ui/rfc-2093-infer-outlives/nested-regions.stderr b/src/test/ui/rfc-2093-infer-outlives/nested-regions.stderr index 2900a29ed7c..4d8f7b7c8c4 100644 --- a/src/test/ui/rfc-2093-infer-outlives/nested-regions.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/nested-regions.stderr @@ -1,7 +1,7 @@ error: rustc_outlives --> $DIR/nested-regions.rs:4:1 | -LL | / struct Foo<'a, 'b, T> { //~ ERROR rustc_outlives +LL | / struct Foo<'a, 'b, T> { LL | | x: &'a &'b T LL | | } | |_^ diff --git a/src/test/ui/rfc-2093-infer-outlives/nested-structs.stderr b/src/test/ui/rfc-2093-infer-outlives/nested-structs.stderr index e8b822df950..17d7c014e10 100644 --- a/src/test/ui/rfc-2093-infer-outlives/nested-structs.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/nested-structs.stderr @@ -1,7 +1,7 @@ error: rustc_outlives --> $DIR/nested-structs.rs:4:1 | -LL | / struct Foo<'a, T> { //~ ERROR rustc_outlives +LL | / struct Foo<'a, T> { LL | | field1: Bar<'a, T> LL | | } | |_^ diff --git a/src/test/ui/rfc-2093-infer-outlives/nested-union.stderr b/src/test/ui/rfc-2093-infer-outlives/nested-union.stderr index 56a2f873c76..fc4b1a22329 100644 --- a/src/test/ui/rfc-2093-infer-outlives/nested-union.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/nested-union.stderr @@ -1,7 +1,7 @@ error: rustc_outlives --> $DIR/nested-union.rs:6:1 | -LL | / union Foo<'a, T> { //~ ERROR rustc_outlives +LL | / union Foo<'a, T> { LL | | field1: Bar<'a, T> LL | | } | |_^ diff --git a/src/test/ui/rfc-2093-infer-outlives/projection.stderr b/src/test/ui/rfc-2093-infer-outlives/projection.stderr index 73d2420af00..8a91c44c580 100644 --- a/src/test/ui/rfc-2093-infer-outlives/projection.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/projection.stderr @@ -1,7 +1,7 @@ error: rustc_outlives --> $DIR/projection.rs:4:1 | -LL | / struct Foo<'a, T: Iterator> { //~ ERROR rustc_outlives +LL | / struct Foo<'a, T: Iterator> { LL | | bar: &'a T::Item LL | | } | |_^ diff --git a/src/test/ui/rfc-2093-infer-outlives/reference.stderr b/src/test/ui/rfc-2093-infer-outlives/reference.stderr index 41a8de2d84b..adb1c4a6290 100644 --- a/src/test/ui/rfc-2093-infer-outlives/reference.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/reference.stderr @@ -1,7 +1,7 @@ error: rustc_outlives --> $DIR/reference.rs:4:1 | -LL | / struct Foo<'a, T> { //~ ERROR rustc_outlives +LL | / struct Foo<'a, T> { LL | | bar: &'a T, LL | | } | |_^ diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-enum-not-wf.stderr b/src/test/ui/rfc-2093-infer-outlives/regions-enum-not-wf.stderr index d10f7ed28fc..87014085667 100644 --- a/src/test/ui/rfc-2093-infer-outlives/regions-enum-not-wf.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/regions-enum-not-wf.stderr @@ -3,13 +3,13 @@ error[E0309]: the parameter type `T` may not live long enough | LL | enum Ref1<'a, T> { | - help: consider adding an explicit lifetime bound `T: 'a`... -LL | Ref1Variant1(RequireOutlives<'a, T>) //~ ERROR the parameter type `T` may not live long enough +LL | Ref1Variant1(RequireOutlives<'a, T>) | ^^^^^^^^^^^^^^^^^^^^^^ | note: ...so that the type `T` will meet its required lifetime bounds --> $DIR/regions-enum-not-wf.rs:18:18 | -LL | Ref1Variant1(RequireOutlives<'a, T>) //~ ERROR the parameter type `T` may not live long enough +LL | Ref1Variant1(RequireOutlives<'a, T>) | ^^^^^^^^^^^^^^^^^^^^^^ error[E0309]: the parameter type `T` may not live long enough @@ -18,40 +18,40 @@ error[E0309]: the parameter type `T` may not live long enough LL | enum Ref2<'a, T> { | - help: consider adding an explicit lifetime bound `T: 'a`... LL | Ref2Variant1, -LL | Ref2Variant2(isize, RequireOutlives<'a, T>), //~ ERROR the parameter type `T` may not live long enough +LL | Ref2Variant2(isize, RequireOutlives<'a, T>), | ^^^^^^^^^^^^^^^^^^^^^^ | note: ...so that the type `T` will meet its required lifetime bounds --> $DIR/regions-enum-not-wf.rs:23:25 | -LL | Ref2Variant2(isize, RequireOutlives<'a, T>), //~ ERROR the parameter type `T` may not live long enough +LL | Ref2Variant2(isize, RequireOutlives<'a, T>), | ^^^^^^^^^^^^^^^^^^^^^^ error[E0309]: the parameter type `T` may not live long enough --> $DIR/regions-enum-not-wf.rs:35:1 | -LL | enum RefDouble<'a, 'b, T> { //~ ERROR the parameter type `T` may not live long enough [E0309] +LL | enum RefDouble<'a, 'b, T> { | ^ - help: consider adding an explicit lifetime bound `T: 'b`... | _| | | LL | | RefDoubleVariant1(&'a RequireOutlives<'b, T>) -LL | | //~^ the parameter type `T` may not live long enough [E0309] +LL | | LL | | } | |_^ | note: ...so that the type `T` will meet its required lifetime bounds --> $DIR/regions-enum-not-wf.rs:35:1 | -LL | / enum RefDouble<'a, 'b, T> { //~ ERROR the parameter type `T` may not live long enough [E0309] +LL | / enum RefDouble<'a, 'b, T> { LL | | RefDoubleVariant1(&'a RequireOutlives<'b, T>) -LL | | //~^ the parameter type `T` may not live long enough [E0309] +LL | | LL | | } | |_^ error[E0309]: the parameter type `T` may not live long enough --> $DIR/regions-enum-not-wf.rs:36:23 | -LL | enum RefDouble<'a, 'b, T> { //~ ERROR the parameter type `T` may not live long enough [E0309] +LL | enum RefDouble<'a, 'b, T> { | - help: consider adding an explicit lifetime bound `T: 'b`... LL | RefDoubleVariant1(&'a RequireOutlives<'b, T>) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr index 4b7732251b0..be8b5c6446c 100644 --- a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr @@ -1,7 +1,7 @@ error[E0491]: in type `&'a rev_variant_struct_region::Foo<'b>`, reference has a longer lifetime than the data it references --> $DIR/regions-outlives-nominal-type-region-rev.rs:17:9 | -LL | type Out = &'a Foo<'b>; //~ ERROR reference has a longer lifetime +LL | type Out = &'a Foo<'b>; | ^^^^^^^^^^^^^^^^^^^^^^^ | note: the pointer is valid for the lifetime 'a as defined on the impl at 16:10 diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr index 9cabc973d1a..9a3ba2d65ca 100644 --- a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr @@ -1,7 +1,7 @@ error[E0491]: in type `&'a variant_struct_region::Foo<'b>`, reference has a longer lifetime than the data it references --> $DIR/regions-outlives-nominal-type-region.rs:17:9 | -LL | type Out = &'a Foo<'b>; //~ ERROR reference has a longer lifetime +LL | type Out = &'a Foo<'b>; | ^^^^^^^^^^^^^^^^^^^^^^^ | note: the pointer is valid for the lifetime 'a as defined on the impl at 16:10 diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr index 6142228664a..5389beea3a7 100644 --- a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr @@ -1,7 +1,7 @@ error[E0491]: in type `&'a variant_struct_type::Foo<&'b i32>`, reference has a longer lifetime than the data it references --> $DIR/regions-outlives-nominal-type-type-rev.rs:17:9 | -LL | type Out = &'a Foo<&'b i32>; //~ ERROR reference has a longer lifetime +LL | type Out = &'a Foo<&'b i32>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: the pointer is valid for the lifetime 'a as defined on the impl at 16:10 diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr index 0831f3acef2..2f3ef48a054 100644 --- a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr @@ -1,7 +1,7 @@ error[E0491]: in type `&'a variant_struct_type::Foo<&'b i32>`, reference has a longer lifetime than the data it references --> $DIR/regions-outlives-nominal-type-type.rs:17:9 | -LL | type Out = &'a Foo<&'b i32>; //~ ERROR reference has a longer lifetime +LL | type Out = &'a Foo<&'b i32>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: the pointer is valid for the lifetime 'a as defined on the impl at 16:10 diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-struct-not-wf.stderr b/src/test/ui/rfc-2093-infer-outlives/regions-struct-not-wf.stderr index 2485c7c3659..8130f5de558 100644 --- a/src/test/ui/rfc-2093-infer-outlives/regions-struct-not-wf.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/regions-struct-not-wf.stderr @@ -3,13 +3,13 @@ error[E0309]: the parameter type `T` may not live long enough | LL | impl<'a, T> Trait<'a, T> for usize { | - help: consider adding an explicit lifetime bound `T: 'a`... -LL | type Out = &'a T; //~ ERROR `T` may not live long enough +LL | type Out = &'a T; | ^^^^^^^^^^^^^^^^^ | note: ...so that the reference type `&'a T` does not outlive the data it points at --> $DIR/regions-struct-not-wf.rs:13:5 | -LL | type Out = &'a T; //~ ERROR `T` may not live long enough +LL | type Out = &'a T; | ^^^^^^^^^^^^^^^^^ error[E0309]: the parameter type `T` may not live long enough @@ -17,19 +17,19 @@ error[E0309]: the parameter type `T` may not live long enough | LL | impl<'a, T> Trait<'a, T> for u32 { | - help: consider adding an explicit lifetime bound `T: 'a`... -LL | type Out = RefOk<'a, T>; //~ ERROR `T` may not live long enough +LL | type Out = RefOk<'a, T>; | ^^^^^^^^^^^^^^^^^^^^^^^^ | note: ...so that the type `T` will meet its required lifetime bounds --> $DIR/regions-struct-not-wf.rs:21:5 | -LL | type Out = RefOk<'a, T>; //~ ERROR `T` may not live long enough +LL | type Out = RefOk<'a, T>; | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0491]: in type `&'a &'b T`, reference has a longer lifetime than the data it references --> $DIR/regions-struct-not-wf.rs:25:5 | -LL | type Out = &'a &'b T; //~ ERROR reference has a longer lifetime than the data +LL | type Out = &'a &'b T; | ^^^^^^^^^^^^^^^^^^^^^ | note: the pointer is valid for the lifetime 'a as defined on the impl at 24:6 diff --git a/src/test/ui/rfc-2093-infer-outlives/self-dyn.stderr b/src/test/ui/rfc-2093-infer-outlives/self-dyn.stderr index 62b546adfc1..0be14a6956f 100644 --- a/src/test/ui/rfc-2093-infer-outlives/self-dyn.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/self-dyn.stderr @@ -1,7 +1,7 @@ error: rustc_outlives --> $DIR/self-dyn.rs:9:1 | -LL | / struct Foo<'a, 'b, A> //~ ERROR rustc_outlives +LL | / struct Foo<'a, 'b, A> LL | | { LL | | foo: Box> LL | | } diff --git a/src/test/ui/rfc-2093-infer-outlives/self-structs.stderr b/src/test/ui/rfc-2093-infer-outlives/self-structs.stderr index 15ff6009e5c..9ae05dab74d 100644 --- a/src/test/ui/rfc-2093-infer-outlives/self-structs.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/self-structs.stderr @@ -1,7 +1,7 @@ error: rustc_outlives --> $DIR/self-structs.rs:4:1 | -LL | / struct Foo<'a, 'b, T> { //~ ERROR rustc_outlives +LL | / struct Foo<'a, 'b, T> { LL | | field1: Bar<'a, 'b, T> LL | | } | |_^ diff --git a/src/test/ui/rfc-2126-crate-paths/crate-path-non-absolute.stderr b/src/test/ui/rfc-2126-crate-paths/crate-path-non-absolute.stderr index 23485f7a559..e4c47901455 100644 --- a/src/test/ui/rfc-2126-crate-paths/crate-path-non-absolute.stderr +++ b/src/test/ui/rfc-2126-crate-paths/crate-path-non-absolute.stderr @@ -1,13 +1,13 @@ error[E0433]: failed to resolve: `crate` in paths can only be used in start position --> $DIR/crate-path-non-absolute.rs:7:22 | -LL | let s = ::m::crate::S; //~ ERROR failed to resolve +LL | let s = ::m::crate::S; | ^^^^^ `crate` in paths can only be used in start position error[E0433]: failed to resolve: global paths cannot start with `crate` --> $DIR/crate-path-non-absolute.rs:8:20 | -LL | let s1 = ::crate::S; //~ ERROR failed to resolve +LL | let s1 = ::crate::S; | ^^^^^ global paths cannot start with `crate` error: aborting due to 2 previous errors diff --git a/src/test/ui/rfc-2126-extern-absolute-paths/meta.stderr b/src/test/ui/rfc-2126-extern-absolute-paths/meta.stderr index e9de20edb50..eb4b9dea41b 100644 --- a/src/test/ui/rfc-2126-extern-absolute-paths/meta.stderr +++ b/src/test/ui/rfc-2126-extern-absolute-paths/meta.stderr @@ -1,7 +1,7 @@ error[E0463]: can't find crate for `meta` --> $DIR/meta.rs:5:5 | -LL | use meta; //~ ERROR can't find crate for `meta` +LL | use meta; | ^^^^ can't find crate error: aborting due to previous error diff --git a/src/test/ui/rfc-2126-extern-absolute-paths/non-existent-1.stderr b/src/test/ui/rfc-2126-extern-absolute-paths/non-existent-1.stderr index 23aeb92f487..64b920e9aa7 100644 --- a/src/test/ui/rfc-2126-extern-absolute-paths/non-existent-1.stderr +++ b/src/test/ui/rfc-2126-extern-absolute-paths/non-existent-1.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `xcrate` --> $DIR/non-existent-1.rs:3:5 | -LL | use xcrate::S; //~ ERROR unresolved import `xcrate` +LL | use xcrate::S; | ^^^^^^ use of undeclared type or module `xcrate` error: aborting due to previous error diff --git a/src/test/ui/rfc-2126-extern-absolute-paths/non-existent-3.stderr b/src/test/ui/rfc-2126-extern-absolute-paths/non-existent-3.stderr index b4982d5083c..bfce180789c 100644 --- a/src/test/ui/rfc-2126-extern-absolute-paths/non-existent-3.stderr +++ b/src/test/ui/rfc-2126-extern-absolute-paths/non-existent-3.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `ycrate` --> $DIR/non-existent-3.rs:3:5 | -LL | use ycrate; //~ ERROR unresolved import `ycrate` +LL | use ycrate; | ^^^^^^ no `ycrate` external crate error: aborting due to previous error diff --git a/src/test/ui/rfc-2126-extern-absolute-paths/not-whitelisted.stderr b/src/test/ui/rfc-2126-extern-absolute-paths/not-whitelisted.stderr index 3bea7816b30..4e3fff98e6f 100644 --- a/src/test/ui/rfc-2126-extern-absolute-paths/not-whitelisted.stderr +++ b/src/test/ui/rfc-2126-extern-absolute-paths/not-whitelisted.stderr @@ -1,13 +1,13 @@ error: cannot import a built-in macro --> $DIR/not-whitelisted.rs:6:5 | -LL | use test; //~ ERROR cannot import a built-in macro +LL | use test; | ^^^^ error[E0432]: unresolved import `alloc` --> $DIR/not-whitelisted.rs:5:5 | -LL | use alloc; //~ ERROR unresolved import `alloc` +LL | use alloc; | ^^^^^ no `alloc` external crate error: aborting due to 2 previous errors diff --git a/src/test/ui/rfc-2126-extern-absolute-paths/single-segment.stderr b/src/test/ui/rfc-2126-extern-absolute-paths/single-segment.stderr index d32835a49f8..396a798c820 100644 --- a/src/test/ui/rfc-2126-extern-absolute-paths/single-segment.stderr +++ b/src/test/ui/rfc-2126-extern-absolute-paths/single-segment.stderr @@ -1,19 +1,19 @@ error: crate root imports need to be explicitly named: `use crate as name;` --> $DIR/single-segment.rs:5:5 | -LL | use crate; //~ ERROR crate root imports need to be explicitly named: `use crate as name;` +LL | use crate; | ^^^^^ error: cannot glob-import all possible crates --> $DIR/single-segment.rs:6:5 | -LL | use *; //~ ERROR cannot glob-import all possible crates +LL | use *; | ^ error[E0423]: expected value, found module `xcrate` --> $DIR/single-segment.rs:9:13 | -LL | let s = ::xcrate; //~ ERROR expected value, found module `xcrate` +LL | let s = ::xcrate; | ^^^^^^^^ not a value error: aborting due to 3 previous errors diff --git a/src/test/ui/rfc-2166-underscore-imports/basic.stderr b/src/test/ui/rfc-2166-underscore-imports/basic.stderr index 30803591926..9ca60e8e0a9 100644 --- a/src/test/ui/rfc-2166-underscore-imports/basic.stderr +++ b/src/test/ui/rfc-2166-underscore-imports/basic.stderr @@ -1,7 +1,7 @@ warning: unused import: `m::Tr1 as _` --> $DIR/basic.rs:26:9 | -LL | use m::Tr1 as _; //~ WARN unused import +LL | use m::Tr1 as _; | ^^^^^^^^^^^ | note: lint level defined here @@ -13,6 +13,6 @@ LL | #![warn(unused_imports, unused_extern_crates)] warning: unused import: `S as _` --> $DIR/basic.rs:27:9 | -LL | use S as _; //~ WARN unused import +LL | use S as _; | ^^^^^^ diff --git a/src/test/ui/rfc-2166-underscore-imports/unused-2018.stderr b/src/test/ui/rfc-2166-underscore-imports/unused-2018.stderr index 4163c287607..861b3f1d4fd 100644 --- a/src/test/ui/rfc-2166-underscore-imports/unused-2018.stderr +++ b/src/test/ui/rfc-2166-underscore-imports/unused-2018.stderr @@ -1,7 +1,7 @@ error: unused import: `core::any` --> $DIR/unused-2018.rs:6:9 | -LL | use core::any; //~ ERROR unused import: `core::any` +LL | use core::any; | ^^^^^^^^^ | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![deny(unused_imports)] error: unused import: `core` --> $DIR/unused-2018.rs:10:9 | -LL | use core; //~ ERROR unused import: `core` +LL | use core; | ^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr index 5f3a6b414e0..cfc318c1cd0 100644 --- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr +++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `a` | LL | let _ = dbg!(a); | ------- value moved here -LL | let _ = dbg!(a); //~ ERROR use of moved value +LL | let _ = dbg!(a); | ^ value used here after move | = note: move occurs because `a` has type `NoCopy`, which does not implement the `Copy` trait @@ -14,7 +14,7 @@ error[E0382]: use of moved value: `a` | LL | let _ = dbg!(a); | ------- value moved here -LL | let _ = dbg!(a); //~ ERROR use of moved value +LL | let _ = dbg!(a); | ^^^^^^^ value used here after move | = note: move occurs because `a` has type `NoCopy`, which does not implement the `Copy` trait diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr index bd41f7b3405..ecab673953d 100644 --- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr +++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr @@ -1,7 +1,7 @@ error[E0277]: `NotDebug` doesn't implement `std::fmt::Debug` --> $DIR/dbg-macro-requires-debug.rs:6:23 | -LL | let _: NotDebug = dbg!(NotDebug); //~ ERROR `NotDebug` doesn't implement `std::fmt::Debug` +LL | let _: NotDebug = dbg!(NotDebug); | ^^^^^^^^^^^^^^ `NotDebug` cannot be formatted using `{:?}` | = help: the trait `std::fmt::Debug` is not implemented for `NotDebug` diff --git a/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.stderr b/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.stderr index 5aa34bca130..b323104048f 100644 --- a/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.stderr +++ b/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.stderr @@ -1,6 +1,6 @@ warning: the feature `generic_associated_types` is incomplete and may cause the compiler to crash --> $DIR/generic-associated-types-where.rs:1:12 | -LL | #![feature(generic_associated_types)] //~ WARN `generic_associated_types` is incomplete +LL | #![feature(generic_associated_types)] | ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/rmeta.stderr b/src/test/ui/rmeta.stderr index d36b3a746e6..d15caeb6698 100644 --- a/src/test/ui/rmeta.stderr +++ b/src/test/ui/rmeta.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `Foo` in this scope --> $DIR/rmeta.rs:7:13 | -LL | let _ = Foo; //~ ERROR cannot find value `Foo` in this scope +LL | let _ = Foo; | ^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/rmeta_meta_main.stderr b/src/test/ui/rmeta_meta_main.stderr index bed9076d84c..347e5e97d7a 100644 --- a/src/test/ui/rmeta_meta_main.stderr +++ b/src/test/ui/rmeta_meta_main.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `rmeta_meta::Foo` has no field named `field2` --> $DIR/rmeta_meta_main.rs:13:19 | -LL | let _ = Foo { field2: 42 }; //~ ERROR struct `rmeta_meta::Foo` has no field named `field2` +LL | let _ = Foo { field2: 42 }; | ^^^^^^ help: a field with a similar name exists: `field` error: aborting due to previous error diff --git a/src/test/ui/rust-2018/async-ident-allowed.stderr b/src/test/ui/rust-2018/async-ident-allowed.stderr index 61e1facd30e..d3e450e9be0 100644 --- a/src/test/ui/rust-2018/async-ident-allowed.stderr +++ b/src/test/ui/rust-2018/async-ident-allowed.stderr @@ -1,7 +1,7 @@ error: `async` is a keyword in the 2018 edition --> $DIR/async-ident-allowed.rs:9:9 | -LL | let async = 3; //~ ERROR: is a keyword +LL | let async = 3; | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` | note: lint level defined here diff --git a/src/test/ui/rust-2018/async-ident.stderr b/src/test/ui/rust-2018/async-ident.stderr index b33c043c9ea..b1495337756 100644 --- a/src/test/ui/rust-2018/async-ident.stderr +++ b/src/test/ui/rust-2018/async-ident.stderr @@ -1,7 +1,7 @@ error: `async` is a keyword in the 2018 edition --> $DIR/async-ident.rs:7:4 | -LL | fn async() {} //~ ERROR async +LL | fn async() {} | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` | note: lint level defined here diff --git a/src/test/ui/rust-2018/dyn-keyword.stderr b/src/test/ui/rust-2018/dyn-keyword.stderr index 5a3e00ab1d9..fa79df49fb6 100644 --- a/src/test/ui/rust-2018/dyn-keyword.stderr +++ b/src/test/ui/rust-2018/dyn-keyword.stderr @@ -1,7 +1,7 @@ error: `dyn` is a keyword in the 2018 edition --> $DIR/dyn-keyword.rs:8:9 | -LL | let dyn = (); //~ ERROR dyn +LL | let dyn = (); | ^^^ help: you can use a raw identifier to stay compatible: `r#dyn` | note: lint level defined here diff --git a/src/test/ui/rust-2018/dyn-trait-compatibility.stderr b/src/test/ui/rust-2018/dyn-trait-compatibility.stderr index 6be00520465..e1f099e9190 100644 --- a/src/test/ui/rust-2018/dyn-trait-compatibility.stderr +++ b/src/test/ui/rust-2018/dyn-trait-compatibility.stderr @@ -1,17 +1,17 @@ error: expected identifier, found keyword `dyn` --> $DIR/dyn-trait-compatibility.rs:4:16 | -LL | type A1 = dyn::dyn; //~ERROR expected identifier, found keyword `dyn` +LL | type A1 = dyn::dyn; | ^^^ expected identifier, found keyword help: you can escape reserved keywords to use them as identifiers | -LL | type A1 = dyn::r#dyn; //~ERROR expected identifier, found keyword `dyn` +LL | type A1 = dyn::r#dyn; | ^^^^^ error: expected identifier, found `<` --> $DIR/dyn-trait-compatibility.rs:5:14 | -LL | type A2 = dyn; //~ERROR expected identifier, found `<` +LL | type A2 = dyn; | ^ expected identifier error: aborting due to 2 previous errors diff --git a/src/test/ui/rust-2018/future-proofing-locals.stderr b/src/test/ui/rust-2018/future-proofing-locals.stderr index 413e199cd64..4d666d22afe 100644 --- a/src/test/ui/rust-2018/future-proofing-locals.stderr +++ b/src/test/ui/rust-2018/future-proofing-locals.stderr @@ -1,55 +1,55 @@ error: imports cannot refer to type parameters --> $DIR/future-proofing-locals.rs:13:9 | -LL | use T as _; //~ ERROR imports cannot refer to type parameters +LL | use T as _; | ^ error: imports cannot refer to type parameters --> $DIR/future-proofing-locals.rs:14:9 | -LL | use T::U; //~ ERROR imports cannot refer to type parameters +LL | use T::U; | ^ error: imports cannot refer to type parameters --> $DIR/future-proofing-locals.rs:15:9 | -LL | use T::*; //~ ERROR imports cannot refer to type parameters +LL | use T::*; | ^ error: imports cannot refer to type parameters --> $DIR/future-proofing-locals.rs:19:9 | -LL | use T; //~ ERROR imports cannot refer to type parameters +LL | use T; | ^ error: imports cannot refer to local variables --> $DIR/future-proofing-locals.rs:25:9 | -LL | use x as _; //~ ERROR imports cannot refer to local variables +LL | use x as _; | ^ error: imports cannot refer to local variables --> $DIR/future-proofing-locals.rs:31:9 | -LL | use x; //~ ERROR imports cannot refer to local variables +LL | use x; | ^ error: imports cannot refer to local variables --> $DIR/future-proofing-locals.rs:37:17 | -LL | use x; //~ ERROR imports cannot refer to local variables +LL | use x; | ^ error: imports cannot refer to type parameters --> $DIR/future-proofing-locals.rs:45:10 | -LL | use {T as _, x}; //~ ERROR imports cannot refer to type parameters +LL | use {T as _, x}; | ^ error: imports cannot refer to local variables --> $DIR/future-proofing-locals.rs:45:18 | -LL | use {T as _, x}; //~ ERROR imports cannot refer to type parameters +LL | use {T as _, x}; | ^ error: aborting due to 9 previous errors diff --git a/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr b/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr index 7f3f6ccf39e..49aaff620d6 100644 --- a/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr +++ b/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr @@ -1,7 +1,7 @@ error: unused extern crate --> $DIR/issue-54400-unused-extern-crate-attr-span.rs:12:1 | -LL | / #[cfg(blandiloquence)] //~ HELP remove it +LL | / #[cfg(blandiloquence)] LL | | extern crate edition_lint_paths; | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- | |________________________________| diff --git a/src/test/ui/rust-2018/local-path-suggestions-2015.stderr b/src/test/ui/rust-2018/local-path-suggestions-2015.stderr index fafb35ec50d..666864a18af 100644 --- a/src/test/ui/rust-2018/local-path-suggestions-2015.stderr +++ b/src/test/ui/rust-2018/local-path-suggestions-2015.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `foobar` --> $DIR/local-path-suggestions-2015.rs:24:5 | -LL | use foobar::Baz; //~ ERROR unresolved import `foobar` +LL | use foobar::Baz; | ^^^^^^ | | | unresolved import diff --git a/src/test/ui/rust-2018/local-path-suggestions-2018.stderr b/src/test/ui/rust-2018/local-path-suggestions-2018.stderr index 759977b3f06..40f3d6bf1cf 100644 --- a/src/test/ui/rust-2018/local-path-suggestions-2018.stderr +++ b/src/test/ui/rust-2018/local-path-suggestions-2018.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `foo` --> $DIR/local-path-suggestions-2018.rs:10:9 | -LL | use foo::Bar; //~ ERROR unresolved import `foo` +LL | use foo::Bar; | ^^^ help: a similar path exists: `crate::foo` | = note: `use` statements changed in Rust 2018; read more at @@ -9,7 +9,7 @@ LL | use foo::Bar; //~ ERROR unresolved import `foo` error[E0432]: unresolved import `foobar` --> $DIR/local-path-suggestions-2018.rs:19:5 | -LL | use foobar::Baz; //~ ERROR unresolved import `foobar` +LL | use foobar::Baz; | ^^^^^^ help: a similar path exists: `baz::foobar` error: aborting due to 2 previous errors diff --git a/src/test/ui/rust-2018/macro-use-warned-against.stderr b/src/test/ui/rust-2018/macro-use-warned-against.stderr index 55213a77a2c..c3e459606e1 100644 --- a/src/test/ui/rust-2018/macro-use-warned-against.stderr +++ b/src/test/ui/rust-2018/macro-use-warned-against.stderr @@ -1,7 +1,7 @@ warning: deprecated `#[macro_use]` directive used to import macros should be replaced at use sites with a `use` statement to import the macro instead --> $DIR/macro-use-warned-against.rs:7:1 | -LL | #[macro_use] //~ WARN should be replaced at use sites with a `use` statement +LL | #[macro_use] | ^^^^^^^^^^^^ | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![warn(macro_use_extern_crate, unused)] warning: unused `#[macro_use]` import --> $DIR/macro-use-warned-against.rs:9:1 | -LL | #[macro_use] //~ WARN unused `#[macro_use]` +LL | #[macro_use] | ^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/rust-2018/suggestions-not-always-applicable.stderr b/src/test/ui/rust-2018/suggestions-not-always-applicable.stderr index 53ea9e64572..19e87b664cc 100644 --- a/src/test/ui/rust-2018/suggestions-not-always-applicable.stderr +++ b/src/test/ui/rust-2018/suggestions-not-always-applicable.stderr @@ -1,7 +1,7 @@ warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition --> $DIR/suggestions-not-always-applicable.rs:17:5 | -LL | #[foo] //~ WARN: absolute paths must start with +LL | #[foo] | ^^^^^^ | note: lint level defined here @@ -16,7 +16,7 @@ LL | #![warn(rust_2018_compatibility)] warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition --> $DIR/suggestions-not-always-applicable.rs:17:5 | -LL | #[foo] //~ WARN: absolute paths must start with +LL | #[foo] | ^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! diff --git a/src/test/ui/rust-2018/trait-import-suggestions.stderr b/src/test/ui/rust-2018/trait-import-suggestions.stderr index e4c17680c90..e2ffeaee4b4 100644 --- a/src/test/ui/rust-2018/trait-import-suggestions.stderr +++ b/src/test/ui/rust-2018/trait-import-suggestions.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `foobar` found for type `u32` in the current scope --> $DIR/trait-import-suggestions.rs:22:11 | -LL | x.foobar(); //~ ERROR no method named `foobar` +LL | x.foobar(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope @@ -11,7 +11,7 @@ LL | x.foobar(); //~ ERROR no method named `foobar` error[E0599]: no method named `bar` found for type `u32` in the current scope --> $DIR/trait-import-suggestions.rs:28:7 | -LL | x.bar(); //~ ERROR no method named `bar` +LL | x.bar(); | ^^^ | = help: items from traits can only be used if the trait is in scope @@ -23,13 +23,13 @@ LL | use crate::foo::Bar; error[E0599]: no method named `baz` found for type `u32` in the current scope --> $DIR/trait-import-suggestions.rs:29:7 | -LL | x.baz(); //~ ERROR no method named `baz` +LL | x.baz(); | ^^^ error[E0599]: no function or associated item named `from_str` found for type `u32` in the current scope --> $DIR/trait-import-suggestions.rs:30:18 | -LL | let y = u32::from_str("33"); //~ ERROR no function or associated item named `from_str` +LL | let y = u32::from_str("33"); | -----^^^^^^^^ | | | function or associated item not found in `u32` diff --git a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.stderr b/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.stderr index 4a01ba5088f..db176876382 100644 --- a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.stderr +++ b/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.stderr @@ -1,7 +1,7 @@ error[E0659]: `sub` is ambiguous (name vs any other name during import resolution) --> $DIR/block-scoped-shadow-nested.rs:16:13 | -LL | use sub::bar; //~ ERROR `sub` is ambiguous +LL | use sub::bar; | ^^^ ambiguous name | note: `sub` could refer to the module imported here diff --git a/src/test/ui/rust-2018/uniform-paths/deadlock.stderr b/src/test/ui/rust-2018/uniform-paths/deadlock.stderr index 8bbc8f33039..b4ac15c588e 100644 --- a/src/test/ui/rust-2018/uniform-paths/deadlock.stderr +++ b/src/test/ui/rust-2018/uniform-paths/deadlock.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import --> $DIR/deadlock.rs:4:5 | -LL | use foo::bar; //~ ERROR unresolved import +LL | use foo::bar; | ^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/rust-2018/uniform-paths/issue-54253.stderr b/src/test/ui/rust-2018/uniform-paths/issue-54253.stderr index 3d7176265a2..adde6359035 100644 --- a/src/test/ui/rust-2018/uniform-paths/issue-54253.stderr +++ b/src/test/ui/rust-2018/uniform-paths/issue-54253.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `crate::version` --> $DIR/issue-54253.rs:10:9 | -LL | use crate::version; //~ ERROR unresolved import `crate::version` +LL | use crate::version; | ^^^^^^^^^^^^^^ no `version` in the root error: aborting due to previous error diff --git a/src/test/ui/rust-2018/uniform-paths/issue-56596.stderr b/src/test/ui/rust-2018/uniform-paths/issue-56596.stderr index 293d0ec6a72..b1c0b461db4 100644 --- a/src/test/ui/rust-2018/uniform-paths/issue-56596.stderr +++ b/src/test/ui/rust-2018/uniform-paths/issue-56596.stderr @@ -1,7 +1,7 @@ error[E0659]: `issue_56596` is ambiguous (name vs any other name during import resolution) --> $DIR/issue-56596.rs:12:5 | -LL | use issue_56596; //~ ERROR `issue_56596` is ambiguous +LL | use issue_56596; | ^^^^^^^^^^^ ambiguous name | = note: `issue_56596` could refer to an extern crate passed with `--extern` diff --git a/src/test/ui/rust-2018/uniform-paths/macro-rules.stderr b/src/test/ui/rust-2018/uniform-paths/macro-rules.stderr index 684f5fceac1..e1000e588fa 100644 --- a/src/test/ui/rust-2018/uniform-paths/macro-rules.stderr +++ b/src/test/ui/rust-2018/uniform-paths/macro-rules.stderr @@ -1,19 +1,19 @@ error[E0364]: `legacy_macro` is private, and cannot be re-exported --> $DIR/macro-rules.rs:11:13 | -LL | pub use legacy_macro as _; //~ ERROR `legacy_macro` is private, and cannot be re-exported +LL | pub use legacy_macro as _; | ^^^^^^^^^^^^^^^^^ | note: consider marking `legacy_macro` as `pub` in the imported module --> $DIR/macro-rules.rs:11:13 | -LL | pub use legacy_macro as _; //~ ERROR `legacy_macro` is private, and cannot be re-exported +LL | pub use legacy_macro as _; | ^^^^^^^^^^^^^^^^^ error[E0659]: `legacy_macro` is ambiguous (name vs any other name during import resolution) --> $DIR/macro-rules.rs:31:13 | -LL | use legacy_macro as _; //~ ERROR `legacy_macro` is ambiguous +LL | use legacy_macro as _; | ^^^^^^^^^^^^ ambiguous name | note: `legacy_macro` could refer to the macro defined here diff --git a/src/test/ui/rust-2018/uniform-paths/prelude-fail-2.stderr b/src/test/ui/rust-2018/uniform-paths/prelude-fail-2.stderr index 40b8fcf7158..fc6453193bc 100644 --- a/src/test/ui/rust-2018/uniform-paths/prelude-fail-2.stderr +++ b/src/test/ui/rust-2018/uniform-paths/prelude-fail-2.stderr @@ -1,7 +1,7 @@ error: cannot use a built-in attribute through an import --> $DIR/prelude-fail-2.rs:15:3 | -LL | #[imported_inline] //~ ERROR cannot use a built-in attribute through an import +LL | #[imported_inline] | ^^^^^^^^^^^^^^^ | note: the built-in attribute imported here @@ -13,13 +13,13 @@ LL | use inline as imported_inline; error: cannot use a built-in attribute through an import --> $DIR/prelude-fail-2.rs:16:3 | -LL | #[builtin::imported_inline] //~ ERROR cannot use a built-in attribute through an import +LL | #[builtin::imported_inline] | ^^^^^^^^^^^^^^^^^^^^^^^^ error: cannot use a tool module through an import --> $DIR/prelude-fail-2.rs:17:3 | -LL | #[imported_rustfmt::skip] //~ ERROR cannot use a tool module through an import +LL | #[imported_rustfmt::skip] | ^^^^^^^^^^^^^^^^ | note: the tool module imported here @@ -31,7 +31,7 @@ LL | use rustfmt as imported_rustfmt; error: cannot use a tool module through an import --> $DIR/prelude-fail-2.rs:18:13 | -LL | #[tool_mod::imported_rustfmt::skip] //~ ERROR cannot use a tool module through an import +LL | #[tool_mod::imported_rustfmt::skip] | ^^^^^^^^^^^^^^^^ | note: the tool module imported here diff --git a/src/test/ui/rust-2018/uniform-paths/prelude-fail.stderr b/src/test/ui/rust-2018/uniform-paths/prelude-fail.stderr index fdfea416b12..a61af699cdc 100644 --- a/src/test/ui/rust-2018/uniform-paths/prelude-fail.stderr +++ b/src/test/ui/rust-2018/uniform-paths/prelude-fail.stderr @@ -1,13 +1,13 @@ error: cannot import a built-in macro --> $DIR/prelude-fail.rs:4:5 | -LL | use env as env_imported; //~ ERROR cannot import a built-in macro +LL | use env as env_imported; | ^^^^^^^^^^^^^^^^^^^ error[E0432]: unresolved import `rustfmt` --> $DIR/prelude-fail.rs:7:5 | -LL | use rustfmt::skip as imported_rustfmt_skip; //~ ERROR unresolved import `rustfmt` +LL | use rustfmt::skip as imported_rustfmt_skip; | ^^^^^^^ not a module `rustfmt` error: aborting due to 2 previous errors diff --git a/src/test/ui/rustc-args-required-const.stderr b/src/test/ui/rustc-args-required-const.stderr index 7a1caf3c40f..8b302692053 100644 --- a/src/test/ui/rustc-args-required-const.stderr +++ b/src/test/ui/rustc-args-required-const.stderr @@ -1,13 +1,13 @@ error: argument 1 is required to be a constant --> $DIR/rustc-args-required-const.rs:24:5 | -LL | foo(a); //~ ERROR: argument 1 is required to be a constant +LL | foo(a); | ^^^^^^ error: argument 2 is required to be a constant --> $DIR/rustc-args-required-const.rs:26:5 | -LL | bar(a, a); //~ ERROR: argument 2 is required to be a constant +LL | bar(a, a); | ^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/rustc-args-required-const2.stderr b/src/test/ui/rustc-args-required-const2.stderr index 005f68fa2e6..a8906ad3bc5 100644 --- a/src/test/ui/rustc-args-required-const2.stderr +++ b/src/test/ui/rustc-args-required-const2.stderr @@ -1,7 +1,7 @@ error: this function can only be invoked directly, not through a function pointer --> $DIR/rustc-args-required-const2.rs:8:13 | -LL | let a = foo; //~ ERROR: this function can only be invoked directly +LL | let a = foo; | ^^^ error: aborting due to previous error diff --git a/src/test/ui/rustc-error.stderr b/src/test/ui/rustc-error.stderr index c6b9cf77e58..dcbc0e1feb2 100644 --- a/src/test/ui/rustc-error.stderr +++ b/src/test/ui/rustc-error.stderr @@ -2,7 +2,7 @@ error: compilation successful --> $DIR/rustc-error.rs:4:1 | LL | / fn main() { -LL | | //~^ ERROR compilation successful +LL | | LL | | } | |_^ diff --git a/src/test/ui/safe-extern-statics-mut.stderr b/src/test/ui/safe-extern-statics-mut.stderr index 4eecce6d3d3..38803883414 100644 --- a/src/test/ui/safe-extern-statics-mut.stderr +++ b/src/test/ui/safe-extern-statics-mut.stderr @@ -1,7 +1,7 @@ error[E0133]: use of mutable static is unsafe and requires unsafe function or block --> $DIR/safe-extern-statics-mut.rs:11:13 | -LL | let b = B; //~ ERROR use of mutable static is unsafe +LL | let b = B; | ^ use of mutable static | = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior @@ -9,7 +9,7 @@ LL | let b = B; //~ ERROR use of mutable static is unsafe error[E0133]: use of mutable static is unsafe and requires unsafe function or block --> $DIR/safe-extern-statics-mut.rs:12:14 | -LL | let rb = &B; //~ ERROR use of mutable static is unsafe +LL | let rb = &B; | ^^ use of mutable static | = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior @@ -17,7 +17,7 @@ LL | let rb = &B; //~ ERROR use of mutable static is unsafe error[E0133]: use of mutable static is unsafe and requires unsafe function or block --> $DIR/safe-extern-statics-mut.rs:13:14 | -LL | let xb = XB; //~ ERROR use of mutable static is unsafe +LL | let xb = XB; | ^^ use of mutable static | = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior @@ -25,7 +25,7 @@ LL | let xb = XB; //~ ERROR use of mutable static is unsafe error[E0133]: use of mutable static is unsafe and requires unsafe function or block --> $DIR/safe-extern-statics-mut.rs:14:15 | -LL | let xrb = &XB; //~ ERROR use of mutable static is unsafe +LL | let xrb = &XB; | ^^^ use of mutable static | = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior diff --git a/src/test/ui/safe-extern-statics.stderr b/src/test/ui/safe-extern-statics.stderr index 11ade798ba4..86976a2c932 100644 --- a/src/test/ui/safe-extern-statics.stderr +++ b/src/test/ui/safe-extern-statics.stderr @@ -1,7 +1,7 @@ error: use of extern static is unsafe and requires unsafe function or block (error E0133) --> $DIR/safe-extern-statics.rs:13:13 | -LL | let a = A; //~ ERROR use of extern static is unsafe +LL | let a = A; | ^ | = note: #[deny(safe_extern_statics)] on by default @@ -12,7 +12,7 @@ LL | let a = A; //~ ERROR use of extern static is unsafe error: use of extern static is unsafe and requires unsafe function or block (error E0133) --> $DIR/safe-extern-statics.rs:15:14 | -LL | let ra = &A; //~ ERROR use of extern static is unsafe +LL | let ra = &A; | ^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -22,7 +22,7 @@ LL | let ra = &A; //~ ERROR use of extern static is unsafe error: use of extern static is unsafe and requires unsafe function or block (error E0133) --> $DIR/safe-extern-statics.rs:17:14 | -LL | let xa = XA; //~ ERROR use of extern static is unsafe +LL | let xa = XA; | ^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! @@ -32,7 +32,7 @@ LL | let xa = XA; //~ ERROR use of extern static is unsafe error: use of extern static is unsafe and requires unsafe function or block (error E0133) --> $DIR/safe-extern-statics.rs:19:15 | -LL | let xra = &XA; //~ ERROR use of extern static is unsafe +LL | let xra = &XA; | ^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! diff --git a/src/test/ui/self/self-infer.stderr b/src/test/ui/self/self-infer.stderr index 4b8fd703779..f91cfe5eb62 100644 --- a/src/test/ui/self/self-infer.stderr +++ b/src/test/ui/self/self-infer.stderr @@ -1,13 +1,13 @@ error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/self-infer.rs:4:16 | -LL | fn f(self: _) {} //~ERROR the type placeholder `_` is not allowed within types on item sig +LL | fn f(self: _) {} | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/self-infer.rs:5:17 | -LL | fn g(self: &_) {} //~ERROR the type placeholder `_` is not allowed within types on item sig +LL | fn g(self: &_) {} | ^ not allowed in type signatures error: aborting due to 2 previous errors diff --git a/src/test/ui/self/self-vs-path-ambiguity.stderr b/src/test/ui/self/self-vs-path-ambiguity.stderr index 954d240e71b..5ce6a81bfcf 100644 --- a/src/test/ui/self/self-vs-path-ambiguity.stderr +++ b/src/test/ui/self/self-vs-path-ambiguity.stderr @@ -1,7 +1,7 @@ error: unexpected lifetime `'a` in pattern --> $DIR/self-vs-path-ambiguity.rs:9:11 | -LL | fn i(&'a self::S: &S) {} //~ ERROR unexpected lifetime `'a` in pattern +LL | fn i(&'a self::S: &S) {} | ^^ unexpected lifetime error: aborting due to previous error diff --git a/src/test/ui/self/self_type_keyword-2.stderr b/src/test/ui/self/self_type_keyword-2.stderr index 55c8796e158..eedec6896f4 100644 --- a/src/test/ui/self/self_type_keyword-2.stderr +++ b/src/test/ui/self/self_type_keyword-2.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `self::Self` --> $DIR/self_type_keyword-2.rs:1:5 | -LL | use self::Self as Foo; //~ ERROR unresolved import `self::Self` +LL | use self::Self as Foo; | ^^^^^^^^^^^^^^^^^ no `Self` in the root error[E0531]: cannot find unit struct/variant or constant `Self` in this scope diff --git a/src/test/ui/seq-args.stderr b/src/test/ui/seq-args.stderr index 81ba1abcd6d..2e7d901640e 100644 --- a/src/test/ui/seq-args.stderr +++ b/src/test/ui/seq-args.stderr @@ -1,13 +1,13 @@ error[E0107]: wrong number of type arguments: expected 0, found 1 --> $DIR/seq-args.rs:4:13 | -LL | impl Seq for Vec { //~ ERROR wrong number of type arguments +LL | impl Seq for Vec { | ^ unexpected type argument error[E0107]: wrong number of type arguments: expected 0, found 1 --> $DIR/seq-args.rs:7:10 | -LL | impl Seq for u32 { //~ ERROR wrong number of type arguments +LL | impl Seq for u32 { | ^^^^ unexpected type argument error: aborting due to 2 previous errors diff --git a/src/test/ui/shadowed/shadowed-trait-methods.stderr b/src/test/ui/shadowed/shadowed-trait-methods.stderr index 38b604af290..e05da17983f 100644 --- a/src/test/ui/shadowed/shadowed-trait-methods.stderr +++ b/src/test/ui/shadowed/shadowed-trait-methods.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `f` found for type `()` in the current scope --> $DIR/shadowed-trait-methods.rs:13:8 | -LL | ().f() //~ ERROR no method +LL | ().f() | ^ | = help: items from traits can only be used if the trait is in scope diff --git a/src/test/ui/shadowed/shadowed-use-visibility.stderr b/src/test/ui/shadowed/shadowed-use-visibility.stderr index 60e474a845f..7c66fdf60b1 100644 --- a/src/test/ui/shadowed/shadowed-use-visibility.stderr +++ b/src/test/ui/shadowed/shadowed-use-visibility.stderr @@ -1,13 +1,13 @@ error[E0603]: module `bar` is private --> $DIR/shadowed-use-visibility.rs:9:14 | -LL | use foo::bar::f as g; //~ ERROR module `bar` is private +LL | use foo::bar::f as g; | ^^^ error[E0603]: module `f` is private --> $DIR/shadowed-use-visibility.rs:15:10 | -LL | use bar::f::f; //~ ERROR module `f` is private +LL | use bar::f::f; | ^ error: aborting due to 2 previous errors diff --git a/src/test/ui/shadowed/shadowing-in-the-same-pattern.stderr b/src/test/ui/shadowed/shadowing-in-the-same-pattern.stderr index 5d0fc912d95..71197efcaba 100644 --- a/src/test/ui/shadowed/shadowing-in-the-same-pattern.stderr +++ b/src/test/ui/shadowed/shadowing-in-the-same-pattern.stderr @@ -1,13 +1,13 @@ error[E0416]: identifier `a` is bound more than once in the same pattern --> $DIR/shadowing-in-the-same-pattern.rs:3:10 | -LL | fn f((a, a): (isize, isize)) {} //~ ERROR identifier `a` is bound more than once +LL | fn f((a, a): (isize, isize)) {} | ^ used in a pattern more than once error[E0416]: identifier `a` is bound more than once in the same pattern --> $DIR/shadowing-in-the-same-pattern.rs:6:13 | -LL | let (a, a) = (1, 1); //~ ERROR identifier `a` is bound more than once +LL | let (a, a) = (1, 1); | ^ used in a pattern more than once error: aborting due to 2 previous errors diff --git a/src/test/ui/simd-type.stderr b/src/test/ui/simd-type.stderr index 5e309cea6ef..027afcb981a 100644 --- a/src/test/ui/simd-type.stderr +++ b/src/test/ui/simd-type.stderr @@ -1,19 +1,19 @@ error[E0075]: SIMD vector cannot be empty --> $DIR/simd-type.rs:5:1 | -LL | struct empty; //~ ERROR SIMD vector cannot be empty +LL | struct empty; | ^^^^^^^^^^^^^ error[E0076]: SIMD vector should be homogeneous --> $DIR/simd-type.rs:8:1 | -LL | struct i64f64(i64, f64); //~ ERROR SIMD vector should be homogeneous +LL | struct i64f64(i64, f64); | ^^^^^^^^^^^^^^^^^^^^^^^^ SIMD elements must have the same type error[E0077]: SIMD vector element type should be machine type --> $DIR/simd-type.rs:11:1 | -LL | struct int4(isize, isize, isize, isize); //~ ERROR SIMD vector element type should be machine type +LL | struct int4(isize, isize, isize, isize); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/similar-tokens.stderr b/src/test/ui/similar-tokens.stderr index 898c3a0aa95..3113d4a872d 100644 --- a/src/test/ui/similar-tokens.stderr +++ b/src/test/ui/similar-tokens.stderr @@ -1,7 +1,7 @@ error: expected one of `,`, `::`, `as`, or `}`, found `.` --> $DIR/similar-tokens.rs:7:10 | -LL | use x::{A. B}; //~ ERROR expected one of `,`, `::`, `as`, or `}`, found `.` +LL | use x::{A. B}; | ^ expected one of `,`, `::`, `as`, or `}` here error: aborting due to previous error diff --git a/src/test/ui/single-primitive-inherent-impl.stderr b/src/test/ui/single-primitive-inherent-impl.stderr index 21bbbe69346..d357afa3b38 100644 --- a/src/test/ui/single-primitive-inherent-impl.stderr +++ b/src/test/ui/single-primitive-inherent-impl.stderr @@ -2,7 +2,7 @@ error[E0390]: only a single inherent implementation marked with `#[lang = "str"] --> $DIR/single-primitive-inherent-impl.rs:11:1 | LL | / impl str { -LL | | //~^ error: only a single inherent implementation marked with `#[lang = "str"]` is allowed for the `str` primitive +LL | | LL | | } | |_^ | @@ -10,7 +10,7 @@ help: consider using a trait to implement these methods --> $DIR/single-primitive-inherent-impl.rs:11:1 | LL | / impl str { -LL | | //~^ error: only a single inherent implementation marked with `#[lang = "str"]` is allowed for the `str` primitive +LL | | LL | | } | |_^ diff --git a/src/test/ui/single-use-lifetime/fn-types.stderr b/src/test/ui/single-use-lifetime/fn-types.stderr index 7e23d75c4e5..bec24be07af 100644 --- a/src/test/ui/single-use-lifetime/fn-types.stderr +++ b/src/test/ui/single-use-lifetime/fn-types.stderr @@ -1,7 +1,7 @@ error: lifetime parameter `'a` only used once --> $DIR/fn-types.rs:9:10 | -LL | a: for<'a> fn(&'a u32), //~ ERROR `'a` only used once +LL | a: for<'a> fn(&'a u32), | ^^ -- ...is used only here | | | this lifetime... diff --git a/src/test/ui/single-use-lifetime/one-use-in-fn-argument.stderr b/src/test/ui/single-use-lifetime/one-use-in-fn-argument.stderr index 0199074ad64..4bf08534b8c 100644 --- a/src/test/ui/single-use-lifetime/one-use-in-fn-argument.stderr +++ b/src/test/ui/single-use-lifetime/one-use-in-fn-argument.stderr @@ -1,7 +1,7 @@ error: lifetime parameter `'a` only used once --> $DIR/one-use-in-fn-argument.rs:8:6 | -LL | fn a<'a>(x: &'a u32) { //~ ERROR `'a` only used once +LL | fn a<'a>(x: &'a u32) { | ^^ -- ...is used only here | | | this lifetime... @@ -13,7 +13,7 @@ LL | #![deny(single_use_lifetimes)] | ^^^^^^^^^^^^^^^^^^^^ help: elide the single-use lifetime | -LL | fn a(x: &u32) { //~ ERROR `'a` only used once +LL | fn a(x: &u32) { | -- -- error: aborting due to previous error diff --git a/src/test/ui/single-use-lifetime/one-use-in-inherent-impl-header.stderr b/src/test/ui/single-use-lifetime/one-use-in-inherent-impl-header.stderr index 094894bf2d1..8115a1e6401 100644 --- a/src/test/ui/single-use-lifetime/one-use-in-inherent-impl-header.stderr +++ b/src/test/ui/single-use-lifetime/one-use-in-inherent-impl-header.stderr @@ -1,7 +1,7 @@ error: lifetime parameter `'f` only used once --> $DIR/one-use-in-inherent-impl-header.rs:12:6 | -LL | impl<'f> Foo<'f> { //~ ERROR `'f` only used once +LL | impl<'f> Foo<'f> { | ^^ -- ...is used only here | | | this lifetime... diff --git a/src/test/ui/single-use-lifetime/one-use-in-inherent-method-argument.stderr b/src/test/ui/single-use-lifetime/one-use-in-inherent-method-argument.stderr index 5bd4efb6bb1..48bd9f19126 100644 --- a/src/test/ui/single-use-lifetime/one-use-in-inherent-method-argument.stderr +++ b/src/test/ui/single-use-lifetime/one-use-in-inherent-method-argument.stderr @@ -1,7 +1,7 @@ error: lifetime parameter `'a` only used once --> $DIR/one-use-in-inherent-method-argument.rs:12:19 | -LL | fn inherent_a<'a>(&self, data: &'a u32) { //~ ERROR `'a` only used once +LL | fn inherent_a<'a>(&self, data: &'a u32) { | ^^ -- ...is used only here | | | this lifetime... @@ -13,13 +13,13 @@ LL | #![deny(single_use_lifetimes)] | ^^^^^^^^^^^^^^^^^^^^ help: elide the single-use lifetime | -LL | fn inherent_a(&self, data: &u32) { //~ ERROR `'a` only used once +LL | fn inherent_a(&self, data: &u32) { | -- -- error: lifetime parameter `'f` only used once --> $DIR/one-use-in-inherent-method-argument.rs:11:6 | -LL | impl<'f> Foo<'f> { //~ ERROR `'f` only used once +LL | impl<'f> Foo<'f> { | ^^ -- ...is used only here | | | this lifetime... diff --git a/src/test/ui/single-use-lifetime/one-use-in-inherent-method-return.stderr b/src/test/ui/single-use-lifetime/one-use-in-inherent-method-return.stderr index f0e4ac411c2..9c93da46271 100644 --- a/src/test/ui/single-use-lifetime/one-use-in-inherent-method-return.stderr +++ b/src/test/ui/single-use-lifetime/one-use-in-inherent-method-return.stderr @@ -1,7 +1,7 @@ error: lifetime parameter `'f` only used once --> $DIR/one-use-in-inherent-method-return.rs:12:6 | -LL | impl<'f> Foo<'f> { //~ ERROR `'f` only used once +LL | impl<'f> Foo<'f> { | ^^ -- ...is used only here | | | this lifetime... diff --git a/src/test/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr b/src/test/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr index 7d3fc82abf4..047e0591e4b 100644 --- a/src/test/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr +++ b/src/test/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr @@ -1,7 +1,7 @@ error: lifetime parameter `'g` only used once --> $DIR/one-use-in-trait-method-argument.rs:15:13 | -LL | fn next<'g>(&'g mut self) -> Option { //~ ERROR `'g` only used once +LL | fn next<'g>(&'g mut self) -> Option { | ^^ -- ...is used only here | | | this lifetime... @@ -13,7 +13,7 @@ LL | #![deny(single_use_lifetimes)] | ^^^^^^^^^^^^^^^^^^^^ help: elide the single-use lifetime | -LL | fn next(&mut self) -> Option { //~ ERROR `'g` only used once +LL | fn next(&mut self) -> Option { | ---- error: aborting due to previous error diff --git a/src/test/ui/single-use-lifetime/two-uses-in-inherent-method-argument-and-return.stderr b/src/test/ui/single-use-lifetime/two-uses-in-inherent-method-argument-and-return.stderr index 7a1af1323d8..6f0ba02b506 100644 --- a/src/test/ui/single-use-lifetime/two-uses-in-inherent-method-argument-and-return.stderr +++ b/src/test/ui/single-use-lifetime/two-uses-in-inherent-method-argument-and-return.stderr @@ -1,7 +1,7 @@ error: lifetime parameter `'f` only used once --> $DIR/two-uses-in-inherent-method-argument-and-return.rs:12:6 | -LL | impl<'f> Foo<'f> { //~ ERROR `'f` only used once +LL | impl<'f> Foo<'f> { | ^^ -- ...is used only here | | | this lifetime... diff --git a/src/test/ui/single-use-lifetime/zero-uses-in-impl.stderr b/src/test/ui/single-use-lifetime/zero-uses-in-impl.stderr index 3f9d907ade6..650a9b4600e 100644 --- a/src/test/ui/single-use-lifetime/zero-uses-in-impl.stderr +++ b/src/test/ui/single-use-lifetime/zero-uses-in-impl.stderr @@ -1,7 +1,7 @@ error: lifetime parameter `'a` never used --> $DIR/zero-uses-in-impl.rs:8:6 | -LL | impl<'a> Foo {} //~ ERROR `'a` never used +LL | impl<'a> Foo {} | -^^- help: elide the unused lifetime | note: lint level defined here diff --git a/src/test/ui/slice-2.stderr b/src/test/ui/slice-2.stderr index ef0eeb7a8da..561feb90f0a 100644 --- a/src/test/ui/slice-2.stderr +++ b/src/test/ui/slice-2.stderr @@ -1,25 +1,25 @@ error[E0608]: cannot index into a value of type `Foo` --> $DIR/slice-2.rs:7:6 | -LL | &x[..]; //~ ERROR cannot index into a value of type `Foo` +LL | &x[..]; | ^^^^^ error[E0608]: cannot index into a value of type `Foo` --> $DIR/slice-2.rs:8:6 | -LL | &x[Foo..]; //~ ERROR cannot index into a value of type `Foo` +LL | &x[Foo..]; | ^^^^^^^^ error[E0608]: cannot index into a value of type `Foo` --> $DIR/slice-2.rs:9:6 | -LL | &x[..Foo]; //~ ERROR cannot index into a value of type `Foo` +LL | &x[..Foo]; | ^^^^^^^^ error[E0608]: cannot index into a value of type `Foo` --> $DIR/slice-2.rs:10:6 | -LL | &x[Foo..Foo]; //~ ERROR cannot index into a value of type `Foo` +LL | &x[Foo..Foo]; | ^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/slice-mut-2.stderr b/src/test/ui/slice-mut-2.stderr index 07a8bd7699e..78dbfa56d45 100644 --- a/src/test/ui/slice-mut-2.stderr +++ b/src/test/ui/slice-mut-2.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/slice-mut-2.rs:7:18 | -LL | let _ = &mut x[2..4]; //~ERROR cannot borrow immutable borrowed content `*x` as mutable +LL | let _ = &mut x[2..4]; | ^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/span/E0057.stderr b/src/test/ui/span/E0057.stderr index 5906a05c32c..6b5890cac36 100644 --- a/src/test/ui/span/E0057.stderr +++ b/src/test/ui/span/E0057.stderr @@ -1,13 +1,13 @@ error[E0057]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/E0057.rs:3:13 | -LL | let a = f(); //~ ERROR E0057 +LL | let a = f(); | ^^^ expected 1 parameter error[E0057]: this function takes 1 parameter but 2 parameters were supplied --> $DIR/E0057.rs:5:13 | -LL | let c = f(2, 3); //~ ERROR E0057 +LL | let c = f(2, 3); | ^^^^^^^ expected 1 parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/span/E0072.stderr b/src/test/ui/span/E0072.stderr index 4cb9eb30802..d4a5e7400d2 100644 --- a/src/test/ui/span/E0072.stderr +++ b/src/test/ui/span/E0072.stderr @@ -1,7 +1,7 @@ error[E0072]: recursive type `ListNode` has infinite size --> $DIR/E0072.rs:1:1 | -LL | struct ListNode { //~ ERROR has infinite size +LL | struct ListNode { | ^^^^^^^^^^^^^^^ recursive type has infinite size LL | head: u8, LL | tail: Option, diff --git a/src/test/ui/span/E0204.stderr b/src/test/ui/span/E0204.stderr index acb7cd2a557..5a981a4a6e4 100644 --- a/src/test/ui/span/E0204.stderr +++ b/src/test/ui/span/E0204.stderr @@ -4,13 +4,13 @@ error[E0204]: the trait `Copy` may not be implemented for this type LL | foo: Vec, | ------------- this field does not implement `Copy` ... -LL | impl Copy for Foo { } //~ ERROR may not be implemented for this type +LL | impl Copy for Foo { } | ^^^^ error[E0204]: the trait `Copy` may not be implemented for this type --> $DIR/E0204.rs:7:10 | -LL | #[derive(Copy)] //~ ERROR may not be implemented for this type +LL | #[derive(Copy)] | ^^^^ LL | struct Foo2<'a> { LL | ty: &'a mut bool, @@ -22,13 +22,13 @@ error[E0204]: the trait `Copy` may not be implemented for this type LL | Bar { x: Vec }, | ----------- this field does not implement `Copy` ... -LL | impl Copy for EFoo { } //~ ERROR may not be implemented for this type +LL | impl Copy for EFoo { } | ^^^^ error[E0204]: the trait `Copy` may not be implemented for this type --> $DIR/E0204.rs:19:10 | -LL | #[derive(Copy)] //~ ERROR may not be implemented for this type +LL | #[derive(Copy)] | ^^^^ LL | enum EFoo2<'a> { LL | Bar(&'a mut bool), diff --git a/src/test/ui/span/E0535.stderr b/src/test/ui/span/E0535.stderr index 8502776eb16..f52c3f9f2c0 100644 --- a/src/test/ui/span/E0535.stderr +++ b/src/test/ui/span/E0535.stderr @@ -1,7 +1,7 @@ error[E0535]: invalid argument --> $DIR/E0535.rs:1:10 | -LL | #[inline(unknown)] //~ ERROR E0535 +LL | #[inline(unknown)] | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/span/E0536.stderr b/src/test/ui/span/E0536.stderr index 18e2104f7ad..820b0d7441b 100644 --- a/src/test/ui/span/E0536.stderr +++ b/src/test/ui/span/E0536.stderr @@ -1,7 +1,7 @@ error[E0536]: expected 1 cfg-pattern --> $DIR/E0536.rs:1:7 | -LL | #[cfg(not())] //~ ERROR E0536 +LL | #[cfg(not())] | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/span/E0537.stderr b/src/test/ui/span/E0537.stderr index 53e8637ea30..5478c3fbcdd 100644 --- a/src/test/ui/span/E0537.stderr +++ b/src/test/ui/span/E0537.stderr @@ -1,7 +1,7 @@ error[E0537]: invalid predicate `unknown` --> $DIR/E0537.rs:1:7 | -LL | #[cfg(unknown())] //~ ERROR E0537 +LL | #[cfg(unknown())] | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr b/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr index e0524be6b0c..63baa7c8cb5 100644 --- a/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr +++ b/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow immutable argument `x` as mutable | LL | fn deref_mut_field1(x: Own) { | - help: make this binding mutable: `mut x` -LL | let __isize = &mut x.y; //~ ERROR cannot borrow +LL | let __isize = &mut x.y; | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable @@ -11,7 +11,7 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable | LL | fn deref_extend_mut_field1(x: &Own) -> &mut isize { | ----------- use `&mut Own` here to make mutable -LL | &mut x.y //~ ERROR cannot borrow +LL | &mut x.y | ^ cannot borrow as mutable error[E0499]: cannot borrow `*x` as mutable more than once at a time @@ -19,7 +19,7 @@ error[E0499]: cannot borrow `*x` as mutable more than once at a time | LL | let _x = &mut x.x; | - first mutable borrow occurs here -LL | let _y = &mut x.y; //~ ERROR cannot borrow +LL | let _y = &mut x.y; | ^ second mutable borrow occurs here LL | use_mut(_x); LL | } @@ -30,7 +30,7 @@ error[E0596]: cannot borrow immutable argument `x` as mutable | LL | fn assign_field1<'a>(x: Own) { | - help: make this binding mutable: `mut x` -LL | x.y = 3; //~ ERROR cannot borrow +LL | x.y = 3; | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable @@ -38,7 +38,7 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable | LL | fn assign_field2<'a>(x: &'a Own) { | -------------- use `&'a mut Own` here to make mutable -LL | x.y = 3; //~ ERROR cannot borrow +LL | x.y = 3; | ^ cannot borrow as mutable error[E0499]: cannot borrow `*x` as mutable more than once at a time @@ -46,7 +46,7 @@ error[E0499]: cannot borrow `*x` as mutable more than once at a time | LL | let _p: &mut Point = &mut **x; | -- first mutable borrow occurs here -LL | x.y = 3; //~ ERROR cannot borrow +LL | x.y = 3; | ^ second mutable borrow occurs here LL | use_mut(_p); LL | } @@ -57,7 +57,7 @@ error[E0596]: cannot borrow immutable argument `x` as mutable | LL | fn deref_mut_method1(x: Own) { | - help: make this binding mutable: `mut x` -LL | x.set(0, 0); //~ ERROR cannot borrow +LL | x.set(0, 0); | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable @@ -65,7 +65,7 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable | LL | fn deref_extend_mut_method1(x: &Own) -> &mut isize { | ----------- use `&mut Own` here to make mutable -LL | x.y_mut() //~ ERROR cannot borrow +LL | x.y_mut() | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable argument `x` as mutable @@ -73,7 +73,7 @@ error[E0596]: cannot borrow immutable argument `x` as mutable | LL | fn assign_method1<'a>(x: Own) { | - help: make this binding mutable: `mut x` -LL | *x.y_mut() = 3; //~ ERROR cannot borrow +LL | *x.y_mut() = 3; | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable @@ -81,7 +81,7 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable | LL | fn assign_method2<'a>(x: &'a Own) { | -------------- use `&'a mut Own` here to make mutable -LL | *x.y_mut() = 3; //~ ERROR cannot borrow +LL | *x.y_mut() = 3; | ^ cannot borrow as mutable error: aborting due to 10 previous errors diff --git a/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr b/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr index 46d11065a86..77f3982b2b4 100644 --- a/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr +++ b/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow immutable argument `x` as mutable | LL | fn deref_mut1(x: Own) { | - help: make this binding mutable: `mut x` -LL | let __isize = &mut *x; //~ ERROR cannot borrow +LL | let __isize = &mut *x; | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable @@ -11,7 +11,7 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable | LL | fn deref_extend_mut1<'a>(x: &'a Own) -> &'a mut isize { | -------------- use `&'a mut Own` here to make mutable -LL | &mut **x //~ ERROR cannot borrow +LL | &mut **x | ^^ cannot borrow as mutable error[E0596]: cannot borrow immutable argument `x` as mutable @@ -19,7 +19,7 @@ error[E0596]: cannot borrow immutable argument `x` as mutable | LL | fn assign1<'a>(x: Own) { | - help: make this binding mutable: `mut x` -LL | *x = 3; //~ ERROR cannot borrow +LL | *x = 3; | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable @@ -27,7 +27,7 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable | LL | fn assign2<'a>(x: &'a Own) { | -------------- use `&'a mut Own` here to make mutable -LL | **x = 3; //~ ERROR cannot borrow +LL | **x = 3; | ^^ cannot borrow as mutable error: aborting due to 4 previous errors diff --git a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr index d81d402fce7..6c8f477e310 100644 --- a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr +++ b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr @@ -5,7 +5,7 @@ LL | f(Box::new(|| { | - ^^ second mutable borrow occurs here | | | first mutable borrow occurs here -LL | //~^ ERROR: cannot borrow `f` as mutable more than once +LL | LL | f((Box::new(|| {}))) | - borrow occurs due to use of `f` in closure LL | })); diff --git a/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr b/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr index 4875e27ef45..440c5c9c7c9 100644 --- a/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr +++ b/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr @@ -4,7 +4,7 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable LL | fn b(x: &Foo) { | ---- use `&mut Foo` here to make mutable LL | x.f(); -LL | x.h(); //~ ERROR cannot borrow +LL | x.h(); | ^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/span/borrowck-object-mutability.stderr b/src/test/ui/span/borrowck-object-mutability.stderr index e846331dc0b..073a70e3610 100644 --- a/src/test/ui/span/borrowck-object-mutability.stderr +++ b/src/test/ui/span/borrowck-object-mutability.stderr @@ -4,7 +4,7 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable LL | fn borrowed_receiver(x: &Foo) { | ---- use `&mut Foo` here to make mutable LL | x.borrowed(); -LL | x.borrowed_mut(); //~ ERROR cannot borrow +LL | x.borrowed_mut(); | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable `Box` content `*x` as mutable @@ -13,7 +13,7 @@ error[E0596]: cannot borrow immutable `Box` content `*x` as mutable LL | fn owned_receiver(x: Box) { | - help: make this binding mutable: `mut x` LL | x.borrowed(); -LL | x.borrowed_mut(); //~ ERROR cannot borrow +LL | x.borrowed_mut(); | ^ cannot borrow as mutable error: aborting due to 2 previous errors diff --git a/src/test/ui/span/destructor-restrictions.stderr b/src/test/ui/span/destructor-restrictions.stderr index 8fec8774678..a82e24b9391 100644 --- a/src/test/ui/span/destructor-restrictions.stderr +++ b/src/test/ui/span/destructor-restrictions.stderr @@ -3,7 +3,7 @@ error[E0597]: `*a` does not live long enough | LL | *a.borrow() + 1 | ^ borrowed value does not live long enough -LL | }; //~^ ERROR `*a` does not live long enough +LL | }; | -- borrowed value needs to live until here | | | `*a` dropped here while still borrowed diff --git a/src/test/ui/span/dropck_arr_cycle_checked.stderr b/src/test/ui/span/dropck_arr_cycle_checked.stderr index aae71799e30..b2bacc7f678 100644 --- a/src/test/ui/span/dropck_arr_cycle_checked.stderr +++ b/src/test/ui/span/dropck_arr_cycle_checked.stderr @@ -58,7 +58,7 @@ error[E0597]: `b2` does not live long enough | LL | b3.a[1].v.set(Some(&b2)); | ^^ borrowed value does not live long enough -LL | //~^ ERROR `b2` does not live long enough +LL | LL | } | - `b2` dropped here while still borrowed | diff --git a/src/test/ui/span/dropck_direct_cycle_with_drop.stderr b/src/test/ui/span/dropck_direct_cycle_with_drop.stderr index bc4b517c51d..497924208ab 100644 --- a/src/test/ui/span/dropck_direct_cycle_with_drop.stderr +++ b/src/test/ui/span/dropck_direct_cycle_with_drop.stderr @@ -14,7 +14,7 @@ error[E0597]: `d1` does not live long enough | LL | d2.p.set(Some(&d1)); | ^^ borrowed value does not live long enough -LL | //~^ ERROR `d1` does not live long enough +LL | LL | } | - `d1` dropped here while still borrowed | diff --git a/src/test/ui/span/dropck_vec_cycle_checked.stderr b/src/test/ui/span/dropck_vec_cycle_checked.stderr index 35e4314d0c6..7f902388fac 100644 --- a/src/test/ui/span/dropck_vec_cycle_checked.stderr +++ b/src/test/ui/span/dropck_vec_cycle_checked.stderr @@ -58,7 +58,7 @@ error[E0597]: `c2` does not live long enough | LL | c3.v[1].v.set(Some(&c2)); | ^^ borrowed value does not live long enough -LL | //~^ ERROR `c2` does not live long enough +LL | LL | } | - `c2` dropped here while still borrowed | diff --git a/src/test/ui/span/gated-features-attr-spans.stderr b/src/test/ui/span/gated-features-attr-spans.stderr index 9c4c12ba076..45d14f32f96 100644 --- a/src/test/ui/span/gated-features-attr-spans.stderr +++ b/src/test/ui/span/gated-features-attr-spans.stderr @@ -1,7 +1,7 @@ error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731) --> $DIR/gated-features-attr-spans.rs:1:1 | -LL | #[repr(simd)] //~ ERROR are experimental +LL | #[repr(simd)] | ^^^^^^^^^^^^^ | = help: add #![feature(repr_simd)] to the crate attributes to enable diff --git a/src/test/ui/span/import-ty-params.stderr b/src/test/ui/span/import-ty-params.stderr index cff71bf2e62..a02a1edc134 100644 --- a/src/test/ui/span/import-ty-params.stderr +++ b/src/test/ui/span/import-ty-params.stderr @@ -1,13 +1,13 @@ error: unexpected generic arguments in path --> $DIR/import-ty-params.rs:14:15 | -LL | import! { a::b::c::S } //~ ERROR unexpected generic arguments in path +LL | import! { a::b::c::S } | ^^^^^^^^^^^^^^ error: unexpected generic arguments in path --> $DIR/import-ty-params.rs:17:15 | -LL | import! { a::b::c::S<> } //~ ERROR unexpected generic arguments in path +LL | import! { a::b::c::S<> } | ^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/span/issue-11925.stderr b/src/test/ui/span/issue-11925.stderr index 46e2a41b3c3..c75022261a8 100644 --- a/src/test/ui/span/issue-11925.stderr +++ b/src/test/ui/span/issue-11925.stderr @@ -1,7 +1,7 @@ error[E0597]: `x` does not live long enough --> $DIR/issue-11925.rs:8:36 | -LL | let f = to_fn_once(move|| &x); //~ ERROR does not live long enough +LL | let f = to_fn_once(move|| &x); | ^ | | | borrowed value does not live long enough diff --git a/src/test/ui/span/issue-24690.stderr b/src/test/ui/span/issue-24690.stderr index 964e323b83e..0864497911d 100644 --- a/src/test/ui/span/issue-24690.stderr +++ b/src/test/ui/span/issue-24690.stderr @@ -1,7 +1,7 @@ warning: unused variable: `theOtherTwo` --> $DIR/issue-24690.rs:13:9 | -LL | let theOtherTwo = 2; //~ WARN should have a snake case name +LL | let theOtherTwo = 2; | ^^^^^^^^^^^ help: consider prefixing with an underscore: `_theOtherTwo` | note: lint level defined here @@ -14,7 +14,7 @@ LL | #![warn(unused)] warning: variable `theTwo` should have a snake case name --> $DIR/issue-24690.rs:12:9 | -LL | let theTwo = 2; //~ WARN should have a snake case name +LL | let theTwo = 2; | ^^^^^^ help: convert the identifier to snake case: `the_two` | = note: #[warn(non_snake_case)] on by default @@ -22,6 +22,6 @@ LL | let theTwo = 2; //~ WARN should have a snake case name warning: variable `theOtherTwo` should have a snake case name --> $DIR/issue-24690.rs:13:9 | -LL | let theOtherTwo = 2; //~ WARN should have a snake case name +LL | let theOtherTwo = 2; | ^^^^^^^^^^^ help: convert the identifier to snake case: `the_other_two` diff --git a/src/test/ui/span/issue-25199.stderr b/src/test/ui/span/issue-25199.stderr index 135d8150c34..6d8320bc053 100644 --- a/src/test/ui/span/issue-25199.stderr +++ b/src/test/ui/span/issue-25199.stderr @@ -14,7 +14,7 @@ error[E0597]: `container` does not live long enough | LL | container.store(test); | ^^^^^^^^^ borrowed value does not live long enough -LL | //~^ ERROR `container` does not live long enough +LL | LL | } | - `container` dropped here while still borrowed | diff --git a/src/test/ui/span/issue-27522.stderr b/src/test/ui/span/issue-27522.stderr index 1fcb839d170..c99231a5336 100644 --- a/src/test/ui/span/issue-27522.stderr +++ b/src/test/ui/span/issue-27522.stderr @@ -1,7 +1,7 @@ error[E0307]: invalid method receiver type: &SomeType --> $DIR/issue-27522.rs:6:22 | -LL | fn handler(self: &SomeType); //~ ERROR invalid method receiver type +LL | fn handler(self: &SomeType); | ^^^^^^^^^ | = note: type must be `Self` or a type that dereferences to it diff --git a/src/test/ui/span/issue-29595.stderr b/src/test/ui/span/issue-29595.stderr index dbb1743ec0e..24dfdf8ebc2 100644 --- a/src/test/ui/span/issue-29595.stderr +++ b/src/test/ui/span/issue-29595.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `u8: Tr` is not satisfied --> $DIR/issue-29595.rs:6:17 | -LL | let a: u8 = Tr::C; //~ ERROR the trait bound `u8: Tr` is not satisfied +LL | let a: u8 = Tr::C; | ^^^^^ the trait `Tr` is not implemented for `u8` | note: required by `Tr::C` diff --git a/src/test/ui/span/issue-34264.stderr b/src/test/ui/span/issue-34264.stderr index 9b3b68f6ff4..c5b6245572c 100644 --- a/src/test/ui/span/issue-34264.stderr +++ b/src/test/ui/span/issue-34264.stderr @@ -1,34 +1,34 @@ error: expected one of `:` or `@`, found `<` --> $DIR/issue-34264.rs:1:14 | -LL | fn foo(Option, String) {} //~ ERROR expected one of +LL | fn foo(Option, String) {} | ^ expected one of `:` or `@` here error: expected one of `:` or `@`, found `)` --> $DIR/issue-34264.rs:1:27 | -LL | fn foo(Option, String) {} //~ ERROR expected one of +LL | fn foo(Option, String) {} | ^ expected one of `:` or `@` here error: expected one of `:` or `@`, found `,` --> $DIR/issue-34264.rs:3:9 | -LL | fn bar(x, y: usize) {} //~ ERROR expected one of +LL | fn bar(x, y: usize) {} | ^ expected one of `:` or `@` here error[E0061]: this function takes 2 parameters but 3 parameters were supplied --> $DIR/issue-34264.rs:7:5 | -LL | fn foo(Option, String) {} //~ ERROR expected one of +LL | fn foo(Option, String) {} | --------------------------- defined here ... -LL | foo(Some(42), 2, ""); //~ ERROR this function takes +LL | foo(Some(42), 2, ""); | ^^^^^^^^^^^^^^^^^^^^ expected 2 parameters error[E0308]: mismatched types --> $DIR/issue-34264.rs:8:13 | -LL | bar("", ""); //~ ERROR mismatched types +LL | bar("", ""); | ^^ expected usize, found reference | = note: expected type `usize` @@ -37,10 +37,10 @@ LL | bar("", ""); //~ ERROR mismatched types error[E0061]: this function takes 2 parameters but 3 parameters were supplied --> $DIR/issue-34264.rs:10:5 | -LL | fn bar(x, y: usize) {} //~ ERROR expected one of +LL | fn bar(x, y: usize) {} | ------------------- defined here ... -LL | bar(1, 2, 3); //~ ERROR this function takes +LL | bar(1, 2, 3); | ^^^^^^^^^^^^ expected 2 parameters error: aborting due to 6 previous errors diff --git a/src/test/ui/span/issue-36530.stderr b/src/test/ui/span/issue-36530.stderr index b2b494a2c9c..05b2ca90570 100644 --- a/src/test/ui/span/issue-36530.stderr +++ b/src/test/ui/span/issue-36530.stderr @@ -1,7 +1,7 @@ error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/issue-36530.rs:3:3 | -LL | #[foo] //~ ERROR is currently unknown to the compiler +LL | #[foo] | ^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | #[foo] //~ ERROR is currently unknown to the compiler error[E0658]: non-builtin inner attributes are unstable (see issue #54726) --> $DIR/issue-36530.rs:5:5 | -LL | #![foo] //~ ERROR is currently unknown to the compiler +LL | #![foo] | ^^^^^^^ | = help: add #![feature(custom_inner_attributes)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | #![foo] //~ ERROR is currently unknown to the compiler error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/issue-36530.rs:5:8 | -LL | #![foo] //~ ERROR is currently unknown to the compiler +LL | #![foo] | ^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable diff --git a/src/test/ui/span/issue-37767.stderr b/src/test/ui/span/issue-37767.stderr index f91f2a50e85..0bbff45436c 100644 --- a/src/test/ui/span/issue-37767.stderr +++ b/src/test/ui/span/issue-37767.stderr @@ -1,7 +1,7 @@ error[E0034]: multiple applicable items in scope --> $DIR/issue-37767.rs:10:7 | -LL | a.foo() //~ ERROR multiple applicable items +LL | a.foo() | ^^^ multiple `foo` found | note: candidate #1 is defined in the trait `A` @@ -20,7 +20,7 @@ LL | fn foo(&mut self) {} error[E0034]: multiple applicable items in scope --> $DIR/issue-37767.rs:22:7 | -LL | a.foo() //~ ERROR multiple applicable items +LL | a.foo() | ^^^ multiple `foo` found | note: candidate #1 is defined in the trait `C` @@ -39,7 +39,7 @@ LL | fn foo(&self) {} error[E0034]: multiple applicable items in scope --> $DIR/issue-37767.rs:34:7 | -LL | a.foo() //~ ERROR multiple applicable items +LL | a.foo() | ^^^ multiple `foo` found | note: candidate #1 is defined in the trait `E` diff --git a/src/test/ui/span/issue-42234-unknown-receiver-type.stderr b/src/test/ui/span/issue-42234-unknown-receiver-type.stderr index 1899a4e55d5..8923de5705b 100644 --- a/src/test/ui/span/issue-42234-unknown-receiver-type.stderr +++ b/src/test/ui/span/issue-42234-unknown-receiver-type.stderr @@ -11,7 +11,7 @@ LL | x.unwrap().method_that_could_exist_on_some_type(); error[E0282]: type annotations needed --> $DIR/issue-42234-unknown-receiver-type.rs:12:5 | -LL | / data.iter() //~ ERROR type annotations needed +LL | / data.iter() LL | | .sum::<_>() | |___________________^ cannot infer type | diff --git a/src/test/ui/span/issue28498-reject-ex1.stderr b/src/test/ui/span/issue28498-reject-ex1.stderr index 8daef82f8bb..1438b95d733 100644 --- a/src/test/ui/span/issue28498-reject-ex1.stderr +++ b/src/test/ui/span/issue28498-reject-ex1.stderr @@ -14,7 +14,7 @@ error[E0597]: `foo.data` does not live long enough | LL | foo.data[1].1.set(Some(&foo.data[0])); | ^^^^^^^^ borrowed value does not live long enough -LL | //~^ ERROR `foo.data` does not live long enough +LL | LL | } | - `foo.data` dropped here while still borrowed | diff --git a/src/test/ui/span/lint-unused-unsafe.stderr b/src/test/ui/span/lint-unused-unsafe.stderr index 7f16cfae859..ac8107990c2 100644 --- a/src/test/ui/span/lint-unused-unsafe.stderr +++ b/src/test/ui/span/lint-unused-unsafe.stderr @@ -1,7 +1,7 @@ error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:16:13 | -LL | fn bad1() { unsafe {} } //~ ERROR: unnecessary `unsafe` block +LL | fn bad1() { unsafe {} } | ^^^^^^ unnecessary `unsafe` block | note: lint level defined here @@ -13,13 +13,13 @@ LL | #![deny(unused_unsafe)] error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:17:13 | -LL | fn bad2() { unsafe { bad1() } } //~ ERROR: unnecessary `unsafe` block +LL | fn bad2() { unsafe { bad1() } } | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:18:20 | -LL | unsafe fn bad3() { unsafe {} } //~ ERROR: unnecessary `unsafe` block +LL | unsafe fn bad3() { unsafe {} } | ---------------- ^^^^^^ unnecessary `unsafe` block | | | because it's nested under this `unsafe` fn @@ -27,13 +27,13 @@ LL | unsafe fn bad3() { unsafe {} } //~ ERROR: unnecessary `unsafe` bl error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:19:13 | -LL | fn bad4() { unsafe { callback(||{}) } } //~ ERROR: unnecessary `unsafe` block +LL | fn bad4() { unsafe { callback(||{}) } } | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:20:20 | -LL | unsafe fn bad5() { unsafe { unsf() } } //~ ERROR: unnecessary `unsafe` block +LL | unsafe fn bad5() { unsafe { unsf() } } | ---------------- ^^^^^^ unnecessary `unsafe` block | | | because it's nested under this `unsafe` fn @@ -43,7 +43,7 @@ error: unnecessary `unsafe` block | LL | unsafe { // don't put the warning here | ------ because it's nested under this `unsafe` block -LL | unsafe { //~ ERROR: unnecessary `unsafe` block +LL | unsafe { | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block @@ -51,7 +51,7 @@ error: unnecessary `unsafe` block | LL | unsafe fn bad7() { | ---------------- because it's nested under this `unsafe` fn -LL | unsafe { //~ ERROR: unnecessary `unsafe` block +LL | unsafe { | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block @@ -59,8 +59,8 @@ error: unnecessary `unsafe` block | LL | unsafe fn bad7() { | ---------------- because it's nested under this `unsafe` fn -LL | unsafe { //~ ERROR: unnecessary `unsafe` block -LL | unsafe { //~ ERROR: unnecessary `unsafe` block +LL | unsafe { +LL | unsafe { | ^^^^^^ unnecessary `unsafe` block error: aborting due to 8 previous errors diff --git a/src/test/ui/span/macro-span-replacement.stderr b/src/test/ui/span/macro-span-replacement.stderr index f6c303164bf..128e4ec1212 100644 --- a/src/test/ui/span/macro-span-replacement.stderr +++ b/src/test/ui/span/macro-span-replacement.stderr @@ -1,7 +1,7 @@ warning: struct is never constructed: `S` --> $DIR/macro-span-replacement.rs:7:14 | -LL | $b $a; //~ WARN struct is never constructed +LL | $b $a; | ^ ... LL | m!(S struct); diff --git a/src/test/ui/span/macro-ty-params.stderr b/src/test/ui/span/macro-ty-params.stderr index 965ca7000be..39b3edc6703 100644 --- a/src/test/ui/span/macro-ty-params.stderr +++ b/src/test/ui/span/macro-ty-params.stderr @@ -1,25 +1,25 @@ error: generic arguments in macro path --> $DIR/macro-ty-params.rs:10:10 | -LL | foo::!(); //~ ERROR generic arguments in macro path +LL | foo::!(); | ^^^ error: generic arguments in macro path --> $DIR/macro-ty-params.rs:11:10 | -LL | foo::<>!(); //~ ERROR generic arguments in macro path +LL | foo::<>!(); | ^^ error: unexpected generic arguments in path --> $DIR/macro-ty-params.rs:12:8 | -LL | m!(Default<>); //~ ERROR generic arguments in macro path +LL | m!(Default<>); | ^^^^^^^^^ error: generic arguments in macro path --> $DIR/macro-ty-params.rs:12:15 | -LL | m!(Default<>); //~ ERROR generic arguments in macro path +LL | m!(Default<>); | ^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/span/missing-unit-argument.stderr b/src/test/ui/span/missing-unit-argument.stderr index bf19eb69461..f1a29bed32b 100644 --- a/src/test/ui/span/missing-unit-argument.stderr +++ b/src/test/ui/span/missing-unit-argument.stderr @@ -1,11 +1,11 @@ error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/missing-unit-argument.rs:11:33 | -LL | let _: Result<(), String> = Ok(); //~ ERROR this function takes +LL | let _: Result<(), String> = Ok(); | ^^^^ help: expected the unit value `()`; create it with empty parentheses | -LL | let _: Result<(), String> = Ok(()); //~ ERROR this function takes +LL | let _: Result<(), String> = Ok(()); | ^^ error[E0061]: this function takes 2 parameters but 0 parameters were supplied @@ -14,7 +14,7 @@ error[E0061]: this function takes 2 parameters but 0 parameters were supplied LL | fn foo(():(), ():()) {} | -------------------- defined here ... -LL | foo(); //~ ERROR this function takes +LL | foo(); | ^^^^^ expected 2 parameters error[E0061]: this function takes 2 parameters but 1 parameter was supplied @@ -23,7 +23,7 @@ error[E0061]: this function takes 2 parameters but 1 parameter was supplied LL | fn foo(():(), ():()) {} | -------------------- defined here ... -LL | foo(()); //~ ERROR this function takes +LL | foo(()); | ^^^^^^^ expected 2 parameters error[E0061]: this function takes 1 parameter but 0 parameters were supplied @@ -32,11 +32,11 @@ error[E0061]: this function takes 1 parameter but 0 parameters were supplied LL | fn bar(():()) {} | ------------- defined here ... -LL | bar(); //~ ERROR this function takes +LL | bar(); | ^^^^^ help: expected the unit value `()`; create it with empty parentheses | -LL | bar(()); //~ ERROR this function takes +LL | bar(()); | ^^ error[E0061]: this function takes 1 parameter but 0 parameters were supplied @@ -45,11 +45,11 @@ error[E0061]: this function takes 1 parameter but 0 parameters were supplied LL | fn baz(self, (): ()) { } | -------------------- defined here ... -LL | S.baz(); //~ ERROR this function takes +LL | S.baz(); | ^^^ help: expected the unit value `()`; create it with empty parentheses | -LL | S.baz(()); //~ ERROR this function takes +LL | S.baz(()); | ^^ error[E0061]: this function takes 1 parameter but 0 parameters were supplied @@ -58,11 +58,11 @@ error[E0061]: this function takes 1 parameter but 0 parameters were supplied LL | fn generic(self, _: T) { } | ------------------------- defined here ... -LL | S.generic::<()>(); //~ ERROR this function takes +LL | S.generic::<()>(); | ^^^^^^^ help: expected the unit value `()`; create it with empty parentheses | -LL | S.generic::<()>(()); //~ ERROR this function takes +LL | S.generic::<()>(()); | ^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/span/move-closure.stderr b/src/test/ui/span/move-closure.stderr index f09e052f653..e2226b197ae 100644 --- a/src/test/ui/span/move-closure.stderr +++ b/src/test/ui/span/move-closure.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/move-closure.rs:5:17 | -LL | let x: () = move || (); //~ ERROR mismatched types +LL | let x: () = move || (); | ^^^^^^^^^^ expected (), found closure | = note: expected type `()` diff --git a/src/test/ui/span/multiline-span-E0072.stderr b/src/test/ui/span/multiline-span-E0072.stderr index ee392f5994c..dd322fe833b 100644 --- a/src/test/ui/span/multiline-span-E0072.stderr +++ b/src/test/ui/span/multiline-span-E0072.stderr @@ -1,7 +1,7 @@ error[E0072]: recursive type `ListNode` has infinite size --> $DIR/multiline-span-E0072.rs:2:1 | -LL | / struct //~ ERROR has infinite size +LL | / struct LL | | ListNode LL | | { LL | | head: u8, diff --git a/src/test/ui/span/multiline-span-simple.stderr b/src/test/ui/span/multiline-span-simple.stderr index 18b6cd06afb..6495d9bc739 100644 --- a/src/test/ui/span/multiline-span-simple.stderr +++ b/src/test/ui/span/multiline-span-simple.stderr @@ -1,7 +1,7 @@ error[E0277]: cannot add `()` to `u32` --> $DIR/multiline-span-simple.rs:13:18 | -LL | foo(1 as u32 + //~ ERROR cannot add `()` to `u32` +LL | foo(1 as u32 + | ^ no implementation for `u32 + ()` | = help: the trait `std::ops::Add<()>` is not implemented for `u32` diff --git a/src/test/ui/span/mut-arg-hint.stderr b/src/test/ui/span/mut-arg-hint.stderr index ea6fc8bee63..ce5786186ea 100644 --- a/src/test/ui/span/mut-arg-hint.stderr +++ b/src/test/ui/span/mut-arg-hint.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow immutable borrowed content `*a` as mutable | LL | fn foo(mut a: &String) { | ------- use `&mut String` here to make mutable -LL | a.push_str("bar"); //~ ERROR cannot borrow immutable borrowed content +LL | a.push_str("bar"); | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable borrowed content `*a` as mutable @@ -11,7 +11,7 @@ error[E0596]: cannot borrow immutable borrowed content `*a` as mutable | LL | pub fn foo<'a>(mut a: &'a String) { | ---------- use `&'a mut String` here to make mutable -LL | a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content +LL | a.push_str("foo"); | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable borrowed content `*a` as mutable @@ -19,7 +19,7 @@ error[E0596]: cannot borrow immutable borrowed content `*a` as mutable | LL | pub fn foo(mut a: &String) { | ------- use `&mut String` here to make mutable -LL | a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content +LL | a.push_str("foo"); | ^ cannot borrow as mutable error: aborting due to 3 previous errors diff --git a/src/test/ui/span/non-existing-module-import.stderr b/src/test/ui/span/non-existing-module-import.stderr index 5ac5df1b4c7..25c09959047 100644 --- a/src/test/ui/span/non-existing-module-import.stderr +++ b/src/test/ui/span/non-existing-module-import.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `std::bar` --> $DIR/non-existing-module-import.rs:1:10 | -LL | use std::bar::{foo1, foo2}; //~ ERROR unresolved import +LL | use std::bar::{foo1, foo2}; | ^^^ could not find `bar` in `std` error: aborting due to previous error diff --git a/src/test/ui/span/pub-struct-field.stderr b/src/test/ui/span/pub-struct-field.stderr index 66afbf253c9..065340f446a 100644 --- a/src/test/ui/span/pub-struct-field.stderr +++ b/src/test/ui/span/pub-struct-field.stderr @@ -3,7 +3,7 @@ error[E0124]: field `bar` is already declared | LL | bar: u8, | ------- `bar` first declared here -LL | pub bar: u8, //~ ERROR is already declared +LL | pub bar: u8, | ^^^^^^^^^^^ field already declared error[E0124]: field `bar` is already declared @@ -11,8 +11,8 @@ error[E0124]: field `bar` is already declared | LL | bar: u8, | ------- `bar` first declared here -LL | pub bar: u8, //~ ERROR is already declared -LL | pub(crate) bar: u8, //~ ERROR is already declared +LL | pub bar: u8, +LL | pub(crate) bar: u8, | ^^^^^^^^^^^^^^^^^^ field already declared error: aborting due to 2 previous errors diff --git a/src/test/ui/span/recursive-type-field.stderr b/src/test/ui/span/recursive-type-field.stderr index 3a8f0e60038..d240872647e 100644 --- a/src/test/ui/span/recursive-type-field.stderr +++ b/src/test/ui/span/recursive-type-field.stderr @@ -1,7 +1,7 @@ error[E0072]: recursive type `Foo` has infinite size --> $DIR/recursive-type-field.rs:3:1 | -LL | struct Foo<'a> { //~ ERROR recursive type +LL | struct Foo<'a> { | ^^^^^^^^^^^^^^ recursive type has infinite size LL | bar: Bar<'a>, | ------------ recursive without indirection @@ -11,7 +11,7 @@ LL | bar: Bar<'a>, error[E0072]: recursive type `Bar` has infinite size --> $DIR/recursive-type-field.rs:8:1 | -LL | struct Bar<'a> { //~ ERROR recursive type +LL | struct Bar<'a> { | ^^^^^^^^^^^^^^ recursive type has infinite size LL | y: (Foo<'a>, Foo<'a>), | --------------------- recursive without indirection diff --git a/src/test/ui/span/regions-escape-loop-via-variable.stderr b/src/test/ui/span/regions-escape-loop-via-variable.stderr index e3870db0c66..ef36b81f493 100644 --- a/src/test/ui/span/regions-escape-loop-via-variable.stderr +++ b/src/test/ui/span/regions-escape-loop-via-variable.stderr @@ -5,7 +5,7 @@ LL | p = &x; | ^ borrowed value does not live long enough LL | } | - `x` dropped here while still borrowed -LL | //~^^ ERROR `x` does not live long enough +LL | LL | } | - borrowed value needs to live until here diff --git a/src/test/ui/span/regions-escape-loop-via-vec.stderr b/src/test/ui/span/regions-escape-loop-via-vec.stderr index 09a7123d8f0..1d604b58d7e 100644 --- a/src/test/ui/span/regions-escape-loop-via-vec.stderr +++ b/src/test/ui/span/regions-escape-loop-via-vec.stderr @@ -14,7 +14,7 @@ error[E0503]: cannot use `x` because it was mutably borrowed | LL | let mut _y = vec![&mut x]; | - borrow of `x` occurs here -LL | while x < 10 { //~ ERROR cannot use `x` because it was mutably borrowed +LL | while x < 10 { | ^ use of borrowed `x` error[E0503]: cannot use `x` because it was mutably borrowed @@ -22,8 +22,8 @@ error[E0503]: cannot use `x` because it was mutably borrowed | LL | let mut _y = vec![&mut x]; | - borrow of `x` occurs here -LL | while x < 10 { //~ ERROR cannot use `x` because it was mutably borrowed -LL | let mut z = x; //~ ERROR cannot use `x` because it was mutably borrowed +LL | while x < 10 { +LL | let mut z = x; | ^^^^^ use of borrowed `x` error[E0506]: cannot assign to `x` because it is borrowed @@ -32,7 +32,7 @@ error[E0506]: cannot assign to `x` because it is borrowed LL | let mut _y = vec![&mut x]; | - borrow of `x` occurs here ... -LL | x += 1; //~ ERROR cannot assign +LL | x += 1; | ^^^^^^ assignment to borrowed `x` occurs here error: aborting due to 4 previous errors diff --git a/src/test/ui/span/send-is-not-static-std-sync.stderr b/src/test/ui/span/send-is-not-static-std-sync.stderr index 74c2bad24de..aa9e1c2de22 100644 --- a/src/test/ui/span/send-is-not-static-std-sync.stderr +++ b/src/test/ui/span/send-is-not-static-std-sync.stderr @@ -14,7 +14,7 @@ error[E0505]: cannot move out of `y` because it is borrowed | LL | *lock.lock().unwrap() = &*y; | -- borrow of `*y` occurs here -LL | drop(y); //~ ERROR cannot move out +LL | drop(y); | ^ move out of `y` occurs here error[E0597]: `z` does not live long enough @@ -33,7 +33,7 @@ error[E0505]: cannot move out of `y` because it is borrowed | LL | *lock.write().unwrap() = &*y; | -- borrow of `*y` occurs here -LL | drop(y); //~ ERROR cannot move out +LL | drop(y); | ^ move out of `y` occurs here error[E0597]: `z` does not live long enough @@ -52,7 +52,7 @@ error[E0505]: cannot move out of `y` because it is borrowed | LL | tx.send(&*y); | -- borrow of `*y` occurs here -LL | drop(y); //~ ERROR cannot move out +LL | drop(y); | ^ move out of `y` occurs here error: aborting due to 6 previous errors diff --git a/src/test/ui/span/suggestion-non-ascii.stderr b/src/test/ui/span/suggestion-non-ascii.stderr index 40b11695d75..b14632d4e1b 100644 --- a/src/test/ui/span/suggestion-non-ascii.stderr +++ b/src/test/ui/span/suggestion-non-ascii.stderr @@ -1,7 +1,7 @@ error[E0608]: cannot index into a value of type `({integer},)` --> $DIR/suggestion-non-ascii.rs:3:21 | -LL | println!("☃{}", tup[0]); //~ ERROR cannot index into a value of type +LL | println!("☃{}", tup[0]); | ^^^^^^ help: to access tuple elements, use: `tup.0` error: aborting due to previous error diff --git a/src/test/ui/span/typo-suggestion.stderr b/src/test/ui/span/typo-suggestion.stderr index 7b12c4430ed..61d4e06119c 100644 --- a/src/test/ui/span/typo-suggestion.stderr +++ b/src/test/ui/span/typo-suggestion.stderr @@ -1,13 +1,13 @@ error[E0425]: cannot find value `bar` in this scope --> $DIR/typo-suggestion.rs:5:26 | -LL | println!("Hello {}", bar); //~ ERROR cannot find value +LL | println!("Hello {}", bar); | ^^^ not found in this scope error[E0425]: cannot find value `fob` in this scope --> $DIR/typo-suggestion.rs:8:26 | -LL | println!("Hello {}", fob); //~ ERROR cannot find value +LL | println!("Hello {}", fob); | ^^^ help: a local variable with a similar name exists: `foo` error: aborting due to 2 previous errors diff --git a/src/test/ui/span/unused-warning-point-at-signature.stderr b/src/test/ui/span/unused-warning-point-at-signature.stderr index e07548121b5..3007d90c990 100644 --- a/src/test/ui/span/unused-warning-point-at-signature.stderr +++ b/src/test/ui/span/unused-warning-point-at-signature.stderr @@ -1,7 +1,7 @@ warning: enum is never used: `Enum` --> $DIR/unused-warning-point-at-signature.rs:5:1 | -LL | enum Enum { //~ WARN enum is never used +LL | enum Enum { | ^^^^^^^^^ | note: lint level defined here @@ -14,19 +14,19 @@ LL | #![warn(unused)] warning: struct is never constructed: `Struct` --> $DIR/unused-warning-point-at-signature.rs:12:1 | -LL | struct Struct { //~ WARN struct is never constructed +LL | struct Struct { | ^^^^^^^^^^^^^ warning: function is never used: `func` --> $DIR/unused-warning-point-at-signature.rs:19:1 | -LL | fn func() -> usize { //~ WARN function is never used +LL | fn func() -> usize { | ^^^^^^^^^^^^^^^^^^ warning: function is never used: `func_complete_span` --> $DIR/unused-warning-point-at-signature.rs:23:1 | -LL | / fn //~ WARN function is never used +LL | / fn LL | | func_complete_span() LL | | -> usize LL | | { diff --git a/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr b/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr index 1eee88ad21a..b957243018d 100644 --- a/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr +++ b/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr @@ -14,7 +14,7 @@ error[E0597]: `c1` does not live long enough | LL | c2.v[0].v.set(Some(&c1)); | ^^ borrowed value does not live long enough -LL | //~^ ERROR `c1` does not live long enough +LL | LL | } | - `c1` dropped here while still borrowed | diff --git a/src/test/ui/span/visibility-ty-params.stderr b/src/test/ui/span/visibility-ty-params.stderr index d7914528f46..ddc13bb1c76 100644 --- a/src/test/ui/span/visibility-ty-params.stderr +++ b/src/test/ui/span/visibility-ty-params.stderr @@ -1,19 +1,19 @@ error: unexpected generic arguments in path --> $DIR/visibility-ty-params.rs:6:5 | -LL | m!{ S } //~ ERROR unexpected generic arguments in path +LL | m!{ S } | ^^^^^ error: unexpected generic arguments in path --> $DIR/visibility-ty-params.rs:10:9 | -LL | m!{ m<> } //~ ERROR unexpected generic arguments in path +LL | m!{ m<> } | ^^^ error[E0577]: expected module, found struct `S` --> $DIR/visibility-ty-params.rs:6:5 | -LL | m!{ S } //~ ERROR unexpected generic arguments in path +LL | m!{ S } | -^^^^ | | | help: a module with a similar name exists: `m` diff --git a/src/test/ui/specialization/defaultimpl/specialization-feature-gate-default.stderr b/src/test/ui/specialization/defaultimpl/specialization-feature-gate-default.stderr index 3b3076cc672..0b20a19d2e1 100644 --- a/src/test/ui/specialization/defaultimpl/specialization-feature-gate-default.stderr +++ b/src/test/ui/specialization/defaultimpl/specialization-feature-gate-default.stderr @@ -1,7 +1,7 @@ error[E0658]: specialization is unstable (see issue #31844) --> $DIR/specialization-feature-gate-default.rs:7:1 | -LL | / default impl Foo for T { //~ ERROR specialization is unstable +LL | / default impl Foo for T { LL | | fn foo(&self) {} LL | | } | |_^ diff --git a/src/test/ui/specialization/defaultimpl/specialization-no-default.stderr b/src/test/ui/specialization/defaultimpl/specialization-no-default.stderr index 7ca9df9f5d9..91690f64d94 100644 --- a/src/test/ui/specialization/defaultimpl/specialization-no-default.stderr +++ b/src/test/ui/specialization/defaultimpl/specialization-no-default.stderr @@ -7,7 +7,7 @@ LL | | fn bar(&self) {} LL | | } | |_- parent `impl` is here ... -LL | fn foo(&self) {} //~ ERROR E0520 +LL | fn foo(&self) {} | ^^^^^^^^^^^^^^^^ cannot specialize default item `foo` | = note: to specialize, `foo` in the parent `impl` must be marked `default` @@ -21,7 +21,7 @@ LL | | fn bar(&self) {} LL | | } | |_- parent `impl` is here ... -LL | fn bar(&self) {} //~ ERROR E0520 +LL | fn bar(&self) {} | ^^^^^^^^^^^^^^^^ cannot specialize default item `bar` | = note: to specialize, `bar` in the parent `impl` must be marked `default` @@ -34,7 +34,7 @@ LL | | type T = u8; LL | | } | |_- parent `impl` is here ... -LL | type T = (); //~ ERROR E0520 +LL | type T = (); | ^^^^^^^^^^^^ cannot specialize default item `T` | = note: to specialize, `T` in the parent `impl` must be marked `default` @@ -47,7 +47,7 @@ LL | | fn baz(&self) {} LL | | } | |_- parent `impl` is here ... -LL | fn baz(&self) {} //~ ERROR E0520 +LL | fn baz(&self) {} | ^^^^^^^^^^^^^^^^ cannot specialize default item `baz` | = note: to specialize, `baz` in the parent `impl` must be marked `default` @@ -60,7 +60,7 @@ LL | | fn redundant(&self) {} LL | | } | |_- parent `impl` is here ... -LL | fn redundant(&self) {} //~ ERROR E0520 +LL | fn redundant(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `redundant` | = note: to specialize, `redundant` in the parent `impl` must be marked `default` diff --git a/src/test/ui/specialization/defaultimpl/validation.stderr b/src/test/ui/specialization/defaultimpl/validation.stderr index 2778cac7ae5..14a06c39088 100644 --- a/src/test/ui/specialization/defaultimpl/validation.stderr +++ b/src/test/ui/specialization/defaultimpl/validation.stderr @@ -1,7 +1,7 @@ error: inherent impls cannot be default --> $DIR/validation.rs:7:1 | -LL | default impl S {} //~ ERROR inherent impls cannot be default +LL | default impl S {} | ^^^^^^^^^^^^^^^^^ | = note: only trait implementations may be annotated with default @@ -9,19 +9,19 @@ LL | default impl S {} //~ ERROR inherent impls cannot be default error: impls of auto traits cannot be default --> $DIR/validation.rs:9:1 | -LL | default unsafe impl Send for S {} //~ ERROR impls of auto traits cannot be default +LL | default unsafe impl Send for S {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: impls of auto traits cannot be default --> $DIR/validation.rs:10:1 | -LL | default impl !Send for Z {} //~ ERROR impls of auto traits cannot be default +LL | default impl !Send for Z {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0192]: negative impls are only allowed for auto traits (e.g., `Send` and `Sync`) --> $DIR/validation.rs:13:1 | -LL | default impl !Tr for S {} //~ ERROR negative impls are only allowed for auto traits +LL | default impl !Tr for S {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/specialization/issue-39448.stderr b/src/test/ui/specialization/issue-39448.stderr index 0b0fd2c4af5..861a1d9e8fc 100644 --- a/src/test/ui/specialization/issue-39448.stderr +++ b/src/test/ui/specialization/issue-39448.stderr @@ -1,7 +1,7 @@ error[E0275]: overflow evaluating the requirement `T: FromA` --> $DIR/issue-39448.rs:45:13 | -LL | x.foo(y.to()).to() //~ ERROR overflow evaluating the requirement +LL | x.foo(y.to()).to() | ^^ | = note: required because of the requirements on the impl of `FromA` for `T` diff --git a/src/test/ui/specialization/issue-52050.stderr b/src/test/ui/specialization/issue-52050.stderr index 9187d04cfce..dcb34f3ad48 100644 --- a/src/test/ui/specialization/issue-52050.stderr +++ b/src/test/ui/specialization/issue-52050.stderr @@ -8,7 +8,7 @@ LL | | { LL | | } | |_- first implementation here LL | -LL | impl IntoPyDictPointer for () //~ ERROR conflicting implementations +LL | impl IntoPyDictPointer for () | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `()` | = note: upstream crates may add new impl of trait `std::iter::Iterator` for type `()` in future versions diff --git a/src/test/ui/specialization/specialization-default-projection.stderr b/src/test/ui/specialization/specialization-default-projection.stderr index b781c35ea39..ab0bdc44cff 100644 --- a/src/test/ui/specialization/specialization-default-projection.stderr +++ b/src/test/ui/specialization/specialization-default-projection.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | fn generic() -> ::Assoc { | ----------------- expected `::Assoc` because of return type ... -LL | () //~ ERROR mismatched types +LL | () | ^^ expected associated type, found () | = note: expected type `::Assoc` @@ -16,7 +16,7 @@ error[E0308]: mismatched types LL | fn monomorphic() -> () { | -- expected `()` because of return type ... -LL | generic::<()>() //~ ERROR mismatched types +LL | generic::<()>() | ^^^^^^^^^^^^^^^- help: try adding a semicolon: `;` | | | expected (), found associated type diff --git a/src/test/ui/specialization/specialization-default-types.stderr b/src/test/ui/specialization/specialization-default-types.stderr index 3b4ae2d8217..1192b0e5cfa 100644 --- a/src/test/ui/specialization/specialization-default-types.stderr +++ b/src/test/ui/specialization/specialization-default-types.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | default fn generate(self) -> Self::Output { | ------------ expected `::Output` because of return type -LL | Box::new(self) //~ ERROR mismatched types +LL | Box::new(self) | ^^^^^^^^^^^^^^ expected associated type, found struct `std::boxed::Box` | = note: expected type `::Output` @@ -14,7 +14,7 @@ error[E0308]: mismatched types | LL | fn trouble(t: T) -> Box { | ------ expected `std::boxed::Box` because of return type -LL | Example::generate(t) //~ ERROR mismatched types +LL | Example::generate(t) | ^^^^^^^^^^^^^^^^^^^^ expected struct `std::boxed::Box`, found associated type | = note: expected type `std::boxed::Box` diff --git a/src/test/ui/specialization/specialization-feature-gate-default.stderr b/src/test/ui/specialization/specialization-feature-gate-default.stderr index 13d656bd060..ad33908eff6 100644 --- a/src/test/ui/specialization/specialization-feature-gate-default.stderr +++ b/src/test/ui/specialization/specialization-feature-gate-default.stderr @@ -1,7 +1,7 @@ error[E0658]: specialization is unstable (see issue #31844) --> $DIR/specialization-feature-gate-default.rs:10:5 | -LL | default fn foo(&self) {} //~ ERROR specialization is unstable +LL | default fn foo(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(specialization)] to the crate attributes to enable diff --git a/src/test/ui/specialization/specialization-feature-gate-overlap.stderr b/src/test/ui/specialization/specialization-feature-gate-overlap.stderr index d6714375d16..baaf7aa4332 100644 --- a/src/test/ui/specialization/specialization-feature-gate-overlap.stderr +++ b/src/test/ui/specialization/specialization-feature-gate-overlap.stderr @@ -4,7 +4,7 @@ error[E0119]: conflicting implementations of trait `Foo` for type `u8`: LL | impl Foo for T { | ----------------- first implementation here ... -LL | impl Foo for u8 { //~ ERROR E0119 +LL | impl Foo for u8 { | ^^^^^^^^^^^^^^^ conflicting implementation for `u8` error: aborting due to previous error diff --git a/src/test/ui/specialization/specialization-no-default.stderr b/src/test/ui/specialization/specialization-no-default.stderr index c57f98ac74d..c39986de38d 100644 --- a/src/test/ui/specialization/specialization-no-default.stderr +++ b/src/test/ui/specialization/specialization-no-default.stderr @@ -7,7 +7,7 @@ LL | | fn bar(&self) {} LL | | } | |_- parent `impl` is here ... -LL | fn foo(&self) {} //~ ERROR E0520 +LL | fn foo(&self) {} | ^^^^^^^^^^^^^^^^ cannot specialize default item `foo` | = note: to specialize, `foo` in the parent `impl` must be marked `default` @@ -21,7 +21,7 @@ LL | | fn bar(&self) {} LL | | } | |_- parent `impl` is here ... -LL | fn bar(&self) {} //~ ERROR E0520 +LL | fn bar(&self) {} | ^^^^^^^^^^^^^^^^ cannot specialize default item `bar` | = note: to specialize, `bar` in the parent `impl` must be marked `default` @@ -34,7 +34,7 @@ LL | | type T = u8; LL | | } | |_- parent `impl` is here ... -LL | type T = (); //~ ERROR E0520 +LL | type T = (); | ^^^^^^^^^^^^ cannot specialize default item `T` | = note: to specialize, `T` in the parent `impl` must be marked `default` @@ -47,7 +47,7 @@ LL | | fn baz(&self) {} LL | | } | |_- parent `impl` is here ... -LL | fn baz(&self) {} //~ ERROR E0520 +LL | fn baz(&self) {} | ^^^^^^^^^^^^^^^^ cannot specialize default item `baz` | = note: to specialize, `baz` in the parent `impl` must be marked `default` @@ -60,7 +60,7 @@ LL | | fn redundant(&self) {} LL | | } | |_- parent `impl` is here ... -LL | default fn redundant(&self) {} //~ ERROR E0520 +LL | default fn redundant(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `redundant` | = note: to specialize, `redundant` in the parent `impl` must be marked `default` diff --git a/src/test/ui/specialization/specialization-overlap-negative.stderr b/src/test/ui/specialization/specialization-overlap-negative.stderr index b9ab1bd637c..947aad824ea 100644 --- a/src/test/ui/specialization/specialization-overlap-negative.stderr +++ b/src/test/ui/specialization/specialization-overlap-negative.stderr @@ -3,7 +3,7 @@ error[E0119]: conflicting implementations of trait `std::marker::Send` for type | LL | unsafe impl Send for TestType {} | ------------------------------------------ first implementation here -LL | impl !Send for TestType {} //~ ERROR E0119 +LL | impl !Send for TestType {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `TestType<_>` error: aborting due to previous error diff --git a/src/test/ui/specialization/specialization-overlap.stderr b/src/test/ui/specialization/specialization-overlap.stderr index eef8cb44b88..4275e7bdd85 100644 --- a/src/test/ui/specialization/specialization-overlap.stderr +++ b/src/test/ui/specialization/specialization-overlap.stderr @@ -3,7 +3,7 @@ error[E0119]: conflicting implementations of trait `Foo` for type `std::vec::Vec | LL | impl Foo for T {} | ------------------------ first implementation here -LL | impl Foo for Vec {} //~ ERROR E0119 +LL | impl Foo for Vec {} | ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `std::vec::Vec<_>` error[E0119]: conflicting implementations of trait `Bar` for type `(u8, u8)`: @@ -11,7 +11,7 @@ error[E0119]: conflicting implementations of trait `Bar` for type `(u8, u8)`: | LL | impl Bar for (T, u8) {} | ----------------------- first implementation here -LL | impl Bar for (u8, T) {} //~ ERROR E0119 +LL | impl Bar for (u8, T) {} | ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(u8, u8)` error[E0119]: conflicting implementations of trait `Baz` for type `u8`: @@ -19,7 +19,7 @@ error[E0119]: conflicting implementations of trait `Baz` for type `u8`: | LL | impl Baz for u8 {} | --------------------- first implementation here -LL | impl Baz for T {} //~ ERROR E0119 +LL | impl Baz for T {} | ^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u8` error[E0119]: conflicting implementations of trait `Qux`: @@ -27,7 +27,7 @@ error[E0119]: conflicting implementations of trait `Qux`: | LL | impl Qux for T {} | ------------------------ first implementation here -LL | impl Qux for T {} //~ ERROR E0119 +LL | impl Qux for T {} | ^^^^^^^^^^^^^^^^^^^^^ conflicting implementation error: aborting due to 4 previous errors diff --git a/src/test/ui/specialization/specialization-polarity.stderr b/src/test/ui/specialization/specialization-polarity.stderr index d1f48b78864..bc1b2aeb70f 100644 --- a/src/test/ui/specialization/specialization-polarity.stderr +++ b/src/test/ui/specialization/specialization-polarity.stderr @@ -3,7 +3,7 @@ error[E0119]: conflicting implementations of trait `Foo` for type `u8`: | LL | impl Foo for T {} | ----------------- first implementation here -LL | impl !Foo for u8 {} //~ ERROR E0119 +LL | impl !Foo for u8 {} | ^^^^^^^^^^^^^^^^ conflicting implementation for `u8` error[E0119]: conflicting implementations of trait `Bar` for type `u8`: @@ -11,7 +11,7 @@ error[E0119]: conflicting implementations of trait `Bar` for type `u8`: | LL | impl !Bar for T {} | ------------------ first implementation here -LL | impl Bar for u8 {} //~ ERROR E0119 +LL | impl Bar for u8 {} | ^^^^^^^^^^^^^^^ conflicting implementation for `u8` error: aborting due to 2 previous errors diff --git a/src/test/ui/stability-attribute/missing-stability-attr-at-top-level.stderr b/src/test/ui/stability-attribute/missing-stability-attr-at-top-level.stderr index f6747976945..b6c9564e904 100644 --- a/src/test/ui/stability-attribute/missing-stability-attr-at-top-level.stderr +++ b/src/test/ui/stability-attribute/missing-stability-attr-at-top-level.stderr @@ -2,7 +2,7 @@ error: crate has missing stability attribute --> $DIR/missing-stability-attr-at-top-level.rs:1:1 | LL | / #![feature(staged_api)] -LL | | //~^ ERROR crate has missing stability attribute +LL | | LL | | LL | | fn main() {} | |____________^ diff --git a/src/test/ui/stability-attribute/stability-attribute-issue-43027.stderr b/src/test/ui/stability-attribute/stability-attribute-issue-43027.stderr index 7ffb4bb487a..280c72acccb 100644 --- a/src/test/ui/stability-attribute/stability-attribute-issue-43027.stderr +++ b/src/test/ui/stability-attribute/stability-attribute-issue-43027.stderr @@ -1,7 +1,7 @@ error: field has missing stability attribute --> $DIR/stability-attribute-issue-43027.rs:5:23 | -LL | pub struct Reverse(pub T); //~ ERROR field has missing stability attribute +LL | pub struct Reverse(pub T); | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/stability-attribute/stability-attribute-non-staged-force-unstable.stderr b/src/test/ui/stability-attribute/stability-attribute-non-staged-force-unstable.stderr index cd8ea921d30..77f896a86d5 100644 --- a/src/test/ui/stability-attribute/stability-attribute-non-staged-force-unstable.stderr +++ b/src/test/ui/stability-attribute/stability-attribute-non-staged-force-unstable.stderr @@ -1,19 +1,19 @@ error: stability attributes may not be used outside of the standard library --> $DIR/stability-attribute-non-staged-force-unstable.rs:3:1 | -LL | #[unstable()] //~ ERROR: stability attributes may not be used +LL | #[unstable()] | ^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/stability-attribute-non-staged-force-unstable.rs:4:1 | -LL | #[stable()] //~ ERROR: stability attributes may not be used +LL | #[stable()] | ^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/stability-attribute-non-staged-force-unstable.rs:5:1 | -LL | #[rustc_deprecated()] //~ ERROR: stability attributes may not be used +LL | #[rustc_deprecated()] | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/stability-attribute/stability-attribute-non-staged.stderr b/src/test/ui/stability-attribute/stability-attribute-non-staged.stderr index 67f6ef857f1..e98f789f54c 100644 --- a/src/test/ui/stability-attribute/stability-attribute-non-staged.stderr +++ b/src/test/ui/stability-attribute/stability-attribute-non-staged.stderr @@ -1,19 +1,19 @@ error: stability attributes may not be used outside of the standard library --> $DIR/stability-attribute-non-staged.rs:1:1 | -LL | #[unstable()] //~ ERROR: stability attributes may not be used +LL | #[unstable()] | ^^^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/stability-attribute-non-staged.rs:2:1 | -LL | #[stable()] //~ ERROR: stability attributes may not be used +LL | #[stable()] | ^^^^^^^^^^^ error: stability attributes may not be used outside of the standard library --> $DIR/stability-attribute-non-staged.rs:3:1 | -LL | #[rustc_deprecated()] //~ ERROR: stability attributes may not be used +LL | #[rustc_deprecated()] | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/stability-attribute/stability-attribute-sanity-2.stderr b/src/test/ui/stability-attribute/stability-attribute-sanity-2.stderr index 6f5c844a657..2bc544d107d 100644 --- a/src/test/ui/stability-attribute/stability-attribute-sanity-2.stderr +++ b/src/test/ui/stability-attribute/stability-attribute-sanity-2.stderr @@ -1,19 +1,19 @@ error[E0538]: multiple 'feature' items --> $DIR/stability-attribute-sanity-2.rs:7:25 | -LL | #[stable(feature = "a", feature = "b", since = "1.0.0")] //~ ERROR multiple 'feature' items +LL | #[stable(feature = "a", feature = "b", since = "1.0.0")] | ^^^^^^^^^^^^^ error[E0541]: unknown meta item 'sinse' --> $DIR/stability-attribute-sanity-2.rs:10:25 | -LL | #[stable(feature = "a", sinse = "1.0.0")] //~ ERROR unknown meta item 'sinse' +LL | #[stable(feature = "a", sinse = "1.0.0")] | ^^^^^^^^^^^^^^^ expected one of `since`, `note` error[E0545]: incorrect 'issue' --> $DIR/stability-attribute-sanity-2.rs:13:1 | -LL | #[unstable(feature = "a", issue = "no")] //~ ERROR incorrect 'issue' +LL | #[unstable(feature = "a", issue = "no")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/stability-attribute/stability-attribute-sanity-3.stderr b/src/test/ui/stability-attribute/stability-attribute-sanity-3.stderr index 1c759d49b99..b1c56ef224a 100644 --- a/src/test/ui/stability-attribute/stability-attribute-sanity-3.stderr +++ b/src/test/ui/stability-attribute/stability-attribute-sanity-3.stderr @@ -1,7 +1,7 @@ error: macro has missing stability attribute --> $DIR/stability-attribute-sanity-3.rs:8:1 | -LL | / macro_rules! mac { //~ ERROR macro has missing stability attribute +LL | / macro_rules! mac { LL | | () => () LL | | } | |_^ diff --git a/src/test/ui/stability-attribute/stability-attribute-sanity-4.stderr b/src/test/ui/stability-attribute/stability-attribute-sanity-4.stderr index 4b4efe9d8ca..d85b628c3c3 100644 --- a/src/test/ui/stability-attribute/stability-attribute-sanity-4.stderr +++ b/src/test/ui/stability-attribute/stability-attribute-sanity-4.stderr @@ -1,37 +1,37 @@ error: attribute must be of the form `#[unstable(feature = "name", reason = "...", issue = "N")]` --> $DIR/stability-attribute-sanity-4.rs:8:5 | -LL | #[unstable] //~ ERROR attribute must be of the form +LL | #[unstable] | ^^^^^^^^^^^ error: attribute must be of the form `#[unstable(feature = "name", reason = "...", issue = "N")]` --> $DIR/stability-attribute-sanity-4.rs:11:5 | -LL | #[unstable = "b"] //~ ERROR attribute must be of the form +LL | #[unstable = "b"] | ^^^^^^^^^^^^^^^^^ error: attribute must be of the form `#[stable(feature = "name", since = "version")]` --> $DIR/stability-attribute-sanity-4.rs:14:5 | -LL | #[stable] //~ ERROR attribute must be of the form +LL | #[stable] | ^^^^^^^^^ error: attribute must be of the form `#[stable(feature = "name", since = "version")]` --> $DIR/stability-attribute-sanity-4.rs:17:5 | -LL | #[stable = "a"] //~ ERROR attribute must be of the form +LL | #[stable = "a"] | ^^^^^^^^^^^^^^^ error: attribute must be of the form `#[rustc_deprecated(since = "version", reason = "...")]` --> $DIR/stability-attribute-sanity-4.rs:21:5 | -LL | #[rustc_deprecated] //~ ERROR attribute must be of the form +LL | #[rustc_deprecated] | ^^^^^^^^^^^^^^^^^^^ error: attribute must be of the form `#[rustc_deprecated(since = "version", reason = "...")]` --> $DIR/stability-attribute-sanity-4.rs:25:5 | -LL | #[rustc_deprecated = "a"] //~ ERROR attribute must be of the form +LL | #[rustc_deprecated = "a"] | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/stability-attribute/stability-attribute-sanity.stderr b/src/test/ui/stability-attribute/stability-attribute-sanity.stderr index 74c1bbfed6f..5343e3bd537 100644 --- a/src/test/ui/stability-attribute/stability-attribute-sanity.stderr +++ b/src/test/ui/stability-attribute/stability-attribute-sanity.stderr @@ -1,97 +1,97 @@ error[E0541]: unknown meta item 'reason' --> $DIR/stability-attribute-sanity.rs:8:42 | -LL | #[stable(feature = "a", since = "b", reason)] //~ ERROR unknown meta item 'reason' [E0541] +LL | #[stable(feature = "a", since = "b", reason)] | ^^^^^^ expected one of `since`, `note` error[E0539]: incorrect meta item --> $DIR/stability-attribute-sanity.rs:11:29 | -LL | #[stable(feature = "a", since)] //~ ERROR incorrect meta item [E0539] +LL | #[stable(feature = "a", since)] | ^^^^^ error[E0539]: incorrect meta item --> $DIR/stability-attribute-sanity.rs:14:14 | -LL | #[stable(feature, since = "a")] //~ ERROR incorrect meta item [E0539] +LL | #[stable(feature, since = "a")] | ^^^^^^^ error[E0539]: incorrect meta item --> $DIR/stability-attribute-sanity.rs:17:29 | -LL | #[stable(feature = "a", since(b))] //~ ERROR incorrect meta item [E0539] +LL | #[stable(feature = "a", since(b))] | ^^^^^^^^ error[E0539]: incorrect meta item --> $DIR/stability-attribute-sanity.rs:20:14 | -LL | #[stable(feature(b), since = "a")] //~ ERROR incorrect meta item [E0539] +LL | #[stable(feature(b), since = "a")] | ^^^^^^^^^^ error[E0546]: missing 'feature' --> $DIR/stability-attribute-sanity.rs:25:5 | -LL | #[unstable(issue = "0")] //~ ERROR missing 'feature' [E0546] +LL | #[unstable(issue = "0")] | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0547]: missing 'issue' --> $DIR/stability-attribute-sanity.rs:28:5 | -LL | #[unstable(feature = "b")] //~ ERROR missing 'issue' [E0547] +LL | #[unstable(feature = "b")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0546]: missing 'feature' --> $DIR/stability-attribute-sanity.rs:31:5 | -LL | #[stable(since = "a")] //~ ERROR missing 'feature' [E0546] +LL | #[stable(since = "a")] | ^^^^^^^^^^^^^^^^^^^^^^ error[E0542]: missing 'since' --> $DIR/stability-attribute-sanity.rs:36:5 | -LL | #[stable(feature = "a")] //~ ERROR missing 'since' [E0542] +LL | #[stable(feature = "a")] | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0542]: missing 'since' --> $DIR/stability-attribute-sanity.rs:40:5 | -LL | #[rustc_deprecated(reason = "a")] //~ ERROR missing 'since' [E0542] +LL | #[rustc_deprecated(reason = "a")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0544]: multiple stability levels --> $DIR/stability-attribute-sanity.rs:45:1 | -LL | #[stable(feature = "a", since = "b")] //~ ERROR multiple stability levels [E0544] +LL | #[stable(feature = "a", since = "b")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0544]: multiple stability levels --> $DIR/stability-attribute-sanity.rs:49:1 | -LL | #[unstable(feature = "b", issue = "0")] //~ ERROR multiple stability levels [E0544] +LL | #[unstable(feature = "b", issue = "0")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0544]: multiple stability levels --> $DIR/stability-attribute-sanity.rs:53:1 | -LL | #[stable(feature = "a", since = "b")] //~ ERROR multiple stability levels [E0544] +LL | #[stable(feature = "a", since = "b")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0540]: multiple rustc_deprecated attributes --> $DIR/stability-attribute-sanity.rs:61:1 | -LL | pub const fn multiple4() { } //~ ERROR multiple rustc_deprecated attributes [E0540] +LL | pub const fn multiple4() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0553]: multiple rustc_const_unstable attributes --> $DIR/stability-attribute-sanity.rs:61:1 | -LL | pub const fn multiple4() { } //~ ERROR multiple rustc_deprecated attributes [E0540] +LL | pub const fn multiple4() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Invalid stability or deprecation version found --> $DIR/stability-attribute-sanity.rs:61:1 | -LL | pub const fn multiple4() { } //~ ERROR multiple rustc_deprecated attributes [E0540] +LL | pub const fn multiple4() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0549]: rustc_deprecated attribute must be paired with either stable or unstable attribute diff --git a/src/test/ui/static/static-items-cant-move.stderr b/src/test/ui/static/static-items-cant-move.stderr index 1ac772a4601..fc1ed9b8d61 100644 --- a/src/test/ui/static/static-items-cant-move.stderr +++ b/src/test/ui/static/static-items-cant-move.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of static item --> $DIR/static-items-cant-move.rs:18:10 | -LL | test(BAR); //~ ERROR cannot move out of static item +LL | test(BAR); | ^^^ cannot move out of static item error: aborting due to previous error diff --git a/src/test/ui/static/static-lifetime-bound.stderr b/src/test/ui/static/static-lifetime-bound.stderr index dc8e83610d4..b9aa4d8722b 100644 --- a/src/test/ui/static/static-lifetime-bound.stderr +++ b/src/test/ui/static/static-lifetime-bound.stderr @@ -1,7 +1,7 @@ warning: unnecessary lifetime parameter `'a` --> $DIR/static-lifetime-bound.rs:1:6 | -LL | fn f<'a: 'static>(_: &'a i32) {} //~WARN unnecessary lifetime parameter `'a` +LL | fn f<'a: 'static>(_: &'a i32) {} | ^^^^^^^^^^^ | = help: you can use the `'static` lifetime directly, in place of `'a` @@ -9,7 +9,7 @@ LL | fn f<'a: 'static>(_: &'a i32) {} //~WARN unnecessary lifetime parameter `'a error[E0597]: `x` does not live long enough --> $DIR/static-lifetime-bound.rs:5:8 | -LL | f(&x); //~ERROR does not live long enough +LL | f(&x); | ^ borrowed value does not live long enough LL | } | - borrowed value only lives until here diff --git a/src/test/ui/static/static-lifetime.stderr b/src/test/ui/static/static-lifetime.stderr index 65c60ceb2e3..8516ac07b6c 100644 --- a/src/test/ui/static/static-lifetime.stderr +++ b/src/test/ui/static/static-lifetime.stderr @@ -1,13 +1,13 @@ error[E0478]: lifetime bound not satisfied --> $DIR/static-lifetime.rs:3:20 | -LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {} //~ ERROR lifetime bound +LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {} | ^^^^^^^^^ | note: lifetime parameter instantiated with the lifetime 'a as defined on the impl at 3:6 --> $DIR/static-lifetime.rs:3:6 | -LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {} //~ ERROR lifetime bound +LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {} | ^^ = note: but lifetime parameter must outlive the static lifetime diff --git a/src/test/ui/static/static-method-privacy.stderr b/src/test/ui/static/static-method-privacy.stderr index c72295f97ca..14ca9f58301 100644 --- a/src/test/ui/static/static-method-privacy.stderr +++ b/src/test/ui/static/static-method-privacy.stderr @@ -1,7 +1,7 @@ error[E0624]: method `new` is private --> $DIR/static-method-privacy.rs:9:13 | -LL | let _ = a::S::new(); //~ ERROR method `new` is private +LL | let _ = a::S::new(); | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/static/static-mut-bad-types.stderr b/src/test/ui/static/static-mut-bad-types.stderr index e97165705ca..88d62011fc4 100644 --- a/src/test/ui/static/static-mut-bad-types.stderr +++ b/src/test/ui/static/static-mut-bad-types.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/static-mut-bad-types.rs:5:13 | -LL | a = true; //~ ERROR: mismatched types +LL | a = true; | ^^^^ expected isize, found bool error: aborting due to previous error diff --git a/src/test/ui/static/static-mut-foreign-requires-unsafe.stderr b/src/test/ui/static/static-mut-foreign-requires-unsafe.stderr index 9964e1d98b1..e7ed0b710b2 100644 --- a/src/test/ui/static/static-mut-foreign-requires-unsafe.stderr +++ b/src/test/ui/static/static-mut-foreign-requires-unsafe.stderr @@ -1,7 +1,7 @@ error[E0133]: use of mutable static is unsafe and requires unsafe function or block --> $DIR/static-mut-foreign-requires-unsafe.rs:6:5 | -LL | a += 3; //~ ERROR: requires unsafe +LL | a += 3; | ^^^^^^ use of mutable static | = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior @@ -9,7 +9,7 @@ LL | a += 3; //~ ERROR: requires unsafe error[E0133]: use of mutable static is unsafe and requires unsafe function or block --> $DIR/static-mut-foreign-requires-unsafe.rs:7:5 | -LL | a = 4; //~ ERROR: requires unsafe +LL | a = 4; | ^^^^^ use of mutable static | = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior @@ -17,7 +17,7 @@ LL | a = 4; //~ ERROR: requires unsafe error[E0133]: use of mutable static is unsafe and requires unsafe function or block --> $DIR/static-mut-foreign-requires-unsafe.rs:8:14 | -LL | let _b = a; //~ ERROR: requires unsafe +LL | let _b = a; | ^ use of mutable static | = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior diff --git a/src/test/ui/static/static-mut-not-pat.stderr b/src/test/ui/static/static-mut-not-pat.stderr index 0714df0d11d..33c1cd6a595 100644 --- a/src/test/ui/static/static-mut-not-pat.stderr +++ b/src/test/ui/static/static-mut-not-pat.stderr @@ -4,7 +4,7 @@ error[E0530]: match bindings cannot shadow statics LL | static mut a: isize = 3; | ------------------------ the static `a` is defined here ... -LL | a => {} //~ ERROR match bindings cannot shadow statics +LL | a => {} | ^ cannot be named the same as a static error[E0530]: match bindings cannot shadow statics diff --git a/src/test/ui/static/static-mut-requires-unsafe.stderr b/src/test/ui/static/static-mut-requires-unsafe.stderr index 66ee6989b01..85e468b333c 100644 --- a/src/test/ui/static/static-mut-requires-unsafe.stderr +++ b/src/test/ui/static/static-mut-requires-unsafe.stderr @@ -1,7 +1,7 @@ error[E0133]: use of mutable static is unsafe and requires unsafe function or block --> $DIR/static-mut-requires-unsafe.rs:4:5 | -LL | a += 3; //~ ERROR: requires unsafe +LL | a += 3; | ^^^^^^ use of mutable static | = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior @@ -9,7 +9,7 @@ LL | a += 3; //~ ERROR: requires unsafe error[E0133]: use of mutable static is unsafe and requires unsafe function or block --> $DIR/static-mut-requires-unsafe.rs:5:5 | -LL | a = 4; //~ ERROR: requires unsafe +LL | a = 4; | ^^^^^ use of mutable static | = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior @@ -17,7 +17,7 @@ LL | a = 4; //~ ERROR: requires unsafe error[E0133]: use of mutable static is unsafe and requires unsafe function or block --> $DIR/static-mut-requires-unsafe.rs:6:14 | -LL | let _b = a; //~ ERROR: requires unsafe +LL | let _b = a; | ^ use of mutable static | = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior diff --git a/src/test/ui/static/static-reference-to-fn-1.stderr b/src/test/ui/static/static-reference-to-fn-1.stderr index 84cd6db4c4a..f6d2385ac69 100644 --- a/src/test/ui/static/static-reference-to-fn-1.stderr +++ b/src/test/ui/static/static-reference-to-fn-1.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/static-reference-to-fn-1.rs:17:15 | -LL | func: &foo, //~ ERROR mismatched types +LL | func: &foo, | ^^^^ expected fn pointer, found fn item | = note: expected type `&fn() -> std::option::Option` diff --git a/src/test/ui/static/static-reference-to-fn-2.stderr b/src/test/ui/static/static-reference-to-fn-2.stderr index d94913c7e22..17d4a361257 100644 --- a/src/test/ui/static/static-reference-to-fn-2.stderr +++ b/src/test/ui/static/static-reference-to-fn-2.stderr @@ -11,7 +11,7 @@ note: borrowed value must be valid for the anonymous lifetime #2 defined on the | LL | / fn state1(self_: &mut StateMachineIter) -> Option<&'static str> { LL | | self_.statefn = &id(state2 as StateMachineFunc); -LL | | //~^ ERROR borrowed value does not live long enough +LL | | LL | | return Some("state1"); LL | | } | |_^ @@ -30,7 +30,7 @@ note: borrowed value must be valid for the anonymous lifetime #2 defined on the | LL | / fn state2(self_: &mut StateMachineIter) -> Option<(&'static str)> { LL | | self_.statefn = &id(state3 as StateMachineFunc); -LL | | //~^ ERROR borrowed value does not live long enough +LL | | LL | | return Some("state2"); LL | | } | |_^ @@ -49,7 +49,7 @@ note: borrowed value must be valid for the anonymous lifetime #2 defined on the | LL | / fn state3(self_: &mut StateMachineIter) -> Option<(&'static str)> { LL | | self_.statefn = &id(finished as StateMachineFunc); -LL | | //~^ ERROR borrowed value does not live long enough +LL | | LL | | return Some("state3"); LL | | } | |_^ diff --git a/src/test/ui/static/static-region-bound.stderr b/src/test/ui/static/static-region-bound.stderr index 611f47ddfde..f6bbfcecf6f 100644 --- a/src/test/ui/static/static-region-bound.stderr +++ b/src/test/ui/static/static-region-bound.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/static-region-bound.rs:10:14 | -LL | let x = &id(3); //~ ERROR borrowed value does not live long enough +LL | let x = &id(3); | ^^^^^ temporary value does not live long enough LL | f(x); LL | } diff --git a/src/test/ui/std-uncopyable-atomics.stderr b/src/test/ui/std-uncopyable-atomics.stderr index ecf9963c145..7f01434838c 100644 --- a/src/test/ui/std-uncopyable-atomics.stderr +++ b/src/test/ui/std-uncopyable-atomics.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of borrowed content --> $DIR/std-uncopyable-atomics.rs:9:13 | -LL | let x = *&x; //~ ERROR: cannot move out of borrowed content +LL | let x = *&x; | ^^^ | | | cannot move out of borrowed content @@ -10,7 +10,7 @@ LL | let x = *&x; //~ ERROR: cannot move out of borrowed content error[E0507]: cannot move out of borrowed content --> $DIR/std-uncopyable-atomics.rs:11:13 | -LL | let x = *&x; //~ ERROR: cannot move out of borrowed content +LL | let x = *&x; | ^^^ | | | cannot move out of borrowed content @@ -19,7 +19,7 @@ LL | let x = *&x; //~ ERROR: cannot move out of borrowed content error[E0507]: cannot move out of borrowed content --> $DIR/std-uncopyable-atomics.rs:13:13 | -LL | let x = *&x; //~ ERROR: cannot move out of borrowed content +LL | let x = *&x; | ^^^ | | | cannot move out of borrowed content @@ -28,7 +28,7 @@ LL | let x = *&x; //~ ERROR: cannot move out of borrowed content error[E0507]: cannot move out of borrowed content --> $DIR/std-uncopyable-atomics.rs:15:13 | -LL | let x = *&x; //~ ERROR: cannot move out of borrowed content +LL | let x = *&x; | ^^^ | | | cannot move out of borrowed content diff --git a/src/test/ui/stmt_expr_attrs_no_feature.stderr b/src/test/ui/stmt_expr_attrs_no_feature.stderr index c4d735915a1..c644126535d 100644 --- a/src/test/ui/stmt_expr_attrs_no_feature.stderr +++ b/src/test/ui/stmt_expr_attrs_no_feature.stderr @@ -1,7 +1,7 @@ error[E0658]: attributes on expressions are experimental. (see issue #15701) --> $DIR/stmt_expr_attrs_no_feature.rs:13:5 | -LL | #[attr] //~ ERROR attributes on expressions are experimental +LL | #[attr] | ^^^^^^^ | = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | #[attr] //~ ERROR attributes on expressions are experimental error[E0658]: attributes on expressions are experimental. (see issue #15701) --> $DIR/stmt_expr_attrs_no_feature.rs:94:18 | -LL | fn y(a: [u8; #[attr] 5]); //~ ERROR 15701 +LL | fn y(a: [u8; #[attr] 5]); | ^^^^^^^ | = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | fn y(a: [u8; #[attr] 5]); //~ ERROR 15701 error[E0658]: attributes on expressions are experimental. (see issue #15701) --> $DIR/stmt_expr_attrs_no_feature.rs:101:19 | -LL | const Y: u8 = #[attr] 5; //~ ERROR 15701 +LL | const Y: u8 = #[attr] 5; | ^^^^^^^ | = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable @@ -25,7 +25,7 @@ LL | const Y: u8 = #[attr] 5; //~ ERROR 15701 error[E0658]: attributes on expressions are experimental. (see issue #15701) --> $DIR/stmt_expr_attrs_no_feature.rs:107:19 | -LL | const Y: [u8; #[attr] 5]; //~ ERROR 15701 +LL | const Y: [u8; #[attr] 5]; | ^^^^^^^ | = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable @@ -33,7 +33,7 @@ LL | const Y: [u8; #[attr] 5]; //~ ERROR 15701 error[E0658]: attributes on expressions are experimental. (see issue #15701) --> $DIR/stmt_expr_attrs_no_feature.rs:113:18 | -LL | field2: [u8; #[attr] 5] //~ ERROR 15701 +LL | field2: [u8; #[attr] 5] | ^^^^^^^ | = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable @@ -41,7 +41,7 @@ LL | field2: [u8; #[attr] 5] //~ ERROR 15701 error[E0658]: attributes on expressions are experimental. (see issue #15701) --> $DIR/stmt_expr_attrs_no_feature.rs:118:10 | -LL | [u8; #[attr] 5] //~ ERROR 15701 +LL | [u8; #[attr] 5] | ^^^^^^^ | = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable @@ -49,7 +49,7 @@ LL | [u8; #[attr] 5] //~ ERROR 15701 error[E0658]: attributes on expressions are experimental. (see issue #15701) --> $DIR/stmt_expr_attrs_no_feature.rs:124:14 | -LL | [u8; #[attr] 5] //~ ERROR 15701 +LL | [u8; #[attr] 5] | ^^^^^^^ | = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable @@ -57,7 +57,7 @@ LL | [u8; #[attr] 5] //~ ERROR 15701 error[E0658]: attributes on expressions are experimental. (see issue #15701) --> $DIR/stmt_expr_attrs_no_feature.rs:129:22 | -LL | field2: [u8; #[attr] 5] //~ ERROR 15701 +LL | field2: [u8; #[attr] 5] | ^^^^^^^ | = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable @@ -65,7 +65,7 @@ LL | field2: [u8; #[attr] 5] //~ ERROR 15701 error[E0658]: attributes on expressions are experimental. (see issue #15701) --> $DIR/stmt_expr_attrs_no_feature.rs:137:14 | -LL | 6 => #[attr] (), //~ ERROR 15701 +LL | 6 => #[attr] (), | ^^^^^^^ | = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable diff --git a/src/test/ui/str/str-as-char.stderr b/src/test/ui/str/str-as-char.stderr index 4ca430a4cde..162f0888a29 100644 --- a/src/test/ui/str/str-as-char.stderr +++ b/src/test/ui/str/str-as-char.stderr @@ -1,21 +1,21 @@ error: character literal may only contain one codepoint --> $DIR/str-as-char.rs:4:14 | -LL | println!('●●'); //~ ERROR character literal may only contain one codepoint +LL | println!('●●'); | ^^^^ help: if you meant to write a `str` literal, use double quotes | -LL | println!("●●"); //~ ERROR character literal may only contain one codepoint +LL | println!("●●"); | ^^^^ error: format argument must be a string literal --> $DIR/str-as-char.rs:4:14 | -LL | println!('●●'); //~ ERROR character literal may only contain one codepoint +LL | println!('●●'); | ^^^^ help: you might be missing a string literal to format with | -LL | println!("{}", '●●'); //~ ERROR character literal may only contain one codepoint +LL | println!("{}", '●●'); | ^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/str/str-idx.stderr b/src/test/ui/str/str-idx.stderr index 99df85d92fd..e388534f132 100644 --- a/src/test/ui/str/str-idx.stderr +++ b/src/test/ui/str/str-idx.stderr @@ -1,7 +1,7 @@ error[E0277]: the type `str` cannot be indexed by `{integer}` --> $DIR/str-idx.rs:3:17 | -LL | let _: u8 = s[4]; //~ ERROR the type `str` cannot be indexed by `{integer}` +LL | let _: u8 = s[4]; | ^^^^ string indices are ranges of `usize` | = help: the trait `std::slice::SliceIndex` is not implemented for `{integer}` @@ -12,7 +12,7 @@ LL | let _: u8 = s[4]; //~ ERROR the type `str` cannot be indexed by `{integ error[E0277]: the type `str` cannot be indexed by `{integer}` --> $DIR/str-idx.rs:4:15 | -LL | let _ = s.get(4); //~ ERROR the type `str` cannot be indexed by `{integer}` +LL | let _ = s.get(4); | ^^^ string indices are ranges of `usize` | = help: the trait `std::slice::SliceIndex` is not implemented for `{integer}` @@ -22,7 +22,7 @@ LL | let _ = s.get(4); //~ ERROR the type `str` cannot be indexed by `{integ error[E0277]: the type `str` cannot be indexed by `{integer}` --> $DIR/str-idx.rs:5:15 | -LL | let _ = s.get_unchecked(4); //~ ERROR the type `str` cannot be indexed by `{integer}` +LL | let _ = s.get_unchecked(4); | ^^^^^^^^^^^^^ string indices are ranges of `usize` | = help: the trait `std::slice::SliceIndex` is not implemented for `{integer}` @@ -32,7 +32,7 @@ LL | let _ = s.get_unchecked(4); //~ ERROR the type `str` cannot be indexed error[E0277]: the type `str` cannot be indexed by `char` --> $DIR/str-idx.rs:6:17 | -LL | let _: u8 = s['c']; //~ ERROR the type `str` cannot be indexed by `char` +LL | let _: u8 = s['c']; | ^^^^^^ string indices are ranges of `usize` | = help: the trait `std::slice::SliceIndex` is not implemented for `char` diff --git a/src/test/ui/str/str-lit-type-mismatch.stderr b/src/test/ui/str/str-lit-type-mismatch.stderr index c14e9090fef..ef40faa8e26 100644 --- a/src/test/ui/str/str-lit-type-mismatch.stderr +++ b/src/test/ui/str/str-lit-type-mismatch.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/str-lit-type-mismatch.rs:2:20 | -LL | let x: &[u8] = "foo"; //~ ERROR mismatched types +LL | let x: &[u8] = "foo"; | ^^^^^ | | | expected slice, found str @@ -13,7 +13,7 @@ LL | let x: &[u8] = "foo"; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/str-lit-type-mismatch.rs:3:23 | -LL | let y: &[u8; 4] = "baaa"; //~ ERROR mismatched types +LL | let y: &[u8; 4] = "baaa"; | ^^^^^^ | | | expected array of 4 elements, found str @@ -25,7 +25,7 @@ LL | let y: &[u8; 4] = "baaa"; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/str-lit-type-mismatch.rs:4:19 | -LL | let z: &str = b"foo"; //~ ERROR mismatched types +LL | let z: &str = b"foo"; | ^^^^^^ | | | expected str, found array of 3 elements diff --git a/src/test/ui/structs/struct-base-wrong-type-2.stderr b/src/test/ui/structs/struct-base-wrong-type-2.stderr index b15ea51bb2d..d02ed205e92 100644 --- a/src/test/ui/structs/struct-base-wrong-type-2.stderr +++ b/src/test/ui/structs/struct-base-wrong-type-2.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/struct-base-wrong-type-2.rs:11:27 | -LL | let f = Foo { a: 2, ..b }; //~ ERROR mismatched types +LL | let f = Foo { a: 2, ..b }; | ^ expected struct `Foo`, found struct `Bar` | = note: expected type `Foo` @@ -10,7 +10,7 @@ LL | let f = Foo { a: 2, ..b }; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/struct-base-wrong-type-2.rs:15:34 | -LL | let f__isize = Foo { a: 2, ..4 }; //~ ERROR mismatched types +LL | let f__isize = Foo { a: 2, ..4 }; | ^ expected struct `Foo`, found integer | = note: expected type `Foo` diff --git a/src/test/ui/structs/struct-base-wrong-type.stderr b/src/test/ui/structs/struct-base-wrong-type.stderr index 045eb610f7d..2491296c5ef 100644 --- a/src/test/ui/structs/struct-base-wrong-type.stderr +++ b/src/test/ui/structs/struct-base-wrong-type.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/struct-base-wrong-type.rs:10:33 | -LL | static foo: Foo = Foo { a: 2, ..bar }; //~ ERROR mismatched types +LL | static foo: Foo = Foo { a: 2, ..bar }; | ^^^ expected struct `Foo`, found struct `Bar` | = note: expected type `Foo` @@ -10,7 +10,7 @@ LL | static foo: Foo = Foo { a: 2, ..bar }; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/struct-base-wrong-type.rs:14:35 | -LL | static foo_i: Foo = Foo { a: 2, ..4 }; //~ ERROR mismatched types +LL | static foo_i: Foo = Foo { a: 2, ..4 }; | ^ expected struct `Foo`, found integer | = note: expected type `Foo` diff --git a/src/test/ui/structs/struct-field-privacy.stderr b/src/test/ui/structs/struct-field-privacy.stderr index 5e30a4e403d..91d000b8672 100644 --- a/src/test/ui/structs/struct-field-privacy.stderr +++ b/src/test/ui/structs/struct-field-privacy.stderr @@ -1,31 +1,31 @@ error[E0616]: field `a` of struct `inner::A` is private --> $DIR/struct-field-privacy.rs:23:5 | -LL | b.a; //~ ERROR: field `a` of struct `inner::A` is private +LL | b.a; | ^^^ error[E0616]: field `b` of struct `inner::B` is private --> $DIR/struct-field-privacy.rs:26:5 | -LL | c.b; //~ ERROR: field `b` of struct `inner::B` is private +LL | c.b; | ^^^ error[E0616]: field `a` of struct `xc::A` is private --> $DIR/struct-field-privacy.rs:28:5 | -LL | d.a; //~ ERROR: field `a` of struct `xc::A` is private +LL | d.a; | ^^^ error[E0616]: field `b` of struct `xc::B` is private --> $DIR/struct-field-privacy.rs:32:5 | -LL | e.b; //~ ERROR: field `b` of struct `xc::B` is private +LL | e.b; | ^^^ error[E0616]: field `1` of struct `inner::Z` is private --> $DIR/struct-field-privacy.rs:35:5 | -LL | z.1; //~ ERROR: field `1` of struct `inner::Z` is private +LL | z.1; | ^^^ error: aborting due to 5 previous errors diff --git a/src/test/ui/structs/struct-fields-dupe.stderr b/src/test/ui/structs/struct-fields-dupe.stderr index 7739ef80fc8..aaf2533dc01 100644 --- a/src/test/ui/structs/struct-fields-dupe.stderr +++ b/src/test/ui/structs/struct-fields-dupe.stderr @@ -3,7 +3,7 @@ error[E0062]: field `foo` specified more than once | LL | foo: 0, | ------ first use of `foo` -LL | foo: 0 //~ ERROR field `foo` specified more than once +LL | foo: 0 | ^^^ used more than once error: aborting due to previous error diff --git a/src/test/ui/structs/struct-fields-missing.stderr b/src/test/ui/structs/struct-fields-missing.stderr index edbac000dea..b3e42a94809 100644 --- a/src/test/ui/structs/struct-fields-missing.stderr +++ b/src/test/ui/structs/struct-fields-missing.stderr @@ -1,7 +1,7 @@ error[E0063]: missing field `bar` in initializer of `BuildData` --> $DIR/struct-fields-missing.rs:7:15 | -LL | let foo = BuildData { //~ ERROR missing field `bar` in initializer of `BuildData` +LL | let foo = BuildData { | ^^^^^^^^^ missing `bar` error: aborting due to previous error diff --git a/src/test/ui/structs/struct-fields-shorthand-unresolved.stderr b/src/test/ui/structs/struct-fields-shorthand-unresolved.stderr index 37ec6c0f015..09fc4f7ee58 100644 --- a/src/test/ui/structs/struct-fields-shorthand-unresolved.stderr +++ b/src/test/ui/structs/struct-fields-shorthand-unresolved.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find value `y` in this scope --> $DIR/struct-fields-shorthand-unresolved.rs:10:9 | -LL | y //~ ERROR cannot find value `y` in this scope +LL | y | ^ help: a local variable with a similar name exists: `x` error: aborting due to previous error diff --git a/src/test/ui/structs/struct-fields-shorthand.stderr b/src/test/ui/structs/struct-fields-shorthand.stderr index 0d3d633f61c..a285a392168 100644 --- a/src/test/ui/structs/struct-fields-shorthand.stderr +++ b/src/test/ui/structs/struct-fields-shorthand.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `Foo` has no field named `z` --> $DIR/struct-fields-shorthand.rs:9:15 | -LL | x, y, z //~ ERROR struct `Foo` has no field named `z` +LL | x, y, z | ^ `Foo` does not have this field | = note: available fields are: `x`, `y` diff --git a/src/test/ui/structs/struct-fields-typo.stderr b/src/test/ui/structs/struct-fields-typo.stderr index c2fab714f7c..6949a0a4a68 100644 --- a/src/test/ui/structs/struct-fields-typo.stderr +++ b/src/test/ui/structs/struct-fields-typo.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `baa` on type `BuildData` --> $DIR/struct-fields-typo.rs:11:17 | -LL | let x = foo.baa; //~ ERROR no field `baa` on type `BuildData` +LL | let x = foo.baa; | ^^^ help: a field with a similar name exists: `bar` error: aborting due to previous error diff --git a/src/test/ui/structs/struct-like-enum-nonexhaustive.stderr b/src/test/ui/structs/struct-like-enum-nonexhaustive.stderr index 0aa85eb7253..d6b5af17964 100644 --- a/src/test/ui/structs/struct-like-enum-nonexhaustive.stderr +++ b/src/test/ui/structs/struct-like-enum-nonexhaustive.stderr @@ -8,7 +8,7 @@ LL | | C LL | | } | |_- `A` defined here ... -LL | match x { //~ ERROR non-exhaustive patterns +LL | match x { | ^ pattern `B { x: Some(_) }` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/structs/struct-missing-comma.stderr b/src/test/ui/structs/struct-missing-comma.stderr index 00ef1a7ff92..f5b79f54001 100644 --- a/src/test/ui/structs/struct-missing-comma.stderr +++ b/src/test/ui/structs/struct-missing-comma.stderr @@ -1,7 +1,7 @@ error: expected `,`, or `}`, found `bar` --> $DIR/struct-missing-comma.rs:4:13 | -LL | foo: u32 //~ expected `,`, or `}`, found `bar` +LL | foo: u32 | ^ help: try adding a comma: `,` error: aborting due to previous error diff --git a/src/test/ui/structs/struct-pat-derived-error.stderr b/src/test/ui/structs/struct-pat-derived-error.stderr index dd1dc71f7fd..92a88defc52 100644 --- a/src/test/ui/structs/struct-pat-derived-error.stderr +++ b/src/test/ui/structs/struct-pat-derived-error.stderr @@ -1,19 +1,19 @@ error[E0609]: no field `d` on type `&A` --> $DIR/struct-pat-derived-error.rs:8:31 | -LL | let A { x, y } = self.d; //~ ERROR no field `d` on type `&A` +LL | let A { x, y } = self.d; | ^ error[E0026]: struct `A` does not have fields named `x`, `y` --> $DIR/struct-pat-derived-error.rs:8:17 | -LL | let A { x, y } = self.d; //~ ERROR no field `d` on type `&A` +LL | let A { x, y } = self.d; | ^ ^ struct `A` does not have these fields error[E0027]: pattern does not mention fields `b`, `c` --> $DIR/struct-pat-derived-error.rs:8:13 | -LL | let A { x, y } = self.d; //~ ERROR no field `d` on type `&A` +LL | let A { x, y } = self.d; | ^^^^^^^^^^ missing fields `b`, `c` error: aborting due to 3 previous errors diff --git a/src/test/ui/structs/struct-path-associated-type.stderr b/src/test/ui/structs/struct-path-associated-type.stderr index 80824d98478..0ca64ed40a5 100644 --- a/src/test/ui/structs/struct-path-associated-type.stderr +++ b/src/test/ui/structs/struct-path-associated-type.stderr @@ -25,31 +25,31 @@ LL | T::A {} => {} error[E0109]: type arguments are not allowed on this entity --> $DIR/struct-path-associated-type.rs:25:20 | -LL | let z = T::A:: {}; //~ ERROR type arguments are not allowed on this entity +LL | let z = T::A:: {}; | ^^ type argument not allowed error[E0223]: ambiguous associated type --> $DIR/struct-path-associated-type.rs:32:13 | -LL | let s = S::A {}; //~ ERROR ambiguous associated type +LL | let s = S::A {}; | ^^^^ help: use fully-qualified syntax: `::A` error[E0109]: type arguments are not allowed on this entity --> $DIR/struct-path-associated-type.rs:33:20 | -LL | let z = S::A:: {}; //~ ERROR ambiguous associated type +LL | let z = S::A:: {}; | ^^ type argument not allowed error[E0223]: ambiguous associated type --> $DIR/struct-path-associated-type.rs:33:13 | -LL | let z = S::A:: {}; //~ ERROR ambiguous associated type +LL | let z = S::A:: {}; | ^^^^^^^^^^ help: use fully-qualified syntax: `::A` error[E0223]: ambiguous associated type --> $DIR/struct-path-associated-type.rs:36:9 | -LL | S::A {} => {} //~ ERROR ambiguous associated type +LL | S::A {} => {} | ^^^^ help: use fully-qualified syntax: `::A` error: aborting due to 9 previous errors diff --git a/src/test/ui/structs/struct-path-self-type-mismatch.stderr b/src/test/ui/structs/struct-path-self-type-mismatch.stderr index 0b1b1e83400..72c6d7ae22b 100644 --- a/src/test/ui/structs/struct-path-self-type-mismatch.stderr +++ b/src/test/ui/structs/struct-path-self-type-mismatch.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/struct-path-self-type-mismatch.rs:7:23 | -LL | Self { inner: 1.5f32 }; //~ ERROR mismatched types +LL | Self { inner: 1.5f32 }; | ^^^^^^ expected i32, found f32 error[E0308]: mismatched types @@ -19,9 +19,9 @@ error[E0308]: mismatched types LL | fn new(u: U) -> Foo { | ------ expected `Foo` because of return type LL | / Self { -LL | | //~^ ERROR mismatched types +LL | | LL | | inner: u -LL | | //~^ ERROR mismatched types +LL | | LL | | } | |_________^ expected type parameter, found a different type parameter | diff --git a/src/test/ui/structs/struct-path-self.stderr b/src/test/ui/structs/struct-path-self.stderr index cda6b7a533f..0fb02b9c44b 100644 --- a/src/test/ui/structs/struct-path-self.stderr +++ b/src/test/ui/structs/struct-path-self.stderr @@ -25,13 +25,13 @@ LL | Self { .. } => {} error[E0109]: type arguments are not allowed on this entity --> $DIR/struct-path-self.rs:20:24 | -LL | let z = Self:: {}; //~ ERROR type arguments are not allowed on this entity +LL | let z = Self:: {}; | ^^ type argument not allowed error[E0109]: type arguments are not allowed on this entity --> $DIR/struct-path-self.rs:30:24 | -LL | let z = Self:: {}; //~ ERROR type arguments are not allowed on this entity +LL | let z = Self:: {}; | ^^ type argument not allowed error: aborting due to 6 previous errors diff --git a/src/test/ui/structs/struct-pattern-match-useless.stderr b/src/test/ui/structs/struct-pattern-match-useless.stderr index 561964bcb24..5b0c9305448 100644 --- a/src/test/ui/structs/struct-pattern-match-useless.stderr +++ b/src/test/ui/structs/struct-pattern-match-useless.stderr @@ -1,7 +1,7 @@ error: unreachable pattern --> $DIR/struct-pattern-match-useless.rs:12:9 | -LL | Foo { .. } => () //~ ERROR unreachable pattern +LL | Foo { .. } => () | ^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/structs/struct-variant-privacy-xc.stderr b/src/test/ui/structs/struct-variant-privacy-xc.stderr index da61fc83c26..39241b6b3fc 100644 --- a/src/test/ui/structs/struct-variant-privacy-xc.stderr +++ b/src/test/ui/structs/struct-variant-privacy-xc.stderr @@ -1,13 +1,13 @@ error[E0603]: enum `Bar` is private --> $DIR/struct-variant-privacy-xc.rs:4:33 | -LL | fn f(b: struct_variant_privacy::Bar) { //~ ERROR enum `Bar` is private +LL | fn f(b: struct_variant_privacy::Bar) { | ^^^ error[E0603]: enum `Bar` is private --> $DIR/struct-variant-privacy-xc.rs:6:33 | -LL | struct_variant_privacy::Bar::Baz { a: _a } => {} //~ ERROR enum `Bar` is private +LL | struct_variant_privacy::Bar::Baz { a: _a } => {} | ^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/structs/struct-variant-privacy.stderr b/src/test/ui/structs/struct-variant-privacy.stderr index 0895b52998c..127a6501044 100644 --- a/src/test/ui/structs/struct-variant-privacy.stderr +++ b/src/test/ui/structs/struct-variant-privacy.stderr @@ -1,13 +1,13 @@ error[E0603]: enum `Bar` is private --> $DIR/struct-variant-privacy.rs:7:14 | -LL | fn f(b: foo::Bar) { //~ ERROR enum `Bar` is private +LL | fn f(b: foo::Bar) { | ^^^ error[E0603]: enum `Bar` is private --> $DIR/struct-variant-privacy.rs:9:14 | -LL | foo::Bar::Baz { a: _a } => {} //~ ERROR enum `Bar` is private +LL | foo::Bar::Baz { a: _a } => {} | ^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/structs/structure-constructor-type-mismatch.stderr b/src/test/ui/structs/structure-constructor-type-mismatch.stderr index cc62316bec1..375678b7cee 100644 --- a/src/test/ui/structs/structure-constructor-type-mismatch.stderr +++ b/src/test/ui/structs/structure-constructor-type-mismatch.stderr @@ -73,13 +73,13 @@ LL | x: 7, error[E0107]: wrong number of type arguments: expected 0, found 1 --> $DIR/structure-constructor-type-mismatch.rs:48:24 | -LL | let pt3 = PointF:: { //~ ERROR wrong number of type arguments +LL | let pt3 = PointF:: { | ^^^ unexpected type argument error[E0308]: mismatched types --> $DIR/structure-constructor-type-mismatch.rs:49:12 | -LL | x: 9, //~ ERROR mismatched types +LL | x: 9, | ^ | | | expected f32, found integer @@ -91,7 +91,7 @@ LL | x: 9, //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/structure-constructor-type-mismatch.rs:50:12 | -LL | y: 10, //~ ERROR mismatched types +LL | y: 10, | ^^ | | | expected f32, found integer @@ -103,7 +103,7 @@ LL | y: 10, //~ ERROR mismatched types error[E0107]: wrong number of type arguments: expected 0, found 1 --> $DIR/structure-constructor-type-mismatch.rs:54:18 | -LL | PointF:: { .. } => {} //~ ERROR wrong number of type arguments +LL | PointF:: { .. } => {} | ^^^ unexpected type argument error[E0308]: mismatched types @@ -111,7 +111,7 @@ error[E0308]: mismatched types | LL | match (Point { x: 1, y: 2 }) { | ---------------------- this match expression has type `Point<{integer}>` -LL | PointF:: { .. } => {} //~ ERROR wrong number of type arguments +LL | PointF:: { .. } => {} | ^^^^^^^^^^^^^^^^^^^^ expected integer, found f32 | = note: expected type `Point<{integer}>` @@ -122,7 +122,7 @@ error[E0308]: mismatched types | LL | match (Point { x: 1, y: 2 }) { | ---------------------- this match expression has type `Point<{integer}>` -LL | PointF { .. } => {} //~ ERROR mismatched types +LL | PointF { .. } => {} | ^^^^^^^^^^^^^ expected integer, found f32 | = note: expected type `Point<{integer}>` @@ -133,7 +133,7 @@ error[E0308]: mismatched types | LL | match (Pair { x: 1, y: 2 }) { | --------------------- this match expression has type `Pair<{integer}, {integer}>` -LL | PairF:: { .. } => {} //~ ERROR mismatched types +LL | PairF:: { .. } => {} | ^^^^^^^^^^^^^^^^^^^ expected integer, found f32 | = note: expected type `Pair<{integer}, {integer}>` diff --git a/src/test/ui/suffixed-literal-meta.stderr b/src/test/ui/suffixed-literal-meta.stderr index 265aa78d53f..495404af3e8 100644 --- a/src/test/ui/suffixed-literal-meta.stderr +++ b/src/test/ui/suffixed-literal-meta.stderr @@ -1,7 +1,7 @@ error: suffixed literals are not allowed in attributes --> $DIR/suffixed-literal-meta.rs:3:13 | -LL | #[my_attr = 1usize] //~ ERROR: suffixed literals are not allowed in attributes +LL | #[my_attr = 1usize] | ^^^^^^ | = help: instead of using a suffixed literal (1u8, 1.0f32, etc.), use an unsuffixed version (1, 1.0, etc.). @@ -9,7 +9,7 @@ LL | #[my_attr = 1usize] //~ ERROR: suffixed literals are not allowed in attribu error: suffixed literals are not allowed in attributes --> $DIR/suffixed-literal-meta.rs:4:13 | -LL | #[my_attr = 1u8] //~ ERROR: suffixed literals are not allowed in attributes +LL | #[my_attr = 1u8] | ^^^ | = help: instead of using a suffixed literal (1u8, 1.0f32, etc.), use an unsuffixed version (1, 1.0, etc.). @@ -17,7 +17,7 @@ LL | #[my_attr = 1u8] //~ ERROR: suffixed literals are not allowed in attributes error: suffixed literals are not allowed in attributes --> $DIR/suffixed-literal-meta.rs:5:13 | -LL | #[my_attr = 1u16] //~ ERROR: suffixed literals are not allowed in attributes +LL | #[my_attr = 1u16] | ^^^^ | = help: instead of using a suffixed literal (1u8, 1.0f32, etc.), use an unsuffixed version (1, 1.0, etc.). @@ -25,7 +25,7 @@ LL | #[my_attr = 1u16] //~ ERROR: suffixed literals are not allowed in attribute error: suffixed literals are not allowed in attributes --> $DIR/suffixed-literal-meta.rs:6:13 | -LL | #[my_attr = 1u32] //~ ERROR: suffixed literals are not allowed in attributes +LL | #[my_attr = 1u32] | ^^^^ | = help: instead of using a suffixed literal (1u8, 1.0f32, etc.), use an unsuffixed version (1, 1.0, etc.). @@ -33,7 +33,7 @@ LL | #[my_attr = 1u32] //~ ERROR: suffixed literals are not allowed in attribute error: suffixed literals are not allowed in attributes --> $DIR/suffixed-literal-meta.rs:7:13 | -LL | #[my_attr = 1u64] //~ ERROR: suffixed literals are not allowed in attributes +LL | #[my_attr = 1u64] | ^^^^ | = help: instead of using a suffixed literal (1u8, 1.0f32, etc.), use an unsuffixed version (1, 1.0, etc.). @@ -41,7 +41,7 @@ LL | #[my_attr = 1u64] //~ ERROR: suffixed literals are not allowed in attribute error: suffixed literals are not allowed in attributes --> $DIR/suffixed-literal-meta.rs:8:13 | -LL | #[my_attr = 1isize] //~ ERROR: suffixed literals are not allowed in attributes +LL | #[my_attr = 1isize] | ^^^^^^ | = help: instead of using a suffixed literal (1u8, 1.0f32, etc.), use an unsuffixed version (1, 1.0, etc.). @@ -49,7 +49,7 @@ LL | #[my_attr = 1isize] //~ ERROR: suffixed literals are not allowed in attribu error: suffixed literals are not allowed in attributes --> $DIR/suffixed-literal-meta.rs:9:13 | -LL | #[my_attr = 1i8] //~ ERROR: suffixed literals are not allowed in attributes +LL | #[my_attr = 1i8] | ^^^ | = help: instead of using a suffixed literal (1u8, 1.0f32, etc.), use an unsuffixed version (1, 1.0, etc.). @@ -57,7 +57,7 @@ LL | #[my_attr = 1i8] //~ ERROR: suffixed literals are not allowed in attributes error: suffixed literals are not allowed in attributes --> $DIR/suffixed-literal-meta.rs:10:13 | -LL | #[my_attr = 1i16] //~ ERROR: suffixed literals are not allowed in attributes +LL | #[my_attr = 1i16] | ^^^^ | = help: instead of using a suffixed literal (1u8, 1.0f32, etc.), use an unsuffixed version (1, 1.0, etc.). @@ -65,7 +65,7 @@ LL | #[my_attr = 1i16] //~ ERROR: suffixed literals are not allowed in attribute error: suffixed literals are not allowed in attributes --> $DIR/suffixed-literal-meta.rs:11:13 | -LL | #[my_attr = 1i32] //~ ERROR: suffixed literals are not allowed in attributes +LL | #[my_attr = 1i32] | ^^^^ | = help: instead of using a suffixed literal (1u8, 1.0f32, etc.), use an unsuffixed version (1, 1.0, etc.). @@ -73,7 +73,7 @@ LL | #[my_attr = 1i32] //~ ERROR: suffixed literals are not allowed in attribute error: suffixed literals are not allowed in attributes --> $DIR/suffixed-literal-meta.rs:12:13 | -LL | #[my_attr = 1i64] //~ ERROR: suffixed literals are not allowed in attributes +LL | #[my_attr = 1i64] | ^^^^ | = help: instead of using a suffixed literal (1u8, 1.0f32, etc.), use an unsuffixed version (1, 1.0, etc.). @@ -81,7 +81,7 @@ LL | #[my_attr = 1i64] //~ ERROR: suffixed literals are not allowed in attribute error: suffixed literals are not allowed in attributes --> $DIR/suffixed-literal-meta.rs:13:13 | -LL | #[my_attr = 1.0f32] //~ ERROR: suffixed literals are not allowed in attributes +LL | #[my_attr = 1.0f32] | ^^^^^^ | = help: instead of using a suffixed literal (1u8, 1.0f32, etc.), use an unsuffixed version (1, 1.0, etc.). @@ -89,7 +89,7 @@ LL | #[my_attr = 1.0f32] //~ ERROR: suffixed literals are not allowed in attribu error: suffixed literals are not allowed in attributes --> $DIR/suffixed-literal-meta.rs:14:13 | -LL | #[my_attr = 1.0f64] //~ ERROR: suffixed literals are not allowed in attributes +LL | #[my_attr = 1.0f64] | ^^^^^^ | = help: instead of using a suffixed literal (1u8, 1.0f32, etc.), use an unsuffixed version (1, 1.0, etc.). diff --git a/src/test/ui/suggestions/attribute-typos.stderr b/src/test/ui/suggestions/attribute-typos.stderr index e40da787e96..077c955431a 100644 --- a/src/test/ui/suggestions/attribute-typos.stderr +++ b/src/test/ui/suggestions/attribute-typos.stderr @@ -1,7 +1,7 @@ error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics (see issue #29642) --> $DIR/attribute-typos.rs:11:3 | -LL | #[rustc_err] //~ ERROR E0658 +LL | #[rustc_err] | ^^^^^^^^^ | = help: add #![feature(rustc_attrs)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | #[rustc_err] //~ ERROR E0658 error[E0658]: The attribute `tests` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/attribute-typos.rs:6:3 | -LL | #[tests] //~ ERROR E0658 +LL | #[tests] | ^^^^^ help: a built-in attribute with a similar name exists: `test` | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | #[tests] //~ ERROR E0658 error[E0658]: The attribute `deprcated` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/attribute-typos.rs:1:3 | -LL | #[deprcated] //~ ERROR E0658 +LL | #[deprcated] | ^^^^^^^^^ help: a built-in attribute with a similar name exists: `deprecated` | = help: add #![feature(custom_attribute)] to the crate attributes to enable diff --git a/src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr b/src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr index 4b51294f86a..b1aaab6a754 100644 --- a/src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr +++ b/src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr @@ -51,7 +51,7 @@ error[E0507]: cannot move out of borrowed content | LL | match &(e.clone(), e.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &(Either::One(_t), Either::Two(_u)) => (), | -- -- ...and here | | @@ -82,7 +82,7 @@ error[E0507]: cannot move out of borrowed content | LL | match &(e.clone(), e.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &(Either::One(_t), Either::Two(_u)) | ----------------------------------- | | | | @@ -101,7 +101,7 @@ error[E0507]: cannot move out of borrowed content | LL | match &(e.clone(), e.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &(Either::One(_t), Either::Two(_u)) => (), | ----------------------------------- | | | | @@ -120,7 +120,7 @@ error[E0507]: cannot move out of borrowed content | LL | match &(e.clone(), e.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &(Either::One(_t), Either::Two(_u)) => (), | ----------------------------------- | | | | @@ -187,7 +187,7 @@ error[E0507]: cannot move out of borrowed content | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | -- -- ...and here | | @@ -218,7 +218,7 @@ error[E0507]: cannot move out of borrowed content | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &mut (Either::One(_t), Either::Two(_u)) | --------------------------------------- | | | | @@ -237,7 +237,7 @@ error[E0507]: cannot move out of borrowed content | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | --------------------------------------- | | | | @@ -256,7 +256,7 @@ error[E0507]: cannot move out of borrowed content | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | --------------------------------------- | | | | @@ -275,7 +275,7 @@ error[E0507]: cannot move out of borrowed content | LL | match &mut (em.clone(), em.clone()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &mut (Either::One(_t), Either::Two(_u)) => (), | --------------------------------------- | | | | diff --git a/src/test/ui/suggestions/dont-suggest-ref/simple.stderr b/src/test/ui/suggestions/dont-suggest-ref/simple.stderr index 296fcef0c4a..6a8b17ca870 100644 --- a/src/test/ui/suggestions/dont-suggest-ref/simple.stderr +++ b/src/test/ui/suggestions/dont-suggest-ref/simple.stderr @@ -420,7 +420,7 @@ error[E0507]: cannot move out of borrowed content | LL | match r { | ^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &Either::One(_t) | ---------------- | | | @@ -438,7 +438,7 @@ error[E0507]: cannot move out of borrowed content | LL | match r { | ^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &Either::One(_t) => (), | ---------------- | | | @@ -456,7 +456,7 @@ error[E0507]: cannot move out of borrowed content | LL | match r { | ^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &Either::One(_t) => (), | ---------------- | | | @@ -519,7 +519,7 @@ error[E0507]: cannot move out of borrowed content | LL | match rm { | ^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &mut Either::One(_t) => (), | -- data moved here ... @@ -548,7 +548,7 @@ error[E0507]: cannot move out of borrowed content | LL | match rm { | ^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &mut Either::One(_t) => (), | -------------------- | | | @@ -566,7 +566,7 @@ error[E0507]: cannot move out of borrowed content | LL | match rm { | ^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &mut Either::One(_t) => (), | -------------------- | | | @@ -584,7 +584,7 @@ error[E0507]: cannot move out of borrowed content | LL | match rm { | ^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &mut Either::One(_t) => (), | -------------------- | | | @@ -644,7 +644,7 @@ error[E0507]: cannot move out of borrowed content | LL | match (&e.clone(),) { | ^^^^^^^^^^^^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | (&Either::One(_t),) | -- data moved here | @@ -701,7 +701,7 @@ error[E0507]: cannot move out of borrowed content | LL | match (&mut em.clone(),) { | ^^^^^^^^^^^^^^^^^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | (&mut Either::One(_t),) => (), | -- data moved here LL | (&mut Either::Two(_t),) => (), @@ -765,7 +765,7 @@ error[E0507]: cannot move out of borrowed content | LL | match &e { | ^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &Either::One(_t) | ---------------- | | | @@ -783,7 +783,7 @@ error[E0507]: cannot move out of borrowed content | LL | match &e { | ^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &Either::One(_t) => (), | ---------------- | | | @@ -801,7 +801,7 @@ error[E0507]: cannot move out of borrowed content | LL | match &e { | ^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &Either::One(_t) => (), | ---------------- | | | @@ -864,7 +864,7 @@ error[E0507]: cannot move out of borrowed content | LL | match &mut em { | ^^^^^^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &mut Either::One(_t) | -------------------- | | | @@ -882,7 +882,7 @@ error[E0507]: cannot move out of borrowed content | LL | match &mut em { | ^^^^^^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &mut Either::One(_t) => (), | -------------------- | | | @@ -900,7 +900,7 @@ error[E0507]: cannot move out of borrowed content | LL | match &mut em { | ^^^^^^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &mut Either::One(_t) => (), | -------------------- | | | @@ -918,7 +918,7 @@ error[E0507]: cannot move out of borrowed content | LL | match &mut em { | ^^^^^^^ cannot move out of borrowed content -LL | //~^ ERROR cannot move +LL | LL | &mut Either::One(_t) => (), | -------------------- | | | diff --git a/src/test/ui/suggestions/impl-trait-return-trailing-semicolon.stderr b/src/test/ui/suggestions/impl-trait-return-trailing-semicolon.stderr index f26fb141ccf..cc3a2b9419c 100644 --- a/src/test/ui/suggestions/impl-trait-return-trailing-semicolon.stderr +++ b/src/test/ui/suggestions/impl-trait-return-trailing-semicolon.stderr @@ -3,7 +3,7 @@ error[E0277]: the trait bound `(): Bar` is not satisfied | LL | fn foo() -> impl Bar { | ^^^^^^^^ the trait `Bar` is not implemented for `()` -LL | 5; //~^ ERROR the trait bound `(): Bar` is not satisfied +LL | 5; | - consider removing this semicolon | = note: the return type of a function must have a statically known size diff --git a/src/test/ui/suggestions/issue-51055-missing-semicolon-between-call-and-tuple.stderr b/src/test/ui/suggestions/issue-51055-missing-semicolon-between-call-and-tuple.stderr index 40ddb5ec53c..f81c45e2f8d 100644 --- a/src/test/ui/suggestions/issue-51055-missing-semicolon-between-call-and-tuple.stderr +++ b/src/test/ui/suggestions/issue-51055-missing-semicolon-between-call-and-tuple.stderr @@ -4,7 +4,7 @@ error[E0618]: expected function, found `bool` LL | fn vindictive() -> bool { true } | -------------------------------- `vindictive` defined here returns `bool` ... -LL | vindictive() //~ ERROR expected function, found `bool` +LL | vindictive() | -^^^^^^^^^^^- help: try adding a semicolon: `;` | _____| | | diff --git a/src/test/ui/suggestions/suggest-labels.stderr b/src/test/ui/suggestions/suggest-labels.stderr index 88a0f969887..ead8f94209b 100644 --- a/src/test/ui/suggestions/suggest-labels.stderr +++ b/src/test/ui/suggestions/suggest-labels.stderr @@ -1,19 +1,19 @@ error[E0426]: use of undeclared label `'fo` --> $DIR/suggest-labels.rs:4:15 | -LL | break 'fo; //~ ERROR use of undeclared label +LL | break 'fo; | ^^^ did you mean `'foo`? error[E0426]: use of undeclared label `'bor` --> $DIR/suggest-labels.rs:8:18 | -LL | continue 'bor; //~ ERROR use of undeclared label +LL | continue 'bor; | ^^^^ did you mean `'bar`? error[E0426]: use of undeclared label `'longlable` --> $DIR/suggest-labels.rs:13:19 | -LL | break 'longlable; //~ ERROR use of undeclared label +LL | break 'longlable; | ^^^^^^^^^^ did you mean `'longlabel1`? error: aborting due to 3 previous errors diff --git a/src/test/ui/suggestions/suggest-methods.stderr b/src/test/ui/suggestions/suggest-methods.stderr index b7727cf03a4..09d58575d97 100644 --- a/src/test/ui/suggestions/suggest-methods.stderr +++ b/src/test/ui/suggestions/suggest-methods.stderr @@ -4,25 +4,25 @@ error[E0599]: no method named `bat` found for type `Foo` in the current scope LL | struct Foo; | ----------- method `bat` not found for this ... -LL | f.bat(1.0); //~ ERROR no method named +LL | f.bat(1.0); | ^^^ help: did you mean: `bar` error[E0599]: no method named `is_emtpy` found for type `std::string::String` in the current scope --> $DIR/suggest-methods.rs:21:15 | -LL | let _ = s.is_emtpy(); //~ ERROR no method named +LL | let _ = s.is_emtpy(); | ^^^^^^^^ help: did you mean: `is_empty` error[E0599]: no method named `count_eos` found for type `u32` in the current scope --> $DIR/suggest-methods.rs:25:19 | -LL | let _ = 63u32.count_eos(); //~ ERROR no method named +LL | let _ = 63u32.count_eos(); | ^^^^^^^^^ help: did you mean: `count_zeros` error[E0599]: no method named `count_o` found for type `u32` in the current scope --> $DIR/suggest-methods.rs:28:19 | -LL | let _ = 63u32.count_o(); //~ ERROR no method named +LL | let _ = 63u32.count_o(); | ^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/suggest-move-lifetimes.stderr b/src/test/ui/suggestions/suggest-move-lifetimes.stderr index 2d6dee06216..657914d1c8c 100644 --- a/src/test/ui/suggestions/suggest-move-lifetimes.stderr +++ b/src/test/ui/suggestions/suggest-move-lifetimes.stderr @@ -1,25 +1,25 @@ error: lifetime parameters must be declared prior to type parameters --> $DIR/suggest-move-lifetimes.rs:1:13 | -LL | struct A { //~ ERROR lifetime parameters must be declared +LL | struct A { | ----^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, T>` error: lifetime parameters must be declared prior to type parameters --> $DIR/suggest-move-lifetimes.rs:5:13 | -LL | struct B { //~ ERROR lifetime parameters must be declared +LL | struct B { | ----^^---- help: reorder the parameters: lifetimes, then types, then consts: `<'a, T, U>` error: lifetime parameters must be declared prior to type parameters --> $DIR/suggest-move-lifetimes.rs:10:16 | -LL | struct C { //~ ERROR lifetime parameters must be declared +LL | struct C { | -------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, T, U>` error: lifetime parameters must be declared prior to type parameters --> $DIR/suggest-move-lifetimes.rs:15:16 | -LL | struct D { //~ ERROR lifetime parameters must be declared +LL | struct D { | -------^^--^^-----^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, 'c, T, U, V>` error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/suggest-move-types.stderr b/src/test/ui/suggestions/suggest-move-types.stderr index 0901b71911d..552fb78cd3f 100644 --- a/src/test/ui/suggestions/suggest-move-types.stderr +++ b/src/test/ui/suggestions/suggest-move-types.stderr @@ -1,7 +1,7 @@ error: associated type bindings must be declared after generic parameters --> $DIR/suggest-move-types.rs:28:20 | -LL | struct A> { //~ ERROR associated type bindings must be declared after generic parameters +LL | struct A> { | ----^^^ | | | this associated type binding should be moved after the generic parameters @@ -17,7 +17,7 @@ LL | struct Al<'a, T, M: OneWithLifetime> { error: associated type bindings must be declared after generic parameters --> $DIR/suggest-move-types.rs:41:28 | -LL | struct B> { //~ ERROR associated type bindings must be declared after generic parameters +LL | struct B> { | ----^^----^^----^^^^^^^^^ | | | | | | | this associated type binding should be moved after the generic parameters @@ -37,7 +37,7 @@ LL | struct Bl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime $DIR/suggest-move-types.rs:57:28 | -LL | struct C> { //~ ERROR associated type bindings must be declared after generic parameters +LL | struct C> { | ^^^----^^----^^----^^^^^^ | | | | | | | this associated type binding should be moved after the generic parameters @@ -57,7 +57,7 @@ LL | struct Cl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime $DIR/suggest-move-types.rs:73:28 | -LL | struct D> { //~ ERROR associated type bindings must be declared after generic parameters +LL | struct D> { | ^^^----^^----^^^^^----^^^ | | | | | | | this associated type binding should be moved after the generic parameters diff --git a/src/test/ui/suggestions/suggest-variants.stderr b/src/test/ui/suggestions/suggest-variants.stderr index 36abda2a89b..08ae68ea713 100644 --- a/src/test/ui/suggestions/suggest-variants.stderr +++ b/src/test/ui/suggestions/suggest-variants.stderr @@ -1,19 +1,19 @@ error: no variant `Squareee` on enum `Shape` --> $DIR/suggest-variants.rs:12:34 | -LL | println!("My shape is {:?}", Shape::Squareee { size: 5}); //~ ERROR no variant `Squareee` +LL | println!("My shape is {:?}", Shape::Squareee { size: 5}); | ^^^^^^^^^^^^^^^ help: did you mean: `Shape::Square` error: no variant `Circl` on enum `Shape` --> $DIR/suggest-variants.rs:13:34 | -LL | println!("My shape is {:?}", Shape::Circl { size: 5}); //~ ERROR no variant `Circl` +LL | println!("My shape is {:?}", Shape::Circl { size: 5}); | ^^^^^^^^^^^^ help: did you mean: `Shape::Circle` error: no variant `Rombus` on enum `Shape` --> $DIR/suggest-variants.rs:14:34 | -LL | println!("My shape is {:?}", Shape::Rombus{ size: 5}); //~ ERROR no variant `Rombus` +LL | println!("My shape is {:?}", Shape::Rombus{ size: 5}); | ^^^^^^^^^^^^^ unknown variant error: aborting due to 3 previous errors diff --git a/src/test/ui/super-at-top-level.stderr b/src/test/ui/super-at-top-level.stderr index ce7a3933976..d04ce384fe8 100644 --- a/src/test/ui/super-at-top-level.stderr +++ b/src/test/ui/super-at-top-level.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve: there are too many initial `super`s. --> $DIR/super-at-top-level.rs:1:5 | -LL | use super::f; //~ ERROR there are too many initial `super`s +LL | use super::f; | ^^^^^ there are too many initial `super`s. error: aborting due to previous error diff --git a/src/test/ui/svh/svh-change-lit.stderr b/src/test/ui/svh/svh-change-lit.stderr index ebb39224caa..1b1501331b7 100644 --- a/src/test/ui/svh/svh-change-lit.stderr +++ b/src/test/ui/svh/svh-change-lit.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/svh-change-lit.rs:10:1 | -LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/svh/svh-change-significant-cfg.stderr b/src/test/ui/svh/svh-change-significant-cfg.stderr index d7196fc21f8..2357a4387d4 100644 --- a/src/test/ui/svh/svh-change-significant-cfg.stderr +++ b/src/test/ui/svh/svh-change-significant-cfg.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/svh-change-significant-cfg.rs:10:1 | -LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/svh/svh-change-trait-bound.stderr b/src/test/ui/svh/svh-change-trait-bound.stderr index 38678d7ec2c..9fe949b2e7d 100644 --- a/src/test/ui/svh/svh-change-trait-bound.stderr +++ b/src/test/ui/svh/svh-change-trait-bound.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/svh-change-trait-bound.rs:10:1 | -LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/svh/svh-change-type-arg.stderr b/src/test/ui/svh/svh-change-type-arg.stderr index 037d7867b0d..a8b35d29c99 100644 --- a/src/test/ui/svh/svh-change-type-arg.stderr +++ b/src/test/ui/svh/svh-change-type-arg.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/svh-change-type-arg.rs:10:1 | -LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/svh/svh-change-type-ret.stderr b/src/test/ui/svh/svh-change-type-ret.stderr index 184ac9e0e7c..ebe44a7bee5 100644 --- a/src/test/ui/svh/svh-change-type-ret.stderr +++ b/src/test/ui/svh/svh-change-type-ret.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/svh-change-type-ret.rs:10:1 | -LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/svh/svh-change-type-static.stderr b/src/test/ui/svh/svh-change-type-static.stderr index d3aeb073cd7..da09c3230a1 100644 --- a/src/test/ui/svh/svh-change-type-static.stderr +++ b/src/test/ui/svh/svh-change-type-static.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on --> $DIR/svh-change-type-static.rs:10:1 | -LL | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on +LL | extern crate b; | ^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/svh/svh-use-trait.stderr b/src/test/ui/svh/svh-use-trait.stderr index 0af44502375..4676143a06e 100644 --- a/src/test/ui/svh/svh-use-trait.stderr +++ b/src/test/ui/svh/svh-use-trait.stderr @@ -1,7 +1,7 @@ error[E0460]: found possibly newer version of crate `uta` which `utb` depends on --> $DIR/svh-use-trait.rs:15:1 | -LL | extern crate utb; //~ ERROR: found possibly newer version of crate `uta` which `utb` depends +LL | extern crate utb; | ^^^^^^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? diff --git a/src/test/ui/switched-expectations.stderr b/src/test/ui/switched-expectations.stderr index bbb9b51650e..043d130051d 100644 --- a/src/test/ui/switched-expectations.stderr +++ b/src/test/ui/switched-expectations.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/switched-expectations.rs:3:30 | -LL | let ref string: String = var; //~ ERROR mismatched types [E0308] +LL | let ref string: String = var; | ^^^ expected struct `std::string::String`, found i32 | = note: expected type `std::string::String` diff --git a/src/test/ui/symbol-names/basic.stderr b/src/test/ui/symbol-names/basic.stderr index ca789df9bd1..e23a326d5f8 100644 --- a/src/test/ui/symbol-names/basic.stderr +++ b/src/test/ui/symbol-names/basic.stderr @@ -1,13 +1,13 @@ error: symbol-name(_ZN5basic4main17h08bcaf310214ed52E) --> $DIR/basic.rs:3:1 | -LL | #[rustc_symbol_name] //~ ERROR _ZN5basic4main +LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: item-path(main) --> $DIR/basic.rs:4:1 | -LL | #[rustc_item_path] //~ ERROR item-path(main) +LL | #[rustc_item_path] | ^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/symbol-names/impl1.stderr b/src/test/ui/symbol-names/impl1.stderr index 75d3e40e1b2..e4fefeb601f 100644 --- a/src/test/ui/symbol-names/impl1.stderr +++ b/src/test/ui/symbol-names/impl1.stderr @@ -1,25 +1,25 @@ error: symbol-name(_ZN5impl13foo3Foo3bar17hc487d6ec13fe9124E) --> $DIR/impl1.rs:8:9 | -LL | #[rustc_symbol_name] //~ ERROR _ZN5impl13foo3Foo3bar +LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: item-path(foo::Foo::bar) --> $DIR/impl1.rs:9:9 | -LL | #[rustc_item_path] //~ ERROR item-path(foo::Foo::bar) +LL | #[rustc_item_path] | ^^^^^^^^^^^^^^^^^^ error: symbol-name(_ZN5impl13bar33_$LT$impl$u20$impl1..foo..Foo$GT$3baz17h38577281258e1527E) --> $DIR/impl1.rs:18:9 | -LL | #[rustc_symbol_name] //~ ERROR _ZN5impl13bar33_$LT$impl$u20$impl1..foo..Foo$GT$3baz +LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ error: item-path(bar::::baz) --> $DIR/impl1.rs:19:9 | -LL | #[rustc_item_path] //~ ERROR item-path(bar::::baz) +LL | #[rustc_item_path] | ^^^^^^^^^^^^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/synthetic-param.stderr b/src/test/ui/synthetic-param.stderr index 7bdab439572..b63a57a2018 100644 --- a/src/test/ui/synthetic-param.stderr +++ b/src/test/ui/synthetic-param.stderr @@ -1,19 +1,19 @@ error[E0632]: cannot provide explicit type parameters when `impl Trait` is used in argument position. --> $DIR/synthetic-param.rs:20:5 | -LL | func::(42); //~ ERROR cannot provide explicit type parameters +LL | func::(42); | ^^^^^^^^^^ error[E0632]: cannot provide explicit type parameters when `impl Trait` is used in argument position. --> $DIR/synthetic-param.rs:23:5 | -LL | Foo::func::(42); //~ ERROR cannot provide explicit type parameters +LL | Foo::func::(42); | ^^^^^^^^^^^^^^^ error[E0632]: cannot provide explicit type parameters when `impl Trait` is used in argument position. --> $DIR/synthetic-param.rs:26:5 | -LL | Bar::::func::(42); //~ ERROR cannot provide explicit type parameters +LL | Bar::::func::(42); | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/tag-type-args.stderr b/src/test/ui/tag-type-args.stderr index 40523ee907b..ac44dad4a88 100644 --- a/src/test/ui/tag-type-args.stderr +++ b/src/test/ui/tag-type-args.stderr @@ -1,7 +1,7 @@ error[E0107]: wrong number of type arguments: expected 1, found 0 --> $DIR/tag-type-args.rs:3:11 | -LL | fn foo(c: Quux) { assert!((false)); } //~ ERROR wrong number of type arguments +LL | fn foo(c: Quux) { assert!((false)); } | ^^^^ expected 1 type argument error: aborting due to previous error diff --git a/src/test/ui/tag-variant-cast-non-nullary.stderr b/src/test/ui/tag-variant-cast-non-nullary.stderr index 797a55f65fe..87ec20f20d7 100644 --- a/src/test/ui/tag-variant-cast-non-nullary.stderr +++ b/src/test/ui/tag-variant-cast-non-nullary.stderr @@ -1,7 +1,7 @@ error[E0605]: non-primitive cast: `NonNullary` as `isize` --> $DIR/tag-variant-cast-non-nullary.rs:8:15 | -LL | let val = v as isize; //~ ERROR non-primitive cast: `NonNullary` as `isize` [E0605] +LL | let val = v as isize; | ^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait diff --git a/src/test/ui/tag-variant-disr-dup.stderr b/src/test/ui/tag-variant-disr-dup.stderr index b3de25e87b3..ca12894c042 100644 --- a/src/test/ui/tag-variant-disr-dup.stderr +++ b/src/test/ui/tag-variant-disr-dup.stderr @@ -3,7 +3,7 @@ error[E0081]: discriminant value `0` already exists | LL | Black = 0x000000, | -------- first use of `0` -LL | White = 0x000000, //~ ERROR discriminant value `0` already exists +LL | White = 0x000000, | ^^^^^^^^ enum already has `0` error: aborting due to previous error diff --git a/src/test/ui/target-feature-wrong.stderr b/src/test/ui/target-feature-wrong.stderr index 236f5c4afec..3662ea976a4 100644 --- a/src/test/ui/target-feature-wrong.stderr +++ b/src/test/ui/target-feature-wrong.stderr @@ -33,7 +33,7 @@ error: attribute should be applied to a function | LL | #[target_feature(enable = "sse2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -LL | //~^ ERROR: should be applied to a function +LL | LL | mod another {} | -------------- not a function diff --git a/src/test/ui/terr-in-field.stderr b/src/test/ui/terr-in-field.stderr index 5a9c0898aad..91c3b3014a2 100644 --- a/src/test/ui/terr-in-field.stderr +++ b/src/test/ui/terr-in-field.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/terr-in-field.rs:13:14 | -LL | want_foo(b); //~ ERROR mismatched types +LL | want_foo(b); | ^ expected struct `Foo`, found struct `Bar` | = note: expected type `Foo` diff --git a/src/test/ui/terr-sorts.stderr b/src/test/ui/terr-sorts.stderr index dfaf8186fc3..05b9fb43fe1 100644 --- a/src/test/ui/terr-sorts.stderr +++ b/src/test/ui/terr-sorts.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/terr-sorts.rs:10:14 | -LL | want_foo(b); //~ ERROR mismatched types +LL | want_foo(b); | ^ expected struct `Foo`, found struct `std::boxed::Box` | = note: expected type `Foo` diff --git a/src/test/ui/test-attr-non-associated-functions.stderr b/src/test/ui/test-attr-non-associated-functions.stderr index 8a1cc6fa367..6176aa03d84 100644 --- a/src/test/ui/test-attr-non-associated-functions.stderr +++ b/src/test/ui/test-attr-non-associated-functions.stderr @@ -1,7 +1,7 @@ error: #[test] attribute is only allowed on non associated functions --> $DIR/test-attr-non-associated-functions.rs:9:5 | -LL | / fn new() -> A { //~ ERROR #[test] attribute is only allowed on non associated functions +LL | / fn new() -> A { LL | | A {} LL | | } | |_____^ diff --git a/src/test/ui/test-cfg.stderr b/src/test/ui/test-cfg.stderr index 93ca9a27de2..c35fe2f9458 100644 --- a/src/test/ui/test-cfg.stderr +++ b/src/test/ui/test-cfg.stderr @@ -1,7 +1,7 @@ error[E0425]: cannot find function `foo` in this scope --> $DIR/test-cfg.rs:7:5 | -LL | foo(); //~ ERROR cannot find function `foo` in this scope +LL | foo(); | ^^^ not found in this scope error: aborting due to previous error diff --git a/src/test/ui/test-warns-dead-code.stderr b/src/test/ui/test-warns-dead-code.stderr index fe74ad13340..62e99225dd9 100644 --- a/src/test/ui/test-warns-dead-code.stderr +++ b/src/test/ui/test-warns-dead-code.stderr @@ -1,7 +1,7 @@ error: function is never used: `dead` --> $DIR/test-warns-dead-code.rs:5:1 | -LL | fn dead() {} //~ error: function is never used: `dead` +LL | fn dead() {} | ^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/thread-local-mutation.stderr b/src/test/ui/thread-local-mutation.stderr index bf298523e1b..685e7c6585a 100644 --- a/src/test/ui/thread-local-mutation.stderr +++ b/src/test/ui/thread-local-mutation.stderr @@ -1,7 +1,7 @@ error[E0594]: cannot assign to immutable thread-local static item --> $DIR/thread-local-mutation.rs:11:5 | -LL | S = "after"; //~ ERROR cannot assign to immutable +LL | S = "after"; | ^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/tool-attributes/tool-attributes-misplaced-1.stderr b/src/test/ui/tool-attributes/tool-attributes-misplaced-1.stderr index dd1de22f3da..1e9d1609f02 100644 --- a/src/test/ui/tool-attributes/tool-attributes-misplaced-1.stderr +++ b/src/test/ui/tool-attributes/tool-attributes-misplaced-1.stderr @@ -1,37 +1,37 @@ error: cannot find derive macro `rustfmt` in this scope --> $DIR/tool-attributes-misplaced-1.rs:6:10 | -LL | #[derive(rustfmt)] //~ ERROR cannot find derive macro `rustfmt` in this scope +LL | #[derive(rustfmt)] | ^^^^^^^ error: cannot find macro `rustfmt!` in this scope --> $DIR/tool-attributes-misplaced-1.rs:15:5 | -LL | rustfmt!(); //~ ERROR cannot find macro `rustfmt!` in this scope +LL | rustfmt!(); | ^^^^^^^ error[E0573]: expected type, found tool module `rustfmt` --> $DIR/tool-attributes-misplaced-1.rs:3:10 | -LL | type A = rustfmt; //~ ERROR expected type, found tool module `rustfmt` +LL | type A = rustfmt; | ^^^^^^^ not a type error[E0573]: expected type, found tool attribute `rustfmt::skip` --> $DIR/tool-attributes-misplaced-1.rs:4:10 | -LL | type B = rustfmt::skip; //~ ERROR expected type, found tool attribute `rustfmt::skip` +LL | type B = rustfmt::skip; | ^^^^^^^^^^^^^ not a type error[E0423]: expected value, found tool module `rustfmt` --> $DIR/tool-attributes-misplaced-1.rs:14:5 | -LL | rustfmt; //~ ERROR expected value, found tool module `rustfmt` +LL | rustfmt; | ^^^^^^^ not a value error[E0423]: expected value, found tool attribute `rustfmt::skip` --> $DIR/tool-attributes-misplaced-1.rs:17:5 | -LL | rustfmt::skip; //~ ERROR expected value, found tool attribute `rustfmt::skip` +LL | rustfmt::skip; | ^^^^^^^^^^^^^ not a value error: aborting due to 6 previous errors diff --git a/src/test/ui/tool-attributes/tool-attributes-misplaced-2.stderr b/src/test/ui/tool-attributes/tool-attributes-misplaced-2.stderr index 50a7b597328..c5f5f59c32c 100644 --- a/src/test/ui/tool-attributes/tool-attributes-misplaced-2.stderr +++ b/src/test/ui/tool-attributes/tool-attributes-misplaced-2.stderr @@ -1,13 +1,13 @@ error: expected a macro, found tool attribute --> $DIR/tool-attributes-misplaced-2.rs:1:10 | -LL | #[derive(rustfmt::skip)] //~ ERROR expected a macro, found tool attribute +LL | #[derive(rustfmt::skip)] | ^^^^^^^^^^^^^ error: expected a macro, found tool attribute --> $DIR/tool-attributes-misplaced-2.rs:5:5 | -LL | rustfmt::skip!(); //~ ERROR expected a macro, found tool attribute +LL | rustfmt::skip!(); | ^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/tool-attributes/tool-attributes-shadowing.stderr b/src/test/ui/tool-attributes/tool-attributes-shadowing.stderr index 62b5b8e2ac2..98ad109a07e 100644 --- a/src/test/ui/tool-attributes/tool-attributes-shadowing.stderr +++ b/src/test/ui/tool-attributes/tool-attributes-shadowing.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve: could not find `skip` in `rustfmt` --> $DIR/tool-attributes-shadowing.rs:3:12 | -LL | #[rustfmt::skip] //~ ERROR failed to resolve: could not find `skip` in `rustfmt` +LL | #[rustfmt::skip] | ^^^^ could not find `skip` in `rustfmt` error: aborting due to previous error diff --git a/src/test/ui/tool_lints-fail.stderr b/src/test/ui/tool_lints-fail.stderr index 6b027eecf26..a61157f21b8 100644 --- a/src/test/ui/tool_lints-fail.stderr +++ b/src/test/ui/tool_lints-fail.stderr @@ -1,7 +1,7 @@ error: unknown lint: `clippy` --> $DIR/tool_lints-fail.rs:6:9 | -LL | #![deny(clippy)] //~ ERROR: unknown lint: `clippy` +LL | #![deny(clippy)] | ^^^^^^ | note: lint level defined here diff --git a/src/test/ui/trace_macros-format.stderr b/src/test/ui/trace_macros-format.stderr index a180c360b4a..650b8707698 100644 --- a/src/test/ui/trace_macros-format.stderr +++ b/src/test/ui/trace_macros-format.stderr @@ -1,37 +1,37 @@ error: trace_macros! accepts only `true` or `false` --> $DIR/trace_macros-format.rs:4:5 | -LL | trace_macros!(); //~ ERROR trace_macros! accepts only `true` or `false` +LL | trace_macros!(); | ^^^^^^^^^^^^^^^^ error: trace_macros! accepts only `true` or `false` --> $DIR/trace_macros-format.rs:5:5 | -LL | trace_macros!(1); //~ ERROR trace_macros! accepts only `true` or `false` +LL | trace_macros!(1); | ^^^^^^^^^^^^^^^^^ error: trace_macros! accepts only `true` or `false` --> $DIR/trace_macros-format.rs:6:5 | -LL | trace_macros!(ident); //~ ERROR trace_macros! accepts only `true` or `false` +LL | trace_macros!(ident); | ^^^^^^^^^^^^^^^^^^^^^ error: trace_macros! accepts only `true` or `false` --> $DIR/trace_macros-format.rs:7:5 | -LL | trace_macros!(for); //~ ERROR trace_macros! accepts only `true` or `false` +LL | trace_macros!(for); | ^^^^^^^^^^^^^^^^^^^ error: trace_macros! accepts only `true` or `false` --> $DIR/trace_macros-format.rs:8:5 | -LL | trace_macros!(true,); //~ ERROR trace_macros! accepts only `true` or `false` +LL | trace_macros!(true,); | ^^^^^^^^^^^^^^^^^^^^^ error: trace_macros! accepts only `true` or `false` --> $DIR/trace_macros-format.rs:9:5 | -LL | trace_macros!(false 1); //~ ERROR trace_macros! accepts only `true` or `false` +LL | trace_macros!(false 1); | ^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/trace_macros-gate.stderr b/src/test/ui/trace_macros-gate.stderr index 4831aa158db..4d2fd554a06 100644 --- a/src/test/ui/trace_macros-gate.stderr +++ b/src/test/ui/trace_macros-gate.stderr @@ -1,7 +1,7 @@ error[E0658]: `trace_macros` is not stable enough for use and is subject to change (see issue #29598) --> $DIR/trace_macros-gate.rs:4:5 | -LL | trace_macros!(); //~ ERROR `trace_macros` is not stable +LL | trace_macros!(); | ^^^^^^^^^^^^^^^^ | = help: add #![feature(trace_macros)] to the crate attributes to enable @@ -9,13 +9,13 @@ LL | trace_macros!(); //~ ERROR `trace_macros` is not stable error: trace_macros! accepts only `true` or `false` --> $DIR/trace_macros-gate.rs:4:5 | -LL | trace_macros!(); //~ ERROR `trace_macros` is not stable +LL | trace_macros!(); | ^^^^^^^^^^^^^^^^ error[E0658]: `trace_macros` is not stable enough for use and is subject to change (see issue #29598) --> $DIR/trace_macros-gate.rs:6:5 | -LL | trace_macros!(true); //~ ERROR `trace_macros` is not stable +LL | trace_macros!(true); | ^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(trace_macros)] to the crate attributes to enable @@ -23,7 +23,7 @@ LL | trace_macros!(true); //~ ERROR `trace_macros` is not stable error[E0658]: `trace_macros` is not stable enough for use and is subject to change (see issue #29598) --> $DIR/trace_macros-gate.rs:7:5 | -LL | trace_macros!(false); //~ ERROR `trace_macros` is not stable +LL | trace_macros!(false); | ^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(trace_macros)] to the crate attributes to enable @@ -31,7 +31,7 @@ LL | trace_macros!(false); //~ ERROR `trace_macros` is not stable error[E0658]: `trace_macros` is not stable enough for use and is subject to change (see issue #29598) --> $DIR/trace_macros-gate.rs:10:26 | -LL | ($x: ident) => { trace_macros!($x) } //~ ERROR `trace_macros` is not stable +LL | ($x: ident) => { trace_macros!($x) } | ^^^^^^^^^^^^^^^^^ ... LL | expando!(true); diff --git a/src/test/ui/trait-method-number-parameters.stderr b/src/test/ui/trait-method-number-parameters.stderr index 32101239e66..e47fe1a8026 100644 --- a/src/test/ui/trait-method-number-parameters.stderr +++ b/src/test/ui/trait-method-number-parameters.stderr @@ -4,7 +4,7 @@ error[E0050]: method `foo` has 2 parameters but the declaration in trait `Foo::f LL | fn foo(&mut self, x: i32, y: i32) -> i32; | ------------------------- trait requires 3 parameters ... -LL | / &mut self, //~ ERROR +LL | / &mut self, LL | | x: i32, | |______________^ expected 3 parameters, found 2 diff --git a/src/test/ui/traits/trait-alias-impl.stderr b/src/test/ui/traits/trait-alias-impl.stderr index 6a6cedb014a..301db4fb71c 100644 --- a/src/test/ui/traits/trait-alias-impl.stderr +++ b/src/test/ui/traits/trait-alias-impl.stderr @@ -1,7 +1,7 @@ error[E0404]: expected trait, found trait alias `DefaultAlias` --> $DIR/trait-alias-impl.rs:5:6 | -LL | impl DefaultAlias for () {} //~ ERROR expected trait, found trait alias +LL | impl DefaultAlias for () {} | ^^^^^^^^^^^^ not a trait error: aborting due to previous error diff --git a/src/test/ui/traits/trait-alias-object.stderr b/src/test/ui/traits/trait-alias-object.stderr index 604db6f7e18..c6b61eae4a1 100644 --- a/src/test/ui/traits/trait-alias-object.stderr +++ b/src/test/ui/traits/trait-alias-object.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `EqAlias` cannot be made into an object --> $DIR/trait-alias-object.rs:7:13 | -LL | let _: &dyn EqAlias = &123; //~ ERROR `EqAlias` cannot be made into an object +LL | let _: &dyn EqAlias = &123; | ^^^^^^^^^^^ the trait `EqAlias` cannot be made into an object | = note: the trait cannot use `Self` as a type parameter in the supertraits or where-clauses @@ -9,7 +9,7 @@ LL | let _: &dyn EqAlias = &123; //~ ERROR `EqAlias` cannot be made into an error[E0191]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) must be specified --> $DIR/trait-alias-object.rs:8:13 | -LL | let _: &dyn IteratorAlias = &vec![123].into_iter(); //~ ERROR must be specified +LL | let _: &dyn IteratorAlias = &vec![123].into_iter(); | ^^^^^^^^^^^^^^^^^ associated type `Item` must be specified error: aborting due to 2 previous errors diff --git a/src/test/ui/traits/trait-alias-syntax.stderr b/src/test/ui/traits/trait-alias-syntax.stderr index fc96f627439..f99cc45d8ae 100644 --- a/src/test/ui/traits/trait-alias-syntax.stderr +++ b/src/test/ui/traits/trait-alias-syntax.stderr @@ -1,13 +1,13 @@ error: trait aliases cannot be `auto` --> $DIR/trait-alias-syntax.rs:4:19 | -LL | auto trait A = Foo; //~ ERROR trait aliases cannot be `auto` +LL | auto trait A = Foo; | ^ trait aliases cannot be `auto` error: trait aliases cannot be `unsafe` --> $DIR/trait-alias-syntax.rs:5:21 | -LL | unsafe trait B = Foo; //~ ERROR trait aliases cannot be `unsafe` +LL | unsafe trait B = Foo; | ^ trait aliases cannot be `unsafe` error: aborting due to 2 previous errors diff --git a/src/test/ui/traits/trait-alias-wf.stderr b/src/test/ui/traits/trait-alias-wf.stderr index 1f64ce76dc6..ee2dd5b24af 100644 --- a/src/test/ui/traits/trait-alias-wf.stderr +++ b/src/test/ui/traits/trait-alias-wf.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `T: Foo` is not satisfied --> $DIR/trait-alias-wf.rs:5:1 | -LL | trait B = A; //~ ERROR `T: Foo` is not satisfied +LL | trait B = A; | ^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `T` | = help: consider adding a `where T: Foo` bound diff --git a/src/test/ui/traits/trait-bounds-not-on-struct.stderr b/src/test/ui/traits/trait-bounds-not-on-struct.stderr index 1595fff618f..a649a4eee55 100644 --- a/src/test/ui/traits/trait-bounds-not-on-struct.stderr +++ b/src/test/ui/traits/trait-bounds-not-on-struct.stderr @@ -1,13 +1,13 @@ error[E0404]: expected trait, found struct `Foo` --> $DIR/trait-bounds-not-on-struct.rs:5:16 | -LL | fn foo(_x: Box) { } //~ ERROR expected trait, found struct `Foo` +LL | fn foo(_x: Box) { } | ^^^ not a trait error[E0404]: expected trait, found struct `Vec` --> $DIR/trait-bounds-not-on-struct.rs:7:21 | -LL | type A = Box>; //~ ERROR expected trait, found struct `Vec` +LL | type A = Box>; | ^^^^^^ not a trait error: aborting due to 2 previous errors diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums.stderr b/src/test/ui/traits/trait-bounds-on-structs-and-enums.stderr index 5429029c1ec..9a4cc90f3a5 100644 --- a/src/test/ui/traits/trait-bounds-on-structs-and-enums.stderr +++ b/src/test/ui/traits/trait-bounds-on-structs-and-enums.stderr @@ -14,7 +14,7 @@ LL | struct Foo { error[E0277]: the trait bound `isize: Trait` is not satisfied --> $DIR/trait-bounds-on-structs-and-enums.rs:19:5 | -LL | a: Foo, //~ ERROR E0277 +LL | a: Foo, | ^^^^^^^^^^^^^ the trait `Trait` is not implemented for `isize` | note: required by `Foo` @@ -26,7 +26,7 @@ LL | struct Foo { error[E0277]: the trait bound `usize: Trait` is not satisfied --> $DIR/trait-bounds-on-structs-and-enums.rs:23:10 | -LL | Quux(Bar), //~ ERROR E0277 +LL | Quux(Bar), | ^^^^^^^^^^ the trait `Trait` is not implemented for `usize` | note: required by `Bar` @@ -38,7 +38,7 @@ LL | enum Bar { error[E0277]: the trait bound `U: Trait` is not satisfied --> $DIR/trait-bounds-on-structs-and-enums.rs:27:5 | -LL | b: Foo, //~ ERROR E0277 +LL | b: Foo, | ^^^^^^^^^ the trait `Trait` is not implemented for `U` | = help: consider adding a `where U: Trait` bound @@ -51,7 +51,7 @@ LL | struct Foo { error[E0277]: the trait bound `V: Trait` is not satisfied --> $DIR/trait-bounds-on-structs-and-enums.rs:31:21 | -LL | EvenMoreBadness(Bar), //~ ERROR E0277 +LL | EvenMoreBadness(Bar), | ^^^^^^ the trait `Trait` is not implemented for `V` | = help: consider adding a `where V: Trait` bound @@ -64,7 +64,7 @@ LL | enum Bar { error[E0277]: the trait bound `i32: Trait` is not satisfied --> $DIR/trait-bounds-on-structs-and-enums.rs:35:5 | -LL | Foo, //~ ERROR E0277 +LL | Foo, | ^^^^^^^^ the trait `Trait` is not implemented for `i32` | note: required by `Foo` @@ -76,7 +76,7 @@ LL | struct Foo { error[E0277]: the trait bound `u8: Trait` is not satisfied --> $DIR/trait-bounds-on-structs-and-enums.rs:39:22 | -LL | DictionaryLike { field: Bar }, //~ ERROR E0277 +LL | DictionaryLike { field: Bar }, | ^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `u8` | note: required by `Bar` diff --git a/src/test/ui/traits/trait-bounds-sugar.stderr b/src/test/ui/traits/trait-bounds-sugar.stderr index eb45a16afb1..2aa025cb7a6 100644 --- a/src/test/ui/traits/trait-bounds-sugar.stderr +++ b/src/test/ui/traits/trait-bounds-sugar.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/trait-bounds-sugar.rs:12:7 | -LL | a(x); //~ ERROR mismatched types +LL | a(x); | ^ expected trait `Foo + std::marker::Send`, found trait `Foo + std::marker::Sync` | = note: expected type `std::boxed::Box<(dyn Foo + std::marker::Send + 'static)>` diff --git a/src/test/ui/traits/trait-coercion-generic-regions.stderr b/src/test/ui/traits/trait-coercion-generic-regions.stderr index 23c2a72743e..2a9ca4f95f0 100644 --- a/src/test/ui/traits/trait-coercion-generic-regions.stderr +++ b/src/test/ui/traits/trait-coercion-generic-regions.stderr @@ -1,7 +1,7 @@ error[E0597]: `person` does not live long enough --> $DIR/trait-coercion-generic-regions.rs:17:25 | -LL | let person: &str = &person; //~ ERROR `person` does not live long enough +LL | let person: &str = &person; | ^^^^^^ borrowed value does not live long enough LL | let s: Box> = Box::new(Struct { person: person }); LL | } diff --git a/src/test/ui/traits/trait-duplicate-methods.stderr b/src/test/ui/traits/trait-duplicate-methods.stderr index bb6d0b6d7f1..7cba4cb63e6 100644 --- a/src/test/ui/traits/trait-duplicate-methods.stderr +++ b/src/test/ui/traits/trait-duplicate-methods.stderr @@ -3,7 +3,7 @@ error[E0428]: the name `orange` is defined multiple times | LL | fn orange(&self); | ----------------- previous definition of the value `orange` here -LL | fn orange(&self); //~ ERROR the name `orange` is defined multiple times +LL | fn orange(&self); | ^^^^^^^^^^^^^^^^^ `orange` redefined here | = note: `orange` must be defined only once in the value namespace of this trait diff --git a/src/test/ui/traits/trait-impl-1.stderr b/src/test/ui/traits/trait-impl-1.stderr index 8ee642974b7..71d5cc26bf1 100644 --- a/src/test/ui/traits/trait-impl-1.stderr +++ b/src/test/ui/traits/trait-impl-1.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `foo` found for type `&i32` in the current scope --> $DIR/trait-impl-1.rs:15:7 | -LL | x.foo(); //~ERROR: no method named `foo` found for type `&i32` in the current scope +LL | x.foo(); | ^^^ error: aborting due to previous error diff --git a/src/test/ui/traits/trait-impl-can-not-have-untraitful-items.stderr b/src/test/ui/traits/trait-impl-can-not-have-untraitful-items.stderr index 5a50a110863..84565bdaa13 100644 --- a/src/test/ui/traits/trait-impl-can-not-have-untraitful-items.stderr +++ b/src/test/ui/traits/trait-impl-can-not-have-untraitful-items.stderr @@ -1,19 +1,19 @@ error[E0438]: const `BAR` is not a member of trait `A` --> $DIR/trait-impl-can-not-have-untraitful-items.rs:4:5 | -LL | const BAR: () = (); //~ ERROR const `BAR` is not a member of trait `A` +LL | const BAR: () = (); | ^^^^^^^^^^^^^^^^^^^ not a member of trait `A` error[E0437]: type `Baz` is not a member of trait `A` --> $DIR/trait-impl-can-not-have-untraitful-items.rs:5:5 | -LL | type Baz = (); //~ ERROR type `Baz` is not a member of trait `A` +LL | type Baz = (); | ^^^^^^^^^^^^^^ not a member of trait `A` error[E0407]: method `foo` is not a member of trait `A` --> $DIR/trait-impl-can-not-have-untraitful-items.rs:6:5 | -LL | fn foo(&self) { } //~ ERROR method `foo` is not a member of trait `A` +LL | fn foo(&self) { } | ^^^^^^^^^^^^^^^^^ not a member of trait `A` error: aborting due to 3 previous errors diff --git a/src/test/ui/traits/trait-impl-for-module.stderr b/src/test/ui/traits/trait-impl-for-module.stderr index 99da4b7c87a..c62bcfca94d 100644 --- a/src/test/ui/traits/trait-impl-for-module.stderr +++ b/src/test/ui/traits/trait-impl-for-module.stderr @@ -1,7 +1,7 @@ error[E0573]: expected type, found module `a` --> $DIR/trait-impl-for-module.rs:7:12 | -LL | impl A for a { //~ ERROR expected type, found module +LL | impl A for a { | ^ help: a trait with a similar name exists: `A` error: aborting due to previous error diff --git a/src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.stderr b/src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.stderr index 95dc6364e13..4c63d609775 100644 --- a/src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.stderr +++ b/src/test/ui/traits/trait-impl-of-supertrait-has-wrong-lifetime-parameters.stderr @@ -1,18 +1,18 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'b` due to conflicting requirements --> $DIR/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:13 | -LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> { //~ ERROR cannot infer an appropriate lifetime +LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> { | ^^^^^^^^^^ | note: first, the lifetime cannot outlive the lifetime 'a as defined on the impl at 24:6... --> $DIR/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:6 | -LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> { //~ ERROR cannot infer an appropriate lifetime +LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> { | ^^ note: ...but the lifetime must also be valid for the lifetime 'b as defined on the impl at 24:9... --> $DIR/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:9 | -LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> { //~ ERROR cannot infer an appropriate lifetime +LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> { | ^^ = note: ...so that the types are compatible: expected T1<'a> diff --git a/src/test/ui/traits/trait-item-privacy.stderr b/src/test/ui/traits/trait-item-privacy.stderr index c65a9a3ed94..97e7ed0ebb0 100644 --- a/src/test/ui/traits/trait-item-privacy.stderr +++ b/src/test/ui/traits/trait-item-privacy.stderr @@ -4,7 +4,7 @@ error[E0599]: no method named `a` found for type `S` in the current scope LL | struct S; | --------- method `a` not found for this ... -LL | S.a(); //~ ERROR no method named `a` found for type `S` in the current scope +LL | S.a(); | ^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -17,7 +17,7 @@ error[E0599]: no method named `b` found for type `S` in the current scope LL | struct S; | --------- method `b` not found for this ... -LL | S.b(); //~ ERROR no method named `b` found for type `S` in the current scope +LL | S.b(); | ^ | = help: items from traits can only be used if the trait is in scope @@ -29,7 +29,7 @@ LL | use method::B; error[E0624]: method `a` is private --> $DIR/trait-item-privacy.rs:72:7 | -LL | c.a(); //~ ERROR method `a` is private +LL | c.a(); | ^ error[E0599]: no function or associated item named `a` found for type `S` in the current scope @@ -67,7 +67,7 @@ LL | use method::B; error[E0624]: method `a` is private --> $DIR/trait-item-privacy.rs:84:5 | -LL | C::a(&S); //~ ERROR method `a` is private +LL | C::a(&S); | ^^^^ error[E0599]: no associated item named `A` found for type `S` in the current scope @@ -76,7 +76,7 @@ error[E0599]: no associated item named `A` found for type `S` in the current sco LL | struct S; | --------- associated item `A` not found for this ... -LL | S::A; //~ ERROR no associated item named `A` found for type `S` in the current scope +LL | S::A; | ---^ | | | associated item not found in `S` @@ -91,7 +91,7 @@ error[E0599]: no associated item named `B` found for type `S` in the current sco LL | struct S; | --------- associated item `B` not found for this ... -LL | S::B; //~ ERROR no associated item named `B` found for type `S` in the current scope +LL | S::B; | ---^ | | | associated item not found in `S` @@ -105,13 +105,13 @@ LL | use assoc_const::B; error[E0624]: associated constant `A` is private --> $DIR/trait-item-privacy.rs:101:5 | -LL | C::A; //~ ERROR associated constant `A` is private +LL | C::A; | ^^^^ error[E0038]: the trait `assoc_const::C` cannot be made into an object --> $DIR/trait-item-privacy.rs:101:5 | -LL | C::A; //~ ERROR associated constant `A` is private +LL | C::A; | ^^^^ the trait `assoc_const::C` cannot be made into an object | = note: the trait cannot contain associated consts like `C` @@ -121,31 +121,31 @@ LL | C::A; //~ ERROR associated constant `A` is private error[E0223]: ambiguous associated type --> $DIR/trait-item-privacy.rs:115:12 | -LL | let _: S::A; //~ ERROR ambiguous associated type +LL | let _: S::A; | ^^^^ help: use fully-qualified syntax: `::A` error[E0223]: ambiguous associated type --> $DIR/trait-item-privacy.rs:116:12 | -LL | let _: S::B; //~ ERROR ambiguous associated type +LL | let _: S::B; | ^^^^ help: use fully-qualified syntax: `::B` error[E0223]: ambiguous associated type --> $DIR/trait-item-privacy.rs:117:12 | -LL | let _: S::C; //~ ERROR ambiguous associated type +LL | let _: S::C; | ^^^^ help: use fully-qualified syntax: `::C` error: associated type `A` is private --> $DIR/trait-item-privacy.rs:119:12 | -LL | let _: T::A; //~ ERROR associated type `A` is private +LL | let _: T::A; | ^^^^ error: associated type `A` is private --> $DIR/trait-item-privacy.rs:128:9 | -LL | A = u8, //~ ERROR associated type `A` is private +LL | A = u8, | ^^^^^^ error: aborting due to 15 previous errors diff --git a/src/test/ui/traits/trait-method-private.stderr b/src/test/ui/traits/trait-method-private.stderr index ed6aeeb9c89..c1dd9387ebc 100644 --- a/src/test/ui/traits/trait-method-private.stderr +++ b/src/test/ui/traits/trait-method-private.stderr @@ -1,7 +1,7 @@ error[E0624]: method `method` is private --> $DIR/trait-method-private.rs:19:9 | -LL | foo.method(); //~ ERROR is private +LL | foo.method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope diff --git a/src/test/ui/traits/trait-object-auto-dedup-in-impl.stderr b/src/test/ui/traits/trait-object-auto-dedup-in-impl.stderr index 2d2c3843548..2570db0212a 100644 --- a/src/test/ui/traits/trait-object-auto-dedup-in-impl.stderr +++ b/src/test/ui/traits/trait-object-auto-dedup-in-impl.stderr @@ -1,7 +1,7 @@ error[E0592]: duplicate definitions with name `test` --> $DIR/trait-object-auto-dedup-in-impl.rs:14:5 | -LL | fn test(&self) { println!("one"); } //~ ERROR duplicate definitions with name `test` +LL | fn test(&self) { println!("one"); } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definitions for `test` ... LL | fn test(&self) { println!("two"); } diff --git a/src/test/ui/traits/trait-object-macro-matcher.stderr b/src/test/ui/traits/trait-object-macro-matcher.stderr index 678f4fb5955..3a6bf3dcc8c 100644 --- a/src/test/ui/traits/trait-object-macro-matcher.stderr +++ b/src/test/ui/traits/trait-object-macro-matcher.stderr @@ -1,13 +1,13 @@ error[E0224]: at least one non-builtin trait is required for an object type --> $DIR/trait-object-macro-matcher.rs:10:8 | -LL | m!('static +); //~ ERROR at least one non-builtin trait is required for an object type +LL | m!('static +); | ^^^^^^^^^ error[E0038]: the trait `std::marker::Copy` cannot be made into an object --> $DIR/trait-object-macro-matcher.rs:8:8 | -LL | m!(Copy + Send + 'static); //~ ERROR the trait `std::marker::Copy` cannot be made into an object +LL | m!(Copy + Send + 'static); | ^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` cannot be made into an object | = note: the trait cannot require that `Self : Sized` diff --git a/src/test/ui/traits/trait-object-safety.stderr b/src/test/ui/traits/trait-object-safety.stderr index 0a0c5ff086b..a7fe83cb756 100644 --- a/src/test/ui/traits/trait-object-safety.stderr +++ b/src/test/ui/traits/trait-object-safety.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `Tr` cannot be made into an object --> $DIR/trait-object-safety.rs:15:18 | -LL | let _: &Tr = &St; //~ ERROR E0038 +LL | let _: &Tr = &St; | ^^^ the trait `Tr` cannot be made into an object | = note: method `foo` has no receiver @@ -10,7 +10,7 @@ LL | let _: &Tr = &St; //~ ERROR E0038 error[E0038]: the trait `Tr` cannot be made into an object --> $DIR/trait-object-safety.rs:15:12 | -LL | let _: &Tr = &St; //~ ERROR E0038 +LL | let _: &Tr = &St; | ^^^ the trait `Tr` cannot be made into an object | = note: method `foo` has no receiver diff --git a/src/test/ui/traits/trait-or-new-type-instead.stderr b/src/test/ui/traits/trait-or-new-type-instead.stderr index e8bd20019a8..4726b0668e5 100644 --- a/src/test/ui/traits/trait-or-new-type-instead.stderr +++ b/src/test/ui/traits/trait-or-new-type-instead.stderr @@ -2,7 +2,7 @@ error[E0116]: cannot define inherent `impl` for a type outside of the crate wher --> $DIR/trait-or-new-type-instead.rs:1:1 | LL | / impl Option { -LL | | //~^ ERROR cannot define inherent `impl` for a type outside of the crate where the type is defined +LL | | LL | | pub fn foo(&self) { } LL | | } | |_^ impl for type defined outside of crate. diff --git a/src/test/ui/traits/trait-resolution-in-overloaded-op.stderr b/src/test/ui/traits/trait-resolution-in-overloaded-op.stderr index 2c644480f0a..3b10632b818 100644 --- a/src/test/ui/traits/trait-resolution-in-overloaded-op.stderr +++ b/src/test/ui/traits/trait-resolution-in-overloaded-op.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `*` cannot be applied to type `&T` --> $DIR/trait-resolution-in-overloaded-op.rs:8:5 | -LL | a * b //~ ERROR binary operation `*` cannot be applied to type `&T` +LL | a * b | ^^^^^ | = note: an implementation of `std::ops::Mul` might be missing for `&T` diff --git a/src/test/ui/traits/trait-safety-inherent-impl.stderr b/src/test/ui/traits/trait-safety-inherent-impl.stderr index 969b16633ce..3911261083e 100644 --- a/src/test/ui/traits/trait-safety-inherent-impl.stderr +++ b/src/test/ui/traits/trait-safety-inherent-impl.stderr @@ -1,7 +1,7 @@ error[E0197]: inherent impls cannot be unsafe --> $DIR/trait-safety-inherent-impl.rs:5:1 | -LL | / unsafe impl SomeStruct { //~ ERROR inherent impls cannot be unsafe +LL | / unsafe impl SomeStruct { LL | | fn foo(self) { } LL | | } | |_^ diff --git a/src/test/ui/traits/trait-safety-trait-impl-cc.stderr b/src/test/ui/traits/trait-safety-trait-impl-cc.stderr index 3be72fbfdd7..5234e205a84 100644 --- a/src/test/ui/traits/trait-safety-trait-impl-cc.stderr +++ b/src/test/ui/traits/trait-safety-trait-impl-cc.stderr @@ -1,7 +1,7 @@ error[E0200]: the trait `lib::Foo` requires an `unsafe impl` declaration --> $DIR/trait-safety-trait-impl-cc.rs:9:1 | -LL | / impl lib::Foo for Bar { //~ ERROR requires an `unsafe impl` declaration +LL | / impl lib::Foo for Bar { LL | | fn foo(&self) -> isize { LL | | panic!(); LL | | } diff --git a/src/test/ui/traits/trait-safety-trait-impl.stderr b/src/test/ui/traits/trait-safety-trait-impl.stderr index 22e9b4d4035..c83a2cd71e5 100644 --- a/src/test/ui/traits/trait-safety-trait-impl.stderr +++ b/src/test/ui/traits/trait-safety-trait-impl.stderr @@ -1,13 +1,13 @@ error[E0200]: the trait `UnsafeTrait` requires an `unsafe impl` declaration --> $DIR/trait-safety-trait-impl.rs:14:1 | -LL | impl UnsafeTrait for u16 { } //~ ERROR requires an `unsafe impl` declaration +LL | impl UnsafeTrait for u16 { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0199]: implementing the trait `SafeTrait` is not unsafe --> $DIR/trait-safety-trait-impl.rs:16:1 | -LL | unsafe impl SafeTrait for u32 { } //~ ERROR the trait `SafeTrait` is not unsafe +LL | unsafe impl SafeTrait for u32 { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/traits/trait-test-2.stderr b/src/test/ui/traits/trait-test-2.stderr index c01317f3d5b..4d61ac67ded 100644 --- a/src/test/ui/traits/trait-test-2.stderr +++ b/src/test/ui/traits/trait-test-2.stderr @@ -1,13 +1,13 @@ error[E0107]: wrong number of type arguments: expected 0, found 1 --> $DIR/trait-test-2.rs:9:14 | -LL | 10.dup::(); //~ ERROR wrong number of type arguments: expected 0, found 1 +LL | 10.dup::(); | ^^^ unexpected type argument error[E0107]: wrong number of type arguments: expected 1, found 2 --> $DIR/trait-test-2.rs:10:20 | -LL | 10.blah::(); //~ ERROR wrong number of type arguments: expected 1, found 2 +LL | 10.blah::(); | ^^^ unexpected type argument error[E0038]: the trait `bar` cannot be made into an object diff --git a/src/test/ui/traits/trait-test.stderr b/src/test/ui/traits/trait-test.stderr index 2383175d513..f5e47e51526 100644 --- a/src/test/ui/traits/trait-test.stderr +++ b/src/test/ui/traits/trait-test.stderr @@ -1,7 +1,7 @@ error[E0404]: expected trait, found builtin type `isize` --> $DIR/trait-test.rs:4:6 | -LL | impl isize for usize { fn foo(&self) {} } //~ ERROR trait +LL | impl isize for usize { fn foo(&self) {} } | ^^^^^ not a trait error: aborting due to previous error diff --git a/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr b/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr index ce1aadca597..44643e8c8de 100644 --- a/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr +++ b/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr @@ -1,7 +1,7 @@ error[E0271]: type mismatch resolving ` as std::iter::Iterator>::Item == u32` --> $DIR/traits-assoc-type-in-supertrait-bad.rs:11:6 | -LL | impl Foo for IntoIter { //~ ERROR type mismatch +LL | impl Foo for IntoIter { | ^^^ expected i32, found u32 | = note: expected type `i32` diff --git a/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr b/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr index 7aa9809c074..a91be8e69ac 100644 --- a/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr +++ b/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr @@ -1,13 +1,13 @@ error[E0568]: auto traits cannot have super traits --> $DIR/traits-inductive-overflow-supertrait-oibit.rs:7:1 | -LL | auto trait Magic: Copy {} //~ ERROR E0568 +LL | auto trait Magic: Copy {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `NoClone: std::marker::Copy` is not satisfied --> $DIR/traits-inductive-overflow-supertrait-oibit.rs:15:18 | -LL | let (a, b) = copy(NoClone); //~ ERROR +LL | let (a, b) = copy(NoClone); | ^^^^ the trait `std::marker::Copy` is not implemented for `NoClone` | = note: required because of the requirements on the impl of `Magic` for `NoClone` diff --git a/src/test/ui/traits/traits-inductive-overflow-supertrait.stderr b/src/test/ui/traits/traits-inductive-overflow-supertrait.stderr index d4b3b6b7d71..769582a778b 100644 --- a/src/test/ui/traits/traits-inductive-overflow-supertrait.stderr +++ b/src/test/ui/traits/traits-inductive-overflow-supertrait.stderr @@ -1,7 +1,7 @@ error[E0275]: overflow evaluating the requirement `NoClone: Magic` --> $DIR/traits-inductive-overflow-supertrait.rs:13:18 | -LL | let (a, b) = copy(NoClone); //~ ERROR E0275 +LL | let (a, b) = copy(NoClone); | ^^^^ | = note: required because of the requirements on the impl of `Magic` for `NoClone` diff --git a/src/test/ui/traits/traits-inductive-overflow-two-traits.stderr b/src/test/ui/traits/traits-inductive-overflow-two-traits.stderr index cee9aa348c3..61adbf00f71 100644 --- a/src/test/ui/traits/traits-inductive-overflow-two-traits.stderr +++ b/src/test/ui/traits/traits-inductive-overflow-two-traits.stderr @@ -1,7 +1,7 @@ error[E0275]: overflow evaluating the requirement `*mut (): Magic` --> $DIR/traits-inductive-overflow-two-traits.rs:19:5 | -LL | wizard::<*mut ()>(); //~ ERROR E0275 +LL | wizard::<*mut ()>(); | ^^^^^^^^^^^^^^^^^ | note: required by `wizard` diff --git a/src/test/ui/traits/traits-multidispatch-bad.stderr b/src/test/ui/traits/traits-multidispatch-bad.stderr index d6c6697c3c0..5b800114aa8 100644 --- a/src/test/ui/traits/traits-multidispatch-bad.stderr +++ b/src/test/ui/traits/traits-multidispatch-bad.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/traits-multidispatch-bad.rs:19:17 | -LL | test(22i32, 44i32); //~ ERROR mismatched types +LL | test(22i32, 44i32); | ^^^^^ expected u32, found i32 error: aborting due to previous error diff --git a/src/test/ui/traits/traits-repeated-supertrait-ambig.stderr b/src/test/ui/traits/traits-repeated-supertrait-ambig.stderr index f906378eb3c..5d1c9137686 100644 --- a/src/test/ui/traits/traits-repeated-supertrait-ambig.stderr +++ b/src/test/ui/traits/traits-repeated-supertrait-ambig.stderr @@ -1,13 +1,13 @@ error[E0277]: the trait bound `dyn CompareToInts: CompareTo` is not satisfied --> $DIR/traits-repeated-supertrait-ambig.rs:26:7 | -LL | c.same_as(22) //~ ERROR `dyn CompareToInts: CompareTo` is not satisfied +LL | c.same_as(22) | ^^^^^^^ the trait `CompareTo` is not implemented for `dyn CompareToInts` error[E0277]: the trait bound `C: CompareTo` is not satisfied --> $DIR/traits-repeated-supertrait-ambig.rs:30:7 | -LL | c.same_as(22) //~ ERROR `C: CompareTo` is not satisfied +LL | c.same_as(22) | ^^^^^^^ the trait `CompareTo` is not implemented for `C` | = help: consider adding a `where C: CompareTo` bound @@ -15,7 +15,7 @@ LL | c.same_as(22) //~ ERROR `C: CompareTo` is not satisfied error[E0277]: the trait bound `dyn CompareToInts: CompareTo` is not satisfied --> $DIR/traits-repeated-supertrait-ambig.rs:34:5 | -LL | CompareToInts::same_as(c, 22) //~ ERROR `dyn CompareToInts: CompareTo` is not satisfied +LL | CompareToInts::same_as(c, 22) | ^^^^^^^^^^^^^^^^^^^^^^ the trait `CompareTo` is not implemented for `dyn CompareToInts` | note: required by `CompareTo::same_as` @@ -27,7 +27,7 @@ LL | fn same_as(&self, t: T) -> bool; error[E0277]: the trait bound `C: CompareTo` is not satisfied --> $DIR/traits-repeated-supertrait-ambig.rs:38:5 | -LL | CompareTo::same_as(c, 22) //~ ERROR `C: CompareTo` is not satisfied +LL | CompareTo::same_as(c, 22) | ^^^^^^^^^^^^^^^^^^ the trait `CompareTo` is not implemented for `C` | = help: consider adding a `where C: CompareTo` bound @@ -40,7 +40,7 @@ LL | fn same_as(&self, t: T) -> bool; error[E0277]: the trait bound `i64: CompareTo` is not satisfied --> $DIR/traits-repeated-supertrait-ambig.rs:42:23 | -LL | assert_eq!(22_i64.same_as(22), true); //~ ERROR `i64: CompareTo` is not satisfied +LL | assert_eq!(22_i64.same_as(22), true); | ^^^^^^^ the trait `CompareTo` is not implemented for `i64` | = help: the following implementations were found: diff --git a/src/test/ui/transmute-equal-assoc-types.stderr b/src/test/ui/transmute-equal-assoc-types.stderr index 46bbf1c1858..ce7657f9640 100644 --- a/src/test/ui/transmute-equal-assoc-types.stderr +++ b/src/test/ui/transmute-equal-assoc-types.stderr @@ -1,7 +1,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> $DIR/transmute-equal-assoc-types.rs:6:5 | -LL | ::std::mem::transmute(foo) //~ ERROR cannot transmute between types of different sizes +LL | ::std::mem::transmute(foo) | ^^^^^^^^^^^^^^^^^^^^^ | = note: `::Bar` does not have a fixed size diff --git a/src/test/ui/transmute/main.stderr b/src/test/ui/transmute/main.stderr index f4e88fc860a..c72876e050f 100644 --- a/src/test/ui/transmute/main.stderr +++ b/src/test/ui/transmute/main.stderr @@ -1,7 +1,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> $DIR/main.rs:16:5 | -LL | transmute(x) //~ ERROR cannot transmute between types of different sizes +LL | transmute(x) | ^^^^^^^^^ | = note: source type: `>::T` (size can vary because of ::T) @@ -10,7 +10,7 @@ LL | transmute(x) //~ ERROR cannot transmute between types of different size error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> $DIR/main.rs:20:17 | -LL | let x: u8 = transmute(10u16); //~ ERROR cannot transmute between types of different sizes +LL | let x: u8 = transmute(10u16); | ^^^^^^^^^ | = note: source type: `u16` (16 bits) @@ -19,7 +19,7 @@ LL | let x: u8 = transmute(10u16); //~ ERROR cannot transmute between types error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> $DIR/main.rs:24:17 | -LL | let x: u8 = transmute("test"); //~ ERROR cannot transmute between types of different sizes +LL | let x: u8 = transmute("test"); | ^^^^^^^^^ | = note: source type: `&str` ($STR bits) @@ -28,7 +28,7 @@ LL | let x: u8 = transmute("test"); //~ ERROR cannot transmute between types error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> $DIR/main.rs:29:18 | -LL | let x: Foo = transmute(10); //~ ERROR cannot transmute between types of different sizes +LL | let x: Foo = transmute(10); | ^^^^^^^^^ | = note: source type: `i32` (32 bits) diff --git a/src/test/ui/transmute/transmute-fat-pointers.stderr b/src/test/ui/transmute/transmute-fat-pointers.stderr index 4b34950881a..e8335fcbed9 100644 --- a/src/test/ui/transmute/transmute-fat-pointers.stderr +++ b/src/test/ui/transmute/transmute-fat-pointers.stderr @@ -1,7 +1,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> $DIR/transmute-fat-pointers.rs:10:14 | -LL | unsafe { transmute(x) } //~ ERROR cannot transmute between types of different sizes +LL | unsafe { transmute(x) } | ^^^^^^^^^ | = note: source type: `&[T]` (N bits) @@ -10,7 +10,7 @@ LL | unsafe { transmute(x) } //~ ERROR cannot transmute between types of dif error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> $DIR/transmute-fat-pointers.rs:14:14 | -LL | unsafe { transmute(x) } //~ ERROR cannot transmute between types of different sizes +LL | unsafe { transmute(x) } | ^^^^^^^^^ | = note: source type: `&T` (pointer to `T`) @@ -19,7 +19,7 @@ LL | unsafe { transmute(x) } //~ ERROR cannot transmute between types of dif error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> $DIR/transmute-fat-pointers.rs:26:14 | -LL | unsafe { transmute(x) } //~ ERROR cannot transmute between types of different sizes +LL | unsafe { transmute(x) } | ^^^^^^^^^ | = note: source type: `&T` (pointer to `T`) @@ -28,7 +28,7 @@ LL | unsafe { transmute(x) } //~ ERROR cannot transmute between types of dif error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> $DIR/transmute-fat-pointers.rs:30:14 | -LL | unsafe { transmute(x) } //~ ERROR cannot transmute between types of different sizes +LL | unsafe { transmute(x) } | ^^^^^^^^^ | = note: source type: `&T` (N bits) diff --git a/src/test/ui/transmute/transmute-impl.stderr b/src/test/ui/transmute/transmute-impl.stderr index 8acc0aaf3ab..dd19bcd54e3 100644 --- a/src/test/ui/transmute/transmute-impl.stderr +++ b/src/test/ui/transmute/transmute-impl.stderr @@ -1,7 +1,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> $DIR/transmute-impl.rs:21:18 | -LL | unsafe { transmute(x) } //~ ERROR cannot transmute between types of different sizes +LL | unsafe { transmute(x) } | ^^^^^^^^^ | = note: source type: `&T` (pointer to `T`) diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.stderr index a3995b7edef..adaeb9b5d5d 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.stderr @@ -3,7 +3,7 @@ error[E0389]: cannot borrow data mutably in a `&` reference | LL | fn reborrow_mut<'a>(t: &'a &'a mut i32) -> &'a mut i32 where &'a mut i32: Copy { | --------------- use `&'a mut &'a mut i32` here to make mutable -LL | *t //~ ERROR +LL | *t | ^^ assignment into an immutable reference error[E0389]: cannot borrow data mutably in a `&` reference @@ -11,7 +11,7 @@ error[E0389]: cannot borrow data mutably in a `&` reference | LL | fn copy_reborrow_mut<'a>(t: &'a &'a mut i32) -> &'a mut i32 where &'a mut i32: Copy { | --------------- use `&'a mut &'a mut i32` here to make mutable -LL | {*t} //~ ERROR +LL | {*t} | ^^ assignment into an immutable reference error: aborting due to 2 previous errors diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr index f769f23f115..7c1a8334427 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | fn global_bound_is_hidden() -> u8 | -- expected `u8` because of return type ... -LL | B::get_x() //~ ERROR +LL | B::get_x() | ^^^^^^^^^^ expected u8, found i32 error: aborting due to previous error diff --git a/src/test/ui/trivial-bounds/trivial-bounds-leak-copy.stderr b/src/test/ui/trivial-bounds/trivial-bounds-leak-copy.stderr index b8e669d4a7c..68d8129843e 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-leak-copy.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-leak-copy.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of borrowed content --> $DIR/trivial-bounds-leak-copy.rs:9:5 | -LL | *t //~ ERROR +LL | *t | ^^ cannot move out of borrowed content error: aborting due to previous error diff --git a/src/test/ui/trivial-bounds/trivial-bounds-leak.stderr b/src/test/ui/trivial-bounds/trivial-bounds-leak.stderr index aa055d3dc03..3de683e5661 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-leak.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-leak.stderr @@ -1,7 +1,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/trivial-bounds-leak.rs:12:25 | -LL | fn cant_return_str() -> str { //~ ERROR +LL | fn cant_return_str() -> str { | ^^^ doesn't have a size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` @@ -11,7 +11,7 @@ LL | fn cant_return_str() -> str { //~ ERROR error[E0599]: no method named `test` found for type `i32` in the current scope --> $DIR/trivial-bounds-leak.rs:24:10 | -LL | 3i32.test(); //~ ERROR +LL | 3i32.test(); | ^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -21,7 +21,7 @@ LL | 3i32.test(); //~ ERROR error[E0277]: the trait bound `i32: Foo` is not satisfied --> $DIR/trivial-bounds-leak.rs:25:5 | -LL | Foo::test(&4i32); //~ ERROR +LL | Foo::test(&4i32); | ^^^^^^^^^ the trait `Foo` is not implemented for `i32` | note: required by `Foo::test` @@ -33,7 +33,7 @@ LL | fn test(&self); error[E0277]: the trait bound `i32: Foo` is not satisfied --> $DIR/trivial-bounds-leak.rs:26:5 | -LL | generic_function(5i32); //~ ERROR +LL | generic_function(5i32); | ^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32` | note: required by `generic_function` diff --git a/src/test/ui/trivial-bounds/trivial-bounds-lint.stderr b/src/test/ui/trivial-bounds/trivial-bounds-lint.stderr index 6518e902878..2f4b2df24cd 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-lint.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-lint.stderr @@ -1,7 +1,7 @@ error: Trait bound i32: std::marker::Copy does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-lint.rs:5:21 | -LL | struct A where i32: Copy; //~ ERROR +LL | struct A where i32: Copy; | ^^^^ | note: lint level defined here @@ -13,13 +13,13 @@ LL | #![deny(trivial_bounds)] error: Trait bound i32: X<()> does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-lint.rs:18:30 | -LL | fn global_param() where i32: X<()> {} //~ ERROR +LL | fn global_param() where i32: X<()> {} | ^^^^^ error: Trait bound i32: Z does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-lint.rs:22:35 | -LL | fn global_projection() where i32: Z {} //~ ERROR +LL | fn global_projection() where i32: Z {} | ^^^^^^^^^^ error: Lifetime bound i32 : 'static does not depend on any type or lifetime parameters @@ -37,13 +37,13 @@ LL | fn global_lifetimes() where i32: 'static, &'static str: 'static {} error: Lifetime bound 'static : 'static does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-lint.rs:35:37 | -LL | fn global_outlives() where 'static: 'static {} //~ ERROR +LL | fn global_outlives() where 'static: 'static {} | ^^^^^^^ error: Trait bound i32: std::marker::Copy does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-lint.rs:38:46 | -LL | fn mixed_bounds() where i32: X + Copy {} //~ ERROR +LL | fn mixed_bounds() where i32: X + Copy {} | ^^^^ error: aborting due to 7 previous errors diff --git a/src/test/ui/trivial_casts.stderr b/src/test/ui/trivial_casts.stderr index fb1db76b138..524eb7feaaf 100644 --- a/src/test/ui/trivial_casts.stderr +++ b/src/test/ui/trivial_casts.stderr @@ -1,7 +1,7 @@ error: trivial numeric cast: `i32` as `i32` --> $DIR/trivial_casts.rs:16:13 | -LL | let _ = 42_i32 as i32; //~ ERROR trivial numeric cast: `i32` as `i32` +LL | let _ = 42_i32 as i32; | ^^^^^^^^^^^^^ | note: lint level defined here @@ -14,7 +14,7 @@ LL | #![deny(trivial_casts, trivial_numeric_casts)] error: trivial numeric cast: `u8` as `u8` --> $DIR/trivial_casts.rs:19:13 | -LL | let _ = 42_u8 as u8; //~ ERROR trivial numeric cast: `u8` as `u8` +LL | let _ = 42_u8 as u8; | ^^^^^^^^^^^ | = help: cast can be replaced by coercion; this might require a temporary variable @@ -22,7 +22,7 @@ LL | let _ = 42_u8 as u8; //~ ERROR trivial numeric cast: `u8` as `u8` error: trivial cast: `&u32` as `*const u32` --> $DIR/trivial_casts.rs:24:13 | -LL | let _ = x as *const u32; //~ERROR trivial cast: `&u32` as `*const u32` +LL | let _ = x as *const u32; | ^^^^^^^^^^^^^^^ | note: lint level defined here @@ -35,7 +35,7 @@ LL | #![deny(trivial_casts, trivial_numeric_casts)] error: trivial cast: `&mut u32` as `*mut u32` --> $DIR/trivial_casts.rs:28:13 | -LL | let _ = x as *mut u32; //~ERROR trivial cast: `&mut u32` as `*mut u32` +LL | let _ = x as *mut u32; | ^^^^^^^^^^^^^ | = help: cast can be replaced by coercion; this might require a temporary variable @@ -43,7 +43,7 @@ LL | let _ = x as *mut u32; //~ERROR trivial cast: `&mut u32` as `*mut u32` error: trivial cast: `&[u32; 3]` as `&[u32]` --> $DIR/trivial_casts.rs:33:13 | -LL | let _ = x as &[u32]; //~ERROR trivial cast: `&[u32; 3]` as `&[u32]` +LL | let _ = x as &[u32]; | ^^^^^^^^^^^ | = help: cast can be replaced by coercion; this might require a temporary variable @@ -51,7 +51,7 @@ LL | let _ = x as &[u32]; //~ERROR trivial cast: `&[u32; 3]` as `&[u32]` error: trivial cast: `&[u32; 3]` as `*const [u32]` --> $DIR/trivial_casts.rs:34:13 | -LL | let _ = x as *const [u32]; //~ERROR trivial cast: `&[u32; 3]` as `*const [u32]` +LL | let _ = x as *const [u32]; | ^^^^^^^^^^^^^^^^^ | = help: cast can be replaced by coercion; this might require a temporary variable @@ -59,7 +59,7 @@ LL | let _ = x as *const [u32]; //~ERROR trivial cast: `&[u32; 3]` as `*cons error: trivial cast: `&mut [u32; 3]` as `&mut [u32]` --> $DIR/trivial_casts.rs:39:13 | -LL | let _ = x as &mut [u32]; //~ERROR trivial cast: `&mut [u32; 3]` as `&mut [u32]` +LL | let _ = x as &mut [u32]; | ^^^^^^^^^^^^^^^ | = help: cast can be replaced by coercion; this might require a temporary variable @@ -67,7 +67,7 @@ LL | let _ = x as &mut [u32]; //~ERROR trivial cast: `&mut [u32; 3]` as `&mu error: trivial cast: `&mut [u32; 3]` as `*mut [u32]` --> $DIR/trivial_casts.rs:40:13 | -LL | let _ = x as *mut [u32]; //~ERROR trivial cast: `&mut [u32; 3]` as `*mut [u32]` +LL | let _ = x as *mut [u32]; | ^^^^^^^^^^^^^^^ | = help: cast can be replaced by coercion; this might require a temporary variable @@ -83,7 +83,7 @@ LL | let _ = x as Box<[u32]>; error: trivial cast: `&Bar` as `&dyn Foo` --> $DIR/trivial_casts.rs:52:13 | -LL | let _ = x as &Foo; //~ERROR trivial cast: `&Bar` as `&dyn Foo` +LL | let _ = x as &Foo; | ^^^^^^^^^ | = help: cast can be replaced by coercion; this might require a temporary variable @@ -91,7 +91,7 @@ LL | let _ = x as &Foo; //~ERROR trivial cast: `&Bar` as `&dyn Foo` error: trivial cast: `&Bar` as `*const dyn Foo` --> $DIR/trivial_casts.rs:53:13 | -LL | let _ = x as *const Foo; //~ERROR trivial cast: `&Bar` as `*const dyn Foo` +LL | let _ = x as *const Foo; | ^^^^^^^^^^^^^^^ | = help: cast can be replaced by coercion; this might require a temporary variable @@ -99,7 +99,7 @@ LL | let _ = x as *const Foo; //~ERROR trivial cast: `&Bar` as `*const dyn F error: trivial cast: `&mut Bar` as `&mut dyn Foo` --> $DIR/trivial_casts.rs:58:13 | -LL | let _ = x as &mut Foo; //~ERROR trivial cast: `&mut Bar` as `&mut dyn Foo` +LL | let _ = x as &mut Foo; | ^^^^^^^^^^^^^ | = help: cast can be replaced by coercion; this might require a temporary variable @@ -107,7 +107,7 @@ LL | let _ = x as &mut Foo; //~ERROR trivial cast: `&mut Bar` as `&mut dyn F error: trivial cast: `&mut Bar` as `*mut dyn Foo` --> $DIR/trivial_casts.rs:59:13 | -LL | let _ = x as *mut Foo; //~ERROR trivial cast: `&mut Bar` as `*mut dyn Foo` +LL | let _ = x as *mut Foo; | ^^^^^^^^^^^^^ | = help: cast can be replaced by coercion; this might require a temporary variable @@ -115,7 +115,7 @@ LL | let _ = x as *mut Foo; //~ERROR trivial cast: `&mut Bar` as `*mut dyn F error: trivial cast: `std::boxed::Box` as `std::boxed::Box` --> $DIR/trivial_casts.rs:64:13 | -LL | let _ = x as Box; //~ERROR `std::boxed::Box` as `std::boxed::Box` +LL | let _ = x as Box; | ^^^^^^^^^^^^^ | = help: cast can be replaced by coercion; this might require a temporary variable @@ -123,7 +123,7 @@ LL | let _ = x as Box; //~ERROR `std::boxed::Box` as `std::boxed:: error: trivial cast: `&fn(i32) {main::baz}` as `&dyn std::ops::Fn(i32)` --> $DIR/trivial_casts.rs:70:13 | -LL | let _ = &baz as &Fn(i32); //~ERROR `&fn(i32) {main::baz}` as `&dyn std::ops::Fn(i32)` +LL | let _ = &baz as &Fn(i32); | ^^^^^^^^^^^^^^^^ | = help: cast can be replaced by coercion; this might require a temporary variable @@ -131,7 +131,7 @@ LL | let _ = &baz as &Fn(i32); //~ERROR `&fn(i32) {main::baz}` as `&dyn std: error: trivial cast: `&[closure@$DIR/trivial_casts.rs:72:13: 72:25]` as `&dyn std::ops::Fn(i32)` --> $DIR/trivial_casts.rs:73:13 | -LL | let _ = &x as &Fn(i32); //~ERROR trivial cast +LL | let _ = &x as &Fn(i32); | ^^^^^^^^^^^^^^ | = help: cast can be replaced by coercion; this might require a temporary variable @@ -139,7 +139,7 @@ LL | let _ = &x as &Fn(i32); //~ERROR trivial cast error: trivial cast: `&'a Bar` as `&'a Bar` --> $DIR/trivial_casts.rs:79:13 | -LL | let _ = a as &'a Bar; //~ERROR trivial cast +LL | let _ = a as &'a Bar; | ^^^^^^^^^^^^ | = help: cast can be replaced by coercion; this might require a temporary variable @@ -147,7 +147,7 @@ LL | let _ = a as &'a Bar; //~ERROR trivial cast error: trivial cast: `&'b Bar` as `&'a Bar` --> $DIR/trivial_casts.rs:81:13 | -LL | let _ = b as &'a Bar; //~ERROR trivial cast +LL | let _ = b as &'a Bar; | ^^^^^^^^^^^^ | = help: cast can be replaced by coercion; this might require a temporary variable @@ -155,7 +155,7 @@ LL | let _ = b as &'a Bar; //~ERROR trivial cast error: trivial cast: `&'b Bar` as `&'b Bar` --> $DIR/trivial_casts.rs:83:13 | -LL | let _ = b as &'b Bar; //~ERROR trivial cast +LL | let _ = b as &'b Bar; | ^^^^^^^^^^^^ | = help: cast can be replaced by coercion; this might require a temporary variable diff --git a/src/test/ui/try-block/try-block-bad-lifetime.stderr b/src/test/ui/try-block/try-block-bad-lifetime.stderr index b1b925d694f..a236cb90557 100644 --- a/src/test/ui/try-block/try-block-bad-lifetime.stderr +++ b/src/test/ui/try-block/try-block-bad-lifetime.stderr @@ -16,10 +16,10 @@ error[E0506]: cannot assign to `i` because it is borrowed LL | let k = &mut i; | ------ borrow of `i` occurs here ... -LL | i = 10; //~ ERROR cannot assign to `i` because it is borrowed +LL | i = 10; | ^^^^^^ assignment to borrowed `i` occurs here LL | }; -LL | ::std::mem::drop(k); //~ ERROR use of moved value: `k` +LL | ::std::mem::drop(k); | - borrow later used here error[E0382]: use of moved value: `k` @@ -31,7 +31,7 @@ LL | let mut j: Result<(), &mut i32> = try { LL | Err(k) ?; | - value moved here ... -LL | ::std::mem::drop(k); //~ ERROR use of moved value: `k` +LL | ::std::mem::drop(k); | ^ value used here after move error[E0506]: cannot assign to `i` because it is borrowed @@ -40,7 +40,7 @@ error[E0506]: cannot assign to `i` because it is borrowed LL | let k = &mut i; | ------ borrow of `i` occurs here ... -LL | i = 40; //~ ERROR cannot assign to `i` because it is borrowed +LL | i = 40; | ^^^^^^ assignment to borrowed `i` occurs here LL | LL | let i_ptr = if let Err(i_ptr) = j { i_ptr } else { panic ! ("") }; diff --git a/src/test/ui/try-block/try-block-bad-type.stderr b/src/test/ui/try-block/try-block-bad-type.stderr index df8e646280c..6687bd9d9e1 100644 --- a/src/test/ui/try-block/try-block-bad-type.stderr +++ b/src/test/ui/try-block/try-block-bad-type.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `i32: std::convert::From<&str>` is not satisfied --> $DIR/try-block-bad-type.rs:7:9 | -LL | Err("")?; //~ ERROR the trait bound `i32: std::convert::From<&str>` is not satisfied +LL | Err("")?; | ^^^^^^^^ the trait `std::convert::From<&str>` is not implemented for `i32` | = help: the following implementations were found: @@ -15,7 +15,7 @@ LL | Err("")?; //~ ERROR the trait bound `i32: std::convert::From<&str>` error[E0271]: type mismatch resolving ` as std::ops::Try>::Ok == &str` --> $DIR/try-block-bad-type.rs:12:9 | -LL | "" //~ ERROR type mismatch +LL | "" | ^^ expected i32, found &str | = note: expected type `i32` @@ -24,7 +24,7 @@ LL | "" //~ ERROR type mismatch error[E0271]: type mismatch resolving ` as std::ops::Try>::Ok == ()` --> $DIR/try-block-bad-type.rs:15:39 | -LL | let res: Result = try { }; //~ ERROR type mismatch +LL | let res: Result = try { }; | ^ expected i32, found () | = note: expected type `i32` @@ -33,7 +33,7 @@ LL | let res: Result = try { }; //~ ERROR type mismatch error[E0277]: the trait bound `(): std::ops::Try` is not satisfied --> $DIR/try-block-bad-type.rs:17:23 | -LL | let res: () = try { }; //~ the trait bound `(): std::ops::Try` is not satisfied +LL | let res: () = try { }; | ^^^ the trait `std::ops::Try` is not implemented for `()` | = note: required by `std::ops::Try::from_ok` @@ -41,7 +41,7 @@ LL | let res: () = try { }; //~ the trait bound `(): std::ops::Try` is not s error[E0277]: the trait bound `i32: std::ops::Try` is not satisfied --> $DIR/try-block-bad-type.rs:19:24 | -LL | let res: i32 = try { 5 }; //~ ERROR the trait bound `i32: std::ops::Try` is not satisfied +LL | let res: i32 = try { 5 }; | ^^^^^ the trait `std::ops::Try` is not implemented for `i32` | = note: required by `std::ops::Try::from_ok` diff --git a/src/test/ui/try-block/try-block-in-edition2015.stderr b/src/test/ui/try-block/try-block-in-edition2015.stderr index 7394fec6f36..c94e43131fa 100644 --- a/src/test/ui/try-block/try-block-in-edition2015.stderr +++ b/src/test/ui/try-block/try-block-in-edition2015.stderr @@ -3,12 +3,12 @@ error: expected identifier, found keyword `let` | LL | let try_result: Option<_> = try { | --- while parsing this struct -LL | //~^ ERROR expected struct, variant or union type, found macro `try` -LL | let x = 5; //~ ERROR expected identifier, found keyword +LL | +LL | let x = 5; | ^^^ expected identifier, found keyword help: you can escape reserved keywords to use them as identifiers | -LL | r#let x = 5; //~ ERROR expected identifier, found keyword +LL | r#let x = 5; | ^^^^^ error[E0574]: expected struct, variant or union type, found macro `try` diff --git a/src/test/ui/try-block/try-block-in-match.stderr b/src/test/ui/try-block/try-block-in-match.stderr index 089347073b5..936e0fe19ba 100644 --- a/src/test/ui/try-block/try-block-in-match.stderr +++ b/src/test/ui/try-block/try-block-in-match.stderr @@ -1,7 +1,7 @@ error: expected expression, found reserved keyword `try` --> $DIR/try-block-in-match.rs:6:11 | -LL | match try { false } { _ => {} } //~ ERROR expected expression, found reserved keyword `try` +LL | match try { false } { _ => {} } | ----- ^^^ expected expression | | | while parsing this match expression diff --git a/src/test/ui/try-block/try-block-in-while.stderr b/src/test/ui/try-block/try-block-in-while.stderr index b4f17778b29..026df15eb87 100644 --- a/src/test/ui/try-block/try-block-in-while.stderr +++ b/src/test/ui/try-block/try-block-in-while.stderr @@ -1,7 +1,7 @@ error: expected expression, found reserved keyword `try` --> $DIR/try-block-in-while.rs:6:11 | -LL | while try { false } {} //~ ERROR expected expression, found reserved keyword `try` +LL | while try { false } {} | ^^^ expected expression error: aborting due to previous error diff --git a/src/test/ui/try-block/try-block-maybe-bad-lifetime.stderr b/src/test/ui/try-block/try-block-maybe-bad-lifetime.stderr index dafbde6a515..665a6262d3a 100644 --- a/src/test/ui/try-block/try-block-maybe-bad-lifetime.stderr +++ b/src/test/ui/try-block/try-block-maybe-bad-lifetime.stderr @@ -4,7 +4,7 @@ error[E0506]: cannot assign to `i` because it is borrowed LL | &i | -- borrow of `i` occurs here LL | }; -LL | i = 0; //~ ERROR cannot assign to `i` because it is borrowed +LL | i = 0; | ^^^^^ assignment to borrowed `i` occurs here LL | let _ = i; LL | do_something_with(x); @@ -19,7 +19,7 @@ LL | let x = String::new(); LL | ::std::mem::drop(x); | - value moved here LL | }; -LL | println!("{}", x); //~ ERROR borrow of moved value: `x` +LL | println!("{}", x); | ^ value borrowed here after move error[E0506]: cannot assign to `i` because it is borrowed @@ -28,7 +28,7 @@ error[E0506]: cannot assign to `i` because it is borrowed LL | j = &i; | -- borrow of `i` occurs here LL | }; -LL | i = 0; //~ ERROR cannot assign to `i` because it is borrowed +LL | i = 0; | ^^^^^ assignment to borrowed `i` occurs here LL | let _ = i; LL | do_something_with(j); diff --git a/src/test/ui/try-block/try-block-opt-init.stderr b/src/test/ui/try-block/try-block-opt-init.stderr index a0bc45d4fcd..ec0128dbdf0 100644 --- a/src/test/ui/try-block/try-block-opt-init.stderr +++ b/src/test/ui/try-block/try-block-opt-init.stderr @@ -1,7 +1,7 @@ error[E0381]: borrow of possibly uninitialized variable: `cfg_res` --> $DIR/try-block-opt-init.rs:15:5 | -LL | assert_eq!(cfg_res, 5); //~ ERROR borrow of possibly uninitialized variable: `cfg_res` +LL | assert_eq!(cfg_res, 5); | ^^^^^^^^^^^^^^^^^^^^^^^ use of possibly uninitialized `cfg_res` | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/try-on-option.stderr b/src/test/ui/try-on-option.stderr index 438b3c2e343..7dfa1a7d3a0 100644 --- a/src/test/ui/try-on-option.stderr +++ b/src/test/ui/try-on-option.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `(): std::convert::From` is not satisfied --> $DIR/try-on-option.rs:7:5 | -LL | x?; //~ the trait bound +LL | x?; | ^^ the trait `std::convert::From` is not implemented for `()` | = note: required by `std::convert::From::from` @@ -9,7 +9,7 @@ LL | x?; //~ the trait bound error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`) --> $DIR/try-on-option.rs:13:5 | -LL | x?; //~ the `?` operator +LL | x?; | ^^ cannot use the `?` operator in a function that returns `u32` | = help: the trait `std::ops::Try` is not implemented for `u32` diff --git a/src/test/ui/try-operator-on-main.stderr b/src/test/ui/try-operator-on-main.stderr index 9a2052f7283..9f120e00948 100644 --- a/src/test/ui/try-operator-on-main.stderr +++ b/src/test/ui/try-operator-on-main.stderr @@ -1,7 +1,7 @@ error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`) --> $DIR/try-operator-on-main.rs:9:5 | -LL | std::fs::File::open("foo")?; //~ ERROR the `?` operator can only +LL | std::fs::File::open("foo")?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()` | = help: the trait `std::ops::Try` is not implemented for `()` @@ -10,7 +10,7 @@ LL | std::fs::File::open("foo")?; //~ ERROR the `?` operator can only error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` --> $DIR/try-operator-on-main.rs:12:5 | -LL | ()?; //~ ERROR the `?` operator can only +LL | ()?; | ^^^ the `?` operator cannot be applied to type `()` | = help: the trait `std::ops::Try` is not implemented for `()` @@ -19,7 +19,7 @@ LL | ()?; //~ ERROR the `?` operator can only error[E0277]: the trait bound `(): std::ops::Try` is not satisfied --> $DIR/try-operator-on-main.rs:15:5 | -LL | try_trait_generic::<()>(); //~ ERROR the trait bound +LL | try_trait_generic::<()>(); | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::ops::Try` is not implemented for `()` | note: required by `try_trait_generic` @@ -31,7 +31,7 @@ LL | fn try_trait_generic() -> T { error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` --> $DIR/try-operator-on-main.rs:22:5 | -LL | ()?; //~ ERROR the `?` operator can only +LL | ()?; | ^^^ the `?` operator cannot be applied to type `()` | = help: the trait `std::ops::Try` is not implemented for `()` diff --git a/src/test/ui/tuple/tuple-float-index.stderr b/src/test/ui/tuple/tuple-float-index.stderr index 9a3e384b9d1..a0ea0e0a30a 100644 --- a/src/test/ui/tuple/tuple-float-index.stderr +++ b/src/test/ui/tuple/tuple-float-index.stderr @@ -1,7 +1,7 @@ error: unexpected token: `1.1` --> $DIR/tuple-float-index.rs:4:17 | -LL | (1, (2, 3)).1.1; //~ ERROR unexpected token: `1.1` +LL | (1, (2, 3)).1.1; | ------------^^^ | | | | | unexpected token diff --git a/src/test/ui/tuple/tuple-struct-fields/test2.stderr b/src/test/ui/tuple/tuple-struct-fields/test2.stderr index 80f0ddc0e4f..78176c67ed2 100644 --- a/src/test/ui/tuple/tuple-struct-fields/test2.stderr +++ b/src/test/ui/tuple/tuple-struct-fields/test2.stderr @@ -4,13 +4,13 @@ error: expected one of `)` or `,`, found `(` LL | struct S3(pub $t ()); | ^ expected one of `)` or `,` here ... -LL | define_struct! { (foo) } //~ ERROR cannot find type `foo` in this scope +LL | define_struct! { (foo) } | ------------------------ in this macro invocation error[E0412]: cannot find type `foo` in this scope --> $DIR/test2.rs:11:23 | -LL | define_struct! { (foo) } //~ ERROR cannot find type `foo` in this scope +LL | define_struct! { (foo) } | ^^^ not found in this scope error: aborting due to 2 previous errors diff --git a/src/test/ui/tuple/tuple-struct-fields/test3.stderr b/src/test/ui/tuple/tuple-struct-fields/test3.stderr index fbc01744fe4..e105aad09e6 100644 --- a/src/test/ui/tuple/tuple-struct-fields/test3.stderr +++ b/src/test/ui/tuple/tuple-struct-fields/test3.stderr @@ -4,13 +4,13 @@ error: expected one of `)` or `,`, found `(` LL | struct S3(pub($t) ()); | ^ expected one of `)` or `,` here ... -LL | define_struct! { foo } //~ ERROR cannot find type `foo` in this scope +LL | define_struct! { foo } | ---------------------- in this macro invocation error[E0412]: cannot find type `foo` in this scope --> $DIR/test3.rs:11:22 | -LL | define_struct! { foo } //~ ERROR cannot find type `foo` in this scope +LL | define_struct! { foo } | ^^^ not found in this scope error: aborting due to 2 previous errors diff --git a/src/test/ui/tuple/tuple-struct-nonexhaustive.stderr b/src/test/ui/tuple/tuple-struct-nonexhaustive.stderr index 58d0862be6d..bbdf9ceed23 100644 --- a/src/test/ui/tuple/tuple-struct-nonexhaustive.stderr +++ b/src/test/ui/tuple/tuple-struct-nonexhaustive.stderr @@ -4,7 +4,7 @@ error[E0004]: non-exhaustive patterns: `Foo(_, _)` not covered LL | struct Foo(isize, isize); | ------------------------- `Foo` defined here ... -LL | match x { //~ ERROR non-exhaustive +LL | match x { | ^ pattern `Foo(_, _)` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/type-alias-enum-variants-priority-2.stderr b/src/test/ui/type-alias-enum-variants-priority-2.stderr index c6ec96ebb7d..10a4b44084a 100644 --- a/src/test/ui/type-alias-enum-variants-priority-2.stderr +++ b/src/test/ui/type-alias-enum-variants-priority-2.stderr @@ -4,7 +4,7 @@ error[E0061]: this function takes 1 parameter but 0 parameters were supplied LL | V(u8) | ----- defined here ... -LL | ::V(); //~ ERROR this function takes 1 parameter but 0 parameters were supplied +LL | ::V(); | ^^^^^^^^ expected 1 parameter error: aborting due to previous error diff --git a/src/test/ui/type/type-alias-bounds.stderr b/src/test/ui/type/type-alias-bounds.stderr index b13e4001052..3cc844365fd 100644 --- a/src/test/ui/type/type-alias-bounds.stderr +++ b/src/test/ui/type/type-alias-bounds.stderr @@ -42,33 +42,33 @@ LL | type W2Vec<'b, T> where T: 'b, T: 'b = (&'b u32, Vec); warning: bounds on generic parameters are not enforced in type aliases --> $DIR/type-alias-bounds.rs:47:12 | -LL | type T1 = U::Assoc; //~ WARN not enforced in type aliases +LL | type T1 = U::Assoc; | ^^^^^ | = help: the bound will not be checked when the type alias is used, and should be removed help: use fully disambiguated paths (i.e., `::Assoc`) to refer to associated types in type aliases --> $DIR/type-alias-bounds.rs:47:21 | -LL | type T1 = U::Assoc; //~ WARN not enforced in type aliases +LL | type T1 = U::Assoc; | ^^^^^^^^ warning: where clauses are not enforced in type aliases --> $DIR/type-alias-bounds.rs:48:18 | -LL | type T2 where U: Bound = U::Assoc; //~ WARN not enforced in type aliases +LL | type T2 where U: Bound = U::Assoc; | ^^^^^^^^ | = help: the clause will not be checked when the type alias is used, and should be removed help: use fully disambiguated paths (i.e., `::Assoc`) to refer to associated types in type aliases --> $DIR/type-alias-bounds.rs:48:29 | -LL | type T2 where U: Bound = U::Assoc; //~ WARN not enforced in type aliases +LL | type T2 where U: Bound = U::Assoc; | ^^^^^^^^ warning: bounds on generic parameters are not enforced in type aliases --> $DIR/type-alias-bounds.rs:56:12 | -LL | type T5 = ::Assoc; //~ WARN not enforced in type aliases +LL | type T5 = ::Assoc; | ^^^^^ | = help: the bound will not be checked when the type alias is used, and should be removed @@ -76,7 +76,7 @@ LL | type T5 = ::Assoc; //~ WARN not enforced in type ali warning: bounds on generic parameters are not enforced in type aliases --> $DIR/type-alias-bounds.rs:57:12 | -LL | type T6 = ::std::vec::Vec; //~ WARN not enforced in type aliases +LL | type T6 = ::std::vec::Vec; | ^^^^^ | = help: the bound will not be checked when the type alias is used, and should be removed diff --git a/src/test/ui/type/type-ascription-instead-of-initializer.stderr b/src/test/ui/type/type-ascription-instead-of-initializer.stderr index 8ce367d70f0..a22d25697d8 100644 --- a/src/test/ui/type/type-ascription-instead-of-initializer.stderr +++ b/src/test/ui/type/type-ascription-instead-of-initializer.stderr @@ -1,7 +1,7 @@ error: expected type, found `10` --> $DIR/type-ascription-instead-of-initializer.rs:2:31 | -LL | let x: Vec::with_capacity(10, 20); //~ ERROR expected type, found `10` +LL | let x: Vec::with_capacity(10, 20); | -- ^^ | || | |help: use `=` if you meant to assign @@ -10,7 +10,7 @@ LL | let x: Vec::with_capacity(10, 20); //~ ERROR expected type, found `10` error[E0061]: this function takes 1 parameter but 2 parameters were supplied --> $DIR/type-ascription-instead-of-initializer.rs:2:12 | -LL | let x: Vec::with_capacity(10, 20); //~ ERROR expected type, found `10` +LL | let x: Vec::with_capacity(10, 20); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/type/type-ascription-instead-of-statement-end.stderr b/src/test/ui/type/type-ascription-instead-of-statement-end.stderr index db99d1ec07b..bc5a923a3f3 100644 --- a/src/test/ui/type/type-ascription-instead-of-statement-end.stderr +++ b/src/test/ui/type/type-ascription-instead-of-statement-end.stderr @@ -3,13 +3,13 @@ error: expected type, found `0` | LL | println!("test"): | - help: try using a semicolon: `;` -LL | 0; //~ ERROR expected type, found `0` +LL | 0; | ^ expecting a type here because of type ascription error: expected type, found `0` --> $DIR/type-ascription-instead-of-statement-end.rs:9:23 | -LL | println!("test"): 0; //~ ERROR expected type, found `0` +LL | println!("test"): 0; | ^ expecting a type here because of type ascription error: aborting due to 2 previous errors diff --git a/src/test/ui/type/type-ascription-precedence.stderr b/src/test/ui/type/type-ascription-precedence.stderr index e52e2bc5e9a..992974eef64 100644 --- a/src/test/ui/type/type-ascription-precedence.stderr +++ b/src/test/ui/type/type-ascription-precedence.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/type-ascription-precedence.rs:31:7 | -LL | &(S: &S); //~ ERROR mismatched types +LL | &(S: &S); | ^ expected &S, found struct `S` | = note: expected type `&S` @@ -10,7 +10,7 @@ LL | &(S: &S); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-ascription-precedence.rs:35:7 | -LL | *(S: Z); //~ ERROR mismatched types +LL | *(S: Z); | ^ expected struct `Z`, found struct `S` | = note: expected type `Z` @@ -19,13 +19,13 @@ LL | *(S: Z); //~ ERROR mismatched types error[E0614]: type `Z` cannot be dereferenced --> $DIR/type-ascription-precedence.rs:35:5 | -LL | *(S: Z); //~ ERROR mismatched types +LL | *(S: Z); | ^^^^^^^ error[E0308]: mismatched types --> $DIR/type-ascription-precedence.rs:40:7 | -LL | -(S: Z); //~ ERROR mismatched types +LL | -(S: Z); | ^ expected struct `Z`, found struct `S` | = note: expected type `Z` @@ -34,7 +34,7 @@ LL | -(S: Z); //~ ERROR mismatched types error[E0600]: cannot apply unary operator `-` to type `Z` --> $DIR/type-ascription-precedence.rs:40:5 | -LL | -(S: Z); //~ ERROR mismatched types +LL | -(S: Z); | ^^^^^^^ cannot apply unary operator `-` | = note: an implementation of `std::ops::Neg` might be missing for `Z` @@ -42,7 +42,7 @@ LL | -(S: Z); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-ascription-precedence.rs:45:5 | -LL | (S + Z): Z; //~ ERROR mismatched types +LL | (S + Z): Z; | ^^^^^^^ expected struct `Z`, found struct `S` | = note: expected type `Z` @@ -51,7 +51,7 @@ LL | (S + Z): Z; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-ascription-precedence.rs:49:5 | -LL | (S * Z): Z; //~ ERROR mismatched types +LL | (S * Z): Z; | ^^^^^^^ expected struct `Z`, found struct `S` | = note: expected type `Z` @@ -60,7 +60,7 @@ LL | (S * Z): Z; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-ascription-precedence.rs:53:5 | -LL | (S .. S): S; //~ ERROR mismatched types +LL | (S .. S): S; | ^^^^^^^^ expected struct `S`, found struct `std::ops::Range` | = note: expected type `S` diff --git a/src/test/ui/type/type-ascription-soundness.stderr b/src/test/ui/type/type-ascription-soundness.stderr index f681a042302..150e19020fe 100644 --- a/src/test/ui/type/type-ascription-soundness.stderr +++ b/src/test/ui/type/type-ascription-soundness.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/type-ascription-soundness.rs:7:17 | -LL | let ref x = arr: &[u8]; //~ ERROR mismatched types +LL | let ref x = arr: &[u8]; | ^^^ expected slice, found array of 3 elements | = note: expected type `&[u8]` @@ -10,7 +10,7 @@ LL | let ref x = arr: &[u8]; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-ascription-soundness.rs:8:21 | -LL | let ref mut x = arr: &[u8]; //~ ERROR mismatched types +LL | let ref mut x = arr: &[u8]; | ^^^ expected slice, found array of 3 elements | = note: expected type `&[u8]` @@ -19,7 +19,7 @@ LL | let ref mut x = arr: &[u8]; //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-ascription-soundness.rs:9:11 | -LL | match arr: &[u8] { //~ ERROR mismatched types +LL | match arr: &[u8] { | ^^^ expected slice, found array of 3 elements | = note: expected type `&[u8]` @@ -28,7 +28,7 @@ LL | match arr: &[u8] { //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-ascription-soundness.rs:12:17 | -LL | let _len = (arr: &[u8]).len(); //~ ERROR mismatched types +LL | let _len = (arr: &[u8]).len(); | ^^^ expected slice, found array of 3 elements | = note: expected type `&[u8]` diff --git a/src/test/ui/type/type-ascription-with-fn-call.stderr b/src/test/ui/type/type-ascription-with-fn-call.stderr index a290e69e0cb..eeaca5300f9 100644 --- a/src/test/ui/type/type-ascription-with-fn-call.stderr +++ b/src/test/ui/type/type-ascription-with-fn-call.stderr @@ -3,7 +3,7 @@ error[E0573]: expected type, found function `f` | LL | f() : | - help: did you mean to use `;` here instead? -LL | f(); //~ ERROR expected type, found function +LL | f(); | ^^^ | | | not a type diff --git a/src/test/ui/type/type-check/cannot_infer_local_or_array.stderr b/src/test/ui/type/type-check/cannot_infer_local_or_array.stderr index a2df3dcd8e7..17be67c6c3a 100644 --- a/src/test/ui/type/type-check/cannot_infer_local_or_array.stderr +++ b/src/test/ui/type/type-check/cannot_infer_local_or_array.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/cannot_infer_local_or_array.rs:2:13 | -LL | let x = []; //~ ERROR type annotations needed +LL | let x = []; | - ^^ cannot infer type | | | consider giving `x` a type diff --git a/src/test/ui/type/type-check/issue-22897.stderr b/src/test/ui/type/type-check/issue-22897.stderr index a4f1c4d5d4d..2b3f0696f3c 100644 --- a/src/test/ui/type/type-check/issue-22897.stderr +++ b/src/test/ui/type/type-check/issue-22897.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/issue-22897.rs:4:5 | -LL | []; //~ ERROR type annotations needed +LL | []; | ^^ cannot infer type for `[_; 0]` error: aborting due to previous error diff --git a/src/test/ui/type/type-check/issue-40294.stderr b/src/test/ui/type/type-check/issue-40294.stderr index d63abdbeb5d..254875fcaab 100644 --- a/src/test/ui/type/type-check/issue-40294.stderr +++ b/src/test/ui/type/type-check/issue-40294.stderr @@ -1,7 +1,7 @@ error[E0283]: type annotations required: cannot resolve `&'a T: Foo` --> $DIR/issue-40294.rs:5:1 | -LL | / fn foo<'a,'b,T>(x: &'a T, y: &'b T) //~ ERROR type annotations required +LL | / fn foo<'a,'b,T>(x: &'a T, y: &'b T) LL | | where &'a T : Foo, LL | | &'b T : Foo LL | | { diff --git a/src/test/ui/type/type-check/issue-41314.stderr b/src/test/ui/type/type-check/issue-41314.stderr index a4ae2a97134..3461ab4df60 100644 --- a/src/test/ui/type/type-check/issue-41314.stderr +++ b/src/test/ui/type/type-check/issue-41314.stderr @@ -1,13 +1,13 @@ error[E0026]: variant `X::Y` does not have a field named `number` --> $DIR/issue-41314.rs:7:16 | -LL | X::Y { number } => {} //~ ERROR does not have a field named `number` +LL | X::Y { number } => {} | ^^^^^^ variant `X::Y` does not have this field error[E0027]: pattern does not mention field `0` --> $DIR/issue-41314.rs:7:9 | -LL | X::Y { number } => {} //~ ERROR does not have a field named `number` +LL | X::Y { number } => {} | ^^^^^^^^^^^^^^^ missing field `0` | = note: trying to match a tuple variant with a struct variant pattern diff --git a/src/test/ui/type/type-check/missing_trait_impl.stderr b/src/test/ui/type/type-check/missing_trait_impl.stderr index 9f59e7162e0..69b531d0c84 100644 --- a/src/test/ui/type/type-check/missing_trait_impl.stderr +++ b/src/test/ui/type/type-check/missing_trait_impl.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `+` cannot be applied to type `T` --> $DIR/missing_trait_impl.rs:5:13 | -LL | let z = x + y; //~ ERROR binary operation `+` cannot be applied to type `T` +LL | let z = x + y; | ^^^^^ | = note: `T` might need a bound for `std::ops::Add` @@ -9,7 +9,7 @@ LL | let z = x + y; //~ ERROR binary operation `+` cannot be applied to type error[E0368]: binary assignment operation `+=` cannot be applied to type `T` --> $DIR/missing_trait_impl.rs:9:5 | -LL | x += x; //~ ERROR binary assignment operation `+=` cannot be applied to type `T` +LL | x += x; | -^^^^^ | | | cannot use `+=` on type `T` diff --git a/src/test/ui/type/type-check/unknown_type_for_closure.stderr b/src/test/ui/type/type-check/unknown_type_for_closure.stderr index 45142b556ec..5971f56c97f 100644 --- a/src/test/ui/type/type-check/unknown_type_for_closure.stderr +++ b/src/test/ui/type/type-check/unknown_type_for_closure.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/unknown_type_for_closure.rs:2:14 | -LL | let x = |_| { }; //~ ERROR type annotations needed +LL | let x = |_| { }; | ^ consider giving this closure parameter a type error: aborting due to previous error diff --git a/src/test/ui/type/type-dependent-def-issue-49241.stderr b/src/test/ui/type/type-dependent-def-issue-49241.stderr index 0af777fdcf9..5040b728c53 100644 --- a/src/test/ui/type/type-dependent-def-issue-49241.stderr +++ b/src/test/ui/type/type-dependent-def-issue-49241.stderr @@ -1,7 +1,7 @@ error[E0435]: attempt to use a non-constant value in a constant --> $DIR/type-dependent-def-issue-49241.rs:3:22 | -LL | const l: usize = v.count(); //~ ERROR attempt to use a non-constant value in a constant +LL | const l: usize = v.count(); | ^ non-constant value error[E0080]: evaluation of constant value failed diff --git a/src/test/ui/type/type-mismatch.stderr b/src/test/ui/type/type-mismatch.stderr index 0b239e91eb8..7aea9db6167 100644 --- a/src/test/ui/type/type-mismatch.stderr +++ b/src/test/ui/type/type-mismatch.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:17:17 | -LL | want::(f); //~ ERROR mismatched types +LL | want::(f); | ^ expected struct `foo`, found usize | = note: expected type `foo` @@ -10,7 +10,7 @@ LL | want::(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:18:17 | -LL | want::(f); //~ ERROR mismatched types +LL | want::(f); | ^ expected struct `bar`, found usize | = note: expected type `bar` @@ -19,7 +19,7 @@ LL | want::(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:19:24 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `Foo`, found usize | = note: expected type `Foo` @@ -28,7 +28,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:20:27 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `Foo`, found usize | = note: expected type `Foo` @@ -37,7 +37,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:21:22 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `Foo`, found usize | = note: expected type `Foo` @@ -46,7 +46,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:22:25 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `Foo`, found usize | = note: expected type `Foo` @@ -55,7 +55,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:23:22 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `Foo`, found usize | = note: expected type `Foo` @@ -64,7 +64,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:24:25 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `Foo`, found usize | = note: expected type `Foo` @@ -73,7 +73,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:28:19 | -LL | want::(f); //~ ERROR mismatched types +LL | want::(f); | ^ expected usize, found struct `foo` | = note: expected type `usize` @@ -82,7 +82,7 @@ LL | want::(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:29:17 | -LL | want::(f); //~ ERROR mismatched types +LL | want::(f); | ^ expected struct `bar`, found struct `foo` | = note: expected type `bar` @@ -91,7 +91,7 @@ LL | want::(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:30:24 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `Foo`, found struct `foo` | = note: expected type `Foo` @@ -100,7 +100,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:31:27 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `Foo`, found struct `foo` | = note: expected type `Foo` @@ -109,7 +109,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:32:22 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `Foo`, found struct `foo` | = note: expected type `Foo` @@ -118,7 +118,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:33:25 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `Foo`, found struct `foo` | = note: expected type `Foo` @@ -127,7 +127,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:34:22 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `Foo`, found struct `foo` | = note: expected type `Foo` @@ -136,7 +136,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:35:25 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `Foo`, found struct `foo` | = note: expected type `Foo` @@ -145,7 +145,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:39:19 | -LL | want::(f); //~ ERROR mismatched types +LL | want::(f); | ^ expected usize, found struct `Foo` | = note: expected type `usize` @@ -154,7 +154,7 @@ LL | want::(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:40:17 | -LL | want::(f); //~ ERROR mismatched types +LL | want::(f); | ^ expected struct `foo`, found struct `Foo` | = note: expected type `foo` @@ -163,7 +163,7 @@ LL | want::(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:41:17 | -LL | want::(f); //~ ERROR mismatched types +LL | want::(f); | ^ expected struct `bar`, found struct `Foo` | = note: expected type `bar` @@ -172,7 +172,7 @@ LL | want::(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:42:24 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected usize, found struct `foo` | = note: expected type `Foo` @@ -181,7 +181,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:43:27 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected usize, found struct `foo` | = note: expected type `Foo` @@ -190,7 +190,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:44:25 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `B`, found struct `A` | = note: expected type `Foo<_, B>` @@ -199,7 +199,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:45:22 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `bar`, found struct `foo` | = note: expected type `Foo` @@ -208,7 +208,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:46:25 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `bar`, found struct `foo` | = note: expected type `Foo` @@ -217,7 +217,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:47:23 | -LL | want::<&Foo>(f); //~ ERROR mismatched types +LL | want::<&Foo>(f); | ^ | | | expected &Foo, found struct `Foo` @@ -229,7 +229,7 @@ LL | want::<&Foo>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:48:26 | -LL | want::<&Foo>(f); //~ ERROR mismatched types +LL | want::<&Foo>(f); | ^ expected reference, found struct `Foo` | = note: expected type `&Foo` @@ -238,7 +238,7 @@ LL | want::<&Foo>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:52:19 | -LL | want::(f); //~ ERROR mismatched types +LL | want::(f); | ^ expected usize, found struct `Foo` | = note: expected type `usize` @@ -247,7 +247,7 @@ LL | want::(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:53:17 | -LL | want::(f); //~ ERROR mismatched types +LL | want::(f); | ^ expected struct `foo`, found struct `Foo` | = note: expected type `foo` @@ -256,7 +256,7 @@ LL | want::(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:54:17 | -LL | want::(f); //~ ERROR mismatched types +LL | want::(f); | ^ expected struct `bar`, found struct `Foo` | = note: expected type `bar` @@ -265,7 +265,7 @@ LL | want::(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:55:24 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected usize, found struct `foo` | = note: expected type `Foo` @@ -274,7 +274,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:56:27 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected usize, found struct `foo` | = note: expected type `Foo` @@ -283,7 +283,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:57:22 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `A`, found struct `B` | = note: expected type `Foo<_, A>` @@ -292,7 +292,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:58:22 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `bar`, found struct `foo` | = note: expected type `Foo` @@ -301,7 +301,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:59:25 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `bar`, found struct `foo` | = note: expected type `Foo` @@ -310,7 +310,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:60:23 | -LL | want::<&Foo>(f); //~ ERROR mismatched types +LL | want::<&Foo>(f); | ^ expected &Foo, found struct `Foo` | = note: expected type `&Foo` @@ -319,7 +319,7 @@ LL | want::<&Foo>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:61:26 | -LL | want::<&Foo>(f); //~ ERROR mismatched types +LL | want::<&Foo>(f); | ^ | | | expected reference, found struct `Foo` @@ -331,7 +331,7 @@ LL | want::<&Foo>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:65:19 | -LL | want::(f); //~ ERROR mismatched types +LL | want::(f); | ^ expected usize, found struct `Foo` | = note: expected type `usize` @@ -340,7 +340,7 @@ LL | want::(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:66:17 | -LL | want::(f); //~ ERROR mismatched types +LL | want::(f); | ^ expected struct `foo`, found struct `Foo` | = note: expected type `foo` @@ -349,7 +349,7 @@ LL | want::(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:67:17 | -LL | want::(f); //~ ERROR mismatched types +LL | want::(f); | ^ expected struct `bar`, found struct `Foo` | = note: expected type `bar` @@ -358,7 +358,7 @@ LL | want::(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:68:24 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected usize, found struct `foo` | = note: expected type `Foo` @@ -367,7 +367,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:69:27 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected usize, found struct `foo` | = note: expected type `Foo` @@ -376,7 +376,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:70:22 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `A`, found struct `B` | = note: expected type `Foo<_, A, B>` @@ -385,7 +385,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:71:25 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `B`, found struct `A` | = note: expected type `Foo<_, _, B>` @@ -394,7 +394,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:72:22 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `bar`, found struct `foo` | = note: expected type `Foo` @@ -403,7 +403,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:73:25 | -LL | want::>(f); //~ ERROR mismatched types +LL | want::>(f); | ^ expected struct `bar`, found struct `foo` | = note: expected type `Foo` @@ -412,7 +412,7 @@ LL | want::>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:74:23 | -LL | want::<&Foo>(f); //~ ERROR mismatched types +LL | want::<&Foo>(f); | ^ expected &Foo, found struct `Foo` | = note: expected type `&Foo` @@ -421,7 +421,7 @@ LL | want::<&Foo>(f); //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/type-mismatch.rs:75:26 | -LL | want::<&Foo>(f); //~ ERROR mismatched types +LL | want::<&Foo>(f); | ^ expected reference, found struct `Foo` | = note: expected type `&Foo` diff --git a/src/test/ui/type/type-params-in-different-spaces-1.stderr b/src/test/ui/type/type-params-in-different-spaces-1.stderr index e1b8ff70a63..b3b78424fd9 100644 --- a/src/test/ui/type/type-params-in-different-spaces-1.stderr +++ b/src/test/ui/type/type-params-in-different-spaces-1.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/type-params-in-different-spaces-1.rs:5:17 | -LL | *self + rhs //~ ERROR mismatched types +LL | *self + rhs | ^^^ expected Self, found type parameter | = note: expected type `Self` diff --git a/src/test/ui/type/type-params-in-different-spaces-2.stderr b/src/test/ui/type/type-params-in-different-spaces-2.stderr index 3d50c2c8baf..15db94ef1e3 100644 --- a/src/test/ui/type/type-params-in-different-spaces-2.stderr +++ b/src/test/ui/type/type-params-in-different-spaces-2.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `Self: Tr` is not satisfied --> $DIR/type-params-in-different-spaces-2.rs:10:9 | -LL | Tr::op(u) //~ ERROR E0277 +LL | Tr::op(u) | ^^^^^^ the trait `Tr` is not implemented for `Self` | = help: consider adding a `where Self: Tr` bound @@ -14,7 +14,7 @@ LL | fn op(_: T) -> Self; error[E0277]: the trait bound `Self: Tr` is not satisfied --> $DIR/type-params-in-different-spaces-2.rs:16:9 | -LL | Tr::op(u) //~ ERROR E0277 +LL | Tr::op(u) | ^^^^^^ the trait `Tr` is not implemented for `Self` | = help: consider adding a `where Self: Tr` bound diff --git a/src/test/ui/type/type-params-in-different-spaces-3.stderr b/src/test/ui/type/type-params-in-different-spaces-3.stderr index 69288ea491d..4e8134da2dd 100644 --- a/src/test/ui/type/type-params-in-different-spaces-3.stderr +++ b/src/test/ui/type/type-params-in-different-spaces-3.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | fn test(u: X) -> Self { | ---- expected `Self` because of return type -LL | u //~ ERROR mismatched types +LL | u | ^ expected Self, found type parameter | = note: expected type `Self` diff --git a/src/test/ui/type/type-path-err-node-types.stderr b/src/test/ui/type/type-path-err-node-types.stderr index e73b1fb029c..29a438a23c7 100644 --- a/src/test/ui/type/type-path-err-node-types.stderr +++ b/src/test/ui/type/type-path-err-node-types.stderr @@ -1,25 +1,25 @@ error[E0433]: failed to resolve: use of undeclared type or module `NonExistent` --> $DIR/type-path-err-node-types.rs:15:5 | -LL | NonExistent::Assoc::; //~ ERROR undeclared type or module `NonExistent` +LL | NonExistent::Assoc::; | ^^^^^^^^^^^ use of undeclared type or module `NonExistent` error[E0412]: cannot find type `Nonexistent` in this scope --> $DIR/type-path-err-node-types.rs:7:12 | -LL | let _: Nonexistent; //~ ERROR cannot find type `Nonexistent` in this scope +LL | let _: Nonexistent; | ^^^^^^^^^^^ not found in this scope error[E0576]: cannot find method or associated constant `nonexistent` in trait `Tr` --> $DIR/type-path-err-node-types.rs:11:21 | -LL | >::nonexistent(); //~ ERROR cannot find method or associated constant `nonexistent` +LL | >::nonexistent(); | ^^^^^^^^^^^ not found in `Tr` error[E0425]: cannot find value `nonexistent` in this scope --> $DIR/type-path-err-node-types.rs:19:5 | -LL | nonexistent.nonexistent::(); //~ ERROR cannot find value `nonexistent` +LL | nonexistent.nonexistent::(); | ^^^^^^^^^^^ not found in this scope error: aborting due to 4 previous errors diff --git a/src/test/ui/type/type-recursive.stderr b/src/test/ui/type/type-recursive.stderr index b1ecc1f91cb..72bf372e561 100644 --- a/src/test/ui/type/type-recursive.stderr +++ b/src/test/ui/type/type-recursive.stderr @@ -1,7 +1,7 @@ error[E0072]: recursive type `T1` has infinite size --> $DIR/type-recursive.rs:1:1 | -LL | struct T1 { //~ ERROR E0072 +LL | struct T1 { | ^^^^^^^^^ recursive type has infinite size LL | foo: isize, LL | foolish: T1 diff --git a/src/test/ui/type/type-shadow.stderr b/src/test/ui/type/type-shadow.stderr index 4c7aa00565a..f15bdc16d51 100644 --- a/src/test/ui/type/type-shadow.stderr +++ b/src/test/ui/type/type-shadow.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/type-shadow.rs:6:20 | -LL | let y: Y = "hello"; //~ ERROR mismatched types +LL | let y: Y = "hello"; | ^^^^^^^ expected isize, found reference | = note: expected type `isize` diff --git a/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr b/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr index bb63917fc08..f1118709962 100644 --- a/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr +++ b/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | fn ice(x: Box>) { | - possibly return type missing here? -LL | *x //~ ERROR mismatched types [E0308] +LL | *x | ^^ expected (), found trait std::iter::Iterator | = note: expected type `()` diff --git a/src/test/ui/typeck/typeck-auto-trait-no-supertraits-2.stderr b/src/test/ui/typeck/typeck-auto-trait-no-supertraits-2.stderr index 41bf3fd1c44..8755bcded9d 100644 --- a/src/test/ui/typeck/typeck-auto-trait-no-supertraits-2.stderr +++ b/src/test/ui/typeck/typeck-auto-trait-no-supertraits-2.stderr @@ -1,7 +1,7 @@ error[E0568]: auto traits cannot have super traits --> $DIR/typeck-auto-trait-no-supertraits-2.rs:3:1 | -LL | auto trait Magic : Sized where Option : Magic {} //~ ERROR E0568 +LL | auto trait Magic : Sized where Option : Magic {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/typeck/typeck-auto-trait-no-supertraits.stderr b/src/test/ui/typeck/typeck-auto-trait-no-supertraits.stderr index bf40eaad653..5a388834909 100644 --- a/src/test/ui/typeck/typeck-auto-trait-no-supertraits.stderr +++ b/src/test/ui/typeck/typeck-auto-trait-no-supertraits.stderr @@ -1,7 +1,7 @@ error[E0568]: auto traits cannot have super traits --> $DIR/typeck-auto-trait-no-supertraits.rs:27:1 | -LL | auto trait Magic: Copy {} //~ ERROR E0568 +LL | auto trait Magic: Copy {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr b/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr index 3f7e4a674e6..a31ee83ae1c 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr @@ -1,7 +1,7 @@ error[E0277]: `::AssocType` cannot be sent between threads safely --> $DIR/typeck-default-trait-impl-assoc-type.rs:9:5 | -LL | is_send::(); //~ ERROR E0277 +LL | is_send::(); | ^^^^^^^^^^^^^^^^^^^^^^^ `::AssocType` cannot be sent between threads safely | = help: the trait `std::marker::Send` is not implemented for `::AssocType` diff --git a/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr b/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr index 2bfb4110603..154b4042c68 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr @@ -1,7 +1,7 @@ error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/typeck-default-trait-impl-cross-crate-coherence.rs:13:1 | -LL | impl DefaultedTrait for (A,) { } //~ ERROR E0117 +LL | impl DefaultedTrait for (A,) { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | = note: the impl does not reference only types defined in this crate @@ -10,7 +10,7 @@ LL | impl DefaultedTrait for (A,) { } //~ ERROR E0117 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/typeck-default-trait-impl-cross-crate-coherence.rs:16:1 | -LL | impl !DefaultedTrait for (B,) { } //~ ERROR E0117 +LL | impl !DefaultedTrait for (B,) { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | = note: the impl does not reference only types defined in this crate @@ -19,13 +19,13 @@ LL | impl !DefaultedTrait for (B,) { } //~ ERROR E0117 error[E0321]: cross-crate traits with a default impl, like `lib::DefaultedTrait`, can only be implemented for a struct/enum type defined in the current crate --> $DIR/typeck-default-trait-impl-cross-crate-coherence.rs:20:1 | -LL | impl DefaultedTrait for Box { } //~ ERROR E0321 +LL | impl DefaultedTrait for Box { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait for type in another crate error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/typeck-default-trait-impl-cross-crate-coherence.rs:21:1 | -LL | impl DefaultedTrait for lib::Something { } //~ ERROR E0117 +LL | impl DefaultedTrait for lib::Something { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | = note: the impl does not reference only types defined in this crate diff --git a/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr b/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr index 736e1b8da7f..a850cc7b377 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr @@ -1,7 +1,7 @@ error[E0277]: `T` cannot be sent between threads safely --> $DIR/typeck-default-trait-impl-send-param.rs:5:5 | -LL | is_send::() //~ ERROR E0277 +LL | is_send::() | ^^^^^^^^^^^^ `T` cannot be sent between threads safely | = help: the trait `std::marker::Send` is not implemented for `T` diff --git a/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr b/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr index 759a16cdafd..2187c61fabf 100644 --- a/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr +++ b/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr @@ -28,7 +28,7 @@ LL | fn bar(self: &Bar, x: isize) -> isize { error[E0308]: mismatched method receiver --> $DIR/ufcs-explicit-self-bad.rs:37:21 | -LL | fn dummy2(self: &Bar) {} //~ ERROR mismatched method receiver +LL | fn dummy2(self: &Bar) {} | ^^^^^^^ lifetime mismatch | = note: expected type `&'a Bar` @@ -36,7 +36,7 @@ LL | fn dummy2(self: &Bar) {} //~ ERROR mismatched method receiver note: the anonymous lifetime #1 defined on the method body at 37:5... --> $DIR/ufcs-explicit-self-bad.rs:37:5 | -LL | fn dummy2(self: &Bar) {} //~ ERROR mismatched method receiver +LL | fn dummy2(self: &Bar) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 35:6 --> $DIR/ufcs-explicit-self-bad.rs:35:6 @@ -47,7 +47,7 @@ LL | impl<'a, T> SomeTrait for &'a Bar { error[E0308]: mismatched method receiver --> $DIR/ufcs-explicit-self-bad.rs:37:21 | -LL | fn dummy2(self: &Bar) {} //~ ERROR mismatched method receiver +LL | fn dummy2(self: &Bar) {} | ^^^^^^^ lifetime mismatch | = note: expected type `&'a Bar` @@ -60,7 +60,7 @@ LL | impl<'a, T> SomeTrait for &'a Bar { note: ...does not necessarily outlive the anonymous lifetime #1 defined on the method body at 37:5 --> $DIR/ufcs-explicit-self-bad.rs:37:5 | -LL | fn dummy2(self: &Bar) {} //~ ERROR mismatched method receiver +LL | fn dummy2(self: &Bar) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched method receiver diff --git a/src/test/ui/ufcs/ufcs-partially-resolved.stderr b/src/test/ui/ufcs/ufcs-partially-resolved.stderr index 3cd1cac71fa..799dbf7a6d2 100644 --- a/src/test/ui/ufcs/ufcs-partially-resolved.stderr +++ b/src/test/ui/ufcs/ufcs-partially-resolved.stderr @@ -1,163 +1,163 @@ error[E0433]: failed to resolve: not a module `Y` --> $DIR/ufcs-partially-resolved.rs:48:22 | -LL | let _: ::NN; //~ ERROR failed to resolve: not a module `Y` +LL | let _: ::NN; | ^ not a module `Y` error[E0433]: failed to resolve: not a module `Y` --> $DIR/ufcs-partially-resolved.rs:50:15 | -LL | ::NN; //~ ERROR failed to resolve: not a module `Y` +LL | ::NN; | ^ not a module `Y` error[E0576]: cannot find associated type `N` in trait `Tr` --> $DIR/ufcs-partially-resolved.rs:19:24 | -LL | let _: ::N; //~ ERROR cannot find associated type `N` in trait `Tr` +LL | let _: ::N; | ^ help: an associated type with a similar name exists: `Y` error[E0576]: cannot find associated type `N` in enum `E` --> $DIR/ufcs-partially-resolved.rs:20:23 | -LL | let _: ::N; //~ ERROR cannot find associated type `N` in enum `E` +LL | let _: ::N; | ^ not found in `E` error[E0576]: cannot find associated type `N` in `A` --> $DIR/ufcs-partially-resolved.rs:21:23 | -LL | let _: ::N; //~ ERROR cannot find associated type `N` in `A` +LL | let _: ::N; | ^ not found in `A` error[E0576]: cannot find method or associated constant `N` in trait `Tr` --> $DIR/ufcs-partially-resolved.rs:22:17 | -LL | ::N; //~ ERROR cannot find method or associated constant `N` in trait `Tr` +LL | ::N; | ^ help: a method with a similar name exists: `Y` error[E0576]: cannot find method or associated constant `N` in enum `E` --> $DIR/ufcs-partially-resolved.rs:23:16 | -LL | ::N; //~ ERROR cannot find method or associated constant `N` in enum `E` +LL | ::N; | ^ not found in `E` error[E0576]: cannot find method or associated constant `N` in `A` --> $DIR/ufcs-partially-resolved.rs:24:16 | -LL | ::N; //~ ERROR cannot find method or associated constant `N` in `A` +LL | ::N; | ^ not found in `A` error[E0575]: expected associated type, found variant `E::Y` --> $DIR/ufcs-partially-resolved.rs:26:12 | -LL | let _: ::Y; //~ ERROR expected associated type, found variant `E::Y` +LL | let _: ::Y; | ^^^^^^^^^^^^ not a associated type error[E0575]: expected method or associated constant, found unit variant `E::Y` --> $DIR/ufcs-partially-resolved.rs:28:5 | -LL | ::Y; //~ ERROR expected method or associated constant, found unit variant `E::Y` +LL | ::Y; | ^^^^^^^^^^^^ not a method or associated constant error[E0576]: cannot find associated type `N` in trait `Tr` --> $DIR/ufcs-partially-resolved.rs:30:24 | -LL | let _: ::N::NN; //~ ERROR cannot find associated type `N` in trait `Tr` +LL | let _: ::N::NN; | ^ help: an associated type with a similar name exists: `Y` error[E0576]: cannot find associated type `N` in enum `E` --> $DIR/ufcs-partially-resolved.rs:31:23 | -LL | let _: ::N::NN; //~ ERROR cannot find associated type `N` in enum `E` +LL | let _: ::N::NN; | ^ not found in `E` error[E0576]: cannot find associated type `N` in `A` --> $DIR/ufcs-partially-resolved.rs:32:23 | -LL | let _: ::N::NN; //~ ERROR cannot find associated type `N` in `A` +LL | let _: ::N::NN; | ^ not found in `A` error[E0576]: cannot find associated type `N` in trait `Tr` --> $DIR/ufcs-partially-resolved.rs:33:17 | -LL | ::N::NN; //~ ERROR cannot find associated type `N` in trait `Tr` +LL | ::N::NN; | ^ help: an associated type with a similar name exists: `Y` error[E0576]: cannot find associated type `N` in enum `E` --> $DIR/ufcs-partially-resolved.rs:34:16 | -LL | ::N::NN; //~ ERROR cannot find associated type `N` in enum `E` +LL | ::N::NN; | ^ not found in `E` error[E0576]: cannot find associated type `N` in `A` --> $DIR/ufcs-partially-resolved.rs:35:16 | -LL | ::N::NN; //~ ERROR cannot find associated type `N` in `A` +LL | ::N::NN; | ^ not found in `A` error[E0575]: expected associated type, found variant `E::Y` --> $DIR/ufcs-partially-resolved.rs:37:12 | -LL | let _: ::Y::NN; //~ ERROR expected associated type, found variant `E::Y` +LL | let _: ::Y::NN; | ^^^^^^^^^^^^^^^^ not a associated type error[E0575]: expected associated type, found variant `E::Y` --> $DIR/ufcs-partially-resolved.rs:39:5 | -LL | ::Y::NN; //~ ERROR expected associated type, found variant `E::Y` +LL | ::Y::NN; | ^^^^^^^^^^^^^^^^ not a associated type error[E0576]: cannot find associated type `NN` in `Tr::N` --> $DIR/ufcs-partially-resolved.rs:41:27 | -LL | let _: ::NN; //~ ERROR cannot find associated type `NN` in `Tr::N` +LL | let _: ::NN; | ^^ not found in `Tr::N` error[E0576]: cannot find associated type `NN` in `E::N` --> $DIR/ufcs-partially-resolved.rs:42:26 | -LL | let _: ::NN; //~ ERROR cannot find associated type `NN` in `E::N` +LL | let _: ::NN; | ^^ not found in `E::N` error[E0576]: cannot find associated type `NN` in `A::N` --> $DIR/ufcs-partially-resolved.rs:43:26 | -LL | let _: ::NN; //~ ERROR cannot find associated type `NN` in `A::N` +LL | let _: ::NN; | ^^ not found in `A::N` error[E0576]: cannot find method or associated constant `NN` in `Tr::N` --> $DIR/ufcs-partially-resolved.rs:44:20 | -LL | ::NN; //~ ERROR cannot find method or associated constant `NN` in `Tr::N` +LL | ::NN; | ^^ not found in `Tr::N` error[E0576]: cannot find method or associated constant `NN` in `E::N` --> $DIR/ufcs-partially-resolved.rs:45:19 | -LL | ::NN; //~ ERROR cannot find method or associated constant `NN` in `E::N` +LL | ::NN; | ^^ not found in `E::N` error[E0576]: cannot find method or associated constant `NN` in `A::N` --> $DIR/ufcs-partially-resolved.rs:46:19 | -LL | ::NN; //~ ERROR cannot find method or associated constant `NN` in `A::N` +LL | ::NN; | ^^ not found in `A::N` error[E0576]: cannot find associated type `NN` in `Tr::Y` --> $DIR/ufcs-partially-resolved.rs:47:27 | -LL | let _: ::NN; //~ ERROR cannot find associated type `NN` in `Tr::Y` +LL | let _: ::NN; | ^^ not found in `Tr::Y` error[E0576]: cannot find method or associated constant `NN` in `Tr::Y` --> $DIR/ufcs-partially-resolved.rs:49:20 | -LL | ::NN; //~ ERROR cannot find method or associated constant `NN` in `Tr::Y` +LL | ::NN; | ^^ not found in `Tr::Y` error[E0575]: expected associated type, found method `Dr::Z` --> $DIR/ufcs-partially-resolved.rs:52:12 | -LL | let _: ::Z; //~ ERROR expected associated type, found method `Dr::Z` +LL | let _: ::Z; | ^^^^^^^^^^^^- | | | help: an associated type with a similar name exists: `X` @@ -165,7 +165,7 @@ LL | let _: ::Z; //~ ERROR expected associated type, found method error[E0575]: expected method or associated constant, found associated type `Dr::X` --> $DIR/ufcs-partially-resolved.rs:53:5 | -LL | ::X; //~ ERROR expected method or associated constant, found associated type `Dr::X` +LL | ::X; | ^^^^^^^^^^^^- | | | help: a method with a similar name exists: `Z` @@ -175,7 +175,7 @@ LL | ::X; //~ ERROR expected method or associated constant, found error[E0575]: expected associated type, found method `Dr::Z` --> $DIR/ufcs-partially-resolved.rs:54:12 | -LL | let _: ::Z::N; //~ ERROR expected associated type, found method `Dr::Z` +LL | let _: ::Z::N; | ^^^^^^^^^^^^-^^^ | | | help: an associated type with a similar name exists: `X` @@ -183,13 +183,13 @@ LL | let _: ::Z::N; //~ ERROR expected associated type, found meth error[E0223]: ambiguous associated type --> $DIR/ufcs-partially-resolved.rs:36:12 | -LL | let _: ::Y::NN; //~ ERROR ambiguous associated type +LL | let _: ::Y::NN; | ^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<::Y as Trait>::NN` error[E0599]: no associated item named `NN` found for type `::Y` in the current scope --> $DIR/ufcs-partially-resolved.rs:38:20 | -LL | ::Y::NN; //~ ERROR no associated item named `NN` found for type `::Y` +LL | ::Y::NN; | ---------------^^ | | | associated item not found in `::Y` @@ -197,7 +197,7 @@ LL | ::Y::NN; //~ ERROR no associated item named `NN` found for ty error[E0599]: no associated item named `N` found for type `::X` in the current scope --> $DIR/ufcs-partially-resolved.rs:55:20 | -LL | ::X::N; //~ ERROR no associated item named `N` found for type `::X` +LL | ::X::N; | ---------------^ | | | associated item not found in `::X` diff --git a/src/test/ui/ui-testing-optout.stderr b/src/test/ui/ui-testing-optout.stderr index 5a662e0ea89..313e198e39e 100644 --- a/src/test/ui/ui-testing-optout.stderr +++ b/src/test/ui/ui-testing-optout.stderr @@ -1,19 +1,19 @@ error[E0412]: cannot find type `B` in this scope --> $DIR/ui-testing-optout.rs:4:10 | -4 | type A = B; //~ ERROR +4 | type A = B; | ^ help: a type alias with a similar name exists: `A` error[E0412]: cannot find type `D` in this scope --> $DIR/ui-testing-optout.rs:10:10 | -10 | type C = D; //~ ERROR +10 | type C = D; | ^ help: a type alias with a similar name exists: `A` error[E0412]: cannot find type `F` in this scope --> $DIR/ui-testing-optout.rs:95:10 | -95 | type E = F; //~ ERROR +95 | type E = F; | ^ help: a type alias with a similar name exists: `A` error: aborting due to 3 previous errors diff --git a/src/test/ui/unboxed-closures/unboxed-closure-illegal-move.stderr b/src/test/ui/unboxed-closures/unboxed-closure-illegal-move.stderr index ae83242d534..7620f6a3cbe 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-illegal-move.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-illegal-move.stderr @@ -3,7 +3,7 @@ error[E0507]: cannot move out of captured outer variable in an `Fn` closure | LL | let x = Box::new(0); | - captured outer variable -LL | let f = to_fn(|| drop(x)); //~ ERROR cannot move +LL | let f = to_fn(|| drop(x)); | ^ cannot move out of captured outer variable in an `Fn` closure error[E0507]: cannot move out of captured outer variable in an `FnMut` closure @@ -11,7 +11,7 @@ error[E0507]: cannot move out of captured outer variable in an `FnMut` closure | LL | let x = Box::new(0); | - captured outer variable -LL | let f = to_fn_mut(|| drop(x)); //~ ERROR cannot move +LL | let f = to_fn_mut(|| drop(x)); | ^ cannot move out of captured outer variable in an `FnMut` closure error[E0507]: cannot move out of captured outer variable in an `Fn` closure @@ -19,7 +19,7 @@ error[E0507]: cannot move out of captured outer variable in an `Fn` closure | LL | let x = Box::new(0); | - captured outer variable -LL | let f = to_fn(move || drop(x)); //~ ERROR cannot move +LL | let f = to_fn(move || drop(x)); | ^ cannot move out of captured outer variable in an `Fn` closure error[E0507]: cannot move out of captured outer variable in an `FnMut` closure @@ -27,7 +27,7 @@ error[E0507]: cannot move out of captured outer variable in an `FnMut` closure | LL | let x = Box::new(0); | - captured outer variable -LL | let f = to_fn_mut(move || drop(x)); //~ ERROR cannot move +LL | let f = to_fn_mut(move || drop(x)); | ^ cannot move out of captured outer variable in an `FnMut` closure error: aborting due to 4 previous errors diff --git a/src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.stderr b/src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.stderr index 1865e2486f1..e4aa54032e3 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.stderr @@ -4,7 +4,7 @@ error[E0595]: closure cannot assign to immutable local variable `x` LL | let x = 0; | - help: make this binding mutable: `mut x` ... -LL | || x = 1; //~ ERROR cannot assign +LL | || x = 1; | ^^ cannot borrow mutably error[E0595]: closure cannot assign to immutable local variable `x` @@ -13,7 +13,7 @@ error[E0595]: closure cannot assign to immutable local variable `x` LL | let x = 0; | - help: make this binding mutable: `mut x` ... -LL | || set(&mut x); //~ ERROR cannot assign +LL | || set(&mut x); | ^^ cannot borrow mutably error[E0595]: closure cannot assign to immutable local variable `x` @@ -22,7 +22,7 @@ error[E0595]: closure cannot assign to immutable local variable `x` LL | let x = 0; | - help: make this binding mutable: `mut x` ... -LL | || x = 1; //~ ERROR cannot assign +LL | || x = 1; | ^^ cannot borrow mutably error[E0595]: closure cannot assign to immutable local variable `x` @@ -31,7 +31,7 @@ error[E0595]: closure cannot assign to immutable local variable `x` LL | let x = 0; | - help: make this binding mutable: `mut x` ... -LL | || set(&mut x); //~ ERROR cannot assign +LL | || set(&mut x); | ^^ cannot borrow mutably error[E0594]: cannot assign to captured outer variable in an `FnMut` closure @@ -39,13 +39,13 @@ error[E0594]: cannot assign to captured outer variable in an `FnMut` closure | LL | let x = 0; | - help: consider making `x` mutable: `mut x` -LL | move || x = 1; //~ ERROR cannot assign +LL | move || x = 1; | ^^^^^ error[E0596]: cannot borrow captured outer variable in an `FnMut` closure as mutable --> $DIR/unboxed-closure-immutable-capture.rs:10:22 | -LL | move || set(&mut x); //~ ERROR cannot borrow +LL | move || set(&mut x); | ^ error[E0594]: cannot assign to captured outer variable in an `FnMut` closure @@ -54,13 +54,13 @@ error[E0594]: cannot assign to captured outer variable in an `FnMut` closure LL | let x = 0; | - help: consider making `x` mutable: `mut x` ... -LL | move || x = 1; //~ ERROR cannot assign +LL | move || x = 1; | ^^^^^ error[E0596]: cannot borrow captured outer variable in an `FnMut` closure as mutable --> $DIR/unboxed-closure-immutable-capture.rs:12:22 | -LL | move || set(&mut x); //~ ERROR cannot borrow +LL | move || set(&mut x); | ^ error: aborting due to 8 previous errors diff --git a/src/test/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr b/src/test/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr index fc455208518..0d3766426bd 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr @@ -1,7 +1,7 @@ error[E0644]: closure/generator type that references itself --> $DIR/unboxed-closure-no-cyclic-sig.rs:8:7 | -LL | g(|_| { }); //~ ERROR closure/generator type that references itself +LL | g(|_| { }); | ^^^^^^^^ cyclic type of infinite size | = note: closures cannot capture themselves or take themselves as argument; diff --git a/src/test/ui/unboxed-closures/unboxed-closure-region.stderr b/src/test/ui/unboxed-closures/unboxed-closure-region.stderr index a0f009c0689..f710342e2ce 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-region.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-region.stderr @@ -1,7 +1,7 @@ error[E0597]: `x` does not live long enough --> $DIR/unboxed-closure-region.rs:8:12 | -LL | || x //~ ERROR `x` does not live long enough +LL | || x | -- ^ borrowed value does not live long enough | | | capture occurs here diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr index e631c336788..8c3480744fe 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/unboxed-closure-sugar-lifetime-elision.rs:26:35 | -LL | let _: Foo(&isize, &usize) -> &usize; //~ ERROR missing lifetime specifier +LL | let _: Foo(&isize, &usize) -> &usize; | ^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2 diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr index 84ed797450c..304339c89e6 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr @@ -1,7 +1,7 @@ error[E0220]: associated type `Output` not found for `One<()>` --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters-1.rs:5:15 | -LL | fn foo(_: &One()) //~ ERROR associated type `Output` not found for `One<()>` +LL | fn foo(_: &One()) | ^^ associated type `Output` not found error: aborting due to previous error diff --git a/src/test/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr b/src/test/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr index 461eebc59c0..ac0e4ff13c7 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr @@ -3,7 +3,7 @@ error[E0503]: cannot use `x` because it was mutably borrowed | LL | let f = || x += 1; | -- borrow of `x` occurs here -LL | let _y = x; //~ ERROR cannot use `x` because it was mutably borrowed +LL | let _y = x; | ^^ use of borrowed `x` error: aborting due to previous error diff --git a/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr b/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr index 85d98c18d7f..47fe0ee72dc 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr @@ -16,7 +16,7 @@ error[E0373]: closure may outlive the current function, but it borrows `factoria | LL | let f = |x: u32| -> u32 { | ^^^^^^^^^^^^^^^ may outlive borrowed value `factorial` -LL | //~^ ERROR closure may outlive the current function, but it borrows `factorial` +LL | LL | let g = factorial.as_ref().unwrap(); | --------- `factorial` is borrowed here help: to force the closure to take ownership of `factorial` (and any other referenced variables), use the `move` keyword diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.stderr index bf43dc62744..526055ba04b 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.stderr @@ -1,7 +1,7 @@ error[E0312]: lifetime of reference outlives lifetime of borrowed content... --> $DIR/unboxed-closures-infer-argument-types-two-region-pointers.rs:17:15 | -LL | x.set(y); //~ ERROR E0312 +LL | x.set(y); | ^ | note: ...the reference is valid for the anonymous lifetime #3 defined on the body at 16:14... @@ -9,7 +9,7 @@ note: ...the reference is valid for the anonymous lifetime #3 defined on the bod | LL | doit(0, &|x, y| { | ______________^ -LL | | x.set(y); //~ ERROR E0312 +LL | | x.set(y); LL | | }); | |_____^ note: ...but the borrowed content is only valid for the anonymous lifetime #4 defined on the body at 16:14 @@ -17,7 +17,7 @@ note: ...but the borrowed content is only valid for the anonymous lifetime #4 de | LL | doit(0, &|x, y| { | ______________^ -LL | | x.set(y); //~ ERROR E0312 +LL | | x.set(y); LL | | }); | |_____^ diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-fn-once-move-from-projection.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-fn-once-move-from-projection.stderr index 384cd090cb3..9287353245e 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-fn-once-move-from-projection.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-fn-once-move-from-projection.stderr @@ -1,7 +1,7 @@ error[E0525]: expected a closure that implements the `Fn` trait, but this closure only implements `FnOnce` --> $DIR/unboxed-closures-infer-fn-once-move-from-projection.rs:14:13 | -LL | let c = || drop(y.0); //~ ERROR expected a closure that implements the `Fn` trait +LL | let c = || drop(y.0); | ^^^^^^^^-^^^ | | | | | closure is `FnOnce` because it moves the variable `y` out of its environment diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.stderr index bc839d7b536..c90c1507498 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.stderr @@ -4,16 +4,16 @@ error[E0595]: closure cannot assign to immutable local variable `tick1` LL | let tick1 = || { | ----- help: make this binding mutable: `mut tick1` ... -LL | let tick2 = || { //~ ERROR closure cannot assign to immutable local variable `tick1` +LL | let tick2 = || { | ^^ cannot borrow mutably error[E0596]: cannot borrow immutable local variable `tick2` as mutable --> $DIR/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs:20:5 | -LL | let tick2 = || { //~ ERROR closure cannot assign to immutable local variable `tick1` +LL | let tick2 = || { | ----- help: make this binding mutable: `mut tick2` ... -LL | tick2(); //~ ERROR cannot borrow +LL | tick2(); | ^^^^^ cannot borrow mutably error: aborting due to 2 previous errors diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.stderr index d4d285275e9..33e21544858 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow immutable local variable `tick` as mutable | LL | let tick = || counter += 1; | ---- help: make this binding mutable: `mut tick` -LL | tick(); //~ ERROR cannot borrow immutable local variable `tick` as mutable +LL | tick(); | ^^^^ cannot borrow mutably error: aborting due to previous error diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.stderr index 2137f9904ce..585577ae82a 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow immutable local variable `tick` as mutable | LL | let tick = move || counter += 1; | ---- help: make this binding mutable: `mut tick` -LL | tick(); //~ ERROR cannot borrow immutable local variable `tick` as mutable +LL | tick(); | ^^^^ cannot borrow mutably error: aborting due to previous error diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnonce-call-twice.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnonce-call-twice.stderr index 52650903ba3..0b9aa61a765 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnonce-call-twice.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnonce-call-twice.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `tick` | LL | tick(); | ---- value moved here -LL | tick(); //~ ERROR use of moved value: `tick` +LL | tick(); | ^^^^ value used here after move | note: closure cannot be invoked more than once because it moves the variable `counter` out of its environment diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnonce-move-call-twice.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnonce-move-call-twice.stderr index 23d61c33ffe..20773d561f9 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnonce-move-call-twice.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnonce-move-call-twice.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `tick` | LL | tick(); | ---- value moved here -LL | tick(); //~ ERROR use of moved value: `tick` +LL | tick(); | ^^^^ value used here after move | note: closure cannot be invoked more than once because it moves the variable `counter` out of its environment diff --git a/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.stderr b/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.stderr index 99fc287b1ee..055a1748db6 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.stderr @@ -3,7 +3,7 @@ error[E0595]: closure cannot assign to immutable local variable `n` | LL | let n = 0; | - help: make this binding mutable: `mut n` -LL | let mut f = to_fn_mut(|| { //~ ERROR closure cannot assign +LL | let mut f = to_fn_mut(|| { | ^^ cannot borrow mutably error[E0594]: cannot assign to captured outer variable in an `FnMut` closure @@ -12,13 +12,13 @@ error[E0594]: cannot assign to captured outer variable in an `FnMut` closure LL | let n = 0; | - help: consider making `n` mutable: `mut n` ... -LL | n += 1; //~ ERROR cannot assign +LL | n += 1; | ^^^^^^ error[E0594]: cannot assign to captured outer variable in an `Fn` closure --> $DIR/unboxed-closures-mutate-upvar.rs:46:9 | -LL | n += 1; //~ ERROR cannot assign +LL | n += 1; | ^^^^^^ | = note: `Fn` closures cannot capture their enclosing environment for modifications @@ -27,14 +27,14 @@ help: consider changing this closure to take self by mutable reference | LL | let mut f = to_fn(move || { | _______________________^ -LL | | n += 1; //~ ERROR cannot assign +LL | | n += 1; LL | | }); | |_____^ error[E0594]: cannot assign to captured outer variable in an `Fn` closure --> $DIR/unboxed-closures-mutate-upvar.rs:53:9 | -LL | n += 1; //~ ERROR cannot assign +LL | n += 1; | ^^^^^^ | = note: `Fn` closures cannot capture their enclosing environment for modifications @@ -43,7 +43,7 @@ help: consider changing this closure to take self by mutable reference | LL | let mut f = to_fn(move || { | _______________________^ -LL | | n += 1; //~ ERROR cannot assign +LL | | n += 1; LL | | }); | |_____^ diff --git a/src/test/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr b/src/test/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr index 1fccbb9c857..2e1845888a2 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `call` found for type `[closure@$DIR/unboxed-closures-static-call-wrong-trait.rs:6:26: 6:31]` in the current scope --> $DIR/unboxed-closures-static-call-wrong-trait.rs:7:10 | -LL | mut_.call((0, )); //~ ERROR no method named `call` found +LL | mut_.call((0, )); | ^^^^ | = note: mut_ is a function, perhaps you wish to call it diff --git a/src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr b/src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr index 82e8c63ce27..df31a8d6104 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/unboxed-closures-type-mismatch.rs:5:15 | -LL | let z = f(1_usize, 2); //~ ERROR mismatched types +LL | let z = f(1_usize, 2); | ^^^^^^^ expected isize, found usize error: aborting due to previous error diff --git a/src/test/ui/unconstrained-none.stderr b/src/test/ui/unconstrained-none.stderr index e0ddae4cc89..eb918b25d2b 100644 --- a/src/test/ui/unconstrained-none.stderr +++ b/src/test/ui/unconstrained-none.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/unconstrained-none.rs:4:5 | -LL | None; //~ ERROR type annotations needed [E0282] +LL | None; | ^^^^ cannot infer type for `T` error: aborting due to previous error diff --git a/src/test/ui/unconstrained-ref.stderr b/src/test/ui/unconstrained-ref.stderr index 7722963293f..d9a129a2d7b 100644 --- a/src/test/ui/unconstrained-ref.stderr +++ b/src/test/ui/unconstrained-ref.stderr @@ -1,7 +1,7 @@ error[E0282]: type annotations needed --> $DIR/unconstrained-ref.rs:6:5 | -LL | S { o: &None }; //~ ERROR type annotations needed [E0282] +LL | S { o: &None }; | ^ cannot infer type for `T` error: aborting due to previous error diff --git a/src/test/ui/underscore-ident-matcher.stderr b/src/test/ui/underscore-ident-matcher.stderr index 29fb9157b68..241c3d3d8ce 100644 --- a/src/test/ui/underscore-ident-matcher.stderr +++ b/src/test/ui/underscore-ident-matcher.stderr @@ -4,7 +4,7 @@ error: no rules expected the token `_` LL | macro_rules! identity { | --------------------- when calling this macro ... -LL | let identity!(_) = 10; //~ ERROR no rules expected the token `_` +LL | let identity!(_) = 10; | ^ no rules expected this token in macro call error: aborting due to previous error diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr index 904c6c23def..1ea9c423e5a 100644 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr +++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr @@ -1,13 +1,13 @@ error[E0106]: missing lifetime specifier --> $DIR/dyn-trait-underscore-in-struct.rs:9:24 | -LL | x: Box, //~ ERROR missing lifetime specifier +LL | x: Box, | ^^ expected lifetime parameter error[E0228]: the lifetime bound for this object type cannot be deduced from context; please supply an explicit bound --> $DIR/dyn-trait-underscore-in-struct.rs:9:12 | -LL | x: Box, //~ ERROR missing lifetime specifier +LL | x: Box, | ^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr index 4eb959311ca..69a9fd7a60c 100644 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr +++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr @@ -1,7 +1,7 @@ error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements --> $DIR/dyn-trait-underscore.rs:8:20 | -LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime +LL | Box::new(items.iter()) | ^^^^ | note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the function body at 6:1... @@ -9,13 +9,13 @@ note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on th | LL | / fn a(items: &[T]) -> Box> { LL | | // ^^^^^^^^^^^^^^^^^^^^^ bound *here* defaults to `'static` -LL | | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime +LL | | Box::new(items.iter()) LL | | } | |_^ note: ...so that reference does not outlive borrowed content --> $DIR/dyn-trait-underscore.rs:8:14 | -LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime +LL | Box::new(items.iter()) | ^^^^^ = note: but, the lifetime must be valid for the static lifetime... = note: ...so that the expression is assignable: diff --git a/src/test/ui/underscore-lifetime/in-fn-return-illegal.stderr b/src/test/ui/underscore-lifetime/in-fn-return-illegal.stderr index ec9fe6ad9ae..ed61bdfddda 100644 --- a/src/test/ui/underscore-lifetime/in-fn-return-illegal.stderr +++ b/src/test/ui/underscore-lifetime/in-fn-return-illegal.stderr @@ -1,7 +1,7 @@ error[E0106]: missing lifetime specifier --> $DIR/in-fn-return-illegal.rs:5:30 | -LL | fn foo(x: &u32, y: &u32) -> &'_ u32 { loop { } } //~ ERROR missing lifetime specifier +LL | fn foo(x: &u32, y: &u32) -> &'_ u32 { loop { } } | ^^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `x` or `y` diff --git a/src/test/ui/underscore-lifetime/in-struct.stderr b/src/test/ui/underscore-lifetime/in-struct.stderr index 2b19c6865dc..6bbdc71195a 100644 --- a/src/test/ui/underscore-lifetime/in-struct.stderr +++ b/src/test/ui/underscore-lifetime/in-struct.stderr @@ -1,13 +1,13 @@ error[E0106]: missing lifetime specifier --> $DIR/in-struct.rs:6:9 | -LL | x: &'_ u32, //~ ERROR missing lifetime specifier +LL | x: &'_ u32, | ^^ expected lifetime parameter error[E0106]: missing lifetime specifier --> $DIR/in-struct.rs:10:14 | -LL | Variant(&'_ u32), //~ ERROR missing lifetime specifier +LL | Variant(&'_ u32), | ^^ expected lifetime parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr b/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr index e0c2c89c08c..104e6388477 100644 --- a/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr +++ b/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr @@ -1,25 +1,25 @@ error[E0637]: `'_` cannot be used here --> $DIR/underscore-lifetime-binders.rs:4:8 | -LL | fn foo<'_> //~ ERROR cannot be used here +LL | fn foo<'_> | ^^ `'_` is a reserved lifetime name error[E0637]: `'_` cannot be used here --> $DIR/underscore-lifetime-binders.rs:10:21 | -LL | fn meh() -> Box Meh<'_>> //~ ERROR cannot be used here +LL | fn meh() -> Box Meh<'_>> | ^^ `'_` is a reserved lifetime name error[E0106]: missing lifetime specifier --> $DIR/underscore-lifetime-binders.rs:2:17 | -LL | struct Baz<'a>(&'_ &'a u8); //~ ERROR missing lifetime specifier +LL | struct Baz<'a>(&'_ &'a u8); | ^^ expected lifetime parameter error[E0106]: missing lifetime specifier --> $DIR/underscore-lifetime-binders.rs:10:29 | -LL | fn meh() -> Box Meh<'_>> //~ ERROR cannot be used here +LL | fn meh() -> Box Meh<'_>> | ^^ help: consider giving it a 'static lifetime: `'static` | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from @@ -27,7 +27,7 @@ LL | fn meh() -> Box Meh<'_>> //~ ERROR cannot be used here error[E0106]: missing lifetime specifier --> $DIR/underscore-lifetime-binders.rs:16:35 | -LL | fn foo2(_: &'_ u8, y: &'_ u8) -> &'_ u8 { y } //~ ERROR missing lifetime specifier +LL | fn foo2(_: &'_ u8, y: &'_ u8) -> &'_ u8 { y } | ^^ expected lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `_` or `y` diff --git a/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.stderr b/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.stderr index b653b30bf6b..76c14ccc14b 100644 --- a/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.stderr +++ b/src/test/ui/underscore-lifetime/underscore-lifetime-elison-mismatch.stderr @@ -1,7 +1,7 @@ error[E0623]: lifetime mismatch --> $DIR/underscore-lifetime-elison-mismatch.rs:1:49 | -LL | fn foo(x: &mut Vec<&'_ u8>, y: &'_ u8) { x.push(y); } //~ ERROR lifetime mismatch +LL | fn foo(x: &mut Vec<&'_ u8>, y: &'_ u8) { x.push(y); } | ------ ------ ^ ...but data from `y` flows into `x` here | | | these two types are declared with different lifetimes... diff --git a/src/test/ui/underscore-lifetime/underscore-outlives-bounds.stderr b/src/test/ui/underscore-lifetime/underscore-outlives-bounds.stderr index e4ff653f3ad..4b38a26f957 100644 --- a/src/test/ui/underscore-lifetime/underscore-outlives-bounds.stderr +++ b/src/test/ui/underscore-lifetime/underscore-outlives-bounds.stderr @@ -1,7 +1,7 @@ error[E0637]: `'_` cannot be used here --> $DIR/underscore-outlives-bounds.rs:7:10 | -LL | impl<'b: '_> Foo<'b> for i32 {} //~ ERROR `'_` cannot be used here +LL | impl<'b: '_> Foo<'b> for i32 {} | ^^ `'_` is a reserved lifetime name error: aborting due to previous error diff --git a/src/test/ui/underscore-lifetime/where-clauses.stderr b/src/test/ui/underscore-lifetime/where-clauses.stderr index 57fe2456f4c..1a3ea4af7e1 100644 --- a/src/test/ui/underscore-lifetime/where-clauses.stderr +++ b/src/test/ui/underscore-lifetime/where-clauses.stderr @@ -1,13 +1,13 @@ error[E0637]: `'_` cannot be used here --> $DIR/where-clauses.rs:3:10 | -LL | impl<'b: '_> Foo<'b> for i32 {} //~ ERROR `'_` cannot be used here +LL | impl<'b: '_> Foo<'b> for i32 {} | ^^ `'_` is a reserved lifetime name error[E0637]: `'_` cannot be used here --> $DIR/where-clauses.rs:5:9 | -LL | impl Foo<'static> for Vec {} //~ ERROR `'_` cannot be used here +LL | impl Foo<'static> for Vec {} | ^^ `'_` is a reserved lifetime name error: aborting due to 2 previous errors diff --git a/src/test/ui/unevaluated_fixed_size_array_len.stderr b/src/test/ui/unevaluated_fixed_size_array_len.stderr index 200cf2a994d..be6ed8d5623 100644 --- a/src/test/ui/unevaluated_fixed_size_array_len.stderr +++ b/src/test/ui/unevaluated_fixed_size_array_len.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `[(); 0]: Foo` is not satisfied --> $DIR/unevaluated_fixed_size_array_len.rs:12:5 | -LL | <[(); 0] as Foo>::foo() //~ ERROR E0277 +LL | <[(); 0] as Foo>::foo() | ^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `[(); 0]` | = help: the following implementations were found: diff --git a/src/test/ui/uninhabited/uninhabited-enum-cast.stderr b/src/test/ui/uninhabited/uninhabited-enum-cast.stderr index 36dab0c43eb..a39af7832f8 100644 --- a/src/test/ui/uninhabited/uninhabited-enum-cast.stderr +++ b/src/test/ui/uninhabited/uninhabited-enum-cast.stderr @@ -1,7 +1,7 @@ error[E0605]: non-primitive cast: `E` as `isize` --> $DIR/uninhabited-enum-cast.rs:4:20 | -LL | println!("{}", (e as isize).to_string()); //~ ERROR non-primitive cast +LL | println!("{}", (e as isize).to_string()); | ^^^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait diff --git a/src/test/ui/uninhabited/uninhabited-irrefutable.stderr b/src/test/ui/uninhabited/uninhabited-irrefutable.stderr index 2424252af2a..45976f8ac56 100644 --- a/src/test/ui/uninhabited/uninhabited-irrefutable.stderr +++ b/src/test/ui/uninhabited/uninhabited-irrefutable.stderr @@ -9,7 +9,7 @@ LL | | D(u32), LL | | } | |_- `Foo` defined here ... -LL | let Foo::D(_y) = x; //~ ERROR refutable pattern in local binding: `A(_)` not covered +LL | let Foo::D(_y) = x; | ^^^^^^^^^^ pattern `A(_)` not covered error: aborting due to previous error diff --git a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr index fec95ca1494..533cf595ef0 100644 --- a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr +++ b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr @@ -1,7 +1,7 @@ error[E0004]: non-exhaustive patterns: `Err(_)` not covered --> $DIR/uninhabited-matches-feature-gated.rs:5:19 | -LL | let _ = match x { //~ ERROR non-exhaustive +LL | let _ = match x { | ^ pattern `Err(_)` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -9,7 +9,7 @@ LL | let _ = match x { //~ ERROR non-exhaustive error[E0004]: non-exhaustive patterns: type `&Void` is non-empty --> $DIR/uninhabited-matches-feature-gated.rs:10:19 | -LL | let _ = match x {}; //~ ERROR non-exhaustive +LL | let _ = match x {}; | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -17,7 +17,7 @@ LL | let _ = match x {}; //~ ERROR non-exhaustive error[E0004]: non-exhaustive patterns: type `(Void,)` is non-empty --> $DIR/uninhabited-matches-feature-gated.rs:13:19 | -LL | let _ = match x {}; //~ ERROR non-exhaustive +LL | let _ = match x {}; | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -25,7 +25,7 @@ LL | let _ = match x {}; //~ ERROR non-exhaustive error[E0004]: non-exhaustive patterns: type `[Void; 1]` is non-empty --> $DIR/uninhabited-matches-feature-gated.rs:16:19 | -LL | let _ = match x {}; //~ ERROR non-exhaustive +LL | let _ = match x {}; | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -33,7 +33,7 @@ LL | let _ = match x {}; //~ ERROR non-exhaustive error[E0004]: non-exhaustive patterns: `&[_]` not covered --> $DIR/uninhabited-matches-feature-gated.rs:19:19 | -LL | let _ = match x { //~ ERROR non-exhaustive +LL | let _ = match x { | ^ pattern `&[_]` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms @@ -41,7 +41,7 @@ LL | let _ = match x { //~ ERROR non-exhaustive error[E0004]: non-exhaustive patterns: `Err(_)` not covered --> $DIR/uninhabited-matches-feature-gated.rs:27:19 | -LL | let _ = match x { //~ ERROR non-exhaustive +LL | let _ = match x { | ^ pattern `Err(_)` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms diff --git a/src/test/ui/uninhabited/uninhabited-patterns.stderr b/src/test/ui/uninhabited/uninhabited-patterns.stderr index eaae024cbf9..3e5329cfb30 100644 --- a/src/test/ui/uninhabited/uninhabited-patterns.stderr +++ b/src/test/ui/uninhabited/uninhabited-patterns.stderr @@ -1,7 +1,7 @@ error: unreachable pattern --> $DIR/uninhabited-patterns.rs:27:9 | -LL | &[..] => (), //~ ERROR unreachable pattern +LL | &[..] => (), | ^^^^^ | note: lint level defined here @@ -13,19 +13,19 @@ LL | #![deny(unreachable_patterns)] error: unreachable pattern --> $DIR/uninhabited-patterns.rs:32:9 | -LL | Ok(box _) => (), //~ ERROR unreachable pattern +LL | Ok(box _) => (), | ^^^^^^^^^ error: unreachable pattern --> $DIR/uninhabited-patterns.rs:34:9 | -LL | Err(&[..]) => (), //~ ERROR unreachable pattern +LL | Err(&[..]) => (), | ^^^^^^^^^^ error: unreachable pattern --> $DIR/uninhabited-patterns.rs:41:9 | -LL | Err(Ok(_y)) => (), //~ ERROR unreachable pattern +LL | Err(Ok(_y)) => (), | ^^^^^^^^^^^ error: unreachable pattern diff --git a/src/test/ui/union/union-borrow-move-parent-sibling.stderr b/src/test/ui/union/union-borrow-move-parent-sibling.stderr index 9058707e505..c1c6932e1e2 100644 --- a/src/test/ui/union/union-borrow-move-parent-sibling.stderr +++ b/src/test/ui/union/union-borrow-move-parent-sibling.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `u.y` as immutable because `u.x.0` is also borrowed | LL | let a = &mut u.x.0; | ----- mutable borrow occurs here -LL | let b = &u.y; //~ ERROR cannot borrow `u.y` +LL | let b = &u.y; | ^^^ immutable borrow occurs here LL | use_borrow(a); LL | } @@ -14,7 +14,7 @@ error[E0382]: use of moved value: `u.y` | LL | let a = u.x.0; | - value moved here -LL | let b = u.y; //~ ERROR use of moved value: `u.y` +LL | let b = u.y; | ^ value used here after move | = note: move occurs because `u.y` has type `[type error]`, which does not implement the `Copy` trait @@ -24,7 +24,7 @@ error[E0502]: cannot borrow `u.y` as immutable because `u.x.0.0` is also borrowe | LL | let a = &mut (u.x.0).0; | --------- mutable borrow occurs here -LL | let b = &u.y; //~ ERROR cannot borrow `u.y` +LL | let b = &u.y; | ^^^ immutable borrow occurs here LL | use_borrow(a); LL | } @@ -35,7 +35,7 @@ error[E0382]: use of moved value: `u.y` | LL | let a = (u.x.0).0; | - value moved here -LL | let b = u.y; //~ ERROR use of moved value: `u.y` +LL | let b = u.y; | ^ value used here after move | = note: move occurs because `u.y` has type `[type error]`, which does not implement the `Copy` trait @@ -45,7 +45,7 @@ error[E0502]: cannot borrow `u` (via `u.x`) as immutable because `u` is also bor | LL | let a = &mut *u.y; | ---- mutable borrow occurs here (via `*u.y`) -LL | let b = &u.x; //~ ERROR cannot borrow `u` (via `u.x`) +LL | let b = &u.x; | ^^^ immutable borrow of `u.x` -- which overlaps with `*u.y` -- occurs here LL | use_borrow(a); LL | } @@ -56,7 +56,7 @@ error[E0382]: use of moved value: `u.x` | LL | let a = *u.y; | - value moved here -LL | let b = u.x; //~ ERROR use of moved value: `u.x` +LL | let b = u.x; | ^ value used here after move | = note: move occurs because `u.x` has type `[type error]`, which does not implement the `Copy` trait diff --git a/src/test/ui/union/union-const-pat.stderr b/src/test/ui/union/union-const-pat.stderr index 5106721f310..dc87f4de521 100644 --- a/src/test/ui/union/union-const-pat.stderr +++ b/src/test/ui/union/union-const-pat.stderr @@ -1,7 +1,7 @@ error: cannot use unions in constant patterns --> $DIR/union-const-pat.rs:10:9 | -LL | C => {} //~ ERROR cannot use unions in constant patterns +LL | C => {} | ^ error: aborting due to previous error diff --git a/src/test/ui/union/union-copy.stderr b/src/test/ui/union/union-copy.stderr index b3991b5ba6a..a875ff660f9 100644 --- a/src/test/ui/union/union-copy.stderr +++ b/src/test/ui/union/union-copy.stderr @@ -4,7 +4,7 @@ error[E0204]: the trait `Copy` may not be implemented for this type LL | a: String | --------- this field does not implement `Copy` ... -LL | impl Copy for W {} //~ ERROR the trait `Copy` may not be implemented for this type +LL | impl Copy for W {} | ^^^^ error: aborting due to previous error diff --git a/src/test/ui/union/union-derive-clone.stderr b/src/test/ui/union/union-derive-clone.stderr index 9580a9710e1..7421bb73ec9 100644 --- a/src/test/ui/union/union-derive-clone.stderr +++ b/src/test/ui/union/union-derive-clone.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `U1: std::marker::Copy` is not satisfied --> $DIR/union-derive-clone.rs:3:10 | -LL | #[derive(Clone)] //~ ERROR the trait bound `U1: std::marker::Copy` is not satisfied +LL | #[derive(Clone)] | ^^^^^ the trait `std::marker::Copy` is not implemented for `U1` | = note: required by `std::clone::AssertParamIsCopy` @@ -12,7 +12,7 @@ error[E0599]: no method named `clone` found for type `U4` in the cu LL | union U4 { | ----------- method `clone` not found for this ... -LL | let w = u.clone(); //~ ERROR no method named `clone` found for type `U4` +LL | let w = u.clone(); | ^^^^^ | = note: the method `clone` exists but the following trait bounds were not satisfied: diff --git a/src/test/ui/union/union-derive-eq.stderr b/src/test/ui/union/union-derive-eq.stderr index d93dcd64efc..f63ab1704c4 100644 --- a/src/test/ui/union/union-derive-eq.stderr +++ b/src/test/ui/union/union-derive-eq.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `PartialEqNotEq: std::cmp::Eq` is not satisfied --> $DIR/union-derive-eq.rs:15:5 | -LL | a: PartialEqNotEq, //~ ERROR the trait bound `PartialEqNotEq: std::cmp::Eq` is not satisfied +LL | a: PartialEqNotEq, | ^^^^^^^^^^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `PartialEqNotEq` | = note: required by `std::cmp::AssertParamIsEq` diff --git a/src/test/ui/union/union-derive.stderr b/src/test/ui/union/union-derive.stderr index 0ec873553f3..919c6d5ceda 100644 --- a/src/test/ui/union/union-derive.stderr +++ b/src/test/ui/union/union-derive.stderr @@ -1,37 +1,37 @@ error: this trait cannot be derived for unions --> $DIR/union-derive.rs:9:5 | -LL | Debug, //~ ERROR this trait cannot be derived for unions +LL | Debug, | ^^^^^ error: this trait cannot be derived for unions --> $DIR/union-derive.rs:8:5 | -LL | Default, //~ ERROR this trait cannot be derived for unions +LL | Default, | ^^^^^^^ error: this trait cannot be derived for unions --> $DIR/union-derive.rs:7:5 | -LL | Hash, //~ ERROR this trait cannot be derived for unions +LL | Hash, | ^^^^ error: this trait cannot be derived for unions --> $DIR/union-derive.rs:6:5 | -LL | Ord, //~ ERROR this trait cannot be derived for unions +LL | Ord, | ^^^ error: this trait cannot be derived for unions --> $DIR/union-derive.rs:5:5 | -LL | PartialOrd, //~ ERROR this trait cannot be derived for unions +LL | PartialOrd, | ^^^^^^^^^^ error: this trait cannot be derived for unions --> $DIR/union-derive.rs:4:5 | -LL | PartialEq, //~ ERROR this trait cannot be derived for unions +LL | PartialEq, | ^^^^^^^^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/union/union-empty.stderr b/src/test/ui/union/union-empty.stderr index 71bba8fda2e..a80b27e6eb5 100644 --- a/src/test/ui/union/union-empty.stderr +++ b/src/test/ui/union/union-empty.stderr @@ -1,7 +1,7 @@ error: unions cannot have zero fields --> $DIR/union-empty.rs:1:1 | -LL | union U {} //~ ERROR unions cannot have zero fields +LL | union U {} | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/union/union-fields-1.stderr b/src/test/ui/union/union-fields-1.stderr index 3f165db4763..f848db726f9 100644 --- a/src/test/ui/union/union-fields-1.stderr +++ b/src/test/ui/union/union-fields-1.stderr @@ -1,7 +1,7 @@ error: field is never used: `c` --> $DIR/union-fields-1.rs:6:5 | -LL | c: u8, //~ ERROR field is never used +LL | c: u8, | ^^^^^ | note: lint level defined here @@ -13,19 +13,19 @@ LL | #![deny(dead_code)] error: field is never used: `a` --> $DIR/union-fields-1.rs:9:5 | -LL | a: u8, //~ ERROR field is never used +LL | a: u8, | ^^^^^ error: field is never used: `a` --> $DIR/union-fields-1.rs:13:20 | -LL | union NoDropLike { a: u8 } //~ ERROR field is never used +LL | union NoDropLike { a: u8 } | ^^^^^ error: field is never used: `c` --> $DIR/union-fields-1.rs:18:5 | -LL | c: u8, //~ ERROR field is never used +LL | c: u8, | ^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/union/union-fields-2.stderr b/src/test/ui/union/union-fields-2.stderr index 959554f6d22..b4d6ed9b020 100644 --- a/src/test/ui/union/union-fields-2.stderr +++ b/src/test/ui/union/union-fields-2.stderr @@ -1,19 +1,19 @@ error: union expressions should have exactly one field --> $DIR/union-fields-2.rs:7:13 | -LL | let u = U {}; //~ ERROR union expressions should have exactly one field +LL | let u = U {}; | ^ error: union expressions should have exactly one field --> $DIR/union-fields-2.rs:9:13 | -LL | let u = U { a: 0, b: 1 }; //~ ERROR union expressions should have exactly one field +LL | let u = U { a: 0, b: 1 }; | ^ error[E0560]: union `U` has no field named `c` --> $DIR/union-fields-2.rs:10:29 | -LL | let u = U { a: 0, b: 1, c: 2 }; //~ ERROR union expressions should have exactly one field +LL | let u = U { a: 0, b: 1, c: 2 }; | ^ `U` does not have this field | = note: available fields are: `a`, `b` @@ -21,61 +21,61 @@ LL | let u = U { a: 0, b: 1, c: 2 }; //~ ERROR union expressions should have error: union expressions should have exactly one field --> $DIR/union-fields-2.rs:10:13 | -LL | let u = U { a: 0, b: 1, c: 2 }; //~ ERROR union expressions should have exactly one field +LL | let u = U { a: 0, b: 1, c: 2 }; | ^ error: union expressions should have exactly one field --> $DIR/union-fields-2.rs:12:13 | -LL | let u = U { ..u }; //~ ERROR union expressions should have exactly one field +LL | let u = U { ..u }; | ^ error[E0436]: functional record update syntax requires a struct --> $DIR/union-fields-2.rs:12:19 | -LL | let u = U { ..u }; //~ ERROR union expressions should have exactly one field +LL | let u = U { ..u }; | ^ error: union patterns should have exactly one field --> $DIR/union-fields-2.rs:15:9 | -LL | let U {} = u; //~ ERROR union patterns should have exactly one field +LL | let U {} = u; | ^^^^ error: union patterns should have exactly one field --> $DIR/union-fields-2.rs:17:9 | -LL | let U { a, b } = u; //~ ERROR union patterns should have exactly one field +LL | let U { a, b } = u; | ^^^^^^^^^^ error[E0026]: union `U` does not have a field named `c` --> $DIR/union-fields-2.rs:18:19 | -LL | let U { a, b, c } = u; //~ ERROR union patterns should have exactly one field +LL | let U { a, b, c } = u; | ^ union `U` does not have this field error: union patterns should have exactly one field --> $DIR/union-fields-2.rs:18:9 | -LL | let U { a, b, c } = u; //~ ERROR union patterns should have exactly one field +LL | let U { a, b, c } = u; | ^^^^^^^^^^^^^ error: union patterns should have exactly one field --> $DIR/union-fields-2.rs:20:9 | -LL | let U { .. } = u; //~ ERROR union patterns should have exactly one field +LL | let U { .. } = u; | ^^^^^^^^ error: `..` cannot be used in union patterns --> $DIR/union-fields-2.rs:20:9 | -LL | let U { .. } = u; //~ ERROR union patterns should have exactly one field +LL | let U { .. } = u; | ^^^^^^^^ error: `..` cannot be used in union patterns --> $DIR/union-fields-2.rs:22:9 | -LL | let U { a, .. } = u; //~ ERROR `..` cannot be used in union patterns +LL | let U { a, .. } = u; | ^^^^^^^^^^^ error: aborting due to 13 previous errors diff --git a/src/test/ui/union/union-lint-dead-code.stderr b/src/test/ui/union/union-lint-dead-code.stderr index 6551523c54d..79c38a46814 100644 --- a/src/test/ui/union/union-lint-dead-code.stderr +++ b/src/test/ui/union/union-lint-dead-code.stderr @@ -1,7 +1,7 @@ error: field is never used: `b` --> $DIR/union-lint-dead-code.rs:5:5 | -LL | b: bool, //~ ERROR: field is never used +LL | b: bool, | ^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/union/union-nonrepresentable.stderr b/src/test/ui/union/union-nonrepresentable.stderr index 1a7603a4637..746c1033ea3 100644 --- a/src/test/ui/union/union-nonrepresentable.stderr +++ b/src/test/ui/union/union-nonrepresentable.stderr @@ -1,7 +1,7 @@ error[E0072]: recursive type `U` has infinite size --> $DIR/union-nonrepresentable.rs:3:1 | -LL | union U { //~ ERROR recursive type `U` has infinite size +LL | union U { | ^^^^^^^ recursive type has infinite size LL | a: u8, LL | b: U, diff --git a/src/test/ui/union/union-repr-c.stderr b/src/test/ui/union/union-repr-c.stderr index bac09c34b8b..40d9a50f1fa 100644 --- a/src/test/ui/union/union-repr-c.stderr +++ b/src/test/ui/union/union-repr-c.stderr @@ -1,7 +1,7 @@ error: `extern` block uses type `W` which is not FFI-safe: this union has unspecified layout --> $DIR/union-repr-c.rs:15:22 | -LL | static FOREIGN2: W; //~ ERROR union has unspecified layout +LL | static FOREIGN2: W; | ^ | note: lint level defined here diff --git a/src/test/ui/union/union-suggest-field.stderr b/src/test/ui/union/union-suggest-field.stderr index 8ea07360d0f..c737bc29d94 100644 --- a/src/test/ui/union/union-suggest-field.stderr +++ b/src/test/ui/union/union-suggest-field.stderr @@ -7,13 +7,13 @@ LL | let u = U { principle: 0 }; error[E0609]: no field `principial` on type `U` --> $DIR/union-suggest-field.rs:14:15 | -LL | let w = u.principial; //~ ERROR no field `principial` on type `U` +LL | let w = u.principial; | ^^^^^^^^^^ help: a field with a similar name exists: `principal` error[E0615]: attempted to take value of method `calculate` on type `U` --> $DIR/union-suggest-field.rs:18:15 | -LL | let y = u.calculate; //~ ERROR attempted to take value of method `calculate` on type `U` +LL | let y = u.calculate; | ^^^^^^^^^ help: use parentheses to call the method: `calculate()` error: aborting due to 3 previous errors diff --git a/src/test/ui/union/union-unsafe.stderr b/src/test/ui/union/union-unsafe.stderr index 35051485f6a..ab62508fcf6 100644 --- a/src/test/ui/union/union-unsafe.stderr +++ b/src/test/ui/union/union-unsafe.stderr @@ -1,7 +1,7 @@ error[E0133]: assignment to non-`Copy` union field is unsafe and requires unsafe function or block --> $DIR/union-unsafe.rs:21:5 | -LL | u3.a = T::default(); //~ ERROR assignment to non-`Copy` union field is unsafe +LL | u3.a = T::default(); | ^^^^ assignment to non-`Copy` union field | = note: the previous content of the field will be dropped, which causes undefined behavior if the field was not properly initialized @@ -9,7 +9,7 @@ LL | u3.a = T::default(); //~ ERROR assignment to non-`Copy` union field is error[E0133]: access to union field is unsafe and requires unsafe function or block --> $DIR/union-unsafe.rs:33:13 | -LL | let a = u1.a; //~ ERROR access to union field is unsafe +LL | let a = u1.a; | ^^^^ access to union field | = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior @@ -17,7 +17,7 @@ LL | let a = u1.a; //~ ERROR access to union field is unsafe error[E0133]: access to union field is unsafe and requires unsafe function or block --> $DIR/union-unsafe.rs:35:14 | -LL | let U1 { a } = u1; //~ ERROR access to union field is unsafe +LL | let U1 { a } = u1; | ^ access to union field | = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior @@ -25,7 +25,7 @@ LL | let U1 { a } = u1; //~ ERROR access to union field is unsafe error[E0133]: access to union field is unsafe and requires unsafe function or block --> $DIR/union-unsafe.rs:36:20 | -LL | if let U1 { a: 12 } = u1 {} //~ ERROR access to union field is unsafe +LL | if let U1 { a: 12 } = u1 {} | ^^ access to union field | = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior @@ -33,7 +33,7 @@ LL | if let U1 { a: 12 } = u1 {} //~ ERROR access to union field is unsafe error[E0133]: assignment to non-`Copy` union field is unsafe and requires unsafe function or block --> $DIR/union-unsafe.rs:40:5 | -LL | u2.a = String::from("new"); //~ ERROR assignment to non-`Copy` union field is unsafe +LL | u2.a = String::from("new"); | ^^^^ assignment to non-`Copy` union field | = note: the previous content of the field will be dropped, which causes undefined behavior if the field was not properly initialized @@ -41,7 +41,7 @@ LL | u2.a = String::from("new"); //~ ERROR assignment to non-`Copy` union fi error[E0133]: assignment to non-`Copy` union field is unsafe and requires unsafe function or block --> $DIR/union-unsafe.rs:44:5 | -LL | u3.a = String::from("new"); //~ ERROR assignment to non-`Copy` union field is unsafe +LL | u3.a = String::from("new"); | ^^^^ assignment to non-`Copy` union field | = note: the previous content of the field will be dropped, which causes undefined behavior if the field was not properly initialized diff --git a/src/test/ui/union/union-with-drop-fields-lint.stderr b/src/test/ui/union/union-with-drop-fields-lint.stderr index d8f456f2aef..2f90f240d2e 100644 --- a/src/test/ui/union/union-with-drop-fields-lint.stderr +++ b/src/test/ui/union/union-with-drop-fields-lint.stderr @@ -1,7 +1,7 @@ error: union contains a field with possibly non-trivial drop code, drop code of union fields is ignored when dropping the union --> $DIR/union-with-drop-fields-lint.rs:10:5 | -LL | a: String, //~ ERROR union contains a field with possibly non-trivial drop code +LL | a: String, | ^^^^^^^^^ | note: lint level defined here @@ -13,13 +13,13 @@ LL | #![deny(unions_with_drop_fields)] error: union contains a field with possibly non-trivial drop code, drop code of union fields is ignored when dropping the union --> $DIR/union-with-drop-fields-lint.rs:18:5 | -LL | a: S, //~ ERROR union contains a field with possibly non-trivial drop code +LL | a: S, | ^^^^ error: union contains a field with possibly non-trivial drop code, drop code of union fields is ignored when dropping the union --> $DIR/union-with-drop-fields-lint.rs:23:5 | -LL | a: T, //~ ERROR union contains a field with possibly non-trivial drop code +LL | a: T, | ^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/unique-object-noncopyable.stderr b/src/test/ui/unique-object-noncopyable.stderr index 78b46027c95..407905f52e7 100644 --- a/src/test/ui/unique-object-noncopyable.stderr +++ b/src/test/ui/unique-object-noncopyable.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `clone` found for type `std::boxed::Box` in the current scope --> $DIR/unique-object-noncopyable.rs:24:16 | -LL | let _z = y.clone(); //~ ERROR no method named `clone` found +LL | let _z = y.clone(); | ^^^^^ | = note: the method `clone` exists but the following trait bounds were not satisfied: diff --git a/src/test/ui/unique-pinned-nocopy.stderr b/src/test/ui/unique-pinned-nocopy.stderr index c7cabd172eb..0f6ba90afac 100644 --- a/src/test/ui/unique-pinned-nocopy.stderr +++ b/src/test/ui/unique-pinned-nocopy.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `clone` found for type `std::boxed::Box` in the current scope --> $DIR/unique-pinned-nocopy.rs:12:16 | -LL | let _j = i.clone(); //~ ERROR no method named `clone` found +LL | let _j = i.clone(); | ^^^^^ | = note: the method `clone` exists but the following trait bounds were not satisfied: diff --git a/src/test/ui/unknown-lint-tool-name.stderr b/src/test/ui/unknown-lint-tool-name.stderr index e9d44e2e3bc..a127af633dc 100644 --- a/src/test/ui/unknown-lint-tool-name.stderr +++ b/src/test/ui/unknown-lint-tool-name.stderr @@ -1,13 +1,13 @@ error[E0710]: an unknown tool name found in scoped lint: `foo::bar` --> $DIR/unknown-lint-tool-name.rs:1:9 | -LL | #![deny(foo::bar)] //~ ERROR an unknown tool name found in scoped lint: `foo::bar` +LL | #![deny(foo::bar)] | ^^^ error[E0710]: an unknown tool name found in scoped lint: `foo::bar` --> $DIR/unknown-lint-tool-name.rs:3:9 | -LL | #[allow(foo::bar)] //~ ERROR an unknown tool name found in scoped lint: `foo::bar` +LL | #[allow(foo::bar)] | ^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/unknown-tool-name.stderr b/src/test/ui/unknown-tool-name.stderr index 7bd2da28598..7a6ed57bda6 100644 --- a/src/test/ui/unknown-tool-name.stderr +++ b/src/test/ui/unknown-tool-name.stderr @@ -1,7 +1,7 @@ error[E0433]: failed to resolve: use of undeclared type or module `foo` --> $DIR/unknown-tool-name.rs:1:3 | -LL | #[foo::bar] //~ ERROR failed to resolve: use of undeclared type or module `foo` +LL | #[foo::bar] | ^^^ use of undeclared type or module `foo` error: aborting due to previous error diff --git a/src/test/ui/unop-move-semantics.stderr b/src/test/ui/unop-move-semantics.stderr index 65d2967c61e..e2fb4254920 100644 --- a/src/test/ui/unop-move-semantics.stderr +++ b/src/test/ui/unop-move-semantics.stderr @@ -4,7 +4,7 @@ error[E0382]: use of moved value: `x` LL | !x; | - value moved here LL | -LL | x.clone(); //~ ERROR: use of moved value +LL | x.clone(); | ^ value used here after move | = note: move occurs because `x` has type `T`, which does not implement the `Copy` trait @@ -15,7 +15,7 @@ error[E0505]: cannot move out of `x` because it is borrowed LL | let m = &x; | - borrow of `x` occurs here ... -LL | !x; //~ ERROR: cannot move out of `x` because it is borrowed +LL | !x; | ^ move out of `x` occurs here error[E0505]: cannot move out of `y` because it is borrowed @@ -24,19 +24,19 @@ error[E0505]: cannot move out of `y` because it is borrowed LL | let n = &mut y; | - borrow of `y` occurs here ... -LL | !y; //~ ERROR: cannot move out of `y` because it is borrowed +LL | !y; | ^ move out of `y` occurs here error[E0507]: cannot move out of borrowed content --> $DIR/unop-move-semantics.rs:24:6 | -LL | !*m; //~ ERROR: cannot move out of borrowed content +LL | !*m; | ^^ cannot move out of borrowed content error[E0507]: cannot move out of borrowed content --> $DIR/unop-move-semantics.rs:26:6 | -LL | !*n; //~ ERROR: cannot move out of borrowed content +LL | !*n; | ^^ cannot move out of borrowed content error: aborting due to 5 previous errors diff --git a/src/test/ui/unop-neg-bool.stderr b/src/test/ui/unop-neg-bool.stderr index c13c1a15a7c..18273013749 100644 --- a/src/test/ui/unop-neg-bool.stderr +++ b/src/test/ui/unop-neg-bool.stderr @@ -1,7 +1,7 @@ error[E0600]: cannot apply unary operator `-` to type `bool` --> $DIR/unop-neg-bool.rs:2:5 | -LL | -true; //~ ERROR cannot apply unary operator `-` to type `bool` +LL | -true; | ^^^^^ cannot apply unary operator `-` | = note: an implementation of `std::ops::Neg` might be missing for `bool` diff --git a/src/test/ui/unreachable/unreachable-arm.stderr b/src/test/ui/unreachable/unreachable-arm.stderr index 5b34482b59b..8e65745c7b0 100644 --- a/src/test/ui/unreachable/unreachable-arm.stderr +++ b/src/test/ui/unreachable/unreachable-arm.stderr @@ -1,7 +1,7 @@ error: unreachable pattern --> $DIR/unreachable-arm.rs:11:9 | -LL | Foo::A(_, 1) => { } //~ ERROR unreachable pattern +LL | Foo::A(_, 1) => { } | ^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/unreachable/unreachable-code.stderr b/src/test/ui/unreachable/unreachable-code.stderr index afb3629d5fd..803bb966be8 100644 --- a/src/test/ui/unreachable/unreachable-code.stderr +++ b/src/test/ui/unreachable/unreachable-code.stderr @@ -1,7 +1,7 @@ error: unreachable statement --> $DIR/unreachable-code.rs:7:3 | -LL | let a = 3; //~ ERROR: unreachable statement +LL | let a = 3; | ^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/unreachable/unreachable-in-call.stderr b/src/test/ui/unreachable/unreachable-in-call.stderr index b78070d3fb1..f8dd54590f6 100644 --- a/src/test/ui/unreachable/unreachable-in-call.stderr +++ b/src/test/ui/unreachable/unreachable-in-call.stderr @@ -1,7 +1,7 @@ error: unreachable expression --> $DIR/unreachable-in-call.rs:14:10 | -LL | get_u8()); //~ ERROR unreachable expression +LL | get_u8()); | ^^^^^^^^ | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![deny(unreachable_code)] error: unreachable expression --> $DIR/unreachable-in-call.rs:17:5 | -LL | / call( //~ ERROR unreachable expression +LL | / call( LL | | get_u8(), LL | | diverge()); | |__________________^ diff --git a/src/test/ui/unreachable/unreachable-variant.stderr b/src/test/ui/unreachable/unreachable-variant.stderr index 60fdae5cbce..276c77f9b42 100644 --- a/src/test/ui/unreachable/unreachable-variant.stderr +++ b/src/test/ui/unreachable/unreachable-variant.stderr @@ -1,7 +1,7 @@ error[E0603]: module `super_sekrit` is private --> $DIR/unreachable-variant.rs:6:21 | -LL | let _x = other::super_sekrit::sooper_sekrit::baz; //~ ERROR is private +LL | let _x = other::super_sekrit::sooper_sekrit::baz; | ^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/unreachable/unwarned-match-on-never.stderr b/src/test/ui/unreachable/unwarned-match-on-never.stderr index 8807e5f04e5..ccb70d74311 100644 --- a/src/test/ui/unreachable/unwarned-match-on-never.stderr +++ b/src/test/ui/unreachable/unwarned-match-on-never.stderr @@ -1,7 +1,7 @@ error: unreachable expression --> $DIR/unwarned-match-on-never.rs:10:5 | -LL | match x {} //~ ERROR unreachable expression +LL | match x {} | ^^^^^^^^^^ | note: lint level defined here @@ -13,13 +13,13 @@ LL | #![deny(unreachable_code)] error: unreachable arm --> $DIR/unwarned-match-on-never.rs:15:15 | -LL | () => () //~ ERROR unreachable arm +LL | () => () | ^^ error: unreachable expression --> $DIR/unwarned-match-on-never.rs:21:5 | -LL | / match () { //~ ERROR unreachable expression +LL | / match () { LL | | () => (), LL | | } | |_____^ diff --git a/src/test/ui/unresolved/unresolved-import-recovery.stderr b/src/test/ui/unresolved/unresolved-import-recovery.stderr index 0154d002efe..5e371b70bfa 100644 --- a/src/test/ui/unresolved/unresolved-import-recovery.stderr +++ b/src/test/ui/unresolved/unresolved-import-recovery.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `unresolved` --> $DIR/unresolved-import-recovery.rs:4:13 | -LL | pub use unresolved; //~ ERROR unresolved import `unresolved` +LL | pub use unresolved; | ^^^^^^^^^^ no `unresolved` in the root error: aborting due to previous error diff --git a/src/test/ui/unresolved/unresolved-import.stderr b/src/test/ui/unresolved/unresolved-import.stderr index 4f2fef938c9..fb5c0760d15 100644 --- a/src/test/ui/unresolved/unresolved-import.stderr +++ b/src/test/ui/unresolved/unresolved-import.stderr @@ -1,13 +1,13 @@ error[E0432]: unresolved import `foo` --> $DIR/unresolved-import.rs:1:5 | -LL | use foo::bar; //~ ERROR unresolved import `foo` [E0432] +LL | use foo::bar; | ^^^ maybe a missing `extern crate foo;`? error[E0432]: unresolved import `bar::Baz` --> $DIR/unresolved-import.rs:4:5 | -LL | use bar::Baz as x; //~ ERROR unresolved import `bar::Baz` [E0432] +LL | use bar::Baz as x; | ^^^^^---^^^^^ | | | | | help: a similar name exists in the module: `Bar` @@ -16,7 +16,7 @@ LL | use bar::Baz as x; //~ ERROR unresolved import `bar::Baz` [E0432] error[E0432]: unresolved import `food::baz` --> $DIR/unresolved-import.rs:9:5 | -LL | use food::baz; //~ ERROR unresolved import `food::baz` +LL | use food::baz; | ^^^^^^--- | | | | | help: a similar name exists in the module: `bag` @@ -25,7 +25,7 @@ LL | use food::baz; //~ ERROR unresolved import `food::baz` error[E0432]: unresolved import `food::beens` --> $DIR/unresolved-import.rs:14:12 | -LL | use food::{beens as Foo}; //~ ERROR unresolved import `food::beens` [E0432] +LL | use food::{beens as Foo}; | -----^^^^^^^ | | | no `beens` in `food` @@ -34,13 +34,13 @@ LL | use food::{beens as Foo}; //~ ERROR unresolved import `food::beens` [E0432] error[E0432]: unresolved import `MyEnum` --> $DIR/unresolved-import.rs:38:9 | -LL | use MyEnum::*; //~ ERROR unresolved import `MyEnum` [E0432] +LL | use MyEnum::*; | ^^^^^^ help: a similar path exists: `self::MyEnum` error[E0432]: unresolved import `Enum` --> $DIR/unresolved-import.rs:48:9 | -LL | use Enum::*; //~ ERROR unresolved import `Enum` [E0432] +LL | use Enum::*; | ^^^^ help: a similar path exists: `self::Enum` error: aborting due to 6 previous errors diff --git a/src/test/ui/unsafe/ranged_ints.stderr b/src/test/ui/unsafe/ranged_ints.stderr index f59a930b5a9..4e43df495c0 100644 --- a/src/test/ui/unsafe/ranged_ints.stderr +++ b/src/test/ui/unsafe/ranged_ints.stderr @@ -1,7 +1,7 @@ error[E0133]: initializing type with `rustc_layout_scalar_valid_range` attr is unsafe and requires unsafe function or block --> $DIR/ranged_ints.rs:7:14 | -LL | let _x = NonZero(0); //~ ERROR initializing type with `rustc_layout_scalar_valid_range` attr +LL | let _x = NonZero(0); | ^^^^^^^^^^ initializing type with `rustc_layout_scalar_valid_range` attr | = note: initializing a layout restricted type's field with a value outside the valid range is undefined behavior diff --git a/src/test/ui/unsafe/ranged_ints2.stderr b/src/test/ui/unsafe/ranged_ints2.stderr index ae63f47ed74..ee1d1f10e71 100644 --- a/src/test/ui/unsafe/ranged_ints2.stderr +++ b/src/test/ui/unsafe/ranged_ints2.stderr @@ -1,7 +1,7 @@ error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block --> $DIR/ranged_ints2.rs:8:13 | -LL | let y = &mut x.0; //~ ERROR mutation of layout constrained field is unsafe +LL | let y = &mut x.0; | ^^^^^^^^ mutation of layout constrained field | = note: mutating layout constrained fields cannot statically be checked for valid values diff --git a/src/test/ui/unsafe/ranged_ints2_const.stderr b/src/test/ui/unsafe/ranged_ints2_const.stderr index fb3841948f1..7d3e141ba70 100644 --- a/src/test/ui/unsafe/ranged_ints2_const.stderr +++ b/src/test/ui/unsafe/ranged_ints2_const.stderr @@ -1,7 +1,7 @@ error[E0723]: mutable references in const fn are unstable (see issue #57563) --> $DIR/ranged_ints2_const.rs:11:9 | -LL | let y = &mut x.0; //~ ERROR references in const fn are unstable +LL | let y = &mut x.0; | ^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | let y = &mut x.0; //~ ERROR references in const fn are unstable error[E0723]: mutable references in const fn are unstable (see issue #57563) --> $DIR/ranged_ints2_const.rs:18:9 | -LL | let y = unsafe { &mut x.0 }; //~ ERROR mutable references in const fn are unstable +LL | let y = unsafe { &mut x.0 }; | ^ | = help: add #![feature(const_fn)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | let y = unsafe { &mut x.0 }; //~ ERROR mutable references in const fn a error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block --> $DIR/ranged_ints2_const.rs:11:13 | -LL | let y = &mut x.0; //~ ERROR references in const fn are unstable +LL | let y = &mut x.0; | ^^^^^^^^ mutation of layout constrained field | = note: mutating layout constrained fields cannot statically be checked for valid values diff --git a/src/test/ui/unsafe/ranged_ints3.stderr b/src/test/ui/unsafe/ranged_ints3.stderr index 311a058fdb0..4d4c9167150 100644 --- a/src/test/ui/unsafe/ranged_ints3.stderr +++ b/src/test/ui/unsafe/ranged_ints3.stderr @@ -1,7 +1,7 @@ error[E0133]: borrow of layout constrained field with interior mutability is unsafe and requires unsafe function or block --> $DIR/ranged_ints3.rs:10:13 | -LL | let y = &x.0; //~ ERROR borrow of layout constrained field with interior mutability +LL | let y = &x.0; | ^^^^ borrow of layout constrained field with interior mutability | = note: references to fields of layout constrained fields lose the constraints. Coupled with interior mutability, the field can be changed to invalid values diff --git a/src/test/ui/unsafe/ranged_ints3_const.stderr b/src/test/ui/unsafe/ranged_ints3_const.stderr index d83d75787d9..ea15cd5e901 100644 --- a/src/test/ui/unsafe/ranged_ints3_const.stderr +++ b/src/test/ui/unsafe/ranged_ints3_const.stderr @@ -1,19 +1,19 @@ error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead --> $DIR/ranged_ints3_const.rs:12:13 | -LL | let y = &x.0; //~ ERROR cannot borrow a constant which may contain interior mutability +LL | let y = &x.0; | ^^^^ error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead --> $DIR/ranged_ints3_const.rs:19:22 | -LL | let y = unsafe { &x.0 }; //~ ERROR cannot borrow a constant which may contain interior mut +LL | let y = unsafe { &x.0 }; | ^^^^ error[E0133]: borrow of layout constrained field with interior mutability is unsafe and requires unsafe function or block --> $DIR/ranged_ints3_const.rs:12:13 | -LL | let y = &x.0; //~ ERROR cannot borrow a constant which may contain interior mutability +LL | let y = &x.0; | ^^^^ borrow of layout constrained field with interior mutability | = note: references to fields of layout constrained fields lose the constraints. Coupled with interior mutability, the field can be changed to invalid values diff --git a/src/test/ui/unsafe/ranged_ints4.stderr b/src/test/ui/unsafe/ranged_ints4.stderr index c6468b643b4..68c22589d3f 100644 --- a/src/test/ui/unsafe/ranged_ints4.stderr +++ b/src/test/ui/unsafe/ranged_ints4.stderr @@ -1,7 +1,7 @@ error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block --> $DIR/ranged_ints4.rs:8:5 | -LL | x.0 = 0; //~ ERROR mutation of layout constrained field is unsafe +LL | x.0 = 0; | ^^^^^^^ mutation of layout constrained field | = note: mutating layout constrained fields cannot statically be checked for valid values diff --git a/src/test/ui/unsafe/unsafe-around-compiler-generated-unsafe.stderr b/src/test/ui/unsafe/unsafe-around-compiler-generated-unsafe.stderr index 7751fe017b8..28b18d50fff 100644 --- a/src/test/ui/unsafe/unsafe-around-compiler-generated-unsafe.stderr +++ b/src/test/ui/unsafe/unsafe-around-compiler-generated-unsafe.stderr @@ -1,7 +1,7 @@ error: unnecessary `unsafe` block --> $DIR/unsafe-around-compiler-generated-unsafe.rs:6:5 | -LL | unsafe { println!("foo"); } //~ ERROR unnecessary `unsafe` +LL | unsafe { println!("foo"); } | ^^^^^^ unnecessary `unsafe` block | note: lint level defined here diff --git a/src/test/ui/unsafe/unsafe-fn-assign-deref-ptr.stderr b/src/test/ui/unsafe/unsafe-fn-assign-deref-ptr.stderr index 1e000062cc3..8f621d6ed11 100644 --- a/src/test/ui/unsafe/unsafe-fn-assign-deref-ptr.stderr +++ b/src/test/ui/unsafe/unsafe-fn-assign-deref-ptr.stderr @@ -1,7 +1,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block --> $DIR/unsafe-fn-assign-deref-ptr.rs:6:5 | -LL | *p = 0; //~ ERROR dereference of raw pointer is unsafe +LL | *p = 0; | ^^^^^^ dereference of raw pointer | = note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior diff --git a/src/test/ui/unsafe/unsafe-fn-autoderef.stderr b/src/test/ui/unsafe/unsafe-fn-autoderef.stderr index ded64ba69e8..20a88c35610 100644 --- a/src/test/ui/unsafe/unsafe-fn-autoderef.stderr +++ b/src/test/ui/unsafe/unsafe-fn-autoderef.stderr @@ -1,7 +1,7 @@ error[E0609]: no field `f` on type `*const Rec` --> $DIR/unsafe-fn-autoderef.rs:19:14 | -LL | return p.f; //~ ERROR no field `f` on type `*const Rec` +LL | return p.f; | --^ | | | help: `p` is a raw pointer; try dereferencing it: `(*p).f` diff --git a/src/test/ui/unsafe/unsafe-fn-called-from-safe.stderr b/src/test/ui/unsafe/unsafe-fn-called-from-safe.stderr index 4ad7c6e5c75..80d2c6ced24 100644 --- a/src/test/ui/unsafe/unsafe-fn-called-from-safe.stderr +++ b/src/test/ui/unsafe/unsafe-fn-called-from-safe.stderr @@ -1,7 +1,7 @@ error[E0133]: call to unsafe function is unsafe and requires unsafe function or block --> $DIR/unsafe-fn-called-from-safe.rs:4:5 | -LL | f(); //~ ERROR call to unsafe function is unsafe +LL | f(); | ^^^ call to unsafe function | = note: consult the function's documentation for information on how to avoid undefined behavior diff --git a/src/test/ui/unsafe/unsafe-fn-deref-ptr.stderr b/src/test/ui/unsafe/unsafe-fn-deref-ptr.stderr index d48a7681cad..e8e82dec0b0 100644 --- a/src/test/ui/unsafe/unsafe-fn-deref-ptr.stderr +++ b/src/test/ui/unsafe/unsafe-fn-deref-ptr.stderr @@ -1,7 +1,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block --> $DIR/unsafe-fn-deref-ptr.rs:2:12 | -LL | return *p; //~ ERROR dereference of raw pointer is unsafe +LL | return *p; | ^^ dereference of raw pointer | = note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior diff --git a/src/test/ui/unsafe/unsafe-fn-used-as-value.stderr b/src/test/ui/unsafe/unsafe-fn-used-as-value.stderr index f68e849341b..a7b73ec5342 100644 --- a/src/test/ui/unsafe/unsafe-fn-used-as-value.stderr +++ b/src/test/ui/unsafe/unsafe-fn-used-as-value.stderr @@ -1,7 +1,7 @@ error[E0133]: call to unsafe function is unsafe and requires unsafe function or block --> $DIR/unsafe-fn-used-as-value.rs:5:5 | -LL | x(); //~ ERROR call to unsafe function is unsafe +LL | x(); | ^^^ call to unsafe function | = note: consult the function's documentation for information on how to avoid undefined behavior diff --git a/src/test/ui/unsafe/unsafe-subtyping.stderr b/src/test/ui/unsafe/unsafe-subtyping.stderr index 3db0bcba81b..cac5ee07089 100644 --- a/src/test/ui/unsafe/unsafe-subtyping.stderr +++ b/src/test/ui/unsafe/unsafe-subtyping.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | fn foo(x: Option) -> Option { | ---------------------- expected `std::option::Option` because of return type -LL | x //~ ERROR mismatched types +LL | x | ^ expected unsafe fn, found normal fn | = note: expected type `std::option::Option` diff --git a/src/test/ui/unsized-locals/double-move.stderr b/src/test/ui/unsized-locals/double-move.stderr index 1009e913b7b..e6573af5a36 100644 --- a/src/test/ui/unsized-locals/double-move.stderr +++ b/src/test/ui/unsized-locals/double-move.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `y` | LL | drop_unsized(y); | - value moved here -LL | drop_unsized(y); //~ERROR use of moved value +LL | drop_unsized(y); | ^ value used here after move | = note: move occurs because `y` has type `str`, which does not implement the `Copy` trait @@ -13,7 +13,7 @@ error[E0382]: use of moved value: `x` | LL | let _y = *x; | -- value moved here -LL | drop_unsized(x); //~ERROR use of moved value +LL | drop_unsized(x); | ^ value used here after move | = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait @@ -23,7 +23,7 @@ error[E0382]: use of moved value: `*x` | LL | drop_unsized(x); | - value moved here -LL | let _y = *x; //~ERROR use of moved value +LL | let _y = *x; | ^^ value used here after move | = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait @@ -33,7 +33,7 @@ error[E0382]: use of moved value: `y` | LL | y.foo(); | - value moved here -LL | y.foo(); //~ERROR use of moved value +LL | y.foo(); | ^ value used here after move | = note: move occurs because `y` has type `str`, which does not implement the `Copy` trait @@ -43,7 +43,7 @@ error[E0382]: use of moved value: `*x` | LL | let _y = *x; | -- value moved here -LL | x.foo(); //~ERROR use of moved value +LL | x.foo(); | ^ value used here after move | = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait @@ -53,7 +53,7 @@ error[E0382]: use of moved value: `*x` | LL | x.foo(); | - value moved here -LL | let _y = *x; //~ERROR use of moved value +LL | let _y = *x; | ^^ value used here after move | = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait diff --git a/src/test/ui/unused/unused-attr.stderr b/src/test/ui/unused/unused-attr.stderr index 6d8a4dd84e6..6f096d74144 100644 --- a/src/test/ui/unused/unused-attr.stderr +++ b/src/test/ui/unused/unused-attr.stderr @@ -1,7 +1,7 @@ error: unused attribute --> $DIR/unused-attr.rs:7:1 | -LL | #[foo] //~ ERROR unused attribute +LL | #[foo] | ^^^^^^ | note: lint level defined here @@ -13,85 +13,85 @@ LL | #![deny(unused_attributes)] error: unused attribute --> $DIR/unused-attr.rs:10:1 | -LL | #[foo] //~ ERROR unused attribute +LL | #[foo] | ^^^^^^ error: unused attribute --> $DIR/unused-attr.rs:15:5 | -LL | #[foo] //~ ERROR unused attribute +LL | #[foo] | ^^^^^^ error: unused attribute --> $DIR/unused-attr.rs:13:1 | -LL | #[foo] //~ ERROR unused attribute +LL | #[foo] | ^^^^^^ error: unused attribute --> $DIR/unused-attr.rs:23:9 | -LL | #[foo] //~ ERROR unused attribute +LL | #[foo] | ^^^^^^ error: unused attribute --> $DIR/unused-attr.rs:21:5 | -LL | #[foo] //~ ERROR unused attribute +LL | #[foo] | ^^^^^^ error: unused attribute --> $DIR/unused-attr.rs:19:1 | -LL | #[foo] //~ ERROR unused attribute +LL | #[foo] | ^^^^^^ error: unused attribute --> $DIR/unused-attr.rs:31:9 | -LL | #[foo] //~ ERROR unused attribute +LL | #[foo] | ^^^^^^ error: unused attribute --> $DIR/unused-attr.rs:28:1 | -LL | #[foo] //~ ERROR unused attribute +LL | #[foo] | ^^^^^^ error: unused attribute --> $DIR/unused-attr.rs:38:5 | -LL | #[foo] //~ ERROR unused attribute +LL | #[foo] | ^^^^^^ error: unused attribute --> $DIR/unused-attr.rs:36:1 | -LL | #[foo] //~ ERROR unused attribute +LL | #[foo] | ^^^^^^ error: unused attribute --> $DIR/unused-attr.rs:44:5 | -LL | #[foo] //~ ERROR unused attribute +LL | #[foo] | ^^^^^^ error: unused attribute --> $DIR/unused-attr.rs:46:5 | -LL | #[foo] //~ ERROR unused attribute +LL | #[foo] | ^^^^^^ error: unused attribute --> $DIR/unused-attr.rs:42:1 | -LL | #[foo] //~ ERROR unused attribute +LL | #[foo] | ^^^^^^ error: unused attribute --> $DIR/unused-attr.rs:5:1 | -LL | #![foo] //~ ERROR unused attribute +LL | #![foo] | ^^^^^^^ error: aborting due to 15 previous errors diff --git a/src/test/ui/unused/unused-macro-rules.stderr b/src/test/ui/unused/unused-macro-rules.stderr index c6ec064096b..5c0b9f262b8 100644 --- a/src/test/ui/unused/unused-macro-rules.stderr +++ b/src/test/ui/unused/unused-macro-rules.stderr @@ -1,7 +1,7 @@ error: unused macro definition --> $DIR/unused-macro-rules.rs:4:1 | -LL | / macro_rules! unused { //~ ERROR: unused macro definition +LL | / macro_rules! unused { LL | | () => {}; LL | | } | |_^ @@ -15,7 +15,7 @@ LL | #![deny(unused_macros)] error: unused macro definition --> $DIR/unused-macro-rules.rs:11:9 | -LL | / macro_rules! m { //~ ERROR: unused macro definition +LL | / macro_rules! m { LL | | () => {}; LL | | } | |_________^ @@ -26,7 +26,7 @@ LL | create_macro!(); error: unused macro definition --> $DIR/unused-macro-rules.rs:24:5 | -LL | / macro_rules! unused { //~ ERROR: unused macro definition +LL | / macro_rules! unused { LL | | () => {}; LL | | } | |_____^ diff --git a/src/test/ui/unused/unused-macro-with-bad-frag-spec.stderr b/src/test/ui/unused/unused-macro-with-bad-frag-spec.stderr index e4624a5fe05..6edf0a2cf8d 100644 --- a/src/test/ui/unused/unused-macro-with-bad-frag-spec.stderr +++ b/src/test/ui/unused/unused-macro-with-bad-frag-spec.stderr @@ -1,7 +1,7 @@ error: invalid fragment specifier `t_ty` --> $DIR/unused-macro-with-bad-frag-spec.rs:6:6 | -LL | ($wrong:t_ty) => () //~ ERROR invalid fragment specifier `t_ty` +LL | ($wrong:t_ty) => () | ^^^^^^^^^^^ | = help: valid fragment specifiers are `ident`, `block`, `stmt`, `expr`, `pat`, `ty`, `lifetime`, `literal`, `path`, `meta`, `tt`, `item` and `vis` diff --git a/src/test/ui/unused/unused-macro-with-follow-violation.stderr b/src/test/ui/unused/unused-macro-with-follow-violation.stderr index dfeb3a407e5..5eced4f06c0 100644 --- a/src/test/ui/unused/unused-macro-with-follow-violation.stderr +++ b/src/test/ui/unused/unused-macro-with-follow-violation.stderr @@ -1,7 +1,7 @@ error: `$e:expr` is followed by `+`, which is not allowed for `expr` fragments --> $DIR/unused-macro-with-follow-violation.rs:4:14 | -LL | ($e:expr +) => () //~ ERROR not allowed for `expr` fragments +LL | ($e:expr +) => () | ^ not allowed after `expr` fragments | = note: allowed there are: `=>`, `,` or `;` diff --git a/src/test/ui/unused/unused-macro.stderr b/src/test/ui/unused/unused-macro.stderr index a83b5be5fbf..d18fe82564e 100644 --- a/src/test/ui/unused/unused-macro.stderr +++ b/src/test/ui/unused/unused-macro.stderr @@ -1,7 +1,7 @@ error: unused macro definition --> $DIR/unused-macro.rs:5:1 | -LL | / macro unused { //~ ERROR: unused macro definition +LL | / macro unused { LL | | () => {} LL | | } | |_^ @@ -15,7 +15,7 @@ LL | #![deny(unused_macros)] error: unused macro definition --> $DIR/unused-macro.rs:15:5 | -LL | / macro unused { //~ ERROR: unused macro definition +LL | / macro unused { LL | | () => {} LL | | } | |_____^ @@ -29,7 +29,7 @@ LL | #[deny(unused_macros)] error: unused macro definition --> $DIR/unused-macro.rs:21:5 | -LL | / pub(crate) macro unused { //~ ERROR: unused macro definition +LL | / pub(crate) macro unused { LL | | () => {} LL | | } | |_____^ diff --git a/src/test/ui/unused/unused-result.stderr b/src/test/ui/unused/unused-result.stderr index 2eb53eac406..e2aee75f3ed 100644 --- a/src/test/ui/unused/unused-result.stderr +++ b/src/test/ui/unused/unused-result.stderr @@ -1,7 +1,7 @@ error: unused `MustUse` that must be used --> $DIR/unused-result.rs:21:5 | -LL | foo::(); //~ ERROR: unused `MustUse` that must be used +LL | foo::(); | ^^^^^^^^^^^^^^^^^ | note: lint level defined here @@ -13,7 +13,7 @@ LL | #![deny(unused_results, unused_must_use)] error: unused `MustUseMsg` that must be used --> $DIR/unused-result.rs:22:5 | -LL | foo::(); //~ ERROR: unused `MustUseMsg` that must be used +LL | foo::(); | ^^^^^^^^^^^^^^^^^^^^ | = note: some message @@ -21,7 +21,7 @@ LL | foo::(); //~ ERROR: unused `MustUseMsg` that must be used error: unused result --> $DIR/unused-result.rs:34:5 | -LL | foo::(); //~ ERROR: unused result +LL | foo::(); | ^^^^^^^^^^^^^^^ | note: lint level defined here @@ -33,13 +33,13 @@ LL | #![deny(unused_results, unused_must_use)] error: unused `MustUse` that must be used --> $DIR/unused-result.rs:35:5 | -LL | foo::(); //~ ERROR: unused `MustUse` that must be used +LL | foo::(); | ^^^^^^^^^^^^^^^^^ error: unused `MustUseMsg` that must be used --> $DIR/unused-result.rs:36:5 | -LL | foo::(); //~ ERROR: unused `MustUseMsg` that must be used +LL | foo::(); | ^^^^^^^^^^^^^^^^^^^^ | = note: some message diff --git a/src/test/ui/use/use-after-move-based-on-type.stderr b/src/test/ui/use/use-after-move-based-on-type.stderr index 2282cdfad14..b9e0aaf1f84 100644 --- a/src/test/ui/use/use-after-move-based-on-type.stderr +++ b/src/test/ui/use/use-after-move-based-on-type.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `x` | LL | let _y = x; | -- value moved here -LL | println!("{}", x); //~ ERROR use of moved value +LL | println!("{}", x); | ^ value used here after move | = note: move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait diff --git a/src/test/ui/use/use-after-move-self-based-on-type.stderr b/src/test/ui/use/use-after-move-self-based-on-type.stderr index a3acc1aad0f..d1d26069fdf 100644 --- a/src/test/ui/use/use-after-move-self-based-on-type.stderr +++ b/src/test/ui/use/use-after-move-self-based-on-type.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `self.x` | LL | self.bar(); | ---- value moved here -LL | return self.x; //~ ERROR use of moved value: `self.x` +LL | return self.x; | ^^^^^^ value used here after move | = note: move occurs because `self` has type `S`, which does not implement the `Copy` trait diff --git a/src/test/ui/use/use-after-move-self.stderr b/src/test/ui/use/use-after-move-self.stderr index 3cb77acaf3d..2c4bd202681 100644 --- a/src/test/ui/use/use-after-move-self.stderr +++ b/src/test/ui/use/use-after-move-self.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `*self.x` | LL | self.bar(); | ---- value moved here -LL | return *self.x; //~ ERROR use of moved value: `*self.x` +LL | return *self.x; | ^^^^^^^ value used here after move | = note: move occurs because `self` has type `S`, which does not implement the `Copy` trait diff --git a/src/test/ui/use/use-from-trait-xc.stderr b/src/test/ui/use/use-from-trait-xc.stderr index 8ff75b503d5..97dc603f9eb 100644 --- a/src/test/ui/use/use-from-trait-xc.stderr +++ b/src/test/ui/use/use-from-trait-xc.stderr @@ -19,13 +19,13 @@ LL | use use_from_trait_xc::Trait::CONST; error[E0432]: unresolved import `use_from_trait_xc::Foo` --> $DIR/use-from-trait-xc.rs:14:24 | -LL | use use_from_trait_xc::Foo::new; //~ ERROR struct `Foo` is private +LL | use use_from_trait_xc::Foo::new; | ^^^ not a module `Foo` error[E0432]: unresolved import `use_from_trait_xc::Foo` --> $DIR/use-from-trait-xc.rs:17:24 | -LL | use use_from_trait_xc::Foo::C; //~ ERROR struct `Foo` is private +LL | use use_from_trait_xc::Foo::C; | ^^^ not a module `Foo` error[E0432]: unresolved import `use_from_trait_xc::Bar` @@ -43,13 +43,13 @@ LL | use use_from_trait_xc::Baz::new as baznew; error[E0603]: struct `Foo` is private --> $DIR/use-from-trait-xc.rs:14:24 | -LL | use use_from_trait_xc::Foo::new; //~ ERROR struct `Foo` is private +LL | use use_from_trait_xc::Foo::new; | ^^^ error[E0603]: struct `Foo` is private --> $DIR/use-from-trait-xc.rs:17:24 | -LL | use use_from_trait_xc::Foo::C; //~ ERROR struct `Foo` is private +LL | use use_from_trait_xc::Foo::C; | ^^^ error: aborting due to 9 previous errors diff --git a/src/test/ui/use/use-mod/use-mod-3.stderr b/src/test/ui/use/use-mod/use-mod-3.stderr index c644ec752f9..0c800ec35e4 100644 --- a/src/test/ui/use/use-mod/use-mod-3.stderr +++ b/src/test/ui/use/use-mod/use-mod-3.stderr @@ -1,13 +1,13 @@ error[E0603]: module `bar` is private --> $DIR/use-mod-3.rs:1:10 | -LL | use foo::bar::{ //~ ERROR module `bar` is private +LL | use foo::bar::{ | ^^^ error[E0603]: module `bar` is private --> $DIR/use-mod-3.rs:4:10 | -LL | use foo::bar::{ //~ ERROR module `bar` is private +LL | use foo::bar::{ | ^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/use/use-mod/use-mod-4.stderr b/src/test/ui/use/use-mod/use-mod-4.stderr index fc0f8952c47..99f5c352184 100644 --- a/src/test/ui/use/use-mod/use-mod-4.stderr +++ b/src/test/ui/use/use-mod/use-mod-4.stderr @@ -1,7 +1,7 @@ error[E0429]: `self` imports are only allowed within a { } list --> $DIR/use-mod-4.rs:1:5 | -LL | use foo::self; //~ ERROR unresolved import `foo` +LL | use foo::self; | ^^^^^^^^^ error[E0429]: `self` imports are only allowed within a { } list @@ -13,7 +13,7 @@ LL | use std::mem::self; error[E0432]: unresolved import `foo` --> $DIR/use-mod-4.rs:1:5 | -LL | use foo::self; //~ ERROR unresolved import `foo` +LL | use foo::self; | ^^^ maybe a missing `extern crate foo;`? error: aborting due to 3 previous errors diff --git a/src/test/ui/use/use-paths-as-items.stderr b/src/test/ui/use/use-paths-as-items.stderr index 00f468cdf31..334e145098b 100644 --- a/src/test/ui/use/use-paths-as-items.stderr +++ b/src/test/ui/use/use-paths-as-items.stderr @@ -3,7 +3,7 @@ error[E0252]: the name `mem` is defined multiple times | LL | use std::{mem, ptr}; | --- previous import of the module `mem` here -LL | use std::mem; //~ ERROR the name `mem` is defined multiple times +LL | use std::mem; | ----^^^^^^^^- | | | | | `mem` reimported here diff --git a/src/test/ui/use/use-self-type.stderr b/src/test/ui/use/use-self-type.stderr index 50b4cdf357d..38c09c2be76 100644 --- a/src/test/ui/use/use-self-type.stderr +++ b/src/test/ui/use/use-self-type.stderr @@ -1,13 +1,13 @@ error[E0433]: failed to resolve: use of undeclared type or module `Self` --> $DIR/use-self-type.rs:7:16 | -LL | pub(in Self::f) struct Z; //~ ERROR use of undeclared type or module `Self` +LL | pub(in Self::f) struct Z; | ^^^^ use of undeclared type or module `Self` error[E0432]: unresolved import `Self` --> $DIR/use-self-type.rs:6:13 | -LL | use Self::f; //~ ERROR unresolved import +LL | use Self::f; | ^^^^ use of undeclared type or module `Self` error: aborting due to 2 previous errors diff --git a/src/test/ui/use/use-super-global-path.stderr b/src/test/ui/use/use-super-global-path.stderr index ee7deb264df..a513d37738d 100644 --- a/src/test/ui/use/use-super-global-path.stderr +++ b/src/test/ui/use/use-super-global-path.stderr @@ -1,19 +1,19 @@ error[E0433]: failed to resolve: global paths cannot start with `super` --> $DIR/use-super-global-path.rs:7:11 | -LL | use ::super::{S, Z}; //~ ERROR global paths cannot start with `super` +LL | use ::super::{S, Z}; | ^^^^^ global paths cannot start with `super` error[E0433]: failed to resolve: global paths cannot start with `super` --> $DIR/use-super-global-path.rs:10:15 | -LL | use ::super::main; //~ ERROR global paths cannot start with `super` +LL | use ::super::main; | ^^^^^ global paths cannot start with `super` error[E0425]: cannot find function `main` in this scope --> $DIR/use-super-global-path.rs:11:9 | -LL | main(); //~ ERROR cannot find function `main` in this scope +LL | main(); | ^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | diff --git a/src/test/ui/used.stderr b/src/test/ui/used.stderr index c998e27c531..ea77f129d8e 100644 --- a/src/test/ui/used.stderr +++ b/src/test/ui/used.stderr @@ -1,25 +1,25 @@ error: attribute must be applied to a `static` variable --> $DIR/used.rs:4:1 | -LL | #[used] //~ ERROR attribute must be applied to a `static` variable +LL | #[used] | ^^^^^^^ error: attribute must be applied to a `static` variable --> $DIR/used.rs:7:1 | -LL | #[used] //~ ERROR attribute must be applied to a `static` variable +LL | #[used] | ^^^^^^^ error: attribute must be applied to a `static` variable --> $DIR/used.rs:10:1 | -LL | #[used] //~ ERROR attribute must be applied to a `static` variable +LL | #[used] | ^^^^^^^ error: attribute must be applied to a `static` variable --> $DIR/used.rs:13:1 | -LL | #[used] //~ ERROR attribute must be applied to a `static` variable +LL | #[used] | ^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/useless-pub.stderr b/src/test/ui/useless-pub.stderr index 5bca980f21e..14c4983ae29 100644 --- a/src/test/ui/useless-pub.stderr +++ b/src/test/ui/useless-pub.stderr @@ -1,19 +1,19 @@ error[E0449]: unnecessary visibility qualifier --> $DIR/useless-pub.rs:8:5 | -LL | pub fn foo(&self) {} //~ ERROR: unnecessary visibility qualifier +LL | pub fn foo(&self) {} | ^^^ `pub` not permitted here because it's implied error[E0449]: unnecessary visibility qualifier --> $DIR/useless-pub.rs:12:10 | -LL | V1 { pub f: i32 }, //~ ERROR unnecessary visibility qualifier +LL | V1 { pub f: i32 }, | ^^^ `pub` not permitted here because it's implied error[E0449]: unnecessary visibility qualifier --> $DIR/useless-pub.rs:13:8 | -LL | V2(pub i32), //~ ERROR unnecessary visibility qualifier +LL | V2(pub i32), | ^^^ `pub` not permitted here because it's implied error: aborting due to 3 previous errors diff --git a/src/test/ui/useless_comment.stderr b/src/test/ui/useless_comment.stderr index 0742a844b7f..10d8ee60f99 100644 --- a/src/test/ui/useless_comment.stderr +++ b/src/test/ui/useless_comment.stderr @@ -1,7 +1,7 @@ error: unused doc comment --> $DIR/useless_comment.rs:9:1 | -LL | /// foo //~ ERROR unused doc comment +LL | /// foo | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LL | mac!(); | ------- rustdoc does not generate documentation for macro expansions @@ -16,7 +16,7 @@ LL | #![deny(unused_doc_comments)] error: unused doc comment --> $DIR/useless_comment.rs:13:5 | -LL | /// a //~ ERROR unused doc comment +LL | /// a | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LL | let x = 12; | ----------- rustdoc does not generate documentation for statements @@ -24,12 +24,12 @@ LL | let x = 12; error: unused doc comment --> $DIR/useless_comment.rs:16:5 | -LL | / /// multi-line //~ unused doc comment +LL | / /// multi-line LL | | /// doc comment LL | | /// that is unused | |______________________^ LL | / match x { -LL | | /// c //~ ERROR unused doc comment +LL | | /// c LL | | 1 => {}, LL | | _ => {} LL | | } @@ -38,7 +38,7 @@ LL | | } error: unused doc comment --> $DIR/useless_comment.rs:20:9 | -LL | /// c //~ ERROR unused doc comment +LL | /// c | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LL | 1 => {}, | ------- rustdoc does not generate documentation for match arms @@ -46,7 +46,7 @@ LL | 1 => {}, error: unused doc comment --> $DIR/useless_comment.rs:25:5 | -LL | /// foo //~ ERROR unused doc comment +LL | /// foo | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LL | unsafe {} | --------- rustdoc does not generate documentation for expressions @@ -54,16 +54,16 @@ LL | unsafe {} error: unused doc comment --> $DIR/useless_comment.rs:28:5 | -LL | #[doc = "foo"] //~ ERROR unused doc comment +LL | #[doc = "foo"] | ^^^^^^^^^^^^^^ -LL | #[doc = "bar"] //~ ERROR unused doc comment +LL | #[doc = "bar"] LL | 3; | - rustdoc does not generate documentation for expressions error: unused doc comment --> $DIR/useless_comment.rs:29:5 | -LL | #[doc = "bar"] //~ ERROR unused doc comment +LL | #[doc = "bar"] | ^^^^^^^^^^^^^^ LL | 3; | - rustdoc does not generate documentation for expressions @@ -71,7 +71,7 @@ LL | 3; error: unused doc comment --> $DIR/useless_comment.rs:32:5 | -LL | /// bar //~ ERROR unused doc comment +LL | /// bar | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LL | mac!(); | ------- rustdoc does not generate documentation for macro expansions @@ -81,13 +81,13 @@ LL | mac!(); error: unused doc comment --> $DIR/useless_comment.rs:35:13 | -LL | let x = /** comment */ 47; //~ ERROR unused doc comment +LL | let x = /** comment */ 47; | ^^^^^^^^^^^^^^ -- rustdoc does not generate documentation for expressions error: unused doc comment --> $DIR/useless_comment.rs:37:5 | -LL | /// dox //~ ERROR unused doc comment +LL | /// dox | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LL | / { LL | | diff --git a/src/test/ui/user-defined-macro-rules.stderr b/src/test/ui/user-defined-macro-rules.stderr index a2d7b171a73..057515228e0 100644 --- a/src/test/ui/user-defined-macro-rules.stderr +++ b/src/test/ui/user-defined-macro-rules.stderr @@ -1,7 +1,7 @@ error: user-defined macros may not be named `macro_rules` --> $DIR/user-defined-macro-rules.rs:3:1 | -LL | macro_rules! macro_rules { () => {} } //~ ERROR user-defined macros may not be named `macro_rules` +LL | macro_rules! macro_rules { () => {} } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/utf8_idents.stderr b/src/test/ui/utf8_idents.stderr index 52fb607af5b..330ba3e0a8c 100644 --- a/src/test/ui/utf8_idents.stderr +++ b/src/test/ui/utf8_idents.stderr @@ -1,7 +1,7 @@ error[E0658]: non-ascii idents are not fully supported. (see issue #55467) --> $DIR/utf8_idents.rs:2:5 | -LL | 'β, //~ ERROR non-ascii idents are not fully supported +LL | 'β, | ^^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -9,7 +9,7 @@ LL | 'β, //~ ERROR non-ascii idents are not fully supported error[E0658]: non-ascii idents are not fully supported. (see issue #55467) --> $DIR/utf8_idents.rs:3:5 | -LL | γ //~ ERROR non-ascii idents are not fully supported +LL | γ | ^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -17,7 +17,7 @@ LL | γ //~ ERROR non-ascii idents are not fully supported error[E0658]: non-ascii idents are not fully supported. (see issue #55467) --> $DIR/utf8_idents.rs:8:5 | -LL | δ: usize //~ ERROR non-ascii idents are not fully supported +LL | δ: usize | ^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -25,7 +25,7 @@ LL | δ: usize //~ ERROR non-ascii idents are not fully supported error[E0658]: non-ascii idents are not fully supported. (see issue #55467) --> $DIR/utf8_idents.rs:12:9 | -LL | let α = 0.00001f64; //~ ERROR non-ascii idents are not fully supported +LL | let α = 0.00001f64; | ^ | = help: add #![feature(non_ascii_idents)] to the crate attributes to enable @@ -33,7 +33,7 @@ LL | let α = 0.00001f64; //~ ERROR non-ascii idents are not fully supported warning: type parameter `γ` should have an upper camel case name --> $DIR/utf8_idents.rs:3:5 | -LL | γ //~ ERROR non-ascii idents are not fully supported +LL | γ | ^ help: convert the identifier to upper camel case: `Γ` | = note: #[warn(non_camel_case_types)] on by default diff --git a/src/test/ui/variance/variance-associated-types.stderr b/src/test/ui/variance/variance-associated-types.stderr index 75ebc866898..c0231aead4a 100644 --- a/src/test/ui/variance/variance-associated-types.stderr +++ b/src/test/ui/variance/variance-associated-types.stderr @@ -1,7 +1,7 @@ error[E0208]: [-, +] --> $DIR/variance-associated-types.rs:13:1 | -LL | / struct Foo<'a, T : Trait<'a>> { //~ ERROR [-, +] +LL | / struct Foo<'a, T : Trait<'a>> { LL | | field: (T, &'a ()) LL | | } | |_^ @@ -9,7 +9,7 @@ LL | | } error[E0208]: [o, o] --> $DIR/variance-associated-types.rs:18:1 | -LL | / struct Bar<'a, T : Trait<'a>> { //~ ERROR [o, o] +LL | / struct Bar<'a, T : Trait<'a>> { LL | | field: >::Type LL | | } | |_^ diff --git a/src/test/ui/variance/variance-btree-invariant-types.stderr b/src/test/ui/variance/variance-btree-invariant-types.stderr index 0d8b4dddc68..49222fc7fa6 100644 --- a/src/test/ui/variance/variance-btree-invariant-types.stderr +++ b/src/test/ui/variance/variance-btree-invariant-types.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:4:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `std::collections::btree_map::IterMut<'_, &'new (), _>` @@ -16,7 +16,7 @@ LL | fn iter_cov_key<'a, 'new>(v: IterMut<'a, &'static (), ()>) -> IterMut<'a, & error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:7:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `std::collections::btree_map::IterMut<'_, _, &'new ()>` @@ -31,7 +31,7 @@ LL | fn iter_cov_val<'a, 'new>(v: IterMut<'a, (), &'static ()>) -> IterMut<'a, ( error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:10:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `std::collections::btree_map::IterMut<'_, &'static (), _>` @@ -46,7 +46,7 @@ LL | fn iter_contra_key<'a, 'new>(v: IterMut<'a, &'new (), ()>) -> IterMut<'a, & error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:13:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `std::collections::btree_map::IterMut<'_, _, &'static ()>` @@ -61,7 +61,7 @@ LL | fn iter_contra_val<'a, 'new>(v: IterMut<'a, (), &'new ()>) -> IterMut<'a, ( error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:18:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `std::collections::btree_map::OccupiedEntry<'_, &'new (), _>` @@ -76,7 +76,7 @@ LL | fn occ_cov_key<'a, 'new>(v: OccupiedEntry<'a, &'static (), ()>) error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:22:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `std::collections::btree_map::OccupiedEntry<'_, _, &'new ()>` @@ -91,7 +91,7 @@ LL | fn occ_cov_val<'a, 'new>(v: OccupiedEntry<'a, (), &'static ()>) error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:26:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `std::collections::btree_map::OccupiedEntry<'_, &'static (), _>` @@ -106,7 +106,7 @@ LL | fn occ_contra_key<'a, 'new>(v: OccupiedEntry<'a, &'new (), ()>) error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:30:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `std::collections::btree_map::OccupiedEntry<'_, _, &'static ()>` @@ -121,7 +121,7 @@ LL | fn occ_contra_val<'a, 'new>(v: OccupiedEntry<'a, (), &'new ()>) error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:35:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `std::collections::btree_map::VacantEntry<'_, &'new (), _>` @@ -136,7 +136,7 @@ LL | fn vac_cov_key<'a, 'new>(v: VacantEntry<'a, &'static (), ()>) error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:39:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `std::collections::btree_map::VacantEntry<'_, _, &'new ()>` @@ -151,7 +151,7 @@ LL | fn vac_cov_val<'a, 'new>(v: VacantEntry<'a, (), &'static ()>) error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:43:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `std::collections::btree_map::VacantEntry<'_, &'static (), _>` @@ -166,7 +166,7 @@ LL | fn vac_contra_key<'a, 'new>(v: VacantEntry<'a, &'new (), ()>) error[E0308]: mismatched types --> $DIR/variance-btree-invariant-types.rs:47:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `std::collections::btree_map::VacantEntry<'_, _, &'static ()>` diff --git a/src/test/ui/variance/variance-cell-is-invariant.stderr b/src/test/ui/variance/variance-cell-is-invariant.stderr index ba76c2efec4..6fcd6460fe3 100644 --- a/src/test/ui/variance/variance-cell-is-invariant.stderr +++ b/src/test/ui/variance/variance-cell-is-invariant.stderr @@ -7,7 +7,7 @@ LL | s: &'short isize, LL | l: &'long isize, | ------------ LL | _where:Option<&'short &'long ()>) { -LL | let _: Foo<'long> = c; //~ ERROR E0623 +LL | let _: Foo<'long> = c; | ^ ...but data from `c` flows into `l` here error: aborting due to previous error diff --git a/src/test/ui/variance/variance-contravariant-arg-object.stderr b/src/test/ui/variance/variance-contravariant-arg-object.stderr index 79681c77673..beac05e04a8 100644 --- a/src/test/ui/variance/variance-contravariant-arg-object.stderr +++ b/src/test/ui/variance/variance-contravariant-arg-object.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/variance-contravariant-arg-object.rs:14:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `dyn Get<&'min i32>` @@ -20,7 +20,7 @@ LL | fn get_min_from_max<'min, 'max>(v: Box>) error[E0308]: mismatched types --> $DIR/variance-contravariant-arg-object.rs:22:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `dyn Get<&'max i32>` diff --git a/src/test/ui/variance/variance-contravariant-arg-trait-match.stderr b/src/test/ui/variance/variance-contravariant-arg-trait-match.stderr index 4c97a5892f1..ffe690dd220 100644 --- a/src/test/ui/variance/variance-contravariant-arg-trait-match.stderr +++ b/src/test/ui/variance/variance-contravariant-arg-trait-match.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/variance-contravariant-arg-trait-match.rs:13:5 | -LL | impls_get::() //~ ERROR mismatched types +LL | impls_get::() | ^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `Get<&'min i32>` @@ -20,7 +20,7 @@ LL | fn get_min_from_max<'min, 'max, G>() error[E0308]: mismatched types --> $DIR/variance-contravariant-arg-trait-match.rs:21:5 | -LL | impls_get::() //~ ERROR mismatched types +LL | impls_get::() | ^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `Get<&'max i32>` diff --git a/src/test/ui/variance/variance-contravariant-self-trait-match.stderr b/src/test/ui/variance/variance-contravariant-self-trait-match.stderr index 30a7b02de76..6f445d79bf5 100644 --- a/src/test/ui/variance/variance-contravariant-self-trait-match.stderr +++ b/src/test/ui/variance/variance-contravariant-self-trait-match.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/variance-contravariant-self-trait-match.rs:13:5 | -LL | impls_get::<&'min G>(); //~ ERROR mismatched types +LL | impls_get::<&'min G>(); | ^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `Get` @@ -20,7 +20,7 @@ LL | fn get_min_from_max<'min, 'max, G>() error[E0308]: mismatched types --> $DIR/variance-contravariant-self-trait-match.rs:22:5 | -LL | impls_get::<&'max G>(); //~ ERROR mismatched types +LL | impls_get::<&'max G>(); | ^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `Get` diff --git a/src/test/ui/variance/variance-covariant-arg-object.stderr b/src/test/ui/variance/variance-covariant-arg-object.stderr index afdcccd2119..cdcc7a6fd55 100644 --- a/src/test/ui/variance/variance-covariant-arg-object.stderr +++ b/src/test/ui/variance/variance-covariant-arg-object.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/variance-covariant-arg-object.rs:15:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `dyn Get<&'min i32>` @@ -20,7 +20,7 @@ LL | fn get_min_from_max<'min, 'max>(v: Box>) error[E0308]: mismatched types --> $DIR/variance-covariant-arg-object.rs:22:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `dyn Get<&'max i32>` diff --git a/src/test/ui/variance/variance-covariant-arg-trait-match.stderr b/src/test/ui/variance/variance-covariant-arg-trait-match.stderr index 3c1f43943a0..c0209edc915 100644 --- a/src/test/ui/variance/variance-covariant-arg-trait-match.stderr +++ b/src/test/ui/variance/variance-covariant-arg-trait-match.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/variance-covariant-arg-trait-match.rs:14:5 | -LL | impls_get::() //~ ERROR mismatched types +LL | impls_get::() | ^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `Get<&'min i32>` @@ -20,7 +20,7 @@ LL | fn get_min_from_max<'min, 'max, G>() error[E0308]: mismatched types --> $DIR/variance-covariant-arg-trait-match.rs:20:5 | -LL | impls_get::() //~ ERROR mismatched types +LL | impls_get::() | ^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `Get<&'max i32>` diff --git a/src/test/ui/variance/variance-covariant-self-trait-match.stderr b/src/test/ui/variance/variance-covariant-self-trait-match.stderr index c3a15662f72..fe5fe105c6b 100644 --- a/src/test/ui/variance/variance-covariant-self-trait-match.stderr +++ b/src/test/ui/variance/variance-covariant-self-trait-match.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/variance-covariant-self-trait-match.rs:14:5 | -LL | impls_get::<&'min G>(); //~ ERROR mismatched types +LL | impls_get::<&'min G>(); | ^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `Get` @@ -20,7 +20,7 @@ LL | fn get_min_from_max<'min, 'max, G>() error[E0308]: mismatched types --> $DIR/variance-covariant-self-trait-match.rs:20:5 | -LL | impls_get::<&'max G>(); //~ ERROR mismatched types +LL | impls_get::<&'max G>(); | ^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `Get` diff --git a/src/test/ui/variance/variance-invariant-arg-object.stderr b/src/test/ui/variance/variance-invariant-arg-object.stderr index b0dddd6ed49..e2ee35de1a2 100644 --- a/src/test/ui/variance/variance-invariant-arg-object.stderr +++ b/src/test/ui/variance/variance-invariant-arg-object.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/variance-invariant-arg-object.rs:11:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `dyn Get<&'min i32>` @@ -20,7 +20,7 @@ LL | fn get_min_from_max<'min, 'max>(v: Box>) error[E0308]: mismatched types --> $DIR/variance-invariant-arg-object.rs:18:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `dyn Get<&'max i32>` diff --git a/src/test/ui/variance/variance-invariant-arg-trait-match.stderr b/src/test/ui/variance/variance-invariant-arg-trait-match.stderr index 32aac2e3a2b..c8a1111e623 100644 --- a/src/test/ui/variance/variance-invariant-arg-trait-match.stderr +++ b/src/test/ui/variance/variance-invariant-arg-trait-match.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/variance-invariant-arg-trait-match.rs:10:5 | -LL | impls_get::() //~ ERROR mismatched types +LL | impls_get::() | ^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `Get<&'min i32>` @@ -20,7 +20,7 @@ LL | fn get_min_from_max<'min, 'max, G>() error[E0308]: mismatched types --> $DIR/variance-invariant-arg-trait-match.rs:16:5 | -LL | impls_get::() //~ ERROR mismatched types +LL | impls_get::() | ^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `Get<&'max i32>` diff --git a/src/test/ui/variance/variance-invariant-self-trait-match.stderr b/src/test/ui/variance/variance-invariant-self-trait-match.stderr index ba96fbdaa14..cb03d95f771 100644 --- a/src/test/ui/variance/variance-invariant-self-trait-match.stderr +++ b/src/test/ui/variance/variance-invariant-self-trait-match.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/variance-invariant-self-trait-match.rs:10:5 | -LL | impls_get::<&'min G>(); //~ ERROR mismatched types +LL | impls_get::<&'min G>(); | ^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `Get` @@ -20,7 +20,7 @@ LL | fn get_min_from_max<'min, 'max, G>() error[E0308]: mismatched types --> $DIR/variance-invariant-self-trait-match.rs:16:5 | -LL | impls_get::<&'max G>(); //~ ERROR mismatched types +LL | impls_get::<&'max G>(); | ^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected type `Get` diff --git a/src/test/ui/variance/variance-issue-20533.stderr b/src/test/ui/variance/variance-issue-20533.stderr index 27aca3401f9..bcf99bcb962 100644 --- a/src/test/ui/variance/variance-issue-20533.stderr +++ b/src/test/ui/variance/variance-issue-20533.stderr @@ -3,7 +3,7 @@ error[E0505]: cannot move out of `a` because it is borrowed | LL | let x = foo(&a); | - borrow of `a` occurs here -LL | drop(a); //~ ERROR cannot move out of `a` +LL | drop(a); | ^ move out of `a` occurs here error[E0505]: cannot move out of `a` because it is borrowed @@ -11,7 +11,7 @@ error[E0505]: cannot move out of `a` because it is borrowed | LL | let x = bar(&a); | - borrow of `a` occurs here -LL | drop(a); //~ ERROR cannot move out of `a` +LL | drop(a); | ^ move out of `a` occurs here error[E0505]: cannot move out of `a` because it is borrowed @@ -19,7 +19,7 @@ error[E0505]: cannot move out of `a` because it is borrowed | LL | let x = baz(&a); | - borrow of `a` occurs here -LL | drop(a); //~ ERROR cannot move out of `a` +LL | drop(a); | ^ move out of `a` occurs here error: aborting due to 3 previous errors diff --git a/src/test/ui/variance/variance-object-types.stderr b/src/test/ui/variance/variance-object-types.stderr index 3ba86c2620e..385d8dc5c77 100644 --- a/src/test/ui/variance/variance-object-types.stderr +++ b/src/test/ui/variance/variance-object-types.stderr @@ -1,7 +1,7 @@ error[E0208]: [o] --> $DIR/variance-object-types.rs:11:1 | -LL | / struct Foo<'a> { //~ ERROR [o] +LL | / struct Foo<'a> { LL | | x: Box &'a i32 + 'static> LL | | } | |_^ diff --git a/src/test/ui/variance/variance-regions-direct.stderr b/src/test/ui/variance/variance-regions-direct.stderr index 82dc8df3726..bbc34799449 100644 --- a/src/test/ui/variance/variance-regions-direct.stderr +++ b/src/test/ui/variance/variance-regions-direct.stderr @@ -1,7 +1,7 @@ error[E0208]: [-, -, -] --> $DIR/variance-regions-direct.rs:9:1 | -LL | / struct Test2<'a, 'b, 'c> { //~ ERROR [-, -, -] +LL | / struct Test2<'a, 'b, 'c> { LL | | x: &'a isize, LL | | y: &'b [isize], LL | | c: &'c str @@ -11,7 +11,7 @@ LL | | } error[E0208]: [+, +, +] --> $DIR/variance-regions-direct.rs:18:1 | -LL | / struct Test3<'a, 'b, 'c> { //~ ERROR [+, +, +] +LL | / struct Test3<'a, 'b, 'c> { LL | | x: extern "Rust" fn(&'a isize), LL | | y: extern "Rust" fn(&'b [isize]), LL | | c: extern "Rust" fn(&'c str), @@ -21,7 +21,7 @@ LL | | } error[E0208]: [-, o] --> $DIR/variance-regions-direct.rs:27:1 | -LL | / struct Test4<'a, 'b:'a> { //~ ERROR [-, o] +LL | / struct Test4<'a, 'b:'a> { LL | | x: &'a mut &'b isize, LL | | } | |_^ @@ -29,7 +29,7 @@ LL | | } error[E0208]: [+, o] --> $DIR/variance-regions-direct.rs:35:1 | -LL | / struct Test5<'a, 'b:'a> { //~ ERROR [+, o] +LL | / struct Test5<'a, 'b:'a> { LL | | x: extern "Rust" fn(&'a mut &'b isize), LL | | } | |_^ @@ -37,7 +37,7 @@ LL | | } error[E0208]: [-, o] --> $DIR/variance-regions-direct.rs:45:1 | -LL | / struct Test6<'a, 'b:'a> { //~ ERROR [-, o] +LL | / struct Test6<'a, 'b:'a> { LL | | x: &'a mut extern "Rust" fn(&'b isize), LL | | } | |_^ @@ -45,7 +45,7 @@ LL | | } error[E0208]: [*] --> $DIR/variance-regions-direct.rs:52:1 | -LL | / struct Test7<'a> { //~ ERROR [*] +LL | / struct Test7<'a> { LL | | x: isize LL | | } | |_^ @@ -53,7 +53,7 @@ LL | | } error[E0208]: [+, -, o] --> $DIR/variance-regions-direct.rs:59:1 | -LL | / enum Test8<'a, 'b, 'c:'b> { //~ ERROR [+, -, o] +LL | / enum Test8<'a, 'b, 'c:'b> { LL | | Test8A(extern "Rust" fn(&'a isize)), LL | | Test8B(&'b [isize]), LL | | Test8C(&'b mut &'c str), diff --git a/src/test/ui/variance/variance-regions-indirect.stderr b/src/test/ui/variance/variance-regions-indirect.stderr index 401fa2f3baa..ccd4335f500 100644 --- a/src/test/ui/variance/variance-regions-indirect.stderr +++ b/src/test/ui/variance/variance-regions-indirect.stderr @@ -1,7 +1,7 @@ error[E0208]: [+, -, o, *] --> $DIR/variance-regions-indirect.rs:8:1 | -LL | / enum Base<'a, 'b, 'c:'b, 'd> { //~ ERROR [+, -, o, *] +LL | / enum Base<'a, 'b, 'c:'b, 'd> { LL | | Test8A(extern "Rust" fn(&'a isize)), LL | | Test8B(&'b [isize]), LL | | Test8C(&'b mut &'c str), @@ -11,7 +11,7 @@ LL | | } error[E0208]: [*, o, -, +] --> $DIR/variance-regions-indirect.rs:15:1 | -LL | / struct Derived1<'w, 'x:'y, 'y, 'z> { //~ ERROR [*, o, -, +] +LL | / struct Derived1<'w, 'x:'y, 'y, 'z> { LL | | f: Base<'z, 'y, 'x, 'w> LL | | } | |_^ @@ -19,7 +19,7 @@ LL | | } error[E0208]: [o, o, *] --> $DIR/variance-regions-indirect.rs:20:1 | -LL | / struct Derived2<'a, 'b:'a, 'c> { //~ ERROR [o, o, *] +LL | / struct Derived2<'a, 'b:'a, 'c> { LL | | f: Base<'a, 'a, 'b, 'c> LL | | } | |_^ @@ -27,7 +27,7 @@ LL | | } error[E0208]: [o, -, *] --> $DIR/variance-regions-indirect.rs:25:1 | -LL | / struct Derived3<'a:'b, 'b, 'c> { //~ ERROR [o, -, *] +LL | / struct Derived3<'a:'b, 'b, 'c> { LL | | f: Base<'a, 'b, 'a, 'c> LL | | } | |_^ @@ -35,7 +35,7 @@ LL | | } error[E0208]: [+, -, o] --> $DIR/variance-regions-indirect.rs:30:1 | -LL | / struct Derived4<'a, 'b, 'c:'b> { //~ ERROR [+, -, o] +LL | / struct Derived4<'a, 'b, 'c:'b> { LL | | f: Base<'a, 'b, 'c, 'a> LL | | } | |_^ diff --git a/src/test/ui/variance/variance-regions-unused-direct.stderr b/src/test/ui/variance/variance-regions-unused-direct.stderr index 207cc9147f1..ab5dce03fa0 100644 --- a/src/test/ui/variance/variance-regions-unused-direct.stderr +++ b/src/test/ui/variance/variance-regions-unused-direct.stderr @@ -1,7 +1,7 @@ error[E0392]: parameter `'a` is never used --> $DIR/variance-regions-unused-direct.rs:5:18 | -LL | struct Bivariant<'a>; //~ ERROR parameter `'a` is never used +LL | struct Bivariant<'a>; | ^^ unused type parameter | = help: consider removing `'a` or using a marker such as `std::marker::PhantomData` @@ -9,7 +9,7 @@ LL | struct Bivariant<'a>; //~ ERROR parameter `'a` is never used error[E0392]: parameter `'d` is never used --> $DIR/variance-regions-unused-direct.rs:7:19 | -LL | struct Struct<'a, 'd> { //~ ERROR parameter `'d` is never used +LL | struct Struct<'a, 'd> { | ^^ unused type parameter | = help: consider removing `'d` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/variance/variance-regions-unused-indirect.stderr b/src/test/ui/variance/variance-regions-unused-indirect.stderr index 08d1189ea2c..69631b4a504 100644 --- a/src/test/ui/variance/variance-regions-unused-indirect.stderr +++ b/src/test/ui/variance/variance-regions-unused-indirect.stderr @@ -1,7 +1,7 @@ error[E0392]: parameter `'a` is never used --> $DIR/variance-regions-unused-indirect.rs:3:10 | -LL | enum Foo<'a> { //~ ERROR parameter `'a` is never used +LL | enum Foo<'a> { | ^^ unused type parameter | = help: consider removing `'a` or using a marker such as `std::marker::PhantomData` @@ -9,7 +9,7 @@ LL | enum Foo<'a> { //~ ERROR parameter `'a` is never used error[E0392]: parameter `'a` is never used --> $DIR/variance-regions-unused-indirect.rs:7:10 | -LL | enum Bar<'a> { //~ ERROR parameter `'a` is never used +LL | enum Bar<'a> { | ^^ unused type parameter | = help: consider removing `'a` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/variance/variance-trait-bounds.stderr b/src/test/ui/variance/variance-trait-bounds.stderr index 1fabadabbcb..f136bd121d0 100644 --- a/src/test/ui/variance/variance-trait-bounds.stderr +++ b/src/test/ui/variance/variance-trait-bounds.stderr @@ -1,7 +1,7 @@ error[E0208]: [+, +] --> $DIR/variance-trait-bounds.rs:16:1 | -LL | / struct TestStruct> { //~ ERROR [+, +] +LL | / struct TestStruct> { LL | | t: T, u: U LL | | } | |_^ @@ -9,7 +9,7 @@ LL | | } error[E0208]: [*, +] --> $DIR/variance-trait-bounds.rs:21:1 | -LL | / enum TestEnum> { //~ ERROR [*, +] +LL | / enum TestEnum> { LL | | Foo(T) LL | | } | |_^ @@ -17,7 +17,7 @@ LL | | } error[E0208]: [*, +] --> $DIR/variance-trait-bounds.rs:26:1 | -LL | / struct TestContraStruct> { //~ ERROR [*, +] +LL | / struct TestContraStruct> { LL | | t: T LL | | } | |_^ @@ -25,7 +25,7 @@ LL | | } error[E0208]: [*, +] --> $DIR/variance-trait-bounds.rs:31:1 | -LL | / struct TestBox+Setter> { //~ ERROR [*, +] +LL | / struct TestBox+Setter> { LL | | t: T LL | | } | |_^ diff --git a/src/test/ui/variance/variance-trait-matching.stderr b/src/test/ui/variance/variance-trait-matching.stderr index 2d11515a19c..514153103be 100644 --- a/src/test/ui/variance/variance-trait-matching.stderr +++ b/src/test/ui/variance/variance-trait-matching.stderr @@ -4,7 +4,7 @@ error[E0621]: explicit lifetime required in the type of `get` LL | fn get<'a, G>(get: &G) -> i32 | -- help: add explicit lifetime `'a` to the type of `get`: `&'a G` ... -LL | pick(get, &22) //~ ERROR explicit lifetime required in the type of `get` [E0621] +LL | pick(get, &22) | ^^^^ lifetime `'a` required error: aborting due to previous error diff --git a/src/test/ui/variance/variance-trait-object-bound.stderr b/src/test/ui/variance/variance-trait-object-bound.stderr index c824f5a6db7..4fa4a2e8ab4 100644 --- a/src/test/ui/variance/variance-trait-object-bound.stderr +++ b/src/test/ui/variance/variance-trait-object-bound.stderr @@ -1,7 +1,7 @@ error[E0208]: [-] --> $DIR/variance-trait-object-bound.rs:14:1 | -LL | / struct TOption<'a> { //~ ERROR [-] +LL | / struct TOption<'a> { LL | | v: Option>, LL | | } | |_^ diff --git a/src/test/ui/variance/variance-types-bounds.stderr b/src/test/ui/variance/variance-types-bounds.stderr index 31271952f77..991bfd33a2e 100644 --- a/src/test/ui/variance/variance-types-bounds.stderr +++ b/src/test/ui/variance/variance-types-bounds.stderr @@ -1,7 +1,7 @@ error[E0208]: [+, +] --> $DIR/variance-types-bounds.rs:7:1 | -LL | / struct TestImm { //~ ERROR [+, +] +LL | / struct TestImm { LL | | x: A, LL | | y: B, LL | | } @@ -10,7 +10,7 @@ LL | | } error[E0208]: [+, o] --> $DIR/variance-types-bounds.rs:13:1 | -LL | / struct TestMut { //~ ERROR [+, o] +LL | / struct TestMut { LL | | x: A, LL | | y: &'static mut B, LL | | } @@ -19,7 +19,7 @@ LL | | } error[E0208]: [+, o] --> $DIR/variance-types-bounds.rs:19:1 | -LL | / struct TestIndirect { //~ ERROR [+, o] +LL | / struct TestIndirect { LL | | m: TestMut LL | | } | |_^ @@ -27,7 +27,7 @@ LL | | } error[E0208]: [o, o] --> $DIR/variance-types-bounds.rs:24:1 | -LL | / struct TestIndirect2 { //~ ERROR [o, o] +LL | / struct TestIndirect2 { LL | | n: TestMut, LL | | m: TestMut LL | | } @@ -36,7 +36,7 @@ LL | | } error[E0208]: [o, o] --> $DIR/variance-types-bounds.rs:38:1 | -LL | / struct TestObject { //~ ERROR [o, o] +LL | / struct TestObject { LL | | n: Box+Send>, LL | | m: Box+Send>, LL | | } diff --git a/src/test/ui/variance/variance-types.stderr b/src/test/ui/variance/variance-types.stderr index 4362f694202..f68a2666729 100644 --- a/src/test/ui/variance/variance-types.stderr +++ b/src/test/ui/variance/variance-types.stderr @@ -1,7 +1,7 @@ error[E0208]: [-, o, o] --> $DIR/variance-types.rs:10:1 | -LL | / struct InvariantMut<'a,A:'a,B:'a> { //~ ERROR [-, o, o] +LL | / struct InvariantMut<'a,A:'a,B:'a> { LL | | t: &'a mut (A,B) LL | | } | |_^ @@ -9,7 +9,7 @@ LL | | } error[E0208]: [o] --> $DIR/variance-types.rs:15:1 | -LL | / struct InvariantCell { //~ ERROR [o] +LL | / struct InvariantCell { LL | | t: Cell LL | | } | |_^ @@ -17,7 +17,7 @@ LL | | } error[E0208]: [o] --> $DIR/variance-types.rs:20:1 | -LL | / struct InvariantIndirect { //~ ERROR [o] +LL | / struct InvariantIndirect { LL | | t: InvariantCell LL | | } | |_^ @@ -25,7 +25,7 @@ LL | | } error[E0208]: [+] --> $DIR/variance-types.rs:25:1 | -LL | / struct Covariant { //~ ERROR [+] +LL | / struct Covariant { LL | | t: A, u: fn() -> A LL | | } | |_^ @@ -33,7 +33,7 @@ LL | | } error[E0208]: [-] --> $DIR/variance-types.rs:30:1 | -LL | / struct Contravariant { //~ ERROR [-] +LL | / struct Contravariant { LL | | t: fn(A) LL | | } | |_^ @@ -41,7 +41,7 @@ LL | | } error[E0208]: [+, -, o] --> $DIR/variance-types.rs:35:1 | -LL | / enum Enum { //~ ERROR [+, -, o] +LL | / enum Enum { LL | | Foo(Covariant), LL | | Bar(Contravariant), LL | | Zed(Covariant,Contravariant) diff --git a/src/test/ui/variance/variance-unused-region-param.stderr b/src/test/ui/variance/variance-unused-region-param.stderr index 9cd133bbc93..6c103f168f4 100644 --- a/src/test/ui/variance/variance-unused-region-param.stderr +++ b/src/test/ui/variance/variance-unused-region-param.stderr @@ -1,7 +1,7 @@ error[E0392]: parameter `'a` is never used --> $DIR/variance-unused-region-param.rs:3:19 | -LL | struct SomeStruct<'a> { x: u32 } //~ ERROR parameter `'a` is never used +LL | struct SomeStruct<'a> { x: u32 } | ^^ unused type parameter | = help: consider removing `'a` or using a marker such as `std::marker::PhantomData` @@ -9,7 +9,7 @@ LL | struct SomeStruct<'a> { x: u32 } //~ ERROR parameter `'a` is never used error[E0392]: parameter `'a` is never used --> $DIR/variance-unused-region-param.rs:4:15 | -LL | enum SomeEnum<'a> { Nothing } //~ ERROR parameter `'a` is never used +LL | enum SomeEnum<'a> { Nothing } | ^^ unused type parameter | = help: consider removing `'a` or using a marker such as `std::marker::PhantomData` diff --git a/src/test/ui/variance/variance-use-contravariant-struct-1.stderr b/src/test/ui/variance/variance-use-contravariant-struct-1.stderr index 89a49a00b34..7c433378df5 100644 --- a/src/test/ui/variance/variance-use-contravariant-struct-1.stderr +++ b/src/test/ui/variance/variance-use-contravariant-struct-1.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/variance-use-contravariant-struct-1.rs:12:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `SomeStruct<&'min ()>` diff --git a/src/test/ui/variance/variance-use-covariant-struct-1.stderr b/src/test/ui/variance/variance-use-covariant-struct-1.stderr index a6f298c9bfb..6ae7d12c463 100644 --- a/src/test/ui/variance/variance-use-covariant-struct-1.stderr +++ b/src/test/ui/variance/variance-use-covariant-struct-1.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/variance-use-covariant-struct-1.rs:10:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `SomeStruct<&'max ()>` diff --git a/src/test/ui/variance/variance-use-invariant-struct-1.stderr b/src/test/ui/variance/variance-use-invariant-struct-1.stderr index 2bd39d5a831..793954e3a1f 100644 --- a/src/test/ui/variance/variance-use-invariant-struct-1.stderr +++ b/src/test/ui/variance/variance-use-invariant-struct-1.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/variance-use-invariant-struct-1.rs:12:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `SomeStruct<&'min ()>` @@ -20,7 +20,7 @@ LL | fn foo<'min,'max>(v: SomeStruct<&'max ()>) error[E0308]: mismatched types --> $DIR/variance-use-invariant-struct-1.rs:19:5 | -LL | v //~ ERROR mismatched types +LL | v | ^ lifetime mismatch | = note: expected type `SomeStruct<&'max ()>` diff --git a/src/test/ui/variants/variant-size-differences.stderr b/src/test/ui/variants/variant-size-differences.stderr index 5cd168df538..c82c253f610 100644 --- a/src/test/ui/variants/variant-size-differences.stderr +++ b/src/test/ui/variants/variant-size-differences.stderr @@ -1,7 +1,7 @@ error: enum variant is more than three times larger (1024 bytes) than the next largest --> $DIR/variant-size-differences.rs:5:5 | -LL | VBig([u8; 1024]), //~ ERROR variant is more than three times larger +LL | VBig([u8; 1024]), | ^^^^^^^^^^^^^^^^ | note: lint level defined here diff --git a/src/test/ui/vec/vec-macro-with-comma-only.stderr b/src/test/ui/vec/vec-macro-with-comma-only.stderr index 92e704c3fb4..abbee347c00 100644 --- a/src/test/ui/vec/vec-macro-with-comma-only.stderr +++ b/src/test/ui/vec/vec-macro-with-comma-only.stderr @@ -1,7 +1,7 @@ error: no rules expected the token `,` --> $DIR/vec-macro-with-comma-only.rs:2:10 | -LL | vec![,]; //~ ERROR no rules expected the token `,` +LL | vec![,]; | ^ no rules expected this token in macro call error: aborting due to previous error diff --git a/src/test/ui/vec/vec-mut-iter-borrow.stderr b/src/test/ui/vec/vec-mut-iter-borrow.stderr index 9b4b5673791..ec16d2bebd6 100644 --- a/src/test/ui/vec/vec-mut-iter-borrow.stderr +++ b/src/test/ui/vec/vec-mut-iter-borrow.stderr @@ -6,7 +6,7 @@ LL | for x in &mut xs { | || | |first borrow ends here | first mutable borrow occurs here -LL | xs.push(1) //~ ERROR cannot borrow `xs` +LL | xs.push(1) | ^^ second mutable borrow occurs here error: aborting due to previous error diff --git a/src/test/ui/vector-cast-weirdness.stderr b/src/test/ui/vector-cast-weirdness.stderr index 330b87801eb..37055bb75f5 100644 --- a/src/test/ui/vector-cast-weirdness.stderr +++ b/src/test/ui/vector-cast-weirdness.stderr @@ -1,7 +1,7 @@ error[E0606]: casting `&mut [u8; 2]` as `*mut u8` is invalid --> $DIR/vector-cast-weirdness.rs:21:23 | -LL | let p1: *mut u8 = &mut x1.y as *mut _; //~ ERROR casting +LL | let p1: *mut u8 = &mut x1.y as *mut _; | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/vtable-res-trait-param.stderr b/src/test/ui/vtable-res-trait-param.stderr index 6dac9fe335f..58a88979b2f 100644 --- a/src/test/ui/vtable-res-trait-param.stderr +++ b/src/test/ui/vtable-res-trait-param.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `{integer}: TraitA` is not satisfied --> $DIR/vtable-res-trait-param.rs:17:7 | -LL | b.gimme_an_a(y) //~ ERROR `{integer}: TraitA` is not satisfied +LL | b.gimme_an_a(y) | ^^^^^^^^^^ the trait `TraitA` is not implemented for `{integer}` error: aborting due to previous error diff --git a/src/test/ui/walk-struct-literal-with.stderr b/src/test/ui/walk-struct-literal-with.stderr index 9362301b408..d5351eb0ce5 100644 --- a/src/test/ui/walk-struct-literal-with.stderr +++ b/src/test/ui/walk-struct-literal-with.stderr @@ -3,7 +3,7 @@ error[E0382]: use of moved value: `start.test` | LL | let end = Mine{other_val:1, ..start.make_string_bar()}; | ----- value moved here -LL | println!("{}", start.test); //~ ERROR use of moved value: `start.test` +LL | println!("{}", start.test); | ^^^^^^^^^^ value used here after move | = note: move occurs because `start` has type `Mine`, which does not implement the `Copy` trait diff --git a/src/test/ui/warn-path-statement.stderr b/src/test/ui/warn-path-statement.stderr index 55d33058c17..30afb99e5f0 100644 --- a/src/test/ui/warn-path-statement.stderr +++ b/src/test/ui/warn-path-statement.stderr @@ -1,7 +1,7 @@ error: path statement with no effect --> $DIR/warn-path-statement.rs:5:5 | -LL | x; //~ ERROR path statement with no effect +LL | x; | ^^ | = note: requested on the command line with `-D path-statements` diff --git a/src/test/ui/wasm-import-module.stderr b/src/test/ui/wasm-import-module.stderr index a3955bb676e..20eec4c9f59 100644 --- a/src/test/ui/wasm-import-module.stderr +++ b/src/test/ui/wasm-import-module.stderr @@ -1,19 +1,19 @@ error: must be of the form #[link(wasm_import_module = "...")] --> $DIR/wasm-import-module.rs:1:22 | -LL | #[link(name = "...", wasm_import_module)] //~ ERROR: must be of the form +LL | #[link(name = "...", wasm_import_module)] | ^^^^^^^^^^^^^^^^^^ error: must be of the form #[link(wasm_import_module = "...")] --> $DIR/wasm-import-module.rs:4:22 | -LL | #[link(name = "...", wasm_import_module(x))] //~ ERROR: must be of the form +LL | #[link(name = "...", wasm_import_module(x))] | ^^^^^^^^^^^^^^^^^^^^^ error: must be of the form #[link(wasm_import_module = "...")] --> $DIR/wasm-import-module.rs:7:22 | -LL | #[link(name = "...", wasm_import_module())] //~ ERROR: must be of the form +LL | #[link(name = "...", wasm_import_module())] | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/wf/wf-array-elem-sized.stderr b/src/test/ui/wf/wf-array-elem-sized.stderr index 69df9ea7857..b222d07580e 100644 --- a/src/test/ui/wf/wf-array-elem-sized.stderr +++ b/src/test/ui/wf/wf-array-elem-sized.stderr @@ -1,7 +1,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> $DIR/wf-array-elem-sized.rs:7:5 | -LL | foo: [[u8]], //~ ERROR E0277 +LL | foo: [[u8]], | ^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[u8]` diff --git a/src/test/ui/wf/wf-enum-bound.stderr b/src/test/ui/wf/wf-enum-bound.stderr index 487592dcaca..de28a882f13 100644 --- a/src/test/ui/wf/wf-enum-bound.stderr +++ b/src/test/ui/wf/wf-enum-bound.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied --> $DIR/wf-enum-bound.rs:9:1 | -LL | / enum SomeEnum //~ ERROR E0277 +LL | / enum SomeEnum LL | | where T: ExtraCopy LL | | { LL | | SomeVariant(T,U) diff --git a/src/test/ui/wf/wf-enum-fields-struct-variant.stderr b/src/test/ui/wf/wf-enum-fields-struct-variant.stderr index f4b8ec0c668..6c1267cf7e1 100644 --- a/src/test/ui/wf/wf-enum-fields-struct-variant.stderr +++ b/src/test/ui/wf/wf-enum-fields-struct-variant.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `A: std::marker::Copy` is not satisfied --> $DIR/wf-enum-fields-struct-variant.rs:13:9 | -LL | f: IsCopy //~ ERROR E0277 +LL | f: IsCopy | ^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `A` | = help: consider adding a `where A: std::marker::Copy` bound diff --git a/src/test/ui/wf/wf-enum-fields.stderr b/src/test/ui/wf/wf-enum-fields.stderr index 600dd3dc03d..9c4eec6c5fb 100644 --- a/src/test/ui/wf/wf-enum-fields.stderr +++ b/src/test/ui/wf/wf-enum-fields.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `A: std::marker::Copy` is not satisfied --> $DIR/wf-enum-fields.rs:12:17 | -LL | SomeVariant(IsCopy) //~ ERROR E0277 +LL | SomeVariant(IsCopy) | ^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `A` | = help: consider adding a `where A: std::marker::Copy` bound diff --git a/src/test/ui/wf/wf-fn-where-clause.stderr b/src/test/ui/wf/wf-fn-where-clause.stderr index 594ce7d2f49..f1648aa12ac 100644 --- a/src/test/ui/wf/wf-fn-where-clause.stderr +++ b/src/test/ui/wf/wf-fn-where-clause.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied --> $DIR/wf-fn-where-clause.rs:8:1 | -LL | / fn foo() where T: ExtraCopy //~ ERROR E0277 +LL | / fn foo() where T: ExtraCopy LL | | { LL | | } | |_^ the trait `std::marker::Copy` is not implemented for `U` diff --git a/src/test/ui/wf/wf-impl-associated-type-region.stderr b/src/test/ui/wf/wf-impl-associated-type-region.stderr index de7e8fa9a28..9cc36025305 100644 --- a/src/test/ui/wf/wf-impl-associated-type-region.stderr +++ b/src/test/ui/wf/wf-impl-associated-type-region.stderr @@ -3,13 +3,13 @@ error[E0309]: the parameter type `T` may not live long enough | LL | impl<'a, T> Foo<'a> for T { | - help: consider adding an explicit lifetime bound `T: 'a`... -LL | type Bar = &'a T; //~ ERROR E0309 +LL | type Bar = &'a T; | ^^^^^^^^^^^^^^^^^ | note: ...so that the reference type `&'a T` does not outlive the data it points at --> $DIR/wf-impl-associated-type-region.rs:10:5 | -LL | type Bar = &'a T; //~ ERROR E0309 +LL | type Bar = &'a T; | ^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-in-fn-arg.stderr b/src/test/ui/wf/wf-in-fn-arg.stderr index 987984060e6..8635dad8516 100644 --- a/src/test/ui/wf/wf-in-fn-arg.stderr +++ b/src/test/ui/wf/wf-in-fn-arg.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied --> $DIR/wf-in-fn-arg.rs:10:1 | -LL | / fn bar(_: &MustBeCopy) //~ ERROR E0277 +LL | / fn bar(_: &MustBeCopy) LL | | { LL | | } | |_^ the trait `std::marker::Copy` is not implemented for `T` diff --git a/src/test/ui/wf/wf-in-fn-ret.stderr b/src/test/ui/wf/wf-in-fn-ret.stderr index 81aae855b84..3879f7b0a4b 100644 --- a/src/test/ui/wf/wf-in-fn-ret.stderr +++ b/src/test/ui/wf/wf-in-fn-ret.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied --> $DIR/wf-in-fn-ret.rs:10:1 | -LL | / fn bar() -> MustBeCopy //~ ERROR E0277 +LL | / fn bar() -> MustBeCopy LL | | { LL | | } | |_^ the trait `std::marker::Copy` is not implemented for `T` diff --git a/src/test/ui/wf/wf-in-fn-type-arg.stderr b/src/test/ui/wf/wf-in-fn-type-arg.stderr index e60529dba1e..40cb4a7050c 100644 --- a/src/test/ui/wf/wf-in-fn-type-arg.stderr +++ b/src/test/ui/wf/wf-in-fn-type-arg.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied --> $DIR/wf-in-fn-type-arg.rs:9:5 | -LL | x: fn(MustBeCopy) //~ ERROR E0277 +LL | x: fn(MustBeCopy) | ^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` | = help: consider adding a `where T: std::marker::Copy` bound diff --git a/src/test/ui/wf/wf-in-fn-type-ret.stderr b/src/test/ui/wf/wf-in-fn-type-ret.stderr index 9f18a00926d..059f164e25c 100644 --- a/src/test/ui/wf/wf-in-fn-type-ret.stderr +++ b/src/test/ui/wf/wf-in-fn-type-ret.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied --> $DIR/wf-in-fn-type-ret.rs:9:5 | -LL | x: fn() -> MustBeCopy //~ ERROR E0277 +LL | x: fn() -> MustBeCopy | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` | = help: consider adding a `where T: std::marker::Copy` bound diff --git a/src/test/ui/wf/wf-in-fn-type-static.stderr b/src/test/ui/wf/wf-in-fn-type-static.stderr index 1fabfb04add..8952c78aacd 100644 --- a/src/test/ui/wf/wf-in-fn-type-static.stderr +++ b/src/test/ui/wf/wf-in-fn-type-static.stderr @@ -4,13 +4,13 @@ error[E0310]: the parameter type `T` may not live long enough LL | struct Foo { | - help: consider adding an explicit lifetime bound `T: 'static`... LL | // needs T: 'static -LL | x: fn() -> &'static T //~ ERROR E0310 +LL | x: fn() -> &'static T | ^^^^^^^^^^^^^^^^^^^^^ | note: ...so that the reference type `&'static T` does not outlive the data it points at --> $DIR/wf-in-fn-type-static.rs:13:5 | -LL | x: fn() -> &'static T //~ ERROR E0310 +LL | x: fn() -> &'static T | ^^^^^^^^^^^^^^^^^^^^^ error[E0310]: the parameter type `T` may not live long enough @@ -19,13 +19,13 @@ error[E0310]: the parameter type `T` may not live long enough LL | struct Bar { | - help: consider adding an explicit lifetime bound `T: 'static`... LL | // needs T: Copy -LL | x: fn(&'static T) //~ ERROR E0310 +LL | x: fn(&'static T) | ^^^^^^^^^^^^^^^^^ | note: ...so that the reference type `&'static T` does not outlive the data it points at --> $DIR/wf-in-fn-type-static.rs:18:5 | -LL | x: fn(&'static T) //~ ERROR E0310 +LL | x: fn(&'static T) | ^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/wf/wf-in-fn-where-clause.stderr b/src/test/ui/wf/wf-in-fn-where-clause.stderr index 8d6700e3571..1e732a3341c 100644 --- a/src/test/ui/wf/wf-in-fn-where-clause.stderr +++ b/src/test/ui/wf/wf-in-fn-where-clause.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied --> $DIR/wf-in-fn-where-clause.rs:9:1 | -LL | / fn bar() //~ ERROR E0277 +LL | / fn bar() LL | | where T: MustBeCopy LL | | { LL | | } diff --git a/src/test/ui/wf/wf-in-obj-type-static.stderr b/src/test/ui/wf/wf-in-obj-type-static.stderr index 9e0628e3ec6..cc06b9243f7 100644 --- a/src/test/ui/wf/wf-in-obj-type-static.stderr +++ b/src/test/ui/wf/wf-in-obj-type-static.stderr @@ -4,13 +4,13 @@ error[E0310]: the parameter type `T` may not live long enough LL | struct Foo { | - help: consider adding an explicit lifetime bound `T: 'static`... LL | // needs T: 'static -LL | x: Object<&'static T> //~ ERROR E0310 +LL | x: Object<&'static T> | ^^^^^^^^^^^^^^^^^^^^^ | note: ...so that the reference type `&'static T` does not outlive the data it points at --> $DIR/wf-in-obj-type-static.rs:14:5 | -LL | x: Object<&'static T> //~ ERROR E0310 +LL | x: Object<&'static T> | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-in-obj-type-trait.stderr b/src/test/ui/wf/wf-in-obj-type-trait.stderr index a4a14817d3f..94b3de78898 100644 --- a/src/test/ui/wf/wf-in-obj-type-trait.stderr +++ b/src/test/ui/wf/wf-in-obj-type-trait.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied --> $DIR/wf-in-obj-type-trait.rs:11:5 | -LL | x: Object> //~ ERROR E0277 +LL | x: Object> | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` | = help: consider adding a `where T: std::marker::Copy` bound diff --git a/src/test/ui/wf/wf-inherent-impl-method-where-clause.stderr b/src/test/ui/wf/wf-inherent-impl-method-where-clause.stderr index ba9d3d7877d..b79093f7d02 100644 --- a/src/test/ui/wf/wf-inherent-impl-method-where-clause.stderr +++ b/src/test/ui/wf/wf-inherent-impl-method-where-clause.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied --> $DIR/wf-inherent-impl-method-where-clause.rs:12:5 | -LL | / fn foo(self) where T: ExtraCopy //~ ERROR E0277 +LL | / fn foo(self) where T: ExtraCopy LL | | {} | |______^ the trait `std::marker::Copy` is not implemented for `U` | diff --git a/src/test/ui/wf/wf-inherent-impl-where-clause.stderr b/src/test/ui/wf/wf-inherent-impl-where-clause.stderr index 2ed9cc56f94..f10ff841acb 100644 --- a/src/test/ui/wf/wf-inherent-impl-where-clause.stderr +++ b/src/test/ui/wf/wf-inherent-impl-where-clause.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied --> $DIR/wf-inherent-impl-where-clause.rs:11:1 | -LL | / impl Foo where T: ExtraCopy //~ ERROR E0277 +LL | / impl Foo where T: ExtraCopy LL | | { LL | | } | |_^ the trait `std::marker::Copy` is not implemented for `U` diff --git a/src/test/ui/wf/wf-misc-methods-issue-28609.stderr b/src/test/ui/wf/wf-misc-methods-issue-28609.stderr index 46dc4dc8870..d470aecd266 100644 --- a/src/test/ui/wf/wf-misc-methods-issue-28609.stderr +++ b/src/test/ui/wf/wf-misc-methods-issue-28609.stderr @@ -1,7 +1,7 @@ error[E0597]: borrowed value does not live long enough --> $DIR/wf-misc-methods-issue-28609.rs:22:31 | -LL | s.transmute_inherent(&mut 42) //~ ERROR does not live long enough +LL | s.transmute_inherent(&mut 42) | ^^ temporary value does not live long enough LL | } | - temporary value only lives until here @@ -11,14 +11,14 @@ note: borrowed value must be valid for the anonymous lifetime #1 defined on the | LL | / fn return_dangling_pointer_inherent(s: S2) -> &u32 { LL | | let s = s; -LL | | s.transmute_inherent(&mut 42) //~ ERROR does not live long enough +LL | | s.transmute_inherent(&mut 42) LL | | } | |_^ error[E0597]: `four` does not live long enough --> $DIR/wf-misc-methods-issue-28609.rs:35:20 | -LL | s.bomb = Some(&four); //~ ERROR does not live long enough +LL | s.bomb = Some(&four); | ^^^^ borrowed value does not live long enough LL | &s LL | } @@ -30,7 +30,7 @@ note: borrowed value must be valid for the anonymous lifetime #1 defined on the LL | / fn return_dangling_pointer_coerce(s: S2) -> &u32 { LL | | let four = 4; LL | | let mut s = s; -LL | | s.bomb = Some(&four); //~ ERROR does not live long enough +LL | | s.bomb = Some(&four); LL | | &s LL | | } | |_^ @@ -38,7 +38,7 @@ LL | | } error[E0597]: `four` does not live long enough --> $DIR/wf-misc-methods-issue-28609.rs:42:20 | -LL | s.bomb = Some(&four); //~ ERROR does not live long enough +LL | s.bomb = Some(&four); | ^^^^ borrowed value does not live long enough LL | &*s LL | } @@ -50,7 +50,7 @@ note: borrowed value must be valid for the anonymous lifetime #1 defined on the LL | / fn return_dangling_pointer_unary_op(s: S2) -> &u32 { LL | | let four = 4; LL | | let mut s = s; -LL | | s.bomb = Some(&four); //~ ERROR does not live long enough +LL | | s.bomb = Some(&four); LL | | &*s LL | | } | |_^ @@ -58,7 +58,7 @@ LL | | } error[E0597]: borrowed value does not live long enough --> $DIR/wf-misc-methods-issue-28609.rs:53:15 | -LL | s << &mut 3 //~ ERROR does not live long enough +LL | s << &mut 3 | ^ temporary value does not live long enough LL | } | - temporary value only lives until here @@ -68,14 +68,14 @@ note: borrowed value must be valid for the anonymous lifetime #1 defined on the | LL | / fn return_dangling_pointer_binary_op(s: S2) -> &u32 { LL | | let s = s; -LL | | s << &mut 3 //~ ERROR does not live long enough +LL | | s << &mut 3 LL | | } | |_^ error[E0597]: borrowed value does not live long enough --> $DIR/wf-misc-methods-issue-28609.rs:58:16 | -LL | s.shl(&mut 3) //~ ERROR does not live long enough +LL | s.shl(&mut 3) | ^ temporary value does not live long enough LL | } | - temporary value only lives until here @@ -85,14 +85,14 @@ note: borrowed value must be valid for the anonymous lifetime #1 defined on the | LL | / fn return_dangling_pointer_method(s: S2) -> &u32 { LL | | let s = s; -LL | | s.shl(&mut 3) //~ ERROR does not live long enough +LL | | s.shl(&mut 3) LL | | } | |_^ error[E0597]: borrowed value does not live long enough --> $DIR/wf-misc-methods-issue-28609.rs:63:21 | -LL | S2::shl(s, &mut 3) //~ ERROR does not live long enough +LL | S2::shl(s, &mut 3) | ^ temporary value does not live long enough LL | } | - temporary value only lives until here @@ -102,7 +102,7 @@ note: borrowed value must be valid for the anonymous lifetime #1 defined on the | LL | / fn return_dangling_pointer_ufcs(s: S2) -> &u32 { LL | | let s = s; -LL | | S2::shl(s, &mut 3) //~ ERROR does not live long enough +LL | | S2::shl(s, &mut 3) LL | | } | |_^ diff --git a/src/test/ui/wf/wf-object-safe.stderr b/src/test/ui/wf/wf-object-safe.stderr index 2a514d9d2c2..87e8105d4af 100644 --- a/src/test/ui/wf/wf-object-safe.stderr +++ b/src/test/ui/wf/wf-object-safe.stderr @@ -1,7 +1,7 @@ error[E0038]: the trait `A` cannot be made into an object --> $DIR/wf-object-safe.rs:9:13 | -LL | let _x: &A; //~ ERROR E0038 +LL | let _x: &A; | ^^ the trait `A` cannot be made into an object | = note: method `foo` references the `Self` type in its arguments or return type diff --git a/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.stderr b/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.stderr index 04f8c70bbf4..8649506c870 100644 --- a/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.stderr +++ b/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.stderr @@ -3,13 +3,13 @@ error[E0309]: the parameter type `T` may not live long enough | LL | impl<'a, T> Trait<'a, T> for usize { | - help: consider adding an explicit lifetime bound `T: 'a`... -LL | type Out = &'a fn(T); //~ ERROR `T` may not live long enough +LL | type Out = &'a fn(T); | ^^^^^^^^^^^^^^^^^^^^^ | note: ...so that the reference type `&'a fn(T)` does not outlive the data it points at --> $DIR/wf-outlives-ty-in-fn-or-trait.rs:9:5 | -LL | type Out = &'a fn(T); //~ ERROR `T` may not live long enough +LL | type Out = &'a fn(T); | ^^^^^^^^^^^^^^^^^^^^^ error[E0309]: the parameter type `T` may not live long enough @@ -17,13 +17,13 @@ error[E0309]: the parameter type `T` may not live long enough | LL | impl<'a, T> Trait<'a, T> for u32 { | - help: consider adding an explicit lifetime bound `T: 'a`... -LL | type Out = &'a Baz; //~ ERROR `T` may not live long enough +LL | type Out = &'a Baz; | ^^^^^^^^^^^^^^^^^^^^^^ | note: ...so that the reference type `&'a (dyn Baz + 'a)` does not outlive the data it points at --> $DIR/wf-outlives-ty-in-fn-or-trait.rs:19:5 | -LL | type Out = &'a Baz; //~ ERROR `T` may not live long enough +LL | type Out = &'a Baz; | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/wf/wf-static-method.stderr b/src/test/ui/wf/wf-static-method.stderr index 78ea903e699..32832ceb79c 100644 --- a/src/test/ui/wf/wf-static-method.stderr +++ b/src/test/ui/wf/wf-static-method.stderr @@ -1,7 +1,7 @@ error[E0312]: lifetime of reference outlives lifetime of borrowed content... --> $DIR/wf-static-method.rs:17:9 | -LL | u //~ ERROR E0312 +LL | u | ^ | note: ...the reference is valid for the lifetime 'a as defined on the impl at 14:6... @@ -18,7 +18,7 @@ LL | impl<'a, 'b> Foo<'a, 'b, Evil<'a, 'b>> for () { error[E0478]: lifetime bound not satisfied --> $DIR/wf-static-method.rs:26:18 | -LL | let me = Self::make_me(); //~ ERROR lifetime bound not satisfied +LL | let me = Self::make_me(); | ^^^^^^^^^^^^^ | note: lifetime parameter instantiated with the lifetime 'b as defined on the impl at 23:10 @@ -35,7 +35,7 @@ LL | impl<'a, 'b> Foo<'a, 'b, ()> for IndirectEvil<'a, 'b> { error[E0312]: lifetime of reference outlives lifetime of borrowed content... --> $DIR/wf-static-method.rs:33:9 | -LL | u //~ ERROR E0312 +LL | u | ^ | note: ...the reference is valid for the lifetime 'a as defined on the impl at 31:6... @@ -52,7 +52,7 @@ LL | impl<'a, 'b> Evil<'a, 'b> { error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'b` due to conflicting requirements --> $DIR/wf-static-method.rs:41:5 | -LL | <()>::static_evil(b) //~ ERROR cannot infer an appropriate lifetime +LL | <()>::static_evil(b) | ^^^^^^^^^^^^^^^^^ | note: first, the lifetime cannot outlive the lifetime 'b as defined on the function body at 40:13... @@ -63,7 +63,7 @@ LL | fn evil<'a, 'b>(b: &'b u32) -> &'a u32 { note: ...so that reference does not outlive borrowed content --> $DIR/wf-static-method.rs:41:23 | -LL | <()>::static_evil(b) //~ ERROR cannot infer an appropriate lifetime +LL | <()>::static_evil(b) | ^ note: but, the lifetime must be valid for the lifetime 'a as defined on the function body at 40:9... --> $DIR/wf-static-method.rs:40:9 @@ -73,7 +73,7 @@ LL | fn evil<'a, 'b>(b: &'b u32) -> &'a u32 { note: ...so that reference does not outlive borrowed content --> $DIR/wf-static-method.rs:41:5 | -LL | <()>::static_evil(b) //~ ERROR cannot infer an appropriate lifetime +LL | <()>::static_evil(b) | ^^^^^^^^^^^^^^^^^^^^ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'b` due to conflicting requirements diff --git a/src/test/ui/wf/wf-struct-bound.stderr b/src/test/ui/wf/wf-struct-bound.stderr index 37defb87ee5..1fdcced90cc 100644 --- a/src/test/ui/wf/wf-struct-bound.stderr +++ b/src/test/ui/wf/wf-struct-bound.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied --> $DIR/wf-struct-bound.rs:9:1 | -LL | / struct SomeStruct //~ ERROR E0277 +LL | / struct SomeStruct LL | | where T: ExtraCopy LL | | { LL | | data: (T,U) diff --git a/src/test/ui/wf/wf-struct-field.stderr b/src/test/ui/wf/wf-struct-field.stderr index e31552b4089..e609f93ff70 100644 --- a/src/test/ui/wf/wf-struct-field.stderr +++ b/src/test/ui/wf/wf-struct-field.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `A: std::marker::Copy` is not satisfied --> $DIR/wf-struct-field.rs:12:5 | -LL | data: IsCopy //~ ERROR E0277 +LL | data: IsCopy | ^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `A` | = help: consider adding a `where A: std::marker::Copy` bound diff --git a/src/test/ui/wf/wf-trait-associated-type-bound.stderr b/src/test/ui/wf/wf-trait-associated-type-bound.stderr index f8ba74a2fdc..658d41218e4 100644 --- a/src/test/ui/wf/wf-trait-associated-type-bound.stderr +++ b/src/test/ui/wf/wf-trait-associated-type-bound.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied --> $DIR/wf-trait-associated-type-bound.rs:9:1 | -LL | / trait SomeTrait { //~ ERROR E0277 +LL | / trait SomeTrait { LL | | type Type1: ExtraCopy; LL | | } | |_^ the trait `std::marker::Copy` is not implemented for `T` diff --git a/src/test/ui/wf/wf-trait-bound.stderr b/src/test/ui/wf/wf-trait-bound.stderr index 585571a6a3c..5cc9451bf5c 100644 --- a/src/test/ui/wf/wf-trait-bound.stderr +++ b/src/test/ui/wf/wf-trait-bound.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied --> $DIR/wf-trait-bound.rs:9:1 | -LL | / trait SomeTrait //~ ERROR E0277 +LL | / trait SomeTrait LL | | where T: ExtraCopy LL | | { LL | | } diff --git a/src/test/ui/wf/wf-trait-default-fn-arg.stderr b/src/test/ui/wf/wf-trait-default-fn-arg.stderr index eeafc06db34..e7133892236 100644 --- a/src/test/ui/wf/wf-trait-default-fn-arg.stderr +++ b/src/test/ui/wf/wf-trait-default-fn-arg.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `Self: std::cmp::Eq` is not satisfied --> $DIR/wf-trait-default-fn-arg.rs:11:5 | LL | / fn bar(&self, x: &Bar) { -LL | | //~^ ERROR E0277 +LL | | LL | | // LL | | // Here, Eq ought to be implemented. LL | | } diff --git a/src/test/ui/wf/wf-trait-default-fn-ret.stderr b/src/test/ui/wf/wf-trait-default-fn-ret.stderr index 7fabd6b4713..5a310a826dd 100644 --- a/src/test/ui/wf/wf-trait-default-fn-ret.stderr +++ b/src/test/ui/wf/wf-trait-default-fn-ret.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `Self: std::cmp::Eq` is not satisfied --> $DIR/wf-trait-default-fn-ret.rs:11:5 | LL | / fn bar(&self) -> Bar { -LL | | //~^ ERROR E0277 +LL | | LL | | // LL | | // Here, Eq ought to be implemented. LL | | loop { } diff --git a/src/test/ui/wf/wf-trait-default-fn-where-clause.stderr b/src/test/ui/wf/wf-trait-default-fn-where-clause.stderr index 669dd08b21f..d5a00be6d34 100644 --- a/src/test/ui/wf/wf-trait-default-fn-where-clause.stderr +++ b/src/test/ui/wf/wf-trait-default-fn-where-clause.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `Self: std::cmp::Eq` is not satisfied --> $DIR/wf-trait-default-fn-where-clause.rs:11:5 | LL | / fn bar(&self) where A: Bar { -LL | | //~^ ERROR E0277 +LL | | LL | | // LL | | // Here, Eq ought to be implemented. LL | | } diff --git a/src/test/ui/wf/wf-trait-superbound.stderr b/src/test/ui/wf/wf-trait-superbound.stderr index 0bcda407d9c..a3c4ab58f65 100644 --- a/src/test/ui/wf/wf-trait-superbound.stderr +++ b/src/test/ui/wf/wf-trait-superbound.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied --> $DIR/wf-trait-superbound.rs:9:1 | -LL | / trait SomeTrait: ExtraCopy { //~ ERROR E0277 +LL | / trait SomeTrait: ExtraCopy { LL | | } | |_^ the trait `std::marker::Copy` is not implemented for `T` | diff --git a/src/test/ui/where-clauses/where-for-self-2.stderr b/src/test/ui/where-clauses/where-for-self-2.stderr index bbcb61a856d..dbe68b82c24 100644 --- a/src/test/ui/where-clauses/where-for-self-2.stderr +++ b/src/test/ui/where-clauses/where-for-self-2.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `for<'a> &'a _: Bar` is not satisfied --> $DIR/where-for-self-2.rs:21:5 | -LL | foo(&X); //~ ERROR trait bound +LL | foo(&X); | ^^^ the trait `for<'a> Bar` is not implemented for `&'a _` | = help: the following implementations were found: diff --git a/src/test/ui/while-let.stderr b/src/test/ui/while-let.stderr index 6d61143d33c..156d0e6c33d 100644 --- a/src/test/ui/while-let.stderr +++ b/src/test/ui/while-let.stderr @@ -4,7 +4,7 @@ warning: irrefutable while-let pattern LL | while let $p = $e $b | ^^^^^ ... -LL | / foo!(a, 1, { //~ WARN irrefutable while-let +LL | / foo!(a, 1, { LL | | println!("irrefutable pattern"); LL | | }); | |_______- in this macro invocation @@ -17,7 +17,7 @@ warning: irrefutable while-let pattern LL | while let $p = $e $b | ^^^^^ ... -LL | / bar!(a, 1, { //~ WARN irrefutable while-let +LL | / bar!(a, 1, { LL | | println!("irrefutable pattern"); LL | | }); | |_______- in this macro invocation @@ -25,7 +25,7 @@ LL | | }); warning: irrefutable while-let pattern --> $DIR/while-let.rs:24:5 | -LL | / while let a = 1 { //~ WARN irrefutable while-let +LL | / while let a = 1 { LL | | println!("irrefutable pattern"); LL | | break; LL | | } diff --git a/src/test/ui/writing-to-immutable-vec.stderr b/src/test/ui/writing-to-immutable-vec.stderr index 3a99186b46f..9bc82dfd358 100644 --- a/src/test/ui/writing-to-immutable-vec.stderr +++ b/src/test/ui/writing-to-immutable-vec.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow immutable local variable `v` as mutable | LL | let v: Vec = vec![1, 2, 3]; | - help: make this binding mutable: `mut v` -LL | v[1] = 4; //~ ERROR cannot borrow immutable local variable `v` as mutable +LL | v[1] = 4; | ^ cannot borrow mutably error: aborting due to previous error