tests: bless remaining tests
These tests just need blessing, they don't have any interesting behaviour changes. Some of these tests have new errors because `LegacyReceiver` cannot be proven to be implemented now that it is also testing for `MetaSized` - but this is just a consequence of the other errors in the test.
This commit is contained in:
parent
5d17987d71
commit
183458263b
14 changed files with 135 additions and 25 deletions
|
|
@ -30,7 +30,7 @@ trait TraitVisibility { }
|
|||
#[cfg(not(any(cfail1,cfail4)))]
|
||||
#[rustc_clean(cfg="cfail2")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
#[rustc_clean(cfg="cfail5", except="opt_hir_owner_nodes")]
|
||||
#[rustc_clean(cfg="cfail5", except="opt_hir_owner_nodes,predicates_of")]
|
||||
#[rustc_clean(cfg="cfail6")]
|
||||
pub trait TraitVisibility { }
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ trait TraitUnsafety { }
|
|||
#[cfg(not(any(cfail1,cfail4)))]
|
||||
#[rustc_clean(except="opt_hir_owner_nodes", cfg="cfail2")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
#[rustc_clean(except="opt_hir_owner_nodes", cfg="cfail5")]
|
||||
#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="cfail5")]
|
||||
#[rustc_clean(cfg="cfail6")]
|
||||
unsafe trait TraitUnsafety { }
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ trait TraitAddMethod {
|
|||
#[cfg(not(any(cfail1,cfail4)))]
|
||||
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
|
||||
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids,predicates_of", cfg="cfail5")]
|
||||
#[rustc_clean(cfg="cfail6")]
|
||||
pub trait TraitAddMethod {
|
||||
fn method();
|
||||
|
|
@ -74,7 +74,7 @@ trait TraitChangeMethodName {
|
|||
#[cfg(not(any(cfail1,cfail4)))]
|
||||
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
|
||||
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids,predicates_of", cfg="cfail5")]
|
||||
#[rustc_clean(cfg="cfail6")]
|
||||
trait TraitChangeMethodName {
|
||||
fn methodChanged();
|
||||
|
|
@ -559,7 +559,7 @@ trait TraitAddBuiltinBoundToMethodTypeParameter {
|
|||
#[cfg(not(any(cfail1,cfail4)))]
|
||||
#[rustc_clean(cfg="cfail2")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
#[rustc_clean(except="opt_hir_owner_nodes", cfg="cfail5")]
|
||||
#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="cfail5")]
|
||||
#[rustc_clean(cfg="cfail6")]
|
||||
trait TraitAddBuiltinBoundToMethodTypeParameter {
|
||||
#[rustc_clean(except="opt_hir_owner_nodes", cfg="cfail2")]
|
||||
|
|
@ -827,7 +827,7 @@ trait TraitAddAssociatedConstant {
|
|||
#[cfg(not(any(cfail1,cfail4)))]
|
||||
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
|
||||
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids,predicates_of", cfg="cfail5")]
|
||||
#[rustc_clean(cfg="cfail6")]
|
||||
trait TraitAddAssociatedConstant {
|
||||
const Value: u32;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ impl ChangeMethodNameTrait for Foo {
|
|||
#[cfg(not(any(cfail1,cfail4)))]
|
||||
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
|
||||
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids,predicates_of", cfg="cfail5")]
|
||||
#[rustc_clean(cfg="cfail6")]
|
||||
pub trait ChangeMethodNameTrait {
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ error: rustc_dump_predicates
|
|||
LL | trait Trait<T>: Iterator<Item: Copy>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: Binder { value: TraitPredicate(<Self as std::marker::MetaSized>, polarity:Positive), bound_vars: [] }
|
||||
= note: Binder { value: TraitPredicate(<Self as std::iter::Iterator>, polarity:Positive), bound_vars: [] }
|
||||
= note: Binder { value: TraitPredicate(<<Self as std::iter::Iterator>::Item as std::marker::Copy>, polarity:Positive), bound_vars: [] }
|
||||
= note: Binder { value: TraitPredicate(<T as std::marker::Sized>, polarity:Positive), bound_vars: [] }
|
||||
|
|
@ -16,6 +17,7 @@ error: rustc_dump_predicates
|
|||
LL | type Assoc<P: Eq>: std::ops::Deref<Target = ()>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: Binder { value: TraitPredicate(<Self as std::marker::MetaSized>, polarity:Positive), bound_vars: [] }
|
||||
= note: Binder { value: TraitPredicate(<Self as std::iter::Iterator>, polarity:Positive), bound_vars: [] }
|
||||
= note: Binder { value: TraitPredicate(<<Self as std::iter::Iterator>::Item as std::marker::Copy>, polarity:Positive), bound_vars: [] }
|
||||
= note: Binder { value: TraitPredicate(<T as std::marker::Sized>, polarity:Positive), bound_vars: [] }
|
||||
|
|
@ -35,7 +37,6 @@ LL | type Assoc<P: Eq>: std::ops::Deref<Target = ()>
|
|||
= note: Binder { value: TraitPredicate(<<Self as Trait<T>>::Assoc<P> as std::ops::Deref>, polarity:Positive), bound_vars: [] }
|
||||
= note: Binder { value: TraitPredicate(<<Self as Trait<T>>::Assoc<P> as std::marker::Sized>, polarity:Positive), bound_vars: [] }
|
||||
= note: Binder { value: TraitPredicate(<<Self as Trait<T>>::Assoc<P> as std::marker::MetaSized>, polarity:Positive), bound_vars: [] }
|
||||
= note: Binder { value: TraitPredicate(<<Self as Trait<T>>::Assoc<P> as std::marker::PointeeSized>, polarity:Positive), bound_vars: [] }
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -25,3 +25,4 @@ type C<N: Sized> = ();
|
|||
type D<N: ?Sized> = ();
|
||||
//~^ ERROR type parameter `N` is never used
|
||||
//~| HELP consider removing `N`
|
||||
//~| HELP if you intended `N` to be a const parameter
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ LL | type D<N: ?Sized> = ();
|
|||
| ^ unused type parameter
|
||||
|
|
||||
= help: consider removing `N` or referring to it in the body of the type alias
|
||||
= help: if you intended `N` to be a const parameter, use `const N: /* Type */` instead
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
|
|
|
|||
13
tests/ui/extern/unsized-extern-derefmove.rs
vendored
13
tests/ui/extern/unsized-extern-derefmove.rs
vendored
|
|
@ -1,15 +1,20 @@
|
|||
//! Regression test for #79409
|
||||
|
||||
#![feature(extern_types)]
|
||||
|
||||
unsafe extern "C" {
|
||||
// Regression test for #79409
|
||||
|
||||
extern "C" {
|
||||
type Device;
|
||||
}
|
||||
|
||||
unsafe fn make_device() -> Box<Device> {
|
||||
//~^ ERROR the size for values of type `Device` cannot be known
|
||||
Box::from_raw(0 as *mut _)
|
||||
//~^ ERROR the size for values of type `Device` cannot be known
|
||||
//~| ERROR the size for values of type `Device` cannot be known
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let d: Device = unsafe { *make_device() }; //~ERROR the size for values of type `Device` cannot be known at compilation time
|
||||
let d: Device = unsafe { *make_device() };
|
||||
//~^ ERROR the size for values of type `Device` cannot be known
|
||||
//~| ERROR the size for values of type `Device` cannot be known
|
||||
}
|
||||
|
|
|
|||
52
tests/ui/extern/unsized-extern-derefmove.stderr
vendored
52
tests/ui/extern/unsized-extern-derefmove.stderr
vendored
|
|
@ -1,5 +1,43 @@
|
|||
error[E0277]: the size for values of type `Device` cannot be known
|
||||
--> $DIR/unsized-extern-derefmove.rs:9:28
|
||||
|
|
||||
LL | unsafe fn make_device() -> Box<Device> {
|
||||
| ^^^^^^^^^^^ doesn't have a known size
|
||||
|
|
||||
= help: the trait `MetaSized` is not implemented for `Device`
|
||||
note: required by a bound in `Box`
|
||||
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
|
||||
|
||||
error[E0277]: the size for values of type `Device` cannot be known
|
||||
--> $DIR/unsized-extern-derefmove.rs:11:19
|
||||
|
|
||||
LL | Box::from_raw(0 as *mut _)
|
||||
| ------------- ^^^^^^^^^^^ the trait `MetaSized` is not implemented for `Device`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= note: the trait bound `Device: MetaSized` is not satisfied
|
||||
note: required by a bound in `Box::<T>::from_raw`
|
||||
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
|
||||
help: consider borrowing here
|
||||
|
|
||||
LL | Box::from_raw(&0 as *mut _)
|
||||
| +
|
||||
LL | Box::from_raw(&mut 0 as *mut _)
|
||||
| ++++
|
||||
|
||||
error[E0277]: the size for values of type `Device` cannot be known
|
||||
--> $DIR/unsized-extern-derefmove.rs:11:5
|
||||
|
|
||||
LL | Box::from_raw(0 as *mut _)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a known size
|
||||
|
|
||||
= help: the trait `MetaSized` is not implemented for `Device`
|
||||
note: required by a bound in `Box`
|
||||
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
|
||||
|
||||
error[E0277]: the size for values of type `Device` cannot be known at compilation time
|
||||
--> $DIR/unsized-extern-derefmove.rs:14:9
|
||||
--> $DIR/unsized-extern-derefmove.rs:17:9
|
||||
|
|
||||
LL | let d: Device = unsafe { *make_device() };
|
||||
| ^ doesn't have a size known at compile-time
|
||||
|
|
@ -11,6 +49,16 @@ help: consider borrowing here
|
|||
LL | let d: &Device = unsafe { *make_device() };
|
||||
| +
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
error[E0277]: the size for values of type `Device` cannot be known
|
||||
--> $DIR/unsized-extern-derefmove.rs:17:31
|
||||
|
|
||||
LL | let d: Device = unsafe { *make_device() };
|
||||
| ^^^^^^^^^^^^^ doesn't have a known size
|
||||
|
|
||||
= help: the trait `MetaSized` is not implemented for `Device`
|
||||
note: required by a bound in `Box`
|
||||
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
//
|
||||
// Regression test for the issue #50716: NLL ignores lifetimes bounds
|
||||
// derived from `Sized` requirements
|
||||
|
||||
|
|
@ -6,7 +5,7 @@ trait A {
|
|||
type X: ?Sized;
|
||||
}
|
||||
|
||||
fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)
|
||||
fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>) //~ ERROR mismatched types
|
||||
where
|
||||
for<'b> &'b T: A,
|
||||
<&'static T as A>::X: Sized
|
||||
|
|
|
|||
|
|
@ -1,5 +1,20 @@
|
|||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-50716.rs:8:27
|
||||
|
|
||||
LL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)
|
||||
| ^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
||||
|
|
||||
= note: expected trait `<<&'a T as A>::X as MetaSized>`
|
||||
found trait `<<&'static T as A>::X as MetaSized>`
|
||||
note: the lifetime `'a` as defined here...
|
||||
--> $DIR/issue-50716.rs:8:8
|
||||
|
|
||||
LL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)
|
||||
| ^^
|
||||
= note: ...does not necessarily outlive the static lifetime
|
||||
|
||||
error: lifetime may not live long enough
|
||||
--> $DIR/issue-50716.rs:14:14
|
||||
--> $DIR/issue-50716.rs:13:14
|
||||
|
|
||||
LL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)
|
||||
| -- lifetime `'a` defined here
|
||||
|
|
@ -7,5 +22,6 @@ LL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)
|
|||
LL | let _x = *s;
|
||||
| ^^ proving this value is `Sized` requires that `'a` must outlive `'static`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#![feature(rustc_attrs)]
|
||||
#![feature(rustc_attrs, sized_hierarchy)]
|
||||
use std::marker::PointeeSized;
|
||||
|
||||
// Test for a particular corner case where the evaluation
|
||||
// cache can get out of date. The problem here is that
|
||||
|
|
@ -37,7 +38,7 @@ struct C {
|
|||
}
|
||||
|
||||
#[rustc_evaluate_where_clauses]
|
||||
fn test<X: ?Sized + Send>() {}
|
||||
fn test<X: PointeeSized + Send>() {}
|
||||
|
||||
fn main() {
|
||||
test::<A>();
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
error: evaluate(Binder { value: TraitPredicate(<A as std::marker::Send>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk)
|
||||
--> $DIR/cache-reached-depth-ice.rs:43:5
|
||||
--> $DIR/cache-reached-depth-ice.rs:44:5
|
||||
|
|
||||
LL | fn test<X: ?Sized + Send>() {}
|
||||
| ---- predicate
|
||||
LL | fn test<X: PointeeSized + Send>() {}
|
||||
| ---- predicate
|
||||
...
|
||||
LL | test::<A>();
|
||||
| ^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -12,6 +12,13 @@ LL | impl<T: Bound, U> Trait<U> for T {
|
|||
| ----- ^^^^^^^^ ^
|
||||
| |
|
||||
| unsatisfied trait bound introduced here
|
||||
note: required by a bound in `Bound`
|
||||
--> $DIR/normalizes-to-is-not-productive.rs:8:1
|
||||
|
|
||||
LL | / trait Bound {
|
||||
LL | | fn method();
|
||||
LL | | }
|
||||
| |_^ required by this bound in `Bound`
|
||||
|
||||
error[E0277]: the trait bound `Foo: Bound` is not satisfied
|
||||
--> $DIR/normalizes-to-is-not-productive.rs:47:19
|
||||
|
|
|
|||
|
|
@ -19,6 +19,23 @@ error[E0275]: overflow evaluating the requirement `<() as A<T>>::Assoc: A<T>`
|
|||
LL | Self::Assoc: A<T>,
|
||||
| ^^^^
|
||||
|
||||
error[E0275]: overflow evaluating the requirement `<() as A<T>>::Assoc: MetaSized`
|
||||
--> $DIR/normalize-param-env-2.rs:24:22
|
||||
|
|
||||
LL | Self::Assoc: A<T>,
|
||||
| ^^^^
|
||||
|
|
||||
note: required by a bound in `A`
|
||||
--> $DIR/normalize-param-env-2.rs:9:1
|
||||
|
|
||||
LL | / trait A<T> {
|
||||
LL | | type Assoc;
|
||||
LL | |
|
||||
LL | | fn f()
|
||||
... |
|
||||
LL | | }
|
||||
| |_^ required by this bound in `A`
|
||||
|
||||
error[E0275]: overflow evaluating the requirement `<() as A<T>>::Assoc well-formed`
|
||||
--> $DIR/normalize-param-env-2.rs:24:22
|
||||
|
|
||||
|
|
@ -46,6 +63,6 @@ LL | where
|
|||
LL | Self::Assoc: A<T>,
|
||||
| ^^^^ required by this bound in `A::f`
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0275`.
|
||||
|
|
|
|||
|
|
@ -4,6 +4,20 @@ error[E0275]: overflow evaluating the requirement `<T as Trait>::Assoc: Trait`
|
|||
LL | <T as Trait>::Assoc: Trait,
|
||||
| ^^^^^
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
error[E0275]: overflow evaluating the requirement `<T as Trait>::Assoc: MetaSized`
|
||||
--> $DIR/normalize-param-env-4.rs:19:26
|
||||
|
|
||||
LL | <T as Trait>::Assoc: Trait,
|
||||
| ^^^^^
|
||||
|
|
||||
note: required by a bound in `Trait`
|
||||
--> $DIR/normalize-param-env-4.rs:7:1
|
||||
|
|
||||
LL | / trait Trait {
|
||||
LL | | type Assoc;
|
||||
LL | | }
|
||||
| |_^ required by this bound in `Trait`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0275`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue