Skip to content

Rollup of 8 pull requests #90416

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

Merged
merged 20 commits into from
Oct 30, 2021
Merged
Changes from 1 commit
Commits
Show all changes
20 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
29a4e4a
Fix incorrect doc link
Veykril Oct 28, 2021
991a296
Make `core::slice::from_raw_parts[_mut]` const
WaffleLapkin Oct 28, 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
20bb932
Rollup merge of #89876 - AlexApps99:const_ops, r=oli-obk
matthiaskrgr Oct 30, 2021
86087f9
Rollup merge of #90371 - Veykril:patch-2, r=jyn514
matthiaskrgr Oct 30, 2021
a213740
Rollup merge of #90374 - GuillaumeGomez:unify-rustdoc-book-titles, r=…
matthiaskrgr Oct 30, 2021
b531364
Rollup merge of #90377 - WaffleLapkin:const_slice_from_raw_parts, r=o…
matthiaskrgr Oct 30, 2021
88e0bea
Rollup merge of #90395 - b-naber:const-expr-type-relation, r=oli-obk
matthiaskrgr Oct 30, 2021
d99dc7a
Rollup merge of #90396 - b-naber:type_flags_ices_default_anon_consts,…
matthiaskrgr Oct 30, 2021
f9111e0
Rollup merge of #90402 - wesleywiser:query_descriptions, r=oli-obk
matthiaskrgr Oct 30, 2021
19b5b0f
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() {}