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

Rollup of 11 pull requests #58831

Closed
wants to merge 39 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
1fd2f16
Have all methods of Filter and FilterMap use internal iteration
timvermeulen Feb 25, 2019
d89c2f6
Use informational target machine for metadata
nagisa Feb 20, 2019
8884771
Add relevant benchmarks
timvermeulen Feb 27, 2019
ec2e4ba
Improve existing benchmarks to prevent extreme optimizations
timvermeulen Feb 27, 2019
88bd624
Add trailing newline
timvermeulen Feb 27, 2019
932fe17
rust-lldb: fix crash when printing empty string
euclio Feb 22, 2019
4e7d4c7
ManuallyDrop != MaybeUninit
RalfJung Feb 27, 2019
b70a953
Replace `s` with `self` in docs for str methods taking self.
tspiteri Feb 20, 2019
f92c204
improve readability
RalfJung Feb 27, 2019
a046c38
Make migrate mode work at item level granularity
matthewjasper Feb 27, 2019
a998b1f
allow specifying attributes for tool lints
euclio Feb 27, 2019
fc4b916
Add a test for #10876
varkor Feb 25, 2019
e206d4e
Add tests for #26448
varkor Feb 25, 2019
93ff7dc
Add a test for #26619
varkor Feb 25, 2019
987d71f
Add a test for #44127
varkor Feb 25, 2019
bdd3826
Add a test for #44255
varkor Feb 25, 2019
36b1326
Add a test for #46101
varkor Feb 25, 2019
1068424
Add a test for #55731
varkor Feb 25, 2019
525dc46
Add a test for #57781
varkor Feb 25, 2019
5fb2d8b
Add a test for #22892
varkor Feb 25, 2019
0976e5e
Add a test for #28587
varkor Feb 25, 2019
42a89c6
Add a test for #26577
varkor Feb 25, 2019
0df193f
Add a test for #27054
varkor Feb 25, 2019
70b853d
Update test for issue #55731
varkor Feb 26, 2019
797d8ea
Make `Unique::as_ptr`, `NonNull::dangling` and `NonNull::cast` const
Feb 28, 2019
0c1a38c
Update src/libcore/mem.rs
Centril Feb 28, 2019
96be181
Fixed a syntax error in the pin docs
Feb 28, 2019
3391f6c
tidy: deny(rust_2018_idioms)
Centril Mar 1, 2019
059121b
Rollup merge of #58605 - nagisa:fix-the-metadata, r=michaelwoerister
pietroalbini Mar 1, 2019
cb09ce2
Rollup merge of #58629 - euclio:debug-empty-str, r=alexcrichton
pietroalbini Mar 1, 2019
11e7256
Rollup merge of #58730 - timvermeulen:internal_iteration, r=scottmcm
pietroalbini Mar 1, 2019
fcf734c
Rollup merge of #58743 - varkor:bulk-needstest-1, r=alexcrichton
pietroalbini Mar 1, 2019
faeba62
Rollup merge of #58750 - TimDiekmann:master, r=oli-obk
pietroalbini Mar 1, 2019
20409cc
Rollup merge of #58780 - RalfJung:manually-drop, r=nagisa
pietroalbini Mar 1, 2019
15c1c1f
Rollup merge of #58782 - tspiteri:str-escape-self, r=kennytm
pietroalbini Mar 1, 2019
9bbd413
Rollup merge of #58785 - euclio:tool-lint-attrs, r=estebank
pietroalbini Mar 1, 2019
ba87c3d
Rollup merge of #58788 - matthewjasper:compare-children, r=pnkfelix
pietroalbini Mar 1, 2019
583bea5
Rollup merge of #58821 - alex:patch-1, r=Centril
pietroalbini Mar 1, 2019
5de3f96
Rollup merge of #58830 - Centril:rust_2018_idioms-tidy, r=oli-obk
pietroalbini Mar 1, 2019
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 a test for #44255
  • Loading branch information
varkor committed Feb 27, 2019
commit bdd38263c03a7166f550811247902a624c07749f
29 changes: 29 additions & 0 deletions src/test/ui/issues/issue-44255.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// run-pass

use std::marker::PhantomData;

fn main() {
let _arr = [1; <Multiply<Five, Five>>::VAL];
}

trait TypeVal<T> {
const VAL: T;
}

struct Five;

impl TypeVal<usize> for Five {
const VAL: usize = 5;
}

struct Multiply<N, M> {
_n: PhantomData<N>,
_m: PhantomData<M>,
}

impl<N, M> TypeVal<usize> for Multiply<N, M>
where N: TypeVal<usize>,
M: TypeVal<usize>,
{
const VAL: usize = N::VAL * M::VAL;
}