Skip to content

require type defaults to be after const generic parameters - #74654

Merged
bors merged 2 commits into
rust-lang:masterfrom
lcnr:default-no-more
Jul 23, 2020
Merged

require type defaults to be after const generic parameters#74654
bors merged 2 commits into
rust-lang:masterfrom
lcnr:default-no-more

Conversation

@lcnr

@lcnrlcnr commented Jul 22, 2020

Copy link
Copy Markdown
Contributor

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

@lcnr

lcnr commented Jul 22, 2020

Copy link
Copy Markdown
ContributorAuthor

r? @varkor (thanks @rust-highfive)

Comment threadsrc/librustc_ast_passes/ast_validation.rs Outdated
@varkor

Copy link
Copy Markdown
Contributor

r=me after wording tweak for consistency.

Co-authored-by: varkor <github@varkor.com>
@lcnr

lcnr commented Jul 23, 2020

Copy link
Copy Markdown
ContributorAuthor

@bors r=varkor rollup=always

@bors

bors commented Jul 23, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 2f56596 has been approved by varkor

@borsbors 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:masterJul 23, 2020
@lcnr
lcnr deleted the default-no-more branch July 23, 2020 10:45
@cuvipercuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: 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

@lcnr@varkor@bors@cuviper