-
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
Make derive_const
derive properly const-if-const impls
#107777
Make derive_const
derive properly const-if-const impls
#107777
Conversation
@@ -154,7 +154,7 @@ fn mk_ty_param( | |||
.iter() | |||
.map(|b| { | |||
let path = b.to_path(cx, span, self_ident, self_generics); | |||
cx.trait_bound(path) | |||
cx.trait_bound(path, false) |
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 prevents us from generating methods with const bounds on their parameters, but none of the built-in impls actually use type parameters on their methods, so I didn't really want to thread a boolean down 3 levels to this call site.
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.
LGTM
@bors r+ |
…lly-derive-const, r=fee1-dead Make `derive_const` derive properly const-if-const impls Fixes rust-lang#107774 Fixes rust-lang#107666 Also fixes rendering of const-if-const bounds in pretty printing. r? `@oli-obk` or `@fee1-dead`
…lly-derive-const, r=fee1-dead Make `derive_const` derive properly const-if-const impls Fixes rust-lang#107774 Fixes rust-lang#107666 Also fixes rendering of const-if-const bounds in pretty printing. r? ``@oli-obk`` or ``@fee1-dead``
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#105641 (Implement cursors for BTreeMap) - rust-lang#107271 (Treat Drop as a rmw operation) - rust-lang#107710 (Update strip-ansi-escapes and vte) - rust-lang#107758 (Change `arena_cache` to not alter the declared query result) - rust-lang#107777 (Make `derive_const` derive properly const-if-const impls) - rust-lang#107780 (Rename `replace_bound_vars_with_*` to `instantiate_binder_with_*`) - rust-lang#107793 (Add missing tracking issue for `RawOsError`) - rust-lang#107807 (Fix small debug typo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #107774
Fixes #107666
Also fixes rendering of const-if-const bounds in pretty printing.
r? @oli-obk or @fee1-dead