-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Always register sized obligation for argument #112643
Conversation
r? @wesleywiser (rustbot has picked a reviewer for you, use r? to override) |
@@ -15,22 +15,6 @@ help: function arguments must have a statically known size, borrowed types alway | |||
LL | r: &dyn A + 'static | |||
| + | |||
|
|||
error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time |
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.
This error goes away because we are now able to successfully deduplicate the duplicated sized obligation that results here.
I'm 99% sure that this is an implementation detail that has to do with the way that the ObligationForest
stores and deduplicates the obligations that it knows it has processed already, and the way that the GatherLocalsVisitor
registers Sized
obligations for parameters. 😅
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.
remove duplicate sized errors with this one simple trick (removing the hack to remove duplicate sized errors)
@bors r+ rollup |
… r=wesleywiser Always register sized obligation for argument Removes a "hack" that skips registering sized obligations for parameters that are simple identifiers. This doesn't seem to affect diagnostics because we're probably already being smart enough about deduplicating identical error messages anyways. Fixes rust-lang#112608
… r=wesleywiser Always register sized obligation for argument Removes a "hack" that skips registering sized obligations for parameters that are simple identifiers. This doesn't seem to affect diagnostics because we're probably already being smart enough about deduplicating identical error messages anyways. Fixes rust-lang#112608
… r=wesleywiser Always register sized obligation for argument Removes a "hack" that skips registering sized obligations for parameters that are simple identifiers. This doesn't seem to affect diagnostics because we're probably already being smart enough about deduplicating identical error messages anyways. Fixes rust-lang#112608
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#112616 (Improve tests on targets without unwinding) - rust-lang#112643 (Always register sized obligation for argument) - rust-lang#112740 (Add link to rustdoc book search chapter in help popover) - rust-lang#112810 (Don't ICE on unnormalized struct tail in layout computation) - rust-lang#112870 (Migrate `item_bounds` to `ty::Clause`) - rust-lang#112925 (Stop hiding const eval limit in external macros) - rust-lang#112960 ([tests/rustdoc] Add `@files` command) - rust-lang#112962 (Fix rustdoc gui tester) r? `@ghost` `@rustbot` modify labels: rollup
Removes a "hack" that skips registering sized obligations for parameters that are simple identifiers. This doesn't seem to affect diagnostics because we're probably already being smart enough about deduplicating identical error messages anyways.
Fixes #112608