Skip to content

Commit 060bdfd

Browse files
authoredOct 24, 2023
Rollup merge of #117127 - compiler-errors:incomplete, r=lqd
Remove `#[allow(incomplete_features)]` from RPITIT/AFIT tests They've been unnecessary for a while.
2 parents f131a0a + 90e3aae commit 060bdfd

39 files changed

+29
-74
lines changed
 

‎tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// edition: 2021
22

3-
#![allow(incomplete_features)]
4-
53
use std::future::Future;
64
use std::pin::Pin;
75

‎tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0053]: method `foo` has an incompatible type for trait
2-
--> $DIR/async-example-desugared-boxed-in-trait.rs:13:5
2+
--> $DIR/async-example-desugared-boxed-in-trait.rs:11:5
33
|
44
LL | async fn foo(&self) -> i32 {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Pin<Box<dyn Future<Output = i32>>>`, found future
66
|
77
note: type in trait
8-
--> $DIR/async-example-desugared-boxed-in-trait.rs:9:22
8+
--> $DIR/async-example-desugared-boxed-in-trait.rs:7:22
99
|
1010
LL | fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>>;
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

‎tests/ui/async-await/in-trait/async-example-desugared-boxed.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// edition: 2021
22

3-
#![allow(incomplete_features)]
4-
53
use std::future::Future;
64
use std::pin::Pin;
75

‎tests/ui/async-await/in-trait/async-example-desugared-boxed.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: method `foo` should be async because the method from the trait is async
2-
--> $DIR/async-example-desugared-boxed.rs:13:5
2+
--> $DIR/async-example-desugared-boxed.rs:11:5
33
|
44
LL | async fn foo(&self) -> i32;
55
| --------------------------- required because the trait method is async

‎tests/ui/async-await/in-trait/async-example-desugared-extra.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// edition: 2021
33

44
#![feature(lint_reasons)]
5-
#![allow(incomplete_features)]
65

76
use std::future::Future;
87
use std::pin::Pin;

‎tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// check-pass
22
// edition: 2021
33

4-
#![allow(incomplete_features)]
5-
64
use std::future::Future;
75

86
trait MyTrait {

‎tests/ui/async-await/in-trait/async-example-desugared-manual.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// edition: 2021
22

3-
#![allow(incomplete_features)]
4-
53
use std::future::Future;
64
use std::task::Poll;
75

‎tests/ui/async-await/in-trait/async-example-desugared-manual.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: method `foo` should be async because the method from the trait is async
2-
--> $DIR/async-example-desugared-manual.rs:21:5
2+
--> $DIR/async-example-desugared-manual.rs:19:5
33
|
44
LL | async fn foo(&self) -> i32;
55
| --------------------------- required because the trait method is async

‎tests/ui/async-await/in-trait/async-example-desugared.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// check-pass
22
// edition: 2021
33

4-
#![allow(incomplete_features)]
5-
64
use std::future::Future;
75

86
trait MyTrait {

‎tests/ui/async-await/in-trait/async-example.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// check-pass
22
// edition: 2021
33

4-
#![allow(incomplete_features)]
5-
64
trait MyTrait {
75
#[allow(async_fn_in_trait)]
86
async fn foo(&self) -> i32;

‎tests/ui/async-await/in-trait/async-generics-and-bounds.rs

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// known-bug: #102682
33
// edition: 2021
44

5-
#![allow(incomplete_features)]
6-
75
use std::fmt::Debug;
86
use std::hash::Hash;
97

‎tests/ui/async-await/in-trait/async-generics-and-bounds.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0311]: the parameter type `U` may not live long enough
2-
--> $DIR/async-generics-and-bounds.rs:11:5
2+
--> $DIR/async-generics-and-bounds.rs:9:5
33
|
44
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
55
| ^^^^^^^^^^^^^-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL | async fn foo<'a>(&'a self) -> &'a (T, U) where T: Debug + Sized, U: Has
1313
| ++++ ++ ++ +++++++
1414

1515
error[E0311]: the parameter type `T` may not live long enough
16-
--> $DIR/async-generics-and-bounds.rs:11:5
16+
--> $DIR/async-generics-and-bounds.rs:9:5
1717
|
1818
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
1919
| ^^^^^^^^^^^^^-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

‎tests/ui/async-await/in-trait/async-generics.rs

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// known-bug: #102682
33
// edition: 2021
44

5-
#![allow(incomplete_features)]
6-
75
trait MyTrait<T, U> {
86
async fn foo(&self) -> &(T, U);
97
}

‎tests/ui/async-await/in-trait/async-generics.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0311]: the parameter type `U` may not live long enough
2-
--> $DIR/async-generics.rs:8:5
2+
--> $DIR/async-generics.rs:6:5
33
|
44
LL | async fn foo(&self) -> &(T, U);
55
| ^^^^^^^^^^^^^-^^^^^^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL | async fn foo<'a>(&'a self) -> &'a (T, U) where U: 'a;
1313
| ++++ ++ ++ +++++++++++
1414

1515
error[E0311]: the parameter type `T` may not live long enough
16-
--> $DIR/async-generics.rs:8:5
16+
--> $DIR/async-generics.rs:6:5
1717
|
1818
LL | async fn foo(&self) -> &(T, U);
1919
| ^^^^^^^^^^^^^-^^^^^^^^^^^^^^^^^

‎tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// check-pass
22
// edition: 2021
33

4-
#![allow(incomplete_features)]
5-
64
use std::fmt::Debug;
75

86
trait MyTrait<'a, 'b, T> {

‎tests/ui/async-await/in-trait/async-lifetimes.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// check-pass
22
// edition: 2021
33

4-
#![allow(incomplete_features)]
5-
64
trait MyTrait<'a, 'b, T> {
75
#[allow(async_fn_in_trait)]
86
async fn foo(&'a self, key: &'b T) -> (&'a Self, &'b T);

‎tests/ui/async-await/in-trait/async-recursive-generic.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// edition: 2021
22

3-
#![allow(incomplete_features)]
4-
53
trait MyTrait<T> {
64
async fn foo_recursive(&self, n: usize) -> T;
75
}

‎tests/ui/async-await/in-trait/async-recursive-generic.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0733]: recursion in an `async fn` requires boxing
2-
--> $DIR/async-recursive-generic.rs:10:5
2+
--> $DIR/async-recursive-generic.rs:8:5
33
|
44
LL | async fn foo_recursive(&self, n: usize) -> T {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive `async fn`

‎tests/ui/async-await/in-trait/async-recursive.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// edition: 2021
22

3-
#![allow(incomplete_features)]
4-
53
trait MyTrait {
64
async fn foo_recursive(&self, n: usize) -> i32;
75
}

‎tests/ui/async-await/in-trait/async-recursive.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0733]: recursion in an `async fn` requires boxing
2-
--> $DIR/async-recursive.rs:10:5
2+
--> $DIR/async-recursive.rs:8:5
33
|
44
LL | async fn foo_recursive(&self, n: usize) -> i32 {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive `async fn`

‎tests/ui/async-await/in-trait/early-bound-1.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// check-pass
22
// edition:2021
33

4-
#![allow(incomplete_features)]
5-
64
pub trait Foo {
75
#[allow(async_fn_in_trait)]
86
async fn foo(&mut self);

‎tests/ui/impl-trait/in-trait/deep-match.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(incomplete_features)]
2-
31
struct Wrapper<T>(T);
42

53
trait Foo {

‎tests/ui/impl-trait/in-trait/deep-match.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0053]: method `bar` has an incompatible return type for trait
2-
--> $DIR/deep-match.rs:10:17
2+
--> $DIR/deep-match.rs:8:17
33
|
44
LL | fn bar() -> i32 {
55
| ^^^

‎tests/ui/impl-trait/in-trait/default-body-type-err.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(incomplete_features)]
2-
31
use std::ops::Deref;
42

53
pub trait Foo {

‎tests/ui/impl-trait/in-trait/default-body-type-err.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0271]: type mismatch resolving `<&i32 as Deref>::Target == String`
2-
--> $DIR/default-body-type-err.rs:6:22
2+
--> $DIR/default-body-type-err.rs:4:22
33
|
44
LL | fn lol(&self) -> impl Deref<Target = String> {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `String`

‎tests/ui/impl-trait/in-trait/doesnt-satisfy.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(incomplete_features)]
2-
31
trait Foo {
42
fn bar() -> impl std::fmt::Display;
53
}

‎tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0277]: `()` doesn't implement `std::fmt::Display`
2-
--> $DIR/doesnt-satisfy.rs:8:17
2+
--> $DIR/doesnt-satisfy.rs:6:17
33
|
44
LL | fn bar() -> () {}
55
| ^^ `()` cannot be formatted with the default formatter
66
|
77
= help: the trait `std::fmt::Display` is not implemented for `()`
88
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
99
note: required by a bound in `Foo::{opaque#0}`
10-
--> $DIR/doesnt-satisfy.rs:4:22
10+
--> $DIR/doesnt-satisfy.rs:2:22
1111
|
1212
LL | fn bar() -> impl std::fmt::Display;
1313
| ^^^^^^^^^^^^^^^^^ required by this bound in `Foo::{opaque#0}`

‎tests/ui/impl-trait/in-trait/generics-mismatch.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(incomplete_features)]
2-
31
struct U;
42

53
trait Foo {

‎tests/ui/impl-trait/in-trait/generics-mismatch.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0049]: method `bar` has 1 type parameter but its trait declaration has 0 type parameters
2-
--> $DIR/generics-mismatch.rs:10:12
2+
--> $DIR/generics-mismatch.rs:8:12
33
|
44
LL | fn bar(&self) -> impl Sized;
55
| - expected 0 type parameters

‎tests/ui/impl-trait/in-trait/issue-102140.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(incomplete_features)]
2-
31
trait Marker {}
42
impl Marker for u32 {}
53

‎tests/ui/impl-trait/in-trait/issue-102140.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
2-
--> $DIR/issue-102140.rs:22:22
2+
--> $DIR/issue-102140.rs:20:22
33
|
44
LL | MyTrait::foo(&self)
55
| ------------ ^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
@@ -13,15 +13,15 @@ LL + MyTrait::foo(self)
1313
|
1414

1515
error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
16-
--> $DIR/issue-102140.rs:22:9
16+
--> $DIR/issue-102140.rs:20:9
1717
|
1818
LL | MyTrait::foo(&self)
1919
| ^^^^^^^^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
2020
|
2121
= help: the trait `MyTrait` is implemented for `Outer`
2222

2323
error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
24-
--> $DIR/issue-102140.rs:22:9
24+
--> $DIR/issue-102140.rs:20:9
2525
|
2626
LL | MyTrait::foo(&self)
2727
| ^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`

‎tests/ui/impl-trait/in-trait/issue-102571.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(incomplete_features)]
2-
31
use std::fmt::Display;
42
use std::ops::Deref;
53

‎tests/ui/impl-trait/in-trait/issue-102571.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> $DIR/issue-102571.rs:11:9
2+
--> $DIR/issue-102571.rs:9:9
33
|
44
LL | let () = t.bar();
55
| ^^ ------- this expression has type `impl Deref<Target = impl std::fmt::Display + ?Sized>`

‎tests/ui/impl-trait/in-trait/object-safety.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(incomplete_features)]
2-
31
use std::fmt::Debug;
42

53
trait Foo {

‎tests/ui/impl-trait/in-trait/object-safety.stderr

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0038]: the trait `Foo` cannot be made into an object
2-
--> $DIR/object-safety.rs:16:33
2+
--> $DIR/object-safety.rs:14:33
33
|
44
LL | let i = Box::new(42_u32) as Box<dyn Foo>;
55
| ^^^^^^^^^^^^ `Foo` cannot be made into an object
66
|
77
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>
8-
--> $DIR/object-safety.rs:6:22
8+
--> $DIR/object-safety.rs:4:22
99
|
1010
LL | trait Foo {
1111
| --- this trait cannot be made into an object...
@@ -14,13 +14,13 @@ LL | fn baz(&self) -> impl Debug;
1414
= help: consider moving `baz` to another trait
1515

1616
error[E0038]: the trait `Foo` cannot be made into an object
17-
--> $DIR/object-safety.rs:19:15
17+
--> $DIR/object-safety.rs:17:15
1818
|
1919
LL | let s = i.baz();
2020
| ^^^ `Foo` cannot be made into an object
2121
|
2222
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>
23-
--> $DIR/object-safety.rs:6:22
23+
--> $DIR/object-safety.rs:4:22
2424
|
2525
LL | trait Foo {
2626
| --- this trait cannot be made into an object...
@@ -29,13 +29,13 @@ LL | fn baz(&self) -> impl Debug;
2929
= help: consider moving `baz` to another trait
3030

3131
error[E0038]: the trait `Foo` cannot be made into an object
32-
--> $DIR/object-safety.rs:19:13
32+
--> $DIR/object-safety.rs:17:13
3333
|
3434
LL | let s = i.baz();
3535
| ^^^^^^^ `Foo` cannot be made into an object
3636
|
3737
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>
38-
--> $DIR/object-safety.rs:6:22
38+
--> $DIR/object-safety.rs:4:22
3939
|
4040
LL | trait Foo {
4141
| --- this trait cannot be made into an object...
@@ -44,13 +44,13 @@ LL | fn baz(&self) -> impl Debug;
4444
= help: consider moving `baz` to another trait
4545

4646
error[E0038]: the trait `Foo` cannot be made into an object
47-
--> $DIR/object-safety.rs:16:13
47+
--> $DIR/object-safety.rs:14:13
4848
|
4949
LL | let i = Box::new(42_u32) as Box<dyn Foo>;
5050
| ^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object
5151
|
5252
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>
53-
--> $DIR/object-safety.rs:6:22
53+
--> $DIR/object-safety.rs:4:22
5454
|
5555
LL | trait Foo {
5656
| --- this trait cannot be made into an object...

‎tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(incomplete_features)]
2-
31
use std::fmt::Display;
42

53
trait Foo {

‎tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> $DIR/opaque-in-impl-is-opaque.rs:16:19
2+
--> $DIR/opaque-in-impl-is-opaque.rs:14:19
33
|
44
LL | fn bar(&self) -> impl Display {
55
| ------------ the found opaque type

‎tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(incomplete_features)]
2-
31
struct S;
42

53
trait Foo {

‎tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0049]: method `bar` has 0 type parameters but its trait declaration has 1 type parameter
2-
--> $DIR/trait-more-generics-than-impl.rs:10:11
2+
--> $DIR/trait-more-generics-than-impl.rs:8:11
33
|
44
LL | fn bar<T>() -> impl Sized;
55
| - expected 1 type parameter

0 commit comments

Comments
 (0)
Please sign in to comment.