adding in these files that didn't get added in previous commit
This commit is contained in:
parent
54acbd96f9
commit
f4cd3c2054
5 changed files with 7 additions and 7 deletions
|
@ -11,12 +11,12 @@ trait _1 = _0;
|
||||||
|
|
||||||
// Straight list expansion:
|
// Straight list expansion:
|
||||||
type _T0 = dyn _1;
|
type _T0 = dyn _1;
|
||||||
//~^ ERROR at least one non-builtin trait is required for an object type [E0224]
|
//~^ ERROR at least one trait is required for an object type [E0224]
|
||||||
|
|
||||||
// Twice:
|
// Twice:
|
||||||
trait _2 = _1 + _1;
|
trait _2 = _1 + _1;
|
||||||
|
|
||||||
type _T1 = dyn _2;
|
type _T1 = dyn _2;
|
||||||
//~^ ERROR at least one non-builtin trait is required for an object type [E0224]
|
//~^ ERROR at least one trait is required for an object type [E0224]
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
|
@ -8,5 +8,5 @@ fn main() {
|
||||||
m!(dyn Copy + Send + 'static);
|
m!(dyn Copy + Send + 'static);
|
||||||
//~^ ERROR the trait `std::marker::Copy` cannot be made into an object
|
//~^ ERROR the trait `std::marker::Copy` cannot be made into an object
|
||||||
m!(dyn 'static + Send);
|
m!(dyn 'static + Send);
|
||||||
m!(dyn 'static +); //~ ERROR at least one non-builtin trait is required for an object type
|
m!(dyn 'static +); //~ ERROR at least one trait is required for an object type
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
fn g() where
|
fn g() where
|
||||||
'static: 'static,
|
'static: 'static,
|
||||||
dyn 'static +: 'static + Copy,
|
dyn 'static +: 'static + Copy,
|
||||||
//~^ ERROR at least one non-builtin trait is required for an object type
|
//~^ ERROR at least one trait is required for an object type
|
||||||
{}
|
{}
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
|
@ -7,11 +7,11 @@ fn main() {
|
||||||
// `'static` is a lifetime argument, `'static +` is a type argument
|
// `'static` is a lifetime argument, `'static +` is a type argument
|
||||||
let _: S<'static, u8>;
|
let _: S<'static, u8>;
|
||||||
let _: S<'static, dyn 'static +>;
|
let _: S<'static, dyn 'static +>;
|
||||||
//~^ at least one non-builtin trait is required for an object type
|
//~^ at least one trait is required for an object type
|
||||||
let _: S<'static, 'static>;
|
let _: S<'static, 'static>;
|
||||||
//~^ ERROR wrong number of lifetime arguments: expected 1, found 2
|
//~^ ERROR wrong number of lifetime arguments: expected 1, found 2
|
||||||
//~| ERROR wrong number of type arguments: expected 1, found 0
|
//~| ERROR wrong number of type arguments: expected 1, found 0
|
||||||
let _: S<dyn 'static +, 'static>;
|
let _: S<dyn 'static +, 'static>;
|
||||||
//~^ ERROR lifetime arguments must be declared prior to type arguments
|
//~^ ERROR lifetime arguments must be declared prior to type arguments
|
||||||
//~| ERROR at least one non-builtin trait is required for an object type
|
//~| ERROR at least one trait is required for an object type
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Test that `dyn ?Sized` (i.e., a trait object with only a maybe buond) is not allowed.
|
// Test that `dyn ?Sized` (i.e., a trait object with only a maybe buond) is not allowed.
|
||||||
|
|
||||||
type _0 = dyn ?Sized;
|
type _0 = dyn ?Sized;
|
||||||
//~^ ERROR at least one non-builtin trait is required for an object type [E0224]
|
//~^ ERROR at least one trait is required for an object type [E0224]
|
||||||
//~| ERROR ?Trait` is not permitted in trait object types
|
//~| ERROR ?Trait` is not permitted in trait object types
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue