diff options
| author | Alexander Regueiro <alexreg@me.com> | 2018-11-27 02:59:49 +0000 |
|---|---|---|
| committer | Alexander Regueiro <alexreg@me.com> | 2018-12-07 23:53:34 +0000 |
| commit | ee89c088b057affb5bdb96195e107a218b64b1c5 (patch) | |
| tree | e9e578d5bf6081b4ed47035e2793ad4c29b65e02 /src/test/ui | |
| parent | 4a45578bc58ff262864f72680cc02e83f5d2f5b3 (diff) | |
| download | rust-ee89c088b057affb5bdb96195e107a218b64b1c5.tar.gz rust-ee89c088b057affb5bdb96195e107a218b64b1c5.zip | |
Various minor/cosmetic improvements to code
Diffstat (limited to 'src/test/ui')
70 files changed, 227 insertions, 153 deletions
diff --git a/src/test/ui/associated-const/associated-const-no-item.stderr b/src/test/ui/associated-const/associated-const-no-item.stderr index a09c04ea0b2..31f9683ca0f 100644 --- a/src/test/ui/associated-const/associated-const-no-item.stderr +++ b/src/test/ui/associated-const/associated-const-no-item.stderr @@ -1,8 +1,10 @@ error[E0599]: no associated item named `ID` found for type `i32` in the current scope - --> $DIR/associated-const-no-item.rs:16:16 + --> $DIR/associated-const-no-item.rs:16:23 | LL | const X: i32 = <i32>::ID; - | ^^^^^^^^^ associated item not found in `i32` + | -------^^ + | | + | associated item not found in `i32` | = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `ID`, perhaps you need to implement it: diff --git a/src/test/ui/bogus-tag.stderr b/src/test/ui/bogus-tag.stderr index f9917b07f07..36ed28c345a 100644 --- a/src/test/ui/bogus-tag.stderr +++ b/src/test/ui/bogus-tag.stderr @@ -1,11 +1,11 @@ error[E0599]: no variant named `hsl` found for type `color` in the current scope - --> $DIR/bogus-tag.rs:18:7 + --> $DIR/bogus-tag.rs:18:14 | LL | enum color { rgb(isize, isize, isize), rgba(isize, isize, isize, isize), } | ---------- variant `hsl` not found here ... LL | color::hsl(h, s, l) => { println!("hsl"); } - | ^^^^^^^^^^^^^^^^^^^ variant not found in `color` + | -------^^^--------- variant not found in `color` error: aborting due to previous error diff --git a/src/test/ui/borrowck/two-phase-nonrecv-autoref.rs b/src/test/ui/borrowck/two-phase-nonrecv-autoref.rs index 30752e8ddb1..fd4c108b594 100644 --- a/src/test/ui/borrowck/two-phase-nonrecv-autoref.rs +++ b/src/test/ui/borrowck/two-phase-nonrecv-autoref.rs @@ -49,7 +49,7 @@ fn deref_coercion(x: &mut u32) { // // - [x] Resolving overloaded_call_traits (call, call_mut, call_once) // - [x] deref_coercion (shown above) -// - [x] coerce_unsized e.g. `&[T; n]`, `&mut [T; n] -> &[T]`, +// - [x] coerce_unsized e.g., `&[T; n]`, `&mut [T; n] -> &[T]`, // `&mut [T; n] -> &mut [T]`, `&Concrete -> &Trait` // - [x] Method Call Receivers (the case we want to support!) // - [x] ExprKind::Index and ExprKind::Unary Deref; only need to handle coerce_index_op diff --git a/src/test/ui/coherence/coherence-all-remote.stderr b/src/test/ui/coherence/coherence-all-remote.stderr index 1f71969989b..718ab3dedc4 100644 --- a/src/test/ui/coherence/coherence-all-remote.stderr +++ b/src/test/ui/coherence/coherence-all-remote.stderr @@ -1,4 +1,4 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g. `MyStruct<T>`) +error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) --> $DIR/coherence-all-remote.rs:16:1 | LL | impl<T> Remote1<T> for isize { } diff --git a/src/test/ui/coherence/coherence-bigint-param.stderr b/src/test/ui/coherence/coherence-bigint-param.stderr index 7d2796ee690..a5d9f5a403f 100644 --- a/src/test/ui/coherence/coherence-bigint-param.stderr +++ b/src/test/ui/coherence/coherence-bigint-param.stderr @@ -1,4 +1,4 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g. `MyStruct<T>`) +error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) --> $DIR/coherence-bigint-param.rs:18:1 | LL | impl<T> Remote1<BigInt> for T { } diff --git a/src/test/ui/coherence/coherence-cow.a.stderr b/src/test/ui/coherence/coherence-cow.a.stderr index f05333348ec..368935f4cfb 100644 --- a/src/test/ui/coherence/coherence-cow.a.stderr +++ b/src/test/ui/coherence/coherence-cow.a.stderr @@ -1,4 +1,4 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g. `MyStruct<T>`) +error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) --> $DIR/coherence-cow.rs:26:1 | LL | impl<T> Remote for Pair<T,Cover<T>> { } //[a]~ ERROR E0210 diff --git a/src/test/ui/coherence/coherence-cow.b.stderr b/src/test/ui/coherence/coherence-cow.b.stderr index 269bcd576af..74ad8502add 100644 --- a/src/test/ui/coherence/coherence-cow.b.stderr +++ b/src/test/ui/coherence/coherence-cow.b.stderr @@ -1,4 +1,4 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g. `MyStruct<T>`) +error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) --> $DIR/coherence-cow.rs:29:1 | LL | impl<T> Remote for Pair<Cover<T>,T> { } //[b]~ ERROR E0210 diff --git a/src/test/ui/coherence/coherence-cow.c.stderr b/src/test/ui/coherence/coherence-cow.c.stderr index e89308db054..2e3a6b54e84 100644 --- a/src/test/ui/coherence/coherence-cow.c.stderr +++ b/src/test/ui/coherence/coherence-cow.c.stderr @@ -1,4 +1,4 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g. `MyStruct<T>`) +error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) --> $DIR/coherence-cow.rs:32:1 | LL | impl<T,U> Remote for Pair<Cover<T>,U> { } diff --git a/src/test/ui/coherence/coherence-cross-crate-conflict.stderr b/src/test/ui/coherence/coherence-cross-crate-conflict.stderr index ee11967cc0d..31c41ab7234 100644 --- a/src/test/ui/coherence/coherence-cross-crate-conflict.stderr +++ b/src/test/ui/coherence/coherence-cross-crate-conflict.stderr @@ -7,7 +7,7 @@ LL | impl<A> Foo for A { = note: conflicting implementation in crate `trait_impl_conflict`: - impl trait_impl_conflict::Foo for isize; -error[E0210]: type parameter `A` must be used as the type parameter for some local type (e.g. `MyStruct<A>`) +error[E0210]: type parameter `A` must be used as the type parameter for some local type (e.g., `MyStruct<A>`) --> $DIR/coherence-cross-crate-conflict.rs:18:1 | LL | impl<A> Foo for A { diff --git a/src/test/ui/coherence/coherence-lone-type-parameter.stderr b/src/test/ui/coherence/coherence-lone-type-parameter.stderr index 6389bc0e7ab..e3a77229634 100644 --- a/src/test/ui/coherence/coherence-lone-type-parameter.stderr +++ b/src/test/ui/coherence/coherence-lone-type-parameter.stderr @@ -1,4 +1,4 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g. `MyStruct<T>`) +error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) --> $DIR/coherence-lone-type-parameter.rs:16:1 | LL | impl<T> Remote for T { } diff --git a/src/test/ui/coherence/coherence-overlapping-pairs.stderr b/src/test/ui/coherence/coherence-overlapping-pairs.stderr index 41d47888554..286ebefba15 100644 --- a/src/test/ui/coherence/coherence-overlapping-pairs.stderr +++ b/src/test/ui/coherence/coherence-overlapping-pairs.stderr @@ -1,4 +1,4 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g. `MyStruct<T>`) +error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) --> $DIR/coherence-overlapping-pairs.rs:18:1 | LL | impl<T> Remote for lib::Pair<T,Foo> { } diff --git a/src/test/ui/coherence/coherence-pair-covered-uncovered-1.stderr b/src/test/ui/coherence/coherence-pair-covered-uncovered-1.stderr index 3545593fb6d..80ab0cc09f9 100644 --- a/src/test/ui/coherence/coherence-pair-covered-uncovered-1.stderr +++ b/src/test/ui/coherence/coherence-pair-covered-uncovered-1.stderr @@ -1,4 +1,4 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g. `MyStruct<T>`) +error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) --> $DIR/coherence-pair-covered-uncovered-1.rs:21:1 | LL | impl<T, U> Remote1<Pair<T, Local<U>>> for i32 { } diff --git a/src/test/ui/coherence/coherence-pair-covered-uncovered.stderr b/src/test/ui/coherence/coherence-pair-covered-uncovered.stderr index f58cb4648cb..25b4948e083 100644 --- a/src/test/ui/coherence/coherence-pair-covered-uncovered.stderr +++ b/src/test/ui/coherence/coherence-pair-covered-uncovered.stderr @@ -1,4 +1,4 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g. `MyStruct<T>`) +error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) --> $DIR/coherence-pair-covered-uncovered.rs:18:1 | LL | impl<T,U> Remote for Pair<T,Local<U>> { } diff --git a/src/test/ui/coherence/coherence-vec-local-2.stderr b/src/test/ui/coherence/coherence-vec-local-2.stderr index 2980d4a3392..0ccd938e900 100644 --- a/src/test/ui/coherence/coherence-vec-local-2.stderr +++ b/src/test/ui/coherence/coherence-vec-local-2.stderr @@ -1,4 +1,4 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g. `MyStruct<T>`) +error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) --> $DIR/coherence-vec-local-2.rs:21:1 | LL | impl<T> Remote for Vec<Local<T>> { } //~ ERROR E0210 diff --git a/src/test/ui/constructor-lifetime-args.rs b/src/test/ui/constructor-lifetime-args.rs index 1fe50cfebba..a03599ada1c 100644 --- a/src/test/ui/constructor-lifetime-args.rs +++ b/src/test/ui/constructor-lifetime-args.rs @@ -9,7 +9,7 @@ // except according to those terms. // All lifetime parameters in struct constructors are currently considered early bound, -// i.e. `S::<ARGS>` is interpreted kinda like an associated item `S::<ARGS>::ctor`. +// i.e., `S::<ARGS>` is interpreted kinda like an associated item `S::<ARGS>::ctor`. // This behavior is a bit weird, because if equivalent constructor were written manually // it would get late bound lifetime parameters. // Variant constructors behave in the same way, lifetime parameters are considered diff --git a/src/test/ui/consts/const-eval/const-eval-overflow2.rs b/src/test/ui/consts/const-eval/const-eval-overflow2.rs index 8e094a7f7dc..7819cafdb0f 100644 --- a/src/test/ui/consts/const-eval/const-eval-overflow2.rs +++ b/src/test/ui/consts/const-eval/const-eval-overflow2.rs @@ -11,7 +11,7 @@ #![allow(unused_imports)] // Note: the relevant lint pass here runs before some of the constant -// evaluation below (e.g. that performed by codegen and llvm), so if you +// evaluation below (e.g., that performed by codegen and llvm), so if you // change this warn to a deny, then the compiler will exit before // those errors are detected. diff --git a/src/test/ui/consts/const-eval/const-eval-overflow2b.rs b/src/test/ui/consts/const-eval/const-eval-overflow2b.rs index c69d03071e7..475a5117685 100644 --- a/src/test/ui/consts/const-eval/const-eval-overflow2b.rs +++ b/src/test/ui/consts/const-eval/const-eval-overflow2b.rs @@ -11,7 +11,7 @@ #![allow(unused_imports)] // Note: the relevant lint pass here runs before some of the constant -// evaluation below (e.g. that performed by codegen and llvm), so if you +// evaluation below (e.g., that performed by codegen and llvm), so if you // change this warn to a deny, then the compiler will exit before // those errors are detected. diff --git a/src/test/ui/consts/const-eval/const-eval-overflow2c.rs b/src/test/ui/consts/const-eval/const-eval-overflow2c.rs index f442661ec63..039e6b251cd 100644 --- a/src/test/ui/consts/const-eval/const-eval-overflow2c.rs +++ b/src/test/ui/consts/const-eval/const-eval-overflow2c.rs @@ -11,7 +11,7 @@ #![allow(unused_imports)] // Note: the relevant lint pass here runs before some of the constant -// evaluation below (e.g. that performed by codegen and llvm), so if you +// evaluation below (e.g., that performed by codegen and llvm), so if you // change this warn to a deny, then the compiler will exit before // those errors are detected. diff --git a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr index b3d7ba3e5c4..85b63f5c471 100644 --- a/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr +++ b/src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr @@ -4,7 +4,7 @@ error: `foo` is not yet stable as a const fn LL | const fn bar() -> u32 { foo() } //~ ERROR `foo` is not yet stable as a const fn | ^^^^^ | - = help: in Nightly builds, add `#![feature(foo)]` to the crate attributes to enable + = help: add `#![feature(foo)]` to the crate attributes to enable error[E0597]: borrowed value does not live long enough --> $DIR/dont_promote_unstable_const_fn.rs:28:28 diff --git a/src/test/ui/consts/const-pattern-irrefutable.rs b/src/test/ui/consts/const-pattern-irrefutable.rs index 278864d6de9..2f08d124848 100644 --- a/src/test/ui/consts/const-pattern-irrefutable.rs +++ b/src/test/ui/consts/const-pattern-irrefutable.rs @@ -22,5 +22,5 @@ fn main() { let a = 4; //~ ERROR refutable pattern in local binding: `0u8..=1u8` not covered let c = 4; //~ ERROR refutable pattern in local binding: `0u8..=1u8` not covered let d = 4; //~ ERROR refutable pattern in local binding: `0u8..=1u8` not covered - fn f() {} // Check that the `NOTE`s still work with an item here (c.f. issue #35115). + fn f() {} // Check that the `NOTE`s still work with an item here (cf. issue #35115). } diff --git a/src/test/ui/consts/const-typeid-of.stderr b/src/test/ui/consts/const-typeid-of.stderr index d13ced9a10a..ba5f65988e2 100644 --- a/src/test/ui/consts/const-typeid-of.stderr +++ b/src/test/ui/consts/const-typeid-of.stderr @@ -4,7 +4,7 @@ error: `std::any::TypeId::of` is not yet stable as a const fn LL | const A_ID: TypeId = TypeId::of::<A>(); | ^^^^^^^^^^^^^^^^^ | - = help: in Nightly builds, add `#![feature(const_type_id)]` to the crate attributes to enable + = help: add `#![feature(const_type_id)]` to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/bad-assoc-pat.stderr b/src/test/ui/did_you_mean/bad-assoc-pat.stderr index 10ee175a97e..a7b3846a8f6 100644 --- a/src/test/ui/did_you_mean/bad-assoc-pat.stderr +++ b/src/test/ui/did_you_mean/bad-assoc-pat.stderr @@ -23,28 +23,36 @@ LL | &(u8,)::AssocItem => {} | ^^^^^^^^^^^^^^^^ help: try: `<(u8,)>::AssocItem` error[E0599]: no associated item named `AssocItem` found for type `[u8]` in the current scope - --> $DIR/bad-assoc-pat.rs:13:9 + --> $DIR/bad-assoc-pat.rs:13:15 | LL | [u8]::AssocItem => {} - | ^^^^^^^^^^^^^^^ associated item not found in `[u8]` + | ------^^^^^^^^^ + | | + | associated item not found in `[u8]` error[E0599]: no associated item named `AssocItem` found for type `(u8, u8)` in the current scope - --> $DIR/bad-assoc-pat.rs:16:9 + --> $DIR/bad-assoc-pat.rs:16:19 | LL | (u8, u8)::AssocItem => {} - | ^^^^^^^^^^^^^^^^^^^ associated item not found in `(u8, u8)` + | ----------^^^^^^^^^ + | | + | associated item not found in `(u8, u8)` error[E0599]: no associated item named `AssocItem` found for type `_` in the current scope - --> $DIR/bad-assoc-pat.rs:19:9 + --> $DIR/bad-assoc-pat.rs:19:12 | LL | _::AssocItem => {} - | ^^^^^^^^^^^^ associated item not found in `_` + | ---^^^^^^^^^ + | | + | associated item not found in `_` error[E0599]: no associated item named `AssocItem` found for type `(u8,)` in the current scope - --> $DIR/bad-assoc-pat.rs:24:10 + --> $DIR/bad-assoc-pat.rs:24:17 | LL | &(u8,)::AssocItem => {} - | ^^^^^^^^^^^^^^^^ associated item not found in `(u8,)` + | -------^^^^^^^^^ + | | + | associated item not found in `(u8,)` error: aborting due to 8 previous errors diff --git a/src/test/ui/dont-suggest-private-trait-method.stderr b/src/test/ui/dont-suggest-private-trait-method.stderr index 81ecc546a6d..c2f21606e21 100644 --- a/src/test/ui/dont-suggest-private-trait-method.stderr +++ b/src/test/ui/dont-suggest-private-trait-method.stderr @@ -1,11 +1,13 @@ error[E0599]: no function or associated item named `new` found for type `T` in the current scope - --> $DIR/dont-suggest-private-trait-method.rs:14:5 + --> $DIR/dont-suggest-private-trait-method.rs:14:8 | LL | struct T; | --------- function or associated item `new` not found for this ... LL | T::new(); - | ^^^^^^ function or associated item not found in `T` + | ---^^^ + | | + | function or associated item not found in `T` error: aborting due to previous error diff --git a/src/test/ui/dropck/dropck-eyepatch.rs b/src/test/ui/dropck/dropck-eyepatch.rs index d7a671fd33c..fb1c03b6786 100644 --- a/src/test/ui/dropck/dropck-eyepatch.rs +++ b/src/test/ui/dropck/dropck-eyepatch.rs @@ -31,7 +31,7 @@ // - D means "I implement Drop" // // - P means "I implement Drop but guarantee my (first) parameter is -// pure, i.e. not accessed from the destructor"; no other parameters +// pure, i.e., not accessed from the destructor"; no other parameters // are pure. // // - S means "I do not implement Drop" diff --git a/src/test/ui/e0119/complex-impl.stderr b/src/test/ui/e0119/complex-impl.stderr index 1fc4c28d67c..d60f9c4e6a8 100644 --- a/src/test/ui/e0119/complex-impl.stderr +++ b/src/test/ui/e0119/complex-impl.stderr @@ -8,7 +8,7 @@ LL | impl<R> External for (Q, R) {} //~ ERROR must be used - impl<'a, 'b, 'c, T, U, V, W> complex_impl_support::External for (T, complex_impl_support::M<'a, 'b, 'c, std::boxed::Box<U>, V, W>) where <U as std::ops::FnOnce<(T,)>>::Output == V, <V as std::iter::Iterator>::Item == T, 'b : 'a, T : 'a, U: std::ops::FnOnce<(T,)>, U : 'static, V: std::iter::Iterator, V: std::clone::Clone, W: std::ops::Add, <W as std::ops::Add>::Output: std::marker::Copy; -error[E0210]: type parameter `R` must be used as the type parameter for some local type (e.g. `MyStruct<R>`) +error[E0210]: type parameter `R` must be used as the type parameter for some local type (e.g., `MyStruct<R>`) --> $DIR/complex-impl.rs:19:1 | LL | impl<R> External for (Q, R) {} //~ ERROR must be used diff --git a/src/test/ui/e0119/issue-28981.stderr b/src/test/ui/e0119/issue-28981.stderr index 76ff88d6cc6..b5ec1c8454b 100644 --- a/src/test/ui/e0119/issue-28981.stderr +++ b/src/test/ui/e0119/issue-28981.stderr @@ -8,7 +8,7 @@ LL | impl<Foo> Deref for Foo { } //~ ERROR must be used - impl<T> std::ops::Deref for &T where T: ?Sized; -error[E0210]: type parameter `Foo` must be used as the type parameter for some local type (e.g. `MyStruct<Foo>`) +error[E0210]: type parameter `Foo` must be used as the type parameter for some local type (e.g., `MyStruct<Foo>`) --> $DIR/issue-28981.rs:15:1 | LL | impl<Foo> Deref for Foo { } //~ ERROR must be used diff --git a/src/test/ui/empty/empty-struct-braces-expr.stderr b/src/test/ui/empty/empty-struct-braces-expr.stderr index 9b6114875e2..3252d0db4dc 100644 --- a/src/test/ui/empty/empty-struct-braces-expr.stderr +++ b/src/test/ui/empty/empty-struct-braces-expr.stderr @@ -47,20 +47,24 @@ LL | let xe1 = XEmpty1(); //~ ERROR expected function, found struct `XEmpty1 | did you mean `XEmpty1 { /* fields */ }`? error[E0599]: no variant named `Empty3` found for type `empty_struct::XE` in the current scope - --> $DIR/empty-struct-braces-expr.rs:32:15 + --> $DIR/empty-struct-braces-expr.rs:32:19 | LL | let xe3 = XE::Empty3; //~ ERROR no variant named `Empty3` found for type - | ^^^^^^^^^^ variant not found in `empty_struct::XE` + | ----^^^^^^ + | | + | variant not found in `empty_struct::XE` | - = note: did you mean `empty_struct::XE::XEmpty3`? + = help: did you mean `XEmpty3`? error[E0599]: no variant named `Empty3` found for type `empty_struct::XE` in the current scope - --> $DIR/empty-struct-braces-expr.rs:33:15 + --> $DIR/empty-struct-braces-expr.rs:33:19 | LL | let xe3 = XE::Empty3(); //~ ERROR no variant named `Empty3` found for type - | ^^^^^^^^^^ variant not found in `empty_struct::XE` + | ----^^^^^^ + | | + | variant not found in `empty_struct::XE` | - = note: did you mean `empty_struct::XE::XEmpty3`? + = help: did you mean `XEmpty3`? error: aborting due to 8 previous errors diff --git a/src/test/ui/error-codes/E0599.stderr b/src/test/ui/error-codes/E0599.stderr index d118939d17a..f6bdc8b8579 100644 --- a/src/test/ui/error-codes/E0599.stderr +++ b/src/test/ui/error-codes/E0599.stderr @@ -1,11 +1,11 @@ error[E0599]: no associated item named `NotEvenReal` found for type `Foo` in the current scope - --> $DIR/E0599.rs:14:15 + --> $DIR/E0599.rs:14:20 | LL | struct Foo; | ----------- associated item `NotEvenReal` not found for this ... LL | || if let Foo::NotEvenReal() = Foo {}; //~ ERROR E0599 - | ^^^^^^^^^^^^^^^^^^ associated item not found in `Foo` + | -----^^^^^^^^^^^-- associated item not found in `Foo` error: aborting due to previous error diff --git a/src/test/ui/imports/unused.rs b/src/test/ui/imports/unused.rs index 1eb756fe9e4..d241ab62976 100644 --- a/src/test/ui/imports/unused.rs +++ b/src/test/ui/imports/unused.rs @@ -23,7 +23,7 @@ mod foo { } mod m3 { - pub(super) use super::f; // Check that this is counted as used (c.f. #36249). + pub(super) use super::f; // Check that this is counted as used (cf. issue #36249). } pub mod m4 { diff --git a/src/test/ui/invalid/invalid-path-in-const.stderr b/src/test/ui/invalid/invalid-path-in-const.stderr index 9214800b93a..47fb717d0ca 100644 --- a/src/test/ui/invalid/invalid-path-in-const.stderr +++ b/src/test/ui/invalid/invalid-path-in-const.stderr @@ -1,8 +1,10 @@ error[E0599]: no associated item named `DOESNOTEXIST` found for type `u32` in the current scope - --> $DIR/invalid-path-in-const.rs:12:18 + --> $DIR/invalid-path-in-const.rs:12:23 | LL | fn f(a: [u8; u32::DOESNOTEXIST]) {} - | ^^^^^^^^^^^^^^^^^ associated item not found in `u32` + | -----^^^^^^^^^^^^ + | | + | associated item not found in `u32` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-20261.rs b/src/test/ui/issues/issue-20261.rs index bb4dbdcd0cb..0330ac658d8 100644 --- a/src/test/ui/issues/issue-20261.rs +++ b/src/test/ui/issues/issue-20261.rs @@ -9,7 +9,7 @@ // except according to those terms. fn main() { - // NB: this (almost) typechecks when default binding modes are enabled. + // N.B., this (almost) typechecks when default binding modes are enabled. for (ref i,) in [].iter() { i.clone(); //~^ ERROR type annotations needed diff --git a/src/test/ui/issues/issue-22933-2.stderr b/src/test/ui/issues/issue-22933-2.stderr index 435a89b716f..97445b60965 100644 --- a/src/test/ui/issues/issue-22933-2.stderr +++ b/src/test/ui/issues/issue-22933-2.stderr @@ -1,11 +1,13 @@ error[E0599]: no variant named `PIE` found for type `Delicious` in the current scope - --> $DIR/issue-22933-2.rs:14:44 + --> $DIR/issue-22933-2.rs:14:55 | LL | enum Delicious { | -------------- variant `PIE` not found here ... LL | ApplePie = Delicious::Apple as isize | Delicious::PIE as isize, - | ^^^^^^^^^^^^^^ variant not found in `Delicious` + | -----------^^^ + | | + | variant not found in `Delicious` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-22933-3.stderr b/src/test/ui/issues/issue-22933-3.stderr index 3d4d2df4d32..d3ea39b2adb 100644 --- a/src/test/ui/issues/issue-22933-3.stderr +++ b/src/test/ui/issues/issue-22933-3.stderr @@ -1,8 +1,10 @@ error[E0599]: no associated item named `MIN` found for type `u8` in the current scope - --> $DIR/issue-22933-3.rs:11:18 + --> $DIR/issue-22933-3.rs:11:22 | LL | const FOO: [u32; u8::MIN as usize] = []; - | ^^^^^^^ associated item not found in `u8` + | ----^^^ + | | + | associated item not found in `u8` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-23173.stderr b/src/test/ui/issues/issue-23173.stderr index d58a4d2b8f8..14a1188710f 100644 --- a/src/test/ui/issues/issue-23173.stderr +++ b/src/test/ui/issues/issue-23173.stderr @@ -1,38 +1,46 @@ error[E0599]: no variant named `Homura` found for type `Token` in the current scope - --> $DIR/issue-23173.rs:19:16 + --> $DIR/issue-23173.rs:19:23 | LL | enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ } | ---------- variant `Homura` not found here ... LL | use_token(&Token::Homura); - | ^^^^^^^^^^^^^ variant not found in `Token` + | -------^^^^^^ + | | + | variant not found in `Token` error[E0599]: no function or associated item named `method` found for type `Struct` in the current scope - --> $DIR/issue-23173.rs:21:5 + --> $DIR/issue-23173.rs:21:13 | LL | struct Struct { | ------------- function or associated item `method` not found for this ... LL | Struct::method(); - | ^^^^^^^^^^^^^^ function or associated item not found in `Struct` + | --------^^^^^^ + | | + | function or associated item not found in `Struct` error[E0599]: no function or associated item named `method` found for type `Struct` in the current scope - --> $DIR/issue-23173.rs:23:5 + --> $DIR/issue-23173.rs:23:13 | LL | struct Struct { | ------------- function or associated item `method` not found for this ... LL | Struct::method; - | ^^^^^^^^^^^^^^ function or associated item not found in `Struct` + | --------^^^^^^ + | | + | function or associated item not found in `Struct` error[E0599]: no associated item named `Assoc` found for type `Struct` in the current scope - --> $DIR/issue-23173.rs:25:5 + --> $DIR/issue-23173.rs:25:13 | LL | struct Struct { | ------------- associated item `Assoc` not found for this ... LL | Struct::Assoc; - | ^^^^^^^^^^^^^ associated item not found in `Struct` + | --------^^^^^ + | | + | associated item not found in `Struct` error: aborting due to 4 previous errors diff --git a/src/test/ui/issues/issue-23217.stderr b/src/test/ui/issues/issue-23217.stderr index d87f239bca6..1ba8f276cc9 100644 --- a/src/test/ui/issues/issue-23217.stderr +++ b/src/test/ui/issues/issue-23217.stderr @@ -1,12 +1,14 @@ error[E0599]: no variant named `A` found for type `SomeEnum` in the current scope - --> $DIR/issue-23217.rs:12:9 + --> $DIR/issue-23217.rs:12:19 | LL | pub enum SomeEnum { | ----------------- variant `A` not found here LL | B = SomeEnum::A, - | ^^^^^^^^^^^ variant not found in `SomeEnum` + | ----------^ + | | + | variant not found in `SomeEnum` | - = note: did you mean `SomeEnum::B`? + = help: did you mean `B`? error: aborting due to previous error diff --git a/src/test/ui/issues/issue-27842.stderr b/src/test/ui/issues/issue-27842.stderr index 026594811e4..dea7acd9bf8 100644 --- a/src/test/ui/issues/issue-27842.stderr +++ b/src/test/ui/issues/issue-27842.stderr @@ -10,7 +10,7 @@ error[E0608]: cannot index into a value of type `({integer}, {integer}, {integer LL | let _ = tup[i]; | ^^^^^^ | - = help: to access tuple elements, use tuple indexing syntax (e.g. `tuple.0`) + = help: to access tuple elements, use tuple indexing syntax (e.g., `tuple.0`) error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-28344.stderr b/src/test/ui/issues/issue-28344.stderr index 734c761d0b7..bd4f4b88d32 100644 --- a/src/test/ui/issues/issue-28344.stderr +++ b/src/test/ui/issues/issue-28344.stderr @@ -5,10 +5,12 @@ LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8); | ^^^^^^^^^^^^^ associated type `Output` must be specified error[E0599]: no function or associated item named `bitor` found for type `dyn std::ops::BitXor<_>` in the current scope - --> $DIR/issue-28344.rs:14:17 + --> $DIR/issue-28344.rs:14:25 | LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8); - | ^^^^^^^^^^^^^ function or associated item not found in `dyn std::ops::BitXor<_>` + | --------^^^^^ + | | + | function or associated item not found in `dyn std::ops::BitXor<_>` | = help: did you mean `bitxor`? @@ -19,10 +21,12 @@ LL | let g = BitXor::bitor; | ^^^^^^^^^^^^^ associated type `Output` must be specified error[E0599]: no function or associated item named `bitor` found for type `dyn std::ops::BitXor<_>` in the current scope - --> $DIR/issue-28344.rs:18:13 + --> $DIR/issue-28344.rs:18:21 | LL | let g = BitXor::bitor; - | ^^^^^^^^^^^^^ function or associated item not found in `dyn std::ops::BitXor<_>` + | --------^^^^^ + | | + | function or associated item not found in `dyn std::ops::BitXor<_>` | = help: did you mean `bitxor`? diff --git a/src/test/ui/issues/issue-28586.stderr b/src/test/ui/issues/issue-28586.stderr index 9820d64909e..e48e642301e 100644 --- a/src/test/ui/issues/issue-28586.stderr +++ b/src/test/ui/issues/issue-28586.stderr @@ -1,8 +1,10 @@ error[E0599]: no associated item named `BYTES` found for type `usize` in the current scope - --> $DIR/issue-28586.rs:14:19 + --> $DIR/issue-28586.rs:14:26 | LL | impl Foo for [u8; usize::BYTES] {} - | ^^^^^^^^^^^^ associated item not found in `usize` + | -------^^^^^ + | | + | associated item not found in `usize` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-28971.stderr b/src/test/ui/issues/issue-28971.stderr index c04e21f7c58..77aac975768 100644 --- a/src/test/ui/issues/issue-28971.stderr +++ b/src/test/ui/issues/issue-28971.stderr @@ -1,13 +1,13 @@ error[E0599]: no variant named `Baz` found for type `Foo` in the current scope - --> $DIR/issue-28971.rs:19:13 + --> $DIR/issue-28971.rs:19:18 | LL | enum Foo { | -------- variant `Baz` not found here ... LL | Foo::Baz(..) => (), - | ^^^^^^^^^^^^ variant not found in `Foo` + | -----^^^---- variant not found in `Foo` | - = note: did you mean `Foo::Bar`? + = help: did you mean `Bar`? error: aborting due to previous error diff --git a/src/test/ui/issues/issue-30123.stderr b/src/test/ui/issues/issue-30123.stderr index 094c962de29..a08c1d678d8 100644 --- a/src/test/ui/issues/issue-30123.stderr +++ b/src/test/ui/issues/issue-30123.stderr @@ -1,8 +1,10 @@ error[E0599]: no function or associated item named `new_undirected` found for type `issue_30123_aux::Graph<i32, i32>` in the current scope - --> $DIR/issue-30123.rs:17:14 + --> $DIR/issue-30123.rs:17:33 | LL | let ug = Graph::<i32, i32>::new_undirected(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `issue_30123_aux::Graph<i32, i32>` + | -------------------^^^^^^^^^^^^^^ + | | + | function or associated item not found in `issue_30123_aux::Graph<i32, i32>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-36744-without-calls.rs b/src/test/ui/issues/issue-36744-without-calls.rs index 8a47ebbd0a8..c15840090ea 100644 --- a/src/test/ui/issues/issue-36744-without-calls.rs +++ b/src/test/ui/issues/issue-36744-without-calls.rs @@ -11,7 +11,7 @@ // compile-pass // Tests for an LLVM abort when storing a lifetime-parametric fn into // context that is expecting one that is not lifetime-parametric -// (i.e. has no `for <'_>`). +// (i.e., has no `for <'_>`). pub struct A<'a>(&'a ()); pub struct S<T>(T); diff --git a/src/test/ui/issues/issue-38919.stderr b/src/test/ui/issues/issue-38919.stderr index b80367d7c6c..398a38877d2 100644 --- a/src/test/ui/issues/issue-38919.stderr +++ b/src/test/ui/issues/issue-38919.stderr @@ -1,8 +1,10 @@ error[E0599]: no associated item named `Item` found for type `T` in the current scope - --> $DIR/issue-38919.rs:12:5 + --> $DIR/issue-38919.rs:12:8 | LL | T::Item; //~ ERROR no associated item named `Item` found for type `T` in the current scope - | ^^^^^^^ associated item not found in `T` + | ---^^^^ + | | + | associated item not found in `T` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-39559.stderr b/src/test/ui/issues/issue-39559.stderr index 2ce6dfdbe44..83af9d82e0b 100644 --- a/src/test/ui/issues/issue-39559.stderr +++ b/src/test/ui/issues/issue-39559.stderr @@ -1,8 +1,10 @@ error[E0599]: no function or associated item named `dim` found for type `D` in the current scope - --> $DIR/issue-39559.rs:24:18 + --> $DIR/issue-39559.rs:24:21 | LL | entries: [T; D::dim()], - | ^^^^^^ function or associated item not found in `D` + | ---^^^ + | | + | function or associated item not found in `D` | = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `dim`, perhaps you need to implement it: diff --git a/src/test/ui/issues/issue-3973.stderr b/src/test/ui/issues/issue-3973.stderr index 9be07614ec1..1389dcd2a03 100644 --- a/src/test/ui/issues/issue-3973.stderr +++ b/src/test/ui/issues/issue-3973.stderr @@ -8,13 +8,15 @@ LL | | } | |_____^ not a member of trait `ToString_` error[E0599]: no function or associated item named `new` found for type `Point` in the current scope - --> $DIR/issue-3973.rs:32:13 + --> $DIR/issue-3973.rs:32:20 | LL | struct Point { | ------------ function or associated item `new` not found for this ... LL | let p = Point::new(0.0, 0.0); - | ^^^^^^^^^^ function or associated item not found in `Point` + | -------^^^ + | | + | function or associated item not found in `Point` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-40861.stderr b/src/test/ui/issues/issue-40861.stderr index dbde40fb25e..660f0ff7073 100644 --- a/src/test/ui/issues/issue-40861.stderr +++ b/src/test/ui/issues/issue-40861.stderr @@ -4,7 +4,7 @@ error[E0608]: cannot index into a value of type `()` LL | ()[f(&[1.0])]; | ^^^^^^^^^^^^^ | - = help: to access tuple elements, use tuple indexing syntax (e.g. `tuple.0`) + = help: to access tuple elements, use tuple indexing syntax (e.g., `tuple.0`) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-41974.stderr b/src/test/ui/issues/issue-41974.stderr index eca40ed4355..d6d4f7b5515 100644 --- a/src/test/ui/issues/issue-41974.stderr +++ b/src/test/ui/issues/issue-41974.stderr @@ -15,7 +15,7 @@ error[E0120]: the Drop trait may only be implemented on structures LL | impl<T> Drop for T where T: A { //~ ERROR E0119 | ^ implementing Drop requires a struct -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g. `MyStruct<T>`) +error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) --> $DIR/issue-41974.rs:17:1 | LL | impl<T> Drop for T where T: A { //~ ERROR E0119 diff --git a/src/test/ui/issues/issue-42880.stderr b/src/test/ui/issues/issue-42880.stderr index cf1c3022a22..1087e5a014e 100644 --- a/src/test/ui/issues/issue-42880.stderr +++ b/src/test/ui/issues/issue-42880.stderr @@ -1,8 +1,8 @@ error[E0599]: no associated item named `String` found for type `std::string::String` in the current scope - --> $DIR/issue-42880.rs:14:15 + --> $DIR/issue-42880.rs:14:22 | LL | let f = |&Value::String(_)| (); //~ ERROR no associated item named - | ^^^^^^^^^^^^^^^^ associated item not found in `std::string::String` + | -------^^^^^^--- associated item not found in `std::string::String` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-52060.stderr b/src/test/ui/issues/issue-52060.stderr index 988bfd480e6..7c3f7695549 100644 --- a/src/test/ui/issues/issue-52060.stderr +++ b/src/test/ui/issues/issue-52060.stderr @@ -10,7 +10,7 @@ error: `core::slice::<impl [T]>::len` is not yet stable as a const fn LL | static B: [u32; 1] = [0; A.len()]; | ^^^^^^^ | - = help: in Nightly builds, add `#![feature(const_slice_len)]` to the crate attributes to enable + = help: add `#![feature(const_slice_len)]` to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-7950.stderr b/src/test/ui/issues/issue-7950.stderr index 750127981b1..bd0b9454c7f 100644 --- a/src/test/ui/issues/issue-7950.stderr +++ b/src/test/ui/issues/issue-7950.stderr @@ -1,11 +1,13 @@ error[E0599]: no function or associated item named `bar` found for type `Foo` in the current scope - --> $DIR/issue-7950.rs:16:5 + --> $DIR/issue-7950.rs:16:10 | LL | struct Foo; | ----------- function or associated item `bar` not found for this ... LL | Foo::bar(); - | ^^^^^^^^ function or associated item not found in `Foo` + | -----^^^ + | | + | function or associated item not found in `Foo` error: aborting due to previous error diff --git a/src/test/ui/lexical-scopes.stderr b/src/test/ui/lexical-scopes.stderr index 3a6ae52c68d..666666c2100 100644 --- a/src/test/ui/lexical-scopes.stderr +++ b/src/test/ui/lexical-scopes.stderr @@ -9,10 +9,12 @@ LL | use T; | error[E0599]: no function or associated item named `f` found for type `Foo` in the current scope - --> $DIR/lexical-scopes.rs:20:5 + --> $DIR/lexical-scopes.rs:20:10 | LL | Foo::f(); //~ ERROR no function or associated item named `f` - | ^^^^^^ function or associated item not found in `Foo` + | -----^ + | | + | function or associated item not found in `Foo` error: aborting due to 2 previous errors diff --git a/src/test/ui/lint/lint-unused-imports.rs b/src/test/ui/lint/lint-unused-imports.rs index 5bb2ab75c53..64a48511bac 100644 --- a/src/test/ui/lint/lint-unused-imports.rs +++ b/src/test/ui/lint/lint-unused-imports.rs @@ -81,7 +81,7 @@ fn g() { } } -// c.f. issue #35135 +// cf. issue #35135. #[allow(unused_variables)] fn h() { use test2::foo; //~ ERROR unused import: `test2::foo` diff --git a/src/test/ui/namespace/namespace-mix.rs b/src/test/ui/namespace/namespace-mix.rs index c1c724fc431..22a9da8d9a6 100644 --- a/src/test/ui/namespace/namespace-mix.rs +++ b/src/test/ui/namespace/namespace-mix.rs @@ -26,7 +26,7 @@ mod c { pub struct Item; } -// Use something emitting the type argument name, e.g. unsatisfied bound. +// Use something emitting the type argument name, e.g., unsatisfied bound. trait Impossible {} fn check<T: Impossible>(_: T) {} diff --git a/src/test/ui/nll/issue-21232-partial-init-and-use.rs b/src/test/ui/nll/issue-21232-partial-init-and-use.rs index 186ecc54827..633cbdba2d4 100644 --- a/src/test/ui/nll/issue-21232-partial-init-and-use.rs +++ b/src/test/ui/nll/issue-21232-partial-init-and-use.rs @@ -61,7 +61,7 @@ impl<F> R<F> { fn new(f: F) -> Self { R { w: 0, f } } } // As a shorthand for the cases above, adding a numeric summary to // each test's fn name to denote each point on each axis. // -// E.g. 1000 = field fully init struct; 0211 = local void reinit tuple +// e.g., 1000 = field fully init struct; 0211 = local void reinit tuple // It got pretty monotonous writing the same code over and over, and I // feared I would forget details. So I abstracted some desiderata into diff --git a/src/test/ui/no-implicit-prelude-nested.rs b/src/test/ui/no-implicit-prelude-nested.rs index c64839ad0de..0250cf529ee 100644 --- a/src/test/ui/no-implicit-prelude-nested.rs +++ b/src/test/ui/no-implicit-prelude-nested.rs @@ -10,7 +10,7 @@ // Test that things from the prelude aren't in scope. Use many of them // so that renaming some things won't magically make this test fail -// for the wrong reason (e.g. if `Add` changes to `Addition`, and +// for the wrong reason (e.g., if `Add` changes to `Addition`, and // `no_implicit_prelude` stops working, then the `impl Add` will still // fail with the same error message). diff --git a/src/test/ui/no-implicit-prelude.rs b/src/test/ui/no-implicit-prelude.rs index 0e39d9ebdc1..8a4a0aef069 100644 --- a/src/test/ui/no-implicit-prelude.rs +++ b/src/test/ui/no-implicit-prelude.rs @@ -12,7 +12,7 @@ // Test that things from the prelude aren't in scope. Use many of them // so that renaming some things won't magically make this test fail -// for the wrong reason (e.g. if `Add` changes to `Addition`, and +// for the wrong reason (e.g., if `Add` changes to `Addition`, and // `no_implicit_prelude` stops working, then the `impl Add` will still // fail with the same error message). diff --git a/src/test/ui/orphan-check-diagnostics.stderr b/src/test/ui/orphan-check-diagnostics.stderr index dc134dd8d6f..22422f15404 100644 --- a/src/test/ui/orphan-check-diagnostics.stderr +++ b/src/test/ui/orphan-check-diagnostics.stderr @@ -1,4 +1,4 @@ -error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g. `MyStruct<T>`) +error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) --> $DIR/orphan-check-diagnostics.rs:20:1 | LL | impl<T> RemoteTrait for T where T: LocalTrait {} diff --git a/src/test/ui/parser/assoc-oddities-1.rs b/src/test/ui/parser/assoc-oddities-1.rs index 63408b76b15..866d7423f14 100644 --- a/src/test/ui/parser/assoc-oddities-1.rs +++ b/src/test/ui/parser/assoc-oddities-1.rs @@ -15,7 +15,7 @@ fn that_odd_parse() { x = if c { a } else { b }(); x = if true { 1 } else { 0 } as *mut _; // however this does not parse and probably should fail to retain compat? - // NB: `..` here is arbitrary, failure happens/should happen ∀ops that aren’t `=` + // N.B., `..` here is arbitrary, failure happens/should happen ∀ops that aren’t `=` // see assoc-oddities-2 and assoc-oddities-3 ..if c { a } else { b }[n]; //~ ERROR expected one of } diff --git a/src/test/ui/print_type_sizes/generics.rs b/src/test/ui/print_type_sizes/generics.rs index fa5921cfb13..5b6918d41b5 100644 --- a/src/test/ui/print_type_sizes/generics.rs +++ b/src/test/ui/print_type_sizes/generics.rs @@ -30,7 +30,7 @@ // Copy. // // (I suspect this reflect some naivety within the rust compiler -// itself; it should be checking for drop glue, i.e. a destructor +// itself; it should be checking for drop glue, i.e., a destructor // somewhere in the monomorphized types. It should not matter whether // the type is Copy.) #[derive(Copy, Clone)] diff --git a/src/test/ui/regions/regions-free-region-ordering-incorrect.rs b/src/test/ui/regions/regions-free-region-ordering-incorrect.rs index 9cb61c24922..250800262db 100644 --- a/src/test/ui/regions/regions-free-region-ordering-incorrect.rs +++ b/src/test/ui/regions/regions-free-region-ordering-incorrect.rs @@ -10,23 +10,23 @@ // Test that free regions ordering only goes one way. That is, // we have `&'a Node<'b, T>`, which implies that `'a <= 'b`, -// but not `'b <= 'a`. Hence returning `&self.val` (which has lifetime +// but not `'b <= 'a`. Hence, returning `&self.val` (which has lifetime // `'a`) where `'b` is expected yields an error. // // This test began its life as a test for issue #4325. -struct Node<'b, T:'b> { - val: T, - next: Option<&'b Node<'b, T>> +struct Node<'b, T: 'b> { + val: T, + next: Option<&'b Node<'b, T>> } impl<'b, T> Node<'b, T> { - fn get<'a>(&'a self) -> &'b T { - match self.next { - Some(ref next) => next.get(), - None => &self.val //~ ERROR cannot infer + fn get<'a>(&'a self) -> &'b T { + match self.next { + Some(ref next) => next.get(), + None => &self.val //~ ERROR cannot infer + } } - } } fn main() {} diff --git a/src/test/ui/regions/regions-free-region-ordering-incorrect.stderr b/src/test/ui/regions/regions-free-region-ordering-incorrect.stderr index 3dce04e2452..6b28ab4004f 100644 --- a/src/test/ui/regions/regions-free-region-ordering-incorrect.stderr +++ b/src/test/ui/regions/regions-free-region-ordering-incorrect.stderr @@ -1,32 +1,32 @@ error[E0495]: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements - --> $DIR/regions-free-region-ordering-incorrect.rs:27:15 + --> $DIR/regions-free-region-ordering-incorrect.rs:27:21 | -LL | None => &self.val //~ ERROR cannot infer - | ^^^^^^^^^ +LL | None => &self.val //~ ERROR cannot infer + | ^^^^^^^^^ | -note: first, the lifetime cannot outlive the lifetime 'a as defined on the method body at 24:10... - --> $DIR/regions-free-region-ordering-incorrect.rs:24:10 +note: first, the lifetime cannot outlive the lifetime 'a as defined on the method body at 24:12... + --> $DIR/regions-free-region-ordering-incorrect.rs:24:12 | -LL | fn get<'a>(&'a self) -> &'b T { - | ^^ +LL | fn get<'a>(&'a self) -> &'b T { + | ^^ note: ...so that reference does not outlive borrowed content - --> $DIR/regions-free-region-ordering-incorrect.rs:27:15 + --> $DIR/regions-free-region-ordering-incorrect.rs:27:21 | -LL | None => &self.val //~ ERROR cannot infer - | ^^^^^^^^^ +LL | None => &self.val //~ ERROR cannot infer + | ^^^^^^^^^ note: but, the lifetime must be valid for the lifetime 'b as defined on the impl at 23:6... --> $DIR/regions-free-region-ordering-incorrect.rs:23:6 | LL | impl<'b, T> Node<'b, T> { | ^^ note: ...so that reference does not outlive borrowed content - --> $DIR/regions-free-region-ordering-incorrect.rs:25:5 + --> $DIR/regions-free-region-ordering-incorrect.rs:25:9 | -LL | / match self.next { -LL | | Some(ref next) => next.get(), -LL | | None => &self.val //~ ERROR cannot infer -LL | | } - | |_____^ +LL | / match self.next { +LL | | Some(ref next) => next.get(), +LL | | None => &self.val //~ ERROR cannot infer +LL | | } + | |_________^ error: aborting due to previous error diff --git a/src/test/ui/resolve/issue-5035.rs b/src/test/ui/resolve/issue-5035.rs index e9b50dddd30..3ed41c6999f 100644 --- a/src/test/ui/resolve/issue-5035.rs +++ b/src/test/ui/resolve/issue-5035.rs @@ -14,6 +14,6 @@ impl K for isize {} //~ ERROR expected trait, found type alias `K` use ImportError; //~ ERROR unresolved import `ImportError` [E0432] //~^ no `ImportError` in the root -impl ImportError for () {} // check that this is not an additional error (c.f. #35142) +impl ImportError for () {} // check that this is not an additional error (cf. issue #35142) fn main() {} diff --git a/src/test/ui/rfc-2005-default-binding-mode/no-double-error.stderr b/src/test/ui/rfc-2005-default-binding-mode/no-double-error.stderr index e3a613f9261..b5cc7d4aefa 100644 --- a/src/test/ui/rfc-2005-default-binding-mode/no-double-error.stderr +++ b/src/test/ui/rfc-2005-default-binding-mode/no-double-error.stderr @@ -1,8 +1,10 @@ error[E0599]: no associated item named `XXX` found for type `u32` in the current scope - --> $DIR/no-double-error.rs:18:9 + --> $DIR/no-double-error.rs:18:14 | LL | u32::XXX => { } //~ ERROR no associated item named - | ^^^^^^^^ associated item not found in `u32` + | -----^^^ + | | + | associated item not found in `u32` error: aborting due to previous error diff --git a/src/test/ui/rfc-2126-extern-absolute-paths/meta.rs b/src/test/ui/rfc-2126-extern-absolute-paths/meta.rs index 499a322593c..004c4a00231 100644 --- a/src/test/ui/rfc-2126-extern-absolute-paths/meta.rs +++ b/src/test/ui/rfc-2126-extern-absolute-paths/meta.rs @@ -11,7 +11,7 @@ // edition:2018 // Tests that `meta` is whitelisted, even if the crate doesn't exist -// yet (i.e. it causes a different error than `not-whitelisted.rs`). +// yet (i.e., it causes a different error than `not-whitelisted.rs`). use meta; //~ ERROR can't find crate for `meta` fn main() {} diff --git a/src/test/ui/rust-2018/trait-import-suggestions.stderr b/src/test/ui/rust-2018/trait-import-suggestions.stderr index d5d996e27ee..72a0fc694c0 100644 --- a/src/test/ui/rust-2018/trait-import-suggestions.stderr +++ b/src/test/ui/rust-2018/trait-import-suggestions.stderr @@ -27,10 +27,12 @@ LL | x.baz(); //~ ERROR no method named `baz` | ^^^ error[E0599]: no function or associated item named `from_str` found for type `u32` in the current scope - --> $DIR/trait-import-suggestions.rs:40:13 + --> $DIR/trait-import-suggestions.rs:40:18 | LL | let y = u32::from_str("33"); //~ ERROR no function or associated item named `from_str` - | ^^^^^^^^^^^^^ function or associated item not found in `u32` + | -----^^^^^^^^ + | | + | function or associated item not found in `u32` | = help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope, perhaps add a `use` for it: diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-single-nominal-type.rs b/src/test/ui/simd-intrinsic/simd-intrinsic-single-nominal-type.rs index 0d0bf240f72..5e009ea4431 100644 --- a/src/test/ui/simd-intrinsic/simd-intrinsic-single-nominal-type.rs +++ b/src/test/ui/simd-intrinsic/simd-intrinsic-single-nominal-type.rs @@ -16,7 +16,7 @@ struct A(i16, i16, i16, i16, i16, i16, i16, i16); struct B(i16, i16, i16, i16, i16, i16, i16, i16); // each intrinsic definition has to use the same nominal type for any -// vector structure throughout that declaration (i.e. every instance +// vector structure throughout that declaration (i.e., every instance // of i16x8 in each `fn ...;` needs to be either A or B) extern "platform-intrinsic" { diff --git a/src/test/ui/span/issue-24805-dropck-trait-has-items.rs b/src/test/ui/span/issue-24805-dropck-trait-has-items.rs index 75523386931..b9e4ffa84cd 100644 --- a/src/test/ui/span/issue-24805-dropck-trait-has-items.rs +++ b/src/test/ui/span/issue-24805-dropck-trait-has-items.rs @@ -25,7 +25,7 @@ impl<'a,T> HasSelfMethod for &'a T { } impl<'a,T> HasMethodWithSelfArg for &'a T { } impl<'a,T> HasType for &'a T { type Something = (); } -// e.g. `impl_drop!(Send, D_Send)` expands to: +// e.g., `impl_drop!(Send, D_Send)` expands to: // ```rust // struct D_Send<T:Send>(T); // impl<T:Send> Drop for D_Send<T> { fn drop(&mut self) { } } diff --git a/src/test/ui/traits/trait-item-privacy.stderr b/src/test/ui/traits/trait-item-privacy.stderr index 4ede83d5d73..01719bc4047 100644 --- a/src/test/ui/traits/trait-item-privacy.stderr +++ b/src/test/ui/traits/trait-item-privacy.stderr @@ -33,26 +33,30 @@ LL | c.a(); //~ ERROR method `a` is private | ^ error[E0599]: no function or associated item named `a` found for type `S` in the current scope - --> $DIR/trait-item-privacy.rs:88:5 + --> $DIR/trait-item-privacy.rs:88:8 | LL | struct S; | --------- function or associated item `a` not found for this ... LL | S::a(&S); - | ^^^^ function or associated item not found in `S` + | ---^ + | | + | function or associated item not found in `S` | = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `a`, perhaps you need to implement it: candidate #1: `method::A` error[E0599]: no function or associated item named `b` found for type `S` in the current scope - --> $DIR/trait-item-privacy.rs:90:5 + --> $DIR/trait-item-privacy.rs:90:8 | LL | struct S; | --------- function or associated item `b` not found for this ... LL | S::b(&S); - | ^^^^ function or associated item not found in `S` + | ---^ + | | + | function or associated item not found in `S` | = help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope, perhaps add a `use` for it: @@ -67,26 +71,30 @@ LL | C::a(&S); //~ ERROR method `a` is private | ^^^^ error[E0599]: no associated item named `A` found for type `S` in the current scope - --> $DIR/trait-item-privacy.rs:107:5 + --> $DIR/trait-item-privacy.rs:107:8 | LL | struct S; | --------- associated item `A` not found for this ... LL | S::A; //~ ERROR no associated item named `A` found for type `S` in the current scope - | ^^^^ associated item not found in `S` + | ---^ + | | + | associated item not found in `S` | = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `A`, perhaps you need to implement it: candidate #1: `assoc_const::A` error[E0599]: no associated item named `B` found for type `S` in the current scope - --> $DIR/trait-item-privacy.rs:108:5 + --> $DIR/trait-item-privacy.rs:108:8 | LL | struct S; | --------- associated item `B` not found for this ... LL | S::B; //~ ERROR no associated item named `B` found for type `S` in the current scope - | ^^^^ associated item not found in `S` + | ---^ + | | + | associated item not found in `S` | = help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope, perhaps add a `use` for it: diff --git a/src/test/ui/type/type-alias-bounds.rs b/src/test/ui/type/type-alias-bounds.rs index a17bb9e952d..41f260aba55 100644 --- a/src/test/ui/type/type-alias-bounds.rs +++ b/src/test/ui/type/type-alias-bounds.rs @@ -48,7 +48,7 @@ fn foo<'a>(y: &'a i32) { x.1.push(y); // &'a i32: 'static does not hold } -// Bounds are not checked either, i.e. the definition is not necessarily well-formed +// Bounds are not checked either, i.e., the definition is not necessarily well-formed struct Sendable<T: Send>(T); type MySendable<T> = Sendable<T>; // no error here! diff --git a/src/test/ui/ufcs/ufcs-partially-resolved.stderr b/src/test/ui/ufcs/ufcs-partially-resolved.stderr index cb571be661d..940e00738d9 100644 --- a/src/test/ui/ufcs/ufcs-partially-resolved.stderr +++ b/src/test/ui/ufcs/ufcs-partially-resolved.stderr @@ -187,16 +187,20 @@ LL | let _: <u8 as Tr>::Y::NN; //~ ERROR ambiguous associated type | ^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<<u8 as Tr>::Y as Trait>::NN` error[E0599]: no associated item named `NN` found for type `<u8 as Tr>::Y` in the current scope - --> $DIR/ufcs-partially-resolved.rs:48:5 + --> $DIR/ufcs-partially-resolved.rs:48:20 | LL | <u8 as Tr>::Y::NN; //~ ERROR no associated item named `NN` found for type `<u8 as Tr>::Y` - | ^^^^^^^^^^^^^^^^^ associated item not found in `<u8 as Tr>::Y` + | ---------------^^ + | | + | associated item not found in `<u8 as Tr>::Y` error[E0599]: no associated item named `N` found for type `<u8 as Dr>::X` in the current scope - --> $DIR/ufcs-partially-resolved.rs:65:5 + --> $DIR/ufcs-partially-resolved.rs:65:20 | LL | <u8 as Dr>::X::N; //~ ERROR no associated item named `N` found for type `<u8 as Dr>::X` - | ^^^^^^^^^^^^^^^^ associated item not found in `<u8 as Dr>::X` + | ---------------^ + | | + | associated item not found in `<u8 as Dr>::X` error: aborting due to 32 previous errors diff --git a/src/test/ui/unspecified-self-in-trait-ref.stderr b/src/test/ui/unspecified-self-in-trait-ref.stderr index c036540068b..005d7bfedd0 100644 --- a/src/test/ui/unspecified-self-in-trait-ref.stderr +++ b/src/test/ui/unspecified-self-in-trait-ref.stderr @@ -1,26 +1,34 @@ error[E0599]: no function or associated item named `lol` found for type `dyn Foo<_>` in the current scope - --> $DIR/unspecified-self-in-trait-ref.rs:20:13 + --> $DIR/unspecified-self-in-trait-ref.rs:20:18 | LL | let a = Foo::lol(); - | ^^^^^^^^ function or associated item not found in `dyn Foo<_>` + | -----^^^ + | | + | function or associated item not found in `dyn Foo<_>` error[E0599]: no function or associated item named `lol` found for type `dyn Foo<_>` in the current scope - --> $DIR/unspecified-self-in-trait-ref.rs:22:13 + --> $DIR/unspecified-self-in-trait-ref.rs:22:23 | LL | let b = Foo::<_>::lol(); - | ^^^^^^^^^^^^^ function or associated item not found in `dyn Foo<_>` + | ----------^^^ + | | + | function or associated item not found in `dyn Foo<_>` error[E0599]: no function or associated item named `lol` found for type `dyn Bar<_, _>` in the current scope - --> $DIR/unspecified-self-in-trait-ref.rs:24:13 + --> $DIR/unspecified-self-in-trait-ref.rs:24:18 | LL | let c = Bar::lol(); - | ^^^^^^^^ function or associated item not found in `dyn Bar<_, _>` + | -----^^^ + | | + | function or associated item not found in `dyn Bar<_, _>` error[E0599]: no function or associated item named `lol` found for type `dyn Bar<usize, _>` in the current scope - --> $DIR/unspecified-self-in-trait-ref.rs:26:13 + --> $DIR/unspecified-self-in-trait-ref.rs:26:30 | LL | let d = Bar::<usize, _>::lol(); - | ^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `dyn Bar<usize, _>` + | -----------------^^^ + | | + | function or associated item not found in `dyn Bar<usize, _>` error[E0393]: the type parameter `A` must be explicitly specified --> $DIR/unspecified-self-in-trait-ref.rs:28:13 |
