forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#130718 - jackh726:known-bug-cleanup, r=comp…
…iler-errors Cleanup some known-bug issues I went through most of the known-bug tests (except those under `tests/crashes`) and made sure the issue had the `S-bug-has-test` label and checked that the linked issue was open. This is a bunch of cleanups, mainly issues that have been closed and the tests should have been updated. Importantly, there are many known-bug tests linking to rust-lang#110395. This *probably* isn't right - that is a tracking issue. But I don't really know what the "right" thing to do here. Probably, most that are actually *supposed* to be tests for const trait need to be linked to *that* tracking issue. And any other tests that were mislabeled need to be handled accordingly e.g. rust-lang#130482. cc `@fee1-dead`
- Loading branch information
Showing
18 changed files
with
100 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
//@ check-fail | ||
//@ known-bug: #102682 | ||
//@ known-bug: #130935 | ||
//@ edition: 2021 | ||
|
||
use std::fmt::Debug; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
//@ check-fail | ||
//@ known-bug: #102682 | ||
//@ known-bug: #130935 | ||
//@ edition: 2021 | ||
|
||
trait MyTrait<T, U> { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
pub trait Trait0<T, U, V> {} | ||
pub trait Trait1<T, U> {} | ||
pub trait Trait2<T, U> { | ||
type Assoc; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
warning[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`B`) | ||
--> $DIR/orphan-check-alias.rs:21:6 | ||
| | ||
LL | impl<T> foreign::Trait2<B, T> for <T as Id>::Assoc { | ||
| ^ type parameter `T` must be covered by another type when it appears before the first local type (`B`) | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #124559 <https://github.com/rust-lang/rust/issues/124559> | ||
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type | ||
= note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last | ||
= note: `#[warn(uncovered_param_in_projection)]` on by default | ||
|
||
warning: 1 warning emitted | ||
|
||
For more information about this error, try `rustc --explain E0210`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
warning[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`B`) | ||
--> $DIR/orphan-check-alias.rs:21:6 | ||
| | ||
LL | impl<T> foreign::Trait2<B, T> for <T as Id>::Assoc { | ||
| ^ type parameter `T` must be covered by another type when it appears before the first local type (`B`) | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #124559 <https://github.com/rust-lang/rust/issues/124559> | ||
= note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type | ||
= note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last | ||
= note: `#[warn(uncovered_param_in_projection)]` on by default | ||
|
||
warning: 1 warning emitted | ||
|
||
For more information about this error, try `rustc --explain E0210`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Alias might not cover type parameters. | ||
|
||
//@ revisions: classic next | ||
//@[next] compile-flags: -Znext-solver | ||
|
||
//@ aux-crate:foreign=parametrized-trait.rs | ||
//@ edition:2021 | ||
|
||
//@ known-bug: #99554 | ||
//@ check-pass | ||
|
||
trait Id { | ||
type Assoc; | ||
} | ||
|
||
impl<T> Id for T { | ||
type Assoc = T; | ||
} | ||
|
||
pub struct B; | ||
impl<T> foreign::Trait2<B, T> for <T as Id>::Assoc { | ||
type Assoc = usize; | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...next-solver/coherence/issue-102048.stderr → ...solver/coherence/issue-102048.next.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
tests/ui/type-alias-impl-trait/implied_lifetime_wf_check.error.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
error[E0119]: conflicting implementations of trait `Yay` for type `Alias` | ||
--> $DIR/implied_lifetime_wf_check.rs:26:1 | ||
| | ||
LL | impl Yay for <() as HideIt>::Assoc {} | ||
| ---------------------------------- first implementation here | ||
LL | #[cfg(error)] | ||
LL | impl Yay for i32 {} | ||
| ^^^^^^^^^^^^^^^^ conflicting implementation for `Alias` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0119`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters