Rollup merge of #81900 - vandenheuvel:organize_trait_tests, r=Mark-Simulacrum

Organize trait test files

Organizes trait tests in folders where reasonable and removes name redundancies.
This commit is contained in:
Yuki Okushi 2021-02-13 16:36:45 +09:00 committed by GitHub
commit a3902069ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
288 changed files with 285 additions and 285 deletions

View File

@ -1,16 +1,16 @@
error[E0034]: multiple applicable items in scope
--> $DIR/trait-alias-ambiguous.rs:21:7
--> $DIR/ambiguous.rs:21:7
|
LL | t.foo();
| ^^^ multiple `foo` found
|
note: candidate #1 is defined in an impl of the trait `A` for the type `u8`
--> $DIR/trait-alias-ambiguous.rs:8:9
--> $DIR/ambiguous.rs:8:9
|
LL | fn foo(&self) {}
| ^^^^^^^^^^^^^
note: candidate #2 is defined in an impl of the trait `B` for the type `u8`
--> $DIR/trait-alias-ambiguous.rs:11:9
--> $DIR/ambiguous.rs:11:9
|
LL | fn foo(&self) {}
| ^^^^^^^^^^^^^

View File

@ -1,11 +1,11 @@
// aux-build:trait_alias.rs
// aux-build:send_sync.rs
#![feature(trait_alias)]
extern crate trait_alias;
extern crate send_sync;
use std::rc::Rc;
use trait_alias::SendSync;
use send_sync::SendSync;
fn use_alias<T: SendSync>() {}

View File

@ -1,5 +1,5 @@
error[E0277]: `Rc<u32>` cannot be sent between threads safely
--> $DIR/trait-alias-cross-crate.rs:14:17
--> $DIR/cross-crate.rs:14:17
|
LL | fn use_alias<T: SendSync>() {}
| -------- required by this bound in `use_alias`
@ -10,7 +10,7 @@ LL | use_alias::<Rc<u32>>();
= help: the trait `Send` is not implemented for `Rc<u32>`
error[E0277]: `Rc<u32>` cannot be shared between threads safely
--> $DIR/trait-alias-cross-crate.rs:14:17
--> $DIR/cross-crate.rs:14:17
|
LL | fn use_alias<T: SendSync>() {}
| -------- required by this bound in `use_alias`

View File

@ -1,5 +1,5 @@
error[E0404]: expected trait, found trait alias `DefaultAlias`
--> $DIR/trait-alias-impl.rs:5:6
--> $DIR/impl.rs:5:6
|
LL | impl DefaultAlias for () {}
| ^^^^^^^^^^^^ not a trait

View File

@ -1,12 +1,12 @@
// run-pass
// aux-build:trait_alias.rs
// aux-build:greeter.rs
#![feature(trait_alias)]
extern crate trait_alias;
extern crate greeter;
// Import only the alias, not the real trait.
use trait_alias::{Greet, Hi};
use greeter::{Greet, Hi};
fn main() {
let hi = Hi;

View File

@ -1,5 +1,5 @@
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:16:22
--> $DIR/no-duplicates.rs:16:22
|
LL | trait _0 = Obj;
| ---
@ -16,7 +16,7 @@ LL | type _T00 = dyn _0 + _0;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:19:22
--> $DIR/no-duplicates.rs:19:22
|
LL | trait _0 = Obj;
| ---
@ -35,7 +35,7 @@ LL | type _T01 = dyn _1 + _0;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:22:22
--> $DIR/no-duplicates.rs:22:22
|
LL | trait _0 = Obj;
| ---
@ -57,7 +57,7 @@ LL | type _T02 = dyn _1 + _1;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:25:23
--> $DIR/no-duplicates.rs:25:23
|
LL | trait _0 = Obj;
| --- additional non-auto trait
@ -73,7 +73,7 @@ LL | type _T03 = dyn Obj + _1;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:28:22
--> $DIR/no-duplicates.rs:28:22
|
LL | trait _0 = Obj;
| --- first non-auto trait
@ -89,7 +89,7 @@ LL | type _T04 = dyn _1 + Obj;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:37:17
--> $DIR/no-duplicates.rs:37:17
|
LL | trait _0 = Obj;
| ---
@ -114,7 +114,7 @@ LL | type _T10 = dyn _2 + _3;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:40:22
--> $DIR/no-duplicates.rs:40:22
|
LL | trait _0 = Obj;
| --- additional non-auto trait
@ -133,7 +133,7 @@ LL | type _T11 = dyn _3 + _2;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:43:23
--> $DIR/no-duplicates.rs:43:23
|
LL | trait _0 = Obj;
| --- additional non-auto trait
@ -150,7 +150,7 @@ LL | type _T12 = dyn Obj + _2;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:46:17
--> $DIR/no-duplicates.rs:46:17
|
LL | trait _0 = Obj;
| ---
@ -175,7 +175,7 @@ LL | type _T13 = dyn _2 + Obj;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:49:22
--> $DIR/no-duplicates.rs:49:22
|
LL | trait _0 = Obj;
| --- first non-auto trait
@ -194,7 +194,7 @@ LL | type _T14 = dyn _1 + _3;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:52:22
--> $DIR/no-duplicates.rs:52:22
|
LL | trait _0 = Obj;
| --- additional non-auto trait
@ -213,7 +213,7 @@ LL | type _T15 = dyn _3 + _1;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:55:22
--> $DIR/no-duplicates.rs:55:22
|
LL | trait _0 = Obj;
| --- first non-auto trait
@ -234,7 +234,7 @@ LL | type _T16 = dyn _1 + _4;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:58:22
--> $DIR/no-duplicates.rs:58:22
|
LL | trait _0 = Obj;
| --- additional non-auto trait
@ -255,7 +255,7 @@ LL | type _T17 = dyn _4 + _1;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:65:22
--> $DIR/no-duplicates.rs:65:22
|
LL | trait _5 = Obj + Send;
| ---
@ -272,7 +272,7 @@ LL | type _T20 = dyn _5 + _5;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:68:23
--> $DIR/no-duplicates.rs:68:23
|
LL | trait _5 = Obj + Send;
| --- additional non-auto trait
@ -286,7 +286,7 @@ LL | type _T21 = dyn Obj + _5;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:71:22
--> $DIR/no-duplicates.rs:71:22
|
LL | trait _5 = Obj + Send;
| --- first non-auto trait
@ -300,7 +300,7 @@ LL | type _T22 = dyn _5 + Obj;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:74:36
--> $DIR/no-duplicates.rs:74:36
|
LL | trait _5 = Obj + Send;
| --- first non-auto trait
@ -314,7 +314,7 @@ LL | type _T23 = dyn _5 + Send + Sync + Obj;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:81:17
--> $DIR/no-duplicates.rs:81:17
|
LL | trait _5 = Obj + Send;
| ---
@ -337,7 +337,7 @@ LL | type _T30 = dyn _6;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:84:17
--> $DIR/no-duplicates.rs:84:17
|
LL | trait _5 = Obj + Send;
| ---
@ -360,7 +360,7 @@ LL | type _T31 = dyn _6 + Send;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:87:24
--> $DIR/no-duplicates.rs:87:24
|
LL | trait _5 = Obj + Send;
| ---
@ -383,7 +383,7 @@ LL | type _T32 = dyn Send + _6;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:95:22
--> $DIR/no-duplicates.rs:95:22
|
LL | trait _5 = Obj + Send;
| --- first non-auto trait
@ -402,7 +402,7 @@ LL | type _T40 = dyn _8 + Obj;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:98:23
--> $DIR/no-duplicates.rs:98:23
|
LL | trait _5 = Obj + Send;
| --- additional non-auto trait
@ -421,7 +421,7 @@ LL | type _T41 = dyn Obj + _8;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:101:22
--> $DIR/no-duplicates.rs:101:22
|
LL | trait _3 = Obj;
| --- additional non-auto trait
@ -445,7 +445,7 @@ LL | type _T42 = dyn _8 + _4;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:104:22
--> $DIR/no-duplicates.rs:104:22
|
LL | trait _3 = Obj;
| --- first non-auto trait
@ -469,7 +469,7 @@ LL | type _T43 = dyn _4 + _8;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:107:36
--> $DIR/no-duplicates.rs:107:36
|
LL | trait _3 = Obj;
| --- first non-auto trait
@ -493,7 +493,7 @@ LL | type _T44 = dyn _4 + Send + Sync + _8;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:117:22
--> $DIR/no-duplicates.rs:117:22
|
LL | trait _9 = for<'a> ObjL<'a>;
| ---------------- first non-auto trait
@ -508,7 +508,7 @@ LL | type _T50 = dyn _9 + _10;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-duplicates.rs:123:23
--> $DIR/no-duplicates.rs:123:23
|
LL | trait _11 = ObjT<for<'a> fn(&'a u8)>;
| ------------------------ first non-auto trait

View File

@ -1,5 +1,5 @@
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:16:22
--> $DIR/no-extra-traits.rs:16:22
|
LL | trait _0 = ObjA;
| ---- first non-auto trait
@ -13,7 +13,7 @@ LL | type _T00 = dyn _0 + ObjB;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:19:24
--> $DIR/no-extra-traits.rs:19:24
|
LL | trait _0 = ObjA;
| ---- additional non-auto trait
@ -27,7 +27,7 @@ LL | type _T01 = dyn ObjB + _0;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:22:24
--> $DIR/no-extra-traits.rs:22:24
|
LL | trait _0 = ObjA;
| ---- additional non-auto trait
@ -43,7 +43,7 @@ LL | type _T02 = dyn ObjB + _1;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:25:22
--> $DIR/no-extra-traits.rs:25:22
|
LL | trait _0 = ObjA;
| ---- first non-auto trait
@ -59,7 +59,7 @@ LL | type _T03 = dyn _1 + ObjB;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:34:22
--> $DIR/no-extra-traits.rs:34:22
|
LL | trait _2 = ObjB;
| ----
@ -78,7 +78,7 @@ LL | type _T10 = dyn _2 + _3;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:37:22
--> $DIR/no-extra-traits.rs:37:22
|
LL | trait _2 = ObjB;
| ----
@ -97,7 +97,7 @@ LL | type _T11 = dyn _3 + _2;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:40:22
--> $DIR/no-extra-traits.rs:40:22
|
LL | trait _2 = ObjB;
| ----
@ -118,7 +118,7 @@ LL | type _T12 = dyn _2 + _4;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:43:22
--> $DIR/no-extra-traits.rs:43:22
|
LL | trait _2 = ObjB;
| ----
@ -139,7 +139,7 @@ LL | type _T13 = dyn _4 + _2;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:50:22
--> $DIR/no-extra-traits.rs:50:22
|
LL | trait _0 = ObjA;
| ---- additional non-auto trait
@ -158,7 +158,7 @@ LL | type _T20 = dyn _5 + _1;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:53:22
--> $DIR/no-extra-traits.rs:53:22
|
LL | trait _0 = ObjA;
| ---- first non-auto trait
@ -177,7 +177,7 @@ LL | type _T21 = dyn _1 + _5;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:56:22
--> $DIR/no-extra-traits.rs:56:22
|
LL | trait _5 = Sync + ObjB + Send;
| ---- first non-auto trait
@ -191,7 +191,7 @@ LL | type _T22 = dyn _5 + ObjA;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:59:24
--> $DIR/no-extra-traits.rs:59:24
|
LL | trait _5 = Sync + ObjB + Send;
| ---- additional non-auto trait
@ -205,7 +205,7 @@ LL | type _T23 = dyn ObjA + _5;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:62:29
--> $DIR/no-extra-traits.rs:62:29
|
LL | trait _0 = ObjA;
| ---- additional non-auto trait
@ -224,7 +224,7 @@ LL | type _T24 = dyn Send + _5 + _1 + Sync;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:65:29
--> $DIR/no-extra-traits.rs:65:29
|
LL | trait _0 = ObjA;
| ---- first non-auto trait
@ -243,7 +243,7 @@ LL | type _T25 = dyn _1 + Sync + _5 + Send;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:68:36
--> $DIR/no-extra-traits.rs:68:36
|
LL | trait _5 = Sync + ObjB + Send;
| ---- first non-auto trait
@ -257,7 +257,7 @@ LL | type _T26 = dyn Sync + Send + _5 + ObjA;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:71:38
--> $DIR/no-extra-traits.rs:71:38
|
LL | trait _5 = Sync + ObjB + Send;
| ---- additional non-auto trait
@ -271,7 +271,7 @@ LL | type _T27 = dyn Send + Sync + ObjA + _5;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:80:17
--> $DIR/no-extra-traits.rs:80:17
|
LL | trait _0 = ObjA;
| ---- first non-auto trait
@ -296,7 +296,7 @@ LL | type _T30 = dyn _6;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:83:17
--> $DIR/no-extra-traits.rs:83:17
|
LL | trait _0 = ObjA;
| ---- first non-auto trait
@ -321,7 +321,7 @@ LL | type _T31 = dyn _6 + Send;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:86:24
--> $DIR/no-extra-traits.rs:86:24
|
LL | trait _0 = ObjA;
| ---- first non-auto trait
@ -346,7 +346,7 @@ LL | type _T32 = dyn Send + _6;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:89:17
--> $DIR/no-extra-traits.rs:89:17
|
LL | trait _0 = ObjA;
| ---- first non-auto trait
@ -381,7 +381,7 @@ LL | type _T33 = dyn _8;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:92:17
--> $DIR/no-extra-traits.rs:92:17
|
LL | trait _0 = ObjA;
| ---- first non-auto trait
@ -416,7 +416,7 @@ LL | type _T34 = dyn _8 + Send;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:95:24
--> $DIR/no-extra-traits.rs:95:24
|
LL | trait _0 = ObjA;
| ---- first non-auto trait
@ -451,7 +451,7 @@ LL | type _T35 = dyn Send + _8;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:103:23
--> $DIR/no-extra-traits.rs:103:23
|
LL | trait _5 = Sync + ObjB + Send;
| ---- first non-auto trait
@ -470,7 +470,7 @@ LL | type _T40 = dyn _10 + ObjA;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:106:24
--> $DIR/no-extra-traits.rs:106:24
|
LL | trait _5 = Sync + ObjB + Send;
| ---- additional non-auto trait
@ -489,7 +489,7 @@ LL | type _T41 = dyn ObjA + _10;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:109:23
--> $DIR/no-extra-traits.rs:109:23
|
LL | trait _0 = ObjA;
| ---- additional non-auto trait
@ -513,7 +513,7 @@ LL | type _T42 = dyn _10 + _1;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:112:37
--> $DIR/no-extra-traits.rs:112:37
|
LL | trait _5 = Sync + ObjB + Send;
| ---- first non-auto trait
@ -532,7 +532,7 @@ LL | type _T43 = dyn Send + _10 + Sync + ObjA;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:115:24
--> $DIR/no-extra-traits.rs:115:24
|
LL | trait _5 = Sync + ObjB + Send;
| ---- additional non-auto trait
@ -551,7 +551,7 @@ LL | type _T44 = dyn ObjA + _10 + Send + Sync;
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
error[E0225]: only auto traits can be used as additional traits in a trait object
--> $DIR/trait-alias-no-extra-traits.rs:118:37
--> $DIR/no-extra-traits.rs:118:37
|
LL | trait _0 = ObjA;
| ---- additional non-auto trait

View File

@ -1,5 +1,5 @@
error[E0038]: the trait `Eq` cannot be made into an object
--> $DIR/trait-alias-object-fail.rs:7:13
--> $DIR/object-fail.rs:7:13
|
LL | let _: &dyn EqAlias = &123;
| ^^^^^^^^^^^ `Eq` cannot be made into an object
@ -11,7 +11,7 @@ LL | pub trait Eq: PartialEq<Self> {
| ^^^^^^^^^^^^^^^ the trait cannot be made into an object because it uses `Self` as a type parameter
error[E0191]: the value of the associated type `Item` (from trait `Iterator`) must be specified
--> $DIR/trait-alias-object-fail.rs:9:17
--> $DIR/object-fail.rs:9:17
|
LL | let _: &dyn IteratorAlias = &vec![123].into_iter();
| ^^^^^^^^^^^^^ help: specify the associated type: `IteratorAlias<Item = Type>`

View File

@ -1,11 +1,11 @@
error[E0224]: at least one trait is required for an object type
--> $DIR/trait-alias-only-maybe-bound.rs:13:12
--> $DIR/only-maybe-bound.rs:13:12
|
LL | type _T0 = dyn _1;
| ^^^^^^
error[E0224]: at least one trait is required for an object type
--> $DIR/trait-alias-only-maybe-bound.rs:19:12
--> $DIR/only-maybe-bound.rs:19:12
|
LL | type _T1 = dyn _2;
| ^^^^^^

View File

@ -1,23 +1,23 @@
error: trait aliases cannot be `auto`
--> $DIR/trait-alias-syntax-fail.rs:4:1
--> $DIR/syntax-fail.rs:4:1
|
LL | auto trait A = Foo;
| ^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `auto`
error: trait aliases cannot be `unsafe`
--> $DIR/trait-alias-syntax-fail.rs:5:1
--> $DIR/syntax-fail.rs:5:1
|
LL | unsafe trait B = Foo;
| ^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `unsafe`
error: bounds are not allowed on trait aliases
--> $DIR/trait-alias-syntax-fail.rs:7:8
--> $DIR/syntax-fail.rs:7:8
|
LL | trait C: Ord = Eq;
| ^^^^^
error: bounds are not allowed on trait aliases
--> $DIR/trait-alias-syntax-fail.rs:8:8
--> $DIR/syntax-fail.rs:8:8
|
LL | trait D: = Eq;
| ^

View File

@ -1,5 +1,5 @@
error[E0277]: the trait bound `T: Foo` is not satisfied
--> $DIR/trait-alias-wf.rs:5:14
--> $DIR/wf.rs:5:14
|
LL | trait A<T: Foo> {}
| --- required by this bound in `A`

View File

@ -1,5 +1,5 @@
error[E0574]: expected struct, variant or union type, found trait `TraitNotAStruct`
--> $DIR/trait-as-struct-constructor.rs:4:5
--> $DIR/as-struct-constructor.rs:4:5
|
LL | TraitNotAStruct{ value: 0 };
| ^^^^^^^^^^^^^^^ not a struct, variant or union type

View File

@ -1,5 +1,5 @@
error[E0271]: type mismatch resolving `<std::vec::IntoIter<i32> as Iterator>::Item == u32`
--> $DIR/traits-assoc-type-in-supertrait-bad.rs:12:16
--> $DIR/assoc-type-in-superbad.rs:12:16
|
LL | type Key = u32;
| ^^^ expected `i32`, found `u32`

View File

@ -1,5 +1,5 @@
warning: trait objects without an explicit `dyn` are deprecated
--> $DIR/trait-bounds-not-on-bare-trait.rs:7:12
--> $DIR/not-on-bare-trait.rs:7:12
|
LL | fn foo(_x: Foo + Send) {
| ^^^^^^^^^^ help: use `dyn`: `dyn Foo + Send`
@ -7,7 +7,7 @@ LL | fn foo(_x: Foo + Send) {
= note: `#[warn(bare_trait_objects)]` on by default
error[E0277]: the size for values of type `(dyn Foo + Send + 'static)` cannot be known at compilation time
--> $DIR/trait-bounds-not-on-bare-trait.rs:7:8
--> $DIR/not-on-bare-trait.rs:7:8
|
LL | fn foo(_x: Foo + Send) {
| ^^ doesn't have a size known at compile-time

View File

@ -1,23 +1,23 @@
error[E0226]: only a single explicit lifetime bound is permitted
--> $DIR/trait-bounds-not-on-struct.rs:25:25
--> $DIR/not-on-struct.rs:25:25
|
LL | fn e() -> 'static + A + 'static {
| ^^^^^^^
error[E0226]: only a single explicit lifetime bound is permitted
--> $DIR/trait-bounds-not-on-struct.rs:29:53
--> $DIR/not-on-struct.rs:29:53
|
LL | fn f<'a,T,E>(iter: Iterator<Item='a + Result<T,E> + 'a>) {
| ^^
error[E0404]: expected trait, found struct `Foo`
--> $DIR/trait-bounds-not-on-struct.rs:8:16
--> $DIR/not-on-struct.rs:8:16
|
LL | fn foo(_x: Box<Foo + Send>) { }
| ^^^ not a trait
|
help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way
--> $DIR/trait-bounds-not-on-struct.rs:8:22
--> $DIR/not-on-struct.rs:8:22
|
LL | fn foo(_x: Box<Foo + Send>) { }
| --- ^^^^ ...because of this bound
@ -25,19 +25,19 @@ LL | fn foo(_x: Box<Foo + Send>) { }
| expected this type to be a trait...
error[E0404]: expected trait, found struct `Vec`
--> $DIR/trait-bounds-not-on-struct.rs:10:29
--> $DIR/not-on-struct.rs:10:29
|
LL | type TypeAlias<T> = Box<dyn Vec<T>>;
| ^^^^^^ not a trait
error[E0404]: expected trait, found struct `A`
--> $DIR/trait-bounds-not-on-struct.rs:13:11
--> $DIR/not-on-struct.rs:13:11
|
LL | fn a() -> A + 'static {
| ^ not a trait
|
help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way
--> $DIR/trait-bounds-not-on-struct.rs:13:15
--> $DIR/not-on-struct.rs:13:15
|
LL | fn a() -> A + 'static {
| - ^^^^^^^ ...because of this bound
@ -49,13 +49,13 @@ LL | fn a() -> A {
| --
error[E0404]: expected trait, found enum `Result`
--> $DIR/trait-bounds-not-on-struct.rs:16:34
--> $DIR/not-on-struct.rs:16:34
|
LL | fn b<'a,T,E>(iter: Iterator<Item=Result<T,E> + 'a>) {
| ^^^^^^^^^^^ not a trait
|
help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way
--> $DIR/trait-bounds-not-on-struct.rs:16:48
--> $DIR/not-on-struct.rs:16:48
|
LL | fn b<'a,T,E>(iter: Iterator<Item=Result<T,E> + 'a>) {
| ----------- ^^ ...because of this bound
@ -67,13 +67,13 @@ LL | fn b<'a,T,E>(iter: Iterator<Item=Result<T,E>>) {
| --
error[E0404]: expected trait, found struct `A`
--> $DIR/trait-bounds-not-on-struct.rs:19:21
--> $DIR/not-on-struct.rs:19:21
|
LL | fn c() -> 'static + A {
| ^ not a trait
|
help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way
--> $DIR/trait-bounds-not-on-struct.rs:19:11
--> $DIR/not-on-struct.rs:19:11
|
LL | fn c() -> 'static + A {
| ^^^^^^^ - expected this type to be a trait...
@ -85,13 +85,13 @@ LL | fn c() -> A {
| --
error[E0404]: expected trait, found enum `Result`
--> $DIR/trait-bounds-not-on-struct.rs:22:39
--> $DIR/not-on-struct.rs:22:39
|
LL | fn d<'a,T,E>(iter: Iterator<Item='a + Result<T,E>>) {
| ^^^^^^^^^^^ not a trait
|
help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way
--> $DIR/trait-bounds-not-on-struct.rs:22:34
--> $DIR/not-on-struct.rs:22:34
|
LL | fn d<'a,T,E>(iter: Iterator<Item='a + Result<T,E>>) {
| ^^ ----------- expected this type to be a trait...
@ -103,13 +103,13 @@ LL | fn d<'a,T,E>(iter: Iterator<Item=Result<T,E>>) {
| --
error[E0404]: expected trait, found struct `A`
--> $DIR/trait-bounds-not-on-struct.rs:25:21
--> $DIR/not-on-struct.rs:25:21
|
LL | fn e() -> 'static + A + 'static {
| ^ not a trait
|
help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way
--> $DIR/trait-bounds-not-on-struct.rs:25:11
--> $DIR/not-on-struct.rs:25:11
|
LL | fn e() -> 'static + A + 'static {
| ^^^^^^^ - ^^^^^^^ ...because of these bounds
@ -121,13 +121,13 @@ LL | fn e() -> A {
| ---
error[E0404]: expected trait, found enum `Result`
--> $DIR/trait-bounds-not-on-struct.rs:29:39
--> $DIR/not-on-struct.rs:29:39
|
LL | fn f<'a,T,E>(iter: Iterator<Item='a + Result<T,E> + 'a>) {
| ^^^^^^^^^^^ not a trait
|
help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way
--> $DIR/trait-bounds-not-on-struct.rs:29:34
--> $DIR/not-on-struct.rs:29:34
|
LL | fn f<'a,T,E>(iter: Iterator<Item='a + Result<T,E> + 'a>) {
| ^^ ----------- ^^ ...because of these bounds
@ -139,7 +139,7 @@ LL | fn f<'a,T,E>(iter: Iterator<Item=Result<T,E>>) {
| -- --
error[E0404]: expected trait, found struct `Traitor`
--> $DIR/trait-bounds-not-on-struct.rs:35:11
--> $DIR/not-on-struct.rs:35:11
|
LL | trait Trait {}
| ----------- similarly named trait `Trait` defined here
@ -147,7 +147,7 @@ LL | fn g() -> Traitor + 'static {
| ^^^^^^^ not a trait
|
help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way
--> $DIR/trait-bounds-not-on-struct.rs:35:21
--> $DIR/not-on-struct.rs:35:21
|
LL | fn g() -> Traitor + 'static {
| ------- ^^^^^^^ ...because of this bound

View File

@ -1,5 +1,5 @@
error[E0277]: the trait bound `u32: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums-in-fns.rs:13:15
--> $DIR/on-structs-and-enums-in-fns.rs:13:15
|
LL | struct Foo<T:Trait> {
| ----- required by this bound in `Foo`
@ -8,7 +8,7 @@ LL | fn explode(x: Foo<u32>) {}
| ^^^^^^^^ the trait `Trait` is not implemented for `u32`
error[E0277]: the trait bound `f32: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums-in-fns.rs:16:14
--> $DIR/on-structs-and-enums-in-fns.rs:16:14
|
LL | enum Bar<T:Trait> {
| ----- required by this bound in `Bar`

View File

@ -1,5 +1,5 @@
error[E0277]: the trait bound `u16: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums-in-impls.rs:20:6
--> $DIR/on-structs-and-enums-in-impls.rs:20:6
|
LL | struct Foo<T:Trait> {
| ----- required by this bound in `Foo`

View File

@ -1,5 +1,5 @@
error[E0277]: the trait bound `usize: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums-locals.rs:15:14
--> $DIR/on-structs-and-enums-locals.rs:15:14
|
LL | struct Foo<T:Trait> {
| ----- required by this bound in `Foo`
@ -8,7 +8,7 @@ LL | let baz: Foo<usize> = loop { };
| ^^^^^^^^^^ the trait `Trait` is not implemented for `usize`
error[E0277]: the trait bound `{integer}: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums-locals.rs:10:15
--> $DIR/on-structs-and-enums-locals.rs:10:15
|
LL | struct Foo<T:Trait> {
| ------------------- required by `Foo`

View File

@ -1,5 +1,5 @@
error[E0277]: the trait bound `usize: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums-static.rs:9:11
--> $DIR/on-structs-and-enums-static.rs:9:11
|
LL | struct Foo<T:Trait> {
| ----- required by this bound in `Foo`

View File

@ -0,0 +1,14 @@
// aux-build:on_structs_and_enums_xc.rs
extern crate on_structs_and_enums_xc;
use on_structs_and_enums_xc::{Bar, Foo, Trait};
fn explode(x: Foo<usize>) {}
//~^ ERROR E0277
fn kaboom(y: Bar<f32>) {}
//~^ ERROR E0277
fn main() {
}

View File

@ -1,21 +1,21 @@
error[E0277]: the trait bound `usize: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums-xc.rs:7:15
--> $DIR/on-structs-and-enums-xc.rs:7:15
|
LL | fn explode(x: Foo<usize>) {}
| ^^^^^^^^^^ the trait `Trait` is not implemented for `usize`
|
::: $DIR/auxiliary/trait_bounds_on_structs_and_enums_xc.rs:5:18
::: $DIR/auxiliary/on_structs_and_enums_xc.rs:5:18
|
LL | pub struct Foo<T:Trait> {
| ----- required by this bound in `Foo`
error[E0277]: the trait bound `f32: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums-xc.rs:10:14
--> $DIR/on-structs-and-enums-xc.rs:10:14
|
LL | fn kaboom(y: Bar<f32>) {}
| ^^^^^^^^ the trait `Trait` is not implemented for `f32`
|
::: $DIR/auxiliary/trait_bounds_on_structs_and_enums_xc.rs:9:16
::: $DIR/auxiliary/on_structs_and_enums_xc.rs:9:16
|
LL | pub enum Bar<T:Trait> {
| ----- required by this bound in `Bar`

View File

@ -0,0 +1,15 @@
// aux-build:on_structs_and_enums_xc.rs
extern crate on_structs_and_enums_xc;
use on_structs_and_enums_xc::{Bar, Foo, Trait};
fn main() {
let foo = Foo {
//~^ ERROR E0277
x: 3
};
let bar: Bar<f64> = return;
//~^ ERROR E0277
let _ = bar;
}

View File

@ -1,16 +1,16 @@
error[E0277]: the trait bound `f64: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums-xc1.rs:12:14
--> $DIR/on-structs-and-enums-xc1.rs:12:14
|
LL | let bar: Bar<f64> = return;
| ^^^^^^^^ the trait `Trait` is not implemented for `f64`
|
::: $DIR/auxiliary/trait_bounds_on_structs_and_enums_xc.rs:9:16
::: $DIR/auxiliary/on_structs_and_enums_xc.rs:9:16
|
LL | pub enum Bar<T:Trait> {
| ----- required by this bound in `Bar`
error[E0277]: the trait bound `{integer}: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums-xc1.rs:8:15
--> $DIR/on-structs-and-enums-xc1.rs:8:15
|
LL | let foo = Foo {
| ^^^ the trait `Trait` is not implemented for `{integer}`

View File

@ -1,5 +1,5 @@
error[E0277]: the trait bound `T: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums.rs:13:9
--> $DIR/on-structs-and-enums.rs:13:9
|
LL | struct Foo<T:Trait> {
| ----- required by this bound in `Foo`
@ -13,7 +13,7 @@ LL | impl<T: Trait> Foo<T> {
| ^^^^^^^
error[E0277]: the trait bound `isize: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums.rs:19:8
--> $DIR/on-structs-and-enums.rs:19:8
|
LL | struct Foo<T:Trait> {
| ----- required by this bound in `Foo`
@ -22,7 +22,7 @@ LL | a: Foo<isize>,
| ^^^^^^^^^^ the trait `Trait` is not implemented for `isize`
error[E0277]: the trait bound `usize: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums.rs:23:10
--> $DIR/on-structs-and-enums.rs:23:10
|
LL | enum Bar<T:Trait> {
| ----- required by this bound in `Bar`
@ -31,7 +31,7 @@ LL | Quux(Bar<usize>),
| ^^^^^^^^^^ the trait `Trait` is not implemented for `usize`
error[E0277]: the trait bound `U: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums.rs:27:8
--> $DIR/on-structs-and-enums.rs:27:8
|
LL | struct Foo<T:Trait> {
| ----- required by this bound in `Foo`
@ -45,7 +45,7 @@ LL | struct Badness<U: Trait> {
| ^^^^^^^
error[E0277]: the trait bound `V: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums.rs:31:21
--> $DIR/on-structs-and-enums.rs:31:21
|
LL | enum Bar<T:Trait> {
| ----- required by this bound in `Bar`
@ -59,7 +59,7 @@ LL | enum MoreBadness<V: Trait> {
| ^^^^^^^
error[E0277]: the trait bound `i32: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums.rs:35:5
--> $DIR/on-structs-and-enums.rs:35:5
|
LL | struct Foo<T:Trait> {
| ----- required by this bound in `Foo`
@ -68,7 +68,7 @@ LL | Foo<i32>,
| ^^^^^^^^ the trait `Trait` is not implemented for `i32`
error[E0277]: the trait bound `u8: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums.rs:39:29
--> $DIR/on-structs-and-enums.rs:39:29
|
LL | enum Bar<T:Trait> {
| ----- required by this bound in `Bar`

View File

@ -1,5 +1,5 @@
error[E0277]: the trait bound `Foo: main::a::Bar` is not satisfied
--> $DIR/trait-bounds-same-crate-name.rs:31:20
--> $DIR/same-crate-name.rs:31:20
|
LL | a::try_foo(foo);
| ^^^ the trait `main::a::Bar` is not implemented for `Foo`
@ -17,7 +17,7 @@ LL | impl Bar for Foo {}
= note: perhaps two different versions of crate `crate_a2` are being used?
error[E0277]: the trait bound `DoesNotImplementTrait: main::a::Bar` is not satisfied
--> $DIR/trait-bounds-same-crate-name.rs:38:20
--> $DIR/same-crate-name.rs:38:20
|
LL | a::try_foo(implements_no_traits);
| ^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `DoesNotImplementTrait`
@ -28,7 +28,7 @@ LL | pub fn try_foo(x: impl Bar) {}
| --- required by this bound in `try_foo`
error[E0277]: the trait bound `ImplementsWrongTraitConditionally<isize>: main::a::Bar` is not satisfied
--> $DIR/trait-bounds-same-crate-name.rs:45:20
--> $DIR/same-crate-name.rs:45:20
|
LL | a::try_foo(other_variant_implements_mismatched_trait);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsWrongTraitConditionally<isize>`
@ -46,7 +46,7 @@ LL | impl Bar for ImplementsWrongTraitConditionally<isize> {}
= note: perhaps two different versions of crate `crate_a2` are being used?
error[E0277]: the trait bound `ImplementsTraitForUsize<isize>: main::a::Bar` is not satisfied
--> $DIR/trait-bounds-same-crate-name.rs:51:20
--> $DIR/same-crate-name.rs:51:20
|
LL | a::try_foo(other_variant_implements_correct_trait);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsTraitForUsize<isize>`

View File

@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/trait-bounds-sugar.rs:12:7
--> $DIR/sugar.rs:12:7
|
LL | a(x);
| ^ expected trait `Foo + Send`, found trait `Foo + Sync`

View File

@ -1,5 +1,5 @@
error[E0277]: the trait bound `Struct: Trait<isize>` is not satisfied
--> $DIR/trait-coercion-generic-bad.rs:16:36
--> $DIR/coercion-generic-bad.rs:16:36
|
LL | let s: Box<dyn Trait<isize>> = Box::new(Struct { person: "Fred" });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait<isize>` is not implemented for `Struct`

View File

@ -1,5 +1,5 @@
error[E0597]: `person` does not live long enough
--> $DIR/trait-coercion-generic-regions.rs:17:24
--> $DIR/coercion-generic-regions.rs:17:24
|
LL | let person: &str = &person;
| ^^^^^^^

View File

@ -1,6 +1,6 @@
// aux-build:trait_default_method_xc_aux.rs
// aux-build:xc.rs
extern crate trait_default_method_xc_aux as aux;
extern crate xc as aux;
use aux::A;
pub struct a_struct { pub x: isize }

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