-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't inspect the generated existential type items #51773
Merged
+20
−124
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,29 @@ | ||
error[E0391]: cycle detected when processing `cycle1::{{exist-impl-Trait}}` | ||
--> $DIR/auto-trait-leak.rs:24:16 | ||
| | ||
LL | fn cycle1() -> impl Clone { | ||
| ^^^^^^^^^^ | ||
| | ||
note: ...which requires processing `cycle1`... | ||
error[E0391]: cycle detected when processing `cycle1` | ||
--> $DIR/auto-trait-leak.rs:24:1 | ||
| | ||
LL | fn cycle1() -> impl Clone { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`... | ||
note: ...which requires processing `cycle2::{{exist-impl-Trait}}`... | ||
--> $DIR/auto-trait-leak.rs:33:16 | ||
--> $DIR/auto-trait-leak.rs:31:16 | ||
| | ||
LL | fn cycle2() -> impl Clone { | ||
| ^^^^^^^^^^ | ||
note: ...which requires processing `cycle2`... | ||
--> $DIR/auto-trait-leak.rs:33:1 | ||
--> $DIR/auto-trait-leak.rs:31:1 | ||
| | ||
LL | fn cycle2() -> impl Clone { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`... | ||
= note: ...which again requires processing `cycle1::{{exist-impl-Trait}}`, completing the cycle | ||
|
||
error[E0391]: cycle detected when processing `cycle1::{{exist-impl-Trait}}` | ||
note: ...which requires processing `cycle1::{{exist-impl-Trait}}`... | ||
--> $DIR/auto-trait-leak.rs:24:16 | ||
| | ||
LL | fn cycle1() -> impl Clone { | ||
| ^^^^^^^^^^ | ||
| | ||
note: ...which requires processing `cycle1`... | ||
--> $DIR/auto-trait-leak.rs:24:1 | ||
| | ||
LL | fn cycle1() -> impl Clone { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`... | ||
note: ...which requires processing `cycle2::{{exist-impl-Trait}}`... | ||
--> $DIR/auto-trait-leak.rs:33:16 | ||
| | ||
LL | fn cycle2() -> impl Clone { | ||
| ^^^^^^^^^^ | ||
note: ...which requires processing `cycle2`... | ||
--> $DIR/auto-trait-leak.rs:33:1 | ||
| | ||
LL | fn cycle2() -> impl Clone { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
= note: ...which again requires processing `cycle1::{{exist-impl-Trait}}`, completing the cycle | ||
|
||
error[E0277]: `std::rc::Rc<std::string::String>` cannot be sent between threads safely | ||
--> $DIR/auto-trait-leak.rs:27:5 | ||
| | ||
LL | send(cycle2().clone()); | ||
| ^^^^ `std::rc::Rc<std::string::String>` cannot be sent between threads safely | ||
| | ||
= help: within `impl std::clone::Clone`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::string::String>` | ||
= note: required because it appears within the type `impl std::clone::Clone` | ||
note: required by `send` | ||
--> $DIR/auto-trait-leak.rs:16:1 | ||
| | ||
LL | fn send<T: Send>(_: T) {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
= note: ...which again requires processing `cycle1`, completing the cycle | ||
note: cycle used when type-checking all item bodies | ||
|
||
error: aborting due to 3 previous errors | ||
error: aborting due to previous error | ||
|
||
Some errors occurred: E0277, E0391. | ||
For more information about an error, try `rustc --explain E0277`. | ||
For more information about this error, try `rustc --explain E0391`. |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this always something we will want to skip...? or will we want to do something here when user-given predicates are permitted?
Actually I think in general that we've been wanting to get rid of this part of the code anyway, which maybe isn't strictly needed anymore? (Though it may be good for generating the errors in a predictable order)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will want this even before user defined existentials. It's just that right now these existential types can't really live on their own because their generics still refer to generics of their parent function. Once we get that fully separated, there won't be any more code running twice with different settings on this node