Skip to content

Commit

Permalink
Organize trait test files
Browse files Browse the repository at this point in the history
  • Loading branch information
vandenheuvel committed Feb 9, 2021
1 parent 921ec4b commit 0d96a79
Show file tree
Hide file tree
Showing 288 changed files with 285 additions and 285 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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) {}
| ^^^^^^^^^^^^^
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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>() {}

Expand Down
Original file line number Diff line number Diff line change
@@ -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`
Expand All @@ -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`
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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;
| ---
Expand All @@ -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;
| ---
Expand All @@ -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;
| ---
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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;
| ---
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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;
| ---
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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;
| ---
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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;
| ---
Expand All @@ -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;
| ---
Expand All @@ -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;
| ---
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
File renamed without changes.
Loading

0 comments on commit 0d96a79

Please sign in to comment.