-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Nightly #![feature(generic_const_exprs)]
: mismatched types in derive macro Clone
#106419
Labels
A-const-generics
Area: const generics (parameters and arguments)
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-generic_const_exprs
`#![feature(generic_const_exprs)]`
requires-nightly
This issue requires a nightly compiler in some way.
Comments
Noratrieb
added
A-const-generics
Area: const generics (parameters and arguments)
requires-nightly
This issue requires a nightly compiler in some way.
F-generic_const_exprs
`#![feature(generic_const_exprs)]`
labels
Jan 3, 2023
I believe this now compiles on the latest nightly, due to fixing #105292 |
BoxyUwU
added
the
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
label
Jan 17, 2023
megakorre
added a commit
to megakorre/rust
that referenced
this issue
Jan 19, 2023
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jan 20, 2023
…compiler-errors Added const-generic ui test case for issue rust-lang#106419 This PR adds a test case for rust-lang#106419 which has been fixed in master by rust-lang#105292 I also ran the test on f769d34 (the commit before rust-lang#105292 was merged) and it did fail there with the following output. ``` --- stderr ------------------------------- error[E0308]: mismatched types --> /home/patrikk/src/rust/src/test/ui/const-generics/issue-106419-struct-with-multiple-const-params.rs:5:10 | LL | #[derive(Clone)] | ^^^^^ | | | expected `A`, found `B` | expected `Bar<A, B>` because of return type | = note: expected struct `Bar<A, _>` found struct `Bar<B, _>` = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error For more information about this error, try `rustc --explain E0308`. ------------------------------------------ ```
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jan 20, 2023
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#106783 (Recover labels written as identifiers) - rust-lang#106973 (Don't treat closures from other crates as local) - rust-lang#106979 (Document how to get the type of a default associated type) - rust-lang#107053 (signal update string representation for haiku.) - rust-lang#107058 (Recognise double-equals homoglyph) - rust-lang#107067 (Custom MIR: Support storage statements) - rust-lang#107076 (Added const-generic ui test case for issue rust-lang#106419) - rust-lang#107091 (Fix broken format strings in `infer.ftl`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
A test has been added, closing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-const-generics
Area: const generics (parameters and arguments)
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-generic_const_exprs
`#![feature(generic_const_exprs)]`
requires-nightly
This issue requires a nightly compiler in some way.
The
Clone
derive macro gets confused about ordering of const parameters of same type.Code:
rustc demo.rs
Error:
To work around do any of:
as usize
in[(); A as usize]:,
and[(); B as usize]:,
#[derive(Clone)]
, Copy
afterClone
.A
andB
different types.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: