-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 #116802 - compiler-errors:anchor-opaque-wf, r=oli-obk
Remove `DefiningAnchor::Bubble` from opaque wf check Set the defining anchor to `DefiningAnchor::Bind(parent_def_id)` where `parent_def_id` is the first parent def-id that isn't an opaque. This "fixes" some of the nested-return-type wf tests. If we *do* want these to be hard-errors for TAITs, we should probably make those error separately from this check (i.e. via some check like the code in the `OPAQUE_HIDDEN_INFERRED_BOUND` lint). The fact that some of these tests fail but not all of them seems kinda coincidental. r? oli-obk
- Loading branch information
Showing
7 changed files
with
37 additions
and
48 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
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 was deleted.
Oops, something went wrong.
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,18 +1,13 @@ | ||
error[E0277]: the trait bound `Sendable: Duh` is not satisfied | ||
--> $DIR/nested-return-type2-tait2.rs:27:5 | ||
warning: opaque type `Traitable` does not satisfy its associated type bounds | ||
--> $DIR/nested-return-type2-tait2.rs:21:29 | ||
| | ||
LL | || 42 | ||
| ^^^^^ the trait `Duh` is not implemented for `Sendable` | ||
LL | type Assoc: Duh; | ||
| --- this associated type bound is unsatisfied for `Sendable` | ||
... | ||
LL | type Traitable = impl Trait<Assoc = Sendable>; | ||
| ^^^^^^^^^^^^^^^^ | ||
| | ||
= help: the trait `Duh` is implemented for `i32` | ||
note: required for `{closure@$DIR/nested-return-type2-tait2.rs:27:5: 27:7}` to implement `Trait` | ||
--> $DIR/nested-return-type2-tait2.rs:14:31 | ||
| | ||
LL | impl<R: Duh, F: FnMut() -> R> Trait for F { | ||
| --- ^^^^^ ^ | ||
| | | ||
| unsatisfied trait bound introduced here | ||
= note: `#[warn(opaque_hidden_inferred_bound)]` on by default | ||
|
||
error: aborting due to previous error | ||
warning: 1 warning emitted | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
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,18 +1,17 @@ | ||
error[E0277]: the trait bound `impl Send: Duh` is not satisfied | ||
--> $DIR/nested-return-type2-tait3.rs:26:5 | ||
warning: opaque type `Traitable` does not satisfy its associated type bounds | ||
--> $DIR/nested-return-type2-tait3.rs:20:29 | ||
| | ||
LL | || 42 | ||
| ^^^^^ the trait `Duh` is not implemented for `impl Send` | ||
LL | type Assoc: Duh; | ||
| --- this associated type bound is unsatisfied for `impl Send` | ||
... | ||
LL | type Traitable = impl Trait<Assoc = impl Send>; | ||
| ^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: the trait `Duh` is implemented for `i32` | ||
note: required for `{closure@$DIR/nested-return-type2-tait3.rs:26:5: 26:7}` to implement `Trait` | ||
--> $DIR/nested-return-type2-tait3.rs:14:31 | ||
= note: `#[warn(opaque_hidden_inferred_bound)]` on by default | ||
help: add this bound | ||
| | ||
LL | impl<R: Duh, F: FnMut() -> R> Trait for F { | ||
| --- ^^^^^ ^ | ||
| | | ||
| unsatisfied trait bound introduced here | ||
LL | type Traitable = impl Trait<Assoc = impl Send + Duh>; | ||
| +++++ | ||
|
||
error: aborting due to previous error | ||
warning: 1 warning emitted | ||
|
||
For more information about this error, try `rustc --explain E0277`. |