Skip to content

Rollup of 10 pull requests #60290

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 27 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b2c0fd0
Remove redundant code in copy_clone_conditions
tmandry Apr 21, 2019
d676386
Fix index-page generation
GuillaumeGomez Apr 20, 2019
64f7ced
Derive Default instead of new in applicable lint
sd234678 Apr 24, 2019
ef37f38
Derive Default for EllipsisInclusiveRangePatterns
sd234678 Apr 24, 2019
a0e0849
Add Pin::{into_inner,into_inner_unchecked}
Nemo157 Apr 21, 2019
feb5a53
Prevent failure in case no space left on device in rustdoc
GuillaumeGomez Apr 5, 2019
f199627
Remove useless code and update index page test
GuillaumeGomez Apr 24, 2019
c75e089
chalkify: Add Copy/Clone builtins
tmandry Apr 22, 2019
56ab3e7
Add builtin impls for int and float inference vars in chalk
tmandry Apr 24, 2019
4bd36ab
Introduce hir::ExprKind::Use and employ in for loop desugaring.
Centril Apr 24, 2019
6aa5a5d
Improvement comment explanations
GuillaumeGomez Apr 25, 2019
72cda98
Implement Debug for Place using Place::iterate
spastorino Apr 24, 2019
d37f3fc
Add feature-gate for f16c target feature
gnzlbg Apr 25, 2019
976b3d1
Prevent const parameters having type parameters as types
varkor Apr 25, 2019
102f7a8
Make sure const params with type params don't cause errors without a …
varkor Apr 25, 2019
908a639
Add a test for const parameters with type parameters as types
varkor Apr 25, 2019
6b190d6
Do not ICE when checking types against foreign fn
estebank Apr 25, 2019
65a588c
Rollup merge of #59734 - GuillaumeGomez:improve-rustdoc-failure, r=ol…
Centril Apr 25, 2019
7dd5328
Rollup merge of #60134 - GuillaumeGomez:fix-index-page, r=Manishearth
Centril Apr 25, 2019
2ed9247
Rollup merge of #60165 - Nemo157:pin-into-inner, r=cramertj
Centril Apr 25, 2019
cc9cee2
Rollup merge of #60183 - tmandry:chalk-builtin-copy-clone, r=scalexm
Centril Apr 25, 2019
a4d166b
Rollup merge of #60225 - Centril:hir-exprkind-use-in-for-loops, r=oli…
Centril Apr 25, 2019
651262d
Rollup merge of #60247 - spastorino:place2_3, r=oli-obk
Centril Apr 25, 2019
186da52
Rollup merge of #60259 - sd234678:60181-derive-default-lints, r=Centril
Centril Apr 25, 2019
ae36d8b
Rollup merge of #60267 - gnzlbg:f16c_target_feature, r=alexcrichton
Centril Apr 25, 2019
409d124
Rollup merge of #60284 - varkor:const-param-of-type-param, r=cramertj
Centril Apr 25, 2019
e73c6f7
Rollup merge of #60285 - estebank:icent, r=varkor
Centril Apr 25, 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 const parameters with type parameters as types
  • Loading branch information
varkor committed Apr 25, 2019
commit 908a6399bcbc008a6d3b36b3db8724d7c93e890f
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash

pub struct Dependent<T, const X: T>([(); X]); //~ ERROR const parameters
//~^ ERROR parameter `T` is never used

fn main() {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
--> $DIR/const-param-type-depends-on-type-param.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^

error[E0671]: const parameters cannot depend on type parameters
--> $DIR/const-param-type-depends-on-type-param.rs:4:34
|
LL | pub struct Dependent<T, const X: T>([(); X]);
| ^ const parameter depends on type parameter

error[E0392]: parameter `T` is never used
--> $DIR/const-param-type-depends-on-type-param.rs:4:22
|
LL | pub struct Dependent<T, const X: T>([(); X]);
| ^ unused parameter
|
= help: consider removing `T` or using a marker such as `std::marker::PhantomData`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0392, E0671.
For more information about an error, try `rustc --explain E0392`.