Skip to content
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

require type defaults to be after const generic parameters #74654

Merged
merged 2 commits into from
Jul 23, 2020

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Jul 22, 2020

From current discussions it seems like the goal here is for type and const parameters to be unordered and allow things like struct Foo<const N: usize, T = u32>(T) and struct Foo<T, const N: usize = 7> this way.

Note: This means that using min_const_generics it will not be possible for an adt to have both type defaults and const parameters.

closes #70471

r? @varkor @eddyb

as if this is currently possible. HA!
@lcnr
Copy link
Contributor Author

lcnr commented Jul 22, 2020

r? @varkor (thanks @rust-highfive)

@varkor
Copy link
Member

varkor commented Jul 22, 2020

r=me after wording tweak for consistency.

Co-authored-by: varkor <[email protected]>
@lcnr
Copy link
Contributor Author

lcnr commented Jul 23, 2020

@bors r=varkor rollup=always

@bors
Copy link
Contributor

bors commented Jul 23, 2020

📌 Commit 2f56596 has been approved by varkor

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 23, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 23, 2020
…arth

Rollup of 8 pull requests

Successful merges:

 - rust-lang#74141 (libstd/libcore: fix various typos)
 - rust-lang#74490 (add a Backtrace::disabled function)
 - rust-lang#74548 (one more Path::with_extension example, to demonstrate behavior)
 - rust-lang#74587 (Prefer constant over function)
 - rust-lang#74606 (Remove Linux workarounds for missing CLOEXEC support)
 - rust-lang#74637 (Make str point to primitive page)
 - rust-lang#74654 (require type defaults to be after const generic parameters)
 - rust-lang#74659 (Improve codegen for unchecked float casts on wasm)

Failed merges:

r? @ghost
@bors bors merged commit e9d4134 into rust-lang:master Jul 23, 2020
@lcnr lcnr deleted the default-no-more branch July 23, 2020 10:45
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

const_generics with default arguments
4 participants