diff options
| author | bors <bors@rust-lang.org> | 2019-11-27 00:32:30 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-11-27 00:32:30 +0000 |
| commit | 809e180a76ce97340bf4354ff357bc59e3ca40b2 (patch) | |
| tree | 7c8e0aaf9f4345352e07818cb99d9b99d78ad81e /src/test | |
| parent | a7d791b4503a86c1b16b4393ba7998ef8b561a27 (diff) | |
| parent | 8547ea32db4a6f2c5b27827b30f372859de22fbb (diff) | |
| download | rust-809e180a76ce97340bf4354ff357bc59e3ca40b2.tar.gz rust-809e180a76ce97340bf4354ff357bc59e3ca40b2.zip | |
Auto merge of #66794 - tmandry:rollup-99qrpr0, r=tmandry
Rollup of 14 pull requests Successful merges: - #66128 (alloc: Add new_zeroed() versions like new_uninit().) - #66661 (Add riscv64gc-unknown-linux-gnu target) - #66663 (Miri: print leak report even without tracing) - #66711 (Add hardware floating point features to aarch64-pc-windows-msvc) - #66713 (introduce a target to build the kernel of the unikernel HermitCore) - #66717 (tidy: Accommodate rustfmt's preferred layout of stability attributes) - #66719 (Store pointer width as u32 on Config) - #66720 (Move ErrorReported to rustc_errors) - #66737 (Error codes cleanup) - #66754 (Various tweaks to diagnostic output) - #66763 (Minor edit for documentation-tests.md that increases clarity) - #66779 (follow the same function order in the trait) - #66786 (Add wildcard test for const_if_match) - #66788 (Allow `Unreachable` terminators through `min_const_fn` checks) Failed merges: r? @ghost
Diffstat (limited to 'src/test')
25 files changed, 114 insertions, 251 deletions
diff --git a/src/test/rustdoc-ui/doc-without-codeblock.rs b/src/test/rustdoc-ui/doc-without-codeblock.rs index 4b2a91e9c81..5ad8e8a826f 100644 --- a/src/test/rustdoc-ui/doc-without-codeblock.rs +++ b/src/test/rustdoc-ui/doc-without-codeblock.rs @@ -1,13 +1,13 @@ -#![deny(missing_doc_code_examples)] //~ ERROR Missing code example in this documentation +#![deny(missing_doc_code_examples)] //~ ERROR missing code example in this documentation /// Some docs. -//~^ ERROR Missing code example in this documentation +//~^ ERROR missing code example in this documentation pub struct Foo; /// And then, the princess died. -//~^ ERROR Missing code example in this documentation +//~^ ERROR missing code example in this documentation pub mod foo { /// Or maybe not because she saved herself! - //~^ ERROR Missing code example in this documentation + //~^ ERROR missing code example in this documentation pub fn bar() {} } diff --git a/src/test/rustdoc-ui/doc-without-codeblock.stderr b/src/test/rustdoc-ui/doc-without-codeblock.stderr index 23c07c4d32d..bf65fcf19a0 100644 --- a/src/test/rustdoc-ui/doc-without-codeblock.stderr +++ b/src/test/rustdoc-ui/doc-without-codeblock.stderr @@ -1,4 +1,4 @@ -error: Missing code example in this documentation +error: missing code example in this documentation --> $DIR/doc-without-codeblock.rs:1:1 | LL | / #![deny(missing_doc_code_examples)] @@ -16,19 +16,19 @@ note: lint level defined here LL | #![deny(missing_doc_code_examples)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ -error: Missing code example in this documentation +error: missing code example in this documentation --> $DIR/doc-without-codeblock.rs:3:1 | LL | /// Some docs. | ^^^^^^^^^^^^^^ -error: Missing code example in this documentation +error: missing code example in this documentation --> $DIR/doc-without-codeblock.rs:7:1 | LL | /// And then, the princess died. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: Missing code example in this documentation +error: missing code example in this documentation --> $DIR/doc-without-codeblock.rs:10:5 | LL | /// Or maybe not because she saved herself! diff --git a/src/test/rustdoc-ui/lint-group.rs b/src/test/rustdoc-ui/lint-group.rs index 0e0ebd9ce70..06766db5335 100644 --- a/src/test/rustdoc-ui/lint-group.rs +++ b/src/test/rustdoc-ui/lint-group.rs @@ -14,11 +14,11 @@ pub fn link_error() {} //~^^^^^ ERROR cannot be resolved, ignoring it /// wait, this doesn't have a doctest? -pub fn no_doctest() {} //~^ ERROR Missing code example in this documentation +pub fn no_doctest() {} //~^ ERROR missing code example in this documentation /// wait, this *does* have a doctest? /// /// ``` /// println!("sup"); /// ``` -fn private_doctest() {} //~^^^^^ ERROR Documentation test in private item +fn private_doctest() {} //~^^^^^ ERROR documentation test in private item diff --git a/src/test/rustdoc-ui/lint-group.stderr b/src/test/rustdoc-ui/lint-group.stderr index cd523b227de..63274ae2be4 100644 --- a/src/test/rustdoc-ui/lint-group.stderr +++ b/src/test/rustdoc-ui/lint-group.stderr @@ -1,4 +1,4 @@ -error: Documentation test in private item +error: documentation test in private item --> $DIR/lint-group.rs:19:1 | LL | / /// wait, this *does* have a doctest? @@ -29,7 +29,7 @@ LL | #![deny(rustdoc)] = note: `#[deny(intra_doc_link_resolution_failure)]` implied by `#[deny(rustdoc)]` = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]` -error: Missing code example in this documentation +error: missing code example in this documentation --> $DIR/lint-group.rs:16:1 | LL | /// wait, this doesn't have a doctest? diff --git a/src/test/rustdoc-ui/lint-missing-doc-code-example.stderr b/src/test/rustdoc-ui/lint-missing-doc-code-example.stderr index 97a52a13e3f..179dba17c6d 100644 --- a/src/test/rustdoc-ui/lint-missing-doc-code-example.stderr +++ b/src/test/rustdoc-ui/lint-missing-doc-code-example.stderr @@ -1,4 +1,4 @@ -error: Missing code example in this documentation +error: missing code example in this documentation --> $DIR/lint-missing-doc-code-example.rs:19:1 | LL | / mod module1 { @@ -11,7 +11,7 @@ note: lint level defined here LL | #![deny(missing_doc_code_examples)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ -error: Missing code example in this documentation +error: missing code example in this documentation --> $DIR/lint-missing-doc-code-example.rs:37:3 | LL | /// doc diff --git a/src/test/rustdoc-ui/private-item-doc-test.rs b/src/test/rustdoc-ui/private-item-doc-test.rs index 20ac292aeaf..2f1bddc7c75 100644 --- a/src/test/rustdoc-ui/private-item-doc-test.rs +++ b/src/test/rustdoc-ui/private-item-doc-test.rs @@ -6,6 +6,6 @@ mod foo { /// ``` /// assert!(false); /// ``` - //~^^^^^ ERROR Documentation test in private item + //~^^^^^ ERROR documentation test in private item fn bar() {} } diff --git a/src/test/rustdoc-ui/private-item-doc-test.stderr b/src/test/rustdoc-ui/private-item-doc-test.stderr index 20f3eb8b120..8abbdb31ec9 100644 --- a/src/test/rustdoc-ui/private-item-doc-test.stderr +++ b/src/test/rustdoc-ui/private-item-doc-test.stderr @@ -1,4 +1,4 @@ -error: Documentation test in private item +error: documentation test in private item --> $DIR/private-item-doc-test.rs:4:5 | LL | / /// private doc test diff --git a/src/test/ui/allocator/two-allocators.stderr b/src/test/ui/allocator/two-allocators.stderr index ed0aa13eb80..35d9f0f42f0 100644 --- a/src/test/ui/allocator/two-allocators.stderr +++ b/src/test/ui/allocator/two-allocators.stderr @@ -1,14 +1,11 @@ error: cannot define multiple global allocators --> $DIR/two-allocators.rs:6:1 | -LL | static B: System = System; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | -note: the previous global allocator is defined here - --> $DIR/two-allocators.rs:4:1 - | LL | static A: System = System; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | -------------------------- previous global allocator is defined here +LL | #[global_allocator] +LL | static B: System = System; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot define a new global allocator error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-move-error-with-note.stderr b/src/test/ui/borrowck/borrowck-move-error-with-note.stderr index d56b9f562c9..26de39101f2 100644 --- a/src/test/ui/borrowck/borrowck-move-error-with-note.stderr +++ b/src/test/ui/borrowck/borrowck-move-error-with-note.stderr @@ -10,15 +10,7 @@ LL | num2) => (), LL | Foo::Foo2(num) => (), | --- ...and here | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/borrowck-move-error-with-note.rs:12:19 - | -LL | Foo::Foo1(num1, - | ^^^^ -LL | num2) => (), - | ^^^^ -LL | Foo::Foo2(num) => (), - | ^^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0509]: cannot move out of type `S`, which implements the `Drop` trait --> $DIR/borrowck-move-error-with-note.rs:28:11 @@ -31,13 +23,7 @@ LL | f: _s, LL | g: _t | -- ...and here | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/borrowck-move-error-with-note.rs:31:16 - | -LL | f: _s, - | ^^ -LL | g: _t - | ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0507]: cannot move out of `a.a` which is behind a shared reference --> $DIR/borrowck-move-error-with-note.rs:46:11 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 9f0670c6bc7..8fb4c062c03 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 @@ -9,13 +9,7 @@ LL | &[Foo { string: a }, LL | Foo { string: b }] => { | - ...and here | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/borrowck-move-out-of-vec-tail.rs:21:33 - | -LL | &[Foo { string: a }, - | ^ -LL | Foo { string: b }] => { - | ^ + = note: move occurs because these variables have types that don't implement the `Copy` trait help: consider removing the `&` | LL | [Foo { string: a }, diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.rs b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.rs index a215305f684..e274d105e05 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.rs +++ b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.rs @@ -75,12 +75,12 @@ fn e() { match vec { //~^ ERROR cannot move out //~| NOTE cannot move out + //~| NOTE move occurs because these variables have types &mut [_a, _b, _c] => {} //~^ NOTE data moved here //~| NOTE and here //~| NOTE and here //~| HELP consider removing the `&mut` - //~| NOTE move occurs because these variables have types _ => {} } let a = vec[0]; //~ ERROR cannot move out diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr index ad5e206a9a1..a3324f25d0b 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr @@ -97,11 +97,7 @@ LL | &mut [_a, _b, _c] => {} | | data moved here | help: consider removing the `&mut`: `[_a, _b, _c]` | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/borrowck-vec-pattern-nesting.rs:78:15 - | -LL | &mut [_a, _b, _c] => {} - | ^^ ^^ ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:86:13 diff --git a/src/test/ui/consts/control-flow/exhaustive-c-like-enum-match.rs b/src/test/ui/consts/control-flow/exhaustive-c-like-enum-match.rs new file mode 100644 index 00000000000..9e22151f2e9 --- /dev/null +++ b/src/test/ui/consts/control-flow/exhaustive-c-like-enum-match.rs @@ -0,0 +1,21 @@ +// Test for <https://github.com/rust-lang/rust/issues/66756> + +// check-pass + +#![feature(const_if_match)] + +enum E { + A, + B, + C +} + +const fn f(e: E) { + match e { + E::A => {} + E::B => {} + E::C => {} + } +} + +fn main() {} diff --git a/src/test/ui/consts/control-flow/single-arm-match-wild.rs b/src/test/ui/consts/control-flow/single-arm-match-wild.rs new file mode 100644 index 00000000000..fba6e3583cc --- /dev/null +++ b/src/test/ui/consts/control-flow/single-arm-match-wild.rs @@ -0,0 +1,21 @@ +// check-pass + +#![feature(const_if_match)] + +enum E { + A, + B, + C +} + +const fn f(e: E) -> usize { + match e { + _ => 0 + } +} + +fn main() { + const X: usize = f(E::C); + assert_eq!(X, 0); + assert_eq!(f(E::A), 0); +} diff --git a/src/test/ui/if/ifmt-bad-arg.stderr b/src/test/ui/if/ifmt-bad-arg.stderr index 07917c2a540..c024094dd56 100644 --- a/src/test/ui/if/ifmt-bad-arg.stderr +++ b/src/test/ui/if/ifmt-bad-arg.stderr @@ -138,13 +138,9 @@ error: duplicate argument named `foo` --> $DIR/ifmt-bad-arg.rs:40:33 | LL | format!("{foo}", foo=1, foo=2); - | ^ - | -note: previously here - --> $DIR/ifmt-bad-arg.rs:40:26 - | -LL | format!("{foo}", foo=1, foo=2); - | ^ + | - ^ duplicate argument + | | + | previously here error: positional arguments cannot follow named arguments --> $DIR/ifmt-bad-arg.rs:41:35 diff --git a/src/test/ui/issues/issue-12567.stderr b/src/test/ui/issues/issue-12567.stderr index 1de29dc8c61..9d9a88f4f9b 100644 --- a/src/test/ui/issues/issue-12567.stderr +++ b/src/test/ui/issues/issue-12567.stderr @@ -10,14 +10,7 @@ LL | => println!("one empty"), LL | (&[hd1, ..], &[hd2, ..]) | --- ...and here | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/issue-12567.rs:8:17 - | -LL | (&[], &[hd, ..]) | (&[hd, ..], &[]) - | ^^ -LL | => println!("one empty"), -LL | (&[hd1, ..], &[hd2, ..]) - | ^^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0508]: cannot move out of type `[T]`, a non-copy slice --> $DIR/issue-12567.rs:4:11 @@ -31,14 +24,7 @@ LL | => println!("one empty"), LL | (&[hd1, ..], &[hd2, ..]) | --- ...and here | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/issue-12567.rs:8:17 - | -LL | (&[], &[hd, ..]) | (&[hd, ..], &[]) - | ^^ -LL | => println!("one empty"), -LL | (&[hd1, ..], &[hd2, ..]) - | ^^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error: aborting due to 2 previous errors 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 e547ec7e475..d0a4097de68 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 @@ -7,11 +7,7 @@ LL | let (a, b) = x[0]; | | ...and here | data moved here | -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]; - | ^ ^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/label/label_break_value_continue.stderr b/src/test/ui/label/label_break_value_continue.stderr index b3c0b421023..c5f79ed6333 100644 --- a/src/test/ui/label/label_break_value_continue.stderr +++ b/src/test/ui/label/label_break_value_continue.stderr @@ -7,16 +7,11 @@ LL | continue; error[E0696]: `continue` pointing to a labeled block --> $DIR/label_break_value_continue.rs:14:9 | -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; + | | ^^^^^^^^^^^ labeled blocks cannot be `continue`'d LL | | } - | |_____^ + | |_____- labeled block the `continue` points to error[E0695]: unlabeled `continue` inside of a labeled block --> $DIR/label_break_value_continue.rs:22:13 diff --git a/src/test/ui/macros/macro-multiple-matcher-bindings.stderr b/src/test/ui/macros/macro-multiple-matcher-bindings.stderr index 65362388d7d..3ad1297ffb2 100644 --- a/src/test/ui/macros/macro-multiple-matcher-bindings.stderr +++ b/src/test/ui/macros/macro-multiple-matcher-bindings.stderr @@ -2,49 +2,33 @@ error: duplicate matcher binding --> $DIR/macro-multiple-matcher-bindings.rs:7:16 | LL | ($a:ident, $a:ident) => {}; - | ^^^^^^^^ - | -note: previous declaration was here - --> $DIR/macro-multiple-matcher-bindings.rs:7:6 - | -LL | ($a:ident, $a:ident) => {}; - | ^^^^^^^^ + | -------- ^^^^^^^^ duplicate binding + | | + | previous binding error: duplicate matcher binding --> $DIR/macro-multiple-matcher-bindings.rs:8:16 | LL | ($a:ident, $a:path) => {}; - | ^^^^^^^ - | -note: previous declaration was here - --> $DIR/macro-multiple-matcher-bindings.rs:8:6 - | -LL | ($a:ident, $a:path) => {}; - | ^^^^^^^^ + | -------- ^^^^^^^ duplicate binding + | | + | previous binding error: duplicate matcher binding --> $DIR/macro-multiple-matcher-bindings.rs:17:18 | LL | ($a:ident, $($a:ident),*) => {}; - | ^^^^^^^^ - | -note: previous declaration was here - --> $DIR/macro-multiple-matcher-bindings.rs:17:6 - | -LL | ($a:ident, $($a:ident),*) => {}; - | ^^^^^^^^ + | -------- ^^^^^^^^ duplicate binding + | | + | previous binding error: duplicate matcher binding --> $DIR/macro-multiple-matcher-bindings.rs:18:25 | LL | ($($a:ident)+ # $($($a:path),+);*) => {}; - | ^^^^^^^ - | -note: previous declaration was here - --> $DIR/macro-multiple-matcher-bindings.rs:18:8 - | -LL | ($($a:ident)+ # $($($a:path),+);*) => {}; - | ^^^^^^^^ + | -------- ^^^^^^^ duplicate binding + | | + | previous binding error: aborting due to 4 previous errors diff --git a/src/test/ui/macros/macro-reexport-removed.stderr b/src/test/ui/macros/macro-reexport-removed.stderr index 4bec70850af..475a586ddc0 100644 --- a/src/test/ui/macros/macro-reexport-removed.stderr +++ b/src/test/ui/macros/macro-reexport-removed.stderr @@ -2,13 +2,9 @@ error[E0557]: feature has been removed --> $DIR/macro-reexport-removed.rs:3:12 | LL | #![feature(macro_reexport)] - | ^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^ feature has been removed | -note: subsumed by `pub use` - --> $DIR/macro-reexport-removed.rs:3:12 - | -LL | #![feature(macro_reexport)] - | ^^^^^^^^^^^^^^ + = note: subsumed by `pub use` error: cannot find attribute `macro_reexport` in this scope --> $DIR/macro-reexport-removed.rs:5:3 diff --git a/src/test/ui/nll/move-errors.stderr b/src/test/ui/nll/move-errors.stderr index 7139617a97a..d4a0e45648c 100644 --- a/src/test/ui/nll/move-errors.stderr +++ b/src/test/ui/nll/move-errors.stderr @@ -83,13 +83,7 @@ LL | B::U(d) => (), LL | B::V(s) => (), | - ...and here | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/move-errors.rs:76:14 - | -LL | B::U(d) => (), - | ^ -LL | B::V(s) => (), - | ^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0509]: cannot move out of type `D`, which implements the `Drop` trait --> $DIR/move-errors.rs:83:11 @@ -138,11 +132,7 @@ LL | F(s, mut t) => (), | | | data moved here | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/move-errors.rs:104:11 - | -LL | F(s, mut t) => (), - | ^ ^^^^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0507]: cannot move out of `x.0` which is behind a shared reference --> $DIR/move-errors.rs:110:11 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 c0b7a5a5b62..1f1211aa198 100644 --- a/src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr +++ b/src/test/ui/suggestions/dont-suggest-ref/duplicate-suggestions.stderr @@ -8,11 +8,7 @@ LL | let &(X(_t), X(_u)) = &(x.clone(), x.clone()); | | data moved here | help: consider removing the `&`: `(X(_t), X(_u))` | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:39:13 - | -LL | let &(X(_t), X(_u)) = &(x.clone(), x.clone()); - | ^^ ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0507]: cannot move out of a shared reference --> $DIR/duplicate-suggestions.rs:43:50 @@ -24,11 +20,7 @@ LL | if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { | | data moved here | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))` | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:43:26 - | -LL | if let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { } - | ^^ ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0507]: cannot move out of a shared reference --> $DIR/duplicate-suggestions.rs:47:53 @@ -40,11 +32,7 @@ LL | while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) | | data moved here | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))` | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:47:29 - | -LL | while let &(Either::One(_t), Either::Two(_u)) = &(e.clone(), e.clone()) { } - | ^^ ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0507]: cannot move out of a shared reference --> $DIR/duplicate-suggestions.rs:51:11 @@ -60,14 +48,7 @@ LL | &(Either::One(_t), Either::Two(_u)) => (), LL | &(Either::Two(_t), Either::One(_u)) => (), | -- ...and here -- ...and here | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:53:23 - | -LL | &(Either::One(_t), Either::Two(_u)) => (), - | ^^ ^^ -... -LL | &(Either::Two(_t), Either::One(_u)) => (), - | ^^ ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait help: consider removing the `&` | LL | (Either::One(_t), Either::Two(_u)) => (), @@ -90,11 +71,7 @@ LL | &(Either::One(_t), Either::Two(_u)) | | data moved here | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))` | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:63:23 - | -LL | &(Either::One(_t), Either::Two(_u)) - | ^^ ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0507]: cannot move out of a shared reference --> $DIR/duplicate-suggestions.rs:70:11 @@ -109,11 +86,7 @@ LL | &(Either::One(_t), Either::Two(_u)) => (), | | data moved here | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))` | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:72:23 - | -LL | &(Either::One(_t), Either::Two(_u)) => (), - | ^^ ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0507]: cannot move out of a shared reference --> $DIR/duplicate-suggestions.rs:78:11 @@ -128,11 +101,7 @@ LL | &(Either::One(_t), Either::Two(_u)) => (), | | data moved here | help: consider removing the `&`: `(Either::One(_t), Either::Two(_u))` | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:80:23 - | -LL | &(Either::One(_t), Either::Two(_u)) => (), - | ^^ ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0507]: cannot move out of a mutable reference --> $DIR/duplicate-suggestions.rs:91:31 @@ -144,11 +113,7 @@ LL | let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone()); | | data moved here | help: consider removing the `&mut`: `(X(_t), X(_u))` | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:91:17 - | -LL | let &mut (X(_t), X(_u)) = &mut (xm.clone(), xm.clone()); - | ^^ ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0507]: cannot move out of a mutable reference --> $DIR/duplicate-suggestions.rs:95:54 @@ -160,11 +125,7 @@ LL | if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.c | | data moved here | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))` | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:95:30 - | -LL | if let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { } - | ^^ ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0507]: cannot move out of a mutable reference --> $DIR/duplicate-suggestions.rs:99:57 @@ -176,11 +137,7 @@ LL | while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), e | | data moved here | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))` | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:99:33 - | -LL | while let &mut (Either::One(_t), Either::Two(_u)) = &mut (em.clone(), em.clone()) { } - | ^^ ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0507]: cannot move out of a mutable reference --> $DIR/duplicate-suggestions.rs:103:11 @@ -196,14 +153,7 @@ LL | &mut (Either::One(_t), Either::Two(_u)) => (), LL | &mut (Either::Two(_t), Either::One(_u)) => (), | -- ...and here -- ...and here | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:105:27 - | -LL | &mut (Either::One(_t), Either::Two(_u)) => (), - | ^^ ^^ -... -LL | &mut (Either::Two(_t), Either::One(_u)) => (), - | ^^ ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait help: consider removing the `&mut` | LL | (Either::One(_t), Either::Two(_u)) => (), @@ -226,11 +176,7 @@ LL | &mut (Either::One(_t), Either::Two(_u)) | | data moved here | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))` | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:115:27 - | -LL | &mut (Either::One(_t), Either::Two(_u)) - | ^^ ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0507]: cannot move out of a mutable reference --> $DIR/duplicate-suggestions.rs:122:11 @@ -245,11 +191,7 @@ LL | &mut (Either::One(_t), Either::Two(_u)) => (), | | data moved here | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))` | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:124:27 - | -LL | &mut (Either::One(_t), Either::Two(_u)) => (), - | ^^ ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0507]: cannot move out of a mutable reference --> $DIR/duplicate-suggestions.rs:130:11 @@ -264,11 +206,7 @@ LL | &mut (Either::One(_t), Either::Two(_u)) => (), | | data moved here | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))` | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:132:27 - | -LL | &mut (Either::One(_t), Either::Two(_u)) => (), - | ^^ ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0507]: cannot move out of a mutable reference --> $DIR/duplicate-suggestions.rs:138:11 @@ -283,11 +221,7 @@ LL | &mut (Either::One(_t), Either::Two(_u)) => (), | | data moved here | help: consider removing the `&mut`: `(Either::One(_t), Either::Two(_u))` | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:140:27 - | -LL | &mut (Either::One(_t), Either::Two(_u)) => (), - | ^^ ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0507]: cannot move out of a shared reference --> $DIR/duplicate-suggestions.rs:86:11 @@ -299,11 +233,7 @@ LL | fn f5(&(X(_t), X(_u)): &(X, X)) { } | | data moved here | help: consider removing the `&`: `(X(_t), X(_u))` | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:86:15 - | -LL | fn f5(&(X(_t), X(_u)): &(X, X)) { } - | ^^ ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0507]: cannot move out of a mutable reference --> $DIR/duplicate-suggestions.rs:146:11 @@ -315,11 +245,7 @@ LL | fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { } | | data moved here | help: consider removing the `&mut`: `(X(_t), X(_u))` | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/duplicate-suggestions.rs:146:19 - | -LL | fn f6(&mut (X(_t), X(_u)): &mut (X, X)) { } - | ^^ ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error: aborting due to 17 previous errors diff --git a/src/test/ui/suggestions/dont-suggest-ref/simple.stderr b/src/test/ui/suggestions/dont-suggest-ref/simple.stderr index cb3ce5991ae..ac91ac43736 100644 --- a/src/test/ui/suggestions/dont-suggest-ref/simple.stderr +++ b/src/test/ui/suggestions/dont-suggest-ref/simple.stderr @@ -337,14 +337,7 @@ LL | &mut Either::One(_t) => (), LL | &mut Either::Two(_t) => (), | -- ...and here | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/simple.rs:221:26 - | -LL | &mut Either::One(_t) => (), - | ^^ -... -LL | &mut Either::Two(_t) => (), - | ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait help: consider removing the `&mut` | LL | Either::One(_t) => (), @@ -470,13 +463,7 @@ LL | (&mut Either::One(_t),) => (), LL | (&mut Either::Two(_t),) => (), | -- ...and here | -note: move occurs because these variables have types that don't implement the `Copy` trait - --> $DIR/simple.rs:280:27 - | -LL | (&mut Either::One(_t),) => (), - | ^^ -LL | (&mut Either::Two(_t),) => (), - | ^^ + = note: move occurs because these variables have types that don't implement the `Copy` trait error[E0507]: cannot move out of a shared reference --> $DIR/simple.rs:288:18 diff --git a/src/test/ui/type/type-mismatch-same-crate-name.rs b/src/test/ui/type/type-mismatch-same-crate-name.rs index b1f9a28e16d..eeda5460ac3 100644 --- a/src/test/ui/type/type-mismatch-same-crate-name.rs +++ b/src/test/ui/type/type-mismatch-same-crate-name.rs @@ -15,11 +15,11 @@ fn main() { extern crate crate_a1 as a; a::try_foo(foo2); //~^ ERROR mismatched types - //~| Perhaps two different versions of crate `crate_a1` + //~| perhaps two different versions of crate `crate_a1` //~| expected struct `main::a::Foo` a::try_bar(bar2); //~^ ERROR mismatched types - //~| Perhaps two different versions of crate `crate_a1` + //~| perhaps two different versions of crate `crate_a1` //~| expected trait `main::a::Bar` //~| expected struct `std::boxed::Box<(dyn main::a::Bar + 'static)>` //~| found struct `std::boxed::Box<dyn main::a::Bar>` diff --git a/src/test/ui/type/type-mismatch-same-crate-name.stderr b/src/test/ui/type/type-mismatch-same-crate-name.stderr index 91bbe9c1fbe..be5406696b7 100644 --- a/src/test/ui/type/type-mismatch-same-crate-name.stderr +++ b/src/test/ui/type/type-mismatch-same-crate-name.stderr @@ -4,11 +4,7 @@ error[E0308]: mismatched types LL | a::try_foo(foo2); | ^^^^ expected struct `main::a::Foo`, found a different struct `main::a::Foo` | -note: Perhaps two different versions of crate `crate_a1` are being used? - --> $DIR/type-mismatch-same-crate-name.rs:16:20 - | -LL | a::try_foo(foo2); - | ^^^^ + = note: perhaps two different versions of crate `crate_a1` are being used? error[E0308]: mismatched types --> $DIR/type-mismatch-same-crate-name.rs:20:20 @@ -18,11 +14,7 @@ LL | a::try_bar(bar2); | = note: expected struct `std::boxed::Box<(dyn main::a::Bar + 'static)>` found struct `std::boxed::Box<dyn main::a::Bar>` -note: Perhaps two different versions of crate `crate_a1` are being used? - --> $DIR/type-mismatch-same-crate-name.rs:20:20 - | -LL | a::try_bar(bar2); - | ^^^^ + = note: perhaps two different versions of crate `crate_a1` are being used? error: aborting due to 2 previous errors |
