Skip to content

Rollup of 10 pull requests #90415

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

Closed
wants to merge 26 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
23d033e
Added const versions of common numeric operations
AlexApps99 Oct 21, 2021
361c978
Added docs to internal_macro const
AlexApps99 Oct 20, 2021
a076f2b
Repace use of `static_nobundle` with `native_link_modifiers`
mati865 Oct 23, 2021
29a4e4a
Fix incorrect doc link
Veykril Oct 28, 2021
991a296
Make `core::slice::from_raw_parts[_mut]` const
WaffleLapkin Oct 28, 2021
533247c
Add -Zunstable-options instead of feature
mati865 Oct 28, 2021
0030224
Bump libc dependency of std to 0.2.105
kawadakk Oct 29, 2021
6997d66
itron: Rename `itron::thread::{available_conccurrency -> available_pa…
kawadakk Oct 29, 2021
04cb196
don't mutably borrow inner infcx in all of ConstInferUnifier::consts
b-naber Oct 29, 2021
a39c50b
add test
b-naber Oct 29, 2021
87fbf3c
ignore type flags insertion in default_anon_const_substs if error occ…
b-naber Oct 29, 2021
60bf2f1
Add a few query descriptions
wesleywiser Oct 29, 2021
0c70831
Unify titles in rustdoc book doc attributes chapter
GuillaumeGomez Oct 28, 2021
878ac10
Use proper issue number for `feature(const_slice_from_raw_parts)`
WaffleLapkin Oct 29, 2021
afaa54a
Apply changes proposed in the review
WaffleLapkin Oct 29, 2021
b6851ba
Remove unnecessary `macro_use`s in rustdoc
jyn514 Oct 30, 2021
2f30f81
Rollup merge of #89876 - AlexApps99:const_ops, r=oli-obk
matthiaskrgr Oct 30, 2021
b594127
Rollup merge of #90205 - mati865:link-modifiers-in-rustc, r=petrochenkov
matthiaskrgr Oct 30, 2021
ec778f2
Rollup merge of #90371 - Veykril:patch-2, r=jyn514
matthiaskrgr Oct 30, 2021
e8991e9
Rollup merge of #90374 - GuillaumeGomez:unify-rustdoc-book-titles, r=…
matthiaskrgr Oct 30, 2021
015d7f7
Rollup merge of #90377 - WaffleLapkin:const_slice_from_raw_parts, r=o…
matthiaskrgr Oct 30, 2021
0bb8596
Rollup merge of #90392 - solid-rs:fix-solid-support, r=Mark-Simulacrum
matthiaskrgr Oct 30, 2021
0a87c7f
Rollup merge of #90395 - b-naber:const-expr-type-relation, r=oli-obk
matthiaskrgr Oct 30, 2021
309a72b
Rollup merge of #90396 - b-naber:type_flags_ices_default_anon_consts,…
matthiaskrgr Oct 30, 2021
e8c897a
Rollup merge of #90402 - wesleywiser:query_descriptions, r=oli-obk
matthiaskrgr Oct 30, 2021
702f251
Rollup merge of #90412 - jyn514:macro-use, r=camelid
matthiaskrgr Oct 30, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add test
  • Loading branch information
b-naber committed Oct 29, 2021
commit a39c50b64caca297b3e98ebf7cdb68c96ca0f3c1
20 changes: 20 additions & 0 deletions src/test/ui/const-generics/issues/issue-89304.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// check-pass

#![feature(generic_const_exprs)]
#![allow(incomplete_features)]

struct GenericStruct<const T: usize> { val: i64 }

impl<const T: usize> From<GenericStruct<T>> for GenericStruct<{T + 1}> {
fn from(other: GenericStruct<T>) -> Self {
Self { val: other.val }
}
}

impl<const T: usize> From<GenericStruct<{T + 1}>> for GenericStruct<T> {
fn from(other: GenericStruct<{T + 1}>) -> Self {
Self { val: other.val }
}
}

fn main() {}