Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 74ccb5f

Browse files
committed
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.
1 parent f9e8223 commit 74ccb5f

File tree

12 files changed

+76
-19
lines changed

12 files changed

+76
-19
lines changed

tests/incremental/hashes/trait_defs.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ trait TraitVisibility { }
3030
#[cfg(not(any(cfail1,cfail4)))]
3131
#[rustc_clean(cfg="cfail2")]
3232
#[rustc_clean(cfg="cfail3")]
33-
#[rustc_clean(cfg="cfail5", except="opt_hir_owner_nodes")]
33+
#[rustc_clean(cfg="cfail5", except="opt_hir_owner_nodes,predicates_of")]
3434
#[rustc_clean(cfg="cfail6")]
3535
pub trait TraitVisibility { }
3636

@@ -43,7 +43,7 @@ trait TraitUnsafety { }
4343
#[cfg(not(any(cfail1,cfail4)))]
4444
#[rustc_clean(except="opt_hir_owner_nodes", cfg="cfail2")]
4545
#[rustc_clean(cfg="cfail3")]
46-
#[rustc_clean(except="opt_hir_owner_nodes", cfg="cfail5")]
46+
#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="cfail5")]
4747
#[rustc_clean(cfg="cfail6")]
4848
unsafe trait TraitUnsafety { }
4949

@@ -57,7 +57,7 @@ trait TraitAddMethod {
5757
#[cfg(not(any(cfail1,cfail4)))]
5858
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
5959
#[rustc_clean(cfg="cfail3")]
60-
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
60+
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids,predicates_of", cfg="cfail5")]
6161
#[rustc_clean(cfg="cfail6")]
6262
pub trait TraitAddMethod {
6363
fn method();
@@ -74,7 +74,7 @@ trait TraitChangeMethodName {
7474
#[cfg(not(any(cfail1,cfail4)))]
7575
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
7676
#[rustc_clean(cfg="cfail3")]
77-
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
77+
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids,predicates_of", cfg="cfail5")]
7878
#[rustc_clean(cfg="cfail6")]
7979
trait TraitChangeMethodName {
8080
fn methodChanged();
@@ -559,7 +559,7 @@ trait TraitAddBuiltinBoundToMethodTypeParameter {
559559
#[cfg(not(any(cfail1,cfail4)))]
560560
#[rustc_clean(cfg="cfail2")]
561561
#[rustc_clean(cfg="cfail3")]
562-
#[rustc_clean(except="opt_hir_owner_nodes", cfg="cfail5")]
562+
#[rustc_clean(except="opt_hir_owner_nodes,predicates_of", cfg="cfail5")]
563563
#[rustc_clean(cfg="cfail6")]
564564
trait TraitAddBuiltinBoundToMethodTypeParameter {
565565
#[rustc_clean(except="opt_hir_owner_nodes", cfg="cfail2")]
@@ -827,7 +827,7 @@ trait TraitAddAssociatedConstant {
827827
#[cfg(not(any(cfail1,cfail4)))]
828828
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
829829
#[rustc_clean(cfg="cfail3")]
830-
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
830+
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids,predicates_of", cfg="cfail5")]
831831
#[rustc_clean(cfg="cfail6")]
832832
trait TraitAddAssociatedConstant {
833833
const Value: u32;

tests/incremental/hashes/trait_impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl ChangeMethodNameTrait for Foo {
3434
#[cfg(not(any(cfail1,cfail4)))]
3535
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="cfail2")]
3636
#[rustc_clean(cfg="cfail3")]
37-
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids", cfg="cfail5")]
37+
#[rustc_clean(except="opt_hir_owner_nodes,associated_item_def_ids,predicates_of", cfg="cfail5")]
3838
#[rustc_clean(cfg="cfail6")]
3939
pub trait ChangeMethodNameTrait {
4040
#[rustc_clean(cfg="cfail3")]

tests/ui/attributes/dump-preds.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ error: rustc_dump_predicates
44
LL | trait Trait<T>: Iterator<Item: Copy>
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7+
= note: Binder { value: TraitPredicate(<Self as std::marker::MetaSized>, polarity:Positive), bound_vars: [] }
78
= note: Binder { value: TraitPredicate(<Self as std::iter::Iterator>, polarity:Positive), bound_vars: [] }
89
= note: Binder { value: TraitPredicate(<<Self as std::iter::Iterator>::Item as std::marker::Copy>, polarity:Positive), bound_vars: [] }
910
= note: Binder { value: TraitPredicate(<T as std::marker::Sized>, polarity:Positive), bound_vars: [] }
@@ -16,6 +17,7 @@ error: rustc_dump_predicates
1617
LL | type Assoc<P: Eq>: std::ops::Deref<Target = ()>
1718
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1819
|
20+
= note: Binder { value: TraitPredicate(<Self as std::marker::MetaSized>, polarity:Positive), bound_vars: [] }
1921
= note: Binder { value: TraitPredicate(<Self as std::iter::Iterator>, polarity:Positive), bound_vars: [] }
2022
= note: Binder { value: TraitPredicate(<<Self as std::iter::Iterator>::Item as std::marker::Copy>, polarity:Positive), bound_vars: [] }
2123
= 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 = ()>
3537
= note: Binder { value: TraitPredicate(<<Self as Trait<T>>::Assoc<P> as std::ops::Deref>, polarity:Positive), bound_vars: [] }
3638
= note: Binder { value: TraitPredicate(<<Self as Trait<T>>::Assoc<P> as std::marker::Sized>, polarity:Positive), bound_vars: [] }
3739
= note: Binder { value: TraitPredicate(<<Self as Trait<T>>::Assoc<P> as std::marker::MetaSized>, polarity:Positive), bound_vars: [] }
38-
= note: Binder { value: TraitPredicate(<<Self as Trait<T>>::Assoc<P> as std::marker::PointeeSized>, polarity:Positive), bound_vars: [] }
3940

4041
error: aborting due to 3 previous errors
4142

tests/ui/const-generics/unused-type-param-suggestion.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ type C<N: Sized> = ();
2525
type D<N: ?Sized> = ();
2626
//~^ ERROR type parameter `N` is never used
2727
//~| HELP consider removing `N`
28+
//~| HELP if you intended `N` to be a const parameter

tests/ui/const-generics/unused-type-param-suggestion.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ LL | type D<N: ?Sized> = ();
4747
| ^ unused type parameter
4848
|
4949
= help: consider removing `N` or referring to it in the body of the type alias
50+
= help: if you intended `N` to be a const parameter, use `const N: /* Type */` instead
5051

5152
error: aborting due to 6 previous errors
5253

tests/ui/nll/issue-50716.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
//
21
// Regression test for the issue #50716: NLL ignores lifetimes bounds
32
// derived from `Sized` requirements
43

54
trait A {
65
type X: ?Sized;
76
}
87

9-
fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)
8+
fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>) //~ ERROR mismatched types
109
where
1110
for<'b> &'b T: A,
1211
<&'static T as A>::X: Sized

tests/ui/nll/issue-50716.stderr

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
1+
error[E0308]: mismatched types
2+
--> $DIR/issue-50716.rs:8:27
3+
|
4+
LL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)
5+
| ^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
6+
|
7+
= note: expected trait `<<&'a T as A>::X as MetaSized>`
8+
found trait `<<&'static T as A>::X as MetaSized>`
9+
note: the lifetime `'a` as defined here...
10+
--> $DIR/issue-50716.rs:8:8
11+
|
12+
LL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)
13+
| ^^
14+
= note: ...does not necessarily outlive the static lifetime
15+
116
error: lifetime may not live long enough
2-
--> $DIR/issue-50716.rs:14:14
17+
--> $DIR/issue-50716.rs:13:14
318
|
419
LL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)
520
| -- lifetime `'a` defined here
621
...
722
LL | let _x = *s;
823
| ^^ proving this value is `Sized` requires that `'a` must outlive `'static`
924

10-
error: aborting due to 1 previous error
25+
error: aborting due to 2 previous errors
1126

27+
For more information about this error, try `rustc --explain E0308`.

tests/ui/traits/cache-reached-depth-ice.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#![feature(rustc_attrs)]
1+
#![feature(rustc_attrs, sized_hierarchy)]
2+
use std::marker::PointeeSized;
23

34
// Test for a particular corner case where the evaluation
45
// cache can get out of date. The problem here is that
@@ -37,7 +38,7 @@ struct C {
3738
}
3839

3940
#[rustc_evaluate_where_clauses]
40-
fn test<X: ?Sized + Send>() {}
41+
fn test<X: PointeeSized + Send>() {}
4142

4243
fn main() {
4344
test::<A>();

tests/ui/traits/cache-reached-depth-ice.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error: evaluate(Binder { value: TraitPredicate(<A as std::marker::Send>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk)
2-
--> $DIR/cache-reached-depth-ice.rs:43:5
2+
--> $DIR/cache-reached-depth-ice.rs:44:5
33
|
4-
LL | fn test<X: ?Sized + Send>() {}
5-
| ---- predicate
4+
LL | fn test<X: PointeeSized + Send>() {}
5+
| ---- predicate
66
...
77
LL | test::<A>();
88
| ^^^^^^^^^

tests/ui/traits/next-solver/cycles/normalizes-to-is-not-productive.stderr

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ LL | impl<T: Bound, U> Trait<U> for T {
1212
| ----- ^^^^^^^^ ^
1313
| |
1414
| unsatisfied trait bound introduced here
15+
note: required by a bound in `Bound`
16+
--> $DIR/normalizes-to-is-not-productive.rs:8:1
17+
|
18+
LL | / trait Bound {
19+
LL | | fn method();
20+
LL | | }
21+
| |_^ required by this bound in `Bound`
1522

1623
error[E0277]: the trait bound `Foo: Bound` is not satisfied
1724
--> $DIR/normalizes-to-is-not-productive.rs:47:19

0 commit comments

Comments
 (0)