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 d2c4a28ce980a..e0e45d55a9e73 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 4cc0f4b4128fb..9cd50d26766ea 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 ce9584a4bb0ce..ef15bf05d54ef 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 12a56dcc4a5ef..d273ec019752c 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 34d026e957d6f..37d8b964c2428 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 47754da8b78d9..c791b8b451e50 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 8eafd1cefa6c4..d689286177644 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 9b629ca6778e5..cd0bff92bf112 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 b566048c75ee6..8ccf9700b9fc8 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 1beb5b7816cb5..0b2dbad884c54 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 81fee10e56ff8..5bfde8551ed37 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 9b84abf704c7f..e4257dfde6f90 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 11dd75621bf51..092d0eb7a81a4 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 b03051250fca8..fc2906da5f5fc 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 11e3222a1a51c..94791e369fc30 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 95db7ec455db7..cec8800a25c7f 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 4a5a53980eb8a..ccc9580a60c29 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.nll.stderr b/src/test/ui/E0508.nll.stderr index 82fdce2112ecf..983062e450ea7 100644 --- a/src/test/ui/E0508.nll.stderr +++ b/src/test/ui/E0508.nll.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/E0508.stderr b/src/test/ui/E0508.stderr index 1e7b4071d5d79..ba6cff80416f3 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 33b584ccefeba..ef7a48bc8a48f 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 4c82a6cbd21b4..da255143494d6 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 2156b43973fc3..5dea744998d8a 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 66667a6dc884f..01bf89ec79af9 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 972b10379d430..9c9f65ee6a96d 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 e044d60653121..2c2b498e39a43 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 72ad0509e46a9..e41590ac45eed 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.nll.stderr b/src/test/ui/access-mode-in-closures.nll.stderr index 0c9a62351d20d..713eeba545977 100644 --- a/src/test/ui/access-mode-in-closures.nll.stderr +++ b/src/test/ui/access-mode-in-closures.nll.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 } | ^^ - data moved here | | | cannot move out of borrowed content @@ -10,7 +10,7 @@ LL | match *s { S(v) => v } //~ ERROR cannot move out note: move occurs because `v` has type `std::vec::Vec`, which does not implement the `Copy` trait --> $DIR/access-mode-in-closures.rs:8:22 | -LL | match *s { S(v) => v } //~ ERROR cannot move out +LL | match *s { S(v) => v } | ^ error: aborting due to previous error diff --git a/src/test/ui/access-mode-in-closures.stderr b/src/test/ui/access-mode-in-closures.stderr index 0423c713531f7..9976dfe946fd9 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 8efbf7f78d91e..34e09da45ad53 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 95ef9a0522c34..85544b0c3849e 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 284802f21b9d3..8575e7508f125 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 32c7211cd1641..26d7aa80eee16 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 ecb6e4d4ecde2..5e47b0f0cc7ac 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 dd9e933542fa7..1ec0cf323e996 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 691c3159a5261..e97dbc15f9cde 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 378f352cb9228..9e84b14950964 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 bba4753046109..1cbf77a99f87e 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 339875390185d..21e80fb98027a 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 12a33e451fb05..99134ceba3327 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 37b61b80b2b89..9fe59d12e12cd 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 f79f0750d8904..feceadb67220b 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 1d7adb129d0e1..5304b09de5efe 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 f438ac8df4a09..f9ea3365cb8d3 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 47748609b1629..5f2b9c47e8c2a 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 6cc63de35d746..ea475ffc5547a 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 07ce5e621a626..57495863c9891 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 2bbe912521455..f4af9e0293950 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 3b62b1b01f48c..e1a1e63637271 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 8c7b4a1333c1f..06f1a1cc64c42 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 126fb572d992a..4b548604983df 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 784a53f106a99..502fb4f1c3033 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 0935d6ae3e611..aa987316801a7 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 3721b69898876..82d15b92b55fe 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 e05da8c4e4e8b..575a072c558bd 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 27b5b1e00f9ec..7d5b16c6e62d0 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 ec8852d9f186e..2926bdae0525b 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.nll.stderr b/src/test/ui/associated-types/associated-types-outlives.nll.stderr index c58dc314e8a9d..840e33b4b8a8e 100644 --- a/src/test/ui/associated-types/associated-types-outlives.nll.stderr +++ b/src/test/ui/associated-types/associated-types-outlives.nll.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 LL | return f(y); | - borrow later used here diff --git a/src/test/ui/associated-types/associated-types-outlives.stderr b/src/test/ui/associated-types/associated-types-outlives.stderr index 4cf3e473cf192..e35862d718f49 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 b54d2037f5d20..a26ee23894f6d 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 5f5fb7a273bfd..b6d3b53ba59b0 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 77914dbae795a..58ceec9040b9d 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 c83b14374f712..b5db9743932e9 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 2fee49acdf4b7..5b7db0e9d6fb4 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 57d6a4e0f16a2..aae25b2721e4d 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 3030a2f8f1d62..d8d7f6adb82b5 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 abb8685e4cef0..f8ad7eec454c4 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 f08f107a62ffe..4c5964715db7e 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.nll.stderr b/src/test/ui/augmented-assignments.nll.stderr index 33c94d6e3a59e..08f06e90162b4 100644 --- a/src/test/ui/augmented-assignments.nll.stderr +++ b/src/test/ui/augmented-assignments.nll.stderr @@ -1,14 +1,14 @@ error[E0505]: cannot move out of `x` because it is borrowed --> $DIR/augmented-assignments.rs:16:5 | -LL | x //~ error: use of moved value: `x` +LL | x | - | | | _____borrow of `x` occurs here | | -LL | | //~^ value used here after move +LL | | LL | | += -LL | | x; //~ value moved here +LL | | x; | | ^ | | | | |_____move out of `x` occurs here @@ -20,7 +20,7 @@ error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable LL | let y = Int(2); | - help: consider changing this to be mutable: `mut y` ... -LL | y //~ error: cannot borrow immutable local variable `y` as mutable +LL | y | ^ cannot borrow as mutable error: aborting due to 2 previous errors diff --git a/src/test/ui/augmented-assignments.stderr b/src/test/ui/augmented-assignments.stderr index 73de315e542a2..e429bf2a594fe 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 356e24d18a78f..97b9cd961a026 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 9ddb27916d184..19bf11a67d1c1 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 590d73bc3f5ef..3e41b7e658555 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 71ac9a16ba62c..6dec74efd7185 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 343de94182e9a..8212b2392c4ac 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 6732e8553f3f1..5baba599e741f 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 d7ec41489d156..f6e67e6d78df0 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 5bf0b089afa20..a1ea3f774b40d 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 1a9c11f7b42af..c7f15e7a4fa50 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 8232bdd23a643..c72b965236006 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 ce803e96801f9..a459c00634a1d 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 427b1a722d994..9157fe0b070d0 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 9ebbedcfe6009..267a9dff926a2 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.nll.stderr b/src/test/ui/binop/binop-consume-args.nll.stderr index 59b5aba93cad4..5751af27fcb42 100644 --- a/src/test/ui/binop/binop-consume-args.nll.stderr +++ b/src/test/ui/binop/binop-consume-args.nll.stderr @@ -7,7 +7,7 @@ LL | fn add, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument LL | lhs + rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move error[E0382]: use of moved value: `rhs` @@ -19,8 +19,8 @@ LL | fn add, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument 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 error[E0382]: use of moved value: `lhs` @@ -32,7 +32,7 @@ LL | fn sub, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument LL | lhs - rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move error[E0382]: use of moved value: `rhs` @@ -44,8 +44,8 @@ LL | fn sub, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument 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 error[E0382]: use of moved value: `lhs` @@ -57,7 +57,7 @@ LL | fn mul, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument LL | lhs * rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move error[E0382]: use of moved value: `rhs` @@ -69,8 +69,8 @@ LL | fn mul, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument 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 error[E0382]: use of moved value: `lhs` @@ -82,7 +82,7 @@ LL | fn div, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument LL | lhs / rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move error[E0382]: use of moved value: `rhs` @@ -94,8 +94,8 @@ LL | fn div, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument 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 error[E0382]: use of moved value: `lhs` @@ -107,7 +107,7 @@ LL | fn rem, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument LL | lhs % rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move error[E0382]: use of moved value: `rhs` @@ -119,8 +119,8 @@ LL | fn rem, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument 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 error[E0382]: use of moved value: `lhs` @@ -132,7 +132,7 @@ LL | fn bitand, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument LL | lhs & rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move error[E0382]: use of moved value: `rhs` @@ -144,8 +144,8 @@ LL | fn bitand, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument 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 error[E0382]: use of moved value: `lhs` @@ -157,7 +157,7 @@ LL | fn bitor, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument LL | lhs | rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move error[E0382]: use of moved value: `rhs` @@ -169,8 +169,8 @@ LL | fn bitor, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument 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 error[E0382]: use of moved value: `lhs` @@ -182,7 +182,7 @@ LL | fn bitxor, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument LL | lhs ^ rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move error[E0382]: use of moved value: `rhs` @@ -194,8 +194,8 @@ LL | fn bitxor, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument 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 error[E0382]: use of moved value: `lhs` @@ -207,7 +207,7 @@ LL | fn shl, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument LL | lhs << rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move error[E0382]: use of moved value: `rhs` @@ -219,8 +219,8 @@ LL | fn shl, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument 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 error[E0382]: use of moved value: `lhs` @@ -232,7 +232,7 @@ LL | fn shr, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument LL | lhs >> rhs; | --- value moved here -LL | drop(lhs); //~ ERROR use of moved value: `lhs` +LL | drop(lhs); | ^^^ value used here after move error[E0382]: use of moved value: `rhs` @@ -244,8 +244,8 @@ LL | fn shr, B>(lhs: A, rhs: B) { | consider adding a `Copy` constraint to this type argument 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 error: aborting due to 20 previous errors diff --git a/src/test/ui/binop/binop-consume-args.stderr b/src/test/ui/binop/binop-consume-args.stderr index 0b5d2200b9ffc..9246c116709d4 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.nll.stderr b/src/test/ui/binop/binop-move-semantics.nll.stderr index 7c84e8833a9e6..7d54de655bf58 100644 --- a/src/test/ui/binop/binop-move-semantics.nll.stderr +++ b/src/test/ui/binop/binop-move-semantics.nll.stderr @@ -8,7 +8,7 @@ LL | fn double_move>(x: T) { LL | x | - value moved here LL | + -LL | x; //~ ERROR: use of moved value +LL | x; | ^ value used here after move error[E0382]: borrow of moved value: `x` @@ -21,7 +21,7 @@ LL | fn move_then_borrow + Clone>(x: T) { LL | x | - value moved here LL | + -LL | x.clone(); //~ ERROR: use of moved value +LL | x.clone(); | ^ value borrowed here after move error[E0505]: cannot move out of `x` because it is borrowed @@ -30,7 +30,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 ... LL | use_mut(n); use_imm(m); @@ -42,7 +42,7 @@ 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 LL | use_mut(n); use_imm(m); | - borrow later used here @@ -50,13 +50,13 @@ LL | use_mut(n); use_imm(m); 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 @@ -68,7 +68,7 @@ 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; | | ^- | |_____|| | |mutable borrow later used here @@ -83,7 +83,7 @@ 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; | | ^^^^^- | |_____|____| | | immutable borrow later used here diff --git a/src/test/ui/binop/binop-move-semantics.stderr b/src/test/ui/binop/binop-move-semantics.stderr index b1dc70d379d40..acc2620681b6a 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 151315d34f27c..5981b8b60794c 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 29885cac234fb..8a41f8b8e3dff 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 d41eae1a43299..302d2972f7de1 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 1bf17db21ac5a..618d020ce08b5 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 2c13b28766943..d73489a602df4 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 91e926eb5a73b..18adb15c9615d 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 fce06f5b45d2c..fb4feff37134a 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 9cb1a6c5d7d52..e1e6428eda255 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 50af4734202dd..3ceff81ec4d63 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 9024e7cf01cb4..904d2ed97de81 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.nll.stderr b/src/test/ui/borrowck/borrow-immutable-upvar-mutation.nll.stderr index 9174a6976113b..af45c8a980dfc 100644 --- a/src/test/ui/borrowck/borrow-immutable-upvar-mutation.nll.stderr +++ b/src/test/ui/borrowck/borrow-immutable-upvar-mutation.nll.stderr @@ -1,73 +1,73 @@ error[E0594]: cannot assign to `x`, as it is a captured variable in a `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); | ^^^^^^ cannot assign | help: consider changing this to accept closures that implement `FnMut` --> $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[E0596]: cannot borrow `y` as mutable, as it is a captured variable in a `Fn` closure --> $DIR/borrow-immutable-upvar-mutation.rs:18:31 | -LL | let _g = to_fn(|| set(&mut y)); //~ ERROR cannot borrow +LL | let _g = to_fn(|| set(&mut y)); | ^^^^^^ cannot borrow as mutable | help: consider changing this to accept closures that implement `FnMut` --> $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[E0594]: cannot assign to `z`, as it is a captured variable in a `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); }); | ^^^^^^ cannot assign | help: consider changing this to accept closures that implement `FnMut` --> $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 `x`, as it is a captured variable in a `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); | ^^^^^^ cannot assign | help: consider changing this to accept closures that implement `FnMut` --> $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 `y` as mutable, as it is a captured variable in a `Fn` closure --> $DIR/borrow-immutable-upvar-mutation.rs:30:36 | -LL | let _g = to_fn(move || set(&mut y)); //~ ERROR cannot borrow +LL | let _g = to_fn(move || set(&mut y)); | ^^^^^^ cannot borrow as mutable | help: consider changing this to accept closures that implement `FnMut` --> $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 `z`, as it is a captured variable in a `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); }); | ^^^^^^ cannot assign | help: consider changing this to accept closures that implement `FnMut` --> $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-immutable-upvar-mutation.stderr b/src/test/ui/borrowck/borrow-immutable-upvar-mutation.stderr index 505604ab597d4..09adb350e00de 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.nll.stderr b/src/test/ui/borrowck/borrow-tuple-fields.nll.stderr index 72a29b864a4f1..5c40555c501cb 100644 --- a/src/test/ui/borrowck/borrow-tuple-fields.nll.stderr +++ b/src/test/ui/borrowck/borrow-tuple-fields.nll.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 LL | LL | r.use_ref(); @@ -14,7 +14,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 | a.use_ref(); | - immutable borrow later used here @@ -24,7 +24,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_ref(); | - first borrow later used here @@ -34,7 +34,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 LL | r.use_ref(); | - borrow later used here @@ -44,7 +44,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 | a.use_ref(); | - immutable borrow later used here @@ -54,7 +54,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(); | - first borrow later used here diff --git a/src/test/ui/borrowck/borrow-tuple-fields.stderr b/src/test/ui/borrowck/borrow-tuple-fields.stderr index a62e7287e683f..f7fc06e1b4fbd 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.nll.stderr b/src/test/ui/borrowck/borrowck-and-init.nll.stderr index b4b02cf208ae7..2db075194810e 100644 --- a/src/test/ui/borrowck/borrowck-and-init.nll.stderr +++ b/src/test/ui/borrowck/borrowck-and-init.nll.stderr @@ -1,7 +1,7 @@ error[E0381]: borrow 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-and-init.stderr b/src/test/ui/borrowck/borrowck-and-init.stderr index 42b658871dfaa..13696ac8347b5 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.nll.stderr b/src/test/ui/borrowck/borrowck-anon-fields-struct.nll.stderr index 43c74988f9ea5..7a959fb6ec62f 100644 --- a/src/test/ui/borrowck/borrowck-anon-fields-struct.nll.stderr +++ b/src/test/ui/borrowck/borrowck-anon-fields-struct.nll.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 | *a += 1; diff --git a/src/test/ui/borrowck/borrowck-anon-fields-struct.stderr b/src/test/ui/borrowck/borrowck-anon-fields-struct.stderr index 9c36a9fe875f5..efe94dee2e7c5 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.nll.stderr b/src/test/ui/borrowck/borrowck-anon-fields-tuple.nll.stderr index 15859040f060a..88a8867f5ee08 100644 --- a/src/test/ui/borrowck/borrowck-anon-fields-tuple.nll.stderr +++ b/src/test/ui/borrowck/borrowck-anon-fields-tuple.nll.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 | *a += 1; diff --git a/src/test/ui/borrowck/borrowck-anon-fields-tuple.stderr b/src/test/ui/borrowck/borrowck-anon-fields-tuple.stderr index 4b823f396afc5..40f96cb712c0f 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.nll.stderr b/src/test/ui/borrowck/borrowck-anon-fields-variant.nll.stderr index 2f4cf7dd800e1..6c8a32ee39167 100644 --- a/src/test/ui/borrowck/borrowck-anon-fields-variant.nll.stderr +++ b/src/test/ui/borrowck/borrowck-anon-fields-variant.nll.stderr @@ -19,7 +19,7 @@ error[E0503]: cannot use `y` because it was mutably borrowed LL | Foo::Y(ref mut a, _) => a, | --------- borrow of `y.0` occurs here ... -LL | Foo::Y(ref mut b, _) => b, //~ ERROR cannot borrow +LL | Foo::Y(ref mut b, _) => b, | ^^^^^^^^^^^^^^^^^^^^ use of borrowed `y.0` ... LL | *a += 1; @@ -31,7 +31,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 | *a += 1; diff --git a/src/test/ui/borrowck/borrowck-anon-fields-variant.stderr b/src/test/ui/borrowck/borrowck-anon-fields-variant.stderr index 1e94cdebaec6a..2835cab9092f1 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.nll.stderr b/src/test/ui/borrowck/borrowck-argument.nll.stderr index 9e7f0930ee57d..cf15833140927 100644 --- a/src/test/ui/borrowck/borrowck-argument.nll.stderr +++ b/src/test/ui/borrowck/borrowck-argument.nll.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable | LL | fn func(arg: S) { | --- help: consider changing this to be mutable: `mut arg` -LL | arg.mutate(); //~ ERROR: cannot borrow immutable argument +LL | arg.mutate(); | ^^^ cannot borrow as mutable error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable @@ -11,7 +11,7 @@ error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable | LL | fn method(&self, arg: S) { | --- help: consider changing this to be mutable: `mut arg` -LL | arg.mutate(); //~ ERROR: cannot borrow immutable argument +LL | arg.mutate(); | ^^^ cannot borrow as mutable error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable @@ -19,13 +19,13 @@ error[E0596]: cannot borrow `arg` as mutable, as it is not declared as mutable | LL | fn default(&self, arg: S) { | --- help: consider changing this to be mutable: `mut arg` -LL | arg.mutate(); //~ ERROR: cannot borrow immutable argument +LL | arg.mutate(); | ^^^ cannot borrow as mutable error[E0596]: cannot borrow `arg` as mutable, as it is not declared 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 as mutable | | | help: consider changing this to be mutable: `mut arg` diff --git a/src/test/ui/borrowck/borrowck-argument.stderr b/src/test/ui/borrowck/borrowck-argument.stderr index fa82b1c00cc7f..6c9c411cbcf03 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.nll.stderr b/src/test/ui/borrowck/borrowck-assign-comp-idx.nll.stderr index 71f36c2b045a8..93f1d8c525863 100644 --- a/src/test/ui/borrowck/borrowck-assign-comp-idx.nll.stderr +++ b/src/test/ui/borrowck/borrowck-assign-comp-idx.nll.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 | LL | println!("{}", *q); @@ -17,7 +17,7 @@ LL | borrow( | ------ immutable borrow later used by call LL | &p, | -- immutable borrow occurs here -LL | || p[0] = 5); //~ ERROR cannot borrow `p` as mutable +LL | || p[0] = 5); | ^^ - second borrow occurs due to use of `p` in closure | | | mutable borrow occurs here diff --git a/src/test/ui/borrowck/borrowck-assign-comp-idx.stderr b/src/test/ui/borrowck/borrowck-assign-comp-idx.stderr index 9997aa4190e3f..0d092e6812d94 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.nll.stderr b/src/test/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.nll.stderr index 469199d69b91e..d8ccf36852a51 100644 --- a/src/test/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.nll.stderr +++ b/src/test/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.nll.stderr @@ -3,7 +3,7 @@ error[E0594]: cannot assign to `*s.pointer` which is behind a `&` reference | LL | fn a(s: &S) { | -- help: consider changing this to be a mutable reference: `&mut S<'_>` -LL | *s.pointer += 1; //~ ERROR cannot assign +LL | *s.pointer += 1; | ^^^^^^^^^^^^^^^ `s` is a `&` reference, so the data it refers to cannot be written error[E0594]: cannot assign to `*s.pointer` which is behind a `&` reference @@ -11,7 +11,7 @@ error[E0594]: cannot assign to `*s.pointer` which is behind a `&` reference | LL | fn c(s: & &mut S) { | -------- help: consider changing this to be a mutable reference: `&mut &mut S<'_>` -LL | *s.pointer += 1; //~ ERROR cannot assign +LL | *s.pointer += 1; | ^^^^^^^^^^^^^^^ `s` is a `&` reference, so the data it refers to cannot be written error: aborting due to 2 previous errors 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 76e7ee841f827..5ec1ff2c058da 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.nll.stderr b/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.nll.stderr index 8e3e9d41f8c0e..0aacaf9cf4797 100644 --- a/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.nll.stderr +++ b/src/test/ui/borrowck/borrowck-assign-to-andmut-in-borrowed-loc.nll.stderr @@ -3,7 +3,7 @@ error[E0503]: cannot use `*y.pointer` because it was mutably borrowed | LL | let z = copy_borrowed_ptr(&mut y); | ------ borrow of `y` occurs here -LL | *y.pointer += 1; //~ ERROR cannot assign +LL | *y.pointer += 1; | ^^^^^^^^^^^^^^^ use of borrowed `y` LL | *z.pointer += 1; | --------------- borrow later used here @@ -13,7 +13,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 LL | *z.pointer += 1; | --------------- borrow later used here 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 d4639581223de..10d6ac5464d05 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.nll.stderr b/src/test/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.nll.stderr index 53aaa4a2957e9..3ed76c13f6a7b 100644 --- a/src/test/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.nll.stderr +++ b/src/test/ui/borrowck/borrowck-auto-mut-ref-to-immut-var.nll.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable | LL | let x = Foo { x: 3 }; | - help: consider changing this to be mutable: `mut x` -LL | x.printme(); //~ ERROR cannot borrow +LL | x.printme(); | ^ cannot borrow as mutable 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 b48473a884c2f..759b778e35c82 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.nll.stderr b/src/test/ui/borrowck/borrowck-autoref-3261.nll.stderr index 9e62534c6718a..c2dfb687e8ee9 100644 --- a/src/test/ui/borrowck/borrowck-autoref-3261.nll.stderr +++ b/src/test/ui/borrowck/borrowck-autoref-3261.nll.stderr @@ -5,7 +5,7 @@ LL | (&mut x).with( | -------- ---- first borrow later used by call | | | 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-autoref-3261.stderr b/src/test/ui/borrowck/borrowck-autoref-3261.stderr index 7a5430ac15c37..280704a27151c 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.nll.stderr b/src/test/ui/borrowck/borrowck-bad-nested-calls-free.nll.stderr index 1732628d40f83..e273a778fdad5 100644 --- a/src/test/ui/borrowck/borrowck-bad-nested-calls-free.nll.stderr +++ b/src/test/ui/borrowck/borrowck-bad-nested-calls-free.nll.stderr @@ -5,7 +5,7 @@ LL | add( | --- immutable borrow later used by call LL | &*a, | --- immutable borrow occurs here -LL | rewrite(&mut a)); //~ ERROR cannot borrow +LL | rewrite(&mut a)); | ^^^^^^ mutable borrow occurs here error[E0502]: cannot borrow `a` as mutable because it is also borrowed as immutable @@ -15,7 +15,7 @@ LL | add( | --- immutable borrow later used by call LL | &*a, | --- immutable borrow occurs here -LL | rewrite(&mut a)); //~ ERROR cannot borrow +LL | rewrite(&mut a)); | ^^^^^^ mutable borrow occurs here error: aborting due to 2 previous errors 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 165530d270af9..06ec2bdac7151 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.nll.stderr b/src/test/ui/borrowck/borrowck-bad-nested-calls-move.nll.stderr index 117567cba192b..371bcf2b69cf8 100644 --- a/src/test/ui/borrowck/borrowck-bad-nested-calls-move.nll.stderr +++ b/src/test/ui/borrowck/borrowck-bad-nested-calls-move.nll.stderr @@ -5,7 +5,7 @@ LL | add( | --- borrow later used by call 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 @@ -15,7 +15,7 @@ LL | add( | --- borrow later used by call 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-bad-nested-calls-move.stderr b/src/test/ui/borrowck/borrowck-bad-nested-calls-move.stderr index b2c680f39521e..3b34a61364ab6 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.nll.stderr b/src/test/ui/borrowck/borrowck-block-unint.nll.stderr index ea17fafc93908..d2a49962bafca 100644 --- a/src/test/ui/borrowck/borrowck-block-unint.nll.stderr +++ b/src/test/ui/borrowck/borrowck-block-unint.nll.stderr @@ -1,7 +1,7 @@ error[E0381]: borrow 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` LL | println!("{}", x); | - borrow occurs due to use in closure diff --git a/src/test/ui/borrowck/borrowck-block-unint.stderr b/src/test/ui/borrowck/borrowck-block-unint.stderr index 6e7af76fc2e89..ab55d7994d0c9 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.nll.stderr b/src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.nll.stderr index d1377fd439a4f..ad6bd7dc94262 100644 --- a/src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.nll.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-from-owned-ptr.nll.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; | ----- first borrow later used here @@ -13,7 +13,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; | ----- mutable borrow later used here @@ -23,7 +23,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; | ----- immutable borrow later used here @@ -45,9 +45,9 @@ error[E0502]: cannot borrow `foo.bar1` as immutable because it is also borrowed | 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 | let _foo2 = &*foo; //~ ERROR cannot borrow +LL | let _foo2 = &*foo; LL | *bar1; | ----- mutable borrow later used here @@ -56,8 +56,8 @@ error[E0502]: cannot borrow `*foo` as immutable because it is also borrowed as m | 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; | ----- mutable borrow later used here @@ -67,7 +67,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; | ----- first borrow later used here @@ -77,7 +77,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; | ----- first borrow later used here @@ -87,7 +87,7 @@ error[E0502]: cannot borrow `foo.bar1` as mutable because it is also borrowed as | 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; | ----- immutable borrow later used here @@ -97,7 +97,7 @@ error[E0502]: cannot borrow `*foo` as mutable because it is also borrowed as imm | 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; | ----- immutable borrow later used here @@ -107,7 +107,7 @@ error[E0596]: cannot borrow `foo.bar1` as mutable, as `foo` is not declared as m | LL | let foo = make_foo(); | --- help: consider changing this to be mutable: `mut foo` -LL | let bar1 = &mut foo.bar1; //~ ERROR cannot borrow +LL | let bar1 = &mut foo.bar1; | ^^^^^^^^^^^^^ cannot borrow as mutable error: aborting due to 11 previous errors 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 e116cb70c1c31..a4fb28d0e8151 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.nll.stderr b/src/test/ui/borrowck/borrowck-borrow-from-stack-variable.nll.stderr index f53cb32a5679e..b5c6184791875 100644 --- a/src/test/ui/borrowck/borrowck-borrow-from-stack-variable.nll.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-from-stack-variable.nll.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; | ----- first borrow later used here @@ -13,7 +13,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; | ----- mutable borrow later used here @@ -23,7 +23,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; | ----- immutable borrow later used here @@ -45,9 +45,9 @@ error[E0502]: cannot borrow `foo.bar1` as immutable because it is also borrowed | 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 | let _foo2 = &foo; //~ ERROR cannot borrow +LL | let _foo2 = &foo; LL | *bar1; | ----- mutable borrow later used here @@ -56,8 +56,8 @@ error[E0502]: cannot borrow `foo` as immutable because it is also borrowed as mu | 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; | ----- mutable borrow later used here @@ -67,7 +67,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; | ----- first borrow later used here @@ -77,7 +77,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; | ----- first borrow later used here @@ -87,7 +87,7 @@ error[E0502]: cannot borrow `foo.bar1` as mutable because it is also borrowed as | 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; | ----- immutable borrow later used here @@ -97,7 +97,7 @@ error[E0502]: cannot borrow `foo` as mutable because it is also borrowed as immu | 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; | ----- immutable borrow later used here @@ -107,7 +107,7 @@ error[E0596]: cannot borrow `foo.bar1` as mutable, as `foo` is not declared as m | LL | let foo = make_foo(); | --- help: consider changing this to be mutable: `mut foo` -LL | let bar1 = &mut foo.bar1; //~ ERROR cannot borrow +LL | let bar1 = &mut foo.bar1; | ^^^^^^^^^^^^^ cannot borrow as mutable error: aborting due to 11 previous errors 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 2c446dfee44b2..fe60d944a44fb 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.nll.stderr b/src/test/ui/borrowck/borrowck-borrow-from-temporary.nll.stderr index 52bc3e9829674..71bf052c93d61 100644 --- a/src/test/ui/borrowck/borrowck-borrow-from-temporary.nll.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-from-temporary.nll.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return value referencing temporary value --> $DIR/borrowck-borrow-from-temporary.rs:10:5 | -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 created here LL | x | ^ returns a value referencing data owned by the current function diff --git a/src/test/ui/borrowck/borrowck-borrow-from-temporary.stderr b/src/test/ui/borrowck/borrowck-borrow-from-temporary.stderr index 0726e3d5d5e60..6f101f690cd29 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.nll.stderr b/src/test/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.nll.stderr index 82b9449de5071..7c1c063d260b2 100644 --- a/src/test/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.nll.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.nll.stderr @@ -4,7 +4,7 @@ error[E0594]: cannot assign to `**t1` which is behind a `&` reference LL | let t1 = t0; | -- help: consider changing this to be a mutable reference: `&mut &mut isize` LL | let p: &isize = &**t0; -LL | **t1 = 22; //~ ERROR cannot assign +LL | **t1 = 22; | ^^^^^^^^^ `t1` is a `&` reference, so the data it refers to cannot be written error[E0502]: cannot borrow `**t0` as immutable because it is also borrowed as mutable @@ -12,7 +12,7 @@ error[E0502]: cannot borrow `**t0` as immutable because it is also borrowed as m | 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; | --------- mutable borrow later used here @@ -22,7 +22,7 @@ error[E0596]: cannot borrow `**t0` as mutable, as it is behind a `&` reference | LL | fn foo4(t0: & &mut isize) { | ------------ help: consider changing this to be a mutable reference: `&mut &mut isize` -LL | let x: &mut isize = &mut **t0; //~ ERROR cannot borrow +LL | let x: &mut isize = &mut **t0; | ^^^^^^^^^ `t0` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to 3 previous errors 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 ff2969f53480c..709a797edcb4e 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.nll.stderr b/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.nll.stderr index c329fc9e91083..fa0ae318e72cd 100644 --- a/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.nll.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-mut-object-twice.nll.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(); | - first borrow later used here 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 abfce9857f7c1..1b64ad5756459 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.nll.stderr b/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.nll.stderr index ecb013b7a1603..4fc320c505947 100644 --- a/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.nll.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.nll.stderr @@ -1,85 +1,85 @@ error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:47:19 | -LL | let __isize = &mut x.y; //~ ERROR cannot borrow +LL | let __isize = &mut x.y; | ^^^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:51:19 | -LL | let __isize = &mut x.y; //~ ERROR cannot borrow +LL | let __isize = &mut x.y; | ^^^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:59:5 | -LL | &mut x.y //~ ERROR cannot borrow +LL | &mut x.y | ^^^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:63:5 | -LL | &mut x.y //~ ERROR cannot borrow +LL | &mut x.y | ^^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to data in a `&` reference --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:67:5 | -LL | x.y = 3; //~ ERROR cannot assign +LL | x.y = 3; | ^^^^^^^ cannot assign error[E0594]: cannot assign to data in a `&` reference --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:71:5 | -LL | x.y = 3; //~ ERROR cannot assign +LL | x.y = 3; | ^^^^^^^ cannot assign error[E0594]: cannot assign to data in a `&` reference --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:75:5 | -LL | x.y = 3; //~ ERROR cannot assign +LL | x.y = 3; | ^^^^^^^ cannot assign error[E0596]: cannot borrow data in a `&` reference 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 data in a `&` reference 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 data in a `&` reference 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 data in a `&` reference 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 data in a `&` reference 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 data in a `&` reference 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 data in a `&` reference 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-auto-deref.stderr b/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.stderr index c6f9c655a11dc..2fe1461a303d5 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.nll.stderr b/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.nll.stderr index 1c3131806be2d..cc4d91a58e937 100644 --- a/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.nll.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.nll.stderr @@ -1,43 +1,43 @@ error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/borrowck-borrow-overloaded-deref.rs:23:19 | -LL | let __isize = &mut *x; //~ ERROR cannot borrow +LL | let __isize = &mut *x; | ^^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/borrowck-borrow-overloaded-deref.rs:27:19 | -LL | let __isize = &mut *x; //~ ERROR cannot borrow +LL | let __isize = &mut *x; | ^^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/borrowck-borrow-overloaded-deref.rs:35:5 | -LL | &mut **x //~ ERROR cannot borrow +LL | &mut **x | ^^^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/borrowck-borrow-overloaded-deref.rs:39:5 | -LL | &mut **x //~ ERROR cannot borrow +LL | &mut **x | ^^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to data in a `&` reference --> $DIR/borrowck-borrow-overloaded-deref.rs:43:5 | -LL | *x = 3; //~ ERROR cannot assign +LL | *x = 3; | ^^^^^^ cannot assign error[E0594]: cannot assign to data in a `&` reference --> $DIR/borrowck-borrow-overloaded-deref.rs:47:5 | -LL | **x = 3; //~ ERROR cannot assign +LL | **x = 3; | ^^^^^^^ cannot assign error[E0594]: cannot assign to data in a `&` reference --> $DIR/borrowck-borrow-overloaded-deref.rs:51:5 | -LL | **x = 3; //~ ERROR cannot assign +LL | **x = 3; | ^^^^^^^ cannot assign error: aborting due to 7 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 41e7cc210c8f5..fb79ccb701fb1 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.nll.stderr b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.nll.stderr index 97dc59c954385..1dd18c12fc8de 100644 --- a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.nll.stderr +++ b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.nll.stderr @@ -1,7 +1,7 @@ error[E0716]: temporary value dropped while borrowed --> $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 is freed at the end of this statement | | | creates a temporary which is freed while still in use 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 b94926951192a..d17cf8a6fac36 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.nll.stderr b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.nll.stderr index d6e599d1abf93..c91a4377b4c67 100644 --- a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.nll.stderr +++ b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.nll.stderr @@ -1,7 +1,7 @@ error[E0716]: temporary value dropped while borrowed --> $DIR/borrowck-borrowed-uniq-rvalue.rs:10:28 | -LL | buggy_map.insert(42, &*Box::new(1)); //~ ERROR borrowed value does not live long enough +LL | buggy_map.insert(42, &*Box::new(1)); | ^^^^^^^^^^^ - temporary value is freed at the end of this statement | | | creates a temporary which is freed while still in use diff --git a/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.stderr b/src/test/ui/borrowck/borrowck-borrowed-uniq-rvalue.stderr index bf4674035ead2..32a86562da747 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.nll.stderr b/src/test/ui/borrowck/borrowck-break-uninit-2.nll.stderr index 177a27387728e..e40d8d9dfccb9 100644 --- a/src/test/ui/borrowck/borrowck-break-uninit-2.nll.stderr +++ b/src/test/ui/borrowck/borrowck-break-uninit-2.nll.stderr @@ -1,7 +1,7 @@ error[E0381]: borrow 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-2.stderr b/src/test/ui/borrowck/borrowck-break-uninit-2.stderr index e574c0ff8a85b..a6c3dfef9e870 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.nll.stderr b/src/test/ui/borrowck/borrowck-break-uninit.nll.stderr index 64d1e629fecdb..bbf9b9f1241a2 100644 --- a/src/test/ui/borrowck/borrowck-break-uninit.nll.stderr +++ b/src/test/ui/borrowck/borrowck-break-uninit.nll.stderr @@ -1,7 +1,7 @@ error[E0381]: borrow 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-break-uninit.stderr b/src/test/ui/borrowck/borrowck-break-uninit.stderr index 1a853c35d00e0..dcb024a3e1a0c 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.nll.stderr b/src/test/ui/borrowck/borrowck-closures-mut-of-imm.nll.stderr index 8123e17ce9da2..0064417c57bf9 100644 --- a/src/test/ui/borrowck/borrowck-closures-mut-of-imm.nll.stderr +++ b/src/test/ui/borrowck/borrowck-closures-mut-of-imm.nll.stderr @@ -17,7 +17,7 @@ LL | let mut c1 = || set(&mut *x); | -- - first 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); | ^^ - second borrow occurs due to use of `x` in closure | | 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 f529247b1b6f6..2f7c6a1a56a5b 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-mut-of-mut.nll.stderr b/src/test/ui/borrowck/borrowck-closures-mut-of-mut.nll.stderr index 18f95f232cdd3..471173e595f47 100644 --- a/src/test/ui/borrowck/borrowck-closures-mut-of-mut.nll.stderr +++ b/src/test/ui/borrowck/borrowck-closures-mut-of-mut.nll.stderr @@ -9,7 +9,7 @@ LL | let mut c2 = || set(&mut *x); | ^^ - second borrow occurs due to use of `x` in closure | | | second closure is constructed here -LL | //~^ ERROR two closures require unique access to `x` at the same time +LL | LL | c2(); c1(); | -- first borrow later used here diff --git a/src/test/ui/borrowck/borrowck-closures-two-mut-fail.nll.stderr b/src/test/ui/borrowck/borrowck-closures-two-mut-fail.nll.stderr index d3d11e8451cf8..07f477d17868f 100644 --- a/src/test/ui/borrowck/borrowck-closures-two-mut-fail.nll.stderr +++ b/src/test/ui/borrowck/borrowck-closures-two-mut-fail.nll.stderr @@ -5,7 +5,7 @@ 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 @@ -19,7 +19,7 @@ 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 @@ -33,7 +33,7 @@ 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 @@ -51,7 +51,7 @@ LL | let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nes | ^^ - 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 | c1; | -- first borrow later used here @@ -66,7 +66,7 @@ LL | let c2 = to_fn_mut(|| set(&mut *x.f)); | ^^ - 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 | c1; | -- first borrow later used here 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 cb8f5b4366bfd..7399f8360dc30 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 bfb7069461588..e881201ddfcc0 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.nll.stderr b/src/test/ui/borrowck/borrowck-closures-unique-imm.nll.stderr index 80e042fc8fc45..b8bbb31a3550f 100644 --- a/src/test/ui/borrowck/borrowck-closures-unique-imm.nll.stderr +++ b/src/test/ui/borrowck/borrowck-closures-unique-imm.nll.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(); | - immutable 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 1b661b70d7f5b..3cdc9b9d4fd4f 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.nll.stderr b/src/test/ui/borrowck/borrowck-closures-unique.nll.stderr index d6082734451f2..3106f36ac8ba9 100644 --- a/src/test/ui/borrowck/borrowck-closures-unique.nll.stderr +++ b/src/test/ui/borrowck/borrowck-closures-unique.nll.stderr @@ -5,7 +5,7 @@ LL | let c1 = || get(x); | -- - first 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); | ^^ - second borrow occurs due to use of `x` in closure | | | closure construction occurs here @@ -19,7 +19,7 @@ LL | let c1 = || get(x); | -- - first 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); }; | ^^ - second borrow occurs due to use of `x` in closure | | | closure construction occurs here @@ -33,7 +33,7 @@ LL | let c1 = || set(x); | -- - first 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); | ^^ - second borrow occurs due to use of `x` in closure | | | second closure is constructed here @@ -45,7 +45,7 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable | LL | fn e(x: &'static mut isize) { | - help: consider changing this to be mutable: `mut x` -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 assign error: aborting due to 4 previous errors diff --git a/src/test/ui/borrowck/borrowck-closures-unique.stderr b/src/test/ui/borrowck/borrowck-closures-unique.stderr index 94181ad2400d7..238b16f654e38 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.nll.stderr b/src/test/ui/borrowck/borrowck-closures-use-after-free.nll.stderr index 4501e28a18816..a6dbcf36077a7 100644 --- a/src/test/ui/borrowck/borrowck-closures-use-after-free.nll.stderr +++ b/src/test/ui/borrowck/borrowck-closures-use-after-free.nll.stderr @@ -6,7 +6,7 @@ LL | let mut test = |foo: &Foo| { LL | ptr = box Foo { x: ptr.x + 1 }; | --- first borrow occurs due to use of `ptr` in closure LL | }; -LL | test(&*ptr); //~ ERROR cannot borrow `*ptr` +LL | test(&*ptr); | ---- ^^^^^ immutable borrow occurs here | | | mutable borrow later used by call 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 b41a4a0c6768c..9e77d8ce1881d 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.nll.stderr b/src/test/ui/borrowck/borrowck-consume-unsize-vec.nll.stderr index ea7683a91adfe..c69237fa95f65 100644 --- a/src/test/ui/borrowck/borrowck-consume-unsize-vec.nll.stderr +++ b/src/test/ui/borrowck/borrowck-consume-unsize-vec.nll.stderr @@ -5,7 +5,7 @@ LL | fn foo(b: Box<[i32;5]>) { | - move occurs because `b` has type `std::boxed::Box<[i32; 5]>`, which does not implement the `Copy` trait LL | consume(b); | - value moved here -LL | consume(b); //~ ERROR use of moved value +LL | consume(b); | ^ value used here after move error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr b/src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr index 2fc2248000f3d..02644b82f57ee 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.nll.stderr b/src/test/ui/borrowck/borrowck-consume-upcast-box.nll.stderr index 15cf359326be9..e8194ad694403 100644 --- a/src/test/ui/borrowck/borrowck-consume-upcast-box.nll.stderr +++ b/src/test/ui/borrowck/borrowck-consume-upcast-box.nll.stderr @@ -5,7 +5,7 @@ LL | fn foo(b: Box) { | - move occurs because `b` has type `std::boxed::Box`, which does not implement the `Copy` trait LL | consume(b); | - value moved here -LL | consume(b); //~ ERROR use of moved value +LL | consume(b); | ^ value used here after move error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr b/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr index aef1671342ef4..7267a99b869b0 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 07b597f480feb..a2b42fa495e0e 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.nll.stderr b/src/test/ui/borrowck/borrowck-field-sensitivity.nll.stderr index 25a9a11204430..b3451659bec5a 100644 --- a/src/test/ui/borrowck/borrowck-field-sensitivity.nll.stderr +++ b/src/test/ui/borrowck/borrowck-field-sensitivity.nll.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]: borrow 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 borrowed 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]: borrow 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 borrowed 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 LL | drop(**p); | --- borrow later used here @@ -53,7 +53,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 LL | drop(**p); | --- borrow later used here @@ -63,7 +63,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 | drop(*p); | -- first borrow later used here @@ -73,7 +73,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 @@ -83,7 +83,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 @@ -93,7 +93,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 @@ -103,7 +103,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 diff --git a/src/test/ui/borrowck/borrowck-field-sensitivity.stderr b/src/test/ui/borrowck/borrowck-field-sensitivity.stderr index bfab5cbe536dd..0cf6f3f2182e3 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.nll.stderr b/src/test/ui/borrowck/borrowck-fn-in-const-c.nll.stderr index 7d8618e16d974..d48866dce0423 100644 --- a/src/test/ui/borrowck/borrowck-fn-in-const-c.nll.stderr +++ b/src/test/ui/borrowck/borrowck-fn-in-const-c.nll.stderr @@ -1,7 +1,7 @@ error[E0713]: borrow may still be in use when destructor runs --> $DIR/borrowck-fn-in-const-c.rs:17:16 | -LL | return &local.inner; //~ ERROR does not live long enough +LL | return &local.inner; | ^^^^^^^^^^^^ returning this value requires that `local.inner` is borrowed for `'static` LL | } | - here, drop of `local` needs exclusive access to `local.inner`, because the type `DropString` implements the `Drop` trait 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 f6e7e99393c8c..d2ddf808d1195 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.nll.stderr b/src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.nll.stderr index 8ba6a07b3d2d4..08cafa7da7aa8 100644 --- a/src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.nll.stderr +++ b/src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.nll.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of borrowed content --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:12:15 | -LL | for &a in x.iter() { //~ ERROR cannot move out +LL | for &a in x.iter() { | -- ^^^^^^^^ cannot move out of borrowed content | || | |data moved here @@ -10,13 +10,13 @@ LL | for &a in x.iter() { //~ ERROR cannot move out note: move occurs because `a` has type `&mut i32`, which does not implement the `Copy` trait --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:12:10 | -LL | for &a in x.iter() { //~ ERROR cannot move out +LL | for &a in x.iter() { | ^ error[E0507]: cannot move out of borrowed content --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:18:15 | -LL | for &a in &f.a { //~ ERROR cannot move out +LL | for &a in &f.a { | -- ^^^^ cannot move out of borrowed content | || | |data moved here @@ -25,13 +25,13 @@ LL | for &a in &f.a { //~ ERROR cannot move out note: move occurs because `a` has type `std::boxed::Box`, which does not implement the `Copy` trait --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:18:10 | -LL | for &a in &f.a { //~ ERROR cannot move out +LL | for &a in &f.a { | ^ error[E0507]: cannot move out of borrowed content --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:22:15 | -LL | for &a in x.iter() { //~ ERROR cannot move out +LL | for &a in x.iter() { | -- ^^^^^^^^ cannot move out of borrowed content | || | |data moved here @@ -40,7 +40,7 @@ LL | for &a in x.iter() { //~ ERROR cannot move out note: move occurs because `a` has type `std::boxed::Box`, which does not implement the `Copy` trait --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:22:10 | -LL | for &a in x.iter() { //~ ERROR cannot move out +LL | for &a in x.iter() { | ^ error: aborting due to 3 previous errors 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 1a7e2cb69632c..fb53b13a58de9 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.nll.stderr b/src/test/ui/borrowck/borrowck-for-loop-head-linkage.nll.stderr index 32ca24ba6ec43..f47dce453696e 100644 --- a/src/test/ui/borrowck/borrowck-for-loop-head-linkage.nll.stderr +++ b/src/test/ui/borrowck/borrowck-for-loop-head-linkage.nll.stderr @@ -7,7 +7,7 @@ LL | for &x in &vector { | immutable borrow occurs here | immutable borrow later used 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 occurs here | immutable borrow later used 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-for-loop-head-linkage.stderr b/src/test/ui/borrowck/borrowck-for-loop-head-linkage.stderr index 85008948a1c0f..a2d8908c4dd2c 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 f6d199d788bf8..1223e409d4df6 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 e569fbdeca1e7..d11f29b05f565 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.nll.stderr b/src/test/ui/borrowck/borrowck-in-static.nll.stderr index ff094ecf70746..da639a837aa50 100644 --- a/src/test/ui/borrowck/borrowck-in-static.nll.stderr +++ b/src/test/ui/borrowck/borrowck-in-static.nll.stderr @@ -3,7 +3,7 @@ error[E0507]: cannot move out of captured 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 variable in an `Fn` closure 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 400f3cd1c3e78..6eeaf428c5f01 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 0195dc60eb3ee..82a602c6359c1 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 dfa63f71c6956..899739378524c 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 414124040aa26..9863ceb14240f 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 124a60b8a5021..80c4e0c80483d 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.nll.stderr b/src/test/ui/borrowck/borrowck-insert-during-each.nll.stderr index b99d5e813c7c2..b004447bf45fb 100644 --- a/src/test/ui/borrowck/borrowck-insert-during-each.nll.stderr +++ b/src/test/ui/borrowck/borrowck-insert-during-each.nll.stderr @@ -5,7 +5,7 @@ LL | f.foo( | ^ --- first borrow later used by call | ___| | | -LL | | |a| { //~ ERROR closure requires unique access to `f` +LL | | |a| { | | --- closure construction occurs here LL | | f.n.insert(*a); | | - first borrow occurs due to use of `f` in closure @@ -19,7 +19,7 @@ LL | f.foo( | - --- first borrow later used by call | | | borrow occurs here -LL | |a| { //~ ERROR closure requires unique access to `f` +LL | |a| { | ^^^ closure construction occurs here LL | f.n.insert(*a); | - second borrow occurs due to use of `f` in closure diff --git a/src/test/ui/borrowck/borrowck-insert-during-each.stderr b/src/test/ui/borrowck/borrowck-insert-during-each.stderr index 021b5b27ae702..3b6339757c979 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.nll.stderr b/src/test/ui/borrowck/borrowck-issue-2657-1.nll.stderr index 3da8d8f8c4757..4ea4eb8f00759 100644 --- a/src/test/ui/borrowck/borrowck-issue-2657-1.nll.stderr +++ b/src/test/ui/borrowck/borrowck-issue-2657-1.nll.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 LL | _y.use_ref(); | -- borrow later used here diff --git a/src/test/ui/borrowck/borrowck-issue-2657-1.stderr b/src/test/ui/borrowck/borrowck-issue-2657-1.stderr index 7663822094d86..d9ad86b4f8841 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.nll.stderr b/src/test/ui/borrowck/borrowck-issue-2657-2.nll.stderr index 061c458f73e58..4ef36df52df57 100644 --- a/src/test/ui/borrowck/borrowck-issue-2657-2.nll.stderr +++ b/src/test/ui/borrowck/borrowck-issue-2657-2.nll.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-2657-2.stderr b/src/test/ui/borrowck/borrowck-issue-2657-2.stderr index 7e718786caa37..1314b1a14f44a 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 de4894d5b526b..a5462b4139685 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.nll.stderr b/src/test/ui/borrowck/borrowck-lend-flow-if.nll.stderr index 0c99edeb1a455..68a82bdb57c55 100644 --- a/src/test/ui/borrowck/borrowck-lend-flow-if.nll.stderr +++ b/src/test/ui/borrowck/borrowck-lend-flow-if.nll.stderr @@ -4,7 +4,7 @@ error[E0502]: cannot borrow `*v` as mutable because it is also borrowed as immut 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(); | -- immutable borrow later used here diff --git a/src/test/ui/borrowck/borrowck-lend-flow-if.stderr b/src/test/ui/borrowck/borrowck-lend-flow-if.stderr index d1b6bb0c7c96c..1acd47ce58bca 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.nll.stderr b/src/test/ui/borrowck/borrowck-lend-flow.nll.stderr index ae3313597a3e4..07b11b3e72828 100644 --- a/src/test/ui/borrowck/borrowck-lend-flow.nll.stderr +++ b/src/test/ui/borrowck/borrowck-lend-flow.nll.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `*v` as mutable because it is also borrowed as immut | 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(); | -- immutable borrow later used here diff --git a/src/test/ui/borrowck/borrowck-lend-flow.stderr b/src/test/ui/borrowck/borrowck-lend-flow.stderr index d9080d0055391..e39fb6c860083 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.nll.stderr b/src/test/ui/borrowck/borrowck-loan-blocks-move.nll.stderr index 450102f0c6622..615660febbce2 100644 --- a/src/test/ui/borrowck/borrowck-loan-blocks-move.nll.stderr +++ b/src/test/ui/borrowck/borrowck-loan-blocks-move.nll.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 LL | w.use_ref(); | - borrow later used here diff --git a/src/test/ui/borrowck/borrowck-loan-blocks-move.stderr b/src/test/ui/borrowck/borrowck-loan-blocks-move.stderr index ba6e34c2ec826..e6f0a691eca19 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.nll.stderr b/src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.nll.stderr index 281a8103f9778..1d1522a15b1ed 100644 --- a/src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.nll.stderr +++ b/src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.nll.stderr @@ -5,7 +5,7 @@ LL | borrow(&*v, | ------ --- immutable borrow occurs here | | | immutable borrow later used by call -LL | |w| { //~ ERROR cannot borrow `v` as mutable +LL | |w| { | ^^^ mutable borrow occurs here LL | v = box 4; | - second borrow occurs due to use of `v` in closure 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 6aa2d5d189d25..c916b7efc08ec 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.nll.stderr b/src/test/ui/borrowck/borrowck-loan-of-static-data-issue-27616.nll.stderr index 6984575890308..6994c837dfcbe 100644 --- a/src/test/ui/borrowck/borrowck-loan-of-static-data-issue-27616.nll.stderr +++ b/src/test/ui/borrowck/borrowck-loan-of-static-data-issue-27616.nll.stderr @@ -6,7 +6,7 @@ LL | let alias: &'static mut String = s; | | | type annotation requires that `*s` is borrowed for `'static` ... -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-of-static-data-issue-27616.stderr b/src/test/ui/borrowck/borrowck-loan-of-static-data-issue-27616.stderr index eceb923e776b7..c9d36a7f93801 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.nll.stderr b/src/test/ui/borrowck/borrowck-loan-rcvr-overloaded-op.nll.stderr index 421af61ff78c3..ad74a89f6689c 100644 --- a/src/test/ui/borrowck/borrowck-loan-rcvr-overloaded-op.nll.stderr +++ b/src/test/ui/borrowck/borrowck-loan-rcvr-overloaded-op.nll.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` ... LL | *q + 3; // OK to use the new alias `q` @@ -16,7 +16,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 | LL | *q + 3; // OK to use the new alias `q` 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 b4f7a9af666f4..d180e3e701c61 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.nll.stderr b/src/test/ui/borrowck/borrowck-loan-rcvr.nll.stderr index bded4d1e0a3b3..ec3edc80323f5 100644 --- a/src/test/ui/borrowck/borrowck-loan-rcvr.nll.stderr +++ b/src/test/ui/borrowck/borrowck-loan-rcvr.nll.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 later used by call @@ -14,7 +14,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 | LL | l.x += 1; diff --git a/src/test/ui/borrowck/borrowck-loan-rcvr.stderr b/src/test/ui/borrowck/borrowck-loan-rcvr.stderr index eb0bbec0bc772..56d33eff73f15 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.nll.stderr b/src/test/ui/borrowck/borrowck-loan-vec-content.nll.stderr index be48f217ef19b..6691a2396a1da 100644 --- a/src/test/ui/borrowck/borrowck-loan-vec-content.nll.stderr +++ b/src/test/ui/borrowck/borrowck-loan-vec-content.nll.stderr @@ -5,7 +5,7 @@ LL | takes_imm_elt( | ------------- immutable borrow later used by call LL | &v[0], | - immutable borrow occurs here -LL | || { //~ ERROR cannot borrow `v` as mutable +LL | || { | ^^ mutable borrow occurs here LL | v[1] = 4; | - second borrow occurs due to use of `v` in closure diff --git a/src/test/ui/borrowck/borrowck-loan-vec-content.stderr b/src/test/ui/borrowck/borrowck-loan-vec-content.stderr index 6a565ff2f10d4..eea6a09f0fc5d 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.nll.stderr b/src/test/ui/borrowck/borrowck-move-by-capture.nll.stderr index b8a0117441779..38f6ca7be752e 100644 --- a/src/test/ui/borrowck/borrowck-move-by-capture.nll.stderr +++ b/src/test/ui/borrowck/borrowck-move-by-capture.nll.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of captured 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 variable in an `FnMut` closure error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-move-by-capture.stderr b/src/test/ui/borrowck/borrowck-move-by-capture.stderr index 9c485fb48ca74..d845a576b3dcd 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.nll.stderr b/src/test/ui/borrowck/borrowck-move-error-with-note.nll.stderr index 9386278886f6b..25eb8d0134c30 100644 --- a/src/test/ui/borrowck/borrowck-move-error-with-note.nll.stderr +++ b/src/test/ui/borrowck/borrowck-move-error-with-note.nll.stderr @@ -1,12 +1,12 @@ 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 | help: consider removing the `*`: `f` -LL | //~| cannot move out +LL | LL | Foo::Foo1(num1, | ---- data moved here LL | num2) => (), @@ -46,12 +46,12 @@ LL | g: _t 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 | help: consider borrowing here: `&a.a` -LL | //~| cannot move out +LL | LL | n => { | - data moved here | 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 07009b42e4da1..8b0722916dbfe 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.nll.stderr b/src/test/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.nll.stderr index b7fa2247e32f7..e4840fba67299 100644 --- a/src/test/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.nll.stderr +++ b/src/test/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.nll.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 LL | b.use_ref(); | - borrow later used here 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 2ed888051f61e..5e2428ef4a3ed 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.nll.stderr b/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.nll.stderr index 5b78465795362..615e3fd180016 100644 --- a/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.nll.stderr +++ b/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.nll.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-from-unsafe-ptr.stderr b/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.stderr index 62a522600388d..c23c5bb9c4c10 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.nll.stderr b/src/test/ui/borrowck/borrowck-move-mut-base-ptr.nll.stderr index ce6433d5a527f..77f5b72e51c5d 100644 --- a/src/test/ui/borrowck/borrowck-move-mut-base-ptr.nll.stderr +++ b/src/test/ui/borrowck/borrowck-move-mut-base-ptr.nll.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 LL | *t1 = 22; LL | p.use_ref(); 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 224bf0fded875..d3853832c92b1 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.nll.stderr b/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.nll.stderr index 9aaeefd4cfc32..51caf60da6e0e 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.nll.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-of-vec-tail.nll.stderr @@ -20,9 +20,9 @@ LL | Foo { string: b }] => { help: consider removing the `&` | LL | [Foo { string: a }, -LL | //~^ ERROR cannot move out of type `[Foo]` -LL | //~| cannot move out -LL | //~| to prevent move +LL | +LL | +LL | LL | Foo { string: b }] => { | 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 156ba0d4d7bb2..5ec0dabfde587 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.nll.stderr b/src/test/ui/borrowck/borrowck-move-subcomponent.nll.stderr index 3bb5351f97ba3..8c9083fcf1356 100644 --- a/src/test/ui/borrowck/borrowck-move-subcomponent.nll.stderr +++ b/src/test/ui/borrowck/borrowck-move-subcomponent.nll.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 LL | f(pb); | -- borrow later used here diff --git a/src/test/ui/borrowck/borrowck-move-subcomponent.stderr b/src/test/ui/borrowck/borrowck-move-subcomponent.stderr index 187cdbbf81565..fd3deef6df5e0 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.nll.stderr b/src/test/ui/borrowck/borrowck-multiple-captures.nll.stderr index d0065a2e7dc3d..32c7067acc892 100644 --- a/src/test/ui/borrowck/borrowck-multiple-captures.nll.stderr +++ b/src/test/ui/borrowck/borrowck-multiple-captures.nll.stderr @@ -6,7 +6,7 @@ LL | let p1 = &x1; ... LL | thread::spawn(move|| { | ^^^^^^ move out of `x1` occurs here -LL | drop(x1); //~ ERROR cannot move `x1` into closure because it is borrowed +LL | drop(x1); | -- move occurs due to use in closure ... LL | borrow(&*p1); @@ -19,8 +19,8 @@ LL | let p2 = &x2; | --- borrow of `x2` occurs here LL | thread::spawn(move|| { | ^^^^^^ move out of `x2` occurs here -LL | drop(x1); //~ ERROR cannot move `x1` into closure because it is borrowed -LL | drop(x2); //~ ERROR cannot move `x2` into closure because it is borrowed +LL | drop(x1); +LL | drop(x2); | -- move occurs due to use in closure ... LL | borrow(&*p2); @@ -36,7 +36,7 @@ LL | drop(x1); ... LL | thread::spawn(move|| { | ^^^^^^ value used here after move -LL | drop(x1); //~ ERROR capture of moved value: `x1` +LL | drop(x1); | -- use occurs due to use in closure error[E0382]: use of moved value: `x2` @@ -48,16 +48,16 @@ LL | drop(x2); | -- value moved here LL | thread::spawn(move|| { | ^^^^^^ value used here after move -LL | drop(x1); //~ ERROR capture of moved value: `x1` -LL | drop(x2); //~ ERROR capture of moved value: `x2` +LL | drop(x1); +LL | drop(x2); | -- use occurs due to use in closure 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 @@ -69,7 +69,7 @@ LL | let p = &x; | -- borrow of `x` occurs here LL | thread::spawn(move|| { | ^^^^^^ move out of `x` occurs here -LL | drop(x); //~ ERROR cannot move `x` into closure because it is borrowed +LL | drop(x); | - move occurs due to use in closure ... LL | borrow(&*p); @@ -78,9 +78,9 @@ LL | borrow(&*p); 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 @@ -94,7 +94,7 @@ LL | drop(x); | - value moved here LL | thread::spawn(move|| { | ^^^^^^ value used here after move -LL | drop(x); //~ ERROR capture of moved value: `x` +LL | drop(x); | - use occurs due to use in closure error: aborting due to 8 previous errors diff --git a/src/test/ui/borrowck/borrowck-multiple-captures.stderr b/src/test/ui/borrowck/borrowck-multiple-captures.stderr index 3cdd094260833..f25b19e3d2ee8 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.nll.stderr b/src/test/ui/borrowck/borrowck-mut-addr-of-imm-var.nll.stderr index be69be6341172..d58548f22049a 100644 --- a/src/test/ui/borrowck/borrowck-mut-addr-of-imm-var.nll.stderr +++ b/src/test/ui/borrowck/borrowck-mut-addr-of-imm-var.nll.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable | LL | let x: isize = 3; | - help: consider changing this to be mutable: `mut x` -LL | let y: &mut isize = &mut x; //~ ERROR cannot borrow +LL | let y: &mut isize = &mut x; | ^^^^^^ cannot borrow as mutable error: aborting due to previous error 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 95635f7f67031..aa3b39c395def 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.nll.stderr b/src/test/ui/borrowck/borrowck-mut-borrow-of-mut-base-ptr.nll.stderr index 666ccf35a7c9b..925930acf8651 100644 --- a/src/test/ui/borrowck/borrowck-mut-borrow-of-mut-base-ptr.nll.stderr +++ b/src/test/ui/borrowck/borrowck-mut-borrow-of-mut-base-ptr.nll.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `t0` as mutable because it is also borrowed as immut | 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 | **t2 += 1; // Mutates `*t0` LL | p.use_ref(); @@ -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 | **t2 += 1; // Mutates `*t0` but not through `*p` LL | p.use_mut(); 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 154a283b43b5b..fb73dbd45104b 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.nll.stderr b/src/test/ui/borrowck/borrowck-mut-slice-of-imm-vec.nll.stderr index 5a9ec98a2db06..8e7ffdc6819a5 100644 --- a/src/test/ui/borrowck/borrowck-mut-slice-of-imm-vec.nll.stderr +++ b/src/test/ui/borrowck/borrowck-mut-slice-of-imm-vec.nll.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable | LL | let v = vec![1, 2, 3]; | - help: consider changing this to be mutable: `mut v` -LL | write(&mut v); //~ ERROR cannot borrow +LL | write(&mut v); | ^^^^^^ cannot borrow as mutable error: aborting due to previous error 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 41ee2adf8aa0c..416091920ad1f 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.nll.stderr b/src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.nll.stderr index b106708352ef6..3462b7610d38b 100644 --- a/src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.nll.stderr +++ b/src/test/ui/borrowck/borrowck-no-cycle-in-exchange-heap.nll.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 | | | borrow later used here 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 5aaf825a3c368..5fc169490c7e3 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.nll.stderr b/src/test/ui/borrowck/borrowck-object-lifetime.nll.stderr index ff0cc93323257..cf94c74dec222 100644 --- a/src/test/ui/borrowck/borrowck-object-lifetime.nll.stderr +++ b/src/test/ui/borrowck/borrowck-object-lifetime.nll.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(); | - immutable borrow later used here @@ -13,7 +13,7 @@ error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immuta | 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(); | - immutable borrow later used here diff --git a/src/test/ui/borrowck/borrowck-object-lifetime.stderr b/src/test/ui/borrowck/borrowck-object-lifetime.stderr index b22d05b8a2a82..8f6c8e072e541 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.nll.stderr b/src/test/ui/borrowck/borrowck-or-init.nll.stderr index dcd2c18dcaa23..122f5192720cc 100644 --- a/src/test/ui/borrowck/borrowck-or-init.nll.stderr +++ b/src/test/ui/borrowck/borrowck-or-init.nll.stderr @@ -1,7 +1,7 @@ error[E0381]: borrow 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-or-init.stderr b/src/test/ui/borrowck/borrowck-or-init.stderr index 60024c08303ac..a2b69b187b932 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.nll.stderr b/src/test/ui/borrowck/borrowck-overloaded-call.nll.stderr index c5a4c4e005aa7..b7fcaa645af2f 100644 --- a/src/test/ui/borrowck/borrowck-overloaded-call.nll.stderr +++ b/src/test/ui/borrowck/borrowck-overloaded-call.nll.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); | -- mutable borrow later used here @@ -14,7 +14,7 @@ error[E0596]: cannot borrow `s` as mutable, as it is not declared as mutable LL | let s = SFnMut { | - help: consider changing this to be mutable: `mut s` ... -LL | s(3); //~ ERROR cannot borrow immutable local variable `s` as mutable +LL | s(3); | ^ cannot borrow as mutable error[E0382]: use of moved value: `s` @@ -25,7 +25,7 @@ LL | let s = SFnOnce { ... 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 error: aborting due to 3 previous errors diff --git a/src/test/ui/borrowck/borrowck-overloaded-call.stderr b/src/test/ui/borrowck/borrowck-overloaded-call.stderr index 0429226130656..97223a2307c6b 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.nll.stderr b/src/test/ui/borrowck/borrowck-overloaded-index-autoderef.nll.stderr index 13ace0178f892..5f34749ca89eb 100644 --- a/src/test/ui/borrowck/borrowck-overloaded-index-autoderef.nll.stderr +++ b/src/test/ui/borrowck/borrowck-overloaded-index-autoderef.nll.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(); | - mutable borrow later used here @@ -13,7 +13,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(); | - first borrow later used here @@ -23,7 +23,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(); | - first borrow later used here @@ -33,7 +33,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(); | - immutable borrow later used here @@ -43,7 +43,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 LL | p.use_ref(); | - borrow later used here @@ -53,7 +53,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 LL | p.use_ref(); | - borrow later used here @@ -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 LL | p.use_mut(); | - borrow later used here @@ -73,7 +73,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 LL | p.use_mut(); | - borrow later used here diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-autoderef.stderr b/src/test/ui/borrowck/borrowck-overloaded-index-autoderef.stderr index 9bc83f84339c7..73cab8868eab6 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.nll.stderr b/src/test/ui/borrowck/borrowck-reborrow-from-mut.nll.stderr index 6b41b6f9c4fd4..21bc8bb06cc06 100644 --- a/src/test/ui/borrowck/borrowck-reborrow-from-mut.nll.stderr +++ b/src/test/ui/borrowck/borrowck-reborrow-from-mut.nll.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); | ----- first borrow later used here @@ -13,7 +13,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); | ----- mutable borrow later used here @@ -23,7 +23,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); | ----- immutable borrow later used here @@ -45,9 +45,9 @@ error[E0502]: cannot borrow `foo.bar1` as immutable because it is also borrowed | 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 | let _foo2 = &*foo; //~ ERROR cannot borrow +LL | let _foo2 = &*foo; LL | use_mut(_bar1); | ----- mutable borrow later used here @@ -56,8 +56,8 @@ error[E0502]: cannot borrow `*foo` as immutable because it is also borrowed as m | 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); | ----- mutable borrow later used here @@ -67,7 +67,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); | ----- first borrow later used here @@ -77,7 +77,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); | ----- first borrow later used here @@ -87,7 +87,7 @@ error[E0502]: cannot borrow `foo.bar1` as mutable because it is also borrowed as | 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); | ----- immutable borrow later used here @@ -97,7 +97,7 @@ error[E0502]: cannot borrow `*foo` as mutable because it is also borrowed as imm | 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); | ----- immutable borrow later used here @@ -107,7 +107,7 @@ error[E0596]: cannot borrow `foo.bar1` as mutable, as it is behind a `&` referen | LL | fn borrow_mut_from_imm(foo: &Foo) { | ---- help: consider changing this to be a mutable reference: `&mut Foo` -LL | let _bar1 = &mut foo.bar1; //~ ERROR cannot borrow +LL | let _bar1 = &mut foo.bar1; | ^^^^^^^^^^^^^ `foo` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to 11 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 c20df9f5ff3ff..ea624018ad4c0 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.nll.stderr b/src/test/ui/borrowck/borrowck-ref-mut-of-imm.nll.stderr index 67948ad387928..e744fc6b54b1a 100644 --- a/src/test/ui/borrowck/borrowck-ref-mut-of-imm.nll.stderr +++ b/src/test/ui/borrowck/borrowck-ref-mut-of-imm.nll.stderr @@ -4,7 +4,7 @@ error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable LL | fn destructure(x: Option) -> isize { | - help: consider changing this to be mutable: `mut x` ... -LL | Some(ref mut v) => *v //~ ERROR cannot borrow +LL | Some(ref mut v) => *v | ^^^^^^^^^ cannot borrow as mutable error: aborting due to previous error 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 4eb41758fc19b..6e0d2f699455b 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 96f3981ac2fe6..3618a7cb2cd39 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.nll.stderr b/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.nll.stderr index 7b026ee995118..ee8f90edcd3fd 100644 --- a/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.nll.stderr +++ b/src/test/ui/borrowck/borrowck-report-with-custom-diagnostic.nll.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 | y.use_mut(); @@ -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 | y.use_ref(); @@ -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 | y.use_mut(); 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 cb65ea11205d7..79aec6c2edaad 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.nll.stderr b/src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.nll.stderr index 65f910de4c3b3..d54449ac4ad46 100644 --- a/src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.nll.stderr +++ b/src/test/ui/borrowck/borrowck-return-variable-on-stack-via-clone.nll.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return value referencing function parameter `x` --> $DIR/borrowck-return-variable-on-stack-via-clone.rs:7:5 | -LL | (&x).clone() //~ ERROR `x` does not live long enough +LL | (&x).clone() | ----^^^^^^^^ | | | returns a value referencing data owned by the current function 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 b54941eed1be5..4d4244ba5efad 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 b8a5ce8dc99bf..a2b65af5dbfcd 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 b1629c0e056ca..f716ee68b0002 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 057d40d74cfe9..c291ed224eb3c 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.nll.stderr b/src/test/ui/borrowck/borrowck-swap-mut-base-ptr.nll.stderr index 8fdd5ef4ca6be..1c55953c91fb7 100644 --- a/src/test/ui/borrowck/borrowck-swap-mut-base-ptr.nll.stderr +++ b/src/test/ui/borrowck/borrowck-swap-mut-base-ptr.nll.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `t0` as mutable because it is also borrowed as immut | 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 | *t1 = 22; LL | p.use_ref(); 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 35007216dace1..9efd249caf86b 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.nll.stderr b/src/test/ui/borrowck/borrowck-unboxed-closures.nll.stderr index 363a5a69a07e3..ec1cf4a4e2b06 100644 --- a/src/test/ui/borrowck/borrowck-unboxed-closures.nll.stderr +++ b/src/test/ui/borrowck/borrowck-unboxed-closures.nll.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); | - mutable borrow later used here @@ -13,7 +13,7 @@ error[E0596]: cannot borrow `f` as mutable, as it is not declared as mutable | LL | fn b isize>(f: F) { | - help: consider changing this to be mutable: `mut f` -LL | f(1, 2); //~ ERROR cannot borrow immutable argument +LL | f(1, 2); | ^ cannot borrow as mutable error[E0382]: use of moved value: `f` @@ -25,7 +25,7 @@ LL | fn c isize>(f: F) { | consider adding a `Copy` constraint to this type argument 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 error: aborting due to 3 previous errors diff --git a/src/test/ui/borrowck/borrowck-unboxed-closures.stderr b/src/test/ui/borrowck/borrowck-unboxed-closures.stderr index 044119f508950..2e0773aebc4cc 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 f658b64f11f41..2d0b21dd0d6fb 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 a685f0ecf3c04..163395e42d252 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 5e3428e20b1fb..5db9c1b250cc2 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.nll.stderr b/src/test/ui/borrowck/borrowck-union-borrow-nested.nll.stderr index 6bb6fc4cf29a1..61569b9cac106 100644 --- a/src/test/ui/borrowck/borrowck-union-borrow-nested.nll.stderr +++ b/src/test/ui/borrowck/borrowck-union-borrow-nested.nll.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` LL | ra.use_mut(); | -- borrow later used here diff --git a/src/test/ui/borrowck/borrowck-union-borrow-nested.stderr b/src/test/ui/borrowck/borrowck-union-borrow-nested.stderr index 199a13352c4a0..71fae6f8d63b8 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.nll.stderr b/src/test/ui/borrowck/borrowck-union-borrow.nll.stderr index 5cba30b43b8a0..518f062ba1af8 100644 --- a/src/test/ui/borrowck/borrowck-union-borrow.nll.stderr +++ b/src/test/ui/borrowck/borrowck-union-borrow.nll.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); | -- immutable borrow later used here @@ -13,7 +13,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 LL | drop(ra); | -- borrow later used here @@ -23,7 +23,7 @@ error[E0502]: cannot borrow `u` (via `u.b`) as mutable because it is also borrow | 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); | -- immutable borrow later used here @@ -35,7 +35,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 LL | drop(ra); | -- borrow later used here @@ -45,7 +45,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); | --- mutable borrow later used here @@ -55,7 +55,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` LL | drop(ra); | -- borrow later used here @@ -65,7 +65,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); | --- first borrow later used here @@ -75,7 +75,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 LL | drop(rma); | --- borrow later used here @@ -85,7 +85,7 @@ error[E0502]: cannot borrow `u` (via `u.b`) as immutable because it is also borr | 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); | --- mutable borrow later used here @@ -97,7 +97,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` LL | LL | drop(ra); @@ -108,7 +108,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); | --- first borrow later used here @@ -120,7 +120,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 LL | drop(rma); | --- borrow later used here diff --git a/src/test/ui/borrowck/borrowck-union-borrow.stderr b/src/test/ui/borrowck/borrowck-union-borrow.stderr index ef6a331eda04c..1cda7e499298a 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.nll.stderr b/src/test/ui/borrowck/borrowck-union-move-assign.nll.stderr index e59fef2dc0d2f..0b1714fd75dc0 100644 --- a/src/test/ui/borrowck/borrowck-union-move-assign.nll.stderr +++ b/src/test/ui/borrowck/borrowck-union-move-assign.nll.stderr @@ -5,7 +5,7 @@ LL | let mut u = U { a: A }; | ----- move occurs because `u` has type `U`, which does not implement the `Copy` trait 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 error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-union-move-assign.stderr b/src/test/ui/borrowck/borrowck-union-move-assign.stderr index f304dc3a12427..04e67fcb92971 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.nll.stderr b/src/test/ui/borrowck/borrowck-union-move.nll.stderr index 1392a7931c30a..abbb0142a9c30 100644 --- a/src/test/ui/borrowck/borrowck-union-move.nll.stderr +++ b/src/test/ui/borrowck/borrowck-union-move.nll.stderr @@ -5,7 +5,7 @@ LL | let mut u = Unn { n1: NonCopy }; | ----- move occurs because `u` has type `Unn`, which does not implement the `Copy` trait 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 error[E0382]: use of moved value: `u` @@ -15,7 +15,7 @@ LL | let mut u = Unn { n1: NonCopy }; | ----- move occurs because `u` has type `Unn`, which does not implement the `Copy` trait 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 error[E0382]: use of moved value: `u` @@ -25,7 +25,7 @@ LL | let mut u = Unn { n1: NonCopy }; | ----- move occurs because `u` has type `Unn`, which does not implement the `Copy` trait 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 error[E0382]: use of moved value: `u` @@ -35,7 +35,7 @@ LL | let mut u = Ucn { c: Copy }; | ----- move occurs because `u` has type `Ucn`, which does not implement the `Copy` trait 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 error[E0382]: use of moved value: `u` @@ -45,7 +45,7 @@ LL | let mut u = Ucn { c: Copy }; | ----- move occurs because `u` has type `Ucn`, which does not implement the `Copy` trait 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 error[E0382]: use of moved value: `u` @@ -55,7 +55,7 @@ LL | let mut u = Ucn { c: Copy }; | ----- move occurs because `u` has type `Ucn`, which does not implement the `Copy` trait 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 error: aborting due to 6 previous errors diff --git a/src/test/ui/borrowck/borrowck-union-move.stderr b/src/test/ui/borrowck/borrowck-union-move.stderr index ebd8bdc69c023..4ce372aedc362 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 c8b22dd1c9efd..6a1401ff32bbc 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.nll.stderr b/src/test/ui/borrowck/borrowck-uniq-via-lend.nll.stderr index 7ca277ac07428..923edc8edae7d 100644 --- a/src/test/ui/borrowck/borrowck-uniq-via-lend.nll.stderr +++ b/src/test/ui/borrowck/borrowck-uniq-via-lend.nll.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `*v` as immutable because it is also borrowed as mut | 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(); | - mutable borrow later used here @@ -13,7 +13,7 @@ error[E0502]: cannot borrow `*v` as immutable because it is also borrowed as mut | 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(); | - mutable borrow later used here diff --git a/src/test/ui/borrowck/borrowck-uniq-via-lend.stderr b/src/test/ui/borrowck/borrowck-uniq-via-lend.stderr index 14a9551acc6ea..00fd77ed718af 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.nll.stderr b/src/test/ui/borrowck/borrowck-use-mut-borrow.nll.stderr index e7b972fb0141a..91d69c51e8180 100644 --- a/src/test/ui/borrowck/borrowck-use-mut-borrow.nll.stderr +++ b/src/test/ui/borrowck/borrowck-use-mut-borrow.nll.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` LL | *p = 2; | ------ borrow later used here @@ -13,7 +13,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` LL | *p = 3; | ------ borrow later used here @@ -23,7 +23,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` LL | p.a = 3; | ------- borrow later used here @@ -33,7 +33,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` LL | *p = 3; | ------ borrow later used here @@ -43,7 +43,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` LL | drop(y); LL | p.a = 4; @@ -54,7 +54,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` LL | drop(y); LL | *p = 4; @@ -65,7 +65,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` LL | **p = 2; | ------- borrow later used here @@ -75,7 +75,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` LL | p.a = 3; | ------- borrow later used here @@ -85,7 +85,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` LL | **p = 3; | ------- borrow later used here diff --git a/src/test/ui/borrowck/borrowck-use-mut-borrow.stderr b/src/test/ui/borrowck/borrowck-use-mut-borrow.stderr index b6b09f008a4e0..5c1d726917641 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.nll.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-element-loan.nll.stderr index eabd0731388dc..da6d9293b408a 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-element-loan.nll.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-element-loan.nll.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return value referencing local variable `vec` --> $DIR/borrowck-vec-pattern-element-loan.rs:10:5 | -LL | let vec: &[isize] = &vec; //~ ERROR does not live long enough +LL | let vec: &[isize] = &vec; | ---- `vec` is borrowed here ... LL | tail @@ -10,7 +10,7 @@ LL | tail error[E0515]: cannot return value referencing local variable `vec` --> $DIR/borrowck-vec-pattern-element-loan.rs:20:5 | -LL | let vec: &[isize] = &vec; //~ ERROR does not live long enough +LL | let vec: &[isize] = &vec; | ---- `vec` is borrowed here ... LL | init @@ -19,7 +19,7 @@ LL | init error[E0515]: cannot return value referencing local variable `vec` --> $DIR/borrowck-vec-pattern-element-loan.rs:30:5 | -LL | let vec: &[isize] = &vec; //~ ERROR does not live long enough +LL | let vec: &[isize] = &vec; | ---- `vec` is borrowed here ... LL | slice 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 b2fcb2f8cd1b7..b0eaee790743e 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.nll.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-loan-from-mut.nll.stderr index 0059dd60f8407..251f44592905d 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-loan-from-mut.nll.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-loan-from-mut.nll.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]); | ^ ------- first borrow later used here | | | second mutable borrow occurs here 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 caadcb3611545..1ce6a3bddce09 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.nll.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.nll.stderr index 018a3173af1b0..aafcb3160d176 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.nll.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.nll.stderr @@ -3,10 +3,10 @@ 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 -LL | //~^ assignment to borrowed `vec[..]` occurs here +LL | LL | _a.use_ref(); | -- borrow later used here @@ -15,10 +15,10 @@ 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 -LL | //~^ assignment to borrowed `vec[..]` occurs here +LL | LL | _b.use_ref(); | -- borrow later used here @@ -27,19 +27,19 @@ error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy sli | LL | match vec { | ^^^ cannot move out of here -LL | &mut [_a, //~ ERROR cannot move out +LL | &mut [_a, | -- data moved here | note: move occurs because `_a` has type `std::boxed::Box`, which does not implement the `Copy` trait --> $DIR/borrowck-vec-pattern-nesting.rs:34:15 | -LL | &mut [_a, //~ ERROR cannot move out +LL | &mut [_a, | ^^ help: consider removing the `&mut` | -LL | [_a, //~ ERROR cannot move out -LL | //~| cannot move out -LL | //~| to prevent move +LL | [_a, +LL | +LL | LL | .. LL | ] => { | @@ -47,7 +47,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 @@ -69,15 +69,15 @@ LL | _b] => {} | ^^ help: consider removing the `&mut` | -LL | [ //~ ERROR cannot move out -LL | //~^ cannot move out +LL | [ +LL | 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 @@ -88,7 +88,7 @@ error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy sli | LL | match vec { | ^^^ cannot move out of here -LL | &mut [_a, _b, _c] => {} //~ ERROR cannot move out +LL | &mut [_a, _b, _c] => {} | ----------------- | | | | | | | | | ...and here @@ -99,13 +99,13 @@ LL | &mut [_a, _b, _c] => {} //~ ERROR cannot move out note: move occurs because these variables have types that don't implement the `Copy` trait --> $DIR/borrowck-vec-pattern-nesting.rs:68:15 | -LL | &mut [_a, _b, _c] => {} //~ ERROR cannot move out +LL | &mut [_a, _b, _c] => {} | ^^ ^^ ^^ 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-nesting.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr index 25825fea15877..0e3f514c662ab 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.nll.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.nll.stderr index d9d3930dc49a7..c1290a6f63f33 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.nll.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-tail-element-loan.nll.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return value referencing local variable `vec` --> $DIR/borrowck-vec-pattern-tail-element-loan.rs:10:5 | -LL | let vec: &[isize] = &vec; //~ ERROR `vec` does not live long enough +LL | let vec: &[isize] = &vec; | ---- `vec` is borrowed here ... LL | tail 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 a4584aac0e8d7..0a5f773159f47 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.nll.stderr b/src/test/ui/borrowck/borrowck-while-break.nll.stderr index 1defa3da60ce8..0fe3cdc96a874 100644 --- a/src/test/ui/borrowck/borrowck-while-break.nll.stderr +++ b/src/test/ui/borrowck/borrowck-while-break.nll.stderr @@ -1,7 +1,7 @@ error[E0381]: borrow 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-break.stderr b/src/test/ui/borrowck/borrowck-while-break.stderr index f35d43162b244..55969b8fb1ffa 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 2b5414b42cd0d..06deae345ab60 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 e8aff0d22c2c0..60622d648dd23 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.nll.stderr b/src/test/ui/borrowck/index-mut-help-with-impl.nll.stderr index cd88e25cc42c7..4b29beb02b35e 100644 --- a/src/test/ui/borrowck/index-mut-help-with-impl.nll.stderr +++ b/src/test/ui/borrowck/index-mut-help-with-impl.nll.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow data in a `&` reference 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 | = help: trait `IndexMut` is required to modify indexed content 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 260ef7c92d0f5..6e6efc6706101 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.nll.stderr b/src/test/ui/borrowck/index-mut-help.nll.stderr index e7047f0048db3..92b94209c4e43 100644 --- a/src/test/ui/borrowck/index-mut-help.nll.stderr +++ b/src/test/ui/borrowck/index-mut-help.nll.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow data in a `&` reference 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,13 +9,13 @@ LL | map["peter"].clear(); //~ ERROR error[E0594]: cannot assign to data in a `&` reference --> $DIR/index-mut-help.rs:12:5 | -LL | map["peter"] = "0".to_string(); //~ ERROR +LL | map["peter"] = "0".to_string(); | ^^^^^^^^^^^^ cannot assign error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/index-mut-help.rs:13:13 | -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/index-mut-help.stderr b/src/test/ui/borrowck/index-mut-help.stderr index 985fa9f0361ee..434dd11eea2e9 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.nll.stderr b/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.nll.stderr index 255eb757a4989..eb71ab0b7ec06 100644 --- a/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.nll.stderr +++ b/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.nll.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of 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 static item 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 219a1fd2e7727..b09028e6c7c4e 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.nll.stderr b/src/test/ui/borrowck/issue-51117.nll.stderr index 140be098a99de..f8a9608ad373a 100644 --- a/src/test/ui/borrowck/issue-51117.nll.stderr +++ b/src/test/ui/borrowck/issue-51117.nll.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 | drop(baz); | --- first borrow later used here diff --git a/src/test/ui/borrowck/issue-51117.stderr b/src/test/ui/borrowck/issue-51117.stderr index 783ba8df1a6e7..8f2a78672c6ef 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 4e6d0d45bf081..e3216f5d33f98 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 d1d7d13088bcc..6a12016b2a5e3 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 fed79ef4f559e..32b3ef72d8bda 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.nll.stderr b/src/test/ui/borrowck/mut-borrow-in-loop.nll.stderr index ab05358d03f86..eda2f518f9246 100644 --- a/src/test/ui/borrowck/mut-borrow-in-loop.nll.stderr +++ b/src/test/ui/borrowck/mut-borrow-in-loop.nll.stderr @@ -4,7 +4,7 @@ error[E0499]: cannot borrow `*arg` as mutable more than once at a time LL | impl<'a, T : 'a> FuncWrapper<'a, T> { | -- lifetime `'a` defined here ... -LL | (self.func)(arg) //~ ERROR cannot borrow +LL | (self.func)(arg) | ------------^^^- | | | | | mutable borrow starts here in previous iteration of loop @@ -16,7 +16,7 @@ error[E0499]: cannot borrow `*arg` as mutable more than once at a time LL | impl<'a, T : 'a> FuncWrapper<'a, T> { | -- lifetime `'a` defined here ... -LL | (self.func)(arg) //~ ERROR cannot borrow +LL | (self.func)(arg) | ------------^^^- | | | | | mutable borrow starts here in previous iteration of loop @@ -28,7 +28,7 @@ error[E0499]: cannot borrow `*arg` as mutable more than once at a time LL | impl<'a, T : 'a> FuncWrapper<'a, T> { | -- lifetime `'a` defined here ... -LL | (self.func)(arg) //~ ERROR cannot borrow +LL | (self.func)(arg) | ------------^^^- | | | | | mutable borrow starts here in previous iteration of loop diff --git a/src/test/ui/borrowck/mut-borrow-in-loop.stderr b/src/test/ui/borrowck/mut-borrow-in-loop.stderr index 749e0e172f775..478d586d03e5d 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.nll.stderr b/src/test/ui/borrowck/mut-borrow-of-mut-ref.nll.stderr index 5ee31b5efd091..09dabbc89b425 100644 --- a/src/test/ui/borrowck/mut-borrow-of-mut-ref.nll.stderr +++ b/src/test/ui/borrowck/mut-borrow-of-mut-ref.nll.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable | LL | fn f(b: &mut i32) { | - help: consider changing this to be mutable: `mut b` -LL | g(&mut b) //~ ERROR cannot borrow +LL | g(&mut b) | ^^^^^^ cannot borrow as mutable error: aborting due to previous error 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 5278056ac0f51..4653c353cad64 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.nll.stderr b/src/test/ui/borrowck/mut-borrow-outside-loop.nll.stderr index 9b20fc0231934..4fcb693f1bf1d 100644 --- a/src/test/ui/borrowck/mut-borrow-outside-loop.nll.stderr +++ b/src/test/ui/borrowck/mut-borrow-outside-loop.nll.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 | first.use_mut(); | ----- first borrow later used here @@ -13,7 +13,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 | inner_second.use_mut(); LL | inner_first.use_mut(); diff --git a/src/test/ui/borrowck/mut-borrow-outside-loop.stderr b/src/test/ui/borrowck/mut-borrow-outside-loop.stderr index 1b32d8589b522..45db962fbd01f 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.nll.stderr b/src/test/ui/borrowck/mutability-errors.nll.stderr index 6dd3582f95f5d..11bc78894432d 100644 --- a/src/test/ui/borrowck/mutability-errors.nll.stderr +++ b/src/test/ui/borrowck/mutability-errors.nll.stderr @@ -3,7 +3,7 @@ error[E0594]: cannot assign to `*x` which is behind a `&` reference | LL | fn named_ref(x: &(i32,)) { | ------- help: consider changing this to be a mutable reference: `&mut (i32,)` -LL | *x = (1,); //~ ERROR +LL | *x = (1,); | ^^^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written error[E0594]: cannot assign to `x.0` which is behind a `&` reference @@ -11,8 +11,8 @@ error[E0594]: cannot assign to `x.0` which is behind a `&` reference | LL | fn named_ref(x: &(i32,)) { | ------- help: consider changing this to be a mutable reference: `&mut (i32,)` -LL | *x = (1,); //~ ERROR -LL | x.0 = 1; //~ ERROR +LL | *x = (1,); +LL | x.0 = 1; | ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference @@ -21,7 +21,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference LL | fn named_ref(x: &(i32,)) { | ------- help: consider changing this to be a mutable reference: `&mut (i32,)` ... -LL | &mut *x; //~ ERROR +LL | &mut *x; | ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `x.0` as mutable, as it is behind a `&` reference @@ -30,31 +30,31 @@ error[E0596]: cannot borrow `x.0` as mutable, as it is behind a `&` reference LL | fn named_ref(x: &(i32,)) { | ------- help: consider changing this to be a mutable reference: `&mut (i32,)` ... -LL | &mut x.0; //~ ERROR +LL | &mut x.0; | ^^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0594]: cannot assign to data in a `&` reference --> $DIR/mutability-errors.rs:16:5 | -LL | *f() = (1,); //~ ERROR +LL | *f() = (1,); | ^^^^^^^^^^^ cannot assign error[E0594]: cannot assign to data in a `&` reference --> $DIR/mutability-errors.rs:17:5 | -LL | f().0 = 1; //~ ERROR +LL | f().0 = 1; | ^^^^^^^^^ cannot assign error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/mutability-errors.rs:18:5 | -LL | &mut *f(); //~ ERROR +LL | &mut *f(); | ^^^^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/mutability-errors.rs:19:5 | -LL | &mut f().0; //~ ERROR +LL | &mut f().0; | ^^^^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to `*x` which is behind a `*const` pointer @@ -62,7 +62,7 @@ error[E0594]: cannot assign to `*x` which is behind a `*const` pointer | LL | unsafe fn named_ptr(x: *const (i32,)) { | ------------- help: consider changing this to be a mutable pointer: `*mut (i32,)` -LL | *x = (1,); //~ ERROR +LL | *x = (1,); | ^^^^^^^^^ `x` is a `*const` pointer, so the data it refers to cannot be written error[E0594]: cannot assign to `x.0` which is behind a `*const` pointer @@ -70,8 +70,8 @@ error[E0594]: cannot assign to `x.0` which is behind a `*const` pointer | LL | unsafe fn named_ptr(x: *const (i32,)) { | ------------- help: consider changing this to be a mutable pointer: `*mut (i32,)` -LL | *x = (1,); //~ ERROR -LL | (*x).0 = 1; //~ ERROR +LL | *x = (1,); +LL | (*x).0 = 1; | ^^^^^^^^^^ `x` is a `*const` pointer, so the data it refers to cannot be written error[E0596]: cannot borrow `*x` as mutable, as it is behind a `*const` pointer @@ -80,7 +80,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `*const` pointer LL | unsafe fn named_ptr(x: *const (i32,)) { | ------------- help: consider changing this to be a mutable pointer: `*mut (i32,)` ... -LL | &mut *x; //~ ERROR +LL | &mut *x; | ^^^^^^^ `x` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `x.0` as mutable, as it is behind a `*const` pointer @@ -89,37 +89,37 @@ error[E0596]: cannot borrow `x.0` as mutable, as it is behind a `*const` pointer LL | unsafe fn named_ptr(x: *const (i32,)) { | ------------- help: consider changing this to be a mutable pointer: `*mut (i32,)` ... -LL | &mut (*x).0; //~ ERROR +LL | &mut (*x).0; | ^^^^^^^^^^^ `x` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable error[E0594]: cannot assign to data in a `*const` pointer --> $DIR/mutability-errors.rs:30:5 | -LL | *f() = (1,); //~ ERROR +LL | *f() = (1,); | ^^^^^^^^^^^ cannot assign error[E0594]: cannot assign to data in a `*const` pointer --> $DIR/mutability-errors.rs:31:5 | -LL | (*f()).0 = 1; //~ ERROR +LL | (*f()).0 = 1; | ^^^^^^^^^^^^ cannot assign error[E0596]: cannot borrow data in a `*const` pointer as mutable --> $DIR/mutability-errors.rs:32:5 | -LL | &mut *f(); //~ ERROR +LL | &mut *f(); | ^^^^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow data in a `*const` pointer as mutable --> $DIR/mutability-errors.rs:33:5 | -LL | &mut (*f()).0; //~ ERROR +LL | &mut (*f()).0; | ^^^^^^^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to `x`, as it is a captured variable in a `Fn` closure --> $DIR/mutability-errors.rs:40:9 | -LL | x = (1,); //~ ERROR +LL | x = (1,); | ^^^^^^^^ cannot assign | help: consider changing this to accept closures that implement `FnMut` @@ -127,17 +127,17 @@ help: consider changing this to accept closures that implement `FnMut` | 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 `x.0`, as `Fn` closures cannot mutate their captured variables --> $DIR/mutability-errors.rs:41:9 | -LL | x.0 = 1; //~ ERROR +LL | x.0 = 1; | ^^^^^^^ cannot assign | help: consider changing this to accept closures that implement `FnMut` @@ -145,17 +145,17 @@ help: consider changing this to accept closures that implement `FnMut` | 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[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure --> $DIR/mutability-errors.rs:42:9 | -LL | &mut x; //~ ERROR +LL | &mut x; | ^^^^^^ cannot borrow as mutable | help: consider changing this to accept closures that implement `FnMut` @@ -163,17 +163,17 @@ help: consider changing this to accept closures that implement `FnMut` | 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[E0596]: cannot borrow `x.0` as mutable, as `Fn` closures cannot mutate their captured variables --> $DIR/mutability-errors.rs:43:9 | -LL | &mut x.0; //~ ERROR +LL | &mut x.0; | ^^^^^^^^ cannot borrow as mutable | help: consider changing this to accept closures that implement `FnMut` @@ -181,17 +181,17 @@ help: consider changing this to accept closures that implement `FnMut` | 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 `x`, as it is a captured variable in a `Fn` closure --> $DIR/mutability-errors.rs:46:9 | -LL | x = (1,); //~ ERROR +LL | x = (1,); | ^^^^^^^^ cannot assign | help: consider changing this to accept closures that implement `FnMut` @@ -199,17 +199,17 @@ help: consider changing this to accept closures that implement `FnMut` | 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 `x.0`, as `Fn` closures cannot mutate their captured variables --> $DIR/mutability-errors.rs:47:9 | -LL | x.0 = 1; //~ ERROR +LL | x.0 = 1; | ^^^^^^^ cannot assign | help: consider changing this to accept closures that implement `FnMut` @@ -217,17 +217,17 @@ help: consider changing this to accept closures that implement `FnMut` | 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 `x` as mutable, as it is a captured variable in a `Fn` closure --> $DIR/mutability-errors.rs:48:9 | -LL | &mut x; //~ ERROR +LL | &mut x; | ^^^^^^ cannot borrow as mutable | help: consider changing this to accept closures that implement `FnMut` @@ -235,17 +235,17 @@ help: consider changing this to accept closures that implement `FnMut` | 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 `x.0` as mutable, as `Fn` closures cannot mutate their captured variables --> $DIR/mutability-errors.rs:49:9 | -LL | &mut x.0; //~ ERROR +LL | &mut x.0; | ^^^^^^^^ cannot borrow as mutable | help: consider changing this to accept closures that implement `FnMut` @@ -253,10 +253,10 @@ help: consider changing this to accept closures that implement `FnMut` | 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 | | }); | |_____^ @@ -265,7 +265,7 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable | LL | fn imm_local(x: (i32,)) { | - help: consider changing this to be mutable: `mut x` -LL | &mut x; //~ ERROR +LL | &mut x; | ^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable @@ -273,8 +273,8 @@ error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable | LL | fn imm_local(x: (i32,)) { | - help: consider changing this to be mutable: `mut x` -LL | &mut x; //~ ERROR -LL | &mut x.0; //~ ERROR +LL | &mut x; +LL | &mut x.0; | ^^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to `x`, as it is not declared as mutable @@ -282,7 +282,7 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable | LL | fn imm_capture(x: (i32,)) { | - help: consider changing this to be mutable: `mut x` -LL | || { //~ ERROR +LL | || { LL | x = (1,); | ^^^^^^^^ cannot assign @@ -319,7 +319,7 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable LL | fn imm_capture(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.0`, as `x` is not declared as mutable @@ -328,7 +328,7 @@ error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable LL | fn imm_capture(x: (i32,)) { | - help: consider changing this to be mutable: `mut x` ... -LL | x.0 = 1; //~ ERROR +LL | x.0 = 1; | ^^^^^^^ cannot assign error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable @@ -337,7 +337,7 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable LL | fn imm_capture(x: (i32,)) { | - help: consider changing this to be mutable: `mut x` ... -LL | &mut x; //~ ERROR +LL | &mut x; | ^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable @@ -346,31 +346,31 @@ error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable LL | fn imm_capture(x: (i32,)) { | - help: consider changing this to be mutable: `mut x` ... -LL | &mut x.0; //~ ERROR +LL | &mut x.0; | ^^^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to immutable static item `X` --> $DIR/mutability-errors.rs:76:5 | -LL | X = (1,); //~ ERROR +LL | X = (1,); | ^^^^^^^^ cannot assign error[E0594]: cannot assign to `X.0`, as `X` is an immutable static item --> $DIR/mutability-errors.rs:77:5 | -LL | X.0 = 1; //~ ERROR +LL | X.0 = 1; | ^^^^^^^ cannot assign error[E0596]: cannot borrow immutable static item `X` as mutable --> $DIR/mutability-errors.rs:78:5 | -LL | &mut X; //~ ERROR +LL | &mut X; | ^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow `X.0` as mutable, as `X` is an immutable static item --> $DIR/mutability-errors.rs:79:5 | -LL | &mut X.0; //~ ERROR +LL | &mut X.0; | ^^^^^^^^ cannot borrow as mutable error: aborting due to 38 previous errors diff --git a/src/test/ui/borrowck/mutability-errors.stderr b/src/test/ui/borrowck/mutability-errors.stderr index b7fd6ee7214f1..cf4f37edde0b8 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.nll.stderr b/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.nll.stderr index 66e3c4056a229..60af412373542 100644 --- a/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.nll.stderr +++ b/src/test/ui/borrowck/promote-ref-mut-in-let-issue-46557.nll.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return value referencing temporary value --> $DIR/promote-ref-mut-in-let-issue-46557.rs:6:5 | -LL | let ref mut x = 1234543; //~ ERROR +LL | let ref mut x = 1234543; | ------- temporary value created here LL | x | ^ returns a value referencing data owned by the current function @@ -9,7 +9,7 @@ LL | x error[E0515]: cannot return value referencing temporary value --> $DIR/promote-ref-mut-in-let-issue-46557.rs:11:5 | -LL | let (ref mut x, ) = (1234543, ); //~ ERROR +LL | let (ref mut x, ) = (1234543, ); | ----------- temporary value created here LL | x | ^ returns a value referencing data owned by the current function @@ -21,7 +21,7 @@ LL | match 1234543 { | ^ ------- temporary value created here | _____| | | -LL | | ref mut x => x //~ ERROR +LL | | ref mut x => x LL | | } | |_____^ returns a value referencing data owned by the current function @@ -32,14 +32,14 @@ LL | match (123443,) { | ^ --------- temporary value created here | _____| | | -LL | | (ref mut x,) => x, //~ ERROR +LL | | (ref mut x,) => x, LL | | } | |_____^ returns a value referencing data owned by the current function error[E0515]: cannot return reference to temporary value --> $DIR/promote-ref-mut-in-let-issue-46557.rs:27:5 | -LL | &mut 1234543 //~ ERROR +LL | &mut 1234543 | ^^^^^------- | | | | | temporary value created here 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 51e47fd44d90b..ae68df72aa7a6 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.nll.stderr b/src/test/ui/borrowck/reassignment_immutable_fields.nll.stderr index bf9084259c834..d455a8f078743 100644 --- a/src/test/ui/borrowck/reassignment_immutable_fields.nll.stderr +++ b/src/test/ui/borrowck/reassignment_immutable_fields.nll.stderr @@ -1,13 +1,13 @@ error[E0381]: assign to part of possibly uninitialized variable: `x` --> $DIR/reassignment_immutable_fields.rs:7:5 | -LL | x.0 = 1; //~ ERROR +LL | x.0 = 1; | ^^^^^^^ use of possibly uninitialized `x` error[E0381]: assign to part of possibly uninitialized variable: `x` --> $DIR/reassignment_immutable_fields.rs:15:5 | -LL | x.0 = 1; //~ ERROR +LL | x.0 = 1; | ^^^^^^^ use of possibly uninitialized `x` error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/reassignment_immutable_fields.stderr b/src/test/ui/borrowck/reassignment_immutable_fields.stderr index c63f56702ab69..74f0217ef8a99 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.nll.stderr b/src/test/ui/borrowck/reassignment_immutable_fields_overlapping.nll.stderr index 53b51eb894ae7..5f1313f286ee9 100644 --- a/src/test/ui/borrowck/reassignment_immutable_fields_overlapping.nll.stderr +++ b/src/test/ui/borrowck/reassignment_immutable_fields_overlapping.nll.stderr @@ -1,7 +1,7 @@ error[E0381]: assign to part of possibly uninitialized variable: `x` --> $DIR/reassignment_immutable_fields_overlapping.rs:12:5 | -LL | x.a = 1; //~ ERROR +LL | x.a = 1; | ^^^^^^^ use of possibly uninitialized `x` error[E0594]: cannot assign to `x.b`, as `x` is not declared as mutable @@ -9,8 +9,8 @@ error[E0594]: cannot assign to `x.b`, as `x` is not declared as mutable | LL | let x: Foo; | - help: consider changing this to be mutable: `mut x` -LL | x.a = 1; //~ ERROR -LL | x.b = 22; //~ ERROR +LL | x.a = 1; +LL | x.b = 22; | ^^^^^^^^ cannot assign error: aborting due to 2 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 e34024736c6a2..673c1572ca5f8 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.nll.stderr b/src/test/ui/borrowck/reassignment_immutable_fields_twice.nll.stderr index 910b8292ec8ff..553ee24cca234 100644 --- a/src/test/ui/borrowck/reassignment_immutable_fields_twice.nll.stderr +++ b/src/test/ui/borrowck/reassignment_immutable_fields_twice.nll.stderr @@ -4,13 +4,13 @@ error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable LL | let x: (u32, u32); | - help: consider changing this to be mutable: `mut x` LL | x = (22, 44); -LL | x.0 = 1; //~ ERROR +LL | x.0 = 1; | ^^^^^^^ cannot assign error[E0381]: assign to part of possibly uninitialized variable: `x` --> $DIR/reassignment_immutable_fields_twice.rs:12:5 | -LL | x.0 = 1; //~ ERROR +LL | x.0 = 1; | ^^^^^^^ use of possibly uninitialized `x` 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 75d7f99ed0c8c..db1c74d94afb5 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 10ff0ca604c5a..933d3eb71117c 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 ad4636a4a91c6..bcd743f47c53c 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 d57cb40b2a84d..21a7814626746 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 5e008a064772b..c1aa580f89edd 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 3e81753a4105f..a08edee07ea0a 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.nll.stderr b/src/test/ui/by-move-pattern-binding.nll.stderr index 4b4a989368a78..8b531474553d2 100644 --- a/src/test/ui/by-move-pattern-binding.nll.stderr +++ b/src/test/ui/by-move-pattern-binding.nll.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of borrowed content LL | match &s.x { | ^^^^ cannot move out of borrowed content LL | &E::Foo => {} -LL | &E::Bar(identifier) => f(identifier.clone()) //~ ERROR cannot move +LL | &E::Bar(identifier) => f(identifier.clone()) | ------------------- | | | | | data moved here @@ -13,7 +13,7 @@ LL | &E::Bar(identifier) => f(identifier.clone()) //~ ERROR cannot move note: move occurs because `identifier` has type `std::string::String`, which does not implement the `Copy` trait --> $DIR/by-move-pattern-binding.rs:16:17 | -LL | &E::Bar(identifier) => f(identifier.clone()) //~ ERROR cannot move +LL | &E::Bar(identifier) => f(identifier.clone()) | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/by-move-pattern-binding.stderr b/src/test/ui/by-move-pattern-binding.stderr index d3c5e2caa4294..5135e0dadaf9d 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 61d55ce0d3ef9..1a2bb4419b582 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 82e3c6cd06fc5..6e19fc1262102 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 1d752be065c4a..a3e3f81b73d80 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 2d452872baf4e..2ad1964b6fc7b 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 76bd18959a51f..882e7f89f2a0d 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 602963ee89cd5..7a50fd367d2d5 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 f25b348816b6a..676c2cb661e7b 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 6099a4195b329..30f8459c2e1e1 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 cfd1ca25a96a3..1e77f5dbdc643 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 d04595ee4e887..0d4397c2e2d7c 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 37c6ba1b909c9..bd7a0e1834aa7 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 8e09a7cd83b53..fbbb8e3bb332d 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 91edfaf410ea6..84175473696df 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 f4d16a09a367a..bc426e0707b7c 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 f05b91c674d94..2a71fa9df5e8e 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 e602a8fcdaf85..46e083686895d 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 48af37edec49e..d6827fbff3dd7 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 e75e71450fbce..91525c3ba55d4 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 4546d2ede8235..423c557308301 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 d7e18596a7d22..79bbc9fa6b3a6 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 5400224bdf42a..408f3712a7070 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 d65b701307b43..d1d56d3d4a237 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 a8b986d67f875..633930904983d 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.nll.stderr b/src/test/ui/check-static-values-constraints.nll.stderr index f1a2312490813..fe014fa105966 100644 --- a/src/test/ui/check-static-values-constraints.nll.stderr +++ b/src/test/ui/check-static-values-constraints.nll.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-static-values-constraints.stderr b/src/test/ui/check-static-values-constraints.stderr index 5b1f265c34aef..91fe0feb1bcd4 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 54e5c988f8ccc..af22535c55e5a 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 f5bd7a13aa485..39f308cdfd490 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 484778f83ec58..ec11f1253990f 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 561403d1b42de..e35e71ce6e232 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 7dd996cce5d45..2005bd4dd5ca7 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 bdfd26f6871ab..74d3c4977ee65 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 e7bcbb9e63083..473e8e8417e6e 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 7b901e3011785..475e28309cfb1 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 fa7a63b642e6f..9b78aa16a580f 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 7d637fed8ab62..81c4f4e00aba0 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 d018956d026c9..3b9fd10af3860 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 633dd4f5c62a6..e3b623d55248e 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.nll.stderr b/src/test/ui/closures/closure-immutable-outer-variable.nll.stderr index 0c4d90f4c531a..7e60f3cd8ffa4 100644 --- a/src/test/ui/closures/closure-immutable-outer-variable.nll.stderr +++ b/src/test/ui/closures/closure-immutable-outer-variable.nll.stderr @@ -3,7 +3,7 @@ error[E0594]: cannot assign to `y`, as it is not declared as mutable | LL | let y = true; | - help: consider changing this to be 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<_>); | ^^^^^^^^^ cannot assign error: aborting due to previous error diff --git a/src/test/ui/closures/closure-immutable-outer-variable.stderr b/src/test/ui/closures/closure-immutable-outer-variable.stderr index c6a6ebd931c68..332320791d44e 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 f60be43bba813..8ca43cd1cffb1 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 76f88d0490745..5c5480912be43 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 b289ea2964426..65026128ae622 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 38320416b4509..c424eb08a7a98 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 5f8bc387a3d29..087084ae5dade 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 f52856770978e..1dd99cfd64fa5 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.nll.stderr b/src/test/ui/codemap_tests/huge_multispan_highlight.nll.stderr index 7fdeb03acbd6c..a60f1c77a5863 100644 --- a/src/test/ui/codemap_tests/huge_multispan_highlight.nll.stderr +++ b/src/test/ui/codemap_tests/huge_multispan_highlight.nll.stderr @@ -4,7 +4,7 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable LL | let x = "foo"; | - help: consider changing this to be mutable: `mut x` ... -LL | let y = &mut x; //~ ERROR cannot borrow +LL | let y = &mut x; | ^^^^^^ cannot borrow as mutable 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 41df802b503d6..13bd666a5077d 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.nll.stderr b/src/test/ui/codemap_tests/issue-11715.nll.stderr index 9f30f38542549..d0c29c768eb61 100644 --- a/src/test/ui/codemap_tests/issue-11715.nll.stderr +++ b/src/test/ui/codemap_tests/issue-11715.nll.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 | z.use_mut(); LL | y.use_mut(); diff --git a/src/test/ui/codemap_tests/issue-11715.stderr b/src/test/ui/codemap_tests/issue-11715.stderr index 8f320a4e19b2d..c37e6b34727bf 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.nll.stderr b/src/test/ui/codemap_tests/one_line.nll.stderr index 0eb257c5976a5..eddbd29c0ef81 100644 --- a/src/test/ui/codemap_tests/one_line.nll.stderr +++ b/src/test/ui/codemap_tests/one_line.nll.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()); | - ---- ^ second mutable borrow occurs here | | | | | first borrow later used by call diff --git a/src/test/ui/codemap_tests/one_line.stderr b/src/test/ui/codemap_tests/one_line.stderr index 2ea793c096942..9dcaba8748e0f 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 1b20b699d9f8d..70c1093e9ed48 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 80b5773fda33a..bcc21e9c7ade8 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 f7eec3eb8da8e..70414bbd953d6 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.nll.stderr b/src/test/ui/codemap_tests/tab_3.nll.stderr index 3b8507a067ded..97816a76004d0 100644 --- a/src/test/ui/codemap_tests/tab_3.nll.stderr +++ b/src/test/ui/codemap_tests/tab_3.nll.stderr @@ -6,7 +6,7 @@ LL | let some_vec = vec!["hi"]; LL | some_vec.into_iter(); | -------- value moved here LL | { -LL | println!("{:?}", some_vec); //~ ERROR use of moved +LL | println!("{:?}", some_vec); | ^^^^^^^^ value borrowed here after move error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/tab_3.stderr b/src/test/ui/codemap_tests/tab_3.stderr index 6e93ae1306961..4b550dbf9ee14 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 65df3f382c047..5027b78b38e34 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 1ba6ac447889b..7aadeb7dfc982 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 1bc7452b9f2db..92634d8e5f94c 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 5ad3889666b79..be362c9a78b98 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 2982801f4613c..ff30ebc09c63a 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 72e7211de7a7f..a46e97da8159b 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 c8ec2f0545e6b..057de5b625e87 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 c8a146cdd4456..86a63eb569918 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 78ca2f5279d63..536b4625aee2e 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 ba0b04dca9d24..e5f5c5ed20d55 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 48ca690f425eb..5a584c7d6ed9f 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 c162c720a48b2..a33908c01c842 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 07f5a0a6cec46..5d09038076f98 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 9e11db68315e9..8aa1878c5d7cd 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 b6024972c7448..61fb9de1ef96c 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 37c7a571d0f58..8d308f0c96fbd 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 d75a0389851a8..96c571ebebdb4 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 8cdf4ec31e7fc..8485459ca6bd9 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 b3a3b0c0f97bd..2a673ea81317f 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 3d14c19739798..64e9570773a65 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 36c7c817cb33d..3dfbd6df256eb 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 7dab2b2b53f91..ae37461cab815 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 c5097c15c3c81..d0b59c3994cc0 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 148f1211b0834..c39055f01721b 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 0c09bd2284be4..7cd1941d80e83 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 73bcf0fd9c07e..cce961f1e4edc 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 e3058ad0a9ea5..97c949e32e341 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 2741d62125622..2f7a80f0c8fde 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 94d2afa25b4f0..c0cd7bace471c 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 f40b527d71607..e37b34fac3351 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 1623f645124ab..b9f874ff18bb3 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 edd3095b0fc7d..00286b0b0e0f8 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 ced9b9fb3c7c9..9960ccb4166b5 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 7684822d9393b..ad816d9297bd0 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 a64f0e2594951..a61f9b303aa15 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 be1be6c060071..148b1210d39e1 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 31e49dc10ca60..02b72765b377e 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 5ec2a2feb0978..44ee8b336c89c 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 7866b6c30c3d6..69e165bef4a7a 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 5370fdd25d820..ba606f6d09de5 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 6be54c0bad4f9..773441182b4be 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.nll.stderr b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.nll.stderr index 238db527e3883..ca80a9ab39117 100644 --- a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.nll.stderr +++ b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.nll.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[E0716]: temporary value dropped while borrowed --> $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(); | ------------ ^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` @@ -19,7 +19,7 @@ LL | } error[E0716]: temporary value dropped while borrowed --> $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(); | ------------ ^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` @@ -34,7 +34,7 @@ LL | let x: &'static _ = &std::time::Duration::from_millis(42).subsec_millis | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` -LL | //~^ ERROR does not live long enough +LL | LL | } | - temporary value is freed at the end of this statement 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 fdbc4cb0c8d27..d79666688fa28 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.nll.stderr b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.nll.stderr index 4355401987b01..129f06151074f 100644 --- a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.nll.stderr +++ b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.nll.stderr @@ -1,18 +1,18 @@ error[E0716]: temporary value dropped while borrowed --> $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(); | ------------ ^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` -LL | let _x: &'static u32 = &foo(); //~ ERROR does not live long enough +LL | let _x: &'static u32 = &foo(); LL | } | - temporary value is freed at the end of this statement error[E0716]: temporary value dropped while borrowed --> $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(); | ------------ ^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` 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 8be7add22009e..516c008e7206e 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 06b38bf710341..2b61d33852c98 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 c562c66389f97..5a72c8205b660 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 1a9e1b0ae8508..ac045f29b110d 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 422c2bab6ea90..ee696c5439ff5 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 7c2cd7c5ca043..29ebc31b634ad 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 757e55fe31d35..6fbfb4d11fe5a 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 516796c1a42da..2352ecba68959 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 4f1b2ab4c8f46..605c71d5a6b57 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 94615c019fe88..fd5647c9af3d0 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.nll.stderr b/src/test/ui/consts/const-eval/promoted_const_fn_fail.nll.stderr index a2a71fc2ce368..519ba7d84b087 100644 --- a/src/test/ui/consts/const-eval/promoted_const_fn_fail.nll.stderr +++ b/src/test/ui/consts/const-eval/promoted_const_fn_fail.nll.stderr @@ -1,7 +1,7 @@ error[E0716]: temporary value dropped while borrowed --> $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); | ----------- ^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` 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 9316d48ab4318..c9a357d0f1bcb 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.nll.stderr b/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.nll.stderr index 117090d89fd73..a8bb6976da75e 100644 --- a/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.nll.stderr +++ b/src/test/ui/consts/const-eval/promoted_raw_ptr_ops.nll.stderr @@ -12,7 +12,7 @@ LL | } error[E0716]: temporary value dropped while borrowed --> $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); | -------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` @@ -23,18 +23,18 @@ LL | } error[E0716]: temporary value dropped while borrowed --> $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) }); | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` -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 is freed at the end of this statement error[E0716]: temporary value dropped while borrowed --> $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()); | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` 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 9d1dcfafa6363..5a0654cc0c138 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 888fe065a6257..f8eafed68e43d 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 e5c34f94d2c53..5db231cd5b0df 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.nll.stderr b/src/test/ui/consts/const-eval/transmute-const-promotion.nll.stderr index 90fe7eebe4a76..5aae8c12d16ec 100644 --- a/src/test/ui/consts/const-eval/transmute-const-promotion.nll.stderr +++ b/src/test/ui/consts/const-eval/transmute-const-promotion.nll.stderr @@ -5,7 +5,7 @@ LL | let x: &'static u32 = unsafe { &mem::transmute(3.0f32) }; | ------------ ^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` -LL | //~^ ERROR value does not live long enough +LL | LL | } | - temporary value is freed at the end of this statement 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 996e84de06dcf..5829a1772d650 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 d18339f2434a6..21d2847db1e8a 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 3edc52415717e..b25cb8c5aa021 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.nll.stderr b/src/test/ui/consts/const-eval/union_promotion.nll.stderr index 11bc7f9da35f7..b530c02f2fb93 100644 --- a/src/test/ui/consts/const-eval/union_promotion.nll.stderr +++ b/src/test/ui/consts/const-eval/union_promotion.nll.stderr @@ -1,7 +1,7 @@ error[E0716]: temporary value dropped while borrowed --> $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 { | ____________-------------____^ | | | | | type annotation requires that borrow lasts for `'static` diff --git a/src/test/ui/consts/const-eval/union_promotion.stderr b/src/test/ui/consts/const-eval/union_promotion.stderr index 643c784ca08fc..c60f67181832f 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 2003b137c272b..a5e48074f7043 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.nll.stderr b/src/test/ui/consts/const-int-conversion.nll.stderr index afc051013ed7c..65330e282c966 100644 --- a/src/test/ui/consts/const-int-conversion.nll.stderr +++ b/src/test/ui/consts/const-int-conversion.nll.stderr @@ -71,7 +71,7 @@ LL | let d: &'static [u8] = &(i32::min_value().to_be().to_ne_bytes()); | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` -LL | //~^ ERROR does not live long enough +LL | LL | } | - temporary value is freed at the end of this statement diff --git a/src/test/ui/consts/const-int-conversion.stderr b/src/test/ui/consts/const-int-conversion.stderr index b216d41727b5f..ddb1a75f1b759 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.nll.stderr b/src/test/ui/consts/const-int-overflowing.nll.stderr index ffcac69c1af8b..bd061ab333188 100644 --- a/src/test/ui/consts/const-int-overflowing.nll.stderr +++ b/src/test/ui/consts/const-int-overflowing.nll.stderr @@ -1,7 +1,7 @@ error[E0716]: temporary value dropped while borrowed --> $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)); | -------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` @@ -12,18 +12,18 @@ LL | } error[E0716]: temporary value dropped while borrowed --> $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)); | -------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` -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 is freed at the end of this statement error[E0716]: temporary value dropped while borrowed --> $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)); | -------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` diff --git a/src/test/ui/consts/const-int-overflowing.stderr b/src/test/ui/consts/const-int-overflowing.stderr index 736909e093227..7228b5dbd4bfc 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.nll.stderr b/src/test/ui/consts/const-int-rotate.nll.stderr index 9923096f46d63..2b7cdf5746ed9 100644 --- a/src/test/ui/consts/const-int-rotate.nll.stderr +++ b/src/test/ui/consts/const-int-rotate.nll.stderr @@ -1,18 +1,18 @@ error[E0716]: temporary value dropped while borrowed --> $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)); | ------------ ^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` -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 is freed at the end of this statement error[E0716]: temporary value dropped while borrowed --> $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)); | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` diff --git a/src/test/ui/consts/const-int-rotate.stderr b/src/test/ui/consts/const-int-rotate.stderr index c15727961f9f6..ec08e0a3f57dd 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.nll.stderr b/src/test/ui/consts/const-int-sign.nll.stderr index 43fd002ff3a65..0ad7a39d5955f 100644 --- a/src/test/ui/consts/const-int-sign.nll.stderr +++ b/src/test/ui/consts/const-int-sign.nll.stderr @@ -1,18 +1,18 @@ error[E0716]: temporary value dropped while borrowed --> $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()); | ------------- ^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` -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 is freed at the end of this statement error[E0716]: temporary value dropped while borrowed --> $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()); | ------------- ^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` diff --git a/src/test/ui/consts/const-int-sign.stderr b/src/test/ui/consts/const-int-sign.stderr index 5a9a23af9d655..ffe09a0cfec09 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.nll.stderr b/src/test/ui/consts/const-int-wrapping.nll.stderr index 036c8b9d95e1a..a186854ce0cba 100644 --- a/src/test/ui/consts/const-int-wrapping.nll.stderr +++ b/src/test/ui/consts/const-int-wrapping.nll.stderr @@ -1,7 +1,7 @@ error[E0716]: temporary value dropped while borrowed --> $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)); | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` @@ -12,7 +12,7 @@ LL | } error[E0716]: temporary value dropped while borrowed --> $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)); | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` @@ -23,7 +23,7 @@ LL | } error[E0716]: temporary value dropped while borrowed --> $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)); | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` @@ -34,18 +34,18 @@ LL | } error[E0716]: temporary value dropped while borrowed --> $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)); | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` -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 is freed at the end of this statement error[E0716]: temporary value dropped while borrowed --> $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)); | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` diff --git a/src/test/ui/consts/const-int-wrapping.stderr b/src/test/ui/consts/const-int-wrapping.stderr index ec9776b821194..478a6d80838d3 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 ee0d4d8837402..48fe24df4d044 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 749ef952b5ddb..8ec54b4438dda 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 4febd0ee1e391..68a7164da3d3c 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.nll.stderr b/src/test/ui/consts/const-ptr-nonnull.nll.stderr index 6977e7fdc1183..26946fb99024c 100644 --- a/src/test/ui/consts/const-ptr-nonnull.nll.stderr +++ b/src/test/ui/consts/const-ptr-nonnull.nll.stderr @@ -16,7 +16,7 @@ LL | let x: &'static NonNull = &(non_null.cast()); | --------------------- ^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` -LL | //~^ ERROR borrowed value does not live long enough +LL | LL | } | - temporary value is freed at the end of this statement diff --git a/src/test/ui/consts/const-ptr-nonnull.stderr b/src/test/ui/consts/const-ptr-nonnull.stderr index a9476dda6d320..a606bed1782b3 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.nll.stderr b/src/test/ui/consts/const-ptr-unique.nll.stderr index b201994c894e4..3644cf4cec7d3 100644 --- a/src/test/ui/consts/const-ptr-unique.nll.stderr +++ b/src/test/ui/consts/const-ptr-unique.nll.stderr @@ -5,7 +5,7 @@ LL | let x: &'static *mut u32 = &(unique.as_ptr()); | ----------------- ^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` -LL | //~^ ERROR borrowed value does not live long enough +LL | LL | } | - temporary value is freed at the end of this statement diff --git a/src/test/ui/consts/const-ptr-unique.stderr b/src/test/ui/consts/const-ptr-unique.stderr index 141465bf184d0..482b78b2386f5 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 6649fb997cce4..c0e978a0ab7a7 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 c5d2ba02a70c6..155c858af37e6 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 2cd8711f03d31..87f84480bf66b 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 091f1f785cb02..0168c08f011d4 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 451f49c1cb57a..9b6638b228e75 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 d984023169597..e238fad431831 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 62f678790d21f..b0cd57ba2eb4d 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 d84e2651d4fc4..0de41c65bec08 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 716e8380c45da..0d35e36354101 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.nll.stderr b/src/test/ui/consts/min_const_fn/min_const_fn.nll.stderr index feb4960e0c746..95b809712ffea 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn.nll.stderr +++ b/src/test/ui/consts/min_const_fn/min_const_fn.nll.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.stderr b/src/test/ui/consts/min_const_fn/min_const_fn.stderr index e095ccaf20e29..cdf6b1016b4b9 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 1e6f698b3c8e3..a8d0dc37e4031 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 95871749365f1..48c260644a74d 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 07d10984392d8..5b2bee19acf90 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 7cb8c6e62ec60..f7f630c9ae3f5 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 e5a3502a3dc52..a2d67a0417078 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.nll.stderr b/src/test/ui/consts/min_const_fn/promotion.nll.stderr index eb186ce495137..550423c2d933c 100644 --- a/src/test/ui/consts/min_const_fn/promotion.nll.stderr +++ b/src/test/ui/consts/min_const_fn/promotion.nll.stderr @@ -1,7 +1,7 @@ error[E0716]: temporary value dropped while borrowed --> $DIR/promotion.rs:11:27 | -LL | let x: &'static () = &foo1(); //~ ERROR does not live long enough +LL | let x: &'static () = &foo1(); | ----------- ^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` @@ -12,7 +12,7 @@ LL | } error[E0716]: temporary value dropped while borrowed --> $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); | ------------ ^^^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` @@ -23,7 +23,7 @@ LL | } error[E0716]: temporary value dropped while borrowed --> $DIR/promotion.rs:13:28 | -LL | let z: &'static i32 = &foo3(); //~ ERROR does not live long enough +LL | let z: &'static i32 = &foo3(); | ------------ ^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` @@ -34,7 +34,7 @@ LL | } error[E0716]: temporary value dropped while borrowed --> $DIR/promotion.rs:14:34 | -LL | let a: &'static Cell = &foo4(); //~ ERROR does not live long enough +LL | let a: &'static Cell = &foo4(); | ------------------ ^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` @@ -45,18 +45,18 @@ LL | } error[E0716]: temporary value dropped while borrowed --> $DIR/promotion.rs:15:42 | -LL | let a: &'static Option> = &foo5(); //~ ERROR does not live long enough +LL | let a: &'static Option> = &foo5(); | -------------------------- ^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` -LL | let a: &'static Option> = &foo6(); //~ ERROR does not live long enough +LL | let a: &'static Option> = &foo6(); LL | } | - temporary value is freed at the end of this statement error[E0716]: temporary value dropped while borrowed --> $DIR/promotion.rs:16:42 | -LL | let a: &'static Option> = &foo6(); //~ ERROR does not live long enough +LL | let a: &'static Option> = &foo6(); | -------------------------- ^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` diff --git a/src/test/ui/consts/min_const_fn/promotion.stderr b/src/test/ui/consts/min_const_fn/promotion.stderr index 7052f68c3ec61..92d60f0c58542 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 a40f8d46d0aa7..e814303923e18 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 77aab31d26ec3..dbfe1d93aa409 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 e23ed1c620639..1fe3d33322fd1 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 967fb83b78b08..221e449b6f9a9 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 410c51c4b54e1..45679e3b962dc 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.nll.stderr b/src/test/ui/consts/promote_const_let.nll.stderr index e6ee1523a3b28..a0af949bf71e8 100644 --- a/src/test/ui/consts/promote_const_let.nll.stderr +++ b/src/test/ui/consts/promote_const_let.nll.stderr @@ -4,7 +4,7 @@ error[E0597]: `y` does not live long enough LL | let x: &'static u32 = { | ------------ type annotation requires that `y` is borrowed for `'static` LL | let y = 42; -LL | &y //~ ERROR does not live long enough +LL | &y | ^^ borrowed value does not live long enough LL | }; | - `y` dropped here while still borrowed @@ -12,7 +12,7 @@ LL | }; error[E0716]: temporary value dropped while borrowed --> $DIR/promote_const_let.rs:6:28 | -LL | let x: &'static u32 = &{ //~ ERROR does not live long enough +LL | let x: &'static u32 = &{ | ____________------------____^ | | | | | type annotation requires that borrow lasts for `'static` diff --git a/src/test/ui/consts/promote_const_let.stderr b/src/test/ui/consts/promote_const_let.stderr index d37bd49186032..c4295776d0a77 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 30479139e314c..fbaae711d7c06 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 8276db99a12c0..a393c4e336d64 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 5272062ccfc14..bc80de4ce04ab 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 b9d181a76dd9b..7a7d816873350 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 33fff4a0f68ed..b9662e7607494 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 949b63ffbde6f..b35f59658c042 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 2cd57e363d0de..3bedd0dac23b4 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 6f6a87dd1594d..9ba9c00e55bc8 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 2c9d226cc9ef7..e83c291c9bfe4 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 d4c91546329ad..2875bc5fce99b 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 1100d82f8406d..6608fb53c30d0 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 a25a1786e813b..db6ee98bb7b12 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 d7bf63822579f..2b1b7fe9a565c 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 d7d56f219b42e..8736d15624736 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 2fa1e1edc8722..2df4b9ec39d16 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 8670e7deb4cda..54125367f90c1 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 fe97846d6cc26..97072e74f429e 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 72def33cbcf99..f54e511acc1ff 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 f7c7f01020d26..86cb0f9fe325d 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 94229386e5f59..a2cd196b21f8b 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 f0edd838874e9..b76d6d73d972b 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 3e64d756e7e69..6a8056ec2d9d6 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 b30da3493350f..206e12cfb3ecf 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 c48d06e86154d..50cbe3846bba6 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 a071a4fc10d51..6d5e3d5136321 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 f13d599c0b137..28bc2e2c2d8f4 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 bd8ade16ec0e8..4bbe79b55b323 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 0852311b7b160..1297e496bcb30 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 99e2b38c3f0d8..8f061b3416e13 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 8930b1f1974fc..941c98b5506b2 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 d4829ad2a1af9..14c575f2699a6 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 246e6f6465cde..dbceba046e2ae 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 1b25231677c7d..b9e175e43d1cf 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 deb1cbd89b87b..7db5fbe3de402 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 de043cd28aa68..4371dc900ac10 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 dd6fa9706c2cf..cc3b602c9c0b9 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 5258240fc1f38..b2bf3527b0cc4 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 c981c20b762e1..ca5bcfe930d61 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 02cfe20616cd6..cd367a334fc60 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 5fe7d846b4c2f..e00695ec0ba62 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 9088b9e83b0cb..37440b59ae704 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 1ad7cd4547731..413d4ec8c291a 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 447bc73ceb403..8f4d43daa5191 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 e8bcec4665500..52ecce4632d12 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 95ff08a4332c5..bf91a0edc375b 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 44bbcf73dd778..531e8887cd2bc 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 26228b3891312..9e21c6c67bfc7 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 324f2f1fd6d1c..417c720c63e99 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 da44a8f498ea4..25be8794889fc 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 17d45e4b0dd21..c0574453a7a6b 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 e0e5cce107f92..6339c38578eb8 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 149a9475f103d..5c0d4e4ebe917 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 17ab75549e466..56268a237450a 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 7088f8fc89018..40dc3d09dad7e 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 5c046366993fc..4a9dea8c12e9a 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 7683402d8aaa1..ed5468cc4dac2 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 9fa1a2bf17a69..06a88c03f58af 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 4a08c985b4a06..b8481048361e5 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 850eab4f0880e..4398d25212550 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 0c359629d7892..ac9f45046353a 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 e4036a540db2a..3e684aef39f24 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 5c77a05e9d047..10659aac64217 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 e38a0424b3d74..cbe05e3784057 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 0a9fdd34fe2e0..e6060c269e10a 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 191bb780f7e1f..f8414b6e65e62 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 02ea6321eb8fc..3206eecbe30e4 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 98594542653c7..563e76dc6094d 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 377f4e870822d..d1b444976ddcc 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 4c93a6781eab1..8fc2b76eb111a 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 ad9bb57c922a3..44e6ddd0eac8f 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.nll.stderr b/src/test/ui/did_you_mean/issue-31424.nll.stderr index 91368dded3758..147225f1be59e 100644 --- a/src/test/ui/did_you_mean/issue-31424.nll.stderr +++ b/src/test/ui/did_you_mean/issue-31424.nll.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable --> $DIR/issue-31424.rs:7:9 | -LL | (&mut self).bar(); //~ ERROR cannot borrow +LL | (&mut self).bar(); | ^^^^^^^^^^^ | | | cannot borrow as mutable @@ -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,7 +22,7 @@ LL | (&mut self).bar(); //~ ERROR cannot borrow error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable --> $DIR/issue-31424.rs:14:9 | -LL | (&mut self).bar(); //~ ERROR cannot borrow +LL | (&mut self).bar(); | ^^^^^^^^^^^ | | | cannot borrow as mutable diff --git a/src/test/ui/did_you_mean/issue-31424.stderr b/src/test/ui/did_you_mean/issue-31424.stderr index 1442666ef66a5..7c351ea9bfe1a 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.nll.stderr b/src/test/ui/did_you_mean/issue-34126.nll.stderr index ed73cca435fd0..e738df1b732e6 100644 --- a/src/test/ui/did_you_mean/issue-34126.nll.stderr +++ b/src/test/ui/did_you_mean/issue-34126.nll.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable --> $DIR/issue-34126.rs:6:18 | -LL | self.run(&mut self); //~ ERROR cannot borrow +LL | self.run(&mut self); | ^^^^^^^^^ | | | cannot borrow as mutable @@ -10,7 +10,7 @@ LL | self.run(&mut self); //~ ERROR cannot borrow error[E0502]: cannot borrow `self` as mutable because it is also borrowed as immutable --> $DIR/issue-34126.rs:6:18 | -LL | self.run(&mut self); //~ ERROR cannot borrow +LL | self.run(&mut self); | ---- --- ^^^^^^^^^ mutable borrow occurs here | | | | | immutable borrow later used by call diff --git a/src/test/ui/did_you_mean/issue-34126.stderr b/src/test/ui/did_you_mean/issue-34126.stderr index 05ea4ef91ce49..536e295181ac4 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.nll.stderr b/src/test/ui/did_you_mean/issue-34337.nll.stderr index 5e46889866d4d..81f7b6dbf1b21 100644 --- a/src/test/ui/did_you_mean/issue-34337.nll.stderr +++ b/src/test/ui/did_you_mean/issue-34337.nll.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow `key` as mutable, as it is not declared as mutable --> $DIR/issue-34337.rs:6:9 | -LL | get(&mut key); //~ ERROR cannot borrow +LL | get(&mut key); | ^^^^^^^^ | | | cannot borrow as mutable diff --git a/src/test/ui/did_you_mean/issue-34337.stderr b/src/test/ui/did_you_mean/issue-34337.stderr index 4bf988b72cd00..353f409b07402 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.nll.stderr b/src/test/ui/did_you_mean/issue-35937.nll.stderr index 76fb1e229536d..216cb14dcf63d 100644 --- a/src/test/ui/did_you_mean/issue-35937.nll.stderr +++ b/src/test/ui/did_you_mean/issue-35937.nll.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow `f.v` as mutable, as `f` is not declared as mutable | LL | let f = Foo { v: Vec::new() }; | - help: consider changing this to be mutable: `mut f` -LL | f.v.push("cat".to_string()); //~ ERROR cannot borrow +LL | f.v.push("cat".to_string()); | ^^^ cannot borrow as mutable error[E0594]: cannot assign to `s.x`, as `s` is not declared as mutable @@ -11,7 +11,7 @@ error[E0594]: cannot assign to `s.x`, as `s` is not declared as mutable | LL | let s = S { x: 42 }; | - help: consider changing this to be mutable: `mut s` -LL | s.x += 1; //~ ERROR cannot assign +LL | s.x += 1; | ^^^^^^^^ cannot assign error[E0594]: cannot assign to `s.x`, as `s` is not declared as mutable @@ -19,7 +19,7 @@ error[E0594]: cannot assign to `s.x`, as `s` is not declared as mutable | LL | fn bar(s: S) { | - help: consider changing this to be mutable: `mut s` -LL | s.x += 1; //~ ERROR cannot assign +LL | s.x += 1; | ^^^^^^^^ cannot assign error: aborting due to 3 previous errors diff --git a/src/test/ui/did_you_mean/issue-35937.stderr b/src/test/ui/did_you_mean/issue-35937.stderr index 7499a9475e889..1e70f986e83dc 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 8273fad476462..98876e305ca09 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 b884d8a53d358..2ed0a09240062 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.nll.stderr b/src/test/ui/did_you_mean/issue-37139.nll.stderr index 4d1c8a6b0eb18..163817dd9bf58 100644 --- a/src/test/ui/did_you_mean/issue-37139.nll.stderr +++ b/src/test/ui/did_you_mean/issue-37139.nll.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable --> $DIR/issue-37139.rs:12:18 | -LL | test(&mut x); //~ ERROR cannot borrow immutable +LL | test(&mut x); | ^^^^^^ | | | cannot borrow as mutable diff --git a/src/test/ui/did_you_mean/issue-37139.stderr b/src/test/ui/did_you_mean/issue-37139.stderr index 38617fda2afac..cd42ee8001aba 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 1f3f7c475707a..852abaed724dc 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.nll.stderr b/src/test/ui/did_you_mean/issue-38147-1.nll.stderr index 838673b21d1ec..6efac371c028e 100644 --- a/src/test/ui/did_you_mean/issue-38147-1.nll.stderr +++ b/src/test/ui/did_you_mean/issue-38147-1.nll.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow `*self.s` as mutable, as it is behind a `&` referenc | LL | fn f(&self) { | ----- help: consider changing this to be a mutable reference: `&mut self` -LL | self.s.push('x'); //~ ERROR cannot borrow data mutably +LL | self.s.push('x'); | ^^^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to previous error 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 74c72edd028b0..4311836be3411 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.nll.stderr b/src/test/ui/did_you_mean/issue-38147-4.nll.stderr index 458e41f6aae7c..db3e6b8942646 100644 --- a/src/test/ui/did_you_mean/issue-38147-4.nll.stderr +++ b/src/test/ui/did_you_mean/issue-38147-4.nll.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow `*f.s` as mutable, as it is behind a `&` reference | LL | fn f(x: usize, f: &Foo) { | ---- help: consider changing this to be a mutable reference: `&mut Foo<'_>` -LL | f.s.push('x'); //~ ERROR cannot borrow data mutably +LL | f.s.push('x'); | ^^^ `f` is a `&` reference, so the data it refers to cannot be borrowed as mutable 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 6dc4f101084b5..71d44f9abad20 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.nll.stderr b/src/test/ui/did_you_mean/issue-39544.nll.stderr index 2fb8e3db68cbe..899a42b54e611 100644 --- a/src/test/ui/did_you_mean/issue-39544.nll.stderr +++ b/src/test/ui/did_you_mean/issue-39544.nll.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow `z.x` as mutable, as `z` is not declared as mutable | LL | let z = Z { x: X::Y }; | - help: consider changing this to be mutable: `mut z` -LL | let _ = &mut z.x; //~ ERROR cannot borrow +LL | let _ = &mut z.x; | ^^^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow `self.x` as mutable, as it is behind a `&` reference @@ -11,7 +11,7 @@ error[E0596]: cannot borrow `self.x` as mutable, as it is behind a `&` reference | LL | fn foo<'z>(&'z self) { | -------- help: consider changing this to be a mutable reference: `&'z mut self` -LL | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; | ^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `self.x` as mutable, as it is behind a `&` reference @@ -19,7 +19,7 @@ error[E0596]: cannot borrow `self.x` as mutable, as it is behind a `&` reference | LL | fn foo1(&self, other: &Z) { | ----- help: consider changing this to be a mutable reference: `&mut self` -LL | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; | ^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `other.x` as mutable, as it is behind a `&` reference @@ -27,8 +27,8 @@ error[E0596]: cannot borrow `other.x` as mutable, as it is behind a `&` referenc | LL | fn foo1(&self, other: &Z) { | -- help: consider changing this to be a mutable reference: `&mut Z` -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; | ^^^^^^^^^^^^ `other` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `self.x` as mutable, as it is behind a `&` reference @@ -36,7 +36,7 @@ error[E0596]: cannot borrow `self.x` as mutable, as it is behind a `&` reference | LL | fn foo2<'a>(&'a self, other: &Z) { | -------- help: consider changing this to be a mutable reference: `&'a mut self` -LL | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; | ^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `other.x` as mutable, as it is behind a `&` reference @@ -44,8 +44,8 @@ error[E0596]: cannot borrow `other.x` as mutable, as it is behind a `&` referenc | LL | fn foo2<'a>(&'a self, other: &Z) { | -- help: consider changing this to be a mutable reference: `&mut Z` -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; | ^^^^^^^^^^^^ `other` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `self.x` as mutable, as it is behind a `&` reference @@ -53,7 +53,7 @@ error[E0596]: cannot borrow `self.x` as mutable, as it is behind a `&` reference | LL | fn foo3<'a>(self: &'a Self, other: &Z) { | -------- help: consider changing this to be a mutable reference: `&'a mut Self` -LL | let _ = &mut self.x; //~ ERROR cannot borrow +LL | let _ = &mut self.x; | ^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `other.x` as mutable, as it is behind a `&` reference @@ -61,8 +61,8 @@ error[E0596]: cannot borrow `other.x` as mutable, as it is behind a `&` referenc | LL | fn foo3<'a>(self: &'a Self, other: &Z) { | -- help: consider changing this to be a mutable reference: `&mut Z` -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; | ^^^^^^^^^^^^ `other` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `other.x` as mutable, as it is behind a `&` reference @@ -70,7 +70,7 @@ error[E0596]: cannot borrow `other.x` as mutable, as it is behind a `&` referenc | LL | fn foo4(other: &Z) { | -- help: consider changing this to be a mutable reference: `&mut Z` -LL | let _ = &mut other.x; //~ ERROR cannot borrow +LL | let _ = &mut other.x; | ^^^^^^^^^^^^ `other` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `z.x` as mutable, as `z` is not declared as mutable @@ -78,7 +78,7 @@ error[E0596]: cannot borrow `z.x` as mutable, as `z` is not declared as mutable | LL | pub fn with_arg(z: Z, w: &Z) { | - help: consider changing this to be mutable: `mut z` -LL | let _ = &mut z.x; //~ ERROR cannot borrow +LL | let _ = &mut z.x; | ^^^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow `w.x` as mutable, as it is behind a `&` reference @@ -86,8 +86,8 @@ error[E0596]: cannot borrow `w.x` as mutable, as it is behind a `&` reference | LL | pub fn with_arg(z: Z, w: &Z) { | -- help: consider changing this to be a mutable reference: `&mut Z` -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; | ^^^^^^^^ `w` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0594]: cannot assign to `*x.0` which is behind a `&` reference diff --git a/src/test/ui/did_you_mean/issue-39544.stderr b/src/test/ui/did_you_mean/issue-39544.stderr index 7d6a672843a27..d86ea896a1411 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 3411958be62a9..cfb1da037dc07 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 1b9eecb7769b3..f6f7fe5fa38c3 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.nll.stderr b/src/test/ui/did_you_mean/issue-40823.nll.stderr index 0389cf5499d9b..73473406a9ace 100644 --- a/src/test/ui/did_you_mean/issue-40823.nll.stderr +++ b/src/test/ui/did_you_mean/issue-40823.nll.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow `*buf` as mutable, as it is behind a `&` reference | LL | let mut buf = &[1, 2, 3, 4]; | ------------- help: consider changing this to be a mutable reference: `&mut [1, 2, 3, 4]` -LL | buf.iter_mut(); //~ ERROR cannot borrow immutable borrowed content +LL | buf.iter_mut(); | ^^^ `buf` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-40823.stderr b/src/test/ui/did_you_mean/issue-40823.stderr index ee64e79ead931..fa2150a8d7f69 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 d2d9abee22cdc..84235ca4d6372 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 e6d10ffaae935..8a0d0096acbbd 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 2825ff46825a2..a29fa584b2924 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 7e62fc7c4fc0d..0bde5783b8cc6 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 0738c3f65b95f..a646d98324e09 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 f8672b20c7863..08e32ade3bc3b 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 5941d088f3aad..6640ced5c9ecb 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 85c0527477350..a94260dc42d15 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 6ceaa2e346a07..46acc7e66d8b8 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.nll.stderr b/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.nll.stderr index 59cb804a801fd..fff3a64ff2963 100644 --- a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.nll.stderr +++ b/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.nll.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:22 | -LL | let X { x: y } = x; //~ ERROR cannot move out of type +LL | let X { x: y } = x; | - ^ cannot move out of here | | | data moved here @@ -9,7 +9,7 @@ LL | let X { x: y } = x; //~ ERROR cannot move out of type note: move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait --> $DIR/disallowed-deconstructing-destructing-struct-let.rs:12:16 | -LL | let X { x: y } = x; //~ ERROR cannot move out of type +LL | let X { x: y } = x; | ^ 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 cb32616d6e6fb..9984cac7a4a46 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 c490509142ac6..744324d1f0ff5 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 e71df51e36d00..c831fdfe1a34d 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 3457549a75239..70eefeb329db4 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 206af6757b225..f9de5e14e59a6 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 e94a5fe96ffcd..5d4f39086cee6 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 2fefdc49e9c4e..7a4e8e5d3b926 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.nll.stderr b/src/test/ui/dropck/drop-with-active-borrows-1.nll.stderr index 9c6c9341be77a..7fed27adaff2b 100644 --- a/src/test/ui/dropck/drop-with-active-borrows-1.nll.stderr +++ b/src/test/ui/dropck/drop-with-active-borrows-1.nll.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 LL | for s in &b { | -- borrow later used here 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 a4295f96205ac..71960fcecb54d 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 347389cb59d70..ef46c9276be21 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 c3139948a07d4..49e55be1b49e4 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.nll.stderr b/src/test/ui/dropck/dropck-union.nll.stderr index 667bb7221aacd..228744326f947 100644 --- a/src/test/ui/dropck/dropck-union.nll.stderr +++ b/src/test/ui/dropck/dropck-union.nll.stderr @@ -1,7 +1,7 @@ error[E0597]: `v` does not live long enough --> $DIR/dropck-union.rs:39:18 | -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 | } | - diff --git a/src/test/ui/dropck/dropck-union.stderr b/src/test/ui/dropck/dropck-union.stderr index 6cb3c139132f3..4f6cd872449d3 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 317ac7674311a..9bf324412c3a5 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 b87e7a111493e..0a74377ea9fd7 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 799ee45a2022d..d484e157519c2 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.nll.stderr b/src/test/ui/dropck/dropck_trait_cycle_checked.nll.stderr index 28b9656c6fd17..8c669b597c3c0 100644 --- a/src/test/ui/dropck/dropck_trait_cycle_checked.nll.stderr +++ b/src/test/ui/dropck/dropck_trait_cycle_checked.nll.stderr @@ -3,7 +3,7 @@ error[E0597]: `o2` does not live long enough | LL | let (o1, o2, o3): (Box, Box, Box) = (O::new(), O::new(), O::new()); | -------- cast requires that `o2` is borrowed for `'static` -LL | o1.set0(&o2); //~ ERROR `o2` does not live long enough +LL | o1.set0(&o2); | ^^^ borrowed value does not live long enough ... LL | } @@ -14,8 +14,8 @@ error[E0597]: `o3` does not live long enough | LL | let (o1, o2, o3): (Box, Box, Box) = (O::new(), O::new(), O::new()); | -------- cast requires that `o3` is borrowed for `'static` -LL | o1.set0(&o2); //~ ERROR `o2` does not live long enough -LL | o1.set1(&o3); //~ ERROR `o3` does not live long enough +LL | o1.set0(&o2); +LL | o1.set1(&o3); | ^^^ borrowed value does not live long enough ... LL | } @@ -27,7 +27,7 @@ error[E0597]: `o2` does not live long enough LL | let (o1, o2, o3): (Box, Box, Box) = (O::new(), O::new(), O::new()); | -------- cast requires that `o2` is borrowed for `'static` ... -LL | o2.set0(&o2); //~ ERROR `o2` does not live long enough +LL | o2.set0(&o2); | ^^^ borrowed value does not live long enough ... LL | } @@ -39,7 +39,7 @@ error[E0597]: `o3` does not live long enough LL | let (o1, o2, o3): (Box, Box, Box) = (O::new(), O::new(), O::new()); | -------- cast requires that `o3` is borrowed for `'static` ... -LL | o2.set1(&o3); //~ ERROR `o3` does not live long enough +LL | o2.set1(&o3); | ^^^ borrowed value does not live long enough ... LL | } @@ -51,9 +51,9 @@ error[E0597]: `o1` does not live long enough LL | let (o1, o2, o3): (Box, Box, Box) = (O::new(), O::new(), O::new()); | -------- cast requires that `o1` is borrowed for `'static` ... -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 | } | - `o1` dropped here while still borrowed @@ -63,7 +63,7 @@ error[E0597]: `o2` does not live long enough LL | let (o1, o2, o3): (Box, Box, Box) = (O::new(), O::new(), O::new()); | -------- cast requires that `o2` is borrowed for `'static` ... -LL | o3.set1(&o2); //~ ERROR `o2` does not live long enough +LL | o3.set1(&o2); | ^^^ borrowed value does not live long enough LL | } | - `o2` dropped here while still borrowed diff --git a/src/test/ui/dropck/dropck_trait_cycle_checked.stderr b/src/test/ui/dropck/dropck_trait_cycle_checked.stderr index 0e4bd829a949d..792ef46f24432 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 6fb5c4b32ef12..cae4ec51c37cc 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.nll.stderr b/src/test/ui/dst/dst-bad-coerce3.nll.stderr index 8f1289845e37b..289d451f02a7f 100644 --- a/src/test/ui/dst/dst-bad-coerce3.nll.stderr +++ b/src/test/ui/dst/dst-bad-coerce3.nll.stderr @@ -4,7 +4,7 @@ error[E0597]: `f1` does not live long enough LL | fn baz<'a>() { | -- lifetime `'a` defined here ... -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 | let f3: &'a Fat<[isize]> = f2; | ---------------- type annotation requires that `f1` is borrowed for `'a` @@ -18,7 +18,7 @@ error[E0597]: `f1` does not live long enough LL | fn baz<'a>() { | -- lifetime `'a` defined here ... -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 | let f3: &'a Fat = f2; | ------------ type annotation requires that `f1` is borrowed for `'a` @@ -32,7 +32,7 @@ error[E0597]: `f1` does not live long enough LL | fn baz<'a>() { | -- lifetime `'a` defined here ... -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 | let f3: &'a ([isize],) = f2; | -------------- type annotation requires that `f1` is borrowed for `'a` @@ -46,7 +46,7 @@ error[E0597]: `f1` does not live long enough LL | fn baz<'a>() { | -- lifetime `'a` defined here ... -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; | ---------- type annotation requires that `f1` is borrowed for `'a` diff --git a/src/test/ui/dst/dst-bad-coerce3.stderr b/src/test/ui/dst/dst-bad-coerce3.stderr index 701a869ee91e7..61473269e50dd 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 df223b7cb96b2..27016829a07f3 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 58aa1e433d164..c46ac0c6ed4fc 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 65185cd54290c..821bdd03392ba 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 5cd618bc9f653..f30c88e4760ee 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 3acfdd22a9a3b..cee72660e4ffe 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 97ee9b9b05f76..02f0206c443a2 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 ddb11e19c03de..1892ad38a594b 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 fb0c94dcc3df9..f211530dcf48a 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 1cfb3c1dabae4..8c12b3d0bb9a9 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 53f9a5e706444..8011689880dfb 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 76c326fb20541..cba10432a9305 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 8b4cd9acac454..e1e07190d8c6f 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 eb321668d13f8..f2166de71f8d6 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 1ad907aa7eb43..83c8dbc7472fd 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 816ab21d81426..4aba5323cc575 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 944f42ee0451b..6ef49b6256058 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 ac2bf21c5c0ba..1f309f5e8f032 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 f2a9da71ca56b..3435fdfd72570 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 af1ac19c837d5..9724f78db6618 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 fbb3b8bc75690..6e86d746f5442 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 52399362482bc..0d8850c2397c6 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 d997c3d8a421a..ab601c8d8a707 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 1621368870a52..0604b600d23d0 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 908d5710c8a29..116cc83fa9ce5 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 a07a4f1c56746..df41cb894139c 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 19844503a4804..a20d79982493e 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 fc2ed79bb2e05..12047b5880c3e 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 f92c4e5c46346..71a8141b8ddd5 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 b3519948f64dc..696eabe99cffb 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 e62246562be67..268fc7a6e0c19 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 51cfe7beade2d..5b6ebc4c0d990 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 5f42af8f260d3..538898c2f2a6f 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 67b0d75d787cd..8848f984cfb7d 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 31ca01b86bdb2..6340f5a856ed3 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 cd0100ec2fc47..49a01abcbd693 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 5cc0a0d7a8f88..1ebd9b6806f89 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 42d08a11ed1b6..2bc414098dcf8 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 e6cd2ed4d0da4..191606d8dc531 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 3e7a4edd66e68..7e8453c61f62b 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 5e12f3b5eadf1..6b1e6046260a9 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 0b884c54a82f7..992345151827f 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 c8732852a71ee..db0a2b5a08593 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 123f4b2f1b71d..2940ad4bb1e2d 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 2a38aae0873ad..56a4bcffc81a2 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 77e7b5ec0e860..3e8467fad6fcc 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 1364693109e08..285570f755ed7 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.nll.stderr b/src/test/ui/error-codes/E0017.nll.stderr index 0477f06010b02..3c2a07265f4f0 100644 --- a/src/test/ui/error-codes/E0017.nll.stderr +++ b/src/test/ui/error-codes/E0017.nll.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 `X` as mutable --> $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; | ^^^^^^ cannot borrow as mutable 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/E0017.stderr b/src/test/ui/error-codes/E0017.stderr index cc202ec912e96..d0bd93eb90895 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 37704fc3233ca..1bc90a995fe30 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 3c5569eb79f3f..816a48f102dce 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 0ce91f0a40103..d163128bc8b6c 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 0d132bdbbddaa..7e9b9e8efb9a8 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 2c1fd111d26fd..fe9ac5e8eb025 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 cce32fa294407..6b1092760fb49 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 5906a05c32c97..6b5890cac36c5 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 a96e1a0beab32..a1b8aeaedbb8b 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 fd4ca7c9f7075..024c8681b5504 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 4c1cfd858e6c5..6592ad328be5c 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 abf6889709694..d8b90d0691dad 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 9f3e1fa5c3581..4f85d175ce65d 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 4d37881c1e126..3113fd2189b4c 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 353c825f5280e..1f818da25bb0f 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 d32960f82cbc1..a596b75e481de 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 a453517752691..2d590a8e1d706 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 97bdbfbe5ab5a..da97f3a014b06 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 a5508f9808576..a807f2d44a6fe 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 a644ac92cefbf..3bc4775bdc12f 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 b007ca05ab2cf..80b3a4e714ae0 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 787f8caec7f49..b0afaeb5c1fa9 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 af9acb294bcde..e7690aa30bd20 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 75e03c659b77b..b7f4ce4d230ef 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 9ea3c09e63f53..253aa166bd371 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 e19b421bfdb9f..c21363756b3e6 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 401c1755fa8be..26e6e2e1bce7e 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/E0161.stderr b/src/test/ui/error-codes/E0161.stderr deleted file mode 100644 index 0135e495c16b5..0000000000000 --- a/src/test/ui/error-codes/E0161.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0161]: cannot move a value of type str: the size of str cannot be statically determined - --> $DIR/E0161.rs:14:28 - | -LL | let _x: Box = box *"hello"; //~ ERROR E0161 - | ^^^^^^^^ - -error[E0507]: cannot move out of borrowed content - --> $DIR/E0161.rs:14:28 - | -LL | let _x: Box = box *"hello"; //~ ERROR E0161 - | ^^^^^^^^ cannot move out of borrowed content - -error: aborting due to 2 previous errors - -Some errors occurred: E0161, E0507. -For more information about an error, try `rustc --explain E0161`. diff --git a/src/test/ui/error-codes/E0164.stderr b/src/test/ui/error-codes/E0164.stderr index 0debc8092e86d..0a153d85b4215 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 471ba3870e21d..b4128b9560664 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 7fed0426ee874..8971d61fc758e 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 570b0ddc3131a..2d9fdfe5d29c7 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 bdfe717afe279..8faa550a50935 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 57032c6b0c843..6eaa1750ee355 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 f58dcd791da1d..bb7b6474d3e38 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 e182cbd2ec155..0d3706336a9ca 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 ba55c4a58e476..3632d26cd32e5 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 f6a8f32d2384d..677271aad445e 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 5d2f9f3e362e4..89cfd4024230b 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 c82859a9867e6..5ef51ed86926a 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 0eb812a5ef071..43949833e21d2 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 bd06241fc76d1..8486806c6729c 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 a47aa7c6592dd..36e4eeeaeea76 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 9e64f6c3f1495..3bf5e9d815485 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 8f01889a470b3..ad90b7171266e 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 bc6a0d9f96c3c..403c0aa4146c7 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 3506c1c0f165a..b14cfd1a52d47 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 3e276bd1acb00..3c77e7f3df2be 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 8fcb68e434f80..16c3ab9d7425b 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 f2b0f392bc8bc..01a923a53a2ba 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 393ad8c81a071..a8b016ebf52ae 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 49165d1e42bbb..3a5040eb6daa6 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 598ec672ce635..e1f53e592fc85 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.nll.stderr b/src/test/ui/error-codes/E0301.nll.stderr index 898c30a75b28d..24234c9929e42 100644 --- a/src/test/ui/error-codes/E0301.nll.stderr +++ b/src/test/ui/error-codes/E0301.nll.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 | = help: add #![feature(bind_by_move_pattern_guards)] to the crate attributes to enable diff --git a/src/test/ui/error-codes/E0301.stderr b/src/test/ui/error-codes/E0301.stderr index 3cfacd5983f0d..80ee681a51799 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 66b31361762d2..69ebb6bb9c9fa 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 f69a389336590..3c51106cae8c8 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 8c71747fbcdf0..bd9834ceb9fef 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 cd1903bd7e26f..7fb622ee80bbf 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 9226ca0e478d7..7ab0f82fc2360 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 2894a91963200..015448c39eaaa 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.nll.stderr b/src/test/ui/error-codes/E0388.nll.stderr index a898d60a98595..0fc8a76820cf6 100644 --- a/src/test/ui/error-codes/E0388.nll.stderr +++ b/src/test/ui/error-codes/E0388.nll.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 `X` as mutable --> $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; | ^^^^^^ cannot borrow as mutable 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/E0388.stderr b/src/test/ui/error-codes/E0388.stderr index f641830ae9ff2..3f662459c8417 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.nll.stderr b/src/test/ui/error-codes/E0389.nll.stderr index 13d2f8cfaa59c..c47750b6f4e69 100644 --- a/src/test/ui/error-codes/E0389.nll.stderr +++ b/src/test/ui/error-codes/E0389.nll.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 E0389 +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/error-codes/E0389.stderr b/src/test/ui/error-codes/E0389.stderr index cc8914ef3a6f7..927eace727ee8 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 7632229360ee8..3ca3a77c74fb7 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 4bb3b87bb4a27..18419572233e9 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 cc7d94e22eb6b..9d80acb515d5f 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 27f281ee43786..7c54e5b4edba7 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 b924647502965..2bd7de6c24614 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 f84fd52c851a8..4ccb6c5728e83 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 2f09a525e450b..a22afe6f3e8c3 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 dc0a41e6eb0f8..132a9432254fc 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 fe78d8d957ea0..c1c25e835c148 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 68d636ffae0b2..7bdaa18073075 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 6e848f9bfd39c..c2b8fdc7c558b 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 4baf5006cf40a..78acac5c6617e 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 d0deb8ce7ea26..bdcfaae60a010 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 b91f061db3455..d67a2660dac38 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 391027a518409..9ef4608da7dad 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 2154cb0ead286..205bcf342f1ad 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 13cdb0d8861fa..b5f76a1fcd848 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 78e4e43ac2f3d..9f8b053de2cac 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 240e6bd4a829f..adfd2d923c78a 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 bb6b31242cb54..137a1af6f95b0 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 7fbb7fa0413b6..d852e18838442 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 0e2bc701b7fbf..14508ccbc9a7c 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 09c9d19e11402..349aa0d07c5d8 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 9470cbf176aeb..217b164036f87 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 6a11577bb0f33..853f0c3c2399d 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 e3b8fbfb25362..8021f7d3951a8 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 9c7399515f439..a0f5f7079b34c 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 d623c8abbd923..8221a5e0ad677 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 11f0867724627..655f3a98d7f09 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 62f268cd432b6..7c3093309f9e1 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 8b071e0b315ed..9cfe7cccac1a5 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 d3591cd5f6062..da7069fbb477b 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 5147bf2455996..71e490364d7ab 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 b73db6c975ead..5f337dd7f422d 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 515d71ba05ec5..b0294eef04ef7 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.nll.stderr b/src/test/ui/error-codes/E0499.nll.stderr index c1acef10e6e6a..d56baf7227201 100644 --- a/src/test/ui/error-codes/E0499.nll.stderr +++ b/src/test/ui/error-codes/E0499.nll.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 | a.use_mut(); LL | x.use_mut(); diff --git a/src/test/ui/error-codes/E0499.stderr b/src/test/ui/error-codes/E0499.stderr index 92157e4eba6c4..82270162b38ca 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.nll.stderr b/src/test/ui/error-codes/E0502.nll.stderr index 64ca8f0e6b9a4..cade6d71852f8 100644 --- a/src/test/ui/error-codes/E0502.nll.stderr +++ b/src/test/ui/error-codes/E0502.nll.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `*a` as mutable because it is also borrowed as immut | 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(); | - immutable borrow later used here diff --git a/src/test/ui/error-codes/E0502.stderr b/src/test/ui/error-codes/E0502.stderr index 9193886b00969..26a2c3bf3534e 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.nll.stderr b/src/test/ui/error-codes/E0503.nll.stderr index 7b483a5eaa585..106dda2bc2260 100644 --- a/src/test/ui/error-codes/E0503.nll.stderr +++ b/src/test/ui/error-codes/E0503.nll.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` LL | _borrow.use_mut(); | ------- borrow later used here diff --git a/src/test/ui/error-codes/E0503.stderr b/src/test/ui/error-codes/E0503.stderr index 83391146b602d..62cb3afca783f 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.nll.stderr b/src/test/ui/error-codes/E0504.nll.stderr index 8d7387e86e524..1f2a0407a3963 100644 --- a/src/test/ui/error-codes/E0504.nll.stderr +++ b/src/test/ui/error-codes/E0504.nll.stderr @@ -6,7 +6,7 @@ LL | let fancy_ref = &fancy_num; LL | LL | let x = move || { | ^^^^^^^ move out of `fancy_num` occurs here -LL | println!("child function: {}", fancy_num.num); //~ ERROR E0504 +LL | println!("child function: {}", fancy_num.num); | --------- move occurs due to use in closure ... LL | println!("main function: {}", fancy_ref.num); diff --git a/src/test/ui/error-codes/E0504.stderr b/src/test/ui/error-codes/E0504.stderr index 7f4a611c5d53f..a987713a11d17 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.nll.stderr b/src/test/ui/error-codes/E0505.nll.stderr index 181e5e33d29d7..4d9d1ef121c69 100644 --- a/src/test/ui/error-codes/E0505.nll.stderr +++ b/src/test/ui/error-codes/E0505.nll.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 LL | _ref_to_val.use_ref(); | ----------- borrow later used here diff --git a/src/test/ui/error-codes/E0505.stderr b/src/test/ui/error-codes/E0505.stderr index 268eb88019220..28dfb25986fda 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 c24b8ecf61ac6..1a596af1572c5 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.nll.stderr b/src/test/ui/error-codes/E0509.nll.stderr index 0233c7d6d1651..e5c0cf6e24e51 100644 --- a/src/test/ui/error-codes/E0509.nll.stderr +++ b/src/test/ui/error-codes/E0509.nll.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/E0509.stderr b/src/test/ui/error-codes/E0509.stderr index b1f256d2d9e33..25b6d8a47d28c 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 f1e3c0135bfb2..1362a3d1f254a 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 998f6403f0b29..3fecce542ce9b 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 034c17933645c..2e6de5053d576 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 366ab1bca63fa..e256c07de2672 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 6391a69c24e8f..561446f8175db 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 2ef80253eaf5b..c312144132d3b 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 d2829e1643bbd..23f9cd7ce2db7 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 c320918a3bfdf..1283a9c5ef653 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 8e2ce09059a32..bb30bd7befb38 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 2c172f8114962..6ed90c0ae4ffe 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 295a518c336dc..36619f8dee4cc 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 394b4be3340f5..d1e7e3f47442f 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.nll.stderr b/src/test/ui/error-codes/E0597.nll.stderr index 88a8a46930d2c..b4a1180ad546c 100644 --- a/src/test/ui/error-codes/E0597.nll.stderr +++ b/src/test/ui/error-codes/E0597.nll.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 | } | - | | diff --git a/src/test/ui/error-codes/E0597.stderr b/src/test/ui/error-codes/E0597.stderr index a5b0cc49d0c83..cab9785853108 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 85110889e9a7b..6fb53e727630f 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 6c6d922290fc6..95ac4510ca885 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 ee8fd2809bc76..444005e086f1b 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 2bd92db86e363..5861bdcb7a953 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 4dc074b222ac8..95e899db8b7e9 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 89ec4896a2b43..fce24886eb0df 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 1fbe4b9c5bccb..a0fe02c1c4d95 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 b228b2eddfd9e..3aec509934bc1 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 b5cf09b2201d0..797e95d02dda3 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 c46b1f2b2d562..a2966eea44c01 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 5b1a4a93c4c0d..598117c2b6058 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 d86ee5b9b4b96..772058719ae04 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 f600bfa8cd31f..556e5db10a944 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 f7319a878c27a..65152b2b74dd4 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 f763c82eff80a..feca7f10b706b 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 31a2f607e582f..01ac24cfbbe12 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 f744520ef6ee5..d19ebfd15a52c 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 502200c1d008e..976cdd45f5767 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 da9ba5bf34bcf..465cc7702eef8 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 090157fb0d778..f682b4f41e521 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 58802b23db382..292c49fa84e59 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 b5aa1b21b0968..2f01f54c2d1ce 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 4f9734d1acff6..412c856ce065a 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 f8c7cd8c1464e..8bd00a392d4f8 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 0f498d1643905..b21b6fdfcf1f2 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 d42fea7081280..7143f8c914dd0 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 7a7dce98f2d18..29f210803dd1d 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 2fbeaec23a798..9983aac4f9c06 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 01c7e88175683..03867a8e43b10 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 91109a6456643..5ac435bf011e4 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 9c76a66c265bb..a09ba3562e098 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 d9513710d4463..82b0b48414464 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 f51f1c9a4e563..b8bad7db6b65e 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 681b1cf0fa7cf..7294a074db655 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 e9cc92d78ea76..a72709f719437 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 3f9ed96400b54..fddba584798b9 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 e29256a5014f9..14b7a810be2e3 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 3f129658b8fd0..e5b1539ccbb92 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 7b09d3ceab0b9..29bd252babe52 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 d4deda999da16..a3827943b6dfc 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 0a8be3218c759..74f2802449a74 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 1c96c15a76919..22d5467c363fd 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 24b1caf7c1bfe..d7e695578d399 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 166623801c246..cf4535d6c2c6a 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 da49a83be1f70..1f767dacea8de 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 80c7441c857d1..58f4f97b24118 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 a3ce480d66dcd..fe4ae6cfdd078 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 8dd88006be9c6..ef579260f061c 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 b22cffeea2898..1ae4ab65929f0 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 d9bb37328bd5b..e3e5481a96c5e 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 57924e0ce2131..8551a939e8ed8 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 33a71fc4356b5..81b6584ae90d0 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 fab61bd9ed065..4605332ef5b35 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 4ffce58f8de75..5e5826978fc7e 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 288a32fc14edd..f315811cdb42e 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 17ea57805d2b9..05f84d5762341 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 db09b23bf26e5..cbbe967179ef3 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 dfd122b3ea405..0b302e30b64f3 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 e3ce6c1317f50..5e5d952bcec84 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 dd7e3219c76a7..c2ec1600868ab 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 eb202b3b31b08..b5a2c12c436d0 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 ff7763bbd899b..76ec91e181d5a 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 6233c6d074e66..e0cd4404d3778 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 8155514191ce3..89f615f53ddd3 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 92c04f9fe8a51..258e2b347fba8 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 7ae8a6f1858a9..acdde84afa4d4 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 34e5b7f9f2364..523982dd0196b 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 66645b24a49ad..342a9f7096e71 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 43695d88eaf68..3351da0d54762 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 603b29aa989fd..9f6570ab2a0f3 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 7ebaec0368e3d..77406be2095cf 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 204e7dd64df42..787c11f2a81ab 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 8baac1a902b87..8bc9f9a67e7ef 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 d70b6ef79ea8f..5b7a720736a1e 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 f2134701deeeb..14f064060a621 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 b7b6f2cf04aeb..eb632ee395f22 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 34fe289cd98a0..386d517a44603 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 8c97b57e0ab99..272751916f5be 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 6b5ade6daef2c..2ec5594703260 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 b78aed4568306..2540242f9f68b 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 a435829593110..8babcffaa8dd7 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 31be4e2c87a68..26ed918e94d91 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 936cdc559bd14..fb1602423938e 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 ddd4c457d731b..7635af6ce46f5 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 18adf3a880ace..dbde806f6cc44 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 4d15ccb300a87..c539e24c01b1c 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 71e8f11ff078d..ef89a887fd44d 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 22ad8c8b77e90..83775322a270f 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 2f8bf20ce4670..e5c05872dbf85 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 b262a6f7005ec..5cbd1023b3cc8 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 d528788f7c223..7417f310921d8 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 707b6bc75b171..fb32ebb18882d 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 c20b21fa43d68..5e64ac50c3c4f 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 5103b7214f508..c41dca0ec4710 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 1cadfb28214cb..27324d703a8fb 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 802c74239d719..76afd217b816f 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 d619f1e3239ca..d512e56d0a841 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 aa4f6648c4fbd..baba7f4bfb5ae 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 18c7ac9c3c926..5de1706dd4aa2 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 8ec3c682850da..e1089bc345e88 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 eee38e12c2aaa..6ad0ea673135a 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 fc4aa57718ce3..466f202819873 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 a23962fe31897..fe206d3dfca4f 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 58051153e1f0d..b67949b61555c 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 3a3165ba3e696..beec28765c8dc 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 9ebff2e044c95..7b202042878ea 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 1379ba526f5d5..39404aa39c85a 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 5bda76e2bfebc..278a184bae213 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 d465512527a62..3f4ce6d3b94a0 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 cae409019f7a6..105b3d5cff5cf 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 e9b9f240e8cd0..9568b1d88019d 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 be5237fbfcf3b..7f88d30acc662 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 bd86a4197a76e..dce400025353b 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 2b28bbca6454f..25b26de60ef7d 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 51fefcfaff725..8b79c752e4579 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 1aec87f066966..bac23b3a60d2e 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 01ec3d8b2e21f..2d4b622843d37 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 91845329534e7..c585a96adf631 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 5bc56adb8adfb..f018ff4a9d747 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 20e3a4dbbca45..2a0aa4ff3c2ec 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 96f165d5a515a..c2cc1dceda33e 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 044f21a983365..77d3a6f6fb317 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 c7101b436e26b..60f5c0821881e 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 2b43a480c6b94..afb402174fb1e 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 cbe6d56775594..dd4ca1f67e330 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 e83d5cdbde1e6..6b8b850b5cc02 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 1629547acb1c0..e31d888f00786 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 7a13f61a27ea7..c15a8b33037fc 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 70ba06cde45ce..7035d85ec2a87 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 b5cb9f564a3b6..16507bf596f13 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 aee4f7ba47db9..d79404263e452 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 5c111fe78f48a..f85ce8eeeacea 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 135ec5eb0c094..58d2c790ffe87 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 47cf241cc3f96..9faf2a88a6b17 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 aea1e00d698a6..554eeae8deca9 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 b698777f6234c..fb9b47bd49c0e 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 9f60a047cb47e..689a3757343b1 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 092cb98a2f963..5b032c6f1ea3f 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 347b8a9710eec..b23db3c216d01 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 ccbb711fe6d43..f4c238d9f3fff 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 33d1f07aa3625..f29ee0b5a78c2 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 bdcd922c6e1e4..c5a9b493728ce 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 c92887eded640..870cf1aa28686 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 056e33111f0df..f6666b40f3e6a 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 8897f393dbd56..012664e9b6bf9 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 c4f8771171e8b..13166db213e24 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 f7b431d19be7a..cc004e3a1da07 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 9299ac739ce3c..1f8f114d7da53 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 bdb732af7d2ed..1ee2ec3c8818d 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 7390051b95da2..279f2198a8088 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 5c441189ea7cb..5e4c4649d012e 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 9b45e19c3a3c7..524f77902f689 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 de1f03cc170b1..683424899a2dd 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 fd1e5392e69e4..12b796d2e60a1 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 c0016d24f35e1..7501954f904ec 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 2d6ef277572b9..1f335401f9962 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 20cdbceeb689a..c47ce70eaae76 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 ddd11f6daab94..a2fd65935992d 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 6def25f965118..ae4066ceb8017 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 2b90699384b48..73cd28fe74987 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 52d9b8db2fbe7..8f584c333ac71 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 37e9b35c0ba78..71d9890cb2c33 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 01005138a6077..11e095fef3da9 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 ad5ffa5e7852b..b37f138fbb5e4 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 65dec6e10990b..58eb57516eb02 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 dc7d67a205379..38064a6bc94bd 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 9f4b01e45b6a6..ee22bd25091a3 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 1f35efa59b690..b04a6e4d671ba 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 209a445194da9..74ad0e70c9612 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 4ced5037f38ba..61a3249c2ab90 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 4cf1f29f1ab04..13dbb6029673b 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 8730bf678fd34..519f6528323fb 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 266775484a901..a49a8b4cdb2b7 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 d608f3d37cf2a..ef93bb97ab449 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 f9f8cfe9171a9..6faa0528dc71f 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 77f2f13c99ee8..149ce9e4f82a2 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 a42b8e579c9b2..83b3017a4cdf4 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 c2105ae1dac7c..e4137c79939a8 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 a69c13507e6b2..6ac49b7ccd13a 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 5abe0d0c50b4f..1f698c90cb9a4 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 4bba638c4e9b0..5a1a4e36e06da 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 b598032e4c9b1..cdb2115552744 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 88d82187716d9..da2b0dc234f40 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 b5a4a5240d9d7..f1c1d0a538876 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 aaaad658de7ba..02fdb808da449 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 00fda5dbd0c48..575da18f24043 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.nll.stderr b/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.nll.stderr index 67cca25ac0cac..e7b457534211a 100644 --- a/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.nll.stderr +++ b/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.nll.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:14 | -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/functional-struct-update/functional-struct-update-noncopyable.stderr b/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.stderr index a3497c59a52b1..5549adc8d0e17 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 79183fca9d3a3..65c37e01eaa93 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 141c51609b7c5..b208da3645d8f 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.nll.stderr b/src/test/ui/generator/borrowing.nll.stderr index 3c9221d28e74d..3d58873f826da 100644 --- a/src/test/ui/generator/borrowing.nll.stderr +++ b/src/test/ui/generator/borrowing.nll.stderr @@ -7,7 +7,7 @@ LL | Pin::new(&mut || yield &a).resume() | | borrowed value does not live long enough | value captured here by generator | a temporary with access to the borrow is created here ... -LL | //~^ ERROR: `a` does not live long enough +LL | LL | }; | -- ... and the borrow might be used here, when that temporary is dropped and runs the destructor for generator | | diff --git a/src/test/ui/generator/borrowing.stderr b/src/test/ui/generator/borrowing.stderr index 169e4a8561c1d..38502aa8e0b47 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.nll.stderr b/src/test/ui/generator/dropck.nll.stderr index a90a47fe9aa01..8bb860f288f10 100644 --- a/src/test/ui/generator/dropck.nll.stderr +++ b/src/test/ui/generator/dropck.nll.stderr @@ -18,7 +18,7 @@ error[E0597]: `ref_` does not live long enough LL | gen = || { | -- value captured here by generator 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/dropck.stderr b/src/test/ui/generator/dropck.stderr index fdaa5cfbae3e6..977f388a626f0 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 c683ea1a3094b..bd5abb202068c 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 aeea10225091f..234235839164c 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 521001293afa1..47a12bbacc025 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 50442828d8df1..d78da51049150 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 29299b2405a00..20a06abebd6af 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 c98f42e62168e..c2caac7ebe2e7 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 caf92f0ec693e..404d3069f79f3 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.nll.stderr b/src/test/ui/generator/yield-in-args.nll.stderr index f753daafa9741..ee6d22c27cde8 100644 --- a/src/test/ui/generator/yield-in-args.nll.stderr +++ b/src/test/ui/generator/yield-in-args.nll.stderr @@ -1,7 +1,7 @@ error[E0626]: borrow may still be in use when generator yields --> $DIR/yield-in-args.rs:8:13 | -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-in-args.stderr b/src/test/ui/generator/yield-in-args.stderr index f53677b5312ed..2f22dea4e91fc 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.nll.stderr b/src/test/ui/generator/yield-while-iterating.nll.stderr index 2dc12f843b220..43e29ceb5e667 100644 --- a/src/test/ui/generator/yield-while-iterating.nll.stderr +++ b/src/test/ui/generator/yield-while-iterating.nll.stderr @@ -1,7 +1,7 @@ error[E0626]: borrow may still be in use when generator yields --> $DIR/yield-while-iterating.rs:13:18 | -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 { | - first borrow occurs due to use of `x` in generator ... -LL | println!("{}", x[0]); //~ ERROR +LL | println!("{}", x[0]); | ^ immutable borrow occurs here LL | Pin::new(&mut b).resume(); | ------ mutable borrow later used here diff --git a/src/test/ui/generator/yield-while-iterating.stderr b/src/test/ui/generator/yield-while-iterating.stderr index 1e3e31470e9d6..bcfe4f64bc3d2 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.nll.stderr b/src/test/ui/generator/yield-while-ref-reborrowed.nll.stderr index d0d6a98301e59..4c37cd351732b 100644 --- a/src/test/ui/generator/yield-while-ref-reborrowed.nll.stderr +++ b/src/test/ui/generator/yield-while-ref-reborrowed.nll.stderr @@ -6,7 +6,7 @@ LL | let mut b = || { LL | let a = &mut *x; | - first borrow occurs due to use of `x` in generator ... -LL | println!("{}", x); //~ ERROR +LL | println!("{}", x); | ^ second borrow occurs here LL | Pin::new(&mut b).resume(); | ------ first borrow later used here diff --git a/src/test/ui/generator/yield-while-ref-reborrowed.stderr b/src/test/ui/generator/yield-while-ref-reborrowed.stderr index 5c9de279c02d8..155f2770d3d55 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 37f6c61f06df3..e16ad9120a65e 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 b31d2a88044c7..39372c9315831 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 1c978245f9c63..e7625abb1c831 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 8f4a0f23670bf..4ae5098a121f5 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 3da39f1dc17cb..f055a3ab83f76 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 10a57aa6ca649..01730c4d69566 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.nll.stderr b/src/test/ui/hashmap-iter-value-lifetime.nll.stderr index cff58af3775c4..f7626b13bad36 100644 --- a/src/test/ui/hashmap-iter-value-lifetime.nll.stderr +++ b/src/test/ui/hashmap-iter-value-lifetime.nll.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 | LL | println!("{}", *thing); diff --git a/src/test/ui/hashmap-iter-value-lifetime.stderr b/src/test/ui/hashmap-iter-value-lifetime.stderr index 99761dd1cd7f5..0f7e04dae0ce6 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.nll.stderr b/src/test/ui/hashmap-lifetimes.nll.stderr index 08b8e3e443a9b..497c7d1216cd9 100644 --- a/src/test/ui/hashmap-lifetimes.nll.stderr +++ b/src/test/ui/hashmap-lifetimes.nll.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; | -- immutable borrow later used here diff --git a/src/test/ui/hashmap-lifetimes.stderr b/src/test/ui/hashmap-lifetimes.stderr index 81b2304f38102..728946ca13a69 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 6d63344882b22..3e288b72ec63d 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 bbb45552f2c14..73f89b5856da5 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 21d154eb2316c..77a5491cb63a7 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 50e1af8f14231..3fb6baa35e144 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.nll.stderr b/src/test/ui/hrtb/hrtb-debruijn-in-receiver.nll.stderr index 80ecc4741a2e8..70d5b3c2ec58c 100644 --- a/src/test/ui/hrtb/hrtb-debruijn-in-receiver.nll.stderr +++ b/src/test/ui/hrtb/hrtb-debruijn-in-receiver.nll.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 diff --git a/src/test/ui/hrtb/hrtb-debruijn-in-receiver.stderr b/src/test/ui/hrtb/hrtb-debruijn-in-receiver.stderr index 85bff4ce7911f..e498a9ad02221 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 8e8892552b701..d893cd606f1e4 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 f56b81759fede..f10e427a545fb 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 77c1789852e52..b5d945fe15ca0 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 5914cb3eaa494..20a8fd459fa41 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 fe2bc1f222504..115851ddf9385 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 ea08af0164061..9bc8cd67a82af 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 79c24855dc96c..4648c0182b98e 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 4cf35be22fad9..d072086e086d6 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 d89f395d8c170..ebe38b7c41a6c 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 d6d25d7fa0c2c..a30650d88e28d 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.nll.stderr b/src/test/ui/hygiene/fields-move.nll.stderr index f72a52e2535d2..562f60e31b5d2 100644 --- a/src/test/ui/hygiene/fields-move.nll.stderr +++ b/src/test/ui/hygiene/fields-move.nll.stderr @@ -1,12 +1,12 @@ error[E0382]: use of moved value: `foo.x` --> $DIR/fields-move.rs:18:9 | -LL | $foo.x //~ ERROR use of moved value: `foo.x` +LL | $foo.x | ^^^^^^ value used here after move ... -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 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); | ----------------- in this macro invocation | = note: move occurs because `foo.x` has type `NonCopy`, which does not implement the `Copy` trait @@ -17,7 +17,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 @@ -25,10 +25,10 @@ LL | assert_two_copies(copy_modern!(foo), foo.x); //~ ERROR use of moved val error[E0382]: use of moved value: `foo.x` --> $DIR/fields-move.rs:29:42 | -LL | $foo.x //~ ERROR 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-move.stderr b/src/test/ui/hygiene/fields-move.stderr index a5eeadff4dc05..43d55fdc68fb7 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 6d5b60fcb5b7f..20ea4e91067be 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 755bf3e55f716..932c951e7a541 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 d9342d911592b..5e2c56d4bf4d4 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 ad62b976251f0..7e0f4e4e0b8f3 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 9a55965d85fea..80cd1547b45e7 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 b7cb91d94f1b1..c20cbd9f68791 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 227a39512b74f..b5839fe5c3d23 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 4f9a68ca8311b..1dd7489574622 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 cb3705e5513cc..418c2c73ba157 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 4fca86d521ba6..6e78cb86d80f4 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 370fc9784ad4d..e7ae7afa02aa6 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 b1de7700edb3c..7948f1667d77d 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 8a170dccd5c42..edd05916ede2c 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 bc056c7cf3cb5..80fb4dd0f314a 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 677bd08b6af57..4192b97e75069 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 6401a62c06ba2..b986973fe91f4 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 b2a104bfacffc..04bca1b76a097 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 d4153ac94acd1..65be86eaf2575 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 966c8d916a3b5..9dc2b8f9a7397 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 d8e2dc6e8700e..d35d376962c17 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 618a9f94aa451..b52f3d6b839d4 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 53cd2b1441187..af120fa977caa 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 de3c7ba5d3118..728bcc0aa865e 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 99c8fe35c66d0..fb48ecd12b6d1 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 d1f147834d2ef..6311a7f00674f 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 a3b118efa62c5..d980d7cccadd5 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 84ac1bd5ca4a3..3a636f2524fff 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 acdeabb2f9892..abc9ff54bdee8 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 96494229fd339..fce234eb87ced 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 920b44fc909ab..26ed8dbb9c75b 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 55e1216d3a8a0..d223b9672cfdc 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 43bf2862feea5..145d6a8431bf4 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 f0b685bd5ee91..1fd3ebff62a81 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 80fc0504558f9..c7ad1b4e608fc 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 7c70709c6b978..968272d4d2c19 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 bfbb6560d49d9..685fff25a149e 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 f0509204f2ce0..da888979c30f0 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 29660d908e485..7c43c642ec36e 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 b47d10343f689..f26bb2f5a0ec4 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 3f9aab9dc79cb..c0783feb7947d 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 baeed02517d18..e067432b39237 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 795e1761ccdb3..24b1b582d1ea3 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 f5a82ef1b3b01..ad70b7d5b91b0 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 c43ab00e718ad..7962fcb9aec1d 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 0524b1675645a..4254bfb5efb59 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 4fecf80bff22b..820ff1bb536de 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 30586132c3526..86bbea579ae23 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 76e543a9f271b..577f12824716c 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 fa3c90d9ed29e..8428dce2728af 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 00cfb42ddd4fa..3c26907d3d06e 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 0163ee8bceb42..fc4ca3d0e53f6 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 a733013be5f2e..f902fc488882f 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 a3474b2f7dbf1..86a76c1d89c70 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 477e859d0815e..a7a7cc8879e65 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 f8a6cb4a58090..d3b43783ee9c8 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 844962b910a69..26d2fa06dd271 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 b0fcf5bec6a77..d200d23ab28ef 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 3f745fd8204bf..ebf27ca54bc41 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 21f75afb3f746..d7ae8e6d505d5 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 40cb10ced16f5..a26f0cbec7241 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 36290b2d93e64..a5b90008272cf 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 5a15bf0ae71c6..3b9e6feebd7e3 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 964e847392afd..7726343ba6e37 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 16caf68e14fda..d79c719d82647 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 db4ee1128f421..c84226ef313c2 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 2d20b3114426c..78683147f7ba6 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 b56e930158cc1..259ed9586962c 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 1d26030625fc9..091fe37c7a1f7 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 74245e16e7f2b..7aea2f220466c 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 4533c3b10f797..af0f9665f5d06 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 f02b8db4669e0..afefcd9fc2c66 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 abc6d42910fb3..9d33aaf4c36f2 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 dd28aa226b7fc..ac66daa21c7a9 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 4af991cede436..a80ebaf8dd29d 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.nll.stderr b/src/test/ui/in-band-lifetimes/mut_while_borrow.nll.stderr index 3f5dbb850cc71..f96ff9dd4e674 100644 --- a/src/test/ui/in-band-lifetimes/mut_while_borrow.nll.stderr +++ b/src/test/ui/in-band-lifetimes/mut_while_borrow.nll.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 LL | println!("{}", r); | - borrow later used here 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 e710986c7217b..556c15d0edbb4 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 9076bdc946a39..a270dd03926dc 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 932dea5b2a953..c307066be6b46 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 ac5bd5b5a3321..a0a15d3aa8886 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 40f2b7fd2eebd..b6a817e6b1d30 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 1ee223b23f055..33204f1cfce9b 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 2e2a98d1d80a7..b5d78297505d3 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 4c585a958c14b..cd4d8356749a5 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 62a14523fe9ad..6c2b126734b05 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 363c3d0d45853..0b879581ec69e 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 5f02578512712..08cdb8cc6883f 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 3c07085a648f6..067bf44bda8ed 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 42be1411b686a..976b9e36cf8c7 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 9b64fba8b94dd..0faf29f0b3ebd 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 3ed7957d14d98..9e0530de425f8 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 daa18a7e9b1ce..be0db56f03449 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 dba8cc43ff223..857142dff64b7 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 1f63d4c2a48c9..59066e5e7fc7c 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 f1de38efc036f..3bb1cdda24977 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 87fb364954d96..3c14e217aeb8e 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 efbad86c4d31b..28ef5937eaa46 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 0e25592b103c3..603bdc39bdd0c 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 3e1a44f082ee7..5c14fed568f2a 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 63edd04650b21..030dc96c6d646 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 fdbd25070f7f8..ce29951822fd9 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 5d6c70fa30b88..dbe025b7330b0 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 2d7ae1f5cfedc..c7b2ce47489a4 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 8d6948b583c51..cb3faedfedb8b 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 8ee0a40a529c0..bd016466300d7 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 440782b0b1f2b..6c23178c70011 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 43fd0ffb72439..0613be0b3d0fc 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 69f380bdc9c03..047ba341cfc73 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 ac1ad118a7152..544716e89b39d 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 9bd428950179b..89ffd4537a275 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 8128ba22fdeb1..48920813ae10d 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 41613cfa01058..6efbd8e40ef64 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 e486a17bda940..59d4fedcd2b40 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 0eaed9464b41a..9e28a665e30fb 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 c91b15cb3fb33..f12539b47cf44 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 a5c63e9c31d41..b5831e42e399f 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 37ae73685b4f2..ce90b16207f07 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 10db477b8ca7b..6179f9d3fe00f 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 6cd552f86e158..8d7e6c81f4fce 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 d7d51a32414cc..0ab0c7dba0b76 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.nll.stderr b/src/test/ui/issues/issue-11681.nll.stderr index a3c71ffe95a8a..f2f9307667194 100644 --- a/src/test/ui/issues/issue-11681.nll.stderr +++ b/src/test/ui/issues/issue-11681.nll.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return value referencing temporary value --> $DIR/issue-11681.rs:13:10 | -LL | let testValue = &Test; //~ ERROR borrowed value does not live long enough +LL | let testValue = &Test; | ---- temporary value created here LL | return testValue; | ^^^^^^^^^ returns a value referencing data owned by the current function diff --git a/src/test/ui/issues/issue-11681.stderr b/src/test/ui/issues/issue-11681.stderr index 210c6dc5a00b6..f59ddb0764200 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 57a6a999544cf..bfd1647e8bee4 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 5d4467080f149..740c3555e52f0 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 683ad48ff52c0..1c4321f1b4ab0 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.nll.stderr b/src/test/ui/issues/issue-11873.nll.stderr index e5abf07420233..4475bdf147402 100644 --- a/src/test/ui/issues/issue-11873.nll.stderr +++ b/src/test/ui/issues/issue-11873.nll.stderr @@ -5,7 +5,7 @@ LL | let mut f = || v.push(2); | -- - borrow occurs due to use in closure | | | 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 LL | LL | f(); diff --git a/src/test/ui/issues/issue-11873.stderr b/src/test/ui/issues/issue-11873.stderr index 1e44754c707d7..63bb4e7bd042b 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 7b0850581cecc..64694c7a8d0b6 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 6906c7b7920ca..fec9078dc4090 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.nll.stderr b/src/test/ui/issues/issue-12470.nll.stderr index 27878e7718bef..c97e59195ed05 100644 --- a/src/test/ui/issues/issue-12470.nll.stderr +++ b/src/test/ui/issues/issue-12470.nll.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return value referencing local data `*b` --> $DIR/issue-12470.rs:29:5 | -LL | let bb: &B = &*b; //~ ERROR does not live long enough +LL | let bb: &B = &*b; | --- `*b` is borrowed here LL | make_a(bb) | ^^^^^^^^^^ returns a value referencing data owned by the current function diff --git a/src/test/ui/issues/issue-12470.stderr b/src/test/ui/issues/issue-12470.stderr index 59056aaca9022..fadfb75cde646 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 768d11bf899a1..6eaac1b35776f 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 3f1a6bf598de7..bec70a5fb95a2 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 050e753dd1a4c..e036896812ece 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 45cddffef710e..1f50debb07b11 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 0c036f1d0e68b..ccab95878b524 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 5776dedf0a2cf..3eb05f504c23e 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 1ab67d285c0de..739f061236697 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.nll.stderr b/src/test/ui/issues/issue-13497-2.nll.stderr index fb0d606690d04..8ad921027e2e3 100644 --- a/src/test/ui/issues/issue-13497-2.nll.stderr +++ b/src/test/ui/issues/issue-13497-2.nll.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return value referencing local variable `rawLines` --> $DIR/issue-13497-2.rs:3:5 | -LL | rawLines //~ ERROR `rawLines` does not live long enough +LL | rawLines | ^------- | | | _____`rawLines` is borrowed here diff --git a/src/test/ui/issues/issue-13497-2.stderr b/src/test/ui/issues/issue-13497-2.stderr index c91ab789fe8a8..5fde55cce0056 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 eb053c1003e38..b72f0277052b9 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 dd97e0cf04a99..5fef8497cde54 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 9199199d7305a..52b8dc049702a 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 3e711243b4e17..0853f5cffb762 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 6da5da04fb165..b4efd5511c35f 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 bf12480a5d374..3e5e25a9f6d1f 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 e5d0ab0684a0b..c180ed03e540b 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 b8d82aadd482f..4376876ecd694 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 b06a6162712fc..487b061eba133 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 8029318419a62..49ebb2976e8ad 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 a0c0a8fb1f29e..670bd546335f4 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 a7448ad5b88d5..253fec5e57833 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 94e7ac74ff0ce..2fa9fbaa887bc 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 7149444b56685..2d90eb80fc54c 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 904656cb3b1cf..90377c19dee02 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 4a62cea20b8a8..cdab76ca70ba1 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 fc6f26f043997..a8ff2548b73dc 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 23e67bb2de9b7..a047893a168a4 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 7281f6a735569..5df2119c14120 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 00e136cb1ce86..6ae5bd1fc2649 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 bdd0824963809..d7e6069977b4e 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 181a9992c6d82..ba78aa2bc6a50 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 e333e15065111..c993588f55314 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 4c3ffe92cccdc..8973afb806817 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 e1a9f097b226c..5c429d1113df4 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.nll.stderr b/src/test/ui/issues/issue-17385.nll.stderr index 20198f19dd5f5..28c22260c3888 100644 --- a/src/test/ui/issues/issue-17385.nll.stderr +++ b/src/test/ui/issues/issue-17385.nll.stderr @@ -5,7 +5,7 @@ LL | let foo = X(1); | --- move occurs because `foo` has type `X`, which does not implement the `Copy` trait LL | drop(foo); | --- value moved here -LL | match foo { //~ ERROR use of moved value +LL | match foo { LL | X(1) => (), | ^ value used here after move @@ -16,7 +16,7 @@ LL | let e = Enum::Variant2; | - move occurs because `e` has type `Enum`, which does not implement the `Copy` trait LL | drop(e); | - value moved here -LL | match e { //~ ERROR use of moved value +LL | match e { | ^ value used here after move error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-17385.stderr b/src/test/ui/issues/issue-17385.stderr index 5f28a3c2c2785..ee55d862e13d1 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 2bfc85cc7de8f..37274e239ba0b 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.nll.stderr b/src/test/ui/issues/issue-17545.nll.stderr index 527f8df9ccbb8..79a1e09bd7cc6 100644 --- a/src/test/ui/issues/issue-17545.nll.stderr +++ b/src/test/ui/issues/issue-17545.nll.stderr @@ -4,7 +4,7 @@ error[E0716]: temporary value dropped while borrowed LL | pub fn foo<'a, F: Fn(&'a ())>(bar: F) { | -- lifetime `'a` defined here LL | / bar.call(( -LL | | &id(()), //~ ERROR borrowed value does not live long enough +LL | | &id(()), | | ^^^^^^ creates a temporary which is freed while still in use LL | | )); | | -- temporary value is freed at the end of this statement diff --git a/src/test/ui/issues/issue-17545.stderr b/src/test/ui/issues/issue-17545.stderr index 62ec25e1d1a4f..c4acaf2278e6d 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 df693591e7c25..40e7727752b76 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 5025aaca777d5..0b0de8a52590b 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 698bd857a5806..109091c2af0c7 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 ef49dcfeef9f4..15c3e67f7a1a6 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.nll.stderr b/src/test/ui/issues/issue-17718-static-move.nll.stderr index 86e7a18491041..c3e6267d30fff 100644 --- a/src/test/ui/issues/issue-17718-static-move.nll.stderr +++ b/src/test/ui/issues/issue-17718-static-move.nll.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-17718-static-move.stderr b/src/test/ui/issues/issue-17718-static-move.stderr index dd473f0a4c457..064a991e4a3d7 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 c7a76c558ee8b..7ab0fa4d818b0 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 b376757091dd3..28a1be59840a1 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 b4f9745257492..b8fabd3b13f41 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 39e5f8ffc9f99..f185f49b9b922 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 790e8f7c79824..de742e48aea9d 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 e22b2c0719736..61e1e496f7958 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 51c0c757a80c1..b9ae03356e9bc 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.nll.stderr b/src/test/ui/issues/issue-18118.nll.stderr index 1920e1637d149..49798a148dee1 100644 --- a/src/test/ui/issues/issue-18118.nll.stderr +++ b/src/test/ui/issues/issue-18118.nll.stderr @@ -1,7 +1,7 @@ error[E0597]: `p` does not live long enough --> $DIR/issue-18118.rs:4:9 | -LL | &p //~ ERROR `p` does not live long enough +LL | &p | ^^ | | | borrowed value does not live long enough diff --git a/src/test/ui/issues/issue-18118.stderr b/src/test/ui/issues/issue-18118.stderr index 9b21ece341a9f..07fa1f60e063e 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 25b7051a88004..6048344125c5f 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 cf33124bc950a..c8f8ac9296dc0 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 f3e8ab1a31307..a7d0392f7f084 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 02ff6b6d5bff4..090487ee8fdbf 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 96652767a05c3..141fd27be3649 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 8aff0309aa77f..e6afc4c13a912 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 400890348a126..4c224eb2d2430 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 8fa7694dc6c36..22c3470b61ede 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 10b0825c34e1b..fecd689251b32 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.nll.stderr b/src/test/ui/issues/issue-18783.nll.stderr index f49a2d7a2b2fd..047b42578a224 100644 --- a/src/test/ui/issues/issue-18783.nll.stderr +++ b/src/test/ui/issues/issue-18783.nll.stderr @@ -9,7 +9,7 @@ LL | c.push(Box::new(|| y = 0)); | ^^ - second 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 might be used here, when `c` is dropped and runs the destructor for type `std::cell::RefCell>>` @@ -24,7 +24,7 @@ LL | Push::push(&c, Box::new(|| y = 0)); | ^^ - second 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 might be used here, when `c` is dropped and runs the destructor for type `std::cell::RefCell>>` diff --git a/src/test/ui/issues/issue-18783.stderr b/src/test/ui/issues/issue-18783.stderr index 68eb5167ecbdc..f88c42552e334 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 ca717a3c49b81..87528652bd482 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 91182224ad0a6..ac302caecc335 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 fd5e48bde160a..cc1d649d61093 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 9005317736a9a..a43368be58339 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 f2c540b74515c..afef59c52642f 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 1ed1967667448..5e576f11583eb 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 7ba683a6891ba..c85ce0eb3a75e 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 ee5d363c4bd2b..4c6d150229a3e 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 672d78f65e9f7..e271005e74d1d 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 01673630cf189..87e2e899d3f80 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 db746bebbe273..893f4faab0d58 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 522db41241229..143486c8f5ad6 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 544219eb6cfae..1152dec8bad1b 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 9cd6a27c12a28..456aff05750dd 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 7dc4e43fd573d..e67fedc5a9ebc 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 fa7704cf17e3f..b2a05551837ce 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 23f3c58653e50..a2bcc8a8ceaf0 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.nll.stderr b/src/test/ui/issues/issue-21600.nll.stderr index 05837e92cdbc1..21f3774c05646 100644 --- a/src/test/ui/issues/issue-21600.nll.stderr +++ b/src/test/ui/issues/issue-21600.nll.stderr @@ -1,19 +1,19 @@ error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `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()); | ^ cannot borrow as mutable | help: consider changing this to accept closures that implement `FnMut` --> $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[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `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()); | ^^ - mutable borrow occurs due to use of `x` in closure | | | cannot borrow as mutable @@ -24,8 +24,8 @@ 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 | | }); | |_____^ diff --git a/src/test/ui/issues/issue-21600.stderr b/src/test/ui/issues/issue-21600.stderr index ccb75f4cc005c..a20838c6c9b32 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 464a65fa695af..3111d3a47414b 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 d5c48db4500ea..85e59d7bede5f 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 5214ec1ad1638..e9846b848f431 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 c6de479aac042..be4f3dda0cbc7 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 bc4949da6f785..12234293ac995 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 ba7d5f070170d..aff968f3618c1 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 de97b2271b10a..cbff5575ed20e 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 6e2b2357a05de..738123ec4d41b 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 faf31c7bd4af5..c2391a7c0911f 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 ff206e8113e1e..c4b3965592411 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 aa6ffdd2570f4..401086b204435 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 9b7599e1e35de..aab90a9d4403a 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 e3ddd190d4f81..3a10a1ab11ac5 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 db9a6488851a8..38998469e42d0 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 cace9a57507ff..ed843e793beeb 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 82c6ed9c062b0..ed065212c560b 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 472ad199a6393..877cf68b5866c 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 ed422e10c985e..5fa82f8b78635 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 b6d44ceec9d75..5b77baed73c3d 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 b3ca736622a2a..a7d643987f710 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 999ac0d5570e3..647048c7c2012 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.nll.stderr b/src/test/ui/issues/issue-24267-flow-exit.nll.stderr index 52e637a3f0b0b..3b4f27621f696 100644 --- a/src/test/ui/issues/issue-24267-flow-exit.nll.stderr +++ b/src/test/ui/issues/issue-24267-flow-exit.nll.stderr @@ -1,13 +1,13 @@ error[E0381]: borrow 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]: borrow 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-24267-flow-exit.stderr b/src/test/ui/issues/issue-24267-flow-exit.stderr index 0d226e01809be..2b9e2ee9011e5 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 b42854387518e..def373cf2c0a8 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 835706d015b5c..a315ca8b08f59 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.nll.stderr b/src/test/ui/issues/issue-24357.nll.stderr index 310535434cd08..a9c43a8f0d915 100644 --- a/src/test/ui/issues/issue-24357.nll.stderr +++ b/src/test/ui/issues/issue-24357.nll.stderr @@ -7,7 +7,7 @@ LL | let f = move || { let y = x; }; | ------- - variable moved due to use in closure | | | 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-24357.stderr b/src/test/ui/issues/issue-24357.stderr index 3bc84cba0f53f..ced24ffc5edd2 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 ff02887a15392..3399856d3f9a7 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 7d02f117f9f55..f9eead8a4f213 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 f6d03f6c18fdc..e1943bf4d6837 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 8793475e6d4ed..435ab13edada5 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 2e6a02e7389a7..3ad6a2569be45 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 aae62b688d4a7..38dc9ef103519 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 9e9ab4e39d34c..9b04148313256 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.nll.stderr b/src/test/ui/issues/issue-25700.nll.stderr index ba5403cca4d06..fa309a55c3c22 100644 --- a/src/test/ui/issues/issue-25700.nll.stderr +++ b/src/test/ui/issues/issue-25700.nll.stderr @@ -5,7 +5,7 @@ LL | let t = S::<()>(None); | - move occurs because `t` has type `S<()>`, which does not implement the `Copy` trait LL | drop(t); | - value moved here -LL | drop(t); //~ ERROR use of moved value +LL | drop(t); | ^ value used here after move error: aborting due to previous error diff --git a/src/test/ui/issues/issue-25700.stderr b/src/test/ui/issues/issue-25700.stderr index d4cf89d0abd5f..4a203c7c25783 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.nll.stderr b/src/test/ui/issues/issue-2590.nll.stderr index 1252578419a80..e19e83dc747e5 100644 --- a/src/test/ui/issues/issue-2590.nll.stderr +++ b/src/test/ui/issues/issue-2590.nll.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-2590.stderr b/src/test/ui/issues/issue-2590.stderr index f93b5db3adfbc..c50652d32841e 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 868ffd191cba7..3a4dd79e81053 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 8c261d2a3f3eb..245ebeaf972ed 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 ff197eeeb0fe9..7c1789cc1e993 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 70dacb353fe07..fa7f922707ab9 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 93b4d7e36e817..10dbb73258599 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 b343924bb0245..ab95433228037 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 bcefb29c18b05..cce7d24a5f602 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 b95c298b6e679..f7227c3410146 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 023f90eb9fea3..bc44c1a4ac571 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 634a31a89d557..05b213b293cbf 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 fbddd3be9dcea..43f78ccf6395a 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 900bc43bfc8ad..0e1b90e65209b 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 91a8297256435..0f918d3b6f702 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 5b967b31c29e6..b9189480048d8 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 b51ff611dbd77..4c1dfb8501a91 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 6aabf65351200..7f5e47aa84fbe 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 8288a1d9bb78f..92b598252bf7b 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 d9466405dd2aa..71ed7d70b5b81 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 b04715f23f49e..cf6174ba857be 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 36cb47944f234..7ee0cd4867073 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 833493e5cda5e..aeb25ce12867e 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 d9cdccac9fca3..5f0f202c0b27b 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 1eb1c67d106cf..68be37252cb5e 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 c6d850925ec64..3b42186b25138 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 e0215157b3690..50c257ad6f17c 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 b277753608a16..092014281546f 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 6c1eeb9c0dc81..87d3632ee42e2 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 e63ee42d99c0a..428634828f9be 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 68cb283e453d5..c316780d5f6a5 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 fb069e8ff9893..87e770e1543d5 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 b62482add304a..57ca572154484 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 375da43c1973e..72289c5f9c344 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 5eadf7837c7d0..cef30acd6023e 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 ffefab19725fb..39e6e8c43e944 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 38c5bd2b94af7..d5b015eec3509 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 e60babd9559e2..64cbd58d69547 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 5613a18f404a0..e0dd4794db59a 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 bc538abf3bdf0..8b683b4af65cd 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 193a8c4916c66..d762d6f2b3d5e 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 8638c19652407..210da2ceff9bb 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 94aca7f031999..89f8e623dc471 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 b99801dad81d5..49208ed696ae3 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 71c2ed9dfc935..a003e27f055e8 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 b93ed8d9c2aa5..e3692934b62ad 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 27fa9e16bf24f..5225f190f9ed4 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 17ba4051fb4e7..4b88547a1aff4 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 44f16c708e0fa..138d6df679fc4 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 fee58474031e9..c5a7fa7e0eb83 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 93119d377441f..6f2e0e760d7f6 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 d3da944cb5331..d6e0a799921f1 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 cc49325805e36..3ba8b189da670 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 a650d3caa6407..32ee2e1d20736 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 76f245a22cf89..d5f8cc8f83904 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 09300ffc78793..5daf900c31ff4 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 6f3b37a8a3fa1..da2af83ff03c3 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 7e5e5673bafc6..29fcefc08037a 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 67e2f2bf2ecf7..76e68b0b3524d 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 7ee1a41a3870d..10cb398cb24f1 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 bb2cc7c101b77..b5a120c4b9cee 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 e6526bad3e0d3..9c2585688e96a 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 0f56e94bd196c..5967627e51a4b 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 9e115143fbd2a..96684309a008d 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 ae0cf49a79110..7b3c8e75beb24 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 9161e64ef0a8a..9127c7546582a 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 5d583ee843f66..886f5297156f5 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 c7f0eb1a43290..430cc0fda26da 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 13aed4a1756b3..3cdf35af1d866 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 e2631e971c516..43065a2e2d486 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 8e4a14fb4fae8..6593e07b18973 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 716aa8a863292..7af555eaa2ce4 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 2c97a39a183f8..584b903c2efcb 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 2fae447c5e8c5..5d83a08e90757 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 43cd7af81d98a..596921e526d96 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 8d552f24cd678..f770ded50d0fd 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 beb6b589766b5..0799656b06bd2 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 9571d04363512..1b0babf939044 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 f0cd8f9488157..d0b51961b44a7 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 07ac421455cf6..f260a8477431b 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 5372996d1cbbe..2aeb6b1522424 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 1e3d24fa514c3..79e889b7e599e 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 022bc7baa34cc..8fda58abadb6e 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 7edee5c41e626..f2065689f444e 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 85b534434342b..fa0fa3345f5ee 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 e8f9a472b07b6..5236db29ae4af 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 c114e58e4d943..94de4c76927a5 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.nll.stderr b/src/test/ui/issues/issue-36400.nll.stderr index e260fab779112..3b37578f3c455 100644 --- a/src/test/ui/issues/issue-36400.nll.stderr +++ b/src/test/ui/issues/issue-36400.nll.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow `*x` as mutable, as `x` is not declared as mutable | LL | let x = Box::new(3); | - help: consider changing this to be 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-36400.stderr b/src/test/ui/issues/issue-36400.stderr index d9394277050de..1494324eea302 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 7685b84bea7bf..296fec46d80a6 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 b08b229384d08..2ec636fde60bf 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 11d24b38061e8..347a19b687fbb 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 39a500cf5653b..1f81264ffdb49 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 436dcbee862a7..05c8ce4c3f11e 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 fa1ee227f0bf2..24b31f43a85aa 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 97160af43bee4..41f33a38fbd07 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 f37b923d5dcfb..cc95d221c5114 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 c3599fab68507..c27494699515b 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 3538cb199c3e0..ba1e842c610ba 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 f791c6df72f2e..9a5f659da1604 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 3b3ce8b39bc94..24543a5efaf13 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 0a36ac7616bb3..b4af9c2d27dbe 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 409670074d9f3..e0b2fe4fe0542 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 541a36233ca26..c04a01118a441 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 30b4d2b53ff30..77b42b80613c3 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 21d96d36e2741..34e08bfc93aaf 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 ae975ca78c11b..fe932c744bf78 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 8c09436479564..d23a4dfd0a496 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 b9134445455af..ea850ea57d5b6 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 00d6598aeaf2a..e04e16e2a0375 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 082c3a6853a14..e24ffcdb0d990 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 8e46d88018112..2ece4c396067c 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 090bca3a759cf..ce594a3f9bb27 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 ce0c44c147563..c48fb24ea17dc 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.nll.stderr b/src/test/ui/issues/issue-40288.nll.stderr index bb4110948d54f..fb4ecab362db1 100644 --- a/src/test/ui/issues/issue-40288.nll.stderr +++ b/src/test/ui/issues/issue-40288.nll.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 ... LL | println!("{:?}", out[0]); diff --git a/src/test/ui/issues/issue-40288.stderr b/src/test/ui/issues/issue-40288.stderr index 2ac5964f5da7f..5e8ad323ccb0a 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.nll.stderr b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.nll.stderr index a4847568ba0cb..fbfbc0cb9777d 100644 --- a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.nll.stderr +++ b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.nll.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of borrowed 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 borrowed content 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 87b98bbcedb6a..5e7be1a31012a 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.nll.stderr b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.nll.stderr index 5c23021ee2c87..0c4a85b590162 100644 --- a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.nll.stderr +++ b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.nll.stderr @@ -1,7 +1,7 @@ error[E0507]: cannot move out of borrowed 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 borrowed content @@ -12,7 +12,7 @@ LL | let (a, b) = x[0]; //~ ERROR cannot move out of indexed content note: move occurs because these variables have types that don't implement the `Copy` trait --> $DIR/issue-40402-2.rs:5:10 | -LL | let (a, b) = x[0]; //~ ERROR cannot move out of indexed content +LL | let (a, b) = x[0]; | ^ ^ error: aborting due to previous error 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 d64cd96e959ff..b672029f717f7 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 03f051adc6e32..fdc57466f3cac 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 a8d75025279de..a8be38ebf0657 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 05e930de27af8..9ccfc9a001605 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 b144387ac44bc..5e102dcbf4115 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.nll.stderr b/src/test/ui/issues/issue-41726.nll.stderr index 087f557a0d4fc..c92753d6e3dbf 100644 --- a/src/test/ui/issues/issue-41726.nll.stderr +++ b/src/test/ui/issues/issue-41726.nll.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow data in a `&` reference 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-41726.stderr b/src/test/ui/issues/issue-41726.stderr index e6b92dc9dfeaf..e29c163b81778 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 03a9710f67975..f205abf55768c 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 1806f68f14aee..e06873b50265d 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 68712e0f0549c..54fa48e8bb264 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 4f8ec96d53151..d436c929a729e 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 cad2bb2a67be5..6f42c86e84aab 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.nll.stderr b/src/test/ui/issues/issue-42106.nll.stderr index 3a31e439c078a..d5a9d233bc969 100644 --- a/src/test/ui/issues/issue-42106.nll.stderr +++ b/src/test/ui/issues/issue-42106.nll.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `*collection` as mutable because it is also borrowed | 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(); | -- immutable borrow later used here diff --git a/src/test/ui/issues/issue-42106.stderr b/src/test/ui/issues/issue-42106.stderr index e1018a89d2091..9e3ce9878c225 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.nll.stderr b/src/test/ui/issues/issue-42344.nll.stderr index 9770d26fb12d8..5cffa1b51219f 100644 --- a/src/test/ui/issues/issue-42344.nll.stderr +++ b/src/test/ui/issues/issue-42344.nll.stderr @@ -1,7 +1,7 @@ error[E0596]: cannot borrow `*TAB[_]` as mutable, as `TAB` is an immutable static item --> $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(); | ^^^^^^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/issues/issue-42344.stderr b/src/test/ui/issues/issue-42344.stderr index cb0fe78d10205..6bf26c2cf5c5a 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 b5fce14914d65..4faf5d3a92302 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 4b490f8e87f9c..12047e22f1b02 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.nll.stderr b/src/test/ui/issues/issue-42796.nll.stderr index 23cc88bab52d5..d9dfbc999f360 100644 --- a/src/test/ui/issues/issue-42796.nll.stderr +++ b/src/test/ui/issues/issue-42796.nll.stderr @@ -6,7 +6,7 @@ LL | let s = "Hello!".to_owned(); LL | let mut s_copy = s; | - value moved here ... -LL | println!("{}", s); //~ ERROR use of moved value +LL | println!("{}", s); | ^ value borrowed here after move 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 530eedd68e6a1..d180e6478ef19 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 36b9e8a1e8afa..8a40a49c0def5 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 6a89724de5f70..8c35088a1bbeb 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 b620cc5d74e8b..206a51645fe68 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 3fc5317830e48..d3ff9002b9676 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 731e63fbb2b04..afb4fe775d58c 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 bd51d7e116953..7a3722e4bd727 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 c81ea20170c71..6274a7928ba04 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 8cf0e3bd520d5..76f08d77232cd 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 2bad7b17d642e..c59ab00455709 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 38fa93d446188..c48f9baf27194 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 4beb854b0f319..fc05d280693b8 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 7771f9abfb8af..4c423f2e77fe8 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 e73c2122a03fc..739ace10aa6ab 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 9dc9cfe5db2ac..d9d6b3a34fe2e 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 03f11312d4655..94500087e5536 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 f1962a86ee03a..153be363c1dea 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 e7f46130f112f..43b49e463128f 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.nll.stderr b/src/test/ui/issues/issue-44373.nll.stderr index 8359e5af2b8de..6f92fbb1eb689 100644 --- a/src/test/ui/issues/issue-44373.nll.stderr +++ b/src/test/ui/issues/issue-44373.nll.stderr @@ -1,7 +1,7 @@ error[E0716]: temporary value dropped while borrowed --> $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]; | ----------------------- ^^^^^^ creates a temporary which is freed while still in use | | | type annotation requires that borrow lasts for `'static` diff --git a/src/test/ui/issues/issue-44373.stderr b/src/test/ui/issues/issue-44373.stderr index 5a4bf18f3d5aa..c529558339047 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 105dbb677dc02..14b3b8cc5c85d 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 3510112daf0a5..71fbba562cae1 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 3b15a8dbd9ef8..fbfa1d199566e 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 afea28fb7aaf8..bc14d20b62388 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 4f2784c6c362b..3c400d6eefaa8 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 40a77f925b94e..9c1746e0fa1ee 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 8ceb1d62c25c7..d72d6477db649 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 c670459c78166..c1fad44b885f1 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 3c9c679ece437..76c86d7aa907d 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 d02561e4a2727..c252f0d0758cb 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 39c649ba3e0e7..b4ac12643bcac 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 eb160ff86aec9..53968a2960ccd 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 c30fedeea73d8..db9f227d6b776 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 6e454173f8bc0..adc36e266c271 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 e2f549ac4256c..99a9bf9903e25 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 2635520ef0786..9a6da9e625da4 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 32eea5e5fbb8f..3007d67336b50 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 12e78e2f3bc95..de78b8d3c14af 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 a25d8ee352686..b41d9130f122d 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 0bccfbbf7e5a2..43a505cfe85f8 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 42869ab483180..a99581fdca18f 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 30664c90ce811..b1947e2a9dfff 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.nll.stderr b/src/test/ui/issues/issue-49824.nll.stderr index 4e2f3f59a6445..bfa07059c6859 100644 --- a/src/test/ui/issues/issue-49824.nll.stderr +++ b/src/test/ui/issues/issue-49824.nll.stderr @@ -17,7 +17,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-49824.stderr b/src/test/ui/issues/issue-49824.stderr index f487c363ea674..4ad537f3eb5d8 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 295f4f1b559a7..6ca751a47c47d 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 f84d9d7769daf..d20a98ecc6ad5 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 240a0f2228648..fb111e87d185c 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 98624d141a616..22d978262c469 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 70ac9ecc9edf5..01a5f9b3c4432 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 cf2f309340de7..e0c9bea4023d1 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 36219390c519e..2d97c2781c2d1 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 2a1315c9a015d..13eec8361ba8a 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 e5fdd18d3328e..427b200adf431 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 d7631adc7b26f..e048f39260c5c 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 11de59f9f0095..c98f78c51ee5f 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 9a2ae79429397..e064fabccd045 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 d103c968979a1..cc11db9c5eca6 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 0a918a789703e..0c1a0289cf27a 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 4c1870eb8c9f3..8501ae6a1d029 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.nll.stderr b/src/test/ui/issues/issue-51244.nll.stderr index 7a4935fafc6e9..c91083955b820 100644 --- a/src/test/ui/issues/issue-51244.nll.stderr +++ b/src/test/ui/issues/issue-51244.nll.stderr @@ -3,7 +3,7 @@ error[E0594]: cannot assign to `*my_ref` which is behind a `&` reference | LL | let ref my_ref @ _ = 0; | -------------- help: consider changing this to be a mutable reference: `ref mut my_ref @ _` -LL | *my_ref = 0; //~ ERROR cannot assign to immutable borrowed content `*my_ref` [E0594] +LL | *my_ref = 0; | ^^^^^^^^^^^ `my_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/issues/issue-51244.stderr b/src/test/ui/issues/issue-51244.stderr index a5b06aa228290..f798b5f1fce20 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 1bb6f3c1f1fff..31faaab6141c5 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 38c380c4bab80..9b1a6bf2e12d6 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 f687be5edb091..60e0792954ae5 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 5afea5873d568..ccfe7e04a2cf9 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 4d3346f325ddf..8d74b8ecb881e 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 65b2b9460bc94..1385693e91ae0 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 d4ee94aa411b7..e39a1cb20cff3 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 847bc7695807b..bd0cb670bc210 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 876fb4391b1bc..1334f249256d6 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 b21b35849b172..1d2ff7669c093 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 b8211691f7be6..522b201ec78cd 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 4ef884cb3f589..57b206d7bff69 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 876151fb25cb4..ed5a3dc6b1e1e 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 ad463d4c478ca..7753881f73684 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 55a9e9d5cb863..b760fd6768afb 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 189eefe51b914..6b0a2b7b935e9 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 a60987b3f98ba..cb1b5146b6c88 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 c087292e978c2..90b493e1634c4 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 a99d9b3cd77c3..6668108d0245e 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.nll.stderr b/src/test/ui/issues/issue-6801.nll.stderr index 2c0fedf351a23..dbb8e6530c053 100644 --- a/src/test/ui/issues/issue-6801.nll.stderr +++ b/src/test/ui/issues/issue-6801.nll.stderr @@ -6,7 +6,7 @@ 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 LL | invoke(sq); | -- borrow later used here diff --git a/src/test/ui/issues/issue-6801.stderr b/src/test/ui/issues/issue-6801.stderr index fa0e1928ba4bd..482e4873f3a7c 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 965148d478e00..1c251ed8445ff 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 b3fe1ddc48348..9292d60ca68f7 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 46c5d164e42c7..2ad67ec23be87 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 5b8652597d3f7..e049295e9136f 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 aa0a6c761bf07..9320943a82766 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 da5fc6357a66a..45b9c915885b4 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 800b0277c9ac8..4389c3dc288f6 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 a042dce1ac1d0..e59aea12cda20 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 80280f8c53589..91d99f393b61a 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 fe105a9c3cef3..bd9e7df4991ba 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 1fe49f8fb14a6..9695e1e3c07f5 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 150fc88e7efc2..8bb89d2ee215e 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 426b4eef0569c..d7b9ad2abe97a 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 97b641fbea557..447c76a5bbceb 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 31b575a92e0c8..4b833f8068195 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 6c8dffa7e22c6..9544604599835 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 6ea19620a6609..be57c6ad26fd8 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 b0973bd170e58..bbeaed9428795 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 5ec33ae30a698..63394c7852a5d 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 e5d3938e54ac2..36b1d882a347f 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 65c06b8308c9b..2680cb7c012f1 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 fe8e02e354776..1b7f9cd551734 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 52ab547aa7bb0..1d3251d1b5f45 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 a4925c8619edc..4558ec4cb41f6 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 c0decc8255244..bd1dd5938988b 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 889df17de44d5..0b9754c3c70e3 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 1d6e27d4c3d0f..0c4f573d27db5 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 51313033a02dd..fb823ebde2edb 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/borrowck-let-suggestion.nll.stderr b/src/test/ui/lifetimes/borrowck-let-suggestion.nll.stderr index d70524b2387fd..0e2fc0a0fe97e 100644 --- a/src/test/ui/lifetimes/borrowck-let-suggestion.nll.stderr +++ b/src/test/ui/lifetimes/borrowck-let-suggestion.nll.stderr @@ -5,7 +5,7 @@ LL | let mut x = vec![1].iter(); | ^^^^^^^ - temporary value is freed at the end of this statement | | | creates a temporary which is freed while still in use -LL | //~^ ERROR borrowed value does not live long enough +LL | LL | x.use_mut(); | - borrow later used here | 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 a283a0b29e6c4..1af4bd501ba49 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 d4ca1aec6978b..90bec01df63ea 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 cf825c52f569e..3f7c3934a0ba2 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 6211a9a114176..63d00875dd330 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 9fe1679936d87..64aa8361cd5ea 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 94ec5248eb00e..b40481ecdc401 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 4be638bf4c210..194fd95891eb0 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 d61271b81ac1d..64f4bd0fc7061 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 15642be44b7ed..f764ec43ad1cd 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 1eaa9c8339f7a..e9f5fc311dfc2 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 d48adf1680806..29a70695710f7 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 f4b2efa8438c6..0d506f2b9fcb4 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 328c69bb65868..98a23613c3635 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 9fc1124685c59..a4e0d71a3fa6b 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 3df29e62a283b..412cac4356368 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 0fd085c39f282..30826c3613c58 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 a669e33ab098e..13d0835287d04 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 7ac61df495486..e505c9c0dc262 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 bfa9c0d15f0f9..63b1c6db28f14 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 2db81f8aba6e8..2f669efcf1eb4 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 85a6dba928932..258b6805acd5c 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 b8f97d145772b..0aff80c6fbdd3 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 acfe809b6785b..2e5ff6782d3b6 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 cb1ca5e1485b0..8e41d7c54e68d 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 863ec9806fca1..da83ebc984c4c 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 57174385b4dd8..374bbd93d0874 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 caa7397979bce..94798d1ce2ab6 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 27d5f5da7e537..9f5a79ed333dc 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 97da7f8ac6df8..2c87f8dbd2c2b 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 8c4e3daed4cae..60b92ed2b3247 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 b443707bbae4c..a220c8ddb2be6 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 77d43cd17c8fd..73472a8d02252 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 eef3aa50e0f2e..eb6e6f2e95e78 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 917b90fd47f90..199f880b3c487 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 a2ba41ef4f09a..838f43b37747f 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 43e54d640859d..d2cc3dba6a433 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 39896a3c8a059..e8b0208f092f7 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 46eca5ea64f6c..5ad85c97e72d8 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 07d6cafd63395..b2784827672b8 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 f66bd3b35f789..e15290f0b9ee9 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 912befff01cc0..ba8ceb80fe0f0 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 3250a41ee0ecd..04c3f6f263790 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 39f6da400c493..736782140639a 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 fd55ffbdf4374..3cf321b072f40 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 2c95831f3759f..6eb72c098df5c 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 7d7a066613ace..c4b8ab5fc1858 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 dd33cc77458d7..92f76cfc38a72 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 51211c8763179..67ba30a81c502 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 6d0295002f1ca..be96c697d9944 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 d17149104dbaa..1226f9823ac54 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 72bcac22de8cb..2408da0af89ea 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 62de048d5e919..b7ceee99998d7 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 e6c2354783a21..740cfde2c069f 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 a4d4727be7ca4..4198ddfb6cb03 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 b9465e73b0d79..a79432dc68d6a 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 170b98a12a848..020591ccff74d 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 be739eb41bd34..f9f168c14dee3 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 0adcde02acb7b..8a6d2a89c7063 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 35539f0e87770..bece4775abb93 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 ab36cda57ec80..a365204f12adf 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 b0a3f61978435..2c9a264287c96 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 98a7cecc2bb2d..f5b9e2b0a0f6d 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 2a28d54619c6d..1419f858f8e78 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 30da3ac879ea8..7b6674e71bf19 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 ea5a14bca7cf3..3532c9315d8dc 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 7afacf64d8778..432a16debc698 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 970666ebcfdc3..d638626495ace 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 651132e49d914..847c43e1b04e4 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 f5bba5f145de4..8b477276efc93 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 c71bde54acfbc..c06bd26df2b96 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 4dcd8c2316439..21b12301e2c7a 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 572b82b3366ba..c61b3d31558cb 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 953ff0f5f652d..78f7e32a30cd1 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 f796a14d63796..32af7389b6c7e 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 55f010348fe1e..cde494f22f091 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 b2eeeae8f8e6d..383a800b54a86 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 b140a93ab38bd..2174b22ffb9db 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 32c69fdddcbf4..366ab55d7d4df 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 4142ce5af7932..808c16c95a498 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 a1748ac59fb45..811004ee12ccb 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 93f8075b2b273..e80e745922de6 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 03c42e59c679a..dd7f7182530b9 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 14ef953d294e0..71a2b3bfda8c4 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 f88fff62e21fc..e7bc407422a12 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 4f47a7ce31665..742b6695c24f2 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 987ee8a640c9c..9da007457aa83 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 5f63ce49680b3..5255f6c75934d 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 50daa537591b3..5d2e8201b142d 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 f6a1087635afd..586ee8ed411c0 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 435b03b1f658d..9817760c2247a 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 976c88c11d0c9..b3ba6e31bc1ea 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 40e7ab4dd1392..41e274bc54508 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 c14ebb6be9761..fe2ee38eb42a3 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 e2dd45e2c8a31..96ad0c33691db 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 46499515fa751..aa4a8dad24c94 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 18f2fae0067eb..f9a54f477f998 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 62be0c8f159c6..b5f6b717dc39c 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 a90cc964a84dd..e41d8f8ac7408 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 f2267f351ddda..40c13231c1823 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 8287ca5692bd9..3fc3c2281f2e3 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 94f5f4f40d2d5..7e2b2f67964ac 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 ee61c2d1dbc52..f6229c0442f99 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 57ad55a37f050..310a5d88f8c1c 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 1e4eabc9db0f7..c28814aeee8f9 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 12838cec02478..bf476a45f772c 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 349d0be016497..5235c9851b53f 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 39d0a7850efad..08f8548e0493d 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 3133efdedd762..e8f185a5cb27c 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 c89135e5135f0..d054b1d497e5b 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 e91994d9a2299..780a2548f1f86 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 58d0249ee3b24..ab7d411880bba 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.nll.stderr b/src/test/ui/liveness/liveness-move-call-arg.nll.stderr index 521304d560554..ab4460a32684f 100644 --- a/src/test/ui/liveness/liveness-move-call-arg.nll.stderr +++ b/src/test/ui/liveness/liveness-move-call-arg.nll.stderr @@ -4,7 +4,7 @@ error[E0382]: use of moved value: `x` LL | let x: Box = box 25; | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait LL | loop { -LL | take(x); //~ ERROR use of moved value: `x` +LL | take(x); | ^ value moved here, in previous iteration of loop error: aborting due to previous error diff --git a/src/test/ui/liveness/liveness-move-call-arg.stderr b/src/test/ui/liveness/liveness-move-call-arg.stderr index 21d285463e384..c50c01e2a9e61 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.nll.stderr b/src/test/ui/liveness/liveness-move-in-loop.nll.stderr index b7e973bc9140d..150c1ec82b83d 100644 --- a/src/test/ui/liveness/liveness-move-in-loop.nll.stderr +++ b/src/test/ui/liveness/liveness-move-in-loop.nll.stderr @@ -4,7 +4,7 @@ error[E0382]: use of moved value: `y` LL | let y: Box = box 42; | - move occurs because `y` has type `std::boxed::Box`, which does not implement the `Copy` trait ... -LL | x = y; //~ ERROR use of moved value +LL | x = y; | ^ value moved here, in previous iteration of loop error: aborting due to previous error diff --git a/src/test/ui/liveness/liveness-move-in-loop.stderr b/src/test/ui/liveness/liveness-move-in-loop.stderr index d00c2d6ac35ec..52e83a6a68f2c 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.nll.stderr b/src/test/ui/liveness/liveness-move-in-while.nll.stderr index 167dcc6b64372..e1eed1b59f470 100644 --- a/src/test/ui/liveness/liveness-move-in-while.nll.stderr +++ b/src/test/ui/liveness/liveness-move-in-while.nll.stderr @@ -4,7 +4,7 @@ error[E0382]: borrow of moved value: `y` LL | let y: Box = box 42; | - move occurs because `y` has type `std::boxed::Box`, which does not implement the `Copy` trait ... -LL | println!("{}", y); //~ ERROR use of moved value: `y` +LL | println!("{}", y); | ^ value borrowed here after move LL | while true { while true { while true { x = y; x.clone(); } } } | - value moved here, in previous iteration of loop diff --git a/src/test/ui/liveness/liveness-move-in-while.stderr b/src/test/ui/liveness/liveness-move-in-while.stderr index 91f722cb42288..61b4cd8c630e9 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 c6d166d8b31a0..a5d9734c069ec 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 49795faa59c8d..d6077111f71b4 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.nll.stderr b/src/test/ui/liveness/liveness-use-after-move.nll.stderr index 36c25882ccd4f..383b89afaa75e 100644 --- a/src/test/ui/liveness/liveness-use-after-move.nll.stderr +++ b/src/test/ui/liveness/liveness-use-after-move.nll.stderr @@ -5,7 +5,7 @@ LL | let x: Box<_> = box 5; | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait LL | let y = x; | - value moved here -LL | println!("{}", *x); //~ ERROR use of moved value: `*x` +LL | println!("{}", *x); | ^^ value borrowed here after move error: aborting due to previous error diff --git a/src/test/ui/liveness/liveness-use-after-move.stderr b/src/test/ui/liveness/liveness-use-after-move.stderr index 62475943d0e3d..ce192ae05f012 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.nll.stderr b/src/test/ui/liveness/liveness-use-after-send.nll.stderr index d9367c871165a..ccf9499f64407 100644 --- a/src/test/ui/liveness/liveness-use-after-send.nll.stderr +++ b/src/test/ui/liveness/liveness-use-after-send.nll.stderr @@ -5,7 +5,7 @@ LL | fn test00_start(ch: Chan>, message: Box, _count: Box`, which does not implement the `Copy` trait LL | send(ch, message); | ------- value moved here -LL | println!("{}", message); //~ ERROR use of moved value: `message` +LL | println!("{}", message); | ^^^^^^^ value borrowed here after move error: aborting due to previous error diff --git a/src/test/ui/liveness/liveness-use-after-send.stderr b/src/test/ui/liveness/liveness-use-after-send.stderr index 1fdb1d3ec39bc..28173285fb457 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 f5c6544a815ab..066dce531a54f 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 3e009c007e08d..8823eecab6465 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 5cfd86ea50478..ad7cb4b0c2e5f 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.nll.stderr b/src/test/ui/loops/loop-proper-liveness.nll.stderr index 745f0876b404d..c87720659fd78 100644 --- a/src/test/ui/loops/loop-proper-liveness.nll.stderr +++ b/src/test/ui/loops/loop-proper-liveness.nll.stderr @@ -1,7 +1,7 @@ error[E0381]: borrow 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-proper-liveness.stderr b/src/test/ui/loops/loop-proper-liveness.stderr index b8fb3fe00ee54..392b961fa0759 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 5bd088fa0114c..6293fdb058a0f 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 4d1a29f71658c..fc42449aa58bc 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 f9a19ad57f04f..4574c5ca0bd51 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 8f228ea4cad41..475c1801ca129 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 056f9131dd21c..e02ede399e6af 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 2cf12ba60414d..26f756c91833b 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 0db27f91717b0..0cb0a23c6f2df 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 2785594585dd8..d9a0a9f005432 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 2cfcebabcb931..fa604506b9464 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 a7aca88f3e56e..0fdb62922a751 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 0b8bfcbdc17ba..87cadada3c782 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 a3d2786bce111..b634cf2d9944c 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 0a5e379a4adb4..7423c7b7c8b47 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 94664c96db391..c43bf83fe1912 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 e27056b412a0f..b0fafdc3b6326 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 cb0a9163b7470..e78f2833078cc 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 b171cf8b34df7..bf1861ae54052 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 657c7e54d9768..f285c7cc7c279 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 7314e48334893..aa1cd94b0c638 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 353ae1d0ea698..11a4b44eff10a 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 61a11231efef5..501f525a05f77 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 c24a88c4159fd..573184b63b1ed 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 a4bb8a9b32fb2..28d064f7f5bd2 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 9a4a8e31985fb..2a0779190f573 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 a1af9ba175845..1eca0186da955 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 f56b67e7cd06a..b3aed8c2cef24 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 e3302eac4ac08..d3f081bb4a28f 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 18403fd248d84..7097979aeddf3 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 fa39fc6a2125f..a35f6283afb2e 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 15eafbde0a23d..1de8c5bd4b472 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 63cf1826f7721..e7c37c8ddbebd 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 8c4026760ca1c..b7871c0ec3a6f 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 bc78b471a2d1e..41e9a3286aefb 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 5af9828fd9820..a8930f243f8fa 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 f9413250076b2..838333b95c0d5 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 c7dcb12d3d109..24e3e89ea9bf3 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 4bf51bd893a88..551d2fe8ce041 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 6b1a5b3741a3b..9574b7a1e25f1 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 1772325118174..7eeddb885479a 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 e354f345a4c2f..f08445e1f775e 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 9c0214346a6a0..e7b381daf9346 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 6cfec3ee762dd..302952909beba 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 c297f0ef52d77..033e12a31ae00 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 e5c535a08e1c3..a0e0c351a4834 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 1eb8cc3f4c493..f403c8a366084 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 7ed6b26b1b778..93617edeeaea4 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 4d9fa3aeb137d..85b86e2211f2d 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 2f0e67c1ba8a0..48c33575ad2a9 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 b9a76e07a007b..b516f91c67d1b 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 ce7035ee27461..8a8455c262b4c 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 31b0a27bbc8da..23933f730aae9 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 47874b8097278..623b5745a357d 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 f2a191ae149c0..5fba8002e1c48 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 9d61799713b04..8378286bdadf5 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 398a7660d3093..d147debeb51b8 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 a645590f005ad..233d3dcfcb6db 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 24aa590c4d903..efeede0148dac 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 f42e66e2b32f3..cc0ac182d7064 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 923cbc188607e..617b13b2654f8 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 6f19a11714901..5739770ad98b4 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 a3b2bda07f625..9a81c1056ca90 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 1653aa150d578..8c23424087c04 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 ab09bc10b86f0..adf64b089350d 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 b88c125d968db..d30b990caac2b 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 4579ec261164a..f4a52a65af6aa 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 83dbecfcac657..d53e2e25b3dbd 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 a23f185366664..b28646b50cf01 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 116d26ac71210..83fae10d4cb4e 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 6e08c92bedb54..27a82c1242cc7 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 bd136245c1ae9..65dcc6ee46554 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 9921e4f63b641..00c2bfff7eb45 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 faefd9f212904..c4bfa0afcc278 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 61552b44c2757..30bbb8d7800f9 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 26ec0697f410e..6ca222d9c2ffc 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 014581ea4bd05..902ccc94dde23 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 53b6635136966..da599c3740740 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 db8bef8dc7755..a318e6cffb937 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 b013933eaae6a..ad8569b4802fb 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 f4b426bea325c..ae2dd87b6954b 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 93a407760a517..e19a0f956ce3a 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 71e3d8c5e31cd..415c24ae77ef5 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 58f5b790c097c..20446c257df09 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 53a07f5196e4b..9e5f2ee4ce5fb 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 15379194777c9..2b87ddfdf98e5 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 a805ca3ca56b2..6c493c67e29d9 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 cbb1754935a97..5d508d5702258 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 2113add63d61d..0e901a98348b2 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 25432177a8598..67fd8d7a13eb1 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 27d6f93490bb8..4b93082ace575 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 2d8449b96de41..3c2e9b0176716 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 81098bbceb052..7860365476a31 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 886d92aa9253d..3ab5f66a0c3f6 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 8c80d01b18cb9..8485a5403ff85 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.nll.stderr b/src/test/ui/methods/method-self-arg-2.nll.stderr index 8cfecdba41c0a..82092dd4c0f82 100644 --- a/src/test/ui/methods/method-self-arg-2.nll.stderr +++ b/src/test/ui/methods/method-self-arg-2.nll.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 | y.use_mut(); | - mutable borrow later used here @@ -13,7 +13,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(); | - first borrow later used here diff --git a/src/test/ui/methods/method-self-arg-2.stderr b/src/test/ui/methods/method-self-arg-2.stderr index 9746ac316d92f..56cc8c83fe14b 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 93debd6c15d5a..6bc5f7dcb99fc 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 7ee61e6be2c8c..38a9c60b168d1 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 21ad0b3c2c16e..c60987050e638 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 08959ce3b1329..de3e58e52de41 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 59e8c0bf09029..6e5dac226692a 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 08f132efd0526..93115bfb998e4 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 df320a2059b85..f2bc6e1692f74 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 6a5cf7db4eed9..b7f3b3dde8a93 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 76ea0ab54c3dc..9dda44a85686f 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 76091f2d09ed4..c30f0acaa57d6 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 5dd6887005e83..cf392e1731b0f 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 e55047e96c297..6fbc922561251 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 e1482d7c45079..ec1f36bf08774 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 25203d6f35d28..3c8ba8057c55a 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 11aa6cd7c1ba8..ef7a8d385374a 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 6a3e7d930cf29..f030670161343 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 f702a4f47f10c..d16869237302c 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 57e95e4133376..1d53cfdd2527c 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 51975abd720fd..3551e4105f8cb 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 a9b637c81a78f..6475cce5aa62f 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 4e54b35029a5f..8ea3567b948ce 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 8db81a8c6835c..ad0eefa27a10c 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 576a6268a99df..ee86a3241e822 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 e3e61bcb391eb..9b8c0c583a1c1 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 9e4ce7c81b70e..8e5286f210013 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 b2245750518b1..d2dac4ca6454a 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 619377198e1fc..dbb467d60f9ec 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 50627c3252dd6..b3f3ebc855daa 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 6c81f2bac5788..659f8c78cae6d 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 cceab4b4c0bf8..bb8390a8f313c 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 1720ca420ca29..2b77d866fb30b 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 4dc6df39a4797..2a75736a2c69f 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.nll.stderr b/src/test/ui/moves/move-guard-same-consts.nll.stderr index 43f99cabcae94..0945fbe68a0f2 100644 --- a/src/test/ui/moves/move-guard-same-consts.nll.stderr +++ b/src/test/ui/moves/move-guard-same-consts.nll.stderr @@ -6,7 +6,7 @@ LL | let x: Box<_> = box 1; ... 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 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 78a76a47b8a52..65f6f1239fe68 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.nll.stderr b/src/test/ui/moves/move-in-guard-1.nll.stderr index 41abe6fa72a57..542fd1698637d 100644 --- a/src/test/ui/moves/move-in-guard-1.nll.stderr +++ b/src/test/ui/moves/move-in-guard-1.nll.stderr @@ -6,7 +6,7 @@ LL | let x: Box<_> = box 1; ... 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 error: aborting due to previous error diff --git a/src/test/ui/moves/move-in-guard-1.stderr b/src/test/ui/moves/move-in-guard-1.stderr index d4cb538e05d1c..af49fa82b0f66 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.nll.stderr b/src/test/ui/moves/move-in-guard-2.nll.stderr index 0b14c1620d3cf..8bd405279c526 100644 --- a/src/test/ui/moves/move-in-guard-2.nll.stderr +++ b/src/test/ui/moves/move-in-guard-2.nll.stderr @@ -4,7 +4,7 @@ error[E0382]: use of moved value: `x` LL | let x: Box<_> = box 1; | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait ... -LL | (_, 2) if take(x) => (), //~ ERROR use of moved value: `x` +LL | (_, 2) if take(x) => (), | ^ value moved here, in previous iteration of loop error: aborting due to previous error diff --git a/src/test/ui/moves/move-in-guard-2.stderr b/src/test/ui/moves/move-in-guard-2.stderr index d4e747c9f61d0..5228abe86efbe 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.nll.stderr b/src/test/ui/moves/move-into-dead-array-1.nll.stderr index e3a2a601246d4..33da0e54a1e4c 100644 --- a/src/test/ui/moves/move-into-dead-array-1.nll.stderr +++ b/src/test/ui/moves/move-into-dead-array-1.nll.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-1.stderr b/src/test/ui/moves/move-into-dead-array-1.stderr index 36f98a76b5473..3a1bbe97d288a 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.nll.stderr b/src/test/ui/moves/move-into-dead-array-2.nll.stderr index 20bfdc2bbac72..19e476c04ea07 100644 --- a/src/test/ui/moves/move-into-dead-array-2.nll.stderr +++ b/src/test/ui/moves/move-into-dead-array-2.nll.stderr @@ -5,7 +5,7 @@ LL | fn foo(mut a: [D; 4], i: usize) { | ----- move occurs because `a` has type `[D; 4]`, which does not implement the `Copy` trait 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 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 417b1ab205407..4521fa9bcb014 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 677f0b42f5a27..fb191b89bda41 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.nll.stderr b/src/test/ui/moves/move-out-of-slice-1.nll.stderr index c8c09b31d36b8..b4b1fe97ca9d6 100644 --- a/src/test/ui/moves/move-out-of-slice-1.nll.stderr +++ b/src/test/ui/moves/move-out-of-slice-1.nll.stderr @@ -3,13 +3,13 @@ error[E0508]: cannot move out of type `[A]`, a non-copy slice | LL | match a { | ^ cannot move out of here -LL | box [a] => {}, //~ ERROR cannot move out of type `[A]`, a non-copy slice +LL | box [a] => {}, | - data moved here | note: move occurs because `a` has type `A`, which does not implement the `Copy` trait --> $DIR/move-out-of-slice-1.rs:8:14 | -LL | box [a] => {}, //~ ERROR cannot move out of type `[A]`, a non-copy slice +LL | box [a] => {}, | ^ 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 bfdf641986908..f84e3a3f3e31c 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.nll.stderr b/src/test/ui/moves/move-out-of-tuple-field.nll.stderr index 2efdc84ca37d1..888ef3352e26d 100644 --- a/src/test/ui/moves/move-out-of-tuple-field.nll.stderr +++ b/src/test/ui/moves/move-out-of-tuple-field.nll.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/move-out-of-tuple-field.stderr b/src/test/ui/moves/move-out-of-tuple-field.stderr index 6839c49c82963..89662c8303da5 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.nll.stderr b/src/test/ui/moves/moves-based-on-type-access-to-field.nll.stderr index 6ad9a2d414c77..71a3c4506eaf2 100644 --- a/src/test/ui/moves/moves-based-on-type-access-to-field.nll.stderr +++ b/src/test/ui/moves/moves-based-on-type-access-to-field.nll.stderr @@ -5,7 +5,7 @@ LL | let x = vec!["hi".to_string()]; | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait 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 borrowed here after move error: aborting due to previous error 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 882c1fe1706d2..ed4d69f838e90 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.nll.stderr b/src/test/ui/moves/moves-based-on-type-block-bad.nll.stderr index 6950a56a5335a..b83a15c9d4dac 100644 --- a/src/test/ui/moves/moves-based-on-type-block-bad.nll.stderr +++ b/src/test/ui/moves/moves-based-on-type-block-bad.nll.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 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 4ecaed3b69b54..f5328edfcc204 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.nll.stderr b/src/test/ui/moves/moves-based-on-type-capture-clause-bad.nll.stderr index bed0ae7275cc5..3a05a1305beed 100644 --- a/src/test/ui/moves/moves-based-on-type-capture-clause-bad.nll.stderr +++ b/src/test/ui/moves/moves-based-on-type-capture-clause-bad.nll.stderr @@ -8,7 +8,7 @@ LL | thread::spawn(move|| { LL | println!("{}", x); | - variable moved due to use in closure LL | }); -LL | println!("{}", x); //~ ERROR use of moved value +LL | println!("{}", x); | ^ value borrowed here after move error: aborting due to previous error 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 88e58fdf58bcd..39119ff3aaada 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.nll.stderr b/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.nll.stderr index 5f0d2b42671de..fb8562d00ead1 100644 --- a/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.nll.stderr +++ b/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.nll.stderr @@ -4,7 +4,7 @@ error[E0382]: use of 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 partial move | = note: move occurs because value has type `std::boxed::Box`, 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 7624ba5fe28d9..8b904c7169bdf 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.nll.stderr b/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.nll.stderr index 07f40274f9e31..25f88fe157ae9 100644 --- a/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.nll.stderr +++ b/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.nll.stderr @@ -5,8 +5,8 @@ LL | let x = "hi".to_string(); | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait 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 borrowed here after move error[E0382]: borrow of moved value: `x` @@ -16,8 +16,8 @@ LL | let x = "hi".to_string(); | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait 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 borrowed here after move error: aborting due to 2 previous errors 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 374ac61e7f5e9..edf521a896fef 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.nll.stderr b/src/test/ui/moves/moves-based-on-type-exprs.nll.stderr index 162aec45f5f57..67fae606c4e43 100644 --- a/src/test/ui/moves/moves-based-on-type-exprs.nll.stderr +++ b/src/test/ui/moves/moves-based-on-type-exprs.nll.stderr @@ -5,7 +5,7 @@ LL | let x = "hi".to_string(); | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait LL | let _y = Foo { f:x }; | - value moved here -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | touch(&x); | ^^ value borrowed here after move error[E0382]: borrow of moved value: `x` @@ -15,7 +15,7 @@ LL | let x = "hi".to_string(); | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait LL | let _y = (x, 3); | - value moved here -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | touch(&x); | ^^ value borrowed here after move error[E0382]: borrow of moved value: `x` @@ -27,7 +27,7 @@ LL | let x = "hi".to_string(); LL | x | - value moved here ... -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | touch(&x); | ^^ value borrowed here after move error[E0382]: borrow of moved value: `y` @@ -39,7 +39,7 @@ LL | let y = "ho".to_string(); LL | y | - value moved here ... -LL | touch(&y); //~ ERROR use of moved value: `y` +LL | touch(&y); | ^^ value borrowed here after move error[E0382]: borrow of moved value: `x` @@ -51,7 +51,7 @@ LL | let x = "hi".to_string(); LL | true => x, | - value moved here ... -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | touch(&x); | ^^ value borrowed here after move error[E0382]: borrow of moved value: `y` @@ -63,7 +63,7 @@ LL | let y = "ho".to_string(); LL | false => y | - value moved here ... -LL | touch(&y); //~ ERROR use of moved value: `y` +LL | touch(&y); | ^^ value borrowed here after move error[E0382]: borrow of moved value: `x` @@ -75,7 +75,7 @@ LL | let x = "hi".to_string(); LL | _ if guard(x) => 10, | - value moved here ... -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | touch(&x); | ^^ value borrowed here after move error[E0382]: borrow of moved value: `x` @@ -85,7 +85,7 @@ LL | let x = "hi".to_string(); | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait LL | let _y = [x]; | - value moved here -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | touch(&x); | ^^ value borrowed here after move error[E0382]: borrow of moved value: `x` @@ -95,7 +95,7 @@ LL | let x = "hi".to_string(); | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait LL | let _y = vec![x]; | - value moved here -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | touch(&x); | ^^ value borrowed here after move error[E0382]: borrow of moved value: `x` @@ -105,7 +105,7 @@ LL | let x = vec!["hi".to_string()]; | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait LL | let _y = x.into_iter().next().unwrap(); | - value moved here -LL | touch(&x); //~ ERROR use of moved value: `x` +LL | touch(&x); | ^^ value borrowed here after move error[E0382]: borrow of moved value: `x` @@ -115,7 +115,7 @@ LL | let x = vec!["hi".to_string()]; | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait 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 borrowed here after move error: aborting due to 11 previous errors 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 e6177c6b6c836..6cb297cbd6333 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.nll.stderr b/src/test/ui/moves/moves-based-on-type-match-bindings.nll.stderr index 6d523fc09c08b..322999a1f0ff9 100644 --- a/src/test/ui/moves/moves-based-on-type-match-bindings.nll.stderr +++ b/src/test/ui/moves/moves-based-on-type-match-bindings.nll.stderr @@ -4,7 +4,7 @@ error[E0382]: borrow of moved value: `x` LL | Foo {f} => {} | - value moved here ... -LL | touch(&x); //~ ERROR use of partially moved value: `x` +LL | touch(&x); | ^^ value borrowed here after partial 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-match-bindings.stderr b/src/test/ui/moves/moves-based-on-type-match-bindings.stderr index 41ced9dfd935b..9174cfa122c32 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.nll.stderr b/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.nll.stderr index 7d410f6cabc83..0568a2e94a71d 100644 --- a/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.nll.stderr +++ b/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.nll.stderr @@ -3,7 +3,7 @@ error[E0507]: cannot move out of captured 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 variable in an `Fn` closure error: aborting due to previous error 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 49113a57d2fa5..654881d25e685 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.nll.stderr b/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.nll.stderr index 391dd67dbf60a..dde54eee83b6a 100644 --- a/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.nll.stderr +++ b/src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.nll.stderr @@ -16,7 +16,7 @@ LL | fn conspirator(mut f: F) where F: FnMut(&mut R, bool) { | consider adding a `Copy` constraint to this type argument 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 borrowed here after move error: aborting due to 2 previous errors 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 05ced7f0107ae..fe91a488d10d3 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.nll.stderr b/src/test/ui/moves/moves-sru-moved-field.nll.stderr index e5daab36f6ee7..a012c2d9b7b74 100644 --- a/src/test/ui/moves/moves-sru-moved-field.nll.stderr +++ b/src/test/ui/moves/moves-sru-moved-field.nll.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/moves/moves-sru-moved-field.stderr b/src/test/ui/moves/moves-sru-moved-field.stderr index 3d38faa20a1e4..aac399ea4a159 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 c761e74bb8723..ae33e01cd26eb 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 2574f0ef6d81c..b85637b8a56e2 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.nll.stderr b/src/test/ui/mut/mut-cant-alias.nll.stderr index 2d7104b39c4b2..d56e45db13d0e 100644 --- a/src/test/ui/mut/mut-cant-alias.nll.stderr +++ b/src/test/ui/mut/mut-cant-alias.nll.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(); | -- first borrow later used here diff --git a/src/test/ui/mut/mut-cant-alias.stderr b/src/test/ui/mut/mut-cant-alias.stderr index ce942677bed61..5fc194bc3db6d 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 8708a135360b7..e2eea195dafb8 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 d50a1a8f273bd..d1adc9915196d 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 339da7f8a020c..e6d4901aafb17 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.nll.stderr b/src/test/ui/mut/mutable-class-fields-2.nll.stderr index 53127922263cd..15323ce9a9755 100644 --- a/src/test/ui/mut/mutable-class-fields-2.nll.stderr +++ b/src/test/ui/mut/mutable-class-fields-2.nll.stderr @@ -3,7 +3,7 @@ error[E0594]: cannot assign to `self.how_hungry` which is behind a `&` reference | LL | pub fn eat(&self) { | ----- help: consider changing this to be a mutable reference: `&mut self` -LL | self.how_hungry -= 5; //~ ERROR cannot assign +LL | self.how_hungry -= 5; | ^^^^^^^^^^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be written 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 daeee1117bcc3..b0dea3082dda0 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 5ebb40e75b395..22c871dd3c04e 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 691061f051083..f3dbcc2d7b243 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 f53f299fe4dca..98784de8e593c 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 e7cd39114eda0..f63888b2f8ad0 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 bcc20a0d703c0..6735310da8b95 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 bc61996db99bb..da2e77d023d19 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 318b62a0fdb15..799eec9d3422c 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 1b58b21fff05a..5c9c48f5b1d83 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 31d1dfde1ce8c..c0d42312eb1ad 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.nll.stderr b/src/test/ui/nll/cannot-move-block-spans.nll.stderr index 30b4bf75af693..5d50ed67e2f32 100644 --- a/src/test/ui/nll/cannot-move-block-spans.nll.stderr +++ b/src/test/ui/nll/cannot-move-block-spans.nll.stderr @@ -1,7 +1,7 @@ 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 @@ -10,7 +10,7 @@ LL | let x = { *r }; //~ ERROR 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 @@ -19,7 +19,7 @@ LL | let y = unsafe { *r }; //~ ERROR 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 @@ -28,7 +28,7 @@ LL | let z = loop { break *r; }; //~ ERROR 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 @@ -37,7 +37,7 @@ LL | let x = { arr[0] }; //~ ERROR 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 @@ -46,7 +46,7 @@ LL | let y = unsafe { arr[0] }; //~ ERROR 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 @@ -55,7 +55,7 @@ LL | let z = loop { break arr[0]; }; //~ ERROR 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 @@ -64,7 +64,7 @@ LL | let x = { let mut u = 0; u += 1; *r }; //~ ERROR 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 @@ -73,7 +73,7 @@ LL | let y = unsafe { let mut u = 0; u += 1; *r }; //~ ERROR 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 diff --git a/src/test/ui/nll/cannot-move-block-spans.stderr b/src/test/ui/nll/cannot-move-block-spans.stderr index e37c6ff06f7e8..6de67a45fb9a8 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 3ca0aefb592e0..6c4cad923b62b 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 cf88b309f74d6..fcb699a7562fb 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 cdc055f2a37a0..7dc1c59cebe48 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 6750c4047601a..1cc4ca85b9ff3 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 9b66abc40f07d..d47b326f48ed5 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 8214ff1fcec18..dec4a6b811fcd 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 55e4573e60bbb..067bd08220df4 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 5863b9bc84094..a1a1024bccd5b 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 a9aeee8a3190c..ad2a5cae62e00 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 daeb3b9ab5c55..f5167c2197b3e 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 95e5ce0ae74cd..b4e1b0d224769 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 b6d9d8529cf5c..6ab2104a51c65 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 93eb93bdc0638..5cf37bedb8853 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 c7809de88b922..671a8b9a93575 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 3bcd8e1e2568c..c2bbd8138142d 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 2ad4577869a55..332724daaa8bd 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 4a035d0c9cd83..d5bfa3f9894d0 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 b2abfcacd0ea4..20696da3b8e82 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 6c9e1639f88dd..6408293aeea22 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 77cffbfa72d26..ae056a9784085 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 db5a549106bf2..bf5c571b455b3 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 efa825be295f2..e1d2b038ec8be 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 da9c96f7bc2e8..699179fd52fd4 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 b2ed4c8fcab7f..8486c7d48580a 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 23da533252cb9..ab85caabb316e 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 4cbd74fe272d4..c83cb0b300b25 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 c76365095df39..d098ff82d34f0 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 dda324c2e9890..91f758a60a57e 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 ff1f1e2c1f19a..d23cee3fc7c4b 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 7cb5eb736c0e3..05a90eec05c3f 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 16b46c15b90b6..73832fd57879c 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 229bb1777cc5e..7e5ffb515011b 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 e2348d36d33ee..e80cd873d5aca 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 ce93d3787ef26..0be181745fde2 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 ceae16185bbb1..8638fe2576980 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 a4396ae386dc5..f98deaea7183e 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 e83374af3b066..9ac79eda1614c 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 92a9946068cfe..1933ef7a2dbc7 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.nll.stderr b/src/test/ui/nll/issue-54556-niconii.nll.stderr index 58239fe6e888d..40cd04de5ecc1 100644 --- a/src/test/ui/nll/issue-54556-niconii.nll.stderr +++ b/src/test/ui/nll/issue-54556-niconii.nll.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 diff --git a/src/test/ui/nll/issue-54556-niconii.stderr b/src/test/ui/nll/issue-54556-niconii.stderr index 03a7b94d181ba..2d0de26ab309a 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.nll.stderr b/src/test/ui/nll/issue-54556-stephaneyfx.nll.stderr index b58454427af84..0bf76485eef2a 100644 --- a/src/test/ui/nll/issue-54556-stephaneyfx.nll.stderr +++ b/src/test/ui/nll/issue-54556-stephaneyfx.nll.stderr @@ -1,7 +1,7 @@ error[E0597]: `stmt` does not live long enough --> $DIR/issue-54556-stephaneyfx.rs:27:21 | -LL | let rows = Rows(&stmt); //~ ERROR does not live long enough +LL | let rows = Rows(&stmt); | ^^^^^ borrowed value does not live long enough LL | rows.map(|row| row).next() | ------------------- a temporary with access to the borrow is created here ... diff --git a/src/test/ui/nll/issue-54556-stephaneyfx.stderr b/src/test/ui/nll/issue-54556-stephaneyfx.stderr index bf3285a73c7c5..4e581a516b2d3 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.nll.stderr b/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.nll.stderr index 1bc43017bc675..513dca7950af9 100644 --- a/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.nll.stderr +++ b/src/test/ui/nll/issue-54556-temps-in-tail-diagnostic.nll.stderr @@ -1,7 +1,7 @@ error[E0597]: `_thing1` does not live long enough --> $DIR/issue-54556-temps-in-tail-diagnostic.rs:5:11 | -LL | D(&_thing1).end() //~ ERROR does not live long enough +LL | D(&_thing1).end() | --^^^^^^^^- | | | | | borrowed value does not live long enough 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 ca636e7613265..a74970f71182a 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.nll.stderr b/src/test/ui/nll/issue-54556-wrap-it-up.nll.stderr index a13e59fa48b5c..9f27fac15a7f6 100644 --- a/src/test/ui/nll/issue-54556-wrap-it-up.nll.stderr +++ b/src/test/ui/nll/issue-54556-wrap-it-up.nll.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/issue-54556-wrap-it-up.stderr b/src/test/ui/nll/issue-54556-wrap-it-up.stderr index a0c19b9638798..c98b3a9fafb22 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 bcdd78248eb4b..e9a70fd6b1617 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 952b5441f86ff..622bc5a3f3411 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.nll.stderr b/src/test/ui/nll/issue-55850.nll.stderr index e09711f74fd72..bf0c6986ef2cb 100644 --- a/src/test/ui/nll/issue-55850.nll.stderr +++ b/src/test/ui/nll/issue-55850.nll.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 | }) | - `s` dropped here while still borrowed @@ -9,7 +9,7 @@ LL | }) error[E0626]: borrow may still be in use when generator yields --> $DIR/issue-55850.rs:28:16 | -LL | yield &s[..] //~ ERROR `s` does not live long enough [E0597] +LL | yield &s[..] | -------^---- possible yield occurs here error: aborting due to 2 previous errors diff --git a/src/test/ui/nll/issue-55850.stderr b/src/test/ui/nll/issue-55850.stderr index 2a24cba1a6846..7deee1d541ae6 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 4561c99096f14..db28787a04681 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 b87d0de51a37e..0c69b70a97c77 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 18d4e010946bb..a3f1391f00140 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 a855b28a978dd..72c6a6cd42027 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 baff2fda9f5d1..a646b7d84bc0e 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 2d34dd7805dbf..e8db0626a7ba2 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 3ff778675bcf4..e7755bdb89ccf 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 5585e69f090a8..e4efd98253c0d 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 aa9544927f899..0e2be68c6d3ab 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 331f846dfd095..10b9a6dcf5a0b 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 86bb8e3a4b33b..f329748139e50 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 8b52cc113ccc5..bdbc25e9ee3d4 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 c4aab0b8b1d6a..fb3e9cfd25975 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 9798f238fc4d0..de185cc0d2947 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 5f4a6037668b5..b04d1a9ccba7f 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 0a2e0ed7b2db2..6dc78789564c7 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 da6930455760d..7c078d226dc0c 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 7603d8b5bb5c8..cc201136ff212 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 fc7a4570a1802..a7679aac219fd 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 e8283d1ab5da2..7ba7164b35b84 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 78a8c803dd972..63ead49adfcb4 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 d8725dc4284f3..f5daae286709e 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 597b096dbe607..1aed0a545b478 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 3c2ac474778f9..8175c302155a5 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 24bd97f046913..41c2916dca3b7 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 30c1dbc9027b4..6a201b8523ad3 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 a76a9463cc801..4ddc54717fbb1 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 14642a1e615df..9128fd1647959 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 bcd141bb406b1..4facc2d0da0e6 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 3b8d99421242e..9aa78dfbd4acd 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 fd1a4b96fe347..38f068746a678 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 e614e00ac00cd..25a9de480b2ca 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 c72e56c619f32..1afbac7c4b2ef 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 dc5b5a0dd7fd1..cd625653ace20 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 38acfcb4b6136..2bb58bb2590b3 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 7e795ce17a8dd..0228b56d761f3 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 a46ab61418efb..55bb3a6090c01 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 541a7113ec740..9a28fbd11339f 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 57cfaa2db0432..07e2e1e85cb78 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 5b97c12b626b3..5e66a30d7c332 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 10e48b5bc348b..c96838f259a81 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 5bfa32ec64492..fcc3c40e43f74 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 a1e60db05d08f..c91370c810c8e 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 6e24da094e0d2..ae123b8ab5451 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 04ceb8e5f8495..631bcde4ee877 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 65af2f68bcf8c..dadce24159e83 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 785b39ec887a0..768454698987e 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 b1c2411e46c01..6cfccf7cb69ce 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 76be637220a15..c99f53c5aa4c5 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 2e23e6e2a650a..7e5314614f346 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 30cf01f54bd14..12b02ba33f725 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 140bb750469b8..a55ed1aa272ad 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 12b9685bdb87c..140bda2df4147 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 cb6cc64796461..70e1cda004b09 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 2f83283ef9122..50e4fb259918f 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 71bf8507a735f..fe93c3edba87a 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 800c822058d0a..b483f219c9007 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 8adadfb8b6796..9c888b0bffe53 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 0fd5fc3578d57..698cff51126f9 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 3d114fa5d7535..b5f2cb8e321ab 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 476578e074dac..1ac62832315d5 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 144af1e0ec120..d8b01f22145db 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 a88ff6df3d791..93dbf7cb1b310 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 00500c8d6541f..8f8e1bc28f6fa 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 7ef4bfbaf9920..521ed8f2cf3b0 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 fa82ac6cbe72c..e5c54ddd1035d 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 db76b74fdad0a..068c7139ed9e2 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 928ad4232024e..c9c8468eba432 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 161e7bb4b005f..ec7d2d9f0d114 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 3fd476c4d720e..0768c3f4de8b8 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.nll.stderr b/src/test/ui/no-reuse-move-arc.nll.stderr index 0b14f65a77073..3f7169e6fcbb9 100644 --- a/src/test/ui/no-reuse-move-arc.nll.stderr +++ b/src/test/ui/no-reuse-move-arc.nll.stderr @@ -9,7 +9,7 @@ LL | thread::spawn(move|| { LL | assert_eq!((*arc_v)[3], 4); | ----- variable moved due to use in closure ... -LL | assert_eq!((*arc_v)[2], 3); //~ ERROR use of moved value: `arc_v` +LL | assert_eq!((*arc_v)[2], 3); | ^^^^^ value borrowed here after move error: aborting due to previous error diff --git a/src/test/ui/no-reuse-move-arc.stderr b/src/test/ui/no-reuse-move-arc.stderr index d8ab314e7625e..d712331478687 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 0ccd567e7a950..975f5c2f50c5d 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 cd1a7ee6fe532..b50241fb1a059 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 6b76ab68658cd..ec79420d4dd48 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 03215f72ebcd4..6de615c3de4fd 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 d5beac4b71633..67c818e19cbda 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 112e18432b440..58e3309fd267a 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 1876de8736275..eb47a33a7292b 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 eb482b337e647..9338688b037ff 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 b583db1e4ba2e..b66391b83b8db 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.nll.stderr b/src/test/ui/not-copy-closure.nll.stderr index 1a65bcf447317..10bf570727fa0 100644 --- a/src/test/ui/not-copy-closure.nll.stderr +++ b/src/test/ui/not-copy-closure.nll.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 moved more than once as it is not `Copy` due to moving the variable `a` out of its environment diff --git a/src/test/ui/not-copy-closure.stderr b/src/test/ui/not-copy-closure.stderr index bdae06d3a66c4..41447537978b2 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 46400a4b03c12..a603acb2f1fed 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 a7cb32ec7b8b4..0077c95139f4b 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 165f6311ffdfe..d7e3a171333ec 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 2f042c05f25bc..4d082530dc528 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 1a21096741cb9..402448cde3112 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 443d4ff6537e3..2642cdff2bf6a 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 c5738edb6cf09..0c7e4e991a51d 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.nll.stderr b/src/test/ui/object-safety/object-safety-by-value-self-use.nll.stderr index 0dd50b2802678..1497aa42082d1 100644 --- a/src/test/ui/object-safety/object-safety-by-value-self-use.nll.stderr +++ b/src/test/ui/object-safety/object-safety-by-value-self-use.nll.stderr @@ -1,7 +1,7 @@ error[E0161]: cannot move a value of type dyn Bar: the size of dyn Bar 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/object-safety/object-safety-by-value-self-use.stderr b/src/test/ui/object-safety/object-safety-by-value-self-use.stderr index 0711981a5215d..0ab881687e91b 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 793ed26ca6885..b7108ced0d763 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 c54b72a3585d1..9d1e8d071f061 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 1e0808e1d8408..5bbdbe29416c1 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 939c2725cc472..ece8dee0afe97 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 7b45d848c97b7..c1d884929a0c1 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.nll.stderr b/src/test/ui/once-cant-call-twice-on-heap.nll.stderr index ea53abc1b0f2d..f98d3d8384537 100644 --- a/src/test/ui/once-cant-call-twice-on-heap.nll.stderr +++ b/src/test/ui/once-cant-call-twice-on-heap.nll.stderr @@ -7,7 +7,7 @@ LL | fn foo(blk: F) { | consider adding a `Copy` constraint to this type argument LL | blk(); | --- value moved here -LL | blk(); //~ ERROR use of moved value +LL | blk(); | ^^^ value used here after move error: aborting due to previous error 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 4559425e5be0d..40034dae5bcd3 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 17bda18f8f63b..2a120dee482df 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 21ba2367901cd..a59af8dcdbcf7 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 31b5697addaf8..82c12c4b6e19c 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 e36644895492f..8b044f7669c72 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 737ff313d0bef..5ab6934202e94 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 c0b39769a49b5..0a70181fdace9 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 bd25c8b02f805..3a5fc76efbbd4 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 80deff23a87d1..e9b1945364372 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 cab45d8bfad62..ae3ed5ab12b4c 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 75ddda79b2d0e..5b8ff82d1fd84 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 23e6ade046957..141378752d6f4 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 fd9b0e8216b41..a16510055f548 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 529a93cf3042b..b0d2b2d0c0a13 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 28505a8a0565f..cd02710c40b77 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 76f7af38e776d..c246fa80b0a05 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 d3330a405c06b..7524c4eccd98a 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 076bca0fc3a2d..376ddf4d68b74 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 5681029125213..4b3893d2c17da 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 36e566b5aa41a..ffbfc583e8a75 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 863a2d2069fce..4fa420c79fcc8 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 693da95017d2e..a452df5e90cb7 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 a81dc52417a4a..eb5daf849811c 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 8151bd7cdd7b1..5111b40603c49 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 067c4192ce6af..cecdab4d63197 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 0335a4b83eab1..eb048b08c71b0 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 608c5fda2482a..3d4d7b4a78b43 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 dd3a2d2a27a0a..2f29b978e9c91 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 69a496f3a0c39..9ddca101567ff 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 2606b7450aef9..ec497dbe40730 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 3495353c6f905..d100d01e78ff2 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 618e577e4e229..50c95b8cf4023 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 e30b32f41b413..82937a517b5e9 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 33bba35f692dd..17d65314d9625 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 a8a22aaafce33..587e527f0a85b 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 0300fe9891016..b6bd866938bed 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 6a8d7e9d4a165..9507a4598581a 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 191ea3ebd070a..facbd2800709d 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 046e0ce8c7ab7..0b714e40a1012 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 ab14eeede663e..36cb0170a1404 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 669f5585cb242..2e9b13b933e2b 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 7751a8c0f38a1..33865fb7bca95 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 b12b47b67ce10..5cbf3d3e95965 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 27193672903ac..c43fffd58af20 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 0cd6aa81ec5f4..0fae44ce5c806 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 5809d64e80678..82756626765b0 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 965a8a45aedea..46f2393cd832e 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 ed888eb1a8ea8..04edd46936a61 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 94b2d1d7b7e86..0fb993553417d 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 d2fe8b77ce668..de9f0c932327d 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 e764cd0840196..d2d5e3c46874a 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 2938bba77d717..9926fcc0858e5 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 353f5e21ee641..935e93963e1e6 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 001eab226dc21..11a37bc139b3c 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 47e1f7adf25ec..ccc5dd938b5fd 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 9c9858aa26cb4..7bf5aa93f0a59 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 3a886c4c481f1..ea26453f80897 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 c91595208c864..879bcb2b4a1f7 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 19f9fe19ef5ab..8251ce9993fa9 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 8322dc00cade0..03e556da268f0 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 f2f0b411e9ada..a44700936200d 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 f92604d0067c3..6aa97add7b0f4 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 627b74ff8f7bd..d5f1f972d553d 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 e06eb7a9846e1..f67dfa09aca8b 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 6cf39608fcc9b..26b819fa2984f 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 1e0244c2e1d32..70f55f0aeb9ff 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 8935ea9c6c125..2dc56a5eca3a6 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 3a4fa9a5e7ba7..167eaf962e0f4 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 da25aac486e35..7c083751228b6 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 0f4cd5724ce1e..7098da738b8df 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 4e073d8c58aaa..2dfb31432bc99 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 f773a7df4fedd..e45b08be9ab6a 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 eadf5546d8505..18947b8fa401e 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 07eafdde9071a..b0c18f4ec5a41 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 d74c539abfe54..97efb89593579 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 1ea4c36a5255c..f812646ca5881 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 bfe44588a5b0b..acbe597ef31a3 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 38d00a0ea0b4c..4516c388afcb0 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 ac75829f2e355..719845e699939 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 780f63a663860..9408182f9527b 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 f9f00f70f0b90..6cf902ca86e79 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 b4760161a62a5..22d93bffeaded 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 4442cd0ff011c..82ca614215430 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 4185ae034b504..2c79598a81b18 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 6eaf5e2ed93ee..ef466488ad061 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 07a134442b8de..8b185948498d8 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 69af97374455a..690bd84221a94 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 c727f1754c77e..6da47f88d04e3 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 7fd2761884f79..4b0a659f9ad7e 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 6d180bb56da5d..bec7b7ba01e12 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 dc7e37824dc68..51a834f797c32 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 897624279e5e8..e8372643be6b7 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 945fc77c3102f..a071a40a70e0d 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 32263e9f6e20e..090046cebdc56 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 11ba41015cbd2..98bfdb46e9770 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 960a42df429e9..2672959b7c68e 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 2300a257a02b5..98332b723f277 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 ed2c8a4eb9c4c..99dbc0530f3fe 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 f91cab029533c..783507eb35cd7 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 4c8e76695bc8f..e56a115c91636 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 8aeebcebec959..a8be2ceb037d6 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 37e06708e25fd..e0687e27eb585 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 b0266060903ca..040960835d811 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 69a6415908c2c..1bfc6c9b3858d 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 8b595673ec4cd..526ddcd6ee0ff 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 656df196f09b1..618043d89ffaa 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 903137542d6f8..c0156a63fa9d1 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 4830e6f1bef40..00a65977732f8 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 50ac690e425ad..b2d6639e72ecb 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 3736f366cbd49..b31c0df28c008 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 73e8d64b56c1f..c342e3a76fbb4 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 f7db20034a10d..b749c708d441d 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 07c9f883b60fb..e7b18023e61a9 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 ddd5e4d7b115f..67935ce43ba04 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 7e798a3f0b9d9..2c69d0a8744a0 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 5285520cc20c4..fc01183ca046b 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 b84a652dc5c81..f72ac87742099 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 9750906aaf212..15959f671b634 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 c22bf7d001090..3c8550e3dbe64 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 7eadb8ebfe06d..4c1c5c29f472e 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 881e3d5276bb1..7bcca3761fc60 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 1fa23b8b73c9e..466d7af1bda47 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 542247d69df6e..01f4c236c9f3b 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 284ffde9efbe7..c0c2e542058bb 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 e9f3537ab7431..19117bfa9c972 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 40e0cc1d786d1..7ce061b8be079 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 59762e021652c..6a17d39e8bfec 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 4a10dd50b2340..f74c8aa57e705 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 21c3d1771aade..f411ee8ce2ccc 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 abb0820979532..b68433936117a 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 213d72363f59c..8ba72fc88862a 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 36589667c4bcb..7aadc0aa4b5c1 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 dcc24fca5cc4c..004de9d905f15 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 3fcc8e08520db..b37bd583060c5 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 310d60c8dbda0..c86684de74432 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 a624d574c456f..fa25161ab50b2 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 185a9e718098a..19c5c82f82cd2 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 84dd302b4a8e1..a869a53c1eee2 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 4f9e7fb5de85a..09925eae51d27 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 2782af49e66b1..a844cac189aa1 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 692b116123a60..bf20bc9350021 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 5a5fc9c450989..fee8d248dcf07 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.stderr b/src/test/ui/parser/mod_file_not_exist.stderr index f7f0e2d2d1168..dadf4b29dcf39 100644 --- a/src/test/ui/parser/mod_file_not_exist.stderr +++ b/src/test/ui/parser/mod_file_not_exist.stderr @@ -1,7 +1,7 @@ error[E0583]: file not found for module `not_a_real_file` --> $DIR/mod_file_not_exist.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_not_exist_windows.stderr b/src/test/ui/parser/mod_file_not_exist_windows.stderr index 67abd6304d515..60ae00abab1ed 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 a3a3486dd9e36..004b5d7963a1d 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 c9404d8b9e4d3..cac0c801a5998 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 5bbb4ce569f0b..286956440ec34 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 828e72e56eac8..5a191735307a9 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 97ba3fb2cb666..0fb8befa45b0c 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 038002ae05e56..427426788f6f8 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 84779b09dc7c6..96d8b56bf9ac3 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 b21a1bd08315c..4f2a76d2d2562 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 6423aa2dc2fd1..6ceba07f46918 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 18e0e9e8f0c45..d14702acee6e5 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 7e76a04ce6f5d..ce4cc05db19b2 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 bf5b61907614c..2ee4bdb20fe88 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 44394c3002157..5552ea46d9b9d 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 378caf6300057..6e0deccab8ca2 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 ef8b4f94ef49d..d180bb429110a 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 f923228710bf3..aaa85e3c2ddd8 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 8729e8c5854f7..a3bce3372646f 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 33c69deda42ca..391f2c428bf2e 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 fe4b4deaa60d9..26b92fae31391 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 2ca10f697604d..61ae40b355d38 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 2b4920a792f09..7b0fe4934610d 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 f50b2fa49fb0c..12b7edae79f52 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 9fad20848a636..21ad26d8d2553 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 071cd6241da20..2ba50e8fb2a34 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 1131e0015bb53..5670ed6590a18 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 47fd331969dfe..b86b9e90e73ad 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 6dedcfb6a0aab..26910ff64f578 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 8465b6a6e8495..8b8b71373b504 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 81e292939b020..8c3448d6fbe41 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 315bfde77c73c..d1984a54e2f07 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 edb3cb95cab2f..8e11d6b29a584 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 cd56dfa6aeb7b..8d9bf0b7a0445 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 4c710dec5ba3d..a6d0ff4eaf2aa 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 318591e5cc0a4..ca6969d1e8733 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 9303a67a8cc7b..196a5af472938 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 8164645b01b7f..313420fb9a4fd 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 f0eafa3d00a6f..a759716b5a963 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 689ed35668ec9..7beef9883bd7d 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 f9b98596ae399..730d5e2712b96 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 90d0764def0bc..63d2fdb8cd4a9 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 b2759778d0313..b6c5749c031e0 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 38a5e22e3f7b6..b319c64f406f1 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 49b9a52aff918..27672eeda830b 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 64ddde0e9e97f..94a758eb5268d 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 9a6ab81e7c02f..8a130f441a3ee 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 2303df93810cd..3505d00b64b76 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 cc6312b454551..884e9672cb12d 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 3c0346c96b282..a712f68044ec0 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 94ca66aef729b..084e6d5b11fcd 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 3ab366446d86e..44c7e930a3a43 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 58adcbbba76ba..a5f3b6551aa27 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 3bf3ce88a63c2..4c41afdc3f09e 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 442837e580802..bfbdb0363ef68 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 fd12d86144c9c..17e39b292005a 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 51e1a02cbd763..36917523555b9 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 4a2b95ada6d21..bd0d881a06c35 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 04eb9770c468d..9021bd30a7781 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 73c6884679dde..50593e45230ba 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 ad8cc2ef8973b..b32cf8cbb0efc 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 7dbe23a8f283c..0c5824be95df1 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 28aa52856c55d..84b9a622431e6 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 4bd374affb366..9bf14e15fceab 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 4caafa7d3e84b..7474d32679366 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 958934c301ff4..faa0d7c30743b 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 654814afcfe17..11e0c31cfa62f 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 278b3d19d8bc7..bfc10c5f86652 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 69cd552aabd1b..548347034671c 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 95651ccc401e0..e2c408a90e4e1 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 531bbbc84d038..eab4fc3f086da 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 412e0158c01c7..2dd10a0478ab9 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 5ebe00e624fc1..ee1e36081e778 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 a8906a43003ae..6f0322fd9b953 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 91259e87efc02..4535633bc6f31 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 09706a6d255b4..713568f879dad 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 c8b043d1b5f31..230cf95de6206 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 563aaec89aa34..4b9faca045709 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 6ba2dbe41a2b4..07b013be7251d 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 0012072ed1138..cd5b536906443 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 b1e3127645e0b..c92553fd1a16a 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 c70afe5061d39..6be14df89d20a 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 7feebabe781ac..73672d1c214f1 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 9e3e48272f90a..e4a20f920a062 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 cdd9b2cefbba7..7568c346b2489 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 8e254b15c7895..e1da3f47a4ef7 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 0e5dab1a08c37..a610b47592315 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 ab6531cc748ed..a1a326f2873e1 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 730ac24d5e54f..441a4d5cffd49 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 9967405589777..729b94ed8926a 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 621d9a57fa076..16b7e5103283f 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 bf88a83e633cc..3c57e50cfedfa 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 06df7e8478370..097b8b9a61eff 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 7a3f52fa05df7..da95cc49241ae 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 568d4dadc8cc4..baa98292b67b5 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 2ac694f35d464..0d5435e1c504b 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 bd28f2e5a8ba8..10e0bfe5b1367 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 30c1e99ceddb4..d2ba591ef0cc1 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 64820e5ea8c70..61fc122e318ee 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 943abeed114c8..97585c1d8805b 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 05e6d3d724313..69bd58aacfc54 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 7cb6d6ab4d7e8..da53c73b4311c 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 b436f20fce981..aa4bfb7fc9a19 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 99f4a41272cd0..8e4c345286247 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 2fb7059e0d40d..87c96d31f0929 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 0109cae91a0c8..dd609944a4b3f 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 7539b0e1af4c9..b4ef7b8e3f79f 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 d31360dbe6511..96a1d7ed5090a 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 bd2c834c966d1..df054b8cff8a6 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 db07055b6a109..316eb636ba825 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 79dc922b9db2c..975be7ce03b81 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 a4f165cd1b52c..39db45cf569a7 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 8371088c4c209..6c571dbdb4769 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 87b6fb9539fb4..fcd77b2d383da 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 c74215f415e0e..bf1bd8427c833 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 8180c84d3f6eb..5f2009b384b1a 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 ece1b6212914d..f7c8960372ec3 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 08de3c7d1a666..d1b836e7f6f28 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 6cf5c63d2da4b..2f81921358dfe 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 1177fc6e575a7..1b828b4f03f2c 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 06a7ef2b206c7..8dff60d0dc556 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 875941303787c..9a53741f94f96 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 384d30650f10c..77a26b830d98f 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 fd34459e89766..6ff47e3752c5c 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 39eb64e555c14..da2bf07a1a3ad 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 40f28460b1631..0727e8c8ed168 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 9657914f49bb7..2584e0c62eece 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 559e8f0f2225b..28c61a2f52fed 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 c873ab68654b8..2356a119530bb 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 a3cc7d485cd39..7447b5c15eef0 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 c1821199e30b1..548f9e3051dd3 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 2192e6d2b17aa..f5d589c3ac6ef 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 21e75027e4879..c6c2954f93984 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 7519f778e9e75..44af07a794234 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 cba4b73486c13..011a91d446295 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 fe5107e17cb95..4b2fce7f6e4ca 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 a5ec787ac67e6..f8f1e7cd988f0 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 abfcf09bfaf6c..4ae8e63df7249 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 262482aea3457..89ad527a43c8c 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 47be1c44d2d8c..66fa499d33bb2 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 2dfe2a94c88e1..91b73903aca29 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 99cb3316533a1..4743e3031a34c 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 db524907b656f..fbccde28f59b4 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 94f1be6021faa..5117dd6d32d49 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 e38343348dd94..f8dfa841d4f3b 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 2499e90db7d91..019241d6874aa 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 e895d51a848b3..61c148bf2df27 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 86fe1b2186f40..fcff5334890eb 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 ca720279946f0..d856833d04fb1 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 526e964f8ee35..e0ea50621f752 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 40cf398023b28..7eeefa9550543 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 18fca2e304696..926b098040f14 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 c998bdc086f10..f62a540572c93 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 f7f887006ed5f..598a0b3ed0374 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 910ba51727675..e2713a2bd5ed8 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 c1916e24bfeef..226d72ce0262e 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 548600f26ec8f..02b29021cb61a 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 b6e79e551cd8e..18d7ffe74bd18 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 949009b729969..def16d90a7490 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 d71d12b744a64..a498502e6cb1a 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 289cef24bcecb..63137ce3da180 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 aecaf24adc44b..df5cff16f9a46 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 21f8a0f418e5e..3086745d28ed4 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 f1770df2f9ea8..bbfa2ef529add 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 288c18d5d6593..0536cdef72128 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 e5ce660d69596..3317da58aba1c 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 5fbf603602baa..dcccb7a4db307 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 def678ec93ea2..1837031107d59 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 b90cd79034172..f867c89163415 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 44887f0ee523b..61982289cdc6e 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 1bef37ad58883..9213ba052a9ed 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 681931ef830f6..01afc1458afb9 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.nll.stderr b/src/test/ui/ref-suggestion.nll.stderr index 402f3c77cdb7b..9ff8e21bb58bd 100644 --- a/src/test/ui/ref-suggestion.nll.stderr +++ b/src/test/ui/ref-suggestion.nll.stderr @@ -5,7 +5,7 @@ LL | let x = vec![1]; | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait LL | let y = x; | - value moved here -LL | x; //~ ERROR use of moved value +LL | x; | ^ value used here after move error[E0382]: use of moved value: `x` @@ -15,7 +15,7 @@ LL | let x = vec![1]; | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait LL | let mut y = x; | - value moved here -LL | x; //~ ERROR use of moved value +LL | x; | ^ value used here after move error[E0382]: use of moved value: `x` @@ -24,7 +24,7 @@ error[E0382]: use of moved value: `x` LL | (Some(y), ()) => {}, | - value moved here ... -LL | x; //~ ERROR use of partially moved value +LL | x; | ^ value used here after partial move | = note: move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait diff --git a/src/test/ui/ref-suggestion.stderr b/src/test/ui/ref-suggestion.stderr index 1f871bafeec99..df677a611cd5c 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 66e6a615b33bc..35478a7db860a 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.nll.stderr b/src/test/ui/regions/region-bound-on-closure-outlives-call.nll.stderr index fa4c8a9dc6d8d..bce310bafaa92 100644 --- a/src/test/ui/regions/region-bound-on-closure-outlives-call.nll.stderr +++ b/src/test/ui/regions/region-bound-on-closure-outlives-call.nll.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 occurs due to use in closure 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 3e60efd14720e..cb888ab66c470 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 16c31fbcac0ff..ec71d55705e85 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 5c8b3d3ba6922..7b901c2f96014 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 f36885f7aeb99..3e42cfcffb438 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 f1e87ebf4749c..8817ad1c9f73c 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 862a469ddb98c..fee7f40efd485 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.nll.stderr b/src/test/ui/regions/region-object-lifetime-5.nll.stderr index c6d7135a2dbca..b86f6e3a2a122 100644 --- a/src/test/ui/regions/region-object-lifetime-5.nll.stderr +++ b/src/test/ui/regions/region-object-lifetime-5.nll.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return value referencing local data `*x` --> $DIR/region-object-lifetime-5.rs:11:5 | -LL | x.borrowed() //~ ERROR `*x` does not live long enough +LL | x.borrowed() | -^^^^^^^^^^^ | | | returns a value referencing data owned by the current function diff --git a/src/test/ui/regions/region-object-lifetime-5.stderr b/src/test/ui/regions/region-object-lifetime-5.stderr index 002bae18b1c01..1efaee181cb79 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.nll.stderr b/src/test/ui/regions/regions-addr-of-arg.nll.stderr index 0f60bc669b2dc..54f44b98b9195 100644 --- a/src/test/ui/regions/regions-addr-of-arg.nll.stderr +++ b/src/test/ui/regions/regions-addr-of-arg.nll.stderr @@ -1,7 +1,7 @@ error[E0597]: `a` does not live long enough --> $DIR/regions-addr-of-arg.rs:5:30 | -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 | | | type annotation requires that `a` is borrowed for `'static` @@ -11,7 +11,7 @@ LL | } error[E0515]: cannot return reference to function parameter `a` --> $DIR/regions-addr-of-arg.rs:13:5 | -LL | &a //~ ERROR `a` does not live long enough +LL | &a | ^^ returns a reference to data owned by the current function error: aborting due to 2 previous errors diff --git a/src/test/ui/regions/regions-addr-of-arg.stderr b/src/test/ui/regions/regions-addr-of-arg.stderr index 61e28b8bbeadf..3e76a7dda9921 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 2ea8aecacdae7..a0b8b6b51e5a1 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 97470aae54a0b..01b2631a53717 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.nll.stderr b/src/test/ui/regions/regions-adjusted-lvalue-op.nll.stderr index f188da5038d8b..2c55634445d81 100644 --- a/src/test/ui/regions/regions-adjusted-lvalue-op.nll.stderr +++ b/src/test/ui/regions/regions-adjusted-lvalue-op.nll.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:16 | -LL | v[0].oh_no(&v); //~ ERROR cannot borrow `v` as immutable because +LL | v[0].oh_no(&v); | - ----- ^^ immutable borrow occurs here | | | | | mutable borrow later used by call @@ -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:16 | -LL | (*v).oh_no(&v); //~ ERROR cannot borrow `v` as immutable because +LL | (*v).oh_no(&v); | - ----- ^^ immutable borrow occurs here | | | | | mutable borrow later used by call diff --git a/src/test/ui/regions/regions-adjusted-lvalue-op.stderr b/src/test/ui/regions/regions-adjusted-lvalue-op.stderr index 9988289b91e6c..2c4c75f323ce5 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 dbda9f4067b03..c72d6483c28f4 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 50339590ee541..eb205a303dbdf 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 c9cbacded907e..de1073cd1d9da 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 95857e987751b..27eb8891c6c06 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 182081ede0c6f..89c0c2534266a 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.nll.stderr b/src/test/ui/regions/regions-close-object-into-object-1.nll.stderr index 0e68a0548e622..8e119c4f5355f 100644 --- a/src/test/ui/regions/regions-close-object-into-object-1.nll.stderr +++ b/src/test/ui/regions/regions-close-object-into-object-1.nll.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return value referencing local data `*v` --> $DIR/regions-close-object-into-object-1.rs:12:5 | -LL | box B(&*v) as Box //~ ERROR `*v` does not live long enough +LL | box B(&*v) as Box | ^^^^^^---^^^^^^^^^^^ | | | | | `*v` is borrowed here 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 817f664db45d1..c7bde8dbd6df7 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 de9a250ced660..d5e228e1f0d9d 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.nll.stderr b/src/test/ui/regions/regions-close-object-into-object-3.nll.stderr index 6225575ddf3a1..9ea13638f5cad 100644 --- a/src/test/ui/regions/regions-close-object-into-object-3.nll.stderr +++ b/src/test/ui/regions/regions-close-object-into-object-3.nll.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return value referencing local data `*v` --> $DIR/regions-close-object-into-object-3.rs:11:5 | -LL | box B(&*v) as Box //~ ERROR `*v` does not live long enough +LL | box B(&*v) as Box | ^^^^^^---^^^^^^^^^^^ | | | | | `*v` is borrowed here 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 1736a5f215cd7..122e57a3250c3 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 87bf28d74d4d5..c9ad95d31d6a0 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 4803ae8441518..68809eb548b2f 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 58028fc7bd8cc..a7f05723817ef 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.nll.stderr b/src/test/ui/regions/regions-creating-enums.nll.stderr index fe4b97a33b5cf..a95d84629013e 100644 --- a/src/test/ui/regions/regions-creating-enums.nll.stderr +++ b/src/test/ui/regions/regions-creating-enums.nll.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return reference to temporary value --> $DIR/regions-creating-enums.rs:23:16 | -LL | return &Ast::Num((*f)(x)); //~ ERROR borrowed value does not live long enough +LL | return &Ast::Num((*f)(x)); | ^----------------- | || | |temporary value created here @@ -10,7 +10,7 @@ LL | return &Ast::Num((*f)(x)); //~ ERROR borrowed value does not live l error[E0515]: cannot return reference to temporary value --> $DIR/regions-creating-enums.rs:28:16 | -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 created here diff --git a/src/test/ui/regions/regions-creating-enums.stderr b/src/test/ui/regions/regions-creating-enums.stderr index 36cd6d0c22e5b..bb11be9b75811 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 2a0efaa598c7c..2fc1fc3f68128 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 569530768b837..4d00783d180b6 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 d10f7ed28fc2d..8701408566759 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 8575a24281d05..b93dd0d4c57c9 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 8f4bfd889a836..a6b165e2d4444 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 42a5a7c806e08..cda5ce273bd99 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 e3f42d592283a..3b8f09f1ad80a 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 b5c66386341a8..4648bf046bc77 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-caller.stderr b/src/test/ui/regions/regions-free-region-ordering-caller.stderr deleted file mode 100644 index 67ee950ae8f5a..0000000000000 --- a/src/test/ui/regions/regions-free-region-ordering-caller.stderr +++ /dev/null @@ -1,32 +0,0 @@ -error[E0623]: lifetime mismatch - --> $DIR/regions-free-region-ordering-caller.rs:8:12 - | -LL | fn call2<'a, 'b>(a: &'a usize, b: &'b usize) { - | --------- --------- - | | - | these two types are declared with different lifetimes... -LL | let z: Option<&'b &'a usize> = None;//~ ERROR E0623 - | ^^^^^^^^^^^^^^^^^^^^^ ...but data from `a` flows into `b` here - -error[E0623]: lifetime mismatch - --> $DIR/regions-free-region-ordering-caller.rs:13:12 - | -LL | fn call3<'a, 'b>(a: &'a usize, b: &'b usize) { - | --------- --------- - | | - | these two types are declared with different lifetimes... -LL | let y: Paramd<'a> = Paramd { x: a }; -LL | let z: Option<&'b Paramd<'a>> = None;//~ ERROR E0623 - | ^^^^^^^^^^^^^^^^^^^^^^ ...but data from `a` flows into `b` here - -error[E0623]: lifetime mismatch - --> $DIR/regions-free-region-ordering-caller.rs:17:12 - | -LL | fn call4<'a, 'b>(a: &'a usize, b: &'b usize) { - | --------- --------- these two types are declared with different lifetimes... -LL | let z: Option<&'a &'b usize> = None;//~ ERROR E0623 - | ^^^^^^^^^^^^^^^^^^^^^ ...but data from `b` flows into `a` here - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0623`. 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 12e080726763b..676e96a038b43 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 23492b3c718eb..575037a0a4d63 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 e2a4a1eec4253..ca86eb7edae18 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 9cfdb67939f12..ae06e7653dbeb 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 d0137d1afefbe..cfed9feba4b82 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 9defd82aed596..a1d4ebb597b4c 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 dea7f1054183e..8314942759d1a 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.nll.stderr b/src/test/ui/regions/regions-infer-borrow-scope-too-big.nll.stderr index 62f0ceba94f29..2c7a6e8b5c0b9 100644 --- a/src/test/ui/regions/regions-infer-borrow-scope-too-big.nll.stderr +++ b/src/test/ui/regions/regions-infer-borrow-scope-too-big.nll.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return value referencing local data `*p` --> $DIR/regions-infer-borrow-scope-too-big.rs:13:12 | -LL | let xc = x_coord(&*p); //~ ERROR `*p` does not live long enough +LL | let xc = x_coord(&*p); | --- `*p` is borrowed here LL | assert_eq!(*xc, 3); LL | return xc; 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 562ec649a48ec..ed4bc155040f0 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 100ac7633584e..382d932e81add 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 9dafc16808664..f3a0358b90fb0 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 a474270366611..c3e2075fbc37e 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 8d8c218958a27..d31ed3ede36fa 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 7058757f908ed..f8bdd014db7c6 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 51b2330b658f4..1de6f22f08e50 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 d0d41c271c6bd..f43ab82912187 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 47de228e31d24..1b999ed059c40 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.nll.stderr b/src/test/ui/regions/regions-infer-proc-static-upvar.nll.stderr index b44f8c1e7a8dd..803d0d7449108 100644 --- a/src/test/ui/regions/regions-infer-proc-static-upvar.nll.stderr +++ b/src/test/ui/regions/regions-infer-proc-static-upvar.nll.stderr @@ -1,7 +1,7 @@ error[E0597]: `x` does not live long enough --> $DIR/regions-infer-proc-static-upvar.rs:10:13 | -LL | let y = &x; //~ ERROR `x` does not live long enough +LL | let y = &x; | ^^ borrowed value does not live long enough LL | / foo(move|| { LL | | let _a = *y; 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 f929a06bad75d..21b2e881a79a0 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 99d85e9e4b5a6..46200e4d84bcf 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-lifetime-of-struct-or-enum-variant.nll.stderr b/src/test/ui/regions/regions-lifetime-of-struct-or-enum-variant.nll.stderr index 48daff1dbd872..7984f4f0e5464 100644 --- a/src/test/ui/regions/regions-lifetime-of-struct-or-enum-variant.nll.stderr +++ b/src/test/ui/regions/regions-lifetime-of-struct-or-enum-variant.nll.stderr @@ -3,7 +3,7 @@ error[E0515]: cannot return value referencing temporary value | LL | let testValue = &id(Test); | -------- temporary value created here -LL | //~^ ERROR borrowed value does not live long enough +LL | LL | testValue | ^^^^^^^^^ returns a value referencing data owned by the current function @@ -12,7 +12,7 @@ error[E0515]: cannot return value referencing temporary value | LL | let testValue = &id(MyEnum::Variant1); | -------------------- temporary value created here -LL | //~^ ERROR borrowed value does not live long enough +LL | LL | testValue | ^^^^^^^^^ returns a value referencing data owned by the current function diff --git a/src/test/ui/regions/regions-name-duplicated.stderr b/src/test/ui/regions/regions-name-duplicated.stderr index 1b552006a934d..a7e03a61adcf5 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 bf7b021f9fe58..4b7026e65eacc 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 7b041d5dad5eb..4840d751f7f57 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.nll.stderr b/src/test/ui/regions/regions-nested-fns-2.nll.stderr index ebcc31d3a20e9..8627dac54592d 100644 --- a/src/test/ui/regions/regions-nested-fns-2.nll.stderr +++ b/src/test/ui/regions/regions-nested-fns-2.nll.stderr @@ -3,7 +3,7 @@ error[E0597]: `y` does not live long enough | LL | |z| { | --- value captured here -LL | //~^ ERROR E0373 +LL | LL | if false { &y } else { z } | -^ | || diff --git a/src/test/ui/regions/regions-nested-fns-2.stderr b/src/test/ui/regions/regions-nested-fns-2.stderr index 924eac6fdd41e..08bab6e980632 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 d6d4c44de61dd..3cecd4ee83ca5 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 a4197eed22524..c44edf1f03bc3 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 884314f421a1a..b50347ac96427 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.nll.stderr b/src/test/ui/regions/regions-pattern-typing-issue-19552.nll.stderr index 8809cf4b09e52..f77d94a24b88f 100644 --- a/src/test/ui/regions/regions-pattern-typing-issue-19552.nll.stderr +++ b/src/test/ui/regions/regions-pattern-typing-issue-19552.nll.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 | [ word ] => { assert_static(word); } | ------------------- argument requires that `line` is borrowed for `'static` 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 ad80925cad7d2..3e3201db240c9 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 31be3ab4d3d5b..aea7347d53c27 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 5670e5305ebbe..aca3a1ed05728 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 90004e27d95c7..a9916dbe4f5ef 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.nll.stderr b/src/test/ui/regions/regions-ref-in-fn-arg.nll.stderr index bead12356f1f2..ccba6c59b616e 100644 --- a/src/test/ui/regions/regions-ref-in-fn-arg.nll.stderr +++ b/src/test/ui/regions/regions-ref-in-fn-arg.nll.stderr @@ -3,13 +3,13 @@ error[E0515]: cannot return value referencing function parameter | LL | fn arg_item(box ref x: Box) -> &'static isize { | --------- function parameter borrowed here -LL | x //~^ ERROR borrowed value does not live long enough +LL | x | ^ returns a value referencing data owned by the current function error[E0515]: cannot return value referencing function parameter --> $DIR/regions-ref-in-fn-arg.rs:11:22 | -LL | with(|box ref x| x) //~ ERROR borrowed value does not live long enough +LL | with(|box ref x| x) | --------- ^ returns a value referencing data owned by the current function | | | function parameter borrowed here 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 748508ecbcd39..9ecd327510a8d 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.nll.stderr b/src/test/ui/regions/regions-ret.nll.stderr index b8b4ce56bb249..0e4875ac9855b 100644 --- a/src/test/ui/regions/regions-ret.nll.stderr +++ b/src/test/ui/regions/regions-ret.nll.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return reference to temporary value --> $DIR/regions-ret.rs:4:12 | -LL | return &id(3); //~ ERROR borrowed value does not live long enough +LL | return &id(3); | ^----- | || | |temporary value created here diff --git a/src/test/ui/regions/regions-ret.stderr b/src/test/ui/regions/regions-ret.stderr index 001f62ab60cde..77820a34e40b1 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 e4b14811d9075..9cf0b0ffabde5 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.nll.stderr b/src/test/ui/regions/regions-return-stack-allocated-vec.nll.stderr index 1bdcf83521d0a..9d87fe266b158 100644 --- a/src/test/ui/regions/regions-return-stack-allocated-vec.nll.stderr +++ b/src/test/ui/regions/regions-return-stack-allocated-vec.nll.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return reference to temporary value --> $DIR/regions-return-stack-allocated-vec.rs:4:5 | -LL | &[x] //~ ERROR borrowed value does not live long enough +LL | &[x] | ^--- | || | |temporary value created here 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 78eec7cc456e8..3256294473f17 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.nll.stderr b/src/test/ui/regions/regions-steal-closure.nll.stderr index c30f9c52363a6..5b0efaf95597d 100644 --- a/src/test/ui/regions/regions-steal-closure.nll.stderr +++ b/src/test/ui/regions/regions-steal-closure.nll.stderr @@ -4,7 +4,7 @@ error[E0597]: `i` does not live long enough LL | let mut cl_box = { | ---------- borrow later stored here LL | let mut i = 3; -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 | | | value captured here diff --git a/src/test/ui/regions/regions-steal-closure.stderr b/src/test/ui/regions/regions-steal-closure.stderr index dc5c167153525..8cfd5b503121d 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 e1aa2a2c29931..421f826ccc54e 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 dc5ce34d7d89a..3b30ddd16ccc1 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.nll.stderr b/src/test/ui/regions/regions-trait-variance.nll.stderr index ca05c93a7ecea..56c9f89e1f597 100644 --- a/src/test/ui/regions/regions-trait-variance.nll.stderr +++ b/src/test/ui/regions/regions-trait-variance.nll.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return value referencing local data `*b` --> $DIR/regions-trait-variance.rs:38:5 | -LL | let bb: &B = &*b; //~ ERROR `*b` does not live long enough +LL | let bb: &B = &*b; | --- `*b` is borrowed here LL | make_a(bb) | ^^^^^^^^^^ returns a value referencing data owned by the current function diff --git a/src/test/ui/regions/regions-trait-variance.stderr b/src/test/ui/regions/regions-trait-variance.stderr index ddc8ce9796d60..32c89b8eeff52 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 7e35dc1c4741a..495aec3fde5f1 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.nll.stderr b/src/test/ui/regions/regions-var-type-out-of-scope.nll.stderr index e38574e774d14..146fb8fd81fc6 100644 --- a/src/test/ui/regions/regions-var-type-out-of-scope.nll.stderr +++ b/src/test/ui/regions/regions-var-type-out-of-scope.nll.stderr @@ -1,7 +1,7 @@ error[E0716]: temporary value dropped while borrowed --> $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 is freed at the end of this statement | | | creates a temporary which is freed while still in use 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 f474b9a2343cf..0363fe0d19f1c 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 20615e6a3d7b2..e135007604b86 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 da8d218819192..e7c106cbbe3d1 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 74a6aee262765..e5e5261ba993f 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 2332acdf83215..2a2d5d019a129 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 f1d1a14f52b8b..90b37ce935a6d 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 c26895773761e..3dc1c4dcd22d2 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 1782d3b310582..7dacc1f274025 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 884a99357cdbe..cc046e04de542 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 f1a5d88ace1fd..641f117a71710 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 59f8b359d1f56..df001d6b5f2a4 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 5b7f9650d0c0a..c3fb1d9e21e6f 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 1aafa43624926..9b48bb3a43d2a 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 02bf2154fe593..2ecee838be146 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 46d3478b62841..3e082e53ca835 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 5d080d989446f..057aac25234d2 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 1c8d959d60d68..13752430e714b 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 fb61abc950546..29a63fdd11fe5 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 55bd555676ab2..49f7ae844910e 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 57ad5f22f4c24..68d35f3b5fefb 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 9dbab6917c7e8..60a6f904610b6 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 906ac2808aa90..9a46f0d774262 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 5bb9371da6d2e..51793f426d6d4 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 f39e1edb61347..852b9c6afff3e 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 519e7a946e14c..32b85f202f1da 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 24889a0a820ea..a0a858209019d 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 5e190bf318530..7b9fb6c63f677 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 20346d5aefe78..c75718149fa4e 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 fecfd922347b3..72a8e443bac9f 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 1f5887e1352e7..765f150ebc745 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 1940c0cd2a4b7..58e851e5c12ca 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 b93005849f430..173976d707c70 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 481ed88288971..d568117d67626 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 035a5ede45384..52a3117ff3ac1 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 b0827ea7367c2..9452e2d68deca 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 f299aa40a31ef..fc701b1644d1d 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 dcbb8dfe665ce..8d2fdd530f10e 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 855aa501082b1..3c58285bdb352 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 2862ae641df15..3dd029c14c0fd 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 763b3d987d7cf..6e8c9ed40bbee 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 19eccac343380..befc57563a9c5 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 23a56bf8fec11..7f6749fc9ccb5 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 c1be04ca881e8..31b90340d79f7 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 2f05f9b0f7a18..72a58a04170fc 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 a99f852d99bca..18115541af951 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/borrowck-issue-49631.nll.stderr b/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.nll.stderr index 3a6f66ca4dac5..04572920ee414 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.nll.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/borrowck-issue-49631.nll.stderr @@ -5,7 +5,7 @@ LL | while let Some(Ok(string)) = foo.get() { | --- immutable borrow occurs here LL | foo.mutate(); | ^^^^^^^^^^^^ mutable borrow occurs here -LL | //~^ ERROR cannot borrow `foo` as mutable +LL | LL | println!("foo={:?}", *string); | ------- immutable borrow later used here 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 7ce8a3256327e..210b4f6be63d0 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.nll.stderr b/src/test/ui/rfc-2005-default-binding-mode/enum.nll.stderr index 5920be4132a96..d6a89006bc0fb 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/enum.nll.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/enum.nll.stderr @@ -1,19 +1,19 @@ error[E0594]: cannot assign to `*x` which is behind a `&` reference --> $DIR/enum.rs:9:5 | -LL | *x += 1; //~ ERROR cannot assign to immutable +LL | *x += 1; | ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written error[E0594]: cannot assign to `*x` which is behind a `&` reference --> $DIR/enum.rs:13:9 | -LL | *x += 1; //~ ERROR cannot assign to immutable +LL | *x += 1; | ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written error[E0594]: cannot assign to `*x` which is behind a `&` reference --> $DIR/enum.rs:19:9 | -LL | *x += 1; //~ ERROR cannot assign to immutable +LL | *x += 1; | ^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written error: aborting due to 3 previous errors 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 d29b0111d8bb2..5106618af64d0 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.nll.stderr b/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.nll.stderr index 2206c2f340e14..a6f2f3ec30968 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.nll.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/explicit-mut.nll.stderr @@ -1,19 +1,19 @@ error[E0594]: cannot assign to `*n` which is behind a `&` reference --> $DIR/explicit-mut.rs:7:13 | -LL | *n += 1; //~ ERROR cannot assign to immutable +LL | *n += 1; | ^^^^^^^ `n` is a `&` reference, so the data it refers to cannot be written error[E0594]: cannot assign to `*n` which is behind a `&` reference --> $DIR/explicit-mut.rs:15:13 | -LL | *n += 1; //~ ERROR cannot assign to immutable +LL | *n += 1; | ^^^^^^^ `n` is a `&` reference, so the data it refers to cannot be written error[E0594]: cannot assign to `*n` which is behind a `&` reference --> $DIR/explicit-mut.rs:23:13 | -LL | *n += 1; //~ ERROR cannot assign to immutable +LL | *n += 1; | ^^^^^^^ `n` is a `&` reference, so the data it refers to cannot be written 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 e03f67760d7e7..b6424f842648f 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 b78b4432bbe31..9be1876b7145b 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 9d35e167075ae..1bf9b09fcc5ef 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 e24c8f1555901..f1e91a05f082f 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 1d055fe8d4cb8..ff082e6fc429e 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 4532b5c34cc0f..6213c392a9b47 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 850e7caec5483..3368e35d304f0 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 e4f4b58fb33ae..26cbeeaf5acde 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 c8e730090fc31..e81d10a66dff3 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 a5bee93a1509d..c87ef6c391b11 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 2149e0533c616..611df047cffc3 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 46793b1690a87..8e9b158ab7c9d 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 b694b7a95436e..cbff2b777fe71 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 d70fad9d83047..adf62651cacb1 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 b3a827f38c557..106db765f7ead 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 76d18bbee9d6b..6b143ba7eb963 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 2900a29ed7c07..4d8f7b7c8c465 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 e8b822df95032..17d7c014e1029 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 56a2f873c768b..fc4b1a223294d 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 73d2420af00dd..8a91c44c5806e 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 41a8de2d84bcf..adb1c4a629042 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 d10f7ed28fc2d..8701408566759 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 4b7732251b0d0..be8b5c6446cad 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 9cabc973d1a96..9a3ba2d65cad7 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 6142228664a4f..5389beea3a70c 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 0831f3acef283..2f3ef48a05441 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 2485c7c3659a0..8130f5de5587d 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 62b546adfc145..0be14a6956f45 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 15ff6009e5c60..9ae05dab74d5e 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 23485f7a55990..e4c47901455c9 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 e9de20edb5051..eb4b9dea41bdd 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 23aeb92f4871d..64b920e9aa7e6 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 b4982d5083c64..bfce180789cb1 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 3bea7816b3061..4e3fff98e6f4b 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 d32835a49f88d..396a798c8204f 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 3080359192603..9ca60e8e0a955 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 4163c2876074b..861b3f1d4fd1e 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.nll.stderr b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.nll.stderr index 5a730ad2be42c..5f0b3a1d40b7e 100644 --- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.nll.stderr +++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.nll.stderr @@ -5,7 +5,7 @@ LL | let a = NoCopy(0); | - move occurs because `a` has type `NoCopy`, which does not implement the `Copy` trait 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: 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/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr index 5f3a6b414e048..cfc318c1cd0f3 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 bd41f7b340530..ecab673953d6d 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 5aa34bca13011..b323104048f66 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 d36b3a746e6a7..d15caeb669811 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 bed9076d84cbe..347e5e97d7a06 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 61e1facd30e5d..d3e450e9be0b5 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 b33c043c9ea25..b149533775633 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 5a3e00ab1d96a..fa79df49fb665 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 6be0052046583..e1f099e91907b 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 413e199cd646c..4d666d22afed1 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 7f3f6ccf39e07..49aaff620d66f 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 fafb35ec50d6d..666864a18af88 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 759977b3f0629..40f3d6bf1cf1e 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 55213a77a2c0e..c3e459606e107 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 53ea9e6457268..19e87b664cc9e 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 e4c17680c90a5..e2ffeaee4b423 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 4a01ba5088f62..db176876382d6 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 8bbc8f33039b9..b4ac15c588ebd 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 3d7176265a27e..adde635903515 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 293d0ec6a7208..b1c0b461db4ad 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 684f5fceac15f..e1000e588fa0c 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 40b8fcf7158eb..fc6453193bc98 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 fdfea416b12f1..a61af699cdc33 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 7a1caf3c40fe7..8b302692053a2 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 005f68fa2e64d..a8906ad3bc551 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 c6b9cf77e5887..dcbc0e1feb213 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 4eecce6d3d31c..3880388341445 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 11ade798ba478..86976a2c932d1 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 4b8fd7037795a..f91cfe5eb621b 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 954d240e71b63..5ce6a81bfcfd7 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 55c8796e158f0..eedec6896f474 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 81ba1abcd6dcb..2e7d901640e84 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 38b604af29000..e05da17983f83 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 60e474a845fe0..7c66fdf60b1d4 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 5d0fc912d95c3..71197efcaba54 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 5e309cea6ef16..027afcb981a0d 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 898c3a0aa95c8..3113d4a872d8f 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 21bbbe693466d..d357afa3b3841 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 7e23d75c4e589..bec24be07af63 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 0199074ad64d2..4bf08534b8c48 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 094894bf2d1ec..8115a1e64011f 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 5bd4efb6bb1e1..48bd9f19126b2 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 f0e4ac411c2ba..9c93da4627156 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 7d3fc82abf40b..047e0591e4b9a 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 7a1af1323d8dd..6f0ba02b5067b 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 3f9d907ade679..650a9b4600ea2 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 ef0eeb7a8da3f..561feb90f0a54 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.nll.stderr b/src/test/ui/slice-mut-2.nll.stderr index eeef23e694b7a..bad0268772b79 100644 --- a/src/test/ui/slice-mut-2.nll.stderr +++ b/src/test/ui/slice-mut-2.nll.stderr @@ -4,7 +4,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference LL | let x: &[isize] = &[1, 2, 3, 4, 5]; | ---------------- help: consider changing this to be a mutable reference: `&mut [1, 2, 3, 4, 5]` ... -LL | let _ = &mut x[2..4]; //~ERROR cannot borrow immutable borrowed content `*x` as mutable +LL | let _ = &mut x[2..4]; | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to previous error diff --git a/src/test/ui/slice-mut-2.stderr b/src/test/ui/slice-mut-2.stderr index 07a8bd7699ec2..78dbfa56d45da 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 5906a05c32c97..6b5890cac36c5 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 4cb9eb308022e..d4a5e7400d2a4 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 acb7cd2a557dc..5a981a4a6e48f 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 8502776eb1687..f52c3f9f2c043 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 18e2104f7ad85..820b0d7441b4a 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 53e8637ea3025..5478c3fbcdda3 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.nll.stderr b/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.nll.stderr index 0aa44fa3a3ae0..0a9bc3ac51c65 100644 --- a/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.nll.stderr +++ b/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.nll.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable | LL | fn deref_mut_field1(x: Own) { | - help: consider changing this to be mutable: `mut x` -LL | let __isize = &mut x.y; //~ ERROR cannot borrow +LL | let __isize = &mut x.y; | ^ cannot borrow as mutable error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference @@ -11,7 +11,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference | LL | fn deref_extend_mut_field1(x: &Own) -> &mut isize { | ----------- help: consider changing this to be a mutable reference: `&mut Own` -LL | &mut x.y //~ ERROR cannot borrow +LL | &mut x.y | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed 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); | -- first borrow later used here @@ -29,7 +29,7 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable | LL | fn assign_field1<'a>(x: Own) { | - help: consider changing this to be mutable: `mut x` -LL | x.y = 3; //~ ERROR cannot borrow +LL | x.y = 3; | ^ cannot borrow as mutable error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference @@ -37,7 +37,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference | LL | fn assign_field2<'a>(x: &'a Own) { | -------------- help: consider changing this to be a mutable reference: `&'a mut Own` -LL | x.y = 3; //~ ERROR cannot borrow +LL | x.y = 3; | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0499]: cannot borrow `*x` as mutable more than once at a time @@ -45,7 +45,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); | -- first borrow later used here @@ -55,7 +55,7 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable | LL | fn deref_mut_method1(x: Own) { | - help: consider changing this to be mutable: `mut x` -LL | x.set(0, 0); //~ ERROR cannot borrow +LL | x.set(0, 0); | ^ cannot borrow as mutable error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference @@ -63,7 +63,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference | LL | fn deref_extend_mut_method1(x: &Own) -> &mut isize { | ----------- help: consider changing this to be a mutable reference: `&mut Own` -LL | x.y_mut() //~ ERROR cannot borrow +LL | x.y_mut() | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable @@ -71,7 +71,7 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable | LL | fn assign_method1<'a>(x: Own) { | - help: consider changing this to be mutable: `mut x` -LL | *x.y_mut() = 3; //~ ERROR cannot borrow +LL | *x.y_mut() = 3; | ^ cannot borrow as mutable error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference @@ -79,7 +79,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference | LL | fn assign_method2<'a>(x: &'a Own) { | -------------- help: consider changing this to be a mutable reference: `&'a mut Own` -LL | *x.y_mut() = 3; //~ ERROR cannot borrow +LL | *x.y_mut() = 3; | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to 10 previous errors 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 e0524be6b0c46..63baa7c8cb528 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.nll.stderr b/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.nll.stderr index ef80e4bc3d645..3ebfba7e4debe 100644 --- a/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.nll.stderr +++ b/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.nll.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable | LL | fn deref_mut1(x: Own) { | - help: consider changing this to be mutable: `mut x` -LL | let __isize = &mut *x; //~ ERROR cannot borrow +LL | let __isize = &mut *x; | ^ cannot borrow as mutable error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference @@ -11,7 +11,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference | LL | fn deref_extend_mut1<'a>(x: &'a Own) -> &'a mut isize { | -------------- help: consider changing this to be a mutable reference: `&'a mut Own` -LL | &mut **x //~ ERROR cannot borrow +LL | &mut **x | ^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable @@ -19,7 +19,7 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable | LL | fn assign1<'a>(x: Own) { | - help: consider changing this to be mutable: `mut x` -LL | *x = 3; //~ ERROR cannot borrow +LL | *x = 3; | ^ cannot borrow as mutable error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference @@ -27,7 +27,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference | LL | fn assign2<'a>(x: &'a Own) { | -------------- help: consider changing this to be a mutable reference: `&'a mut Own` -LL | **x = 3; //~ ERROR cannot borrow +LL | **x = 3; | ^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to 4 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 46d11065a86e5..77f3982b2b418 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.nll.stderr b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.nll.stderr index e752a467edcf3..80dc3ef2f80f2 100644 --- a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.nll.stderr +++ b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.nll.stderr @@ -6,7 +6,7 @@ LL | f(Box::new(|| { | | | first mutable borrow occurs here | first borrow later used by call -LL | //~^ ERROR: cannot borrow `f` as mutable more than once +LL | LL | f((Box::new(|| {}))) | - second borrow occurs due to use of `f` in closure 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 d81d402fce733..6c8f477e31062 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.nll.stderr b/src/test/ui/span/borrowck-call-method-from-mut-aliasable.nll.stderr index 16c482b575aae..6b5e0779e5fa5 100644 --- a/src/test/ui/span/borrowck-call-method-from-mut-aliasable.nll.stderr +++ b/src/test/ui/span/borrowck-call-method-from-mut-aliasable.nll.stderr @@ -4,7 +4,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference LL | fn b(x: &Foo) { | ---- help: consider changing this to be a mutable reference: `&mut Foo` LL | x.f(); -LL | x.h(); //~ ERROR cannot borrow +LL | x.h(); | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to previous error 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 4875e27ef4552..440c5c9c7c9d1 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.nll.stderr b/src/test/ui/span/borrowck-object-mutability.nll.stderr index 1a5802e98114d..fe6014cd5ad83 100644 --- a/src/test/ui/span/borrowck-object-mutability.nll.stderr +++ b/src/test/ui/span/borrowck-object-mutability.nll.stderr @@ -4,7 +4,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference LL | fn borrowed_receiver(x: &Foo) { | ---- help: consider changing this to be a mutable reference: `&mut dyn Foo` LL | x.borrowed(); -LL | x.borrowed_mut(); //~ ERROR cannot borrow +LL | x.borrowed_mut(); | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `*x` as mutable, as `x` is not declared as mutable @@ -13,7 +13,7 @@ error[E0596]: cannot borrow `*x` as mutable, as `x` is not declared as mutable LL | fn owned_receiver(x: Box) { | - help: consider changing this to be 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/borrowck-object-mutability.stderr b/src/test/ui/span/borrowck-object-mutability.stderr index e846331dc0b86..073a70e361067 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.nll.stderr b/src/test/ui/span/destructor-restrictions.nll.stderr index 981c5a23816fa..a3c6cfb6ae447 100644 --- a/src/test/ui/span/destructor-restrictions.nll.stderr +++ b/src/test/ui/span/destructor-restrictions.nll.stderr @@ -6,7 +6,7 @@ LL | *a.borrow() + 1 | | | borrowed value does not live long enough | a temporary with access to the borrow is created here ... -LL | }; //~^ ERROR `*a` does not live long enough +LL | }; | -- ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `std::cell::Ref<'_, i32>` | | | `*a` dropped here while still borrowed diff --git a/src/test/ui/span/destructor-restrictions.stderr b/src/test/ui/span/destructor-restrictions.stderr index 8fec877467813..a82e24b9391e2 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 aae71799e30f2..b2bacc7f6789e 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.nll.stderr b/src/test/ui/span/dropck_direct_cycle_with_drop.nll.stderr index 5774ac13cb7e5..07ae138ac71ea 100644 --- a/src/test/ui/span/dropck_direct_cycle_with_drop.nll.stderr +++ b/src/test/ui/span/dropck_direct_cycle_with_drop.nll.stderr @@ -17,7 +17,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 | } | - | | 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 bc4b517c51d6e..497924208ab72 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 35e4314d0c66f..7f902388fac15 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 9c4c12ba07687..45d14f32f96e1 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 cff71bf2e62de..a02a1edc13499 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.nll.stderr b/src/test/ui/span/issue-11925.nll.stderr index f5e329f6c397e..1d317fc331f73 100644 --- a/src/test/ui/span/issue-11925.nll.stderr +++ b/src/test/ui/span/issue-11925.nll.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return reference to local data `x` --> $DIR/issue-11925.rs:8:35 | -LL | let f = to_fn_once(move|| &x); //~ ERROR does not live long enough +LL | let f = to_fn_once(move|| &x); | ^^ returns a reference to data owned by the current function error: aborting due to previous error diff --git a/src/test/ui/span/issue-11925.stderr b/src/test/ui/span/issue-11925.stderr index 46e2a41b3c34d..c75022261a80f 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 964e323b83ed4..0864497911d30 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 135d8150c34ed..6d8320bc053c6 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 1fcb839d17059..c99231a5336b6 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 dbb1743ec0ef8..24dfdf8ebc299 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 9b3b68f6ff46a..c5b6245572c67 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 b2b494a2c9c34..05b2ca90570e2 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 f91f2a50e8595..0bbff45436c23 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 1899a4e55d5ab..8923de5705b18 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 8daef82f8bbd8..1438b95d73341 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 7f16cfae859ed..ac8107990c2bd 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 f6c303164bfd1..128e4ec1212ca 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 965ca7000be80..39b3edc67033d 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 bf19eb6946189..f1a29bed32b1c 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 f09e052f6530f..e2226b197aeb8 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 ee392f5994c84..dd322fe833b49 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 18b6cd06afbbb..6495d9bc73977 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.nll.stderr b/src/test/ui/span/mut-arg-hint.nll.stderr index e0fa3c3a1e6f5..8027cf69cf4bc 100644 --- a/src/test/ui/span/mut-arg-hint.nll.stderr +++ b/src/test/ui/span/mut-arg-hint.nll.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference | LL | fn foo(mut a: &String) { | ------- help: consider changing this to be a mutable reference: `&mut std::string::String` -LL | a.push_str("bar"); //~ ERROR cannot borrow immutable borrowed content +LL | a.push_str("bar"); | ^ `a` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference @@ -11,7 +11,7 @@ error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference | LL | pub fn foo<'a>(mut a: &'a String) { | ---------- help: consider changing this to be a mutable reference: `&'a mut String` -LL | a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content +LL | a.push_str("foo"); | ^ `a` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference @@ -19,7 +19,7 @@ error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference | LL | pub fn foo(mut a: &String) { | ------- help: consider changing this to be a mutable reference: `&mut std::string::String` -LL | a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content +LL | a.push_str("foo"); | ^ `a` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to 3 previous errors diff --git a/src/test/ui/span/mut-arg-hint.stderr b/src/test/ui/span/mut-arg-hint.stderr index ea6fc8bee637b..ce5786186ea53 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/mut-ptr-cant-outlive-ref.nll.stderr b/src/test/ui/span/mut-ptr-cant-outlive-ref.nll.stderr index d3ba848fe6bb7..21b29464df502 100644 --- a/src/test/ui/span/mut-ptr-cant-outlive-ref.nll.stderr +++ b/src/test/ui/span/mut-ptr-cant-outlive-ref.nll.stderr @@ -5,7 +5,7 @@ LL | p = &*b; | ^ borrowed value does not live long enough LL | } | - `b` dropped here while still borrowed -LL | //~^^ ERROR `b` does not live long enough +LL | LL | p.use_ref(); | - borrow later used here diff --git a/src/test/ui/span/non-existing-module-import.stderr b/src/test/ui/span/non-existing-module-import.stderr index 5ac5df1b4c738..25c09959047a1 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 66afbf253c9b9..065340f446a79 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 3a8f0e60038e5..d240872647e50 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 e3870db0c668e..ef36b81f49364 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.nll.stderr b/src/test/ui/span/regions-escape-loop-via-vec.nll.stderr index e07fb72778210..284981e934195 100644 --- a/src/test/ui/span/regions-escape-loop-via-vec.nll.stderr +++ b/src/test/ui/span/regions-escape-loop-via-vec.nll.stderr @@ -3,9 +3,9 @@ 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` -LL | let mut z = x; //~ ERROR cannot use `x` because it was mutably borrowed +LL | let mut z = x; LL | _y.push(&mut z); | -- borrow later used here @@ -14,8 +14,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` LL | _y.push(&mut z); | -- borrow later used here @@ -39,8 +39,8 @@ LL | let mut _y = vec![&mut x]; ... LL | _y.push(&mut z); | -- borrow later used here -LL | //~^ ERROR `z` does not live long enough -LL | x += 1; //~ ERROR cannot assign +LL | +LL | x += 1; | ^^^^^^ use of borrowed `x` error: aborting due to 4 previous errors 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 09a7123d8f04e..1d604b58d7e79 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.nll.stderr b/src/test/ui/span/send-is-not-static-std-sync.nll.stderr index 54960c16405d5..93473a86b5a59 100644 --- a/src/test/ui/span/send-is-not-static-std-sync.nll.stderr +++ b/src/test/ui/span/send-is-not-static-std-sync.nll.stderr @@ -3,7 +3,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 ... LL | *lock.lock().unwrap() = &z; @@ -16,7 +16,7 @@ LL | *lock.lock().unwrap() = &z; | ^^ borrowed value does not live long enough LL | } | - `z` dropped here while still borrowed -LL | //~^^ ERROR `z` does not live long enough +LL | LL | lock.use_ref(); // (Mutex is #[may_dangle] so its dtor does not use `z` => needs explicit use) | ---- borrow later used here @@ -25,7 +25,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 ... LL | *lock.write().unwrap() = &z; @@ -38,7 +38,7 @@ LL | *lock.write().unwrap() = &z; | ^^ borrowed value does not live long enough LL | } | - `z` dropped here while still borrowed -LL | //~^^ ERROR `z` does not live long enough +LL | LL | lock.use_ref(); // (RwLock is #[may_dangle] so its dtor does not use `z` => needs explicit use) | ---- borrow later used here @@ -47,7 +47,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 ... LL | tx.send(&z).unwrap(); 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 74c2bad24dea2..aa9e1c2de2212 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 40b11695d7528..b14632d4e1bd1 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 7b12c4430ed4a..61d4e06119c4f 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 e07548121b52b..3007d90c99006 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.nll.stderr b/src/test/ui/span/vec-must-not-hide-type-from-dropck.nll.stderr index c5e2ca2e28f39..f87c32d1ad0c6 100644 --- a/src/test/ui/span/vec-must-not-hide-type-from-dropck.nll.stderr +++ b/src/test/ui/span/vec-must-not-hide-type-from-dropck.nll.stderr @@ -17,7 +17,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 | } | - | | 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 1eee88ad21af5..b957243018de4 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 d7914528f4686..ddc13bb1c76ae 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 3b3076cc67230..0b20a19d2e1ca 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 7ca9df9f5d93f..91690f64d948c 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 2778cac7ae571..14a06c39088d4 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 0b0fd2c4af591..861a1d9e8fc66 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 9187d04cfce6a..dcb34f3ad4836 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 b781c35ea391a..ab0bdc44cff1a 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 3b4ae2d821775..1192b0e5cfa53 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 13d656bd060e5..ad33908eff63c 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 d6714375d16e6..baaf7aa43321a 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 c57f98ac74de2..c39986de38dc2 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 b9ab1bd637cc5..947aad824ea88 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 eef8cb44b8882..4275e7bdd85e2 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 d1f48b78864cb..bc1b2aeb70fc7 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 f674797694557..b6c9564e904c4 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 7ffb4bb487a7b..280c72acccb18 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 cd8ea921d3036..77f896a86d58a 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 67f6ef857f179..e98f789f54c7d 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 6f5c844a65713..2bc544d107da0 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 1c759d49b9947..b1c56ef224ae7 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 4b4efe9d8cadd..d85b628c3c349 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 74c1bbfed6f70..5343e3bd537f3 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 1ac772a460189..fc1ed9b8d6131 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.nll.stderr b/src/test/ui/static/static-lifetime-bound.nll.stderr index 9a8a344cbd87e..90d728204e70b 100644 --- a/src/test/ui/static/static-lifetime-bound.nll.stderr +++ b/src/test/ui/static/static-lifetime-bound.nll.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:7 | -LL | f(&x); //~ERROR does not live long enough +LL | f(&x); | --^^- | | | | | borrowed value does not live long enough diff --git a/src/test/ui/static/static-lifetime-bound.stderr b/src/test/ui/static/static-lifetime-bound.stderr index dc8e83610d4b6..b9aa4d8722bfe 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 65c60ceb2e374..8516ac07b6cf3 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 c72295f97ca1c..14ca9f58301e2 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 e97165705ca70..88d62011fc4e8 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 9964e1d98b11f..e7ed0b710b2f3 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 0714df0d11dca..33c1cd6a59506 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 66ee6989b01ef..85e468b333c28 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 84cd6db4c4a94..f6d2385ac69af 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.nll.stderr b/src/test/ui/static/static-reference-to-fn-2.nll.stderr index 2e00c9491d7ca..07c8b48eb1d90 100644 --- a/src/test/ui/static/static-reference-to-fn-2.nll.stderr +++ b/src/test/ui/static/static-reference-to-fn-2.nll.stderr @@ -37,7 +37,7 @@ error[E0515]: cannot return value referencing temporary value LL | / StateMachineIter { LL | | statefn: &id(state1 as StateMachineFunc) | | ------------------------------ temporary value created here -LL | | //~^ ERROR borrowed value does not live long enough +LL | | LL | | } | |_____^ returns a value referencing data owned by the current function 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 d94913c7e2224..17d4a36125781 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.nll.stderr b/src/test/ui/static/static-region-bound.nll.stderr index 0a5686051cda4..15261259ed412 100644 --- a/src/test/ui/static/static-region-bound.nll.stderr +++ b/src/test/ui/static/static-region-bound.nll.stderr @@ -1,7 +1,7 @@ error[E0716]: temporary value dropped while borrowed --> $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); | ^^^^^ creates a temporary which is freed while still in use LL | f(x); | ---- argument requires that borrow lasts for `'static` diff --git a/src/test/ui/static/static-region-bound.stderr b/src/test/ui/static/static-region-bound.stderr index 611f47ddfde75..f6bbfcecf6f1d 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.nll.stderr b/src/test/ui/std-uncopyable-atomics.nll.stderr index 0a5e7c64b1a83..8241f6f1fdbc4 100644 --- a/src/test/ui/std-uncopyable-atomics.nll.stderr +++ b/src/test/ui/std-uncopyable-atomics.nll.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/std-uncopyable-atomics.stderr b/src/test/ui/std-uncopyable-atomics.stderr index ecf9963c145f2..7f01434838c18 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 c4d735915a16c..c644126535d38 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 4ca430a4cde9b..162f0888a2947 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 99df85d92fd96..e388534f132d2 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 c14e9090fef98..ef40faa8e26eb 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 b15ea51bb2d4c..d02ed205e9270 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 045eb610f7d1f..2491296c5eff4 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 5e30a4e403de1..91d000b8672e0 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 7739ef80fc873..aaf2533dc011a 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 edbac000dea01..b3e42a94809d7 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 37ec6c0f015ff..09fc4f7ee586a 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 0d3d633f61cf3..a285a392168c7 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 c2fab714f7c15..6949a0a4a6828 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 0aa85eb7253e8..d6b5af1796403 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 00ef1a7ff9269..f5b79f54001e7 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 dd1dc71f7fd8b..92a88defc52de 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 80824d9847838..0ca64ed40a50b 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 0b1b1e83400a5..72c6d7ae22b4b 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 cda6b7a533f65..0fb02b9c44b51 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 561964bcb24b6..5b0c9305448a7 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 da61fc83c2622..39241b6b3fc1d 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 0895b52998c45..127a650104485 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 cc62316bec185..375678b7cee5c 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 265aa78d53f12..495404af3e8a5 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 e40da787e96ca..077c955431ab1 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 4b51294f86a0f..b1aaab6a75441 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 296fcef0c4a30..6a8b17ca87047 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 f26fb141ccf80..cc3a2b9419caf 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 40ddb5ec53c29..f81c45e2f8da0 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 88a0f9698877f..ead8f94209bdc 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 b7727cf03a4e7..09d58575d97dd 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 2d6dee0621662..657914d1c8c0c 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 0901b71911d43..552fb78cd3fdd 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 36abda2a89bb8..08ae68ea71302 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 ce7a39339767c..d04ce384fe886 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 ebb39224caa58..1b1501331b70c 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 d7196fc21f84e..2357a4387d414 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 38678d7ec2ce4..9fe949b2e7d15 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 037d7867b0dca..a8b35d29c9970 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 184ac9e0e7c78..ebe44a7bee59d 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 d3aeb073cd7a1..da09c3230a1cd 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 0af44502375f2..4676143a06e2f 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 bbb9b51650e02..043d130051d77 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 ca789df9bd187..e23a326d5f889 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 75d3e40e1b2fc..e4fefeb601fe0 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 7bdab439572b5..b63a57a201838 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 40523ee907b88..ac44dad4a888b 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 797a55f65fe18..87ec20f20d789 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 b3de25e87b353..ca12894c04292 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 236f5c4afec39..3662ea976a46d 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 5a9c0898aad18..91c3b3014a200 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 dfaf8186fc38b..05b9fb43fe1bc 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 8a1cc6fa367f5..6176aa03d84da 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 93ca9a27de23b..c35fe2f9458d4 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 fe74ad133405a..62e99225dd902 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.nll.stderr b/src/test/ui/thread-local-mutation.nll.stderr index 0a3664b0d9d40..e5dc0e72edfc7 100644 --- a/src/test/ui/thread-local-mutation.nll.stderr +++ b/src/test/ui/thread-local-mutation.nll.stderr @@ -1,7 +1,7 @@ error[E0594]: cannot assign to immutable static item `S` --> $DIR/thread-local-mutation.rs:11:5 | -LL | S = "after"; //~ ERROR cannot assign to immutable +LL | S = "after"; | ^^^^^^^^^^^ cannot assign error: aborting due to previous error diff --git a/src/test/ui/thread-local-mutation.stderr b/src/test/ui/thread-local-mutation.stderr index bf298523e1b73..685e7c6585a0f 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 dd1de22f3da00..1e9d1609f02b8 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 50a7b5973283c..c5f5f59c32c30 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 62b5b8e2ac239..98ad109a07e8a 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 6b027eecf2682..a61157f21b8e5 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 a180c360b4a74..650b87076981f 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 4831aa158dbc8..4d2fd554a06d1 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 32101239e66c9..e47fe1a8026d5 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 6a6cedb014a7e..301db4fb71c65 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 604db6f7e1899..c6b61eae4a1be 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 fc96f6274393d..f99cc45d8ae94 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 1f64ce76dc6b7..ee2dd5b24afed 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 1595fff618f05..a649a4eee5570 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 5429029c1ec91..9a4cc90f3a5e0 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 eb45a16afb1c8..2aa025cb7a682 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.nll.stderr b/src/test/ui/traits/trait-coercion-generic-regions.nll.stderr index 6092a9dc10d3c..4ee3e4cacc372 100644 --- a/src/test/ui/traits/trait-coercion-generic-regions.nll.stderr +++ b/src/test/ui/traits/trait-coercion-generic-regions.nll.stderr @@ -1,7 +1,7 @@ error[E0597]: `person` does not live long enough --> $DIR/trait-coercion-generic-regions.rs:17:24 | -LL | let person: &str = &person; //~ ERROR `person` does not live long enough +LL | let person: &str = &person; | ^^^^^^^ | | | borrowed value does not live long enough diff --git a/src/test/ui/traits/trait-coercion-generic-regions.stderr b/src/test/ui/traits/trait-coercion-generic-regions.stderr index 23c2a72743eea..2a9ca4f95f0ba 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 bb6d0b6d7f148..7cba4cb63e6b0 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 8ee642974b724..71d5cc26bf141 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 5a50a11086326..84565bdaa135d 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 99da4b7c87af0..c62bcfca94de9 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 95dc6364e13c5..4c63d6097758e 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 c65a9a3ed945c..97e7ed0ebb071 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 ed6aeeb9c898e..c1dd9387ebc48 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 2d2c3843548e9..2570db0212aa1 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 678f4fb595573..3a6bf3dcc8ce8 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 0a0c5ff086b56..a7fe83cb7564a 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 e8bd20019a890..4726b0668e516 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 2c644480f0a54..3b10632b818c7 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 969b16633ce34..3911261083ecc 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 3be72fbfdd722..5234e205a84b5 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 22e9b4d4035ee..c83a2cd71e553 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 c01317f3d5b99..4d61ac67deda8 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 2383175d513bc..f5e47e51526c6 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 ce1aadca597c5..44643e8c8de43 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 7aa9809c07455..a91be8e69ac3a 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 d4b3b6b7d716a..769582a778bcf 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 cee9aa348c38e..61adbf00f7188 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 d6c6697c3c0e5..5b800114aa8d1 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 f906378eb3cbd..5d1c91376868f 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 46bbf1c185889..ce7657f9640b4 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 f4e88fc860acd..c72876e050f05 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 4b34950881a48..e8335fcbed9d0 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 8acc0aaf3ab52..dd19bcd54e328 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.nll.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.nll.stderr index 8b86dd9a4c92a..aac119afda544 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.nll.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.nll.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow `**t` as mutable, as it is behind a `&` reference | LL | fn reborrow_mut<'a>(t: &'a &'a mut i32) -> &'a mut i32 where &'a mut i32: Copy { | --------------- help: consider changing this to be a mutable reference: `&'a mut &'a mut i32` -LL | *t //~ ERROR +LL | *t | ^^ `t` is a `&` reference, so the data it refers to cannot be borrowed as mutable error[E0596]: cannot borrow `**t` as mutable, as it is behind a `&` reference @@ -11,7 +11,7 @@ error[E0596]: cannot borrow `**t` as mutable, as it is behind a `&` reference | LL | fn copy_reborrow_mut<'a>(t: &'a &'a mut i32) -> &'a mut i32 where &'a mut i32: Copy { | --------------- help: consider changing this to be a mutable reference: `&'a mut &'a mut i32` -LL | {*t} //~ ERROR +LL | {*t} | ^^ `t` is a `&` reference, so the data it refers to cannot be borrowed as mutable error: aborting due to 2 previous errors 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 a3995b7edefae..adaeb9b5d5da7 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 f769f23f115fd..7c1a833442748 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 b8e669d4a7c34..68d8129843e66 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 aa055d3dc03f5..3de683e5661aa 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 6518e90287881..2f4b2df24cd54 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 fb1db76b13890..524eb7feaafbd 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 b1b925d694ff9..a236cb90557b4 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 df8e646280c9a..6687bd9d9e1ff 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 7394fec6f3660..c94e43131faf0 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 089347073b5c6..936e0fe19bafe 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 b4f17778b2983..026df15eb877a 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 dafbde6a5150b..665a6262d3ae7 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 a0bc45d4fcd5c..ec0128dbdf0fc 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 438b3c2e343ff..7dfa1a7d3a0c0 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 9a2052f72835d..9f120e009485e 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 9a3e384b9d1c9..a0ea0e0a30a72 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 80f0ddc0e4fcd..78176c67ed201 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 fbc01744fe445..e105aad09e6b5 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 58d0862be6d21..bbdf9ceed23a2 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 c6ec96ebb7d3b..10a4b44084a48 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 b13e400105210..3cc844365fdd0 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 8ce367d70f014..a22d25697d8bd 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 db99d1ec07be3..bc5a923a3f32f 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 e52e2bc5e9a78..992974eef6428 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 f681a0423024d..150e19020fea4 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 a290e69e0cb6f..eeaca5300f9b6 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 a2df3dcd8e708..17be67c6c3a0d 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 a4f1c4d5d4df2..2b3f0696f3c22 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 d63abdbeb5d4c..254875fcaab3a 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 a4ae2a97134e7..3461ab4df60bb 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 9f59e7162e072..69b531d0c846e 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 45142b556ecd9..5971f56c97f7d 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 0af777fdcf907..5040b728c539a 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 0b239e91eb804..7aea9db6167a3 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 e1b8ff70a6315..b3b78424fd904 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 3d50c2c8baf8d..15db94ef1e3c3 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 69288ea491da1..4e8134da2ddf4 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 e73b1fb029ce8..29a438a23c7ab 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 b1ecc1f91cbcf..72bf372e561d6 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 4c7aa00565adf..f15bdc16d5144 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 bb63917fc0860..f1118709962a4 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 41bf3fd1c4460..8755bcded9d2f 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 bf40eaad65390..5a38883490959 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 3f7e4a674e65a..a31ee83ae1ccc 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 2bfb4110603f5..154b4042c681d 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 736e1b8da7f3c..a850cc7b377d0 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 759a16cdafde9..2187c61fabf15 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 3cd1cac71fa76..799dbf7a6d20f 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 5a662e0ea89c2..313e198e39e36 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.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closure-illegal-move.nll.stderr index 0e996902d621d..934d057ea0923 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-illegal-move.nll.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-illegal-move.nll.stderr @@ -3,7 +3,7 @@ error[E0507]: cannot move out of captured 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 variable in an `Fn` closure error[E0507]: cannot move out of captured variable in an `FnMut` closure @@ -11,7 +11,7 @@ error[E0507]: cannot move out of captured 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 variable in an `FnMut` closure error[E0507]: cannot move out of captured variable in an `Fn` closure @@ -19,7 +19,7 @@ error[E0507]: cannot move out of captured 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 variable in an `Fn` closure error[E0507]: cannot move out of captured variable in an `FnMut` closure @@ -27,7 +27,7 @@ error[E0507]: cannot move out of captured 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 variable in an `FnMut` closure error: aborting due to 4 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 ae83242d5349a..7620f6a3cbee0 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.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.nll.stderr index 51a0a6e575646..3e7f79040fe8a 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.nll.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-immutable-capture.nll.stderr @@ -3,7 +3,7 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable | LL | let x = 0; | - help: consider changing this to be mutable: `mut x` -LL | move || x = 1; //~ ERROR cannot assign +LL | move || x = 1; | ^^^^^ cannot assign error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable @@ -11,8 +11,8 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable | LL | let x = 0; | - help: consider changing this to be mutable: `mut x` -LL | move || x = 1; //~ ERROR cannot assign -LL | move || set(&mut x); //~ ERROR cannot borrow +LL | move || x = 1; +LL | move || set(&mut x); | ^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to `x`, as it is not declared as mutable @@ -21,7 +21,7 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable LL | let x = 0; | - help: consider changing this to be mutable: `mut x` ... -LL | move || x = 1; //~ ERROR cannot assign +LL | move || x = 1; | ^^^^^ cannot assign error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable @@ -30,7 +30,7 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable LL | let x = 0; | - help: consider changing this to be mutable: `mut x` ... -LL | move || set(&mut x); //~ ERROR cannot borrow +LL | move || set(&mut x); | ^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to `x`, as it is not declared as mutable @@ -39,7 +39,7 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable LL | let x = 0; | - help: consider changing this to be mutable: `mut x` ... -LL | || x = 1; //~ ERROR cannot assign +LL | || x = 1; | ^^^^^ cannot assign error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable @@ -48,7 +48,7 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable LL | let x = 0; | - help: consider changing this to be mutable: `mut x` ... -LL | || set(&mut x); //~ ERROR cannot assign +LL | || set(&mut x); | ^^^^^^ cannot borrow as mutable error[E0594]: cannot assign to `x`, as it is not declared as mutable @@ -57,7 +57,7 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable LL | let x = 0; | - help: consider changing this to be mutable: `mut x` ... -LL | || x = 1; //~ ERROR cannot assign +LL | || x = 1; | ^^^^^ cannot assign error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable @@ -66,7 +66,7 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable LL | let x = 0; | - help: consider changing this to be mutable: `mut x` ... -LL | || set(&mut x); //~ ERROR cannot assign +LL | || set(&mut x); | ^^^^^^ cannot borrow as mutable error: aborting due to 8 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 1865e2486f14e..e4aa54032e3f8 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 fc45520851889..0d3766426bd2f 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.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closure-region.nll.stderr index 1c55a6bb08eb5..b40b2f67d9bad 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-region.nll.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-region.nll.stderr @@ -4,7 +4,7 @@ error[E0597]: `x` does not live long enough LL | let _f = { | -- borrow later stored here LL | let x = 0; -LL | || x //~ ERROR `x` does not live long enough +LL | || x | -- ^ borrowed value does not live long enough | | | value captured here diff --git a/src/test/ui/unboxed-closures/unboxed-closure-region.stderr b/src/test/ui/unboxed-closures/unboxed-closure-region.stderr index a0f009c0689c9..f710342e2ce5d 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 e631c33678863..8c3480744fe3d 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 84ed797450c24..304339c89e644 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.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closures-borrow-conflict.nll.stderr index a47d33d29e158..21d6b4fde7e90 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-borrow-conflict.nll.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-borrow-conflict.nll.stderr @@ -5,7 +5,7 @@ LL | let f = || x += 1; | -- - borrow occurs due to use of `x` in closure | | | 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` LL | f; | - borrow later used here 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 461eebc59c029..ac0e4ff13c7e4 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.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.nll.stderr index 1749c20b582b0..19cb2cb733814 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.nll.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.nll.stderr @@ -34,7 +34,7 @@ LL | let mut factorial: Option u32 + 'static>> = None; LL | LL | let f = |x: u32| -> u32 { | --------------- value captured here -LL | //~^ ERROR closure may outlive the current function, but it borrows `factorial` +LL | LL | let g = factorial.as_ref().unwrap(); | ^^^^^^^^^ borrowed value does not live long enough ... @@ -49,7 +49,7 @@ LL | let mut factorial: Option u32 + 'static>> = None; LL | LL | let f = |x: u32| -> u32 { | --------------- borrow of `factorial` occurs here -LL | //~^ ERROR closure may outlive the current function, but it borrows `factorial` +LL | LL | let g = factorial.as_ref().unwrap(); | --------- borrow occurs due to use in closure ... 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 85d98c18d7ffd..47fe0ee72dc88 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 bf43dc62744f3..526055ba04b65 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 384cd090cb3c7..9287353245e98 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.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.nll.stderr index 89ac402b5e02b..1e1172cdbf2fc 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.nll.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.nll.stderr @@ -10,10 +10,10 @@ LL | tick1(); error[E0596]: cannot borrow `tick2` as mutable, as it is not declared 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: consider changing this to be mutable: `mut tick2` ... -LL | tick2(); //~ ERROR cannot borrow +LL | tick2(); | ^^^^^ cannot borrow as mutable error: aborting due to 2 previous errors 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 bc839d7b53622..c90c150749884 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.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.nll.stderr index 9c0a71e73f522..eb398628846dd 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.nll.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.nll.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow `tick` as mutable, as it is not declared as mutable | LL | let tick = || counter += 1; | ---- help: consider changing this to be mutable: `mut tick` -LL | tick(); //~ ERROR cannot borrow immutable local variable `tick` as mutable +LL | tick(); | ^^^^ cannot borrow as mutable error: aborting due to previous error 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 d4d285275e9e2..33e2154485850 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.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.nll.stderr index fa3426a1f7096..b9d76d9a752ce 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.nll.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-move-missing-mut.nll.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow `tick` as mutable, as it is not declared as mutable | LL | let tick = move || counter += 1; | ---- help: consider changing this to be mutable: `mut tick` -LL | tick(); //~ ERROR cannot borrow immutable local variable `tick` as mutable +LL | tick(); | ^^^^ cannot borrow as mutable 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 2137f9904ce16..585577ae82aa3 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 52650903ba3f2..0b9aa61a765fa 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 23d61c33ffe06..20773d561f9f2 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.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.nll.stderr index 9b2f1cd4ae339..6bba38510b676 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.nll.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.nll.stderr @@ -3,7 +3,7 @@ error[E0594]: cannot assign to `n`, as it is not declared as mutable | LL | let n = 0; | - help: consider changing this to be mutable: `mut n` -LL | let mut f = to_fn_mut(|| { //~ ERROR closure cannot assign +LL | let mut f = to_fn_mut(|| { LL | n += 1; | ^^^^^^ cannot assign @@ -13,7 +13,7 @@ error[E0594]: cannot assign to `n`, as it is not declared as mutable LL | let n = 0; | - help: consider changing this to be mutable: `mut n` ... -LL | n += 1; //~ ERROR cannot assign +LL | n += 1; | ^^^^^^ cannot assign error[E0594]: cannot assign to `n`, as it is not declared as mutable @@ -22,13 +22,13 @@ error[E0594]: cannot assign to `n`, as it is not declared as mutable LL | let n = 0; | - help: consider changing this to be mutable: `mut n` LL | let mut f = to_fn(move || { -LL | n += 1; //~ ERROR cannot assign +LL | n += 1; | ^^^^^^ cannot assign error[E0594]: cannot assign to `n`, as it is a captured variable in a `Fn` closure --> $DIR/unboxed-closures-mutate-upvar.rs:53:9 | -LL | n += 1; //~ ERROR cannot assign +LL | n += 1; | ^^^^^^ cannot assign | help: consider changing this to accept closures that implement `FnMut` @@ -36,7 +36,7 @@ help: consider changing this to accept closures that implement `FnMut` | 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-mutate-upvar.stderr b/src/test/ui/unboxed-closures/unboxed-closures-mutate-upvar.stderr index 99fc287b1eefa..055a1748db627 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 1fccbb9c85727..2e1845888a2f7 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 82e8c63ce27e4..df31a8d6104e3 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 e0ddae4cc8994..eb918b25d2bef 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 7722963293f30..d9a129a2d7b22 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 29fb9157b681e..241c3d3d8ce61 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 904c6c23def16..1ea9c423e5a6f 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 4eb959311ca48..69a9fd7a60c93 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 ec9fe6ad9ae1b..ed61bdfdddab3 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 2b19c6865dc0f..6bbdc71195a50 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 e0c2c89c08c3d..104e63884777f 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 b653b30bf6b76..76c14ccc14b45 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 e4ff653f3ad42..4b38a26f957f9 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 57fe2456f4cc5..1a3ea4af7e12e 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 200cf2a994d82..be6ed8d56232e 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 36dab0c43eb76..a39af7832f8c9 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 2424252af2ad3..45976f8ac56ad 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 fec95ca149431..533cf595ef0c2 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 eaae024cbf915..3e5329cfb3011 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.nll.stderr b/src/test/ui/union/union-borrow-move-parent-sibling.nll.stderr index 29d161fe150e7..70860c822ebda 100644 --- a/src/test/ui/union/union-borrow-move-parent-sibling.nll.stderr +++ b/src/test/ui/union/union-borrow-move-parent-sibling.nll.stderr @@ -3,7 +3,7 @@ error[E0502]: cannot borrow `u` (via `u.y`) as immutable because it is also borr | LL | let a = &mut u.x.0; | ---------- mutable borrow occurs here (via `u.x.0`) -LL | let b = &u.y; //~ ERROR cannot borrow `u.y` +LL | let b = &u.y; | ^^^^ immutable borrow of `u.y` -- which overlaps with `u.x.0` -- occurs here LL | use_borrow(a); | - mutable borrow later used here @@ -17,7 +17,7 @@ LL | let u = U { x: ((Vec::new(), Vec::new()), Vec::new()) }; | - move occurs because `u` has type `U`, which does not implement the `Copy` trait 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 error[E0502]: cannot borrow `u` (via `u.y`) as immutable because it is also borrowed as mutable (via `u.x.0.0`) @@ -25,7 +25,7 @@ error[E0502]: cannot borrow `u` (via `u.y`) as immutable because it is also borr | LL | let a = &mut (u.x.0).0; | -------------- mutable borrow occurs here (via `u.x.0.0`) -LL | let b = &u.y; //~ ERROR cannot borrow `u.y` +LL | let b = &u.y; | ^^^^ immutable borrow of `u.y` -- which overlaps with `u.x.0.0` -- occurs here LL | use_borrow(a); | - mutable borrow later used here @@ -39,7 +39,7 @@ LL | let u = U { x: ((Vec::new(), Vec::new()), Vec::new()) }; | - move occurs because `u` has type `U`, which does not implement the `Copy` trait 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 error[E0502]: cannot borrow `u` (via `u.x`) as immutable because it is also borrowed as mutable (via `*u.y`) @@ -47,7 +47,7 @@ error[E0502]: cannot borrow `u` (via `u.x`) as immutable because it is also borr | 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); | - mutable borrow later used here @@ -61,7 +61,7 @@ LL | let u = U { x: ((Vec::new(), Vec::new()), Vec::new()) }; | - move occurs because `u` has type `U`, which does not implement the `Copy` trait 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 error: aborting due to 6 previous errors 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 9058707e50516..c1c6932e1e25a 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 5106721f310ec..dc87f4de5219f 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 b3991b5ba6a59..a875ff660f979 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 9580a9710e1f9..7421bb73ec9d3 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 d93dcd64efc02..f63ab1704c497 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 0ec873553f307..919c6d5ceda65 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 71bba8fda2eb1..a80b27e6eb563 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 3f165db4763e6..f848db726f9ef 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 959554f6d220c..b4d6ed9b02011 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 6551523c54df5..79c38a4681445 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 1a7603a46374b..746c1033ea348 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 bac09c34b8b13..40d9a50f1fa4f 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 8ea07360d0f22..c737bc29d9472 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 35051485f6ad0..ab62508fcf666 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 d8f456f2aefbc..2f90f240d2e19 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 78b46027c95ee..407905f52e750 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 c7cabd172eb39..0f6ba90afacf4 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 e9d44e2e3bced..a127af633dcf8 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 7bd2da285980c..7a6ed57bda6f3 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.nll.stderr b/src/test/ui/unop-move-semantics.nll.stderr index 58953d55b1fba..c11445c8adf59 100644 --- a/src/test/ui/unop-move-semantics.nll.stderr +++ b/src/test/ui/unop-move-semantics.nll.stderr @@ -8,7 +8,7 @@ LL | fn move_then_borrow + Clone>(x: T) { LL | !x; | - value moved here LL | -LL | x.clone(); //~ ERROR: use of moved value +LL | x.clone(); | ^ value borrowed here after move error[E0505]: cannot move out of `x` because it is borrowed @@ -17,7 +17,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 ... LL | use_mut(n); use_imm(m); @@ -29,7 +29,7 @@ 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 LL | use_mut(n); use_imm(m); | - borrow later used here @@ -37,13 +37,13 @@ LL | use_mut(n); use_imm(m); 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-move-semantics.stderr b/src/test/ui/unop-move-semantics.stderr index 65d2967c61ee8..e2fb425492073 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 c13c1a15a7cde..182730137492b 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 5b34482b59bb0..8e65745c7b099 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 afb3629d5fda1..803bb966be8fc 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 b78070d3fb129..f8dd54590f6ae 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 60fdae5cbcee8..276c77f9b4249 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 8807e5f04e585..ccb70d7431145 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 0154d002efeec..5e371b70bfa50 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 4f2fef938c975..fb5c0760d1582 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 f59a930b5a901..4e43df495c0d0 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 ae63f47ed74a7..ee1d1f10e71b2 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 fb3841948f11f..7d3e141ba709b 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 311a058fdb07f..4d4c9167150ed 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 d83d75787d948..ea15cd5e901bd 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 c6468b643b41a..68c22589d3ff5 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 7751fe017b8e2..28b18d50fff19 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 1e000062cc3e8..8f621d6ed11ca 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 ded64ba69e891..20a88c356108d 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 4ad7c6e5c75d1..80d2c6ced24c8 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 d48a7681cadc5..e8e82dec0b0bb 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 f68e849341b9b..a7b73ec53429b 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 3db0bcba81bf3..cac5ee07089e8 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.nll.stderr b/src/test/ui/unsized-locals/double-move.nll.stderr index c0c3e436f535b..47fa0d4a437ba 100644 --- a/src/test/ui/unsized-locals/double-move.nll.stderr +++ b/src/test/ui/unsized-locals/double-move.nll.stderr @@ -5,7 +5,7 @@ LL | let y = *x; | - move occurs because `y` has type `str`, which does not implement the `Copy` trait 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 error[E0382]: use of moved value: `x` @@ -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 partial move | = note: move occurs because `*x` has type `str`, which does not implement the `Copy` trait @@ -25,7 +25,7 @@ LL | let x = "hello".to_owned().into_boxed_str(); | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait 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 error[E0382]: use of moved value: `y` @@ -35,7 +35,7 @@ LL | let y = *x; | - move occurs because `y` has type `str`, which does not implement the `Copy` trait LL | y.foo(); | - value moved here -LL | y.foo(); //~ERROR use of moved value +LL | y.foo(); | ^ value used here after move error[E0382]: use of moved value: `*x` @@ -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/unsized-locals/double-move.stderr b/src/test/ui/unsized-locals/double-move.stderr index 1009e913b7b67..e6573af5a368d 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 6d8a4dd84e65b..6f096d741444f 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 c6ec064096b15..5c0b9f262b8c7 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 e4624a5fe058b..6edf0a2cf8d52 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 dfeb3a407e583..5eced4f06c0cd 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 a83b5be5fbf73..d18fe82564e03 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 2eb53eac40643..e2aee75f3ed31 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.nll.stderr b/src/test/ui/use/use-after-move-based-on-type.nll.stderr index 8160ada9d62ea..520f88f55dc1a 100644 --- a/src/test/ui/use/use-after-move-based-on-type.nll.stderr +++ b/src/test/ui/use/use-after-move-based-on-type.nll.stderr @@ -5,7 +5,7 @@ LL | let x = "Hello!".to_string(); | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait LL | let _y = x; | - value moved here -LL | println!("{}", x); //~ ERROR use of moved value +LL | println!("{}", x); | ^ value borrowed here after move error: aborting due to previous error 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 2282cdfad14dd..b9e0aaf1f8484 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.nll.stderr b/src/test/ui/use/use-after-move-self-based-on-type.nll.stderr index 4119741d805cd..9bf1175430c84 100644 --- a/src/test/ui/use/use-after-move-self-based-on-type.nll.stderr +++ b/src/test/ui/use/use-after-move-self-based-on-type.nll.stderr @@ -5,7 +5,7 @@ LL | pub fn foo(self) -> isize { | ---- move occurs because `self` has type `S`, which does not implement the `Copy` trait 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 error: aborting due to previous error 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 a3acc1aad0f00..d1d26069fdf08 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.nll.stderr b/src/test/ui/use/use-after-move-self.nll.stderr index e2ce3690cb904..3be0a65550b7f 100644 --- a/src/test/ui/use/use-after-move-self.nll.stderr +++ b/src/test/ui/use/use-after-move-self.nll.stderr @@ -5,7 +5,7 @@ LL | pub fn foo(self) -> isize { | ---- move occurs because `self` has type `S`, which does not implement the `Copy` trait 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 error: aborting due to previous error diff --git a/src/test/ui/use/use-after-move-self.stderr b/src/test/ui/use/use-after-move-self.stderr index 3cb77acaf3dd4..2c4bd202681de 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 8ff75b503d5ae..97dc603f9eb2d 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 c644ec752f90d..0c800ec35e409 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 fc0f8952c4794..99f5c352184d5 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 00f468cdf316b..334e145098be0 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 50b4cdf357d89..38c09c2be76f2 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 ee7deb264df54..a513d37738dfa 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 c998e27c531e9..ea77f129d8ef0 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 5bca980f21e15..14c4983ae29b9 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 0742a844b7f40..10d8ee60f99f6 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 a2d7b171a73ab..057515228e0d1 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 52fb607af5b25..330ba3e0a8cc9 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 75ebc86689819..c0231aead4a4a 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 0d8b4dddc68c1..49222fc7fa627 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 ba76c2efec485..6fcd6460fe30a 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 79681c776736d..beac05e04a8e3 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 4c97a5892f149..ffe690dd22073 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 30a7b02de76f9..6f445d79bf5d2 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 afdcccd21192c..cdcc7a6fd55a6 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 3c1f43943a004..c0209edc91553 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 c3a15662f7297..fe5fe105c6b3c 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 b0dddd6ed4978..e2ee35de1a278 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 32aac2e3a2b89..c8a1111e6237d 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 ba96fbdaa14dd..cb03d95f77104 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.nll.stderr b/src/test/ui/variance/variance-issue-20533.nll.stderr index 469adaf6f0eed..008e2a002bbb0 100644 --- a/src/test/ui/variance/variance-issue-20533.nll.stderr +++ b/src/test/ui/variance/variance-issue-20533.nll.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 LL | drop(x); | - borrow later used here @@ -13,7 +13,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 LL | drop(x); | - borrow later used here @@ -23,7 +23,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 LL | drop(x); | - borrow later used here diff --git a/src/test/ui/variance/variance-issue-20533.stderr b/src/test/ui/variance/variance-issue-20533.stderr index 27aca3401f92e..bcf99bcb96292 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 3ba86c2620e02..385d8dc5c773e 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 82dc8df372689..bbc34799449af 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 401fa2f3baa3a..ccd4335f5004a 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 207cc9147f1c3..ab5dce03fa0a0 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 08d1189ea2c9d..69631b4a504d2 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 1fabadabbcbbf..f136bd121d0df 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 2d11515a19c0e..514153103bea3 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 c824f5a6db731..4fa4a2e8ab45c 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 31271952f776f..991bfd33a2e2a 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 4362f69420261..f68a2666729dc 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 9cd133bbc937b..6c103f168f475 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 89a49a00b34e6..7c433378df5c3 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 a6f298c9bfbe0..6ae7d12c4633f 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 2bd39d5a831f2..793954e3a1f04 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 5cd168df53824..c82c253f610d0 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 92e704c3fb4b3..abbee347c00bc 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.nll.stderr b/src/test/ui/vec/vec-mut-iter-borrow.nll.stderr index c77be26f01938..679fd8997733b 100644 --- a/src/test/ui/vec/vec-mut-iter-borrow.nll.stderr +++ b/src/test/ui/vec/vec-mut-iter-borrow.nll.stderr @@ -6,7 +6,7 @@ LL | for x in &mut xs { | | | first mutable borrow occurs here | first borrow later used 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/vec/vec-mut-iter-borrow.stderr b/src/test/ui/vec/vec-mut-iter-borrow.stderr index 9b4b56737915a..ec16d2bebd6b2 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 330b87801ebb0..37055bb75f559 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 6dac9fe335f69..58a88979b2faf 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.nll.stderr b/src/test/ui/walk-struct-literal-with.nll.stderr index 2263747607b9c..eeb594a21f38c 100644 --- a/src/test/ui/walk-struct-literal-with.nll.stderr +++ b/src/test/ui/walk-struct-literal-with.nll.stderr @@ -5,7 +5,7 @@ LL | let start = Mine{test:"Foo".to_string(), other_val:0}; | ----- move occurs because `start` has type `Mine`, which does not implement the `Copy` trait 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 borrowed here after move 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 9362301b4081d..d5351eb0ce5ac 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 55d33058c17fa..30afb99e5f02c 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-custom-section-relocations.stderr b/src/test/ui/wasm-custom-section-relocations.stderr index 272dd8d524d68..eb8ab2644a330 100644 --- a/src/test/ui/wasm-custom-section-relocations.stderr +++ b/src/test/ui/wasm-custom-section-relocations.stderr @@ -1,13 +1,13 @@ error: statics with a custom `#[link_section]` must be a simple list of bytes on the wasm target with no extra levels of indirection such as references --> $DIR/wasm-custom-section-relocations.rs:4:1 | -LL | pub static A: &[u8] = &[1]; //~ ERROR: no extra levels of indirection +LL | pub static A: &[u8] = &[1]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: statics with a custom `#[link_section]` must be a simple list of bytes on the wasm target with no extra levels of indirection such as references --> $DIR/wasm-custom-section-relocations.rs:13:1 | -LL | pub static D: &usize = &C; //~ ERROR: no extra levels of indirection +LL | pub static D: &usize = &C; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/wasm-import-module.stderr b/src/test/ui/wasm-import-module.stderr index a3955bb676e93..20eec4c9f59bf 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 69df9ea7857d5..b222d07580eaf 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 487592dcaca62..de28a882f13c3 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 f4b8ec0c66874..6c1267cf7e1b4 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 600dd3dc03def..9c4eec6c5fbf0 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 594ce7d2f49ca..f1648aa12acdc 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 de7e8fa9a28af..9cc36025305f6 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 987984060e698..8635dad851667 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 81aae855b8439..3879f7b0a4bf0 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 e60529dba1ed2..40cb4a7050cca 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 9f18a00926d7b..059f164e25c28 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 1fabfb04adde3..8952c78aacd71 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 8d6700e357145..1e732a3341c0b 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 9e0628e3ec610..cc06b9243f707 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 a4a14817d3f76..94b3de78898a7 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 ba9d3d7877dda..b79093f7d0235 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 2ed9cc56f94ab..f10ff841acbf6 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.nll.stderr b/src/test/ui/wf/wf-misc-methods-issue-28609.nll.stderr index 21ac2031d0408..fc58984345a91 100644 --- a/src/test/ui/wf/wf-misc-methods-issue-28609.nll.stderr +++ b/src/test/ui/wf/wf-misc-methods-issue-28609.nll.stderr @@ -1,7 +1,7 @@ error[E0515]: cannot return value referencing temporary value --> $DIR/wf-misc-methods-issue-28609.rs:22:5 | -LL | s.transmute_inherent(&mut 42) //~ ERROR does not live long enough +LL | s.transmute_inherent(&mut 42) | ^^^^^^^^^^^^^^^^^^^^^^^^^^--^ | | | | | temporary value created here @@ -10,7 +10,7 @@ LL | s.transmute_inherent(&mut 42) //~ ERROR does not live long enough error[E0515]: cannot return value referencing local variable `four` --> $DIR/wf-misc-methods-issue-28609.rs:36:5 | -LL | s.bomb = Some(&four); //~ ERROR does not live long enough +LL | s.bomb = Some(&four); | ----- `four` is borrowed here LL | &s | ^^ returns a value referencing data owned by the current function @@ -18,7 +18,7 @@ LL | &s error[E0515]: cannot return value referencing local variable `four` --> $DIR/wf-misc-methods-issue-28609.rs:43:5 | -LL | s.bomb = Some(&four); //~ ERROR does not live long enough +LL | s.bomb = Some(&four); | ----- `four` is borrowed here LL | &*s | ^^^ returns a value referencing data owned by the current function @@ -26,7 +26,7 @@ LL | &*s error[E0515]: cannot return value referencing temporary value --> $DIR/wf-misc-methods-issue-28609.rs:53:5 | -LL | s << &mut 3 //~ ERROR does not live long enough +LL | s << &mut 3 | ^^^^^^^^^^- | | | | | temporary value created here @@ -35,7 +35,7 @@ LL | s << &mut 3 //~ ERROR does not live long enough error[E0515]: cannot return value referencing temporary value --> $DIR/wf-misc-methods-issue-28609.rs:58:5 | -LL | s.shl(&mut 3) //~ ERROR does not live long enough +LL | s.shl(&mut 3) | ^^^^^^^^^^^-^ | | | | | temporary value created here @@ -44,7 +44,7 @@ LL | s.shl(&mut 3) //~ ERROR does not live long enough error[E0515]: cannot return value referencing temporary value --> $DIR/wf-misc-methods-issue-28609.rs:63:5 | -LL | S2::shl(s, &mut 3) //~ ERROR does not live long enough +LL | S2::shl(s, &mut 3) | ^^^^^^^^^^^^^^^^-^ | | | | | temporary value created here 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 46dc4dc8870da..d470aecd26602 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 2a514d9d2c2b9..87e8105d4aff5 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 04f8c70bbf420..8649506c870d7 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 78ea903e699c3..32832ceb79cad 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 37defb87ee524..1fdcced90cc56 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 e31552b408954..e609f93ff700b 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 f8ba74a2fdc3e..658d41218e483 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 585571a6a3cb2..5cc9451bf5cac 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 eeafc06db3472..e713389223654 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 7fabd6b471364..5a310a826dd90 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 669dd08b21f98..d5a00be6d3464 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 0bcda407d9cd0..a3c4ab58f65f7 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 bbcb61a856d8d..dbe68b82c24cb 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 6d61143d33c84..156d0e6c33d83 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.nll.stderr b/src/test/ui/writing-to-immutable-vec.nll.stderr index 6ec56f90ca47a..a65765c86c8b7 100644 --- a/src/test/ui/writing-to-immutable-vec.nll.stderr +++ b/src/test/ui/writing-to-immutable-vec.nll.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable | LL | let v: Vec = vec![1, 2, 3]; | - help: consider changing this to be mutable: `mut v` -LL | v[1] = 4; //~ ERROR cannot borrow immutable local variable `v` as mutable +LL | v[1] = 4; | ^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/writing-to-immutable-vec.stderr b/src/test/ui/writing-to-immutable-vec.stderr index 3a99186b46f6a..9bc82dfd35890 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 diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index bac41a7c57904..68ecc0527bc7c 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -3083,6 +3083,12 @@ impl<'test> TestCx<'test> { .replace("\\", "/") // normalize for paths on windows .replace("\r\n", "\n") // normalize for linebreaks on windows .replace("\t", "\\t"); // makes tabs visible + + // Remove test annotations like `//~ ERROR text` from the output, + // since they duplicate actual errors and make the output hard to read. + normalized = Regex::new("\\s*//~.*").unwrap() + .replace_all(&normalized, "").into_owned(); + for rule in custom_rules { let re = Regex::new(&rule.0).expect("bad regex in custom normalization rule"); normalized = re.replace_all(&normalized, &rule.1[..]).into_owned();