Update tests

This commit is contained in:
Vadim Petrochenkov 2019-03-09 15:03:44 +03:00
parent 2060d49c39
commit fa72a81bea
2648 changed files with 6703 additions and 6703 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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() { }

View file

@ -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`

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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`

View file

@ -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

View file

@ -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`

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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`

View file

@ -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

View file

@ -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>(_: 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>(_: 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>(_: 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>(_: 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>(_: 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>(_: 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>(_: 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>(_: 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>(_: F) where F: Fn(&(), Box<Fn(&())>) {}
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>(_: F) where F: Fn(&(), Box<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 `for<'r> fn(&'r (), for<'s> fn(&'s ())) -> _`
@ -183,7 +183,7 @@ LL | fn g2<F>(_: 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>(_: 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>(_: F) where F: for<'s> Fn(&'s (), Box<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 `fn(&'s (), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _`
@ -225,7 +225,7 @@ LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<Fn(&())>) {}
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>(_: 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>(_: 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>(_: F) where F: Fn(&(), Box<Fn(&())>, &(), 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>(_: F) where F: Fn(&(), Box<Fn(&())>, &(), 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>(_: F) where F: for<'t0> Fn(&(), Box<Fn(&())>, &'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 ())) -> _`

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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`

View file

@ -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

View file

@ -1,7 +1,7 @@
error[E0034]: multiple applicable items in scope
--> $DIR/associated-const-ambiguity-report.rs:17:16
|
LL | const X: i32 = <i32>::ID; //~ ERROR E0034
LL | const X: i32 = <i32>::ID;
| ^^^^^^^^^ multiple `ID` found
|
note: candidate #1 is defined in an impl of the trait `Foo` for the type `i32`

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,37 +1,37 @@
error[E0412]: cannot find type `A` in this scope
--> $DIR/associated-path-shl.rs:4:14
|
LL | let _: <<A>::B>::C; //~ ERROR cannot find type `A` in this scope
LL | let _: <<A>::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 _ = <<A>::B>::C; //~ ERROR cannot find type `A` in this scope
LL | let _ = <<A>::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 <<A>::B>::C; //~ ERROR cannot find type `A` in this scope
LL | let <<A>::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 ..= <<A>::B>::C; //~ ERROR cannot find type `A` in this scope
LL | let 0 ..= <<A>::B>::C;
| ^ not found in this scope
error[E0412]: cannot find type `A` in this scope
--> $DIR/associated-path-shl.rs:9:7
|
LL | <<A>::B>::C; //~ ERROR cannot find type `A` in this scope
LL | <<A>::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 ..= <<A>::B>::C; //~ ERROR cannot find type `A` in this scope
LL | let 0 ..= <<A>::B>::C;
| ^^^^^^^^^^^ ranges require char or numeric types
|
= note: start type: {integer}

View file

@ -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`

View file

@ -1,7 +1,7 @@
error[E0271]: type mismatch resolving `<ModelT as Vehicle>::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:Car<Color=Blue>>(c: C) {
error[E0271]: type mismatch resolving `<ModelU as Vehicle>::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`

View file

@ -1,7 +1,7 @@
error[E0277]: the trait bound `<G as GetToInt>::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 `<G as GetToInt>::R`
|
= help: consider adding a `where <G as GetToInt>::R: ToInt` bound

View file

@ -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

View file

@ -1,7 +1,7 @@
error[E0271]: type mismatch resolving `for<'x> <UintStruct as TheTrait<&'x isize>>::A == &'x isize`
--> $DIR/associated-types-eq-hr.rs:82:5
|
LL | foo::<UintStruct>(); //~ ERROR type mismatch
LL | foo::<UintStruct>();
| ^^^^^^^^^^^^^^^^^ expected usize, found isize
|
= note: expected type `&usize`
@ -19,7 +19,7 @@ LL | | }
error[E0271]: type mismatch resolving `for<'x> <IntStruct as TheTrait<&'x isize>>::A == &'x usize`
--> $DIR/associated-types-eq-hr.rs:86:5
|
LL | bar::<IntStruct>(); //~ ERROR type mismatch
LL | bar::<IntStruct>();
| ^^^^^^^^^^^^^^^^ expected isize, found usize
|
= note: expected type `&isize`

View file

@ -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

View file

@ -1,7 +1,7 @@
error[E0271]: type mismatch resolving `<Adapter<I> as Iterator>::Item == std::option::Option<T>`
--> $DIR/associated-types-issue-20346.rs:34:5
|
LL | is_iterator_of::<Option<T>, _>(&adapter); //~ ERROR type mismatch
LL | is_iterator_of::<Option<T>, _>(&adapter);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type parameter, found enum `std::option::Option`
|
= note: expected type `T`

View file

@ -1,7 +1,7 @@
error[E0271]: type mismatch resolving `<T as Foo>::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 `<T as Foo>::Y`
@ -15,7 +15,7 @@ LL | fn want_y<T:Foo<Y=i32>>(t: &T) { }
error[E0271]: type mismatch resolving `<T as Foo>::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 `<T as Foo>::X`

View file

@ -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

View file

@ -1,7 +1,7 @@
error[E0284]: type annotations required: cannot resolve `<Self as std::iter::Iterator>::Item == i32`
--> $DIR/associated-types-overridden-binding.rs:4:1
|
LL | trait Bar: Foo<Item = u32> {} //~ ERROR type annotations required
LL | trait Bar: Foo<Item = u32> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: required by `Foo`

View file

@ -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<T>(a: T, x: T::A) {} //~ERROR associated type `A` not found
LL | pub fn f1<T>(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<T: Foo + Bar>(a: T, x: T::A) {} //~ERROR ambiguous associated type `A`
LL | pub fn f2<T: Foo + Bar>(a: T, x: T::A) {}
| ^^^^ ambiguous associated type `A`
error: aborting due to 2 previous errors

View file

@ -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: <T as Trait<'b>>::Type = a; //~ ERROR E0623
LL | let _c: <T as Trait<'b>>::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: <T as Trait<'a>>::Type = b; //~ ERROR E0623
LL | let _c: <T as Trait<'a>>::Type = b;
| ^ ...but data from `y` flows into `x` here
error: aborting due to 2 previous errors

View file

@ -1,7 +1,7 @@
error[E0277]: the size for values of type `<T as Get>::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 `<T as Get>::Value`

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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<String>) { //~ ERROR main function has wrong type
LL | fn main(arguments: Vec<String>) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters
|
= note: expected type `fn()`

View file

@ -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<String>) { //~ ERROR main function has wrong type
LL | fn main(arguments: Vec<String>) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters
|
= note: expected type `fn()`

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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()`

View file

@ -1,7 +1,7 @@
error[E0277]: `T` cannot be sent between threads safely
--> $DIR/bad-method-typaram-kind.rs:2:7
|
LL | 1.bar::<T>(); //~ ERROR `T` cannot be sent between threads safely
LL | 1.bar::<T>();
| ^^^ `T` cannot be sent between threads safely
|
= help: the trait `std::marker::Send` is not implemented for `T`

View file

@ -3,7 +3,7 @@ error[E0401]: can't use generic parameters from outer function
|
LL | fn foo<T>() {
| - 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<T>`

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 `()`

View file

@ -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 `()`

View file

@ -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 `()`

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 `()`
...

View file

@ -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 `()`

View file

@ -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
|

View file

@ -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

View file

@ -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

View file

@ -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 | }

View file

@ -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

View file

@ -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 | }

View file

@ -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 | }

View file

@ -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 | }

View file

@ -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`

View file

@ -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

View file

@ -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

View file

@ -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

Some files were not shown because too many files have changed in this diff Show more