Skip to content

Organize trait test files #81900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) {}
| ^^^^^^^^^^^^^
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>() {}

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`
@@ -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`
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
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;
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;
| ---
@@ -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
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-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
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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>`
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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;
| ^^^^^^
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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;
| ^
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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`
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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`
File renamed without changes.
File renamed without changes.
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,13 +1,13 @@
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`
|
= 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
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
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
| |
| 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,15 +139,15 @@ 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
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
Original file line number Diff line number Diff line change
@@ -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`
Original file line number Diff line number Diff line change
@@ -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`
Original file line number Diff line number Diff line change
@@ -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`
Original file line number Diff line number Diff line change
@@ -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`
14 changes: 14 additions & 0 deletions src/test/ui/traits/bound/on-structs-and-enums-xc.rs
Original file line number Diff line number Diff line change
@@ -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() {
}
Original file line number Diff line number Diff line change
@@ -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`
15 changes: 15 additions & 0 deletions src/test/ui/traits/bound/on-structs-and-enums-xc1.rs
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
@@ -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}`
Original file line number Diff line number Diff line change
@@ -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`
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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>`
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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`
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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`
Original file line number Diff line number Diff line change
@@ -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;
| ^^^^^^^
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,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 }
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,11 +1,11 @@
// run-pass
// aux-build:trait_default_method_xc_aux.rs
// aux-build:trait_default_method_xc_aux_2.rs
// aux-build:xc.rs
// aux-build:xc_2.rs



extern crate trait_default_method_xc_aux as aux;
extern crate trait_default_method_xc_aux_2 as aux2;
extern crate xc as aux;
extern crate xc_2 as aux2;
use aux::A;
use aux2::{a_struct, welp};

Original file line number Diff line number Diff line change
@@ -2,10 +2,10 @@
#![allow(dead_code)]
#![allow(non_camel_case_types)]

// 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, TestEquality, Something};
use aux::B;

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0428]: the name `orange` is defined multiple times
--> $DIR/trait-duplicate-methods.rs:3:5
--> $DIR/duplicate-methods.rs:3:5
|
LL | fn orange(&self);
| ----------------- previous definition of the value `orange` here
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[E0599]: no method named `foo` found for reference `&i32` in the current scope
--> $DIR/trait-impl-1.rs:15:7
--> $DIR/impl-1.rs:15:7
|
LL | x.foo();
| ^^^ method not found in `&i32`
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
error[E0438]: const `BAR` is not a member of trait `A`
--> $DIR/trait-impl-can-not-have-untraitful-items.rs:4:5
--> $DIR/impl-can-not-have-untraitful-items.rs:4:5
|
LL | const BAR: () = ();
| ^^^^^^^^^^^^^^^^^^^ not a member of trait `A`

error[E0437]: type `Baz` is not a member of trait `A`
--> $DIR/trait-impl-can-not-have-untraitful-items.rs:5:5
--> $DIR/impl-can-not-have-untraitful-items.rs:5:5
|
LL | type Baz = ();
| ^^^^^^^^^^^^^^ not a member of trait `A`

error[E0407]: method `foo` is not a member of trait `A`
--> $DIR/trait-impl-can-not-have-untraitful-items.rs:6:5
--> $DIR/impl-can-not-have-untraitful-items.rs:6:5
|
LL | fn foo(&self) { }
| ^^^^^^^^^^^^^^^^^ not a member of trait `A`
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0050]: method `bar` has 1 parameter but the declaration in trait `Foo::bar` has 2
--> $DIR/trait-impl-different-num-params.rs:5:12
--> $DIR/impl-different-num-params.rs:5:12
|
LL | fn bar(&self, x: usize) -> Self;
| --------------- trait requires 2 parameters
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0573]: expected type, found module `a`
--> $DIR/trait-impl-for-module.rs:7:12
--> $DIR/impl-for-module.rs:7:12
|
LL | trait A {
| ------- similarly named trait `A` defined here
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0053]: method `jumbo` has an incompatible type for trait
--> $DIR/trait-impl-method-mismatch.rs:7:5
--> $DIR/impl-method-mismatch.rs:7:5
|
LL | fn jumbo(&self, x: &usize) -> usize;
| ------------------------------------ type in trait
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'b` due to conflicting requirements
--> $DIR/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:13
--> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:13
|
LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> {
| ^^^^^^^^^^
|
note: first, the lifetime cannot outlive the lifetime `'a` as defined on the impl at 24:6...
--> $DIR/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:6
--> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:6
|
LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> {
| ^^
note: ...but the lifetime must also be valid for the lifetime `'b` as defined on the impl at 24:9...
--> $DIR/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:9
--> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:9
|
LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> {
| ^^
note: ...so that the types are compatible
--> $DIR/trait-impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:13
--> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:13
|
LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> {
| ^^^^^^^^^^
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0275]: overflow evaluating the requirement `Box<X<C<'_>>>: NotAuto`
--> $DIR/traits-inductive-overflow-lifetime.rs:27:5
--> $DIR/lifetime.rs:27:5
|
LL | fn is_send<S: NotAuto>() {}
| ------- required by this bound in `is_send`
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0275]: overflow evaluating the requirement `{integer}: Tweedledum`
--> $DIR/traits-inductive-overflow-simultaneous.rs:18:5
--> $DIR/simultaneous.rs:18:5
|
LL | fn is_ee<T: Combo>(t: T) {
| ----- required by this bound in `is_ee`
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error[E0568]: auto traits cannot have super traits
--> $DIR/traits-inductive-overflow-supertrait-auto-trait.rs:8:19
--> $DIR/supertrait-auto-trait.rs:8:19
|
LL | auto trait Magic: Copy {}
| ----- ^^^^ help: remove the super traits
| |
| auto trait cannot have super traits

error[E0277]: the trait bound `NoClone: Copy` is not satisfied
--> $DIR/traits-inductive-overflow-supertrait-auto-trait.rs:16:23
--> $DIR/supertrait-auto-trait.rs:16:23
|
LL | fn copy<T: Magic>(x: T) -> (T, T) { (x, x) }
| ----- required by this bound in `copy`
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0275]: overflow evaluating the requirement `NoClone: Magic`
--> $DIR/traits-inductive-overflow-supertrait.rs:13:18
--> $DIR/supertrait.rs:13:18
|
LL | fn copy<T: Magic>(x: T) -> (T, T) { (x, x) }
| ----- required by this bound in `copy`
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: `T` cannot be shared between threads safely
--> $DIR/traits-inductive-overflow-two-traits.rs:11:5
--> $DIR/two-traits.rs:11:5
|
LL | type X: Trait;
| ----- required by this bound in `Magic::X`
@@ -13,7 +13,7 @@ LL | impl<T: Magic + Sync> Magic for T {
| ^^^^^^

error[E0275]: overflow evaluating the requirement `*mut (): Magic`
--> $DIR/traits-inductive-overflow-two-traits.rs:20:5
--> $DIR/two-traits.rs:20:5
|
LL | fn wizard<T: Magic>() { check::<<T as Magic>::X>(); }
| ----- required by this bound in `wizard`
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// run-pass
// aux-build:trait_inheritance_auto_xc_2_aux.rs
// aux-build:auto_xc_2.rs


extern crate trait_inheritance_auto_xc_2_aux as aux;
extern crate auto_xc_2 as aux;

// aux defines impls of Foo, Bar and Baz for A
use aux::{Foo, Bar, Baz, A};
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// run-pass
#![allow(dead_code)]
// aux-build:trait_inheritance_auto_xc_aux.rs
// aux-build:auto_xc.rs


extern crate trait_inheritance_auto_xc_aux as aux;
extern crate auto_xc as aux;

use aux::{Foo, Bar, Baz, Quux};

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// run-pass
// aux-build:trait_xc_call_aux.rs
// aux-build:xc_call.rs


extern crate trait_xc_call_aux as aux;
extern crate xc_call as aux;

use aux::Foo;

File renamed without changes.
File renamed without changes.
File renamed without changes.
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,9 +1,9 @@
// run-pass
// aux-build:trait_inheritance_overloading_xc.rs
// aux-build:overloading_xc.rs


extern crate trait_inheritance_overloading_xc;
use trait_inheritance_overloading_xc::{MyNum, MyInt};
extern crate overloading_xc;
use overloading_xc::{MyNum, MyInt};

fn f<T:MyNum>(x: T, y: T) -> (T, T, T) {
return (x.clone() + y.clone(), x.clone() - y.clone(), x * y);
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfied
--> $DIR/traits-repeated-supertrait-ambig.rs:26:7
--> $DIR/repeated-supertrait-ambig.rs:26:7
|
LL | c.same_as(22)
| ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `dyn CompareToInts`

error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
--> $DIR/traits-repeated-supertrait-ambig.rs:30:7
--> $DIR/repeated-supertrait-ambig.rs:30:7
|
LL | c.same_as(22)
| ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `C`
@@ -16,7 +16,7 @@ LL | fn with_trait<C:CompareToInts + CompareTo<i32>>(c: &C) -> bool {
| ^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfied
--> $DIR/traits-repeated-supertrait-ambig.rs:34:5
--> $DIR/repeated-supertrait-ambig.rs:34:5
|
LL | fn same_as(&self, t: T) -> bool;
| -------------------------------- required by `CompareTo::same_as`
@@ -25,7 +25,7 @@ LL | CompareToInts::same_as(c, 22)
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `CompareTo<i32>` is not implemented for `dyn CompareToInts`

error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
--> $DIR/traits-repeated-supertrait-ambig.rs:38:5
--> $DIR/repeated-supertrait-ambig.rs:38:5
|
LL | fn same_as(&self, t: T) -> bool;
| -------------------------------- required by `CompareTo::same_as`
@@ -39,7 +39,7 @@ LL | fn with_ufcs2<C:CompareToInts + CompareTo<i32>>(c: &C) -> bool {
| ^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `i64: CompareTo<i32>` is not satisfied
--> $DIR/traits-repeated-supertrait-ambig.rs:42:23
--> $DIR/repeated-supertrait-ambig.rs:42:23
|
LL | assert_eq!(22_i64.same_as(22), true);
| ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `i64`
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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[E0277]: the trait bound `Foo: Clone` is not satisfied
--> $DIR/traits-issue-71136.rs:5:5
--> $DIR/issue-71136.rs:5:5
|
LL | the_foos: Vec<Foo>,
| ^^^^^^^^^^^^^^^^^^ expected an implementor of trait `Clone`
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0599]: no method named `a` found for struct `S` in the current scope
--> $DIR/trait-item-privacy.rs:67:7
--> $DIR/item-privacy.rs:67:7
|
LL | struct S;
| --------- method `a` not found for this
@@ -9,13 +9,13 @@ LL | S.a();
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `method::A` defines an item `a`, perhaps you need to implement it
--> $DIR/trait-item-privacy.rs:6:5
--> $DIR/item-privacy.rs:6:5
|
LL | trait A {
| ^^^^^^^

error[E0599]: no method named `b` found for struct `S` in the current scope
--> $DIR/trait-item-privacy.rs:68:7
--> $DIR/item-privacy.rs:68:7
|
LL | struct S;
| --------- method `b` not found for this
@@ -30,13 +30,13 @@ LL | use method::B;
|

error[E0624]: associated function `a` is private
--> $DIR/trait-item-privacy.rs:72:7
--> $DIR/item-privacy.rs:72:7
|
LL | c.a();
| ^ private associated function

error[E0599]: no function or associated item named `a` found for struct `S` in the current scope
--> $DIR/trait-item-privacy.rs:78:8
--> $DIR/item-privacy.rs:78:8
|
LL | struct S;
| --------- function or associated item `a` not found for this
@@ -46,13 +46,13 @@ LL | S::a(&S);
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `method::A` defines an item `a`, perhaps you need to implement it
--> $DIR/trait-item-privacy.rs:6:5
--> $DIR/item-privacy.rs:6:5
|
LL | trait A {
| ^^^^^^^

error[E0599]: no function or associated item named `b` found for struct `S` in the current scope
--> $DIR/trait-item-privacy.rs:80:8
--> $DIR/item-privacy.rs:80:8
|
LL | struct S;
| --------- function or associated item `b` not found for this
@@ -67,13 +67,13 @@ LL | use method::B;
|

error[E0624]: associated function `a` is private
--> $DIR/trait-item-privacy.rs:84:8
--> $DIR/item-privacy.rs:84:8
|
LL | C::a(&S);
| ^ private associated function

error[E0599]: no associated item named `A` found for struct `S` in the current scope
--> $DIR/trait-item-privacy.rs:97:8
--> $DIR/item-privacy.rs:97:8
|
LL | struct S;
| --------- associated item `A` not found for this
@@ -83,13 +83,13 @@ LL | S::A;
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `assoc_const::A` defines an item `A`, perhaps you need to implement it
--> $DIR/trait-item-privacy.rs:24:5
--> $DIR/item-privacy.rs:24:5
|
LL | trait A {
| ^^^^^^^

error[E0599]: no associated item named `B` found for struct `S` in the current scope
--> $DIR/trait-item-privacy.rs:98:8
--> $DIR/item-privacy.rs:98:8
|
LL | struct S;
| --------- associated item `B` not found for this
@@ -104,13 +104,13 @@ LL | use assoc_const::B;
|

error[E0624]: associated constant `A` is private
--> $DIR/trait-item-privacy.rs:101:8
--> $DIR/item-privacy.rs:101:8
|
LL | C::A;
| ^ private associated constant

error[E0038]: the trait `assoc_const::C` cannot be made into an object
--> $DIR/trait-item-privacy.rs:101:5
--> $DIR/item-privacy.rs:101:5
|
LL | C::A;
| ^^^^ `assoc_const::C` cannot be made into an object
@@ -119,7 +119,7 @@ LL | C::A;
= help: consider moving `B` to another trait
= help: consider moving `A` to another trait
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $DIR/trait-item-privacy.rs:25:15
--> $DIR/item-privacy.rs:25:15
|
LL | const A: u8 = 0;
| ^ ...because it contains this associated `const`
@@ -133,31 +133,31 @@ LL | const C: u8 = 0;
| ^ ...because it contains this associated `const`

error[E0223]: ambiguous associated type
--> $DIR/trait-item-privacy.rs:115:12
--> $DIR/item-privacy.rs:115:12
|
LL | let _: S::A;
| ^^^^ help: use fully-qualified syntax: `<S as Trait>::A`

error[E0223]: ambiguous associated type
--> $DIR/trait-item-privacy.rs:116:12
--> $DIR/item-privacy.rs:116:12
|
LL | let _: S::B;
| ^^^^ help: use fully-qualified syntax: `<S as Trait>::B`

error[E0223]: ambiguous associated type
--> $DIR/trait-item-privacy.rs:117:12
--> $DIR/item-privacy.rs:117:12
|
LL | let _: S::C;
| ^^^^ help: use fully-qualified syntax: `<S as Trait>::C`

error: associated type `A` is private
--> $DIR/trait-item-privacy.rs:119:12
--> $DIR/item-privacy.rs:119:12
|
LL | let _: T::A;
| ^^^^ private associated type

error: associated type `A` is private
--> $DIR/trait-item-privacy.rs:128:9
--> $DIR/item-privacy.rs:128:9
|
LL | A = u8,
| ^^^^^^ private associated type
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
error[E0308]: method not compatible with trait
--> $DIR/trait-matching-lifetimes.rs:14:5
--> $DIR/matching-lifetimes.rs:14:5
|
LL | fn foo(x: Foo<'b,'a>) {
| ^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
= note: expected fn pointer `fn(Foo<'a, 'b>)`
found fn pointer `fn(Foo<'b, 'a>)`
note: the lifetime `'b` as defined on the impl at 13:9...
--> $DIR/trait-matching-lifetimes.rs:13:9
--> $DIR/matching-lifetimes.rs:13:9
|
LL | impl<'a,'b> Tr for Foo<'a,'b> {
| ^^
note: ...does not necessarily outlive the lifetime `'a` as defined on the impl at 13:6
--> $DIR/trait-matching-lifetimes.rs:13:6
--> $DIR/matching-lifetimes.rs:13:6
|
LL | impl<'a,'b> Tr for Foo<'a,'b> {
| ^^

error[E0308]: method not compatible with trait
--> $DIR/trait-matching-lifetimes.rs:14:5
--> $DIR/matching-lifetimes.rs:14:5
|
LL | fn foo(x: Foo<'b,'a>) {
| ^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
= note: expected fn pointer `fn(Foo<'a, 'b>)`
found fn pointer `fn(Foo<'b, 'a>)`
note: the lifetime `'a` as defined on the impl at 13:6...
--> $DIR/trait-matching-lifetimes.rs:13:6
--> $DIR/matching-lifetimes.rs:13:6
|
LL | impl<'a,'b> Tr for Foo<'a,'b> {
| ^^
note: ...does not necessarily outlive the lifetime `'b` as defined on the impl at 13:9
--> $DIR/trait-matching-lifetimes.rs:13:9
--> $DIR/matching-lifetimes.rs:13:9
|
LL | impl<'a,'b> Tr for Foo<'a,'b> {
| ^^
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0624]: associated function `method` is private
--> $DIR/trait-method-private.rs:19:9
--> $DIR/method-private.rs:19:9
|
LL | foo.method();
| ^^^^^^ private associated function
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/traits-multidispatch-bad.rs:19:17
--> $DIR/multidispatch-bad.rs:19:17
|
LL | test(22i32, 44i32);
| ^^^^^ expected `u32`, found `i32`
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0282]: type annotations needed
--> $DIR/traits-multidispatch-convert-ambig-dest.rs:26:5
--> $DIR/multidispatch-convert-ambig-dest.rs:26:5
|
LL | test(22, std::default::Default::default());
| ^^^^ cannot infer type for type parameter `U` declared on the function `test`
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0592]: duplicate definitions with name `test`
--> $DIR/trait-object-auto-dedup-in-impl.rs:14:5
--> $DIR/auto-dedup-in-impl.rs:14:5
|
LL | fn test(&self) { println!("one"); }
| ^^^^^^^^^^^^^^ duplicate definitions for `test`
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,11 +1,11 @@
error[E0224]: at least one trait is required for an object type
--> $DIR/trait-object-macro-matcher.rs:11:8
--> $DIR/macro-matcher.rs:11:8
|
LL | m!(dyn 'static +);
| ^^^^^^^^^^^^^

error[E0038]: the trait `Copy` cannot be made into an object
--> $DIR/trait-object-macro-matcher.rs:8:8
--> $DIR/macro-matcher.rs:8:8
|
LL | m!(dyn Copy + Send + 'static);
| ^^^^^^^^^^^^^^^^^^^^^^^^^ `Copy` cannot be made into an object
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0038]: the trait `Tr` cannot be made into an object
--> $DIR/trait-object-safety.rs:15:22
--> $DIR/safety.rs:15:22
|
LL | let _: &dyn Tr = &St;
| ^^^ `Tr` cannot be made into an object
|
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $DIR/trait-object-safety.rs:4:8
--> $DIR/safety.rs:4:8
|
LL | trait Tr {
| -- this trait cannot be made into an object...
@@ -23,13 +23,13 @@ LL | fn foo() where Self: Sized;
| ^^^^^^^^^^^^^^^^^

error[E0038]: the trait `Tr` cannot be made into an object
--> $DIR/trait-object-safety.rs:15:12
--> $DIR/safety.rs:15:12
|
LL | let _: &dyn Tr = &St;
| ^^^^^^^ `Tr` cannot be made into an object
|
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $DIR/trait-object-safety.rs:4:8
--> $DIR/safety.rs:4:8
|
LL | trait Tr {
| -- this trait cannot be made into an object...
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0224]: at least one trait is required for an object type
--> $DIR/trait-object-vs-lifetime-2.rs:7:5
--> $DIR/vs-lifetime-2.rs:7:5
|
LL | dyn 'static +: 'static + Copy,
| ^^^^^^^^^^^^^
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
error[E0224]: at least one trait is required for an object type
--> $DIR/trait-object-vs-lifetime.rs:9:23
--> $DIR/vs-lifetime.rs:9:23
|
LL | let _: S<'static, dyn 'static +>;
| ^^^^^^^^^^^^^

error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
--> $DIR/trait-object-vs-lifetime.rs:11:12
--> $DIR/vs-lifetime.rs:11:12
|
LL | let _: S<'static, 'static>;
| ^ --------- help: remove this lifetime argument
| |
| expected 1 lifetime argument
|
note: struct defined here, with 1 lifetime parameter: `'a`
--> $DIR/trait-object-vs-lifetime.rs:4:8
--> $DIR/vs-lifetime.rs:4:8
|
LL | struct S<'a, T>(&'a u8, T);
| ^ --

error[E0107]: this struct takes 1 type argument but 0 type arguments were supplied
--> $DIR/trait-object-vs-lifetime.rs:11:12
--> $DIR/vs-lifetime.rs:11:12
|
LL | let _: S<'static, 'static>;
| ^ expected 1 type argument
|
note: struct defined here, with 1 type parameter: `T`
--> $DIR/trait-object-vs-lifetime.rs:4:8
--> $DIR/vs-lifetime.rs:4:8
|
LL | struct S<'a, T>(&'a u8, T);
| ^ -
@@ -35,13 +35,13 @@ LL | let _: S<'static, 'static, T>;
| ^^^

error[E0224]: at least one trait is required for an object type
--> $DIR/trait-object-vs-lifetime.rs:14:14
--> $DIR/vs-lifetime.rs:14:14
|
LL | let _: S<dyn 'static +, 'static>;
| ^^^^^^^^^^^^^

error[E0747]: type provided when a lifetime was expected
--> $DIR/trait-object-vs-lifetime.rs:14:14
--> $DIR/vs-lifetime.rs:14:14
|
LL | let _: S<dyn 'static +, 'static>;
| ^^^^^^^^^^^^^
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0191]: the value of the associated type `Output` (from trait `Base`) must be specified
--> $DIR/trait-object-with-self-in-projection-output-bad.rs:45:21
--> $DIR/with-self-in-projection-output-bad.rs:45:21
|
LL | type Output;
| ------------ `Output` defined here
@@ -8,7 +8,7 @@ LL | let _x: Box<dyn Helper<Target=i32>> = Box::new(2u32);
| ^^^^^^^^^^^^^^^^^^ help: specify the associated type: `Helper<Target=i32, Output = Type>`

error[E0191]: the value of the associated type `Output` (from trait `Base`) must be specified
--> $DIR/trait-object-with-self-in-projection-output-bad.rs:48:21
--> $DIR/with-self-in-projection-output-bad.rs:48:21
|
LL | type Output;
| ------------ `Output` defined here
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: `impl` item signature doesn't match `trait` item signature
--> $DIR/trait-param-without-lifetime-constraint.rs:14:5
--> $DIR/param-without-lifetime-constraint.rs:14:5
|
LL | fn get_relation(&self) -> To;
| ----------------------------- expected `fn(&Article) -> &ProofReader`
@@ -10,7 +10,7 @@ LL | fn get_relation(&self) -> &ProofReader {
= note: expected `fn(&Article) -> &ProofReader`
found `fn(&Article) -> &ProofReader`
help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
--> $DIR/trait-param-without-lifetime-constraint.rs:10:31
--> $DIR/param-without-lifetime-constraint.rs:10:31
|
LL | fn get_relation(&self) -> To;
| ^^ consider borrowing this type parameter in the trait
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0119]: conflicting implementations of trait `OtherTrait` for type `()`:
--> $DIR/reservation-impl-coherence-conflict.rs:11:1
--> $DIR/coherence-conflict.rs:11:1
|
LL | impl OtherTrait for () {}
| ---------------------- first implementation here
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: the trait bound `(): MyTrait` is not satisfied
--> $DIR/reservation-impl-no-use.rs:10:26
--> $DIR/no-use.rs:10:26
|
LL | trait MyTrait { fn foo(&self); }
| -------------- required by `MyTrait::foo`
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0369]: cannot multiply `&T` by `f64`
--> $DIR/trait-resolution-in-overloaded-op.rs:8:7
--> $DIR/resolution-in-overloaded-op.rs:8:7
|
LL | a * b
| - ^ - f64
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
--> $DIR/trait-safety-fn-body.rs:11:9
--> $DIR/safety-fn-body.rs:11:9
|
LL | *self += 1;
| ^^^^^^^^^^ dereference of raw pointer
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0197]: inherent impls cannot be unsafe
--> $DIR/trait-safety-inherent-impl.rs:5:13
--> $DIR/safety-inherent-impl.rs:5:13
|
LL | unsafe impl SomeStruct {
| ------ ^^^^^^^^^^ inherent impl for this type
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[E0200]: the trait `Foo` requires an `unsafe impl` declaration
--> $DIR/trait-safety-trait-impl-cc.rs:9:1
--> $DIR/safety-trait-impl-cc.rs:9:1
|
LL | / impl lib::Foo for Bar {
LL | | fn foo(&self) -> isize {
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0200]: the trait `UnsafeTrait` requires an `unsafe impl` declaration
--> $DIR/trait-safety-trait-impl.rs:14:1
--> $DIR/safety-trait-impl.rs:14:1
|
LL | impl UnsafeTrait for u16 { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0199]: implementing the trait `SafeTrait` is not unsafe
--> $DIR/trait-safety-trait-impl.rs:16:1
--> $DIR/safety-trait-impl.rs:16:1
|
LL | unsafe impl SafeTrait for u32 { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0283]: type annotations needed
--> $DIR/trait-static-method-generic-inference.rs:24:25
--> $DIR/static-method-generic-inference.rs:24:25
|
LL | fn new() -> T;
| -------------- required by `HasNew::new`
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: the trait bound `NoToSocketAddrs: ToSocketAddrs` is not satisfied
--> $DIR/trait-suggest-deferences-issue-39029.rs:16:37
--> $DIR/issue-39029.rs:16:37
|
LL | let _errors = TcpListener::bind(&bad);
| ^^^^
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: the trait bound `&String: SomeTrait` is not satisfied
--> $DIR/trait-suggest-deferences-issue-62530.rs:13:26
--> $DIR/issue-62530.rs:13:26
|
LL | fn takes_type_parameter<T>(_x: T) where T: SomeTrait {}
| --------- required by this bound in `takes_type_parameter`
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: the trait bound `&Baz: Happy` is not satisfied
--> $DIR/trait-suggest-deferences-multiple-0.rs:34:9
--> $DIR/multiple-0.rs:34:9
|
LL | fn foo<T>(_: T) where T: Happy {}
| ----- required by this bound in `foo`
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: the trait bound `&mut Baz: Happy` is not satisfied
--> $DIR/trait-suggest-deferences-multiple-1.rs:52:9
--> $DIR/multiple-1.rs:52:9
|
LL | fn foo<T>(_: T) where T: Happy {}
| ----- required by this bound in `foo`
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: the size for values of type `U` cannot be known at compilation time
--> $DIR/trait-suggest-where-clause.rs:7:20
--> $DIR/suggest-where-clause.rs:7:20
|
LL | fn check<T: Iterator, U: ?Sized>() {
| - this type parameter needs to be `Sized`
@@ -13,7 +13,7 @@ LL | pub const fn size_of<T>() -> usize {
| - required by this bound in `std::mem::size_of`

error[E0277]: the size for values of type `U` cannot be known at compilation time
--> $DIR/trait-suggest-where-clause.rs:10:5
--> $DIR/suggest-where-clause.rs:10:5
|
LL | fn check<T: Iterator, U: ?Sized>() {
| - this type parameter needs to be `Sized`
@@ -29,31 +29,31 @@ LL | pub const fn size_of<T>() -> usize {
= note: required because it appears within the type `Misc<U>`

error[E0277]: the trait bound `u64: From<T>` is not satisfied
--> $DIR/trait-suggest-where-clause.rs:15:5
--> $DIR/suggest-where-clause.rs:15:5
|
LL | <u64 as From<T>>::from;
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `From<T>` is not implemented for `u64`
|
= note: required by `from`

error[E0277]: the trait bound `u64: From<<T as Iterator>::Item>` is not satisfied
--> $DIR/trait-suggest-where-clause.rs:18:5
--> $DIR/suggest-where-clause.rs:18:5
|
LL | <u64 as From<<T as Iterator>::Item>>::from;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<<T as Iterator>::Item>` is not implemented for `u64`
|
= note: required by `from`

error[E0277]: the trait bound `Misc<_>: From<T>` is not satisfied
--> $DIR/trait-suggest-where-clause.rs:23:5
--> $DIR/suggest-where-clause.rs:23:5
|
LL | <Misc<_> as From<T>>::from;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<T>` is not implemented for `Misc<_>`
|
= note: required by `from`

error[E0277]: the size for values of type `[T]` cannot be known at compilation time
--> $DIR/trait-suggest-where-clause.rs:28:20
--> $DIR/suggest-where-clause.rs:28:20
|
LL | mem::size_of::<[T]>();
| ^^^ doesn't have a size known at compile-time
@@ -66,7 +66,7 @@ LL | pub const fn size_of<T>() -> usize {
= help: the trait `Sized` is not implemented for `[T]`

error[E0277]: the size for values of type `[&U]` cannot be known at compilation time
--> $DIR/trait-suggest-where-clause.rs:31:5
--> $DIR/suggest-where-clause.rs:31:5
|
LL | mem::size_of::<[&U]>();
| ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
error[E0107]: this associated function takes 0 type arguments but 1 type argument was supplied
--> $DIR/trait-test-2.rs:9:8
--> $DIR/test-2.rs:9:8
|
LL | 10.dup::<i32>();
| ^^^------- help: remove these generics
| |
| expected 0 type arguments
|
note: associated function defined here, with 0 type parameters
--> $DIR/trait-test-2.rs:4:16
--> $DIR/test-2.rs:4:16
|
LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
| ^^^

error[E0107]: this associated function takes 1 type argument but 2 type arguments were supplied
--> $DIR/trait-test-2.rs:11:8
--> $DIR/test-2.rs:11:8
|
LL | 10.blah::<i32, i32>();
| ^^^^ ----- help: remove this type argument
| |
| expected 1 type argument
|
note: associated function defined here, with 1 type parameter: `X`
--> $DIR/trait-test-2.rs:4:39
--> $DIR/test-2.rs:4:39
|
LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
| ^^^^ -

error[E0038]: the trait `bar` cannot be made into an object
--> $DIR/trait-test-2.rs:13:16
--> $DIR/test-2.rs:13:16
|
LL | (box 10 as Box<dyn bar>).dup();
| ^^^^^^^^^^^^ `bar` cannot be made into an object
|
= help: consider moving `dup` to another trait
= help: consider moving `blah` to another trait
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $DIR/trait-test-2.rs:4:30
--> $DIR/test-2.rs:4:30
|
LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
| --- ^^^^ ^^^^ ...because method `blah` has generic type parameters
@@ -44,15 +44,15 @@ LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
| this trait cannot be made into an object...

error[E0038]: the trait `bar` cannot be made into an object
--> $DIR/trait-test-2.rs:13:6
--> $DIR/test-2.rs:13:6
|
LL | (box 10 as Box<dyn bar>).dup();
| ^^^^^^ `bar` cannot be made into an object
|
= help: consider moving `dup` to another trait
= help: consider moving `blah` to another trait
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> $DIR/trait-test-2.rs:4:30
--> $DIR/test-2.rs:4:30
|
LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
| --- ^^^^ ^^^^ ...because method `blah` has generic type parameters
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0404]: expected trait, found builtin type `isize`
--> $DIR/trait-test.rs:4:6
--> $DIR/test.rs:4:6
|
LL | impl isize for usize { fn foo(&self) {} }
| ^^^^^ not a trait
File renamed without changes.
14 changes: 0 additions & 14 deletions src/test/ui/traits/trait-bounds-on-structs-and-enums-xc.rs

This file was deleted.

15 changes: 0 additions & 15 deletions src/test/ui/traits/trait-bounds-on-structs-and-enums-xc1.rs

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
error: `?Trait` is not permitted in trait object types
--> $DIR/wf-trait-object-maybe-bound.rs:5:15
--> $DIR/maybe-bound.rs:5:15
|
LL | type _0 = dyn ?Sized + Foo;
| ^^^^^^

error: `?Trait` is not permitted in trait object types
--> $DIR/wf-trait-object-maybe-bound.rs:8:21
--> $DIR/maybe-bound.rs:8:21
|
LL | type _1 = dyn Foo + ?Sized;
| ^^^^^^

error: `?Trait` is not permitted in trait object types
--> $DIR/wf-trait-object-maybe-bound.rs:11:21
--> $DIR/maybe-bound.rs:11:21
|
LL | type _2 = dyn Foo + ?Sized + ?Sized;
| ^^^^^^

error: `?Trait` is not permitted in trait object types
--> $DIR/wf-trait-object-maybe-bound.rs:11:30
--> $DIR/maybe-bound.rs:11:30
|
LL | type _2 = dyn Foo + ?Sized + ?Sized;
| ^^^^^^

error: `?Trait` is not permitted in trait object types
--> $DIR/wf-trait-object-maybe-bound.rs:15:15
--> $DIR/maybe-bound.rs:15:15
|
LL | type _3 = dyn ?Sized + Foo;
| ^^^^^^
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/wf-trait-object-no-duplicates.rs:8:21
--> $DIR/no-duplicates.rs:8:21
|
LL | type _0 = dyn Obj + Obj;
| --- ^^^ additional non-auto trait
@@ -10,7 +10,7 @@ LL | type _0 = dyn Obj + 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/wf-trait-object-no-duplicates.rs:13:28
--> $DIR/no-duplicates.rs:13:28
|
LL | type _1 = dyn Send + Obj + Obj;
| --- ^^^ additional non-auto trait
@@ -21,7 +21,7 @@ LL | type _1 = dyn Send + Obj + 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/wf-trait-object-no-duplicates.rs:16:28
--> $DIR/no-duplicates.rs:16:28
|
LL | type _2 = dyn Obj + Send + Obj;
| --- ^^^ additional non-auto trait
@@ -32,7 +32,7 @@ LL | type _2 = dyn Obj + Send + 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/wf-trait-object-no-duplicates.rs:26:34
--> $DIR/no-duplicates.rs:26:34
|
LL | type _4 = dyn for<'a> ObjL<'a> + for<'b> ObjL<'b>;
| ---------------- ^^^^^^^^^^^^^^^^ additional non-auto trait
@@ -43,7 +43,7 @@ LL | type _4 = dyn for<'a> ObjL<'a> + for<'b> ObjL<'b>;
= 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/wf-trait-object-no-duplicates.rs:30:42
--> $DIR/no-duplicates.rs:30:42
|
LL | type _5 = dyn ObjT<for<'a> fn(&'a u8)> + ObjT<for<'b> fn(&'b u8)>;
| ------------------------ ^^^^^^^^^^^^^^^^^^^^^^^^ additional non-auto trait
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error: `?Trait` is not permitted in trait object types
--> $DIR/wf-trait-object-only-maybe-bound.rs:3:15
--> $DIR/only-maybe-bound.rs:3:15
|
LL | type _0 = dyn ?Sized;
| ^^^^^^

error[E0224]: at least one trait is required for an object type
--> $DIR/wf-trait-object-only-maybe-bound.rs:3:11
--> $DIR/only-maybe-bound.rs:3:11
|
LL | type _0 = dyn ?Sized;
| ^^^^^^^^^^
File renamed without changes.
File renamed without changes.
File renamed without changes.