Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
963131e
Derive `Ord`, `PartialOrd` and `Hash` for `SocketAddr*`
WaffleLapkin Oct 14, 2023
5c13c69
Add tests for `SocketAddrV6` ordering with scope_id and flowinfo
WaffleLapkin Oct 15, 2023
2bba98b
Avoid unnecessary renumbering
JonasAlaif Oct 16, 2023
66a554b
Add method to convert internal to stable constructs
celinval Oct 21, 2023
f613b26
Add `internal()` method counterpart to `stable()`
celinval Oct 23, 2023
421631a
Remove unsafe and `Rc`
celinval Oct 23, 2023
cb61816
compiler: Add target features for LoongArch
heiher Oct 19, 2023
6cf9423
tests: Add features-gate for LoongArch
heiher Oct 19, 2023
300d04d
tests/ui/abi/compatibility: Set min-llvm-version to 17 for LoongArch64
heiher Oct 24, 2023
ae86f59
Add test and remove double ref
celinval Oct 24, 2023
2b36547
Introduce `-C instrument-coverage=branch` to gate branch coverage
Swatinem Aug 21, 2023
68f5536
Migrate diagnostics in `rustc_hir_analysis/src/coherence/orphan.rs`
obeis Oct 3, 2023
90e3aae
Remove incomplete features from RPITIT/AFIT tests
compiler-errors Oct 24, 2023
f3d20be
suggest unwrap/expect for let binding type mismatch
chenyukang Oct 17, 2023
c07ff9c
Rollup merge of #116094 - Swatinem:coverage-branch-gate, r=wesleywiser
matthiaskrgr Oct 24, 2023
f3e18e4
Rollup merge of #116396 - obeis:hir-analysis-migrate-diagnostics-7, r…
matthiaskrgr Oct 24, 2023
845c414
Rollup merge of #116714 - WaffleLapkin:order-the-order, r=joshtriplett
matthiaskrgr Oct 24, 2023
61ff4db
Rollup merge of #116792 - JonasAlaif:renumber-fix, r=b-naber
matthiaskrgr Oct 24, 2023
7a0a2d2
Rollup merge of #116841 - chenyukang:yukang-suggest-unwrap-expect, r=…
matthiaskrgr Oct 24, 2023
84f0bef
Rollup merge of #116943 - heiher:target-features, r=wesleywiser
matthiaskrgr Oct 24, 2023
f131a0a
Rollup merge of #117010 - celinval:smir-internal, r=oli-obk
matthiaskrgr Oct 24, 2023
060bdfd
Rollup merge of #117127 - compiler-errors:incomplete, r=lqd
matthiaskrgr Oct 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove incomplete features from RPITIT/AFIT tests
  • Loading branch information
compiler-errors committed Oct 24, 2023
commit 90e3aaeca2b5c88a652d78389c2a927abfb66e4c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// edition: 2021

#![allow(incomplete_features)]

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0053]: method `foo` has an incompatible type for trait
--> $DIR/async-example-desugared-boxed-in-trait.rs:13:5
--> $DIR/async-example-desugared-boxed-in-trait.rs:11:5
|
LL | async fn foo(&self) -> i32 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Pin<Box<dyn Future<Output = i32>>>`, found future
|
note: type in trait
--> $DIR/async-example-desugared-boxed-in-trait.rs:9:22
--> $DIR/async-example-desugared-boxed-in-trait.rs:7:22
|
LL | fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// edition: 2021

#![allow(incomplete_features)]

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: method `foo` should be async because the method from the trait is async
--> $DIR/async-example-desugared-boxed.rs:13:5
--> $DIR/async-example-desugared-boxed.rs:11:5
|
LL | async fn foo(&self) -> i32;
| --------------------------- required because the trait method is async
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// edition: 2021

#![feature(lint_reasons)]
#![allow(incomplete_features)]

use std::future::Future;
use std::pin::Pin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// check-pass
// edition: 2021

#![allow(incomplete_features)]

use std::future::Future;

trait MyTrait {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// edition: 2021

#![allow(incomplete_features)]

use std::future::Future;
use std::task::Poll;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: method `foo` should be async because the method from the trait is async
--> $DIR/async-example-desugared-manual.rs:21:5
--> $DIR/async-example-desugared-manual.rs:19:5
|
LL | async fn foo(&self) -> i32;
| --------------------------- required because the trait method is async
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/async-example-desugared.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// check-pass
// edition: 2021

#![allow(incomplete_features)]

use std::future::Future;

trait MyTrait {
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/async-example.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// check-pass
// edition: 2021

#![allow(incomplete_features)]

trait MyTrait {
#[allow(async_fn_in_trait)]
async fn foo(&self) -> i32;
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/async-generics-and-bounds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// known-bug: #102682
// edition: 2021

#![allow(incomplete_features)]

use std::fmt::Debug;
use std::hash::Hash;

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

error[E0311]: the parameter type `T` may not live long enough
--> $DIR/async-generics-and-bounds.rs:11:5
--> $DIR/async-generics-and-bounds.rs:9:5
|
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
| ^^^^^^^^^^^^^-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/async-generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// known-bug: #102682
// edition: 2021

#![allow(incomplete_features)]

trait MyTrait<T, U> {
async fn foo(&self) -> &(T, U);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/async-await/in-trait/async-generics.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0311]: the parameter type `U` may not live long enough
--> $DIR/async-generics.rs:8:5
--> $DIR/async-generics.rs:6:5
|
LL | async fn foo(&self) -> &(T, U);
| ^^^^^^^^^^^^^-^^^^^^^^^^^^^^^^^
Expand All @@ -13,7 +13,7 @@ LL | async fn foo<'a>(&'a self) -> &'a (T, U) where U: 'a;
| ++++ ++ ++ +++++++++++

error[E0311]: the parameter type `T` may not live long enough
--> $DIR/async-generics.rs:8:5
--> $DIR/async-generics.rs:6:5
|
LL | async fn foo(&self) -> &(T, U);
| ^^^^^^^^^^^^^-^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// check-pass
// edition: 2021

#![allow(incomplete_features)]

use std::fmt::Debug;

trait MyTrait<'a, 'b, T> {
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/async-lifetimes.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// check-pass
// edition: 2021

#![allow(incomplete_features)]

trait MyTrait<'a, 'b, T> {
#[allow(async_fn_in_trait)]
async fn foo(&'a self, key: &'b T) -> (&'a Self, &'b T);
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/async-recursive-generic.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// edition: 2021

#![allow(incomplete_features)]

trait MyTrait<T> {
async fn foo_recursive(&self, n: usize) -> T;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0733]: recursion in an `async fn` requires boxing
--> $DIR/async-recursive-generic.rs:10:5
--> $DIR/async-recursive-generic.rs:8:5
|
LL | async fn foo_recursive(&self, n: usize) -> T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive `async fn`
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/async-recursive.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// edition: 2021

#![allow(incomplete_features)]

trait MyTrait {
async fn foo_recursive(&self, n: usize) -> i32;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/async-await/in-trait/async-recursive.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0733]: recursion in an `async fn` requires boxing
--> $DIR/async-recursive.rs:10:5
--> $DIR/async-recursive.rs:8:5
|
LL | async fn foo_recursive(&self, n: usize) -> i32 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive `async fn`
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/early-bound-1.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// check-pass
// edition:2021

#![allow(incomplete_features)]

pub trait Foo {
#[allow(async_fn_in_trait)]
async fn foo(&mut self);
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/deep-match.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(incomplete_features)]

struct Wrapper<T>(T);

trait Foo {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/impl-trait/in-trait/deep-match.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0053]: method `bar` has an incompatible return type for trait
--> $DIR/deep-match.rs:10:17
--> $DIR/deep-match.rs:8:17
|
LL | fn bar() -> i32 {
| ^^^
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/default-body-type-err.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(incomplete_features)]

use std::ops::Deref;

pub trait Foo {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/impl-trait/in-trait/default-body-type-err.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0271]: type mismatch resolving `<&i32 as Deref>::Target == String`
--> $DIR/default-body-type-err.rs:6:22
--> $DIR/default-body-type-err.rs:4:22
|
LL | fn lol(&self) -> impl Deref<Target = String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `String`
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/doesnt-satisfy.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(incomplete_features)]

trait Foo {
fn bar() -> impl std::fmt::Display;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error[E0277]: `()` doesn't implement `std::fmt::Display`
--> $DIR/doesnt-satisfy.rs:8:17
--> $DIR/doesnt-satisfy.rs:6:17
|
LL | fn bar() -> () {}
| ^^ `()` cannot be formatted with the default formatter
|
= help: the trait `std::fmt::Display` is not implemented for `()`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
note: required by a bound in `Foo::{opaque#0}`
--> $DIR/doesnt-satisfy.rs:4:22
--> $DIR/doesnt-satisfy.rs:2:22
|
LL | fn bar() -> impl std::fmt::Display;
| ^^^^^^^^^^^^^^^^^ required by this bound in `Foo::{opaque#0}`
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/generics-mismatch.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(incomplete_features)]

struct U;

trait Foo {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/impl-trait/in-trait/generics-mismatch.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0049]: method `bar` has 1 type parameter but its trait declaration has 0 type parameters
--> $DIR/generics-mismatch.rs:10:12
--> $DIR/generics-mismatch.rs:8:12
|
LL | fn bar(&self) -> impl Sized;
| - expected 0 type parameters
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/issue-102140.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(incomplete_features)]

trait Marker {}
impl Marker for u32 {}

Expand Down
6 changes: 3 additions & 3 deletions tests/ui/impl-trait/in-trait/issue-102140.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
--> $DIR/issue-102140.rs:22:22
--> $DIR/issue-102140.rs:20:22
|
LL | MyTrait::foo(&self)
| ------------ ^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
Expand All @@ -13,15 +13,15 @@ LL + MyTrait::foo(self)
|

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

error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
--> $DIR/issue-102140.rs:22:9
--> $DIR/issue-102140.rs:20:9
|
LL | MyTrait::foo(&self)
| ^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/issue-102571.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(incomplete_features)]

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

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/impl-trait/in-trait/issue-102571.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/issue-102571.rs:11:9
--> $DIR/issue-102571.rs:9:9
|
LL | let () = t.bar();
| ^^ ------- this expression has type `impl Deref<Target = impl std::fmt::Display + ?Sized>`
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/object-safety.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(incomplete_features)]

use std::fmt::Debug;

trait Foo {
Expand Down
16 changes: 8 additions & 8 deletions tests/ui/impl-trait/in-trait/object-safety.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0038]: the trait `Foo` cannot be made into an object
--> $DIR/object-safety.rs:16:33
--> $DIR/object-safety.rs:14:33
|
LL | let i = Box::new(42_u32) as Box<dyn Foo>;
| ^^^^^^^^^^^^ `Foo` cannot be made into an object
|
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>
--> $DIR/object-safety.rs:6:22
--> $DIR/object-safety.rs:4:22
|
LL | trait Foo {
| --- this trait cannot be made into an object...
Expand All @@ -14,13 +14,13 @@ LL | fn baz(&self) -> impl Debug;
= help: consider moving `baz` to another trait

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

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

error[E0038]: the trait `Foo` cannot be made into an object
--> $DIR/object-safety.rs:16:13
--> $DIR/object-safety.rs:14:13
|
LL | let i = Box::new(42_u32) as Box<dyn Foo>;
| ^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object
|
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>
--> $DIR/object-safety.rs:6:22
--> $DIR/object-safety.rs:4:22
|
LL | trait Foo {
| --- this trait cannot be made into an object...
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(incomplete_features)]

use std::fmt::Display;

trait Foo {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/opaque-in-impl-is-opaque.rs:16:19
--> $DIR/opaque-in-impl-is-opaque.rs:14:19
|
LL | fn bar(&self) -> impl Display {
| ------------ the found opaque type
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(incomplete_features)]

struct S;

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