Skip to content

Commit 39e0076

Browse files
authored
Rollup merge of #122343 - compiler-errors:rando, r=fmease
Remove some unnecessary `allow(incomplete_features)` in the test suite A useless change, but I like things to be clean.
2 parents 7b29381 + f614eae commit 39e0076

File tree

62 files changed

+261
-323
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+261
-323
lines changed

tests/ui/async-await/in-trait/early-bound-2.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/async-await/in-trait/fn-not-async-err.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(&self) -> i32;
75
}

tests/ui/async-await/in-trait/fn-not-async-err.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: method should be `async` or return a future, but it is synchronous
2-
--> $DIR/fn-not-async-err.rs:10:5
2+
--> $DIR/fn-not-async-err.rs:8:5
33
|
44
LL | fn foo(&self) -> i32 {
55
| ^^^^^^^^^^^^^^^^^^^^
66
|
77
note: this method is `async` so it expects a future to be returned
8-
--> $DIR/fn-not-async-err.rs:6:5
8+
--> $DIR/fn-not-async-err.rs:4:5
99
|
1010
LL | async fn foo(&self) -> i32;
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui/async-await/in-trait/fn-not-async-err2.rs

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

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

86
trait MyTrait {

tests/ui/async-await/in-trait/generics-mismatch.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 Foo {
64
async fn foo<T>();
75
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0053]: method `foo` has an incompatible generic parameter for trait `Foo`
2-
--> $DIR/generics-mismatch.rs:10:18
2+
--> $DIR/generics-mismatch.rs:8:18
33
|
44
LL | trait Foo {
55
| ---

tests/ui/async-await/in-trait/implied-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
trait TcpStack {
75
type Connection<'a>: Sized where Self: 'a;
86
fn connect<'a>(&'a self) -> Self::Connection<'a>;

tests/ui/async-await/in-trait/issue-102138.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
async fn yield_now() {}

tests/ui/async-await/in-trait/issue-102219.rs

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

5-
#![allow(incomplete_features)]
6-
75
trait T {
86
#[allow(async_fn_in_trait)]
97
async fn foo();

tests/ui/async-await/in-trait/issue-102310.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 SpiDevice {
75
#[allow(async_fn_in_trait)]
86
async fn transaction<F, R>(&mut self);

tests/ui/async-await/in-trait/issue-104678.rs

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

4-
#![allow(incomplete_features)]
5-
64
use std::future::Future;
75
pub trait Pool {
86
type Conn;

tests/ui/async-await/in-trait/nested-rpit.rs

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

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

tests/ui/const-generics/auxiliary/generics_of_parent.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(generic_const_exprs)]
2-
#![allow(incomplete_features)]
32

43
// library portion of regression test for #87674
54
pub struct Foo<const N: usize>([(); N + 1])

tests/ui/const-generics/auxiliary/generics_of_parent_impl_trait.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(generic_const_exprs)]
2-
#![allow(incomplete_features)]
32

43
// library portion of testing that `impl Trait<{ expr }>` doesnt
54
// ice because of a `DefKind::TyParam` parent

tests/ui/const-generics/generic_const_exprs/auxiliary/anon_const_non_local.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(generic_const_exprs)]
2-
#![allow(incomplete_features)]
32

43
pub struct Foo<const N: usize>;
54

tests/ui/const-generics/generic_const_exprs/auxiliary/const_evaluatable_lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(generic_const_exprs)]
2-
#![allow(incomplete_features)]
32

43
pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
54
where

tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | let _ = const_evaluatable_lib::test1::<T>();
66
|
77
= help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<T>() - 1]:`
88
note: required by a bound in `test1`
9-
--> $DIR/auxiliary/const_evaluatable_lib.rs:6:10
9+
--> $DIR/auxiliary/const_evaluatable_lib.rs:5:10
1010
|
1111
LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
1212
| ----- required by a bound in this function
@@ -22,7 +22,7 @@ LL | let _ = const_evaluatable_lib::test1::<T>();
2222
|
2323
= help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<T>() - 1]:`
2424
note: required by a bound in `test1`
25-
--> $DIR/auxiliary/const_evaluatable_lib.rs:4:27
25+
--> $DIR/auxiliary/const_evaluatable_lib.rs:3:27
2626
|
2727
LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
2828
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`
@@ -35,7 +35,7 @@ LL | let _ = const_evaluatable_lib::test1::<T>();
3535
|
3636
= help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<T>() - 1]:`
3737
note: required by a bound in `test1`
38-
--> $DIR/auxiliary/const_evaluatable_lib.rs:6:10
38+
--> $DIR/auxiliary/const_evaluatable_lib.rs:5:10
3939
|
4040
LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
4141
| ----- required by a bound in this function
@@ -51,7 +51,7 @@ LL | let _ = const_evaluatable_lib::test1::<T>();
5151
|
5252
= help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<T>() - 1]:`
5353
note: required by a bound in `test1`
54-
--> $DIR/auxiliary/const_evaluatable_lib.rs:4:27
54+
--> $DIR/auxiliary/const_evaluatable_lib.rs:3:27
5555
|
5656
LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
5757
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`

tests/ui/const-generics/issues/auxiliary/const_generic_issues_lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(generic_const_exprs)]
2-
#![allow(incomplete_features)]
32

43
// All of these three items must be in `lib2` to reproduce the error
54

tests/ui/const-generics/parent_generics_of_encoding_impl_trait.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | generics_of_parent_impl_trait::foo([()]);
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `foo`
66
|
77
note: required by a bound in `foo`
8-
--> $DIR/auxiliary/generics_of_parent_impl_trait.rs:6:48
8+
--> $DIR/auxiliary/generics_of_parent_impl_trait.rs:5:48
99
|
1010
LL | pub fn foo<const N: usize>(foo: impl Into<[(); N + 1]>) {
1111
| ^^^^^ required by this bound in `foo`

tests/ui/consts/auxiliary/closure-in-foreign-crate.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![crate_type = "lib"]
22
#![feature(const_closures, const_trait_impl, effects)]
3-
#![allow(incomplete_features)]
43

54
pub const fn test() {
65
let cl = const || {};

tests/ui/dyn-star/auxiliary/dyn-star-foreign.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(dyn_star)]
2-
#![allow(incomplete_features)]
32

43
use std::fmt::Display;
54

tests/ui/dyn-star/no-implicit-dyn-star.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ LL | dyn_star_foreign::require_dyn_star_display(1usize);
1010
found type `usize`
1111
= help: `usize` implements `Display`, `#[feature(dyn_star)]` is likely not enabled; that feature it is currently incomplete
1212
note: function defined here
13-
--> $DIR/auxiliary/dyn-star-foreign.rs:6:8
13+
--> $DIR/auxiliary/dyn-star-foreign.rs:5:8
1414
|
1515
LL | pub fn require_dyn_star_display(_: dyn* Display) {}
1616
| ^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui/generic-associated-types/issue-90014-tait2.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//@ error-pattern: expected generic lifetime parameter, found `'a`
77

88
#![feature(type_alias_impl_trait)]
9-
#![allow(incomplete_features)]
109

1110
use std::future::Future;
1211

tests/ui/generic-associated-types/issue-90014-tait2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0792]: expected generic lifetime parameter, found `'a`
2-
--> $DIR/issue-90014-tait2.rs:27:9
2+
--> $DIR/issue-90014-tait2.rs:26:9
33
|
44
LL | type Fut<'a> = impl Future<Output = ()>;
55
| -- this generic parameter must be used with a generic lifetime parameter

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

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//@ check-pass
22

33
#![feature(lint_reasons)]
4-
#![allow(incomplete_features)]
54

65
pub struct Wrapper<T>(T);
76

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

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

3-
#![allow(incomplete_features)]
4-
53
pub trait Foo {
64
async fn woopsie_async(&self) -> String {
75
42

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> $DIR/default-body-type-err-2.rs:7:9
2+
--> $DIR/default-body-type-err-2.rs:5:9
33
|
44
LL | async fn woopsie_async(&self) -> String {
55
| ------ expected `String` because of return type

tests/ui/impl-trait/in-trait/default-body-with-rpit.rs

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

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

86
trait Foo {

tests/ui/impl-trait/in-trait/default-body.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 Foo {

tests/ui/impl-trait/in-trait/early.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 bar<'a: 'a>(&'a mut self);
-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//@ build-pass
22
//@ compile-flags: --crate-type=lib
33

4-
#![allow(incomplete_features)]
5-
64
trait Foo {
75
fn bar() -> impl Sized;
86
}

tests/ui/impl-trait/in-trait/issue-102301.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//@ check-pass
22

3-
#![allow(incomplete_features)]
4-
53
trait Foo<T> {
64
fn foo<F2: Foo<T>>(self) -> impl Foo<T>;
75
}

tests/ui/impl-trait/in-trait/method-signature-matches.lt.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0053]: method `early` has an incompatible type for trait
2-
--> $DIR/method-signature-matches.rs:57:27
2+
--> $DIR/method-signature-matches.rs:55:27
33
|
44
LL | fn early<'late, T>(_: &'late ()) {}
55
| - ^^^^^^^^^
@@ -9,7 +9,7 @@ LL | fn early<'late, T>(_: &'late ()) {}
99
| expected this type parameter
1010
|
1111
note: type in trait
12-
--> $DIR/method-signature-matches.rs:52:28
12+
--> $DIR/method-signature-matches.rs:50:28
1313
|
1414
LL | fn early<'early, T>(x: &'early T) -> impl Sized;
1515
| ^^^^^^^^^

tests/ui/impl-trait/in-trait/method-signature-matches.mismatch.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0053]: method `owo` has an incompatible type for trait
2-
--> $DIR/method-signature-matches.rs:13:15
2+
--> $DIR/method-signature-matches.rs:11:15
33
|
44
LL | fn owo(_: u8) {}
55
| ^^
@@ -8,7 +8,7 @@ LL | fn owo(_: u8) {}
88
| help: change the parameter type to match the trait: `()`
99
|
1010
note: type in trait
11-
--> $DIR/method-signature-matches.rs:8:15
11+
--> $DIR/method-signature-matches.rs:6:15
1212
|
1313
LL | fn owo(x: ()) -> impl Sized;
1414
| ^^

tests/ui/impl-trait/in-trait/method-signature-matches.mismatch_async.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0053]: method `owo` has an incompatible type for trait
2-
--> $DIR/method-signature-matches.rs:24:21
2+
--> $DIR/method-signature-matches.rs:22:21
33
|
44
LL | async fn owo(_: u8) {}
55
| ^^
@@ -8,7 +8,7 @@ LL | async fn owo(_: u8) {}
88
| help: change the parameter type to match the trait: `()`
99
|
1010
note: type in trait
11-
--> $DIR/method-signature-matches.rs:19:21
11+
--> $DIR/method-signature-matches.rs:17:21
1212
|
1313
LL | async fn owo(x: ()) {}
1414
| ^^

tests/ui/impl-trait/in-trait/method-signature-matches.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//@ edition: 2021
22
//@ revisions: mismatch mismatch_async too_many too_few lt
33

4-
#![allow(incomplete_features)]
5-
64
#[cfg(mismatch)]
75
trait Uwu {
86
fn owo(x: ()) -> impl Sized;

tests/ui/impl-trait/in-trait/method-signature-matches.too_few.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0050]: method `come_on_a_little_more_effort` has 0 parameters but the declaration in trait `TooLittle::come_on_a_little_more_effort` has 3
2-
--> $DIR/method-signature-matches.rs:46:5
2+
--> $DIR/method-signature-matches.rs:44:5
33
|
44
LL | fn come_on_a_little_more_effort(_: (), _: (), _: ()) -> impl Sized;
55
| ---------------- trait requires 3 parameters

tests/ui/impl-trait/in-trait/method-signature-matches.too_many.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0050]: method `calm_down_please` has 3 parameters but the declaration in trait `TooMuch::calm_down_please` has 0
2-
--> $DIR/method-signature-matches.rs:35:28
2+
--> $DIR/method-signature-matches.rs:33:28
33
|
44
LL | fn calm_down_please() -> impl Sized;
55
| ------------------------------------ trait requires 0 parameters

tests/ui/impl-trait/in-trait/nested-rpitit.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//@ check-pass
22

33
#![feature(lint_reasons)]
4-
#![allow(incomplete_features)]
54

65
use std::fmt::Display;
76
use std::ops::Deref;

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

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//@ check-pass
22

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

75
trait Foo {

tests/ui/impl-trait/in-trait/reveal.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//@ check-pass
22

33
#![feature(lint_reasons)]
4-
#![allow(incomplete_features)]
54

65
pub trait Foo {
76
fn f() -> Box<impl Sized>;

tests/ui/impl-trait/in-trait/success.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//@ check-pass
22

33
#![feature(lint_reasons)]
4-
#![allow(incomplete_features)]
54

65
use std::fmt::Display;
76

tests/ui/impl-trait/in-trait/wf-bounds.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// issue #101663
22

3-
#![allow(incomplete_features)]
4-
53
use std::fmt::Display;
64

75
trait Wf<T> {

0 commit comments

Comments
 (0)