diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-02-23 03:42:32 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-02-26 20:24:02 +0300 |
| commit | fa2d9fc4b9e578d95fbf65613d1bf732fbdfb0d4 (patch) | |
| tree | 1eb1a49b4750e2704d3d724fb4a12ea4e2237eff /src/test/ui/impl-trait | |
| parent | cdbd8c2f2aa69c4b8fe6f004449440e87c4ab87e (diff) | |
| download | rust-fa2d9fc4b9e578d95fbf65613d1bf732fbdfb0d4.tar.gz rust-fa2d9fc4b9e578d95fbf65613d1bf732fbdfb0d4.zip | |
Update UI tests
Diffstat (limited to 'src/test/ui/impl-trait')
10 files changed, 67 insertions, 67 deletions
diff --git a/src/test/ui/impl-trait/auto-trait-leak.stderr b/src/test/ui/impl-trait/auto-trait-leak.stderr index f69840238a7..bf7705881c9 100644 --- a/src/test/ui/impl-trait/auto-trait-leak.stderr +++ b/src/test/ui/impl-trait/auto-trait-leak.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>` --> $DIR/auto-trait-leak.rs:27:5 | -27 | send(before()); +LL | send(before()); | ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely | = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>` @@ -10,13 +10,13 @@ error[E0277]: the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::S note: required by `send` --> $DIR/auto-trait-leak.rs:24:1 | -24 | fn send<T: Send>(_: T) {} +LL | fn send<T: Send>(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>` --> $DIR/auto-trait-leak.rs:30:5 | -30 | send(after()); +LL | send(after()); | ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely | = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>` @@ -25,34 +25,34 @@ error[E0277]: the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::S note: required by `send` --> $DIR/auto-trait-leak.rs:24:1 | -24 | fn send<T: Send>(_: T) {} +LL | fn send<T: Send>(_: T) {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0391]: cyclic dependency detected --> $DIR/auto-trait-leak.rs:44:1 | -44 | fn cycle1() -> impl Clone { +LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic reference | note: the cycle begins when processing `cycle1`... --> $DIR/auto-trait-leak.rs:44:1 | -44 | fn cycle1() -> impl Clone { +LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which then requires processing `cycle2::{{impl-Trait}}`... --> $DIR/auto-trait-leak.rs:52:16 | -52 | fn cycle2() -> impl Clone { +LL | fn cycle2() -> impl Clone { | ^^^^^^^^^^ note: ...which then requires processing `cycle2`... --> $DIR/auto-trait-leak.rs:52:1 | -52 | fn cycle2() -> impl Clone { +LL | fn cycle2() -> impl Clone { | ^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...which then requires processing `cycle1::{{impl-Trait}}`... --> $DIR/auto-trait-leak.rs:44:16 | -44 | fn cycle1() -> impl Clone { +LL | fn cycle1() -> impl Clone { | ^^^^^^^^^^ = note: ...which then again requires processing `cycle1`, completing the cycle. diff --git a/src/test/ui/impl-trait/equality.stderr b/src/test/ui/impl-trait/equality.stderr index c30b0d7f648..0c72468a267 100644 --- a/src/test/ui/impl-trait/equality.stderr +++ b/src/test/ui/impl-trait/equality.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/equality.rs:25:5 | -25 | 0_u32 +LL | 0_u32 | ^^^^^ expected i32, found u32 | = note: expected type `i32` @@ -10,7 +10,7 @@ error[E0308]: mismatched types error[E0277]: cannot add `impl Foo` to `u32` --> $DIR/equality.rs:34:11 | -34 | n + sum_to(n - 1) +LL | n + sum_to(n - 1) | ^ no implementation for `u32 + impl Foo` | = help: the trait `std::ops::Add<impl Foo>` is not implemented for `u32` @@ -18,7 +18,7 @@ error[E0277]: cannot add `impl Foo` to `u32` error[E0308]: mismatched types --> $DIR/equality.rs:53:18 | -53 | let _: u32 = hide(0_u32); +LL | let _: u32 = hide(0_u32); | ^^^^^^^^^^^ expected u32, found anonymized type | = note: expected type `u32` @@ -27,7 +27,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/equality.rs:59:18 | -59 | let _: i32 = Leak::leak(hide(0_i32)); +LL | let _: i32 = Leak::leak(hide(0_i32)); | ^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found associated type | = note: expected type `i32` @@ -36,7 +36,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/equality.rs:66:10 | -66 | x = (x.1, +LL | x = (x.1, | ^^^ expected u32, found i32 | = note: expected type `impl Foo` (u32) @@ -45,7 +45,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/equality.rs:69:10 | -69 | x.0); +LL | x.0); | ^^^ expected i32, found u32 | = note: expected type `impl Foo` (i32) diff --git a/src/test/ui/impl-trait/impl-trait-plus-priority.stderr b/src/test/ui/impl-trait/impl-trait-plus-priority.stderr index 7010ab1e471..1d4159aaa45 100644 --- a/src/test/ui/impl-trait/impl-trait-plus-priority.stderr +++ b/src/test/ui/impl-trait/impl-trait-plus-priority.stderr @@ -1,67 +1,67 @@ error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:33:18 | -33 | type A = fn() -> impl A +; +LL | type A = fn() -> impl A +; | ^^^^^^^^ help: use parentheses to disambiguate: `(impl A)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:35:18 | -35 | type A = fn() -> impl A + B; +LL | type A = fn() -> impl A + B; | ^^^^^^^^^^ help: use parentheses to disambiguate: `(impl A + B)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:37:18 | -37 | type A = fn() -> dyn A + B; +LL | type A = fn() -> dyn A + B; | ^^^^^^^^^ help: use parentheses to disambiguate: `(dyn A + B)` error[E0178]: expected a path on the left-hand side of `+`, not `fn() -> A` --> $DIR/impl-trait-plus-priority.rs:39:10 | -39 | type A = fn() -> A + B; +LL | type A = fn() -> A + B; | ^^^^^^^^^^^^^ perhaps you forgot parentheses? error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:42:18 | -42 | type A = Fn() -> impl A +; +LL | type A = Fn() -> impl A +; | ^^^^^^^^ help: use parentheses to disambiguate: `(impl A)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:44:18 | -44 | type A = Fn() -> impl A + B; +LL | type A = Fn() -> impl A + B; | ^^^^^^^^^^ help: use parentheses to disambiguate: `(impl A + B)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:46:18 | -46 | type A = Fn() -> dyn A + B; +LL | type A = Fn() -> dyn A + B; | ^^^^^^^^^ help: use parentheses to disambiguate: `(dyn A + B)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:50:11 | -50 | type A = &impl A +; +LL | type A = &impl A +; | ^^^^^^^^ help: use parentheses to disambiguate: `(impl A)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:52:11 | -52 | type A = &impl A + B; +LL | type A = &impl A + B; | ^^^^^^^^^^ help: use parentheses to disambiguate: `(impl A + B)` error: ambiguous `+` in a type --> $DIR/impl-trait-plus-priority.rs:54:11 | -54 | type A = &dyn A + B; +LL | type A = &dyn A + B; | ^^^^^^^^^ help: use parentheses to disambiguate: `(dyn A + B)` error[E0178]: expected a path on the left-hand side of `+`, not `&A` --> $DIR/impl-trait-plus-priority.rs:56:10 | -56 | type A = &A + B; +LL | type A = &A + B; | ^^^^^^ help: try adding parentheses: `&(A + B)` error: aborting due to 11 previous errors diff --git a/src/test/ui/impl-trait/issue-21659-show-relevant-trait-impls-3.stderr b/src/test/ui/impl-trait/issue-21659-show-relevant-trait-impls-3.stderr index d5cc1ea8085..d80251200b2 100644 --- a/src/test/ui/impl-trait/issue-21659-show-relevant-trait-impls-3.stderr +++ b/src/test/ui/impl-trait/issue-21659-show-relevant-trait-impls-3.stderr @@ -1,10 +1,10 @@ error[E0599]: no method named `foo` found for type `Bar` in the current scope --> $DIR/issue-21659-show-relevant-trait-impls-3.rs:30:8 | -23 | struct Bar; +LL | struct Bar; | ----------- method `foo` not found for this ... -30 | f1.foo(1usize); +LL | f1.foo(1usize); | ^^^ | = help: items from traits can only be used if the trait is implemented and in scope diff --git a/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr b/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr index 8ffbd29eabe..b441ff518bd 100644 --- a/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr +++ b/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr @@ -1,10 +1,10 @@ error[E0599]: no method named `is_empty` found for type `Foo` in the current scope --> $DIR/method-suggestion-no-duplication.rs:19:15 | -14 | struct Foo; +LL | struct Foo; | ----------- method `is_empty` not found for this ... -19 | foo(|s| s.is_empty()); +LL | foo(|s| s.is_empty()); | ^^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope diff --git a/src/test/ui/impl-trait/no-method-suggested-traits.stderr b/src/test/ui/impl-trait/no-method-suggested-traits.stderr index f136fd4072c..d721c2ef686 100644 --- a/src/test/ui/impl-trait/no-method-suggested-traits.stderr +++ b/src/test/ui/impl-trait/no-method-suggested-traits.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `method` found for type `u32` in the current scope --> $DIR/no-method-suggested-traits.rs:33:10 | -33 | 1u32.method(); +LL | 1u32.method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope @@ -19,7 +19,7 @@ help: the following traits are implemented but not in scope, perhaps add a `use` error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&u32>>` in the current scope --> $DIR/no-method-suggested-traits.rs:36:44 | -36 | std::rc::Rc::new(&mut Box::new(&1u32)).method(); +LL | std::rc::Rc::new(&mut Box::new(&1u32)).method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope @@ -37,7 +37,7 @@ help: the following traits are implemented but not in scope, perhaps add a `use` error[E0599]: no method named `method` found for type `char` in the current scope --> $DIR/no-method-suggested-traits.rs:40:9 | -40 | 'a'.method(); +LL | 'a'.method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope @@ -49,7 +49,7 @@ help: the following trait is implemented but not in scope, perhaps add a `use` f error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&char>>` in the current scope --> $DIR/no-method-suggested-traits.rs:42:43 | -42 | std::rc::Rc::new(&mut Box::new(&'a')).method(); +LL | std::rc::Rc::new(&mut Box::new(&'a')).method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope @@ -61,7 +61,7 @@ help: the following trait is implemented but not in scope, perhaps add a `use` f error[E0599]: no method named `method` found for type `i32` in the current scope --> $DIR/no-method-suggested-traits.rs:45:10 | -45 | 1i32.method(); +LL | 1i32.method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope @@ -73,7 +73,7 @@ help: the following trait is implemented but not in scope, perhaps add a `use` f error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&i32>>` in the current scope --> $DIR/no-method-suggested-traits.rs:47:44 | -47 | std::rc::Rc::new(&mut Box::new(&1i32)).method(); +LL | std::rc::Rc::new(&mut Box::new(&1i32)).method(); | ^^^^^^ | = help: items from traits can only be used if the trait is in scope @@ -85,10 +85,10 @@ help: the following trait is implemented but not in scope, perhaps add a `use` f error[E0599]: no method named `method` found for type `Foo` in the current scope --> $DIR/no-method-suggested-traits.rs:50:9 | -14 | struct Foo; +LL | struct Foo; | ----------- method `method` not found for this ... -50 | Foo.method(); +LL | Foo.method(); | ^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -101,7 +101,7 @@ error[E0599]: no method named `method` found for type `Foo` in the current scope error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::boxed::Box<&Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:52:43 | -52 | std::rc::Rc::new(&mut Box::new(&Foo)).method(); +LL | std::rc::Rc::new(&mut Box::new(&Foo)).method(); | ^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -114,7 +114,7 @@ error[E0599]: no method named `method` found for type `std::rc::Rc<&mut std::box error[E0599]: no method named `method2` found for type `u64` in the current scope --> $DIR/no-method-suggested-traits.rs:55:10 | -55 | 1u64.method2(); +LL | 1u64.method2(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -124,7 +124,7 @@ error[E0599]: no method named `method2` found for type `u64` in the current scop error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::boxed::Box<&u64>>` in the current scope --> $DIR/no-method-suggested-traits.rs:57:44 | -57 | std::rc::Rc::new(&mut Box::new(&1u64)).method2(); +LL | std::rc::Rc::new(&mut Box::new(&1u64)).method2(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -134,7 +134,7 @@ error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::bo error[E0599]: no method named `method2` found for type `no_method_suggested_traits::Foo` in the current scope --> $DIR/no-method-suggested-traits.rs:60:37 | -60 | no_method_suggested_traits::Foo.method2(); +LL | no_method_suggested_traits::Foo.method2(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -144,7 +144,7 @@ error[E0599]: no method named `method2` found for type `no_method_suggested_trai error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:62:71 | -62 | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2(); +LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -154,7 +154,7 @@ error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::bo error[E0599]: no method named `method2` found for type `no_method_suggested_traits::Bar` in the current scope --> $DIR/no-method-suggested-traits.rs:64:40 | -64 | no_method_suggested_traits::Bar::X.method2(); +LL | no_method_suggested_traits::Bar::X.method2(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -164,7 +164,7 @@ error[E0599]: no method named `method2` found for type `no_method_suggested_trai error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope --> $DIR/no-method-suggested-traits.rs:66:74 | -66 | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2(); +LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -174,10 +174,10 @@ error[E0599]: no method named `method2` found for type `std::rc::Rc<&mut std::bo error[E0599]: no method named `method3` found for type `Foo` in the current scope --> $DIR/no-method-suggested-traits.rs:69:9 | -14 | struct Foo; +LL | struct Foo; | ----------- method `method3` not found for this ... -69 | Foo.method3(); +LL | Foo.method3(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -187,7 +187,7 @@ error[E0599]: no method named `method3` found for type `Foo` in the current scop error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:71:43 | -71 | std::rc::Rc::new(&mut Box::new(&Foo)).method3(); +LL | std::rc::Rc::new(&mut Box::new(&Foo)).method3(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -197,10 +197,10 @@ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::bo error[E0599]: no method named `method3` found for type `Bar` in the current scope --> $DIR/no-method-suggested-traits.rs:73:12 | -15 | enum Bar { X } +LL | enum Bar { X } | -------- method `method3` not found for this ... -73 | Bar::X.method3(); +LL | Bar::X.method3(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -210,7 +210,7 @@ error[E0599]: no method named `method3` found for type `Bar` in the current scop error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&Bar>>` in the current scope --> $DIR/no-method-suggested-traits.rs:75:46 | -75 | std::rc::Rc::new(&mut Box::new(&Bar::X)).method3(); +LL | std::rc::Rc::new(&mut Box::new(&Bar::X)).method3(); | ^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope @@ -220,37 +220,37 @@ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::bo error[E0599]: no method named `method3` found for type `usize` in the current scope --> $DIR/no-method-suggested-traits.rs:79:13 | -79 | 1_usize.method3(); //~ ERROR no method named +LL | 1_usize.method3(); //~ ERROR no method named | ^^^^^^^ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&usize>>` in the current scope --> $DIR/no-method-suggested-traits.rs:80:47 | -80 | std::rc::Rc::new(&mut Box::new(&1_usize)).method3(); //~ ERROR no method named +LL | std::rc::Rc::new(&mut Box::new(&1_usize)).method3(); //~ ERROR no method named | ^^^^^^^ error[E0599]: no method named `method3` found for type `no_method_suggested_traits::Foo` in the current scope --> $DIR/no-method-suggested-traits.rs:81:37 | -81 | no_method_suggested_traits::Foo.method3(); //~ ERROR no method named +LL | no_method_suggested_traits::Foo.method3(); //~ ERROR no method named | ^^^^^^^ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:82:71 | -82 | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method3(); +LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method3(); | ^^^^^^^ error[E0599]: no method named `method3` found for type `no_method_suggested_traits::Bar` in the current scope --> $DIR/no-method-suggested-traits.rs:84:40 | -84 | no_method_suggested_traits::Bar::X.method3(); //~ ERROR no method named +LL | no_method_suggested_traits::Bar::X.method3(); //~ ERROR no method named | ^^^^^^^ error[E0599]: no method named `method3` found for type `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope --> $DIR/no-method-suggested-traits.rs:85:74 | -85 | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3(); +LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3(); | ^^^^^^^ error: aborting due to 24 previous errors diff --git a/src/test/ui/impl-trait/trait_type.stderr b/src/test/ui/impl-trait/trait_type.stderr index 134386825d6..6c2fde03de3 100644 --- a/src/test/ui/impl-trait/trait_type.stderr +++ b/src/test/ui/impl-trait/trait_type.stderr @@ -1,7 +1,7 @@ error[E0053]: method `fmt` has an incompatible type for trait --> $DIR/trait_type.rs:17:4 | -17 | fn fmt(&self, x: &str) -> () { } +LL | fn fmt(&self, x: &str) -> () { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ in mutability | = note: expected type `fn(&MyType, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` @@ -10,7 +10,7 @@ error[E0053]: method `fmt` has an incompatible type for trait error[E0050]: method `fmt` has 1 parameter but the declaration in trait `std::fmt::Display::fmt` has 2 --> $DIR/trait_type.rs:22:11 | -22 | fn fmt(&self) -> () { } +LL | fn fmt(&self) -> () { } | ^^^^^ expected 2 parameters, found 1 | = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` @@ -18,7 +18,7 @@ error[E0050]: method `fmt` has 1 parameter but the declaration in trait `std::fm error[E0186]: method `fmt` has a `&self` declaration in the trait, but not in the impl --> $DIR/trait_type.rs:27:4 | -27 | fn fmt() -> () { } +LL | fn fmt() -> () { } | ^^^^^^^^^^^^^^ expected `&self` in impl | = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` @@ -26,7 +26,7 @@ error[E0186]: method `fmt` has a `&self` declaration in the trait, but not in th error[E0046]: not all trait items implemented, missing: `fmt` --> $DIR/trait_type.rs:31:1 | -31 | impl std::fmt::Display for MyType4 {} +LL | impl std::fmt::Display for MyType4 {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation | = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` diff --git a/src/test/ui/impl-trait/universal-mismatched-type.stderr b/src/test/ui/impl-trait/universal-mismatched-type.stderr index 688d0b3be44..67b3dacdaf5 100644 --- a/src/test/ui/impl-trait/universal-mismatched-type.stderr +++ b/src/test/ui/impl-trait/universal-mismatched-type.stderr @@ -1,9 +1,9 @@ error[E0308]: mismatched types --> $DIR/universal-mismatched-type.rs:16:5 | -15 | fn foo(x: impl Debug) -> String { +LL | fn foo(x: impl Debug) -> String { | ------ expected `std::string::String` because of return type -16 | x //~ ERROR mismatched types +LL | x //~ ERROR mismatched types | ^ expected struct `std::string::String`, found type parameter | = note: expected type `std::string::String` diff --git a/src/test/ui/impl-trait/universal-two-impl-traits.stderr b/src/test/ui/impl-trait/universal-two-impl-traits.stderr index ab41e44cdea..4309c1a9bc9 100644 --- a/src/test/ui/impl-trait/universal-two-impl-traits.stderr +++ b/src/test/ui/impl-trait/universal-two-impl-traits.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/universal-two-impl-traits.rs:17:9 | -17 | a = y; //~ ERROR mismatched +LL | a = y; //~ ERROR mismatched | ^ expected type parameter, found a different type parameter | = note: expected type `impl Debug` (type parameter) diff --git a/src/test/ui/impl-trait/universal_wrong_bounds.stderr b/src/test/ui/impl-trait/universal_wrong_bounds.stderr index d3ae05eb4e5..65a88f57596 100644 --- a/src/test/ui/impl-trait/universal_wrong_bounds.stderr +++ b/src/test/ui/impl-trait/universal_wrong_bounds.stderr @@ -1,13 +1,13 @@ error[E0425]: cannot find function `wants_clone` in this scope --> $DIR/universal_wrong_bounds.rs:18:5 | -18 | wants_clone(f); //~ ERROR cannot find +LL | wants_clone(f); //~ ERROR cannot find | ^^^^^^^^^^^ did you mean `wants_cone`? error[E0405]: cannot find trait `Debug` in this scope --> $DIR/universal_wrong_bounds.rs:21:24 | -21 | fn wants_debug(g: impl Debug) { } //~ ERROR cannot find +LL | fn wants_debug(g: impl Debug) { } //~ ERROR cannot find | ^^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | @@ -17,7 +17,7 @@ help: possible candidate is found in another module, you can import it into scop error[E0405]: cannot find trait `Debug` in this scope --> $DIR/universal_wrong_bounds.rs:22:26 | -22 | fn wants_display(g: impl Debug) { } //~ ERROR cannot find +LL | fn wants_display(g: impl Debug) { } //~ ERROR cannot find | ^^^^^ not found in this scope help: possible candidate is found in another module, you can import it into scope | |
